From 0e2b715d60501b5edd311ea56e76c2dbf9116e1d Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Mon, 2 Feb 2026 10:08:55 +1000 Subject: [PATCH] fix: form error handling --- hive/handlers/ec2/volume/service_impl.go | 5 ++ .../services/hiveui/frontend/dist/assets/_.js | 2 +- .../hiveui/frontend/dist/assets/_id.js | 2 +- .../hiveui/frontend/dist/assets/_id2.js | 2 +- .../hiveui/frontend/dist/assets/_id4.js | 2 +- .../frontend/dist/assets/alert-dialog.js | 2 +- .../hiveui/frontend/dist/assets/back-link.js | 2 +- .../hiveui/frontend/dist/assets/badge.js | 2 +- .../hiveui/frontend/dist/assets/check.js | 2 +- .../frontend/dist/assets/create-key-pair.js | 2 +- .../hiveui/frontend/dist/assets/download.js | 2 +- .../hiveui/frontend/dist/assets/ec2.js | 2 +- .../frontend/dist/assets/error-banner.js | 2 +- .../hiveui/frontend/dist/assets/field.js | 1 + .../frontend/dist/assets/import-key-pair.js | 2 +- .../hiveui/frontend/dist/assets/index.js | 4 +- .../hiveui/frontend/dist/assets/index4.js | 2 +- .../hiveui/frontend/dist/assets/index5.js | 2 +- .../hiveui/frontend/dist/assets/index6.js | 2 +- .../hiveui/frontend/dist/assets/index7.js | 2 +- .../hiveui/frontend/dist/assets/index8.js | 2 +- .../hiveui/frontend/dist/assets/index9.js | 2 +- .../hiveui/frontend/dist/assets/list-card.js | 2 +- .../hiveui/frontend/dist/assets/login.js | 2 +- .../frontend/dist/assets/run-instances.js | 2 +- .../hiveui/frontend/dist/assets/trash-2.js | 2 +- .../frontend/dist/assets/upload-button.js | 2 +- .../frontend/dist/assets/useMutation.js | 2 +- .../frontend/dist/assets/useSuspenseQuery.js | 2 +- .../hiveui/frontend/dist/assets/zod.js | 1 - .../_auth/ec2/(instances)/run-instances.tsx | 72 +++++++++++-------- .../_auth/ec2/(key)/create-key-pair.tsx | 15 ++-- .../_auth/ec2/(key)/import-key-pair.tsx | 30 ++++---- .../ec2/(volumes)/describe-volumes/$id.tsx | 38 ++++------ .../_auth/ec2/(volumes)/modify-volume/$id.tsx | 15 ++-- 35 files changed, 121 insertions(+), 112 deletions(-) create mode 100644 hive/services/hiveui/frontend/dist/assets/field.js delete mode 100644 hive/services/hiveui/frontend/dist/assets/zod.js diff --git a/hive/handlers/ec2/volume/service_impl.go b/hive/handlers/ec2/volume/service_impl.go index 76323ad0e..b0fc75677 100644 --- a/hive/handlers/ec2/volume/service_impl.go +++ b/hive/handlers/ec2/volume/service_impl.go @@ -112,6 +112,11 @@ func (s *VolumeServiceImpl) DescribeVolumes(input *ec2.DescribeVolumesInput) (*e // Extract volume ID from prefix (remove trailing slash) volumeID := strings.TrimSuffix(prefixStr, "/") + // Skip internal sub-volumes (EFI and cloud-init partitions) + if strings.HasSuffix(volumeID, "-efi") || strings.HasSuffix(volumeID, "-cloudinit") { + continue + } + vol, err := s.getVolumeByID(volumeID) if err != nil { slog.Error("Failed to get volume", "volumeId", volumeID, "err", err) diff --git a/hive/services/hiveui/frontend/dist/assets/_.js b/hive/services/hiveui/frontend/dist/assets/_.js index b59bdc9e2..c4fe5a5a5 100644 --- a/hive/services/hiveui/frontend/dist/assets/_.js +++ b/hive/services/hiveui/frontend/dist/assets/_.js @@ -1 +1 @@ -import{c as k,aG as v,aH as B,aC as $,j as s,aB as C,aI as P,aJ as y,aE as K}from"./index.js";import{u as F}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as E,U as I}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function J(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=B(b||""),{data:o}=F($(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(I,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=C(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(E,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(K,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{J as component}; +import{c as k,aF as v,aG as B,aB as $,j as s,aA as C,aH as P,aI as y,aD as F}from"./index.js";import{u as K}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as I,U as O}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function H(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=B(b||""),{data:o}=K($(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(O,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=C(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(I,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(F,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{H as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id.js b/hive/services/hiveui/frontend/dist/assets/_id.js index 151f0fc1b..57e970494 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id.js +++ b/hive/services/hiveui/frontend/dist/assets/_id.js @@ -1 +1 @@ -import{c as O,bn as q,u as D,bo as J,j as s,bp as K,B as M}from"./index.js";import{a as T,u as U,I as W}from"./zod.js";import{u as X}from"./useSuspenseQuery.js";import{B as A}from"./back-link.js";import{E as Y,L as Z}from"./error-banner.js";import{P as ee}from"./page-heading.js";import{c as se}from"./ec2.js";import"./useMutation.js";function ce(){const e=O.c(57),{id:k}=q.useParams(),o=D();let N;e[0]!==k?(N=K(k),e[0]=k,e[1]=N):N=e[1];const{data:Q}=X(N),L=Q.Volumes?.[0],t=L?.VolumeId,l=se(),i=L?.Size??1;let a;e[2]!==i?(a=T(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==i?(n={size:i},e[4]=i,e[5]=n):n=e[5];let S;e[6]!==a||e[7]!==n?(S={resolver:a,defaultValues:n},e[6]=a,e[7]=n,e[8]=S):S=e[8];const{handleSubmit:F,register:$,formState:H}=U(S),{errors:B,isSubmitting:w}=H;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(A,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let V;e[10]!==l||e[11]!==o||e[12]!==t?(V=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=V):V=e[13];const E=V;let m,c;e[14]!==t?(m=s.jsx(A,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ee,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(Y,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==F||e[20]!==E?(d=F(E),e[19]=F,e[20]=E,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Z,{htmlFor:"size",children:"New size (GiB)"}),e[24]=P):P=e[24];const I=i+1;let p;e[25]!==$?(p=$("size",{valueAsNumber:!0}),e[25]=$,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==p?(x=s.jsx(W,{id:"size",min:I,type:"number",...p}),e[27]=I,e[28]=p,e[29]=x):x=e[29];let b;e[30]!==B.size?(b=B.size&&s.jsx("p",{className:"text-destructive text-sm",children:B.size.message}),e[30]=B.size,e[31]=b):b=e[31];let h;e[32]!==x||e[33]!==b?(h=s.jsxs("div",{className:"space-y-2",children:[P,x,b]}),e[32]=x,e[33]=b,e[34]=h):h=e[34];const _=w||l.isPending;let z;e[35]!==o||e[36]!==t?(z=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[35]=o,e[36]=t,e[37]=z):z=e[37];let g;e[38]!==_||e[39]!==z?(g=s.jsx(M,{disabled:_,onClick:z,type:"button",variant:"outline",children:"Cancel"}),e[38]=_,e[39]=z,e[40]=g):g=e[40];const C=w||l.isPending,G=w||l.isPending?"Resizing…":"Resize Volume";let j;e[41]!==C||e[42]!==G?(j=s.jsx(M,{disabled:C,type:"submit",children:G}),e[41]=C,e[42]=G,e[43]=j):j=e[43];let v;e[44]!==g||e[45]!==j?(v=s.jsxs("div",{className:"flex gap-2",children:[g,j]}),e[44]=g,e[45]=j,e[46]=v):v=e[46];let y;e[47]!==f||e[48]!==h||e[49]!==v||e[50]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[47]=f,e[48]=h,e[49]=v,e[50]=d,e[51]=y):y=e[51];let R;return e[52]!==y||e[53]!==m||e[54]!==c||e[55]!==u?(R=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[52]=y,e[53]=m,e[54]=c,e[55]=u,e[56]=R):R=e[56],R}export{ce as component}; +import{c as T,bm as q,u as D,bn as J,j as s,bo as K,B as Q}from"./index.js";import{a as U,u as W,I as X,F as Y,b as Z,c as ee}from"./field.js";import{u as se}from"./useSuspenseQuery.js";import{B as H}from"./back-link.js";import{E as te}from"./error-banner.js";import{P as ie}from"./page-heading.js";import{c as le}from"./ec2.js";import"./useMutation.js";function fe(){const e=T.c(58),{id:R}=q.useParams(),o=D();let S;e[0]!==R?(S=K(R),e[0]=R,e[1]=S):S=e[1];const{data:L}=se(S),A=L.Volumes?.[0],t=A?.VolumeId,l=le(),i=A?.Size??1;let n;e[2]!==i?(n=U(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=n):n=e[3];let a;e[4]!==i?(a={size:i},e[4]=i,e[5]=a):a=e[5];let B;e[6]!==n||e[7]!==a?(B={resolver:n,defaultValues:a},e[6]=n,e[7]=a,e[8]=B):B=e[8];const{handleSubmit:k,register:E,formState:O}=W(B),{errors:V,isSubmitting:$}=O;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(H,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let F;e[10]!==l||e[11]!==o||e[12]!==t?(F=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=F):F=e[13];const w=F;let m,c;e[14]!==t?(m=s.jsx(H,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ie,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(te,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==k||e[20]!==w?(d=k(w),e[19]=k,e[20]=w,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{children:s.jsx("label",{htmlFor:"size",children:"New size (GiB)"})}),e[24]=N):N=e[24];const I=!!V.size,_=i+1;let p;e[25]!==E?(p=E("size",{valueAsNumber:!0}),e[25]=E,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==_||e[29]!==p?(x=s.jsx(X,{"aria-invalid":I,id:"size",min:_,type:"number",...p}),e[27]=I,e[28]=_,e[29]=p,e[30]=x):x=e[30];let b;e[31]!==V.size?(b=s.jsx(Y,{errors:[V.size]}),e[31]=V.size,e[32]=b):b=e[32];let h;e[33]!==x||e[34]!==b?(h=s.jsxs(ee,{children:[N,x,b]}),e[33]=x,e[34]=b,e[35]=h):h=e[35];const C=$||l.isPending;let j;e[36]!==o||e[37]!==t?(j=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[36]=o,e[37]=t,e[38]=j):j=e[38];let z;e[39]!==C||e[40]!==j?(z=s.jsx(Q,{disabled:C,onClick:j,type:"button",variant:"outline",children:"Cancel"}),e[39]=C,e[40]=j,e[41]=z):z=e[41];const G=$||l.isPending,M=$||l.isPending?"Resizing…":"Resize Volume";let g;e[42]!==G||e[43]!==M?(g=s.jsx(Q,{disabled:G,type:"submit",children:M}),e[42]=G,e[43]=M,e[44]=g):g=e[44];let v;e[45]!==z||e[46]!==g?(v=s.jsxs("div",{className:"flex gap-2",children:[z,g]}),e[45]=z,e[46]=g,e[47]=v):v=e[47];let y;e[48]!==f||e[49]!==h||e[50]!==v||e[51]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[48]=f,e[49]=h,e[50]=v,e[51]=d,e[52]=y):y=e[52];let P;return e[53]!==y||e[54]!==m||e[55]!==c||e[56]!==u?(P=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[53]=y,e[54]=m,e[55]=c,e[56]=u,e[57]=P):P=e[57],P}export{fe as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id2.js b/hive/services/hiveui/frontend/dist/assets/_id2.js index bea983b38..91346135b 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id2.js +++ b/hive/services/hiveui/frontend/dist/assets/_id2.js @@ -1 +1 @@ -import{c as _,bx as E,by as K,j as l,aE as R,bz as k,B as z,bp as Z}from"./index.js";import{u as H}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as p,a as s}from"./detail-row.js";import{P}from"./page-heading.js";import{B as $}from"./badge.js";function M(){const e=_.c(49),{id:D}=E.useParams();let h;e[0]!==D?(h=Z(D),e[0]=D,e[1]=h):h=e[1];const{data:N}=H(h),t=N.Volumes?.[0];if(!t?.VolumeId){let T;return e[2]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsxs(l.Fragment,{children:[l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[2]=T):T=e[2],T}let V;e[3]!==t.CreateTime?(V=K(t.CreateTime),e[3]=t.CreateTime,e[4]=V):V=e[4];const A=V;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=y):y=e[5];let a;e[6]!==t.State||e[7]!==t.VolumeId?(a=t.State==="available"?l.jsx(R,{className:k({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(z,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[6]=t.State,e[7]=t.VolumeId,e[8]=a):a=e[8];let i;e[9]!==t.State?(i=t.State&&l.jsx($,{variant:t.State==="available"?"default":"outline",children:t.State}),e[9]=t.State,e[10]=i):i=e[10];let o;e[11]!==a||e[12]!==i?(o=l.jsxs("div",{className:"flex items-center gap-2",children:[a,i]}),e[11]=a,e[12]=i,e[13]=o):o=e[13];let n;e[14]!==o||e[15]!==t.VolumeId?(n=l.jsx(P,{actions:o,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[14]=o,e[15]=t.VolumeId,e[16]=n):n=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(p.Header,{children:"Volume Information"}),e[17]=I):I=e[17];let m;e[18]!==t.VolumeId?(m=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[18]=t.VolumeId,e[19]=m):m=e[19];const B=`${t.Size} GiB`;let r;e[20]!==B?(r=l.jsx(s,{label:"Size",value:B}),e[20]=B,e[21]=r):r=e[21];let c;e[22]!==t.VolumeType?(c=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[22]=t.VolumeType,e[23]=c):c=e[23];let u;e[24]!==t.State?(u=l.jsx(s,{label:"State",value:t.State}),e[24]=t.State,e[25]=u):u=e[25];let d;e[26]!==t.AvailabilityZone?(d=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[26]=t.AvailabilityZone,e[27]=d):d=e[27];let f;e[28]!==A?(f=l.jsx(s,{label:"Create Time",value:A}),e[28]=A,e[29]=f):f=e[29];const g=t.Encrypted?"Yes":"No";let x;e[30]!==g?(x=l.jsx(s,{label:"Encrypted",value:g}),e[30]=g,e[31]=x):x=e[31];let b;e[32]!==t.KmsKeyId?(b=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[32]=t.KmsKeyId,e[33]=b):b=e[33];let j;e[34]!==r||e[35]!==c||e[36]!==u||e[37]!==d||e[38]!==f||e[39]!==x||e[40]!==b||e[41]!==m?(j=l.jsxs(p,{children:[I,l.jsxs(p.Content,{children:[m,r,c,u,d,f,x,b]})]}),e[34]=r,e[35]=c,e[36]=u,e[37]=d,e[38]=f,e[39]=x,e[40]=b,e[41]=m,e[42]=j):j=e[42];let v;e[43]!==t.Attachments?(v=t.Attachments&&t.Attachments.length>0&&l.jsxs(p,{children:[l.jsx(p.Header,{children:"Attachments"}),l.jsx(p.Content,{children:t.Attachments.map(F)})]}),e[43]=t.Attachments,e[44]=v):v=e[44];let S;return e[45]!==j||e[46]!==v||e[47]!==n?(S=l.jsxs(l.Fragment,{children:[y,l.jsxs("div",{className:"space-y-6",children:[n,j,v]})]}),e[45]=j,e[46]=v,e[47]=n,e[48]=S):S=e[48],S}function F(e){return l.jsxs("div",{className:"space-y-2 border-b pb-2 last:border-0 last:pb-0",children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:K(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{M as component}; +import{c as N,bx as R,by as K,j as l,aD as k,bz as z,B as E,bo as Z}from"./index.js";import{u as H}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as p,a as s}from"./detail-row.js";import{P}from"./page-heading.js";import{B as $}from"./badge.js";function M(){const e=N.c(49),{id:T}=R.useParams();let V;e[0]!==T?(V=Z(T),e[0]=T,e[1]=V):V=e[1];const{data:_}=H(V),t=_.Volumes?.[0];if(!t?.VolumeId){let D;return e[2]===Symbol.for("react.memo_cache_sentinel")?(D=l.jsxs(l.Fragment,{children:[l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[2]=D):D=e[2],D}let h;e[3]!==t.CreateTime?(h=K(t.CreateTime),e[3]=t.CreateTime,e[4]=h):h=e[4];const A=h;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=y):y=e[5];let a;e[6]!==t.State||e[7]!==t.VolumeId?(a=t.State==="available"?l.jsx(k,{className:z({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(E,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[6]=t.State,e[7]=t.VolumeId,e[8]=a):a=e[8];let i;e[9]!==t.State?(i=t.State&&l.jsx($,{variant:t.State==="available"?"default":"outline",children:t.State}),e[9]=t.State,e[10]=i):i=e[10];let o;e[11]!==a||e[12]!==i?(o=l.jsxs("div",{className:"flex items-center gap-2",children:[a,i]}),e[11]=a,e[12]=i,e[13]=o):o=e[13];let n;e[14]!==o||e[15]!==t.VolumeId?(n=l.jsx(P,{actions:o,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[14]=o,e[15]=t.VolumeId,e[16]=n):n=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(p.Header,{children:"Volume Information"}),e[17]=I):I=e[17];let m;e[18]!==t.VolumeId?(m=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[18]=t.VolumeId,e[19]=m):m=e[19];const B=`${t.Size} GiB`;let r;e[20]!==B?(r=l.jsx(s,{label:"Size",value:B}),e[20]=B,e[21]=r):r=e[21];let u;e[22]!==t.VolumeType?(u=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[22]=t.VolumeType,e[23]=u):u=e[23];let c;e[24]!==t.State?(c=l.jsx(s,{label:"State",value:t.State}),e[24]=t.State,e[25]=c):c=e[25];let d;e[26]!==t.AvailabilityZone?(d=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[26]=t.AvailabilityZone,e[27]=d):d=e[27];let f;e[28]!==A?(f=l.jsx(s,{label:"Create Time",value:A}),e[28]=A,e[29]=f):f=e[29];const g=t.Encrypted?"Yes":"No";let x;e[30]!==g?(x=l.jsx(s,{label:"Encrypted",value:g}),e[30]=g,e[31]=x):x=e[31];let j;e[32]!==t.KmsKeyId?(j=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[32]=t.KmsKeyId,e[33]=j):j=e[33];let v;e[34]!==r||e[35]!==u||e[36]!==c||e[37]!==d||e[38]!==f||e[39]!==x||e[40]!==j||e[41]!==m?(v=l.jsxs(p,{children:[I,l.jsxs(p.Content,{children:[m,r,u,c,d,f,x,j]})]}),e[34]=r,e[35]=u,e[36]=c,e[37]=d,e[38]=f,e[39]=x,e[40]=j,e[41]=m,e[42]=v):v=e[42];let b;e[43]!==t.Attachments?(b=t.Attachments&&t.Attachments.length>0&&l.jsxs(p,{children:[l.jsx(p.Header,{children:"Attachments"}),t.Attachments.map(F)]}),e[43]=t.Attachments,e[44]=b):b=e[44];let S;return e[45]!==v||e[46]!==b||e[47]!==n?(S=l.jsxs(l.Fragment,{children:[y,l.jsxs("div",{className:"space-y-6",children:[n,v,b]})]}),e[45]=v,e[46]=b,e[47]=n,e[48]=S):S=e[48],S}function F(e){return l.jsxs(p.Content,{children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:K(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{M as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id4.js b/hive/services/hiveui/frontend/dist/assets/_id4.js index 6ffa91d93..dc83bc355 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id4.js +++ b/hive/services/hiveui/frontend/dist/assets/_id4.js @@ -1 +1 @@ -import{g as z,c as $,j as s,B as C,bM as F,by as E,bN as H,bO as Q}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{D,a as r}from"./detail-row.js";import{P as V}from"./page-heading.js";import{S as Z}from"./state-badge.js";import{A as q}from"./ami-details.js";import{e as G,f as Y,g as J,h as K}from"./ec2.js";import{T as U}from"./trash-2.js";import"./useMutation.js";const W=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],X=z("pause",W);const ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],te=z("play",ee);const se=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ne=z("rotate-cw",se),ae=["pending","stopping","shutting-down","terminated"];function ie(e){const t=$.c(21),{instanceId:l,state:a}=e,n=G(),p=Y(),d=J(),f=K();if(ae.includes(a||"")&&a!=="terminated"){let i;return t[0]!==a?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsxs("p",{className:"text-center text-muted-foreground text-sm",children:["Instance is ",a,". Actions will be available once the operation completes."]})}),t[0]=a,t[1]=i):i=t[1],i}if(a==="terminated"){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"This instance has been terminated and cannot be managed."})}),t[2]=i):i=t[2],i}let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"mb-4 font-semibold",children:"Instance Actions"}),t[3]=x):x=t[3];let m;t[4]!==l||t[5]!==n||t[6]!==a?(m=a==="stopped"&&s.jsxs(C,{disabled:n.isPending,onClick:()=>n.mutate(l),size:"sm",variant:"default",children:[s.jsx(te,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[4]=l,t[5]=n,t[6]=a,t[7]=m):m=t[7];let c;t[8]!==l||t[9]!==d||t[10]!==a||t[11]!==p?(c=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(C,{disabled:p.isPending,onClick:()=>p.mutate(l),size:"sm",variant:"outline",children:[s.jsx(X,{className:"size-4"}),p.isPending?"Stopping":"Stop"]}),s.jsxs(C,{disabled:d.isPending,onClick:()=>d.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ne,{className:"size-4"}),d.isPending?"Rebooting":"Reboot"]})]}),t[8]=l,t[9]=d,t[10]=a,t[11]=p,t[12]=c):c=t[12];let u;t[13]!==l||t[14]!==a||t[15]!==f?(u=(a==="stopped"||a==="running")&&s.jsxs(C,{disabled:f.isPending,onClick:()=>f.mutate(l),size:"sm",variant:"destructive",children:[s.jsx(U,{className:"size-4"}),f.isPending?"Terminating":"Terminate"]}),t[13]=l,t[14]=a,t[15]=f,t[16]=u):u=t[16];let o;return t[17]!==m||t[18]!==c||t[19]!==u?(o=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[x,s.jsxs("div",{className:"flex flex-wrap gap-2",children:[m,c,u]})]}),t[17]=m,t[18]=c,t[19]=u,t[20]=o):o=t[20],o}function ge(){const e=$.c(48),{id:t}=F.useParams();let l;e[0]!==t?(l=H(t),e[0]=t,e[1]=l):l=e[1];const{data:a}=L(l),n=a.Reservations?.[0]?.Instances?.[0],p=n?.ImageId;let d;e[2]!==p?(d=Q(p),e[2]=p,e[3]=d):d=e[3];const{data:f}=L(d),M=f?.Images?.[0];if(!n?.InstanceId){let P;return e[4]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs(s.Fragment,{children:[s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=P):P=e[4],P}let x;e[5]!==n.LaunchTime?(x=E(n.LaunchTime),e[5]=n.LaunchTime,e[6]=x):x=e[6];const m=x;let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=c):c=e[7];const u=n.State?.Name;let o;e[8]!==u?(o=s.jsx(Z,{state:u}),e[8]=u,e[9]=o):o=e[9];let i;e[10]!==n.InstanceId||e[11]!==o?(i=s.jsx(V,{actions:o,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=o,e[12]=i):i=e[12];const A=n.State?.Name;let g;e[13]!==n.InstanceId||e[14]!==A?(g=s.jsx(ie,{instanceId:n.InstanceId,state:A}),e[13]=n.InstanceId,e[14]=A,e[15]=g):g=e[15];let B;e[16]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(D.Header,{children:"Instance Information"}),e[16]=B):B=e[16];let h;e[17]!==n.InstanceId?(h=s.jsx(r,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=h):h=e[18];let I;e[19]!==n.InstanceType?(I=s.jsx(r,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=I):I=e[20];const w=n.State?.Name;let b;e[21]!==w?(b=s.jsx(r,{label:"Instance State",value:w}),e[21]=w,e[22]=b):b=e[22];let j;e[23]!==n.State?.Code?(j=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(r,{label:"State Code",value:j}),e[25]=j,e[26]=v):v=e[26];let S;e[27]!==m?(S=s.jsx(r,{label:"Launch Time",value:m}),e[27]=m,e[28]=S):S=e[28];const R=n.Placement?.AvailabilityZone;let N;e[29]!==R?(N=s.jsx(r,{label:"Availability Zone",value:R}),e[29]=R,e[30]=N):N=e[30];let T;e[31]!==h||e[32]!==I||e[33]!==b||e[34]!==v||e[35]!==S||e[36]!==N?(T=s.jsxs(D,{children:[B,s.jsxs(D.Content,{children:[h,I,b,v,S,N]})]}),e[31]=h,e[32]=I,e[33]=b,e[34]=v,e[35]=S,e[36]=N,e[37]=T):T=e[37];let k;e[38]!==n.BlockDeviceMappings?(k=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(D,{children:[s.jsx(D.Header,{children:"Block Device Mappings"}),s.jsxs(D.Content,{children:[s.jsx(r,{label:"Device Name",value:n.BlockDeviceMappings[0]?.DeviceName}),s.jsx(r,{label:"Volume ID",value:n.BlockDeviceMappings[0]?.Ebs?.VolumeId}),s.jsx(r,{label:"Status",value:n.BlockDeviceMappings[0]?.Ebs?.Status}),s.jsx(r,{label:"Attach Time",value:E(n.BlockDeviceMappings[0]?.Ebs?.AttachTime)}),s.jsx(r,{label:"Delete on Termination",value:n.BlockDeviceMappings[0]?.Ebs?.DeleteOnTermination?"Yes":"No"})]})]}),e[38]=n.BlockDeviceMappings,e[39]=k):k=e[39];let y;e[40]!==M?(y=M&&s.jsx(q,{image:M}),e[40]=M,e[41]=y):y=e[41];let _;return e[42]!==T||e[43]!==k||e[44]!==y||e[45]!==i||e[46]!==g?(_=s.jsxs(s.Fragment,{children:[c,s.jsxs("div",{className:"space-y-6",children:[i,g,T,k,y]})]}),e[42]=T,e[43]=k,e[44]=y,e[45]=i,e[46]=g,e[47]=_):_=e[47],_}export{ge as component}; +import{f as z,c as $,j as s,B as C,bM as F,by as E,bN as H,bO as Q}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{D,a as r}from"./detail-row.js";import{P as V}from"./page-heading.js";import{S as Z}from"./state-badge.js";import{A as q}from"./ami-details.js";import{e as G,f as Y,g as J,h as K}from"./ec2.js";import{T as U}from"./trash-2.js";import"./useMutation.js";const W=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],X=z("pause",W);const ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],te=z("play",ee);const se=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ne=z("rotate-cw",se),ae=["pending","stopping","shutting-down","terminated"];function ie(e){const t=$.c(21),{instanceId:l,state:a}=e,n=G(),p=Y(),d=J(),x=K();if(ae.includes(a||"")&&a!=="terminated"){let i;return t[0]!==a?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsxs("p",{className:"text-center text-muted-foreground text-sm",children:["Instance is ",a,". Actions will be available once the operation completes."]})}),t[0]=a,t[1]=i):i=t[1],i}if(a==="terminated"){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"This instance has been terminated and cannot be managed."})}),t[2]=i):i=t[2],i}let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h2",{className:"mb-4 font-semibold",children:"Instance Actions"}),t[3]=f):f=t[3];let m;t[4]!==l||t[5]!==n||t[6]!==a?(m=a==="stopped"&&s.jsxs(C,{disabled:n.isPending,onClick:()=>n.mutate(l),size:"sm",variant:"default",children:[s.jsx(te,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[4]=l,t[5]=n,t[6]=a,t[7]=m):m=t[7];let c;t[8]!==l||t[9]!==d||t[10]!==a||t[11]!==p?(c=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(C,{disabled:p.isPending,onClick:()=>p.mutate(l),size:"sm",variant:"outline",children:[s.jsx(X,{className:"size-4"}),p.isPending?"Stopping":"Stop"]}),s.jsxs(C,{disabled:d.isPending,onClick:()=>d.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ne,{className:"size-4"}),d.isPending?"Rebooting":"Reboot"]})]}),t[8]=l,t[9]=d,t[10]=a,t[11]=p,t[12]=c):c=t[12];let u;t[13]!==l||t[14]!==a||t[15]!==x?(u=(a==="stopped"||a==="running")&&s.jsxs(C,{disabled:x.isPending,onClick:()=>x.mutate(l),size:"sm",variant:"destructive",children:[s.jsx(U,{className:"size-4"}),x.isPending?"Terminating":"Terminate"]}),t[13]=l,t[14]=a,t[15]=x,t[16]=u):u=t[16];let o;return t[17]!==m||t[18]!==c||t[19]!==u?(o=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[f,s.jsxs("div",{className:"flex flex-wrap gap-2",children:[m,c,u]})]}),t[17]=m,t[18]=c,t[19]=u,t[20]=o):o=t[20],o}function ge(){const e=$.c(48),{id:t}=F.useParams();let l;e[0]!==t?(l=H(t),e[0]=t,e[1]=l):l=e[1];const{data:a}=L(l),n=a.Reservations?.[0]?.Instances?.[0],p=n?.ImageId;let d;e[2]!==p?(d=Q(p),e[2]=p,e[3]=d):d=e[3];const{data:x}=L(d),M=x?.Images?.[0];if(!n?.InstanceId){let P;return e[4]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs(s.Fragment,{children:[s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=P):P=e[4],P}let f;e[5]!==n.LaunchTime?(f=E(n.LaunchTime),e[5]=n.LaunchTime,e[6]=f):f=e[6];const m=f;let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=c):c=e[7];const u=n.State?.Name;let o;e[8]!==u?(o=s.jsx(Z,{state:u}),e[8]=u,e[9]=o):o=e[9];let i;e[10]!==n.InstanceId||e[11]!==o?(i=s.jsx(V,{actions:o,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=o,e[12]=i):i=e[12];const A=n.State?.Name;let g;e[13]!==n.InstanceId||e[14]!==A?(g=s.jsx(ie,{instanceId:n.InstanceId,state:A}),e[13]=n.InstanceId,e[14]=A,e[15]=g):g=e[15];let B;e[16]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(D.Header,{children:"Instance Information"}),e[16]=B):B=e[16];let h;e[17]!==n.InstanceId?(h=s.jsx(r,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=h):h=e[18];let I;e[19]!==n.InstanceType?(I=s.jsx(r,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=I):I=e[20];const w=n.State?.Name;let b;e[21]!==w?(b=s.jsx(r,{label:"Instance State",value:w}),e[21]=w,e[22]=b):b=e[22];let j;e[23]!==n.State?.Code?(j=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(r,{label:"State Code",value:j}),e[25]=j,e[26]=v):v=e[26];let S;e[27]!==m?(S=s.jsx(r,{label:"Launch Time",value:m}),e[27]=m,e[28]=S):S=e[28];const R=n.Placement?.AvailabilityZone;let N;e[29]!==R?(N=s.jsx(r,{label:"Availability Zone",value:R}),e[29]=R,e[30]=N):N=e[30];let T;e[31]!==h||e[32]!==I||e[33]!==b||e[34]!==v||e[35]!==S||e[36]!==N?(T=s.jsxs(D,{children:[B,s.jsxs(D.Content,{children:[h,I,b,v,S,N]})]}),e[31]=h,e[32]=I,e[33]=b,e[34]=v,e[35]=S,e[36]=N,e[37]=T):T=e[37];let k;e[38]!==n.BlockDeviceMappings?(k=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(D,{children:[s.jsx(D.Header,{children:"Block Device Mappings"}),s.jsxs(D.Content,{children:[s.jsx(r,{label:"Device Name",value:n.BlockDeviceMappings[0]?.DeviceName}),s.jsx(r,{label:"Volume ID",value:n.BlockDeviceMappings[0]?.Ebs?.VolumeId}),s.jsx(r,{label:"Status",value:n.BlockDeviceMappings[0]?.Ebs?.Status}),s.jsx(r,{label:"Attach Time",value:E(n.BlockDeviceMappings[0]?.Ebs?.AttachTime)}),s.jsx(r,{label:"Delete on Termination",value:n.BlockDeviceMappings[0]?.Ebs?.DeleteOnTermination?"Yes":"No"})]})]}),e[38]=n.BlockDeviceMappings,e[39]=k):k=e[39];let y;e[40]!==M?(y=M&&s.jsx(q,{image:M}),e[40]=M,e[41]=y):y=e[41];let _;return e[42]!==T||e[43]!==k||e[44]!==y||e[45]!==i||e[46]!==g?(_=s.jsxs(s.Fragment,{children:[c,s.jsxs("div",{className:"space-y-6",children:[i,g,T,k,y]})]}),e[42]=T,e[43]=k,e[44]=y,e[45]=i,e[46]=g,e[47]=_):_=e[47],_}export{ge as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/alert-dialog.js b/hive/services/hiveui/frontend/dist/assets/alert-dialog.js index e6bd5422c..d8bedacad 100644 --- a/hive/services/hiveui/frontend/dist/assets/alert-dialog.js +++ b/hive/services/hiveui/frontend/dist/assets/alert-dialog.js @@ -1 +1 @@ -import{bC as z,Z as C,bD as j,bE as N,r as h,j as r,bF as v,c as d,a as f,bG as A,B as x,bH as y,bI as $,bJ as w,bK as P,bL as R}from"./index.js";function I(s){const{children:e,open:t,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:o,actionsRef:c,handle:n,triggerId:i,defaultTriggerId:u=null}=s,p=z(),m=!!p,g=C(()=>n?.store??new j({open:t??a,activeTriggerId:i!==void 0?i:u,modal:!0,disablePointerDismissal:!0,nested:m,role:"alertdialog"})).current;g.useControlledProp("open",t,a),g.useControlledProp("activeTriggerId",i,u),g.useSyncedValue("nested",m),g.useContextCallback("onOpenChange",l),g.useContextCallback("onOpenChangeComplete",o);const D=g.useState("payload");N({store:g,actionsRef:c,parentContext:p?.store.context});const b=h.useMemo(()=>({store:g}),[g]);return r.jsx(v.Provider,{value:b,children:typeof e=="function"?e({payload:D}):e})}function _(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(I,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function k(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(P,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function O(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(R,{className:l,"data-slot":"alert-dialog-overlay",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function B(s){const e=d.c(11);let t,a,l;e[0]!==s?({className:t,size:l,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);const o=l===void 0?"default":l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(O,{}),e[4]=c):c=e[4];let n;e[5]!==t?(n=f("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-background p-4 outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm",t),e[5]=t,e[6]=n):n=e[6];let i;return e[7]!==a||e[8]!==o||e[9]!==n?(i=r.jsxs(k,{children:[c,r.jsx(w,{className:n,"data-size":o,"data-slot":"alert-dialog-content",...a})]}),e[7]=a,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function E(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-header",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function S(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-footer",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function F(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("mb-2 inline-flex size-8 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-media",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function H(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("font-medium text-sm sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(y,{className:l,"data-slot":"alert-dialog-title",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function M(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("text-balance text-muted-foreground text-xs/relaxed md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(A,{className:l,"data-slot":"alert-dialog-description",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function V(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f(t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(x,{className:l,"data-slot":"alert-dialog-action",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function G(s){const e=d.c(14);let t,a,l,o;e[0]!==s?({className:t,variant:l,size:o,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l,e[4]=o):(t=e[1],a=e[2],l=e[3],o=e[4]);const c=l===void 0?"outline":l,n=o===void 0?"default":o;let i;e[5]!==t?(i=f(t),e[5]=t,e[6]=i):i=e[6];let u;e[7]!==n||e[8]!==c?(u=r.jsx(x,{size:n,variant:c}),e[7]=n,e[8]=c,e[9]=u):u=e[9];let p;return e[10]!==a||e[11]!==i||e[12]!==u?(p=r.jsx($,{className:i,"data-slot":"alert-dialog-cancel",render:u,...a}),e[10]=a,e[11]=i,e[12]=u,e[13]=p):p=e[13],p}export{F as A,H as a,E as b,M as c,S as d,G as e,B as f,_ as g,V as h}; +import{bC as z,Y as C,bD as j,bE as N,r as h,j as r,bF as v,c as d,a as f,bG as A,B as x,bH as y,bI as $,bJ as w,bK as P,bL as R}from"./index.js";function I(s){const{children:e,open:t,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:o,actionsRef:c,handle:n,triggerId:i,defaultTriggerId:u=null}=s,p=z(),m=!!p,g=C(()=>n?.store??new j({open:t??a,activeTriggerId:i!==void 0?i:u,modal:!0,disablePointerDismissal:!0,nested:m,role:"alertdialog"})).current;g.useControlledProp("open",t,a),g.useControlledProp("activeTriggerId",i,u),g.useSyncedValue("nested",m),g.useContextCallback("onOpenChange",l),g.useContextCallback("onOpenChangeComplete",o);const D=g.useState("payload");N({store:g,actionsRef:c,parentContext:p?.store.context});const b=h.useMemo(()=>({store:g}),[g]);return r.jsx(v.Provider,{value:b,children:typeof e=="function"?e({payload:D}):e})}function _(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(I,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function k(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(P,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function O(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(R,{className:l,"data-slot":"alert-dialog-overlay",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function B(s){const e=d.c(11);let t,a,l;e[0]!==s?({className:t,size:l,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);const o=l===void 0?"default":l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(O,{}),e[4]=c):c=e[4];let n;e[5]!==t?(n=f("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-background p-4 outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm",t),e[5]=t,e[6]=n):n=e[6];let i;return e[7]!==a||e[8]!==o||e[9]!==n?(i=r.jsxs(k,{children:[c,r.jsx(w,{className:n,"data-size":o,"data-slot":"alert-dialog-content",...a})]}),e[7]=a,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function E(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-header",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function S(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-footer",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function F(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("mb-2 inline-flex size-8 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-media",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function H(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("font-medium text-sm sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(y,{className:l,"data-slot":"alert-dialog-title",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function M(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("text-balance text-muted-foreground text-xs/relaxed md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(A,{className:l,"data-slot":"alert-dialog-description",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function V(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f(t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(x,{className:l,"data-slot":"alert-dialog-action",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function G(s){const e=d.c(14);let t,a,l,o;e[0]!==s?({className:t,variant:l,size:o,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l,e[4]=o):(t=e[1],a=e[2],l=e[3],o=e[4]);const c=l===void 0?"outline":l,n=o===void 0?"default":o;let i;e[5]!==t?(i=f(t),e[5]=t,e[6]=i):i=e[6];let u;e[7]!==n||e[8]!==c?(u=r.jsx(x,{size:n,variant:c}),e[7]=n,e[8]=c,e[9]=u):u=e[9];let p;return e[10]!==a||e[11]!==i||e[12]!==u?(p=r.jsx($,{className:i,"data-slot":"alert-dialog-cancel",render:u,...a}),e[10]=a,e[11]=i,e[12]=u,e[13]=p):p=e[13],p}export{F as A,H as a,E as b,M as c,S as d,G as e,B as f,_ as g,V as h}; diff --git a/hive/services/hiveui/frontend/dist/assets/back-link.js b/hive/services/hiveui/frontend/dist/assets/back-link.js index 377c54c6b..498e25be8 100644 --- a/hive/services/hiveui/frontend/dist/assets/back-link.js +++ b/hive/services/hiveui/frontend/dist/assets/back-link.js @@ -1 +1 @@ -import{g as o,c as r,j as l,aE as a}from"./index.js";const m=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],x=o("arrow-left",m);function p(i){const e=r.c(7);let s,t;e[0]!==i?({children:s,...t}=i,e[0]=i,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(x,{className:"size-4"}),e[3]=n):n=e[3];let c;return e[4]!==s||e[5]!==t?(c=l.jsxs(a,{className:"mb-6 inline-flex items-center gap-2 text-sm",...t,children:[n,s]}),e[4]=s,e[5]=t,e[6]=c):c=e[6],c}export{p as B}; +import{f as o,c as r,j as l,aD as a}from"./index.js";const m=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],f=o("arrow-left",m);function p(i){const e=r.c(7);let s,t;e[0]!==i?({children:s,...t}=i,e[0]=i,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(f,{className:"size-4"}),e[3]=n):n=e[3];let c;return e[4]!==s||e[5]!==t?(c=l.jsxs(a,{className:"mb-6 inline-flex items-center gap-2 text-sm",...t,children:[n,s]}),e[4]=s,e[5]=t,e[6]=c):c=e[6],c}export{p as B}; diff --git a/hive/services/hiveui/frontend/dist/assets/badge.js b/hive/services/hiveui/frontend/dist/assets/badge.js index 962d4c026..99b6edf11 100644 --- a/hive/services/hiveui/frontend/dist/assets/badge.js +++ b/hive/services/hiveui/frontend/dist/assets/badge.js @@ -1 +1 @@ -import{c as g,a5 as f,a as b,b as p,c6 as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B}; +import{c as g,a4 as f,a as b,bw as p,c6 as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B}; diff --git a/hive/services/hiveui/frontend/dist/assets/check.js b/hive/services/hiveui/frontend/dist/assets/check.js index 054ae9869..f17067517 100644 --- a/hive/services/hiveui/frontend/dist/assets/check.js +++ b/hive/services/hiveui/frontend/dist/assets/check.js @@ -1 +1 @@ -import{g as c}from"./index.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C}; +import{f as c}from"./index.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C}; diff --git a/hive/services/hiveui/frontend/dist/assets/create-key-pair.js b/hive/services/hiveui/frontend/dist/assets/create-key-pair.js index 0330cee28..8f9b77732 100644 --- a/hive/services/hiveui/frontend/dist/assets/create-key-pair.js +++ b/hive/services/hiveui/frontend/dist/assets/create-key-pair.js @@ -1 +1 @@ -import{g as O,c as L,u as T,r as R,j as a,B,h as U}from"./index.js";import{a as I,u as z,I as Y}from"./zod.js";import{B as $}from"./back-link.js";import{E as H,L as q}from"./error-banner.js";import{P as G}from"./page-heading.js";import{a as J}from"./ec2.js";import{A as Q,a as V,b as W,c as X,d as Z,e as ee,f as te,g as ae}from"./alert-dialog.js";import{T as se}from"./textarea.js";import{C as le}from"./check.js";import{D as ie}from"./download.js";import"./useMutation.js";const re=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],oe=O("triangle-alert",re),ne=2e3;function ce(e){const t=L.c(36),{open:s,keyName:l,keyMaterial:d}=e,g=T(),[S,_]=R.useState(!1);let A;t[0]!==d?(A=async()=>{await navigator.clipboard.writeText(d),_(!0),setTimeout(()=>_(!1),ne)},t[0]=d,t[1]=A):A=t[1];const b=A;let N;t[2]!==d||t[3]!==l?(N=()=>{const P=new Blob([d],{type:"text/plain"}),k=URL.createObjectURL(P),u=document.createElement("a");u.href=k,u.download=`${l}.pem`,u.click(),URL.revokeObjectURL(k)},t[2]=d,t[3]=l,t[4]=N):N=t[4];const C=N;let v;t[5]!==g?(v=()=>{g({to:"/ec2/describe-key-pairs"})},t[5]=g,t[6]=v):v=t[6];const w=v;let j,f;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(Q,{children:a.jsx(oe,{className:"text-destructive"})}),f=a.jsx(V,{children:"Save Your Private Key"}),t[7]=j,t[8]=f):(j=t[7],f=t[8]);let i;t[9]!==l?(i=a.jsxs(W,{children:[j,f,a.jsxs(X,{children:["This is your only chance to save the private key file for"," ",a.jsx("strong",{children:l}),". Please download or copy it now. You won't be able to retrieve it again."]})]}),t[9]=l,t[10]=i):i=t[10];let y;t[11]!==d?(y=a.jsx(se,{className:"font-mono text-xs",readOnly:!0,rows:12,value:d}),t[11]=d,t[12]=y):y=t[12];let r;t[13]!==S?(r=S?a.jsxs(a.Fragment,{children:[a.jsx(le,{className:"mr-2 size-4"}),"Copied!"]}):"Copy to Clipboard",t[13]=S,t[14]=r):r=t[14];let o;t[15]!==b||t[16]!==r?(o=a.jsx(B,{className:"flex-1",onClick:b,type:"button",variant:"outline",children:r}),t[15]=b,t[16]=r,t[17]=o):o=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(ie,{className:"mr-2 size-4"}),t[18]=p):p=t[18];let n;t[19]!==C?(n=a.jsxs(B,{className:"flex-1",onClick:C,type:"button",variant:"outline",children:[p,"Download .pem File"]}),t[19]=C,t[20]=n):n=t[20];let x;t[21]!==n||t[22]!==o?(x=a.jsxs("div",{className:"flex gap-2",children:[o,n]}),t[21]=n,t[22]=o,t[23]=x):x=t[23];let c;t[24]!==x||t[25]!==y?(c=a.jsxs("div",{className:"space-y-3",children:[y,x]}),t[24]=x,t[25]=y,t[26]=c):c=t[26];let m;t[27]!==w?(m=a.jsx(Z,{children:a.jsx(ee,{onClick:w,children:"Close and Continue"})}),t[27]=w,t[28]=m):m=t[28];let h;t[29]!==c||t[30]!==m||t[31]!==i?(h=a.jsxs(te,{className:"max-w-2xl",children:[i,c,m]}),t[29]=c,t[30]=m,t[31]=i,t[32]=h):h=t[32];let D;return t[33]!==s||t[34]!==h?(D=a.jsx(ae,{open:s,children:h}),t[33]=s,t[34]=h,t[35]=D):D=t[35],D}function be(){const e=L.c(41),t=T(),s=J(),[l,d]=R.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:I(U)},e[0]=g):g=e[0];const{handleSubmit:S,register:_,formState:A}=z(g),{errors:b,isSubmitting:N}=A;let C;e[1]!==s?(C=async E=>{const F=await s.mutateAsync(E);F.KeyMaterial&&d({keyName:E.keyName,material:F.KeyMaterial})},e[1]=s,e[2]=C):C=e[2];const v=C;let w,j;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx($,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),j=a.jsx(G,{title:"Create Key Pair"}),e[3]=w,e[4]=j):(w=e[3],j=e[4]);let f;e[5]!==s.error?(f=s.error&&a.jsx(H,{error:s.error,msg:"Failed to create key pair"}),e[5]=s.error,e[6]=f):f=e[6];let i;e[7]!==S||e[8]!==v?(i=S(v),e[7]=S,e[8]=v,e[9]=i):i=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(q,{htmlFor:"keyName",children:"Key Pair Name"}),e[10]=y):y=e[10];let r;e[11]!==_?(r=_("keyName"),e[11]=_,e[12]=r):r=e[12];let o;e[13]!==r?(o=a.jsx(Y,{id:"keyName",placeholder:"my-key-pair…",...r}),e[13]=r,e[14]=o):o=e[14];let p;e[15]!==b.keyName?(p=b.keyName&&a.jsx("p",{className:"text-destructive text-sm",children:b.keyName.message}),e[15]=b.keyName,e[16]=p):p=e[16];let n;e[17]!==p||e[18]!==o?(n=a.jsxs("div",{className:"space-y-2",children:[y,o,p]}),e[17]=p,e[18]=o,e[19]=n):n=e[19];const x=N||s.isPending;let c;e[20]!==t?(c=()=>t({to:"/ec2/describe-key-pairs"}),e[20]=t,e[21]=c):c=e[21];let m;e[22]!==x||e[23]!==c?(m=a.jsx(B,{disabled:x,onClick:c,type:"button",variant:"outline",children:"Cancel"}),e[22]=x,e[23]=c,e[24]=m):m=e[24];const h=N||s.isPending,D=N||s.isPending?"Creating…":"Create Key Pair";let P;e[25]!==h||e[26]!==D?(P=a.jsx(B,{disabled:h,type:"submit",children:D}),e[25]=h,e[26]=D,e[27]=P):P=e[27];let k;e[28]!==m||e[29]!==P?(k=a.jsxs("div",{className:"flex gap-2",children:[m,P]}),e[28]=m,e[29]=P,e[30]=k):k=e[30];let u;e[31]!==n||e[32]!==k||e[33]!==i?(u=a.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[n,k]}),e[31]=n,e[32]=k,e[33]=i,e[34]=u):u=e[34];let K;e[35]!==l?(K=l&&a.jsx(ce,{keyMaterial:l.material,keyName:l.keyName,open:!!l}),e[35]=l,e[36]=K):K=e[36];let M;return e[37]!==u||e[38]!==K||e[39]!==f?(M=a.jsxs(a.Fragment,{children:[w,j,f,u,K]}),e[37]=u,e[38]=K,e[39]=f,e[40]=M):M=e[40],M}export{be as component}; +import{f as U,c as R,u as L,r as O,j as a,B as E,g as I}from"./index.js";import{a as z,u as Y,I as $,F as H,b as q,c as G}from"./field.js";import{B as J}from"./back-link.js";import{E as Q}from"./error-banner.js";import{P as V}from"./page-heading.js";import{a as W}from"./ec2.js";import{A as X,a as Z,b as ee,c as te,d as ae,e as se,f as le,g as ie}from"./alert-dialog.js";import{T as re}from"./textarea.js";import{C as oe}from"./check.js";import{D as ne}from"./download.js";import"./useMutation.js";const ce=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],me=U("triangle-alert",ce),de=2e3;function fe(e){const t=R.c(36),{open:s,keyName:l,keyMaterial:d}=e,g=L(),[P,S]=O.useState(!1);let _;t[0]!==d?(_=async()=>{await navigator.clipboard.writeText(d),S(!0),setTimeout(()=>S(!1),de)},t[0]=d,t[1]=_):_=t[1];const b=_;let N;t[2]!==d||t[3]!==l?(N=()=>{const K=new Blob([d],{type:"text/plain"}),k=URL.createObjectURL(K),u=document.createElement("a");u.href=k,u.download=`${l}.pem`,u.click(),URL.revokeObjectURL(k)},t[2]=d,t[3]=l,t[4]=N):N=t[4];const C=N;let v;t[5]!==g?(v=()=>{g({to:"/ec2/describe-key-pairs"})},t[5]=g,t[6]=v):v=t[6];const w=v;let j,f;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(X,{children:a.jsx(me,{className:"text-destructive"})}),f=a.jsx(Z,{children:"Save Your Private Key"}),t[7]=j,t[8]=f):(j=t[7],f=t[8]);let i;t[9]!==l?(i=a.jsxs(ee,{children:[j,f,a.jsxs(te,{children:["This is your only chance to save the private key file for"," ",a.jsx("strong",{children:l}),". Please download or copy it now. You won't be able to retrieve it again."]})]}),t[9]=l,t[10]=i):i=t[10];let y;t[11]!==d?(y=a.jsx(re,{className:"font-mono text-xs",readOnly:!0,rows:12,value:d}),t[11]=d,t[12]=y):y=t[12];let x;t[13]!==P?(x=P?a.jsxs(a.Fragment,{children:[a.jsx(oe,{className:"mr-2 size-4"}),"Copied!"]}):"Copy to Clipboard",t[13]=P,t[14]=x):x=t[14];let r;t[15]!==b||t[16]!==x?(r=a.jsx(E,{className:"flex-1",onClick:b,type:"button",variant:"outline",children:x}),t[15]=b,t[16]=x,t[17]=r):r=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(ne,{className:"mr-2 size-4"}),t[18]=p):p=t[18];let o;t[19]!==C?(o=a.jsxs(E,{className:"flex-1",onClick:C,type:"button",variant:"outline",children:[p,"Download .pem File"]}),t[19]=C,t[20]=o):o=t[20];let n;t[21]!==o||t[22]!==r?(n=a.jsxs("div",{className:"flex gap-2",children:[r,o]}),t[21]=o,t[22]=r,t[23]=n):n=t[23];let h;t[24]!==n||t[25]!==y?(h=a.jsxs("div",{className:"space-y-3",children:[y,n]}),t[24]=n,t[25]=y,t[26]=h):h=t[26];let c;t[27]!==w?(c=a.jsx(ae,{children:a.jsx(se,{onClick:w,children:"Close and Continue"})}),t[27]=w,t[28]=c):c=t[28];let m;t[29]!==h||t[30]!==c||t[31]!==i?(m=a.jsxs(le,{className:"max-w-2xl",children:[i,h,c]}),t[29]=h,t[30]=c,t[31]=i,t[32]=m):m=t[32];let D;return t[33]!==s||t[34]!==m?(D=a.jsx(ie,{open:s,children:m}),t[33]=s,t[34]=m,t[35]=D):D=t[35],D}function ve(){const e=R.c(42),t=L(),s=W(),[l,d]=O.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:z(I)},e[0]=g):g=e[0];const{handleSubmit:P,register:S,formState:_}=Y(g),{errors:b,isSubmitting:N}=_;let C;e[1]!==s?(C=async T=>{const B=await s.mutateAsync(T);B.KeyMaterial&&d({keyName:T.keyName,material:B.KeyMaterial})},e[1]=s,e[2]=C):C=e[2];const v=C;let w,j;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(J,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),j=a.jsx(V,{title:"Create Key Pair"}),e[3]=w,e[4]=j):(w=e[3],j=e[4]);let f;e[5]!==s.error?(f=s.error&&a.jsx(Q,{error:s.error,msg:"Failed to create key pair"}),e[5]=s.error,e[6]=f):f=e[6];let i;e[7]!==P||e[8]!==v?(i=P(v),e[7]=P,e[8]=v,e[9]=i):i=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(q,{children:a.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[10]=y):y=e[10];const x=!!b.keyName;let r;e[11]!==S?(r=S("keyName"),e[11]=S,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=a.jsx($,{"aria-invalid":x,id:"keyName",placeholder:"my-key-pair…",...r}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let o;e[16]!==b.keyName?(o=a.jsx(H,{errors:[b.keyName]}),e[16]=b.keyName,e[17]=o):o=e[17];let n;e[18]!==p||e[19]!==o?(n=a.jsxs(G,{children:[y,p,o]}),e[18]=p,e[19]=o,e[20]=n):n=e[20];const h=N||s.isPending;let c;e[21]!==t?(c=()=>t({to:"/ec2/describe-key-pairs"}),e[21]=t,e[22]=c):c=e[22];let m;e[23]!==h||e[24]!==c?(m=a.jsx(E,{disabled:h,onClick:c,type:"button",variant:"outline",children:"Cancel"}),e[23]=h,e[24]=c,e[25]=m):m=e[25];const D=N||s.isPending,K=N||s.isPending?"Creating…":"Create Key Pair";let k;e[26]!==D||e[27]!==K?(k=a.jsx(E,{disabled:D,type:"submit",children:K}),e[26]=D,e[27]=K,e[28]=k):k=e[28];let u;e[29]!==m||e[30]!==k?(u=a.jsxs("div",{className:"flex gap-2",children:[m,k]}),e[29]=m,e[30]=k,e[31]=u):u=e[31];let A;e[32]!==n||e[33]!==u||e[34]!==i?(A=a.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[n,u]}),e[32]=n,e[33]=u,e[34]=i,e[35]=A):A=e[35];let F;e[36]!==l?(F=l&&a.jsx(fe,{keyMaterial:l.material,keyName:l.keyName,open:!!l}),e[36]=l,e[37]=F):F=e[37];let M;return e[38]!==A||e[39]!==F||e[40]!==f?(M=a.jsxs(a.Fragment,{children:[w,j,f,A,F]}),e[38]=A,e[39]=F,e[40]=f,e[41]=M):M=e[41],M}export{ve as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/download.js b/hive/services/hiveui/frontend/dist/assets/download.js index 39be8b7d8..4cf70a676 100644 --- a/hive/services/hiveui/frontend/dist/assets/download.js +++ b/hive/services/hiveui/frontend/dist/assets/download.js @@ -1 +1 @@ -import{g as o}from"./index.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],e=o("download",a);export{e as D}; +import{f as o}from"./index.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],e=o("download",a);export{e as D}; diff --git a/hive/services/hiveui/frontend/dist/assets/ec2.js b/hive/services/hiveui/frontend/dist/assets/ec2.js index e2c4df1d9..5c645a6bb 100644 --- a/hive/services/hiveui/frontend/dist/assets/ec2.js +++ b/hive/services/hiveui/frontend/dist/assets/ec2.js @@ -1 +1 @@ -import{b3 as c,bP as o,b5 as i,bQ as C,bR as p,bS as f,bT as E,bU as b,bV as P,bW as K,bX as S,bY as w,c as r,bk as u,bZ as m,aF as l,ax as y}from"./index.js";import{u as d}from"./useMutation.js";class q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(C).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(f).build(){}class v extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(E).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(b).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(P).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(K).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(S).build(){}class T extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(w).build(){}const A=/\s+/;function X(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function F(e){const n=new x({InstanceIds:[e]});return await m().send(n)}function h(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function M(e){const n=new z({InstanceIds:[e]});return await m().send(n)}function j(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:_,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function _(e){const n=new T({InstanceIds:[e]});return await m().send(n)}function H(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function B(e){const n=new g({InstanceIds:[e]});return await m().send(n)}function U(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:D,onSuccess:async s=>{await n.cancelQueries(l);const a=n.getQueryData(l.queryKey);if(a&&s.Instances){const I={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(l.queryKey,{...a,Reservations:[...a.Reservations||[],I]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function D(e){const n=new Q({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function Y(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:V,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function V(e){const n=new q({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function Z(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function k(e){const t=e.publicKeyMaterial.trim().split(A).slice(0,2).join(" "),s=new $({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function J(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function N(e){const n=new R({KeyPairId:e});return await m().send(n)}function L(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function G(e){const n=new v({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}export{Y as a,U as b,L as c,J as d,X as e,h as f,H as g,j as h,Z as u}; +import{b2 as c,bP as o,b4 as i,bQ as C,bR as p,bS as f,bT as E,bU as b,bV as P,bW as K,bX as w,bY as S,c as r,bj as u,bZ as m,aE as l,aw as y}from"./index.js";import{u as d}from"./useMutation.js";class q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(C).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(f).build(){}class v extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(E).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(b).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(P).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(K).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(w).build(){}class T extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(S).build(){}const A=/\s+/;function W(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function M(e){const n=new x({InstanceIds:[e]});return await m().send(n)}function X(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:_,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function _(e){const n=new z({InstanceIds:[e]});return await m().send(n)}function h(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function B(e){const n=new T({InstanceIds:[e]});return await m().send(n)}function H(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function F(e){const n=new g({InstanceIds:[e]});return await m().send(n)}function U(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:D,onSuccess:async s=>{await n.cancelQueries(l);const a=n.getQueryData(l.queryKey);if(a&&s.Instances){const I={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(l.queryKey,{...a,Reservations:[...a.Reservations||[],I]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function D(e){const n=new Q({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function Y(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:V,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function V(e){const n=new q({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function Z(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function N(e){const t=e.publicKeyMaterial.trim().split(A).slice(0,2).join(" "),s=new $({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function J(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function k(e){const n=new R({KeyPairId:e});return await m().send(n)}function L(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function G(e){const n=new v({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}export{Y as a,U as b,L as c,J as d,W as e,X as f,H as g,h,Z as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/error-banner.js b/hive/services/hiveui/frontend/dist/assets/error-banner.js index f078c63e8..f13b3a9b1 100644 --- a/hive/services/hiveui/frontend/dist/assets/error-banner.js +++ b/hive/services/hiveui/frontend/dist/assets/error-banner.js @@ -1 +1 @@ -import{c as o,a as d,j as n}from"./index.js";function m(a){const e=o.c(8);let s,r;e[0]!==a?({className:s,...r}=a,e[0]=a,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let t;e[3]!==s?(t=d("flex select-none items-center gap-2 font-medium text-sm/relaxed leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",s),e[3]=s,e[4]=t):t=e[4];let l;return e[5]!==r||e[6]!==t?(l=n.jsx("label",{className:t,"data-slot":"label",...r}),e[5]=r,e[6]=t,e[7]=l):l=e[7],l}function p(a){const e=o.c(7),{msg:s,error:r}=a;let t;e[0]!==s?(t=s&&n.jsx("h2",{className:"text-destructive text-sm",children:s}),e[0]=s,e[1]=t):t=e[1];let l;e[2]!==r?(l=r&&n.jsx("p",{className:"text-destructive text-sm",children:r.message}),e[2]=r,e[3]=l):l=e[3];let i;return e[4]!==t||e[5]!==l?(i=n.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[t,l]}),e[4]=t,e[5]=l,e[6]=i):i=e[6],i}export{p as E,m as L}; +import{c as o,j as m}from"./index.js";function n(l){const e=o.c(7),{msg:r,error:c}=l;let t;e[0]!==r?(t=r&&m.jsx("h2",{className:"text-destructive text-sm",children:r}),e[0]=r,e[1]=t):t=e[1];let s;e[2]!==c?(s=c&&m.jsx("p",{className:"text-destructive text-sm",children:c.message}),e[2]=c,e[3]=s):s=e[3];let i;return e[4]!==t||e[5]!==s?(i=m.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[t,s]}),e[4]=t,e[5]=s,e[6]=i):i=e[6],i}export{n as E}; diff --git a/hive/services/hiveui/frontend/dist/assets/field.js b/hive/services/hiveui/frontend/dist/assets/field.js new file mode 100644 index 000000000..b772b2066 --- /dev/null +++ b/hive/services/hiveui/frontend/dist/assets/field.js @@ -0,0 +1 @@ +import{r as ee,bp as re,U as Ht,E as st,bq as Wt,F as he,br as $t,H as _t,ao as zt,aa as Kt,v as Yt,a8 as Gt,j as le,c as _e,a as xe,bs as _,bt as Zt,bu as Jt,bv as Qt,bw as Xt}from"./index.js";let it=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const er={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tr={valid(e){return e===null?null:e?{[it.valid]:""}:{[it.invalid]:""}}},rr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:er,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=st)=>e,getInputValidationProps:(e=st)=>e,inputRef:{current:null},commit:async()=>{}}});function Te(e=!0){const r=ee.useContext(rr);if(r.setValidityData===re&&!e)throw new Error(Ht(28));return r}const sr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function ir(){return ee.useContext(sr)}const ar=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function xt(){return ee.useContext(ar)}function nr(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function lr({controlled:e,default:r,name:t,state:s="value"}){const{current:n}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=n?e:a,b=ee.useCallback(x=>{n||o(x)},[]);return[d,b]}function or(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:n,setControlId:a}=xt(),o=Wt(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;$t(d)&&d.closest("label")!=null?a(r??null):a(n??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,n,a,t,o]),n??o}function ur(e){const{enabled:r=!0,value:t,id:s,name:n,controlRef:a,commit:o}=e,{formRef:d}=ir(),{invalid:b,markedDirtyRef:x,validityData:C,setValidityData:v}=Te(),V=_t(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=V()),C.initialValue===null&&h!==null&&v(O=>({...O,initialValue:h}))},[r,v,t,C.initialValue,V]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:V,name:n,controlRef:a,validityData:nr(C,b),validate(h=!0){let O=t;O===void 0&&(O=V()),x.current=!0,h?zt.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,V,s,b,x,n,C,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const dr=ee.forwardRef(function(r,t){const{render:s,className:n,id:a,name:o,value:d,disabled:b=!1,onValueChange:x,defaultValue:C,...v}=r,{state:V,name:h,disabled:O}=Te(),I=O||b,U=h??o,M=ee.useMemo(()=>({...V,disabled:I}),[V,I]),{setTouched:p,setDirty:W,validityData:F,setFocused:E,setFilled:q,validationMode:te,validation:H}=Te(),{labelId:X}=xt(),z=or({id:a});he(()=>{const R=d!=null;H.inputRef.current?.value||R&&d!==""?q(!0):R&&d===""&&q(!1)},[H.inputRef,q,d]);const[oe,w]=lr({controlled:d,default:C,name:"FieldControl",state:"value"}),k=d!==void 0,N=_t((R,L)=>{x?.(R,L),!L.isCanceled&&w(R)});return ur({id:z,name:U,commit:H.commit,value:oe,getValue:()=>H.inputRef.current?.value,controlRef:H.inputRef}),Kt("input",r,{ref:t,state:M,props:[{id:z,disabled:I,name:U,ref:H.inputRef,"aria-labelledby":X,...k?{value:oe}:{defaultValue:C},onChange(R){const L=R.currentTarget.value;N(L,Yt(Gt,R.nativeEvent)),W(L!==F.initialValue),q(L!=="")},onFocus(){E(!0)},onBlur(R){p(!0),E(!1),te==="onBlur"&&H.commit(R.currentTarget.value)},onKeyDown(R){R.currentTarget.tagName==="INPUT"&&R.key==="Enter"&&(p(!0),H.commit(R.currentTarget.value))}},H.getInputValidationProps(),v],stateAttributesMapping:tr})}),fr=ee.forwardRef(function(r,t){return le.jsx(dr,{ref:t,...r})});function Br(e){const r=_e.c(10);let t,s,n;r[0]!==e?({className:t,type:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);let a;r[4]!==t?(a=xe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==n?(o=le.jsx(fr,{className:a,"data-slot":"input",type:n,...s}),r[6]=s,r[7]=a,r[8]=n,r[9]=o):o=r[9],o}var pe=e=>e.type==="checkbox",de=e=>e instanceof Date,Z=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!Z(e)&&!Array.isArray(e)&&pt(e)&&!de(e),Ft=e=>j(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,cr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wt=(e,r)=>e.has(cr(r)),yr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Le=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Le&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&yr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=P(e[n]));return s}var ke=e=>/^\w*$/.test(e),T=e=>e===void 0,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(ke(r)?[r]:Be(r)).reduce((n,a)=>Z(n)?n:n[a],e);return T(s)||s===e?T(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",G=e=>typeof e=="function",S=(e,r,t)=>{let s=-1;const n=ke(r)?[r]:Be(r),a=n.length,o=a-1;for(;++s_.useContext(Et);var kt=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return n};const qe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function gr(e){const r=je(),{control:t=r,disabled:s,name:n,exact:a}=e||{},[o,d]=_.useState(t._formState),b=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return qe(()=>t._subscribe({name:n,formState:b.current,exact:a,callback:x=>{!s&&d({...t._formState,...x})}}),[n,s,a]),_.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),_.useMemo(()=>kt(o,t,b.current,!1),[o,t])}var Q=e=>typeof e=="string",Ie=(e,r,t,s,n)=>Q(e)?(s&&r.watch.add(e),y(t,e,n)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Me=e=>Z(e)||!pt(e);function ie(e,r,t=new WeakSet){if(Me(e)||Me(r))return Object.is(e,r);if(de(e)&&de(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),n=Object.keys(r);if(s.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const d=r[a];if(de(o)&&de(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function vr(e){const r=je(),{control:t=r,name:s,defaultValue:n,disabled:a,exact:o,compute:d}=e||{},b=_.useRef(n),x=_.useRef(d),C=_.useRef(void 0),v=_.useRef(t),V=_.useRef(s);x.current=d;const[h,O]=_.useState(()=>{const F=t._getWatch(s,b.current);return x.current?x.current(F):F}),I=_.useCallback(F=>{const E=Ie(s,t._names,F||t._formValues,!1,b.current);return x.current?x.current(E):E},[t._formValues,t._names,s]),U=_.useCallback(F=>{if(!a){const E=Ie(s,t._names,F||t._formValues,!1,b.current);if(x.current){const q=x.current(E);ie(q,C.current)||(O(q),C.current=q)}else O(E)}},[t._formValues,t._names,a,s]);qe(()=>((v.current!==t||!ie(V.current,s))&&(v.current=t,V.current=s,U()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:F=>{U(F.values)}})),[t,o,s,U]),_.useEffect(()=>t._removeUnmounted());const M=v.current!==t,p=V.current,W=_.useMemo(()=>{if(a)return null;const F=!M&&!ie(p,s);return M||F?I():null},[a,M,s,p,I]);return W!==null?W:h}function mr(e){const r=je(),{name:t,disabled:s,control:n=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,b=wt(n._names.array,t),x=_.useMemo(()=>y(n._formValues,t,y(n._defaultValues,t,o)),[n,t,o]),C=vr({control:n,name:t,defaultValue:x,exact:d}),v=gr({control:n,name:t,exact:d}),V=_.useRef(e),h=_.useRef(void 0),O=_.useRef(n.register(t,{...e.rules,value:C,...J(e.disabled)?{disabled:e.disabled}:{}}));V.current=e;const I=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(v.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(v.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(v.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(v.validatingFields,t)},error:{enumerable:!0,get:()=>y(v.errors,t)}}),[v,t]),U=_.useCallback(F=>O.current.onChange({target:{value:Ft(F),name:t},type:Fe.CHANGE}),[t]),M=_.useCallback(()=>O.current.onBlur({target:{value:y(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),p=_.useCallback(F=>{const E=y(n._fields,t);E&&E._f&&F&&(E._f.ref={focus:()=>G(F.focus)&&F.focus(),select:()=>G(F.select)&&F.select(),setCustomValidity:q=>G(F.setCustomValidity)&&F.setCustomValidity(q),reportValidity:()=>G(F.reportValidity)&&F.reportValidity()})},[n._fields,t]),W=_.useMemo(()=>({name:t,value:C,...J(s)||v.disabled?{disabled:v.disabled||s}:{},onChange:U,onBlur:M,ref:p}),[t,s,v.disabled,U,M,p,C]);return _.useEffect(()=>{const F=n._options.shouldUnregister||a,E=h.current;E&&E!==t&&!b&&n.unregister(E),n.register(t,{...V.current.rules,...J(V.current.disabled)?{disabled:V.current.disabled}:{}});const q=(te,H)=>{const X=y(n._fields,te);X&&X._f&&(X._f.mount=H)};if(q(t,!0),F){const te=P(y(n._options.defaultValues,t,V.current.defaultValue));S(n._defaultValues,t,te),T(y(n._formValues,t))&&S(n._formValues,t,te)}return!b&&n.register(t),h.current=t,()=>{(b?F&&!n._state.action:F)?n.unregister(t):q(t,!1)}},[t,n,b,a]),_.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),_.useMemo(()=>({field:W,formState:v,fieldState:I}),[W,v,I])}const jr=e=>e.render(mr(e)),hr=_.createContext(null);hr.displayName="HookFormContext";var He=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},be=e=>Array.isArray(e)?e:[e],at=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function Ct(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const n=e[s],a=r[s];if(n&&j(n)&&a){const o=Ct(n,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var Y=e=>j(e)&&!Object.keys(e).length,We=e=>e.type==="file",we=e=>{if(!Le)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},At=e=>e.type==="select-multiple",$e=e=>e.type==="radio",br=e=>$e(e)||pe(e),Oe=e=>we(e)&&e.isConnected;function Vr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s{for(const r in e)if(G(e[r]))return!0;return!1};function Dt(e){return Array.isArray(e)||j(e)&&!xr(e)}function Ne(e,r={}){for(const t in e){const s=e[t];Dt(s)?(r[t]=Array.isArray(s)?[]:{},Ne(s,r[t])):T(s)||(r[t]=!0)}return r}function ce(e,r,t){t||(t=Ne(r));for(const s in e){const n=e[s];if(Dt(n))T(r)||Me(t[s])?t[s]=Ne(n,Array.isArray(n)?[]:{}):ce(n,Z(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!ie(n,a)}}return t}const nt={value:!1,isValid:!1},lt={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?lt:{value:e[0].value,isValid:!0}:lt:nt}return nt},Rt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>T(e)?e:r?e===""?NaN:e&&+e:t&&Q(e)?new Date(e):s?s(e):e;const ot={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ut(e){const r=e.ref;return We(r)?r.files:$e(r)?Ot(e.refs).value:At(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?St(e.refs).value:Rt(T(r.value)?e.ref.value:r.value,e)}var pr=(e,r,t,s)=>{const n={};for(const a of e){const o=y(r,a);o&&S(n,a,o._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,me=e=>T(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,dt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const ft="AsyncFunction";var Fr=e=>!!e&&!!e.validate&&!!(G(e.validate)&&e.validate.constructor.name===ft||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ft)),wr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ct=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ve=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const a=y(e,n);if(a){const{_f:o,...d}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],n)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(Ve(d,r))break}else if(j(d)&&Ve(d,r))break}}};function yt(e,r,t){const s=y(e,t);if(s||ke(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),o=y(r,a),d=y(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(d&&d.type)return{name:a,error:d};if(d&&d.root&&d.root.type)return{name:`${a}.root`,error:d.root};n.pop()}return{name:t}}var Er=(e,r,t,s)=>{t(e);const{name:n,...a}=e;return Y(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},kr=(e,r,t)=>!e||!r||e===r||be(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Cr=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Ar=(e,r)=>!Pe(y(e,r)).length&&B(e,r),Dr=(e,r,t)=>{const s=be(y(e,t));return S(s,"root",r[t]),S(e,t,s),e};function gt(e,r,t="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||J(e)&&!e)return{type:t,message:Q(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},vt=async(e,r,t,s,n,a)=>{const{ref:o,refs:d,required:b,maxLength:x,minLength:C,min:v,max:V,pattern:h,validate:O,name:I,valueAsNumber:U,mount:M}=e._f,p=y(t,I);if(!M||r.has(I))return{};const W=d?d[0]:o,F=w=>{n&&W.reportValidity&&(W.setCustomValidity(J(w)?"":w||""),W.reportValidity())},E={},q=$e(o),te=pe(o),H=q||te,X=(U||We(o))&&T(o.value)&&T(p)||we(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,z=He.bind(null,I,s,E),oe=(w,k,N,$=ae.maxLength,R=ae.minLength)=>{const L=w?k:N;E[I]={type:w?$:R,message:L,ref:o,...z(w?$:R,L)}};if(a?!Array.isArray(p)||!p.length:b&&(!H&&(X||Z(p))||J(p)&&!p||te&&!St(d).isValid||q&&!Ot(d).isValid)){const{value:w,message:k}=Q(b)?{value:!!b,message:b}:fe(b);if(w&&(E[I]={type:ae.required,message:k,ref:W,...z(ae.required,k)},!s))return F(k),E}if(!X&&(!Z(v)||!Z(V))){let w,k;const N=fe(V),$=fe(v);if(!Z(p)&&!isNaN(p)){const R=o.valueAsNumber||p&&+p;Z(N.value)||(w=R>N.value),Z($.value)||(k=R<$.value)}else{const R=o.valueAsDate||new Date(p),L=ve=>new Date(new Date().toDateString()+" "+ve),ye=o.type=="time",ge=o.type=="week";Q(N.value)&&p&&(w=ye?L(p)>L(N.value):ge?p>N.value:R>new Date(N.value)),Q($.value)&&p&&(k=ye?L(p)+w.value,$=!Z(k.value)&&p.length<+k.value;if((N||$)&&(oe(N,w.message,k.message),!s))return F(E[I].message),E}if(h&&!X&&Q(p)){const{value:w,message:k}=fe(h);if(Ee(w)&&!p.match(w)&&(E[I]={type:ae.pattern,message:k,ref:o,...z(ae.pattern,k)},!s))return F(k),E}if(O){if(G(O)){const w=await O(p,t),k=gt(w,W);if(k&&(E[I]={...k,...z(ae.validate,k.message)},!s))return F(k.message),E}else if(j(O)){let w={};for(const k in O){if(!Y(w)&&!s)break;const N=gt(await O[k](p,t),W,k);N&&(w={...N,...z(k,N.message)},F(N.message),s&&(E[I]=w))}if(!Y(w)&&(E[I]={ref:W,...w},!s))return E}}return F(!0),E};const Sr={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Rr(e={}){let r={...Sr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:G(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=j(r.defaultValues)||j(r.values)?P(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:P(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const C={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={...C};let V={...v};const h={array:at(),state:at()},O=r.criteriaMode===se.all,I=i=>l=>{clearTimeout(x),x=setTimeout(i,l)},U=async i=>{if(!o.keepIsValid&&!r.disabled&&(v.isValid||V.isValid||i)){let l;r.resolver?(l=Y((await H()).errors),M()):l=await z(s,!0),l!==t.isValid&&h.state.next({isValid:l})}},M=(i,l)=>{!r.disabled&&(v.isValidating||v.validatingFields||V.isValidating||V.validatingFields)&&((i||Array.from(d.mount)).forEach(u=>{u&&(l?S(t.validatingFields,u,l):B(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!Y(t.validatingFields)}))},p=(i,l=[],u,g,c=!0,f=!0)=>{if(g&&u&&!r.disabled){if(o.action=!0,f&&Array.isArray(y(s,i))){const m=u(y(s,i),g.argA,g.argB);c&&S(s,i,m)}if(f&&Array.isArray(y(t.errors,i))){const m=u(y(t.errors,i),g.argA,g.argB);c&&S(t.errors,i,m),Ar(t.errors,i)}if((v.touchedFields||V.touchedFields)&&f&&Array.isArray(y(t.touchedFields,i))){const m=u(y(t.touchedFields,i),g.argA,g.argB);c&&S(t.touchedFields,i,m)}(v.dirtyFields||V.dirtyFields)&&(t.dirtyFields=ce(n,a)),h.state.next({name:i,isDirty:w(i,l),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else S(a,i,l)},W=(i,l)=>{S(t.errors,i,l),h.state.next({errors:t.errors})},F=i=>{t.errors=i,h.state.next({errors:t.errors,isValid:!1})},E=(i,l,u,g)=>{const c=y(s,i);if(c){const f=y(a,i,T(u)?y(n,i):u);T(f)||g&&g.defaultChecked||l?S(a,i,l?f:ut(c._f)):$(i,f),o.mount&&!o.action&&U()}},q=(i,l,u,g,c)=>{let f=!1,m=!1;const A={name:i};if(!r.disabled){if(!u||g){(v.isDirty||V.isDirty)&&(m=t.isDirty,t.isDirty=A.isDirty=w(),f=m!==A.isDirty);const D=ie(y(n,i),l);m=!!y(t.dirtyFields,i),D?B(t.dirtyFields,i):S(t.dirtyFields,i,!0),A.dirtyFields=t.dirtyFields,f=f||(v.dirtyFields||V.dirtyFields)&&m!==!D}if(u){const D=y(t.touchedFields,i);D||(S(t.touchedFields,i,u),A.touchedFields=t.touchedFields,f=f||(v.touchedFields||V.touchedFields)&&D!==u)}f&&c&&h.state.next(A)}return f?A:{}},te=(i,l,u,g)=>{const c=y(t.errors,i),f=(v.isValid||V.isValid)&&J(l)&&t.isValid!==l;if(r.delayError&&u?(b=I(()=>W(i,u)),b(r.delayError)):(clearTimeout(x),b=null,u?S(t.errors,i,u):B(t.errors,i)),(u?!ie(c,u):c)||!Y(g)||f){const m={...g,...f&&J(l)?{isValid:l}:{},errors:t.errors,name:i};t={...t,...m},h.state.next(m)}},H=async i=>(M(i,!0),await r.resolver(a,r.context,pr(i||d.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),X=async i=>{const{errors:l}=await H(i);if(M(i),i)for(const u of i){const g=y(l,u);g?S(t.errors,u,g):B(t.errors,u)}else t.errors=l;return l},z=async(i,l,u={valid:!0})=>{for(const g in i){const c=i[g];if(c){const{_f:f,...m}=c;if(f){const A=d.array.has(f.name),D=c._f&&Fr(c._f);D&&v.validatingFields&&M([f.name],!0);const K=await vt(c,d.disabled,a,O,r.shouldUseNativeValidation&&!l,A);if(D&&v.validatingFields&&M([f.name]),K[f.name]&&(u.valid=!1,l||e.shouldUseNativeValidation))break;!l&&(y(K,f.name)?A?Dr(t.errors,K,f.name):S(t.errors,f.name,K[f.name]):B(t.errors,f.name))}!Y(m)&&await z(m,l,u)}}return u.valid},oe=()=>{for(const i of d.unMount){const l=y(s,i);l&&(l._f.refs?l._f.refs.every(u=>!Oe(u)):!Oe(l._f.ref))&&Ce(i)}d.unMount=new Set},w=(i,l)=>!r.disabled&&(i&&l&&S(a,i,l),!ie(ze(),n)),k=(i,l,u)=>Ie(i,d,{...o.mount?a:T(l)?n:Q(i)?{[i]:l}:l},u,l),N=i=>Pe(y(o.mount?a:n,i,r.shouldUnregister?y(n,i,[]):[])),$=(i,l,u={})=>{const g=y(s,i);let c=l;if(g){const f=g._f;f&&(!f.disabled&&S(a,i,Rt(l,f)),c=we(f.ref)&&Z(l)?"":l,At(f.ref)?[...f.ref.options].forEach(m=>m.selected=c.includes(m.value)):f.refs?pe(f.ref)?f.refs.forEach(m=>{(!m.defaultChecked||!m.disabled)&&(Array.isArray(c)?m.checked=!!c.find(A=>A===m.value):m.checked=c===m.value||!!c)}):f.refs.forEach(m=>m.checked=m.value===c):We(f.ref)?f.ref.value="":(f.ref.value=c,f.ref.type||h.state.next({name:i,values:P(a)})))}(u.shouldDirty||u.shouldTouch)&&q(i,c,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&ve(i)},R=(i,l,u)=>{for(const g in l){if(!l.hasOwnProperty(g))return;const c=l[g],f=i+"."+g,m=y(s,f);(d.array.has(i)||j(c)||m&&!m._f)&&!de(c)?R(f,c,u):$(f,c,u)}},L=(i,l,u={})=>{const g=y(s,i),c=d.array.has(i),f=P(l);S(a,i,f),c?(h.array.next({name:i,values:P(a)}),(v.isDirty||v.dirtyFields||V.isDirty||V.dirtyFields)&&u.shouldDirty&&h.state.next({name:i,dirtyFields:ce(n,a),isDirty:w(i,f)})):g&&!g._f&&!Z(f)?R(i,f,u):$(i,f,u),ct(i,d)?h.state.next({...t,name:i,values:P(a)}):h.state.next({name:o.mount?i:void 0,values:P(a)})},ye=async i=>{o.mount=!0;const l=i.target;let u=l.name,g=!0;const c=y(s,u),f=D=>{g=Number.isNaN(D)||de(D)&&isNaN(D.getTime())||ie(D,y(a,u,D))},m=dt(r.mode),A=dt(r.reValidateMode);if(c){let D,K;const ue=l.type?ut(c._f):Ft(i),ne=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,Bt=!wr(c._f)&&!r.resolver&&!y(t.errors,u)&&!c._f.deps||Cr(ne,y(t.touchedFields,u),t.isSubmitted,A,m),Se=ct(u,d,ne);S(a,u,ue),ne?(!l||!l.readOnly)&&(c._f.onBlur&&c._f.onBlur(i),b&&b(0)):c._f.onChange&&c._f.onChange(i);const Re=q(u,ue,ne),jt=!Y(Re)||Se;if(!ne&&h.state.next({name:u,type:i.type,values:P(a)}),Bt)return(v.isValid||V.isValid)&&(r.mode==="onBlur"?ne&&U():ne||U()),jt&&h.state.next({name:u,...Se?{}:Re});if(!ne&&Se&&h.state.next({...t}),r.resolver){const{errors:tt}=await H([u]);if(M([u]),f(ue),g){const qt=yt(t.errors,s,u),rt=yt(tt,s,qt.name||u);D=rt.error,u=rt.name,K=Y(tt)}}else M([u],!0),D=(await vt(c,d.disabled,a,O,r.shouldUseNativeValidation))[u],M([u]),f(ue),g&&(D?K=!1:(v.isValid||V.isValid)&&(K=await z(s,!0)));g&&(c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&ve(c._f.deps),te(u,K,D,Re))}},ge=(i,l)=>{if(y(t.errors,l)&&i.focus)return i.focus(),1},ve=async(i,l={})=>{let u,g;const c=be(i);if(r.resolver){const f=await X(T(i)?i:c);u=Y(f),g=i?!c.some(m=>y(f,m)):u}else i?(g=(await Promise.all(c.map(async f=>{const m=y(s,f);return await z(m&&m._f?{[f]:m}:m)}))).every(Boolean),!(!g&&!t.isValid)&&U()):g=u=await z(s);return h.state.next({...!Q(i)||(v.isValid||V.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),l.shouldFocus&&!g&&Ve(s,ge,i?c:d.mount),g},ze=(i,l)=>{let u={...o.mount?a:n};return l&&(u=Ct(l.dirtyFields?t.dirtyFields:t.touchedFields,u)),T(i)?u:Q(i)?y(u,i):i.map(g=>y(u,g))},Ke=(i,l)=>({invalid:!!y((l||t).errors,i),isDirty:!!y((l||t).dirtyFields,i),error:y((l||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((l||t).touchedFields,i)}),Tt=i=>{i&&be(i).forEach(l=>B(t.errors,l)),h.state.next({errors:i?t.errors:{}})},Ye=(i,l,u)=>{const g=(y(s,i,{_f:{}})._f||{}).ref,c=y(t.errors,i)||{},{ref:f,message:m,type:A,...D}=c;S(t.errors,i,{...D,...l,ref:g}),h.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},It=(i,l)=>G(i)?h.state.subscribe({next:u=>"values"in u&&i(k(void 0,l),u)}):k(i,l,!0),Ge=i=>h.state.subscribe({next:l=>{kr(i.name,l.name,i.exact)&&Er(l,i.formState||v,Pt,i.reRenderRoot)&&i.callback({values:{...a},...t,...l,defaultValues:n})}}).unsubscribe,Mt=i=>(o.mount=!0,V={...V,...i.formState},Ge({...i,formState:{...C,...i.formState}})),Ce=(i,l={})=>{for(const u of i?be(i):d.mount)d.mount.delete(u),d.array.delete(u),l.keepValue||(B(s,u),B(a,u)),!l.keepError&&B(t.errors,u),!l.keepDirty&&B(t.dirtyFields,u),!l.keepTouched&&B(t.touchedFields,u),!l.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!l.keepDefaultValue&&B(n,u);h.state.next({values:P(a)}),h.state.next({...t,...l.keepDirty?{isDirty:w()}:{}}),!l.keepIsValid&&U()},Ze=({disabled:i,name:l})=>{if(J(i)&&o.mount||i||d.disabled.has(l)){const c=d.disabled.has(l)!==!!i;i?d.disabled.add(l):d.disabled.delete(l),c&&o.mount&&!o.action&&U()}},Ae=(i,l={})=>{let u=y(s,i);const g=J(l.disabled)||J(r.disabled);return S(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...l}}),d.mount.add(i),u?Ze({disabled:J(l.disabled)?l.disabled:r.disabled,name:i}):E(i,!0,l.value),{...g?{disabled:l.disabled||r.disabled}:{},...r.progressive?{required:!!l.required,min:me(l.min),max:me(l.max),minLength:me(l.minLength),maxLength:me(l.maxLength),pattern:me(l.pattern)}:{},name:i,onChange:ye,onBlur:ye,ref:c=>{if(c){Ae(i,l),u=y(s,i);const f=T(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,m=br(f),A=u._f.refs||[];if(m?A.find(D=>D===f):f===u._f.ref)return;S(s,i,{_f:{...u._f,...m?{refs:[...A.filter(Oe),f,...Array.isArray(y(n,i))?[{}]:[]],ref:{type:f.type,name:i}}:{ref:f}}}),E(i,!1,void 0,f)}else u=y(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||l.shouldUnregister)&&!(wt(d.array,i)&&o.action)&&d.unMount.add(i)}}},De=()=>r.shouldFocusError&&Ve(s,ge,d.mount),Nt=i=>{J(i)&&(h.state.next({disabled:i}),Ve(s,(l,u)=>{const g=y(s,u);g&&(l.disabled=g._f.disabled||i,Array.isArray(g._f.refs)&&g._f.refs.forEach(c=>{c.disabled=g._f.disabled||i}))},0,!1))},Je=(i,l)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let c=P(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:m}=await H();M(),t.errors=f,c=P(m)}else await z(s);if(d.disabled.size)for(const f of d.disabled)B(c,f);if(B(t.errors,"root"),Y(t.errors)){h.state.next({errors:{}});try{await i(c,u)}catch(f){g=f}}else l&&await l({...t.errors},u),De(),setTimeout(De);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Y(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(i,l={})=>{y(s,i)&&(T(l.defaultValue)?L(i,P(y(n,i))):(L(i,l.defaultValue),S(n,i,P(l.defaultValue))),l.keepTouched||B(t.touchedFields,i),l.keepDirty||(B(t.dirtyFields,i),t.isDirty=l.defaultValue?w(i,P(y(n,i))):w()),l.keepError||(B(t.errors,i),v.isValid&&U()),h.state.next({...t}))},Qe=(i,l={})=>{const u=i?P(i):n,g=P(u),c=Y(i),f=c?n:g;if(l.keepDefaultValues||(n=u),!l.keepValues){if(l.keepDirtyValues){const m=new Set([...d.mount,...Object.keys(ce(n,a))]);for(const A of Array.from(m)){const D=y(t.dirtyFields,A),K=y(a,A),ue=y(f,A);D&&!T(K)?S(f,A,K):!D&&!T(ue)&&L(A,ue)}}else{if(Le&&T(i))for(const m of d.mount){const A=y(s,m);if(A&&A._f){const D=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(we(D)){const K=D.closest("form");if(K){K.reset();break}}}}if(l.keepFieldsRef)for(const m of d.mount)L(m,y(f,m));else s={}}a=r.shouldUnregister?l.keepDefaultValues?P(n):{}:P(f),h.array.next({values:{...f}}),h.state.next({values:{...f}})}d={mount:l.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!v.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!r.shouldUnregister&&!Y(f),o.watch=!!r.shouldUnregister,o.keepIsValid=!!l.keepIsValid,o.action=!1,l.keepErrors||(t.errors={}),h.state.next({submitCount:l.keepSubmitCount?t.submitCount:0,isDirty:c?!1:l.keepDirty?t.isDirty:!!(l.keepDefaultValues&&!ie(i,n)),isSubmitted:l.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:l.keepDirtyValues?l.keepDefaultValues&&a?ce(n,a):t.dirtyFields:l.keepDefaultValues&&i?ce(n,i):l.keepDirty?t.dirtyFields:{},touchedFields:l.keepTouched?t.touchedFields:{},errors:l.keepErrors?t.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Xe=(i,l)=>Qe(G(i)?i(a):i,{...r.resetOptions,...l}),Lt=(i,l={})=>{const u=y(s,i),g=u&&u._f;if(g){const c=g.refs?g.refs[0]:g.ref;c.focus&&setTimeout(()=>{c.focus(),l.shouldSelect&&G(c.select)&&c.select()})}},Pt=i=>{t={...t,...i}},et={control:{register:Ae,unregister:Ce,getFieldState:Ke,handleSubmit:Je,setError:Ye,_subscribe:Ge,_runSchema:H,_updateIsValidating:M,_focusError:De,_getWatch:k,_getDirty:w,_setValid:U,_setFieldArray:p,_setDisabledField:Ze,_setErrors:F,_getFieldArray:N,_reset:Qe,_resetDefaultValues:()=>G(r.defaultValues)&&r.defaultValues().then(i=>{Xe(i,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Nt,_subjects:h,_proxyFormState:v,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(i){o=i},get _defaultValues(){return n},get _names(){return d},set _names(i){d=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Mt,trigger:ve,register:Ae,handleSubmit:Je,watch:It,setValue:L,getValues:ze,reset:Xe,resetField:Ut,clearErrors:Tt,unregister:Ce,setError:Ye,setFocus:Lt,getFieldState:Ke};return{...et,formControl:et}}function qr(e={}){const r=_.useRef(void 0),t=_.useRef(void 0),[s,n]=_.useState({isDirty:!1,isValidating:!1,isLoading:G(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...d}=Rr(e);r.current={...d,formState:s}}const a=r.current.control;return a._options=e,qe(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),a._formState.isReady=!0,o},[a]),_.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),_.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),_.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),_.useEffect(()=>{var o;e.values&&!ie(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,n(d=>({...d}))):a._resetDefaultValues()},[a,e.values]),_.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),r.current.formState=_.useMemo(()=>kt(s,a),[a,s]),r.current}const mt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ue=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?mt(s.ref,t,e):s&&s.refs&&s.refs.forEach(n=>mt(n,t,e))}},ht=(e,r)=>{r.shouldUseNativeValidation&&Ue(e,r);const t={};for(const s in e){const n=y(r.fields,s),a=Object.assign(e[s]||{},{ref:n&&n.ref});if(Or(r.names||Object.keys(e),s)){const o=Object.assign({},y(t,s));S(o,"root",a),S(t,s,o)}else S(t,s,a)}return t},Or=(e,r)=>{const t=bt(r);return e.some(s=>bt(s).match(`^${t}\\.\\d+`))};function bt(e){return e.replace(/\]|\[/g,"")}function Vt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Tr(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(C){return C.errors.forEach(function(v){return e.push(v)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=He(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Ir(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if(s.code==="invalid_union"&&s.errors.length>0){var d=s.errors[0][0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if(s.code==="invalid_union"&&s.errors.forEach(function(C){return C.forEach(function(v){return e.push(v)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=He(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Hr(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return Array.isArray(d?.issues)})(o))return{values:{},errors:ht(Tr(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve((t.mode==="sync"?Zt:Jt)(e,s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return d instanceof Qt})(o))return{values:{},errors:ht(Ir(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function Wr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-group",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}const Mr=Xt("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"@md/field-group:flex-row flex-col @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:[&>*]:w-auto [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function $r(e){const r=_e.c(11);let t,s,n;r[0]!==e?({className:t,orientation:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);const a=n===void 0?"vertical":n;let o;r[4]!==t||r[5]!==a?(o=xe(Mr({orientation:a}),t),r[4]=t,r[5]=a,r[6]=o):o=r[6];let d;return r[7]!==a||r[8]!==s||r[9]!==o?(d=le.jsx("div",{className:o,"data-orientation":a,"data-slot":"field",role:"group",...s}),r[7]=a,r[8]=s,r[9]=o,r[10]=d):d=r[10],d}function zr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("flex w-fit items-center gap-2 font-medium text-xs/relaxed leading-snug group-data-[disabled=true]/field:opacity-50",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-label",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}function Kr(e){const r=_e.c(15);let t,s,n,a;r[0]!==e?({className:s,children:t,errors:n,...a}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n,r[4]=a):(t=r[1],s=r[2],n=r[3],a=r[4]);let o;e:{if(t){o=t;break e}if(!n?.length){o=null;break e}let C;r[5]!==n?(C=[...new Map(n.map(Ur)).values()],r[5]=n,r[6]=C):C=r[6];const v=C;if(v?.length===1){o=v[0]?.message;break e}let V;r[7]!==v?(V=le.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:v.map(Nr)}),r[7]=v,r[8]=V):V=r[8],o=V}const d=o;if(!d)return null;let b;r[9]!==s?(b=xe("font-normal text-destructive text-xs/relaxed",s),r[9]=s,r[10]=b):b=r[10];let x;return r[11]!==d||r[12]!==a||r[13]!==b?(x=le.jsx("div",{className:b,"data-slot":"field-error",role:"alert",...a,children:d}),r[11]=d,r[12]=a,r[13]=b,r[14]=x):x=r[14],x}function Nr(e){return e?.message&&le.jsx("li",{children:e.message},e.message)}function Ur(e){return[e?.message,e]}export{jr as C,Kr as F,Br as I,Hr as a,zr as b,$r as c,Wr as d,ir as e,Te as f,or as g,lr as h,ur as i,xt as j,tr as k,qr as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/import-key-pair.js b/hive/services/hiveui/frontend/dist/assets/import-key-pair.js index 3df868d91..8d8520ae8 100644 --- a/hive/services/hiveui/frontend/dist/assets/import-key-pair.js +++ b/hive/services/hiveui/frontend/dist/assets/import-key-pair.js @@ -1 +1 @@ -import{c as R,u as T,j as t,i as z,B as w}from"./index.js";import{a as D,u as O,I as $}from"./zod.js";import{B as q}from"./back-link.js";import{E as G,L}from"./error-banner.js";import{P as J}from"./page-heading.js";import{T as U}from"./textarea.js";import{u as V}from"./ec2.js";import"./useMutation.js";function re(){const e=R.c(51),r=T(),s=V();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:D(z)},e[0]=g):g=e[0];const{handleSubmit:_,register:a,formState:H}=O(g),{errors:i,isSubmitting:M}=H;let N;e[1]!==s||e[2]!==r?(N=async Q=>{await s.mutateAsync(Q),r({to:"/ec2/describe-key-pairs"})},e[1]=s,e[2]=r,e[3]=N):N=e[3];const I=N;let A,K;e[4]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(q,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),K=t.jsx(J,{title:"Import Key Pair"}),e[4]=A,e[5]=K):(A=e[4],K=e[5]);let l;e[6]!==s.error?(l=s.error&&t.jsx(G,{error:s.error,msg:"Failed to import key pair"}),e[6]=s.error,e[7]=l):l=e[7];let o;e[8]!==_||e[9]!==I?(o=_(I),e[8]=_,e[9]=I,e[10]=o):o=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(L,{htmlFor:"keyName",children:"Key Pair Name"}),e[11]=P):P=e[11];let c;e[12]!==a?(c=a("keyName"),e[12]=a,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx($,{id:"keyName",placeholder:"my-key-pair…",...c}),e[14]=c,e[15]=m):m=e[15];let n;e[16]!==i.keyName?(n=i.keyName&&t.jsx("p",{className:"text-destructive text-xs",children:i.keyName.message}),e[16]=i.keyName,e[17]=n):n=e[17];let p;e[18]!==n||e[19]!==m?(p=t.jsxs("div",{className:"space-y-2",children:[P,m,n]}),e[18]=n,e[19]=m,e[20]=p):p=e[20];let S,v;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(L,{htmlFor:"publicKeyMaterial",children:"Public Key"}),v=t.jsx("p",{className:"text-muted-foreground text-xs",id:"publicKey-description",children:"Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)"}),e[21]=S,e[22]=v):(S=e[21],v=e[22]);let y;e[23]!==a?(y=a("publicKeyMaterial"),e[23]=a,e[24]=y):y=e[24];let d;e[25]!==y?(d=t.jsx(U,{id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...y}),e[25]=y,e[26]=d):d=e[26];let f;e[27]!==i.publicKeyMaterial?(f=i.publicKeyMaterial&&t.jsx("p",{className:"text-destructive text-sm",children:i.publicKeyMaterial.message}),e[27]=i.publicKeyMaterial,e[28]=f):f=e[28];let u;e[29]!==d||e[30]!==f?(u=t.jsxs("div",{className:"space-y-2",children:[S,v,d,f]}),e[29]=d,e[30]=f,e[31]=u):u=e[31];const E=M||s.isPending;let x;e[32]!==r?(x=()=>r({to:"/ec2/describe-key-pairs"}),e[32]=r,e[33]=x):x=e[33];let b;e[34]!==E||e[35]!==x?(b=t.jsx(w,{disabled:E,onClick:x,type:"button",variant:"outline",children:"Cancel"}),e[34]=E,e[35]=x,e[36]=b):b=e[36];const F=M||s.isPending,C=M||s.isPending?"Importing…":"Import Key Pair";let h;e[37]!==F||e[38]!==C?(h=t.jsx(w,{disabled:F,type:"submit",children:C}),e[37]=F,e[38]=C,e[39]=h):h=e[39];let j;e[40]!==b||e[41]!==h?(j=t.jsxs("div",{className:"flex gap-2",children:[b,h]}),e[40]=b,e[41]=h,e[42]=j):j=e[42];let k;e[43]!==p||e[44]!==u||e[45]!==j||e[46]!==o?(k=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,j]}),e[43]=p,e[44]=u,e[45]=j,e[46]=o,e[47]=k):k=e[47];let B;return e[48]!==k||e[49]!==l?(B=t.jsxs(t.Fragment,{children:[A,K,l,k]}),e[48]=k,e[49]=l,e[50]=B):B=e[50],B}export{re as component}; +import{c as O,u as $,j as t,i as q,B as H}from"./index.js";import{a as G,u as J,I as U,F as Q,b as R,c as z}from"./field.js";import{B as V}from"./back-link.js";import{E as W}from"./error-banner.js";import{P as X}from"./page-heading.js";import{T as Y}from"./textarea.js";import{u as Z}from"./ec2.js";import"./useMutation.js";function ce(){const e=O.c(53),s=$(),i=Z();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:G(q)},e[0]=g):g=e[0];const{handleSubmit:_,register:l,formState:D}=J(g),{errors:r,isSubmitting:M}=D;let A;e[1]!==i||e[2]!==s?(A=async L=>{await i.mutateAsync(L),s({to:"/ec2/describe-key-pairs"})},e[1]=i,e[2]=s,e[3]=A):A=e[3];const v=A;let K,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(V,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),N=t.jsx(X,{title:"Import Key Pair"}),e[4]=K,e[5]=N):(K=e[4],N=e[5]);let a;e[6]!==i.error?(a=i.error&&t.jsx(W,{error:i.error,msg:"Failed to import key pair"}),e[6]=i.error,e[7]=a):a=e[7];let o;e[8]!==_||e[9]!==v?(o=_(v),e[8]=_,e[9]=v,e[10]=o):o=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{children:t.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[11]=P):P=e[11];const I=!!r.keyName;let c;e[12]!==l?(c=l("keyName"),e[12]=l,e[13]=c):c=e[13];let n;e[14]!==I||e[15]!==c?(n=t.jsx(U,{"aria-invalid":I,id:"keyName",placeholder:"my-key-pair…",...c}),e[14]=I,e[15]=c,e[16]=n):n=e[16];let m;e[17]!==r.keyName?(m=t.jsx(Q,{errors:[r.keyName]}),e[17]=r.keyName,e[18]=m):m=e[18];let p;e[19]!==n||e[20]!==m?(p=t.jsxs(z,{children:[P,n,m]}),e[19]=n,e[20]=m,e[21]=p):p=e[21];let S,B;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(R,{children:t.jsx("label",{htmlFor:"publicKeyMaterial",children:"Public Key"})}),B=t.jsx("p",{className:"text-muted-foreground text-xs",id:"publicKey-description",children:"Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)"}),e[22]=S,e[23]=B):(S=e[22],B=e[23]);const E=!!r.publicKeyMaterial;let d;e[24]!==l?(d=l("publicKeyMaterial"),e[24]=l,e[25]=d):d=e[25];let y;e[26]!==E||e[27]!==d?(y=t.jsx(Y,{"aria-invalid":E,id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...d}),e[26]=E,e[27]=d,e[28]=y):y=e[28];let f;e[29]!==r.publicKeyMaterial?(f=t.jsx(Q,{errors:[r.publicKeyMaterial]}),e[29]=r.publicKeyMaterial,e[30]=f):f=e[30];let u;e[31]!==y||e[32]!==f?(u=t.jsxs(z,{children:[S,B,y,f]}),e[31]=y,e[32]=f,e[33]=u):u=e[33];const C=M||i.isPending;let x;e[34]!==s?(x=()=>s({to:"/ec2/describe-key-pairs"}),e[34]=s,e[35]=x):x=e[35];let b;e[36]!==C||e[37]!==x?(b=t.jsx(H,{disabled:C,onClick:x,type:"button",variant:"outline",children:"Cancel"}),e[36]=C,e[37]=x,e[38]=b):b=e[38];const w=M||i.isPending,T=M||i.isPending?"Importing…":"Import Key Pair";let h;e[39]!==w||e[40]!==T?(h=t.jsx(H,{disabled:w,type:"submit",children:T}),e[39]=w,e[40]=T,e[41]=h):h=e[41];let j;e[42]!==b||e[43]!==h?(j=t.jsxs("div",{className:"flex gap-2",children:[b,h]}),e[42]=b,e[43]=h,e[44]=j):j=e[44];let k;e[45]!==p||e[46]!==u||e[47]!==j||e[48]!==o?(k=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,j]}),e[45]=p,e[46]=u,e[47]=j,e[48]=o,e[49]=k):k=e[49];let F;return e[50]!==k||e[51]!==a?(F=t.jsxs(t.Fragment,{children:[K,N,a,k]}),e[50]=k,e[51]=a,e[52]=F):F=e[52],F}export{ce as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index.js b/hive/services/hiveui/frontend/dist/assets/index.js index 425b2b8b2..a2494eddc 100644 --- a/hive/services/hiveui/frontend/dist/assets/index.js +++ b/hive/services/hiveui/frontend/dist/assets/index.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/zod.js","assets/index3.js","assets/useSuspenseQuery.js","assets/page-heading.js","assets/index4.js","assets/list-card.js","assets/import-key-pair.js","assets/back-link.js","assets/error-banner.js","assets/textarea.js","assets/ec2.js","assets/useMutation.js","assets/create-key-pair.js","assets/alert-dialog.js","assets/check.js","assets/download.js","assets/run-instances.js","assets/index5.js","assets/upload-button.js","assets/trash-2.js","assets/index6.js","assets/badge.js","assets/index7.js","assets/index8.js","assets/state-badge.js","assets/index9.js","assets/_.js","assets/_id.js","assets/_id2.js","assets/detail-row.js","assets/_id3.js","assets/_id4.js","assets/ami-details.js","assets/_id5.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/field.js","assets/index3.js","assets/useSuspenseQuery.js","assets/page-heading.js","assets/index4.js","assets/list-card.js","assets/import-key-pair.js","assets/back-link.js","assets/error-banner.js","assets/textarea.js","assets/ec2.js","assets/useMutation.js","assets/create-key-pair.js","assets/alert-dialog.js","assets/check.js","assets/download.js","assets/run-instances.js","assets/index5.js","assets/upload-button.js","assets/trash-2.js","assets/index6.js","assets/badge.js","assets/index7.js","assets/index8.js","assets/state-badge.js","assets/index9.js","assets/_.js","assets/_id.js","assets/_id2.js","assets/detail-row.js","assets/_id3.js","assets/_id4.js","assets/ami-details.js","assets/_id5.js"])))=>i.map(i=>d[i]); function cL(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();var c0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l0e(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ty={exports:{}},Cu={};var P1;function lL(){if(P1)return Cu;P1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:c}}return Cu.Fragment=t,Cu.jsx=n,Cu.jsxs=n,Cu}var N1;function uL(){return N1||(N1=1,Ty.exports=lL()),Ty.exports}var $=uL(),xp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dL=class{#e=fL;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Y0=new dL;function hL(e){setTimeout(e,0)}var Rp=typeof window>"u"||"Deno"in globalThis;function br(){}function pL(e,t){return typeof e=="function"?e(t):e}function mL(e){return typeof e=="number"&&e>=0&&e!==1/0}function gL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function X0(e,t){return typeof e=="function"?e(t):e}function yL(e,t){return typeof e=="function"?e(t):e}function z1(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==Nv(l,t.options))return!1}else if(!ef(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||i&&i!==t.state.fetchStatus||c&&!c(t))}function L1(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(Ju(t.options.mutationKey)!==Ju(c))return!1}else if(!ef(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Nv(e,t){return(t?.queryKeyHashFn||Ju)(e)}function Ju(e){return JSON.stringify(e,(t,n)=>W0(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ef(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ef(e[n],t[n])):!1}var vL=Object.prototype.hasOwnProperty;function GA(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=B1(e)&&B1(t);if(!r&&!(W0(e)&&W0(t)))return t;const c=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),f=l.length,d=r?new Array(f):{};let h=0;for(let y=0;y{Y0.setTimeout(t,e)})}function SL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?GA(e,t):t}function _L(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function wL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zv=Symbol();function KA(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===zv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function f0e(e,t){return typeof e=="function"?e(...t):!!e}function EL(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var xL=class extends xp{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!Rp&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ZA=new xL;function RL(){let e,t;const n=new Promise((i,c)=>{e=i,t=c});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var CL=hL;function TL(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=CL;const c=f=>{t?e.push(f):i(()=>{n(f)})},l=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||l()}return d},batchCalls:f=>(...d)=>{c(()=>{f(...d)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{i=f}}}var ss=TL(),AL=class extends xp{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!Rp&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Uh=new AL;function IL(e){return Math.min(1e3*2**e,3e4)}function QA(e){return(e??"online")==="online"?Uh.isOnline():!0}var J0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function YA(e){let t=!1,n=0,r;const i=RL(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new J0(x);v(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>ZA.isFocused()&&(e.networkMode==="always"||Uh.isOnline())&&e.canRun(),y=()=>QA(e.networkMode)&&e.canRun(),g=x=>{c()||(r?.(),i.resolve(x))},v=x=>{c()||(r?.(),i.reject(x))},b=()=>new Promise(x=>{r=R=>{(c()||h())&&x(R)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let x;const R=n===0?e.initialPromise:void 0;try{x=R??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(g).catch(C=>{if(c())return;const A=e.retry??(Rp?0:3),O=e.retryDelay??IL,D=typeof O=="function"?O(n,C):O,N=A===!0||typeof A=="number"&&nh()?void 0:b()).then(()=>{t?v(C):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?_():b().then(_),i)}}var XA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mL(this.gcTime)&&(this.#e=Y0.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Y0.clearTimeout(this.#e),this.#e=void 0)}},OL=class extends XA{#e;#n;#t;#r;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#t=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=j1(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=j1(this.options);t.data!==void 0&&(this.setState(U1(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=SL(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>yL(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>X0(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!gL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const f=KA(this.options,t),h=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#a=!1,this.options.persister?this.options.persister(f,h,this):f(h)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(f),f})();this.options.behavior?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=YA({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof J0&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(f,d)=>{this.#o({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const f=await this.#s.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof J0){if(f.silent)return this.#s.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...ML(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...U1(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),ss.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function ML(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:QA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function U1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function j1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function H1(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let y=!1;const g=_=>{EL(_,()=>t.signal,()=>y=!0)},v=KA(t.options,t.fetchOptions),b=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(j),j})(),O=await v(A),{maxPages:D}=t.options,N=R?wL:_L;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?DL:F1,R={pages:c,pageParams:l},C=x(r,R);f=await b(R,C,_)}else{const _=e??c.length;do{const x=d===0?l[0]??r.initialPageParam:F1(r,f);if(d>0&&x==null)break;f=await b(f,x),d++}while(d<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function F1(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function DL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var kL=class extends XA{#e;#n;#t;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||PL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=YA({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(c,l)=>{this.#s({type:"failed",failureCount:c,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:i}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#s({type:"pending",context:l,variables:e,isPaused:i})}const c=await this.#r.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,n),await this.options.onSuccess?.(c,e,this.state.context,n),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(c,null,e,this.state.context,n),this.#s({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(c,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#s({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ss.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function PL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var NL=class extends xp{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,n){const r=new kL({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ih(e);if(typeof t=="string"){const n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ih(e);if(typeof t=="string"){const n=this.#n.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ih(e);if(typeof t=="string"){const r=this.#n.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ih(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ss.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>L1(t,n))}findAll(e={}){return this.getAll().filter(t=>L1(e,t))}notify(e){ss.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ss.batch(()=>Promise.all(e.map(t=>t.continue().catch(br))))}};function ih(e){return e.options.scope?.id}var zL=class extends xp{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Nv(r,t);let c=this.get(i);return c||(c=new OL({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ss.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>z1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>z1(e,n)):t}notify(e){ss.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ss.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ss.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},LL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new zL,this.#n=e.mutationCache||new NL,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=ZA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Uh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const 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(X0(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(r.queryHash)?.state.data,l=pL(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ss.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;ss.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return ss.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ss.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(br).catch(br)}invalidateQueries(e,t={}){return ss.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ss.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let c=i.fetch(void 0,n);return n.throwOnError||(c=c.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(X0(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=H1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=H1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Uh.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#r.set(Ju(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{ef(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(Ju(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{ef(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Nv(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===zv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Ay={exports:{}},Ge={};var V1;function BL(){if(V1)return Ge;V1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,R={};function C(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}C.prototype.isReactComponent={},C.prototype.setState=function(P,ne){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,ne,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}var D=O.prototype=new A;D.constructor=O,x(D,C.prototype),D.isPureReactComponent=!0;var N=Array.isArray;function j(){}var B={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function Z(P,ne,ie){var de=ie.ref;return{$$typeof:e,type:P,key:ne,ref:de!==void 0?de:null,props:ie}}function se(P,ne){return Z(P.type,ne,P.props)}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function K(P){var ne={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ie){return ne[ie]})}var Q=/\/+/g;function ye(P,ne){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):ne.toString(36)}function fe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(j,j):(P.status="pending",P.then(function(ne){P.status==="pending"&&(P.status="fulfilled",P.value=ne)},function(ne){P.status==="pending"&&(P.status="rejected",P.reason=ne)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,ne,ie,de,Ce){var Se=typeof P;(Se==="undefined"||Se==="boolean")&&(P=null);var be=!1;if(P===null)be=!0;else switch(Se){case"bigint":case"string":case"number":be=!0;break;case"object":switch(P.$$typeof){case e:case t:be=!0;break;case y:return be=P._init,q(be(P._payload),ne,ie,de,Ce)}}if(be)return Ce=Ce(P),be=de===""?"."+ye(P,0):de,N(Ce)?(ie="",be!=null&&(ie=be.replace(Q,"$&/")+"/"),q(Ce,ne,ie,"",function(ht){return ht})):Ce!=null&&(le(Ce)&&(Ce=se(Ce,ie+(Ce.key==null||P&&P.key===Ce.key?"":(""+Ce.key).replace(Q,"$&/")+"/")+be)),ne.push(Ce)),1;be=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(WA);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$L=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(WA.Provider,{value:e,children:t}));const ev=new WeakMap,UL=new WeakMap,jh={current:[]};let Iy=!1,ju=0;const Lu=new Set,ah=new Map;function eI(e){for(const t of e){if(jh.current.includes(t))continue;jh.current.push(t),t.recompute();const n=UL.get(t);if(n)for(const r of n){const i=ev.get(r);i?.length&&eI(i)}}}function jL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function HL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function tI(e){if(ju>0&&!ah.has(e)&&ah.set(e,e.prevState),Lu.add(e),!(ju>0)&&!Iy)try{for(Iy=!0;Lu.size>0;){const t=Array.from(Lu);Lu.clear();for(const n of t){const r=ah.get(n)??n.prevState;n.prevState=r,jL(n)}for(const n of t){const r=ev.get(n);r&&(jh.current.push(n),eI(r))}for(const n of t){const r=ev.get(n);if(r)for(const i of r)HL(i)}}}finally{Iy=!1,jh.current=[],ah.clear()}}function Hu(e){ju++;try{e()}finally{if(ju--,ju===0){const t=Lu.values().next().value;t&&tI(t)}}}function FL(e){return typeof e=="function"}let VL=class{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,c;this.listeners.add(r);const l=(c=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:c.call(i,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):FL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),tI(this)}};const Ri="__TSR_index",G1="popstate",K1="beforeunload";function qL(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(f=>f({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},c=async({task:l,navigateOpts:f,...d})=>{if(f?.ignoreBlocker??!1){l();return}const y=e.getBlockers?.()??[],g=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const v of y){const b=Hh(d.path,d.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,f,d)=>{const h=t.state[Ri];f=Z1(h+1,f),c({task:()=>{e.pushState(l,f),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:f})},replace:(l,f,d)=>{const h=t.state[Ri];f=Z1(h,f),c({task:()=>{e.replaceState(l,f),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:f})},go:(l,f)=>{c({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:f,type:"GO"})},back:l=>{c({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{c({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ri]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Z1(e,t){t||(t={});const n=Bv();return{...t,key:n,__TSR_key:n,[Ri]:e}}function GL(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const c=()=>i,l=k=>i=k,f=(k=>k),d=(()=>Hh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=Bv();t.history.replaceState({[Ri]:0,key:k,__TSR_key:k},"")}let h=d(),y,g=!1,v=!1,b=!1,_=!1;const x=()=>h;let R,C;const A=()=>{R&&(B._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),B._ignoreSubscribers=!1,R=void 0,C=void 0,y=void 0)},O=(k,Z,se)=>{const le=f(Z);C||(y=h),h=Hh(Z,se),R={href:le,state:se,isPush:R?.isPush||k==="push"},C||(C=Promise.resolve().then(()=>A()))},D=k=>{h=d(),B.notify({type:k})},N=async()=>{if(v){v=!1;return}const k=d(),Z=k.state[Ri]-h.state[Ri],se=Z===1,le=Z===-1,K=!se&&!le||g;g=!1;const Q=K?"GO":le?"BACK":"FORWARD",ye=K?{type:"GO",index:Z}:{type:le?"BACK":"FORWARD"};if(b)b=!1;else{const fe=c();if(typeof document<"u"&&fe.length){for(const q of fe)if(await q.blockerFn({currentLocation:h,nextLocation:k,action:Q})){v=!0,t.history.go(1),B.notify(ye);return}}}h=d(),B.notify(ye)},j=k=>{if(_){_=!1;return}let Z=!1;const se=c();if(typeof document<"u"&&se.length)for(const le of se){const K=le.enableBeforeUnload??!0;if(K===!0){Z=!0;break}if(typeof K=="function"&&K()===!0){Z=!0;break}}if(Z)return k.preventDefault(),k.returnValue=""},B=qL({getLocation:x,getLength:()=>t.history.length,pushState:(k,Z)=>O("push",k,Z),replaceState:(k,Z)=>O("replace",k,Z),back:k=>(k&&(b=!0),_=!0,t.history.back()),forward:k=>{k&&(b=!0),_=!0,t.history.forward()},go:k=>{g=!0,t.history.go(k)},createHref:k=>f(k),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(K1,j,{capture:!0}),t.removeEventListener(G1,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(K1,j,{capture:!0}),t.addEventListener(G1,N),t.history.pushState=function(...k){const Z=n.apply(t.history,k);return B._ignoreSubscribers||D("PUSH"),Z},t.history.replaceState=function(...k){const Z=r.apply(t.history,k);return B._ignoreSubscribers||D("REPLACE"),Z},B}function KL(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Hh(e,t){const n=KL(e),r=n.indexOf("#"),i=n.indexOf("?"),c=Bv();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||{[Ri]:0,key:c,__TSR_key:c}}}function Bv(){return(Math.random()+1).toString(36).substring(7)}const ZL=!1;function tf(e){return e[e.length-1]}function QL(e){return typeof e=="function"}function Si(e,t){return QL(e)?e(t):e}const YL=Object.prototype.hasOwnProperty,Q1=Object.prototype.propertyIsEnumerable;function er(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=W1(e)&&W1(r);if(!i&&!(Fh(e)&&Fh(r)))return r;const c=i?e:Y1(e);if(!c)return r;const l=i?r:Y1(r);if(!l)return r;const f=c.length,d=l.length,h=i?new Array(d):{};let y=0;for(let g=0;g"u")return!0;const n=t.prototype;return!(!X1(n)||!n.hasOwnProperty("isPrototypeOf"))}function X1(e){return Object.prototype.toString.call(e)==="[object Object]"}function W1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ea(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;ri||!Ea(e[l],t[l],n)))return!1;return i===c}return!1}function Wc(e){let t,n;const r=new Promise((i,c)=>{t=i,n=c});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function XL(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Fc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function WL(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function J1(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return WL(t)}const nI=["http:","https:","mailto:","tel:"];function Vh(e){if(!e)return!1;try{const t=new URL(e);return!nI.includes(t.protocol)}catch{return!1}}const JL={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},e6=/[&><\u2028\u2029]/g;function t6(e){return e.replace(e6,t=>JL[t])}function Oy(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=J1(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+J1(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function n6(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var s6="Invariant failed";function go(e,t){if(!e)throw new Error(s6)}function qh(e){const t=new Map;let n,r;const i=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,r&&(r.next=c,c.prev=r)):(c.next.prev=void 0,n=c.next,c.next=void 0,r&&(c.prev=r,r.next=c)),r=c)};return{get(c){const l=t.get(c);if(l)return i(l),l.value},set(c,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const f=t.get(c);if(f)f.value=l,i(f);else{const d={key:c,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(c,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const Jc=0,Aa=1,Ia=2,nf=3,ba=4,sI=5;function r6(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function $v(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,c=e.substring(t,i);if(!c||!c.includes("$"))return n[0]=Jc,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(c==="$"){const f=e.length;return n[0]=Ia,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=Aa,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=r6(c);if(l){const[f,d]=l,h=c.charCodeAt(f+1);if(h===45){if(f+2!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if(B)_=B;else{const k=Dy(Aa,n.fullPath??n.from,D,N,j);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case nf:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,B=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if(B)_=B;else{const k=Dy(nf,n.fullPath??n.from,D,N,j);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case Ia:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,B=Dy(Ia,n.fullPath??n.from,D,N,j);_=B,B.parent=i,B.depth=c,i.wildcard??=[],i.wildcard.push(B)}}i=_}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=Sa(n.fullPath??n.from);b.kind=sI,b.parent=i,c++,b.depth=c,i.pathless??=[],i.pathless.push(b),i=b}const v=(n.path||!n.children)&&!n.isRoot;if(v&&d.endsWith("/")){const b=Sa(n.fullPath??n.from);b.kind=ba,b.parent=i,c++,b.depth=c,i.index=b,i=b}i.parse=n.options?.params?.parse??null,i.skipOnParamError=g,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,v&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Cp(e,t,d,f,i,c,l)}function My(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function vi(e){if(e.pathless)for(const t of e.pathless)vi(t);if(e.static)for(const t of e.static.values())vi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())vi(t);if(e.dynamic?.length){e.dynamic.sort(My);for(const t of e.dynamic)vi(t)}if(e.optional?.length){e.optional.sort(My);for(const t of e.optional)vi(t)}if(e.wildcard?.length){e.wildcard.sort(My);for(const t of e.wildcard)vi(t)}}function Sa(e){return{kind:Jc,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Dy(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function o6(e,t){const n=Sa("/"),r=new Uint16Array(6);for(const i of e)Cp(!1,r,i,1,n,0);vi(n),t.masksTree=n,t.flatCache=qh(1e3)}function i6(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Uv(e,t.masksTree);return t.flatCache.set(e,r),r}function a6(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=Sa("/");const f=new Uint16Array(6);Cp(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return Uv(r,l,n)}function c6(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||="/";let c;try{c=Uv(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=f6(c.route)),t.matchCache.set(r,c),c}function l6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function u6(e,t=!1,n){const r=Sa(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Cp(t,i,e,1,r,0,h=>{if(n?.(h,f),go(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=l6(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),vi(r),{processedTree:{segmentTree:r,singleCache:qh(1e3),matchCache:qh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function Uv(e,t,n=!1){const r=e.split("/"),i=h6(e,r,t,n);if(!i)return null;const[c]=rI(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function rI(e,t,n){const r=d6(n.node);let i=null;const c={};let l=n.extract?.part??0,f=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;f=0;le--){const K=v.optional[le];f.push({node:K,index:b,skipped:Z,depth:se,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j)for(let le=v.optional.length-1;le>=0;le--){const K=v.optional[le],{prefix:Q,suffix:ye}=K;if(Q||ye){const fe=K.caseSensitive?B:k??=B.toLowerCase();if(Q&&!fe.startsWith(Q)||ye&&!fe.endsWith(ye))continue}f.push({node:K,index:b+1,skipped:_,depth:se,statics:R,dynamics:C,optionals:A+1,extract:O,rawParams:D,parsedParams:N})}}if(!j&&v.dynamic&&B)for(let Z=v.dynamic.length-1;Z>=0;Z--){const se=v.dynamic[Z],{prefix:le,suffix:K}=se;if(le||K){const Q=se.caseSensitive?B:k??=B.toLowerCase();if(le&&!Q.startsWith(le)||K&&!Q.endsWith(K))continue}f.push({node:se,index:b+1,skipped:_,depth:x+1,statics:R,dynamics:C+1,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.staticInsensitive){const Z=v.staticInsensitive.get(k??=B.toLowerCase());Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.static){const Z=v.static.get(B);Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(v.pathless){const Z=x+1;for(let se=v.pathless.length-1;se>=0;se--){const le=v.pathless[se];f.push({node:le,index:b,skipped:_,depth:Z,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}}}if(y&&d)return Tu(d,y)?y:d;if(y)return y;if(d)return d;if(r&&h){let g=h.index;for(let b=0;be.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ba)>(e.node.kind===ba)||t.node.kind===ba==(e.node.kind===ba)&&t.depth>e.depth))):!0}function Ih(e){return jv(e.filter(t=>t!==void 0).join("/"))}function jv(e){return e.replace(/\/{2,}/g,"/")}function oI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ho(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function iI(e){return ho(oI(e))}function Gh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function p6(e,t,n){return Gh(e,n)===Gh(t,n)}function m6({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),c=!i&&t===".";let l;if(r){l=i?t:c?e:e+"\0"+t;const g=r.get(l);if(g)return g}let f;if(c)f=e.split("/");else if(i)f=t.split("/");else{for(f=e.split("/");f.length>1&&tf(f)==="";)f.pop();const g=t.split("/");for(let v=0,b=g.length;v1&&(tf(f)===""?n==="never"&&f.pop():n==="always"&&f.push(""));let d,h="";for(let g=0;g0&&(h+="/");const v=f[g];if(!v)continue;d=$v(v,0,d);const b=d[0];if(b===Jc){h+=v;continue}const _=d[5],x=v.substring(0,d[1]),R=v.substring(d[4],_),C=v.substring(d[2],d[3]);b===Aa?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:b===Ia?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=jv(h);const y=h||"/";return l&&r&&r.set(l,y),y}function g6(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,c=>t.get(c)??c)}function Py(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):y6(r,n)}function Ny({path:e,params:t,decoder:n}){let r=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:r};const c=e.length;let l=0,f,d="";for(;l{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function S6(){const e=v6();if(!e)return null;const t=e.getItem(tv);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=Si(r,n)||n;try{e.setItem(tv,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const ch=S6(),_6=e=>e.state.__TSR_key||e.href;function w6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Kh=!1;function E6({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:c}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const f=t||window.history.state?.__TSR_key,d=l[f];Kh=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const g in d){const v=d[g];if(g==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(g){const b=document.querySelector(g);b&&(b.scrollLeft=v.scrollX,b.scrollTop=v.scrollY)}}break e}const h=(c??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const v=document.getElementById(h);v&&v.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:n};if(window.scrollTo(y),i)for(const g of i){if(g==="window")continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(y)}}Kh=!1}function x6(e,t){if(!ch||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!ch))return;e.isScrollRestorationSetup=!0,Kh=!1;const r=e.options.getScrollRestorationKey||_6;window.history.scrollRestoration="manual";const i=c=>{if(Kh||!e.isScrollRestoring)return;let l="";if(c.target===document||c.target===window)l="window";else{const d=c.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=w6(c.target)}const f=r(e.state.location);ch.set(d=>{const h=d[f]||={},y=h[l]||={};if(l==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(l){const g=document.querySelector(l);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",b6(i,100),!0),e.subscribe("onRendered",c=>{const l=r(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(E6({storageKey:tv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ch.set(f=>(f[l]||={},f)))})}function R6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function C6(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function zy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function T6(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=zy(i):Array.isArray(c)?c.push(zy(i)):n[r]=[c,zy(i)]}return n}const A6=O6(JSON.parse),I6=M6(JSON.stringify,JSON.parse);function O6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=T6(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function M6(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const c=C6(i,r);return c?`?${c}`:""}}const sr="__root__";function Hv(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&Vh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${nI.join(", ")} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ir(e){return e instanceof Response&&!!e.options}const Oh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Tp=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Vc=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let c=0;c<=i;c++){const l=e.matches[c];if(!l)continue;const f=e.router.getMatch(l.id);f&&Object.assign(r,f.__routeContext,f.__beforeLoadContext)}return r},aI=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),go(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);go(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,aI(e,t))},_i=(e,t,n)=>{if(!(!ir(n)&&!ks(n))){if(ir(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ir(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:Vc(e,t.index),isFetching:!1,error:n})),ks(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ir(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(aI(e,n),n)}},cI=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Au=(e,t,n,r)=>{const{id:i,routeId:c}=e.matches[t],l=e.router.looseRoutesById[c];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,_i(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,_i(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},lI=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Tp(e,t)&&(n.options.loader||n.options.beforeLoad||dI(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Oh(e)},i);r._nonReactive.pendingTimeout=l}},D6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;lI(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&_i(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},k6=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Wc(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Au(e,n,l,"PARSE_PARAMS"),f&&Au(e,n,f,"VALIDATE_SEARCH"),lI(e,t,r,i);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let g=!1;const v=()=>{g||(g=!0,e.updateMatch(t,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:d})))},b=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,j=>({...j,isFetching:!1}))};if(!r.options.beforeLoad){Hu(()=>{v(),b()});return}i._nonReactive.beforeLoadPromise=Wc();const _={...Vc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=Tp(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:j=>e.router.navigate({...j,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=j=>{if(j===void 0){Hu(()=>{v(),b()});return}(ir(j)||ks(j))&&(v(),Au(e,n,j,"BEFORE_LOAD")),Hu(()=>{v(),e.updateMatch(t,B=>({...B,__beforeLoadContext:j})),b()})};let N;try{if(N=r.options.beforeLoad(O),Fc(N))return v(),N.catch(j=>{Au(e,n,j,"BEFORE_LOAD")}).then(D)}catch(j){v(),Au(e,n,j,"BEFORE_LOAD")}D(N)},P6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>k6(e,n,t,i),f=()=>{if(cI(e,n))return;const d=D6(e,n,i);return Fc(d)?d.then(l):l()};return c()},N6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([c,l,f])=>{const d=c?.meta,h=c?.links,y=c?.scripts,g=c?.styles;return{meta:d,links:h,headScripts:y,headers:f,scripts:l,styles:g}})},uI=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=Vc(e,n),y=Tp(e,t);return{params:c,deps:l,preload:!!y,parentMatchPromise:i,abortController:f,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":d,route:r,...e.router.options.additionalContext}},eR=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(ZL??e.router.isServer)||i.ssr===!0)&&fI(r);const c=r.options.loader?.(uI(e,t,n,r)),l=r.options.loader&&Fc(c);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=l?await c:c;_i(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,y=>({...y,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=i._nonReactive.minPendingPromise;d&&await d,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:Vc(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let l=c;if(l?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Vc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,ks(c)&&await r.options.notFoundComponent?.preload?.(),_i(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,_i(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:Vc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),_i(e,c,i)}},z6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!cI(e,n)){const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const y=e.router.getMatch(n),g=y._nonReactive.error||y.error;g&&_i(e,y,g)}else{const y=Date.now()-h.updatedAt,g=Tp(e,n),v=g?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,b=l.options.shouldReload,_=typeof b=="function"?b(uI(e,n,t,l)):b,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Wc(),x!==R.preload&&e.updateMatch(n,O=>({...O,preload:x}));const{status:C,invalid:A}=R;i=C==="success"&&(A||(_??y>v)),g&&l.options.preload===!1||(i&&!e.sync?(c=!0,(async()=>{try{await eR(e,n,t,l);const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){ir(O)&&await e.router.navigate(O.options)}})()):(C!=="success"||i&&e.sync)&&await eR(e,n,t,l))}}const f=e.router.getMatch(n);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const d=c?f.isFetching:!1;return d!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):f};async function tR(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Oh(t);try{for(let f=0;ff.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(ir(f))throw f;!c&&ks(f)&&(c=f)}for(const f of t.matches){const{id:d,routeId:h}=f,y=t.router.looseRoutesById[h];try{const g=N6(t,d,y);if(g){const v=await g;t.updateMatch(d,b=>({...b,...v}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(c)throw c;const l=Oh(t);Fc(l)&&await l}catch(n){if(ks(n)&&!t.preload){const r=Oh(t);throw Fc(r)&&await r,n}if(ir(n))throw n}return t.matches}async function fI(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of hI){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function dI(e){for(const t of hI)if(e.options[t]?.preload)return!0;return!1}const hI=["component","errorComponent","pendingComponent","notFoundComponent"];function L6(e){return{input:({url:t})=>{for(const n of e)t=nv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=pI(e[n],t);return t}}}function B6(e){const t=iI(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),c=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const f=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return f===i?l.pathname="/":f.startsWith(c)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Ih(["/",t,l.pathname]),l)}}function nv(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function pI(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function xa(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,c=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:c}}class $6{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",c=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=g6(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=GL()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=qh(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=new VL(j6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),x6(this));let f=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(c||i!==d||l!==h){this.basepath=d;const v=[],b=iI(d);b&&b!=="/"&&v.push(B6({basepath:d})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:L6(v),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=u6(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&o6(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:h})=>{const y=new URL(d,this.origin),g=nv(this.rewrite,y),v=this.options.parseSearch(g.search),b=this.options.stringifySearch(v);return g.search=b,{href:g.href.replace(g.origin,""),publicHref:d,pathname:Oy(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:b,search:er(r?.search,v),hash:Oy(g.hash.split("#").reverse()[0]??""),state:er(r?.state,h)}},c=i(n),{__tempLocation:l,__tempKey:f}=c.state;if(l&&(!f||f===this.tempLocationKey)){const d=i(l);return d.state.key=c.state.key,d.state.__TSR_key=c.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:c}}return c},this.resolvePathWithBase=(n,r)=>m6({base:n,to:jv(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>H6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(c=>c.status==="pending"),r=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=n=>{const r=(c={})=>{const l=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(l);c.from;const d=c.unsafeRelative==="path"?l.pathname:c.from??f.fullPath,h=this.resolvePathWithBase(d,"."),y=f.search,g={...f.params},v=c.to?this.resolvePathWithBase(h,`${c.to}`):this.resolvePathWithBase(h,"."),b=c.params===!1||c.params===null?{}:(c.params??!0)===!0?g:Object.assign(g,Si(c.params,g)),_=Ny({path:v,params:b}).interpolatedPath,x=this.getMatchedRoutes(_);let R=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:ho(_))&&(this.options.notFoundRoute?R=[...R,this.options.notFoundRoute]:nR(this.options.notFoundMode,R)),Object.keys(b).length>0)for(const K of R){const Q=K.options.params?.stringify??K.options.stringifyParams;Q&&Object.assign(b,Q(b))}const A=n.leaveParams?v:Oy(Ny({path:v,params:b,decoder:this.pathParamsDecoder}).interpolatedPath);let O=y;if(n._includeValidateSearch&&this.options.search?.strict){const K={};R.forEach(Q=>{if(Q.options.validateSearch)try{Object.assign(K,Mh(Q.options.validateSearch,{...K,...O}))}catch{}}),O=K}O=F6({search:O,dest:c,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),O=er(y,O);const D=this.options.stringifySearch(O),N=c.hash===!0?l.hash:c.hash?Si(c.hash,l.hash):void 0,j=N?`#${N}`:"";let B=c.state===!0?l.state:c.state?Si(c.state,l.state):{};B=er(l.state,B);const k=`${A}${D}${j}`;let Z,se,le=!1;if(this.rewrite){const K=new URL(k,this.origin),Q=pI(this.rewrite,K);Z=K.href.replace(K.origin,""),Q.origin!==this.origin?(se=Q.href,le=!0):se=Q.pathname+Q.search+Q.hash}else Z=n6(k),se=Z;return{publicHref:se,href:Z,pathname:A,search:O,searchStr:D,state:B,hash:N??"",external:le,unmaskOnReload:c.unmaskOnReload}},i=(c={},l)=>{const f=r(c);let d=l?r(l):void 0;if(!d){const h={};if(this.options.routeMasks){const y=i6(f.pathname,this.processedTree);if(y){Object.assign(h,y.rawParams);const{from:g,params:v,...b}=y.route,_=v===!1||v===null?{}:(v??!0)===!0?h:Object.assign(h,Si(v,h));l={from:n.from,...b,params:_},d=r(l)}}}return d&&(f.maskedLocation=d),f};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const c=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(y=>{i.state[y]=this.latestLocation.state[y]});const h=Ea(i.state,this.latestLocation.state);return d.forEach(y=>{delete i.state[y]}),h},l=ho(this.latestLocation.href)===ho(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Wc(()=>{f?.resolve()}),l&&c())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...y}=i;d&&(y={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:c,ignoreBlocker:l,href:f,...d}={})=>{if(f){const g=this.history.location.state.__TSR_index,v=Hh(f,{__TSR_index:n?g:g+1}),b=new URL(v.pathname,this.origin),_=nv(this.rewrite,b);d.to=_.pathname,d.search=this.options.parseSearch(v.search),d.hash=v.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const y=this.commitLocation({...h,viewTransition:c,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:c,...l})=>{let f=!1;if(i)try{new URL(`${i}`),f=!0}catch{}if(f&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...l});i=i??h.publicHref,c=c??h.publicHref}const d=!f&&c?c:i;if(Vh(d))return Promise.resolve();if(!l.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(c=>c.id===i.id))}))},this.load=async n=>{let r,i,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...xa({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...xa({resolvedLocation:h,location:d})}),await tR({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],v=[];Hu(()=>{this.__store.setState(b=>{const _=b.matches,x=b.pendingMatches||b.matches;return y=_.filter(R=>!x.some(C=>C.id===R.id)),g=x.filter(R=>!_.some(C=>C.id===R.id)),v=x.filter(R=>_.some(C=>C.id===R.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...y.filter(R=>R.status!=="error"&&R.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[v,"onStay"]].forEach(([b,_])=>{b.forEach(x=>{this.looseRoutesById[x.routeId].options[_]?.(x)})})})})}})}catch(d){ir(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ks(d)&&(i=d),this.__store.setState(h=>({...h,statusCode:r?r.status:i?404:h.matches.some(y=>y.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(f=>f.status==="error")&&(l=500),l!==void 0&&this.__store.setState(f=>({...f,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,l=this.state.resolvedLocation,f=typeof r.types=="function"?r.types(xa({resolvedLocation:l,location:c})):r.types;if(f===!1){n();return}i={update:n,types:f}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(c=>c.id===n)?"pendingMatches":this.state.matches.some(c=>c.id===n)?"matches":this.state.cachedMatches.some(c=>c.id===n)?"cachedMatches":"";i&&this.__store.setState(c=>({...c,[i]:c[i]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(n.options.href){if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const c=i.pathname+i.search+i.hash;n.options.href=c,n.headers.set("Location",c)}}catch{}}else{const i=this.buildLocation(n.options),c=this.getParsedLocationHref(i);n.options.href=c,n.headers.set("Location",c)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(c=>!r(c))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const c=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=c};this.clearCache({filter:n})},this.loadRouteChunk=fI,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),l=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);Hu(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await tR({router:this,matches:i,location:r,preload:!0,updateMatch:(f,d)=>{c.has(f)?i=i.map(h=>h.id===f?d(h):h):this.updateMatch(f,d)}}),i}catch(f){if(ir(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:r});ks(f)||console.error(f);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},c=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const f=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=a6(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!Ea(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ea(f.search,c.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??I6,parseSearch:t.parseSearch??A6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:c,parsedParams:l}=r;let{matchedRoutes:f}=r,d=!1;(i?i.path!=="/"&&c["**"]:ho(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const h=d?nR(this.options.notFoundMode,f):void 0,y=[],g=v=>v?.id?v.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((v,b)=>{const _=y[b-1],[x,R,C]=(()=>{const ye=_?.search??t.search,fe=_?._strictSearch??void 0;try{const q=Mh(v.options.validateSearch,{...ye})??void 0;return[{...ye,...q},{...fe,...q},void 0]}catch(q){let W=q;if(q instanceof Zh||(W=new Zh(q.message,{cause:q})),n?.throwOnError)throw W;return[ye,{},W]}})(),A=v.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=Ny({path:v.fullPath,params:c,decoder:this.pathParamsDecoder}),j=v.id+D+O,B=this.getMatch(j),k=this.state.matches.find(ye=>ye.routeId===v.id),Z=B?._strictParams??N;let se;if(!B)try{sR(v,N,l,Z)}catch(ye){if(ks(ye)||ir(ye)?se=ye:se=new U6(ye.message,{cause:ye}),n?.throwOnError)throw se}Object.assign(c,Z);const le=k?"stay":"enter";let K;if(B)K={...B,cause:le,params:k?er(k.params,c):c,_strictParams:Z,search:er(k?k.search:B.search,x),_strictSearch:R};else{const ye=v.options.loader||v.options.beforeLoad||v.lazyFn||dI(v)?"pending":"success";K={id:j,ssr:v.options.ssr,index:b,routeId:v.id,params:k?er(k.params,c):c,_strictParams:Z,pathname:D,updatedAt:Date.now(),search:k?er(k.search,x):x,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:se,__routeContext:void 0,_nonReactive:{loadPromise:Wc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:k?er(k.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}n?.preload||(K.globalNotFound=h===v.id),K.searchError=C;const Q=g(_);K.context={...Q,...K.__routeContext,...K.__beforeLoadContext},y.push(K)}),y.forEach((v,b)=>{const _=this.looseRoutesById[v.routeId];if(!this.getMatch(v.id)){const R=y[b-1],C=g(R);if(_.options.context){const A={deps:v.loaderDeps,params:v.params,context:C??{},location:t,navigate:O=>this.navigate({...O,_fromLocation:t}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:y};v.__routeContext=_.options.context(A)??void 0}v.context={...C,...v.__routeContext,...v.__beforeLoadContext}}}),y}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(t.pathname),c=tf(n),l={...t.search};for(const y of n)try{Object.assign(l,Mh(y.options.validateSearch,l))}catch{}const f=tf(this.state.matches),d=f&&f.routeId===c.id&&t.pathname===this.state.location.pathname;let h;if(d)h=f.params;else{const y={...r};for(const g of n)try{sR(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class Zh extends Error{}class U6 extends Error{}function j6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Mh(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Zh("Async validation not supported");if(n.issues)throw new Zh(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function H6({pathname:e,routesById:t,processedTree:n}){const r={},i=ho(e);let c,l;const f=c6(i,n,!0);return f&&(c=f.route,Object.assign(r,f.rawParams),l=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[sr]],routeParams:r,foundRoute:c,parsedParams:l}}function F6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return V6(n)(e,t,r??!1)}function V6(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const c=({search:l,next:f})=>{let d=l;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(d=i.options.preSearchFilters.reduce((y,g)=>g(y),l));const h=f(d);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((y,g)=>g(y),h):h};t.middlewares.push(c)}if(i.options.validateSearch){const c=({search:l,next:f})=>{const d=f(l);if(!t._includeValidateSearch)return d;try{return{...d,...Mh(i.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(c)}}const n=({search:i})=>{const c=t.dest;return c.search?c.search===!0?i:Si(c.search,i):{}};t.middlewares.push(n);const r=(i,c,l)=>{if(i>=l.length)return c;const f=l[i];return f({search:c,next:h=>r(i+1,h,l)})};return function(c,l,f){return t.dest=l,t._includeValidateSearch=f,r(0,c,t.middlewares)}}function nR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return sr}function sR(e,t,n,r){const i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const c in t)c in n&&(r[c]=n[c]);else{const c=i(r);Object.assign(r,c)}}const q6="Error preloading route! ☝️";class mI{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=sr:this.parentRoute||go(!1);let c=i?sr:r?.path;c&&c!=="/"&&(c=oI(c));const l=r?.id||c;let f=i?sr:Ih([this.parentRoute.id===sr?"":this.parentRoute.id,l]);c===sr&&(c="/"),f!==sr&&(f=Ih(["/",f]));const d=f===sr?"/":Ih([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=d,this._to=ho(d)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>Hv({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class G6 extends mI{constructor(t){super(t)}}const K6="use",rR=Lv[K6],lh=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Ly(e){const t=I.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Z6(e,t,n={},r={}){I.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([c])=>{t(c)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function Q6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Fv(e){const t=e.errorComponent??Vv;return $.jsx(Y6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class Y6 extends I.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Vv({error:e}){const[t,n]=I.useState(!1);return $.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[$.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),$.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),$.jsx("div",{style:{height:".25rem"}}),t?$.jsx("div",{children:$.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?$.jsx("code",{children:e.message}):null})}):null]})}function X6({children:e,fallback:t=null}){return gI()?$.jsx(Xc.Fragment,{children:e}):$.jsx(Xc.Fragment,{children:t})}function gI(){return Xc.useSyncExternalStore(W6,()=>!0,()=>!1)}function W6(){return()=>{}}var By={exports:{}},$y={},Uy={exports:{}},jy={};var oR;function J6(){if(oR)return jy;oR=1;var e=al();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue;function f(g,v){var b=v(),_=r({inst:{value:b,getSnapshot:v}}),x=_[0].inst,R=_[1];return c(function(){x.value=b,x.getSnapshot=v,d(x)&&R({inst:x})},[g,b,v]),i(function(){return d(x)&&R({inst:x}),g(function(){d(x)&&R({inst:x})})},[g]),l(b),b}function d(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!n(g,b)}catch{return!0}}function h(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return jy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,jy}var iR;function yI(){return iR||(iR=1,Uy.exports=J6()),Uy.exports}var aR;function eB(){if(aR)return $y;aR=1;var e=al(),t=yI();function n(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,c=e.useRef,l=e.useEffect,f=e.useMemo,d=e.useDebugValue;return $y.useSyncExternalStoreWithSelector=function(h,y,g,v,b){var _=c(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function C(j){if(!A){if(A=!0,O=j,j=v(j),b!==void 0&&x.hasValue){var B=x.value;if(b(B,j))return D=B}return D=j}if(B=D,r(O,j))return B;var k=v(j);return b!==void 0&&b(B,k)?(O=j,B):(O=j,D=k)}var A=!1,O,D,N=g===void 0?null:g;return[function(){return C(y())},N===null?void 0:function(){return C(N())}]},[y,g,v,b]);var R=i(h,_[0],_[1]);return l(function(){x.hasValue=!0,x.value=R},[R]),d(R),R},$y}var cR;function tB(){return cR||(cR=1,By.exports=eB()),By.exports}var vI=tB();function nB(e,t=r=>r,n={}){const r=n.equal??sB;return vI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function sB(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=lR(e);if(n.length!==lR(t).length)return!1;for(let r=0;r"u"?Hy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Hy,Hy)}function Xn(e){const t=I.useContext(bI());return e?.warn,t}function fn(e){const t=Xn({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return nB(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const c=er(r.current,e.select(i));return r.current=c,c}return e.select(i)}return i})}const Ap=I.createContext(void 0),rB=I.createContext(void 0);function Nr(e){const t=I.useContext(e.from?rB:Ap);return fn({select:r=>{const i=r.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(go(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function qv(e){return Nr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Gv(e){const{select:t,...n}=e;return Nr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Kv(e){return Nr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Zv(e){return Nr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ip(e){const t=Xn();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Fy={exports:{}},Vn={};var uR;function oB(){if(uR)return Vn;uR=1;var e=al();function t(d){var h="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Fy.exports=oB(),Fy.exports}var ki=SI();function iB(e,t){const n=Xn(),r=Q6(t),{activeProps:i,inactiveProps:c,activeOptions:l,to:f,preload:d,preloadDelay:h,hashScrollIntoView:y,replace:g,startTransition:v,resetScroll:b,viewTransition:_,children:x,target:R,disabled:C,style:A,className:O,onClick:D,onFocus:N,onMouseEnter:j,onMouseLeave:B,onTouchStart:k,ignoreBlocker:Z,params:se,search:le,hash:K,state:Q,mask:ye,reloadDocument:fe,unsafeRelative:q,from:W,_fromLocation:H,...ve}=e,Te=gI(),P=fn({select:gt=>gt.location.search,structuralSharing:!0}),ne=e.from,ie=I.useMemo(()=>({...e,from:ne}),[n,P,ne,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),de=I.useMemo(()=>n.buildLocation({...ie}),[n,ie]),Ce=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,Se=de.maskedLocation?de.maskedLocation.external:de.external,be=I.useMemo(()=>dB(Ce,Se,n.history,C),[C,Se,Ce,n.history]),Ye=I.useMemo(()=>{if(be?.external)return Vh(be.href)?void 0:be.href;if(!hB(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),Vh(f)?void 0:f}catch{}},[f,be]),He=fn({select:gt=>{if(Ye)return!1;if(l?.exact){if(!p6(gt.location.pathname,de.pathname,n.basepath))return!1}else{const $t=Gh(gt.location.pathname,n.basepath),Ut=Gh(de.pathname,n.basepath);if(!($t.startsWith(Ut)&&($t.length===Ut.length||$t[Ut.length]==="/")))return!1}return(l?.includeSearch??!0)&&!Ea(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Te&>.location.hash===de.hash:!0}}),ht=He?Si(i,{})??aB:Vy,Ft=He?Vy:Si(c,{})??Vy,oe=[O,ht.className,Ft.className].filter(Boolean).join(" "),Fe=(A||ht.style||Ft.style)&&{...A,...ht.style,...Ft.style},[Ie,Pt]=I.useState(!1),_e=I.useRef(!1),Ne=e.reloadDocument||Ye?!1:d??n.options.defaultPreload,qe=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...ie}).catch(gt=>{console.warn(gt),console.warn(q6)})},[n,ie]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);Z6(r,ut,fB,{disabled:!!C||Ne!=="viewport"}),I.useEffect(()=>{_e.current||!C&&Ne==="render"&&(Qe(),_e.current=!0)},[C,Qe,Ne]);const Be=gt=>{const $t=gt.currentTarget.getAttribute("target"),Ut=R!==void 0?R:$t;if(!C&&!pB(gt)&&!gt.defaultPrevented&&(!Ut||Ut==="_self")&>.button===0){gt.preventDefault(),ki.flushSync(()=>{Pt(!0)});const rn=n.subscribe("onResolved",()=>{rn(),Pt(!1)});n.navigate({...ie,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:v,viewTransition:_,ignoreBlocker:Z})}};if(Ye)return{...ve,ref:r,href:Ye,...x&&{children:x},...R&&{target:R},...C&&{disabled:C},...A&&{style:A},...O&&{className:O},...D&&{onClick:D},...N&&{onFocus:N},...j&&{onMouseEnter:j},...B&&{onMouseLeave:B},...k&&{onTouchStart:k}};const Le=gt=>{C||Ne&&Qe()},sn=Le,it=gt=>{if(!(C||!Ne))if(!qe)Qe();else{const $t=gt.target;if(Iu.has($t))return;const Ut=setTimeout(()=>{Iu.delete($t),Qe()},qe);Iu.set($t,Ut)}},Ss=gt=>{if(C||!Ne||!qe)return;const $t=gt.target,Ut=Iu.get($t);Ut&&(clearTimeout(Ut),Iu.delete($t))};return{...ve,...ht,...Ft,href:be?.href,ref:r,onClick:Ou([D,Be]),onFocus:Ou([N,Le]),onMouseEnter:Ou([j,it]),onMouseLeave:Ou([B,Ss]),onTouchStart:Ou([k,sn]),disabled:!!C,target:R,...Fe&&{style:Fe},...oe&&{className:oe},...C&&cB,...He&&lB,...Te&&Ie&&uB}}const Vy={},aB={className:"active"},cB={role:"link","aria-disabled":!0},lB={"data-status":"active","aria-current":"page"},uB={"data-transitioning":"transitioning"},Iu=new WeakMap,fB={rootMargin:"100px"},Ou=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function dB(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function hB(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Or=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=iB(r,t),l=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;if(!n){const{disabled:f,...d}=c;return I.createElement("a",d,l)}return I.createElement(n,c,l)});function pB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let mB=class extends mI{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Kv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Gv({...n,from:this.id}),this.useLoaderData=n=>qv({...n,from:this.id}),this.useNavigate=()=>Ip({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>$.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function gB(e){return new mB(e)}function yB(){return e=>bB(e)}class vB extends G6{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Kv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Gv({...n,from:this.id}),this.useLoaderData=n=>qv({...n,from:this.id}),this.useNavigate=()=>Ip({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>$.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function bB(e){return new vB(e)}function nn(e){return typeof e=="object"?new dR(e,{silent:!0}).createRoute(e):new dR(e,{silent:!0}).createRoute}class dR{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=gB(r);return i.isRoot=!1,i},this.silent=n?.silent}}class hR{constructor(t){this.useMatch=n=>Nr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Kv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Gv({...n,from:this.options.id}),this.useLoaderData=n=>qv({...n,from:this.options.id}),this.useNavigate=()=>{const n=Xn();return Ip({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function pR(e){return typeof e=="object"?new hR(e):t=>new hR({id:e,...t})}function xn(e,t){let n,r,i,c;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t]}).catch(d=>{if(i=d,XL(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),n),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(rR)rR(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function SB(){const e=Xn(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=fn({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),l=Ly(c),f=c||n||i,d=Ly(f),h=c||i,y=Ly(h);return e.startTransition=g=>{r(!0),I.startTransition(()=>{g(),r(!1)})},I.useEffect(()=>{const g=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ho(e.latestLocation.publicHref)!==ho(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),lh(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),lh(()=>{l&&!c&&e.emit({type:"onLoad",...xa(e.state)})},[l,e,c]),lh(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...xa(e.state)})},[h,y,e]),lh(()=>{if(d&&!f){const g=xa(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&R6(e)}},[f,d,e]),null}function _B(e){const t=fn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return $.jsx(Fv,{getResetKey:()=>t,onCatch:(n,r)=>{if(ks(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(ks(n))return e.fallback?.(n);throw n},children:e.children})}function wB(){return $.jsx("p",{children:"Not Found"})}function Uc(e){return $.jsx($.Fragment,{children:e.children})}function _I(e,t,n){return t.options.notFoundComponent?$.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?$.jsx(e.options.defaultNotFoundComponent,{...n}):$.jsx(wB,{})}function EB(){return Xn().isScrollRestoring,null}const wI=I.memo(function({matchId:t}){const n=Xn(),r=fn({select:C=>{const A=C.matches.find(O=>O.id===t);return go(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],c=i.options.pendingComponent??n.options.defaultPendingComponent,l=c?$.jsx(c,{}):null,f=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,y=r.ssr===!1||r.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||y)&&(i.options.wrapInSuspense??c??(i.options.errorComponent?.preload||y))?I.Suspense:Uc,v=f?Fv:Uc,b=h?_B:Uc,_=fn({select:C=>C.loadedAt}),x=fn({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??Uc:Uc;return $.jsxs(R,{children:[$.jsx(Ap.Provider,{value:t,children:$.jsx(g,{fallback:l,children:$.jsx(v,{getResetKey:()=>_,errorComponent:f||Vv,onCatch:(C,A)=>{if(ks(C))throw C;d?.(C,A)},children:$.jsx(b,{fallback:C=>{if(!h||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!i.isRoot)throw C;return I.createElement(h,C)},children:y||r._displayPending?$.jsx(X6,{fallback:l,children:$.jsx(mR,{matchId:t})}):$.jsx(mR,{matchId:t})})})})}),x===sr&&n.options.scrollRestoration?$.jsxs($.Fragment,{children:[$.jsx(xB,{}),$.jsx(EB,{})]}):null]})});function xB(){const e=Xn(),t=I.useRef(void 0);return $.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...xa(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const mR=I.memo(function({matchId:t}){const n=Xn(),{match:r,key:i,routeId:c}=fn({select:d=>{const h=d.matches.find(_=>_.id===t),y=h.routeId,v=(n.routesById[y].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:y,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:y,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),l=n.routesById[c],f=I.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?$.jsx(d,{},i):$.jsx(EI,{})},[i,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(r.id);if(h&&!h._nonReactive.minPendingPromise){const y=Wc();h._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return go(ks(r.error)),_I(n,l,r.error);if(r.status==="redirected")throw go(ir(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return f}),EI=I.memo(function(){const t=Xn(),n=I.useContext(Ap),r=fn({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=fn({select:h=>{const g=h.matches.find(v=>v.id===n);return go(g),g.globalNotFound}}),l=fn({select:h=>{const y=h.matches,g=y.findIndex(v=>v.id===n);return y[g+1]?.id}}),f=t.options.defaultPendingComponent?$.jsx(t.options.defaultPendingComponent,{}):null;if(c)return _I(t,i,void 0);if(!l)return null;const d=$.jsx(wI,{matchId:l});return r===sr?$.jsx(I.Suspense,{fallback:f,children:d}):d});function RB(){const e=Xn(),n=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=n?$.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?Uc:I.Suspense,c=$.jsxs(i,{fallback:r,children:[$.jsx(SB,{}),$.jsx(CB,{})]});return e.options.InnerWrap?$.jsx(e.options.InnerWrap,{children:c}):c}function CB(){const e=Xn(),t=fn({select:i=>i.matches[0]?.id}),n=fn({select:i=>i.loadedAt}),r=t?$.jsx(wI,{matchId:t}):null;return $.jsx(Ap.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:$.jsx(Fv,{getResetKey:()=>n,errorComponent:Vv,onCatch:i=>{i.message||i.toString()},children:r})})}const TB=e=>new AB(e);class AB extends $6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=nn,globalThis.createLazyFileRoute=pR):typeof window<"u"&&(window.createFileRoute=nn,window.createLazyFileRoute=pR);function IB({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=bI(),i=$.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?$.jsx(e.options.Wrap,{children:i}):i}function OB({router:e,...t}){return $.jsx(IB,{router:e,...t,children:$.jsx(RB,{})})}function MB(e){return fn({select:t=>e?.select?e.select(t.location):t.location})}function DB({tag:e,attrs:t,children:n,nonce:r}){switch(e){case"title":return $.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return $.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return $.jsx("link",{...t,nonce:r,suppressHydrationWarning:!0});case"style":return $.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case"script":return $.jsx(kB,{attrs:t,children:n});default:return null}}function kB({attrs:e,children:t}){Xn(),I.useEffect(()=>{if(e?.src){const n=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===n))return;const i=document.createElement("script");for(const[c,l]of Object.entries(e))c!=="suppressHydrationWarning"&&l!==void 0&&l!==!1&&i.setAttribute(c,typeof l=="boolean"?"":String(l));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}if(typeof t=="string"){const n=typeof e?.type=="string"?e.type:"text/javascript",r=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(l=>{if(!(l instanceof HTMLScriptElement))return!1;const f=l.getAttribute("type")??"text/javascript",d=l.getAttribute("nonce")??void 0;return l.textContent===t&&f===n&&d===r}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[l,f]of Object.entries(e))l!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(l,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}},[e,t]);{const{src:n,...r}=e||{};return $.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...r})}}const PB=()=>{const e=Xn(),t=e.options.ssr?.nonce,n=fn({select:d=>d.matches.map(h=>h.meta).filter(Boolean)}),r=I.useMemo(()=>{const d=[],h={};let y;for(let g=n.length-1;g>=0;g--){const v=n[g];for(let b=v.length-1;b>=0;b--){const _=v[b];if(_)if(_.title)y||(y={tag:"title",children:_.title});else if("script:ld+json"in _)try{const x=JSON.stringify(_["script:ld+json"]);d.push({tag:"script",attrs:{type:"application/ld+json"},children:t6(x)})}catch{}else{const x=_.name??_.property;if(x){if(h[x])continue;h[x]=!0}d.push({tag:"meta",attrs:{..._,nonce:t}})}}}return y&&d.push(y),t&&d.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),d.reverse(),d},[n,t]),i=fn({select:d=>{const h=d.matches.map(v=>v.links).filter(Boolean).flat(1).map(v=>({tag:"link",attrs:{...v,nonce:t}})),y=e.ssr?.manifest,g=d.matches.map(v=>y?.routes[v.routeId]?.assets??[]).filter(Boolean).flat(1).filter(v=>v.tag==="link").map(v=>({tag:"link",attrs:{...v.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...h,...g]},structuralSharing:!0}),c=fn({select:d=>{const h=[];return d.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{h.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:t}})})),h},structuralSharing:!0}),l=fn({select:d=>d.matches.map(h=>h.styles).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"style",attrs:{...y,nonce:t},children:h})),structuralSharing:!0}),f=fn({select:d=>d.matches.map(h=>h.headScripts).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"script",attrs:{...y,nonce:t},children:h})),structuralSharing:!0});return NB([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function NB(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function zB(){const e=PB(),n=Xn().options.ssr?.nonce;return $.jsx($.Fragment,{children:e.map(r=>I.createElement(DB,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var qy={exports:{}},Mu={},Gy={exports:{}},Ky={};var gR;function LB(){return gR||(gR=1,(function(e){function t(q,W){var H=q.length;q.push(W);e:for(;0>>1,Te=q[ve];if(0>>1;vei(ie,H))dei(Ce,ie)?(q[ve]=Ce,q[de]=H,ve=de):(q[ve]=ie,q[ne]=H,ve=ne);else if(dei(Ce,H))q[ve]=Ce,q[de]=H,ve=de;else break e}}return W}function i(q,W){var H=q.sortIndex-W.sortIndex;return H!==0?H:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],y=1,g=null,v=3,b=!1,_=!1,x=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(q){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=q)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function N(q){if(x=!1,D(q),!_)if(n(d)!==null)_=!0,j||(j=!0,K());else{var W=n(h);W!==null&&fe(N,W.startTime-q)}}var j=!1,B=-1,k=5,Z=-1;function se(){return R?!0:!(e.unstable_now()-Zq&&se());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var Te=ve(g.expirationTime<=q);if(q=e.unstable_now(),typeof Te=="function"){g.callback=Te,D(q),W=!0;break t}g===n(d)&&r(d),D(q)}else r(d);g=n(d)}if(g!==null)W=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-q),W=!1}}break e}finally{g=null,v=H,b=!1}W=void 0}}finally{W?K():j=!1}}}var K;if(typeof O=="function")K=function(){O(le)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ye=Q.port2;Q.port1.onmessage=le,K=function(){ye.postMessage(null)}}else K=function(){C(le,0)};function fe(q,W){B=C(function(){q(e.unstable_now())},W)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125ve?(q.sortIndex=H,t(h,q),n(d)===null&&q===n(h)&&(x?(A(B),B=-1):x=!0,fe(N,H-ve))):(q.sortIndex=Te,t(d,q),_||b||(_=!0,j||(j=!0,K()))),q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(q){var W=v;return function(){var H=v;v=W;try{return q.apply(this,arguments)}finally{v=H}}}})(Ky)),Ky}var yR;function BB(){return yR||(yR=1,Gy.exports=LB()),Gy.exports}var vR;function $B(){if(vR)return Mu;vR=1;var e=BB(),t=al(),n=SI();function r(s){var o="https://react.dev/errors/"+s;if(1Te||(s.current=ve[Te],ve[Te]=null,Te--)}function ie(s,o){Te++,ve[Te]=s.current,s.current=o}var de=P(null),Ce=P(null),Se=P(null),be=P(null);function Ye(s,o){switch(ie(Se,o),ie(Ce,s),ie(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?s1(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=s1(o),s=r1(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ne(de),ie(de,s)}function He(){ne(de),ne(Ce),ne(Se)}function ht(s){s.memoizedState!==null&&ie(be,s);var o=de.current,a=r1(o,s.type);o!==a&&(ie(Ce,s),ie(de,a))}function Ft(s){Ce.current===s&&(ne(de),ne(Ce)),be.current===s&&(ne(be),wu._currentValue=H)}var oe,Fe;function Ie(s){if(oe===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",Fe=-1)":-10&&t?.endsWith("/")?"/":""}`;return Ta(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=mZ(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Cv extends yZ{headerFormatter=new lZ;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){super({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:c,unhoistableHeaders:l,signableHeaders:f,hoistableHeaders:d,signingRegion:h,signingService:y}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const v=h??await this.regionProvider(),{longDate:b,shortDate:_}=this.formatDate(r);if(i>iZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=b0(_,v,y??this.service),R=hZ(QC(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[EM]=g.sessionToken),R.query[GK]=y0,R.query[KK]=`${g.accessKeyId}/${x}`,R.query[_M]=b,R.query[QK]=i.toString(10);const C=GC(R,c,f);return R.query[ZK]=this.getCanonicalHeaderList(C),R.query[wM]=await this.getSignature(b,x,this.getSigningKey(g,v,_,y),this.createCanonicalRequest(R,C,await S0(t,this.sha256))),R}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:c,signingService:l}){const f=c??await this.regionProvider(),{shortDate:d,longDate:h}=this.formatDate(r),y=b0(d,f,l??this.service),g=await S0({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const b=ps(await v.digest()),_=[sZ,h,y,i,b,g].join(` `);return this.signString(_,{signingDate:r,signingRegion:f,signingService:l})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:t.priorSignature}).then(l=>({message:t.message,signature:l}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:i}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const l=r??await this.regionProvider(),{shortDate:f}=this.formatDate(n),d=new this.sha256(await this.getSigningKey(c,l,f,i));return d.update(uf(t)),ps(await d.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:c,signingService:l}={}){const f=await this.credentialProvider();this.validateResolvedCredentials(f);const d=c??await this.regionProvider(),h=QC(t),{longDate:y,shortDate:g}=this.formatDate(n),v=b0(g,d,l??this.service);h.headers[RM]=y,f.sessionToken&&(h.headers[JK]=f.sessionToken);const b=await S0(h,this.sha256);!dZ(Rv,h.headers)&&this.applyChecksum&&(h.headers[Rv]=b);const _=GC(h,i,r),x=await this.getSignature(y,v,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,b));return h.headers[xM]=`${y0} Credential=${f.accessKeyId}/${v}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,y0),l=new this.sha256(await r);return l.update(uf(c)),ps(await l.digest())}getSigningKey(t,n,r,i){return aZ(this.sha256,t,r,n,i||this.service)}}const AM=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(h){h&&h!==t&&h!==r&&(n=!0),t=h;const y=vZ(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=bZ(e,y);if(n&&!g.attributed){const v=typeof t=="object"&&t!==null;r=async b=>{const x=await g(b);return v&&(!x.$source||Object.keys(x.$source).length===0)?jK(x,"CREDENTIALS_CODE","e"):x},r.memoized=g.memoized,r.configBound=g.configBound,r.attributed=!0}else r=g},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:c=e.systemClockOffset||0,sha256:l}=e;let f;return e.signer?f=Zc(e.signer):e.regionInfoProvider?f=()=>Zc(e.region)().then(async h=>[await e.regionInfoProvider(h,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},h]).then(([h,y])=>{const{signingRegion:g,signingService:v}=h;e.signingRegion=e.signingRegion||g||y,e.signingName=e.signingName||v||e.serviceId;const b={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},_=e.signerConstructor||Cv;return new _(b)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Zc(e.region)(),properties:{}},h);const y=h.signingRegion,g=h.signingName;e.signingRegion=e.signingRegion||y,e.signingName=e.signingName||g||e.serviceId;const v={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},b=e.signerConstructor||Cv;return new b(v)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function vZ(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=hK(t,dK,oM):n?r=Zc(n(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function bZ(e,t){if(t.configBound)return t;const n=async r=>t({...r,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const YC=typeof TextEncoder=="function"?new TextEncoder:null,IM=e=>{if(typeof e=="string"){if(YC)return YC.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},ya=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},pi=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,gp=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((v,b)=>XC[b.step]-XC[v.step]||WC[b.priority||"normal"]-WC[v.priority||"normal"]),c=g=>{let v=!1;const b=_=>{const x=ya(_.name,_.aliases);if(x.includes(g)){v=!0;for(const R of x)r.delete(R);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},l=g=>{let v=!1;const b=_=>{if(_.middleware===g){v=!0;for(const x of ya(_.name,_.aliases))r.delete(x);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},f=g=>(e.forEach(v=>{g.add(v.middleware,{...v})}),t.forEach(v=>{g.addRelativeTo(v.middleware,{...v})}),g.identifyOnResolve?.(y.identifyOnResolve()),g),d=g=>{const v=[];return g.before.forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v.push(g),g.after.reverse().forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v},h=(g=!1)=>{const v=[],b=[],_={};return e.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ya(C.name,C.aliases))_[A]=C;v.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ya(C.name,C.aliases))_[A]=C;b.push(C)}),b.forEach(R=>{if(R.toMiddleware){const C=_[R.toMiddleware];if(C===void 0){if(g)return;throw new Error(`${R.toMiddleware} is not found when adding ${pi(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}R.relation==="after"&&C.after.push(R),R.relation==="before"&&C.before.push(R)}}),i(v).map(d).reduce((R,C)=>(R.push(...C),R),[])},y={add:(g,v={})=>{const{name:b,override:_,aliases:x}=v,R={step:"initialize",priority:"normal",middleware:g,...v},C=ya(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${pi(b,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${pi(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${pi(b,x)}" middleware with ${R.priority} priority in ${R.step} step.`);e.splice(O,1)}}for(const A of C)r.add(A)}e.push(R)},addRelativeTo:(g,v)=>{const{name:b,override:_,aliases:x}=v,R={middleware:g,...v},C=ya(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${pi(b,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${pi(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${pi(b,x)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);t.splice(O,1)}}for(const A of C)r.add(A)}t.push(R)},clone:()=>f(gp()),use:g=>{g.applyToStack(y)},remove:g=>typeof g=="string"?c(g):l(g),removeByTag:g=>{let v=!1;const b=_=>{const{tags:x,name:R,aliases:C}=_;if(x&&x.includes(g)){const A=ya(R,C);for(const O of A)r.delete(O);return v=!0,!1}return!0};return e=e.filter(b),t=t.filter(b),v},concat:g=>{const v=f(gp());return v.use(g),v.identifyOnResolve(n||v.identifyOnResolve()||(g.identifyOnResolve?.()??!1)),v},applyToStack:f,identify:()=>h(!0).map(g=>{const v=g.step??g.relation+" "+g.toMiddleware;return pi(g.name,g.aliases)+" - "+v}),identifyOnResolve(g){return typeof g=="boolean"&&(n=g),n},resolve:(g,v)=>{for(const b of h().map(_=>_.middleware).reverse())g=b(g,v);return n&&console.log(y.identify()),g}};return y},XC={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},WC={high:3,normal:2,low:1};class OM{config;middlewareStack=gp();initConfig;handlers;constructor(t){this.config=t;const{protocol:n,protocolSettings:r}=t;r&&typeof n=="function"&&(t.protocol=new n(r))}send(t,n,r){const i=typeof n!="function"?n:void 0,c=typeof n=="function"?n:r,l=i===void 0&&this.config.cacheMiddleware===!0;let f;if(l){this.handlers||(this.handlers=new WeakMap);const d=this.handlers;d.has(t.constructor)?f=d.get(t.constructor):(f=t.resolveMiddleware(this.middlewareStack,this.config,i),d.set(t.constructor,f))}else delete this.handlers,f=t.resolveMiddleware(this.middlewareStack,this.config,i);if(c)f(t).then(d=>c(null,d.output),d=>c(d)).catch(()=>{});else return f(t).then(d=>d.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const _0="***SensitiveInformation***";function Tv(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return _0;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return _0}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return _0}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=Tv(l,r[c]));return i}return t}class Br{middlewareStack=gp();schema;static classBuilder(){return new SZ}resolveMiddlewareWithContext(t,n,r,{middlewareFn:i,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,smithyContext:h,additionalContext:y,CommandCtor:g}){for(const R of i.bind(this)(g,t,n,r))this.middlewareStack.use(R);const v=t.concat(this.middlewareStack),{logger:b}=n,_={logger:b,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,[wv]:{commandInstance:this,...h},...y},{requestHandler:x}=n;return v.resolve(R=>x.handle(R.request,r||{}),_)}}class SZ{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=r=>r,n=r=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let n;return n=class extends Br{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.input=r??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,i,c){const l=t._operationSchema,f=l?.[4]??l?.input,d=l?.[5]??l?.output;return this.resolveMiddlewareWithContext(r,i,c,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(l?Tv.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?Tv.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class wa extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const n=t;return wa.prototype.isPrototypeOf(n)||!!n.$fault&&!!n.$metadata&&(n.$fault==="client"||n.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const n=t;return this===wa?wa.isInstance(t):wa.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const JC=(e,t={})=>{Object.entries(t).filter(([,r])=>r!==void 0).forEach(([r,i])=>{(e[r]==null||e[r]==="")&&(e[r]=i)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},MM=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},_Z=e=>{const t=[];for(const n in dp){const r=dp[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},wZ=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},EZ=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),xZ=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},DM=e=>Object.assign(_Z(e),EZ(e)),kM=e=>Object.assign(wZ(e),xZ(e)),PM=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&e[n][t]!==void 0?e[n]=e[n][t]:typeof e[n]=="object"&&e[n]!==null&&(e[n]=PM(e[n]));return e};class Ab{trace(){}debug(){}info(){}warn(){}error(){}}class NM{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,n){const r=n.getMemberSchemas(),i=Object.values(r).find(c=>!!c.getMergedTraits().httpPayload);if(i){const c=i.getMergedTraits().mediaType;return c||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!n.isUnitSchema()&&Object.values(r).find(l=>{const{httpQuery:f,httpQueryParams:d,httpHeader:h,httpLabel:y,httpPrefixHeaders:g}=l.getMergedTraits();return!f&&!d&&!h&&!y&&g===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,n,r,i,c,l){let f=n,d=t;t.includes("#")&&([f,d]=t.split("#"));const h={$metadata:c,$fault:r.statusCode<500?"client":"server"},y=Mt.for(f);try{return{errorSchema:l?.(y,d)??y.getSchema(t),errorMetadata:h}}catch{i.message=i.message??i.Message??"UnknownError";const v=Mt.for("smithy.ts.sdk.synthetic."+f),b=v.getBaseException();if(b){const _=v.getErrorCtor(b)??Error;throw this.decorateServiceException(Object.assign(new _({name:d}),h),i)}throw this.decorateServiceException(Object.assign(new Error(d),h),i)}}decorateServiceException(t,n={}){if(this.queryCompat){const r=t.Message??n.Message,i=JC(t,n);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const c=i.$metadata.requestId;return c&&(i.RequestId=c),i}return JC(t,n)}setQueryCompatError(t,n){const r=n.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[i,c]=r.split(";"),l=Object.entries(t),f={Code:i,Type:c};Object.assign(t,f);for(const[d,h]of l)f[d==="message"?"Message":d]=h;delete f.__type,t.Error=f}}queryCompatOutput(t,n){t.Error&&(n.Error=t.Error),t.Type&&(n.Type=t.Type),t.Code&&(n.Code=t.Code)}findQueryCompatibleError(t,n){try{return t.getSchema(n)}catch{return t.find(i=>wt.of(i).getMergedTraits().awsQueryError?.[0]===n)}}}class em{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*zM(e,t){if(e.isUnitSchema())return;const n=e.getSchema();for(let r=0;rr!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,n=this.from[t];this.to.$unknown=[t,n]}}}function CZ(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function TZ(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class Av{value;constructor(t){this.value=t}toString(){return TZ(""+this.value)}}class ns{name;children;attributes={};static of(t,n,r){const i=new ns(t);return n!==void 0&&i.addChildNode(new Av(n)),r!==void 0&&i.withName(r),i}constructor(t,n=[]){this.name=t,this.children=n}withName(t){return this.name=t,this}addAttribute(t,n){return this.attributes[t]=n,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,n){return n!=null&&(this.attributes[t]=n),this}cc(t,n,r=n){if(t[n]!=null){const i=ns.of(n,t[n]).withName(r);this.c(i)}}l(t,n,r,i){t[n]!=null&&i().map(l=>{l.withName(r),this.c(l)})}lc(t,n,r,i){if(t[n]!=null){const c=i(),l=new ns(r);c.map(f=>{l.c(f)}),this.c(l)}}toString(){const t=!!this.children.length;let n=`<${this.name}`;const r=this.attributes;for(const i of Object.keys(r)){const c=r[i];c!=null&&(n+=` ${i}="${CZ(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let w0;function AZ(e){w0||(w0=new DOMParser);const t=w0.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const c={},l=Array.from(i.attributes);for(const d of l)c[`${d.name}`]=d.value;const f=Array.from(i.childNodes);for(const d of f){const h=n(d);if(h!=null){const y=d.nodeName;if(f.length===1&&l.length===0&&y==="#text")return h;c[y]?Array.isArray(c[y])?c[y].push(h):c[y]=[c[y],h]:c[y]=h}else if(f.length===1&&l.length===0)return i.textContent}return c}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}class LM extends em{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new sM(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,n,r){const i=wt.of(t),c=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(c).find(h=>!!h.getMemberTraits().eventPayload)){const h={},y=Object.keys(c)[0];return c[y].isBlobSchema()?h[y]=n:h[y]=this.read(c[y],n),h}const f=(this.serdeContext?.utf8Encoder??Ua)(n),d=this.parseXml(f);return this.readSchema(t,r?d[r]:d)}readSchema(t,n){const r=wt.of(t);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(n))return this.readSchema(r,[n]);if(n==null)return n;if(typeof n=="object"){const c=!!i.sparse,l=!!i.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),h=[],y=d.getMergedTraits().xmlName??"member",g=l?n:(n[0]??n)[y],v=Array.isArray(g)?g:[g];for(const b of v)(b!=null||c)&&h.push(this.readSchema(d,b));return h}const f={};if(r.isMapSchema()){const d=r.getKeySchema(),h=r.getValueSchema();let y;l?y=Array.isArray(n)?n:[n]:y=Array.isArray(n.entry)?n.entry:[n.entry];const g=d.getMergedTraits().xmlName??"key",v=h.getMergedTraits().xmlName??"value";for(const b of y){const _=b[g],x=b[v];(x!=null||c)&&(f[_]=this.readSchema(h,x))}return f}if(r.isStructSchema()){const d=r.isUnionSchema();let h;d&&(h=new RZ(n,f));for(const[y,g]of r.structIterator()){const v=g.getMergedTraits(),b=v.httpPayload?v.xmlName??g.getName():g.getMemberTraits().xmlName??y;d&&h.mark(b),n[b]!=null&&(f[y]=this.readSchema(g,n[b]))}return d&&h.writeUnknown(),f}if(r.isDocumentSchema())return n;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,n)}parseXml(t){if(t.length){let n;try{n=AZ(t)}catch(l){throw l&&typeof l=="object"&&Object.defineProperty(l,"$responseBodyText",{value:t}),l}const r="#text",i=Object.keys(n)[0],c=n[i];return c[r]&&(c[i]=c[r],delete c[r]),PM(c)}return{}}}class IZ extends em{settings;buffer;constructor(t){super(),this.settings=t}write(t,n,r=""){this.buffer===void 0&&(this.buffer="");const i=wt.of(t);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof n=="string"||n instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Mi)(n)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())n!=null?(this.writeKey(r),this.writeValue(String(n))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(Qp()));else if(i.isBigIntegerSchema())n!=null&&(this.writeKey(r),this.writeValue(String(n)));else if(i.isBigDecimalSchema())n!=null&&(this.writeKey(r),this.writeValue(n instanceof Rf?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),Xp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(pp(n));break;case 7:this.writeValue(String(n.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(n)?this.write(79,n,r):n instanceof Date?this.write(4,n,r):n instanceof Uint8Array?this.write(21,n,r):n&&typeof n=="object"?this.write(143,n,r):(this.writeKey(r),this.writeValue(String(n)));else if(i.isListSchema()){if(Array.isArray(n))if(n.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const c=i.getValueSchema(),l=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let f=1;for(const d of n){if(d==null)continue;const h=this.getKey("member",c.getMergedTraits().xmlName),y=l?`${r}${f}`:`${r}${h}.${f}`;this.write(c,d,y),++f}}}else if(i.isMapSchema()){if(n&&typeof n=="object"){const c=i.getKeySchema(),l=i.getValueSchema(),f=i.getMergedTraits().xmlFlattened;let d=1;for(const[h,y]of Object.entries(n)){if(y==null)continue;const g=this.getKey("key",c.getMergedTraits().xmlName),v=f?`${r}${d}.${g}`:`${r}entry.${d}.${g}`,b=this.getKey("value",l.getMergedTraits().xmlName),_=f?`${r}${d}.${b}`:`${r}entry.${d}.${b}`;this.write(c,h,v),this.write(l,y,_),++d}}}else if(i.isStructSchema()){if(n&&typeof n=="object"){let c=!1;for(const[l,f]of zM(i,n)){if(n[l]==null&&!f.isIdempotencyToken())continue;const d=this.getKey(l,f.getMergedTraits().xmlName),h=`${r}${d}`;this.write(f,n[l],h),c=!0}if(!c&&i.isUnionSchema()){const{$unknown:l}=n;if(Array.isArray(l)){const[f,d]=l,h=`${r}${f}`;this.write(15,d,h)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,n){const r=n??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${hp(t)}=`}writeValue(t){this.buffer+=hp(t)}}class OZ extends oK{options;serializer;deserializer;mixin=new NM;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new IZ(n),this.deserializer=new LM(n)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(zh(t.input)==="unit"||!i.body)&&(i.body="");const c=t.name.split("#")[1]??t.name;return i.body=`Action=${c}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const g=await Ei(r.body,n);g.byteLength>0&&Object.assign(l,await i.read(15,g)),await this.handleError(t,n,r,l,this.deserializeMetadata(r))}for(const g in r.headers){const v=r.headers[g];delete r.headers[g],r.headers[g.toLowerCase()]=v}const f=t.name.split("#")[1]??t.name,d=c.isStructSchema()&&this.useNestedResult()?f+"Result":void 0,h=await Ei(r.body,n);return h.byteLength>0&&Object.assign(l,await i.read(c,h,d)),{$metadata:this.deserializeMetadata(r),...l}}useNestedResult(){return!0}async handleError(t,n,r,i,c){const l=this.loadQueryErrorCode(r,i)??"Unknown",f=this.loadQueryError(i),d=this.loadQueryErrorMessage(i);f.message=d,f.Error={Type:f.Type,Code:f.Code,Message:d};const{errorSchema:h,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,f,c,this.mixin.findQueryCompatibleError),g=wt.of(h),v=Mt.for(h[1]).getErrorCtor(h)??Error,b=new v(d),_={Type:f.Error.Type,Code:f.Error.Code,Error:f.Error};for(const[x,R]of g.structIterator()){const C=R.getMergedTraits().xmlName??x,A=f[C]??i[C];_[x]=this.deserializer.readSchema(R,A)}throw this.mixin.decorateServiceException(Object.assign(b,y,{$fault:g.getMergedTraits().error,message:d},_),i)}loadQueryErrorCode(t,n){const r=(n.Errors?.[0]?.Error??n.Errors?.Error??n.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const n=this.loadQueryError(t);return n?.message??n?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class MZ extends OZ{options;constructor(t){super(t),this.options=t;const n={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,n)}useNestedResult(){return!1}}const DZ=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class kZ extends em{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);if(r.isStringSchema()&&typeof n=="string")this.stringBuffer=n;else if(r.isBlobSchema())this.byteBuffer="byteLength"in n?n:(this.serdeContext?.base64Decoder??Pa)(n);else{this.buffer=this.writeStruct(r,n,void 0);const i=r.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(r.getName())}}flush(){if(this.byteBuffer!==void 0){const n=this.byteBuffer;return delete this.byteBuffer,n}if(this.stringBuffer!==void 0){const n=this.stringBuffer;return delete this.stringBuffer,n}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,n,r){const i=t.getMergedTraits(),c=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!c||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const l=ns.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of zM(t,n)){const v=n[y];if(v!=null||g.isIdempotencyToken()){if(g.getMergedTraits().xmlAttribute){l.addAttribute(g.getMergedTraits().xmlName??y,this.writeSimple(g,v));continue}if(g.isListSchema())this.writeList(g,v,l,d);else if(g.isMapSchema())this.writeMap(g,v,l,d);else if(g.isStructSchema())l.addChildNode(this.writeStruct(g,v,d));else{const b=ns.of(g.getMergedTraits().xmlName??g.getMemberName());this.writeSimpleInto(g,v,b,d),l.addChildNode(b)}}}const{$unknown:h}=n;if(h&&t.isUnionSchema()&&Array.isArray(h)&&Object.keys(n).length===1){const[y,g]=h,v=ns.of(y);if(typeof g!="string")if(n instanceof ns||n instanceof Av)l.addChildNode(n);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,g,v,d),l.addChildNode(v)}return d&&l.addAttribute(f,d),l}writeList(t,n,r,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const c=t.getMergedTraits(),l=t.getValueSchema(),f=l.getMergedTraits(),d=!!f.sparse,h=!!c.xmlFlattened,[y,g]=this.getXmlnsAttribute(t,i),v=(b,_)=>{if(l.isListSchema())this.writeList(l,Array.isArray(_)?_:[_],b,g);else if(l.isMapSchema())this.writeMap(l,_,b,g);else if(l.isStructSchema()){const x=this.writeStruct(l,_,g);b.addChildNode(x.withName(h?c.xmlName??t.getMemberName():f.xmlName??"member"))}else{const x=ns.of(h?c.xmlName??t.getMemberName():f.xmlName??"member");this.writeSimpleInto(l,_,x,g),b.addChildNode(x)}};if(h)for(const b of n)(d||b!=null)&&v(r,b);else{const b=ns.of(c.xmlName??t.getMemberName());g&&b.addAttribute(y,g);for(const _ of n)(d||_!=null)&&v(b,_);r.addChildNode(b)}}writeMap(t,n,r,i,c=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const l=t.getMergedTraits(),f=t.getKeySchema(),h=f.getMergedTraits().xmlName??"key",y=t.getValueSchema(),g=y.getMergedTraits(),v=g.xmlName??"value",b=!!g.sparse,_=!!l.xmlFlattened,[x,R]=this.getXmlnsAttribute(t,i),C=(A,O,D)=>{const N=ns.of(h,O),[j,B]=this.getXmlnsAttribute(f,R);B&&N.addAttribute(j,B),A.addChildNode(N);let k=ns.of(v);y.isListSchema()?this.writeList(y,D,k,R):y.isMapSchema()?this.writeMap(y,D,k,R,!0):y.isStructSchema()?k=this.writeStruct(y,D,R):this.writeSimpleInto(y,D,k,R),A.addChildNode(k)};if(_){for(const[A,O]of Object.entries(n))if(b||O!=null){const D=ns.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=ns.of(l.xmlName??t.getMemberName()),R&&A.addAttribute(x,R),r.addChildNode(A));for(const[O,D]of Object.entries(n))if(b||D!=null){const N=ns.of("entry");C(N,O,D),(c?r:A).addChildNode(N)}}}writeSimple(t,n){if(n===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const r=wt.of(t);let i=null;if(n&&typeof n=="object")if(r.isBlobSchema())i=(this.serdeContext?.base64Encoder??Mi)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(Xp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=pp(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=pp(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof Rf?n.string:String(n);throw r.isMapSchema()||r.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${r.getName(!0)}`)}if((r.isBooleanSchema()||r.isNumericSchema()||r.isBigIntegerSchema()||r.isBigDecimalSchema())&&(i=String(n)),r.isStringSchema()&&(n===void 0&&r.isIdempotencyToken()?i=Qp():i=String(n)),i===null)throw new Error(`Unhandled schema-value pair ${r.getName(!0)}=${n}`);return i}writeSimpleInto(t,n,r,i){const c=this.writeSimple(t,n),l=wt.of(t),f=new Av(c),[d,h]=this.getXmlnsAttribute(l,i);h&&r.addAttribute(d,h),r.addChildNode(f)}getXmlnsAttribute(t,n){const r=t.getMergedTraits(),[i,c]=r.xmlNamespace??[];return c&&c!==n?[i?`xmlns:${i}`:"xmlns",c]:[void 0,void 0]}}class PZ extends em{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new kZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new LM(this.settings);return t.setSerdeContext(this.serdeContext),t}}class NZ extends rK{codec;serializer;deserializer;mixin=new NM;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new PZ(n),this.serializer=new cK(this.codec.createSerializer(),n),this.deserializer=new iK(this.codec.createDeserializer(),n)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r),c=wt.of(t.input);if(!i.headers["content-type"]){const l=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);l&&(i.headers["content-type"]=l)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("'+i.body),i}async deserializeResponse(t,n,r){return super.deserializeResponse(t,n,r)}async handleError(t,n,r,i,c){const l=DZ(r,i)??"Unknown",{errorSchema:f,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,i,c),h=wt.of(f),y=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",g=Mt.for(f[1]).getErrorCtor(f)??Error,v=new g(y);await this.deserializeHttpMessage(f,n,r,i);const b={};for(const[_,x]of h.structIterator()){const R=x.getMergedTraits().xmlName??_,C=i.Error?.[R]??i[R];b[_]=this.codec.createDeserializer().readSchema(x,C)}throw this.mixin.decorateServiceException(Object.assign(v,d,{$fault:h.getMergedTraits().error,message:y},b),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,n]of t.structIterator())if(n.getMergedTraits().httpPayload)return!(n.isStructSchema()||n.isMapSchema()||n.isListSchema());return!1}}const zZ=/\d{12}\.ddb/;async function LZ(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&vr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?vr(e,"RETRY_MODE_ADAPTIVE","F"):vr(e,"RETRY_MODE_STANDARD","E"):vr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match(zZ)&&vr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":vr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":vr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":vr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&vr(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))vr(e,l,f)}}const eT="user-agent",E0="x-amz-user-agent",tT=" ",x0="/",BZ=/[^!$%&'*+\-.^_`|~\w]/g,$Z=/[^!$%&'*+\-.^_`|~\w#]/g,nT="-",UZ=1024;function jZ(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=UZ){t.length?t+=","+r:t+=r;continue}break}return t}const HZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!Mn.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(xh)||[],f=(await e.defaultUserAgentProvider()).map(xh);await LZ(n,e,r);const d=n;f.push(`m/${jZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(xh)||[],y=await e.userAgentAppId();y&&f.push(xh(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(tT),v=[...f.filter(b=>b.startsWith("aws-sdk-")),...h].join(tT);return e.runtime!=="browser"?(v&&(c[E0]=c[E0]?`${c[eT]} ${v}`:v),c[eT]=g):c[E0]=g,t({...r,request:i})},xh=e=>{const t=e[0].split(x0).map(l=>l.replace(BZ,nT)).join(x0),n=e[1]?.replace($Z,nT),r=t.indexOf(x0),i=t.substring(0,r);let c=t.substring(r+1);return i==="api"&&(c=c.toLowerCase()),[i,c,n].filter(l=>l&&l.length>0).reduce((l,f,d)=>{switch(d){case 0:return f;case 1:return`${l}/${f}`;default:return`${l}#${f}`}},"")},FZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},BM=e=>({applyToStack:t=>{t.add(HZ(e),FZ)}}),$M=!1,UM=!1,sT=new Set,VZ=(e,t=Wp)=>{if(!sT.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else sT.add(e)},jM=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),qZ=e=>jM(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,HM=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const r=typeof t=="function"?await t():t,i=qZ(r);return VZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return jM(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},rT="content-length";function GZ(e){return t=>async n=>{const r=n.request;if(Mn.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(rT)===-1)try{const l=e(i);r.headers={...r.headers,[rT]:String(l)}}catch{}}return t({...n,request:r})}}const KZ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},FM=e=>({applyToStack:t=>{t.add(GZ(e.bodyLengthChecker),KZ)}}),ZZ=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),JZ(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!WZ(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},QZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,YZ=/(\d+\.){3}\d+/,XZ=/\.\./,WZ=e=>QZ.test(e)&&!YZ.test(e)&&!XZ.test(e),JZ=e=>{const[t,n,r,,,i]=e.split(":"),c=t==="arn"&&e.split(":").length>=6,l=!!(c&&n&&r&&i);if(c&&!l)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return l},eQ=(e,t,n,r=!1)=>{const i=async()=>{let c;return r?c=n.clientContextParams?.[e]??n[e]??n[t]:c=n[e]??n[t],typeof c=="function"?c():c};return e==="credentialScope"||t==="CredentialScope"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.credentialScope??c?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.accountId??c?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(n.isCustomEndpoint===!1)return;const c=await i();if(c&&typeof c=="object"){if("url"in c)return c.url.href;if("hostname"in c){const{protocol:l,hostname:f,port:d,path:h}=c;return`${l}//${f}${d?":"+d:""}${h}`}}return c}:i},VM=async e=>{},qM=e=>typeof e=="object"?"url"in e?hf(e.url):e:hf(e),tQ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await VM(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(qM(l)),n.isCustomEndpoint=!0)}const i=await GM(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},GM=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[c,l]of Object.entries(i))switch(l.type){case"staticContextParams":r[c]=l.value;break;case"contextParams":r[c]=e[l.name];break;case"clientContextParams":case"builtInParams":r[c]=await eQ(l.name,c,n,l.type!=="builtInParams")();break;case"operationContextParams":r[c]=l.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(l))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await ZZ(r),r},nQ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&lK(r,"ENDPOINT_OVERRIDE","N");const c=await tQ(i.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=c,r.authSchemes=c.properties?.authSchemes;const l=r.authSchemes?.[0];if(l){r.signing_region=l.signingRegion,r.signing_service=l.signingName;const d=wo(r)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return n({...i})},sQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:iG.name},Eo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(nQ({config:e,instructions:t}),sQ)}}),KM=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>qM(await Ps(n)()):void 0,f=Object.assign(e,{endpoint:c,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:Ps(r??!1),useFipsEndpoint:Ps(i??!1)});let d;return f.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=VM(e.serviceId)),d),f};var rl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(rl||(rl={}));const pf=3,ZM=rl.STANDARD,rQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],oQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],iQ=[500,502,503,504],aQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],cQ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],lQ=e=>e?.$retryable!==void 0,uQ=e=>e.$metadata?.clockSkewCorrected,fQ=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},QM=e=>e.$metadata?.httpStatusCode===429||rQ.includes(e.name)||e.$retryable?.throttling==!0,Ib=(e,t=0)=>lQ(e)||uQ(e)||oQ.includes(e.name)||aQ.includes(e?.code||"")||cQ.includes(e?.code||"")||iQ.includes(e.$metadata?.httpStatusCode||0)||fQ(e)||e.cause!==void 0&&t<=10&&Ib(e.cause,t+1),dQ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Ib(e)}return!1};class Ob{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const n=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>Ob.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const n=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=t}updateClientSendingRate(t){let n;if(this.updateMeasuredRate(),QM(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),n=Math.floor(t*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(t){return parseFloat(t.toFixed(8))}}const Iv=100,YM=20*1e3,hQ=500,oT=500,pQ=5,mQ=10,gQ=1,yQ="amz-sdk-invocation-id",vQ="amz-sdk-request",bQ=()=>{let e=Iv;return{computeNextBackoffDelay:r=>Math.floor(Math.min(YM,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},iT=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(YM,e),getRetryCost:()=>n});class XM{maxAttempts;mode=rl.STANDARD;capacity=oT;retryBackoffStrategy=bQ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return iT({retryDelay:Iv,retryCount:0})}async refreshRetryTokenForRetry(t,n){const r=await this.getMaxAttempts();if(this.shouldRetry(t,n,r)){const i=n.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?hQ:Iv);const c=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),l=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,c):c,f=this.getCapacityCost(i);return this.capacity-=f,iT({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(oT,this.capacity+(t.getRetryCost()??gQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${pf}`),pf}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?mQ:pQ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class SQ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=rl.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Ob,this.standardRetryStrategy=new XM(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(t,n)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const _Q=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),WM=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ps(r??pf);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ps(n)()===rl.ADAPTIVE?new SQ(i):new XM(i))})},wQ=e=>e?.body instanceof ReadableStream,EQ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(xQ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=Mn.isInstance(y);for(g&&(y.headers[yQ]=Qp());;)try{g&&(y.headers[vQ]=`attempt=${d+1}; max=${c}`);const{response:v,output:b}=await t(r);return i.recordSuccess(l),b.$metadata.attempts=d+1,b.$metadata.totalRetryDelay=h,{response:v,output:b}}catch(v){const b=RQ(v);if(f=_Q(v),g&&wQ(y))throw(n.logger instanceof Ab?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),f;try{l=await i.refreshRetryTokenForRetry(l,b)}catch{throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=d+1,f.$metadata.totalRetryDelay=h,f}d=l.getRetryCount();const _=l.getRetryDelay();h+=_,await new Promise(x=>setTimeout(x,_))}}else return i=i,i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r)},xQ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",RQ=e=>{const t={error:e,errorType:CQ(e)},n=AQ(e.$response);return n&&(t.retryAfterHint=n),t},CQ=e=>QM(e)?"THROTTLING":Ib(e)?"TRANSIENT":dQ(e)?"SERVER_ERROR":"CLIENT_ERROR",TQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},JM=e=>({applyToStack:t=>{t.add(EQ(e),TQ)}}),AQ=e=>{if(!ka.isInstance(e))return;const t=Object.keys(e.headers).find(c=>c.toLowerCase()==="retry-after");if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)},IQ=async(e,t,n)=>({operation:wo(t).operation,region:await Ps(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function OQ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const MQ=e=>{const t=[];switch(e.operation){default:t.push(OQ(e))}return t},DQ=e=>{const t=AM(e);return Object.assign(t,{authSchemePreference:Ps(e.authSchemePreference??[])})},kQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),dl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},PQ="3.975.0",NQ={version:PQ},eD=e=>new TextEncoder().encode(e);var zQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:eD;function Na(e){return e instanceof Uint8Array?e:typeof e=="string"?zQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function yp(e){return typeof e=="string"?e.length===0:e.byteLength===0}function LQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function BQ(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n0&&c[c.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!c||h[1]>c[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var nr=64,FQ=32,VQ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),qQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],GQ=Math.pow(2,53)-1,Lh=(function(){function e(){this.state=Int32Array.from(qQ),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>GQ)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===nr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%nr>=nr-8){for(var i=this.bufferLength;i>>24&255,c[i*4+1]=this.state[i]>>>16&255,c[i*4+2]=this.state[i]>>>8&255,c[i*4+3]=this.state[i]>>>0&255;return c},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,i=r[0],c=r[1],l=r[2],f=r[3],d=r[4],h=r[5],y=r[6],g=r[7],v=0;v>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[v-15];var x=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[v]=(_+this.temp[v-7]|0)+(x+this.temp[v-16]|0)}var R=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&y)|0)+(g+(VQ[v]+this.temp[v]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&c^i&l^c&l)|0;g=y,y=h,h=d,d=f+R|0,f=l,l=c,c=i,i=R+C|0}r[0]+=i,r[1]+=c,r[2]+=l,r[3]+=f,r[4]+=d,r[5]+=h,r[6]+=y,r[7]+=g},e})(),KQ=(function(){function e(t){this.secret=t,this.hash=new Lh,this.reset()}return e.prototype.update=function(t){if(!(yp(t)||this.error))try{this.hash.update(Na(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return nD(this,void 0,void 0,function(){return sD(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Lh,this.secret){this.outer=new Lh;var t=ZQ(this.secret),n=new Uint8Array(nr);n.set(t);for(var r=0;rnr){var n=new Lh;n.update(t),t=n.digest()}var r=new Uint8Array(nr);return r.set(t),r}var QQ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function rD(e){if(YQ(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return XQ(t)}return!1}function YQ(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function XQ(e){return e&&QQ.every(function(t){return typeof e[t]=="function"})}var oD=(function(){function e(t){rD(Ai())?this.hash=new jQ(t):this.hash=new KQ(t)}return e.prototype.update=function(t,n){this.hash.update(Na(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const iD=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??cT.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??cT.browser(i)??"unknown",y=d?.version??"unknown",g=[["aws-sdk-js",t],["ua","2.1"],[`os/${c}`,l],["lang/js"],["md/browser",`${h}_${y}`]];e&&g.push([`api/${e}`,t]);const v=await n?.userAgentAppId?.();return v&&g.push([`app/${v}`]),g},cT={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},aD=e=>()=>Promise.reject(e),WQ=["in-region","cross-region","mobile","standard","legacy"],cD=({defaultsMode:e}={})=>VK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(JQ()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${WQ.join(", ")}, got ${t}`)}}),JQ=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},lD="required",rr="fn",or="argv",hl="ref",lT=!0,uT="isSet",mf="booleanEquals",Nc="error",zc="endpoint",co="tree",Mb="PartitionResult",Db="getAttr",fT={[lD]:!1,type:"string"},dT={[lD]:!0,default:!1,type:"boolean"},hT={[hl]:"Endpoint"},uD={[rr]:mf,[or]:[{[hl]:"UseFIPS"},!0]},fD={[rr]:mf,[or]:[{[hl]:"UseDualStack"},!0]},Ws={},pT={[rr]:Db,[or]:[{[hl]:Mb},"supportsFIPS"]},dD={[hl]:Mb},mT={[rr]:mf,[or]:[!0,{[rr]:Db,[or]:[dD,"supportsDualStack"]}]},gT=[uD],yT=[fD],vT=[{[hl]:"Region"}],eY={parameters:{Region:fT,UseDualStack:dT,UseFIPS:dT,Endpoint:fT},rules:[{conditions:[{[rr]:uT,[or]:[hT]}],rules:[{conditions:gT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Nc},{conditions:yT,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Nc},{endpoint:{url:hT,properties:Ws,headers:Ws},type:zc}],type:co},{conditions:[{[rr]:uT,[or]:vT}],rules:[{conditions:[{[rr]:"aws.partition",[or]:vT,assign:Mb}],rules:[{conditions:[uD,fD],rules:[{conditions:[{[rr]:mf,[or]:[lT,pT]},mT],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Nc}],type:co},{conditions:gT,rules:[{conditions:[{[rr]:mf,[or]:[pT,lT]}],rules:[{conditions:[{[rr]:"stringEquals",[or]:[{[rr]:Db,[or]:[dD,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ws,headers:Ws},type:zc},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS is enabled but this partition does not support FIPS",type:Nc}],type:co},{conditions:yT,rules:[{conditions:[mT],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"DualStack is enabled but this partition does not support DualStack",type:Nc}],type:co},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co}],type:co},{error:"Invalid Configuration: Missing Region",type:Nc}]},tY=eY,nY=new aM({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),sY=(e,t={})=>nY.get(e,()=>vM(tY,{endpointParams:e,logger:t.logger}));ff.aws=Rb;const rY=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??Pa,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??sY,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??MQ,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Tb}],logger:e?.logger??new Ab,protocol:e?.protocol??MZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ec2",xmlNamespace:"http://ec2.amazonaws.com/doc/2016-11-15",version:"2016-11-15",serviceTarget:"AmazonEC2"},serviceId:e?.serviceId??"EC2",urlParser:e?.urlParser??hf,utf8Decoder:e?.utf8Decoder??bo,utf8Encoder:e?.utf8Encoder??Ua}),oY=e=>{const t=cD(e),n=()=>t().then(MM),r=rY(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??IM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??iD({serviceId:r.serviceId,clientVersion:NQ.version}),maxAttempts:e?.maxAttempts??pf,region:e?.region??aD("Region is missing"),requestHandler:Zp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||ZM),sha256:e?.sha256??oD,streamCollector:e?.streamCollector??vb,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve($M)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(UM))}},hD=e=>({setRegion(t){e.region=t},region(){return e.region}}),pD=e=>({region:e.region()}),iY=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},aY=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),cY=(e,t)=>{const n=Object.assign(hD(e),DM(e),BO(e),iY(e));return t.forEach(r=>r.configure(n)),Object.assign(e,pD(n),kM(n),$O(n),aY(n))};class lY extends OM{config;constructor(...[t]){const n=oY(t||{});super(n),this.initConfig=n;const r=kQ(n),i=iM(r),c=WM(i),l=HM(c),f=l,d=KM(f),h=DQ(d),y=cY(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(BM(this.config)),this.middlewareStack.use(JM(this.config)),this.middlewareStack.use(FM(this.config)),this.middlewareStack.use(UO(this.config)),this.middlewareStack.use(jO(this.config)),this.middlewareStack.use(HO(this.config)),this.middlewareStack.use(FO(this.config,{httpAuthSchemeParametersProvider:IQ,identityProviderConfigProvider:async g=>new rM({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(qO(this.config))}destroy(){super.destroy()}}class kb extends wa{constructor(t){super(t),Object.setPrototypeOf(this,kb.prototype)}}const uY="AssociateCarrierIpAddress",mD="AdditionalInfo",fY="AttachmentId",dY="AmiLaunchIndex",hY="AttachmentLimitType",pY="AssociatePublicIpAddress",mY="AutoRecoverySupported",gY="AllRegions",gD="AssociatedResource",yD="AutoRecovery",vD="AmdSevSnp",yY="ArchitectureTypeList",Pb="AttachTime",Nb="AvailabilityZone",zb="AvailabilityZoneId",bD="Accelerators",vY="Affinity",SD="Arn",_D="Architecture",wD="Association",bY="Attachment",SY="Attachments",_Y="BaselineBandwidthInGbps",ED="BaselineBandwidthInMbps",Lb="BlockDeviceMapping",wY="BlockDeviceMappingList",EY="BlockDeviceMappingRequestList",Bb="BlockDeviceMappings",xY="BlockDurationMinutes",xD="BaselineIops",RD="BootMode",RY="BootModeTypeList",CY="BareMetal",TY="BurstablePerformanceSupported",CD="BaselineThroughputInMBps",TD="BandwidthWeighting",AY="BandwidthWeightingTypeList",IY="BandwidthWeightings",OY="CapacityBlockId",MY="CoreCountList",AD="CoreCount",DY="CpuCredits",kY="CreationDate",PY="CurrentGeneration",NY="CarrierIp",zY="CurrentInstanceBootMode",LY="CoreInfo",BY="CreateKeyPair",$Y="CreateKeyPairRequest",$b="CpuOptions",UY="CustomerOwnedIp",jY="CpuOptionsRequest",Ub="CapacityReservationId",ID="CapacityReservationPreference",OD="CapacityReservationResourceGroupArn",HY="CapacityReservationSpecificationResponse",jb="CapacityReservationSpecification",Hb="CapacityReservationTarget",FY="CapacityReservationTargetResponse",VY="CreditSpecificationRequest",qY="CreditSpecification",GY="CurrentState",MD="ClientToken",KY="ConnectionTrackingConfiguration",ZY="ConnectionTrackingSpecification",QY="ConnectionTrackingSpecificationRequest",YY="ConnectionTrackingSpecificationResponse",DD="CreateTime",kD="Code",PD="Configured",Bi="Count",XY="DisableApiStop",WY="DisableApiTermination",JY="DefaultCores",eX="DefaultEnaQueueCountPerInterface",tX="DedicatedHostsSupported",ND="DeviceIndex",nX="DiskInfoList",sX="DescribeImagesRequest",rX="DescribeImagesResult",oX="DescribeInstancesRequest",iX="DescribeInstancesResult",aX="DescribeInstanceTypesRequest",cX="DescribeInstanceTypesResult",lX="DescribeInstanceTypes",uX="DescribeImages",fX="DescribeInstances",dX="DiskInfo",hX="DeleteKeyPair",pX="DeleteKeyPairRequest",mX="DeleteKeyPairResult",gX="DescribeKeyPairsRequest",yX="DescribeKeyPairsResult",vX="DescribeKeyPairs",zD="DeviceName",bX="DefaultNetworkCardIndex",Cf="DeleteOnTermination",SX="DeregistrationProtection",is="DryRun",_X="DescribeRegionsRequest",wX="DescribeRegionsResult",EX="DescribeRegions",xX="DefaultThreadsPerCore",RX="DeprecationTime",CX="DefaultVCpus",TX="DescribeVolumesRequest",AX="DescribeVolumesResult",IX="DescribeVolumes",Fb="Description",OX="Device",MX="Disks",DX="EbsBlockDevice",kX="ExecutableByStringList",LD="ExecutableBy",tm="EbsCardIndex",PX="EbsCardInfoList",NX="EbsCardInfo",zX="EbsCards",LX="ElasticGpuAssociation",BX="ElasticGpuAssociationId",$X="ElasticGpuAssociationList",UX="ElasticGpuAssociationState",jX="ElasticGpuAssociationTime",HX="ElasticGpuAssociations",FX="ElasticGpuId",BD="ElasticGpuSpecification",VX="ElasticGpuSpecifications",$D="ElasticInferenceAccelerator",qX="ElasticInferenceAcceleratorAssociation",GX="ElasticInferenceAcceleratorAssociationId",KX="ElasticInferenceAcceleratorAssociationList",ZX="ElasticInferenceAcceleratorAssociationState",QX="ElasticInferenceAcceleratorAssociationTime",YX="ElasticInferenceAcceleratorArn",XX="ElasticInferenceAcceleratorAssociations",UD="ElasticInferenceAccelerators",WX="EbsInstanceBlockDevice",JX="EncryptionInTransitSupported",jD="EbsInfo",HD="EfaInfo",FD="EbsOptimized",VD="EbsOptimizedInfo",eW="EnclaveOptionsRequest",tW="EbsOptimizedSupport",Vb="EnclaveOptions",nW="EnablePrimaryIpv6",qD="EnaQueueCount",GD="EnableResourceNameDnsAAAARecord",KD="EnableResourceNameDnsARecord",ZD="EnaSrdEnabled",QD="EnaSrdSpecification",sW="EnaSrdSpecificationRequest",rW="EnaSrdSupported",YD="EnaSrdUdpEnabled",XD="EnaSrdUdpSpecification",oW="EnaSrdUdpSpecificationRequest",iW="EfaSupported",WD="EncryptionSupport",qb="EnaSupport",aW="EndTime",cW="ExecutableUsers",JD="Ebs",Gb="Enabled",ek="Encrypted",lW="Endpoint",tk="Force",uW="FpgaDeviceInfo",fW="FpgaDeviceInfoList",dW="FpgaDeviceMemoryInfo",hW="FlexibleEnaQueuesSupport",nk="FpgaInfo",pW="FilterList",mW="FastRestored",sk="FreeTierEligible",pl="Filters",$i="Filter",gW="Fpgas",Kb="Groups",yW="GpuDeviceInfo",vW="GpuDeviceInfoList",bW="GpuDeviceMemoryInfo",SW="GroupIdentifierList",rk="GpuInfo",ok="GroupId",_W="GroupIdentifier",ik="GroupName",wW="GpuPartitionSize",EW="Gpus",ak="HttpEndpoint",xW="HostId",Zb="HibernationOptions",RW="HibernationOptionsRequest",ck="HttpProtocolIpv6",lk="HttpPutResponseHopLimit",CW="HostResourceGroupArn",TW="HibernationSupported",uk="HttpTokens",fk="HostnameType",AW="Hibernate",Qb="Hypervisor",IW="Id",Yb="Ipv6Addresses",dk="Ipv6AddressCount",OW="InstanceAttachmentEnaSrdSpecification",MW="InstanceAttachmentEnaSrdUdpSpecification",hk="InferenceAcceleratorInfo",DW="Ipv4AddressesPerInterface",kW="Ipv6AddressesPerInterface",PW="ImageAllowed",Xb="Ipv6Address",NW="InstanceBlockDeviceMapping",zW="InstanceBlockDeviceMappingList",LW="IncludeDeprecated",BW="InferenceDeviceInfo",$W="InferenceDeviceInfoList",UW="InferenceDeviceMemoryInfo",jW="IncludeDisabled",xo="InstanceId",HW="InstanceIpv6Address",FW="InstanceIpv6AddressList",VW="InstanceInterruptionBehavior",Wb="IamInstanceProfile",qW="InstanceIpv4PrefixList",GW="InstanceIpv6PrefixList",KW="IamInstanceProfileSpecification",ZW="InstanceIpv4Prefix",QW="InstanceIpv6Prefix",YW="InstanceInitiatedShutdownBehavior",XW="ImageIdStringList",WW="InstanceIdStringList",Tf="ImageId",JW="ImageIds",Af="InstanceIds",eJ="ImportKeyPair",tJ="ImportKeyPairRequest",nJ="ImportKeyPairResult",sJ="ImageLocation",rJ="ImageList",oJ="InstanceLifecycle",iJ="InstanceList",aJ="InstanceMaintenanceOptions",cJ="InstanceMaintenanceOptionsRequest",lJ="InstanceMarketOptionsRequest",uJ="InstanceMetadataOptionsRequest",fJ="InstanceMetadataOptionsResponse",dJ="InstanceMarketOptions",pk="InstanceMetadataTags",hJ="InstanceNetworkInterface",pJ="InstanceNetworkInterfaceAssociation",mJ="InstanceNetworkInterfaceAttachment",gJ="InstanceNetworkInterfaceList",yJ="InstanceNetworkInterfaceSpecification",vJ="InstanceNetworkInterfaceSpecificationList",bJ="InstanceNetworkPerformanceOptions",SJ="InstanceNetworkPerformanceOptionsRequest",_J="ImageOwnerAlias",wJ="IpOwnerId",EJ="InstanceOwningService",xJ="Ipv6PrefixCount",RJ="Ipv4PrefixCount",CJ="InstancePrivateIpAddress",TJ="InstancePrivateIpAddressList",AJ="IsPrimaryIpv6",IJ="IncludePublicKey",OJ="Ipv4PrefixList",MJ="Ipv6PrefixList",DJ="Ipv4PrefixSpecificationRequest",kJ="Ipv6PrefixSpecificationRequest",mk="Ipv6Prefixes",Jb="Ipv6Prefix",gk="Ipv4Prefixes",eS="Ipv4Prefix",PJ="InstanceStateChange",NJ="InstanceStateChangeList",yk="InstanceStorageInfo",zJ="InstanceStorageSupported",LJ="ImdsSupport",BJ="InstanceState",$J="Ipv6Supported",nm="InstanceType",UJ="InstanceTypeInfoList",jJ="InstanceTypeInfo",HJ="ImageType",vk="InstanceTypes",bk="InterfaceType",FJ="Images",VJ="Image",qJ="Instance",GJ="Instances",tS="Iops",KJ="Key",ZJ="KeyFormat",nS="KeyFingerprint",sS="KernelId",Sk="KmsKeyId",QJ="KeyMaterial",$r="KeyName",YJ="KeyNameStringList",XJ="KeyNames",WJ="KeyPairs",ja="KeyPairId",JJ="KeyPairIdStringList",eee="KeyPairIds",tee="KeyPairInfo",nee="KeyPairList",see="KeyPair",_k="KeyType",wk="LicenseConfigurationArn",ree="LicenseConfigurationRequest",oee="LicenseConfiguration",iee="LogicalGpuCount",aee="LicenseList",cee="LastLaunchedTime",lee="LicenseSpecifications",uee="LicenseSpecificationListRequest",fee="LicenseSpecification",dee="LaunchTemplate",hee="LaunchTemplateId",pee="LaunchTemplateName",mee="LaunchTemplateSpecification",gee="LaunchTime",yee="Licenses",Ek="MultiAttachEnabled",xk="MediaAcceleratorInfo",vee="MacAddress",Rk="MaximumBandwidthInMbps",bee="MaxCount",See="MinCount",_ee="MediaDeviceInfo",wee="MediaDeviceInfoList",Eee="MediaDeviceMemoryInfo",xee="MaximumEbsAttachments",Ree="MaximumEbsCards",Cee="MaximumEfaInterfaces",Tee="MaximumEnaQueueCount",Aee="MaximumEnaQueueCountPerInterface",Ck="MaximumIops",Ha="MemoryInfo",Iee="MaximumNetworkCards",Tk="MaximumNetworkInterfaces",Ak="MetadataOptions",Ik="MaintenanceOptions",Oee="MaxPrice",sm="MaxResults",Mee="ModificationState",Dee="MarketType",Ok="MaximumThroughputInMBps",kee="ModifyVolumeRequest",Pee="ModifyVolumeResult",Nee="ModifyVolume",If="Manufacturer",zee="Managed",Lee="Message",rS="Monitoring",Ro="Name",Bee="NetworkCards",oS="NetworkCardIndex",$ee="NetworkCardInfoList",Uee="NetworkCardInfo",jee="NoDevice",Hee="NeuronDeviceCoreInfo",Fee="NeuronDeviceInfo",Vee="NeuronDeviceInfoList",qee="NeuronDeviceMemoryInfo",Gee="NeuronDevices",Kee="NitroEnclavesSupport",Mk="NetworkInterfaceId",Dk="NetworkInterfaces",kk="NetworkInfo",Pk="NeuronInfo",Nk="NetworkPerformanceOptions",zk="NetworkPerformance",Lk="NvmeSupport",Bk="NitroTpmInfo",Zee="NitroTpmSupport",Qee="NitroTpmSupportedVersionsList",Ui="NextToken",iS="OutpostArn",aS="OwnerId",Yee="OptInStatus",Xee="OriginalIops",Wee="OriginalMultiAttachEnabled",Jee="OperatorRequest",ete="OperatorResponse",tte="OwnerStringList",nte="OriginalSize",ste="OriginalThroughput",rte="OriginalVolumeType",Of="Operator",ote="Owners",$k="Owner",Uk="Principal",ite="PeakBandwidthInGbps",ate="ProductCodeId",cte="ProductCodeList",lte="ProductCodeType",ute="ProductCode",jk="ProductCodes",cS="PrivateDnsName",Hk="PrivateDnsNameOptions",fte="PrivateDnsNameOptionsRequest",dte="PrivateDnsNameOptionsResponse",Fk="PublicDnsName",Vk="PlatformDetails",qk="PlacementGroupInfo",hte="PlacementGroupStrategyList",pte="PublicIp",mte="PrivateIpAddressSpecification",gte="PrivateIpAddressSpecificationList",ml="PrivateIpAddress",Gk="PrivateIpAddresses",yte="PublicIpAddress",vte="PrimaryIpv6",Kk="ProcessorInfo",bte="PublicKey",Ste="PublicKeyMaterial",_te="PartitionNumber",wte="PhcSupport",Ete="PreviousState",Zk="Platform",lS="Placement",Qk="Primary",xte="Progress",Rte="Public",Cte="Return",Yk="RootDeviceName",Xk="RootDeviceType",Tte="RootDeviceTypeList",Ate="RunInstancesMonitoringEnabled",Ite="RebootInstancesRequest",Ote="RunInstancesRequest",Mte="RunInstancesUserData",uS="RamdiskId",Dte="ReservationId",kte="RebootInstances",Pte="RequesterId",Nte="RunInstances",zte="RegionList",Lte="ReservationList",Bte="RebootMigrationSupport",$te="RebootMigration",fS="RegionName",Ute="RegionNameStringList",jte="RegionNames",Hte="ResourceType",Fte="Regions",Vte="Region",qte="Reservations",Gte="Reservation",Kte="SupportedAdditionalProcessorFeatureList",Zte="SupportedArchitectures",Qte="SupportedBootModes",Yte="SustainedClockSpeedInGhz",Wk="SourceDestCheck",Xte="SpreadDomain",Wte="SupportedFeatures",Jk="SecurityGroups",dS="SecurityGroupId",Jte="SecurityGroupIdStringList",ene="SecurityGroupIds",tne="SecurityGroupStringList",e3="SecurityGroup",nne="SizeInGB",sne="SourceImageId",rne="SourceInstanceId",gl="SizeInMiB",one="SpotInstanceRequestId",ine="SourceImageRegion",ane="StartInstancesRequest",cne="StartInstancesResult",lne="StopInstancesRequest",une="StopInstancesResult",fne="SpotInstanceType",t3="SnapshotId",dne="StartingInstances",hne="StartInstances",pne="StoppingInstances",mne="StopInstances",rm="SubnetId",gne="SpotMarketOptions",yne="StatusMessage",n3="SriovNetSupport",vne="SpotOptions",s3="SkipOsShutdown",bne="SecondaryPrivateIpAddressCount",Sne="SupportedRootDeviceTypes",hS="StateReason",_ne="SupportedStrategies",wne="StartTime",Ene="StateTransitionReason",xne="SseType",Rne="SupportedUsageClasses",Cne="SensitiveUserData",Tne="SourceVolumeId",Ane="SupportedVirtualizationTypes",Ine="SupportedVersions",r3="Size",yl="State",pS="Status",Fa="Tags",o3="TcpEstablishedTimeout",One="TotalFpgaMemoryInMiB",Mne="TotalGpuMemoryInMiB",Dne="TerminateInstances",kne="TotalInferenceMemoryInMiB",Pne="TerminateInstancesRequest",Nne="TerminateInstancesResult",zne="TargetIops",Lne="TerminatingInstances",Bne="TagList",$ne="TargetMultiAttachEnabled",Une="TotalMediaMemoryInMiB",jne="TotalNeuronDeviceMemoryInMiB",i3="ThreadsPerCore",Hne="ThreadsPerCoreList",mS="TagSpecifications",Fne="TotalSizeInGB",Vne="TagSpecificationList",om="TagSpecification",qne="TargetSize",a3="TpmSupport",Gne="TargetThroughput",Kne="TargetVolumeType",c3="Tag",Zne="Tenancy",gS="Throughput",yS="Type",Qne="UsageClassTypeList",Yne="UserData",l3="UsageOperation",Xne="UsageOperationUpdateTime",u3="UdpStreamTimeout",f3="UdpTimeout",d3="Value",Wne="VolumeAttachmentList",Jne="VolumeAttachment",h3="VCpuInfo",ese="ValidCores",p3="VpcId",m3="VolumeInitializationRate",tse="VolumeIdStringList",Va="VolumeId",nse="VolumeIds",sse="VolumeList",g3="VolumeModification",rse="VirtualName",ose="VolumeOwnerId",ise="ValueStringList",ase="VolumeSize",vS="VolumeType",cse="VirtualizationTypeList",lse="ValidThreadsPerCore",y3="VirtualizationType",use="ValidUntil",fse="Values",v3="Version",dse="Volumes",hse="Volume",pse="WorkloadsList",mse="Workloads",b3="additionalInfo",gse="attachmentId",yse="amiLaunchIndex",vse="attachmentLimitType",bse="associatePublicIpAddress",Sse="autoRecoverySupported",S3="associatedResource",_se="autoRecovery",wse="amdSevSnp",Ese="attachmentSet",bS="attachTime",SS="availabilityZone",_3="availabilityZoneId",w3="accelerators",xse="affinity",E3="arn",x3="architecture",R3="association",Rse="attachment",Cse="baselineBandwidthInGbps",C3="baselineBandwidthInMbps",T3="blockDeviceMapping",A3="baselineIops",I3="bootMode",Tse="bareMetal",Ase="burstablePerformanceSupported",O3="baselineThroughputInMBps",Ise="bandwidthWeighting",Ose="bandwidthWeightings",Mse="capacityBlockId",Dse="coreCount",kse="creationDate",Pse="currentGeneration",Nse="carrierIp",zse="currentInstanceBootMode",Lse="coreInfo",Bse="cpuOptions",$se="customerOwnedIp",M3="capacityReservationId",Use="capacityReservationPreference",jse="capacityReservationResourceGroupArn",Hse="capacityReservationSpecification",Fse="capacityReservationTarget",Vse="currentState",D3="clientToken",qse="connectionTrackingConfiguration",k3="createTime",P3="code",Gse="configured",qa="count",Kse="disableApiTermination",Zse="defaultCores",Qse="defaultEnaQueueCountPerInterface",Yse="dedicatedHostsSupported",N3="deviceIndex",z3="deviceName",Xse="defaultNetworkCardIndex",Wse="dnsName",Mf="deleteOnTermination",Jse="deregistrationProtection",Ls="dryRun",ere="defaultThreadsPerCore",tre="deprecationTime",nre="defaultVCpus",_S="description",sre="device",rre="disks",wS="ebsCardIndex",ore="ebsCardSet",ire="elasticGpuAssociationId",are="elasticGpuAssociationState",cre="elasticGpuAssociationSet",lre="elasticGpuAssociationTime",ure="elasticGpuId",fre="elasticInferenceAcceleratorArn",dre="elasticInferenceAcceleratorAssociationId",hre="elasticInferenceAcceleratorAssociationState",pre="elasticInferenceAcceleratorAssociationSet",mre="elasticInferenceAcceleratorAssociationTime",gre="encryptionInTransitSupported",yre="ebsInfo",vre="efaInfo",L3="ebsOptimized",bre="ebsOptimizedInfo",Sre="ebsOptimizedSupport",_re="enclaveOptions",wre="enaQueueCount",E="ec2QueryName",Ere="enableResourceNameDnsAAAARecord",xre="enableResourceNameDnsARecord",Rre="enaSrdEnabled",Cre="enaSrdSpecification",Tre="enaSrdSupported",Are="enaSrdUdpEnabled",Ire="enaSrdUdpSpecification",Ore="efaSupported",B3="encryptionSupport",ES="enaSupport",Mre="endTime",$3="ebs",U3="enabled",j3="encrypted",Dre="flexibleEnaQueuesSupport",kre="fpgaInfo",Pre="fastRestored",H3="freeTierEligible",Nre="force",zre="fpgas",Lre="gpuInfo",F3="groupId",V3="groupName",Bre="gpuPartitionSize",xS="groupSet",$re="gpus",RS="hypervisor",Ure="httpEndpoint",jre="hostId",Hre="hibernationOptions",Fre="httpProtocolIpv6",Vre="httpPutResponseHopLimit",qre="hostResourceGroupArn",Gre="hibernationSupported",Kre="httpTokens",Zre="hostnameType",Qre="id",Yre="ipv6AddressCount",Xre="inferenceAcceleratorInfo",Wre="ipv4AddressesPerInterface",Jre="ipv6AddressesPerInterface",q3="ipv6AddressesSet",eoe="imageAllowed",toe="ipAddress",G3="ipv6Address",CS="instanceId",K3="iamInstanceProfile",noe="instanceInitiatedShutdownBehavior",Z3="imageId",soe="imageLocation",roe="instanceLifecycle",ooe="instanceMetadataTags",ioe="imageOwnerAlias",aoe="imageOwnerId",coe="ipOwnerId",loe="instanceOwningService",uoe="isPrimaryIpv6",foe="ipv4PrefixSet",doe="ipv6PrefixSet",hoe="ipv4Prefix",poe="ipv6Prefix",moe="isPublic",goe="instanceStorageInfo",yoe="instanceStorageSupported",voe="imagesSet",boe="imageState",Soe="imdsSupport",im="instancesSet",_oe="instanceState",woe="ipv6Supported",Q3="instanceType",Eoe="instanceTypeSet",xoe="idempotencyToken",Roe="imageType",Coe="interfaceType",Y3="iops",je="item",Toe="key",TS="keyFingerprint",X3="kernelId",W3="kmsKeyId",Aoe="keyMaterial",Df="keyName",am="keyPairId",Ioe="keySet",Ooe="keyType",Moe="licenseConfigurationArn",Doe="logicalGpuCount",koe="lastLaunchedTime",Poe="licenseSet",Noe="launchTime",zoe="multiAttachEnabled",Loe="mediaAcceleratorInfo",Boe="macAddress",J3="maximumBandwidthInMbps",$oe="maximumEbsAttachments",Uoe="maximumEbsCards",joe="maximumEfaInterfaces",Hoe="maximumEnaQueueCount",Foe="maximumEnaQueueCountPerInterface",eP="maximumIops",vl="memoryInfo",Voe="maximumNetworkCards",tP="maximumNetworkInterfaces",qoe="metadataOptions",Goe="maintenanceOptions",nP="maxResults",Koe="modificationState",sP="maximumThroughputInMBps",kf="manufacturer",Zoe="managed",Qoe="message",Yoe="monitoring",ji="name",Xoe="networkCards",rP="networkCardIndex",Woe="noDevice",Joe="neuronDevices",eie="nitroEnclavesSupport",oP="networkInterfaceId",tie="networkInterfaceSet",nie="networkInterface",sie="networkInfo",rie="neuronInfo",oie="networkPerformanceOptions",iP="networkPerformance",aP="nvmeSupport",iie="nitroTpmInfo",aie="nitroTpmSupport",bl="nextToken",AS="outpostArn",cP="ownerId",cie="optInStatus",lie="originalIops",uie="originalMultiAttachEnabled",fie="originalSize",die="originalThroughput",hie="originalVolumeType",cm="operator",pie="principal",mie="peakBandwidthInGbps",lP="productCodes",gie="productCode",yie="privateDnsNameOptions",IS="privateDnsName",vie="publicDnsName",uP="platformDetails",bie="placementGroupInfo",Sie="publicIp",fP="privateIpAddressesSet",Sl="privateIpAddress",_ie="processorInfo",wie="publicKey",Eie="publicKeyMaterial",xie="partitionNumber",Rie="phcSupport",Cie="previousState",dP="platform",Tie="placement",hP="primary",Aie="progress",Iie="return",pP="rootDeviceName",mP="rootDeviceType",Oie="regionEndpoint",Mie="reservationId",gP="ramdiskId",Die="regionInfo",kie="requesterId",Pie="rebootMigrationSupport",Nie="rebootMigration",zie="regionName",Lie="reservationSet",Bie="resourceType",$ie="reason",Uie="supportedArchitectures",jie="supportedBootModes",Hie="sustainedClockSpeedInGhz",yP="sourceDestCheck",Fie="spreadDomain",Vie="supportedFeatures",qie="sizeInGB",Gie="sourceInstanceId",Kie="sourceImageId",_l="sizeInMiB",Zie="sourceImageRegion",Qie="spotInstanceRequestId",vP="snapshotId",OS="subnetId",Yie="statusMessage",bP="sriovNetSupport",Xie="secondaryPrivateIpAddressCount",Wie="supportedRootDeviceTypes",SP="stateReason",Jie="supportedStrategies",eae="startTime",tae="sseType",nae="supportedUsageClasses",sae="sourceVolumeId",rae="supportedVirtualizationTypes",oae="supportedVersions",iae="size",_P="smithy.ts.sdk.synthetic.com.amazonaws.ec2",wP="state",Pf="status",aae="tenancy",cae="tcpEstablishedTimeout",lae="totalFpgaMemoryInMiB",uae="totalGpuMemoryInMiB",fae="totalInferenceMemoryInMiB",dae="targetIops",hae="targetMultiAttachEnabled",pae="totalMediaMemoryInMiB",mae="totalNeuronDeviceMemoryInMiB",gae="threadsPerCore",wl="tagSet",yae="totalSizeInGB",vae="targetSize",EP="tpmSupport",bae="targetThroughput",Sae="targetVolumeType",xP="throughput",RP="type",CP="usageOperation",_ae="usageOperationUpdateTime",wae="udpStreamTimeout",Eae="udpTimeout",xae="value",Rae="vCpuInfo",Cae="validCores",TP="vpcId",Tae="volumeInitializationRate",lm="volumeId",Aae="volumeModification",Iae="virtualName",Oae="volumeOwnerId",Mae="volumeSet",Dae="volumeSize",AP="volumeType",kae="validThreadsPerCore",IP="virtualizationType",Pae="version",Nae="workloadSet",S="xmlName",F="com.amazonaws.ec2";var zae=[0,F,Mte,8,0],Lae=[0,F,Cne,8,0],OP=[3,F,Lb,0,[JD,jee,zD,rse],[[()=>lce,{[E]:"Ebs",[S]:$3}],[0,{[E]:"NoDevice",[S]:Woe}],[0,{[E]:"DeviceName",[S]:z3}],[0,{[E]:"VirtualName",[S]:Iae}]]],Bae=[3,F,jb,0,[ID,Hb],[0,()=>Uae]],$ae=[3,F,HY,0,[ID,Hb],[[0,{[E]:"CapacityReservationPreference",[S]:Use}],[()=>jae,{[E]:"CapacityReservationTarget",[S]:Fse}]]],Uae=[3,F,Hb,0,[Ub,OD],[0,0]],jae=[3,F,FY,0,[Ub,OD],[[0,{[E]:"CapacityReservationId",[S]:M3}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:jse}]]],Hae=[3,F,QY,0,[o3,u3,f3],[1,1,1]],Fae=[3,F,YY,0,[o3,u3,f3],[[1,{[E]:"TcpEstablishedTimeout",[S]:cae}],[1,{[E]:"UdpStreamTimeout",[S]:wae}],[1,{[E]:"UdpTimeout",[S]:Eae}]]],Vae=[3,F,$b,0,[AD,i3,vD],[[1,{[E]:"CoreCount",[S]:Dse}],[1,{[E]:"ThreadsPerCore",[S]:gae}],[0,{[E]:"AmdSevSnp",[S]:wse}]]],qae=[3,F,jY,0,[AD,i3,vD],[1,1,0]],Gae=[3,F,$Y,0,[$r,_k,mS,ZJ,is],[0,0,[()=>PS,{[S]:om}],0,[2,{[E]:"DryRun",[S]:Ls}]],1],Kae=[3,F,VY,0,[DY],[0],1],Zae=[3,F,pX,0,[$r,ja,is],[0,0,[2,{[E]:"DryRun",[S]:Ls}]]],Qae=[3,F,mX,0,[Cte,ja],[[2,{[E]:"Return",[S]:Iie}],[0,{[E]:"KeyPairId",[S]:am}]]],Yae=[3,F,sX,0,[cW,JW,ote,LW,jW,sm,Ui,is,pl],[[()=>hue,{[S]:LD}],[()=>gue,{[S]:Tf}],[()=>Bue,{[S]:$k}],2,2,1,0,[2,{[E]:"DryRun",[S]:Ls}],[()=>El,{[S]:$i}]]],Xae=[3,F,rX,0,[Ui,FJ],[[0,{[E]:"NextToken",[S]:bl}],[()=>yue,{[E]:"ImagesSet",[S]:voe}]]],Wae=[3,F,oX,0,[Af,is,pl,Ui,sm],[[()=>Nf,{[S]:xo}],[2,{[E]:"DryRun",[S]:Ls}],[()=>El,{[S]:$i}],[0,{[E]:"NextToken",[S]:bl}],[1,{[E]:"MaxResults",[S]:nP}]]],Jae=[3,F,iX,0,[Ui,qte],[[0,{[E]:"NextToken",[S]:bl}],[()=>Fue,{[E]:"ReservationSet",[S]:Lie}]]],ece=[3,F,aX,0,[is,vk,pl,sm,Ui],[2,[64,{[S]:nm}],[()=>El,{[S]:$i}],1,0]],tce=[3,F,cX,0,[vk,Ui],[[()=>Cue,{[E]:"InstanceTypeSet",[S]:Eoe}],[0,{[E]:"NextToken",[S]:bl}]]],nce=[3,F,gX,0,[XJ,eee,IJ,is,pl],[[()=>Iue,{[S]:$r}],[()=>Oue,{[S]:ja}],2,[2,{[E]:"DryRun",[S]:Ls}],[()=>El,{[S]:$i}]]],sce=[3,F,yX,0,[WJ],[[()=>Mue,{[E]:"KeySet",[S]:Ioe}]]],rce=[3,F,_X,0,[jte,gY,is,pl],[[()=>Hue,{[S]:fS}],2,[2,{[E]:"DryRun",[S]:Ls}],[()=>El,{[S]:$i}]]],oce=[3,F,wX,0,[Fte],[[()=>jue,{[E]:"RegionInfo",[S]:Die}]]],ice=[3,F,TX,0,[nse,is,pl,Ui,sm],[[()=>Wue,{[S]:Va}],[2,{[E]:"DryRun",[S]:Ls}],[()=>El,{[S]:$i}],[0,{[E]:"NextToken",[S]:bl}],[1,{[E]:"MaxResults",[S]:nP}]]],ace=[3,F,AX,0,[Ui,dse],[[0,{[E]:"NextToken",[S]:bl}],[()=>Jue,{[E]:"VolumeSet",[S]:Mae}]]],cce=[3,F,dX,0,[nne,Bi,yS],[[1,{[E]:"SizeInGB",[S]:qie}],[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Type",[S]:RP}]]],lce=[3,F,DX,0,[Cf,tS,t3,ase,vS,Sk,gS,iS,Nb,ek,m3,zb,tm],[[2,{[E]:"DeleteOnTermination",[S]:Mf}],[1,{[E]:"Iops",[S]:Y3}],[0,{[E]:"SnapshotId",[S]:vP}],[1,{[E]:"VolumeSize",[S]:Dae}],[0,{[E]:"VolumeType",[S]:AP}],[0,{[E]:"KmsKeyId",[S]:W3}],[1,{[E]:"Throughput",[S]:xP}],[0,{[E]:"OutpostArn",[S]:AS}],[0,{[E]:"AvailabilityZone",[S]:SS}],[2,{[E]:"Encrypted",[S]:j3}],1,0,1]],uce=[3,F,NX,0,[tm,ED,CD,xD,Rk,Ok,Ck],[[1,{[E]:"EbsCardIndex",[S]:wS}],[1,{[E]:"BaselineBandwidthInMbps",[S]:C3}],[1,{[E]:"BaselineThroughputInMBps",[S]:O3}],[1,{[E]:"BaselineIops",[S]:A3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:J3}],[1,{[E]:"MaximumThroughputInMBps",[S]:sP}],[1,{[E]:"MaximumIops",[S]:eP}]]],fce=[3,F,jD,0,[tW,WD,VD,Lk,xee,hY,Ree,zX],[[0,{[E]:"EbsOptimizedSupport",[S]:Sre}],[0,{[E]:"EncryptionSupport",[S]:B3}],[()=>hce,{[E]:"EbsOptimizedInfo",[S]:bre}],[0,{[E]:"NvmeSupport",[S]:aP}],[1,{[E]:"MaximumEbsAttachments",[S]:$oe}],[0,{[E]:"AttachmentLimitType",[S]:vse}],[1,{[E]:"MaximumEbsCards",[S]:Uoe}],[()=>cue,{[E]:"EbsCardSet",[S]:ore}]]],dce=[3,F,WX,0,[Pb,Cf,pS,Va,gD,ose,Of,tm],[[4,{[E]:"AttachTime",[S]:bS}],[2,{[E]:"DeleteOnTermination",[S]:Mf}],[0,{[E]:"Status",[S]:Pf}],[0,{[E]:"VolumeId",[S]:lm}],[0,{[E]:"AssociatedResource",[S]:S3}],[0,{[E]:"VolumeOwnerId",[S]:Oae}],[()=>um,{[E]:"Operator",[S]:cm}],[1,{[E]:"EbsCardIndex",[S]:wS}]]],hce=[3,F,VD,0,[ED,CD,xD,Rk,Ok,Ck],[[1,{[E]:"BaselineBandwidthInMbps",[S]:C3}],[1,{[E]:"BaselineThroughputInMBps",[S]:O3}],[1,{[E]:"BaselineIops",[S]:A3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:J3}],[1,{[E]:"MaximumThroughputInMBps",[S]:sP}],[1,{[E]:"MaximumIops",[S]:eP}]]],pce=[3,F,HD,0,[Cee],[[1,{[E]:"MaximumEfaInterfaces",[S]:joe}]]],mce=[3,F,LX,0,[FX,BX,UX,jX],[[0,{[E]:"ElasticGpuId",[S]:ure}],[0,{[E]:"ElasticGpuAssociationId",[S]:ire}],[0,{[E]:"ElasticGpuAssociationState",[S]:are}],[0,{[E]:"ElasticGpuAssociationTime",[S]:lre}]]],gce=[3,F,BD,0,[yS],[0],1],yce=[3,F,$D,0,[yS,Bi],[0,1],1],vce=[3,F,qX,0,[YX,GX,ZX,QX],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:fre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:dre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:hre}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:mre}]]],bce=[3,F,sW,0,[ZD,XD],[2,()=>Sce]],Sce=[3,F,oW,0,[YD],[2]],_ce=[3,F,Vb,0,[Gb],[[2,{[E]:"Enabled",[S]:U3}]]],wce=[3,F,eW,0,[Gb],[2]],Ece=[3,F,$i,0,[Ro,fse],[0,[()=>Que,{[S]:d3}]]],xce=[3,F,uW,0,[Ro,If,Bi,Ha],[[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:kf}],[1,{[E]:"Count",[S]:qa}],[()=>Rce,{[E]:"MemoryInfo",[S]:vl}]]],Rce=[3,F,dW,0,[gl],[[1,{[E]:"SizeInMiB",[S]:_l}]]],Cce=[3,F,nk,0,[gW,One],[[()=>pue,{[E]:"Fpgas",[S]:zre}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:lae}]]],Tce=[3,F,yW,0,[Ro,If,Bi,iee,wW,mse,Ha],[[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:kf}],[1,{[E]:"Count",[S]:qa}],[1,{[E]:"LogicalGpuCount",[S]:Doe}],[1,{[E]:"GpuPartitionSize",[S]:Bre}],[()=>efe,{[E]:"WorkloadSet",[S]:Nae}],[()=>Ace,{[E]:"MemoryInfo",[S]:vl}]]],Ace=[3,F,bW,0,[gl],[[1,{[E]:"SizeInMiB",[S]:_l}]]],Ice=[3,F,rk,0,[EW,Mne],[[()=>mue,{[E]:"Gpus",[S]:$re}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:uae}]]],Oce=[3,F,_W,0,[ok,ik],[[0,{[E]:"GroupId",[S]:F3}],[0,{[E]:"GroupName",[S]:V3}]]],Mce=[3,F,Zb,0,[PD],[[2,{[E]:"Configured",[S]:Gse}]]],Dce=[3,F,RW,0,[PD],[2]],kce=[3,F,Wb,0,[SD,IW],[[0,{[E]:"Arn",[S]:E3}],[0,{[E]:"Id",[S]:Qre}]]],Pce=[3,F,KW,0,[SD,Ro],[[0,{[E]:"Arn",[S]:E3}],[0,{[E]:"Name",[S]:ji}]]],Nce=[3,F,VJ,0,[Vk,l3,Bb,Fb,qb,Qb,_J,Ro,Yk,Xk,n3,hS,Fa,y3,RD,a3,RX,LJ,rne,SX,cee,PW,sne,ine,sk,Tf,sJ,yl,aS,kY,Rte,jk,_D,HJ,sS,uS,Zk],[[0,{[E]:"PlatformDetails",[S]:uP}],[0,{[E]:"UsageOperation",[S]:CP}],[()=>sue,{[E]:"BlockDeviceMapping",[S]:T3}],[0,{[E]:"Description",[S]:_S}],[2,{[E]:"EnaSupport",[S]:ES}],[0,{[E]:"Hypervisor",[S]:RS}],[0,{[E]:"ImageOwnerAlias",[S]:ioe}],[0,{[E]:"Name",[S]:ji}],[0,{[E]:"RootDeviceName",[S]:pP}],[0,{[E]:"RootDeviceType",[S]:mP}],[0,{[E]:"SriovNetSupport",[S]:bP}],[()=>PP,{[E]:"StateReason",[S]:SP}],[()=>Ga,{[E]:"TagSet",[S]:wl}],[0,{[E]:"VirtualizationType",[S]:IP}],[0,{[E]:"BootMode",[S]:I3}],[0,{[E]:"TpmSupport",[S]:EP}],[0,{[E]:"DeprecationTime",[S]:tre}],[0,{[E]:"ImdsSupport",[S]:Soe}],[0,{[E]:"SourceInstanceId",[S]:Gie}],[0,{[E]:"DeregistrationProtection",[S]:Jse}],[0,{[E]:"LastLaunchedTime",[S]:koe}],[2,{[E]:"ImageAllowed",[S]:eoe}],[0,{[E]:"SourceImageId",[S]:Kie}],[0,{[E]:"SourceImageRegion",[S]:Zie}],[2,{[E]:"FreeTierEligible",[S]:H3}],[0,{[E]:"ImageId",[S]:Z3}],[0,{[E]:"ImageLocation",[S]:soe}],[0,{[E]:"ImageState",[S]:boe}],[0,{[E]:"ImageOwnerId",[S]:aoe}],[0,{[E]:"CreationDate",[S]:kse}],[2,{[E]:"IsPublic",[S]:moe}],[()=>NP,{[E]:"ProductCodes",[S]:lP}],[0,{[E]:"Architecture",[S]:x3}],[0,{[E]:"ImageType",[S]:Roe}],[0,{[E]:"KernelId",[S]:X3}],[0,{[E]:"RamdiskId",[S]:gP}],[0,{[E]:"Platform",[S]:dP}]]],zce=[3,F,tJ,0,[$r,Ste,mS,is],[[0,{[E]:"KeyName",[S]:Df}],[21,{[E]:"PublicKeyMaterial",[S]:Eie}],[()=>PS,{[S]:om}],[2,{[E]:"DryRun",[S]:Ls}]],2],Lce=[3,F,nJ,0,[nS,$r,ja,Fa],[[0,{[E]:"KeyFingerprint",[S]:TS}],[0,{[E]:"KeyName",[S]:Df}],[0,{[E]:"KeyPairId",[S]:am}],[()=>Ga,{[E]:"TagSet",[S]:wl}]]],Bce=[3,F,hk,0,[bD,kne],[[()=>vue,{[E]:"Accelerators",[S]:w3}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:fae}]]],$ce=[3,F,BW,0,[Bi,Ro,If,Ha],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:kf}],[()=>Uce,{[E]:"MemoryInfo",[S]:vl}]]],Uce=[3,F,UW,0,[gl],[[1,{[E]:"SizeInMiB",[S]:_l}]]],jce=[3,F,qJ,0,[_D,Bb,MD,FD,qb,Qb,Wb,oJ,HX,XX,Dk,iS,Yk,Xk,Jk,Wk,one,n3,hS,Fa,y3,$b,OY,Ub,jb,Zb,yee,Ak,Vb,RD,Vk,l3,Xne,Hk,Xb,a3,Ik,zY,Nk,Of,xo,Tf,yl,cS,Fk,Ene,$r,dY,jk,nm,gee,lS,sS,uS,Zk,rS,rm,p3,ml,yte],[[0,{[E]:"Architecture",[S]:x3}],[()=>bue,{[E]:"BlockDeviceMapping",[S]:T3}],[0,{[E]:"ClientToken",[S]:D3}],[2,{[E]:"EbsOptimized",[S]:L3}],[2,{[E]:"EnaSupport",[S]:ES}],[0,{[E]:"Hypervisor",[S]:RS}],[()=>kce,{[E]:"IamInstanceProfile",[S]:K3}],[0,{[E]:"InstanceLifecycle",[S]:roe}],[()=>lue,{[E]:"ElasticGpuAssociationSet",[S]:cre}],[()=>fue,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:pre}],[()=>Eue,{[E]:"NetworkInterfaceSet",[S]:tie}],[0,{[E]:"OutpostArn",[S]:AS}],[0,{[E]:"RootDeviceName",[S]:pP}],[0,{[E]:"RootDeviceType",[S]:mP}],[()=>MS,{[E]:"GroupSet",[S]:xS}],[2,{[E]:"SourceDestCheck",[S]:yP}],[0,{[E]:"SpotInstanceRequestId",[S]:Qie}],[0,{[E]:"SriovNetSupport",[S]:bP}],[()=>PP,{[E]:"StateReason",[S]:SP}],[()=>Ga,{[E]:"TagSet",[S]:wl}],[0,{[E]:"VirtualizationType",[S]:IP}],[()=>Vae,{[E]:"CpuOptions",[S]:Bse}],[0,{[E]:"CapacityBlockId",[S]:Mse}],[0,{[E]:"CapacityReservationId",[S]:M3}],[()=>$ae,{[E]:"CapacityReservationSpecification",[S]:Hse}],[()=>Mce,{[E]:"HibernationOptions",[S]:Hre}],[()=>Due,{[E]:"LicenseSet",[S]:Poe}],[()=>Wce,{[E]:"MetadataOptions",[S]:qoe}],[()=>_ce,{[E]:"EnclaveOptions",[S]:_re}],[0,{[E]:"BootMode",[S]:I3}],[0,{[E]:"PlatformDetails",[S]:uP}],[0,{[E]:"UsageOperation",[S]:CP}],[4,{[E]:"UsageOperationUpdateTime",[S]:_ae}],[()=>Dle,{[E]:"PrivateDnsNameOptions",[S]:yie}],[0,{[E]:"Ipv6Address",[S]:G3}],[0,{[E]:"TpmSupport",[S]:EP}],[()=>Zce,{[E]:"MaintenanceOptions",[S]:Goe}],[0,{[E]:"CurrentInstanceBootMode",[S]:zse}],[()=>nle,{[E]:"NetworkPerformanceOptions",[S]:oie}],[()=>um,{[E]:"Operator",[S]:cm}],[0,{[E]:"InstanceId",[S]:CS}],[0,{[E]:"ImageId",[S]:Z3}],[()=>Ov,{[E]:"InstanceState",[S]:_oe}],[0,{[E]:"PrivateDnsName",[S]:IS}],[0,{[E]:"DnsName",[S]:Wse}],[0,{[E]:"Reason",[S]:$ie}],[0,{[E]:"KeyName",[S]:Df}],[1,{[E]:"AmiLaunchIndex",[S]:yse}],[()=>NP,{[E]:"ProductCodes",[S]:lP}],[0,{[E]:"InstanceType",[S]:Q3}],[4,{[E]:"LaunchTime",[S]:Noe}],[()=>DP,{[E]:"Placement",[S]:Tie}],[0,{[E]:"KernelId",[S]:X3}],[0,{[E]:"RamdiskId",[S]:gP}],[0,{[E]:"Platform",[S]:dP}],[()=>_le,{[E]:"Monitoring",[S]:Yoe}],[0,{[E]:"SubnetId",[S]:OS}],[0,{[E]:"VpcId",[S]:TP}],[0,{[E]:"PrivateIpAddress",[S]:Sl}],[0,{[E]:"IpAddress",[S]:toe}]]],Hce=[3,F,OW,0,[ZD,XD],[[2,{[E]:"EnaSrdEnabled",[S]:Rre}],[()=>Fce,{[E]:"EnaSrdUdpSpecification",[S]:Ire}]]],Fce=[3,F,MW,0,[YD],[[2,{[E]:"EnaSrdUdpEnabled",[S]:Are}]]],Vce=[3,F,NW,0,[zD,JD],[[0,{[E]:"DeviceName",[S]:z3}],[()=>dce,{[E]:"Ebs",[S]:$3}]]],qce=[3,F,ZW,0,[eS],[[0,{[E]:"Ipv4Prefix",[S]:hoe}]]],Gce=[3,F,HW,0,[Xb,AJ],[[0,{[E]:"Ipv6Address",[S]:G3}],[2,{[E]:"IsPrimaryIpv6",[S]:uoe}]]],Kce=[3,F,QW,0,[Jb],[[0,{[E]:"Ipv6Prefix",[S]:poe}]]],Zce=[3,F,aJ,0,[yD,$te],[[0,{[E]:"AutoRecovery",[S]:_se}],[0,{[E]:"RebootMigration",[S]:Nie}]]],Qce=[3,F,cJ,0,[yD],[0]],Yce=[3,F,lJ,0,[Dee,vne],[0,()=>Ule]],Xce=[3,F,uJ,0,[uk,lk,ak,ck,pk],[0,1,0,0,0]],Wce=[3,F,fJ,0,[yl,uk,lk,ak,ck,pk],[[0,{[E]:"State",[S]:wP}],[0,{[E]:"HttpTokens",[S]:Kre}],[1,{[E]:"HttpPutResponseHopLimit",[S]:Vre}],[0,{[E]:"HttpEndpoint",[S]:Ure}],[0,{[E]:"HttpProtocolIpv6",[S]:Fre}],[0,{[E]:"InstanceMetadataTags",[S]:ooe}]]],Jce=[3,F,hJ,0,[wD,bY,Fb,Kb,Yb,vee,Mk,aS,cS,ml,Gk,Wk,pS,rm,p3,bk,gk,mk,KY,Of],[[()=>MP,{[E]:"Association",[S]:R3}],[()=>ele,{[E]:"Attachment",[S]:Rse}],[0,{[E]:"Description",[S]:_S}],[()=>MS,{[E]:"GroupSet",[S]:xS}],[()=>DS,{[E]:"Ipv6AddressesSet",[S]:q3}],[0,{[E]:"MacAddress",[S]:Boe}],[0,{[E]:"NetworkInterfaceId",[S]:oP}],[0,{[E]:"OwnerId",[S]:cP}],[0,{[E]:"PrivateDnsName",[S]:IS}],[0,{[E]:"PrivateIpAddress",[S]:Sl}],[()=>Rue,{[E]:"PrivateIpAddressesSet",[S]:fP}],[2,{[E]:"SourceDestCheck",[S]:yP}],[0,{[E]:"Status",[S]:Pf}],[0,{[E]:"SubnetId",[S]:OS}],[0,{[E]:"VpcId",[S]:TP}],[0,{[E]:"InterfaceType",[S]:Coe}],[()=>Sue,{[E]:"Ipv4PrefixSet",[S]:foe}],[()=>_ue,{[E]:"Ipv6PrefixSet",[S]:doe}],[()=>Fae,{[E]:"ConnectionTrackingConfiguration",[S]:qse}],[()=>um,{[E]:"Operator",[S]:cm}]]],MP=[3,F,pJ,0,[NY,UY,wJ,Fk,pte],[[0,{[E]:"CarrierIp",[S]:Nse}],[0,{[E]:"CustomerOwnedIp",[S]:$se}],[0,{[E]:"IpOwnerId",[S]:coe}],[0,{[E]:"PublicDnsName",[S]:vie}],[0,{[E]:"PublicIp",[S]:Sie}]]],ele=[3,F,mJ,0,[Pb,fY,Cf,ND,pS,oS,QD,qD],[[4,{[E]:"AttachTime",[S]:bS}],[0,{[E]:"AttachmentId",[S]:gse}],[2,{[E]:"DeleteOnTermination",[S]:Mf}],[1,{[E]:"DeviceIndex",[S]:N3}],[0,{[E]:"Status",[S]:Pf}],[1,{[E]:"NetworkCardIndex",[S]:rP}],[()=>Hce,{[E]:"EnaSrdSpecification",[S]:Cre}],[1,{[E]:"EnaQueueCount",[S]:wre}]]],tle=[3,F,yJ,0,[pY,Cf,Fb,ND,Kb,dk,Yb,Mk,ml,Gk,bne,rm,uY,bk,oS,gk,RJ,mk,xJ,vte,QD,ZY,qD],[[2,{[E]:"AssociatePublicIpAddress",[S]:bse}],[2,{[E]:"DeleteOnTermination",[S]:Mf}],[0,{[E]:"Description",[S]:_S}],[1,{[E]:"DeviceIndex",[S]:N3}],[()=>zP,{[S]:dS}],[1,{[E]:"Ipv6AddressCount",[S]:Yre}],[()=>DS,{[E]:"Ipv6Addresses",[S]:q3}],[0,{[E]:"NetworkInterfaceId",[S]:oP}],[0,{[E]:"PrivateIpAddress",[S]:Sl}],[()=>Uue,{[E]:"PrivateIpAddresses",[S]:fP}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:Xie}],[0,{[E]:"SubnetId",[S]:OS}],2,0,1,[()=>Tue,{[S]:eS}],1,[()=>Aue,{[S]:Jb}],1,2,()=>bce,()=>Hae,1]],nle=[3,F,bJ,0,[TD],[[0,{[E]:"BandwidthWeighting",[S]:Ise}]]],sle=[3,F,SJ,0,[TD],[0]],rle=[3,F,CJ,0,[wD,Qk,cS,ml],[[()=>MP,{[E]:"Association",[S]:R3}],[2,{[E]:"Primary",[S]:hP}],[0,{[E]:"PrivateDnsName",[S]:IS}],[0,{[E]:"PrivateIpAddress",[S]:Sl}]]],Ov=[3,F,BJ,0,[kD,Ro],[[1,{[E]:"Code",[S]:P3}],[0,{[E]:"Name",[S]:ji}]]],ole=[3,F,PJ,0,[xo,GY,Ete],[[0,{[E]:"InstanceId",[S]:CS}],[()=>Ov,{[E]:"CurrentState",[S]:Vse}],[()=>Ov,{[E]:"PreviousState",[S]:Cie}]]],ile=[3,F,yk,0,[Fne,MX,Lk,WD],[[1,{[E]:"TotalSizeInGB",[S]:yae}],[()=>aue,{[E]:"Disks",[S]:rre}],[0,{[E]:"NvmeSupport",[S]:aP}],[0,{[E]:"EncryptionSupport",[S]:B3}]]],ale=[3,F,jJ,0,[nm,PY,sk,Rne,Sne,Ane,CY,Qb,Kk,h3,Ha,zJ,yk,jD,kk,rk,nk,qk,hk,TW,TY,tX,mY,Qte,Kee,Zee,Bk,xk,Pk,wte,Bte],[[0,{[E]:"InstanceType",[S]:Q3}],[2,{[E]:"CurrentGeneration",[S]:Pse}],[2,{[E]:"FreeTierEligible",[S]:H3}],[()=>Zue,{[E]:"SupportedUsageClasses",[S]:nae}],[()=>Vue,{[E]:"SupportedRootDeviceTypes",[S]:Wie}],[()=>Yue,{[E]:"SupportedVirtualizationTypes",[S]:rae}],[2,{[E]:"BareMetal",[S]:Tse}],[0,{[E]:"Hypervisor",[S]:RS}],[()=>Ple,{[E]:"ProcessorInfo",[S]:_ie}],[()=>Qle,{[E]:"VCpuInfo",[S]:Rae}],[()=>vle,{[E]:"MemoryInfo",[S]:vl}],[2,{[E]:"InstanceStorageSupported",[S]:yoe}],[()=>ile,{[E]:"InstanceStorageInfo",[S]:goe}],[()=>fce,{[E]:"EbsInfo",[S]:yre}],[()=>Ele,{[E]:"NetworkInfo",[S]:sie}],[()=>Ice,{[E]:"GpuInfo",[S]:Lre}],[()=>Cce,{[E]:"FpgaInfo",[S]:kre}],[()=>Ole,{[E]:"PlacementGroupInfo",[S]:bie}],[()=>Bce,{[E]:"InferenceAcceleratorInfo",[S]:Xre}],[2,{[E]:"HibernationSupported",[S]:Gre}],[2,{[E]:"BurstablePerformanceSupported",[S]:Ase}],[2,{[E]:"DedicatedHostsSupported",[S]:Yse}],[2,{[E]:"AutoRecoverySupported",[S]:Sse}],[()=>oue,{[E]:"SupportedBootModes",[S]:jie}],[0,{[E]:"NitroEnclavesSupport",[S]:eie}],[0,{[E]:"NitroTpmSupport",[S]:aie}],[()=>Ale,{[E]:"NitroTpmInfo",[S]:iie}],[()=>mle,{[E]:"MediaAcceleratorInfo",[S]:Loe}],[()=>Tle,{[E]:"NeuronInfo",[S]:rie}],[0,{[E]:"PhcSupport",[S]:Rie}],[0,{[E]:"RebootMigrationSupport",[S]:Pie}]]],cle=[3,F,DJ,0,[eS],[0]],lle=[3,F,kJ,0,[Jb],[0]],ule=[3,F,see,0,[ja,Fa,$r,nS,QJ],[[0,{[E]:"KeyPairId",[S]:am}],[()=>Ga,{[E]:"TagSet",[S]:wl}],[0,{[E]:"KeyName",[S]:Df}],[0,{[E]:"KeyFingerprint",[S]:TS}],[()=>Lae,{[E]:"KeyMaterial",[S]:Aoe}]]],fle=[3,F,tee,0,[ja,_k,Fa,bte,DD,$r,nS],[[0,{[E]:"KeyPairId",[S]:am}],[0,{[E]:"KeyType",[S]:Ooe}],[()=>Ga,{[E]:"TagSet",[S]:wl}],[0,{[E]:"PublicKey",[S]:wie}],[4,{[E]:"CreateTime",[S]:k3}],[0,{[E]:"KeyName",[S]:Df}],[0,{[E]:"KeyFingerprint",[S]:TS}]]],dle=[3,F,mee,0,[hee,pee,v3],[0,0,0]],hle=[3,F,oee,0,[wk],[[0,{[E]:"LicenseConfigurationArn",[S]:Moe}]]],ple=[3,F,ree,0,[wk],[0]],mle=[3,F,xk,0,[bD,Une],[[()=>Pue,{[E]:"Accelerators",[S]:w3}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:pae}]]],gle=[3,F,_ee,0,[Bi,Ro,If,Ha],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:kf}],[()=>yle,{[E]:"MemoryInfo",[S]:vl}]]],yle=[3,F,Eee,0,[gl],[[1,{[E]:"SizeInMiB",[S]:_l}]]],vle=[3,F,Ha,0,[gl],[[1,{[E]:"SizeInMiB",[S]:_l}]]],ble=[3,F,kee,0,[Va,is,r3,vS,tS,gS,Ek],[0,2,1,0,1,1,2],1],Sle=[3,F,Pee,0,[g3],[[()=>Wle,{[E]:"VolumeModification",[S]:Aae}]]],_le=[3,F,rS,0,[yl],[[0,{[E]:"State",[S]:wP}]]],wle=[3,F,Uee,0,[oS,zk,Tk,_Y,ite,eX,Tee,Aee],[[1,{[E]:"NetworkCardIndex",[S]:rP}],[0,{[E]:"NetworkPerformance",[S]:iP}],[1,{[E]:"MaximumNetworkInterfaces",[S]:tP}],[1,{[E]:"BaselineBandwidthInGbps",[S]:Cse}],[1,{[E]:"PeakBandwidthInGbps",[S]:mie}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:Qse}],[1,{[E]:"MaximumEnaQueueCount",[S]:Hoe}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:Foe}]]],Ele=[3,F,kk,0,[zk,Tk,Iee,bX,Bee,DW,kW,$J,qb,iW,HD,JX,rW,IY,hW],[[0,{[E]:"NetworkPerformance",[S]:iP}],[1,{[E]:"MaximumNetworkInterfaces",[S]:tP}],[1,{[E]:"MaximumNetworkCards",[S]:Voe}],[1,{[E]:"DefaultNetworkCardIndex",[S]:Xse}],[()=>Nue,{[E]:"NetworkCards",[S]:Xoe}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:Wre}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:Jre}],[2,{[E]:"Ipv6Supported",[S]:woe}],[0,{[E]:"EnaSupport",[S]:ES}],[2,{[E]:"EfaSupported",[S]:Ore}],[()=>pce,{[E]:"EfaInfo",[S]:vre}],[2,{[E]:"EncryptionInTransitSupported",[S]:gre}],[2,{[E]:"EnaSrdSupported",[S]:Tre}],[()=>nue,{[E]:"BandwidthWeightings",[S]:Ose}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:Dre}]]],xle=[3,F,Hee,0,[Bi,v3],[[1,{[E]:"Count",[S]:qa}],[1,{[E]:"Version",[S]:Pae}]]],Rle=[3,F,Fee,0,[Bi,Ro,LY,Ha],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:ji}],[()=>xle,{[E]:"CoreInfo",[S]:Lse}],[()=>Cle,{[E]:"MemoryInfo",[S]:vl}]]],Cle=[3,F,qee,0,[gl],[[1,{[E]:"SizeInMiB",[S]:_l}]]],Tle=[3,F,Pk,0,[Gee,jne],[[()=>zue,{[E]:"NeuronDevices",[S]:Joe}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:mae}]]],Ale=[3,F,Bk,0,[Ine],[[()=>Lue,{[E]:"SupportedVersions",[S]:oae}]]],Ile=[3,F,Jee,0,[Uk],[0]],um=[3,F,ete,0,[zee,Uk],[[2,{[E]:"Managed",[S]:Zoe}],[0,{[E]:"Principal",[S]:pie}]]],DP=[3,F,lS,0,[zb,vY,ik,_te,xW,Zne,Xte,CW,ok,Nb],[[0,{[E]:"AvailabilityZoneId",[S]:_3}],[0,{[E]:"Affinity",[S]:xse}],[0,{[E]:"GroupName",[S]:V3}],[1,{[E]:"PartitionNumber",[S]:xie}],[0,{[E]:"HostId",[S]:jre}],[0,{[E]:"Tenancy",[S]:aae}],[0,{[E]:"SpreadDomain",[S]:Fie}],[0,{[E]:"HostResourceGroupArn",[S]:qre}],[0,{[E]:"GroupId",[S]:F3}],[0,{[E]:"AvailabilityZone",[S]:SS}]]],Ole=[3,F,qk,0,[_ne],[[()=>$ue,{[E]:"SupportedStrategies",[S]:Jie}]]],Mle=[3,F,fte,0,[fk,KD,GD],[0,2,2]],Dle=[3,F,dte,0,[fk,KD,GD],[[0,{[E]:"HostnameType",[S]:Zre}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:xre}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Ere}]]],kle=[3,F,mte,0,[Qk,ml],[[2,{[E]:"Primary",[S]:hP}],[0,{[E]:"PrivateIpAddress",[S]:Sl}]]],Ple=[3,F,Kk,0,[Zte,Yte,Wte,If],[[()=>tue,{[E]:"SupportedArchitectures",[S]:Uie}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:Hie}],[()=>Gue,{[E]:"SupportedFeatures",[S]:Vie}],[0,{[E]:"Manufacturer",[S]:kf}]]],Nle=[3,F,ute,0,[ate,lte],[[0,{[E]:"ProductCode",[S]:gie}],[0,{[E]:"Type",[S]:RP}]]],zle=[3,F,Ite,0,[Af,is],[[()=>Nf,{[S]:xo}],[2,{[E]:"DryRun",[S]:Ls}]],1],Lle=[3,F,Vte,0,[Yee,fS,lW],[[0,{[E]:"OptInStatus",[S]:cie}],[0,{[E]:"RegionName",[S]:zie}],[0,{[E]:"RegionEndpoint",[S]:Oie}]]],kP=[3,F,Gte,0,[Dte,aS,Pte,Kb,GJ],[[0,{[E]:"ReservationId",[S]:Mie}],[0,{[E]:"OwnerId",[S]:cP}],[0,{[E]:"RequesterId",[S]:kie}],[()=>MS,{[E]:"GroupSet",[S]:xS}],[()=>wue,{[E]:"InstancesSet",[S]:im}]]],Ble=[3,F,Ate,0,[Gb],[[2,{[E]:"Enabled",[S]:U3}]],1],$le=[3,F,Ote,0,[bee,See,Bb,Tf,nm,dk,Yb,sS,$r,rS,lS,uS,ene,Jk,rm,Yne,BD,UD,mS,dee,dJ,qY,$b,jb,Zb,lee,Ak,Vb,Hk,Ik,XY,nW,Nk,Of,is,WY,YW,ml,MD,mD,Dk,Wb,FD],[1,1,[()=>rue,{[S]:Lb}],0,0,1,[()=>DS,{[S]:Xb}],0,0,[()=>Ble,0],[()=>DP,0],0,[()=>zP,{[S]:dS}],[()=>que,{[S]:e3}],0,[()=>zae,0],[()=>uue,0],[()=>due,{[S]:$D}],[()=>PS,{[S]:om}],()=>dle,()=>Yce,()=>Kae,()=>qae,()=>Bae,()=>Dce,[()=>kue,{[S]:fee}],()=>Xce,()=>wce,()=>Mle,()=>Qce,2,2,()=>sle,()=>Ile,[2,{[E]:"DryRun",[S]:Ls}],[2,{[E]:"DisableApiTermination",[S]:Kse}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:noe}],[0,{[E]:"PrivateIpAddress",[S]:Sl}],[0,{[E]:"ClientToken",[xoe]:1,[S]:D3}],[0,{[E]:"AdditionalInfo",[S]:b3}],[()=>xue,{[E]:"NetworkInterface",[S]:nie}],[()=>Pce,{[E]:"IamInstanceProfile",[S]:K3}],[2,{[E]:"EbsOptimized",[S]:L3}]],2],Ule=[3,F,gne,0,[Oee,fne,xY,use,VW],[0,0,1,4,0]],jle=[3,F,ane,0,[Af,mD,is],[[()=>Nf,{[S]:xo}],[0,{[E]:"AdditionalInfo",[S]:b3}],[2,{[E]:"DryRun",[S]:Ls}]],1],Hle=[3,F,cne,0,[dne],[[()=>kS,{[E]:"InstancesSet",[S]:im}]]],PP=[3,F,hS,0,[kD,Lee],[[0,{[E]:"Code",[S]:P3}],[0,{[E]:"Message",[S]:Qoe}]]],Fle=[3,F,lne,0,[Af,AW,s3,is,tk],[[()=>Nf,{[S]:xo}],2,2,[2,{[E]:"DryRun",[S]:Ls}],[2,{[E]:"Force",[S]:Nre}]],1],Vle=[3,F,une,0,[pne],[[()=>kS,{[E]:"InstancesSet",[S]:im}]]],qle=[3,F,c3,0,[KJ,d3],[[0,{[E]:"Key",[S]:Toe}],[0,{[E]:"Value",[S]:xae}]]],Gle=[3,F,om,0,[Hte,Fa],[[0,{[E]:"ResourceType",[S]:Bie}],[()=>Ga,{[S]:c3}]]],Kle=[3,F,Pne,0,[Af,tk,s3,is],[[()=>Nf,{[S]:xo}],2,2,[2,{[E]:"DryRun",[S]:Ls}]],1],Zle=[3,F,Nne,0,[Lne],[[()=>kS,{[E]:"InstancesSet",[S]:im}]]],Qle=[3,F,h3,0,[CX,JY,xX,ese,lse],[[1,{[E]:"DefaultVCpus",[S]:nre}],[1,{[E]:"DefaultCores",[S]:Zse}],[1,{[E]:"DefaultThreadsPerCore",[S]:ere}],[()=>iue,{[E]:"ValidCores",[S]:Cae}],[()=>Kue,{[E]:"ValidThreadsPerCore",[S]:kae}]]],Yle=[3,F,hse,0,[zb,iS,Tne,tS,Fa,vS,mW,Ek,gS,xne,Of,m3,Va,r3,t3,Nb,yl,DD,SY,ek,Sk],[[0,{[E]:"AvailabilityZoneId",[S]:_3}],[0,{[E]:"OutpostArn",[S]:AS}],[0,{[E]:"SourceVolumeId",[S]:sae}],[1,{[E]:"Iops",[S]:Y3}],[()=>Ga,{[E]:"TagSet",[S]:wl}],[0,{[E]:"VolumeType",[S]:AP}],[2,{[E]:"FastRestored",[S]:Pre}],[2,{[E]:"MultiAttachEnabled",[S]:zoe}],[1,{[E]:"Throughput",[S]:xP}],[0,{[E]:"SseType",[S]:tae}],[()=>um,{[E]:"Operator",[S]:cm}],[1,{[E]:"VolumeInitializationRate",[S]:Tae}],[0,{[E]:"VolumeId",[S]:lm}],[1,{[E]:"Size",[S]:iae}],[0,{[E]:"SnapshotId",[S]:vP}],[0,{[E]:"AvailabilityZone",[S]:SS}],[0,{[E]:"Status",[S]:Pf}],[4,{[E]:"CreateTime",[S]:k3}],[()=>Xue,{[E]:"AttachmentSet",[S]:Ese}],[2,{[E]:"Encrypted",[S]:j3}],[0,{[E]:"KmsKeyId",[S]:W3}]]],Xle=[3,F,Jne,0,[Cf,gD,EJ,tm,Va,xo,OX,yl,Pb],[[2,{[E]:"DeleteOnTermination",[S]:Mf}],[0,{[E]:"AssociatedResource",[S]:S3}],[0,{[E]:"InstanceOwningService",[S]:loe}],[1,{[E]:"EbsCardIndex",[S]:wS}],[0,{[E]:"VolumeId",[S]:lm}],[0,{[E]:"InstanceId",[S]:CS}],[0,{[E]:"Device",[S]:sre}],[0,{[E]:"Status",[S]:Pf}],[4,{[E]:"AttachTime",[S]:bS}]]],Wle=[3,F,g3,0,[Va,Mee,yne,qne,zne,Kne,Gne,$ne,nte,Xee,rte,ste,Wee,xte,wne,aW],[[0,{[E]:"VolumeId",[S]:lm}],[0,{[E]:"ModificationState",[S]:Koe}],[0,{[E]:"StatusMessage",[S]:Yie}],[1,{[E]:"TargetSize",[S]:vae}],[1,{[E]:"TargetIops",[S]:dae}],[0,{[E]:"TargetVolumeType",[S]:Sae}],[1,{[E]:"TargetThroughput",[S]:bae}],[2,{[E]:"TargetMultiAttachEnabled",[S]:hae}],[1,{[E]:"OriginalSize",[S]:fie}],[1,{[E]:"OriginalIops",[S]:lie}],[0,{[E]:"OriginalVolumeType",[S]:hie}],[1,{[E]:"OriginalThroughput",[S]:die}],[2,{[E]:"OriginalMultiAttachEnabled",[S]:uie}],[1,{[E]:"Progress",[S]:Aie}],[4,{[E]:"StartTime",[S]:eae}],[4,{[E]:"EndTime",[S]:Mre}]]],Jle="unit",eue=[-3,_P,"EC2ServiceException",0,[],[]];Mt.for(_P).registerError(eue,kb);var tue=[1,F,yY,0,[0,{[S]:je}]],nue=[1,F,AY,0,[0,{[S]:je}]],sue=[1,F,wY,0,[()=>OP,{[S]:je}]],rue=[1,F,EY,0,[()=>OP,{[S]:Lb}]],oue=[1,F,RY,0,[0,{[S]:je}]],iue=[1,F,MY,0,[1,{[S]:je}]],aue=[1,F,nX,0,[()=>cce,{[S]:je}]],cue=[1,F,PX,0,[()=>uce,{[S]:je}]],lue=[1,F,$X,0,[()=>mce,{[S]:je}]],uue=[1,F,VX,0,[()=>gce,{[S]:je}]],fue=[1,F,KX,0,[()=>vce,{[S]:je}]],due=[1,F,UD,0,[()=>yce,{[S]:je}]],hue=[1,F,kX,0,[0,{[S]:LD}]],El=[1,F,pW,0,[()=>Ece,{[S]:$i}]],pue=[1,F,fW,0,[()=>xce,{[S]:je}]],mue=[1,F,vW,0,[()=>Tce,{[S]:je}]],MS=[1,F,SW,0,[()=>Oce,{[S]:je}]],gue=[1,F,XW,0,[0,{[S]:Tf}]],yue=[1,F,rJ,0,[()=>Nce,{[S]:je}]],vue=[1,F,$W,0,[()=>$ce,0]],bue=[1,F,zW,0,[()=>Vce,{[S]:je}]],Nf=[1,F,WW,0,[0,{[S]:xo}]],Sue=[1,F,qW,0,[()=>qce,{[S]:je}]],DS=[1,F,FW,0,[()=>Gce,{[S]:je}]],_ue=[1,F,GW,0,[()=>Kce,{[S]:je}]],wue=[1,F,iJ,0,[()=>jce,{[S]:je}]],Eue=[1,F,gJ,0,[()=>Jce,{[S]:je}]],xue=[1,F,vJ,0,[()=>tle,{[S]:je}]],Rue=[1,F,TJ,0,[()=>rle,{[S]:je}]],kS=[1,F,NJ,0,[()=>ole,{[S]:je}]],Cue=[1,F,UJ,0,[()=>ale,{[S]:je}]],Tue=[1,F,OJ,0,[()=>cle,{[S]:je}]],Aue=[1,F,MJ,0,[()=>lle,{[S]:je}]],Iue=[1,F,YJ,0,[0,{[S]:$r}]],Oue=[1,F,JJ,0,[0,{[S]:ja}]],Mue=[1,F,nee,0,[()=>fle,{[S]:je}]],Due=[1,F,aee,0,[()=>hle,{[S]:je}]],kue=[1,F,uee,0,[()=>ple,{[S]:je}]],Pue=[1,F,wee,0,[()=>gle,{[S]:je}]],Nue=[1,F,$ee,0,[()=>wle,{[S]:je}]],zue=[1,F,Vee,0,[()=>Rle,{[S]:je}]],Lue=[1,F,Qee,0,[0,{[S]:je}]],Bue=[1,F,tte,0,[0,{[S]:$k}]],$ue=[1,F,hte,0,[0,{[S]:je}]],Uue=[1,F,gte,0,[()=>kle,{[S]:je}]],NP=[1,F,cte,0,[()=>Nle,{[S]:je}]],jue=[1,F,zte,0,[()=>Lle,{[S]:je}]],Hue=[1,F,Ute,0,[0,{[S]:fS}]],Fue=[1,F,Lte,0,[()=>kP,{[S]:je}]],Vue=[1,F,Tte,0,[0,{[S]:je}]],zP=[1,F,Jte,0,[0,{[S]:dS}]],que=[1,F,tne,0,[0,{[S]:e3}]],Gue=[1,F,Kte,0,[0,{[S]:je}]],Ga=[1,F,Bne,0,[()=>qle,{[S]:je}]],PS=[1,F,Vne,0,[()=>Gle,{[S]:je}]],Kue=[1,F,Hne,0,[1,{[S]:je}]],Zue=[1,F,Qne,0,[0,{[S]:je}]],Que=[1,F,ise,0,[0,{[S]:je}]],Yue=[1,F,cse,0,[0,{[S]:je}]],Xue=[1,F,Wne,0,[()=>Xle,{[S]:je}]],Wue=[1,F,tse,0,[0,{[S]:Va}]],Jue=[1,F,sse,0,[()=>Yle,{[S]:je}]],efe=[1,F,pse,0,[0,{[S]:je}]],P0e=[9,F,BY,0,()=>Gae,()=>ule],N0e=[9,F,hX,0,()=>Zae,()=>Qae],tfe=[9,F,uX,0,()=>Yae,()=>Xae],nfe=[9,F,fX,0,()=>Wae,()=>Jae],sfe=[9,F,lX,0,()=>ece,()=>tce],rfe=[9,F,vX,0,()=>nce,()=>sce],ofe=[9,F,EX,0,()=>rce,()=>oce],ife=[9,F,IX,0,()=>ice,()=>ace],z0e=[9,F,eJ,0,()=>zce,()=>Lce],L0e=[9,F,Nee,0,()=>ble,()=>Sle],B0e=[9,F,kte,0,()=>zle,()=>Jle],$0e=[9,F,Nte,0,()=>$le,()=>kP],U0e=[9,F,hne,0,()=>jle,()=>Hle],j0e=[9,F,mne,0,()=>Fle,()=>Vle],H0e=[9,F,Dne,0,()=>Kle,()=>Zle];class LP extends Br.classBuilder().ep(dl).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(tfe).build(){}class BP extends Br.classBuilder().ep(dl).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(nfe).build(){}class afe extends Br.classBuilder().ep(dl).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(sfe).build(){}class $P extends Br.classBuilder().ep(dl).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(rfe).build(){}class cfe extends Br.classBuilder().ep(dl).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(ofe).build(){}class UP extends Br.classBuilder().ep(dl).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(ife).build(){}function lfe(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&Mn.isInstance(r)&&r.body&&e.runtime==="node"&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let i=!0;if(typeof e.expectContinueHeader=="number")try{i=(Number(r.headers?.["content-length"])??e.bodyLengthChecker?.(r.body)??1/0)>=e.expectContinueHeader}catch{}else i=!!e.expectContinueHeader;i&&(r.headers.Expect="100-continue")}return t({...n,request:r})}}const ufe={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},ffe=e=>({applyToStack:t=>{t.add(lfe(e),ufe)}}),jP={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},dfe=jP.WHEN_SUPPORTED,F0e={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},hfe=jP.WHEN_SUPPORTED;var Mv;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(Mv||(Mv={}));var bT;(function(e){e.HEADER="header",e.TRAILER="trailer"})(bT||(bT={}));const V0e=Mv.CRC32;var q0e=(function(){function e(){this.crc32=new vp}return e.prototype.update=function(t){yp(t)||this.crc32.update(Na(t))},e.prototype.digest=function(){return nD(this,void 0,void 0,function(){return sD(this,function(t){return[2,LQ(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new vp},e})(),vp=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=HQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^mfe[(this.checksum^l)&255]}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),pfe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],mfe=BQ(pfe);const gfe=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ps(t??dfe),responseChecksumValidation:Ps(n??hfe),requestStreamBufferSize:Number(r??0)})},yfe=e=>(t,n)=>async r=>{const i=await e.region(),c=e.region;let l=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),l=()=>Object.defineProperty(e,"region",{writable:!0,value:c}));try{const f=await t(r);if(n.__s3RegionRedirect){l();const d=await e.region();if(i!==d)throw new Error("Region was not restored following S3 region redirect.")}return f}catch(f){throw l(),f}},vfe={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function bfe(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){const c=i?.$metadata?.httpStatusCode,l=n.commandName==="HeadBucketCommand",f=i?.$response?.headers?.["x-amz-bucket-region"];if(f&&(c===301||c===400&&(i?.name==="IllegalLocationConstraintException"||l))){try{const d=f;n.logger?.debug(`Redirecting from ${await e.region()} to ${d}`),n.__s3RegionRedirect=d}catch(d){throw new Error("Region redirect failed: "+d)}return t(r)}}throw i}}}const Sfe={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},_fe=e=>({applyToStack:t=>{t.add(bfe(e),Sfe),t.addRelativeTo(yfe(e),vfe)}});class NS{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const n=this.data[t];if(n)return n}set(t,n){return this.data[t]=n,n}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+NS.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const i=await r.identity;i.expiration&&i.expiration.getTime()(l.expiration?.getTime()??0){i.set(r,new R0(Promise.resolve(h)))})),l)):i.set(r,new R0(this.getIdentity(r))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: -`+i)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}const wfe="Directory",Efe="S3Express",xfe="sigv4-s3express",Rfe="X-Amz-S3session-Token",Cfe=Rfe.toLowerCase(),Tfe=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===xfe;if((i.properties?.backend===Efe||i.properties?.bucketType===wfe)&&(vr(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),c){const f=r.input.Bucket;if(f){const d=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:f});n.s3ExpressIdentity=d,Mn.isInstance(r.request)&&d.sessionToken&&(r.request.headers[Cfe]=d.sessionToken)}}}return t(r)},Afe={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Ife=e=>({applyToStack:t=>{t.add(Tfe(e),Afe)}}),Ofe=async(e,t,n,r)=>{const i=await r.signWithCredentials(n,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},Mfe=e=>t=>{throw t},Dfe=(e,t)=>{},kfe=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=wo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c;let h;n.s3ExpressIdentity?h=await Ofe(n.s3ExpressIdentity,l,r.request,await e.signer()):h=await d.sign(r.request,f,l);const y=await t({...r,request:h}).catch((d.errorHandler||Mfe)(l));return(d.successHandler||Dfe)(y.response,l),y},Pfe=e=>({applyToStack:t=>{t.addRelativeTo(kfe(e),VO)}}),Nfe=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:c,disableMultiregionAccessPoints:l,followRegionRedirects:f,s3ExpressIdentityProvider:d,bucketEndpoint:h,expectContinueHeader:y}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:c??!1,disableMultiregionAccessPoints:l??!1,followRegionRedirects:f??!1,s3ExpressIdentityProvider:d??new zS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},zfe={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Lfe=3e3,Bfe=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!ka.isInstance(c))return i;const{statusCode:l,body:f}=c;if(l<200||l>=300||!(typeof f?.stream=="function"||typeof f?.pipe=="function"||typeof f?.tee=="function"))return i;let h=f,y=f;f&&typeof f=="object"&&!(f instanceof Uint8Array)&&([h,y]=await SG(f)),c.body=y;const g=await $fe(h,{streamCollector:async b=>hG(b,Lfe)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&zfe[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},$fe=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Ufe={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},LS=e=>({applyToStack:t=>{t.addRelativeTo(Bfe(e),Ufe)}}),jfe=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Hfe(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const i=n.endpointV2;if(i){const c=r.input.Bucket;if(typeof c=="string")try{const l=new URL(c);n.endpointV2={...i,url:l}}catch(l){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(f):n.logger?.warn?.(f),l}}}return t(r)}}const Ffe={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function Vfe({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!jfe(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const qfe={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Gfe=e=>({applyToStack:t=>{t.add(Vfe(e),qfe),t.addRelativeTo(Hfe(e),Ffe)}}),Kfe=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),Dv="X-Amz-S3session-Token",ST=Dv.toLowerCase();class Zfe extends Cv{async signWithCredentials(t,n,r){const i=_T(n);t.headers[ST]=n.sessionToken;const c=this;return wT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=_T(n);return delete t.headers[ST],t.headers[Dv]=n.sessionToken,t.query=t.query??{},t.query[Dv]=n.sessionToken,wT(this,i),this.presign(t,r)}}function _T(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function wT(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,i=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=i}class HP{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new Zfe(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const BS="required",M="type",ce="rules",L="conditions",ee="fn",te="argv",ke="ref",We="assign",Ee="url",xe="properties",po="backend",On="authSchemes",dn="disableDoubleEncoding",hn="signingName",Bn="signingRegion",Re="headers",$S="signingRegionSet",Qfe=6,Yfe=!1,Tr=!0,Ds="isSet",tn="booleanEquals",Ae="error",bp="aws.partition",pt="stringEquals",Vt="getAttr",Gt="name",kt="substring",ET="bucketSuffix",US="parseURL",me="endpoint",ue="tree",Sp="aws.isVirtualHostableS3Bucket",_p="{url#scheme}://{Bucket}.{url#authority}{url#path}",Pr="not",xT="accessPointSuffix",Bh="{url#scheme}://{url#authority}{url#path}",FP="hardwareType",VP="regionPrefix",RT="bucketAliasSuffix",kv="outpostId",Ka="isValidHostLabel",jS="sigv4a",gf="s3-outposts",ol="s3",qP="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",GP="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",CT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",KP="aws.parseArn",ZP="bucketArn",QP="arnType",wp="",HS="s3-object-lambda",YP="accesspoint",FS="accessPointName",TT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",AT="mrapPartition",IT="outpostType",OT="arnPrefix",XP="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",MT="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",DT="https://s3.{partitionResult#dnsSuffix}",Lc={[BS]:!1,[M]:"string"},Bc={[BS]:!0,default:!1,[M]:"boolean"},Nu={[BS]:!1,[M]:"boolean"},tr={[ee]:tn,[te]:[{[ke]:"Accelerate"},!0]},Nt={[ee]:tn,[te]:[{[ke]:"UseFIPS"},!0]},Ot={[ee]:tn,[te]:[{[ke]:"UseDualStack"},!0]},Jt={[ee]:Ds,[te]:[{[ke]:"Endpoint"}]},WP={[ee]:bp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},kT={[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Zu={[ee]:Ds,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},PT={[L]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},NT={[L]:[Jt,{[ee]:US,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[L]:[{[ee]:Ds,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:tn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[L]:[{[ee]:tn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Sp,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:_p,[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[L]:[{[ee]:tn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Sp,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:_p,[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},ts={[ee]:US,[te]:[{[ke]:"Endpoint"}],[We]:"url"},C0={[ee]:tn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]},JP={[ke]:"url"},eN={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Is={[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:"s3express",[Bn]:"{Region}"}]},Ve={},tN={[ee]:Sp,[te]:[dt,!1]},zT={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},LT={[ee]:Ds,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},BT={[ee]:tn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Pr,[te]:[Jt]},rt={[ee]:tn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:tn,[te]:[{[ke]:"UseFIPS"},!1]},Rh={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},$T={[ee]:Pr,[te]:[Zu]},UT={[ke]:FP},jT={[L]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Ch={[On]:[{[dn]:!0,[Gt]:jS,[hn]:gf,[$S]:["*"]},{[dn]:!0,[Gt]:"sigv4",[hn]:gf,[Bn]:"{Region}"}]},T0={[ee]:tn,[te]:[{[ke]:"ForcePathStyle"},!1]},Xfe={[ke]:"ForcePathStyle"},un={[ee]:tn,[te]:[{[ke]:"Accelerate"},!1]},_n={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Tn={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"us-east-1"}]},lt={[ee]:Pr,[te]:[_n]},An={[ee]:tn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},HT={[Ee]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"{Region}"}]},[Re]:{}},mn={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"{Region}"}]},In={[ee]:tn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},FT={[Ee]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},VT={[Ee]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},qT={[Ee]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},A0={[ee]:tn,[te]:[{[ee]:Vt,[te]:[JP,"isIp"]},!1]},I0={[Ee]:qP,[xe]:mn,[Re]:{}},Pv={[Ee]:_p,[xe]:mn,[Re]:{}},GT={[me]:Pv,[M]:me},O0={[Ee]:GP,[xe]:mn,[Re]:{}},KT={[Ee]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},Th={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},ms={[ke]:ZP},nN={[ke]:QP},M0={[ee]:Vt,[te]:[ms,"service"]},VS={[ke]:FS},ZT={[L]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},QT={[L]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},YT={[L]:[{[ee]:Ds,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:tn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},D0={[L]:[{[ee]:Ds,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:tn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[ms,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},sN={[ee]:Vt,[te]:[{[ke]:"bucketPartition"},Gt]},rN={[ee]:Vt,[te]:[ms,"accountId"]},k0={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:HS,[Bn]:"{bucketArn#region}"}]},XT={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},P0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},N0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},z0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},WT={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},JT={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},zu={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"{bucketArn#region}"}]},eA={[On]:[{[dn]:!0,[Gt]:jS,[hn]:gf,[$S]:["*"]},{[dn]:!0,[Gt]:"sigv4",[hn]:gf,[Bn]:"{bucketArn#region}"}]},tA={[ee]:KP,[te]:[dt]},nA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},sA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},rA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},L0={[Ee]:XP,[xe]:mn,[Re]:{}},oA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},iA={[ke]:"UseObjectLambdaEndpoint"},B0={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:HS,[Bn]:"{Region}"}]},aA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},cA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},lA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},$0={[Ee]:Bh,[xe]:mn,[Re]:{}},uA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},U0=[{[ke]:"Region"}],Wfe=[{[ke]:"Endpoint"}],Jfe=[dt],j0=[tr],$c=[Jt,ts],fA=[{[ee]:Ds,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:tn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],ede=[eN],H0=[tN],Js=[WP],F0=[Nt,Ot],Qu=[Nt,rt],Yu=[et,Ot],Xu=[et,rt],dA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ar=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me},{[L]:Qu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me},{[L]:Yu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me}],hA=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],pA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],mA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],gA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ir=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Qu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Yu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],yA=[dt,0,7,!0],vA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],bA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],SA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],_A=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],wA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],tde=[Zu],EA=[{[ee]:Ka,[te]:[{[ke]:kv},!1]}],xA=[{[ee]:pt,[te]:[{[ke]:VP},"beta"]}],nde=["*"],RA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!1]}],mi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],V0=[{[ee]:pt,[te]:[nN,YP]}],CA=[{[ee]:Vt,[te]:[ms,"resourceId[1]"],[We]:FS},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[VS,wp]}]}],sde=[ms,"resourceId[1]"],TA=[Ot],q0=[{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[ms,"region"]},wp]}]}],AA=[{[ee]:Pr,[te]:[{[ee]:Ds,[te]:[{[ee]:Vt,[te]:[ms,"resourceId[2]"]}]}]}],rde=[ms,"resourceId[2]"],G0=[{[ee]:bp,[te]:[{[ee]:Vt,[te]:[ms,"region"]}],[We]:"bucketPartition"}],IA=[{[ee]:pt,[te]:[sN,{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]}]}],K0=[{[ee]:Ka,[te]:[{[ee]:Vt,[te]:[ms,"region"]},!0]}],Z0=[{[ee]:Ka,[te]:[rN,!1]}],OA=[{[ee]:Ka,[te]:[VS,!1]}],Ah=[Nt],MA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!0]}],ode={parameters:{Bucket:Lc,Region:Lc,UseFIPS:Bc,UseDualStack:Bc,Endpoint:Lc,ForcePathStyle:Bc,Accelerate:Bc,UseGlobalEndpoint:Bc,UseObjectLambdaEndpoint:Nu,Key:Lc,Prefix:Lc,CopySource:Lc,DisableAccessPoints:Nu,DisableMultiRegionAccessPoints:Bc,UseArnRegion:Nu,UseS3ExpressControlEndpoint:Nu,DisableS3ExpressSessionAuth:Nu},[ce]:[{[L]:[{[ee]:Ds,[te]:U0}],[ce]:[{[L]:[tr,Nt],error:"Accelerate cannot be used with FIPS",[M]:Ae},{[L]:[Ot,Jt],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Ae},{[L]:[Jt,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Ae},{[L]:[Jt,tr],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Ae},{[L]:[Nt,WP,kT],error:"Partition does not support FIPS",[M]:Ae},{[L]:[Zu,{[ee]:kt,[te]:[dt,0,Qfe,Tr],[We]:ET},{[ee]:pt,[te]:[{[ke]:ET},"--x-s3"]}],[ce]:[PT,NT,{[L]:[LT,BT],[ce]:[{[L]:Js,[ce]:[{[L]:[eN,Ke],[ce]:[{[L]:F0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Qu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Yu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:H0,[ce]:[{[L]:Js,[ce]:[{[L]:fA,[ce]:[{[L]:dA,[ce]:Ar,[M]:ue},{[L]:hA,[ce]:Ar,[M]:ue},{[L]:pA,[ce]:Ar,[M]:ue},{[L]:mA,[ce]:Ar,[M]:ue},{[L]:gA,[ce]:Ar,[M]:ue},Rh],[M]:ue},{[L]:dA,[ce]:Ir,[M]:ue},{[L]:hA,[ce]:Ir,[M]:ue},{[L]:pA,[ce]:Ir,[M]:ue},{[L]:mA,[ce]:Ir,[M]:ue},{[L]:gA,[ce]:Ir,[M]:ue},Rh],[M]:ue}],[M]:ue},zT],[M]:ue},{[L]:[Zu,{[ee]:kt,[te]:yA,[We]:xT},{[ee]:pt,[te]:[{[ke]:xT},"--xa-s3"]}],[ce]:[PT,NT,{[L]:H0,[ce]:[{[L]:Js,[ce]:[{[L]:fA,[ce]:[{[L]:vA,[ce]:Ar,[M]:ue},{[L]:bA,[ce]:Ar,[M]:ue},{[L]:SA,[ce]:Ar,[M]:ue},{[L]:_A,[ce]:Ar,[M]:ue},{[L]:wA,[ce]:Ar,[M]:ue},Rh],[M]:ue},{[L]:vA,[ce]:Ir,[M]:ue},{[L]:bA,[ce]:Ir,[M]:ue},{[L]:SA,[ce]:Ir,[M]:ue},{[L]:_A,[ce]:Ir,[M]:ue},{[L]:wA,[ce]:Ir,[M]:ue},Rh],[M]:ue}],[M]:ue},zT],[M]:ue},{[L]:[$T,LT,BT],[ce]:[{[L]:Js,[ce]:[{[L]:$c,endpoint:{[Ee]:Bh,[xe]:Is,[Re]:Ve},[M]:me},{[L]:F0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Qu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Yu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue},{[L]:[Zu,{[ee]:kt,[te]:[dt,49,50,Tr],[We]:FP},{[ee]:kt,[te]:[dt,8,12,Tr],[We]:VP},{[ee]:kt,[te]:yA,[We]:RT},{[ee]:kt,[te]:[dt,32,49,Tr],[We]:kv},{[ee]:bp,[te]:U0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:RT},"--op-s3"]}],[ce]:[{[L]:EA,[ce]:[{[L]:H0,[ce]:[{[L]:[{[ee]:pt,[te]:[UT,"e"]}],[ce]:[{[L]:xA,[ce]:[jT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.ec2.{url#authority}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{[L]:[{[ee]:pt,[te]:[UT,"o"]}],[ce]:[{[L]:xA,[ce]:[jT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.{url#authority}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Ae}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Ae}],[M]:ue},{[L]:tde,[ce]:[{[L]:[Jt,{[ee]:Pr,[te]:[{[ee]:Ds,[te]:[{[ee]:US,[te]:Wfe}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[L]:[T0,tN],[ce]:[{[L]:Js,[ce]:[{[L]:RA,[ce]:[{[L]:[tr,kT],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[L]:[Ot,Nt,un,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Nt,un,Ke,lt,An],[ce]:[{endpoint:HT,[M]:me}],[M]:ue},{[L]:[Ot,Nt,un,Ke,lt,In],endpoint:HT,[M]:me},{[L]:[rt,Nt,un,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Nt,un,Ke,lt,An],[ce]:[{endpoint:FT,[M]:me}],[M]:ue},{[L]:[rt,Nt,un,Ke,lt,In],endpoint:FT,[M]:me},{[L]:[Ot,et,tr,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,tr,Ke,lt,An],[ce]:[{endpoint:VT,[M]:me}],[M]:ue},{[L]:[Ot,et,tr,Ke,lt,In],endpoint:VT,[M]:me},{[L]:[Ot,et,un,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,un,Ke,lt,An],[ce]:[{endpoint:qT,[M]:me}],[M]:ue},{[L]:[Ot,et,un,Ke,lt,In],endpoint:qT,[M]:me},{[L]:[rt,et,un,Jt,ts,C0,_n],endpoint:{[Ee]:qP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,un,Jt,ts,A0,_n],endpoint:{[Ee]:_p,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,un,Jt,ts,C0,lt,An],[ce]:[{[L]:mi,endpoint:I0,[M]:me},{endpoint:I0,[M]:me}],[M]:ue},{[L]:[rt,et,un,Jt,ts,A0,lt,An],[ce]:[{[L]:mi,endpoint:Pv,[M]:me},GT],[M]:ue},{[L]:[rt,et,un,Jt,ts,C0,lt,In],endpoint:I0,[M]:me},{[L]:[rt,et,un,Jt,ts,A0,lt,In],endpoint:Pv,[M]:me},{[L]:[rt,et,tr,Ke,_n],endpoint:{[Ee]:GP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,tr,Ke,lt,An],[ce]:[{[L]:mi,endpoint:O0,[M]:me},{endpoint:O0,[M]:me}],[M]:ue},{[L]:[rt,et,tr,Ke,lt,In],endpoint:O0,[M]:me},{[L]:[rt,et,un,Ke,_n],endpoint:{[Ee]:CT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,un,Ke,lt,An],[ce]:[{[L]:mi,endpoint:{[Ee]:CT,[xe]:mn,[Re]:Ve},[M]:me},{endpoint:KT,[M]:me}],[M]:ue},{[L]:[rt,et,un,Ke,lt,In],endpoint:KT,[M]:me}],[M]:ue},Th],[M]:ue}],[M]:ue},{[L]:[Jt,ts,{[ee]:pt,[te]:[{[ee]:Vt,[te]:[JP,"scheme"]},"http"]},{[ee]:Sp,[te]:[dt,Tr]},T0,et,rt,un],[ce]:[{[L]:Js,[ce]:[{[L]:RA,[ce]:[GT],[M]:ue},Th],[M]:ue}],[M]:ue},{[L]:[T0,{[ee]:KP,[te]:Jfe,[We]:ZP}],[ce]:[{[L]:[{[ee]:Vt,[te]:[ms,"resourceId[0]"],[We]:QP},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[nN,wp]}]}],[ce]:[{[L]:[{[ee]:pt,[te]:[M0,HS]}],[ce]:[{[L]:V0,[ce]:[{[L]:CA,[ce]:[ZT,QT,{[L]:q0,[ce]:[YT,{[L]:AA,[ce]:[D0,{[L]:G0,[ce]:[{[L]:Js,[ce]:[{[L]:IA,[ce]:[{[L]:K0,[ce]:[{[L]:[{[ee]:pt,[te]:[rN,wp]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[L]:Z0,[ce]:[{[L]:OA,[ce]:[{[L]:$c,endpoint:{[Ee]:TT,[xe]:k0,[Re]:Ve},[M]:me},{[L]:Ah,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:k0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:k0,[Re]:Ve},[M]:me}],[M]:ue},XT],[M]:ue},P0],[M]:ue},N0],[M]:ue},z0],[M]:ue}],[M]:ue}],[M]:ue},WT],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},JT],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[L]:V0,[ce]:[{[L]:CA,[ce]:[{[L]:q0,[ce]:[{[L]:V0,[ce]:[{[L]:q0,[ce]:[YT,{[L]:AA,[ce]:[D0,{[L]:G0,[ce]:[{[L]:Js,[ce]:[{[L]:[{[ee]:pt,[te]:[sN,"{partitionResult#name}"]}],[ce]:[{[L]:K0,[ce]:[{[L]:[{[ee]:pt,[te]:[M0,ol]}],[ce]:[{[L]:Z0,[ce]:[{[L]:OA,[ce]:[{[L]:j0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[L]:F0,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me},{[L]:Qu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me},{[L]:Yu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me},{[L]:[et,rt,Jt,ts],endpoint:{[Ee]:TT,[xe]:zu,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me}],[M]:ue},XT],[M]:ue},P0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},N0],[M]:ue},z0],[M]:ue}],[M]:ue}],[M]:ue},WT],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Ka,[te]:[VS,Tr]}],[ce]:[{[L]:TA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[L]:Ah,error:"S3 MRAP does not support FIPS",[M]:Ae},{[L]:j0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:tn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Tr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[L]:[{[ee]:bp,[te]:U0,[We]:AT}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:AT},Gt]},{[ee]:Vt,[te]:[ms,"partition"]}]}],[ce]:[{endpoint:{[Ee]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[xe]:{[On]:[{[dn]:Tr,name:jS,[hn]:ol,[$S]:nde}]},[Re]:Ve},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Ae}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Ae}],[M]:ue},JT],[M]:ue},{[L]:[{[ee]:pt,[te]:[M0,gf]}],[ce]:[{[L]:TA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[L]:Ah,error:"S3 Outposts does not support FIPS",[M]:Ae},{[L]:j0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:Ds,[te]:[{[ee]:Vt,[te]:[ms,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[L]:[{[ee]:Vt,[te]:sde,[We]:kv}],[ce]:[{[L]:EA,[ce]:[D0,{[L]:G0,[ce]:[{[L]:Js,[ce]:[{[L]:IA,[ce]:[{[L]:K0,[ce]:[{[L]:Z0,[ce]:[{[L]:[{[ee]:Vt,[te]:rde,[We]:IT}],[ce]:[{[L]:[{[ee]:Vt,[te]:[ms,"resourceId[3]"],[We]:FS}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ke]:IT},YP]}],[ce]:[{[L]:$c,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[xe]:eA,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:eA,[Re]:Ve},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Ae}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Ae}],[M]:ue},P0],[M]:ue},N0],[M]:ue},z0],[M]:ue}],[M]:ue}],[M]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Ae}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Ae}],[M]:ue},{[L]:[{[ee]:kt,[te]:[dt,0,4,Yfe],[We]:OT},{[ee]:pt,[te]:[{[ke]:OT},"arn:"]},{[ee]:Pr,[te]:[{[ee]:Ds,[te]:[tA]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[L]:[{[ee]:tn,[te]:[Xfe,Tr]},tA],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[L]:ede,[ce]:[{[L]:Js,[ce]:[{[L]:[un],[ce]:[{[L]:[Ot,Ke,Nt,_n],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,Nt,lt,An],[ce]:[{endpoint:nA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,Nt,lt,In],endpoint:nA,[M]:me},{[L]:[rt,Ke,Nt,_n],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,Nt,lt,An],[ce]:[{endpoint:sA,[M]:me}],[M]:ue},{[L]:[rt,Ke,Nt,lt,In],endpoint:sA,[M]:me},{[L]:[Ot,Ke,et,_n],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,et,lt,An],[ce]:[{endpoint:rA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,et,lt,In],endpoint:rA,[M]:me},{[L]:[rt,Jt,ts,et,_n],endpoint:{[Ee]:XP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Jt,ts,et,lt,An],[ce]:[{[L]:mi,endpoint:L0,[M]:me},{endpoint:L0,[M]:me}],[M]:ue},{[L]:[rt,Jt,ts,et,lt,In],endpoint:L0,[M]:me},{[L]:[rt,Ke,et,_n],endpoint:{[Ee]:MT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,et,lt,An],[ce]:[{[L]:mi,endpoint:{[Ee]:MT,[xe]:mn,[Re]:Ve},[M]:me},{endpoint:oA,[M]:me}],[M]:ue},{[L]:[rt,Ke,et,lt,In],endpoint:oA,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Ae}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Ds,[te]:[iA]},{[ee]:tn,[te]:[iA,Tr]}],[ce]:[{[L]:Js,[ce]:[{[L]:MA,[ce]:[ZT,QT,{[L]:$c,endpoint:{[Ee]:Bh,[xe]:B0,[Re]:Ve},[M]:me},{[L]:Ah,endpoint:{[Ee]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:B0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[xe]:B0,[Re]:Ve},[M]:me}],[M]:ue},Th],[M]:ue}],[M]:ue},{[L]:[$T],[ce]:[{[L]:Js,[ce]:[{[L]:MA,[ce]:[{[L]:[Nt,Ot,Ke,_n],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,Ot,Ke,lt,An],[ce]:[{endpoint:aA,[M]:me}],[M]:ue},{[L]:[Nt,Ot,Ke,lt,In],endpoint:aA,[M]:me},{[L]:[Nt,rt,Ke,_n],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,rt,Ke,lt,An],[ce]:[{endpoint:cA,[M]:me}],[M]:ue},{[L]:[Nt,rt,Ke,lt,In],endpoint:cA,[M]:me},{[L]:[et,Ot,Ke,_n],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,Ot,Ke,lt,An],[ce]:[{endpoint:lA,[M]:me}],[M]:ue},{[L]:[et,Ot,Ke,lt,In],endpoint:lA,[M]:me},{[L]:[et,rt,Jt,ts,_n],endpoint:{[Ee]:Bh,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,Jt,ts,lt,An],[ce]:[{[L]:mi,endpoint:$0,[M]:me},{endpoint:$0,[M]:me}],[M]:ue},{[L]:[et,rt,Jt,ts,lt,In],endpoint:$0,[M]:me},{[L]:[et,rt,Ke,_n],endpoint:{[Ee]:DT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,Ke,lt,An],[ce]:[{[L]:mi,endpoint:{[Ee]:DT,[xe]:mn,[Re]:Ve},[M]:me},{endpoint:uA,[M]:me}],[M]:ue},{[L]:[et,rt,Ke,lt,In],endpoint:uA,[M]:me}],[M]:ue},Th],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},ide=ode,ade=new aM({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),oN=(e,t={})=>ade.get(e,()=>vM(ide,{endpointParams:e,logger:t.logger}));ff.aws=Rb;const cde=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=wo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await GM(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},lde=async(e,t,n)=>({operation:wo(t).operation,region:await Ps(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),ude=cde(lde);function iN(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function aN(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const fde=(e,t,n)=>i=>{const l=e(i).properties?.authSchemes;if(!l)return t(i);const f=[];for(const d of l){const{name:h,properties:y={},...g}=d,v=h.toLowerCase();h!==v&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${h}' to '${v}'`);let b;if(v==="sigv4a"){b="aws.auth#sigv4a";const R=l.find(C=>{const A=C.name.toLowerCase();return A!=="sigv4a"&&A.startsWith("sigv4")});if(HP.sigv4aDependency()==="none"&&R)continue}else if(v.startsWith("sigv4"))b="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);const _=n[b];if(!_)throw new Error(`Could not find HttpAuthOption create function for '${b}'`);const x=_(i);x.schemeId=b,x.signingProperties={...x.signingProperties||{},...g,...y},f.push(x)}return f},dde=e=>{const t=[];switch(e.operation){default:t.push(iN(e)),t.push(aN(e))}return t},hde=fde(oN,dde,{"aws.auth#sigv4":iN,"aws.auth#sigv4a":aN}),pde=e=>{const t=AM(e),n=qK(t);return Object.assign(n,{authSchemePreference:Ps(e.authSchemePreference??[])})},mde=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),qS={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Un extends wa{constructor(t){super(t),Object.setPrototypeOf(this,Un.prototype)}}class GS extends Un{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,GS.prototype)}}class KS extends Un{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,KS.prototype)}}class ZS extends Un{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,ZS.prototype)}}class QS extends Un{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,QS.prototype)}}class YS extends Un{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,YS.prototype)}}class XS extends Un{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,XS.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class WS extends Un{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,WS.prototype)}}class JS extends Un{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,JS.prototype)}}class e_ extends Un{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,e_.prototype)}}class t_ extends Un{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,t_.prototype)}}class n_ extends Un{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,n_.prototype)}}class s_ extends Un{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,s_.prototype)}}class r_ extends Un{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,r_.prototype)}}class o_ extends Un{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,o_.prototype)}}const cN="ACL",gde="AbortDate",DA="AccessKeyId",yde="AbortMultipartUpload",vde="AbortMultipartUploadOutput",bde="AbortMultipartUploadRequest",Sde="AcceptRanges",_de="AbortRuleId",wde="AccessTier",os="Bucket",Ede="BucketArn",xde="BucketAlreadyExists",Rde="BucketAlreadyOwnedByYou",Cde="BypassGovernanceRetention",Co="BucketKeyEnabled",lN="BucketRegion",i_="Body",uN="Buckets",xl="ChecksumAlgorithm",a_="CacheControl",Hi="ChecksumCRC32",Fi="ChecksumCRC32C",Vi="ChecksumCRC64NVME",c_="Cache-Control",Tde="CreationDate",l_="Content-Disposition",u_="ContentDisposition",f_="Content-Encoding",d_="ContentEncoding",h_="ContentLanguage",p_="Content-Language",m_="Content-Length",g_="ContentLength",y_="Content-MD5",v_="ContentMD5",Ade="CompletedMultipartUpload",Ide="CompleteMultipartUploadOutput",Ode="CreateMultipartUploadOutput",Mde="CompleteMultipartUploadResult",Dde="CompleteMultipartUploadRequest",kde="CreateMultipartUploadRequest",fN="CompleteMultipartUpload",Pde="CreateMultipartUpload",Nde="ChecksumMode",zde="CommonPrefix",Lde="CommonPrefixList",Bde="CompletedPartList",$de="CompletedPart",Ude="CommonPrefixes",jde="ContentRange",Hde="Content-Range",qi="ChecksumSHA1",Gi="ChecksumSHA256",Fde="CreateSessionOutput",Vde="CreateSessionResult",qde="CreateSessionRequest",Gde="CreateSession",Za="ChecksumType",b_="Content-Type",S_="ContentType",fm="ContinuationToken",Kde="Contents",kA="Credentials",dN="DeleteMarker",Zde="DisplayName",Qde="DeleteObjectOutput",Yde="DeleteObjectRequest",Xde="DeleteObject",hN="Delimiter",yf="Expiration",To="ExpectedBucketOwner",PA="ExpiresString",Wde="EncryptionTypeMismatch",So="ETag",pN="EncodingType",il="Expires",Jde="FetchOwner",mN="GrantFullControl",ehe="GetObject",the="GetObjectOutput",nhe="GetObjectRequest",gN="GrantRead",yN="GrantReadACP",vN="GrantWriteACP",she="ID",dm="IfMatch",rhe="IfMatchInitiatedTime",ohe="IfMatchLastModifiedTime",ihe="IfMatchSize",ahe="If-Modified-Since",che="IfModifiedSince",lhe="InitiateMultipartUploadResult",hm="If-Match",__="IfNoneMatch",w_="If-None-Match",uhe="InvalidObjectState",fhe="IdempotencyParameterMismatch",dhe="InvalidRequest",hhe="IsRestoreInProgress",phe="IsTruncated",mhe="IfUnmodifiedSince",ghe="If-Unmodified-Since",yhe="InvalidWriteOffset",ur="Key",vhe="KeyCount",bhe="Location",She="ListAllMyBucketsResult",_he="ListBuckets",whe="ListBucketsOutput",Ehe="ListBucketsRequest",xhe="ListBucketResult",bN="LastModified",Rhe="Last-Modified",Che="ListObjectsV2",The="ListObjectsV2Output",Ahe="ListObjectsV2Request",E_="Metadata",Ihe="MaxBuckets",Ohe="MFA",SN="MaxKeys",Mhe="MissingMeta",Dhe="MpuObjectSize",khe="MultipartUpload",_N="Name",Phe="NextContinuationToken",Nhe="NotFound",zhe="NoSuchBucket",Lhe="NoSuchKey",Bhe="NoSuchUpload",x_="Owner",$he="ObjectAlreadyInActiveTierError",R_="ObjectLockLegalHoldStatus",C_="ObjectLockMode",T_="ObjectLockRetainUntilDate",Uhe="ObjectList",jhe="ObjectNotInActiveTierError",Hhe="OptionalObjectAttributes",Fhe="Object",zf="Prefix",Vhe="PartsCount",A_="PartNumber",qhe="PutObject",Ghe="PutObjectOutput",Khe="PutObjectRequest",Zhe="PutObjectTagging",Qhe="PutObjectTaggingOutput",Yhe="PutObjectTaggingRequest",Xhe="Parts",Whe="Part",Ki="RequestCharged",Jhe="ResponseCacheControl",epe="ResponseContentDisposition",tpe="ResponseContentEncoding",npe="ResponseContentLanguage",spe="ResponseContentType",rpe="ResponseExpires",ope="RestoreExpiryDate",Ao="RequestPayer",ipe="ReplicationStatus",wN="RestoreStatus",NA="Range",ape="Restore",EN="StartAfter",zA="SecretAccessKey",cpe="StreamingBlob",Lf="StorageClass",lpe="SessionCredentialValue",upe="SessionCredentials",fpe="SessionMode",Io="ServerSideEncryption",Oo="SSECustomerAlgorithm",Rl="SSECustomerKey",Mo="SSECustomerKeyMD5",Qa="SSEKMSEncryptionContext",Ur="SSEKMSKeyId",LA="SessionToken",xN="Size",dpe="TagCount",hpe="TooManyParts",RN="TagSet",CN="Tag",vf="Tagging",pm="UploadId",ppe="UploadPart",mpe="UploadPartOutput",gpe="UploadPartRequest",ype="Value",Zi="VersionId",vpe="WriteOffsetBytes",I_="WebsiteRedirectLocation",bpe="accept-ranges",Spe="bucket-region",vs="client",TN="continuation-token",_pe="delimiter",bs="error",wpe="encoding-type",Epe="fetch-owner",wr="http",mm="httpChecksum",Bs="httpError",U="httpHeader",AN="httpPayload",O_="httpPrefixHeaders",Bt="httpQuery",xpe="max-buckets",Rpe="max-keys",IN="prefix",ON="partNumber",Cpe="response-cache-control",Tpe="response-content-disposition",Ape="response-content-encoding",Ipe="response-content-language",Ope="response-content-type",Mpe="response-expires",Dpe="streaming",kpe="start-after",MN="smithy.ts.sdk.synthetic.com.amazonaws.s3",M_="uploadId",D_="versionId",Ep="xmlFlattened",Yn="xmlName",DN="x-amz-acl",Ppe="x-amz-abort-date",Npe="x-amz-abort-rule-id",zpe="x-amz-bypass-governance-retention",kN="x-amz-checksum-algorithm",Cl="x-amz-checksum-crc32",Tl="x-amz-checksum-crc32c",Al="x-amz-checksum-crc64nvme",Lpe="x-amz-checksum-mode",Il="x-amz-checksum-sha1",Ol="x-amz-checksum-sha256",Bpe="x-amz-create-session-mode",Bf="x-amz-checksum-type",PN="x-amz-delete-marker",k_="x-amz-expiration",Do="x-amz-expected-bucket-owner",NN="x-amz-grant-full-control",zN="x-amz-grant-read",LN="x-amz-grant-read-acp",BN="x-amz-grant-write-acp",$pe="x-amz-if-match-initiated-time",Upe="x-amz-if-match-last-modified-time",jpe="x-amz-if-match-size",P_="x-amz-meta-",Hpe="x-amz-mfa",Fpe="x-amz-missing-meta",Vpe="x-amz-mp-object-size",qpe="x-amz-mp-parts-count",N_="x-amz-object-lock-legal-hold",z_="x-amz-object-lock-mode",L_="x-amz-object-lock-retain-until-date",Gpe="x-amz-optional-object-attributes",Kpe="x-amz-object-size",Zpe="x-amz-restore",Qi="x-amz-request-charged",ko="x-amz-request-payer",Qpe="x-amz-replication-status",B_="x-amz-storage-class",$_="x-amz-sdk-checksum-algorithm",Po="x-amz-server-side-encryption",No="x-amz-server-side-encryption-aws-kms-key-id",zo="x-amz-server-side-encryption-bucket-key-enabled",Ml="x-amz-server-side-encryption-context",Lo="x-amz-server-side-encryption-customer-algorithm",$f="x-amz-server-side-encryption-customer-key",Bo="x-amz-server-side-encryption-customer-key-MD5",$N="x-amz-tagging",Ype="x-amz-tagging-count",Uf="x-amz-version-id",Xpe="x-amz-write-offset-bytes",U_="x-amz-website-redirect-location",we="com.amazonaws.s3";var BA=[0,we,lpe,8,0],jf=[0,we,Rl,8,0],Dl=[0,we,Qa,8,0],$o=[0,we,Ur,8,0],j_=[0,we,cpe,{[Dpe]:1},42],Wpe=[3,we,vde,0,[Ki],[[0,{[U]:Qi}]]],Jpe=[3,we,bde,0,[os,ur,pm,Ao,To,rhe],[[0,1],[0,1],[0,{[Bt]:M_}],[0,{[U]:ko}],[0,{[U]:Do}],[6,{[U]:$pe}]],3],eme=[3,we,os,0,[_N,Tde,lN,Ede],[0,4,0,0]],tme=[-3,we,xde,{[bs]:vs,[Bs]:409},[],[]];Mt.for(we).registerError(tme,ZS);var nme=[-3,we,Rde,{[bs]:vs,[Bs]:409},[],[]];Mt.for(we).registerError(nme,QS);var sme=[3,we,zde,0,[zf],[0]],rme=[3,we,Ade,0,[Xhe],[[()=>Gme,{[Ep]:1,[Yn]:Whe}]]],ome=[3,we,$de,0,[So,Hi,Fi,Vi,qi,Gi,A_],[0,0,0,0,0,0,1]],ime=[3,we,Ide,{[Yn]:Mde},[bhe,os,ur,yf,So,Hi,Fi,Vi,qi,Gi,Za,Io,Zi,Ur,Co,Ki],[0,0,0,[0,{[U]:k_}],0,0,0,0,0,0,0,[0,{[U]:Po}],[0,{[U]:Uf}],[()=>$o,{[U]:No}],[2,{[U]:zo}],[0,{[U]:Qi}]]],ame=[3,we,Dde,0,[os,ur,pm,khe,Hi,Fi,Vi,qi,Gi,Za,Dhe,Ao,To,dm,__,Oo,Rl,Mo],[[0,1],[0,1],[0,{[Bt]:M_}],[()=>rme,{[AN]:1,[Yn]:fN}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Bf}],[1,{[U]:Vpe}],[0,{[U]:ko}],[0,{[U]:Do}],[0,{[U]:hm}],[0,{[U]:w_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}]],3],cme=[3,we,Ode,{[Yn]:lhe},[gde,_de,os,ur,pm,Io,Oo,Mo,Ur,Qa,Co,Ki,xl,Za],[[4,{[U]:Ppe}],[0,{[U]:Npe}],[0,{[Yn]:os}],0,0,[0,{[U]:Po}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[0,{[U]:Qi}],[0,{[U]:kN}],[0,{[U]:Bf}]]],lme=[3,we,kde,0,[os,ur,cN,a_,u_,d_,h_,S_,il,mN,gN,yN,vN,E_,Io,Lf,I_,Oo,Rl,Mo,Ur,Qa,Co,Ao,vf,C_,T_,R_,To,xl,Za],[[0,1],[0,1],[0,{[U]:DN}],[0,{[U]:c_}],[0,{[U]:l_}],[0,{[U]:f_}],[0,{[U]:p_}],[0,{[U]:b_}],[4,{[U]:il}],[0,{[U]:NN}],[0,{[U]:zN}],[0,{[U]:LN}],[0,{[U]:BN}],[128,{[O_]:P_}],[0,{[U]:Po}],[0,{[U]:B_}],[0,{[U]:U_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[0,{[U]:ko}],[0,{[U]:$N}],[0,{[U]:z_}],[5,{[U]:L_}],[0,{[U]:N_}],[0,{[U]:Do}],[0,{[U]:kN}],[0,{[U]:Bf}]],2],ume=[3,we,Fde,{[Yn]:Vde},[kA,Io,Ur,Qa,Co],[[()=>Lme,{[Yn]:kA}],[0,{[U]:Po}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}]],1],fme=[3,we,qde,0,[os,fpe,Io,Ur,Qa,Co],[[0,1],[0,{[U]:Bpe}],[0,{[U]:Po}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}]],1],dme=[3,we,Qde,0,[dN,Zi,Ki],[[2,{[U]:PN}],[0,{[U]:Uf}],[0,{[U]:Qi}]]],hme=[3,we,Yde,0,[os,ur,Ohe,Zi,Ao,Cde,To,dm,ohe,ihe],[[0,1],[0,1],[0,{[U]:Hpe}],[0,{[Bt]:D_}],[0,{[U]:ko}],[2,{[U]:zpe}],[0,{[U]:Do}],[0,{[U]:hm}],[6,{[U]:Upe}],[1,{[U]:jpe}]],2],pme=[-3,we,Wde,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(pme,e_);var mme=[3,we,the,0,[i_,dN,Sde,yf,ape,bN,g_,So,Hi,Fi,Vi,qi,Gi,Za,Mhe,Zi,a_,u_,d_,h_,jde,S_,il,PA,I_,Io,E_,Oo,Mo,Ur,Co,Lf,Ki,ipe,Vhe,dpe,C_,T_,R_],[[()=>j_,16],[2,{[U]:PN}],[0,{[U]:bpe}],[0,{[U]:k_}],[0,{[U]:Zpe}],[4,{[U]:Rhe}],[1,{[U]:m_}],[0,{[U]:So}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Bf}],[1,{[U]:Fpe}],[0,{[U]:Uf}],[0,{[U]:c_}],[0,{[U]:l_}],[0,{[U]:f_}],[0,{[U]:p_}],[0,{[U]:Hde}],[0,{[U]:b_}],[4,{[U]:il}],[0,{[U]:PA}],[0,{[U]:U_}],[0,{[U]:Po}],[128,{[O_]:P_}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[2,{[U]:zo}],[0,{[U]:B_}],[0,{[U]:Qi}],[0,{[U]:Qpe}],[1,{[U]:qpe}],[1,{[U]:Ype}],[0,{[U]:z_}],[5,{[U]:L_}],[0,{[U]:N_}]]],gme=[3,we,nhe,0,[os,ur,dm,che,__,mhe,NA,Jhe,epe,tpe,npe,spe,rpe,Zi,Oo,Rl,Mo,Ao,A_,To,Nde],[[0,1],[0,1],[0,{[U]:hm}],[4,{[U]:ahe}],[0,{[U]:w_}],[4,{[U]:ghe}],[0,{[U]:NA}],[0,{[Bt]:Cpe}],[0,{[Bt]:Tpe}],[0,{[Bt]:Ape}],[0,{[Bt]:Ipe}],[0,{[Bt]:Ope}],[6,{[Bt]:Mpe}],[0,{[Bt]:D_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[0,{[U]:ko}],[1,{[Bt]:ON}],[0,{[U]:Do}],[0,{[U]:Lpe}]],2],yme=[-3,we,fhe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(yme,r_);var vme=[-3,we,uhe,{[bs]:vs,[Bs]:403},[Lf,wde],[0,0]];Mt.for(we).registerError(vme,XS);var bme=[-3,we,dhe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(bme,t_);var Sme=[-3,we,yhe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(Sme,n_);var _me=[3,we,whe,{[Yn]:She},[uN,x_,fm,zf],[[()=>Vme,0],()=>UN,0,0]],wme=[3,we,Ehe,0,[Ihe,fm,zf,lN],[[1,{[Bt]:xpe}],[0,{[Bt]:TN}],[0,{[Bt]:IN}],[0,{[Bt]:Spe}]]],Eme=[3,we,The,{[Yn]:xhe},[phe,Kde,_N,zf,hN,SN,Ude,pN,vhe,fm,Phe,EN,Ki],[2,[()=>Kme,{[Ep]:1}],0,0,0,1,[()=>qme,{[Ep]:1}],0,1,0,0,0,[0,{[U]:Qi}]]],xme=[3,we,Ahe,0,[os,hN,pN,SN,zf,fm,Jde,EN,Ao,To,Hhe],[[0,1],[0,{[Bt]:_pe}],[0,{[Bt]:wpe}],[1,{[Bt]:Rpe}],[0,{[Bt]:IN}],[0,{[Bt]:TN}],[2,{[Bt]:Epe}],[0,{[Bt]:kpe}],[0,{[U]:ko}],[0,{[U]:Do}],[64,{[U]:Gpe}]],1],Rme=[-3,we,zhe,{[bs]:vs,[Bs]:404},[],[]];Mt.for(we).registerError(Rme,YS);var Cme=[-3,we,Lhe,{[bs]:vs,[Bs]:404},[],[]];Mt.for(we).registerError(Cme,WS);var Tme=[-3,we,Bhe,{[bs]:vs,[Bs]:404},[],[]];Mt.for(we).registerError(Tme,GS);var Ame=[-3,we,Nhe,{[bs]:vs},[],[]];Mt.for(we).registerError(Ame,JS);var Ime=[3,we,Fhe,0,[ur,bN,So,xl,Za,xN,Lf,x_,wN],[0,4,0,[64,{[Ep]:1}],0,1,0,()=>UN,()=>zme]],Ome=[-3,we,$he,{[bs]:vs,[Bs]:403},[],[]];Mt.for(we).registerError(Ome,o_);var Mme=[-3,we,jhe,{[bs]:vs,[Bs]:403},[],[]];Mt.for(we).registerError(Mme,KS);var UN=[3,we,x_,0,[Zde,she],[0,0]],Dme=[3,we,Ghe,0,[yf,So,Hi,Fi,Vi,qi,Gi,Za,Io,Zi,Oo,Mo,Ur,Qa,Co,xN,Ki],[[0,{[U]:k_}],[0,{[U]:So}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Bf}],[0,{[U]:Po}],[0,{[U]:Uf}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[1,{[U]:Kpe}],[0,{[U]:Qi}]]],kme=[3,we,Khe,0,[os,ur,cN,i_,a_,u_,d_,h_,g_,v_,S_,xl,Hi,Fi,Vi,qi,Gi,il,dm,__,mN,gN,yN,vN,vpe,E_,Io,Lf,I_,Oo,Rl,Mo,Ur,Qa,Co,Ao,vf,C_,T_,R_,To],[[0,1],[0,1],[0,{[U]:DN}],[()=>j_,16],[0,{[U]:c_}],[0,{[U]:l_}],[0,{[U]:f_}],[0,{[U]:p_}],[1,{[U]:m_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:$_}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[4,{[U]:il}],[0,{[U]:hm}],[0,{[U]:w_}],[0,{[U]:NN}],[0,{[U]:zN}],[0,{[U]:LN}],[0,{[U]:BN}],[1,{[U]:Xpe}],[128,{[O_]:P_}],[0,{[U]:Po}],[0,{[U]:B_}],[0,{[U]:U_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[0,{[U]:ko}],[0,{[U]:$N}],[0,{[U]:z_}],[5,{[U]:L_}],[0,{[U]:N_}],[0,{[U]:Do}]],2],Pme=[3,we,Qhe,0,[Zi],[[0,{[U]:Uf}]]],Nme=[3,we,Yhe,0,[os,ur,vf,Zi,v_,xl,To,Ao],[[0,1],[0,1],[()=>$me,{[AN]:1,[Yn]:vf}],[0,{[Bt]:D_}],[0,{[U]:y_}],[0,{[U]:$_}],[0,{[U]:Do}],[0,{[U]:ko}]],3],zme=[3,we,wN,0,[hhe,ope],[2,4]],Lme=[3,we,upe,0,[DA,zA,LA,yf],[[0,{[Yn]:DA}],[()=>BA,{[Yn]:zA}],[()=>BA,{[Yn]:LA}],[4,{[Yn]:yf}]],4],Bme=[3,we,CN,0,[ur,ype],[0,0],2],$me=[3,we,vf,0,[RN],[[()=>Zme,0]],1],Ume=[-3,we,hpe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(Ume,s_);var jme=[3,we,mpe,0,[Io,So,Hi,Fi,Vi,qi,Gi,Oo,Mo,Ur,Co,Ki],[[0,{[U]:Po}],[0,{[U]:So}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[2,{[U]:zo}],[0,{[U]:Qi}]]],Hme=[3,we,gpe,0,[os,ur,A_,pm,i_,g_,v_,xl,Hi,Fi,Vi,qi,Gi,Oo,Rl,Mo,Ao,To],[[0,1],[0,1],[1,{[Bt]:ON}],[0,{[Bt]:M_}],[()=>j_,16],[1,{[U]:m_}],[0,{[U]:y_}],[0,{[U]:$_}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[0,{[U]:ko}],[0,{[U]:Do}]],4],Fme=[-3,MN,"S3ServiceException",0,[],[]];Mt.for(MN).registerError(Fme,Un);var Vme=[1,we,uN,0,[()=>eme,{[Yn]:os}]],qme=[1,we,Lde,0,()=>sme],Gme=[1,we,Bde,0,()=>ome],Kme=[1,we,Uhe,0,[()=>Ime,0]],Zme=[1,we,RN,0,[()=>Bme,{[Yn]:CN}]],G0e=[9,we,yde,{[wr]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>Jpe,()=>Wpe],K0e=[9,we,fN,{[wr]:["POST","/{Key+}",200]},()=>ame,()=>ime],Z0e=[9,we,Pde,{[wr]:["POST","/{Key+}?uploads",200]},()=>lme,()=>cme],Qme=[9,we,Gde,{[wr]:["GET","/?session",200]},()=>fme,()=>ume],Q0e=[9,we,Xde,{[wr]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>hme,()=>dme],Y0e=[9,we,ehe,{[mm]:"-",[wr]:["GET","/{Key+}?x-id=GetObject",200]},()=>gme,()=>mme],Yme=[9,we,_he,{[wr]:["GET","/?x-id=ListBuckets",200]},()=>wme,()=>_me],Xme=[9,we,Che,{[wr]:["GET","/?list-type=2",200]},()=>xme,()=>Eme],X0e=[9,we,qhe,{[mm]:"-",[wr]:["PUT","/{Key+}?x-id=PutObject",200]},()=>kme,()=>Dme],W0e=[9,we,Zhe,{[mm]:"-",[wr]:["PUT","/{Key+}?tagging",200]},()=>Nme,()=>Pme],J0e=[9,we,ppe,{[mm]:"-",[wr]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>Hme,()=>jme];class Wme extends Br.classBuilder().ep({...qS,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),LS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(Qme).build(){}const Jme="3.975.0",ege={version:Jme};function $A(e){return typeof e=="string"?e.length===0:e.byteLength===0}var jN={name:"SHA-1"},UA={name:"HMAC",hash:jN},tge=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),nge=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ai().crypto.subtle.importKey("raw",jA(t),UA,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!$A(t)){var n=jA(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return Ai().crypto.subtle.sign(UA,n,t.toHash).then(function(r){return new Uint8Array(r)})}):$A(this.toHash)?Promise.resolve(tge):Promise.resolve().then(function(){return Ai().crypto.subtle.digest(jN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function jA(e){return typeof e=="string"?eD(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var sge=(function(){function e(t){if(rD(Ai()))this.hash=new nge(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(Na(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class Wu{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&HA(n),new Wu(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&HA(t),parseInt(ps(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function HA(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class rge{toUtf8;fromUtf8;constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const c of Object.keys(t)){const l=this.fromUtf8(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=this.fromUtf8(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(Wu.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!hge.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(ZO(t.value.replace(/\-/g,"")),1),g}}parse(t){const n={};let r=0;for(;r{if(typeof f!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+f);t=f,n=4,r=new Uint8Array(f),new DataView(r.buffer).setUint32(0,f,!1)},l=async function*(){const f=e[Symbol.asyncIterator]();for(;;){const{value:d,done:h}=await f.next();if(h){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const y=d.length;let g=0;for(;g({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),Rge=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:i}=await t.next();if(r)return n.close();n.enqueue(i)}})};class Cge{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Ege({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=Tge(t)?xge(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Rge(r):r}}const Tge=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,Age=e=>new Cge(e);async function Ige(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},gi=64,Mge=16,Dge=[1732584193,4023233417,2562383102,271733878];class kge{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(Pge(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=Nge(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===gi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:i}=this,c=i*8;if(n.setUint8(this.bufferLength++,128),r%gi>=gi-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(gi-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(Mge));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],i=n[1],c=n[2],l=n[3];r=Gn(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=Gn(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=Gn(c,l,r,i,t.getUint32(8,!0),17,606105819),i=Gn(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=Gn(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=Gn(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=Gn(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=Gn(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=Gn(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=Gn(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=Gn(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=Gn(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=Gn(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=Gn(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=Gn(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=Gn(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=Kn(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=Kn(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=Kn(c,l,r,i,t.getUint32(44,!0),14,643717713),i=Kn(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=Kn(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=Kn(l,r,i,c,t.getUint32(40,!0),9,38016083),c=Kn(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=Kn(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=Kn(r,i,c,l,t.getUint32(36,!0),5,568446438),l=Kn(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=Kn(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=Kn(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=Kn(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=Kn(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=Kn(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=Kn(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=Zn(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=Zn(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=Zn(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=Zn(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=Zn(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=Zn(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=Zn(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=Zn(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=Zn(r,i,c,l,t.getUint32(52,!0),4,681279174),l=Zn(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=Zn(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=Zn(i,c,l,r,t.getUint32(24,!0),23,76029189),r=Zn(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=Zn(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=Zn(c,l,r,i,t.getUint32(60,!0),16,530742520),i=Zn(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=Qn(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=Qn(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=Qn(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=Qn(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=Qn(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=Qn(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=Qn(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=Qn(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=Qn(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=Qn(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=Qn(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=Qn(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=Qn(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=Qn(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=Qn(c,l,r,i,t.getUint32(8,!0),15,718787259),i=Qn(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}reset(){this.state=Uint32Array.from(Dge),this.buffer=new DataView(new ArrayBuffer(gi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function gm(e,t,n,r,i,c){return t=(t+e&4294967295)+(r+c&4294967295)&4294967295,(t<>>32-i)+n&4294967295}function Gn(e,t,n,r,i,c,l){return gm(t&n|~t&r,e,t,i,c,l)}function Kn(e,t,n,r,i,c,l){return gm(t&r|n&~r,e,t,i,c,l)}function Zn(e,t,n,r,i,c,l){return gm(t^n^r,e,t,i,c,l)}function Qn(e,t,n,r,i,c,l){return gm(n^(t|~r),e,t,i,c,l)}function Pge(e){return typeof e=="string"?e.length===0:e.byteLength===0}function Nge(e){return typeof e=="string"?bo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const zge=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Pa,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oN,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??dG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??hde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Tb},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new FK}],logger:e?.logger??new Ab,protocol:e?.protocol??NZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??QO,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??HP,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??hf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??bo,utf8Encoder:e?.utf8Encoder??Ua}),Lge=e=>{const t=cD(e),n=()=>t().then(MM),r=zge(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??IM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??iD({serviceId:r.serviceId,clientVersion:ege.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Age,maxAttempts:e?.maxAttempts??pf,md5:e?.md5??kge,region:e?.region??aD("Region is missing"),requestHandler:Zp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||ZM),sha1:e?.sha1??sge,sha256:e?.sha256??oD,streamCollector:e?.streamCollector??vb,streamHasher:e?.streamHasher??Oge,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve($M)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(UM))}},Bge=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},$ge=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Uge=(e,t)=>{const n=Object.assign(hD(e),DM(e),BO(e),Bge(e));return t.forEach(r=>r.configure(n)),Object.assign(e,pD(n),kM(n),$O(n),$ge(n))};class jge extends OM{config;constructor(...[t]){const n=Lge(t||{});super(n),this.initConfig=n;const r=mde(n),i=iM(r),c=gfe(i),l=WM(c),f=HM(l),d=f,h=KM(d),y=Kfe(h),g=pde(y),v=Nfe(g,{session:[()=>this,Wme]}),b=Uge(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(BM(this.config)),this.middlewareStack.use(JM(this.config)),this.middlewareStack.use(FM(this.config)),this.middlewareStack.use(UO(this.config)),this.middlewareStack.use(jO(this.config)),this.middlewareStack.use(HO(this.config)),this.middlewareStack.use(FO(this.config,{httpAuthSchemeParametersProvider:ude,identityProviderConfigProvider:async _=>new rM({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(qO(this.config)),this.middlewareStack.use(Gfe(this.config)),this.middlewareStack.use(ffe(this.config)),this.middlewareStack.use(_fe(this.config)),this.middlewareStack.use(Ife(this.config)),this.middlewareStack.use(Pfe(this.config))}destroy(){super.destroy()}}class Hge extends Br.classBuilder().ep(qS).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),LS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(Yme).build(){}class Fge extends Br.classBuilder().ep({...qS,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),LS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(Xme).build(){}let $h=null,Uu=null;function jr(){if(!$h){const e=Kp();if(!e)throw new Error("AWS credentials not configured");$h=new lY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return $h}function FN(){if(!Uu){const e=Kp();if(!e)throw new Error("AWS credentials not configured");Uu=new jge({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Uu.middlewareStack.use({applyToStack:t=>{t.add(n=>r=>{const i=r.request;return i?.path?.endsWith("/")&&i.path!=="/"&&(i.path=i.path.slice(0,-1)),n(r)},{step:"build",name:"removeTrailingSlash"})}})}return Uu}function Vge(){$h=null,Uu=null}function VN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:qge},e[0]=t):t=e[0];const n=MB(t),r=Ip(),i=JA();let c;e[1]!==r||e[2]!==i?(c=function(){Zq(),Vge(),i.clear(),r({to:"/login"})},e[1]=r,e[2]=i,e[3]=c):c=e[3];const l=c;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=$.jsx(c0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(E$,{className:"size-4"}),y=$.jsx("span",{children:"Dashboard"}),e[5]=h,e[6]=y):(h=e[5],y=e[6]);let g;e[7]!==d?(g=$.jsxs(a0,{children:[f,$.jsx(bh,{children:$.jsx(ma,{children:$.jsx(Or,{to:"/",children:$.jsxs(ga,{isActive:d,tooltip:"Dashboard",children:[h,y]})})})})]}),e[7]=d,e[8]=g):g=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=$.jsx(c0,{children:"EC2"}),e[9]=v):v=e[9];let b;e[10]!==n?(b=n.startsWith("/ec2/describe-instances")||n.startsWith("/ec2/run-instances"),e[10]=n,e[11]=b):b=e[11];let _,x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(TR,{className:"size-4"}),_=$.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-instances",children:$.jsxs(ga,{isActive:b,tooltip:"EC2 Instances",children:[x,_]})})}),e[14]=b,e[15]=R):R=e[15];let C;e[16]!==n?(C=n.startsWith("/ec2/describe-images"),e[16]=n,e[17]=C):C=e[17];let A,O;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=$.jsx(R$,{className:"size-4"}),O=$.jsx("span",{children:"Images"}),e[18]=A,e[19]=O):(A=e[18],O=e[19]);let D;e[20]!==C?(D=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-images",children:$.jsxs(ga,{isActive:C,tooltip:"Images",children:[A,O]})})}),e[20]=C,e[21]=D):D=e[21];let N;e[22]!==n?(N=n.startsWith("/ec2/describe-key-pairs"),e[22]=n,e[23]=N):N=e[23];let j,B;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=$.jsx(T$,{className:"size-4"}),B=$.jsx("span",{children:"Key Pairs"}),e[24]=j,e[25]=B):(j=e[24],B=e[25]);let k;e[26]!==N?(k=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-key-pairs",children:$.jsxs(ga,{isActive:N,tooltip:"Key Pairs",children:[j,B]})})}),e[26]=N,e[27]=k):k=e[27];let Z;e[28]!==n?(Z=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=Z):Z=e[29];let se,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsx(_$,{className:"size-4"}),le=$.jsx("span",{children:"Volumes"}),e[30]=se,e[31]=le):(se=e[30],le=e[31]);let K;e[32]!==Z?(K=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-volumes",children:$.jsxs(ga,{isActive:Z,tooltip:"Volumes",children:[se,le]})})}),e[32]=Z,e[33]=K):K=e[33];let Q;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==K?(Q=$.jsxs(a0,{children:[v,$.jsxs(bh,{children:[R,D,k,K]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=K,e[38]=Q):Q=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=$.jsx(c0,{children:"S3"}),e[39]=ye):ye=e[39];let fe;e[40]!==n?(fe=n.startsWith("/s3/ls"),e[40]=n,e[41]=fe):fe=e[41];let q,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=$.jsx(TR,{className:"size-4"}),W=$.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=W):(q=e[42],W=e[43]);let H;e[44]!==fe?(H=$.jsxs(a0,{children:[ye,$.jsx(bh,{children:$.jsx(ma,{children:$.jsx(Or,{to:"/s3/ls",children:$.jsxs(ga,{isActive:fe,tooltip:"Buckets",children:[q,W]})})})})]}),e[44]=fe,e[45]=H):H=e[45];let ve;e[46]!==Q||e[47]!==H||e[48]!==g?(ve=$.jsxs(pH,{children:[g,Q,H]}),e[46]=Q,e[47]=H,e[48]=g,e[49]=ve):ve=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=$.jsx(I$,{className:"size-4"}),P=$.jsx("span",{children:"Sign out"}),e[50]=Te,e[51]=P):(Te=e[50],P=e[51]);let ne;e[52]!==l?(ne=$.jsx(hH,{children:$.jsx(bh,{children:$.jsx(ma,{children:$.jsxs(ga,{onClick:l,tooltip:"Sign out",children:[Te,P]})})})}),e[52]=l,e[53]=ne):ne=e[53];let ie;e[54]===Symbol.for("react.memo_cache_sentinel")?(ie=$.jsx(dH,{}),e[54]=ie):ie=e[54];let de;return e[55]!==ve||e[56]!==ne?(de=$.jsxs(uH,{collapsible:"icon",children:[ve,ne,ie]}),e[55]=ve,e[56]=ne,e[57]=de):de=e[57],de}function qge(e){return e.pathname}function Gge(e){const t=Ct.c(18),{error:n,reset:r}=e,i=Xn(),c=JA();let l;t[0]!==c||t[1]!==r||t[2]!==i?(l=function(){c.invalidateQueries(),r(),i.invalidate()},t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];const f=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(VN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(cO,{}),t[5]=h):h=t[5];let y,g;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=$.jsx("div",{className:"flex justify-center",children:$.jsx(b$,{className:"size-12 text-destructive"})}),g=$.jsx("h1",{className:"font-semibold text-2xl",children:"Something went wrong"}),t[6]=y,t[7]=g):(y=t[6],g=t[7]);const v=n.message||"An unexpected error occurred";let b;t[8]!==v?(b=$.jsx("p",{className:"text-muted-foreground",children:v}),t[8]=v,t[9]=b):b=t[9];let _;t[10]!==f?(_=$.jsx(el,{onClick:f,variant:"default",children:"Try Again"}),t[10]=f,t[11]=_):_=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(Or,{to:"/",children:$.jsx(el,{variant:"outline",children:"Go Home"})}),t[12]=x):x=t[12];let R;t[13]!==_?(R=$.jsxs("div",{className:"flex justify-center gap-2",children:[_,x]}),t[13]=_,t[14]=R):R=t[14];let C;return t[15]!==R||t[16]!==b?(C=$.jsxs($.Fragment,{children:[d,$.jsxs("main",{className:"flex flex-1 flex-col",children:[h,$.jsx("div",{className:"flex flex-1 items-center justify-center p-6 pt-0",children:$.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[y,g,b,R]})})]})]}),t[15]=R,t[16]=b,t[17]=C):C=t[17],C}const H_=yB()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>$.jsxs($.Fragment,{children:[$.jsx(zB,{}),$.jsx(VN,{}),$.jsxs("main",{className:"flex flex-1 flex-col",children:[$.jsx(cO,{}),$.jsx("div",{className:"flex flex-1 flex-col p-8",children:$.jsx(EI,{})})]})]}),errorComponent:Gge,notFoundComponent:yH}),Kge=()=>vn(()=>import("./login.js"),__vite__mapDeps([0,1])),Zge=nn("/login")({beforeLoad:()=>{if(Kp())throw Hv({to:"/"})},component:xn(Kge,"component")}),Qge=()=>vn(()=>import("./route.js"),[]),Yge=nn("/_auth")({beforeLoad:()=>{if(!Kp())throw Hv({to:"/login"})},component:xn(Qge,"component")}),Xge={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new BP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},Wge=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new BP({InstanceIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),Jge={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new afe({Filters:[{Name:"capacity",Values:["true"]}]});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},qN={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new LP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},GN=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new LP({ImageIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),KN={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new $P({});return await jr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},eye=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new $P({KeyPairIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),tye={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new cfe({});return await jr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},nye={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new UP({});return await jr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},ZN=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new UP({VolumeIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),sye=()=>vn(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),rye=nn("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(tye)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:xn(sye,"component")}),oye={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new Hge({});return await FN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},QN=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new Fge({Bucket:e,Prefix:t,Delimiter:"/"});return await FN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),iye=()=>vn(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),aye=nn("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(oye)},component:xn(iye,"component")}),tve=xf({imageId:Ti("Please select an Image"),instanceType:Ti("Please select an instance type"),keyName:Ti("Please select a key pair"),count:Sv("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),nve=xf({keyName:Ti().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),sve=xf({keyName:Ti().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),publicKeyMaterial:Ti().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),rve=xf({size:gq().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),cye=()=>vn(()=>import("./import-key-pair.js"),__vite__mapDeps([7,1,8,9,4,10,11,12])),lye=nn("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:xn(cye,"component")}),uye=()=>vn(()=>import("./create-key-pair.js"),__vite__mapDeps([13,1,8,9,4,11,12,14,10,15,16])),fye=nn("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:xn(uye,"component")}),dye=()=>vn(()=>import("./run-instances.js"),__vite__mapDeps([17,1,3,8,9,4,15,11,12])),hye=nn("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(qN),e.queryClient.ensureQueryData(KN),e.queryClient.ensureQueryData(Jge)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:xn(dye,"component")}),pye=()=>vn(()=>import("./route2.js"),[]),mye=nn("/_auth/s3/ls/$bucket")({component:xn(pye,"component")}),gye=()=>vn(()=>import("./index5.js"),__vite__mapDeps([18,3,8,4,19,14,16,20,12])),yye=nn("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(QN(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:xn(gye,"component")}),vye=()=>vn(()=>import("./index6.js"),__vite__mapDeps([21,3,6,4,22])),bye=nn("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nye)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:xn(vye,"component")}),Sye=()=>vn(()=>import("./index7.js"),__vite__mapDeps([23,3,6,4])),_ye=nn("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(KN)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:xn(Sye,"component")}),wye=()=>vn(()=>import("./index8.js"),__vite__mapDeps([24,3,6,4,25])),Eye=nn("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Xge)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:xn(wye,"component")}),xye=()=>vn(()=>import("./index9.js"),__vite__mapDeps([26,3,6,4,22])),Rye=nn("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(qN)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:xn(xye,"component")}),Cye=()=>vn(()=>import("./_.js"),__vite__mapDeps([27,3,8,19,14,16,20,12])),Tye=nn("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=GU(t._splat||"");await e.queryClient.ensureQueryData(QN(t.bucket,n))},head:({params:e})=>({meta:[{title:`${KU(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:xn(Cye,"component")}),Aye=()=>vn(()=>import("./_id.js"),__vite__mapDeps([28,1,3,8,9,4,11,12])),Iye=nn("/_auth/ec2/(volumes)/modify-volume/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(ZN(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:xn(Aye,"component")}),Oye=()=>vn(()=>import("./_id2.js"),__vite__mapDeps([29,3,8,30,4,22])),Mye=nn("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(ZN(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:xn(Oye,"component")}),Dye=()=>vn(()=>import("./_id3.js"),__vite__mapDeps([31,3,8,30,4,14,11,12,20])),kye=nn("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(eye(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:xn(Dye,"component")}),Pye=()=>vn(()=>import("./_id4.js"),__vite__mapDeps([32,3,8,30,4,25,33,11,12,20])),Nye=nn("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(Wge(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(GN(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:xn(Pye,"component")}),zye=()=>vn(()=>import("./_id5.js"),__vite__mapDeps([34,3,8,4,22,33,30])),Lye=nn("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(GN(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:xn(zye,"component")}),Bye=Zge.update({id:"/login",path:"/login",getParentRoute:()=>H_}),Wn=Yge.update({id:"/_auth",getParentRoute:()=>H_}),$ye=rye.update({id:"/",path:"/",getParentRoute:()=>Wn}),Uye=aye.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>Wn}),jye=lye.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>Wn}),Hye=fye.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>Wn}),Fye=hye.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>Wn}),F_=mye.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>Wn}),Vye=yye.update({id:"/",path:"/",getParentRoute:()=>F_}),qye=bye.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>Wn}),Gye=_ye.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>Wn}),Kye=Eye.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>Wn}),Zye=Rye.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>Wn}),Qye=Tye.update({id:"/$",path:"/$",getParentRoute:()=>F_}),Yye=Iye.update({id:"/ec2/(volumes)/modify-volume/$id",path:"/ec2/modify-volume/$id",getParentRoute:()=>Wn}),Xye=Mye.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>Wn}),Wye=kye.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>Wn}),Jye=Nye.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>Wn}),e0e=Lye.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>Wn}),t0e={AuthS3LsBucketSplatRoute:Qye,AuthS3LsBucketIndexRoute:Vye},n0e=F_._addFileChildren(t0e),s0e={AuthIndexRoute:$ye,AuthS3LsBucketRouteRoute:n0e,AuthEc2instancesRunInstancesRoute:Fye,AuthEc2keyCreateKeyPairRoute:Hye,AuthEc2keyImportKeyPairRoute:jye,AuthS3LsIndexRoute:Uye,AuthEc2imagesDescribeImagesIdRoute:e0e,AuthEc2instancesDescribeInstancesIdRoute:Jye,AuthEc2keyDescribeKeyPairsIdRoute:Wye,AuthEc2volumesDescribeVolumesIdRoute:Xye,AuthEc2volumesModifyVolumeIdRoute:Yye,AuthEc2imagesDescribeImagesIndexRoute:Zye,AuthEc2instancesDescribeInstancesIndexRoute:Kye,AuthEc2keyDescribeKeyPairsIndexRoute:Gye,AuthEc2volumesDescribeVolumesIndexRoute:qye},r0e=Wn._addFileChildren(s0e),o0e={AuthRouteRoute:r0e,LoginRoute:Bye},i0e=H_._addFileChildren(o0e)._addFileTypes(),YN=new LL,a0e=TB({routeTree:i0e,context:{queryClient:YN},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),Q0=document.getElementById("app");Q0&&!Q0.innerHTML&&HB.createRoot(Q0).render($.jsx(I.StrictMode,{children:$.jsx(GB,{defaultTheme:"system",storageKey:"hive-ui-theme",children:$.jsx($L,{client:YN,children:$.jsx(aH,{children:$.jsx(OB,{router:a0e})})})})}));export{wj as $,w0e as A,el as B,Dr as C,zp as D,Ms as E,wf as F,mt as G,NR as H,Ze as I,e0 as J,bi as K,wn as L,bt as M,R0e as N,EI as O,En as P,rs as Q,y2 as R,a5 as S,c5 as T,p0e as U,_o as V,ot as W,Cj as X,f9 as Y,zr as Z,qu as _,en as a,F0e as a$,g2 as a0,ub as a1,Mj as a2,z2 as a3,q2 as a4,Op as a5,Qh as a6,I0e as a7,w2 as a8,sb as a9,yye as aA,v0e as aB,QN as aC,nye as aD,Or as aE,Xge as aF,Tye as aG,GU as aH,b0e as aI,KU as aJ,MC as aK,Mi as aL,Mv as aM,V0e as aN,jP as aO,cZ as aP,yp as aQ,Na as aR,nD as aS,sD as aT,LQ as aU,HQ as aV,BQ as aW,q0e as aX,uf as aY,Mn as aZ,vr as a_,zI as aa,cr as ab,La as ac,C0e as ad,A0e as ae,G5 as af,c8 as ag,m0e as ah,l9 as ai,j9 as aj,t9 as ak,e9 as al,_f as am,pn as an,WU as ao,ki as ap,h8 as aq,T0e as ar,ob as as,oO as at,Xj as au,x0e as av,qN as aw,KN as ax,Jge as ay,tve as az,kI as b,u0e as b$,Ab as b0,ka as b1,k0e as b2,Br as b3,qS as b4,Eo as b5,LS as b6,G0e as b7,K0e as b8,Z0e as b9,kye as bA,eye as bB,Ba as bC,p9 as bD,d9 as bE,b2 as bF,Y5 as bG,y9 as bH,Q5 as bI,Jj as bJ,n9 as bK,Z5 as bL,Nye as bM,Wge as bN,GN as bO,dl as bP,P0e as bQ,N0e as bR,z0e as bS,L0e as bT,B0e as bU,$0e as bV,U0e as bW,j0e as bX,H0e as bY,jr as bZ,xp as b_,Q0e as ba,Y0e as bb,X0e as bc,W0e as bd,J0e as be,l0e as bf,c0e as bg,qM as bh,tQ as bi,hp as bj,JA as bk,FN as bl,y0e as bm,Iye as bn,rve as bo,ZN as bp,II as bq,Jv as br,_t as bs,Xc as bt,O0e as bu,M0e as bv,gO as bw,Mye as bx,g0e as by,ZU as bz,Ct as c,Ju as c0,PL as c1,ss as c2,br as c3,f0e as c4,Lye as c5,OI as c6,RL as c7,yL as c8,X0 as c9,Rp as ca,mL as cb,gL as cc,Y0 as cd,ZA as ce,ML as cf,SL as cg,Ua as ch,bo as ci,Kq as d,tye as e,oye as f,_r as g,nve as h,sve as i,$ as j,o5 as k,E0e as l,S0e as m,_0e as n,dh as o,E2 as p,Oi as q,I as r,D0e as s,sf as t,Ip as u,l5 as v,qt as w,rp as x,r2 as y,fv as z}; +`+i)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}const wfe="Directory",Efe="S3Express",xfe="sigv4-s3express",Rfe="X-Amz-S3session-Token",Cfe=Rfe.toLowerCase(),Tfe=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===xfe;if((i.properties?.backend===Efe||i.properties?.bucketType===wfe)&&(vr(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),c){const f=r.input.Bucket;if(f){const d=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:f});n.s3ExpressIdentity=d,Mn.isInstance(r.request)&&d.sessionToken&&(r.request.headers[Cfe]=d.sessionToken)}}}return t(r)},Afe={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Ife=e=>({applyToStack:t=>{t.add(Tfe(e),Afe)}}),Ofe=async(e,t,n,r)=>{const i=await r.signWithCredentials(n,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},Mfe=e=>t=>{throw t},Dfe=(e,t)=>{},kfe=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=wo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c;let h;n.s3ExpressIdentity?h=await Ofe(n.s3ExpressIdentity,l,r.request,await e.signer()):h=await d.sign(r.request,f,l);const y=await t({...r,request:h}).catch((d.errorHandler||Mfe)(l));return(d.successHandler||Dfe)(y.response,l),y},Pfe=e=>({applyToStack:t=>{t.addRelativeTo(kfe(e),VO)}}),Nfe=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:c,disableMultiregionAccessPoints:l,followRegionRedirects:f,s3ExpressIdentityProvider:d,bucketEndpoint:h,expectContinueHeader:y}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:c??!1,disableMultiregionAccessPoints:l??!1,followRegionRedirects:f??!1,s3ExpressIdentityProvider:d??new zS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},zfe={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Lfe=3e3,Bfe=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!ka.isInstance(c))return i;const{statusCode:l,body:f}=c;if(l<200||l>=300||!(typeof f?.stream=="function"||typeof f?.pipe=="function"||typeof f?.tee=="function"))return i;let h=f,y=f;f&&typeof f=="object"&&!(f instanceof Uint8Array)&&([h,y]=await SG(f)),c.body=y;const g=await $fe(h,{streamCollector:async b=>hG(b,Lfe)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&zfe[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},$fe=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Ufe={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},LS=e=>({applyToStack:t=>{t.addRelativeTo(Bfe(e),Ufe)}}),jfe=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Hfe(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const i=n.endpointV2;if(i){const c=r.input.Bucket;if(typeof c=="string")try{const l=new URL(c);n.endpointV2={...i,url:l}}catch(l){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(f):n.logger?.warn?.(f),l}}}return t(r)}}const Ffe={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function Vfe({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!jfe(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const qfe={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Gfe=e=>({applyToStack:t=>{t.add(Vfe(e),qfe),t.addRelativeTo(Hfe(e),Ffe)}}),Kfe=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),Dv="X-Amz-S3session-Token",ST=Dv.toLowerCase();class Zfe extends Cv{async signWithCredentials(t,n,r){const i=_T(n);t.headers[ST]=n.sessionToken;const c=this;return wT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=_T(n);return delete t.headers[ST],t.headers[Dv]=n.sessionToken,t.query=t.query??{},t.query[Dv]=n.sessionToken,wT(this,i),this.presign(t,r)}}function _T(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function wT(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,i=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=i}class HP{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new Zfe(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const BS="required",M="type",ce="rules",L="conditions",ee="fn",te="argv",ke="ref",We="assign",Ee="url",xe="properties",po="backend",On="authSchemes",dn="disableDoubleEncoding",hn="signingName",Bn="signingRegion",Re="headers",$S="signingRegionSet",Qfe=6,Yfe=!1,Tr=!0,Ds="isSet",tn="booleanEquals",Ae="error",bp="aws.partition",pt="stringEquals",Vt="getAttr",Gt="name",kt="substring",ET="bucketSuffix",US="parseURL",me="endpoint",ue="tree",Sp="aws.isVirtualHostableS3Bucket",_p="{url#scheme}://{Bucket}.{url#authority}{url#path}",Pr="not",xT="accessPointSuffix",Bh="{url#scheme}://{url#authority}{url#path}",FP="hardwareType",VP="regionPrefix",RT="bucketAliasSuffix",kv="outpostId",Ka="isValidHostLabel",jS="sigv4a",gf="s3-outposts",ol="s3",qP="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",GP="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",CT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",KP="aws.parseArn",ZP="bucketArn",QP="arnType",wp="",HS="s3-object-lambda",YP="accesspoint",FS="accessPointName",TT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",AT="mrapPartition",IT="outpostType",OT="arnPrefix",XP="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",MT="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",DT="https://s3.{partitionResult#dnsSuffix}",Lc={[BS]:!1,[M]:"string"},Bc={[BS]:!0,default:!1,[M]:"boolean"},Nu={[BS]:!1,[M]:"boolean"},tr={[ee]:tn,[te]:[{[ke]:"Accelerate"},!0]},Nt={[ee]:tn,[te]:[{[ke]:"UseFIPS"},!0]},Ot={[ee]:tn,[te]:[{[ke]:"UseDualStack"},!0]},Jt={[ee]:Ds,[te]:[{[ke]:"Endpoint"}]},WP={[ee]:bp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},kT={[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Zu={[ee]:Ds,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},PT={[L]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},NT={[L]:[Jt,{[ee]:US,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[L]:[{[ee]:Ds,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:tn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[L]:[{[ee]:tn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Sp,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:_p,[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[L]:[{[ee]:tn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Sp,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:_p,[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},ts={[ee]:US,[te]:[{[ke]:"Endpoint"}],[We]:"url"},C0={[ee]:tn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]},JP={[ke]:"url"},eN={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Is={[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:"s3express",[Bn]:"{Region}"}]},Ve={},tN={[ee]:Sp,[te]:[dt,!1]},zT={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},LT={[ee]:Ds,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},BT={[ee]:tn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Pr,[te]:[Jt]},rt={[ee]:tn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:tn,[te]:[{[ke]:"UseFIPS"},!1]},Rh={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},$T={[ee]:Pr,[te]:[Zu]},UT={[ke]:FP},jT={[L]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Ch={[On]:[{[dn]:!0,[Gt]:jS,[hn]:gf,[$S]:["*"]},{[dn]:!0,[Gt]:"sigv4",[hn]:gf,[Bn]:"{Region}"}]},T0={[ee]:tn,[te]:[{[ke]:"ForcePathStyle"},!1]},Xfe={[ke]:"ForcePathStyle"},un={[ee]:tn,[te]:[{[ke]:"Accelerate"},!1]},_n={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Tn={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"us-east-1"}]},lt={[ee]:Pr,[te]:[_n]},An={[ee]:tn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},HT={[Ee]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"{Region}"}]},[Re]:{}},mn={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"{Region}"}]},In={[ee]:tn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},FT={[Ee]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},VT={[Ee]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},qT={[Ee]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},A0={[ee]:tn,[te]:[{[ee]:Vt,[te]:[JP,"isIp"]},!1]},I0={[Ee]:qP,[xe]:mn,[Re]:{}},Pv={[Ee]:_p,[xe]:mn,[Re]:{}},GT={[me]:Pv,[M]:me},O0={[Ee]:GP,[xe]:mn,[Re]:{}},KT={[Ee]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},Th={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},ms={[ke]:ZP},nN={[ke]:QP},M0={[ee]:Vt,[te]:[ms,"service"]},VS={[ke]:FS},ZT={[L]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},QT={[L]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},YT={[L]:[{[ee]:Ds,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:tn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},D0={[L]:[{[ee]:Ds,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:tn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[ms,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},sN={[ee]:Vt,[te]:[{[ke]:"bucketPartition"},Gt]},rN={[ee]:Vt,[te]:[ms,"accountId"]},k0={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:HS,[Bn]:"{bucketArn#region}"}]},XT={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},P0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},N0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},z0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},WT={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},JT={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},zu={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:ol,[Bn]:"{bucketArn#region}"}]},eA={[On]:[{[dn]:!0,[Gt]:jS,[hn]:gf,[$S]:["*"]},{[dn]:!0,[Gt]:"sigv4",[hn]:gf,[Bn]:"{bucketArn#region}"}]},tA={[ee]:KP,[te]:[dt]},nA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},sA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},rA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},L0={[Ee]:XP,[xe]:mn,[Re]:{}},oA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:mn,[Re]:{}},iA={[ke]:"UseObjectLambdaEndpoint"},B0={[On]:[{[dn]:!0,[Gt]:"sigv4",[hn]:HS,[Bn]:"{Region}"}]},aA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},cA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},lA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},$0={[Ee]:Bh,[xe]:mn,[Re]:{}},uA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[xe]:mn,[Re]:{}},U0=[{[ke]:"Region"}],Wfe=[{[ke]:"Endpoint"}],Jfe=[dt],j0=[tr],$c=[Jt,ts],fA=[{[ee]:Ds,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:tn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],ede=[eN],H0=[tN],Js=[WP],F0=[Nt,Ot],Qu=[Nt,rt],Yu=[et,Ot],Xu=[et,rt],dA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ar=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me},{[L]:Qu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me},{[L]:Yu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:{}},[M]:me}],hA=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],pA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],mA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],gA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ir=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Qu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Yu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[dn]:!0,[Gt]:"sigv4-s3express",[hn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],yA=[dt,0,7,!0],vA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],bA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],SA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],_A=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],wA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],tde=[Zu],EA=[{[ee]:Ka,[te]:[{[ke]:kv},!1]}],xA=[{[ee]:pt,[te]:[{[ke]:VP},"beta"]}],nde=["*"],RA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!1]}],mi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],V0=[{[ee]:pt,[te]:[nN,YP]}],CA=[{[ee]:Vt,[te]:[ms,"resourceId[1]"],[We]:FS},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[VS,wp]}]}],sde=[ms,"resourceId[1]"],TA=[Ot],q0=[{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[ms,"region"]},wp]}]}],AA=[{[ee]:Pr,[te]:[{[ee]:Ds,[te]:[{[ee]:Vt,[te]:[ms,"resourceId[2]"]}]}]}],rde=[ms,"resourceId[2]"],G0=[{[ee]:bp,[te]:[{[ee]:Vt,[te]:[ms,"region"]}],[We]:"bucketPartition"}],IA=[{[ee]:pt,[te]:[sN,{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]}]}],K0=[{[ee]:Ka,[te]:[{[ee]:Vt,[te]:[ms,"region"]},!0]}],Z0=[{[ee]:Ka,[te]:[rN,!1]}],OA=[{[ee]:Ka,[te]:[VS,!1]}],Ah=[Nt],MA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!0]}],ode={parameters:{Bucket:Lc,Region:Lc,UseFIPS:Bc,UseDualStack:Bc,Endpoint:Lc,ForcePathStyle:Bc,Accelerate:Bc,UseGlobalEndpoint:Bc,UseObjectLambdaEndpoint:Nu,Key:Lc,Prefix:Lc,CopySource:Lc,DisableAccessPoints:Nu,DisableMultiRegionAccessPoints:Bc,UseArnRegion:Nu,UseS3ExpressControlEndpoint:Nu,DisableS3ExpressSessionAuth:Nu},[ce]:[{[L]:[{[ee]:Ds,[te]:U0}],[ce]:[{[L]:[tr,Nt],error:"Accelerate cannot be used with FIPS",[M]:Ae},{[L]:[Ot,Jt],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Ae},{[L]:[Jt,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Ae},{[L]:[Jt,tr],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Ae},{[L]:[Nt,WP,kT],error:"Partition does not support FIPS",[M]:Ae},{[L]:[Zu,{[ee]:kt,[te]:[dt,0,Qfe,Tr],[We]:ET},{[ee]:pt,[te]:[{[ke]:ET},"--x-s3"]}],[ce]:[PT,NT,{[L]:[LT,BT],[ce]:[{[L]:Js,[ce]:[{[L]:[eN,Ke],[ce]:[{[L]:F0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Qu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Yu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Is,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:H0,[ce]:[{[L]:Js,[ce]:[{[L]:fA,[ce]:[{[L]:dA,[ce]:Ar,[M]:ue},{[L]:hA,[ce]:Ar,[M]:ue},{[L]:pA,[ce]:Ar,[M]:ue},{[L]:mA,[ce]:Ar,[M]:ue},{[L]:gA,[ce]:Ar,[M]:ue},Rh],[M]:ue},{[L]:dA,[ce]:Ir,[M]:ue},{[L]:hA,[ce]:Ir,[M]:ue},{[L]:pA,[ce]:Ir,[M]:ue},{[L]:mA,[ce]:Ir,[M]:ue},{[L]:gA,[ce]:Ir,[M]:ue},Rh],[M]:ue}],[M]:ue},zT],[M]:ue},{[L]:[Zu,{[ee]:kt,[te]:yA,[We]:xT},{[ee]:pt,[te]:[{[ke]:xT},"--xa-s3"]}],[ce]:[PT,NT,{[L]:H0,[ce]:[{[L]:Js,[ce]:[{[L]:fA,[ce]:[{[L]:vA,[ce]:Ar,[M]:ue},{[L]:bA,[ce]:Ar,[M]:ue},{[L]:SA,[ce]:Ar,[M]:ue},{[L]:_A,[ce]:Ar,[M]:ue},{[L]:wA,[ce]:Ar,[M]:ue},Rh],[M]:ue},{[L]:vA,[ce]:Ir,[M]:ue},{[L]:bA,[ce]:Ir,[M]:ue},{[L]:SA,[ce]:Ir,[M]:ue},{[L]:_A,[ce]:Ir,[M]:ue},{[L]:wA,[ce]:Ir,[M]:ue},Rh],[M]:ue}],[M]:ue},zT],[M]:ue},{[L]:[$T,LT,BT],[ce]:[{[L]:Js,[ce]:[{[L]:$c,endpoint:{[Ee]:Bh,[xe]:Is,[Re]:Ve},[M]:me},{[L]:F0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Qu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Yu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[xe]:Is,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue},{[L]:[Zu,{[ee]:kt,[te]:[dt,49,50,Tr],[We]:FP},{[ee]:kt,[te]:[dt,8,12,Tr],[We]:VP},{[ee]:kt,[te]:yA,[We]:RT},{[ee]:kt,[te]:[dt,32,49,Tr],[We]:kv},{[ee]:bp,[te]:U0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:RT},"--op-s3"]}],[ce]:[{[L]:EA,[ce]:[{[L]:H0,[ce]:[{[L]:[{[ee]:pt,[te]:[UT,"e"]}],[ce]:[{[L]:xA,[ce]:[jT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.ec2.{url#authority}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{[L]:[{[ee]:pt,[te]:[UT,"o"]}],[ce]:[{[L]:xA,[ce]:[jT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.{url#authority}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Ch,[Re]:Ve},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Ae}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Ae}],[M]:ue},{[L]:tde,[ce]:[{[L]:[Jt,{[ee]:Pr,[te]:[{[ee]:Ds,[te]:[{[ee]:US,[te]:Wfe}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[L]:[T0,tN],[ce]:[{[L]:Js,[ce]:[{[L]:RA,[ce]:[{[L]:[tr,kT],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[L]:[Ot,Nt,un,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Nt,un,Ke,lt,An],[ce]:[{endpoint:HT,[M]:me}],[M]:ue},{[L]:[Ot,Nt,un,Ke,lt,In],endpoint:HT,[M]:me},{[L]:[rt,Nt,un,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Nt,un,Ke,lt,An],[ce]:[{endpoint:FT,[M]:me}],[M]:ue},{[L]:[rt,Nt,un,Ke,lt,In],endpoint:FT,[M]:me},{[L]:[Ot,et,tr,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,tr,Ke,lt,An],[ce]:[{endpoint:VT,[M]:me}],[M]:ue},{[L]:[Ot,et,tr,Ke,lt,In],endpoint:VT,[M]:me},{[L]:[Ot,et,un,Ke,_n],endpoint:{[Ee]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,un,Ke,lt,An],[ce]:[{endpoint:qT,[M]:me}],[M]:ue},{[L]:[Ot,et,un,Ke,lt,In],endpoint:qT,[M]:me},{[L]:[rt,et,un,Jt,ts,C0,_n],endpoint:{[Ee]:qP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,un,Jt,ts,A0,_n],endpoint:{[Ee]:_p,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,un,Jt,ts,C0,lt,An],[ce]:[{[L]:mi,endpoint:I0,[M]:me},{endpoint:I0,[M]:me}],[M]:ue},{[L]:[rt,et,un,Jt,ts,A0,lt,An],[ce]:[{[L]:mi,endpoint:Pv,[M]:me},GT],[M]:ue},{[L]:[rt,et,un,Jt,ts,C0,lt,In],endpoint:I0,[M]:me},{[L]:[rt,et,un,Jt,ts,A0,lt,In],endpoint:Pv,[M]:me},{[L]:[rt,et,tr,Ke,_n],endpoint:{[Ee]:GP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,tr,Ke,lt,An],[ce]:[{[L]:mi,endpoint:O0,[M]:me},{endpoint:O0,[M]:me}],[M]:ue},{[L]:[rt,et,tr,Ke,lt,In],endpoint:O0,[M]:me},{[L]:[rt,et,un,Ke,_n],endpoint:{[Ee]:CT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,un,Ke,lt,An],[ce]:[{[L]:mi,endpoint:{[Ee]:CT,[xe]:mn,[Re]:Ve},[M]:me},{endpoint:KT,[M]:me}],[M]:ue},{[L]:[rt,et,un,Ke,lt,In],endpoint:KT,[M]:me}],[M]:ue},Th],[M]:ue}],[M]:ue},{[L]:[Jt,ts,{[ee]:pt,[te]:[{[ee]:Vt,[te]:[JP,"scheme"]},"http"]},{[ee]:Sp,[te]:[dt,Tr]},T0,et,rt,un],[ce]:[{[L]:Js,[ce]:[{[L]:RA,[ce]:[GT],[M]:ue},Th],[M]:ue}],[M]:ue},{[L]:[T0,{[ee]:KP,[te]:Jfe,[We]:ZP}],[ce]:[{[L]:[{[ee]:Vt,[te]:[ms,"resourceId[0]"],[We]:QP},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[nN,wp]}]}],[ce]:[{[L]:[{[ee]:pt,[te]:[M0,HS]}],[ce]:[{[L]:V0,[ce]:[{[L]:CA,[ce]:[ZT,QT,{[L]:q0,[ce]:[YT,{[L]:AA,[ce]:[D0,{[L]:G0,[ce]:[{[L]:Js,[ce]:[{[L]:IA,[ce]:[{[L]:K0,[ce]:[{[L]:[{[ee]:pt,[te]:[rN,wp]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[L]:Z0,[ce]:[{[L]:OA,[ce]:[{[L]:$c,endpoint:{[Ee]:TT,[xe]:k0,[Re]:Ve},[M]:me},{[L]:Ah,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:k0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:k0,[Re]:Ve},[M]:me}],[M]:ue},XT],[M]:ue},P0],[M]:ue},N0],[M]:ue},z0],[M]:ue}],[M]:ue}],[M]:ue},WT],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},JT],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[L]:V0,[ce]:[{[L]:CA,[ce]:[{[L]:q0,[ce]:[{[L]:V0,[ce]:[{[L]:q0,[ce]:[YT,{[L]:AA,[ce]:[D0,{[L]:G0,[ce]:[{[L]:Js,[ce]:[{[L]:[{[ee]:pt,[te]:[sN,"{partitionResult#name}"]}],[ce]:[{[L]:K0,[ce]:[{[L]:[{[ee]:pt,[te]:[M0,ol]}],[ce]:[{[L]:Z0,[ce]:[{[L]:OA,[ce]:[{[L]:j0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[L]:F0,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me},{[L]:Qu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me},{[L]:Yu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me},{[L]:[et,rt,Jt,ts],endpoint:{[Ee]:TT,[xe]:zu,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:zu,[Re]:Ve},[M]:me}],[M]:ue},XT],[M]:ue},P0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},N0],[M]:ue},z0],[M]:ue}],[M]:ue}],[M]:ue},WT],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Ka,[te]:[VS,Tr]}],[ce]:[{[L]:TA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[L]:Ah,error:"S3 MRAP does not support FIPS",[M]:Ae},{[L]:j0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:tn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Tr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[L]:[{[ee]:bp,[te]:U0,[We]:AT}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:AT},Gt]},{[ee]:Vt,[te]:[ms,"partition"]}]}],[ce]:[{endpoint:{[Ee]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[xe]:{[On]:[{[dn]:Tr,name:jS,[hn]:ol,[$S]:nde}]},[Re]:Ve},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Ae}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Ae}],[M]:ue},JT],[M]:ue},{[L]:[{[ee]:pt,[te]:[M0,gf]}],[ce]:[{[L]:TA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[L]:Ah,error:"S3 Outposts does not support FIPS",[M]:Ae},{[L]:j0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:Ds,[te]:[{[ee]:Vt,[te]:[ms,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[L]:[{[ee]:Vt,[te]:sde,[We]:kv}],[ce]:[{[L]:EA,[ce]:[D0,{[L]:G0,[ce]:[{[L]:Js,[ce]:[{[L]:IA,[ce]:[{[L]:K0,[ce]:[{[L]:Z0,[ce]:[{[L]:[{[ee]:Vt,[te]:rde,[We]:IT}],[ce]:[{[L]:[{[ee]:Vt,[te]:[ms,"resourceId[3]"],[We]:FS}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ke]:IT},YP]}],[ce]:[{[L]:$c,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[xe]:eA,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:eA,[Re]:Ve},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Ae}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Ae}],[M]:ue},P0],[M]:ue},N0],[M]:ue},z0],[M]:ue}],[M]:ue}],[M]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Ae}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Ae}],[M]:ue},{[L]:[{[ee]:kt,[te]:[dt,0,4,Yfe],[We]:OT},{[ee]:pt,[te]:[{[ke]:OT},"arn:"]},{[ee]:Pr,[te]:[{[ee]:Ds,[te]:[tA]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[L]:[{[ee]:tn,[te]:[Xfe,Tr]},tA],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[L]:ede,[ce]:[{[L]:Js,[ce]:[{[L]:[un],[ce]:[{[L]:[Ot,Ke,Nt,_n],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,Nt,lt,An],[ce]:[{endpoint:nA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,Nt,lt,In],endpoint:nA,[M]:me},{[L]:[rt,Ke,Nt,_n],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,Nt,lt,An],[ce]:[{endpoint:sA,[M]:me}],[M]:ue},{[L]:[rt,Ke,Nt,lt,In],endpoint:sA,[M]:me},{[L]:[Ot,Ke,et,_n],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,et,lt,An],[ce]:[{endpoint:rA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,et,lt,In],endpoint:rA,[M]:me},{[L]:[rt,Jt,ts,et,_n],endpoint:{[Ee]:XP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Jt,ts,et,lt,An],[ce]:[{[L]:mi,endpoint:L0,[M]:me},{endpoint:L0,[M]:me}],[M]:ue},{[L]:[rt,Jt,ts,et,lt,In],endpoint:L0,[M]:me},{[L]:[rt,Ke,et,_n],endpoint:{[Ee]:MT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,et,lt,An],[ce]:[{[L]:mi,endpoint:{[Ee]:MT,[xe]:mn,[Re]:Ve},[M]:me},{endpoint:oA,[M]:me}],[M]:ue},{[L]:[rt,Ke,et,lt,In],endpoint:oA,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Ae}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Ds,[te]:[iA]},{[ee]:tn,[te]:[iA,Tr]}],[ce]:[{[L]:Js,[ce]:[{[L]:MA,[ce]:[ZT,QT,{[L]:$c,endpoint:{[Ee]:Bh,[xe]:B0,[Re]:Ve},[M]:me},{[L]:Ah,endpoint:{[Ee]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:B0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[xe]:B0,[Re]:Ve},[M]:me}],[M]:ue},Th],[M]:ue}],[M]:ue},{[L]:[$T],[ce]:[{[L]:Js,[ce]:[{[L]:MA,[ce]:[{[L]:[Nt,Ot,Ke,_n],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,Ot,Ke,lt,An],[ce]:[{endpoint:aA,[M]:me}],[M]:ue},{[L]:[Nt,Ot,Ke,lt,In],endpoint:aA,[M]:me},{[L]:[Nt,rt,Ke,_n],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,rt,Ke,lt,An],[ce]:[{endpoint:cA,[M]:me}],[M]:ue},{[L]:[Nt,rt,Ke,lt,In],endpoint:cA,[M]:me},{[L]:[et,Ot,Ke,_n],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,Ot,Ke,lt,An],[ce]:[{endpoint:lA,[M]:me}],[M]:ue},{[L]:[et,Ot,Ke,lt,In],endpoint:lA,[M]:me},{[L]:[et,rt,Jt,ts,_n],endpoint:{[Ee]:Bh,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,Jt,ts,lt,An],[ce]:[{[L]:mi,endpoint:$0,[M]:me},{endpoint:$0,[M]:me}],[M]:ue},{[L]:[et,rt,Jt,ts,lt,In],endpoint:$0,[M]:me},{[L]:[et,rt,Ke,_n],endpoint:{[Ee]:DT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,Ke,lt,An],[ce]:[{[L]:mi,endpoint:{[Ee]:DT,[xe]:mn,[Re]:Ve},[M]:me},{endpoint:uA,[M]:me}],[M]:ue},{[L]:[et,rt,Ke,lt,In],endpoint:uA,[M]:me}],[M]:ue},Th],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},ide=ode,ade=new aM({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),oN=(e,t={})=>ade.get(e,()=>vM(ide,{endpointParams:e,logger:t.logger}));ff.aws=Rb;const cde=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=wo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await GM(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},lde=async(e,t,n)=>({operation:wo(t).operation,region:await Ps(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),ude=cde(lde);function iN(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function aN(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const fde=(e,t,n)=>i=>{const l=e(i).properties?.authSchemes;if(!l)return t(i);const f=[];for(const d of l){const{name:h,properties:y={},...g}=d,v=h.toLowerCase();h!==v&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${h}' to '${v}'`);let b;if(v==="sigv4a"){b="aws.auth#sigv4a";const R=l.find(C=>{const A=C.name.toLowerCase();return A!=="sigv4a"&&A.startsWith("sigv4")});if(HP.sigv4aDependency()==="none"&&R)continue}else if(v.startsWith("sigv4"))b="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);const _=n[b];if(!_)throw new Error(`Could not find HttpAuthOption create function for '${b}'`);const x=_(i);x.schemeId=b,x.signingProperties={...x.signingProperties||{},...g,...y},f.push(x)}return f},dde=e=>{const t=[];switch(e.operation){default:t.push(iN(e)),t.push(aN(e))}return t},hde=fde(oN,dde,{"aws.auth#sigv4":iN,"aws.auth#sigv4a":aN}),pde=e=>{const t=AM(e),n=qK(t);return Object.assign(n,{authSchemePreference:Ps(e.authSchemePreference??[])})},mde=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),qS={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Un extends wa{constructor(t){super(t),Object.setPrototypeOf(this,Un.prototype)}}class GS extends Un{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,GS.prototype)}}class KS extends Un{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,KS.prototype)}}class ZS extends Un{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,ZS.prototype)}}class QS extends Un{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,QS.prototype)}}class YS extends Un{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,YS.prototype)}}class XS extends Un{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,XS.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class WS extends Un{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,WS.prototype)}}class JS extends Un{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,JS.prototype)}}class e_ extends Un{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,e_.prototype)}}class t_ extends Un{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,t_.prototype)}}class n_ extends Un{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,n_.prototype)}}class s_ extends Un{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,s_.prototype)}}class r_ extends Un{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,r_.prototype)}}class o_ extends Un{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,o_.prototype)}}const cN="ACL",gde="AbortDate",DA="AccessKeyId",yde="AbortMultipartUpload",vde="AbortMultipartUploadOutput",bde="AbortMultipartUploadRequest",Sde="AcceptRanges",_de="AbortRuleId",wde="AccessTier",os="Bucket",Ede="BucketArn",xde="BucketAlreadyExists",Rde="BucketAlreadyOwnedByYou",Cde="BypassGovernanceRetention",Co="BucketKeyEnabled",lN="BucketRegion",i_="Body",uN="Buckets",xl="ChecksumAlgorithm",a_="CacheControl",Hi="ChecksumCRC32",Fi="ChecksumCRC32C",Vi="ChecksumCRC64NVME",c_="Cache-Control",Tde="CreationDate",l_="Content-Disposition",u_="ContentDisposition",f_="Content-Encoding",d_="ContentEncoding",h_="ContentLanguage",p_="Content-Language",m_="Content-Length",g_="ContentLength",y_="Content-MD5",v_="ContentMD5",Ade="CompletedMultipartUpload",Ide="CompleteMultipartUploadOutput",Ode="CreateMultipartUploadOutput",Mde="CompleteMultipartUploadResult",Dde="CompleteMultipartUploadRequest",kde="CreateMultipartUploadRequest",fN="CompleteMultipartUpload",Pde="CreateMultipartUpload",Nde="ChecksumMode",zde="CommonPrefix",Lde="CommonPrefixList",Bde="CompletedPartList",$de="CompletedPart",Ude="CommonPrefixes",jde="ContentRange",Hde="Content-Range",qi="ChecksumSHA1",Gi="ChecksumSHA256",Fde="CreateSessionOutput",Vde="CreateSessionResult",qde="CreateSessionRequest",Gde="CreateSession",Za="ChecksumType",b_="Content-Type",S_="ContentType",fm="ContinuationToken",Kde="Contents",kA="Credentials",dN="DeleteMarker",Zde="DisplayName",Qde="DeleteObjectOutput",Yde="DeleteObjectRequest",Xde="DeleteObject",hN="Delimiter",yf="Expiration",To="ExpectedBucketOwner",PA="ExpiresString",Wde="EncryptionTypeMismatch",So="ETag",pN="EncodingType",il="Expires",Jde="FetchOwner",mN="GrantFullControl",ehe="GetObject",the="GetObjectOutput",nhe="GetObjectRequest",gN="GrantRead",yN="GrantReadACP",vN="GrantWriteACP",she="ID",dm="IfMatch",rhe="IfMatchInitiatedTime",ohe="IfMatchLastModifiedTime",ihe="IfMatchSize",ahe="If-Modified-Since",che="IfModifiedSince",lhe="InitiateMultipartUploadResult",hm="If-Match",__="IfNoneMatch",w_="If-None-Match",uhe="InvalidObjectState",fhe="IdempotencyParameterMismatch",dhe="InvalidRequest",hhe="IsRestoreInProgress",phe="IsTruncated",mhe="IfUnmodifiedSince",ghe="If-Unmodified-Since",yhe="InvalidWriteOffset",ur="Key",vhe="KeyCount",bhe="Location",She="ListAllMyBucketsResult",_he="ListBuckets",whe="ListBucketsOutput",Ehe="ListBucketsRequest",xhe="ListBucketResult",bN="LastModified",Rhe="Last-Modified",Che="ListObjectsV2",The="ListObjectsV2Output",Ahe="ListObjectsV2Request",E_="Metadata",Ihe="MaxBuckets",Ohe="MFA",SN="MaxKeys",Mhe="MissingMeta",Dhe="MpuObjectSize",khe="MultipartUpload",_N="Name",Phe="NextContinuationToken",Nhe="NotFound",zhe="NoSuchBucket",Lhe="NoSuchKey",Bhe="NoSuchUpload",x_="Owner",$he="ObjectAlreadyInActiveTierError",R_="ObjectLockLegalHoldStatus",C_="ObjectLockMode",T_="ObjectLockRetainUntilDate",Uhe="ObjectList",jhe="ObjectNotInActiveTierError",Hhe="OptionalObjectAttributes",Fhe="Object",zf="Prefix",Vhe="PartsCount",A_="PartNumber",qhe="PutObject",Ghe="PutObjectOutput",Khe="PutObjectRequest",Zhe="PutObjectTagging",Qhe="PutObjectTaggingOutput",Yhe="PutObjectTaggingRequest",Xhe="Parts",Whe="Part",Ki="RequestCharged",Jhe="ResponseCacheControl",epe="ResponseContentDisposition",tpe="ResponseContentEncoding",npe="ResponseContentLanguage",spe="ResponseContentType",rpe="ResponseExpires",ope="RestoreExpiryDate",Ao="RequestPayer",ipe="ReplicationStatus",wN="RestoreStatus",NA="Range",ape="Restore",EN="StartAfter",zA="SecretAccessKey",cpe="StreamingBlob",Lf="StorageClass",lpe="SessionCredentialValue",upe="SessionCredentials",fpe="SessionMode",Io="ServerSideEncryption",Oo="SSECustomerAlgorithm",Rl="SSECustomerKey",Mo="SSECustomerKeyMD5",Qa="SSEKMSEncryptionContext",Ur="SSEKMSKeyId",LA="SessionToken",xN="Size",dpe="TagCount",hpe="TooManyParts",RN="TagSet",CN="Tag",vf="Tagging",pm="UploadId",ppe="UploadPart",mpe="UploadPartOutput",gpe="UploadPartRequest",ype="Value",Zi="VersionId",vpe="WriteOffsetBytes",I_="WebsiteRedirectLocation",bpe="accept-ranges",Spe="bucket-region",vs="client",TN="continuation-token",_pe="delimiter",bs="error",wpe="encoding-type",Epe="fetch-owner",wr="http",mm="httpChecksum",Bs="httpError",U="httpHeader",AN="httpPayload",O_="httpPrefixHeaders",Bt="httpQuery",xpe="max-buckets",Rpe="max-keys",IN="prefix",ON="partNumber",Cpe="response-cache-control",Tpe="response-content-disposition",Ape="response-content-encoding",Ipe="response-content-language",Ope="response-content-type",Mpe="response-expires",Dpe="streaming",kpe="start-after",MN="smithy.ts.sdk.synthetic.com.amazonaws.s3",M_="uploadId",D_="versionId",Ep="xmlFlattened",Yn="xmlName",DN="x-amz-acl",Ppe="x-amz-abort-date",Npe="x-amz-abort-rule-id",zpe="x-amz-bypass-governance-retention",kN="x-amz-checksum-algorithm",Cl="x-amz-checksum-crc32",Tl="x-amz-checksum-crc32c",Al="x-amz-checksum-crc64nvme",Lpe="x-amz-checksum-mode",Il="x-amz-checksum-sha1",Ol="x-amz-checksum-sha256",Bpe="x-amz-create-session-mode",Bf="x-amz-checksum-type",PN="x-amz-delete-marker",k_="x-amz-expiration",Do="x-amz-expected-bucket-owner",NN="x-amz-grant-full-control",zN="x-amz-grant-read",LN="x-amz-grant-read-acp",BN="x-amz-grant-write-acp",$pe="x-amz-if-match-initiated-time",Upe="x-amz-if-match-last-modified-time",jpe="x-amz-if-match-size",P_="x-amz-meta-",Hpe="x-amz-mfa",Fpe="x-amz-missing-meta",Vpe="x-amz-mp-object-size",qpe="x-amz-mp-parts-count",N_="x-amz-object-lock-legal-hold",z_="x-amz-object-lock-mode",L_="x-amz-object-lock-retain-until-date",Gpe="x-amz-optional-object-attributes",Kpe="x-amz-object-size",Zpe="x-amz-restore",Qi="x-amz-request-charged",ko="x-amz-request-payer",Qpe="x-amz-replication-status",B_="x-amz-storage-class",$_="x-amz-sdk-checksum-algorithm",Po="x-amz-server-side-encryption",No="x-amz-server-side-encryption-aws-kms-key-id",zo="x-amz-server-side-encryption-bucket-key-enabled",Ml="x-amz-server-side-encryption-context",Lo="x-amz-server-side-encryption-customer-algorithm",$f="x-amz-server-side-encryption-customer-key",Bo="x-amz-server-side-encryption-customer-key-MD5",$N="x-amz-tagging",Ype="x-amz-tagging-count",Uf="x-amz-version-id",Xpe="x-amz-write-offset-bytes",U_="x-amz-website-redirect-location",we="com.amazonaws.s3";var BA=[0,we,lpe,8,0],jf=[0,we,Rl,8,0],Dl=[0,we,Qa,8,0],$o=[0,we,Ur,8,0],j_=[0,we,cpe,{[Dpe]:1},42],Wpe=[3,we,vde,0,[Ki],[[0,{[U]:Qi}]]],Jpe=[3,we,bde,0,[os,ur,pm,Ao,To,rhe],[[0,1],[0,1],[0,{[Bt]:M_}],[0,{[U]:ko}],[0,{[U]:Do}],[6,{[U]:$pe}]],3],eme=[3,we,os,0,[_N,Tde,lN,Ede],[0,4,0,0]],tme=[-3,we,xde,{[bs]:vs,[Bs]:409},[],[]];Mt.for(we).registerError(tme,ZS);var nme=[-3,we,Rde,{[bs]:vs,[Bs]:409},[],[]];Mt.for(we).registerError(nme,QS);var sme=[3,we,zde,0,[zf],[0]],rme=[3,we,Ade,0,[Xhe],[[()=>Gme,{[Ep]:1,[Yn]:Whe}]]],ome=[3,we,$de,0,[So,Hi,Fi,Vi,qi,Gi,A_],[0,0,0,0,0,0,1]],ime=[3,we,Ide,{[Yn]:Mde},[bhe,os,ur,yf,So,Hi,Fi,Vi,qi,Gi,Za,Io,Zi,Ur,Co,Ki],[0,0,0,[0,{[U]:k_}],0,0,0,0,0,0,0,[0,{[U]:Po}],[0,{[U]:Uf}],[()=>$o,{[U]:No}],[2,{[U]:zo}],[0,{[U]:Qi}]]],ame=[3,we,Dde,0,[os,ur,pm,khe,Hi,Fi,Vi,qi,Gi,Za,Dhe,Ao,To,dm,__,Oo,Rl,Mo],[[0,1],[0,1],[0,{[Bt]:M_}],[()=>rme,{[AN]:1,[Yn]:fN}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Bf}],[1,{[U]:Vpe}],[0,{[U]:ko}],[0,{[U]:Do}],[0,{[U]:hm}],[0,{[U]:w_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}]],3],cme=[3,we,Ode,{[Yn]:lhe},[gde,_de,os,ur,pm,Io,Oo,Mo,Ur,Qa,Co,Ki,xl,Za],[[4,{[U]:Ppe}],[0,{[U]:Npe}],[0,{[Yn]:os}],0,0,[0,{[U]:Po}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[0,{[U]:Qi}],[0,{[U]:kN}],[0,{[U]:Bf}]]],lme=[3,we,kde,0,[os,ur,cN,a_,u_,d_,h_,S_,il,mN,gN,yN,vN,E_,Io,Lf,I_,Oo,Rl,Mo,Ur,Qa,Co,Ao,vf,C_,T_,R_,To,xl,Za],[[0,1],[0,1],[0,{[U]:DN}],[0,{[U]:c_}],[0,{[U]:l_}],[0,{[U]:f_}],[0,{[U]:p_}],[0,{[U]:b_}],[4,{[U]:il}],[0,{[U]:NN}],[0,{[U]:zN}],[0,{[U]:LN}],[0,{[U]:BN}],[128,{[O_]:P_}],[0,{[U]:Po}],[0,{[U]:B_}],[0,{[U]:U_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[0,{[U]:ko}],[0,{[U]:$N}],[0,{[U]:z_}],[5,{[U]:L_}],[0,{[U]:N_}],[0,{[U]:Do}],[0,{[U]:kN}],[0,{[U]:Bf}]],2],ume=[3,we,Fde,{[Yn]:Vde},[kA,Io,Ur,Qa,Co],[[()=>Lme,{[Yn]:kA}],[0,{[U]:Po}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}]],1],fme=[3,we,qde,0,[os,fpe,Io,Ur,Qa,Co],[[0,1],[0,{[U]:Bpe}],[0,{[U]:Po}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}]],1],dme=[3,we,Qde,0,[dN,Zi,Ki],[[2,{[U]:PN}],[0,{[U]:Uf}],[0,{[U]:Qi}]]],hme=[3,we,Yde,0,[os,ur,Ohe,Zi,Ao,Cde,To,dm,ohe,ihe],[[0,1],[0,1],[0,{[U]:Hpe}],[0,{[Bt]:D_}],[0,{[U]:ko}],[2,{[U]:zpe}],[0,{[U]:Do}],[0,{[U]:hm}],[6,{[U]:Upe}],[1,{[U]:jpe}]],2],pme=[-3,we,Wde,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(pme,e_);var mme=[3,we,the,0,[i_,dN,Sde,yf,ape,bN,g_,So,Hi,Fi,Vi,qi,Gi,Za,Mhe,Zi,a_,u_,d_,h_,jde,S_,il,PA,I_,Io,E_,Oo,Mo,Ur,Co,Lf,Ki,ipe,Vhe,dpe,C_,T_,R_],[[()=>j_,16],[2,{[U]:PN}],[0,{[U]:bpe}],[0,{[U]:k_}],[0,{[U]:Zpe}],[4,{[U]:Rhe}],[1,{[U]:m_}],[0,{[U]:So}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Bf}],[1,{[U]:Fpe}],[0,{[U]:Uf}],[0,{[U]:c_}],[0,{[U]:l_}],[0,{[U]:f_}],[0,{[U]:p_}],[0,{[U]:Hde}],[0,{[U]:b_}],[4,{[U]:il}],[0,{[U]:PA}],[0,{[U]:U_}],[0,{[U]:Po}],[128,{[O_]:P_}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[2,{[U]:zo}],[0,{[U]:B_}],[0,{[U]:Qi}],[0,{[U]:Qpe}],[1,{[U]:qpe}],[1,{[U]:Ype}],[0,{[U]:z_}],[5,{[U]:L_}],[0,{[U]:N_}]]],gme=[3,we,nhe,0,[os,ur,dm,che,__,mhe,NA,Jhe,epe,tpe,npe,spe,rpe,Zi,Oo,Rl,Mo,Ao,A_,To,Nde],[[0,1],[0,1],[0,{[U]:hm}],[4,{[U]:ahe}],[0,{[U]:w_}],[4,{[U]:ghe}],[0,{[U]:NA}],[0,{[Bt]:Cpe}],[0,{[Bt]:Tpe}],[0,{[Bt]:Ape}],[0,{[Bt]:Ipe}],[0,{[Bt]:Ope}],[6,{[Bt]:Mpe}],[0,{[Bt]:D_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[0,{[U]:ko}],[1,{[Bt]:ON}],[0,{[U]:Do}],[0,{[U]:Lpe}]],2],yme=[-3,we,fhe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(yme,r_);var vme=[-3,we,uhe,{[bs]:vs,[Bs]:403},[Lf,wde],[0,0]];Mt.for(we).registerError(vme,XS);var bme=[-3,we,dhe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(bme,t_);var Sme=[-3,we,yhe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(Sme,n_);var _me=[3,we,whe,{[Yn]:She},[uN,x_,fm,zf],[[()=>Vme,0],()=>UN,0,0]],wme=[3,we,Ehe,0,[Ihe,fm,zf,lN],[[1,{[Bt]:xpe}],[0,{[Bt]:TN}],[0,{[Bt]:IN}],[0,{[Bt]:Spe}]]],Eme=[3,we,The,{[Yn]:xhe},[phe,Kde,_N,zf,hN,SN,Ude,pN,vhe,fm,Phe,EN,Ki],[2,[()=>Kme,{[Ep]:1}],0,0,0,1,[()=>qme,{[Ep]:1}],0,1,0,0,0,[0,{[U]:Qi}]]],xme=[3,we,Ahe,0,[os,hN,pN,SN,zf,fm,Jde,EN,Ao,To,Hhe],[[0,1],[0,{[Bt]:_pe}],[0,{[Bt]:wpe}],[1,{[Bt]:Rpe}],[0,{[Bt]:IN}],[0,{[Bt]:TN}],[2,{[Bt]:Epe}],[0,{[Bt]:kpe}],[0,{[U]:ko}],[0,{[U]:Do}],[64,{[U]:Gpe}]],1],Rme=[-3,we,zhe,{[bs]:vs,[Bs]:404},[],[]];Mt.for(we).registerError(Rme,YS);var Cme=[-3,we,Lhe,{[bs]:vs,[Bs]:404},[],[]];Mt.for(we).registerError(Cme,WS);var Tme=[-3,we,Bhe,{[bs]:vs,[Bs]:404},[],[]];Mt.for(we).registerError(Tme,GS);var Ame=[-3,we,Nhe,{[bs]:vs},[],[]];Mt.for(we).registerError(Ame,JS);var Ime=[3,we,Fhe,0,[ur,bN,So,xl,Za,xN,Lf,x_,wN],[0,4,0,[64,{[Ep]:1}],0,1,0,()=>UN,()=>zme]],Ome=[-3,we,$he,{[bs]:vs,[Bs]:403},[],[]];Mt.for(we).registerError(Ome,o_);var Mme=[-3,we,jhe,{[bs]:vs,[Bs]:403},[],[]];Mt.for(we).registerError(Mme,KS);var UN=[3,we,x_,0,[Zde,she],[0,0]],Dme=[3,we,Ghe,0,[yf,So,Hi,Fi,Vi,qi,Gi,Za,Io,Zi,Oo,Mo,Ur,Qa,Co,xN,Ki],[[0,{[U]:k_}],[0,{[U]:So}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Bf}],[0,{[U]:Po}],[0,{[U]:Uf}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[1,{[U]:Kpe}],[0,{[U]:Qi}]]],kme=[3,we,Khe,0,[os,ur,cN,i_,a_,u_,d_,h_,g_,v_,S_,xl,Hi,Fi,Vi,qi,Gi,il,dm,__,mN,gN,yN,vN,vpe,E_,Io,Lf,I_,Oo,Rl,Mo,Ur,Qa,Co,Ao,vf,C_,T_,R_,To],[[0,1],[0,1],[0,{[U]:DN}],[()=>j_,16],[0,{[U]:c_}],[0,{[U]:l_}],[0,{[U]:f_}],[0,{[U]:p_}],[1,{[U]:m_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:$_}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[4,{[U]:il}],[0,{[U]:hm}],[0,{[U]:w_}],[0,{[U]:NN}],[0,{[U]:zN}],[0,{[U]:LN}],[0,{[U]:BN}],[1,{[U]:Xpe}],[128,{[O_]:P_}],[0,{[U]:Po}],[0,{[U]:B_}],[0,{[U]:U_}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[()=>Dl,{[U]:Ml}],[2,{[U]:zo}],[0,{[U]:ko}],[0,{[U]:$N}],[0,{[U]:z_}],[5,{[U]:L_}],[0,{[U]:N_}],[0,{[U]:Do}]],2],Pme=[3,we,Qhe,0,[Zi],[[0,{[U]:Uf}]]],Nme=[3,we,Yhe,0,[os,ur,vf,Zi,v_,xl,To,Ao],[[0,1],[0,1],[()=>$me,{[AN]:1,[Yn]:vf}],[0,{[Bt]:D_}],[0,{[U]:y_}],[0,{[U]:$_}],[0,{[U]:Do}],[0,{[U]:ko}]],3],zme=[3,we,wN,0,[hhe,ope],[2,4]],Lme=[3,we,upe,0,[DA,zA,LA,yf],[[0,{[Yn]:DA}],[()=>BA,{[Yn]:zA}],[()=>BA,{[Yn]:LA}],[4,{[Yn]:yf}]],4],Bme=[3,we,CN,0,[ur,ype],[0,0],2],$me=[3,we,vf,0,[RN],[[()=>Zme,0]],1],Ume=[-3,we,hpe,{[bs]:vs,[Bs]:400},[],[]];Mt.for(we).registerError(Ume,s_);var jme=[3,we,mpe,0,[Io,So,Hi,Fi,Vi,qi,Gi,Oo,Mo,Ur,Co,Ki],[[0,{[U]:Po}],[0,{[U]:So}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Lo}],[0,{[U]:Bo}],[()=>$o,{[U]:No}],[2,{[U]:zo}],[0,{[U]:Qi}]]],Hme=[3,we,gpe,0,[os,ur,A_,pm,i_,g_,v_,xl,Hi,Fi,Vi,qi,Gi,Oo,Rl,Mo,Ao,To],[[0,1],[0,1],[1,{[Bt]:ON}],[0,{[Bt]:M_}],[()=>j_,16],[1,{[U]:m_}],[0,{[U]:y_}],[0,{[U]:$_}],[0,{[U]:Cl}],[0,{[U]:Tl}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Lo}],[()=>jf,{[U]:$f}],[0,{[U]:Bo}],[0,{[U]:ko}],[0,{[U]:Do}]],4],Fme=[-3,MN,"S3ServiceException",0,[],[]];Mt.for(MN).registerError(Fme,Un);var Vme=[1,we,uN,0,[()=>eme,{[Yn]:os}]],qme=[1,we,Lde,0,()=>sme],Gme=[1,we,Bde,0,()=>ome],Kme=[1,we,Uhe,0,[()=>Ime,0]],Zme=[1,we,RN,0,[()=>Bme,{[Yn]:CN}]],G0e=[9,we,yde,{[wr]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>Jpe,()=>Wpe],K0e=[9,we,fN,{[wr]:["POST","/{Key+}",200]},()=>ame,()=>ime],Z0e=[9,we,Pde,{[wr]:["POST","/{Key+}?uploads",200]},()=>lme,()=>cme],Qme=[9,we,Gde,{[wr]:["GET","/?session",200]},()=>fme,()=>ume],Q0e=[9,we,Xde,{[wr]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>hme,()=>dme],Y0e=[9,we,ehe,{[mm]:"-",[wr]:["GET","/{Key+}?x-id=GetObject",200]},()=>gme,()=>mme],Yme=[9,we,_he,{[wr]:["GET","/?x-id=ListBuckets",200]},()=>wme,()=>_me],Xme=[9,we,Che,{[wr]:["GET","/?list-type=2",200]},()=>xme,()=>Eme],X0e=[9,we,qhe,{[mm]:"-",[wr]:["PUT","/{Key+}?x-id=PutObject",200]},()=>kme,()=>Dme],W0e=[9,we,Zhe,{[mm]:"-",[wr]:["PUT","/{Key+}?tagging",200]},()=>Nme,()=>Pme],J0e=[9,we,ppe,{[mm]:"-",[wr]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>Hme,()=>jme];class Wme extends Br.classBuilder().ep({...qS,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),LS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(Qme).build(){}const Jme="3.975.0",ege={version:Jme};function $A(e){return typeof e=="string"?e.length===0:e.byteLength===0}var jN={name:"SHA-1"},UA={name:"HMAC",hash:jN},tge=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),nge=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ai().crypto.subtle.importKey("raw",jA(t),UA,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!$A(t)){var n=jA(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return Ai().crypto.subtle.sign(UA,n,t.toHash).then(function(r){return new Uint8Array(r)})}):$A(this.toHash)?Promise.resolve(tge):Promise.resolve().then(function(){return Ai().crypto.subtle.digest(jN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function jA(e){return typeof e=="string"?eD(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var sge=(function(){function e(t){if(rD(Ai()))this.hash=new nge(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(Na(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class Wu{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&HA(n),new Wu(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&HA(t),parseInt(ps(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function HA(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class rge{toUtf8;fromUtf8;constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const c of Object.keys(t)){const l=this.fromUtf8(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=this.fromUtf8(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(Wu.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!hge.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(ZO(t.value.replace(/\-/g,"")),1),g}}parse(t){const n={};let r=0;for(;r{if(typeof f!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+f);t=f,n=4,r=new Uint8Array(f),new DataView(r.buffer).setUint32(0,f,!1)},l=async function*(){const f=e[Symbol.asyncIterator]();for(;;){const{value:d,done:h}=await f.next();if(h){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const y=d.length;let g=0;for(;g({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),Rge=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:i}=await t.next();if(r)return n.close();n.enqueue(i)}})};class Cge{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Ege({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=Tge(t)?xge(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Rge(r):r}}const Tge=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,Age=e=>new Cge(e);async function Ige(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},gi=64,Mge=16,Dge=[1732584193,4023233417,2562383102,271733878];class kge{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(Pge(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=Nge(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===gi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:i}=this,c=i*8;if(n.setUint8(this.bufferLength++,128),r%gi>=gi-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(gi-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(Mge));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],i=n[1],c=n[2],l=n[3];r=Gn(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=Gn(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=Gn(c,l,r,i,t.getUint32(8,!0),17,606105819),i=Gn(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=Gn(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=Gn(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=Gn(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=Gn(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=Gn(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=Gn(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=Gn(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=Gn(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=Gn(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=Gn(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=Gn(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=Gn(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=Kn(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=Kn(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=Kn(c,l,r,i,t.getUint32(44,!0),14,643717713),i=Kn(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=Kn(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=Kn(l,r,i,c,t.getUint32(40,!0),9,38016083),c=Kn(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=Kn(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=Kn(r,i,c,l,t.getUint32(36,!0),5,568446438),l=Kn(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=Kn(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=Kn(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=Kn(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=Kn(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=Kn(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=Kn(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=Zn(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=Zn(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=Zn(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=Zn(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=Zn(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=Zn(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=Zn(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=Zn(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=Zn(r,i,c,l,t.getUint32(52,!0),4,681279174),l=Zn(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=Zn(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=Zn(i,c,l,r,t.getUint32(24,!0),23,76029189),r=Zn(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=Zn(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=Zn(c,l,r,i,t.getUint32(60,!0),16,530742520),i=Zn(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=Qn(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=Qn(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=Qn(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=Qn(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=Qn(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=Qn(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=Qn(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=Qn(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=Qn(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=Qn(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=Qn(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=Qn(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=Qn(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=Qn(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=Qn(c,l,r,i,t.getUint32(8,!0),15,718787259),i=Qn(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}reset(){this.state=Uint32Array.from(Dge),this.buffer=new DataView(new ArrayBuffer(gi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function gm(e,t,n,r,i,c){return t=(t+e&4294967295)+(r+c&4294967295)&4294967295,(t<>>32-i)+n&4294967295}function Gn(e,t,n,r,i,c,l){return gm(t&n|~t&r,e,t,i,c,l)}function Kn(e,t,n,r,i,c,l){return gm(t&r|n&~r,e,t,i,c,l)}function Zn(e,t,n,r,i,c,l){return gm(t^n^r,e,t,i,c,l)}function Qn(e,t,n,r,i,c,l){return gm(n^(t|~r),e,t,i,c,l)}function Pge(e){return typeof e=="string"?e.length===0:e.byteLength===0}function Nge(e){return typeof e=="string"?bo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const zge=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Pa,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oN,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??dG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??hde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Tb},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new FK}],logger:e?.logger??new Ab,protocol:e?.protocol??NZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??QO,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??HP,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??hf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??bo,utf8Encoder:e?.utf8Encoder??Ua}),Lge=e=>{const t=cD(e),n=()=>t().then(MM),r=zge(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??IM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??iD({serviceId:r.serviceId,clientVersion:ege.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Age,maxAttempts:e?.maxAttempts??pf,md5:e?.md5??kge,region:e?.region??aD("Region is missing"),requestHandler:Zp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||ZM),sha1:e?.sha1??sge,sha256:e?.sha256??oD,streamCollector:e?.streamCollector??vb,streamHasher:e?.streamHasher??Oge,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve($M)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(UM))}},Bge=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},$ge=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Uge=(e,t)=>{const n=Object.assign(hD(e),DM(e),BO(e),Bge(e));return t.forEach(r=>r.configure(n)),Object.assign(e,pD(n),kM(n),$O(n),$ge(n))};class jge extends OM{config;constructor(...[t]){const n=Lge(t||{});super(n),this.initConfig=n;const r=mde(n),i=iM(r),c=gfe(i),l=WM(c),f=HM(l),d=f,h=KM(d),y=Kfe(h),g=pde(y),v=Nfe(g,{session:[()=>this,Wme]}),b=Uge(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(BM(this.config)),this.middlewareStack.use(JM(this.config)),this.middlewareStack.use(FM(this.config)),this.middlewareStack.use(UO(this.config)),this.middlewareStack.use(jO(this.config)),this.middlewareStack.use(HO(this.config)),this.middlewareStack.use(FO(this.config,{httpAuthSchemeParametersProvider:ude,identityProviderConfigProvider:async _=>new rM({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(qO(this.config)),this.middlewareStack.use(Gfe(this.config)),this.middlewareStack.use(ffe(this.config)),this.middlewareStack.use(_fe(this.config)),this.middlewareStack.use(Ife(this.config)),this.middlewareStack.use(Pfe(this.config))}destroy(){super.destroy()}}class Hge extends Br.classBuilder().ep(qS).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),LS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(Yme).build(){}class Fge extends Br.classBuilder().ep({...qS,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),LS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(Xme).build(){}let $h=null,Uu=null;function jr(){if(!$h){const e=Kp();if(!e)throw new Error("AWS credentials not configured");$h=new lY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return $h}function FN(){if(!Uu){const e=Kp();if(!e)throw new Error("AWS credentials not configured");Uu=new jge({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Uu.middlewareStack.use({applyToStack:t=>{t.add(n=>r=>{const i=r.request;return i?.path?.endsWith("/")&&i.path!=="/"&&(i.path=i.path.slice(0,-1)),n(r)},{step:"build",name:"removeTrailingSlash"})}})}return Uu}function Vge(){$h=null,Uu=null}function VN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:qge},e[0]=t):t=e[0];const n=MB(t),r=Ip(),i=JA();let c;e[1]!==r||e[2]!==i?(c=function(){Zq(),Vge(),i.clear(),r({to:"/login"})},e[1]=r,e[2]=i,e[3]=c):c=e[3];const l=c;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=$.jsx(c0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(E$,{className:"size-4"}),y=$.jsx("span",{children:"Dashboard"}),e[5]=h,e[6]=y):(h=e[5],y=e[6]);let g;e[7]!==d?(g=$.jsxs(a0,{children:[f,$.jsx(bh,{children:$.jsx(ma,{children:$.jsx(Or,{to:"/",children:$.jsxs(ga,{isActive:d,tooltip:"Dashboard",children:[h,y]})})})})]}),e[7]=d,e[8]=g):g=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=$.jsx(c0,{children:"EC2"}),e[9]=v):v=e[9];let b;e[10]!==n?(b=n.startsWith("/ec2/describe-instances")||n.startsWith("/ec2/run-instances"),e[10]=n,e[11]=b):b=e[11];let _,x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(TR,{className:"size-4"}),_=$.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-instances",children:$.jsxs(ga,{isActive:b,tooltip:"EC2 Instances",children:[x,_]})})}),e[14]=b,e[15]=R):R=e[15];let C;e[16]!==n?(C=n.startsWith("/ec2/describe-images"),e[16]=n,e[17]=C):C=e[17];let A,O;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=$.jsx(R$,{className:"size-4"}),O=$.jsx("span",{children:"Images"}),e[18]=A,e[19]=O):(A=e[18],O=e[19]);let D;e[20]!==C?(D=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-images",children:$.jsxs(ga,{isActive:C,tooltip:"Images",children:[A,O]})})}),e[20]=C,e[21]=D):D=e[21];let N;e[22]!==n?(N=n.startsWith("/ec2/describe-key-pairs"),e[22]=n,e[23]=N):N=e[23];let j,B;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=$.jsx(T$,{className:"size-4"}),B=$.jsx("span",{children:"Key Pairs"}),e[24]=j,e[25]=B):(j=e[24],B=e[25]);let k;e[26]!==N?(k=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-key-pairs",children:$.jsxs(ga,{isActive:N,tooltip:"Key Pairs",children:[j,B]})})}),e[26]=N,e[27]=k):k=e[27];let Z;e[28]!==n?(Z=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=Z):Z=e[29];let se,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsx(_$,{className:"size-4"}),le=$.jsx("span",{children:"Volumes"}),e[30]=se,e[31]=le):(se=e[30],le=e[31]);let K;e[32]!==Z?(K=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-volumes",children:$.jsxs(ga,{isActive:Z,tooltip:"Volumes",children:[se,le]})})}),e[32]=Z,e[33]=K):K=e[33];let Q;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==K?(Q=$.jsxs(a0,{children:[v,$.jsxs(bh,{children:[R,D,k,K]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=K,e[38]=Q):Q=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=$.jsx(c0,{children:"S3"}),e[39]=ye):ye=e[39];let fe;e[40]!==n?(fe=n.startsWith("/s3/ls"),e[40]=n,e[41]=fe):fe=e[41];let q,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=$.jsx(TR,{className:"size-4"}),W=$.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=W):(q=e[42],W=e[43]);let H;e[44]!==fe?(H=$.jsxs(a0,{children:[ye,$.jsx(bh,{children:$.jsx(ma,{children:$.jsx(Or,{to:"/s3/ls",children:$.jsxs(ga,{isActive:fe,tooltip:"Buckets",children:[q,W]})})})})]}),e[44]=fe,e[45]=H):H=e[45];let ve;e[46]!==Q||e[47]!==H||e[48]!==g?(ve=$.jsxs(pH,{children:[g,Q,H]}),e[46]=Q,e[47]=H,e[48]=g,e[49]=ve):ve=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=$.jsx(I$,{className:"size-4"}),P=$.jsx("span",{children:"Sign out"}),e[50]=Te,e[51]=P):(Te=e[50],P=e[51]);let ne;e[52]!==l?(ne=$.jsx(hH,{children:$.jsx(bh,{children:$.jsx(ma,{children:$.jsxs(ga,{onClick:l,tooltip:"Sign out",children:[Te,P]})})})}),e[52]=l,e[53]=ne):ne=e[53];let ie;e[54]===Symbol.for("react.memo_cache_sentinel")?(ie=$.jsx(dH,{}),e[54]=ie):ie=e[54];let de;return e[55]!==ve||e[56]!==ne?(de=$.jsxs(uH,{collapsible:"icon",children:[ve,ne,ie]}),e[55]=ve,e[56]=ne,e[57]=de):de=e[57],de}function qge(e){return e.pathname}function Gge(e){const t=Ct.c(18),{error:n,reset:r}=e,i=Xn(),c=JA();let l;t[0]!==c||t[1]!==r||t[2]!==i?(l=function(){c.invalidateQueries(),r(),i.invalidate()},t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];const f=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(VN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(cO,{}),t[5]=h):h=t[5];let y,g;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=$.jsx("div",{className:"flex justify-center",children:$.jsx(b$,{className:"size-12 text-destructive"})}),g=$.jsx("h1",{className:"font-semibold text-2xl",children:"Something went wrong"}),t[6]=y,t[7]=g):(y=t[6],g=t[7]);const v=n.message||"An unexpected error occurred";let b;t[8]!==v?(b=$.jsx("p",{className:"text-muted-foreground",children:v}),t[8]=v,t[9]=b):b=t[9];let _;t[10]!==f?(_=$.jsx(el,{onClick:f,variant:"default",children:"Try Again"}),t[10]=f,t[11]=_):_=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(Or,{to:"/",children:$.jsx(el,{variant:"outline",children:"Go Home"})}),t[12]=x):x=t[12];let R;t[13]!==_?(R=$.jsxs("div",{className:"flex justify-center gap-2",children:[_,x]}),t[13]=_,t[14]=R):R=t[14];let C;return t[15]!==R||t[16]!==b?(C=$.jsxs($.Fragment,{children:[d,$.jsxs("main",{className:"flex flex-1 flex-col",children:[h,$.jsx("div",{className:"flex flex-1 items-center justify-center p-6 pt-0",children:$.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[y,g,b,R]})})]})]}),t[15]=R,t[16]=b,t[17]=C):C=t[17],C}const H_=yB()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>$.jsxs($.Fragment,{children:[$.jsx(zB,{}),$.jsx(VN,{}),$.jsxs("main",{className:"flex flex-1 flex-col",children:[$.jsx(cO,{}),$.jsx("div",{className:"flex flex-1 flex-col p-8",children:$.jsx(EI,{})})]})]}),errorComponent:Gge,notFoundComponent:yH}),Kge=()=>vn(()=>import("./login.js"),__vite__mapDeps([0,1])),Zge=nn("/login")({beforeLoad:()=>{if(Kp())throw Hv({to:"/"})},component:xn(Kge,"component")}),Qge=()=>vn(()=>import("./route.js"),[]),Yge=nn("/_auth")({beforeLoad:()=>{if(!Kp())throw Hv({to:"/login"})},component:xn(Qge,"component")}),Xge={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new BP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},Wge=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new BP({InstanceIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),Jge={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new afe({Filters:[{Name:"capacity",Values:["true"]}]});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},qN={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new LP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},GN=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new LP({ImageIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),KN={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new $P({});return await jr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},eye=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new $P({KeyPairIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),tye={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new cfe({});return await jr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},nye={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new UP({});return await jr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},ZN=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new UP({VolumeIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),sye=()=>vn(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),rye=nn("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(tye)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:xn(sye,"component")}),oye={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new Hge({});return await FN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},QN=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new Fge({Bucket:e,Prefix:t,Delimiter:"/"});return await FN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),iye=()=>vn(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),aye=nn("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(oye)},component:xn(iye,"component")}),tve=xf({imageId:Ti("Please select an Image"),instanceType:Ti("Please select an instance type"),keyName:Ti("Please select a key pair"),count:Sv("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),nve=xf({keyName:Ti().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),sve=xf({keyName:Ti().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),publicKeyMaterial:Ti().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),rve=xf({size:gq().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),cye=()=>vn(()=>import("./import-key-pair.js"),__vite__mapDeps([7,1,8,9,4,10,11,12])),lye=nn("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:xn(cye,"component")}),uye=()=>vn(()=>import("./create-key-pair.js"),__vite__mapDeps([13,1,8,9,4,11,12,14,10,15,16])),fye=nn("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:xn(uye,"component")}),dye=()=>vn(()=>import("./run-instances.js"),__vite__mapDeps([17,1,3,8,9,4,15,11,12])),hye=nn("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(qN),e.queryClient.ensureQueryData(KN),e.queryClient.ensureQueryData(Jge)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:xn(dye,"component")}),pye=()=>vn(()=>import("./route2.js"),[]),mye=nn("/_auth/s3/ls/$bucket")({component:xn(pye,"component")}),gye=()=>vn(()=>import("./index5.js"),__vite__mapDeps([18,3,8,4,19,14,16,20,12])),yye=nn("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(QN(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:xn(gye,"component")}),vye=()=>vn(()=>import("./index6.js"),__vite__mapDeps([21,3,6,4,22])),bye=nn("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nye)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:xn(vye,"component")}),Sye=()=>vn(()=>import("./index7.js"),__vite__mapDeps([23,3,6,4])),_ye=nn("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(KN)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:xn(Sye,"component")}),wye=()=>vn(()=>import("./index8.js"),__vite__mapDeps([24,3,6,4,25])),Eye=nn("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Xge)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:xn(wye,"component")}),xye=()=>vn(()=>import("./index9.js"),__vite__mapDeps([26,3,6,4,22])),Rye=nn("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(qN)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:xn(xye,"component")}),Cye=()=>vn(()=>import("./_.js"),__vite__mapDeps([27,3,8,19,14,16,20,12])),Tye=nn("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=GU(t._splat||"");await e.queryClient.ensureQueryData(QN(t.bucket,n))},head:({params:e})=>({meta:[{title:`${KU(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:xn(Cye,"component")}),Aye=()=>vn(()=>import("./_id.js"),__vite__mapDeps([28,1,3,8,9,4,11,12])),Iye=nn("/_auth/ec2/(volumes)/modify-volume/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(ZN(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:xn(Aye,"component")}),Oye=()=>vn(()=>import("./_id2.js"),__vite__mapDeps([29,3,8,30,4,22])),Mye=nn("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(ZN(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:xn(Oye,"component")}),Dye=()=>vn(()=>import("./_id3.js"),__vite__mapDeps([31,3,8,30,4,14,11,12,20])),kye=nn("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(eye(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:xn(Dye,"component")}),Pye=()=>vn(()=>import("./_id4.js"),__vite__mapDeps([32,3,8,30,4,25,33,11,12,20])),Nye=nn("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(Wge(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(GN(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:xn(Pye,"component")}),zye=()=>vn(()=>import("./_id5.js"),__vite__mapDeps([34,3,8,4,22,33,30])),Lye=nn("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(GN(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:xn(zye,"component")}),Bye=Zge.update({id:"/login",path:"/login",getParentRoute:()=>H_}),Wn=Yge.update({id:"/_auth",getParentRoute:()=>H_}),$ye=rye.update({id:"/",path:"/",getParentRoute:()=>Wn}),Uye=aye.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>Wn}),jye=lye.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>Wn}),Hye=fye.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>Wn}),Fye=hye.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>Wn}),F_=mye.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>Wn}),Vye=yye.update({id:"/",path:"/",getParentRoute:()=>F_}),qye=bye.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>Wn}),Gye=_ye.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>Wn}),Kye=Eye.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>Wn}),Zye=Rye.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>Wn}),Qye=Tye.update({id:"/$",path:"/$",getParentRoute:()=>F_}),Yye=Iye.update({id:"/ec2/(volumes)/modify-volume/$id",path:"/ec2/modify-volume/$id",getParentRoute:()=>Wn}),Xye=Mye.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>Wn}),Wye=kye.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>Wn}),Jye=Nye.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>Wn}),e0e=Lye.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>Wn}),t0e={AuthS3LsBucketSplatRoute:Qye,AuthS3LsBucketIndexRoute:Vye},n0e=F_._addFileChildren(t0e),s0e={AuthIndexRoute:$ye,AuthS3LsBucketRouteRoute:n0e,AuthEc2instancesRunInstancesRoute:Fye,AuthEc2keyCreateKeyPairRoute:Hye,AuthEc2keyImportKeyPairRoute:jye,AuthS3LsIndexRoute:Uye,AuthEc2imagesDescribeImagesIdRoute:e0e,AuthEc2instancesDescribeInstancesIdRoute:Jye,AuthEc2keyDescribeKeyPairsIdRoute:Wye,AuthEc2volumesDescribeVolumesIdRoute:Xye,AuthEc2volumesModifyVolumeIdRoute:Yye,AuthEc2imagesDescribeImagesIndexRoute:Zye,AuthEc2instancesDescribeInstancesIndexRoute:Kye,AuthEc2keyDescribeKeyPairsIndexRoute:Gye,AuthEc2volumesDescribeVolumesIndexRoute:qye},r0e=Wn._addFileChildren(s0e),o0e={AuthRouteRoute:r0e,LoginRoute:Bye},i0e=H_._addFileChildren(o0e)._addFileTypes(),YN=new LL,a0e=TB({routeTree:i0e,context:{queryClient:YN},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),Q0=document.getElementById("app");Q0&&!Q0.innerHTML&&HB.createRoot(Q0).render($.jsx(I.StrictMode,{children:$.jsx(GB,{defaultTheme:"system",storageKey:"hive-ui-theme",children:$.jsx($L,{client:YN,children:$.jsx(aH,{children:$.jsx(OB,{router:a0e})})})})}));export{g2 as $,w0e as A,el as B,zp as C,wf as D,Ms as E,mt as F,NR as G,Ze as H,e0 as I,bi as J,wn as K,bt as L,R0e as M,En as N,EI as O,rs as P,y2 as Q,a5 as R,c5 as S,p0e as T,_o as U,ot as V,Cj as W,f9 as X,zr as Y,qu as Z,wj as _,en as a,Ab as a$,ub as a0,Mj as a1,z2 as a2,q2 as a3,Op as a4,Qh as a5,I0e as a6,w2 as a7,sb as a8,zI as a9,v0e as aA,QN as aB,nye as aC,Or as aD,Xge as aE,Tye as aF,GU as aG,b0e as aH,KU as aI,MC as aJ,Mi as aK,Mv as aL,V0e as aM,jP as aN,cZ as aO,yp as aP,Na as aQ,nD as aR,sD as aS,LQ as aT,HQ as aU,BQ as aV,q0e as aW,uf as aX,Mn as aY,vr as aZ,F0e as a_,cr as aa,La as ab,C0e as ac,A0e as ad,G5 as ae,c8 as af,m0e as ag,l9 as ah,j9 as ai,t9 as aj,e9 as ak,_f as al,pn as am,WU as an,ki as ao,h8 as ap,T0e as aq,ob as ar,oO as as,Xj as at,x0e as au,qN as av,KN as aw,Jge as ax,tve as ay,yye as az,Kq as b,u0e as b$,ka as b0,k0e as b1,Br as b2,qS as b3,Eo as b4,LS as b5,G0e as b6,K0e as b7,Z0e as b8,Q0e as b9,kye as bA,eye as bB,Ba as bC,p9 as bD,d9 as bE,b2 as bF,Y5 as bG,y9 as bH,Q5 as bI,Jj as bJ,n9 as bK,Z5 as bL,Nye as bM,Wge as bN,GN as bO,dl as bP,P0e as bQ,N0e as bR,z0e as bS,L0e as bT,B0e as bU,$0e as bV,U0e as bW,j0e as bX,H0e as bY,jr as bZ,xp as b_,Y0e as ba,X0e as bb,W0e as bc,J0e as bd,l0e as be,c0e as bf,qM as bg,tQ as bh,hp as bi,JA as bj,FN as bk,y0e as bl,Iye as bm,rve as bn,ZN as bo,II as bp,Jv as bq,_t as br,Xc as bs,O0e as bt,M0e as bu,gO as bv,kI as bw,Mye as bx,g0e as by,ZU as bz,Ct as c,Ju as c0,PL as c1,ss as c2,br as c3,f0e as c4,Lye as c5,OI as c6,RL as c7,yL as c8,X0 as c9,Rp as ca,mL as cb,gL as cc,Y0 as cd,ZA as ce,ML as cf,SL as cg,Ua as ch,bo as ci,oye as d,tye as e,_r as f,nve as g,o5 as h,sve as i,$ as j,E0e as k,S0e as l,_0e as m,dh as n,E2 as o,Oi as p,sf as q,I as r,D0e as s,l5 as t,Ip as u,qt as v,rp as w,r2 as x,fv as y,Dr as z}; diff --git a/hive/services/hiveui/frontend/dist/assets/index4.js b/hive/services/hiveui/frontend/dist/assets/index4.js index 2f3c9141e..90a7dcd6f 100644 --- a/hive/services/hiveui/frontend/dist/assets/index4.js +++ b/hive/services/hiveui/frontend/dist/assets/index4.js @@ -1 +1 @@ -import{c as i,f as m,j as t}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as l}from"./list-card.js";import{P as u}from"./page-heading.js";function N(){const e=i.c(5),{data:n}=c(m);let s;e[0]!==n.Buckets?(s=n.Buckets||[],e[0]=n.Buckets,e[1]=s):s=e[1];const r=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(u,{title:"S3 Buckets"}),e[2]=a):a=e[2];let o;return e[3]!==r?(o=t.jsxs(t.Fragment,{children:[a,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No buckets found."})]}),e[3]=r,e[4]=o):o=e[4],o}function p(e){return e.Name?t.jsx(l,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${e.CreationDate.toLocaleString()}`:void 0,title:e.Name,to:"/s3/ls/$bucket"},e.Name):null}export{N as component}; +import{c as i,d as m,j as t}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as l}from"./list-card.js";import{P as u}from"./page-heading.js";function N(){const e=i.c(5),{data:n}=c(m);let s;e[0]!==n.Buckets?(s=n.Buckets||[],e[0]=n.Buckets,e[1]=s):s=e[1];const r=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(u,{title:"S3 Buckets"}),e[2]=a):a=e[2];let o;return e[3]!==r?(o=t.jsxs(t.Fragment,{children:[a,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No buckets found."})]}),e[3]=r,e[4]=o):o=e[4],o}function p(e){return e.Name?t.jsx(l,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${e.CreationDate.toLocaleString()}`:void 0,title:e.Name,to:"/s3/ls/$bucket"},e.Name):null}export{N as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index5.js b/hive/services/hiveui/frontend/dist/assets/index5.js index 37173ea31..a770c81d1 100644 --- a/hive/services/hiveui/frontend/dist/assets/index5.js +++ b/hive/services/hiveui/frontend/dist/assets/index5.js @@ -1 +1 @@ -import{c as g,aA as b,j as s,aB as P,aC as y}from"./index.js";import{u as k}from"./useSuspenseQuery.js";import{B as N}from"./back-link.js";import{P as B}from"./page-heading.js";import{F as C,O,U as K}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function _(){const e=g.c(26),{bucket:t}=b.useParams();let u;e[0]!==t?(u=y(t),e[0]=t,e[1]=u):u=e[1];const{data:i}=k(u);let x;e[2]!==i.Contents?(x=i.Contents||[],e[2]=i.Contents,e[3]=x):x=e[3];const n=x;let d;e[4]!==i.CommonPrefixes?(d=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=d):d=e[5];const o=d;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(N,{to:"/s3/ls",children:"Back to buckets"}),e[6]=h):h=e[6];let r;e[7]!==t?(r=s.jsx(K,{bucket:t}),e[7]=t,e[8]=r):r=e[8];let m;e[9]!==t||e[10]!==r?(m=s.jsx(B,{actions:r,title:t}),e[9]=t,e[10]=r,e[11]=m):m=e[11];let a;e[12]!==t||e[13]!==o?(a=o.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:o.map(l=>{if(!l.Prefix)return null;const j=P(l.Prefix);return s.jsx(C,{bucketName:t,folderName:j,fullPrefix:l.Prefix},l.Prefix)})})]}),e[12]=t,e[13]=o,e[14]=a):a=e[14];let c;e[15]!==t||e[16]!==n?(c=n.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),n.map(l=>l.Key?s.jsx(O,{bucketName:t,displayName:l.Key,fullKey:l.Key,object:l},l.Key):null)]}),e[15]=t,e[16]=n,e[17]=c):c=e[17];let f;e[18]!==o.length||e[19]!==n.length?(f=n.length===0&&o.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[18]=o.length,e[19]=n.length,e[20]=f):f=e[20];let p;return e[21]!==m||e[22]!==a||e[23]!==c||e[24]!==f?(p=s.jsxs(s.Fragment,{children:[h,m,a,c,f]}),e[21]=m,e[22]=a,e[23]=c,e[24]=f,e[25]=p):p=e[25],p}export{_ as component}; +import{c as g,az as b,j as s,aA as P,aB as y}from"./index.js";import{u as k}from"./useSuspenseQuery.js";import{B as N}from"./back-link.js";import{P as B}from"./page-heading.js";import{F as C,O,U as K}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function _(){const e=g.c(26),{bucket:t}=b.useParams();let u;e[0]!==t?(u=y(t),e[0]=t,e[1]=u):u=e[1];const{data:i}=k(u);let x;e[2]!==i.Contents?(x=i.Contents||[],e[2]=i.Contents,e[3]=x):x=e[3];const n=x;let d;e[4]!==i.CommonPrefixes?(d=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=d):d=e[5];const o=d;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(N,{to:"/s3/ls",children:"Back to buckets"}),e[6]=h):h=e[6];let r;e[7]!==t?(r=s.jsx(K,{bucket:t}),e[7]=t,e[8]=r):r=e[8];let m;e[9]!==t||e[10]!==r?(m=s.jsx(B,{actions:r,title:t}),e[9]=t,e[10]=r,e[11]=m):m=e[11];let a;e[12]!==t||e[13]!==o?(a=o.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:o.map(l=>{if(!l.Prefix)return null;const j=P(l.Prefix);return s.jsx(C,{bucketName:t,folderName:j,fullPrefix:l.Prefix},l.Prefix)})})]}),e[12]=t,e[13]=o,e[14]=a):a=e[14];let c;e[15]!==t||e[16]!==n?(c=n.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),n.map(l=>l.Key?s.jsx(O,{bucketName:t,displayName:l.Key,fullKey:l.Key,object:l},l.Key):null)]}),e[15]=t,e[16]=n,e[17]=c):c=e[17];let f;e[18]!==o.length||e[19]!==n.length?(f=n.length===0&&o.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[18]=o.length,e[19]=n.length,e[20]=f):f=e[20];let p;return e[21]!==m||e[22]!==a||e[23]!==c||e[24]!==f?(p=s.jsxs(s.Fragment,{children:[h,m,a,c,f]}),e[21]=m,e[22]=a,e[23]=c,e[24]=f,e[25]=p):p=e[25],p}export{_ as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index6.js b/hive/services/hiveui/frontend/dist/assets/index6.js index 687009614..c10bd38f5 100644 --- a/hive/services/hiveui/frontend/dist/assets/index6.js +++ b/hive/services/hiveui/frontend/dist/assets/index6.js @@ -1 +1 @@ -import{c as l,aD as m,j as t}from"./index.js";import{u as n}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as c}from"./page-heading.js";import{B as d}from"./badge.js";function h(){const e=l.c(5),{data:r}=n(m);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(c,{title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function p(e){return e.VolumeId?t.jsx(u,{badge:e.State?t.jsx(d,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{h as component}; +import{c as l,aC as m,j as t}from"./index.js";import{u as n}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as c}from"./page-heading.js";import{B as d}from"./badge.js";function h(){const e=l.c(5),{data:r}=n(m);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(c,{title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function p(e){return e.VolumeId?t.jsx(u,{badge:e.State?t.jsx(d,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{h as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index7.js b/hive/services/hiveui/frontend/dist/assets/index7.js index dcfab8c1e..ac7cf7a83 100644 --- a/hive/services/hiveui/frontend/dist/assets/index7.js +++ b/hive/services/hiveui/frontend/dist/assets/index7.js @@ -1 +1 @@ -import{c as m,ax as l,j as t,aE as n,B as c}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as y}from"./page-heading.js";function P(){const e=m.c(4),{data:r}=p(l);let s;if(e[0]!==r.KeyPairs){const a=[...r.KeyPairs||[]].sort(x);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(n,{to:"/ec2/import-key-pair",children:t.jsx(c,{variant:"outline",children:"Import Key Pair"})}),e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(y,{actions:t.jsxs("div",{className:"flex gap-2",children:[i,t.jsx(n,{to:"/ec2/create-key-pair",children:t.jsx(c,{children:"Create Key Pair"})})]}),title:"EC2 Key Pairs"}),e[3]=o):o=e[3],s=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No key pairs found."})]}),e[0]=r.KeyPairs,e[1]=s}else s=e[1];return s}function u(e){return e.KeyPairId?t.jsx(d,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,title:e.KeyName??"",to:"/ec2/describe-key-pairs/$id"},e.KeyPairId):null}function x(e,r){const s=e.KeyName?.toLowerCase()??"",a=r.KeyName?.toLowerCase()??"";return s.localeCompare(a)}export{P as component}; +import{c as m,aw as l,j as t,aD as n,B as c}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as y}from"./page-heading.js";function P(){const e=m.c(4),{data:r}=p(l);let s;if(e[0]!==r.KeyPairs){const a=[...r.KeyPairs||[]].sort(f);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(n,{to:"/ec2/import-key-pair",children:t.jsx(c,{variant:"outline",children:"Import Key Pair"})}),e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(y,{actions:t.jsxs("div",{className:"flex gap-2",children:[i,t.jsx(n,{to:"/ec2/create-key-pair",children:t.jsx(c,{children:"Create Key Pair"})})]}),title:"EC2 Key Pairs"}),e[3]=o):o=e[3],s=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No key pairs found."})]}),e[0]=r.KeyPairs,e[1]=s}else s=e[1];return s}function u(e){return e.KeyPairId?t.jsx(d,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,title:e.KeyName??"",to:"/ec2/describe-key-pairs/$id"},e.KeyPairId):null}function f(e,r){const s=e.KeyName?.toLowerCase()??"",a=r.KeyName?.toLowerCase()??"";return s.localeCompare(a)}export{P as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index8.js b/hive/services/hiveui/frontend/dist/assets/index8.js index 8ee097131..812747dc2 100644 --- a/hive/services/hiveui/frontend/dist/assets/index8.js +++ b/hive/services/hiveui/frontend/dist/assets/index8.js @@ -1 +1 @@ -import{c as o,aF as c,j as t,aE as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component}; +import{c as o,aE as c,j as t,aD as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index9.js b/hive/services/hiveui/frontend/dist/assets/index9.js index a3d9a0eb3..2c55f5a5e 100644 --- a/hive/services/hiveui/frontend/dist/assets/index9.js +++ b/hive/services/hiveui/frontend/dist/assets/index9.js @@ -1 +1 @@ -import{c as n,aw as i,j as t}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as c}from"./list-card.js";import{P as d}from"./page-heading.js";import{B as u}from"./badge.js";function h(){const e=n.c(5),{data:m}=l(i);let s;e[0]!==m.Images?(s=m.Images||[],e[0]=m.Images,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{title:"EC2 Images"}),e[2]=r):r=e[2];let o;return e[3]!==a?(o=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=o):o=e[4],o}function p(e){return e.ImageId?t.jsx(c,{badge:e.State?t.jsx(u,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component}; +import{c as n,av as i,j as t}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as c}from"./list-card.js";import{P as d}from"./page-heading.js";import{B as u}from"./badge.js";function h(){const e=n.c(5),{data:m}=l(i);let s;e[0]!==m.Images?(s=m.Images||[],e[0]=m.Images,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{title:"EC2 Images"}),e[2]=r):r=e[2];let o;return e[3]!==a?(o=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=o):o=e[4],o}function p(e){return e.ImageId?t.jsx(c,{badge:e.State?t.jsx(u,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/list-card.js b/hive/services/hiveui/frontend/dist/assets/list-card.js index 70bfb9984..aeb3899d2 100644 --- a/hive/services/hiveui/frontend/dist/assets/list-card.js +++ b/hive/services/hiveui/frontend/dist/assets/list-card.js @@ -1 +1 @@ -import{c as u,j as m,aE as h}from"./index.js";function b(x){const e=u.c(22);let s,l,i,t,r;e[0]!==x?({title:r,subtitle:t,badge:s,children:l,...i}=x,e[0]=x,e[1]=s,e[2]=l,e[3]=i,e[4]=t,e[5]=r):(s=e[1],l=e[2],i=e[3],t=e[4],r=e[5]);let a;e[6]!==r?(a=m.jsx("h3",{className:"font-semibold",children:r}),e[6]=r,e[7]=a):a=e[7];let c;e[8]!==t?(c=t&&m.jsx("p",{className:"mt-1 font-medium text-muted-foreground text-sm",children:t}),e[8]=t,e[9]=c):c=e[9];let n;e[10]!==l||e[11]!==a||e[12]!==c?(n=m.jsxs("div",{className:"flex-1",children:[a,c,l]}),e[10]=l,e[11]=a,e[12]=c,e[13]=n):n=e[13];let o;e[14]!==s?(o=s&&m.jsx("div",{className:"ml-4",children:s}),e[14]=s,e[15]=o):o=e[15];let d;e[16]!==n||e[17]!==o?(d=m.jsxs("div",{className:"flex items-start justify-between",children:[n,o]}),e[16]=n,e[17]=o,e[18]=d):d=e[18];let f;return e[19]!==i||e[20]!==d?(f=m.jsx(h,{className:"block rounded-lg border bg-card p-4 transition-colors hover:bg-accent",...i,children:d}),e[19]=i,e[20]=d,e[21]=f):f=e[21],f}export{b as L}; +import{c as u,j as m,aD as h}from"./index.js";function b(x){const e=u.c(22);let s,l,i,t,r;e[0]!==x?({title:r,subtitle:t,badge:s,children:l,...i}=x,e[0]=x,e[1]=s,e[2]=l,e[3]=i,e[4]=t,e[5]=r):(s=e[1],l=e[2],i=e[3],t=e[4],r=e[5]);let a;e[6]!==r?(a=m.jsx("h3",{className:"font-semibold",children:r}),e[6]=r,e[7]=a):a=e[7];let c;e[8]!==t?(c=t&&m.jsx("p",{className:"mt-1 font-medium text-muted-foreground text-sm",children:t}),e[8]=t,e[9]=c):c=e[9];let n;e[10]!==l||e[11]!==a||e[12]!==c?(n=m.jsxs("div",{className:"flex-1",children:[a,c,l]}),e[10]=l,e[11]=a,e[12]=c,e[13]=n):n=e[13];let o;e[14]!==s?(o=s&&m.jsx("div",{className:"ml-4",children:s}),e[14]=s,e[15]=o):o=e[15];let d;e[16]!==n||e[17]!==o?(d=m.jsxs("div",{className:"flex items-start justify-between",children:[n,o]}),e[16]=n,e[17]=o,e[18]=d):d=e[18];let f;return e[19]!==i||e[20]!==d?(f=m.jsx(h,{className:"block rounded-lg border bg-card p-4 transition-colors hover:bg-accent",...i,children:d}),e[19]=i,e[20]=d,e[21]=f):f=e[21],f}export{b as L}; diff --git a/hive/services/hiveui/frontend/dist/assets/login.js b/hive/services/hiveui/frontend/dist/assets/login.js index 236bc947d..1936aeb71 100644 --- a/hive/services/hiveui/frontend/dist/assets/login.js +++ b/hive/services/hiveui/frontend/dist/assets/login.js @@ -1 +1 @@ -import{c as u,a as p,j as r,b as D,u as P,d as R,s as L,B as X}from"./index.js";import{a as B,u as G,I as $}from"./zod.js";function O(t){const e=u.c(10);let l,s,a;e[0]!==t?({className:l,size:a,...s}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=a):(l=e[1],s=e[2],a=e[3]);const i=a===void 0?"default":a;let o;e[4]!==l?(o=p("group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-card-foreground text-xs/relaxed ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",l),e[4]=l,e[5]=o):o=e[5];let c;return e[6]!==s||e[7]!==i||e[8]!==o?(c=r.jsx("div",{className:o,"data-size":i,"data-slot":"card",...s}),e[6]=s,e[7]=i,e[8]=o,e[9]=c):c=e[9],c}function T(t){const e=u.c(8);let l,s;e[0]!==t?({className:l,...s}=t,e[0]=t,e[1]=l,e[2]=s):(l=e[1],s=e[2]);let a;e[3]!==l?(a=p("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",l),e[3]=l,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{className:a,"data-slot":"card-header",...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function V(t){const e=u.c(8);let l,s;e[0]!==t?({className:l,...s}=t,e[0]=t,e[1]=l,e[2]=s):(l=e[1],s=e[2]);let a;e[3]!==l?(a=p("font-medium text-sm",l),e[3]=l,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{className:a,"data-slot":"card-title",...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function Y(t){const e=u.c(8);let l,s;e[0]!==t?({className:l,...s}=t,e[0]=t,e[1]=l,e[2]=s):(l=e[1],s=e[2]);let a;e[3]!==l?(a=p("text-muted-foreground text-xs/relaxed",l),e[3]=l,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{className:a,"data-slot":"card-description",...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function q(t){const e=u.c(8);let l,s;e[0]!==t?({className:l,...s}=t,e[0]=t,e[1]=l,e[2]=s):(l=e[1],s=e[2]);let a;e[3]!==l?(a=p("px-4 group-data-[size=sm]/card:px-3",l),e[3]=l,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{className:a,"data-slot":"card-content",...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function H(t){const e=u.c(8);let l,s;e[0]!==t?({className:l,...s}=t,e[0]=t,e[1]=l,e[2]=s):(l=e[1],s=e[2]);let a;e[3]!==l?(a=p("group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",l),e[3]=l,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{className:a,"data-slot":"field-group",...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const J=D("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"@md/field-group:flex-row flex-col @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:[&>*]:w-auto [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function z(t){const e=u.c(11);let l,s,a;e[0]!==t?({className:l,orientation:a,...s}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=a):(l=e[1],s=e[2],a=e[3]);const i=a===void 0?"vertical":a;let o;e[4]!==l||e[5]!==i?(o=p(J({orientation:i}),l),e[4]=l,e[5]=i,e[6]=o):o=e[6];let c;return e[7]!==i||e[8]!==s||e[9]!==o?(c=r.jsx("div",{className:o,"data-orientation":i,"data-slot":"field",role:"group",...s}),e[7]=i,e[8]=s,e[9]=o,e[10]=c):c=e[10],c}function F(t){const e=u.c(8);let l,s;e[0]!==t?({className:l,...s}=t,e[0]=t,e[1]=l,e[2]=s):(l=e[1],s=e[2]);let a;e[3]!==l?(a=p("flex w-fit items-center gap-2 font-medium text-xs/relaxed leading-snug group-data-[disabled=true]/field:opacity-50",l),e[3]=l,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{className:a,"data-slot":"field-label",...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function k(t){const e=u.c(15);let l,s,a,i;e[0]!==t?({className:s,children:l,errors:a,...i}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=a,e[4]=i):(l=e[1],s=e[2],a=e[3],i=e[4]);let o;e:{if(l){o=l;break e}if(!a?.length){o=null;break e}let m;e[5]!==a?(m=[...new Map(a.map(W)).values()],e[5]=a,e[6]=m):m=e[6];const f=m;if(f?.length===1){o=f[0]?.message;break e}let d;e[7]!==f?(d=r.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:f.map(U)}),e[7]=f,e[8]=d):d=e[8],o=d}const c=o;if(!c)return null;let n;e[9]!==s?(n=p("font-normal text-destructive text-xs/relaxed",s),e[9]=s,e[10]=n):n=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==n?(x=r.jsx("div",{className:n,"data-slot":"field-error",role:"alert",...i,children:c}),e[11]=c,e[12]=i,e[13]=n,e[14]=x):x=e[14],x}function U(t){return t?.message&&r.jsx("li",{children:t.message},t.message)}function W(t){return[t?.message,t]}function te(){const t=u.c(39),e=P();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={resolver:B(R)},t[0]=l):l=t[0];const{register:s,handleSubmit:a,formState:i}=G(l),{errors:o,isSubmitting:c}=i;let n;t[1]!==e?(n=function(M){L(M),e({to:"/"})},t[1]=e,t[2]=n):n=t[2];const x=n;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(V,{children:"AWS Credentials"}),t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsxs(T,{children:[m,r.jsxs(Y,{children:["Run ",r.jsx("code",{children:"cat ~/hive/config/hive.toml"})," to get your credentials"]})]}),t[4]=f):f=t[4];let d;t[5]!==a||t[6]!==x?(d=a(x),t[5]=a,t[6]=x,t[7]=d):d=t[7];let A;t[8]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx(F,{children:r.jsx("label",{htmlFor:"accessKeyId",children:"Access Key ID"})}),t[8]=A):A=t[8];const _=!!o.accessKeyId;let g;t[9]!==s?(g=s("accessKeyId"),t[9]=s,t[10]=g):g=t[10];let h;t[11]!==_||t[12]!==g?(h=r.jsx($,{"aria-invalid":_,autoComplete:"username",id:"accessKeyId",placeholder:"AKIAIOSFODNN7EXAMPLE",...g}),t[11]=_,t[12]=g,t[13]=h):h=t[13];let b;t[14]!==o.accessKeyId?(b=r.jsx(k,{errors:[o.accessKeyId]}),t[14]=o.accessKeyId,t[15]=b):b=t[15];let j;t[16]!==b||t[17]!==h?(j=r.jsxs(z,{children:[A,h,b]}),t[16]=b,t[17]=h,t[18]=j):j=t[18];let I;t[19]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx(F,{children:r.jsx("label",{htmlFor:"secretAccessKey",children:"Secret Access Key"})}),t[19]=I):I=t[19];const E=!!o.secretAccessKey;let v;t[20]!==s?(v=s("secretAccessKey"),t[20]=s,t[21]=v):v=t[21];let y;t[22]!==E||t[23]!==v?(y=r.jsx($,{"aria-invalid":E,autoComplete:"current-password",id:"secretAccessKey",placeholder:"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",type:"password",...v}),t[22]=E,t[23]=v,t[24]=y):y=t[24];let N;t[25]!==o.secretAccessKey?(N=r.jsx(k,{errors:[o.secretAccessKey]}),t[25]=o.secretAccessKey,t[26]=N):N=t[26];let w;t[27]!==y||t[28]!==N?(w=r.jsxs(z,{children:[I,y,N]}),t[27]=y,t[28]=N,t[29]=w):w=t[29];let K;t[30]!==c?(K=r.jsx(X,{className:"w-full",disabled:c,type:"submit",children:"Sign In"}),t[30]=c,t[31]=K):K=t[31];let S;t[32]!==j||t[33]!==w||t[34]!==K?(S=r.jsxs(H,{children:[j,w,K]}),t[32]=j,t[33]=w,t[34]=K,t[35]=S):S=t[35];let C;return t[36]!==S||t[37]!==d?(C=r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsxs(O,{className:"w-full max-w-sm",children:[f,r.jsx(q,{children:r.jsx("form",{onSubmit:d,children:S})})]})}),t[36]=S,t[37]=d,t[38]=C):C=t[38],C}export{te as component}; +import{c as b,a as K,j as c,u as P,b as R,s as L,B as X}from"./index.js";import{a as B,u as G,I as F,F as z,b as $,c as D,d as O}from"./field.js";function T(e){const s=b.c(10);let l,t,r;s[0]!==e?({className:l,size:r,...t}=e,s[0]=e,s[1]=l,s[2]=t,s[3]=r):(l=s[1],t=s[2],r=s[3]);const a=r===void 0?"default":r;let i;s[4]!==l?(i=K("group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-card-foreground text-xs/relaxed ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",l),s[4]=l,s[5]=i):i=s[5];let o;return s[6]!==t||s[7]!==a||s[8]!==i?(o=c.jsx("div",{className:i,"data-size":a,"data-slot":"card",...t}),s[6]=t,s[7]=a,s[8]=i,s[9]=o):o=s[9],o}function Y(e){const s=b.c(8);let l,t;s[0]!==e?({className:l,...t}=e,s[0]=e,s[1]=l,s[2]=t):(l=s[1],t=s[2]);let r;s[3]!==l?(r=K("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",l),s[3]=l,s[4]=r):r=s[4];let a;return s[5]!==t||s[6]!==r?(a=c.jsx("div",{className:r,"data-slot":"card-header",...t}),s[5]=t,s[6]=r,s[7]=a):a=s[7],a}function H(e){const s=b.c(8);let l,t;s[0]!==e?({className:l,...t}=e,s[0]=e,s[1]=l,s[2]=t):(l=s[1],t=s[2]);let r;s[3]!==l?(r=K("font-medium text-sm",l),s[3]=l,s[4]=r):r=s[4];let a;return s[5]!==t||s[6]!==r?(a=c.jsx("div",{className:r,"data-slot":"card-title",...t}),s[5]=t,s[6]=r,s[7]=a):a=s[7],a}function J(e){const s=b.c(8);let l,t;s[0]!==e?({className:l,...t}=e,s[0]=e,s[1]=l,s[2]=t):(l=s[1],t=s[2]);let r;s[3]!==l?(r=K("text-muted-foreground text-xs/relaxed",l),s[3]=l,s[4]=r):r=s[4];let a;return s[5]!==t||s[6]!==r?(a=c.jsx("div",{className:r,"data-slot":"card-description",...t}),s[5]=t,s[6]=r,s[7]=a):a=s[7],a}function U(e){const s=b.c(8);let l,t;s[0]!==e?({className:l,...t}=e,s[0]=e,s[1]=l,s[2]=t):(l=s[1],t=s[2]);let r;s[3]!==l?(r=K("px-4 group-data-[size=sm]/card:px-3",l),s[3]=l,s[4]=r):r=s[4];let a;return s[5]!==t||s[6]!==r?(a=c.jsx("div",{className:r,"data-slot":"card-content",...t}),s[5]=t,s[6]=r,s[7]=a):a=s[7],a}function Q(){const e=b.c(39),s=P();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={resolver:B(R)},e[0]=l):l=e[0];const{register:t,handleSubmit:r,formState:a}=G(l),{errors:i,isSubmitting:o}=a;let N;e[1]!==s?(N=function(M){L(M),s({to:"/"})},e[1]=s,e[2]=N):N=e[2];const _=N;let S;e[3]===Symbol.for("react.memo_cache_sentinel")?(S=c.jsx(H,{children:"AWS Credentials"}),e[3]=S):S=e[3];let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=c.jsxs(Y,{children:[S,c.jsxs(J,{children:["Run ",c.jsx("code",{children:"cat ~/hive/config/hive.toml"})," to get your credentials"]})]}),e[4]=v):v=e[4];let d;e[5]!==r||e[6]!==_?(d=r(_),e[5]=r,e[6]=_,e[7]=d):d=e[7];let A;e[8]===Symbol.for("react.memo_cache_sentinel")?(A=c.jsx($,{children:c.jsx("label",{htmlFor:"accessKeyId",children:"Access Key ID"})}),e[8]=A):A=e[8];const w=!!i.accessKeyId;let n;e[9]!==t?(n=t("accessKeyId"),e[9]=t,e[10]=n):n=e[10];let m;e[11]!==w||e[12]!==n?(m=c.jsx(F,{"aria-invalid":w,autoComplete:"username",id:"accessKeyId",placeholder:"AKIAIOSFODNN7EXAMPLE",...n}),e[11]=w,e[12]=n,e[13]=m):m=e[13];let f;e[14]!==i.accessKeyId?(f=c.jsx(z,{errors:[i.accessKeyId]}),e[14]=i.accessKeyId,e[15]=f):f=e[15];let u;e[16]!==f||e[17]!==m?(u=c.jsxs(D,{children:[A,m,f]}),e[16]=f,e[17]=m,e[18]=u):u=e[18];let I;e[19]===Symbol.for("react.memo_cache_sentinel")?(I=c.jsx($,{children:c.jsx("label",{htmlFor:"secretAccessKey",children:"Secret Access Key"})}),e[19]=I):I=e[19];const E=!!i.secretAccessKey;let x;e[20]!==t?(x=t("secretAccessKey"),e[20]=t,e[21]=x):x=e[21];let p;e[22]!==E||e[23]!==x?(p=c.jsx(F,{"aria-invalid":E,autoComplete:"current-password",id:"secretAccessKey",placeholder:"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",type:"password",...x}),e[22]=E,e[23]=x,e[24]=p):p=e[24];let h;e[25]!==i.secretAccessKey?(h=c.jsx(z,{errors:[i.secretAccessKey]}),e[25]=i.secretAccessKey,e[26]=h):h=e[26];let g;e[27]!==p||e[28]!==h?(g=c.jsxs(D,{children:[I,p,h]}),e[27]=p,e[28]=h,e[29]=g):g=e[29];let j;e[30]!==o?(j=c.jsx(X,{className:"w-full",disabled:o,type:"submit",children:"Sign In"}),e[30]=o,e[31]=j):j=e[31];let y;e[32]!==u||e[33]!==g||e[34]!==j?(y=c.jsxs(O,{children:[u,g,j]}),e[32]=u,e[33]=g,e[34]=j,e[35]=y):y=e[35];let C;return e[36]!==y||e[37]!==d?(C=c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsxs(T,{className:"w-full max-w-sm",children:[v,c.jsx(U,{children:c.jsx("form",{onSubmit:d,children:y})})]})}),e[36]=y,e[37]=d,e[38]=C):C=e[38],C}export{Q as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/run-instances.js b/hive/services/hiveui/frontend/dist/assets/run-instances.js index 55dd25b74..3f733cdc8 100644 --- a/hive/services/hiveui/frontend/dist/assets/run-instances.js +++ b/hive/services/hiveui/frontend/dist/assets/run-instances.js @@ -1 +1 @@ -import{g as Jt,A as jt,k as Re,l as Je,m as Fe,n as Ue,o as Ut,r as l,p as Zt,q as He,t as Bt,v as vn,w as xe,x as ht,y as Tn,E as en,z as tn,C as De,D as Mn,F as Cn,G as Y,H as En,I as de,J as An,K as _t,L as Pn,M as Ge,N as xt,P as zt,Q as On,R as nn,S as Nn,T as Vn,U as At,V as ut,j as y,W as q,X as Lt,Y as kn,Z as Pt,_ as jn,$ as j,a0 as Ln,a1 as ft,a2 as Dn,a3 as Hn,a4 as Fn,a5 as rn,a6 as sn,a7 as Un,a8 as Bn,a9 as Dt,aa as on,ab as Ve,ac as Ot,ad as _n,ae as zn,af as Kn,ag as Wn,ah as $n,ai as qn,aj as Yn,ak as Gn,al as Xn,am as ln,an as Kt,ao as Qn,ap as Jn,aq as Zn,ar as er,as as cn,at as tr,au as nr,av as yt,c as We,a as $e,u as rr,aw as sr,ax as or,ay as ir,az as lr,B as Wt}from"./index.js";import{b as cr,c as an,d as un,e as $t,f as ar,g as ur,h as fr,u as dr,a as pr,C as bt,I as mr}from"./zod.js";import{u as Rt}from"./useSuspenseQuery.js";import{B as gr}from"./back-link.js";import{E as qt,L as st}from"./error-banner.js";import{P as hr}from"./page-heading.js";import{C as xr}from"./check.js";import{b as yr}from"./ec2.js";import"./useMutation.js";const br=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],fn=Jt("chevron-down",br);const Rr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wr=Jt("chevron-up",Rr);function ot(t,e,n){return Math.floor(t/e)!==n}function Xe(t,e){return e<0||e>=t.current.length}function wt(t,e){return he(t,{disabledIndices:e})}function Yt(t,e){return he(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function he(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:s,amount:i=1}={}){let r=e;do r+=n?-i:i;while(r>=0&&r<=t.current.length-1&&Qe(t,r,s));return r}function Sr(t,{event:e,orientation:n,loopFocus:s,rtl:i,cols:r,disabledIndices:c,minIndex:u,maxIndex:f,prevIndex:d,stopEvent:m=!1}){let p=d;const b=[],P={};let w=!1;{let o=null,R=-1;t.current.forEach((a,h)=>{if(a==null)return;const E=a.closest('[role="row"]');E&&(w=!0),(E!==o||R===-1)&&(o=E,R+=1,b[R]=[]),b[R].push(h),P[h]=R})}const x=w&&b.length>0&&b.some(o=>o.length!==r);function T(o){if(!x||d===-1)return;const R=P[d];if(R==null)return;const a=b[R].indexOf(d);let h=o==="up"?R-1:R+1;s&&(h<0?h=b.length-1:h>=b.length&&(h=0));const E=new Set;for(;h>=0&&h=0;N-=1){const re=I[N];if(!Qe(t,re,c))return re}h=o==="up"?h-1:h+1,s&&(h<0?h=b.length-1:h>=b.length&&(h=0))}}if(e.key===jt){const o=T("up");if(o!==void 0)m&&Re(e),p=o;else{if(m&&Re(e),d===-1)p=f;else if(p=he(t,{startingIndex:p,amount:r,decrement:!0,disabledIndices:c}),s&&(d-rR?h:h-r}Xe(t,p)&&(p=d)}}if(e.key===Je){const o=T("down");o!==void 0?(m&&Re(e),p=o):(m&&Re(e),d===-1?p=u:(p=he(t,{startingIndex:d,amount:r,disabledIndices:c}),s&&d+r>f&&(p=he(t,{startingIndex:d%r-r,amount:r,disabledIndices:c}))),Xe(t,p)&&(p=d))}if(n==="both"){const o=Ut(d/r);e.key===(i?Fe:Ue)&&(m&&Re(e),d%r!==r-1?(p=he(t,{startingIndex:d,disabledIndices:c}),s&&ot(p,r,o)&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c}))):s&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c})),ot(p,r,o)&&(p=d)),e.key===(i?Ue:Fe)&&(m&&Re(e),d%r!==0?(p=he(t,{startingIndex:d,decrement:!0,disabledIndices:c}),s&&ot(p,r,o)&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c}))):s&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c})),ot(p,r,o)&&(p=d));const R=Ut(f/r)===o;Xe(t,p)&&(s&&R?p=e.key===(i?Ue:Fe)?f:he(t,{startingIndex:d-d%r-1,disabledIndices:c}):p=d)}return p}function Ir(t,e,n){const s=[];let i=0;return t.forEach(({width:r,height:c},u)=>{let f=!1;for(n&&(i=0);!f;){const d=[];for(let m=0;ms[m]==null)?(d.forEach(m=>{s[m]=u}),f=!0):i+=1}}),[...s]}function vr(t,e,n,s,i){if(t===-1)return-1;const r=n.indexOf(t),c=e[t];switch(i){case"tl":return r;case"tr":return c?r+c.width-1:r;case"bl":return c?r+(c.height-1)*s:r;case"br":return n.lastIndexOf(t);default:return-1}}function Tr(t,e){return e.flatMap((n,s)=>t.includes(n)?[s]:[])}function Qe(t,e,n){if(typeof n=="function")return n(e);if(n)return n.includes(e);const s=t.current[e];return s?s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true":!1}function Mr(t,e={}){const n="rootStore"in t?t.rootStore:t,s=n.context.dataRef,{enabled:i=!0,event:r="click",toggle:c=!0,ignoreMouse:u=!1,stickIfOpen:f=!0,touchOpenDelay:d=0}=e,m=l.useRef(void 0),p=Zt(),b=He(),P=l.useMemo(()=>({onPointerDown(w){m.current=w.pointerType},onMouseDown(w){const x=m.current,T=w.nativeEvent,o=n.select("open");if(w.button!==0||r==="click"||Bt(x,!0)&&u)return;const R=s.current.openEvent,a=R?.type,h=n.select("domReferenceElement")!==w.currentTarget,E=o&&h||!(o&&c&&(!(R&&f)||a==="click"||a==="mousedown"));if(Tn(T.target)){const O=xe(ht,T,T.target);E&&x==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O);return}const I=w.currentTarget;p.request(()=>{const O=xe(ht,T,I);E&&x==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O)})},onClick(w){if(r==="mousedown-only")return;const x=m.current;if(r==="mousedown"&&x){m.current=void 0;return}if(Bt(x,!0)&&u)return;const T=n.select("open"),o=s.current.openEvent,R=n.select("domReferenceElement")!==w.currentTarget,a=T&&R||!(T&&c&&(!(o&&f)||vn(o))),h=xe(ht,w.nativeEvent,w.currentTarget);a&&x==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,h)}):n.setOpen(a,h)},onKeyDown(){m.current=void 0}}),[s,r,u,n,f,c,p,b,d]);return l.useMemo(()=>i?{reference:P}:en,[i,P])}const Cr="Escape";function dt(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function it(t,e){return dt(e,t===jt||t===Je,t===Fe||t===Ue)}function St(t,e,n){return dt(e,t===Je,n?t===Fe:t===Ue)||t==="Enter"||t===" "||t===""}function Er(t,e,n){return dt(e,n?t===Fe:t===Ue,t===Je)}function Ar(t,e,n,s){const i=n?t===Ue:t===Fe,r=t===jt;return e==="both"||e==="horizontal"&&s&&s>1?t===Cr:dt(e,i,r)}function Pr(t,e){const n="rootStore"in t?t.rootStore:t,s=n.useState("open"),i=n.useState("floatingElement"),r=n.useState("domReferenceElement"),c=n.context.dataRef,{listRef:u,activeIndex:f,onNavigate:d=()=>{},enabled:m=!0,selectedIndex:p=null,allowEscape:b=!1,loopFocus:P=!1,nested:w=!1,rtl:x=!1,virtual:T=!1,focusItemOnOpen:o="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:a=!0,disabledIndices:h=void 0,orientation:E="vertical",parentOrientation:I,cols:O=1,scrollItemIntoView:N=!0,itemSizes:re,dense:ae=!1,id:K,resetOnPointerLeave:W=!0,externalTree:z}=e,D=tn(i),ee=De(D),U=Mn(),te=Cn(z);Y(()=>{c.current.orientation=E},[c,E]);const v=En(r),B=l.useRef(o),S=l.useRef(p??-1),A=l.useRef(null),ie=l.useRef(!0),M=de(g=>{d(S.current===-1?null:S.current,g)}),oe=l.useRef(M),G=l.useRef(!!i),k=l.useRef(s),_=l.useRef(!1),ue=l.useRef(!1),Ie=De(h),F=De(s),fe=De(N),X=De(p),me=De(W),we=de(()=>{function g(Z){T?te?.events.emit("virtualfocus",Z):An(Z,{sync:_.current,preventScroll:!0})}const L=u.current[S.current],C=ue.current;L&&g(L),(_.current?Z=>Z():requestAnimationFrame)(()=>{const Z=u.current[S.current]||L;if(!Z)return;L||g(Z);const le=fe.current;le&&Q&&(C||!ie.current)&&Z.scrollIntoView?.(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le)})});Y(()=>{m&&(s&&i?(S.current=p??-1,B.current&&p!=null&&(ue.current=!0,M())):G.current&&(S.current=-1,oe.current()))},[m,s,i,p,M]),Y(()=>{if(m){if(!s){_.current=!1;return}if(i)if(f==null){if(_.current=!1,X.current!=null)return;if(G.current&&(S.current=-1,we()),(!k.current||!G.current)&&B.current&&(A.current!=null||B.current===!0&&A.current==null)){let g=0;const L=()=>{u.current[0]==null?(g<2&&(g?requestAnimationFrame:queueMicrotask)(L),g+=1):(S.current=A.current==null||St(A.current,E,x)||w?wt(u):Yt(u),A.current=null,M())};L()}}else Xe(u,f)||(S.current=f,we(),ue.current=!1)}},[m,s,i,f,X,w,u,E,x,M,we,Ie]),Y(()=>{if(!m||i||!te||T||!G.current)return;const g=te.nodesRef.current,L=g.find(Z=>Z.id===U)?.context?.elements.floating,C=_t(Pn(i)),$=g.some(Z=>Z.context&&Ge(Z.context.elements.floating,C));L&&!$&&ie.current&&L.focus({preventScroll:!0})},[m,i,te,U,T]),Y(()=>{oe.current=M,k.current=s,G.current=!!i}),Y(()=>{s||(A.current=null,B.current=o)},[s,o]);const pe=f!=null,Q=l.useMemo(()=>{function g(C){if(!F.current)return;const $=u.current.indexOf(C.currentTarget);$!==-1&&S.current!==$&&(S.current=$,M(C))}return{onFocus(C){_.current=!0,g(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){_.current=!0,ue.current=!1,R&&g(C)},onPointerLeave(C){if(!F.current||!ie.current||C.pointerType==="touch")return;_.current=!0;const $=C.relatedTarget;!R||u.current.includes($)||me.current&&(S.current=-1,M(C),T||ee.current?.focus({preventScroll:!0}))}}},[F,ee,R,u,M,me,T]),J=l.useCallback(()=>I??te?.nodesRef.current.find(g=>g.id===U)?.context?.dataRef?.current.orientation,[U,te,I]),ye=de(g=>{if(ie.current=!1,_.current=!0,g.which===229||!F.current&&g.currentTarget===ee.current)return;if(w&&Ar(g.key,E,x,O)){it(g.key,J())||Re(g),n.setOpen(!1,xe(xt,g.nativeEvent)),zt(r)&&(T?te?.events.emit("virtualfocus",r):r.focus());return}const L=S.current,C=wt(u,h),$=Yt(u,h);if(v||(g.key==="Home"&&(Re(g),S.current=C,M(g)),g.key==="End"&&(Re(g),S.current=$,M(g))),O>1){const Z=re||Array.from({length:u.current.length},()=>({width:1,height:1})),le=Ir(Z,O,ae),ge=le.findIndex(Se=>Se!=null&&!Qe(u,Se,h)),be=le.reduce((Se,Me,Le)=>Me!=null&&!Qe(u,Me,h)?Le:Se,-1),je=le[Sr({current:le.map(Se=>Se!=null?u.current[Se]:null)},{event:g,orientation:E,loopFocus:P,rtl:x,cols:O,disabledIndices:Tr([...(typeof h!="function"?h:null)||u.current.map((Se,Me)=>Qe(u,Me,h)?Me:void 0),void 0],le),minIndex:ge,maxIndex:be,prevIndex:vr(S.current>$?C:S.current,Z,le,O,g.key===Je?"bl":g.key===(x?Fe:Ue)?"tr":"tl"),stopEvent:!0})];if(je!=null&&(S.current=je,M(g)),E==="both")return}if(it(g.key,E)){if(Re(g),s&&!T&&_t(g.currentTarget.ownerDocument)===g.currentTarget){S.current=St(g.key,E,x)?C:$,M(g);return}St(g.key,E,x)?P?L>=$?b&&L!==u.current.length?S.current=-1:(_.current=!1,S.current=C):S.current=he(u,{startingIndex:L,disabledIndices:h}):S.current=Math.min($,he(u,{startingIndex:L,disabledIndices:h})):P?L<=C?b&&L!==-1?S.current=u.current.length:(_.current=!1,S.current=$):S.current=he(u,{startingIndex:L,decrement:!0,disabledIndices:h}):S.current=Math.max(C,he(u,{startingIndex:L,decrement:!0,disabledIndices:h})),Xe(u,S.current)&&(S.current=-1),M(g)}}),se=l.useMemo(()=>T&&s&&pe&&{"aria-activedescendant":`${K}-${f}`},[T,s,pe,K,f]),ne=l.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...v?{}:se,onKeyDown(g){if(g.key==="Tab"&&g.shiftKey&&s&&!T){const L=On(g.nativeEvent);if(L&&!Ge(ee.current,L))return;Re(g),n.setOpen(!1,xe(nn,g.nativeEvent)),zt(r)&&r.focus();return}ye(g)},onPointerMove(){ie.current=!0}}),[se,ye,ee,E,v,n,s,T,r]),Te=l.useMemo(()=>{function g(C){o==="auto"&&Nn(C.nativeEvent)&&(B.current=!T)}function L(C){B.current=o,o==="auto"&&Vn(C.nativeEvent)&&(B.current=!0)}return{onKeyDown(C){const $=n.select("open");ie.current=!1;const Z=C.key.startsWith("Arrow"),le=Er(C.key,J(),x),ge=it(C.key,E),be=(w?le:ge)||C.key==="Enter"||C.key.trim()==="";if(T&&$)return ye(C);if(!(!$&&!a&&Z)){if(be){const je=it(C.key,J());A.current=w&&je?null:C.key}if(w){le&&(Re(C),$?(S.current=wt(u,Ie.current),M(C)):n.setOpen(!0,xe(xt,C.nativeEvent,C.currentTarget)));return}ge&&(X.current!=null&&(S.current=X.current),Re(C),!$&&a?n.setOpen(!0,xe(xt,C.nativeEvent,C.currentTarget)):ye(C),$&&M(C))}},onFocus(C){n.select("open")&&!T&&(S.current=-1,M(C))},onPointerDown:L,onPointerEnter:L,onMouseDown:g,onClick:g}},[ye,Ie,o,u,w,M,n,a,E,J,x,X,T]),Ae=l.useMemo(()=>({...se,...Te}),[se,Te]);return l.useMemo(()=>m?{reference:Ae,floating:ne,item:Q,trigger:Te}:{},[m,Ae,ne,Te,Q])}function Or(t,e){const n="rootStore"in t?t.rootStore:t,s=n.useState("open"),i=n.context.dataRef,{listRef:r,activeIndex:c,onMatch:u,onTypingChange:f,enabled:d=!0,findMatch:m=null,resetMs:p=750,ignoreKeys:b=At,selectedIndex:P=null}=e,w=He(),x=l.useRef(""),T=l.useRef(P??c??-1),o=l.useRef(null);Y(()=>{s&&(w.clear(),o.current=null,x.current="")},[s,w]),Y(()=>{s&&x.current===""&&(T.current=P??c??-1)},[s,P,c]);const R=de(I=>{I?i.current.typing||(i.current.typing=I,f?.(I)):i.current.typing&&(i.current.typing=I,f?.(I))}),a=de(I=>{function O(W,z,D){const ee=m?m(z,D):z.find(U=>U?.toLocaleLowerCase().indexOf(D.toLocaleLowerCase())===0);return ee?W.indexOf(ee):-1}const N=r.current;if(x.current.length>0&&x.current[0]!==" "&&(O(N,N,x.current)===-1?R(!1):I.key===" "&&Re(I)),N==null||b.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;s&&I.key!==" "&&(Re(I),R(!0)),N.every(W=>W?W[0]?.toLocaleLowerCase()!==W[1]?.toLocaleLowerCase():!0)&&x.current===I.key&&(x.current="",T.current=o.current),x.current+=I.key,w.start(p,()=>{x.current="",T.current=o.current,R(!1)});const ae=T.current,K=O(N,[...N.slice((ae||0)+1),...N.slice(0,(ae||0)+1)],x.current);K!==-1?(u?.(K),o.current=K):I.key!==" "&&(x.current="",R(!1))}),h=l.useMemo(()=>({onKeyDown:a}),[a]),E=l.useMemo(()=>({onKeyDown:a,onKeyUp(I){I.key===" "&&R(!1)}}),[a,R]);return l.useMemo(()=>d?{reference:h,floating:E}:{},[d,h,E])}function Nr(t){const e=l.useRef(!0);e.current&&(e.current=!1,t())}const dn=l.createContext(null),pn=l.createContext(null);function ke(){const t=l.useContext(dn);if(t===null)throw new Error(ut(60));return t}function mn(){const t=l.useContext(pn);if(t===null)throw new Error(ut(61));return t}const Vr=(t,e)=>Object.is(t,e);function Ke(t,e,n){return t==null||e==null?Object.is(t,e):n(t,e)}function It(t,e,n){return!t||t.length===0?!1:t.some(s=>s===void 0?!1:Ke(s,e,n))}function Nt(t,e,n){return!t||t.length===0?-1:t.findIndex(s=>s===void 0?!1:Ke(s,e,n))}function kr(t,e,n){return t.filter(s=>!Ke(s,e,n))}function Vt(t){if(t==null)return"";if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function gn(t){return t!=null&&t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"items"in t[0]}function jr(t){if(!Array.isArray(t))return t!=null&&!("null"in t);if(gn(t)){for(const e of t)for(const n of e.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Lr(t,e){if(e&&t!=null)return e(t)??"";if(t&&typeof t=="object"){if("label"in t&&t.label!=null)return String(t.label);if("value"in t)return String(t.value)}return Vt(t)}function ze(t,e){return e&&t!=null?e(t)??"":t&&typeof t=="object"&&"value"in t&&"label"in t?Vt(t.value):Vt(t)}function hn(t,e,n){function s(){return Lr(t,n)}if(n&&t!=null)return n(t);if(t&&typeof t=="object"&&"label"in t&&t.label!=null)return t.label;if(e&&!Array.isArray(e))return e[t]??s();if(Array.isArray(e)){const i=gn(e)?e.flatMap(r=>r.items):e;if(t==null||typeof t!="object"){const r=i.find(c=>c.value===t);return r&&r.label!=null?r.label:s()}if("value"in t){const r=i.find(c=>c&&c.value===t.value);if(r&&r.label!=null)return r.label}}return s()}function Dr(t,e,n){return t.reduce((s,i,r)=>(r>0&&s.push(", "),s.push(y.jsx(l.Fragment,{children:hn(i,e,n)},r)),s),[])}const V={id:q(t=>t.id),modal:q(t=>t.modal),multiple:q(t=>t.multiple),items:q(t=>t.items),itemToStringLabel:q(t=>t.itemToStringLabel),itemToStringValue:q(t=>t.itemToStringValue),isItemEqualToValue:q(t=>t.isItemEqualToValue),value:q(t=>t.value),hasSelectedValue:q(t=>{const{value:e,multiple:n,itemToStringValue:s}=t;return e==null?!1:n&&Array.isArray(e)?e.length>0:ze(e,s)!==""}),hasNullItemLabel:q((t,e)=>e?jr(t.items):!1),open:q(t=>t.open),mounted:q(t=>t.mounted),forceMount:q(t=>t.forceMount),transitionStatus:q(t=>t.transitionStatus),openMethod:q(t=>t.openMethod),activeIndex:q(t=>t.activeIndex),selectedIndex:q(t=>t.selectedIndex),isActive:q((t,e)=>t.activeIndex===e),isSelected:q((t,e,n)=>{const s=t.isItemEqualToValue,i=t.value;return t.multiple?Array.isArray(i)&&i.some(r=>Ke(r,n,s)):t.selectedIndex===e&&t.selectedIndex!==null?!0:Ke(i,n,s)}),isSelectedByFocus:q((t,e)=>t.selectedIndex===e),popupProps:q(t=>t.popupProps),triggerProps:q(t=>t.triggerProps),triggerElement:q(t=>t.triggerElement),positionerElement:q(t=>t.positionerElement),listElement:q(t=>t.listElement),scrollUpArrowVisible:q(t=>t.scrollUpArrowVisible),scrollDownArrowVisible:q(t=>t.scrollDownArrowVisible),hasScrollArrows:q(t=>t.hasScrollArrows)};function Hr(t,e){const n=l.useRef(t),s=de(e);Y(()=>{n.current!==t&&s(n.current)},[t,s]),Y(()=>{n.current=t},[t])}function Fr(t){const{id:e,value:n,defaultValue:s=null,onValueChange:i,open:r,defaultOpen:c=!1,onOpenChange:u,name:f,disabled:d=!1,readOnly:m=!1,required:p=!1,modal:b=!0,actionsRef:P,inputRef:w,onOpenChangeComplete:x,items:T,multiple:o=!1,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:h=Vr,highlightItemOnHover:E=!0,children:I}=t,{clearErrors:O}=cr(),{setDirty:N,setTouched:re,setFocused:ae,shouldValidateOnChange:K,validityData:W,setFilled:z,name:D,disabled:ee,validation:U,validationMode:te}=an(),v=un({id:e}),B=ee||d,S=D??f,[A,ie]=$t({controlled:n,default:o?s??At:s,name:"Select",state:"value"}),[M,oe]=$t({controlled:r,default:c,name:"Select",state:"open"}),G=l.useRef([]),k=l.useRef([]),_=l.useRef(null),ue=l.useRef(null),Ie=l.useRef(0),F=l.useRef(null),fe=l.useRef([]),X=l.useRef(!1),me=l.useRef(!1),we=l.useRef(null),pe=l.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Q=l.useRef(!1),{mounted:J,setMounted:ye,transitionStatus:se}=Lt(M),{openMethod:ne,triggerProps:Te,reset:Ae}=kn(M),g=Pt(()=>new jn({id:v,modal:b,multiple:o,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:h,value:A,open:M,mounted:J,transitionStatus:se,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,L=j(g,V.activeIndex),C=j(g,V.selectedIndex),$=j(g,V.triggerElement),Z=j(g,V.positionerElement),le=l.useMemo(()=>o&&Array.isArray(A)&&A.length===0?"":ze(A,a),[o,A,a]),ge=l.useMemo(()=>o&&Array.isArray(A)?A.map(H=>ze(H,a)):ze(A,a),[o,A,a]),be=De(g.state.triggerElement);ar({id:v,commit:U.commit,value:A,controlRef:be,name:S,getValue:()=>ge});const je=l.useRef(A);Y(()=>{A!==je.current&&g.set("forceMount",!0)},[g,A]),Y(()=>{z(o?Array.isArray(A)&&A.length>0:A!=null)},[o,A,z]),Y(function(){if(M)return;const ce=fe.current;if(o){const Ee=Array.isArray(A)?A:[];if(Ee.length===0){g.set("selectedIndex",null);return}const ve=Ee[Ee.length-1],rt=Nt(ce,ve,h);g.set("selectedIndex",rt===-1?null:rt);return}const Ce=Nt(ce,A,h);g.set("selectedIndex",Ce===-1?null:Ce)},[o,M,A,fe,h,g]),Hr(A,()=>{O(S),N(A!==W.initialValue),K()?U.commit(A):U.commit(A,!0)});const Se=de((H,ce)=>{if(u?.(H,ce),!ce.isCanceled&&(oe(H),!H&&(ce.reason===nn||ce.reason===Ln)&&(re(!0),ae(!1),te==="onBlur"&&U.commit(A)),!H&&g.state.activeIndex!==null)){const Ce=G.current[g.state.activeIndex];queueMicrotask(()=>{Ce?.setAttribute("tabindex","-1")})}}),Me=de(()=>{ye(!1),g.set("activeIndex",null),Ae(),x?.(!1)});ft({enabled:!P,open:M,ref:_,onComplete(){M||Me()}}),l.useImperativeHandle(P,()=>({unmount:Me}),[Me]);const Le=de((H,ce)=>{i?.(H,ce),!ce.isCanceled&&ie(H)}),Pe=de(()=>{const H=g.state.listElement||_.current;if(!H)return;const ce=H.scrollTop,Ce=H.scrollTop+H.clientHeight,Ee=ce>1,ve=Cern(Be(),Te,v?{id:v}:en),[Be,Te,v]);Nr(()=>{g.update({popupProps:_e(),triggerProps:Ye})}),Y(()=>{g.update({id:v,modal:b,multiple:o,value:A,open:M,mounted:J,transitionStatus:se,popupProps:_e(),triggerProps:Ye,items:T,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:h,openMethod:ne})},[g,v,b,o,A,M,J,se,_e,Ye,T,R,a,h,ne]);const tt=l.useMemo(()=>({store:g,name:S,required:p,disabled:B,readOnly:m,multiple:o,itemToStringLabel:R,itemToStringValue:a,highlightItemOnHover:E,setValue:Le,setOpen:Se,listRef:G,popupRef:_,scrollHandlerRef:ue,handleScrollArrowVisibility:Pe,scrollArrowsMountedCountRef:Ie,getItemProps:et,events:Oe.context.events,valueRef:F,valuesRef:fe,labelsRef:k,typingRef:X,selectionRef:pe,selectedItemTextRef:we,validation:U,onOpenChangeComplete:x,keyboardActiveRef:me,alignItemWithTriggerActiveRef:Q,initialValueRef:je}),[g,S,p,B,m,o,R,a,E,Le,Se,et,Oe.context.events,U,x,Pe]),nt=sn(w,U.inputRef),mt=o&&Array.isArray(A)&&A.length>0,gt=l.useMemo(()=>!o||!Array.isArray(A)||!S?null:A.map(H=>{const ce=ze(H,a);return y.jsx("input",{type:"hidden",name:S,value:ce},ce)}),[o,A,S,a]);return y.jsx(dn.Provider,{value:tt,children:y.jsxs(pn.Provider,{value:Oe,children:[I,y.jsx("input",{...U.getInputValidationProps({onFocus(){g.state.triggerElement?.focus({focusVisible:!0})},onChange(H){if(H.nativeEvent.defaultPrevented)return;const ce=H.target.value,Ce=xe(Dt,H.nativeEvent);function Ee(){if(o)return;const ve=fe.current.find(rt=>ze(rt,a).toLowerCase()===ce.toLowerCase());ve!=null&&(N(ve!==W.initialValue),Le(ve,Ce),K()&&U.commit(ve))}g.set("forceMount",!0),queueMicrotask(Ee)}}),name:o?void 0:S,value:le,disabled:B,required:p&&!mt,readOnly:m,ref:nt,style:S?Un:Bn,tabIndex:-1,"aria-hidden":!0}),gt]})})}function Ur(t){const e=t.getBoundingClientRect(),n=window.getComputedStyle(t,"::before"),s=window.getComputedStyle(t,"::after");if(!(n.content!=="none"||s.content!=="none"))return e;const r=parseFloat(n.width)||0,c=parseFloat(n.height)||0,u=parseFloat(s.width)||0,f=parseFloat(s.height)||0,d=Math.max(e.width,r,u),m=Math.max(e.height,c,f),p=d-e.width,b=m-e.height;return{left:e.left-p/2,right:e.right+p/2,top:e.top-b/2,bottom:e.bottom+b/2}}const lt=2,Br=400,Gt=200,_r={...zn,...fr,value:()=>null},zr=l.forwardRef(function(e,n){const{render:s,className:i,id:r,disabled:c=!1,nativeButton:u=!0,...f}=e,{setTouched:d,setFocused:m,validationMode:p,state:b,disabled:P}=an(),{labelId:w}=ur(),{store:x,setOpen:T,selectionRef:o,validation:R,readOnly:a,required:h,alignItemWithTriggerActiveRef:E,disabled:I,keyboardActiveRef:O}=ke(),N=P||I||c,re=j(x,V.open),ae=j(x,V.value),K=j(x,V.triggerProps),W=j(x,V.positionerElement),z=j(x,V.listElement),D=j(x,V.id),ee=j(x,V.hasSelectedValue),U=!ee&&re,te=j(x,V.hasNullItemLabel,U),v=r??D;un({id:v});const B=De(W),S=l.useRef(null),{getButtonProps:A,buttonRef:ie}=on({disabled:N,native:u}),M=de(X=>{x.set("triggerElement",X)}),oe=sn(n,S,ie,M),G=He(),k=He(),_=He(),ue=He();l.useEffect(()=>{if(re)return!(ee||te)?_.start(Br,()=>{o.current.allowUnselectedMouseUp=!0,o.current.allowSelectedMouseUp=!0}):ue.start(Gt,()=>{o.current.allowUnselectedMouseUp=!0,_.start(Gt,()=>{o.current.allowSelectedMouseUp=!0})}),()=>{_.clear(),ue.clear()};o.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},k.clear()},[re,ee,te,o,k,_,ue]);const Ie=l.useMemo(()=>z?.id??tn(W)?.id,[z,W]),F=rn(K,{id:v,role:"combobox","aria-expanded":re?"true":"false","aria-haspopup":"listbox","aria-controls":re?Ie:void 0,"aria-labelledby":w,"aria-readonly":a||void 0,"aria-required":h||void 0,tabIndex:N?-1:0,ref:oe,onFocus(X){m(!0),re&&E.current&&T(!1,xe(Dt,X.nativeEvent)),G.start(0,()=>{x.set("forceMount",!0)})},onBlur(X){Ge(W,X.relatedTarget)||(d(!0),m(!1),p==="onBlur"&&R.commit(ae))},onPointerMove(){O.current=!1},onKeyDown(){O.current=!0},onMouseDown(X){if(re)return;const me=Ot(X.currentTarget);function we(pe){if(!S.current)return;const Q=pe.target;if(Ge(S.current,Q)||Ge(B.current,Q)||Q===S.current)return;const J=Ur(S.current);pe.clientX>=J.left-lt&&pe.clientX<=J.right+lt&&pe.clientY>=J.top-lt&&pe.clientY<=J.bottom+lt||T(!1,xe(_n,pe))}k.start(0,()=>{me.addEventListener("mouseup",we,{once:!0})})}},R.getValidationProps,f,A);F.role="combobox";const fe=l.useMemo(()=>({...b,open:re,disabled:N,value:ae,readOnly:a,placeholder:!ee}),[b,re,N,ae,a,ee]);return Ve("button",e,{ref:[n,S],state:fe,stateAttributesMapping:_r,props:F})}),Kr={value:()=>null},Wr=l.forwardRef(function(e,n){const{className:s,render:i,children:r,placeholder:c,...u}=e,{store:f,valueRef:d}=ke(),m=j(f,V.value),p=j(f,V.items),b=j(f,V.itemToStringLabel),P=j(f,V.hasSelectedValue),w=!P&&c!=null&&r==null,x=j(f,V.hasNullItemLabel,w),T=l.useMemo(()=>({value:m,placeholder:!P}),[m,P]);let o=null;return typeof r=="function"?o=r(m):r!=null?o=r:!P&&c!=null&&!x?o=c:Array.isArray(m)?o=Dr(m,p,b):o=hn(m,p,b),Ve("span",e,{state:T,ref:[n,d],props:[{children:o},u],stateAttributesMapping:Kr})}),$r=l.forwardRef(function(e,n){const{className:s,render:i,...r}=e,{store:c}=ke(),u=j(c,V.open),f=l.useMemo(()=>({open:u}),[u]);return Ve("span",e,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:Kn})}),qr=l.createContext(void 0),Yr=l.forwardRef(function(e,n){const{store:s}=ke(),i=j(s,V.mounted),r=j(s,V.forceMount);return i||r?y.jsx(qr.Provider,{value:!0,children:y.jsx(Wn,{ref:n,...e})}):null}),xn=l.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Gr(){return l.useContext(xn)}function Xr(t){const{children:e,elementsRef:n,labelsRef:s,onMapChange:i}=t,r=de(i),c=l.useRef(0),u=Pt(Jr).current,f=Pt(Qr).current,[d,m]=l.useState(0),p=l.useRef(d),b=de((o,R)=>{f.set(o,R??null),p.current+=1,m(p.current)}),P=de(o=>{f.delete(o),p.current+=1,m(p.current)}),w=l.useMemo(()=>{const o=new Map;return Array.from(f.keys()).filter(a=>a.isConnected).sort(Zr).forEach((a,h)=>{const E=f.get(a)??{};o.set(a,{...E,index:h})}),o},[f,d]);Y(()=>{if(typeof MutationObserver!="function"||w.size===0)return;const o=new MutationObserver(R=>{const a=new Set,h=E=>a.has(E)?a.delete(E):a.add(E);R.forEach(E=>{E.removedNodes.forEach(h),E.addedNodes.forEach(h)}),a.size===0&&(p.current+=1,m(p.current))});return w.forEach((R,a)=>{a.parentElement&&o.observe(a.parentElement,{childList:!0})}),()=>{o.disconnect()}},[w]),Y(()=>{p.current===d&&(n.current.length!==w.size&&(n.current.length=w.size),s&&s.current.length!==w.size&&(s.current.length=w.size),c.current=w.size),r(w)},[r,w,n,s,d]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{s&&(s.current=[])},[s]);const x=de(o=>(u.add(o),()=>{u.delete(o)}));Y(()=>{u.forEach(o=>o(w))},[u,w]);const T=l.useMemo(()=>({register:b,unregister:P,subscribeMapChange:x,elementsRef:n,labelsRef:s,nextIndexRef:c}),[b,P,x,n,s,c]);return y.jsx(xn.Provider,{value:T,children:e})}function Qr(){return new Map}function Jr(){return new Set}function Zr(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const yn=l.createContext(void 0);function Ht(){const t=l.useContext(yn);if(!t)throw new Error(ut(59));return t}function at(t,e){t&&Object.assign(t.style,e)}const bn={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},es={position:"fixed"},ts=l.forwardRef(function(e,n){const{anchor:s,positionMethod:i="absolute",className:r,render:c,side:u="bottom",align:f="center",sideOffset:d=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:b,arrowPadding:P=5,sticky:w=!1,disableAnchorTracking:x,alignItemWithTrigger:T=!0,collisionAvoidance:o=$n,...R}=e,{store:a,listRef:h,labelsRef:E,alignItemWithTriggerActiveRef:I,selectedItemTextRef:O,valuesRef:N,initialValueRef:re,popupRef:ae,setValue:K}=ke(),W=mn(),z=j(a,V.open),D=j(a,V.mounted),ee=j(a,V.modal),U=j(a,V.value),te=j(a,V.openMethod),v=j(a,V.positionerElement),B=j(a,V.triggerElement),S=j(a,V.isItemEqualToValue),A=l.useRef(null),ie=l.useRef(null),[M,oe]=l.useState(T),G=D&&M&&te!=="touch";!D&&M!==T&&oe(T),Y(()=>{D||(V.scrollUpArrowVisible(a.state)&&a.set("scrollUpArrowVisible",!1),V.scrollDownArrowVisible(a.state)&&a.set("scrollDownArrowVisible",!1))},[a,D]),l.useImperativeHandle(I,()=>G),qn((G||ee)&&z&&te!=="touch",B);const k=Yn({anchor:s,floatingRootContext:W,positionMethod:i,mounted:D,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:P,collisionBoundary:p,collisionPadding:b,sticky:w,disableAnchorTracking:x??G,collisionAvoidance:o,keepMounted:!0}),_=G?"none":k.side,ue=G?es:k.positionerStyles,Ie=l.useMemo(()=>{const Q={};return z||(Q.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...ue,...Q}}},[z,D,ue]),F=l.useMemo(()=>({open:z,side:_,align:k.align,anchorHidden:k.anchorHidden}),[z,_,k.align,k.anchorHidden]),fe=de(Q=>{a.set("positionerElement",Q)}),X=Ve("div",e,{ref:[n,fe],state:F,stateAttributesMapping:ln,props:[Ie,R]}),me=l.useRef(0),we=de(Q=>{if(Q.size===0&&me.current===0||N.current.length===0)return;const J=me.current;if(me.current=Q.size,Q.size===J)return;const ye=xe(Dt);if(J!==0&&!a.state.multiple&&U!==null&&Nt(N.current,U,S)===-1){const ne=re.current,Ae=ne!=null&&It(N.current,ne,S)?ne:null;K(Ae,ye),Ae===null&&(a.set("selectedIndex",null),O.current=null)}if(J!==0&&a.state.multiple&&Array.isArray(U)){const se=U.filter(ne=>It(N.current,ne,S));(se.length!==U.length||se.some(ne=>!It(U,ne,S)))&&(K(se,ye),se.length===0&&(a.set("selectedIndex",null),O.current=null))}if(z&&G){a.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const se={height:""};at(v,se),at(ae.current,se)}}),pe=l.useMemo(()=>({...k,side:_,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:oe,scrollUpArrowRef:A,scrollDownArrowRef:ie}),[k,_,G,oe]);return y.jsx(Xr,{elementsRef:h,labelsRef:E,onMapChange:we,children:y.jsxs(yn.Provider,{value:pe,children:[D&&ee&&y.jsx(Gn,{inert:Xn(!z),cutout:B}),X]})})});function Rn(t){const e=t.currentTarget.getBoundingClientRect();return e.top+1<=t.clientY&&t.clientY<=e.bottom-1&&e.left+1<=t.clientX&&t.clientX<=e.right-1}const ct="base-ui-disable-scrollbar",kt={className:ct,getElement(t){return y.jsx("style",{nonce:t,href:ct,precedence:"base-ui:low",children:`.${ct}{scrollbar-width:none}.${ct}::-webkit-scrollbar{display:none}`})}},ns=l.createContext(void 0);function rs(t){return l.useContext(ns)}function ss(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const os=l.createContext(void 0),is={disableStyleElements:!1};function ls(){return l.useContext(os)??is}const cs={...ln,...cn},as=l.forwardRef(function(e,n){const{render:s,className:i,...r}=e,{store:c,popupRef:u,onOpenChangeComplete:f,setOpen:d,valueRef:m,selectedItemTextRef:p,keyboardActiveRef:b,multiple:P,handleScrollArrowVisibility:w,scrollHandlerRef:x,highlightItemOnHover:T}=ke(),{side:o,align:R,alignItemWithTriggerActive:a,setControlledAlignItemWithTrigger:h,scrollDownArrowRef:E,scrollUpArrowRef:I}=Ht(),O=rs()!=null,N=mn(),{nonce:re,disableStyleElements:ae}=ls(),K=He(),W=j(c,V.id),z=j(c,V.open),D=j(c,V.mounted),ee=j(c,V.popupProps),U=j(c,V.transitionStatus),te=j(c,V.triggerElement),v=j(c,V.positionerElement),B=j(c,V.listElement),S=l.useRef(0),A=l.useRef(!1),ie=l.useRef(0),M=l.useRef(!1),oe=l.useRef({}),G=Zt(),k=de(F=>{if(!v||!u.current||!M.current)return;if(A.current||!a){w();return}const fe=v.style.top==="0px",X=v.style.bottom==="0px",me=v.getBoundingClientRect().height,we=Ot(v),pe=getComputedStyle(v),Q=parseFloat(pe.marginTop),J=parseFloat(pe.marginBottom),ye=Xt(getComputedStyle(u.current)),se=we.documentElement.clientHeight-Q-J,ne=F.scrollTop,Te=F.scrollHeight,Ae=F.clientHeight,g=Te-Ae;let L=0,C=null,$=!1;if(fe){const Z=g-ne,le=me+Z,ge=Math.min(le,se);L=ge,ge!==se?C=g:$=!0}else if(X){const Z=ne-0,le=me+Z,ge=Math.min(le,se),be=le-se;L=ge,ge!==se?C=0:($=!0,ne=ye)&&(A.current=!0),w()});l.useImperativeHandle(x,()=>k,[k]),ft({open:z,ref:u,onComplete(){z&&f?.(!0)}});const _=l.useMemo(()=>({open:z,transitionStatus:U,side:o,align:R}),[z,U,o,R]);Y(()=>{!v||!u.current||Object.keys(oe.current).length||(oe.current={top:v.style.top||"0",left:v.style.left||"0",right:v.style.right,height:v.style.height,bottom:v.style.bottom,minHeight:v.style.minHeight,maxHeight:v.style.maxHeight,marginTop:v.style.marginTop,marginBottom:v.style.marginBottom})},[u,v]),Y(()=>{z||a||(M.current=!1,A.current=!1,S.current=0,ie.current=0,at(v,oe.current))},[z,a,v,u]),Y(()=>{const F=u.current;if(!(!z||!te||!v||!F||c.state.transitionStatus==="ending")){if(!a){M.current=!0,G.request(w),F.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const fe=fs(F);F.style.removeProperty("--transform-origin");try{const X=getComputedStyle(v),me=getComputedStyle(F),we=Ot(te),pe=Kt(v),Q=te.getBoundingClientRect(),J=v.getBoundingClientRect(),ye=Q.left,se=Q.height,ne=B||F,Te=ne.scrollHeight,Ae=parseFloat(me.borderBottomWidth),g=parseFloat(X.marginTop)||10,L=parseFloat(X.marginBottom)||10,C=parseFloat(X.minHeight)||100,$=Xt(me),Z=5,le=5,ge=20,be=we.documentElement.clientHeight-g-L,je=we.documentElement.clientWidth,Se=be-Q.bottom+se,Me=p.current,Le=m.current;let Pe,Oe=0,Ze=0;if(Me&&Le){const H=Le.getBoundingClientRect();Pe=Me.getBoundingClientRect();const ce=H.left-ye,Ce=Pe.left-J.left,Ee=H.top-Q.top+H.height/2,ve=Pe.top-J.top+Pe.height/2;Oe=ce-Ce,Ze=ve-Ee}const qe=Se+Ze+L+Ae;let Ne=Math.min(be,qe);const pt=be-g-L,Be=qe-Ne,_e=Math.max(Z,ye+Oe),et=je-le,Ye=Math.max(0,_e+J.width-et);v.style.left=`${_e-Ye}px`,v.style.height=`${Ne}px`,v.style.maxHeight="auto",v.style.marginTop=`${g}px`,v.style.marginBottom=`${L}px`,F.style.height="100%";const tt=ne.scrollHeight-ne.clientHeight,nt=Be>=tt;nt&&(Ne=Math.min(be,J.height)-(Be-tt));const mt=Q.topbe-ge||Neh(!1));return}if(nt){const H=Math.max(0,be-qe);v.style.top=J.height>=pt?"0":`${H}px`,v.style.height=`${Ne}px`,ne.scrollTop=ne.scrollHeight-ne.clientHeight,S.current=Math.max(C,Ne)}else v.style.bottom="0",S.current=Math.max(C,Ne),ne.scrollTop=Be;if(Pe){const H=J.top,ce=J.height,Ce=Pe.top+Pe.height/2,Ee=ce>0?(Ce-H)/ce*100:50,ve=ss(Ee,0,100);F.style.setProperty("--transform-origin",`50% ${ve}%`)}(S.current===be||Ne>=$)&&(A.current=!0),w(),setTimeout(()=>{M.current=!0})}finally{fe()}})}},[c,z,v,te,m,p,u,w,a,h,G,E,I,B]),l.useEffect(()=>{if(!a||!v||!z)return;const F=Kt(v);function fe(X){d(!1,xe(er,X))}return F.addEventListener("resize",fe),()=>{F.removeEventListener("resize",fe)}},[d,a,v,z]);const ue={...B?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":P||void 0,id:`${W}-list`},onKeyDown(F){b.current=!0,O&&nr.has(F.key)&&F.stopPropagation()},onMouseMove(){b.current=!1},onPointerLeave(F){if(!T||Rn(F)||F.pointerType==="touch")return;const fe=F.currentTarget;K.start(0,()=>{c.set("activeIndex",null),fe.focus({preventScroll:!0})})},onScroll(F){B||x.current?.(F.currentTarget)},...a&&{style:B?{height:"100%"}:bn}},Ie=Ve("div",e,{ref:[n,u],state:_,stateAttributesMapping:cs,props:[ee,ue,tr(U),{className:!B&&a?kt.className:void 0},r]});return y.jsxs(l.Fragment,{children:[!ae&&kt.getElement(re),y.jsx(Zn,{context:N,modal:!1,disabled:!D,restoreFocus:!0,children:Ie})]})});function Xt(t){const e=t.maxHeight||"";return e.endsWith("px")&&parseFloat(e)||1/0}const Qt={transform:"none",scale:"1",translate:"0 0"};function us(t,e,n){n?t.setProperty(e,n):t.removeProperty(e)}function fs(t){const{style:e}=t,n={},s=Object.keys(Qt);for(const i of s)n[i]=e.getPropertyValue(i),e.setProperty(i,Qt[i]);return()=>{for(const i of s)us(e,i,n[i])}}const ds=l.forwardRef(function(e,n){const{className:s,render:i,...r}=e,{store:c,scrollHandlerRef:u}=ke(),{alignItemWithTriggerActive:f}=Ht(),d=j(c,V.hasScrollArrows),m=j(c,V.openMethod),p=j(c,V.multiple),P={id:`${j(c,V.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(x){u.current?.(x.currentTarget)},...f&&{style:bn},className:d&&m!=="touch"?kt.className:void 0},w=de(x=>{c.set("listElement",x)});return Ve("div",e,{ref:[n,w],props:[P,r]})});let wn=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function ps(t={}){const{label:e,metadata:n,textRef:s,indexGuessBehavior:i,index:r}=t,{register:c,unregister:u,subscribeMapChange:f,elementsRef:d,labelsRef:m,nextIndexRef:p}=Gr(),b=l.useRef(-1),[P,w]=l.useState(r??(i===wn.GuessFromOrder?()=>{if(b.current===-1){const o=p.current;p.current+=1,b.current=o}return b.current}:-1)),x=l.useRef(null),T=l.useCallback(o=>{if(x.current=o,P!==-1&&o!==null&&(d.current[P]=o,m)){const R=e!==void 0;m.current[P]=R?e:s?.current?.textContent??o.textContent}},[P,d,m,e,s]);return Y(()=>{if(r!=null)return;const o=x.current;if(o)return c(o,n),()=>{u(o)}},[r,c,u,n]),Y(()=>{if(r==null)return f(o=>{const R=x.current?o.get(x.current)?.index:null;R!=null&&w(R)})},[r,f,w]),l.useMemo(()=>({ref:T,index:P}),[P,T])}const Sn=l.createContext(void 0);function Ft(){const t=l.useContext(Sn);if(!t)throw new Error(ut(57));return t}const ms=l.memo(l.forwardRef(function(e,n){const{render:s,className:i,value:r=null,label:c,disabled:u=!1,nativeButton:f=!1,...d}=e,m=l.useRef(null),p=ps({label:c,textRef:m,indexGuessBehavior:wn.GuessFromOrder}),{store:b,getItemProps:P,setOpen:w,setValue:x,selectionRef:T,typingRef:o,valuesRef:R,keyboardActiveRef:a,multiple:h,highlightItemOnHover:E}=ke(),I=He(),O=j(b,V.isActive,p.index),N=j(b,V.isSelected,p.index,r),re=j(b,V.isSelectedByFocus,p.index),ae=j(b,V.isItemEqualToValue),K=p.index,W=K!==-1,z=l.useRef(null),D=De(K);Y(()=>{if(!W)return;const k=R.current;return k[K]=r,()=>{delete k[K]}},[W,K,r,R]),Y(()=>{if(!W)return;const k=b.state.value;let _=k;h&&Array.isArray(k)&&k.length>0&&(_=k[k.length-1]),_!==void 0&&Ke(_,r,ae)&&b.set("selectedIndex",K)},[W,K,h,ae,b,r]);const ee=l.useMemo(()=>({disabled:u,selected:N,highlighted:O}),[u,N,O]),U=P({active:O,selected:N});U.onFocus=void 0,U.id=void 0;const te=l.useRef(null),v=l.useRef("mouse"),B=l.useRef(!1),{getButtonProps:S,buttonRef:A}=on({disabled:u,focusableWhenDisabled:!0,native:f});function ie(k){const _=b.state.value;if(h){const ue=Array.isArray(_)?_:[],Ie=N?kr(ue,r,ae):[...ue,r];x(Ie,xe(yt,k))}else x(r,xe(yt,k)),w(!1,xe(yt,k))}const M={role:"option","aria-selected":N,tabIndex:O?0:-1,onFocus(){b.set("activeIndex",K)},onMouseEnter(){!a.current&&b.state.selectedIndex===null&&b.set("activeIndex",K)},onMouseMove(){E&&b.set("activeIndex",K)},onMouseLeave(k){!E||a.current||Rn(k)||I.start(0,()=>{b.state.activeIndex===K&&b.set("activeIndex",null)})},onTouchStart(){T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(k){te.current=k.key,b.set("activeIndex",K)},onClick(k){B.current=!1,!(k.type==="keydown"&&te.current===null)&&(u||te.current===" "&&o.current||v.current!=="touch"&&!O||(te.current=null,ie(k.nativeEvent)))},onPointerEnter(k){v.current=k.pointerType},onPointerDown(k){v.current=k.pointerType,B.current=!0},onMouseUp(k){if(u)return;if(B.current){B.current=!1;return}const _=!T.current.allowSelectedMouseUp&&N,ue=!T.current.allowUnselectedMouseUp&&!N;_||ue||v.current!=="touch"&&!O||ie(k.nativeEvent)}},oe=Ve("div",e,{ref:[A,n,p.ref,z],state:ee,props:[U,M,d,S]}),G=l.useMemo(()=>({selected:N,indexRef:D,textRef:m,selectedByFocus:re,hasRegistered:W}),[N,D,m,re,W]);return y.jsx(Sn.Provider,{value:G,children:oe})})),gs=l.forwardRef(function(e,n){const s=e.keepMounted??!1,{selected:i}=Ft();return s||i?y.jsx(hs,{...e,ref:n}):null}),hs=l.memo(l.forwardRef((t,e)=>{const{render:n,className:s,keepMounted:i,...r}=t,{selected:c}=Ft(),u=l.useRef(null),{transitionStatus:f,setMounted:d}=Lt(c),m=l.useMemo(()=>({selected:c,transitionStatus:f}),[c,f]),p=Ve("span",t,{ref:[e,u],state:m,props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:cn});return ft({open:c,ref:u,onComplete(){c||d(!1)}}),p})),xs=l.memo(l.forwardRef(function(e,n){const{indexRef:s,textRef:i,selectedByFocus:r,hasRegistered:c}=Ft(),{selectedItemTextRef:u}=ke(),{className:f,render:d,...m}=e,p=l.useCallback(P=>{if(!P||!c)return;const w=u.current===null||!u.current.isConnected;(r||w&&s.current===0)&&(u.current=P)},[u,s,r,c]);return Ve("div",e,{ref:[p,n,i],props:m})})),In=l.forwardRef(function(e,n){const{render:s,className:i,direction:r,keepMounted:c=!1,...u}=e,{store:f,popupRef:d,listRef:m,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:b}=ke(),{side:P,scrollDownArrowRef:w,scrollUpArrowRef:x}=Ht(),T=r==="up"?V.scrollUpArrowVisible:V.scrollDownArrowVisible,o=j(f,T),R=j(f,V.openMethod),a=o&&R!=="touch",h=He(),E=r==="up"?x:w,{transitionStatus:I,setMounted:O}=Lt(a);Y(()=>(b.current+=1,f.state.hasScrollArrows||f.set("hasScrollArrows",!0),()=>{b.current=Math.max(0,b.current-1),b.current===0&&f.state.hasScrollArrows&&f.set("hasScrollArrows",!1)}),[f,b]),ft({open:a,ref:E,onComplete(){a||O(!1)}});const N=l.useMemo(()=>({direction:r,visible:a,side:P,transitionStatus:I}),[r,a,P,I]),ae=Ve("div",e,{ref:[n,E],state:N,props:[{"aria-hidden":!0,children:r==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(W){if(W.movementX===0&&W.movementY===0||h.isStarted())return;f.set("activeIndex",null);function z(){const D=f.state.listElement??d.current;if(!D)return;f.set("activeIndex",null),p();const ee=D.scrollTop===0,U=Math.round(D.scrollTop+D.clientHeight)>=D.scrollHeight;if(m.current.length===0&&(r==="up"?f.set("scrollUpArrowVisible",!ee):f.set("scrollDownArrowVisible",!U)),r==="up"&&ee||r==="down"&&U){h.clear();return}if((f.state.listElement||d.current)&&m.current&&m.current.length>0){const v=m.current,B=E.current?.offsetHeight||0;if(r==="up"){let S=0;const A=D.scrollTop+B;for(let M=0;M=A){S=M;break}}const ie=Math.max(0,S-1);if(ieA){S=Math.max(0,M-1);break}}const ie=Math.min(v.length-1,S+1);if(ie>S){const M=v[ie];M&&(D.scrollTop=M.offsetTop+M.offsetHeight-D.clientHeight+B)}else D.scrollTop=D.scrollHeight-D.clientHeight}}h.start(40,z)}h.start(40,z)},onMouseLeave(){h.clear()}},u]});return a||c?ae:null}),ys=l.forwardRef(function(e,n){return y.jsx(In,{...e,ref:n,direction:"down"})}),bs=l.forwardRef(function(e,n){return y.jsx(In,{...e,ref:n,direction:"up"})}),vt=Fr;function Tt(t){const e=We.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=$e("flex flex-1 text-left",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=y.jsx(Wr,{className:i,"data-slot":"select-value",...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function Mt(t){const e=We.c(15);let n,s,i,r,c;e[0]!==t?({className:s,size:c,id:i,children:n,...r}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i,e[4]=r,e[5]=c):(n=e[1],s=e[2],i=e[3],r=e[4],c=e[5]);const u=c===void 0?"default":c;let f;e[6]!==s?(f=$e("flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed outline-none transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=default]:h-7 data-[size=sm]:h-6 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0",s),e[6]=s,e[7]=f):f=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=y.jsx($r,{render:y.jsx(fn,{className:"pointer-events-none size-3.5 text-muted-foreground"})}),e[8]=d):d=e[8];let m;return e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==u||e[13]!==f?(m=y.jsxs(zr,{className:f,"data-size":u,"data-slot":"select-trigger",id:i,...r,children:[n,d]}),e[9]=n,e[10]=i,e[11]=r,e[12]=u,e[13]=f,e[14]=m):m=e[14],m}function Ct(t){const e=We.c(26);let n,s,i,r,c,u,f,d;e[0]!==t?({className:s,children:n,side:r,sideOffset:c,align:u,alignOffset:f,alignItemWithTrigger:d,...i}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i,e[4]=r,e[5]=c,e[6]=u,e[7]=f,e[8]=d):(n=e[1],s=e[2],i=e[3],r=e[4],c=e[5],u=e[6],f=e[7],d=e[8]);const m=r===void 0?"bottom":r,p=c===void 0?4:c,b=u===void 0?"center":u,P=f===void 0?0:f,w=d===void 0?!0:d;let x;e[9]!==s?(x=$e("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",s),e[9]=s,e[10]=x):x=e[10];let T;e[11]===Symbol.for("react.memo_cache_sentinel")?(T=y.jsx(Rs,{}),e[11]=T):T=e[11];let o;e[12]!==n?(o=y.jsx(ds,{children:n}),e[12]=n,e[13]=o):o=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=y.jsx(ws,{}),e[14]=R):R=e[14];let a;e[15]!==i||e[16]!==x||e[17]!==o?(a=y.jsxs(as,{className:x,"data-slot":"select-content",...i,children:[T,o,R]}),e[15]=i,e[16]=x,e[17]=o,e[18]=a):a=e[18];let h;return e[19]!==b||e[20]!==w||e[21]!==P||e[22]!==m||e[23]!==p||e[24]!==a?(h=y.jsx(Yr,{children:y.jsx(ts,{align:b,alignItemWithTrigger:w,alignOffset:P,className:"isolate z-50",side:m,sideOffset:p,children:a})}),e[19]=b,e[20]=w,e[21]=P,e[22]=m,e[23]=p,e[24]=a,e[25]=h):h=e[25],h}function Et(t){const e=We.c(13);let n,s,i;e[0]!==t?({className:s,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==s?(r=$e("relative flex min-h-7 w-full cursor-default select-none items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",s),e[4]=s,e[5]=r):r=e[5];let c;e[6]!==n?(c=y.jsx(xs,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),e[6]=n,e[7]=c):c=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=y.jsx(gs,{render:y.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:y.jsx(xr,{className:"pointer-events-none"})}),e[8]=u):u=e[8];let f;return e[9]!==i||e[10]!==r||e[11]!==c?(f=y.jsxs(ms,{className:r,"data-slot":"select-item",...i,children:[c,u]}),e[9]=i,e[10]=r,e[11]=c,e[12]=f):f=e[12],f}function Rs(t){const e=We.c(9);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=$e("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=y.jsx(wr,{}),e[5]=r):r=e[5];let c;return e[6]!==s||e[7]!==i?(c=y.jsx(bs,{className:i,"data-slot":"select-scroll-up-button",...s,children:r}),e[6]=s,e[7]=i,e[8]=c):c=e[8],c}function ws(t){const e=We.c(9);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=$e("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=y.jsx(fn,{}),e[5]=r):r=e[5];let c;return e[6]!==s||e[7]!==i?(c=y.jsx(ys,{className:i,"data-slot":"select-scroll-down-button",...s,children:r}),e[6]=s,e[7]=i,e[8]=c):c=e[8],c}const Ss=["sg-placeholder"],Is="subnet-placeholder";function ks(){const t=rr(),{data:e}=Rt(sr),{data:n}=Rt(or),{data:s}=Rt(ir),i=yr(),r=e.Images??[],c=n.KeyPairs??[],u=s.InstanceTypes?.flatMap(I=>I.InstanceType?[I.InstanceType]:[])??[],f=s.InstanceTypes?.reduce((I,O)=>{const N=O.InstanceType;return N&&(I[N]=(I[N]||0)+1),I},{})??{},d=Object.keys(f).sort(),m=r[0]?.ImageId,p=c[0]?.KeyName,b=d.find(I=>I.endsWith(".nano"))??d[0],{control:P,handleSubmit:w,register:x,watch:T,formState:{errors:o,isSubmitting:R}}=dr({resolver:pr(lr.refine(I=>I.count<=(f[I.instanceType]??1),{message:"Cannot exceed available capacity",path:["count"]})),defaultValues:{count:1,imageId:m??"",keyName:p??"",instanceType:b??""}}),a=T("instanceType"),h=a?f[a]??1:1,E=async I=>{await i.mutateAsync({...I,securityGroupIds:Ss,subnetId:Is}),t({to:"/ec2/describe-instances"})};return y.jsxs(y.Fragment,{children:[y.jsx(gr,{to:"/ec2/describe-instances",children:"Back to instances"}),y.jsx(hr,{title:"Run EC2 Instances"}),u.length===0&&y.jsx(qt,{msg:"No compute available. No new instances can be created until compute is available."}),i.error&&y.jsx(qt,{error:i.error,msg:"Failed to create instance"}),y.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:w(E),children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"imageId",children:"Image"}),y.jsx(bt,{control:P,name:"imageId",render:({field:I})=>{const O=r.find(N=>N.ImageId===I.value);return y.jsxs(vt,{onValueChange:N=>I.onChange(N),value:I.value??"",children:[y.jsx(Mt,{className:"w-full",id:"imageId",children:y.jsx(Tt,{children:O?`${O.Name||"Unnamed"} (${O.Architecture})`:""})}),y.jsx(Ct,{children:r.map(N=>y.jsxs(Et,{value:N.ImageId??"",children:[N.Name||"Unnamed"," (",N.Architecture,")"]},N.ImageId))})]})}}),o.imageId&&y.jsx("p",{className:"text-destructive text-sm",children:o.imageId.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"instanceType",children:"Instance Type"}),y.jsx(bt,{control:P,name:"instanceType",render:({field:I})=>y.jsxs(vt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[y.jsx(Mt,{className:"w-full",id:"instanceType",children:y.jsx(Tt,{})}),y.jsx(Ct,{children:d.map(O=>y.jsxs(Et,{value:O,children:[O," (",f[O]," available)"]},O))})]})}),o.instanceType&&y.jsx("p",{className:"text-destructive text-sm",children:o.instanceType.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"keyName",children:"Key Pair"}),y.jsx(bt,{control:P,name:"keyName",render:({field:I})=>y.jsxs(vt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[y.jsx(Mt,{className:"w-full",id:"keyName",children:y.jsx(Tt,{})}),y.jsx(Ct,{children:c.map(O=>y.jsx(Et,{value:O.KeyName??"",children:O.KeyName},O.KeyPairId))})]})}),o.keyName&&y.jsx("p",{className:"text-destructive text-sm",children:o.keyName.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"count",children:"Number of Instances"}),y.jsx(mr,{id:"count",type:"number",...x("count",{valueAsNumber:!0})}),y.jsx("p",{className:"text-muted-foreground text-xs",id:"count-description",children:a&&`Available capacity for ${a}: ${h}`}),o.count&&y.jsx("p",{className:"text-destructive text-sm",children:o.count.message})]}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx(Wt,{disabled:R||i.isPending,onClick:()=>t({to:"/ec2/describe-instances"}),type:"button",variant:"outline",children:"Cancel"}),y.jsx(Wt,{disabled:R||i.isPending||u.length===0,type:"submit",children:R||i.isPending?"Creating…":"Create Instance"})]})]})]})}export{ks as component}; +import{f as en,A as Dt,h as Re,k as Je,l as He,m as Ue,n as _t,r as l,o as tn,p as Fe,q as zt,t as Mn,v as xe,w as yt,x as Cn,E as nn,y as rn,z as De,C as En,D as An,F as Y,G as Pn,H as de,I as On,J as Kt,K as Nn,L as Ge,M as bt,N as Wt,P as Vn,Q as on,R as jn,S as kn,T as Ot,U as dt,j as h,V as q,W as Ft,X as Ln,Y as Nt,Z as Dn,_ as k,$ as Fn,a0 as pt,a1 as Hn,a2 as Un,a3 as Bn,a4 as sn,a5 as ln,a6 as _n,a7 as zn,a8 as Ht,a9 as cn,aa as Ve,ab as Vt,ac as Kn,ad as Wn,ae as $n,af as qn,ag as Yn,ah as Gn,ai as Xn,aj as Qn,ak as Jn,al as an,am as $t,an as Zn,ao as er,ap as tr,aq as nr,ar as un,as as rr,at as or,au as Rt,c as We,a as $e,u as sr,av as ir,aw as lr,ax as cr,ay as ar,B as qt}from"./index.js";import{e as ur,f as fn,g as dn,h as Yt,i as fr,j as dr,k as pr,u as mr,a as gr,c as ot,b as st,C as wt,F as it,I as hr}from"./field.js";import{u as St}from"./useSuspenseQuery.js";import{B as xr}from"./back-link.js";import{E as Gt}from"./error-banner.js";import{P as yr}from"./page-heading.js";import{C as br}from"./check.js";import{b as Rr}from"./ec2.js";import"./useMutation.js";const wr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pn=en("chevron-down",wr);const Sr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ir=en("chevron-up",Sr);function lt(t,e,n){return Math.floor(t/e)!==n}function Xe(t,e){return e<0||e>=t.current.length}function It(t,e){return he(t,{disabledIndices:e})}function Xt(t,e){return he(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function he(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:o,amount:i=1}={}){let r=e;do r+=n?-i:i;while(r>=0&&r<=t.current.length-1&&Qe(t,r,o));return r}function vr(t,{event:e,orientation:n,loopFocus:o,rtl:i,cols:r,disabledIndices:c,minIndex:u,maxIndex:f,prevIndex:d,stopEvent:m=!1}){let p=d;const b=[],P={};let w=!1;{let s=null,R=-1;t.current.forEach((a,x)=>{if(a==null)return;const E=a.closest('[role="row"]');E&&(w=!0),(E!==s||R===-1)&&(s=E,R+=1,b[R]=[]),b[R].push(x),P[x]=R})}const y=w&&b.length>0&&b.some(s=>s.length!==r);function T(s){if(!y||d===-1)return;const R=P[d];if(R==null)return;const a=b[R].indexOf(d);let x=s==="up"?R-1:R+1;o&&(x<0?x=b.length-1:x>=b.length&&(x=0));const E=new Set;for(;x>=0&&x=0;N-=1){const re=I[N];if(!Qe(t,re,c))return re}x=s==="up"?x-1:x+1,o&&(x<0?x=b.length-1:x>=b.length&&(x=0))}}if(e.key===Dt){const s=T("up");if(s!==void 0)m&&Re(e),p=s;else{if(m&&Re(e),d===-1)p=f;else if(p=he(t,{startingIndex:p,amount:r,decrement:!0,disabledIndices:c}),o&&(d-rR?x:x-r}Xe(t,p)&&(p=d)}}if(e.key===Je){const s=T("down");s!==void 0?(m&&Re(e),p=s):(m&&Re(e),d===-1?p=u:(p=he(t,{startingIndex:d,amount:r,disabledIndices:c}),o&&d+r>f&&(p=he(t,{startingIndex:d%r-r,amount:r,disabledIndices:c}))),Xe(t,p)&&(p=d))}if(n==="both"){const s=_t(d/r);e.key===(i?He:Ue)&&(m&&Re(e),d%r!==r-1?(p=he(t,{startingIndex:d,disabledIndices:c}),o&<(p,r,s)&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c}))):o&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c})),lt(p,r,s)&&(p=d)),e.key===(i?Ue:He)&&(m&&Re(e),d%r!==0?(p=he(t,{startingIndex:d,decrement:!0,disabledIndices:c}),o&<(p,r,s)&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c}))):o&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c})),lt(p,r,s)&&(p=d));const R=_t(f/r)===s;Xe(t,p)&&(o&&R?p=e.key===(i?Ue:He)?f:he(t,{startingIndex:d-d%r-1,disabledIndices:c}):p=d)}return p}function Tr(t,e,n){const o=[];let i=0;return t.forEach(({width:r,height:c},u)=>{let f=!1;for(n&&(i=0);!f;){const d=[];for(let m=0;mo[m]==null)?(d.forEach(m=>{o[m]=u}),f=!0):i+=1}}),[...o]}function Mr(t,e,n,o,i){if(t===-1)return-1;const r=n.indexOf(t),c=e[t];switch(i){case"tl":return r;case"tr":return c?r+c.width-1:r;case"bl":return c?r+(c.height-1)*o:r;case"br":return n.lastIndexOf(t);default:return-1}}function Cr(t,e){return e.flatMap((n,o)=>t.includes(n)?[o]:[])}function Qe(t,e,n){if(typeof n=="function")return n(e);if(n)return n.includes(e);const o=t.current[e];return o?o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true":!1}function Er(t,e={}){const n="rootStore"in t?t.rootStore:t,o=n.context.dataRef,{enabled:i=!0,event:r="click",toggle:c=!0,ignoreMouse:u=!1,stickIfOpen:f=!0,touchOpenDelay:d=0}=e,m=l.useRef(void 0),p=tn(),b=Fe(),P=l.useMemo(()=>({onPointerDown(w){m.current=w.pointerType},onMouseDown(w){const y=m.current,T=w.nativeEvent,s=n.select("open");if(w.button!==0||r==="click"||zt(y,!0)&&u)return;const R=o.current.openEvent,a=R?.type,x=n.select("domReferenceElement")!==w.currentTarget,E=s&&x||!(s&&c&&(!(R&&f)||a==="click"||a==="mousedown"));if(Cn(T.target)){const O=xe(yt,T,T.target);E&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O);return}const I=w.currentTarget;p.request(()=>{const O=xe(yt,T,I);E&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O)})},onClick(w){if(r==="mousedown-only")return;const y=m.current;if(r==="mousedown"&&y){m.current=void 0;return}if(zt(y,!0)&&u)return;const T=n.select("open"),s=o.current.openEvent,R=n.select("domReferenceElement")!==w.currentTarget,a=T&&R||!(T&&c&&(!(s&&f)||Mn(s))),x=xe(yt,w.nativeEvent,w.currentTarget);a&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,x)}):n.setOpen(a,x)},onKeyDown(){m.current=void 0}}),[o,r,u,n,f,c,p,b,d]);return l.useMemo(()=>i?{reference:P}:nn,[i,P])}const Ar="Escape";function mt(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function ct(t,e){return mt(e,t===Dt||t===Je,t===He||t===Ue)}function vt(t,e,n){return mt(e,t===Je,n?t===He:t===Ue)||t==="Enter"||t===" "||t===""}function Pr(t,e,n){return mt(e,n?t===He:t===Ue,t===Je)}function Or(t,e,n,o){const i=n?t===Ue:t===He,r=t===Dt;return e==="both"||e==="horizontal"&&o&&o>1?t===Ar:mt(e,i,r)}function Nr(t,e){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),i=n.useState("floatingElement"),r=n.useState("domReferenceElement"),c=n.context.dataRef,{listRef:u,activeIndex:f,onNavigate:d=()=>{},enabled:m=!0,selectedIndex:p=null,allowEscape:b=!1,loopFocus:P=!1,nested:w=!1,rtl:y=!1,virtual:T=!1,focusItemOnOpen:s="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:a=!0,disabledIndices:x=void 0,orientation:E="vertical",parentOrientation:I,cols:O=1,scrollItemIntoView:N=!0,itemSizes:re,dense:ae=!1,id:K,resetOnPointerLeave:W=!0,externalTree:z}=e,D=rn(i),ee=De(D),U=En(),te=An(z);Y(()=>{c.current.orientation=E},[c,E]);const v=Pn(r),B=l.useRef(s),S=l.useRef(p??-1),A=l.useRef(null),ie=l.useRef(!0),M=de(g=>{d(S.current===-1?null:S.current,g)}),se=l.useRef(M),G=l.useRef(!!i),j=l.useRef(o),_=l.useRef(!1),ue=l.useRef(!1),Ie=De(x),H=De(o),fe=De(N),X=De(p),me=De(W),we=de(()=>{function g(Z){T?te?.events.emit("virtualfocus",Z):On(Z,{sync:_.current,preventScroll:!0})}const L=u.current[S.current],C=ue.current;L&&g(L),(_.current?Z=>Z():requestAnimationFrame)(()=>{const Z=u.current[S.current]||L;if(!Z)return;L||g(Z);const le=fe.current;le&&Q&&(C||!ie.current)&&Z.scrollIntoView?.(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le)})});Y(()=>{m&&(o&&i?(S.current=p??-1,B.current&&p!=null&&(ue.current=!0,M())):G.current&&(S.current=-1,se.current()))},[m,o,i,p,M]),Y(()=>{if(m){if(!o){_.current=!1;return}if(i)if(f==null){if(_.current=!1,X.current!=null)return;if(G.current&&(S.current=-1,we()),(!j.current||!G.current)&&B.current&&(A.current!=null||B.current===!0&&A.current==null)){let g=0;const L=()=>{u.current[0]==null?(g<2&&(g?requestAnimationFrame:queueMicrotask)(L),g+=1):(S.current=A.current==null||vt(A.current,E,y)||w?It(u):Xt(u),A.current=null,M())};L()}}else Xe(u,f)||(S.current=f,we(),ue.current=!1)}},[m,o,i,f,X,w,u,E,y,M,we,Ie]),Y(()=>{if(!m||i||!te||T||!G.current)return;const g=te.nodesRef.current,L=g.find(Z=>Z.id===U)?.context?.elements.floating,C=Kt(Nn(i)),$=g.some(Z=>Z.context&&Ge(Z.context.elements.floating,C));L&&!$&&ie.current&&L.focus({preventScroll:!0})},[m,i,te,U,T]),Y(()=>{se.current=M,j.current=o,G.current=!!i}),Y(()=>{o||(A.current=null,B.current=s)},[o,s]);const pe=f!=null,Q=l.useMemo(()=>{function g(C){if(!H.current)return;const $=u.current.indexOf(C.currentTarget);$!==-1&&S.current!==$&&(S.current=$,M(C))}return{onFocus(C){_.current=!0,g(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){_.current=!0,ue.current=!1,R&&g(C)},onPointerLeave(C){if(!H.current||!ie.current||C.pointerType==="touch")return;_.current=!0;const $=C.relatedTarget;!R||u.current.includes($)||me.current&&(S.current=-1,M(C),T||ee.current?.focus({preventScroll:!0}))}}},[H,ee,R,u,M,me,T]),J=l.useCallback(()=>I??te?.nodesRef.current.find(g=>g.id===U)?.context?.dataRef?.current.orientation,[U,te,I]),ye=de(g=>{if(ie.current=!1,_.current=!0,g.which===229||!H.current&&g.currentTarget===ee.current)return;if(w&&Or(g.key,E,y,O)){ct(g.key,J())||Re(g),n.setOpen(!1,xe(bt,g.nativeEvent)),Wt(r)&&(T?te?.events.emit("virtualfocus",r):r.focus());return}const L=S.current,C=It(u,x),$=Xt(u,x);if(v||(g.key==="Home"&&(Re(g),S.current=C,M(g)),g.key==="End"&&(Re(g),S.current=$,M(g))),O>1){const Z=re||Array.from({length:u.current.length},()=>({width:1,height:1})),le=Tr(Z,O,ae),ge=le.findIndex(Se=>Se!=null&&!Qe(u,Se,x)),be=le.reduce((Se,Me,Le)=>Me!=null&&!Qe(u,Me,x)?Le:Se,-1),ke=le[vr({current:le.map(Se=>Se!=null?u.current[Se]:null)},{event:g,orientation:E,loopFocus:P,rtl:y,cols:O,disabledIndices:Cr([...(typeof x!="function"?x:null)||u.current.map((Se,Me)=>Qe(u,Me,x)?Me:void 0),void 0],le),minIndex:ge,maxIndex:be,prevIndex:Mr(S.current>$?C:S.current,Z,le,O,g.key===Je?"bl":g.key===(y?He:Ue)?"tr":"tl"),stopEvent:!0})];if(ke!=null&&(S.current=ke,M(g)),E==="both")return}if(ct(g.key,E)){if(Re(g),o&&!T&&Kt(g.currentTarget.ownerDocument)===g.currentTarget){S.current=vt(g.key,E,y)?C:$,M(g);return}vt(g.key,E,y)?P?L>=$?b&&L!==u.current.length?S.current=-1:(_.current=!1,S.current=C):S.current=he(u,{startingIndex:L,disabledIndices:x}):S.current=Math.min($,he(u,{startingIndex:L,disabledIndices:x})):P?L<=C?b&&L!==-1?S.current=u.current.length:(_.current=!1,S.current=$):S.current=he(u,{startingIndex:L,decrement:!0,disabledIndices:x}):S.current=Math.max(C,he(u,{startingIndex:L,decrement:!0,disabledIndices:x})),Xe(u,S.current)&&(S.current=-1),M(g)}}),oe=l.useMemo(()=>T&&o&&pe&&{"aria-activedescendant":`${K}-${f}`},[T,o,pe,K,f]),ne=l.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...v?{}:oe,onKeyDown(g){if(g.key==="Tab"&&g.shiftKey&&o&&!T){const L=Vn(g.nativeEvent);if(L&&!Ge(ee.current,L))return;Re(g),n.setOpen(!1,xe(on,g.nativeEvent)),Wt(r)&&r.focus();return}ye(g)},onPointerMove(){ie.current=!0}}),[oe,ye,ee,E,v,n,o,T,r]),Te=l.useMemo(()=>{function g(C){s==="auto"&&jn(C.nativeEvent)&&(B.current=!T)}function L(C){B.current=s,s==="auto"&&kn(C.nativeEvent)&&(B.current=!0)}return{onKeyDown(C){const $=n.select("open");ie.current=!1;const Z=C.key.startsWith("Arrow"),le=Pr(C.key,J(),y),ge=ct(C.key,E),be=(w?le:ge)||C.key==="Enter"||C.key.trim()==="";if(T&&$)return ye(C);if(!(!$&&!a&&Z)){if(be){const ke=ct(C.key,J());A.current=w&&ke?null:C.key}if(w){le&&(Re(C),$?(S.current=It(u,Ie.current),M(C)):n.setOpen(!0,xe(bt,C.nativeEvent,C.currentTarget)));return}ge&&(X.current!=null&&(S.current=X.current),Re(C),!$&&a?n.setOpen(!0,xe(bt,C.nativeEvent,C.currentTarget)):ye(C),$&&M(C))}},onFocus(C){n.select("open")&&!T&&(S.current=-1,M(C))},onPointerDown:L,onPointerEnter:L,onMouseDown:g,onClick:g}},[ye,Ie,s,u,w,M,n,a,E,J,y,X,T]),Ae=l.useMemo(()=>({...oe,...Te}),[oe,Te]);return l.useMemo(()=>m?{reference:Ae,floating:ne,item:Q,trigger:Te}:{},[m,Ae,ne,Te,Q])}function Vr(t,e){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),i=n.context.dataRef,{listRef:r,activeIndex:c,onMatch:u,onTypingChange:f,enabled:d=!0,findMatch:m=null,resetMs:p=750,ignoreKeys:b=Ot,selectedIndex:P=null}=e,w=Fe(),y=l.useRef(""),T=l.useRef(P??c??-1),s=l.useRef(null);Y(()=>{o&&(w.clear(),s.current=null,y.current="")},[o,w]),Y(()=>{o&&y.current===""&&(T.current=P??c??-1)},[o,P,c]);const R=de(I=>{I?i.current.typing||(i.current.typing=I,f?.(I)):i.current.typing&&(i.current.typing=I,f?.(I))}),a=de(I=>{function O(W,z,D){const ee=m?m(z,D):z.find(U=>U?.toLocaleLowerCase().indexOf(D.toLocaleLowerCase())===0);return ee?W.indexOf(ee):-1}const N=r.current;if(y.current.length>0&&y.current[0]!==" "&&(O(N,N,y.current)===-1?R(!1):I.key===" "&&Re(I)),N==null||b.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;o&&I.key!==" "&&(Re(I),R(!0)),N.every(W=>W?W[0]?.toLocaleLowerCase()!==W[1]?.toLocaleLowerCase():!0)&&y.current===I.key&&(y.current="",T.current=s.current),y.current+=I.key,w.start(p,()=>{y.current="",T.current=s.current,R(!1)});const ae=T.current,K=O(N,[...N.slice((ae||0)+1),...N.slice(0,(ae||0)+1)],y.current);K!==-1?(u?.(K),s.current=K):I.key!==" "&&(y.current="",R(!1))}),x=l.useMemo(()=>({onKeyDown:a}),[a]),E=l.useMemo(()=>({onKeyDown:a,onKeyUp(I){I.key===" "&&R(!1)}}),[a,R]);return l.useMemo(()=>d?{reference:x,floating:E}:{},[d,x,E])}function jr(t){const e=l.useRef(!0);e.current&&(e.current=!1,t())}const mn=l.createContext(null),gn=l.createContext(null);function je(){const t=l.useContext(mn);if(t===null)throw new Error(dt(60));return t}function hn(){const t=l.useContext(gn);if(t===null)throw new Error(dt(61));return t}const kr=(t,e)=>Object.is(t,e);function Ke(t,e,n){return t==null||e==null?Object.is(t,e):n(t,e)}function Tt(t,e,n){return!t||t.length===0?!1:t.some(o=>o===void 0?!1:Ke(o,e,n))}function jt(t,e,n){return!t||t.length===0?-1:t.findIndex(o=>o===void 0?!1:Ke(o,e,n))}function Lr(t,e,n){return t.filter(o=>!Ke(o,e,n))}function kt(t){if(t==null)return"";if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function xn(t){return t!=null&&t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"items"in t[0]}function Dr(t){if(!Array.isArray(t))return t!=null&&!("null"in t);if(xn(t)){for(const e of t)for(const n of e.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Fr(t,e){if(e&&t!=null)return e(t)??"";if(t&&typeof t=="object"){if("label"in t&&t.label!=null)return String(t.label);if("value"in t)return String(t.value)}return kt(t)}function ze(t,e){return e&&t!=null?e(t)??"":t&&typeof t=="object"&&"value"in t&&"label"in t?kt(t.value):kt(t)}function yn(t,e,n){function o(){return Fr(t,n)}if(n&&t!=null)return n(t);if(t&&typeof t=="object"&&"label"in t&&t.label!=null)return t.label;if(e&&!Array.isArray(e))return e[t]??o();if(Array.isArray(e)){const i=xn(e)?e.flatMap(r=>r.items):e;if(t==null||typeof t!="object"){const r=i.find(c=>c.value===t);return r&&r.label!=null?r.label:o()}if("value"in t){const r=i.find(c=>c&&c.value===t.value);if(r&&r.label!=null)return r.label}}return o()}function Hr(t,e,n){return t.reduce((o,i,r)=>(r>0&&o.push(", "),o.push(h.jsx(l.Fragment,{children:yn(i,e,n)},r)),o),[])}const V={id:q(t=>t.id),modal:q(t=>t.modal),multiple:q(t=>t.multiple),items:q(t=>t.items),itemToStringLabel:q(t=>t.itemToStringLabel),itemToStringValue:q(t=>t.itemToStringValue),isItemEqualToValue:q(t=>t.isItemEqualToValue),value:q(t=>t.value),hasSelectedValue:q(t=>{const{value:e,multiple:n,itemToStringValue:o}=t;return e==null?!1:n&&Array.isArray(e)?e.length>0:ze(e,o)!==""}),hasNullItemLabel:q((t,e)=>e?Dr(t.items):!1),open:q(t=>t.open),mounted:q(t=>t.mounted),forceMount:q(t=>t.forceMount),transitionStatus:q(t=>t.transitionStatus),openMethod:q(t=>t.openMethod),activeIndex:q(t=>t.activeIndex),selectedIndex:q(t=>t.selectedIndex),isActive:q((t,e)=>t.activeIndex===e),isSelected:q((t,e,n)=>{const o=t.isItemEqualToValue,i=t.value;return t.multiple?Array.isArray(i)&&i.some(r=>Ke(r,n,o)):t.selectedIndex===e&&t.selectedIndex!==null?!0:Ke(i,n,o)}),isSelectedByFocus:q((t,e)=>t.selectedIndex===e),popupProps:q(t=>t.popupProps),triggerProps:q(t=>t.triggerProps),triggerElement:q(t=>t.triggerElement),positionerElement:q(t=>t.positionerElement),listElement:q(t=>t.listElement),scrollUpArrowVisible:q(t=>t.scrollUpArrowVisible),scrollDownArrowVisible:q(t=>t.scrollDownArrowVisible),hasScrollArrows:q(t=>t.hasScrollArrows)};function Ur(t,e){const n=l.useRef(t),o=de(e);Y(()=>{n.current!==t&&o(n.current)},[t,o]),Y(()=>{n.current=t},[t])}function Br(t){const{id:e,value:n,defaultValue:o=null,onValueChange:i,open:r,defaultOpen:c=!1,onOpenChange:u,name:f,disabled:d=!1,readOnly:m=!1,required:p=!1,modal:b=!0,actionsRef:P,inputRef:w,onOpenChangeComplete:y,items:T,multiple:s=!1,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x=kr,highlightItemOnHover:E=!0,children:I}=t,{clearErrors:O}=ur(),{setDirty:N,setTouched:re,setFocused:ae,shouldValidateOnChange:K,validityData:W,setFilled:z,name:D,disabled:ee,validation:U,validationMode:te}=fn(),v=dn({id:e}),B=ee||d,S=D??f,[A,ie]=Yt({controlled:n,default:s?o??Ot:o,name:"Select",state:"value"}),[M,se]=Yt({controlled:r,default:c,name:"Select",state:"open"}),G=l.useRef([]),j=l.useRef([]),_=l.useRef(null),ue=l.useRef(null),Ie=l.useRef(0),H=l.useRef(null),fe=l.useRef([]),X=l.useRef(!1),me=l.useRef(!1),we=l.useRef(null),pe=l.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Q=l.useRef(!1),{mounted:J,setMounted:ye,transitionStatus:oe}=Ft(M),{openMethod:ne,triggerProps:Te,reset:Ae}=Ln(M),g=Nt(()=>new Dn({id:v,modal:b,multiple:s,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x,value:A,open:M,mounted:J,transitionStatus:oe,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,L=k(g,V.activeIndex),C=k(g,V.selectedIndex),$=k(g,V.triggerElement),Z=k(g,V.positionerElement),le=l.useMemo(()=>s&&Array.isArray(A)&&A.length===0?"":ze(A,a),[s,A,a]),ge=l.useMemo(()=>s&&Array.isArray(A)?A.map(F=>ze(F,a)):ze(A,a),[s,A,a]),be=De(g.state.triggerElement);fr({id:v,commit:U.commit,value:A,controlRef:be,name:S,getValue:()=>ge});const ke=l.useRef(A);Y(()=>{A!==ke.current&&g.set("forceMount",!0)},[g,A]),Y(()=>{z(s?Array.isArray(A)&&A.length>0:A!=null)},[s,A,z]),Y(function(){if(M)return;const ce=fe.current;if(s){const Ee=Array.isArray(A)?A:[];if(Ee.length===0){g.set("selectedIndex",null);return}const ve=Ee[Ee.length-1],rt=jt(ce,ve,x);g.set("selectedIndex",rt===-1?null:rt);return}const Ce=jt(ce,A,x);g.set("selectedIndex",Ce===-1?null:Ce)},[s,M,A,fe,x,g]),Ur(A,()=>{O(S),N(A!==W.initialValue),K()?U.commit(A):U.commit(A,!0)});const Se=de((F,ce)=>{if(u?.(F,ce),!ce.isCanceled&&(se(F),!F&&(ce.reason===on||ce.reason===Fn)&&(re(!0),ae(!1),te==="onBlur"&&U.commit(A)),!F&&g.state.activeIndex!==null)){const Ce=G.current[g.state.activeIndex];queueMicrotask(()=>{Ce?.setAttribute("tabindex","-1")})}}),Me=de(()=>{ye(!1),g.set("activeIndex",null),Ae(),y?.(!1)});pt({enabled:!P,open:M,ref:_,onComplete(){M||Me()}}),l.useImperativeHandle(P,()=>({unmount:Me}),[Me]);const Le=de((F,ce)=>{i?.(F,ce),!ce.isCanceled&&ie(F)}),Pe=de(()=>{const F=g.state.listElement||_.current;if(!F)return;const ce=F.scrollTop,Ce=F.scrollTop+F.clientHeight,Ee=ce>1,ve=Cesn(Be(),Te,v?{id:v}:nn),[Be,Te,v]);jr(()=>{g.update({popupProps:_e(),triggerProps:Ye})}),Y(()=>{g.update({id:v,modal:b,multiple:s,value:A,open:M,mounted:J,transitionStatus:oe,popupProps:_e(),triggerProps:Ye,items:T,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x,openMethod:ne})},[g,v,b,s,A,M,J,oe,_e,Ye,T,R,a,x,ne]);const tt=l.useMemo(()=>({store:g,name:S,required:p,disabled:B,readOnly:m,multiple:s,itemToStringLabel:R,itemToStringValue:a,highlightItemOnHover:E,setValue:Le,setOpen:Se,listRef:G,popupRef:_,scrollHandlerRef:ue,handleScrollArrowVisibility:Pe,scrollArrowsMountedCountRef:Ie,getItemProps:et,events:Oe.context.events,valueRef:H,valuesRef:fe,labelsRef:j,typingRef:X,selectionRef:pe,selectedItemTextRef:we,validation:U,onOpenChangeComplete:y,keyboardActiveRef:me,alignItemWithTriggerActiveRef:Q,initialValueRef:ke}),[g,S,p,B,m,s,R,a,E,Le,Se,et,Oe.context.events,U,y,Pe]),nt=ln(w,U.inputRef),ht=s&&Array.isArray(A)&&A.length>0,xt=l.useMemo(()=>!s||!Array.isArray(A)||!S?null:A.map(F=>{const ce=ze(F,a);return h.jsx("input",{type:"hidden",name:S,value:ce},ce)}),[s,A,S,a]);return h.jsx(mn.Provider,{value:tt,children:h.jsxs(gn.Provider,{value:Oe,children:[I,h.jsx("input",{...U.getInputValidationProps({onFocus(){g.state.triggerElement?.focus({focusVisible:!0})},onChange(F){if(F.nativeEvent.defaultPrevented)return;const ce=F.target.value,Ce=xe(Ht,F.nativeEvent);function Ee(){if(s)return;const ve=fe.current.find(rt=>ze(rt,a).toLowerCase()===ce.toLowerCase());ve!=null&&(N(ve!==W.initialValue),Le(ve,Ce),K()&&U.commit(ve))}g.set("forceMount",!0),queueMicrotask(Ee)}}),name:s?void 0:S,value:le,disabled:B,required:p&&!ht,readOnly:m,ref:nt,style:S?_n:zn,tabIndex:-1,"aria-hidden":!0}),xt]})})}function _r(t){const e=t.getBoundingClientRect(),n=window.getComputedStyle(t,"::before"),o=window.getComputedStyle(t,"::after");if(!(n.content!=="none"||o.content!=="none"))return e;const r=parseFloat(n.width)||0,c=parseFloat(n.height)||0,u=parseFloat(o.width)||0,f=parseFloat(o.height)||0,d=Math.max(e.width,r,u),m=Math.max(e.height,c,f),p=d-e.width,b=m-e.height;return{left:e.left-p/2,right:e.right+p/2,top:e.top-b/2,bottom:e.bottom+b/2}}const at=2,zr=400,Qt=200,Kr={...Wn,...pr,value:()=>null},Wr=l.forwardRef(function(e,n){const{render:o,className:i,id:r,disabled:c=!1,nativeButton:u=!0,...f}=e,{setTouched:d,setFocused:m,validationMode:p,state:b,disabled:P}=fn(),{labelId:w}=dr(),{store:y,setOpen:T,selectionRef:s,validation:R,readOnly:a,required:x,alignItemWithTriggerActiveRef:E,disabled:I,keyboardActiveRef:O}=je(),N=P||I||c,re=k(y,V.open),ae=k(y,V.value),K=k(y,V.triggerProps),W=k(y,V.positionerElement),z=k(y,V.listElement),D=k(y,V.id),ee=k(y,V.hasSelectedValue),U=!ee&&re,te=k(y,V.hasNullItemLabel,U),v=r??D;dn({id:v});const B=De(W),S=l.useRef(null),{getButtonProps:A,buttonRef:ie}=cn({disabled:N,native:u}),M=de(X=>{y.set("triggerElement",X)}),se=ln(n,S,ie,M),G=Fe(),j=Fe(),_=Fe(),ue=Fe();l.useEffect(()=>{if(re)return!(ee||te)?_.start(zr,()=>{s.current.allowUnselectedMouseUp=!0,s.current.allowSelectedMouseUp=!0}):ue.start(Qt,()=>{s.current.allowUnselectedMouseUp=!0,_.start(Qt,()=>{s.current.allowSelectedMouseUp=!0})}),()=>{_.clear(),ue.clear()};s.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},j.clear()},[re,ee,te,s,j,_,ue]);const Ie=l.useMemo(()=>z?.id??rn(W)?.id,[z,W]),H=sn(K,{id:v,role:"combobox","aria-expanded":re?"true":"false","aria-haspopup":"listbox","aria-controls":re?Ie:void 0,"aria-labelledby":w,"aria-readonly":a||void 0,"aria-required":x||void 0,tabIndex:N?-1:0,ref:se,onFocus(X){m(!0),re&&E.current&&T(!1,xe(Ht,X.nativeEvent)),G.start(0,()=>{y.set("forceMount",!0)})},onBlur(X){Ge(W,X.relatedTarget)||(d(!0),m(!1),p==="onBlur"&&R.commit(ae))},onPointerMove(){O.current=!1},onKeyDown(){O.current=!0},onMouseDown(X){if(re)return;const me=Vt(X.currentTarget);function we(pe){if(!S.current)return;const Q=pe.target;if(Ge(S.current,Q)||Ge(B.current,Q)||Q===S.current)return;const J=_r(S.current);pe.clientX>=J.left-at&&pe.clientX<=J.right+at&&pe.clientY>=J.top-at&&pe.clientY<=J.bottom+at||T(!1,xe(Kn,pe))}j.start(0,()=>{me.addEventListener("mouseup",we,{once:!0})})}},R.getValidationProps,f,A);H.role="combobox";const fe=l.useMemo(()=>({...b,open:re,disabled:N,value:ae,readOnly:a,placeholder:!ee}),[b,re,N,ae,a,ee]);return Ve("button",e,{ref:[n,S],state:fe,stateAttributesMapping:Kr,props:H})}),$r={value:()=>null},qr=l.forwardRef(function(e,n){const{className:o,render:i,children:r,placeholder:c,...u}=e,{store:f,valueRef:d}=je(),m=k(f,V.value),p=k(f,V.items),b=k(f,V.itemToStringLabel),P=k(f,V.hasSelectedValue),w=!P&&c!=null&&r==null,y=k(f,V.hasNullItemLabel,w),T=l.useMemo(()=>({value:m,placeholder:!P}),[m,P]);let s=null;return typeof r=="function"?s=r(m):r!=null?s=r:!P&&c!=null&&!y?s=c:Array.isArray(m)?s=Hr(m,p,b):s=yn(m,p,b),Ve("span",e,{state:T,ref:[n,d],props:[{children:s},u],stateAttributesMapping:$r})}),Yr=l.forwardRef(function(e,n){const{className:o,render:i,...r}=e,{store:c}=je(),u=k(c,V.open),f=l.useMemo(()=>({open:u}),[u]);return Ve("span",e,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:$n})}),Gr=l.createContext(void 0),Xr=l.forwardRef(function(e,n){const{store:o}=je(),i=k(o,V.mounted),r=k(o,V.forceMount);return i||r?h.jsx(Gr.Provider,{value:!0,children:h.jsx(qn,{ref:n,...e})}):null}),bn=l.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Qr(){return l.useContext(bn)}function Jr(t){const{children:e,elementsRef:n,labelsRef:o,onMapChange:i}=t,r=de(i),c=l.useRef(0),u=Nt(eo).current,f=Nt(Zr).current,[d,m]=l.useState(0),p=l.useRef(d),b=de((s,R)=>{f.set(s,R??null),p.current+=1,m(p.current)}),P=de(s=>{f.delete(s),p.current+=1,m(p.current)}),w=l.useMemo(()=>{const s=new Map;return Array.from(f.keys()).filter(a=>a.isConnected).sort(to).forEach((a,x)=>{const E=f.get(a)??{};s.set(a,{...E,index:x})}),s},[f,d]);Y(()=>{if(typeof MutationObserver!="function"||w.size===0)return;const s=new MutationObserver(R=>{const a=new Set,x=E=>a.has(E)?a.delete(E):a.add(E);R.forEach(E=>{E.removedNodes.forEach(x),E.addedNodes.forEach(x)}),a.size===0&&(p.current+=1,m(p.current))});return w.forEach((R,a)=>{a.parentElement&&s.observe(a.parentElement,{childList:!0})}),()=>{s.disconnect()}},[w]),Y(()=>{p.current===d&&(n.current.length!==w.size&&(n.current.length=w.size),o&&o.current.length!==w.size&&(o.current.length=w.size),c.current=w.size),r(w)},[r,w,n,o,d]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{o&&(o.current=[])},[o]);const y=de(s=>(u.add(s),()=>{u.delete(s)}));Y(()=>{u.forEach(s=>s(w))},[u,w]);const T=l.useMemo(()=>({register:b,unregister:P,subscribeMapChange:y,elementsRef:n,labelsRef:o,nextIndexRef:c}),[b,P,y,n,o,c]);return h.jsx(bn.Provider,{value:T,children:e})}function Zr(){return new Map}function eo(){return new Set}function to(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Rn=l.createContext(void 0);function Ut(){const t=l.useContext(Rn);if(!t)throw new Error(dt(59));return t}function ft(t,e){t&&Object.assign(t.style,e)}const wn={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},no={position:"fixed"},ro=l.forwardRef(function(e,n){const{anchor:o,positionMethod:i="absolute",className:r,render:c,side:u="bottom",align:f="center",sideOffset:d=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:b,arrowPadding:P=5,sticky:w=!1,disableAnchorTracking:y,alignItemWithTrigger:T=!0,collisionAvoidance:s=Yn,...R}=e,{store:a,listRef:x,labelsRef:E,alignItemWithTriggerActiveRef:I,selectedItemTextRef:O,valuesRef:N,initialValueRef:re,popupRef:ae,setValue:K}=je(),W=hn(),z=k(a,V.open),D=k(a,V.mounted),ee=k(a,V.modal),U=k(a,V.value),te=k(a,V.openMethod),v=k(a,V.positionerElement),B=k(a,V.triggerElement),S=k(a,V.isItemEqualToValue),A=l.useRef(null),ie=l.useRef(null),[M,se]=l.useState(T),G=D&&M&&te!=="touch";!D&&M!==T&&se(T),Y(()=>{D||(V.scrollUpArrowVisible(a.state)&&a.set("scrollUpArrowVisible",!1),V.scrollDownArrowVisible(a.state)&&a.set("scrollDownArrowVisible",!1))},[a,D]),l.useImperativeHandle(I,()=>G),Gn((G||ee)&&z&&te!=="touch",B);const j=Xn({anchor:o,floatingRootContext:W,positionMethod:i,mounted:D,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:P,collisionBoundary:p,collisionPadding:b,sticky:w,disableAnchorTracking:y??G,collisionAvoidance:s,keepMounted:!0}),_=G?"none":j.side,ue=G?no:j.positionerStyles,Ie=l.useMemo(()=>{const Q={};return z||(Q.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...ue,...Q}}},[z,D,ue]),H=l.useMemo(()=>({open:z,side:_,align:j.align,anchorHidden:j.anchorHidden}),[z,_,j.align,j.anchorHidden]),fe=de(Q=>{a.set("positionerElement",Q)}),X=Ve("div",e,{ref:[n,fe],state:H,stateAttributesMapping:an,props:[Ie,R]}),me=l.useRef(0),we=de(Q=>{if(Q.size===0&&me.current===0||N.current.length===0)return;const J=me.current;if(me.current=Q.size,Q.size===J)return;const ye=xe(Ht);if(J!==0&&!a.state.multiple&&U!==null&&jt(N.current,U,S)===-1){const ne=re.current,Ae=ne!=null&&Tt(N.current,ne,S)?ne:null;K(Ae,ye),Ae===null&&(a.set("selectedIndex",null),O.current=null)}if(J!==0&&a.state.multiple&&Array.isArray(U)){const oe=U.filter(ne=>Tt(N.current,ne,S));(oe.length!==U.length||oe.some(ne=>!Tt(U,ne,S)))&&(K(oe,ye),oe.length===0&&(a.set("selectedIndex",null),O.current=null))}if(z&&G){a.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const oe={height:""};ft(v,oe),ft(ae.current,oe)}}),pe=l.useMemo(()=>({...j,side:_,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:A,scrollDownArrowRef:ie}),[j,_,G,se]);return h.jsx(Jr,{elementsRef:x,labelsRef:E,onMapChange:we,children:h.jsxs(Rn.Provider,{value:pe,children:[D&&ee&&h.jsx(Qn,{inert:Jn(!z),cutout:B}),X]})})});function Sn(t){const e=t.currentTarget.getBoundingClientRect();return e.top+1<=t.clientY&&t.clientY<=e.bottom-1&&e.left+1<=t.clientX&&t.clientX<=e.right-1}const ut="base-ui-disable-scrollbar",Lt={className:ut,getElement(t){return h.jsx("style",{nonce:t,href:ut,precedence:"base-ui:low",children:`.${ut}{scrollbar-width:none}.${ut}::-webkit-scrollbar{display:none}`})}},oo=l.createContext(void 0);function so(t){return l.useContext(oo)}function io(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const lo=l.createContext(void 0),co={disableStyleElements:!1};function ao(){return l.useContext(lo)??co}const uo={...an,...un},fo=l.forwardRef(function(e,n){const{render:o,className:i,...r}=e,{store:c,popupRef:u,onOpenChangeComplete:f,setOpen:d,valueRef:m,selectedItemTextRef:p,keyboardActiveRef:b,multiple:P,handleScrollArrowVisibility:w,scrollHandlerRef:y,highlightItemOnHover:T}=je(),{side:s,align:R,alignItemWithTriggerActive:a,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:E,scrollUpArrowRef:I}=Ut(),O=so()!=null,N=hn(),{nonce:re,disableStyleElements:ae}=ao(),K=Fe(),W=k(c,V.id),z=k(c,V.open),D=k(c,V.mounted),ee=k(c,V.popupProps),U=k(c,V.transitionStatus),te=k(c,V.triggerElement),v=k(c,V.positionerElement),B=k(c,V.listElement),S=l.useRef(0),A=l.useRef(!1),ie=l.useRef(0),M=l.useRef(!1),se=l.useRef({}),G=tn(),j=de(H=>{if(!v||!u.current||!M.current)return;if(A.current||!a){w();return}const fe=v.style.top==="0px",X=v.style.bottom==="0px",me=v.getBoundingClientRect().height,we=Vt(v),pe=getComputedStyle(v),Q=parseFloat(pe.marginTop),J=parseFloat(pe.marginBottom),ye=Jt(getComputedStyle(u.current)),oe=we.documentElement.clientHeight-Q-J,ne=H.scrollTop,Te=H.scrollHeight,Ae=H.clientHeight,g=Te-Ae;let L=0,C=null,$=!1;if(fe){const Z=g-ne,le=me+Z,ge=Math.min(le,oe);L=ge,ge!==oe?C=g:$=!0}else if(X){const Z=ne-0,le=me+Z,ge=Math.min(le,oe),be=le-oe;L=ge,ge!==oe?C=0:($=!0,ne=ye)&&(A.current=!0),w()});l.useImperativeHandle(y,()=>j,[j]),pt({open:z,ref:u,onComplete(){z&&f?.(!0)}});const _=l.useMemo(()=>({open:z,transitionStatus:U,side:s,align:R}),[z,U,s,R]);Y(()=>{!v||!u.current||Object.keys(se.current).length||(se.current={top:v.style.top||"0",left:v.style.left||"0",right:v.style.right,height:v.style.height,bottom:v.style.bottom,minHeight:v.style.minHeight,maxHeight:v.style.maxHeight,marginTop:v.style.marginTop,marginBottom:v.style.marginBottom})},[u,v]),Y(()=>{z||a||(M.current=!1,A.current=!1,S.current=0,ie.current=0,ft(v,se.current))},[z,a,v,u]),Y(()=>{const H=u.current;if(!(!z||!te||!v||!H||c.state.transitionStatus==="ending")){if(!a){M.current=!0,G.request(w),H.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const fe=mo(H);H.style.removeProperty("--transform-origin");try{const X=getComputedStyle(v),me=getComputedStyle(H),we=Vt(te),pe=$t(v),Q=te.getBoundingClientRect(),J=v.getBoundingClientRect(),ye=Q.left,oe=Q.height,ne=B||H,Te=ne.scrollHeight,Ae=parseFloat(me.borderBottomWidth),g=parseFloat(X.marginTop)||10,L=parseFloat(X.marginBottom)||10,C=parseFloat(X.minHeight)||100,$=Jt(me),Z=5,le=5,ge=20,be=we.documentElement.clientHeight-g-L,ke=we.documentElement.clientWidth,Se=be-Q.bottom+oe,Me=p.current,Le=m.current;let Pe,Oe=0,Ze=0;if(Me&&Le){const F=Le.getBoundingClientRect();Pe=Me.getBoundingClientRect();const ce=F.left-ye,Ce=Pe.left-J.left,Ee=F.top-Q.top+F.height/2,ve=Pe.top-J.top+Pe.height/2;Oe=ce-Ce,Ze=ve-Ee}const qe=Se+Ze+L+Ae;let Ne=Math.min(be,qe);const gt=be-g-L,Be=qe-Ne,_e=Math.max(Z,ye+Oe),et=ke-le,Ye=Math.max(0,_e+J.width-et);v.style.left=`${_e-Ye}px`,v.style.height=`${Ne}px`,v.style.maxHeight="auto",v.style.marginTop=`${g}px`,v.style.marginBottom=`${L}px`,H.style.height="100%";const tt=ne.scrollHeight-ne.clientHeight,nt=Be>=tt;nt&&(Ne=Math.min(be,J.height)-(Be-tt));const ht=Q.topbe-ge||Nex(!1));return}if(nt){const F=Math.max(0,be-qe);v.style.top=J.height>=gt?"0":`${F}px`,v.style.height=`${Ne}px`,ne.scrollTop=ne.scrollHeight-ne.clientHeight,S.current=Math.max(C,Ne)}else v.style.bottom="0",S.current=Math.max(C,Ne),ne.scrollTop=Be;if(Pe){const F=J.top,ce=J.height,Ce=Pe.top+Pe.height/2,Ee=ce>0?(Ce-F)/ce*100:50,ve=io(Ee,0,100);H.style.setProperty("--transform-origin",`50% ${ve}%`)}(S.current===be||Ne>=$)&&(A.current=!0),w(),setTimeout(()=>{M.current=!0})}finally{fe()}})}},[c,z,v,te,m,p,u,w,a,x,G,E,I,B]),l.useEffect(()=>{if(!a||!v||!z)return;const H=$t(v);function fe(X){d(!1,xe(nr,X))}return H.addEventListener("resize",fe),()=>{H.removeEventListener("resize",fe)}},[d,a,v,z]);const ue={...B?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":P||void 0,id:`${W}-list`},onKeyDown(H){b.current=!0,O&&or.has(H.key)&&H.stopPropagation()},onMouseMove(){b.current=!1},onPointerLeave(H){if(!T||Sn(H)||H.pointerType==="touch")return;const fe=H.currentTarget;K.start(0,()=>{c.set("activeIndex",null),fe.focus({preventScroll:!0})})},onScroll(H){B||y.current?.(H.currentTarget)},...a&&{style:B?{height:"100%"}:wn}},Ie=Ve("div",e,{ref:[n,u],state:_,stateAttributesMapping:uo,props:[ee,ue,rr(U),{className:!B&&a?Lt.className:void 0},r]});return h.jsxs(l.Fragment,{children:[!ae&&Lt.getElement(re),h.jsx(tr,{context:N,modal:!1,disabled:!D,restoreFocus:!0,children:Ie})]})});function Jt(t){const e=t.maxHeight||"";return e.endsWith("px")&&parseFloat(e)||1/0}const Zt={transform:"none",scale:"1",translate:"0 0"};function po(t,e,n){n?t.setProperty(e,n):t.removeProperty(e)}function mo(t){const{style:e}=t,n={},o=Object.keys(Zt);for(const i of o)n[i]=e.getPropertyValue(i),e.setProperty(i,Zt[i]);return()=>{for(const i of o)po(e,i,n[i])}}const go=l.forwardRef(function(e,n){const{className:o,render:i,...r}=e,{store:c,scrollHandlerRef:u}=je(),{alignItemWithTriggerActive:f}=Ut(),d=k(c,V.hasScrollArrows),m=k(c,V.openMethod),p=k(c,V.multiple),P={id:`${k(c,V.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(y){u.current?.(y.currentTarget)},...f&&{style:wn},className:d&&m!=="touch"?Lt.className:void 0},w=de(y=>{c.set("listElement",y)});return Ve("div",e,{ref:[n,w],props:[P,r]})});let In=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function ho(t={}){const{label:e,metadata:n,textRef:o,indexGuessBehavior:i,index:r}=t,{register:c,unregister:u,subscribeMapChange:f,elementsRef:d,labelsRef:m,nextIndexRef:p}=Qr(),b=l.useRef(-1),[P,w]=l.useState(r??(i===In.GuessFromOrder?()=>{if(b.current===-1){const s=p.current;p.current+=1,b.current=s}return b.current}:-1)),y=l.useRef(null),T=l.useCallback(s=>{if(y.current=s,P!==-1&&s!==null&&(d.current[P]=s,m)){const R=e!==void 0;m.current[P]=R?e:o?.current?.textContent??s.textContent}},[P,d,m,e,o]);return Y(()=>{if(r!=null)return;const s=y.current;if(s)return c(s,n),()=>{u(s)}},[r,c,u,n]),Y(()=>{if(r==null)return f(s=>{const R=y.current?s.get(y.current)?.index:null;R!=null&&w(R)})},[r,f,w]),l.useMemo(()=>({ref:T,index:P}),[P,T])}const vn=l.createContext(void 0);function Bt(){const t=l.useContext(vn);if(!t)throw new Error(dt(57));return t}const xo=l.memo(l.forwardRef(function(e,n){const{render:o,className:i,value:r=null,label:c,disabled:u=!1,nativeButton:f=!1,...d}=e,m=l.useRef(null),p=ho({label:c,textRef:m,indexGuessBehavior:In.GuessFromOrder}),{store:b,getItemProps:P,setOpen:w,setValue:y,selectionRef:T,typingRef:s,valuesRef:R,keyboardActiveRef:a,multiple:x,highlightItemOnHover:E}=je(),I=Fe(),O=k(b,V.isActive,p.index),N=k(b,V.isSelected,p.index,r),re=k(b,V.isSelectedByFocus,p.index),ae=k(b,V.isItemEqualToValue),K=p.index,W=K!==-1,z=l.useRef(null),D=De(K);Y(()=>{if(!W)return;const j=R.current;return j[K]=r,()=>{delete j[K]}},[W,K,r,R]),Y(()=>{if(!W)return;const j=b.state.value;let _=j;x&&Array.isArray(j)&&j.length>0&&(_=j[j.length-1]),_!==void 0&&Ke(_,r,ae)&&b.set("selectedIndex",K)},[W,K,x,ae,b,r]);const ee=l.useMemo(()=>({disabled:u,selected:N,highlighted:O}),[u,N,O]),U=P({active:O,selected:N});U.onFocus=void 0,U.id=void 0;const te=l.useRef(null),v=l.useRef("mouse"),B=l.useRef(!1),{getButtonProps:S,buttonRef:A}=cn({disabled:u,focusableWhenDisabled:!0,native:f});function ie(j){const _=b.state.value;if(x){const ue=Array.isArray(_)?_:[],Ie=N?Lr(ue,r,ae):[...ue,r];y(Ie,xe(Rt,j))}else y(r,xe(Rt,j)),w(!1,xe(Rt,j))}const M={role:"option","aria-selected":N,tabIndex:O?0:-1,onFocus(){b.set("activeIndex",K)},onMouseEnter(){!a.current&&b.state.selectedIndex===null&&b.set("activeIndex",K)},onMouseMove(){E&&b.set("activeIndex",K)},onMouseLeave(j){!E||a.current||Sn(j)||I.start(0,()=>{b.state.activeIndex===K&&b.set("activeIndex",null)})},onTouchStart(){T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(j){te.current=j.key,b.set("activeIndex",K)},onClick(j){B.current=!1,!(j.type==="keydown"&&te.current===null)&&(u||te.current===" "&&s.current||v.current!=="touch"&&!O||(te.current=null,ie(j.nativeEvent)))},onPointerEnter(j){v.current=j.pointerType},onPointerDown(j){v.current=j.pointerType,B.current=!0},onMouseUp(j){if(u)return;if(B.current){B.current=!1;return}const _=!T.current.allowSelectedMouseUp&&N,ue=!T.current.allowUnselectedMouseUp&&!N;_||ue||v.current!=="touch"&&!O||ie(j.nativeEvent)}},se=Ve("div",e,{ref:[A,n,p.ref,z],state:ee,props:[U,M,d,S]}),G=l.useMemo(()=>({selected:N,indexRef:D,textRef:m,selectedByFocus:re,hasRegistered:W}),[N,D,m,re,W]);return h.jsx(vn.Provider,{value:G,children:se})})),yo=l.forwardRef(function(e,n){const o=e.keepMounted??!1,{selected:i}=Bt();return o||i?h.jsx(bo,{...e,ref:n}):null}),bo=l.memo(l.forwardRef((t,e)=>{const{render:n,className:o,keepMounted:i,...r}=t,{selected:c}=Bt(),u=l.useRef(null),{transitionStatus:f,setMounted:d}=Ft(c),m=l.useMemo(()=>({selected:c,transitionStatus:f}),[c,f]),p=Ve("span",t,{ref:[e,u],state:m,props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:un});return pt({open:c,ref:u,onComplete(){c||d(!1)}}),p})),Ro=l.memo(l.forwardRef(function(e,n){const{indexRef:o,textRef:i,selectedByFocus:r,hasRegistered:c}=Bt(),{selectedItemTextRef:u}=je(),{className:f,render:d,...m}=e,p=l.useCallback(P=>{if(!P||!c)return;const w=u.current===null||!u.current.isConnected;(r||w&&o.current===0)&&(u.current=P)},[u,o,r,c]);return Ve("div",e,{ref:[p,n,i],props:m})})),Tn=l.forwardRef(function(e,n){const{render:o,className:i,direction:r,keepMounted:c=!1,...u}=e,{store:f,popupRef:d,listRef:m,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:b}=je(),{side:P,scrollDownArrowRef:w,scrollUpArrowRef:y}=Ut(),T=r==="up"?V.scrollUpArrowVisible:V.scrollDownArrowVisible,s=k(f,T),R=k(f,V.openMethod),a=s&&R!=="touch",x=Fe(),E=r==="up"?y:w,{transitionStatus:I,setMounted:O}=Ft(a);Y(()=>(b.current+=1,f.state.hasScrollArrows||f.set("hasScrollArrows",!0),()=>{b.current=Math.max(0,b.current-1),b.current===0&&f.state.hasScrollArrows&&f.set("hasScrollArrows",!1)}),[f,b]),pt({open:a,ref:E,onComplete(){a||O(!1)}});const N=l.useMemo(()=>({direction:r,visible:a,side:P,transitionStatus:I}),[r,a,P,I]),ae=Ve("div",e,{ref:[n,E],state:N,props:[{"aria-hidden":!0,children:r==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(W){if(W.movementX===0&&W.movementY===0||x.isStarted())return;f.set("activeIndex",null);function z(){const D=f.state.listElement??d.current;if(!D)return;f.set("activeIndex",null),p();const ee=D.scrollTop===0,U=Math.round(D.scrollTop+D.clientHeight)>=D.scrollHeight;if(m.current.length===0&&(r==="up"?f.set("scrollUpArrowVisible",!ee):f.set("scrollDownArrowVisible",!U)),r==="up"&&ee||r==="down"&&U){x.clear();return}if((f.state.listElement||d.current)&&m.current&&m.current.length>0){const v=m.current,B=E.current?.offsetHeight||0;if(r==="up"){let S=0;const A=D.scrollTop+B;for(let M=0;M=A){S=M;break}}const ie=Math.max(0,S-1);if(ieA){S=Math.max(0,M-1);break}}const ie=Math.min(v.length-1,S+1);if(ie>S){const M=v[ie];M&&(D.scrollTop=M.offsetTop+M.offsetHeight-D.clientHeight+B)}else D.scrollTop=D.scrollHeight-D.clientHeight}}x.start(40,z)}x.start(40,z)},onMouseLeave(){x.clear()}},u]});return a||c?ae:null}),wo=l.forwardRef(function(e,n){return h.jsx(Tn,{...e,ref:n,direction:"down"})}),So=l.forwardRef(function(e,n){return h.jsx(Tn,{...e,ref:n,direction:"up"})}),Mt=Br;function Ct(t){const e=We.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("flex flex-1 text-left",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==o||e[6]!==i?(r=h.jsx(qr,{className:i,"data-slot":"select-value",...o}),e[5]=o,e[6]=i,e[7]=r):r=e[7],r}function Et(t){const e=We.c(15);let n,o,i,r,c;e[0]!==t?({className:o,size:c,id:i,children:n,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i,e[4]=r,e[5]=c):(n=e[1],o=e[2],i=e[3],r=e[4],c=e[5]);const u=c===void 0?"default":c;let f;e[6]!==o?(f=$e("flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed outline-none transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=default]:h-7 data-[size=sm]:h-6 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0",o),e[6]=o,e[7]=f):f=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=h.jsx(Yr,{render:h.jsx(pn,{className:"pointer-events-none size-3.5 text-muted-foreground"})}),e[8]=d):d=e[8];let m;return e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==u||e[13]!==f?(m=h.jsxs(Wr,{className:f,"data-size":u,"data-slot":"select-trigger",id:i,...r,children:[n,d]}),e[9]=n,e[10]=i,e[11]=r,e[12]=u,e[13]=f,e[14]=m):m=e[14],m}function At(t){const e=We.c(26);let n,o,i,r,c,u,f,d;e[0]!==t?({className:o,children:n,side:r,sideOffset:c,align:u,alignOffset:f,alignItemWithTrigger:d,...i}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i,e[4]=r,e[5]=c,e[6]=u,e[7]=f,e[8]=d):(n=e[1],o=e[2],i=e[3],r=e[4],c=e[5],u=e[6],f=e[7],d=e[8]);const m=r===void 0?"bottom":r,p=c===void 0?4:c,b=u===void 0?"center":u,P=f===void 0?0:f,w=d===void 0?!0:d;let y;e[9]!==o?(y=$e("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",o),e[9]=o,e[10]=y):y=e[10];let T;e[11]===Symbol.for("react.memo_cache_sentinel")?(T=h.jsx(Io,{}),e[11]=T):T=e[11];let s;e[12]!==n?(s=h.jsx(go,{children:n}),e[12]=n,e[13]=s):s=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=h.jsx(vo,{}),e[14]=R):R=e[14];let a;e[15]!==i||e[16]!==y||e[17]!==s?(a=h.jsxs(fo,{className:y,"data-slot":"select-content",...i,children:[T,s,R]}),e[15]=i,e[16]=y,e[17]=s,e[18]=a):a=e[18];let x;return e[19]!==b||e[20]!==w||e[21]!==P||e[22]!==m||e[23]!==p||e[24]!==a?(x=h.jsx(Xr,{children:h.jsx(ro,{align:b,alignItemWithTrigger:w,alignOffset:P,className:"isolate z-50",side:m,sideOffset:p,children:a})}),e[19]=b,e[20]=w,e[21]=P,e[22]=m,e[23]=p,e[24]=a,e[25]=x):x=e[25],x}function Pt(t){const e=We.c(13);let n,o,i;e[0]!==t?({className:o,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i):(n=e[1],o=e[2],i=e[3]);let r;e[4]!==o?(r=$e("relative flex min-h-7 w-full cursor-default select-none items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[4]=o,e[5]=r):r=e[5];let c;e[6]!==n?(c=h.jsx(Ro,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),e[6]=n,e[7]=c):c=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=h.jsx(yo,{render:h.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:h.jsx(br,{className:"pointer-events-none"})}),e[8]=u):u=e[8];let f;return e[9]!==i||e[10]!==r||e[11]!==c?(f=h.jsxs(xo,{className:r,"data-slot":"select-item",...i,children:[c,u]}),e[9]=i,e[10]=r,e[11]=c,e[12]=f):f=e[12],f}function Io(t){const e=We.c(9);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=h.jsx(Ir,{}),e[5]=r):r=e[5];let c;return e[6]!==o||e[7]!==i?(c=h.jsx(So,{className:i,"data-slot":"select-scroll-up-button",...o,children:r}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}function vo(t){const e=We.c(9);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=h.jsx(pn,{}),e[5]=r):r=e[5];let c;return e[6]!==o||e[7]!==i?(c=h.jsx(wo,{className:i,"data-slot":"select-scroll-down-button",...o,children:r}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}const To=["sg-placeholder"],Mo="subnet-placeholder";function Do(){const t=sr(),{data:e}=St(ir),{data:n}=St(lr),{data:o}=St(cr),i=Rr(),r=e.Images??[],c=n.KeyPairs??[],u=o.InstanceTypes?.flatMap(I=>I.InstanceType?[I.InstanceType]:[])??[],f=o.InstanceTypes?.reduce((I,O)=>{const N=O.InstanceType;return N&&(I[N]=(I[N]||0)+1),I},{})??{},d=Object.keys(f).sort(),m=r[0]?.ImageId,p=c[0]?.KeyName,b=d.find(I=>I.endsWith(".nano"))??d[0],{control:P,handleSubmit:w,register:y,watch:T,formState:{errors:s,isSubmitting:R}}=mr({resolver:gr(ar.refine(I=>I.count<=(f[I.instanceType]??1),{message:"Cannot exceed available capacity",path:["count"]})),defaultValues:{count:1,imageId:m??"",keyName:p??"",instanceType:b??""}}),a=T("instanceType"),x=a?f[a]??1:1,E=async I=>{await i.mutateAsync({...I,securityGroupIds:To,subnetId:Mo}),t({to:"/ec2/describe-instances"})};return h.jsxs(h.Fragment,{children:[h.jsx(xr,{to:"/ec2/describe-instances",children:"Back to instances"}),h.jsx(yr,{title:"Run EC2 Instances"}),u.length===0&&h.jsx(Gt,{msg:"No compute available. No new instances can be created until compute is available."}),i.error&&h.jsx(Gt,{error:i.error,msg:"Failed to create instance"}),h.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:w(E),children:[h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"imageId",children:"Image"})}),h.jsx(wt,{control:P,name:"imageId",render:({field:I})=>{const O=r.find(N=>N.ImageId===I.value);return h.jsxs(Mt,{onValueChange:N=>I.onChange(N),value:I.value??"",children:[h.jsx(Et,{"aria-invalid":!!s.imageId,className:"w-full",id:"imageId",children:h.jsx(Ct,{children:O?`${O.Name||"Unnamed"} (${O.Architecture})`:""})}),h.jsx(At,{children:r.map(N=>h.jsxs(Pt,{value:N.ImageId??"",children:[N.Name||"Unnamed"," (",N.Architecture,")"]},N.ImageId))})]})}}),h.jsx(it,{errors:[s.imageId]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"instanceType",children:"Instance Type"})}),h.jsx(wt,{control:P,name:"instanceType",render:({field:I})=>h.jsxs(Mt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[h.jsx(Et,{"aria-invalid":!!s.instanceType,className:"w-full",id:"instanceType",children:h.jsx(Ct,{})}),h.jsx(At,{children:d.map(O=>h.jsxs(Pt,{value:O,children:[O," (",f[O]," available)"]},O))})]})}),h.jsx(it,{errors:[s.instanceType]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"keyName",children:"Key Pair"})}),h.jsx(wt,{control:P,name:"keyName",render:({field:I})=>h.jsxs(Mt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[h.jsx(Et,{"aria-invalid":!!s.keyName,className:"w-full",id:"keyName",children:h.jsx(Ct,{})}),h.jsx(At,{children:c.map(O=>h.jsx(Pt,{value:O.KeyName??"",children:O.KeyName},O.KeyPairId))})]})}),h.jsx(it,{errors:[s.keyName]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"count",children:"Number of Instances"})}),h.jsx(hr,{"aria-invalid":!!s.count,id:"count",type:"number",...y("count",{valueAsNumber:!0})}),h.jsx("p",{className:"text-muted-foreground text-xs",id:"count-description",children:a&&`Available capacity for ${a}: ${x}`}),h.jsx(it,{errors:[s.count]})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(qt,{disabled:R||i.isPending,onClick:()=>t({to:"/ec2/describe-instances"}),type:"button",variant:"outline",children:"Cancel"}),h.jsx(qt,{disabled:R||i.isPending||u.length===0,type:"submit",children:R||i.isPending?"Creating…":"Create Instance"})]})]})]})}export{Do as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/trash-2.js b/hive/services/hiveui/frontend/dist/assets/trash-2.js index 7b651d25b..bcae9a5bb 100644 --- a/hive/services/hiveui/frontend/dist/assets/trash-2.js +++ b/hive/services/hiveui/frontend/dist/assets/trash-2.js @@ -1 +1 @@ -import{g as a}from"./index.js";const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T}; +import{f as a}from"./index.js";const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T}; diff --git a/hive/services/hiveui/frontend/dist/assets/upload-button.js b/hive/services/hiveui/frontend/dist/assets/upload-button.js index cd4fb9729..7258eeb8d 100644 --- a/hive/services/hiveui/frontend/dist/assets/upload-button.js +++ b/hive/services/hiveui/frontend/dist/assets/upload-button.js @@ -1,4 +1,4 @@ -import{g as wt,aK as pr,aL as yr,aM as Q,aN as lt,aO as Ne,aP as mr,aQ as gr,aR as wr,aS as br,aT as Er,aU as xr,aV as vr,aW as _r,aX as Cr,aY as Sr,aZ as bt,a_ as ce,a$ as qe,b0 as Ar,b1 as Rr,b2 as Br,b3 as pe,b4 as ye,b5 as me,b6 as ge,b7 as Fr,b8 as Dr,b9 as Tr,ba as Mr,bb as Lr,bc as kr,bd as Nr,be as Pr,c as Ie,j as z,aE as Ir,bf as Ur,bg as Ee,bh as Or,bi as qr,bj as St,bk as er,bl as Et,r as tr,bm as jr,B as Hr}from"./index.js";import{a as Wr,b as Kr,c as $r,e as zr,d as Vr,h as Gr,f as Yr,g as Xr}from"./alert-dialog.js";import{D as Qr}from"./download.js";import{T as Zr}from"./trash-2.js";import{u as rr}from"./useMutation.js";const Jr=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],en=wt("file",Jr);const tn=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],rn=wt("folder",tn);const nn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],an=wt("upload",nn),on=typeof ReadableStream=="function"?ReadableStream:function(){};class sn extends on{}const un=({expectedChecksum:a,checksum:r,source:o,checksumSourceLocation:c,base64Encoder:p})=>{if(!pr(o))throw new Error(`@smithy/util-stream: unsupported source type ${o?.constructor?.name??o} in ChecksumStream.`);const l=p??yr;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const h=new TransformStream({start(){},async transform(d,b){r.update(d),b.enqueue(d)},async flush(d){const b=await r.digest(),D=l(b);if(a!==D){const R=new Error(`Checksum mismatch: expected "${a}" but received "${D}" in response header "${c}".`);d.error(R)}else d.terminate()}});o.pipeThrough(h);const i=h.readable;return Object.setPrototypeOf(i,sn.prototype),i};class ln{allocByteArray;byteLength=0;byteArrays=[];constructor(r){this.allocByteArray=r}push(r){this.byteArrays.push(r),this.byteLength+=r.byteLength}flush(){if(this.byteArrays.length===1){const c=this.byteArrays[0];return this.reset(),c}const r=this.allocByteArray(this.byteLength);let o=0;for(let c=0;cnew Uint8Array(b))];let i=-1;const d=async b=>{const{value:D,done:R}=await c.read(),B=D;if(R){if(i!==-1){const A=je(h,i);Ae(A)>0&&b.enqueue(A)}b.close()}else{const A=dn(B,!1);if(i!==A&&(i>=0&&b.enqueue(je(h,i)),i=A),i===-1){b.enqueue(B);return}const _=Ae(B);l+=_;const T=Ae(h[i]);if(_>=r&&T===0)b.enqueue(B);else{const F=hn(h,i,B);!p&&l>r*2&&(p=!0,o?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${r}, automatically buffering.`)),F>=r?b.enqueue(je(h,i)):await d(b)}}};return new ReadableStream({pull:d})}const cn=fn;function hn(a,r,o){switch(r){case 0:return a[0]+=o,Ae(a[0]);case 1:case 2:return a[r].push(o),Ae(a[r])}}function je(a,r){switch(r){case 0:const o=a[0];return a[0]="",o;case 1:case 2:return a[r].flush()}throw new Error(`@smithy/util-stream - invalid index ${r} given to flush()`)}function Ae(a){return a?.byteLength??a?.length??0}function dn(a,r=!0){return r&&typeof Buffer<"u"&&a instanceof Buffer?2:a instanceof Uint8Array?1:typeof a=="string"?0:-1}const ft=[Q.CRC32,Q.CRC32C,Q.CRC64NVME,Q.SHA1,Q.SHA256],pn=[Q.SHA256,Q.SHA1,Q.CRC32,Q.CRC32C,Q.CRC64NVME],yn=(a,{requestChecksumRequired:r,requestAlgorithmMember:o,requestChecksumCalculation:c})=>{if(!o)return c===Ne.WHEN_SUPPORTED||r?lt:void 0;if(!a[o])return;const p=a[o];if(!ft.includes(p))throw new Error(`The checksum algorithm "${p}" is not supported by the client. Select one of ${ft}.`);return p},xt=a=>a===Q.MD5?"content-md5":`x-amz-checksum-${a.toLowerCase()}`,mn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(o===c.toLowerCase())return!0;return!1},gn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(c.toLowerCase().startsWith(o))return!0;return!1},nr=a=>a!==void 0&&typeof a!="string"&&!ArrayBuffer.isView(a)&&!mr(a);var wn=(function(){function a(){this.crc32c=new At}return a.prototype.update=function(r){gr(r)||this.crc32c.update(wr(r))},a.prototype.digest=function(){return br(this,void 0,void 0,function(){return Er(this,function(r){return[2,xr(this.crc32c.digest())]})})},a.prototype.reset=function(){this.crc32c=new At},a})(),At=(function(){function a(){this.checksum=4294967295}return a.prototype.update=function(r){var o,c;try{for(var p=vr(r),l=p.next();!l.done;l=p.next()){var h=l.value;this.checksum=this.checksum>>>8^En[(this.checksum^h)&255]}}catch(i){o={error:i}}finally{try{l&&!l.done&&(c=p.return)&&c.call(p)}finally{if(o)throw o.error}}return this},a.prototype.digest=function(){return(this.checksum^4294967295)>>>0},a})(),bn=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],En=_r(bn);const xn=()=>{const r=new Array(8);for(let o=0;o<8;o++){const c=new Array(512);for(let p=0;p<256;p++){let l=BigInt(p);for(let h=0;h<8*(o+1);h++)l&1n?l=l>>1n^0x9a6c9329ac4bc9b5n:l=l>>1n;c[p*2]=Number(l>>32n&0xffffffffn),c[p*2+1]=Number(l&0xffffffffn)}r[o]=new Uint32Array(c)}return r};let He,Se,ct,ht,dt,pt,yt,mt,gt;const vn=()=>{He||(He=xn(),[Se,ct,ht,dt,pt,yt,mt,gt]=He)};class _n{c1=0;c2=0;constructor(){vn(),this.reset()}update(r){const o=r.length;let c=0,p=this.c1,l=this.c2;for(;c+8<=o;){const h=((l^r[c++])&255)<<1,i=((l>>>8^r[c++])&255)<<1,d=((l>>>16^r[c++])&255)<<1,b=((l>>>24^r[c++])&255)<<1,D=((p^r[c++])&255)<<1,R=((p>>>8^r[c++])&255)<<1,B=((p>>>16^r[c++])&255)<<1,A=((p>>>24^r[c++])&255)<<1;p=gt[h]^mt[i]^yt[d]^pt[b]^dt[D]^ht[R]^ct[B]^Se[A],l=gt[h+1]^mt[i+1]^yt[d+1]^pt[b+1]^dt[D+1]^ht[R+1]^ct[B+1]^Se[A+1]}for(;c>>8|(p&255)<<24)>>>0,p=p>>>8^Se[h],l^=Se[h+1],c++}this.c1=p,this.c2=l}async digest(){const r=this.c1^4294967295,o=this.c2^4294967295;return new Uint8Array([r>>>24,r>>>16&255,r>>>8&255,r&255,o>>>24,o>>>16&255,o>>>8&255,o&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const Cn=()=>Cr,ir=(a,r)=>{switch(a){case Q.MD5:return r.md5;case Q.CRC32:return Cn();case Q.CRC32C:return wn;case Q.CRC64NVME:return _n;case Q.SHA1:return r.sha1;case Q.SHA256:return r.sha256;default:throw new Error(`Unsupported checksum algorithm: ${a}`)}},ar=(a,r)=>{const o=new a;return o.update(Sr(r||"")),o.digest()},Sn={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},An=(a,r)=>(o,c)=>async p=>{if(!bt.isInstance(p.request)||gn("x-amz-checksum-",p.request.headers))return o(p);const{request:l,input:h}=p,{body:i,headers:d}=l,{base64Encoder:b,streamHasher:D}=a,{requestChecksumRequired:R,requestAlgorithmMember:B}=r,A=await a.requestChecksumCalculation(),_=B?.name,T=B?.httpHeader;_&&!h[_]&&(A===Ne.WHEN_SUPPORTED||R)&&(h[_]=lt,T&&(d[T]=lt));const F=yn(h,{requestChecksumRequired:R,requestAlgorithmMember:B?.name,requestChecksumCalculation:A});let y=i,v=d;if(F){switch(F){case Q.CRC32:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Q.CRC32C:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Q.CRC64NVME:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Q.SHA1:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Q.SHA256:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const S=xt(F),m=ir(F,a);if(nr(i)){const{getAwsChunkedEncodingStream:g,bodyLengthChecker:C}=a;y=g(typeof a.requestStreamBufferSize=="number"&&a.requestStreamBufferSize>=8*1024?cn(i,a.requestStreamBufferSize,c.logger):i,{base64Encoder:b,bodyLengthChecker:C,checksumLocationName:S,checksumAlgorithmFn:m,streamHasher:D}),v={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":S},delete v["content-length"]}else if(!mn(S,d)){const g=await ar(m,i);v={...d,[S]:b(g)}}}try{return await o({...p,request:{...l,headers:v,body:y}})}catch(S){if(S instanceof Error&&S.name==="InvalidChunkSizeError")try{S.message.endsWith(".")||(S.message+="."),S.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw S}},Rn={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},Bn=(a,r)=>(o,c)=>async p=>{const l=p.input,{requestValidationModeMember:h}=r,i=await a.requestChecksumCalculation(),d=await a.responseChecksumValidation();switch(i){case Ne.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Ne.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(d){case qe.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case qe.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return h&&!l[h]&&d===qe.WHEN_SUPPORTED&&(l[h]="ENABLED"),o(p)},or=(a=[])=>{const r=[];for(const o of pn)!a.includes(o)||!ft.includes(o)||r.push(o);return r},Fn=a=>{const r=a.lastIndexOf("-");if(r!==-1){const o=a.slice(r+1);if(!o.startsWith("0")){const c=parseInt(o,10);if(!isNaN(c)&&c>=1&&c<=1e4)return!0}}return!1},Dn=async(a,{checksumAlgorithmFn:r,base64Encoder:o})=>o(await ar(r,a)),Tn=async(a,{config:r,responseAlgorithms:o,logger:c})=>{const p=or(o),{body:l,headers:h}=a;for(const i of p){const d=xt(i),b=h[d];if(b){let D;try{D=ir(i,r)}catch(A){if(i===Q.CRC64NVME){c?.warn(`Skipping ${Q.CRC64NVME} checksum validation: ${A.message}`);continue}throw A}const{base64Encoder:R}=r;if(nr(l)){a.body=un({expectedChecksum:b,checksumSourceLocation:d,checksum:new D,source:l,base64Encoder:R});return}const B=await Dn(l,{checksumAlgorithmFn:D,base64Encoder:R});if(B===b)break;throw new Error(`Checksum mismatch: expected "${B}" but received "${b}" in response header "${d}".`)}}},Mn={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Ln=(a,r)=>(o,c)=>async p=>{if(!bt.isInstance(p.request))return o(p);const l=p.input,h=await o(p),i=h.response,{requestValidationModeMember:d,responseAlgorithms:b}=r;if(d&&l[d]==="ENABLED"){const{clientName:D,commandName:R}=c;if(D==="S3Client"&&R==="GetObjectCommand"&&or(b).every(A=>{const _=xt(A),T=i.headers[_];return!T||Fn(T)}))return h;await Tn(i,{config:a,responseAlgorithms:b,logger:c.logger})}return h},Ue=(a,r)=>({applyToStack:o=>{o.add(An(a,r),Sn),o.addRelativeTo(Bn(a,r),Rn),o.addRelativeTo(Ln(a,r),Mn)}}),kn="content-length",Nn="x-amz-decoded-content-length";function Pn(){return(a,r)=>async o=>{const{request:c}=o;if(bt.isInstance(c)&&!(kn in c.headers)&&!(Nn in c.headers)){const p="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof r?.logger?.warn=="function"&&!(r.logger instanceof Ar)?r.logger.warn(p):console.warn(p)}return a({...o})}}const In={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Un=a=>({applyToStack:r=>{r.add(Pn(),In)}}),On=a=>(r,o)=>async c=>{const p=await r(c),{response:l}=p;if(Rr.isInstance(l)&&l.headers.expires){l.headers.expiresstring=l.headers.expires;try{Br(l.headers.expires)}catch(h){o.logger?.warn(`AWS SDK Warning for ${o.clientName}::${o.commandName} response parsing (${l.headers.expires}): ${h}`),delete l.headers.expires}}return p},qn={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},jn=a=>({applyToStack:r=>{r.addRelativeTo(On(),qn)}});class Hn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Fr).build(){}function Wn(a){return r=>async o=>{const c={...o.input},p=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const l of p){const h=c[l.target];if(h){let i;typeof h=="string"?$n(h,a)?i=a.base64Decoder(h):(i=a.utf8Decoder(h),c[l.target]=a.base64Encoder(i)):(i=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),c[l.target]=a.base64Encoder(i));const d=new a.md5;d.update(i),c[l.hash]=a.base64Encoder(await d.digest())}}return r({...o,input:c})}}const Kn={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Be=a=>({applyToStack:r=>{r.add(Wn(a),Kn)}});function $n(a,r){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))return!1;try{return r.base64Decoder(a).length===32}catch{return!1}}class zn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Dr).build(){}class Vn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(Tr).build(){}class Gn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Mr).build(){}class Yn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Be(c),jn()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Lr).build(){}class Rt extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Un(),ge(c),Be(c)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(kr).build(){}class Xn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),ge(c)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").sc(Nr).build(){}class Qn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),ge(c),Be(c)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(Pr).build(){}const Zn={CRC32:"CRC32"};function Ri(a){const r=Ie.c(9),{folderName:o,fullPrefix:c,bucketName:p}=a;let l;r[0]!==p||r[1]!==c?(l={bucket:p,_splat:c},r[0]=p,r[1]=c,r[2]=l):l=r[2];let h;r[3]===Symbol.for("react.memo_cache_sentinel")?(h=z.jsx(rn,{className:"size-5 text-muted-foreground"}),r[3]=h):h=r[3];let i;r[4]!==o?(i=z.jsx("span",{className:"font-medium",children:o}),r[4]=o,r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==i?(d=z.jsxs(Ir,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:l,to:"/s3/ls/$bucket/$",children:[h,i]}),r[6]=l,r[7]=i,r[8]=d):d=r[8],d}class Jn{onabort=null;_aborted=!1;constructor(){Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class ei{signal=new Jn;abort(){this.signal.abort()}}var De={exports:{}},Bt;function Oe(){if(Bt)return De.exports;Bt=1;var a=typeof Reflect=="object"?Reflect:null,r=a&&typeof a.apply=="function"?a.apply:function(g,C,I){return Function.prototype.apply.call(g,C,I)},o;a&&typeof a.ownKeys=="function"?o=a.ownKeys:Object.getOwnPropertySymbols?o=function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:o=function(g){return Object.getOwnPropertyNames(g)};function c(m){console&&console.warn&&console.warn(m)}var p=Number.isNaN||function(g){return g!==g};function l(){l.init.call(this)}De.exports=l,De.exports.once=y,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function i(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(m){if(typeof m!="number"||m<0||p(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");h=m}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(g){if(typeof g!="number"||g<0||p(g))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+g+".");return this._maxListeners=g,this};function d(m){return m._maxListeners===void 0?l.defaultMaxListeners:m._maxListeners}l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(g){for(var C=[],I=1;I0&&(q=C[0]),q instanceof Error)throw q;var G=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw G.context=q,G}var ee=U[g];if(ee===void 0)return!1;if(typeof ee=="function")r(ee,this,C);else for(var re=ee.length,ne=_(ee,re),I=0;I0&&q.length>P&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(g)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=m,G.type=g,G.count=q.length,c(G)}return m}l.prototype.addListener=function(g,C){return b(this,g,C,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(g,C){return b(this,g,C,!0)};function D(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(m,g,C){var I={fired:!1,wrapFn:void 0,target:m,type:g,listener:C},P=D.bind(I);return P.listener=C,I.wrapFn=P,P}l.prototype.once=function(g,C){return i(C),this.on(g,R(this,g,C)),this},l.prototype.prependOnceListener=function(g,C){return i(C),this.prependListener(g,R(this,g,C)),this},l.prototype.removeListener=function(g,C){var I,P,U,q,G;if(i(C),P=this._events,P===void 0)return this;if(I=P[g],I===void 0)return this;if(I===C||I.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete P[g],P.removeListener&&this.emit("removeListener",g,I.listener||C));else if(typeof I!="function"){for(U=-1,q=I.length-1;q>=0;q--)if(I[q]===C||I[q].listener===C){G=I[q].listener,U=q;break}if(U<0)return this;U===0?I.shift():T(I,U),I.length===1&&(P[g]=I[0]),P.removeListener!==void 0&&this.emit("removeListener",g,G||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(g){var C,I,P;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[g]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[g]),this;if(arguments.length===0){var U=Object.keys(I),q;for(P=0;P=0;P--)this.removeListener(g,C[P]);return this};function B(m,g,C){var I=m._events;if(I===void 0)return[];var P=I[g];return P===void 0?[]:typeof P=="function"?C?[P.listener||P]:[P]:C?F(P):_(P,P.length)}l.prototype.listeners=function(g){return B(this,g,!0)},l.prototype.rawListeners=function(g){return B(this,g,!1)},l.listenerCount=function(m,g){return typeof m.listenerCount=="function"?m.listenerCount(g):A.call(m,g)},l.prototype.listenerCount=A;function A(m){var g=this._events;if(g!==void 0){var C=g[m];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function _(m,g){for(var C=new Array(g),I=0;I0)throw new Error("Invalid string. Length must be a multiple of 4");var T=A.indexOf("=");T===-1&&(T=_);var F=T===_?0:4-T%4;return[T,F]}function i(A){var _=h(A),T=_[0],F=_[1];return(T+F)*3/4-F}function d(A,_,T){return(_+T)*3/4-T}function b(A){var _,T=h(A),F=T[0],y=T[1],v=new o(d(A,F,y)),S=0,m=y>0?F-4:F,g;for(g=0;g>16&255,v[S++]=_>>8&255,v[S++]=_&255;return y===2&&(_=r[A.charCodeAt(g)]<<2|r[A.charCodeAt(g+1)]>>4,v[S++]=_&255),y===1&&(_=r[A.charCodeAt(g)]<<10|r[A.charCodeAt(g+1)]<<4|r[A.charCodeAt(g+2)]>>2,v[S++]=_>>8&255,v[S++]=_&255),v}function D(A){return a[A>>18&63]+a[A>>12&63]+a[A>>6&63]+a[A&63]}function R(A,_,T){for(var F,y=[],v=_;vm?m:S+v));return F===1?(_=A[T-1],y.push(a[_>>2]+a[_<<4&63]+"==")):F===2&&(_=(A[T-2]<<8)+A[T-1],y.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),y.join("")}return Ce}var Te={};var Dt;function ri(){return Dt||(Dt=1,Te.read=function(a,r,o,c,p){var l,h,i=p*8-c-1,d=(1<>1,D=-7,R=o?p-1:0,B=o?-1:1,A=a[r+R];for(R+=B,l=A&(1<<-D)-1,A>>=-D,D+=i;D>0;l=l*256+a[r+R],R+=B,D-=8);for(h=l&(1<<-D)-1,l>>=-D,D+=c;D>0;h=h*256+a[r+R],R+=B,D-=8);if(l===0)l=1-b;else{if(l===d)return h?NaN:(A?-1:1)*(1/0);h=h+Math.pow(2,c),l=l-b}return(A?-1:1)*h*Math.pow(2,l-c)},Te.write=function(a,r,o,c,p,l){var h,i,d,b=l*8-p-1,D=(1<>1,B=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=c?0:l-1,_=c?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(i=isNaN(r)?1:0,h=D):(h=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+R>=1?r+=B/d:r+=B*Math.pow(2,1-R),r*d>=2&&(h++,d/=2),h+R>=D?(i=0,h=D):h+R>=1?(i=(r*d-1)*Math.pow(2,p),h=h+R):(i=r*Math.pow(2,R-1)*Math.pow(2,p),h=0));p>=8;a[o+A]=i&255,A+=_,i/=256,p-=8);for(h=h<0;a[o+A]=h&255,A+=_,h/=256,b-=8);a[o+A-_]|=T*128}),Te}var Tt;function Fe(){return Tt||(Tt=1,(function(a){var r=ti(),o=ri(),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=y,a.INSPECT_MAX_BYTES=50;var p=2147483647;a.kMaxLength=p,i.TYPED_ARRAY_SUPPORT=l(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),n.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function h(n){if(n>p)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,i.prototype),e}function i(n,e,t){if(typeof n=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(n)}return d(n,e,t)}i.poolSize=8192;function d(n,e,t){if(typeof n=="string")return B(n,e);if(ArrayBuffer.isView(n))return A(n);if(n==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(M(n,ArrayBuffer)||n&&M(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(n,SharedArrayBuffer)||n&&M(n.buffer,SharedArrayBuffer)))return _(n,e,t);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var u=n.valueOf&&n.valueOf();if(u!=null&&u!==n)return i.from(u,e,t);var w=T(n);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return i.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}i.from=function(n,e,t){return d(n,e,t)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function b(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function D(n,e,t){return b(n),n<=0?h(n):e!==void 0?typeof t=="string"?h(n).fill(e,t):h(n).fill(e):h(n)}i.alloc=function(n,e,t){return D(n,e,t)};function R(n){return b(n),h(n<0?0:F(n)|0)}i.allocUnsafe=function(n){return R(n)},i.allocUnsafeSlow=function(n){return R(n)};function B(n,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=v(n,e)|0,u=h(t),w=u.write(n,e);return w!==t&&(u=u.slice(0,w)),u}function A(n){for(var e=n.length<0?0:F(n.length)|0,t=h(e),u=0;u=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return n|0}function y(n){return+n!=n&&(n=0),i.alloc(+n)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,t){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var u=e.length,w=t.length,L=0,k=Math.min(u,w);L2&&arguments[2]===!0;if(!u&&t===0)return 0;for(var w=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return N(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return s(n).length;default:if(w)return u?-1:N(n).length;e=(""+e).toLowerCase(),w=!0}}i.byteLength=v;function S(n,e,t){var u=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(n||(n="utf8");;)switch(n){case"hex":return ue(this,e,t);case"utf8":case"utf-8":return ne(this,e,t);case"ascii":return ae(this,e,t);case"latin1":case"binary":return he(this,e,t);case"base64":return re(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,e,t);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),u=!0}}i.prototype._isBuffer=!0;function m(n,e,t){var u=n[e];n[e]=n[t],n[t]=u}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},c&&(i.prototype[c]=i.prototype.inspect),i.prototype.compare=function(e,t,u,w,L){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),u===void 0&&(u=e?e.length:0),w===void 0&&(w=0),L===void 0&&(L=this.length),t<0||u>e.length||w<0||L>this.length)throw new RangeError("out of range index");if(w>=L&&t>=u)return 0;if(w>=L)return-1;if(t>=u)return 1;if(t>>>=0,u>>>=0,w>>>=0,L>>>=0,this===e)return 0;for(var k=L-w,W=u-t,K=Math.min(k,W),V=this.slice(w,L),J=e.slice(t,u),$=0;$2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,O(t)&&(t=w?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(w)return-1;t=n.length-1}else if(t<0)if(w)t=0;else return-1;if(typeof e=="string"&&(e=i.from(e,u)),i.isBuffer(e))return e.length===0?-1:C(n,e,t,u,w);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):C(n,[e],t,u,w);throw new TypeError("val must be string, number or Buffer")}function C(n,e,t,u,w){var L=1,k=n.length,W=e.length;if(u!==void 0&&(u=String(u).toLowerCase(),u==="ucs2"||u==="ucs-2"||u==="utf16le"||u==="utf-16le")){if(n.length<2||e.length<2)return-1;L=2,k/=2,W/=2,t/=2}function K(_t,Ct){return L===1?_t[Ct]:_t.readUInt16BE(Ct*L)}var V;if(w){var J=-1;for(V=t;Vk&&(t=k-W),V=t;V>=0;V--){for(var $=!0,se=0;sew&&(u=w)):u=w;var L=e.length;u>L/2&&(u=L/2);for(var k=0;k>>0,isFinite(u)?(u=u>>>0,w===void 0&&(w="utf8")):(w=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-t;if((u===void 0||u>L)&&(u=L),e.length>0&&(u<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var k=!1;;)switch(w){case"hex":return I(this,e,t,u);case"utf8":case"utf-8":return P(this,e,t,u);case"ascii":return U(this,e,t,u);case"latin1":case"binary":return q(this,e,t,u);case"base64":return G(this,e,t,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,e,t,u);default:if(k)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),k=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(n,e,t){return e===0&&t===n.length?r.fromByteArray(n):r.fromByteArray(n.slice(e,t))}function ne(n,e,t){t=Math.min(n.length,t);for(var u=[],w=e;w239?4:L>223?3:L>191?2:1;if(w+W<=t){var K,V,J,$;switch(W){case 1:L<128&&(k=L);break;case 2:K=n[w+1],(K&192)===128&&($=(L&31)<<6|K&63,$>127&&(k=$));break;case 3:K=n[w+1],V=n[w+2],(K&192)===128&&(V&192)===128&&($=(L&15)<<12|(K&63)<<6|V&63,$>2047&&($<55296||$>57343)&&(k=$));break;case 4:K=n[w+1],V=n[w+2],J=n[w+3],(K&192)===128&&(V&192)===128&&(J&192)===128&&($=(L&15)<<18|(K&63)<<12|(V&63)<<6|J&63,$>65535&&$<1114112&&(k=$))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,u.push(k>>>10&1023|55296),k=56320|k&1023),u.push(k),w+=W}return oe(u)}var ie=4096;function oe(n){var e=n.length;if(e<=ie)return String.fromCharCode.apply(String,n);for(var t="",u=0;uu)&&(t=u);for(var w="",L=e;Lu&&(e=u),t<0?(t+=u,t<0&&(t=0)):t>u&&(t=u),tt)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e],L=1,k=0;++k>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e+--t],L=1;t>0&&(L*=256);)w+=this[e+--t]*L;return w},i.prototype.readUInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e],L=1,k=0;++k=L&&(w-=Math.pow(2,8*t)),w},i.prototype.readIntBE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=t,L=1,k=this[e+--w];w>0&&(L*=256);)k+=this[e+--w]*L;return L*=128,k>=L&&(k-=Math.pow(2,8*t)),k},i.prototype.readInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e]|this[e+1]<<8;return u&32768?u|4294901760:u},i.prototype.readInt16BE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e+1]|this[e]<<8;return u&32768?u|4294901760:u},i.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!1,52,8)};function Z(n,e,t,u,w,L){if(!i.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>w||en.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(e,t,u,w){if(e=+e,t=t>>>0,u=u>>>0,!w){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=1,W=0;for(this[t]=e&255;++W>>0,u=u>>>0,!w){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=u-1,W=1;for(this[t+k]=e&255;--k>=0&&(W*=256);)this[t+k]=e/W&255;return t+u},i.prototype.writeUInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,255,0),this[t]=e&255,t+1},i.prototype.writeUInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeUInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},i.prototype.writeUInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},i.prototype.writeIntLE=function(e,t,u,w){if(e=+e,t=t>>>0,!w){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=0,W=1,K=0;for(this[t]=e&255;++k>0)-K&255;return t+u},i.prototype.writeIntBE=function(e,t,u,w){if(e=+e,t=t>>>0,!w){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=u-1,W=1,K=0;for(this[t+k]=e&255;--k>=0&&(W*=256);)e<0&&K===0&&this[t+k+1]!==0&&(K=1),this[t+k]=(e/W>>0)-K&255;return t+u},i.prototype.writeInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},i.prototype.writeInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function te(n,e,t,u,w,L){if(t+u>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function we(n,e,t,u,w){return e=+e,t=t>>>0,w||te(n,e,t,4),o.write(n,e,t,u,23,4),t+4}i.prototype.writeFloatLE=function(e,t,u){return we(this,e,t,!0,u)},i.prototype.writeFloatBE=function(e,t,u){return we(this,e,t,!1,u)};function be(n,e,t,u,w){return e=+e,t=t>>>0,w||te(n,e,t,8),o.write(n,e,t,u,52,8),t+8}i.prototype.writeDoubleLE=function(e,t,u){return be(this,e,t,!0,u)},i.prototype.writeDoubleBE=function(e,t,u){return be(this,e,t,!1,u)},i.prototype.copy=function(e,t,u,w){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(u||(u=0),!w&&w!==0&&(w=this.length),t>=e.length&&(t=e.length),t||(t=0),w>0&&w=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),e.length-t=0;--k)e[k+t]=this[k+u];else Uint8Array.prototype.set.call(e,this.subarray(u,w),t);return L},i.prototype.fill=function(e,t,u,w){if(typeof e=="string"){if(typeof t=="string"?(w=t,t=0,u=this.length):typeof u=="string"&&(w=u,u=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!i.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(e.length===1){var L=e.charCodeAt(0);(w==="utf8"&&L<128||w==="latin1")&&(e=L)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length>>0,u=u===void 0?this.length:u>>>0,e||(e=0);var k;if(typeof e=="number")for(k=t;k55295&&t<57344){if(!w){if(t>56319){(e-=3)>-1&&L.push(239,191,189);continue}else if(k+1===u){(e-=3)>-1&&L.push(239,191,189);continue}w=t;continue}if(t<56320){(e-=3)>-1&&L.push(239,191,189),w=t;continue}t=(w-55296<<10|t-56320)+65536}else w&&(e-=3)>-1&&L.push(239,191,189);if(w=null,t<128){if((e-=1)<0)break;L.push(t)}else if(t<2048){if((e-=2)<0)break;L.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;L.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;L.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return L}function j(n){for(var e=[],t=0;t>8,w=t%256,L.push(w),L.push(u);return L}function s(n){return r.toByteArray(E(n))}function f(n,e,t,u){for(var w=0;w=e.length||w>=n.length);++w)e[w+t]=n[w];return w}function M(n,e){return n instanceof e||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===e.name}function O(n){return n!==n}var X=(function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var u=t*16,w=0;w<16;++w)e[u+w]=n[t]+n[w];return e})()})(Ke)),Ke}var de=Fe();const ni={lstatSync:()=>{},isFileReadStream(a){return!1}},Pe={...ni,runtime:"browser"},Me=a=>{if(a==null)return 0;if(typeof a=="string")return de.Buffer.byteLength(a);if(typeof a.byteLength=="number")return a.byteLength;if(typeof a.length=="number")return a.length;if(typeof a.size=="number")return a.size;if(typeof a.start=="number"&&typeof a.end=="number")return a.end+1-a.start;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size}catch{return}};var le;(function(a){a.EMPTY_INPUT="a null or undefined Body",a.CONTENT_LENGTH="the ContentLength property of the params set by the caller",a.STRING_LENGTH="the encoded byte length of the Body string",a.TYPED_ARRAY="the byteLength of a typed byte array such as Uint8Array",a.LENGTH="the value of Body.length",a.SIZE="the value of Body.size",a.START_END_DIFF="the numeric difference between Body.start and Body.end",a.LSTAT="the size of the file given by Body.path on disk as reported by lstatSync"})(le||(le={}));const ii=(a,r)=>{if(r!=null)return le.CONTENT_LENGTH;if(a==null)return le.EMPTY_INPUT;if(typeof a=="string")return le.STRING_LENGTH;if(typeof a.byteLength=="number")return le.TYPED_ARRAY;if(typeof a.length=="number")return le.LENGTH;if(typeof a.size=="number")return le.SIZE;if(typeof a.start=="number"&&typeof a.end=="number")return le.START_END_DIFF;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size,le.LSTAT}catch{return}};var Le={exports:{}},Mt;function ve(){return Mt||(Mt=1,typeof Object.create=="function"?Le.exports=function(r,o){o&&(r.super_=o,r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Le.exports=function(r,o){if(o){r.super_=o;var c=function(){};c.prototype=o.prototype,r.prototype=new c,r.prototype.constructor=r}}),Le.exports}var $e,Lt;function sr(){return Lt||(Lt=1,$e=Oe().EventEmitter),$e}const ai={},oi=Object.freeze(Object.defineProperty({__proto__:null,default:ai},Symbol.toStringTag,{value:"Module"})),ur=Ur(oi);var ze,kt;function si(){if(kt)return ze;kt=1;function a(_,T){var F=Object.keys(_);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(_);T&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(_,v).enumerable})),F.push.apply(F,y)}return F}function r(_){for(var T=1;T0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(F){var y={data:F,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var F=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=F+y.data;return v}},{key:"concat",value:function(F){if(this.length===0)return b.alloc(0);for(var y=b.allocUnsafe(F>>>0),v=this.head,S=0;v;)A(v.data,y,S),S+=v.data.length,v=v.next;return y}},{key:"consume",value:function(F,y){var v;return Fm.length?m.length:F;if(g===m.length?S+=m:S+=m.slice(0,F),F-=g,F===0){g===m.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=m.slice(g));break}++v}return this.length-=v,S}},{key:"_getBuffer",value:function(F){var y=b.allocUnsafe(F),v=this.head,S=1;for(v.data.copy(y),F-=v.data.length;v=v.next;){var m=v.data,g=F>m.length?m.length:F;if(m.copy(y,y.length-F,0,g),F-=g,F===0){g===m.length?(++S,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=m.slice(g));break}++S}return this.length-=S,y}},{key:B,value:function(F,y){return R(this,r(r({},y),{},{depth:0,customInspect:!1}))}}]),_})(),ze}var Ve,Nt;function lr(){if(Nt)return Ve;Nt=1;function a(h,i){var d=this,b=this._readableState&&this._readableState.destroyed,D=this._writableState&&this._writableState.destroyed;return b||D?(i?i(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(p,this,h)):process.nextTick(p,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!i&&R?d._writableState?d._writableState.errorEmitted?process.nextTick(o,d):(d._writableState.errorEmitted=!0,process.nextTick(r,d,R)):process.nextTick(r,d,R):i?(process.nextTick(o,d),i(R)):process.nextTick(o,d)}),this)}function r(h,i){p(h,i),o(h)}function o(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function c(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(h,i){h.emit("error",i)}function l(h,i){var d=h._readableState,b=h._writableState;d&&d.autoDestroy||b&&b.autoDestroy?h.destroy(i):h.emit("error",i)}return Ve={destroy:a,undestroy:c,errorOrDestroy:l},Ve}var Ge={},Pt;function _e(){if(Pt)return Ge;Pt=1;function a(i,d){i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.__proto__=d}var r={};function o(i,d,b){b||(b=Error);function D(B,A,_){return typeof d=="string"?d:d(B,A,_)}var R=(function(B){a(A,B);function A(_,T,F){return B.call(this,D(_,T,F))||this}return A})(b);R.prototype.name=b.name,R.prototype.code=i,r[i]=R}function c(i,d){if(Array.isArray(i)){var b=i.length;return i=i.map(function(D){return String(D)}),b>2?"one of ".concat(d," ").concat(i.slice(0,b-1).join(", "),", or ")+i[b-1]:b===2?"one of ".concat(d," ").concat(i[0]," or ").concat(i[1]):"of ".concat(d," ").concat(i[0])}else return"of ".concat(d," ").concat(String(i))}function p(i,d,b){return i.substr(0,d.length)===d}function l(i,d,b){return(b===void 0||b>i.length)&&(b=i.length),i.substring(b-d.length,b)===d}function h(i,d,b){return typeof b!="number"&&(b=0),b+d.length>i.length?!1:i.indexOf(d,b)!==-1}return o("ERR_INVALID_OPT_VALUE",function(i,d){return'The value "'+d+'" is invalid for option "'+i+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(i,d,b){var D;typeof d=="string"&&p(d,"not ")?(D="must not be",d=d.replace(/^not /,"")):D="must be";var R;if(l(i," argument"))R="The ".concat(i," ").concat(D," ").concat(c(d,"type"));else{var B=h(i,".")?"property":"argument";R='The "'.concat(i,'" ').concat(B," ").concat(D," ").concat(c(d,"type"))}return R+=". Received type ".concat(typeof b),R},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.codes=r,Ge}var Ye,It;function fr(){if(It)return Ye;It=1;var a=_e().codes.ERR_INVALID_OPT_VALUE;function r(c,p,l){return c.highWaterMark!=null?c.highWaterMark:p?c[l]:null}function o(c,p,l,h){var i=r(p,h,l);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var d=h?l:"highWaterMark";throw new a(d,i)}return Math.floor(i)}return c.objectMode?16:16*1024}return Ye={getHighWaterMark:o},Ye}var Xe,Ut;function ui(){if(Ut)return Xe;Ut=1,Xe=a;function a(o,c){if(r("noDeprecation"))return o;var p=!1;function l(){if(!p){if(r("throwDeprecation"))throw new Error(c);r("traceDeprecation")?console.trace(c):console.warn(c),p=!0}return o.apply(this,arguments)}return l}function r(o){try{if(!Ee.localStorage)return!1}catch{return!1}var c=Ee.localStorage[o];return c==null?!1:String(c).toLowerCase()==="true"}return Xe}var Qe,Ot;function cr(){if(Ot)return Qe;Ot=1,Qe=P;function a(x){var E=this;this.next=null,this.entry=null,this.finish=function(){be(E,x)}}var r;P.WritableState=C;var o={deprecate:ui()},c=sr(),p=Fe().Buffer,l=(typeof Ee<"u"?Ee:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(x){return p.from(x)}function i(x){return p.isBuffer(x)||x instanceof l}var d=lr(),b=fr(),D=b.getHighWaterMark,R=_e().codes,B=R.ERR_INVALID_ARG_TYPE,A=R.ERR_METHOD_NOT_IMPLEMENTED,_=R.ERR_MULTIPLE_CALLBACK,T=R.ERR_STREAM_CANNOT_PIPE,F=R.ERR_STREAM_DESTROYED,y=R.ERR_STREAM_NULL_VALUES,v=R.ERR_STREAM_WRITE_AFTER_END,S=R.ERR_UNKNOWN_ENCODING,m=d.errorOrDestroy;ve()(P,c);function g(){}function C(x,E,N){r=r||xe(),x=x||{},typeof N!="boolean"&&(N=E instanceof r),this.objectMode=!!x.objectMode,N&&(this.objectMode=this.objectMode||!!x.writableObjectMode),this.highWaterMark=D(this,x,"writableHighWaterMark",N),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=x.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){oe(E,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}C.prototype.getBuffer=function(){for(var E=this.bufferedRequest,N=[];E;)N.push(E),E=E.next;return N},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(E){return I.call(this,E)?!0:this!==P?!1:E&&E._writableState instanceof C}})):I=function(E){return E instanceof this};function P(x){r=r||xe();var E=this instanceof r;if(!E&&!I.call(P,this))return new P(x);this._writableState=new C(x,this,E),this.writable=!0,x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final)),c.call(this)}P.prototype.pipe=function(){m(this,new T)};function U(x,E){var N=new v;m(x,N),process.nextTick(E,N)}function q(x,E,N,j){var H;return N===null?H=new y:typeof N!="string"&&!E.objectMode&&(H=new B("chunk",["string","Buffer"],N)),H?(m(x,H),process.nextTick(j,H),!1):!0}P.prototype.write=function(x,E,N){var j=this._writableState,H=!1,s=!j.objectMode&&i(x);return s&&!p.isBuffer(x)&&(x=h(x)),typeof E=="function"&&(N=E,E=null),s?E="buffer":E||(E=j.defaultEncoding),typeof N!="function"&&(N=g),j.ending?U(this,N):(s||q(this,j,x,N))&&(j.pendingcb++,H=ee(this,j,s,x,E,N)),H},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var x=this._writableState;x.corked&&(x.corked--,!x.writing&&!x.corked&&!x.bufferProcessing&&x.bufferedRequest&&ue(this,x))},P.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=E.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((E+"").toLowerCase())>-1))throw new S(E);return this._writableState.defaultEncoding=E,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(x,E,N){return!x.objectMode&&x.decodeStrings!==!1&&typeof E=="string"&&(E=p.from(E,N)),E}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(x,E,N,j,H,s){if(!N){var f=G(E,j,H);j!==f&&(N=!0,H="buffer",j=f)}var M=E.objectMode?1:j.length;E.length+=M;var O=E.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function h(y,v,S){var m=v.length-1;if(m=0?(g>0&&(y.lastNeed=g-1),g):--m=0?(g>0&&(y.lastNeed=g-2),g):--m=0?(g>0&&(g===2?g=0:y.lastNeed=g-3),g):0))}function i(y,v,S){if((v[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return y.lastNeed=2,"�"}}function d(y){var v=this.lastTotal-this.lastNeed,S=i(this,y);if(S!==void 0)return S;if(this.lastNeed<=y.length)return y.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,v,0,y.length),this.lastNeed-=y.length}function b(y,v){var S=h(this,y,v);if(!this.lastNeed)return y.toString("utf8",v);this.lastTotal=S;var m=y.length-(S-this.lastNeed);return y.copy(this.lastChar,0,m),y.toString("utf8",v,m)}function D(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+"�":v}function R(y,v){if((y.length-v)%2===0){var S=y.toString("utf16le",v);if(S){var m=S.charCodeAt(S.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",v,y.length-1)}function B(y){var v=y&&y.length?this.write(y):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,S)}return v}function A(y,v){var S=(y.length-v)%3;return S===0?y.toString("base64",v):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",v,y.length-S))}function _(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function T(y){return y.toString(this.encoding)}function F(y){return y&&y.length?this.write(y):""}return Je}var et,Kt;function vt(){if(Kt)return et;Kt=1;var a=_e().codes.ERR_STREAM_PREMATURE_CLOSE;function r(l){var h=!1;return function(){if(!h){h=!0;for(var i=arguments.length,d=new Array(i),b=0;b0)if(typeof f!="string"&&!n.objectMode&&Object.getPrototypeOf(f)!==c.prototype&&(f=l(f)),O)n.endEmitted?g(s,new y):G(s,n,f,!0);else if(n.ended)g(s,new T);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!M?(f=n.decoder.write(f),n.objectMode||f.length!==0?G(s,n,f,!1):ue(s,n)):G(s,n,f,!1)}else O||(n.reading=!1,ue(s,n))}return!n.ended&&(n.length=re?s=re:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}function ie(s,f){return s<=0||f.length===0&&f.ended?0:f.objectMode?1:s!==s?f.flowing&&f.length?f.buffer.head.data.length:f.length:(s>f.highWaterMark&&(f.highWaterMark=ne(s)),s<=f.length?s:f.ended?f.length:(f.needReadable=!0,0))}U.prototype.read=function(s){d("read",s),s=parseInt(s,10);var f=this._readableState,M=s;if(s!==0&&(f.emittedReadable=!1),s===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended))return d("read: emitReadable",f.length,f.ended),f.length===0&&f.ended?N(this):ae(this),null;if(s=ie(s,f),s===0&&f.ended)return f.length===0&&N(this),null;var O=f.needReadable;d("need readable",O),(f.length===0||f.length-s0?X=E(s,f):X=null,X===null?(f.needReadable=f.length<=f.highWaterMark,s=0):(f.length-=s,f.awaitDrain=0),f.length===0&&(f.ended||(f.needReadable=!0),M!==s&&f.ended&&N(this)),X!==null&&this.emit("data",X),X};function oe(s,f){if(d("onEofChunk"),!f.ended){if(f.decoder){var M=f.decoder.end();M&&M.length&&(f.buffer.push(M),f.length+=f.objectMode?1:M.length)}f.ended=!0,f.sync?ae(s):(f.needReadable=!1,f.emittedReadable||(f.emittedReadable=!0,he(s)))}}function ae(s){var f=s._readableState;d("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,f.emittedReadable||(d("emitReadable",f.flowing),f.emittedReadable=!0,process.nextTick(he,s))}function he(s){var f=s._readableState;d("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended)&&(s.emit("readable"),f.emittedReadable=!1),f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,x(s)}function ue(s,f){f.readingMore||(f.readingMore=!0,process.nextTick(fe,s,f))}function fe(s,f){for(;!f.reading&&!f.ended&&(f.length1&&H(O.pipes,s)!==-1)&&!w&&(d("false write response, pause",O.awaitDrain),O.awaitDrain++),M.pause())}function W($){d("onerror",$),J(),s.removeListener("error",W),r(s,"error")===0&&g(s,$)}I(s,"error",W);function K(){s.removeListener("finish",V),J()}s.once("close",K);function V(){d("onfinish"),s.removeListener("close",K),J()}s.once("finish",V);function J(){d("unpipe"),M.unpipe(s)}return s.emit("pipe",M),O.flowing||(d("pipe resume"),M.resume()),s};function Y(s){return function(){var M=s._readableState;d("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&r(s,"data")&&(M.flowing=!0,x(s))}}U.prototype.unpipe=function(s){var f=this._readableState,M={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1)return s&&s!==f.pipes?this:(s||(s=f.pipes),f.pipes=null,f.pipesCount=0,f.flowing=!1,s&&s.emit("unpipe",this,M),this);if(!s){var O=f.pipes,X=f.pipesCount;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var n=0;n0,O.flowing!==!1&&this.resume()):s==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,d("on readable",O.length,O.reading),O.length?ae(this):O.reading||process.nextTick(te,this)),M},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(s,f){var M=o.prototype.removeListener.call(this,s,f);return s==="readable"&&process.nextTick(Z,this),M},U.prototype.removeAllListeners=function(s){var f=o.prototype.removeAllListeners.apply(this,arguments);return(s==="readable"||s===void 0)&&process.nextTick(Z,this),f};function Z(s){var f=s._readableState;f.readableListening=s.listenerCount("readable")>0,f.resumeScheduled&&!f.paused?f.flowing=!0:s.listenerCount("data")>0&&s.resume()}function te(s){d("readable nexttick read 0"),s.read(0)}U.prototype.resume=function(){var s=this._readableState;return s.flowing||(d("resume"),s.flowing=!s.readableListening,we(this,s)),s.paused=!1,this};function we(s,f){f.resumeScheduled||(f.resumeScheduled=!0,process.nextTick(be,s,f))}function be(s,f){d("resume",f.reading),f.reading||s.read(0),f.resumeScheduled=!1,s.emit("resume"),x(s),f.flowing&&!f.reading&&s.read(0)}U.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function x(s){var f=s._readableState;for(d("flow",f.flowing);f.flowing&&s.read()!==null;);}U.prototype.wrap=function(s){var f=this,M=this._readableState,O=!1;s.on("end",function(){if(d("wrapped end"),M.decoder&&!M.ended){var e=M.decoder.end();e&&e.length&&f.push(e)}f.push(null)}),s.on("data",function(e){if(d("wrapped data"),M.decoder&&(e=M.decoder.write(e)),!(M.objectMode&&e==null)&&!(!M.objectMode&&(!e||!e.length))){var t=f.push(e);t||(O=!0,s.pause())}});for(var X in s)this[X]===void 0&&typeof s[X]=="function"&&(this[X]=(function(t){return function(){return s[t].apply(s,arguments)}})(X));for(var n=0;n=f.length?(f.decoder?M=f.buffer.join(""):f.buffer.length===1?M=f.buffer.first():M=f.buffer.concat(f.length),f.buffer.clear()):M=f.buffer.consume(s,f.decoder),M}function N(s){var f=s._readableState;d("endReadable",f.endEmitted),f.endEmitted||(f.ended=!0,process.nextTick(j,f,s))}function j(s,f){if(d("endReadableNT",s.endEmitted,s.length),!s.endEmitted&&s.length===0&&(s.endEmitted=!0,f.readable=!1,f.emit("end"),s.autoDestroy)){var M=f._writableState;(!M||M.autoDestroy&&M.finished)&&f.destroy()}}typeof Symbol=="function"&&(U.from=function(s,f){return m===void 0&&(m=ci()),m(U,s,f)});function H(s,f){for(var M=0,O=s.length;M0;return i(v,m,g,function(C){F||(F=C),C&&y.forEach(d),!m&&(y.forEach(d),T(F))})});return A.reduce(b)}return ot=R,ot}var st,Qt;function pi(){if(Qt)return st;Qt=1,st=o;var a=Oe().EventEmitter,r=ve();r(o,a),o.Readable=hr(),o.Writable=cr(),o.Duplex=xe(),o.Transform=dr(),o.PassThrough=hi(),o.finished=vt(),o.pipeline=di(),o.Stream=o;function o(){a.call(this)}return o.prototype.pipe=function(c,p){var l=this;function h(A){c.writable&&c.write(A)===!1&&l.pause&&l.pause()}l.on("data",h);function i(){l.readable&&l.resume&&l.resume()}c.on("drain",i),!c._isStdio&&(!p||p.end!==!1)&&(l.on("end",b),l.on("close",D));var d=!1;function b(){d||(d=!0,c.end())}function D(){d||(d=!0,typeof c.destroy=="function"&&c.destroy())}function R(A){if(B(),a.listenerCount(this,"error")===0)throw A}l.on("error",R),c.on("error",R);function B(){l.removeListener("data",h),c.removeListener("drain",i),l.removeListener("end",b),l.removeListener("close",D),l.removeListener("error",R),c.removeListener("error",R),l.removeListener("end",B),l.removeListener("close",B),c.removeListener("close",B)}return l.on("end",B),l.on("close",B),c.on("close",B),c.emit("pipe",l),c},st}var yi=pi();async function*ut(a,r,o){let c=1;const p={chunks:[],length:0};for await(const l of o(a))for(p.chunks.push(l),p.length+=l.byteLength;p.length>r;){const h=p.chunks.length>1?de.Buffer.concat(p.chunks):p.chunks[0];yield{partNumber:c,data:h.subarray(0,r)},p.chunks=[h.subarray(r)],p.length=p.chunks[0].byteLength,c+=1}yield{partNumber:c,data:p.chunks.length!==1?de.Buffer.concat(p.chunks):p.chunks[0],lastPart:!0}}async function*Zt(a,r){let o=1,c=0,p=r;for(;p{if(a instanceof Uint8Array)return Zt(a,r);if(a instanceof yi.Readable)return ut(a,r,mi);if(a instanceof String||typeof a=="string")return Zt(de.Buffer.from(a),r);if(typeof a.stream=="function")return ut(a.stream(),r,Jt);if(a instanceof ReadableStream)return ut(a,r,Jt);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")};class Re extends We.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(r){if(super(),this.queueSize=r.queueSize||this.queueSize,this.leavePartsOnError=r.leavePartsOnError||this.leavePartsOnError,this.tags=r.tags||this.tags,this.client=r.client,this.params=r.params,!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");this.totalBytes=this.params.ContentLength??Me(this.params.Body),this.totalBytesSource=ii(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=r.abortController??new ei,this.partSize=r.partSize||Math.max(Re.MIN_PART_SIZE,Math.floor((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(r,o){return this.uploadEvent=r,super.on(r,o)}async __uploadUsingPut(r){this.isMultiPart=!1;const o={...this.params,Body:r.data},c=this.client.config,p=c.requestHandler,l=p instanceof We.EventEmitter?p:null,h=_=>{this.bytesUploadedSoFar=_.loaded,this.totalBytes=_.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:r.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};l!==null&&l.on("xhr.upload.progress",h);const i=await Promise.all([this.client.send(new Rt(o)),c?.endpoint?.()]),d=i[0];let b=i[1];if(b||(b=Or(await qr(o,Rt,{...c}))),!b)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');l!==null&&l.off("xhr.upload.progress",h);const D=this.params.Key.split("/").map(_=>St(_)).join("/"),R=St(this.params.Bucket),B=(()=>{const _=b.hostname.startsWith(`${R}.`),T=this.client.config.forcePathStyle,F=b.port?`:${b.port}`:"";return T?`${b.protocol}//${b.hostname}${F}/${R}/${D}`:_?`${b.protocol}//${b.hostname}${F}/${D}`:`${b.protocol}//${R}.${b.hostname}${F}/${D}`})();this.singleUploadResult={...d,Bucket:this.params.Bucket,Key:this.params.Key,Location:B};const A=Me(r.data);this.__notifyProgress({loaded:A,total:A,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){const r=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){const o={...this.params,Body:void 0};r==="WHEN_SUPPORTED"&&(o.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Zn.CRC32),this.createMultiPartPromise=this.client.send(new Vn(o)).then(c=>(this.abortMultipartUploadCommand=new Hn({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:c.UploadId}),c))}return this.createMultiPartPromise}async __doConcurrentUpload(r){for await(const o of r){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(o.partNumber===1&&o.lastPart)return await this.__uploadUsingPut(o);if(!this.uploadId){const{UploadId:b}=await this.__createMultipartUpload();if(this.uploadId=b,this.abortController.signal.aborted)return}const c=Me(o.data)||0,p=this.client.config.requestHandler,l=p instanceof We.EventEmitter?p:null;let h=0;const i=(b,D)=>{(Number(D.query.partNumber)||-1)===o.partNumber&&(b.total&&c&&(this.bytesUploadedSoFar+=b.loaded-h,h=b.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};l!==null&&l.on("xhr.upload.progress",i),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(o);const d=await this.client.send(new Qn({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:o.data,PartNumber:o.partNumber}));if(l!==null&&l.off("xhr.upload.progress",i),this.abortController.signal.aborted)return;if(!d.ETag)throw new Error(`Part ${o.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:o.partNumber,ETag:d.ETag,...d.ChecksumCRC32&&{ChecksumCRC32:d.ChecksumCRC32},...d.ChecksumCRC32C&&{ChecksumCRC32C:d.ChecksumCRC32C},...d.ChecksumSHA1&&{ChecksumSHA1:d.ChecksumSHA1},...d.ChecksumSHA256&&{ChecksumSHA256:d.ChecksumSHA256}}),l===null&&(this.bytesUploadedSoFar+=c),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const r=gi(this.params.Body,this.partSize),o=[];for(let p=0;p{o.push(h)});this.concurrentUploaders.push(l)}if(await Promise.all(this.concurrentUploaders),o.length>=1)throw await this.markUploadAsAborted(),o[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let c;if(this.isMultiPart){const{expectedPartsCount:p,uploadedParts:l,totalBytes:h,totalBytesSource:i}=this;if(h!==void 0&&p!==void 0&&l.length!==p)throw new Error(`Expected ${p} part(s) but uploaded ${l.length} part(s). +import{f as wt,aJ as pr,aK as yr,aL as Q,aM as lt,aN as Ne,aO as mr,aP as gr,aQ as wr,aR as br,aS as Er,aT as xr,aU as vr,aV as _r,aW as Cr,aX as Sr,aY as bt,aZ as ce,a_ as qe,a$ as Ar,b0 as Rr,b1 as Br,b2 as pe,b3 as ye,b4 as me,b5 as ge,b6 as Fr,b7 as Dr,b8 as Tr,b9 as Mr,ba as Lr,bb as kr,bc as Nr,bd as Pr,c as Ie,j as z,aD as Ir,be as Ur,bf as Ee,bg as Or,bh as qr,bi as St,bj as er,bk as Et,r as tr,bl as jr,B as Hr}from"./index.js";import{a as Wr,b as Kr,c as $r,e as zr,d as Vr,h as Gr,f as Yr,g as Xr}from"./alert-dialog.js";import{D as Qr}from"./download.js";import{T as Zr}from"./trash-2.js";import{u as rr}from"./useMutation.js";const Jr=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],en=wt("file",Jr);const tn=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],rn=wt("folder",tn);const nn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],an=wt("upload",nn),on=typeof ReadableStream=="function"?ReadableStream:function(){};class sn extends on{}const un=({expectedChecksum:a,checksum:r,source:o,checksumSourceLocation:c,base64Encoder:p})=>{if(!pr(o))throw new Error(`@smithy/util-stream: unsupported source type ${o?.constructor?.name??o} in ChecksumStream.`);const l=p??yr;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const h=new TransformStream({start(){},async transform(d,b){r.update(d),b.enqueue(d)},async flush(d){const b=await r.digest(),D=l(b);if(a!==D){const R=new Error(`Checksum mismatch: expected "${a}" but received "${D}" in response header "${c}".`);d.error(R)}else d.terminate()}});o.pipeThrough(h);const i=h.readable;return Object.setPrototypeOf(i,sn.prototype),i};class ln{allocByteArray;byteLength=0;byteArrays=[];constructor(r){this.allocByteArray=r}push(r){this.byteArrays.push(r),this.byteLength+=r.byteLength}flush(){if(this.byteArrays.length===1){const c=this.byteArrays[0];return this.reset(),c}const r=this.allocByteArray(this.byteLength);let o=0;for(let c=0;cnew Uint8Array(b))];let i=-1;const d=async b=>{const{value:D,done:R}=await c.read(),B=D;if(R){if(i!==-1){const A=je(h,i);Ae(A)>0&&b.enqueue(A)}b.close()}else{const A=dn(B,!1);if(i!==A&&(i>=0&&b.enqueue(je(h,i)),i=A),i===-1){b.enqueue(B);return}const _=Ae(B);l+=_;const T=Ae(h[i]);if(_>=r&&T===0)b.enqueue(B);else{const F=hn(h,i,B);!p&&l>r*2&&(p=!0,o?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${r}, automatically buffering.`)),F>=r?b.enqueue(je(h,i)):await d(b)}}};return new ReadableStream({pull:d})}const cn=fn;function hn(a,r,o){switch(r){case 0:return a[0]+=o,Ae(a[0]);case 1:case 2:return a[r].push(o),Ae(a[r])}}function je(a,r){switch(r){case 0:const o=a[0];return a[0]="",o;case 1:case 2:return a[r].flush()}throw new Error(`@smithy/util-stream - invalid index ${r} given to flush()`)}function Ae(a){return a?.byteLength??a?.length??0}function dn(a,r=!0){return r&&typeof Buffer<"u"&&a instanceof Buffer?2:a instanceof Uint8Array?1:typeof a=="string"?0:-1}const ft=[Q.CRC32,Q.CRC32C,Q.CRC64NVME,Q.SHA1,Q.SHA256],pn=[Q.SHA256,Q.SHA1,Q.CRC32,Q.CRC32C,Q.CRC64NVME],yn=(a,{requestChecksumRequired:r,requestAlgorithmMember:o,requestChecksumCalculation:c})=>{if(!o)return c===Ne.WHEN_SUPPORTED||r?lt:void 0;if(!a[o])return;const p=a[o];if(!ft.includes(p))throw new Error(`The checksum algorithm "${p}" is not supported by the client. Select one of ${ft}.`);return p},xt=a=>a===Q.MD5?"content-md5":`x-amz-checksum-${a.toLowerCase()}`,mn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(o===c.toLowerCase())return!0;return!1},gn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(c.toLowerCase().startsWith(o))return!0;return!1},nr=a=>a!==void 0&&typeof a!="string"&&!ArrayBuffer.isView(a)&&!mr(a);var wn=(function(){function a(){this.crc32c=new At}return a.prototype.update=function(r){gr(r)||this.crc32c.update(wr(r))},a.prototype.digest=function(){return br(this,void 0,void 0,function(){return Er(this,function(r){return[2,xr(this.crc32c.digest())]})})},a.prototype.reset=function(){this.crc32c=new At},a})(),At=(function(){function a(){this.checksum=4294967295}return a.prototype.update=function(r){var o,c;try{for(var p=vr(r),l=p.next();!l.done;l=p.next()){var h=l.value;this.checksum=this.checksum>>>8^En[(this.checksum^h)&255]}}catch(i){o={error:i}}finally{try{l&&!l.done&&(c=p.return)&&c.call(p)}finally{if(o)throw o.error}}return this},a.prototype.digest=function(){return(this.checksum^4294967295)>>>0},a})(),bn=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],En=_r(bn);const xn=()=>{const r=new Array(8);for(let o=0;o<8;o++){const c=new Array(512);for(let p=0;p<256;p++){let l=BigInt(p);for(let h=0;h<8*(o+1);h++)l&1n?l=l>>1n^0x9a6c9329ac4bc9b5n:l=l>>1n;c[p*2]=Number(l>>32n&0xffffffffn),c[p*2+1]=Number(l&0xffffffffn)}r[o]=new Uint32Array(c)}return r};let He,Se,ct,ht,dt,pt,yt,mt,gt;const vn=()=>{He||(He=xn(),[Se,ct,ht,dt,pt,yt,mt,gt]=He)};class _n{c1=0;c2=0;constructor(){vn(),this.reset()}update(r){const o=r.length;let c=0,p=this.c1,l=this.c2;for(;c+8<=o;){const h=((l^r[c++])&255)<<1,i=((l>>>8^r[c++])&255)<<1,d=((l>>>16^r[c++])&255)<<1,b=((l>>>24^r[c++])&255)<<1,D=((p^r[c++])&255)<<1,R=((p>>>8^r[c++])&255)<<1,B=((p>>>16^r[c++])&255)<<1,A=((p>>>24^r[c++])&255)<<1;p=gt[h]^mt[i]^yt[d]^pt[b]^dt[D]^ht[R]^ct[B]^Se[A],l=gt[h+1]^mt[i+1]^yt[d+1]^pt[b+1]^dt[D+1]^ht[R+1]^ct[B+1]^Se[A+1]}for(;c>>8|(p&255)<<24)>>>0,p=p>>>8^Se[h],l^=Se[h+1],c++}this.c1=p,this.c2=l}async digest(){const r=this.c1^4294967295,o=this.c2^4294967295;return new Uint8Array([r>>>24,r>>>16&255,r>>>8&255,r&255,o>>>24,o>>>16&255,o>>>8&255,o&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const Cn=()=>Cr,ir=(a,r)=>{switch(a){case Q.MD5:return r.md5;case Q.CRC32:return Cn();case Q.CRC32C:return wn;case Q.CRC64NVME:return _n;case Q.SHA1:return r.sha1;case Q.SHA256:return r.sha256;default:throw new Error(`Unsupported checksum algorithm: ${a}`)}},ar=(a,r)=>{const o=new a;return o.update(Sr(r||"")),o.digest()},Sn={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},An=(a,r)=>(o,c)=>async p=>{if(!bt.isInstance(p.request)||gn("x-amz-checksum-",p.request.headers))return o(p);const{request:l,input:h}=p,{body:i,headers:d}=l,{base64Encoder:b,streamHasher:D}=a,{requestChecksumRequired:R,requestAlgorithmMember:B}=r,A=await a.requestChecksumCalculation(),_=B?.name,T=B?.httpHeader;_&&!h[_]&&(A===Ne.WHEN_SUPPORTED||R)&&(h[_]=lt,T&&(d[T]=lt));const F=yn(h,{requestChecksumRequired:R,requestAlgorithmMember:B?.name,requestChecksumCalculation:A});let y=i,v=d;if(F){switch(F){case Q.CRC32:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Q.CRC32C:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Q.CRC64NVME:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Q.SHA1:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Q.SHA256:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const S=xt(F),m=ir(F,a);if(nr(i)){const{getAwsChunkedEncodingStream:g,bodyLengthChecker:C}=a;y=g(typeof a.requestStreamBufferSize=="number"&&a.requestStreamBufferSize>=8*1024?cn(i,a.requestStreamBufferSize,c.logger):i,{base64Encoder:b,bodyLengthChecker:C,checksumLocationName:S,checksumAlgorithmFn:m,streamHasher:D}),v={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":S},delete v["content-length"]}else if(!mn(S,d)){const g=await ar(m,i);v={...d,[S]:b(g)}}}try{return await o({...p,request:{...l,headers:v,body:y}})}catch(S){if(S instanceof Error&&S.name==="InvalidChunkSizeError")try{S.message.endsWith(".")||(S.message+="."),S.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw S}},Rn={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},Bn=(a,r)=>(o,c)=>async p=>{const l=p.input,{requestValidationModeMember:h}=r,i=await a.requestChecksumCalculation(),d=await a.responseChecksumValidation();switch(i){case Ne.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Ne.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(d){case qe.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case qe.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return h&&!l[h]&&d===qe.WHEN_SUPPORTED&&(l[h]="ENABLED"),o(p)},or=(a=[])=>{const r=[];for(const o of pn)!a.includes(o)||!ft.includes(o)||r.push(o);return r},Fn=a=>{const r=a.lastIndexOf("-");if(r!==-1){const o=a.slice(r+1);if(!o.startsWith("0")){const c=parseInt(o,10);if(!isNaN(c)&&c>=1&&c<=1e4)return!0}}return!1},Dn=async(a,{checksumAlgorithmFn:r,base64Encoder:o})=>o(await ar(r,a)),Tn=async(a,{config:r,responseAlgorithms:o,logger:c})=>{const p=or(o),{body:l,headers:h}=a;for(const i of p){const d=xt(i),b=h[d];if(b){let D;try{D=ir(i,r)}catch(A){if(i===Q.CRC64NVME){c?.warn(`Skipping ${Q.CRC64NVME} checksum validation: ${A.message}`);continue}throw A}const{base64Encoder:R}=r;if(nr(l)){a.body=un({expectedChecksum:b,checksumSourceLocation:d,checksum:new D,source:l,base64Encoder:R});return}const B=await Dn(l,{checksumAlgorithmFn:D,base64Encoder:R});if(B===b)break;throw new Error(`Checksum mismatch: expected "${B}" but received "${b}" in response header "${d}".`)}}},Mn={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Ln=(a,r)=>(o,c)=>async p=>{if(!bt.isInstance(p.request))return o(p);const l=p.input,h=await o(p),i=h.response,{requestValidationModeMember:d,responseAlgorithms:b}=r;if(d&&l[d]==="ENABLED"){const{clientName:D,commandName:R}=c;if(D==="S3Client"&&R==="GetObjectCommand"&&or(b).every(A=>{const _=xt(A),T=i.headers[_];return!T||Fn(T)}))return h;await Tn(i,{config:a,responseAlgorithms:b,logger:c.logger})}return h},Ue=(a,r)=>({applyToStack:o=>{o.add(An(a,r),Sn),o.addRelativeTo(Bn(a,r),Rn),o.addRelativeTo(Ln(a,r),Mn)}}),kn="content-length",Nn="x-amz-decoded-content-length";function Pn(){return(a,r)=>async o=>{const{request:c}=o;if(bt.isInstance(c)&&!(kn in c.headers)&&!(Nn in c.headers)){const p="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof r?.logger?.warn=="function"&&!(r.logger instanceof Ar)?r.logger.warn(p):console.warn(p)}return a({...o})}}const In={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Un=a=>({applyToStack:r=>{r.add(Pn(),In)}}),On=a=>(r,o)=>async c=>{const p=await r(c),{response:l}=p;if(Rr.isInstance(l)&&l.headers.expires){l.headers.expiresstring=l.headers.expires;try{Br(l.headers.expires)}catch(h){o.logger?.warn(`AWS SDK Warning for ${o.clientName}::${o.commandName} response parsing (${l.headers.expires}): ${h}`),delete l.headers.expires}}return p},qn={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},jn=a=>({applyToStack:r=>{r.addRelativeTo(On(),qn)}});class Hn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Fr).build(){}function Wn(a){return r=>async o=>{const c={...o.input},p=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const l of p){const h=c[l.target];if(h){let i;typeof h=="string"?$n(h,a)?i=a.base64Decoder(h):(i=a.utf8Decoder(h),c[l.target]=a.base64Encoder(i)):(i=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),c[l.target]=a.base64Encoder(i));const d=new a.md5;d.update(i),c[l.hash]=a.base64Encoder(await d.digest())}}return r({...o,input:c})}}const Kn={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Be=a=>({applyToStack:r=>{r.add(Wn(a),Kn)}});function $n(a,r){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))return!1;try{return r.base64Decoder(a).length===32}catch{return!1}}class zn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Dr).build(){}class Vn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(Tr).build(){}class Gn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Mr).build(){}class Yn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Be(c),jn()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Lr).build(){}class Rt extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Un(),ge(c),Be(c)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(kr).build(){}class Xn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),ge(c)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").sc(Nr).build(){}class Qn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),ge(c),Be(c)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(Pr).build(){}const Zn={CRC32:"CRC32"};function Ri(a){const r=Ie.c(9),{folderName:o,fullPrefix:c,bucketName:p}=a;let l;r[0]!==p||r[1]!==c?(l={bucket:p,_splat:c},r[0]=p,r[1]=c,r[2]=l):l=r[2];let h;r[3]===Symbol.for("react.memo_cache_sentinel")?(h=z.jsx(rn,{className:"size-5 text-muted-foreground"}),r[3]=h):h=r[3];let i;r[4]!==o?(i=z.jsx("span",{className:"font-medium",children:o}),r[4]=o,r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==i?(d=z.jsxs(Ir,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:l,to:"/s3/ls/$bucket/$",children:[h,i]}),r[6]=l,r[7]=i,r[8]=d):d=r[8],d}class Jn{onabort=null;_aborted=!1;constructor(){Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class ei{signal=new Jn;abort(){this.signal.abort()}}var De={exports:{}},Bt;function Oe(){if(Bt)return De.exports;Bt=1;var a=typeof Reflect=="object"?Reflect:null,r=a&&typeof a.apply=="function"?a.apply:function(g,C,I){return Function.prototype.apply.call(g,C,I)},o;a&&typeof a.ownKeys=="function"?o=a.ownKeys:Object.getOwnPropertySymbols?o=function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:o=function(g){return Object.getOwnPropertyNames(g)};function c(m){console&&console.warn&&console.warn(m)}var p=Number.isNaN||function(g){return g!==g};function l(){l.init.call(this)}De.exports=l,De.exports.once=y,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function i(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(m){if(typeof m!="number"||m<0||p(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");h=m}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(g){if(typeof g!="number"||g<0||p(g))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+g+".");return this._maxListeners=g,this};function d(m){return m._maxListeners===void 0?l.defaultMaxListeners:m._maxListeners}l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(g){for(var C=[],I=1;I0&&(q=C[0]),q instanceof Error)throw q;var G=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw G.context=q,G}var ee=U[g];if(ee===void 0)return!1;if(typeof ee=="function")r(ee,this,C);else for(var re=ee.length,ne=_(ee,re),I=0;I0&&q.length>P&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(g)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=m,G.type=g,G.count=q.length,c(G)}return m}l.prototype.addListener=function(g,C){return b(this,g,C,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(g,C){return b(this,g,C,!0)};function D(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(m,g,C){var I={fired:!1,wrapFn:void 0,target:m,type:g,listener:C},P=D.bind(I);return P.listener=C,I.wrapFn=P,P}l.prototype.once=function(g,C){return i(C),this.on(g,R(this,g,C)),this},l.prototype.prependOnceListener=function(g,C){return i(C),this.prependListener(g,R(this,g,C)),this},l.prototype.removeListener=function(g,C){var I,P,U,q,G;if(i(C),P=this._events,P===void 0)return this;if(I=P[g],I===void 0)return this;if(I===C||I.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete P[g],P.removeListener&&this.emit("removeListener",g,I.listener||C));else if(typeof I!="function"){for(U=-1,q=I.length-1;q>=0;q--)if(I[q]===C||I[q].listener===C){G=I[q].listener,U=q;break}if(U<0)return this;U===0?I.shift():T(I,U),I.length===1&&(P[g]=I[0]),P.removeListener!==void 0&&this.emit("removeListener",g,G||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(g){var C,I,P;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[g]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[g]),this;if(arguments.length===0){var U=Object.keys(I),q;for(P=0;P=0;P--)this.removeListener(g,C[P]);return this};function B(m,g,C){var I=m._events;if(I===void 0)return[];var P=I[g];return P===void 0?[]:typeof P=="function"?C?[P.listener||P]:[P]:C?F(P):_(P,P.length)}l.prototype.listeners=function(g){return B(this,g,!0)},l.prototype.rawListeners=function(g){return B(this,g,!1)},l.listenerCount=function(m,g){return typeof m.listenerCount=="function"?m.listenerCount(g):A.call(m,g)},l.prototype.listenerCount=A;function A(m){var g=this._events;if(g!==void 0){var C=g[m];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function _(m,g){for(var C=new Array(g),I=0;I0)throw new Error("Invalid string. Length must be a multiple of 4");var T=A.indexOf("=");T===-1&&(T=_);var F=T===_?0:4-T%4;return[T,F]}function i(A){var _=h(A),T=_[0],F=_[1];return(T+F)*3/4-F}function d(A,_,T){return(_+T)*3/4-T}function b(A){var _,T=h(A),F=T[0],y=T[1],v=new o(d(A,F,y)),S=0,m=y>0?F-4:F,g;for(g=0;g>16&255,v[S++]=_>>8&255,v[S++]=_&255;return y===2&&(_=r[A.charCodeAt(g)]<<2|r[A.charCodeAt(g+1)]>>4,v[S++]=_&255),y===1&&(_=r[A.charCodeAt(g)]<<10|r[A.charCodeAt(g+1)]<<4|r[A.charCodeAt(g+2)]>>2,v[S++]=_>>8&255,v[S++]=_&255),v}function D(A){return a[A>>18&63]+a[A>>12&63]+a[A>>6&63]+a[A&63]}function R(A,_,T){for(var F,y=[],v=_;vm?m:S+v));return F===1?(_=A[T-1],y.push(a[_>>2]+a[_<<4&63]+"==")):F===2&&(_=(A[T-2]<<8)+A[T-1],y.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),y.join("")}return Ce}var Te={};var Dt;function ri(){return Dt||(Dt=1,Te.read=function(a,r,o,c,p){var l,h,i=p*8-c-1,d=(1<>1,D=-7,R=o?p-1:0,B=o?-1:1,A=a[r+R];for(R+=B,l=A&(1<<-D)-1,A>>=-D,D+=i;D>0;l=l*256+a[r+R],R+=B,D-=8);for(h=l&(1<<-D)-1,l>>=-D,D+=c;D>0;h=h*256+a[r+R],R+=B,D-=8);if(l===0)l=1-b;else{if(l===d)return h?NaN:(A?-1:1)*(1/0);h=h+Math.pow(2,c),l=l-b}return(A?-1:1)*h*Math.pow(2,l-c)},Te.write=function(a,r,o,c,p,l){var h,i,d,b=l*8-p-1,D=(1<>1,B=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=c?0:l-1,_=c?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(i=isNaN(r)?1:0,h=D):(h=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+R>=1?r+=B/d:r+=B*Math.pow(2,1-R),r*d>=2&&(h++,d/=2),h+R>=D?(i=0,h=D):h+R>=1?(i=(r*d-1)*Math.pow(2,p),h=h+R):(i=r*Math.pow(2,R-1)*Math.pow(2,p),h=0));p>=8;a[o+A]=i&255,A+=_,i/=256,p-=8);for(h=h<0;a[o+A]=h&255,A+=_,h/=256,b-=8);a[o+A-_]|=T*128}),Te}var Tt;function Fe(){return Tt||(Tt=1,(function(a){var r=ti(),o=ri(),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=y,a.INSPECT_MAX_BYTES=50;var p=2147483647;a.kMaxLength=p,i.TYPED_ARRAY_SUPPORT=l(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),n.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function h(n){if(n>p)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,i.prototype),e}function i(n,e,t){if(typeof n=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(n)}return d(n,e,t)}i.poolSize=8192;function d(n,e,t){if(typeof n=="string")return B(n,e);if(ArrayBuffer.isView(n))return A(n);if(n==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(M(n,ArrayBuffer)||n&&M(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(n,SharedArrayBuffer)||n&&M(n.buffer,SharedArrayBuffer)))return _(n,e,t);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var u=n.valueOf&&n.valueOf();if(u!=null&&u!==n)return i.from(u,e,t);var w=T(n);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return i.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}i.from=function(n,e,t){return d(n,e,t)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function b(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function D(n,e,t){return b(n),n<=0?h(n):e!==void 0?typeof t=="string"?h(n).fill(e,t):h(n).fill(e):h(n)}i.alloc=function(n,e,t){return D(n,e,t)};function R(n){return b(n),h(n<0?0:F(n)|0)}i.allocUnsafe=function(n){return R(n)},i.allocUnsafeSlow=function(n){return R(n)};function B(n,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=v(n,e)|0,u=h(t),w=u.write(n,e);return w!==t&&(u=u.slice(0,w)),u}function A(n){for(var e=n.length<0?0:F(n.length)|0,t=h(e),u=0;u=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return n|0}function y(n){return+n!=n&&(n=0),i.alloc(+n)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,t){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var u=e.length,w=t.length,L=0,k=Math.min(u,w);L2&&arguments[2]===!0;if(!u&&t===0)return 0;for(var w=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return N(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return s(n).length;default:if(w)return u?-1:N(n).length;e=(""+e).toLowerCase(),w=!0}}i.byteLength=v;function S(n,e,t){var u=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(n||(n="utf8");;)switch(n){case"hex":return ue(this,e,t);case"utf8":case"utf-8":return ne(this,e,t);case"ascii":return ae(this,e,t);case"latin1":case"binary":return he(this,e,t);case"base64":return re(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,e,t);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),u=!0}}i.prototype._isBuffer=!0;function m(n,e,t){var u=n[e];n[e]=n[t],n[t]=u}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},c&&(i.prototype[c]=i.prototype.inspect),i.prototype.compare=function(e,t,u,w,L){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),u===void 0&&(u=e?e.length:0),w===void 0&&(w=0),L===void 0&&(L=this.length),t<0||u>e.length||w<0||L>this.length)throw new RangeError("out of range index");if(w>=L&&t>=u)return 0;if(w>=L)return-1;if(t>=u)return 1;if(t>>>=0,u>>>=0,w>>>=0,L>>>=0,this===e)return 0;for(var k=L-w,W=u-t,K=Math.min(k,W),V=this.slice(w,L),J=e.slice(t,u),$=0;$2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,O(t)&&(t=w?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(w)return-1;t=n.length-1}else if(t<0)if(w)t=0;else return-1;if(typeof e=="string"&&(e=i.from(e,u)),i.isBuffer(e))return e.length===0?-1:C(n,e,t,u,w);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):C(n,[e],t,u,w);throw new TypeError("val must be string, number or Buffer")}function C(n,e,t,u,w){var L=1,k=n.length,W=e.length;if(u!==void 0&&(u=String(u).toLowerCase(),u==="ucs2"||u==="ucs-2"||u==="utf16le"||u==="utf-16le")){if(n.length<2||e.length<2)return-1;L=2,k/=2,W/=2,t/=2}function K(_t,Ct){return L===1?_t[Ct]:_t.readUInt16BE(Ct*L)}var V;if(w){var J=-1;for(V=t;Vk&&(t=k-W),V=t;V>=0;V--){for(var $=!0,se=0;sew&&(u=w)):u=w;var L=e.length;u>L/2&&(u=L/2);for(var k=0;k>>0,isFinite(u)?(u=u>>>0,w===void 0&&(w="utf8")):(w=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-t;if((u===void 0||u>L)&&(u=L),e.length>0&&(u<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var k=!1;;)switch(w){case"hex":return I(this,e,t,u);case"utf8":case"utf-8":return P(this,e,t,u);case"ascii":return U(this,e,t,u);case"latin1":case"binary":return q(this,e,t,u);case"base64":return G(this,e,t,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,e,t,u);default:if(k)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),k=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(n,e,t){return e===0&&t===n.length?r.fromByteArray(n):r.fromByteArray(n.slice(e,t))}function ne(n,e,t){t=Math.min(n.length,t);for(var u=[],w=e;w239?4:L>223?3:L>191?2:1;if(w+W<=t){var K,V,J,$;switch(W){case 1:L<128&&(k=L);break;case 2:K=n[w+1],(K&192)===128&&($=(L&31)<<6|K&63,$>127&&(k=$));break;case 3:K=n[w+1],V=n[w+2],(K&192)===128&&(V&192)===128&&($=(L&15)<<12|(K&63)<<6|V&63,$>2047&&($<55296||$>57343)&&(k=$));break;case 4:K=n[w+1],V=n[w+2],J=n[w+3],(K&192)===128&&(V&192)===128&&(J&192)===128&&($=(L&15)<<18|(K&63)<<12|(V&63)<<6|J&63,$>65535&&$<1114112&&(k=$))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,u.push(k>>>10&1023|55296),k=56320|k&1023),u.push(k),w+=W}return oe(u)}var ie=4096;function oe(n){var e=n.length;if(e<=ie)return String.fromCharCode.apply(String,n);for(var t="",u=0;uu)&&(t=u);for(var w="",L=e;Lu&&(e=u),t<0?(t+=u,t<0&&(t=0)):t>u&&(t=u),tt)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e],L=1,k=0;++k>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e+--t],L=1;t>0&&(L*=256);)w+=this[e+--t]*L;return w},i.prototype.readUInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e],L=1,k=0;++k=L&&(w-=Math.pow(2,8*t)),w},i.prototype.readIntBE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=t,L=1,k=this[e+--w];w>0&&(L*=256);)k+=this[e+--w]*L;return L*=128,k>=L&&(k-=Math.pow(2,8*t)),k},i.prototype.readInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e]|this[e+1]<<8;return u&32768?u|4294901760:u},i.prototype.readInt16BE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e+1]|this[e]<<8;return u&32768?u|4294901760:u},i.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!1,52,8)};function Z(n,e,t,u,w,L){if(!i.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>w||en.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(e,t,u,w){if(e=+e,t=t>>>0,u=u>>>0,!w){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=1,W=0;for(this[t]=e&255;++W>>0,u=u>>>0,!w){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=u-1,W=1;for(this[t+k]=e&255;--k>=0&&(W*=256);)this[t+k]=e/W&255;return t+u},i.prototype.writeUInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,255,0),this[t]=e&255,t+1},i.prototype.writeUInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeUInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},i.prototype.writeUInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},i.prototype.writeIntLE=function(e,t,u,w){if(e=+e,t=t>>>0,!w){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=0,W=1,K=0;for(this[t]=e&255;++k>0)-K&255;return t+u},i.prototype.writeIntBE=function(e,t,u,w){if(e=+e,t=t>>>0,!w){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=u-1,W=1,K=0;for(this[t+k]=e&255;--k>=0&&(W*=256);)e<0&&K===0&&this[t+k+1]!==0&&(K=1),this[t+k]=(e/W>>0)-K&255;return t+u},i.prototype.writeInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},i.prototype.writeInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function te(n,e,t,u,w,L){if(t+u>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function we(n,e,t,u,w){return e=+e,t=t>>>0,w||te(n,e,t,4),o.write(n,e,t,u,23,4),t+4}i.prototype.writeFloatLE=function(e,t,u){return we(this,e,t,!0,u)},i.prototype.writeFloatBE=function(e,t,u){return we(this,e,t,!1,u)};function be(n,e,t,u,w){return e=+e,t=t>>>0,w||te(n,e,t,8),o.write(n,e,t,u,52,8),t+8}i.prototype.writeDoubleLE=function(e,t,u){return be(this,e,t,!0,u)},i.prototype.writeDoubleBE=function(e,t,u){return be(this,e,t,!1,u)},i.prototype.copy=function(e,t,u,w){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(u||(u=0),!w&&w!==0&&(w=this.length),t>=e.length&&(t=e.length),t||(t=0),w>0&&w=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),e.length-t=0;--k)e[k+t]=this[k+u];else Uint8Array.prototype.set.call(e,this.subarray(u,w),t);return L},i.prototype.fill=function(e,t,u,w){if(typeof e=="string"){if(typeof t=="string"?(w=t,t=0,u=this.length):typeof u=="string"&&(w=u,u=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!i.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(e.length===1){var L=e.charCodeAt(0);(w==="utf8"&&L<128||w==="latin1")&&(e=L)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length>>0,u=u===void 0?this.length:u>>>0,e||(e=0);var k;if(typeof e=="number")for(k=t;k55295&&t<57344){if(!w){if(t>56319){(e-=3)>-1&&L.push(239,191,189);continue}else if(k+1===u){(e-=3)>-1&&L.push(239,191,189);continue}w=t;continue}if(t<56320){(e-=3)>-1&&L.push(239,191,189),w=t;continue}t=(w-55296<<10|t-56320)+65536}else w&&(e-=3)>-1&&L.push(239,191,189);if(w=null,t<128){if((e-=1)<0)break;L.push(t)}else if(t<2048){if((e-=2)<0)break;L.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;L.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;L.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return L}function j(n){for(var e=[],t=0;t>8,w=t%256,L.push(w),L.push(u);return L}function s(n){return r.toByteArray(E(n))}function f(n,e,t,u){for(var w=0;w=e.length||w>=n.length);++w)e[w+t]=n[w];return w}function M(n,e){return n instanceof e||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===e.name}function O(n){return n!==n}var X=(function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var u=t*16,w=0;w<16;++w)e[u+w]=n[t]+n[w];return e})()})(Ke)),Ke}var de=Fe();const ni={lstatSync:()=>{},isFileReadStream(a){return!1}},Pe={...ni,runtime:"browser"},Me=a=>{if(a==null)return 0;if(typeof a=="string")return de.Buffer.byteLength(a);if(typeof a.byteLength=="number")return a.byteLength;if(typeof a.length=="number")return a.length;if(typeof a.size=="number")return a.size;if(typeof a.start=="number"&&typeof a.end=="number")return a.end+1-a.start;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size}catch{return}};var le;(function(a){a.EMPTY_INPUT="a null or undefined Body",a.CONTENT_LENGTH="the ContentLength property of the params set by the caller",a.STRING_LENGTH="the encoded byte length of the Body string",a.TYPED_ARRAY="the byteLength of a typed byte array such as Uint8Array",a.LENGTH="the value of Body.length",a.SIZE="the value of Body.size",a.START_END_DIFF="the numeric difference between Body.start and Body.end",a.LSTAT="the size of the file given by Body.path on disk as reported by lstatSync"})(le||(le={}));const ii=(a,r)=>{if(r!=null)return le.CONTENT_LENGTH;if(a==null)return le.EMPTY_INPUT;if(typeof a=="string")return le.STRING_LENGTH;if(typeof a.byteLength=="number")return le.TYPED_ARRAY;if(typeof a.length=="number")return le.LENGTH;if(typeof a.size=="number")return le.SIZE;if(typeof a.start=="number"&&typeof a.end=="number")return le.START_END_DIFF;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size,le.LSTAT}catch{return}};var Le={exports:{}},Mt;function ve(){return Mt||(Mt=1,typeof Object.create=="function"?Le.exports=function(r,o){o&&(r.super_=o,r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Le.exports=function(r,o){if(o){r.super_=o;var c=function(){};c.prototype=o.prototype,r.prototype=new c,r.prototype.constructor=r}}),Le.exports}var $e,Lt;function sr(){return Lt||(Lt=1,$e=Oe().EventEmitter),$e}const ai={},oi=Object.freeze(Object.defineProperty({__proto__:null,default:ai},Symbol.toStringTag,{value:"Module"})),ur=Ur(oi);var ze,kt;function si(){if(kt)return ze;kt=1;function a(_,T){var F=Object.keys(_);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(_);T&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(_,v).enumerable})),F.push.apply(F,y)}return F}function r(_){for(var T=1;T0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(F){var y={data:F,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var F=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=F+y.data;return v}},{key:"concat",value:function(F){if(this.length===0)return b.alloc(0);for(var y=b.allocUnsafe(F>>>0),v=this.head,S=0;v;)A(v.data,y,S),S+=v.data.length,v=v.next;return y}},{key:"consume",value:function(F,y){var v;return Fm.length?m.length:F;if(g===m.length?S+=m:S+=m.slice(0,F),F-=g,F===0){g===m.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=m.slice(g));break}++v}return this.length-=v,S}},{key:"_getBuffer",value:function(F){var y=b.allocUnsafe(F),v=this.head,S=1;for(v.data.copy(y),F-=v.data.length;v=v.next;){var m=v.data,g=F>m.length?m.length:F;if(m.copy(y,y.length-F,0,g),F-=g,F===0){g===m.length?(++S,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=m.slice(g));break}++S}return this.length-=S,y}},{key:B,value:function(F,y){return R(this,r(r({},y),{},{depth:0,customInspect:!1}))}}]),_})(),ze}var Ve,Nt;function lr(){if(Nt)return Ve;Nt=1;function a(h,i){var d=this,b=this._readableState&&this._readableState.destroyed,D=this._writableState&&this._writableState.destroyed;return b||D?(i?i(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(p,this,h)):process.nextTick(p,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!i&&R?d._writableState?d._writableState.errorEmitted?process.nextTick(o,d):(d._writableState.errorEmitted=!0,process.nextTick(r,d,R)):process.nextTick(r,d,R):i?(process.nextTick(o,d),i(R)):process.nextTick(o,d)}),this)}function r(h,i){p(h,i),o(h)}function o(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function c(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(h,i){h.emit("error",i)}function l(h,i){var d=h._readableState,b=h._writableState;d&&d.autoDestroy||b&&b.autoDestroy?h.destroy(i):h.emit("error",i)}return Ve={destroy:a,undestroy:c,errorOrDestroy:l},Ve}var Ge={},Pt;function _e(){if(Pt)return Ge;Pt=1;function a(i,d){i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.__proto__=d}var r={};function o(i,d,b){b||(b=Error);function D(B,A,_){return typeof d=="string"?d:d(B,A,_)}var R=(function(B){a(A,B);function A(_,T,F){return B.call(this,D(_,T,F))||this}return A})(b);R.prototype.name=b.name,R.prototype.code=i,r[i]=R}function c(i,d){if(Array.isArray(i)){var b=i.length;return i=i.map(function(D){return String(D)}),b>2?"one of ".concat(d," ").concat(i.slice(0,b-1).join(", "),", or ")+i[b-1]:b===2?"one of ".concat(d," ").concat(i[0]," or ").concat(i[1]):"of ".concat(d," ").concat(i[0])}else return"of ".concat(d," ").concat(String(i))}function p(i,d,b){return i.substr(0,d.length)===d}function l(i,d,b){return(b===void 0||b>i.length)&&(b=i.length),i.substring(b-d.length,b)===d}function h(i,d,b){return typeof b!="number"&&(b=0),b+d.length>i.length?!1:i.indexOf(d,b)!==-1}return o("ERR_INVALID_OPT_VALUE",function(i,d){return'The value "'+d+'" is invalid for option "'+i+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(i,d,b){var D;typeof d=="string"&&p(d,"not ")?(D="must not be",d=d.replace(/^not /,"")):D="must be";var R;if(l(i," argument"))R="The ".concat(i," ").concat(D," ").concat(c(d,"type"));else{var B=h(i,".")?"property":"argument";R='The "'.concat(i,'" ').concat(B," ").concat(D," ").concat(c(d,"type"))}return R+=". Received type ".concat(typeof b),R},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.codes=r,Ge}var Ye,It;function fr(){if(It)return Ye;It=1;var a=_e().codes.ERR_INVALID_OPT_VALUE;function r(c,p,l){return c.highWaterMark!=null?c.highWaterMark:p?c[l]:null}function o(c,p,l,h){var i=r(p,h,l);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var d=h?l:"highWaterMark";throw new a(d,i)}return Math.floor(i)}return c.objectMode?16:16*1024}return Ye={getHighWaterMark:o},Ye}var Xe,Ut;function ui(){if(Ut)return Xe;Ut=1,Xe=a;function a(o,c){if(r("noDeprecation"))return o;var p=!1;function l(){if(!p){if(r("throwDeprecation"))throw new Error(c);r("traceDeprecation")?console.trace(c):console.warn(c),p=!0}return o.apply(this,arguments)}return l}function r(o){try{if(!Ee.localStorage)return!1}catch{return!1}var c=Ee.localStorage[o];return c==null?!1:String(c).toLowerCase()==="true"}return Xe}var Qe,Ot;function cr(){if(Ot)return Qe;Ot=1,Qe=P;function a(x){var E=this;this.next=null,this.entry=null,this.finish=function(){be(E,x)}}var r;P.WritableState=C;var o={deprecate:ui()},c=sr(),p=Fe().Buffer,l=(typeof Ee<"u"?Ee:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(x){return p.from(x)}function i(x){return p.isBuffer(x)||x instanceof l}var d=lr(),b=fr(),D=b.getHighWaterMark,R=_e().codes,B=R.ERR_INVALID_ARG_TYPE,A=R.ERR_METHOD_NOT_IMPLEMENTED,_=R.ERR_MULTIPLE_CALLBACK,T=R.ERR_STREAM_CANNOT_PIPE,F=R.ERR_STREAM_DESTROYED,y=R.ERR_STREAM_NULL_VALUES,v=R.ERR_STREAM_WRITE_AFTER_END,S=R.ERR_UNKNOWN_ENCODING,m=d.errorOrDestroy;ve()(P,c);function g(){}function C(x,E,N){r=r||xe(),x=x||{},typeof N!="boolean"&&(N=E instanceof r),this.objectMode=!!x.objectMode,N&&(this.objectMode=this.objectMode||!!x.writableObjectMode),this.highWaterMark=D(this,x,"writableHighWaterMark",N),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=x.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){oe(E,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}C.prototype.getBuffer=function(){for(var E=this.bufferedRequest,N=[];E;)N.push(E),E=E.next;return N},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(E){return I.call(this,E)?!0:this!==P?!1:E&&E._writableState instanceof C}})):I=function(E){return E instanceof this};function P(x){r=r||xe();var E=this instanceof r;if(!E&&!I.call(P,this))return new P(x);this._writableState=new C(x,this,E),this.writable=!0,x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final)),c.call(this)}P.prototype.pipe=function(){m(this,new T)};function U(x,E){var N=new v;m(x,N),process.nextTick(E,N)}function q(x,E,N,j){var H;return N===null?H=new y:typeof N!="string"&&!E.objectMode&&(H=new B("chunk",["string","Buffer"],N)),H?(m(x,H),process.nextTick(j,H),!1):!0}P.prototype.write=function(x,E,N){var j=this._writableState,H=!1,s=!j.objectMode&&i(x);return s&&!p.isBuffer(x)&&(x=h(x)),typeof E=="function"&&(N=E,E=null),s?E="buffer":E||(E=j.defaultEncoding),typeof N!="function"&&(N=g),j.ending?U(this,N):(s||q(this,j,x,N))&&(j.pendingcb++,H=ee(this,j,s,x,E,N)),H},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var x=this._writableState;x.corked&&(x.corked--,!x.writing&&!x.corked&&!x.bufferProcessing&&x.bufferedRequest&&ue(this,x))},P.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=E.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((E+"").toLowerCase())>-1))throw new S(E);return this._writableState.defaultEncoding=E,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(x,E,N){return!x.objectMode&&x.decodeStrings!==!1&&typeof E=="string"&&(E=p.from(E,N)),E}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(x,E,N,j,H,s){if(!N){var f=G(E,j,H);j!==f&&(N=!0,H="buffer",j=f)}var M=E.objectMode?1:j.length;E.length+=M;var O=E.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function h(y,v,S){var m=v.length-1;if(m=0?(g>0&&(y.lastNeed=g-1),g):--m=0?(g>0&&(y.lastNeed=g-2),g):--m=0?(g>0&&(g===2?g=0:y.lastNeed=g-3),g):0))}function i(y,v,S){if((v[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return y.lastNeed=2,"�"}}function d(y){var v=this.lastTotal-this.lastNeed,S=i(this,y);if(S!==void 0)return S;if(this.lastNeed<=y.length)return y.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,v,0,y.length),this.lastNeed-=y.length}function b(y,v){var S=h(this,y,v);if(!this.lastNeed)return y.toString("utf8",v);this.lastTotal=S;var m=y.length-(S-this.lastNeed);return y.copy(this.lastChar,0,m),y.toString("utf8",v,m)}function D(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+"�":v}function R(y,v){if((y.length-v)%2===0){var S=y.toString("utf16le",v);if(S){var m=S.charCodeAt(S.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",v,y.length-1)}function B(y){var v=y&&y.length?this.write(y):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,S)}return v}function A(y,v){var S=(y.length-v)%3;return S===0?y.toString("base64",v):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",v,y.length-S))}function _(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function T(y){return y.toString(this.encoding)}function F(y){return y&&y.length?this.write(y):""}return Je}var et,Kt;function vt(){if(Kt)return et;Kt=1;var a=_e().codes.ERR_STREAM_PREMATURE_CLOSE;function r(l){var h=!1;return function(){if(!h){h=!0;for(var i=arguments.length,d=new Array(i),b=0;b0)if(typeof f!="string"&&!n.objectMode&&Object.getPrototypeOf(f)!==c.prototype&&(f=l(f)),O)n.endEmitted?g(s,new y):G(s,n,f,!0);else if(n.ended)g(s,new T);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!M?(f=n.decoder.write(f),n.objectMode||f.length!==0?G(s,n,f,!1):ue(s,n)):G(s,n,f,!1)}else O||(n.reading=!1,ue(s,n))}return!n.ended&&(n.length=re?s=re:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}function ie(s,f){return s<=0||f.length===0&&f.ended?0:f.objectMode?1:s!==s?f.flowing&&f.length?f.buffer.head.data.length:f.length:(s>f.highWaterMark&&(f.highWaterMark=ne(s)),s<=f.length?s:f.ended?f.length:(f.needReadable=!0,0))}U.prototype.read=function(s){d("read",s),s=parseInt(s,10);var f=this._readableState,M=s;if(s!==0&&(f.emittedReadable=!1),s===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended))return d("read: emitReadable",f.length,f.ended),f.length===0&&f.ended?N(this):ae(this),null;if(s=ie(s,f),s===0&&f.ended)return f.length===0&&N(this),null;var O=f.needReadable;d("need readable",O),(f.length===0||f.length-s0?X=E(s,f):X=null,X===null?(f.needReadable=f.length<=f.highWaterMark,s=0):(f.length-=s,f.awaitDrain=0),f.length===0&&(f.ended||(f.needReadable=!0),M!==s&&f.ended&&N(this)),X!==null&&this.emit("data",X),X};function oe(s,f){if(d("onEofChunk"),!f.ended){if(f.decoder){var M=f.decoder.end();M&&M.length&&(f.buffer.push(M),f.length+=f.objectMode?1:M.length)}f.ended=!0,f.sync?ae(s):(f.needReadable=!1,f.emittedReadable||(f.emittedReadable=!0,he(s)))}}function ae(s){var f=s._readableState;d("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,f.emittedReadable||(d("emitReadable",f.flowing),f.emittedReadable=!0,process.nextTick(he,s))}function he(s){var f=s._readableState;d("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended)&&(s.emit("readable"),f.emittedReadable=!1),f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,x(s)}function ue(s,f){f.readingMore||(f.readingMore=!0,process.nextTick(fe,s,f))}function fe(s,f){for(;!f.reading&&!f.ended&&(f.length1&&H(O.pipes,s)!==-1)&&!w&&(d("false write response, pause",O.awaitDrain),O.awaitDrain++),M.pause())}function W($){d("onerror",$),J(),s.removeListener("error",W),r(s,"error")===0&&g(s,$)}I(s,"error",W);function K(){s.removeListener("finish",V),J()}s.once("close",K);function V(){d("onfinish"),s.removeListener("close",K),J()}s.once("finish",V);function J(){d("unpipe"),M.unpipe(s)}return s.emit("pipe",M),O.flowing||(d("pipe resume"),M.resume()),s};function Y(s){return function(){var M=s._readableState;d("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&r(s,"data")&&(M.flowing=!0,x(s))}}U.prototype.unpipe=function(s){var f=this._readableState,M={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1)return s&&s!==f.pipes?this:(s||(s=f.pipes),f.pipes=null,f.pipesCount=0,f.flowing=!1,s&&s.emit("unpipe",this,M),this);if(!s){var O=f.pipes,X=f.pipesCount;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var n=0;n0,O.flowing!==!1&&this.resume()):s==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,d("on readable",O.length,O.reading),O.length?ae(this):O.reading||process.nextTick(te,this)),M},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(s,f){var M=o.prototype.removeListener.call(this,s,f);return s==="readable"&&process.nextTick(Z,this),M},U.prototype.removeAllListeners=function(s){var f=o.prototype.removeAllListeners.apply(this,arguments);return(s==="readable"||s===void 0)&&process.nextTick(Z,this),f};function Z(s){var f=s._readableState;f.readableListening=s.listenerCount("readable")>0,f.resumeScheduled&&!f.paused?f.flowing=!0:s.listenerCount("data")>0&&s.resume()}function te(s){d("readable nexttick read 0"),s.read(0)}U.prototype.resume=function(){var s=this._readableState;return s.flowing||(d("resume"),s.flowing=!s.readableListening,we(this,s)),s.paused=!1,this};function we(s,f){f.resumeScheduled||(f.resumeScheduled=!0,process.nextTick(be,s,f))}function be(s,f){d("resume",f.reading),f.reading||s.read(0),f.resumeScheduled=!1,s.emit("resume"),x(s),f.flowing&&!f.reading&&s.read(0)}U.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function x(s){var f=s._readableState;for(d("flow",f.flowing);f.flowing&&s.read()!==null;);}U.prototype.wrap=function(s){var f=this,M=this._readableState,O=!1;s.on("end",function(){if(d("wrapped end"),M.decoder&&!M.ended){var e=M.decoder.end();e&&e.length&&f.push(e)}f.push(null)}),s.on("data",function(e){if(d("wrapped data"),M.decoder&&(e=M.decoder.write(e)),!(M.objectMode&&e==null)&&!(!M.objectMode&&(!e||!e.length))){var t=f.push(e);t||(O=!0,s.pause())}});for(var X in s)this[X]===void 0&&typeof s[X]=="function"&&(this[X]=(function(t){return function(){return s[t].apply(s,arguments)}})(X));for(var n=0;n=f.length?(f.decoder?M=f.buffer.join(""):f.buffer.length===1?M=f.buffer.first():M=f.buffer.concat(f.length),f.buffer.clear()):M=f.buffer.consume(s,f.decoder),M}function N(s){var f=s._readableState;d("endReadable",f.endEmitted),f.endEmitted||(f.ended=!0,process.nextTick(j,f,s))}function j(s,f){if(d("endReadableNT",s.endEmitted,s.length),!s.endEmitted&&s.length===0&&(s.endEmitted=!0,f.readable=!1,f.emit("end"),s.autoDestroy)){var M=f._writableState;(!M||M.autoDestroy&&M.finished)&&f.destroy()}}typeof Symbol=="function"&&(U.from=function(s,f){return m===void 0&&(m=ci()),m(U,s,f)});function H(s,f){for(var M=0,O=s.length;M0;return i(v,m,g,function(C){F||(F=C),C&&y.forEach(d),!m&&(y.forEach(d),T(F))})});return A.reduce(b)}return ot=R,ot}var st,Qt;function pi(){if(Qt)return st;Qt=1,st=o;var a=Oe().EventEmitter,r=ve();r(o,a),o.Readable=hr(),o.Writable=cr(),o.Duplex=xe(),o.Transform=dr(),o.PassThrough=hi(),o.finished=vt(),o.pipeline=di(),o.Stream=o;function o(){a.call(this)}return o.prototype.pipe=function(c,p){var l=this;function h(A){c.writable&&c.write(A)===!1&&l.pause&&l.pause()}l.on("data",h);function i(){l.readable&&l.resume&&l.resume()}c.on("drain",i),!c._isStdio&&(!p||p.end!==!1)&&(l.on("end",b),l.on("close",D));var d=!1;function b(){d||(d=!0,c.end())}function D(){d||(d=!0,typeof c.destroy=="function"&&c.destroy())}function R(A){if(B(),a.listenerCount(this,"error")===0)throw A}l.on("error",R),c.on("error",R);function B(){l.removeListener("data",h),c.removeListener("drain",i),l.removeListener("end",b),l.removeListener("close",D),l.removeListener("error",R),c.removeListener("error",R),l.removeListener("end",B),l.removeListener("close",B),c.removeListener("close",B)}return l.on("end",B),l.on("close",B),c.on("close",B),c.emit("pipe",l),c},st}var yi=pi();async function*ut(a,r,o){let c=1;const p={chunks:[],length:0};for await(const l of o(a))for(p.chunks.push(l),p.length+=l.byteLength;p.length>r;){const h=p.chunks.length>1?de.Buffer.concat(p.chunks):p.chunks[0];yield{partNumber:c,data:h.subarray(0,r)},p.chunks=[h.subarray(r)],p.length=p.chunks[0].byteLength,c+=1}yield{partNumber:c,data:p.chunks.length!==1?de.Buffer.concat(p.chunks):p.chunks[0],lastPart:!0}}async function*Zt(a,r){let o=1,c=0,p=r;for(;p{if(a instanceof Uint8Array)return Zt(a,r);if(a instanceof yi.Readable)return ut(a,r,mi);if(a instanceof String||typeof a=="string")return Zt(de.Buffer.from(a),r);if(typeof a.stream=="function")return ut(a.stream(),r,Jt);if(a instanceof ReadableStream)return ut(a,r,Jt);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")};class Re extends We.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(r){if(super(),this.queueSize=r.queueSize||this.queueSize,this.leavePartsOnError=r.leavePartsOnError||this.leavePartsOnError,this.tags=r.tags||this.tags,this.client=r.client,this.params=r.params,!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");this.totalBytes=this.params.ContentLength??Me(this.params.Body),this.totalBytesSource=ii(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=r.abortController??new ei,this.partSize=r.partSize||Math.max(Re.MIN_PART_SIZE,Math.floor((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(r,o){return this.uploadEvent=r,super.on(r,o)}async __uploadUsingPut(r){this.isMultiPart=!1;const o={...this.params,Body:r.data},c=this.client.config,p=c.requestHandler,l=p instanceof We.EventEmitter?p:null,h=_=>{this.bytesUploadedSoFar=_.loaded,this.totalBytes=_.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:r.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};l!==null&&l.on("xhr.upload.progress",h);const i=await Promise.all([this.client.send(new Rt(o)),c?.endpoint?.()]),d=i[0];let b=i[1];if(b||(b=Or(await qr(o,Rt,{...c}))),!b)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');l!==null&&l.off("xhr.upload.progress",h);const D=this.params.Key.split("/").map(_=>St(_)).join("/"),R=St(this.params.Bucket),B=(()=>{const _=b.hostname.startsWith(`${R}.`),T=this.client.config.forcePathStyle,F=b.port?`:${b.port}`:"";return T?`${b.protocol}//${b.hostname}${F}/${R}/${D}`:_?`${b.protocol}//${b.hostname}${F}/${D}`:`${b.protocol}//${R}.${b.hostname}${F}/${D}`})();this.singleUploadResult={...d,Bucket:this.params.Bucket,Key:this.params.Key,Location:B};const A=Me(r.data);this.__notifyProgress({loaded:A,total:A,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){const r=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){const o={...this.params,Body:void 0};r==="WHEN_SUPPORTED"&&(o.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Zn.CRC32),this.createMultiPartPromise=this.client.send(new Vn(o)).then(c=>(this.abortMultipartUploadCommand=new Hn({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:c.UploadId}),c))}return this.createMultiPartPromise}async __doConcurrentUpload(r){for await(const o of r){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(o.partNumber===1&&o.lastPart)return await this.__uploadUsingPut(o);if(!this.uploadId){const{UploadId:b}=await this.__createMultipartUpload();if(this.uploadId=b,this.abortController.signal.aborted)return}const c=Me(o.data)||0,p=this.client.config.requestHandler,l=p instanceof We.EventEmitter?p:null;let h=0;const i=(b,D)=>{(Number(D.query.partNumber)||-1)===o.partNumber&&(b.total&&c&&(this.bytesUploadedSoFar+=b.loaded-h,h=b.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};l!==null&&l.on("xhr.upload.progress",i),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(o);const d=await this.client.send(new Qn({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:o.data,PartNumber:o.partNumber}));if(l!==null&&l.off("xhr.upload.progress",i),this.abortController.signal.aborted)return;if(!d.ETag)throw new Error(`Part ${o.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:o.partNumber,ETag:d.ETag,...d.ChecksumCRC32&&{ChecksumCRC32:d.ChecksumCRC32},...d.ChecksumCRC32C&&{ChecksumCRC32C:d.ChecksumCRC32C},...d.ChecksumSHA1&&{ChecksumSHA1:d.ChecksumSHA1},...d.ChecksumSHA256&&{ChecksumSHA256:d.ChecksumSHA256}}),l===null&&(this.bytesUploadedSoFar+=c),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const r=gi(this.params.Body,this.partSize),o=[];for(let p=0;p{o.push(h)});this.concurrentUploaders.push(l)}if(await Promise.all(this.concurrentUploaders),o.length>=1)throw await this.markUploadAsAborted(),o[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let c;if(this.isMultiPart){const{expectedPartsCount:p,uploadedParts:l,totalBytes:h,totalBytesSource:i}=this;if(h!==void 0&&p!==void 0&&l.length!==p)throw new Error(`Expected ${p} part(s) but uploaded ${l.length} part(s). The expected part count is based on the byte-count of the input.params.Body, which was read from ${i} and is ${h}. If this is not correct, provide an override value by setting a number diff --git a/hive/services/hiveui/frontend/dist/assets/useMutation.js b/hive/services/hiveui/frontend/dist/assets/useMutation.js index 111a0586c..4868da0cc 100644 --- a/hive/services/hiveui/frontend/dist/assets/useMutation.js +++ b/hive/services/hiveui/frontend/dist/assets/useMutation.js @@ -1 +1 @@ -import{b_ as l,b$ as d,c0 as a,c1 as b,c2 as h,bk as p,r as o,c3 as m,c4 as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u}; +import{b_ as l,b$ as d,c0 as a,c1 as b,c2 as h,bj as p,r as o,c3 as m,c4 as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js index 9ef24926c..9da4cfb3b 100644 --- a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js +++ b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js @@ -1 +1 @@ -import{b_ as $,c7 as N,c8 as l,b$ as Q,c9 as g,c3 as _,ca as M,cb as B,cc as G,cd as C,ce as J,cf as X,cg as A,c2 as z,r as d,c4 as V,bk as Y}from"./index.js";var Z=class extends ${constructor(t,e){super(),this.options=e,this.#s=t,this.#i=null,this.#r=N(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#u;#r;#i;#b;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),j(this.#t,this.options)?this.#c():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&H(this.#t,s,this.options,e)&&this.#c(),this.updateResult(),r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#v();const i=this.#R();r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||i!==this.#a)&&this.#m(i)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return tt(this,s)&&(this.#e=s,this.#u=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#c({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#c(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(_)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(M||this.#e.isStale||!B(t))return;const s=G(this.#e.dataUpdatedAt,t)+1;this.#o=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#R(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#S(),this.#a=t,!(M||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||J.isFocused())&&this.#c()},this.#a))}#g(){this.#v(),this.#m(this.#R())}#y(){this.#o&&(C.clearTimeout(this.#o),this.#o=void 0)}#S(){this.#h&&(C.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#e,u=this.#n,n=this.#u,v=t!==s?t.state:this.#p,{state:h}=t;let a={...h},R=!1,o;if(e._optimisticResults){const c=this.hasListeners(),m=!c&&j(t,e),S=c&&H(t,s,e,r);(m||S)&&(a={...a,...X(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:y,errorUpdatedAt:U,status:b}=a;o=a.data;let D=!1;if(e.placeholderData!==void 0&&o===void 0&&b==="pending"){let c;i?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(c=i.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(b="success",o=A(i?.data,c,e),R=!0)}if(e.select&&o!==void 0&&!D)if(i&&o===u?.data&&e.select===this.#b)o=this.#l;else try{this.#b=e.select,o=e.select(o),o=A(i?.data,o,e),this.#l=o,this.#i=null}catch(c){this.#i=c}this.#i&&(y=this.#i,o=this.#l,U=Date.now(),b="error");const I=a.fetchStatus==="fetching",T=b==="pending",w=b==="error",F=T&&I,k=o!==void 0,p={status:b,fetchStatus:a.fetchStatus,isPending:T,isSuccess:b==="success",isError:w,isInitialLoading:F,isLoading:F,data:o,dataUpdatedAt:a.dataUpdatedAt,error:y,errorUpdatedAt:U,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>v.dataUpdateCount||a.errorUpdateCount>v.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:w&&!k,isPaused:a.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:w&&k,isStale:P(t,e),refetch:this.refetch,promise:this.#r,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=p.data!==void 0,m=p.status==="error"&&!c,S=E=>{m?E.reject(p.error):c&&E.resolve(p.data)},L=()=>{const E=this.#r=p.promise=N();S(E)},O=this.#r;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(m||p.data!==O.value)&&L();break;case"rejected":(!m||p.error!==O.reason)&&L();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#u=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Q(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const u=new Set(i??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(n=>{const f=n;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#E(t){z.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function q(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function j(t,e){return q(t,e)||t.state.data!==void 0&&x(t,e,e.refetchOnMount)}function x(t,e,s){if(l(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&P(t,e)}return!1}function H(t,e,s,r){return(t!==e||l(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&P(t,s)}function P(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}function tt(t,e){return!Q(t.getCurrentResult(),e)}var K=d.createContext(!1),et=()=>d.useContext(K);K.Provider;function st(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rt=d.createContext(st()),it=()=>d.useContext(rt),at=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?V(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},nt=t=>{d.useEffect(()=>{t.clearReset()},[t])},ot=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||V(s,[t.error,r])),ht=(t,e)=>e.state.data===void 0,ct=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ut=(t,e)=>t.isLoading&&t.isFetching&&!e,lt=(t,e)=>t?.suspense&&e.isPending,W=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dt(t,e,s){const r=et(),i=it(),u=Y(),n=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=u.getQueryCache().get(n.queryHash);n._optimisticResults=r?"isRestoring":"optimistic",ct(n),at(n,i,f),nt(i);const v=!u.getQueryCache().get(n.queryHash),[h]=d.useState(()=>new e(u,n)),a=h.getOptimisticResult(n),R=!r&&t.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(o=>{const y=R?h.subscribe(z.batchCalls(o)):_;return h.updateResult(),y},[h,R]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),d.useEffect(()=>{h.setOptions(n)},[n,h]),lt(n,a))throw W(n,h,i);if(ot({result:a,errorResetBoundary:i,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(n,a),n.experimental_prefetchInRender&&!M&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(_).finally(()=>{h.updateResult()}),n.notifyOnChangeProps?a:h.trackResult(a)}function bt(t,e){return dt({...t,enabled:!0,suspense:!0,throwOnError:ht,placeholderData:void 0},Z)}export{bt as u}; +import{b_ as $,c7 as N,c8 as l,b$ as Q,c9 as g,c3 as _,ca as M,cb as B,cc as G,cd as C,ce as J,cf as X,cg as j,c2 as z,r as d,c4 as V,bj as Y}from"./index.js";var Z=class extends ${constructor(t,e){super(),this.options=e,this.#s=t,this.#i=null,this.#r=N(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#u;#r;#i;#b;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A(this.#t,this.options)?this.#c():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&H(this.#t,s,this.options,e)&&this.#c(),this.updateResult(),r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#v();const i=this.#R();r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||i!==this.#a)&&this.#m(i)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return tt(this,s)&&(this.#e=s,this.#u=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#c({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#c(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(_)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(M||this.#e.isStale||!B(t))return;const s=G(this.#e.dataUpdatedAt,t)+1;this.#o=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#R(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#S(),this.#a=t,!(M||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||J.isFocused())&&this.#c()},this.#a))}#g(){this.#v(),this.#m(this.#R())}#y(){this.#o&&(C.clearTimeout(this.#o),this.#o=void 0)}#S(){this.#h&&(C.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#e,u=this.#n,n=this.#u,v=t!==s?t.state:this.#p,{state:h}=t;let a={...h},R=!1,o;if(e._optimisticResults){const c=this.hasListeners(),m=!c&&A(t,e),S=c&&H(t,s,e,r);(m||S)&&(a={...a,...X(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:y,errorUpdatedAt:U,status:b}=a;o=a.data;let D=!1;if(e.placeholderData!==void 0&&o===void 0&&b==="pending"){let c;i?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(c=i.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(b="success",o=j(i?.data,c,e),R=!0)}if(e.select&&o!==void 0&&!D)if(i&&o===u?.data&&e.select===this.#b)o=this.#l;else try{this.#b=e.select,o=e.select(o),o=j(i?.data,o,e),this.#l=o,this.#i=null}catch(c){this.#i=c}this.#i&&(y=this.#i,o=this.#l,U=Date.now(),b="error");const I=a.fetchStatus==="fetching",T=b==="pending",w=b==="error",F=T&&I,k=o!==void 0,p={status:b,fetchStatus:a.fetchStatus,isPending:T,isSuccess:b==="success",isError:w,isInitialLoading:F,isLoading:F,data:o,dataUpdatedAt:a.dataUpdatedAt,error:y,errorUpdatedAt:U,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>v.dataUpdateCount||a.errorUpdateCount>v.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:w&&!k,isPaused:a.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:w&&k,isStale:P(t,e),refetch:this.refetch,promise:this.#r,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=p.data!==void 0,m=p.status==="error"&&!c,S=E=>{m?E.reject(p.error):c&&E.resolve(p.data)},L=()=>{const E=this.#r=p.promise=N();S(E)},O=this.#r;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(m||p.data!==O.value)&&L();break;case"rejected":(!m||p.error!==O.reason)&&L();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#u=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Q(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const u=new Set(i??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(n=>{const f=n;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#E(t){z.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function q(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function A(t,e){return q(t,e)||t.state.data!==void 0&&x(t,e,e.refetchOnMount)}function x(t,e,s){if(l(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&P(t,e)}return!1}function H(t,e,s,r){return(t!==e||l(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&P(t,s)}function P(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}function tt(t,e){return!Q(t.getCurrentResult(),e)}var K=d.createContext(!1),et=()=>d.useContext(K);K.Provider;function st(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rt=d.createContext(st()),it=()=>d.useContext(rt),at=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?V(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},nt=t=>{d.useEffect(()=>{t.clearReset()},[t])},ot=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||V(s,[t.error,r])),ht=(t,e)=>e.state.data===void 0,ct=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ut=(t,e)=>t.isLoading&&t.isFetching&&!e,lt=(t,e)=>t?.suspense&&e.isPending,W=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dt(t,e,s){const r=et(),i=it(),u=Y(),n=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=u.getQueryCache().get(n.queryHash);n._optimisticResults=r?"isRestoring":"optimistic",ct(n),at(n,i,f),nt(i);const v=!u.getQueryCache().get(n.queryHash),[h]=d.useState(()=>new e(u,n)),a=h.getOptimisticResult(n),R=!r&&t.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(o=>{const y=R?h.subscribe(z.batchCalls(o)):_;return h.updateResult(),y},[h,R]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),d.useEffect(()=>{h.setOptions(n)},[n,h]),lt(n,a))throw W(n,h,i);if(ot({result:a,errorResetBoundary:i,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(n,a),n.experimental_prefetchInRender&&!M&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(_).finally(()=>{h.updateResult()}),n.notifyOnChangeProps?a:h.trackResult(a)}function bt(t,e){return dt({...t,enabled:!0,suspense:!0,throwOnError:ht,placeholderData:void 0},Z)}export{bt as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/zod.js b/hive/services/hiveui/frontend/dist/assets/zod.js deleted file mode 100644 index 73b613253..000000000 --- a/hive/services/hiveui/frontend/dist/assets/zod.js +++ /dev/null @@ -1 +0,0 @@ -import{r as ee,bq as re,V as jt,E as et,br as qt,G as he,bs as Wt,I as mt,ap as Ht,ab as $t,w as zt,a9 as Kt,j as bt,c as Yt,a as Gt,bt as b,bu as Zt,bv as Jt,bw as Qt}from"./index.js";let tt=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Xt={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},er={valid(e){return e===null?null:e?{[tt.valid]:""}:{[tt.invalid]:""}}},tr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:Xt,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=et)=>e,getInputValidationProps:(e=et)=>e,inputRef:{current:null},commit:async()=>{}}});function Se(e=!0){const r=ee.useContext(tr);if(r.setValidityData===re&&!e)throw new Error(jt(28));return r}const rr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function sr(){return ee.useContext(rr)}const ir=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function Vt(){return ee.useContext(ir)}function ar(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function nr({controlled:e,default:r,name:t,state:s="value"}){const{current:l}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=l?e:a,V=ee.useCallback(E=>{l||o(E)},[]);return[d,V]}function lr(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:l,setControlId:a}=Vt(),o=qt(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;Wt(d)&&d.closest("label")!=null?a(r??null):a(l??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,l,a,t,o]),l??o}function or(e){const{enabled:r=!0,value:t,id:s,name:l,controlRef:a,commit:o}=e,{formRef:d}=sr(),{invalid:V,markedDirtyRef:E,validityData:R,setValidityData:m}=Se(),F=mt(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=F()),R.initialValue===null&&h!==null&&m(O=>({...O,initialValue:h}))},[r,m,t,R.initialValue,F]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:F,name:l,controlRef:a,validityData:ar(R,V),validate(h=!0){let O=t;O===void 0&&(O=F()),E.current=!0,h?Ht.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,F,s,V,E,l,R,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const ur=ee.forwardRef(function(r,t){const{render:s,className:l,id:a,name:o,value:d,disabled:V=!1,onValueChange:E,defaultValue:R,...m}=r,{state:F,name:h,disabled:O}=Se(),T=O||V,L=h??o,M=ee.useMemo(()=>({...F,disabled:T}),[F,T]),{setTouched:_,setDirty:H,validityData:x,setFocused:p,setFilled:q,validationMode:te,validation:W}=Se(),{labelId:X}=Vt(),z=lr({id:a});he(()=>{const S=d!=null;W.inputRef.current?.value||S&&d!==""?q(!0):S&&d===""&&q(!1)},[W.inputRef,q,d]);const[le,w]=nr({controlled:d,default:R,name:"FieldControl",state:"value"}),C=d!==void 0,U=mt((S,N)=>{E?.(S,N),!N.isCanceled&&w(S)});return or({id:z,name:L,commit:W.commit,value:le,getValue:()=>W.inputRef.current?.value,controlRef:W.inputRef}),$t("input",r,{ref:t,state:M,props:[{id:z,disabled:T,name:L,ref:W.inputRef,"aria-labelledby":X,...C?{value:le}:{defaultValue:R},onChange(S){const N=S.currentTarget.value;U(N,zt(Kt,S.nativeEvent)),H(N!==x.initialValue),q(N!=="")},onFocus(){p(!0)},onBlur(S){_(!0),p(!1),te==="onBlur"&&W.commit(S.currentTarget.value)},onKeyDown(S){S.currentTarget.tagName==="INPUT"&&S.key==="Enter"&&(_(!0),W.commit(S.currentTarget.value))}},W.getInputValidationProps(),m],stateAttributesMapping:er})}),dr=ee.forwardRef(function(r,t){return bt.jsx(ur,{ref:t,...r})});function Ur(e){const r=Yt.c(10);let t,s,l;r[0]!==e?({className:t,type:l,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=l):(t=r[1],s=r[2],l=r[3]);let a;r[4]!==t?(a=Gt("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==l?(o=bt.jsx(dr,{className:a,"data-slot":"input",type:l,...s}),r[6]=s,r[7]=a,r[8]=l,r[9]=o):o=r[9],o}var Ve=e=>e.type==="checkbox",ue=e=>e instanceof Date,Z=e=>e==null;const _t=e=>typeof e=="object";var j=e=>!Z(e)&&!Array.isArray(e)&&_t(e)&&!ue(e),Ft=e=>j(e)&&e.target?Ve(e.target)?e.target.checked:e.target.value:e,fr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xt=(e,r)=>e.has(fr(r)),cr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Me=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Me&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&cr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(s[l]=P(e[l]));return s}var we=e=>/^\w*$/.test(e),I=e=>e===void 0,Ue=e=>Array.isArray(e)?e.filter(Boolean):[],Le=e=>Ue(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(we(r)?[r]:Le(r)).reduce((l,a)=>Z(l)?l:l[a],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",G=e=>typeof e=="function",k=(e,r,t)=>{let s=-1;const l=we(r)?[r]:Le(r),a=l.length,o=a-1;for(;++sb.useContext(wt);var pt=(e,r,t,s=!0)=>{const l={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(l,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return l};const Pe=typeof window<"u"?b.useLayoutEffect:b.useEffect;function yr(e){const r=Ne(),{control:t=r,disabled:s,name:l,exact:a}=e||{},[o,d]=b.useState(t._formState),V=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pe(()=>t._subscribe({name:l,formState:V.current,exact:a,callback:E=>{!s&&d({...t._formState,...E})}}),[l,s,a]),b.useEffect(()=>{V.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>pt(o,t,V.current,!1),[o,t])}var Q=e=>typeof e=="string",Re=(e,r,t,s,l)=>Q(e)?(s&&r.watch.add(e),y(t,e,l)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Oe=e=>Z(e)||!_t(e);function ie(e,r,t=new WeakSet){if(Oe(e)||Oe(r))return Object.is(e,r);if(ue(e)&&ue(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),l=Object.keys(r);if(s.length!==l.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!l.includes(a))return!1;if(a!=="ref"){const d=r[a];if(ue(o)&&ue(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function vr(e){const r=Ne(),{control:t=r,name:s,defaultValue:l,disabled:a,exact:o,compute:d}=e||{},V=b.useRef(l),E=b.useRef(d),R=b.useRef(void 0),m=b.useRef(t),F=b.useRef(s);E.current=d;const[h,O]=b.useState(()=>{const x=t._getWatch(s,V.current);return E.current?E.current(x):x}),T=b.useCallback(x=>{const p=Re(s,t._names,x||t._formValues,!1,V.current);return E.current?E.current(p):p},[t._formValues,t._names,s]),L=b.useCallback(x=>{if(!a){const p=Re(s,t._names,x||t._formValues,!1,V.current);if(E.current){const q=E.current(p);ie(q,R.current)||(O(q),R.current=q)}else O(p)}},[t._formValues,t._names,a,s]);Pe(()=>((m.current!==t||!ie(F.current,s))&&(m.current=t,F.current=s,L()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:x=>{L(x.values)}})),[t,o,s,L]),b.useEffect(()=>t._removeUnmounted());const M=m.current!==t,_=F.current,H=b.useMemo(()=>{if(a)return null;const x=!M&&!ie(_,s);return M||x?T():null},[a,M,s,_,T]);return H!==null?H:h}function gr(e){const r=Ne(),{name:t,disabled:s,control:l=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,V=xt(l._names.array,t),E=b.useMemo(()=>y(l._formValues,t,y(l._defaultValues,t,o)),[l,t,o]),R=vr({control:l,name:t,defaultValue:E,exact:d}),m=yr({control:l,name:t,exact:d}),F=b.useRef(e),h=b.useRef(void 0),O=b.useRef(l.register(t,{...e.rules,value:R,...J(e.disabled)?{disabled:e.disabled}:{}}));F.current=e;const T=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),L=b.useCallback(x=>O.current.onChange({target:{value:Ft(x),name:t},type:_e.CHANGE}),[t]),M=b.useCallback(()=>O.current.onBlur({target:{value:y(l._formValues,t),name:t},type:_e.BLUR}),[t,l._formValues]),_=b.useCallback(x=>{const p=y(l._fields,t);p&&p._f&&x&&(p._f.ref={focus:()=>G(x.focus)&&x.focus(),select:()=>G(x.select)&&x.select(),setCustomValidity:q=>G(x.setCustomValidity)&&x.setCustomValidity(q),reportValidity:()=>G(x.reportValidity)&&x.reportValidity()})},[l._fields,t]),H=b.useMemo(()=>({name:t,value:R,...J(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:L,onBlur:M,ref:_}),[t,s,m.disabled,L,M,_,R]);return b.useEffect(()=>{const x=l._options.shouldUnregister||a,p=h.current;p&&p!==t&&!V&&l.unregister(p),l.register(t,{...F.current.rules,...J(F.current.disabled)?{disabled:F.current.disabled}:{}});const q=(te,W)=>{const X=y(l._fields,te);X&&X._f&&(X._f.mount=W)};if(q(t,!0),x){const te=P(y(l._options.defaultValues,t,F.current.defaultValue));k(l._defaultValues,t,te),I(y(l._formValues,t))&&k(l._formValues,t,te)}return!V&&l.register(t),h.current=t,()=>{(V?x&&!l._state.action:x)?l.unregister(t):q(t,!1)}},[t,l,V,a]),b.useEffect(()=>{l._setDisabledField({disabled:s,name:t})},[s,t,l]),b.useMemo(()=>({field:H,formState:m,fieldState:T}),[H,m,T])}const Lr=e=>e.render(gr(e)),hr=b.createContext(null);hr.displayName="HookFormContext";var Be=(e,r,t,s,l)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:l||!0}}:{},me=e=>Array.isArray(e)?e:[e],rt=()=>{let e=[];return{get observers(){return e},next:l=>{for(const a of e)a.next&&a.next(l)},subscribe:l=>(e.push(l),{unsubscribe:()=>{e=e.filter(a=>a!==l)}}),unsubscribe:()=>{e=[]}}};function Et(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const l=e[s],a=r[s];if(l&&j(l)&&a){const o=Et(l,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var Y=e=>j(e)&&!Object.keys(e).length,je=e=>e.type==="file",Fe=e=>{if(!Me)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Ct=e=>e.type==="select-multiple",qe=e=>e.type==="radio",mr=e=>qe(e)||Ve(e),ke=e=>Fe(e)&&e.isConnected;function br(e,r){const t=r.slice(0,-1).length;let s=0;for(;s{for(const r in e)if(G(e[r]))return!0;return!1};function At(e){return Array.isArray(e)||j(e)&&!_r(e)}function Ie(e,r={}){for(const t in e){const s=e[t];At(s)?(r[t]=Array.isArray(s)?[]:{},Ie(s,r[t])):I(s)||(r[t]=!0)}return r}function fe(e,r,t){t||(t=Ie(r));for(const s in e){const l=e[s];if(At(l))I(r)||Oe(t[s])?t[s]=Ie(l,Array.isArray(l)?[]:{}):fe(l,Z(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!ie(l,a)}}return t}const st={value:!1,isValid:!1},it={value:!0,isValid:!0};var Dt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?it:{value:e[0].value,isValid:!0}:it:st}return st},kt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>I(e)?e:r?e===""?NaN:e&&+e:t&&Q(e)?new Date(e):s?s(e):e;const at={isValid:!1,value:null};var St=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,at):at;function nt(e){const r=e.ref;return je(r)?r.files:qe(r)?St(e.refs).value:Ct(r)?[...r.selectedOptions].map(({value:t})=>t):Ve(r)?Dt(e.refs).value:kt(I(r.value)?e.ref.value:r.value,e)}var Fr=(e,r,t,s)=>{const l={};for(const a of e){const o=y(r,a);o&&k(l,a,o._f)}return{criteriaMode:t,names:[...e],fields:l,shouldUseNativeValidation:s}},xe=e=>e instanceof RegExp,ge=e=>I(e)?e:xe(e)?e.source:j(e)?xe(e.value)?e.value.source:e.value:e,lt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const ot="AsyncFunction";var xr=e=>!!e&&!!e.validate&&!!(G(e.validate)&&e.validate.constructor.name===ot||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ot)),wr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ut=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const be=(e,r,t,s)=>{for(const l of t||Object.keys(e)){const a=y(e,l);if(a){const{_f:o,...d}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],l)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(be(d,r))break}else if(j(d)&&be(d,r))break}}};function dt(e,r,t){const s=y(e,t);if(s||we(t))return{error:s,name:t};const l=t.split(".");for(;l.length;){const a=l.join("."),o=y(r,a),d=y(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(d&&d.type)return{name:a,error:d};if(d&&d.root&&d.root.type)return{name:`${a}.root`,error:d.root};l.pop()}return{name:t}}var pr=(e,r,t,s)=>{t(e);const{name:l,...a}=e;return Y(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},Er=(e,r,t)=>!e||!r||e===r||me(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Cr=(e,r,t,s,l)=>l.isOnAll?!1:!t&&l.isOnTouch?!(r||e):(t?s.isOnBlur:l.isOnBlur)?!e:(t?s.isOnChange:l.isOnChange)?e:!0,Ar=(e,r)=>!Ue(y(e,r)).length&&B(e,r),Dr=(e,r,t)=>{const s=me(y(e,t));return k(s,"root",r[t]),k(e,t,s),e};function ft(e,r,t="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||J(e)&&!e)return{type:t,message:Q(e)?e:"",ref:r}}var de=e=>j(e)&&!xe(e)?e:{value:e,message:""},ct=async(e,r,t,s,l,a)=>{const{ref:o,refs:d,required:V,maxLength:E,minLength:R,min:m,max:F,pattern:h,validate:O,name:T,valueAsNumber:L,mount:M}=e._f,_=y(t,T);if(!M||r.has(T))return{};const H=d?d[0]:o,x=w=>{l&&H.reportValidity&&(H.setCustomValidity(J(w)?"":w||""),H.reportValidity())},p={},q=qe(o),te=Ve(o),W=q||te,X=(L||je(o))&&I(o.value)&&I(_)||Fe(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,z=Be.bind(null,T,s,p),le=(w,C,U,$=ae.maxLength,S=ae.minLength)=>{const N=w?C:U;p[T]={type:w?$:S,message:N,ref:o,...z(w?$:S,N)}};if(a?!Array.isArray(_)||!_.length:V&&(!W&&(X||Z(_))||J(_)&&!_||te&&!Dt(d).isValid||q&&!St(d).isValid)){const{value:w,message:C}=Q(V)?{value:!!V,message:V}:de(V);if(w&&(p[T]={type:ae.required,message:C,ref:H,...z(ae.required,C)},!s))return x(C),p}if(!X&&(!Z(m)||!Z(F))){let w,C;const U=de(F),$=de(m);if(!Z(_)&&!isNaN(_)){const S=o.valueAsNumber||_&&+_;Z(U.value)||(w=S>U.value),Z($.value)||(C=S<$.value)}else{const S=o.valueAsDate||new Date(_),N=ve=>new Date(new Date().toDateString()+" "+ve),ce=o.type=="time",ye=o.type=="week";Q(U.value)&&_&&(w=ce?N(_)>N(U.value):ye?_>U.value:S>new Date(U.value)),Q($.value)&&_&&(C=ce?N(_)+w.value,$=!Z(C.value)&&_.length<+C.value;if((U||$)&&(le(U,w.message,C.message),!s))return x(p[T].message),p}if(h&&!X&&Q(_)){const{value:w,message:C}=de(h);if(xe(w)&&!_.match(w)&&(p[T]={type:ae.pattern,message:C,ref:o,...z(ae.pattern,C)},!s))return x(C),p}if(O){if(G(O)){const w=await O(_,t),C=ft(w,H);if(C&&(p[T]={...C,...z(ae.validate,C.message)},!s))return x(C.message),p}else if(j(O)){let w={};for(const C in O){if(!Y(w)&&!s)break;const U=ft(await O[C](_,t),H,C);U&&(w={...U,...z(C,U.message)},x(U.message),s&&(p[T]=w))}if(!Y(w)&&(p[T]={ref:H,...w},!s))return p}}return x(!0),p};const kr={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Sr(e={}){let r={...kr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:G(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},l=j(r.defaultValues)||j(r.values)?P(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:P(l),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},V,E=0;const R={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...R};let F={...m};const h={array:rt(),state:rt()},O=r.criteriaMode===se.all,T=i=>n=>{clearTimeout(E),E=setTimeout(i,n)},L=async i=>{if(!o.keepIsValid&&!r.disabled&&(m.isValid||F.isValid||i)){let n;r.resolver?(n=Y((await W()).errors),M()):n=await z(s,!0),n!==t.isValid&&h.state.next({isValid:n})}},M=(i,n)=>{!r.disabled&&(m.isValidating||m.validatingFields||F.isValidating||F.validatingFields)&&((i||Array.from(d.mount)).forEach(u=>{u&&(n?k(t.validatingFields,u,n):B(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!Y(t.validatingFields)}))},_=(i,n=[],u,v,c=!0,f=!0)=>{if(v&&u&&!r.disabled){if(o.action=!0,f&&Array.isArray(y(s,i))){const g=u(y(s,i),v.argA,v.argB);c&&k(s,i,g)}if(f&&Array.isArray(y(t.errors,i))){const g=u(y(t.errors,i),v.argA,v.argB);c&&k(t.errors,i,g),Ar(t.errors,i)}if((m.touchedFields||F.touchedFields)&&f&&Array.isArray(y(t.touchedFields,i))){const g=u(y(t.touchedFields,i),v.argA,v.argB);c&&k(t.touchedFields,i,g)}(m.dirtyFields||F.dirtyFields)&&(t.dirtyFields=fe(l,a)),h.state.next({name:i,isDirty:w(i,n),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else k(a,i,n)},H=(i,n)=>{k(t.errors,i,n),h.state.next({errors:t.errors})},x=i=>{t.errors=i,h.state.next({errors:t.errors,isValid:!1})},p=(i,n,u,v)=>{const c=y(s,i);if(c){const f=y(a,i,I(u)?y(l,i):u);I(f)||v&&v.defaultChecked||n?k(a,i,n?f:nt(c._f)):$(i,f),o.mount&&!o.action&&L()}},q=(i,n,u,v,c)=>{let f=!1,g=!1;const A={name:i};if(!r.disabled){if(!u||v){(m.isDirty||F.isDirty)&&(g=t.isDirty,t.isDirty=A.isDirty=w(),f=g!==A.isDirty);const D=ie(y(l,i),n);g=!!y(t.dirtyFields,i),D?B(t.dirtyFields,i):k(t.dirtyFields,i,!0),A.dirtyFields=t.dirtyFields,f=f||(m.dirtyFields||F.dirtyFields)&&g!==!D}if(u){const D=y(t.touchedFields,i);D||(k(t.touchedFields,i,u),A.touchedFields=t.touchedFields,f=f||(m.touchedFields||F.touchedFields)&&D!==u)}f&&c&&h.state.next(A)}return f?A:{}},te=(i,n,u,v)=>{const c=y(t.errors,i),f=(m.isValid||F.isValid)&&J(n)&&t.isValid!==n;if(r.delayError&&u?(V=T(()=>H(i,u)),V(r.delayError)):(clearTimeout(E),V=null,u?k(t.errors,i,u):B(t.errors,i)),(u?!ie(c,u):c)||!Y(v)||f){const g={...v,...f&&J(n)?{isValid:n}:{},errors:t.errors,name:i};t={...t,...g},h.state.next(g)}},W=async i=>(M(i,!0),await r.resolver(a,r.context,Fr(i||d.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),X=async i=>{const{errors:n}=await W(i);if(M(i),i)for(const u of i){const v=y(n,u);v?k(t.errors,u,v):B(t.errors,u)}else t.errors=n;return n},z=async(i,n,u={valid:!0})=>{for(const v in i){const c=i[v];if(c){const{_f:f,...g}=c;if(f){const A=d.array.has(f.name),D=c._f&&xr(c._f);D&&m.validatingFields&&M([f.name],!0);const K=await ct(c,d.disabled,a,O,r.shouldUseNativeValidation&&!n,A);if(D&&m.validatingFields&&M([f.name]),K[f.name]&&(u.valid=!1,n||e.shouldUseNativeValidation))break;!n&&(y(K,f.name)?A?Dr(t.errors,K,f.name):k(t.errors,f.name,K[f.name]):B(t.errors,f.name))}!Y(g)&&await z(g,n,u)}}return u.valid},le=()=>{for(const i of d.unMount){const n=y(s,i);n&&(n._f.refs?n._f.refs.every(u=>!ke(u)):!ke(n._f.ref))&&pe(i)}d.unMount=new Set},w=(i,n)=>!r.disabled&&(i&&n&&k(a,i,n),!ie(We(),l)),C=(i,n,u)=>Re(i,d,{...o.mount?a:I(n)?l:Q(i)?{[i]:n}:n},u,n),U=i=>Ue(y(o.mount?a:l,i,r.shouldUnregister?y(l,i,[]):[])),$=(i,n,u={})=>{const v=y(s,i);let c=n;if(v){const f=v._f;f&&(!f.disabled&&k(a,i,kt(n,f)),c=Fe(f.ref)&&Z(n)?"":n,Ct(f.ref)?[...f.ref.options].forEach(g=>g.selected=c.includes(g.value)):f.refs?Ve(f.ref)?f.refs.forEach(g=>{(!g.defaultChecked||!g.disabled)&&(Array.isArray(c)?g.checked=!!c.find(A=>A===g.value):g.checked=c===g.value||!!c)}):f.refs.forEach(g=>g.checked=g.value===c):je(f.ref)?f.ref.value="":(f.ref.value=c,f.ref.type||h.state.next({name:i,values:P(a)})))}(u.shouldDirty||u.shouldTouch)&&q(i,c,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&ve(i)},S=(i,n,u)=>{for(const v in n){if(!n.hasOwnProperty(v))return;const c=n[v],f=i+"."+v,g=y(s,f);(d.array.has(i)||j(c)||g&&!g._f)&&!ue(c)?S(f,c,u):$(f,c,u)}},N=(i,n,u={})=>{const v=y(s,i),c=d.array.has(i),f=P(n);k(a,i,f),c?(h.array.next({name:i,values:P(a)}),(m.isDirty||m.dirtyFields||F.isDirty||F.dirtyFields)&&u.shouldDirty&&h.state.next({name:i,dirtyFields:fe(l,a),isDirty:w(i,f)})):v&&!v._f&&!Z(f)?S(i,f,u):$(i,f,u),ut(i,d)?h.state.next({...t,name:i,values:P(a)}):h.state.next({name:o.mount?i:void 0,values:P(a)})},ce=async i=>{o.mount=!0;const n=i.target;let u=n.name,v=!0;const c=y(s,u),f=D=>{v=Number.isNaN(D)||ue(D)&&isNaN(D.getTime())||ie(D,y(a,u,D))},g=lt(r.mode),A=lt(r.reValidateMode);if(c){let D,K;const oe=n.type?nt(c._f):Ft(i),ne=i.type===_e.BLUR||i.type===_e.FOCUS_OUT,Nt=!wr(c._f)&&!r.resolver&&!y(t.errors,u)&&!c._f.deps||Cr(ne,y(t.touchedFields,u),t.isSubmitted,A,g),Ae=ut(u,d,ne);k(a,u,oe),ne?(!n||!n.readOnly)&&(c._f.onBlur&&c._f.onBlur(i),V&&V(0)):c._f.onChange&&c._f.onChange(i);const De=q(u,oe,ne),Pt=!Y(De)||Ae;if(!ne&&h.state.next({name:u,type:i.type,values:P(a)}),Nt)return(m.isValid||F.isValid)&&(r.mode==="onBlur"?ne&&L():ne||L()),Pt&&h.state.next({name:u,...Ae?{}:De});if(!ne&&Ae&&h.state.next({...t}),r.resolver){const{errors:Qe}=await W([u]);if(M([u]),f(oe),v){const Bt=dt(t.errors,s,u),Xe=dt(Qe,s,Bt.name||u);D=Xe.error,u=Xe.name,K=Y(Qe)}}else M([u],!0),D=(await ct(c,d.disabled,a,O,r.shouldUseNativeValidation))[u],M([u]),f(oe),v&&(D?K=!1:(m.isValid||F.isValid)&&(K=await z(s,!0)));v&&(c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&ve(c._f.deps),te(u,K,D,De))}},ye=(i,n)=>{if(y(t.errors,n)&&i.focus)return i.focus(),1},ve=async(i,n={})=>{let u,v;const c=me(i);if(r.resolver){const f=await X(I(i)?i:c);u=Y(f),v=i?!c.some(g=>y(f,g)):u}else i?(v=(await Promise.all(c.map(async f=>{const g=y(s,f);return await z(g&&g._f?{[f]:g}:g)}))).every(Boolean),!(!v&&!t.isValid)&&L()):v=u=await z(s);return h.state.next({...!Q(i)||(m.isValid||F.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),n.shouldFocus&&!v&&be(s,ye,i?c:d.mount),v},We=(i,n)=>{let u={...o.mount?a:l};return n&&(u=Et(n.dirtyFields?t.dirtyFields:t.touchedFields,u)),I(i)?u:Q(i)?y(u,i):i.map(v=>y(u,v))},He=(i,n)=>({invalid:!!y((n||t).errors,i),isDirty:!!y((n||t).dirtyFields,i),error:y((n||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((n||t).touchedFields,i)}),Rt=i=>{i&&me(i).forEach(n=>B(t.errors,n)),h.state.next({errors:i?t.errors:{}})},$e=(i,n,u)=>{const v=(y(s,i,{_f:{}})._f||{}).ref,c=y(t.errors,i)||{},{ref:f,message:g,type:A,...D}=c;k(t.errors,i,{...D,...n,ref:v}),h.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&v&&v.focus&&v.focus()},Ot=(i,n)=>G(i)?h.state.subscribe({next:u=>"values"in u&&i(C(void 0,n),u)}):C(i,n,!0),ze=i=>h.state.subscribe({next:n=>{Er(i.name,n.name,i.exact)&&pr(n,i.formState||m,Lt,i.reRenderRoot)&&i.callback({values:{...a},...t,...n,defaultValues:l})}}).unsubscribe,It=i=>(o.mount=!0,F={...F,...i.formState},ze({...i,formState:{...R,...i.formState}})),pe=(i,n={})=>{for(const u of i?me(i):d.mount)d.mount.delete(u),d.array.delete(u),n.keepValue||(B(s,u),B(a,u)),!n.keepError&&B(t.errors,u),!n.keepDirty&&B(t.dirtyFields,u),!n.keepTouched&&B(t.touchedFields,u),!n.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!n.keepDefaultValue&&B(l,u);h.state.next({values:P(a)}),h.state.next({...t,...n.keepDirty?{isDirty:w()}:{}}),!n.keepIsValid&&L()},Ke=({disabled:i,name:n})=>{if(J(i)&&o.mount||i||d.disabled.has(n)){const c=d.disabled.has(n)!==!!i;i?d.disabled.add(n):d.disabled.delete(n),c&&o.mount&&!o.action&&L()}},Ee=(i,n={})=>{let u=y(s,i);const v=J(n.disabled)||J(r.disabled);return k(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...n}}),d.mount.add(i),u?Ke({disabled:J(n.disabled)?n.disabled:r.disabled,name:i}):p(i,!0,n.value),{...v?{disabled:n.disabled||r.disabled}:{},...r.progressive?{required:!!n.required,min:ge(n.min),max:ge(n.max),minLength:ge(n.minLength),maxLength:ge(n.maxLength),pattern:ge(n.pattern)}:{},name:i,onChange:ce,onBlur:ce,ref:c=>{if(c){Ee(i,n),u=y(s,i);const f=I(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=mr(f),A=u._f.refs||[];if(g?A.find(D=>D===f):f===u._f.ref)return;k(s,i,{_f:{...u._f,...g?{refs:[...A.filter(ke),f,...Array.isArray(y(l,i))?[{}]:[]],ref:{type:f.type,name:i}}:{ref:f}}}),p(i,!1,void 0,f)}else u=y(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||n.shouldUnregister)&&!(xt(d.array,i)&&o.action)&&d.unMount.add(i)}}},Ce=()=>r.shouldFocusError&&be(s,ye,d.mount),Tt=i=>{J(i)&&(h.state.next({disabled:i}),be(s,(n,u)=>{const v=y(s,u);v&&(n.disabled=v._f.disabled||i,Array.isArray(v._f.refs)&&v._f.refs.forEach(c=>{c.disabled=v._f.disabled||i}))},0,!1))},Ye=(i,n)=>async u=>{let v;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let c=P(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:g}=await W();M(),t.errors=f,c=P(g)}else await z(s);if(d.disabled.size)for(const f of d.disabled)B(c,f);if(B(t.errors,"root"),Y(t.errors)){h.state.next({errors:{}});try{await i(c,u)}catch(f){v=f}}else n&&await n({...t.errors},u),Ce(),setTimeout(Ce);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Y(t.errors)&&!v,submitCount:t.submitCount+1,errors:t.errors}),v)throw v},Mt=(i,n={})=>{y(s,i)&&(I(n.defaultValue)?N(i,P(y(l,i))):(N(i,n.defaultValue),k(l,i,P(n.defaultValue))),n.keepTouched||B(t.touchedFields,i),n.keepDirty||(B(t.dirtyFields,i),t.isDirty=n.defaultValue?w(i,P(y(l,i))):w()),n.keepError||(B(t.errors,i),m.isValid&&L()),h.state.next({...t}))},Ge=(i,n={})=>{const u=i?P(i):l,v=P(u),c=Y(i),f=c?l:v;if(n.keepDefaultValues||(l=u),!n.keepValues){if(n.keepDirtyValues){const g=new Set([...d.mount,...Object.keys(fe(l,a))]);for(const A of Array.from(g)){const D=y(t.dirtyFields,A),K=y(a,A),oe=y(f,A);D&&!I(K)?k(f,A,K):!D&&!I(oe)&&N(A,oe)}}else{if(Me&&I(i))for(const g of d.mount){const A=y(s,g);if(A&&A._f){const D=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Fe(D)){const K=D.closest("form");if(K){K.reset();break}}}}if(n.keepFieldsRef)for(const g of d.mount)N(g,y(f,g));else s={}}a=r.shouldUnregister?n.keepDefaultValues?P(l):{}:P(f),h.array.next({values:{...f}}),h.state.next({values:{...f}})}d={mount:n.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!m.isValid||!!n.keepIsValid||!!n.keepDirtyValues||!r.shouldUnregister&&!Y(f),o.watch=!!r.shouldUnregister,o.keepIsValid=!!n.keepIsValid,o.action=!1,n.keepErrors||(t.errors={}),h.state.next({submitCount:n.keepSubmitCount?t.submitCount:0,isDirty:c?!1:n.keepDirty?t.isDirty:!!(n.keepDefaultValues&&!ie(i,l)),isSubmitted:n.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:n.keepDirtyValues?n.keepDefaultValues&&a?fe(l,a):t.dirtyFields:n.keepDefaultValues&&i?fe(l,i):n.keepDirty?t.dirtyFields:{},touchedFields:n.keepTouched?t.touchedFields:{},errors:n.keepErrors?t.errors:{},isSubmitSuccessful:n.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:l})},Ze=(i,n)=>Ge(G(i)?i(a):i,{...r.resetOptions,...n}),Ut=(i,n={})=>{const u=y(s,i),v=u&&u._f;if(v){const c=v.refs?v.refs[0]:v.ref;c.focus&&setTimeout(()=>{c.focus(),n.shouldSelect&&G(c.select)&&c.select()})}},Lt=i=>{t={...t,...i}},Je={control:{register:Ee,unregister:pe,getFieldState:He,handleSubmit:Ye,setError:$e,_subscribe:ze,_runSchema:W,_updateIsValidating:M,_focusError:Ce,_getWatch:C,_getDirty:w,_setValid:L,_setFieldArray:_,_setDisabledField:Ke,_setErrors:x,_getFieldArray:U,_reset:Ge,_resetDefaultValues:()=>G(r.defaultValues)&&r.defaultValues().then(i=>{Ze(i,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:le,_disableForm:Tt,_subjects:h,_proxyFormState:m,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(i){o=i},get _defaultValues(){return l},get _names(){return d},set _names(i){d=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:It,trigger:ve,register:Ee,handleSubmit:Ye,watch:Ot,setValue:N,getValues:We,reset:Ze,resetField:Mt,clearErrors:Rt,unregister:pe,setError:$e,setFocus:Ut,getFieldState:He};return{...Je,formControl:Je}}function Nr(e={}){const r=b.useRef(void 0),t=b.useRef(void 0),[s,l]=b.useState({isDirty:!1,isValidating:!1,isLoading:G(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...d}=Sr(e);r.current={...d,formState:s}}const a=r.current.control;return a._options=e,Pe(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>l({...a._formState}),reRenderRoot:!0});return l(d=>({...d,isReady:!0})),a._formState.isReady=!0,o},[a]),b.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),b.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),b.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),b.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),b.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),b.useEffect(()=>{var o;e.values&&!ie(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,l(d=>({...d}))):a._resetDefaultValues()},[a,e.values]),b.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),r.current.formState=b.useMemo(()=>pt(s,a),[a,s]),r.current}const yt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Te=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?yt(s.ref,t,e):s&&s.refs&&s.refs.forEach(l=>yt(l,t,e))}},vt=(e,r)=>{r.shouldUseNativeValidation&&Te(e,r);const t={};for(const s in e){const l=y(r.fields,s),a=Object.assign(e[s]||{},{ref:l&&l.ref});if(Rr(r.names||Object.keys(e),s)){const o=Object.assign({},y(t,s));k(o,"root",a),k(t,s,o)}else k(t,s,a)}return t},Rr=(e,r)=>{const t=gt(r);return e.some(s=>gt(s).match(`^${t}\\.\\d+`))};function gt(e){return e.replace(/\]|\[/g,"")}function ht(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Or(e,r){for(var t={};e.length;){var s=e[0],l=s.code,a=s.message,o=s.path.join(".");if(!t[o])if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:l};if("unionErrors"in s&&s.unionErrors.forEach(function(R){return R.errors.forEach(function(m){return e.push(m)})}),r){var V=t[o].types,E=V&&V[s.code];t[o]=Be(o,r,t,l,E?[].concat(E,s.message):s.message)}e.shift()}return t}function Ir(e,r){for(var t={};e.length;){var s=e[0],l=s.code,a=s.message,o=s.path.join(".");if(!t[o])if(s.code==="invalid_union"&&s.errors.length>0){var d=s.errors[0][0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:l};if(s.code==="invalid_union"&&s.errors.forEach(function(R){return R.forEach(function(m){return e.push(m)})}),r){var V=t[o].types,E=V&&V[s.code];t[o]=Be(o,r,t,l,E?[].concat(E,s.message):s.message)}e.shift()}return t}function Pr(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,l,a){try{return Promise.resolve(ht(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(o){return a.shouldUseNativeValidation&&Te({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return Array.isArray(d?.issues)})(o))return{values:{},errors:vt(Or(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,l,a){try{return Promise.resolve(ht(function(){return Promise.resolve((t.mode==="sync"?Zt:Jt)(e,s,r)).then(function(o){return a.shouldUseNativeValidation&&Te({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return d instanceof Qt})(o))return{values:{},errors:vt(Ir(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}export{Lr as C,Ur as I,Pr as a,sr as b,Se as c,lr as d,nr as e,or as f,Vt as g,er as h,Nr as u}; diff --git a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(instances)/run-instances.tsx b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(instances)/run-instances.tsx index 90b9749a6..1c66a4938 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(instances)/run-instances.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(instances)/run-instances.tsx @@ -7,8 +7,8 @@ import { BackLink } from "@/components/back-link" import { ErrorBanner } from "@/components/error-banner" import { PageHeading } from "@/components/page-heading" import { Button } from "@/components/ui/button" +import { Field, FieldError, FieldTitle } from "@/components/ui/field" import { Input } from "@/components/ui/input" -import { Label } from "@/components/ui/label" import { Select, SelectContent, @@ -46,7 +46,6 @@ export const Route = createFileRoute("/_auth/ec2/(instances)/run-instances")({ component: CreateInstance, }) -// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: this is a complex form function CreateInstance() { const navigate = useNavigate() const { data: imagesData } = useSuspenseQuery(ec2ImagesQueryOptions) @@ -142,8 +141,10 @@ function CreateInstance() {
{/* ImageSelection */} -
- + + + + field.onChange(value)} value={field.value ?? ""} > - + {selectedImage ? `${selectedImage.Name || "Unnamed"} (${selectedImage.Architecture})` @@ -177,14 +182,14 @@ function CreateInstance() { ) }} /> - {errors.imageId && ( -

{errors.imageId.message}

- )} -
+ + {/* Instance Type */} -
- + + + + field.onChange(value)} value={field.value ? field.value : ""} > - + @@ -206,16 +215,14 @@ function CreateInstance() { )} /> - {errors.instanceType && ( -

- {errors.instanceType.message} -

- )} -
+ + {/* Key Pair */} -
- + + + + field.onChange(value)} value={field.value ? field.value : ""} > - + @@ -240,15 +251,16 @@ function CreateInstance() { )} /> - {errors.keyName && ( -

{errors.keyName.message}

- )} -
+ + {/* Instance Count */} -
- + + + + - {errors.count && ( -

{errors.count.message}

- )} -
+ + {/* Actions */}
diff --git a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/create-key-pair.tsx b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/create-key-pair.tsx index 4de2553e3..e9a7c9750 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/create-key-pair.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/create-key-pair.tsx @@ -7,8 +7,8 @@ import { BackLink } from "@/components/back-link" import { ErrorBanner } from "@/components/error-banner" import { PageHeading } from "@/components/page-heading" import { Button } from "@/components/ui/button" +import { Field, FieldError, FieldTitle } from "@/components/ui/field" import { Input } from "@/components/ui/input" -import { Label } from "@/components/ui/label" import { useCreateKeyPair } from "@/mutations/ec2" import { type CreateKeyPairData, createKeyPairSchema } from "@/types/ec2" import { PrivateKeyModal } from "../-components/private-key-modal" @@ -66,17 +66,18 @@ function CreateKeyPair() { {/* Key Name */} -
- + + + + - {errors.keyName && ( -

{errors.keyName.message}

- )} -
+ + {/* Actions */}
diff --git a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/import-key-pair.tsx b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/import-key-pair.tsx index ecdfadb27..d68e3c669 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/import-key-pair.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/import-key-pair.tsx @@ -6,8 +6,8 @@ import { BackLink } from "@/components/back-link" import { ErrorBanner } from "@/components/error-banner" import { PageHeading } from "@/components/page-heading" import { Button } from "@/components/ui/button" +import { Field, FieldError, FieldTitle } from "@/components/ui/field" import { Input } from "@/components/ui/input" -import { Label } from "@/components/ui/label" import { Textarea } from "@/components/ui/textarea" import { useImportKeyPair } from "@/mutations/ec2" import { type ImportKeyPairData, importKeyPairSchema } from "@/types/ec2" @@ -55,21 +55,24 @@ function ImportKeyPair() { {/* Key Name */} -
- + + + + - {errors.keyName && ( -

{errors.keyName.message}

- )} -
+ + {/* Public Key Material */} -
- + + + +