diff --git a/hive/services/hiveui/frontend/dist/assets/_id.js b/hive/services/hiveui/frontend/dist/assets/_id.js index 12992b5d0..7484d4826 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id.js +++ b/hive/services/hiveui/frontend/dist/assets/_id.js @@ -1 +1 @@ -import{c as B,bk as _,bl as K,j as l,bm as k}from"./index.js";import{u as E}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as j,a as s}from"./detail-row.js";import{P as N}from"./page-heading.js";import{B as R}from"./badge.js";function Y(){const e=B.c(43),{id:V}=_.useParams();let v;e[0]!==V?(v=k(V),e[0]=V,e[1]=v):v=e[1];const{data:g}=E(v),t=g.Volumes?.[0];if(!t?.VolumeId){let S;return e[2]===Symbol.for("react.memo_cache_sentinel")?(S=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]=S):S=e[2],S}let p;e[3]!==t.CreateTime?(p=K(t.CreateTime),e[3]=t.CreateTime,e[4]=p):p=e[4];const T=p;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=h):h=e[5];let a;e[6]!==t.State?(a=t.State?l.jsx(R,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[6]=t.State,e[7]=a):a=e[7];let i;e[8]!==a||e[9]!==t.VolumeId?(i=l.jsx(N,{actions:a,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[8]=a,e[9]=t.VolumeId,e[10]=i):i=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(j.Header,{children:"Volume Information"}),e[11]=y):y=e[11];let o;e[12]!==t.VolumeId?(o=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[12]=t.VolumeId,e[13]=o):o=e[13];const D=`${t.Size} GiB`;let n;e[14]!==D?(n=l.jsx(s,{label:"Size",value:D}),e[14]=D,e[15]=n):n=e[15];let m;e[16]!==t.VolumeType?(m=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[16]=t.VolumeType,e[17]=m):m=e[17];let r;e[18]!==t.State?(r=l.jsx(s,{label:"State",value:t.State}),e[18]=t.State,e[19]=r):r=e[19];let c;e[20]!==t.AvailabilityZone?(c=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[20]=t.AvailabilityZone,e[21]=c):c=e[21];let u;e[22]!==T?(u=l.jsx(s,{label:"Create Time",value:T}),e[22]=T,e[23]=u):u=e[23];const A=t.Encrypted?"Yes":"No";let d;e[24]!==A?(d=l.jsx(s,{label:"Encrypted",value:A}),e[24]=A,e[25]=d):d=e[25];let f;e[26]!==t.KmsKeyId?(f=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[26]=t.KmsKeyId,e[27]=f):f=e[27];let x;e[28]!==r||e[29]!==c||e[30]!==u||e[31]!==d||e[32]!==f||e[33]!==o||e[34]!==n||e[35]!==m?(x=l.jsxs(j,{children:[y,l.jsxs(j.Content,{children:[o,n,m,r,c,u,d,f]})]}),e[28]=r,e[29]=c,e[30]=u,e[31]=d,e[32]=f,e[33]=o,e[34]=n,e[35]=m,e[36]=x):x=e[36];let b;e[37]!==t.Attachments?(b=t.Attachments&&t.Attachments.length>0&&l.jsxs(j,{children:[l.jsx(j.Header,{children:"Attachments"}),l.jsx(j.Content,{children:t.Attachments.map(Z)})]}),e[37]=t.Attachments,e[38]=b):b=e[38];let I;return e[39]!==x||e[40]!==b||e[41]!==i?(I=l.jsxs(l.Fragment,{children:[h,l.jsxs("div",{className:"space-y-6",children:[i,x,b]})]}),e[39]=x,e[40]=b,e[41]=i,e[42]=I):I=e[42],I}function Z(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{Y as component}; +import{c as B,bo as _,bp as K,j as l,bq as E}from"./index.js";import{u as N}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as j,a as s}from"./detail-row.js";import{P as k}from"./page-heading.js";import{B as R}from"./badge.js";function Y(){const e=B.c(43),{id:V}=_.useParams();let v;e[0]!==V?(v=E(V),e[0]=V,e[1]=v):v=e[1];const{data:g}=N(v),t=g.Volumes?.[0];if(!t?.VolumeId){let S;return e[2]===Symbol.for("react.memo_cache_sentinel")?(S=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]=S):S=e[2],S}let p;e[3]!==t.CreateTime?(p=K(t.CreateTime),e[3]=t.CreateTime,e[4]=p):p=e[4];const T=p;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=h):h=e[5];let a;e[6]!==t.State?(a=t.State?l.jsx(R,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[6]=t.State,e[7]=a):a=e[7];let i;e[8]!==a||e[9]!==t.VolumeId?(i=l.jsx(k,{actions:a,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[8]=a,e[9]=t.VolumeId,e[10]=i):i=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(j.Header,{children:"Volume Information"}),e[11]=y):y=e[11];let o;e[12]!==t.VolumeId?(o=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[12]=t.VolumeId,e[13]=o):o=e[13];const D=`${t.Size} GiB`;let n;e[14]!==D?(n=l.jsx(s,{label:"Size",value:D}),e[14]=D,e[15]=n):n=e[15];let m;e[16]!==t.VolumeType?(m=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[16]=t.VolumeType,e[17]=m):m=e[17];let r;e[18]!==t.State?(r=l.jsx(s,{label:"State",value:t.State}),e[18]=t.State,e[19]=r):r=e[19];let c;e[20]!==t.AvailabilityZone?(c=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[20]=t.AvailabilityZone,e[21]=c):c=e[21];let u;e[22]!==T?(u=l.jsx(s,{label:"Create Time",value:T}),e[22]=T,e[23]=u):u=e[23];const A=t.Encrypted?"Yes":"No";let d;e[24]!==A?(d=l.jsx(s,{label:"Encrypted",value:A}),e[24]=A,e[25]=d):d=e[25];let f;e[26]!==t.KmsKeyId?(f=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[26]=t.KmsKeyId,e[27]=f):f=e[27];let x;e[28]!==r||e[29]!==c||e[30]!==u||e[31]!==d||e[32]!==f||e[33]!==o||e[34]!==n||e[35]!==m?(x=l.jsxs(j,{children:[y,l.jsxs(j.Content,{children:[o,n,m,r,c,u,d,f]})]}),e[28]=r,e[29]=c,e[30]=u,e[31]=d,e[32]=f,e[33]=o,e[34]=n,e[35]=m,e[36]=x):x=e[36];let b;e[37]!==t.Attachments?(b=t.Attachments&&t.Attachments.length>0&&l.jsxs(j,{children:[l.jsx(j.Header,{children:"Attachments"}),l.jsx(j.Content,{children:t.Attachments.map(Z)})]}),e[37]=t.Attachments,e[38]=b):b=e[38];let I;return e[39]!==x||e[40]!==b||e[41]!==i?(I=l.jsxs(l.Fragment,{children:[h,l.jsxs("div",{className:"space-y-6",children:[i,x,b]})]}),e[39]=x,e[40]=b,e[41]=i,e[42]=I):I=e[42],I}function Z(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{Y as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id2.js b/hive/services/hiveui/frontend/dist/assets/_id2.js index 364d71381..b0e4255f4 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id2.js +++ b/hive/services/hiveui/frontend/dist/assets/_id2.js @@ -1 +1 @@ -import{c as O,bn as Q,u as L,r as M,bl as V,j as t,bo as $,B as q}from"./index.js";import{u as G}from"./useSuspenseQuery.js";import{B as R}from"./back-link.js";import{D as x,a as j}from"./detail-row.js";import{P as J}from"./page-heading.js";import{b as U,c as W,d as X,h as Y,a as Z,e as ee,f as te,g as se}from"./alert-dialog.js";import{c as ie}from"./ec2.js";import{T as ae}from"./trash-2.js";import"./useMutation.js";function he(){const e=O.c(54),{id:a}=Q.useParams(),S=L();let K;e[0]!==a?(K=$(a),e[0]=a,e[1]=K):K=e[1];const{data:z}=G(K),s=z.KeyPairs?.[0],i=ie(),[w,H]=M.useState(!1);let D;e[2]!==i||e[3]!==a||e[4]!==S?(D=async()=>{await i.mutateAsync(a),S({to:"/ec2/describe-key-pairs"})},e[2]=i,e[3]=a,e[4]=S,e[5]=D):D=e[5];const F=D;if(!s?.KeyPairId){let v;return e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(t.Fragment,{children:[t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),t.jsx("p",{className:"text-muted-foreground",children:"Key pair not found."})]}),e[6]=v):v=e[6],v}let b;e[7]!==s.CreateTime?(b=V(s.CreateTime),e[7]=s.CreateTime,e[8]=b):b=e[8];const B=b;let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),e[9]=P):P=e[9];let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=()=>H(!0),e[10]=T):T=e[10];let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(q,{onClick:T,size:"sm",variant:"destructive",children:[t.jsx(ae,{className:"size-4"}),"Delete"]}),e[11]=_):_=e[11];const I=s.KeyName??"";let l;e[12]!==I?(l=t.jsx(J,{actions:_,subtitle:"EC2 Key Pair Details",title:I}),e[12]=I,e[13]=l):l=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(x.Header,{children:"Key Pair Information"}),e[14]=k):k=e[14];let r;e[15]!==s.KeyName?(r=t.jsx(j,{label:"Key Name",value:s.KeyName}),e[15]=s.KeyName,e[16]=r):r=e[16];let n;e[17]!==s.KeyPairId?(n=t.jsx(j,{label:"Key Pair ID",value:s.KeyPairId}),e[17]=s.KeyPairId,e[18]=n):n=e[18];let o;e[19]!==s.KeyType?(o=t.jsx(j,{label:"Key Type",value:s.KeyType}),e[19]=s.KeyType,e[20]=o):o=e[20];let c;e[21]!==s.KeyFingerprint?(c=t.jsx(j,{label:"Key Fingerprint",value:s.KeyFingerprint}),e[21]=s.KeyFingerprint,e[22]=c):c=e[22];let m;e[23]!==B?(m=t.jsx(j,{label:"Creation Date",value:B}),e[23]=B,e[24]=m):m=e[24];let y;e[25]!==n||e[26]!==o||e[27]!==c||e[28]!==m||e[29]!==r?(y=t.jsxs(x,{children:[k,t.jsxs(x.Content,{children:[r,n,o,c,m]})]}),e[25]=n,e[26]=o,e[27]=c,e[28]=m,e[29]=r,e[30]=y):y=e[30];let d;e[31]!==s.Tags?(d=s.Tags&&s.Tags.length>0&&t.jsxs(x,{children:[t.jsx(x.Header,{children:"Tags"}),t.jsx(x.Content,{children:s.Tags.map(le)})]}),e[31]=s.Tags,e[32]=d):d=e[32];let f;e[33]!==y||e[34]!==d||e[35]!==l?(f=t.jsxs("div",{className:"space-y-6",children:[l,y,d]}),e[33]=y,e[34]=d,e[35]=l,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Z,{children:"Delete Key Pair"}),e[37]=C):C=e[37];let p;e[38]!==s.KeyName?(p=t.jsxs(U,{children:[C,t.jsxs(W,{children:['Are you sure you want to delete the key pair "',s.KeyName,'"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.']})]}),e[38]=s.KeyName,e[39]=p):p=e[39];let A;e[40]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ee,{children:"Cancel"}),e[40]=A):A=e[40];const E=i.isPending?"Deleting…":"Delete";let h;e[41]!==i.isPending||e[42]!==F||e[43]!==E?(h=t.jsxs(X,{children:[A,t.jsx(Y,{disabled:i.isPending,onClick:F,children:E})]}),e[41]=i.isPending,e[42]=F,e[43]=E,e[44]=h):h=e[44];let u;e[45]!==p||e[46]!==h?(u=t.jsxs(te,{children:[p,h]}),e[45]=p,e[46]=h,e[47]=u):u=e[47];let g;e[48]!==w||e[49]!==u?(g=t.jsx(se,{onOpenChange:H,open:w,children:u}),e[48]=w,e[49]=u,e[50]=g):g=e[50];let N;return e[51]!==f||e[52]!==g?(N=t.jsxs(t.Fragment,{children:[P,f,g]}),e[51]=f,e[52]=g,e[53]=N):N=e[53],N}function le(e){return t.jsx(j,{label:e.Key||"",value:e.Value},e.Key)}export{he as component}; +import{c as O,br as Q,u as L,r as M,bp as V,j as t,bs as $,B as q}from"./index.js";import{u as G}from"./useSuspenseQuery.js";import{B as R}from"./back-link.js";import{D as x,a as j}from"./detail-row.js";import{P as J}from"./page-heading.js";import{b as U,c as W,d as X,h as Y,a as Z,e as ee,f as te,g as se}from"./alert-dialog.js";import{c as ie}from"./ec2.js";import{T as ae}from"./trash-2.js";import"./useMutation.js";function he(){const e=O.c(54),{id:a}=Q.useParams(),S=L();let K;e[0]!==a?(K=$(a),e[0]=a,e[1]=K):K=e[1];const{data:z}=G(K),s=z.KeyPairs?.[0],i=ie(),[w,H]=M.useState(!1);let D;e[2]!==i||e[3]!==a||e[4]!==S?(D=async()=>{await i.mutateAsync(a),S({to:"/ec2/describe-key-pairs"})},e[2]=i,e[3]=a,e[4]=S,e[5]=D):D=e[5];const F=D;if(!s?.KeyPairId){let v;return e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(t.Fragment,{children:[t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),t.jsx("p",{className:"text-muted-foreground",children:"Key pair not found."})]}),e[6]=v):v=e[6],v}let b;e[7]!==s.CreateTime?(b=V(s.CreateTime),e[7]=s.CreateTime,e[8]=b):b=e[8];const B=b;let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),e[9]=P):P=e[9];let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=()=>H(!0),e[10]=T):T=e[10];let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(q,{onClick:T,size:"sm",variant:"destructive",children:[t.jsx(ae,{className:"size-4"}),"Delete"]}),e[11]=_):_=e[11];const I=s.KeyName??"";let l;e[12]!==I?(l=t.jsx(J,{actions:_,subtitle:"EC2 Key Pair Details",title:I}),e[12]=I,e[13]=l):l=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(x.Header,{children:"Key Pair Information"}),e[14]=k):k=e[14];let r;e[15]!==s.KeyName?(r=t.jsx(j,{label:"Key Name",value:s.KeyName}),e[15]=s.KeyName,e[16]=r):r=e[16];let n;e[17]!==s.KeyPairId?(n=t.jsx(j,{label:"Key Pair ID",value:s.KeyPairId}),e[17]=s.KeyPairId,e[18]=n):n=e[18];let o;e[19]!==s.KeyType?(o=t.jsx(j,{label:"Key Type",value:s.KeyType}),e[19]=s.KeyType,e[20]=o):o=e[20];let c;e[21]!==s.KeyFingerprint?(c=t.jsx(j,{label:"Key Fingerprint",value:s.KeyFingerprint}),e[21]=s.KeyFingerprint,e[22]=c):c=e[22];let m;e[23]!==B?(m=t.jsx(j,{label:"Creation Date",value:B}),e[23]=B,e[24]=m):m=e[24];let y;e[25]!==n||e[26]!==o||e[27]!==c||e[28]!==m||e[29]!==r?(y=t.jsxs(x,{children:[k,t.jsxs(x.Content,{children:[r,n,o,c,m]})]}),e[25]=n,e[26]=o,e[27]=c,e[28]=m,e[29]=r,e[30]=y):y=e[30];let d;e[31]!==s.Tags?(d=s.Tags&&s.Tags.length>0&&t.jsxs(x,{children:[t.jsx(x.Header,{children:"Tags"}),t.jsx(x.Content,{children:s.Tags.map(le)})]}),e[31]=s.Tags,e[32]=d):d=e[32];let f;e[33]!==y||e[34]!==d||e[35]!==l?(f=t.jsxs("div",{className:"space-y-6",children:[l,y,d]}),e[33]=y,e[34]=d,e[35]=l,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Z,{children:"Delete Key Pair"}),e[37]=C):C=e[37];let p;e[38]!==s.KeyName?(p=t.jsxs(U,{children:[C,t.jsxs(W,{children:['Are you sure you want to delete the key pair "',s.KeyName,'"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.']})]}),e[38]=s.KeyName,e[39]=p):p=e[39];let A;e[40]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ee,{children:"Cancel"}),e[40]=A):A=e[40];const E=i.isPending?"Deleting…":"Delete";let h;e[41]!==i.isPending||e[42]!==F||e[43]!==E?(h=t.jsxs(X,{children:[A,t.jsx(Y,{disabled:i.isPending,onClick:F,children:E})]}),e[41]=i.isPending,e[42]=F,e[43]=E,e[44]=h):h=e[44];let u;e[45]!==p||e[46]!==h?(u=t.jsxs(te,{children:[p,h]}),e[45]=p,e[46]=h,e[47]=u):u=e[47];let g;e[48]!==w||e[49]!==u?(g=t.jsx(se,{onOpenChange:H,open:w,children:u}),e[48]=w,e[49]=u,e[50]=g):g=e[50];let N;return e[51]!==f||e[52]!==g?(N=t.jsxs(t.Fragment,{children:[P,f,g]}),e[51]=f,e[52]=g,e[53]=N):N=e[53],N}function le(e){return t.jsx(j,{label:e.Key||"",value:e.Value},e.Key)}export{he as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id3.js b/hive/services/hiveui/frontend/dist/assets/_id3.js index d8888d065..b55776a13 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id3.js +++ b/hive/services/hiveui/frontend/dist/assets/_id3.js @@ -1 +1 @@ -import{g as B,c as E,j as s,B as A,bz as $,bl as F,bA as O,bB as Q}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as M}from"./back-link.js";import{D,a as v}from"./detail-row.js";import{P as H}from"./page-heading.js";import{S as Z}from"./state-badge.js";import{A as q}from"./ami-details.js";import{d as G,e as J,f as K,g as U}from"./ec2.js";import{T as V}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=B("pause",W);const Y=[["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"}]],ee=B("play",Y);const te=[["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"}]],se=B("rotate-cw",te),ne=["pending","stopping","shutting-down","terminated"];function ae(e){const t=E.c(21),{instanceId:c,state:a}=e,n=G(),u=J(),r=K(),x=U();if(ne.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 d;t[4]!==c||t[5]!==n||t[6]!==a?(d=a==="stopped"&&s.jsxs(A,{disabled:n.isPending,onClick:()=>n.mutate(c),size:"sm",variant:"default",children:[s.jsx(ee,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[4]=c,t[5]=n,t[6]=a,t[7]=d):d=t[7];let l;t[8]!==c||t[9]!==r||t[10]!==a||t[11]!==u?(l=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(A,{disabled:u.isPending,onClick:()=>u.mutate(c),size:"sm",variant:"outline",children:[s.jsx(X,{className:"size-4"}),u.isPending?"Stopping":"Stop"]}),s.jsxs(A,{disabled:r.isPending,onClick:()=>r.mutate(c),size:"sm",variant:"outline",children:[s.jsx(se,{className:"size-4"}),r.isPending?"Rebooting":"Reboot"]})]}),t[8]=c,t[9]=r,t[10]=a,t[11]=u,t[12]=l):l=t[12];let m;t[13]!==c||t[14]!==a||t[15]!==x?(m=(a==="stopped"||a==="running")&&s.jsxs(A,{disabled:x.isPending,onClick:()=>x.mutate(c),size:"sm",variant:"destructive",children:[s.jsx(V,{className:"size-4"}),x.isPending?"Terminating":"Terminate"]}),t[13]=c,t[14]=a,t[15]=x,t[16]=m):m=t[16];let o;return t[17]!==d||t[18]!==l||t[19]!==m?(o=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[f,s.jsxs("div",{className:"flex flex-wrap gap-2",children:[d,l,m]})]}),t[17]=d,t[18]=l,t[19]=m,t[20]=o):o=t[20],o}function pe(){const e=E.c(45),{id:t}=$.useParams();let c;e[0]!==t?(c=O(t),e[0]=t,e[1]=c):c=e[1];const{data:a}=L(c),n=a.Reservations?.[0]?.Instances?.[0],u=n?.ImageId;let r;e[2]!==u?(r=Q(u),e[2]=u,e[3]=r):r=e[3];const{data:x}=L(r),_=x?.Images?.[0];if(!n?.InstanceId){let C;return e[4]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(s.Fragment,{children:[s.jsx(M,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=C):C=e[4],C}let f;e[5]!==n.LaunchTime?(f=F(n.LaunchTime),e[5]=n.LaunchTime,e[6]=f):f=e[6];const d=f;let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(M,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=l):l=e[7];const m=n.State?.Name;let o;e[8]!==m?(o=s.jsx(Z,{state:m}),e[8]=m,e[9]=o):o=e[9];let i;e[10]!==n.InstanceId||e[11]!==o?(i=s.jsx(H,{actions:o,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=o,e[12]=i):i=e[12];const w=n.State?.Name;let p;e[13]!==n.InstanceId||e[14]!==w?(p=s.jsx(ae,{instanceId:n.InstanceId,state:w}),e[13]=n.InstanceId,e[14]=w,e[15]=p):p=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(D.Header,{children:"Instance Information"}),e[16]=k):k=e[16];let I;e[17]!==n.InstanceId?(I=s.jsx(v,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=I):I=e[18];let h;e[19]!==n.InstanceType?(h=s.jsx(v,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=h):h=e[20];const z=n.State?.Name;let g;e[21]!==z?(g=s.jsx(v,{label:"Instance State",value:z}),e[21]=z,e[22]=g):g=e[22];let b;e[23]!==n.State?.Code?(b=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=b):b=e[24];let j;e[25]!==b?(j=s.jsx(v,{label:"State Code",value:b}),e[25]=b,e[26]=j):j=e[26];let S;e[27]!==d?(S=s.jsx(v,{label:"Launch Time",value:d}),e[27]=d,e[28]=S):S=e[28];const R=n.Placement?.AvailabilityZone;let y;e[29]!==R?(y=s.jsx(v,{label:"Availability Zone",value:R}),e[29]=R,e[30]=y):y=e[30];let N;e[31]!==I||e[32]!==h||e[33]!==g||e[34]!==j||e[35]!==S||e[36]!==y?(N=s.jsxs(D,{children:[k,s.jsxs(D.Content,{children:[I,h,g,j,S,y]})]}),e[31]=I,e[32]=h,e[33]=g,e[34]=j,e[35]=S,e[36]=y,e[37]=N):N=e[37];let T;e[38]!==_?(T=_&&s.jsx(q,{image:_}),e[38]=_,e[39]=T):T=e[39];let P;return e[40]!==N||e[41]!==T||e[42]!==i||e[43]!==p?(P=s.jsxs(s.Fragment,{children:[l,s.jsxs("div",{className:"space-y-6",children:[i,p,N,T]})]}),e[40]=N,e[41]=T,e[42]=i,e[43]=p,e[44]=P):P=e[44],P}export{pe as component}; +import{g as z,c as O,j as s,B as C,bD as $,bp as E,bE as H,bF as Q}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as F}from"./back-link.js";import{D as y,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{d as G,e as Y,f as J,g 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=O.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=O.c(48),{id:t}=$.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),B=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(F,{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(F,{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 M;e[16]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(y.Header,{children:"Instance Information"}),e[16]=M):M=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 T;e[29]!==R?(T=s.jsx(r,{label:"Availability Zone",value:R}),e[29]=R,e[30]=T):T=e[30];let k;e[31]!==h||e[32]!==I||e[33]!==b||e[34]!==v||e[35]!==S||e[36]!==T?(k=s.jsxs(y,{children:[M,s.jsxs(y.Content,{children:[h,I,b,v,S,T]})]}),e[31]=h,e[32]=I,e[33]=b,e[34]=v,e[35]=S,e[36]=T,e[37]=k):k=e[37];let D;e[38]!==n.BlockDeviceMappings?(D=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(y,{children:[s.jsx(y.Header,{children:"Block Device Mappings"}),s.jsxs(y.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]=D):D=e[39];let N;e[40]!==B?(N=B&&s.jsx(q,{image:B}),e[40]=B,e[41]=N):N=e[41];let _;return e[42]!==k||e[43]!==D||e[44]!==N||e[45]!==i||e[46]!==g?(_=s.jsxs(s.Fragment,{children:[c,s.jsxs("div",{className:"space-y-6",children:[i,g,k,D,N]})]}),e[42]=k,e[43]=D,e[44]=N,e[45]=i,e[46]=g,e[47]=_):_=e[47],_}export{ge as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id4.js b/hive/services/hiveui/frontend/dist/assets/_id4.js index 9cfce32ca..341885819 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id4.js +++ b/hive/services/hiveui/frontend/dist/assets/_id4.js @@ -1 +1 @@ -import{c as g,bT as u,j as s,bB as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{B as j}from"./badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function E(){const e=g.c(14),{id:c}=u.useParams();let o;e[0]!==c?(o=p(c),e[0]=c,e[1]=o):o=e[1];const{data:f}=x(o),t=f?.Images?.[0];if(!t?.ImageId){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),s.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=n):n=e[2],n}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let a;e[4]!==t.State?(a=t.State?s.jsx(j,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[4]=t.State,e[5]=a):a=e[5];let i;e[6]!==t.ImageId||e[7]!==a?(i=s.jsx(I,{actions:a,subtitle:"EC2 Image Details",title:t.ImageId}),e[6]=t.ImageId,e[7]=a,e[8]=i):i=e[8];let m;e[9]!==t?(m=s.jsx(h,{image:t,showExtendedDetails:!0}),e[9]=t,e[10]=m):m=e[10];let l;return e[11]!==i||e[12]!==m?(l=s.jsxs(s.Fragment,{children:[r,s.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=l):l=e[13],l}export{E as component}; +import{c as g,bX as u,j as s,bF as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{B as j}from"./badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function E(){const e=g.c(14),{id:c}=u.useParams();let o;e[0]!==c?(o=p(c),e[0]=c,e[1]=o):o=e[1];const{data:f}=x(o),t=f?.Images?.[0];if(!t?.ImageId){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),s.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=n):n=e[2],n}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let a;e[4]!==t.State?(a=t.State?s.jsx(j,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[4]=t.State,e[5]=a):a=e[5];let i;e[6]!==t.ImageId||e[7]!==a?(i=s.jsx(I,{actions:a,subtitle:"EC2 Image Details",title:t.ImageId}),e[6]=t.ImageId,e[7]=a,e[8]=i):i=e[8];let m;e[9]!==t?(m=s.jsx(h,{image:t,showExtendedDetails:!0}),e[9]=t,e[10]=m):m=e[10];let l;return e[11]!==i||e[12]!==m?(l=s.jsxs(s.Fragment,{children:[r,s.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=l):l=e[13],l}export{E 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 18376b2f3..d562196e3 100644 --- a/hive/services/hiveui/frontend/dist/assets/alert-dialog.js +++ b/hive/services/hiveui/frontend/dist/assets/alert-dialog.js @@ -1 +1 @@ -import{bp as z,Z as j,bq as C,br as v,r as N,j as r,bs as h,c as d,a as f,bt as A,B as x,bu as y,bv as w,bw as $,bx as P,by as R}from"./index.js";function k(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=j(()=>n?.store??new C({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");v({store:g,actionsRef:c,parentContext:p?.store.context});const b=N.useMemo(()=>({store:g}),[g]);return r.jsx(h.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(k,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function I(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(I,{children:[c,r.jsx($,{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 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("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 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("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 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("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 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("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 q(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 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(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 H(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(w,{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{M as A,V as a,S as b,q as c,E as d,H as e,B as f,_ as g,F as h}; +import{bt as z,Z as C,bu as j,bv as v,r as N,j as r,bw as h,c as d,a as f,bx as A,B as x,by as y,bz as w,bA as $,bB as P,bC as R}from"./index.js";function k(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");v({store:g,actionsRef:c,parentContext:p?.store.context});const b=N.useMemo(()=>({store:g}),[g]);return r.jsx(h.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(k,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function I(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(I,{children:[c,r.jsx($,{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 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("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 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("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 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("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 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("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 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("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 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(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 W(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(w,{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{M as A,V as a,S as b,F as c,E as d,W as e,B as f,_ as g,H as h}; diff --git a/hive/services/hiveui/frontend/dist/assets/ami-details.js b/hive/services/hiveui/frontend/dist/assets/ami-details.js index 53b8ea93b..be44e6196 100644 --- a/hive/services/hiveui/frontend/dist/assets/ami-details.js +++ b/hive/services/hiveui/frontend/dist/assets/ami-details.js @@ -1 +1 @@ -import{c as S,bl as M,j as t}from"./index.js";import{D as T,a}from"./detail-row.js";function C(i){const e=S.c(55),{image:l,showExtendedDetails:P}=i,s=P===void 0?!1:P;let y;e[0]!==l.CreationDate?(y=M(l.CreationDate),e[0]=l.CreationDate,e[1]=y):y=e[1];const V=y,R=s?"AMI Information":"AMI Details";let o;e[2]!==R?(o=t.jsx(T.Header,{children:R}),e[2]=R,e[3]=o):o=e[3];let r;e[4]!==l.ImageId?(r=t.jsx(a,{label:"AMI ID",value:l.ImageId}),e[4]=l.ImageId,e[5]=r):r=e[5];let c;e[6]!==l.Name?(c=t.jsx(a,{label:"AMI Name",value:l.Name}),e[6]=l.Name,e[7]=c):c=e[7];let n;e[8]!==l.Description?(n=t.jsx(a,{label:"Description",value:l.Description}),e[8]=l.Description,e[9]=n):n=e[9];let u;e[10]!==l.Architecture?(u=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[10]=l.Architecture,e[11]=u):u=e[11];let D;e[12]!==l.VirtualizationType?(D=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[12]=l.VirtualizationType,e[13]=D):D=e[13];const A=l.Platform||"Linux";let v;e[14]!==A?(v=t.jsx(a,{label:"Platform",value:A}),e[14]=A,e[15]=v):v=e[15];let m;e[16]!==l.PlatformDetails?(m=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[16]=l.PlatformDetails,e[17]=m):m=e[17];let x;e[18]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[18]=l.ImageType,e[19]=x):x=e[19];let b;e[20]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[20]=l.RootDeviceType,e[21]=b):b=e[21];let f;e[22]!==l.RootDeviceName?(f=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[22]=l.RootDeviceName,e[23]=f):f=e[23];let j;e[24]!==l.OwnerId?(j=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[24]=l.OwnerId,e[25]=j):j=e[25];let d;e[26]!==l.State?(d=t.jsx(a,{label:"State",value:l.State}),e[26]=l.State,e[27]=d):d=e[27];let I;e[28]!==V||e[29]!==l.Public||e[30]!==s?(I=s&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:V}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[28]=V,e[29]=l.Public,e[30]=s,e[31]=I):I=e[31];let h;e[32]!==v||e[33]!==m||e[34]!==x||e[35]!==b||e[36]!==f||e[37]!==j||e[38]!==d||e[39]!==I||e[40]!==r||e[41]!==c||e[42]!==n||e[43]!==u||e[44]!==D?(h=t.jsxs(T.Content,{children:[r,c,n,u,D,v,m,x,b,f,j,d,I]}),e[32]=v,e[33]=m,e[34]=x,e[35]=b,e[36]=f,e[37]=j,e[38]=d,e[39]=I,e[40]=r,e[41]=c,e[42]=n,e[43]=u,e[44]=D,e[45]=h):h=e[45];let N;e[46]!==h||e[47]!==o?(N=t.jsxs(T,{children:[o,h]}),e[46]=h,e[47]=o,e[48]=N):N=e[48];let p;e[49]!==l.BlockDeviceMappings||e[50]!==s?(p=s&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(w),e[49]=l.BlockDeviceMappings,e[50]=s,e[51]=p):p=e[51];let E;return e[52]!==N||e[53]!==p?(E=t.jsxs(t.Fragment,{children:[N,p]}),e[52]=N,e[53]=p,e[54]=E):E=e[54],E}function w(i){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",i.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:i.DeviceName}),i.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:i.Ebs.VolumeSize?`${i.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:i.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:i.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:i.Ebs.Encrypted?"Yes":"No"}),i.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:i.Ebs.SnapshotId})]}),i.VirtualName&&t.jsx(a,{label:"Virtual Name",value:i.VirtualName})]})]},i.DeviceName)}export{C as A}; +import{c as S,bp as M,j as t}from"./index.js";import{D as T,a}from"./detail-row.js";function C(i){const e=S.c(55),{image:l,showExtendedDetails:P}=i,s=P===void 0?!1:P;let y;e[0]!==l.CreationDate?(y=M(l.CreationDate),e[0]=l.CreationDate,e[1]=y):y=e[1];const V=y,R=s?"AMI Information":"AMI Details";let o;e[2]!==R?(o=t.jsx(T.Header,{children:R}),e[2]=R,e[3]=o):o=e[3];let r;e[4]!==l.ImageId?(r=t.jsx(a,{label:"AMI ID",value:l.ImageId}),e[4]=l.ImageId,e[5]=r):r=e[5];let c;e[6]!==l.Name?(c=t.jsx(a,{label:"AMI Name",value:l.Name}),e[6]=l.Name,e[7]=c):c=e[7];let n;e[8]!==l.Description?(n=t.jsx(a,{label:"Description",value:l.Description}),e[8]=l.Description,e[9]=n):n=e[9];let u;e[10]!==l.Architecture?(u=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[10]=l.Architecture,e[11]=u):u=e[11];let D;e[12]!==l.VirtualizationType?(D=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[12]=l.VirtualizationType,e[13]=D):D=e[13];const A=l.Platform||"Linux";let v;e[14]!==A?(v=t.jsx(a,{label:"Platform",value:A}),e[14]=A,e[15]=v):v=e[15];let m;e[16]!==l.PlatformDetails?(m=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[16]=l.PlatformDetails,e[17]=m):m=e[17];let x;e[18]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[18]=l.ImageType,e[19]=x):x=e[19];let b;e[20]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[20]=l.RootDeviceType,e[21]=b):b=e[21];let f;e[22]!==l.RootDeviceName?(f=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[22]=l.RootDeviceName,e[23]=f):f=e[23];let j;e[24]!==l.OwnerId?(j=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[24]=l.OwnerId,e[25]=j):j=e[25];let d;e[26]!==l.State?(d=t.jsx(a,{label:"State",value:l.State}),e[26]=l.State,e[27]=d):d=e[27];let I;e[28]!==V||e[29]!==l.Public||e[30]!==s?(I=s&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:V}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[28]=V,e[29]=l.Public,e[30]=s,e[31]=I):I=e[31];let h;e[32]!==v||e[33]!==m||e[34]!==x||e[35]!==b||e[36]!==f||e[37]!==j||e[38]!==d||e[39]!==I||e[40]!==r||e[41]!==c||e[42]!==n||e[43]!==u||e[44]!==D?(h=t.jsxs(T.Content,{children:[r,c,n,u,D,v,m,x,b,f,j,d,I]}),e[32]=v,e[33]=m,e[34]=x,e[35]=b,e[36]=f,e[37]=j,e[38]=d,e[39]=I,e[40]=r,e[41]=c,e[42]=n,e[43]=u,e[44]=D,e[45]=h):h=e[45];let p;e[46]!==h||e[47]!==o?(p=t.jsxs(T,{children:[o,h]}),e[46]=h,e[47]=o,e[48]=p):p=e[48];let N;e[49]!==l.BlockDeviceMappings||e[50]!==s?(N=s&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(w),e[49]=l.BlockDeviceMappings,e[50]=s,e[51]=N):N=e[51];let E;return e[52]!==p||e[53]!==N?(E=t.jsxs(t.Fragment,{children:[p,N]}),e[52]=p,e[53]=N,e[54]=E):E=e[54],E}function w(i){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",i.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:i.DeviceName}),i.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:i.Ebs.VolumeSize?`${i.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:i.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:i.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:i.Ebs.Encrypted?"Yes":"No"}),i.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:i.Ebs.SnapshotId})]}),i.VirtualName&&t.jsx(a,{label:"Virtual Name",value:i.VirtualName})]})]},i.DeviceName)}export{C as A}; diff --git a/hive/services/hiveui/frontend/dist/assets/badge.js b/hive/services/hiveui/frontend/dist/assets/badge.js index 7c56c667e..83bf9e725 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 b,a as f,b as p,bU 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=b({className:f(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,a5 as b,a as f,b as p,bY 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=b({className:f(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/ec2.js b/hive/services/hiveui/frontend/dist/assets/ec2.js index 18488043c..e9b0a7ef9 100644 --- a/hive/services/hiveui/frontend/dist/assets/ec2.js +++ b/hive/services/hiveui/frontend/dist/assets/ec2.js @@ -1 +1 @@ -import{ba as c,bC as i,bc as o,bD as C,bE as p,bF as f,bG as E,bH as K,bI as b,bJ as P,bK as w,c as r,bh as u,bL as m,aM as l,ax as y}from"./index.js";import{u as d}from"./useMutation.js";class S extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(C).build(){}class R extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class q extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(f).build(){}class $ extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(E).build(){}class g extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(K).build(){}class v extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(b).build(){}class Q extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(P).build(){}class x extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(w).build(){}const T=/\s+/;function O(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:A,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function A(e){const n=new v({InstanceIds:[e]});return await m().send(n)}function H(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function D(e){const n=new Q({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 x({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 $({InstanceIds:[e]});return await m().send(n)}function J(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:z,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 z(e){const n=new g({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 L(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function B(e){const n=new S({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function W(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function M(e){const t=e.publicKeyMaterial.trim().split(T).slice(0,2).join(" "),s=new q({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function X(){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)}export{L as a,J as b,X as c,O as d,H as e,j as f,h as g,W as u}; +import{ba as c,bG as i,bc as o,bH as C,bI as p,bJ as f,bK as E,bL as K,bM as P,bN as b,bO as w,c as r,bl as u,bP as m,aM as l,ax as y}from"./index.js";import{u as d}from"./useMutation.js";class S extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(C).build(){}class R extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class q extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(f).build(){}class $ extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(E).build(){}class g extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(K).build(){}class v extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(P).build(){}class Q extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(b).build(){}class x extends c.classBuilder().ep(i).m(function(n,t,s,a){return[o(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(w).build(){}const T=/\s+/;function O(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:A,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function A(e){const n=new v({InstanceIds:[e]});return await m().send(n)}function H(){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 Q({InstanceIds:[e]});return await m().send(n)}function j(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function z(e){const n=new x({InstanceIds:[e]});return await m().send(n)}function J(){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 $({InstanceIds:[e]});return await m().send(n)}function L(){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 g({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 W(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function F(e){const n=new S({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function X(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function M(e){const t=e.publicKeyMaterial.trim().split(T).slice(0,2).join(" "),s=new q({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function h(){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)}export{W as a,L as b,h as c,O as d,H as e,J as f,j as g,X as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/index.js b/hive/services/hiveui/frontend/dist/assets/index.js index 8d37a1ca8..171819a54 100644 --- a/hive/services/hiveui/frontend/dist/assets/index.js +++ b/hive/services/hiveui/frontend/dist/assets/index.js @@ -1,13 +1,13 @@ 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/detail-row.js","assets/_id2.js","assets/_id3.js","assets/ami-details.js","assets/_id4.js"])))=>i.map(i=>d[i]); -function k4(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)}})();function eA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sy={exports:{}},Fl={};var Fx;function P4(){if(Fx)return Fl;Fx=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 Fl.Fragment=t,Fl.jsx=n,Fl.jsxs=n,Fl}var qx;function N4(){return qx||(qx=1,sy.exports=P4()),sy.exports}var $=N4(),qh=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(){}},z4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},L4=class{#e=z4;#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)}},Cv=new L4;function B4(e){setTimeout(e,0)}var Vh=typeof window>"u"||"Deno"in globalThis;function gr(){}function $4(e,t){return typeof e=="function"?e(t):e}function U4(e){return typeof e=="number"&&e>=0&&e!==1/0}function j4(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tv(e,t){return typeof e=="function"?e(t):e}function H4(e,t){return typeof e=="function"?e(t):e}function Vx(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==db(l,t.options))return!1}else if(!yu(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 Gx(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(gu(t.options.mutationKey)!==gu(c))return!1}else if(!yu(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function db(e,t){return(t?.queryKeyHashFn||gu)(e)}function gu(e){return JSON.stringify(e,(t,n)=>Av(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function yu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>yu(e[n],t[n])):!1}var F4=Object.prototype.hasOwnProperty;function tA(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Kx(e)&&Kx(t);if(!r&&!(Av(e)&&Av(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{Cv.setTimeout(t,e)})}function V4(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?tA(e,t):t}function G4(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function K4(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var hb=Symbol();function nA(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===hb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bge(e,t){return typeof e=="function"?e(...t):!!e}function Z4(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 Q4=class extends qh{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!Vh&&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"}},sA=new Q4;function Y4(){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 X4=B4;function W4(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=X4;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 ts=W4(),J4=class extends qh{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!Vh&&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}},oh=new J4;function eL(e){return Math.min(1e3*2**e,3e4)}function rA(e){return(e??"online")==="online"?oh.isOnline():!0}var Iv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function oA(e){let t=!1,n=0,r;const i=Y4(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new Iv(x);v(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>sA.isFocused()&&(e.networkMode==="always"||oh.isOnline())&&e.canRun(),y=()=>rA(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??(Vh?0:3),O=e.retryDelay??eL,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 iA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),U4(this.gcTime)&&(this.#e=Cv.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vh?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Cv.clearTimeout(this.#e),this.#e=void 0)}},tL=class extends iA{#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=Yx(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=Yx(this.options);t.data!==void 0&&(this.setState(Qx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=V4(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(gr).catch(gr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>H4(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Tv(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:!j4(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=nA(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=oA({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof Iv&&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 Iv){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,...nL(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Qx(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),ts.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function nL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Qx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yx(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 Xx(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=_=>{Z4(_,()=>t.signal,()=>y=!0)},v=nA(t.options,t.fetchOptions),b=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(U),U})(),O=await v(A),{maxPages:D}=t.options,N=R?K4:G4;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?sL:Wx,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:Wx(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 Wx(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 sL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var rL=class extends iA{#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||oL(),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=oA({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),ts.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function oL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var iL=class extends qh{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 rL({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=Rd(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=Rd(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=Rd(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=Rd(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ts.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=>Gx(t,n))}findAll(e={}){return this.getAll().filter(t=>Gx(e,t))}notify(e){ts.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ts.batch(()=>Promise.all(e.map(t=>t.continue().catch(gr))))}};function Rd(e){return e.options.scope?.id}var aL=class extends qh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??db(r,t);let c=this.get(i);return c||(c=new tL({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(){ts.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=>Vx(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Vx(e,n)):t}notify(e){ts.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ts.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ts.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},cL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new aL,this.#n=e.mutationCache||new iL,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=sA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=oh.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(Tv(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=$4(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ts.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;ts.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return ts.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ts.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(gr).catch(gr)}invalidateQueries(e,t={}){return ts.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=ts.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(gr)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(gr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Tv(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gr).catch(gr)}fetchInfiniteQuery(e){return e.behavior=Xx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gr).catch(gr)}ensureInfiniteQueryData(e){return e.behavior=Xx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return oh.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(gu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{yu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(gu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{yu(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=db(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===hb&&(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()}},ry={exports:{}},Ge={};var Jx;function lL(){if(Jx)return Ge;Jx=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,te,oe){this.props=P,this.context=te,this.refs=R,this.updater=oe||_}C.prototype.isReactComponent={},C.prototype.setState=function(P,te){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,te,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(P,te,oe){this.props=P,this.context=te,this.refs=R,this.updater=oe||_}var D=O.prototype=new A;D.constructor=O,x(D,C.prototype),D.isPureReactComponent=!0;var N=Array.isArray;function U(){}var B={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function K(P,te,oe){var de=oe.ref;return{$$typeof:e,type:P,key:te,ref:de!==void 0?de:null,props:oe}}function ne(P,te){return K(P.type,te,P.props)}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function G(P){var te={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(oe){return te[oe]})}var Z=/\/+/g;function ye(P,te){return typeof P=="object"&&P!==null&&P.key!=null?G(""+P.key):te.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(U,U):(P.status="pending",P.then(function(te){P.status==="pending"&&(P.status="fulfilled",P.value=te)},function(te){P.status==="pending"&&(P.status="rejected",P.reason=te)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,te,oe,de,Re){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),te,oe,de,Re)}}if(be)return Re=Re(P),be=de===""?"."+ye(P,0):de,N(Re)?(oe="",be!=null&&(oe=be.replace(Z,"$&/")+"/"),q(Re,te,oe,"",function(ht){return ht})):Re!=null&&(le(Re)&&(Re=ne(Re,oe+(Re.key==null||P&&P.key===Re.key?"":(""+Re.key).replace(Z,"$&/")+"/")+be)),te.push(Re)),1;be=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(aA);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uL=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(aA.Provider,{value:e,children:t}));const Ov=new WeakMap,fL=new WeakMap,ih={current:[]};let oy=!1,ru=0;const eu=new Set,Cd=new Map;function lA(e){for(const t of e){if(ih.current.includes(t))continue;ih.current.push(t),t.recompute();const n=fL.get(t);if(n)for(const r of n){const i=Ov.get(r);i?.length&&lA(i)}}}function dL(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 uA(e){if(ru>0&&!Cd.has(e)&&Cd.set(e,e.prevState),eu.add(e),!(ru>0)&&!oy)try{for(oy=!0;eu.size>0;){const t=Array.from(eu);eu.clear();for(const n of t){const r=Cd.get(n)??n.prevState;n.prevState=r,dL(n)}for(const n of t){const r=Ov.get(n);r&&(ih.current.push(n),lA(r))}for(const n of t){const r=Ov.get(n);if(r)for(const i of r)hL(i)}}}finally{oy=!1,ih.current=[],Cd.clear()}}function ou(e){ru++;try{e()}finally{if(ru--,ru===0){const t=eu.values().next().value;t&&uA(t)}}}function pL(e){return typeof e=="function"}let mL=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):pL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),uA(this)}};const ii="__TSR_index",t1="popstate",n1="beforeunload";function gL(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=ah(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[ii];f=s1(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[ii];f=s1(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[ii]!==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 s1(e,t){t||(t={});const n=mb();return{...t,key:n,__TSR_key:n,[ii]:e}}function yL(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=(()=>ah(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=mb();t.history.replaceState({[ii]: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,K,ne)=>{const le=f(K);C||(y=h),h=ah(K,ne),R={href:le,state:ne,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(),K=k.state[ii]-h.state[ii],ne=K===1,le=K===-1,G=!ne&&!le||g;g=!1;const Z=G?"GO":le?"BACK":"FORWARD",ye=G?{type:"GO",index:K}:{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:Z})){v=!0,t.history.go(1),B.notify(ye);return}}}h=d(),B.notify(ye)},U=k=>{if(_){_=!1;return}let K=!1;const ne=c();if(typeof document<"u"&&ne.length)for(const le of ne){const G=le.enableBeforeUnload??!0;if(G===!0){K=!0;break}if(typeof G=="function"&&G()===!0){K=!0;break}}if(K)return k.preventDefault(),k.returnValue=""},B=gL({getLocation:x,getLength:()=>t.history.length,pushState:(k,K)=>O("push",k,K),replaceState:(k,K)=>O("replace",k,K),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(n1,U,{capture:!0}),t.removeEventListener(t1,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(n1,U,{capture:!0}),t.addEventListener(t1,N),t.history.pushState=function(...k){const K=n.apply(t.history,k);return B._ignoreSubscribers||D("PUSH"),K},t.history.replaceState=function(...k){const K=r.apply(t.history,k);return B._ignoreSubscribers||D("REPLACE"),K},B}function vL(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function ah(e,t){const n=vL(e),r=n.indexOf("#"),i=n.indexOf("?"),c=mb();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||{[ii]:0,key:c,__TSR_key:c}}}function mb(){return(Math.random()+1).toString(36).substring(7)}const bL=!1;function vu(e){return e[e.length-1]}function SL(e){return typeof e=="function"}function ti(e,t){return SL(e)?e(t):e}const _L=Object.prototype.hasOwnProperty,r1=Object.prototype.propertyIsEnumerable;function Ws(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=a1(e)&&a1(r);if(!i&&!(ch(e)&&ch(r)))return r;const c=i?e:o1(e);if(!c)return r;const l=i?r:o1(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!(!i1(n)||!n.hasOwnProperty("isPrototypeOf"))}function i1(e){return Object.prototype.toString.call(e)==="[object Object]"}function a1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yi(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||!Yi(e[l],t[l],n)))return!1;return i===c}return!1}function Ec(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 wL(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 pc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function EL(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function c1(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 EL(t)}const fA=["http:","https:","mailto:","tel:"];function lh(e){if(!e)return!1;try{const t=new URL(e);return!fA.includes(t.protocol)}catch{return!1}}const xL={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},RL=/[&><\u2028\u2029]/g;function CL(e){return e.replace(RL,t=>xL[t])}function iy(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=c1(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+c1(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function TL(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var AL="Invariant failed";function fo(e,t){if(!e)throw new Error(AL)}function uh(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 xc=0,ta=1,na=2,bu=3,Gi=4,dA=5;function IL(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 gb(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]=xc,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]=na,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=ta,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=IL(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===U);if(B)_=B;else{const k=cy(ta,n.fullPath??n.from,D,N,U);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case bu:{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,U=O?D?O:O.toLowerCase():void 0,B=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===U);if(B)_=B;else{const k=cy(bu,n.fullPath??n.from,D,N,U);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case na:{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,U=O?D?O:O.toLowerCase():void 0,B=cy(na,n.fullPath??n.from,D,N,U);_=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=Ki(n.fullPath??n.from);b.kind=dA,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=Ki(n.fullPath??n.from);b.kind=Gi,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)Gh(e,t,d,f,i,c,l)}function ay(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 Jo(e){if(e.pathless)for(const t of e.pathless)Jo(t);if(e.static)for(const t of e.static.values())Jo(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Jo(t);if(e.dynamic?.length){e.dynamic.sort(ay);for(const t of e.dynamic)Jo(t)}if(e.optional?.length){e.optional.sort(ay);for(const t of e.optional)Jo(t)}if(e.wildcard?.length){e.wildcard.sort(ay);for(const t of e.wildcard)Jo(t)}}function Ki(e){return{kind:xc,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 cy(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 OL(e,t){const n=Ki("/"),r=new Uint16Array(6);for(const i of e)Gh(!1,r,i,1,n,0);Jo(n),t.masksTree=n,t.flatCache=uh(1e3)}function ML(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=yb(e,t.masksTree);return t.flatCache.set(e,r),r}function DL(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=Ki("/");const f=new Uint16Array(6);Gh(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return yb(r,l,n)}function kL(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=yb(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=zL(c.route)),t.matchCache.set(r,c),c}function PL(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function NL(e,t=!1,n){const r=Ki(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Gh(t,i,e,1,r,0,h=>{if(n?.(h,f),fo(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=PL(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),Jo(r),{processedTree:{segmentTree:r,singleCache:uh(1e3),matchCache:uh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function yb(e,t,n=!1){const r=e.split("/"),i=BL(e,r,t,n);if(!i)return null;const[c]=hA(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function hA(e,t,n){const r=LL(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 G=v.optional[le];f.push({node:G,index:b,skipped:K,depth:ne,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!U)for(let le=v.optional.length-1;le>=0;le--){const G=v.optional[le],{prefix:Z,suffix:ye}=G;if(Z||ye){const fe=G.caseSensitive?B:k??=B.toLowerCase();if(Z&&!fe.startsWith(Z)||ye&&!fe.endsWith(ye))continue}f.push({node:G,index:b+1,skipped:_,depth:ne,statics:R,dynamics:C,optionals:A+1,extract:O,rawParams:D,parsedParams:N})}}if(!U&&v.dynamic&&B)for(let K=v.dynamic.length-1;K>=0;K--){const ne=v.dynamic[K],{prefix:le,suffix:G}=ne;if(le||G){const Z=ne.caseSensitive?B:k??=B.toLowerCase();if(le&&!Z.startsWith(le)||G&&!Z.endsWith(G))continue}f.push({node:ne,index:b+1,skipped:_,depth:x+1,statics:R,dynamics:C+1,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!U&&v.staticInsensitive){const K=v.staticInsensitive.get(k??=B.toLowerCase());K&&f.push({node:K,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!U&&v.static){const K=v.static.get(B);K&&f.push({node:K,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(v.pathless){const K=x+1;for(let ne=v.pathless.length-1;ne>=0;ne--){const le=v.pathless[ne];f.push({node:le,index:b,skipped:_,depth:K,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}}}if(y&&d)return ql(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===Gi)>(e.node.kind===Gi)||t.node.kind===Gi==(e.node.kind===Gi)&&t.depth>e.depth))):!0}function Zd(e){return vb(e.filter(t=>t!==void 0).join("/"))}function vb(e){return e.replace(/\/{2,}/g,"/")}function pA(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ao(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function mA(e){return ao(pA(e))}function fh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function $L(e,t,n){return fh(e,n)===fh(t,n)}function UL({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&&vu(f)==="";)f.pop();const g=t.split("/");for(let v=0,b=g.length;v1&&(vu(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=gb(v,0,d);const b=d[0];if(b===xc){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===ta?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:b===na?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=vb(h);const y=h||"/";return l&&r&&r.set(l,y),y}function jL(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 uy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):HL(r,n)}function fy({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 VL(){const e=FL();if(!e)return null;const t=e.getItem(Mv);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=ti(r,n)||n;try{e.setItem(Mv,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Td=VL(),GL=e=>e.state.__TSR_key||e.href;function KL(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 dh=!1;function ZL({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];dh=!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)}}dh=!1}function QL(e,t){if(!Td||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Td))return;e.isScrollRestorationSetup=!0,dh=!1;const r=e.options.getScrollRestorationKey||GL;window.history.scrollRestoration="manual";const i=c=>{if(dh||!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=KL(c.target)}const f=r(e.state.location);Td.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",qL(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})||(ZL({storageKey:Mv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Td.set(f=>(f[l]||={},f)))})}function YL(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 XL(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 dy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function WL(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=dy(i):Array.isArray(c)?c.push(dy(i)):n[r]=[c,dy(i)]}return n}const JL=t6(JSON.parse),e6=n6(JSON.stringify,JSON.parse);function t6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=WL(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function n6(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=XL(i,r);return c?`?${c}`:""}}const tr="__root__";function bb(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&lh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${fA.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 rr(e){return e instanceof Response&&!!e.options}const Qd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Kh=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),mc=(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},gA=(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),fo(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);fo(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,gA(e,t))},ni=(e,t,n)=>{if(!(!rr(n)&&!Ms(n))){if(rr(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=rr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:mc(e,t.index),isFetching:!1,error:n})),Ms(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw rr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(gA(e,n),n)}},yA=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Vl=(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,ni(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,ni(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}))},vA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Kh(e,t)&&(n.options.loader||n.options.beforeLoad||_A(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Qd(e)},i);r._nonReactive.pendingTimeout=l}},s6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;vA(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&ni(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},r6=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ec(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Vl(e,n,l,"PARSE_PARAMS"),f&&Vl(e,n,f,"VALIDATE_SEARCH"),vA(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,U=>({...U,isFetching:"beforeLoad",fetchCount:U.fetchCount+1,abortController:d})))},b=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,U=>({...U,isFetching:!1}))};if(!r.options.beforeLoad){ou(()=>{v(),b()});return}i._nonReactive.beforeLoadPromise=Ec();const _={...mc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=Kh(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:U=>e.router.navigate({...U,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=U=>{if(U===void 0){ou(()=>{v(),b()});return}(rr(U)||Ms(U))&&(v(),Vl(e,n,U,"BEFORE_LOAD")),ou(()=>{v(),e.updateMatch(t,B=>({...B,__beforeLoadContext:U})),b()})};let N;try{if(N=r.options.beforeLoad(O),pc(N))return v(),N.catch(U=>{Vl(e,n,U,"BEFORE_LOAD")}).then(D)}catch(U){v(),Vl(e,n,U,"BEFORE_LOAD")}D(N)},o6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>r6(e,n,t,i),f=()=>{if(yA(e,n))return;const d=s6(e,n,i);return pc(d)?d.then(l):l()};return c()},i6=(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}})},bA=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=mc(e,n),y=Kh(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}},l1=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(bL??e.router.isServer)||i.ssr===!0)&&SA(r);const c=r.options.loader?.(bA(e,t,n,r)),l=r.options.loader&&pc(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;ni(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:mc(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:mc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,Ms(c)&&await r.options.notFoundComponent?.preload?.(),ni(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,ni(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:mc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),ni(e,c,i)}},a6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!yA(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&&ni(e,y,g)}else{const y=Date.now()-h.updatedAt,g=Kh(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(bA(e,n,t,l)):b,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Ec(),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 l1(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){rr(O)&&await e.router.navigate(O.options)}})()):(C!=="success"||i&&e.sync)&&await l1(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 u1(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Qd(t);try{for(let f=0;ff.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(rr(f))throw f;!c&&Ms(f)&&(c=f)}for(const f of t.matches){const{id:d,routeId:h}=f,y=t.router.looseRoutesById[h];try{const g=i6(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=Qd(t);pc(l)&&await l}catch(n){if(Ms(n)&&!t.preload){const r=Qd(t);throw pc(r)&&await r,n}if(rr(n))throw n}return t.matches}async function SA(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 wA){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 _A(e){for(const t of wA)if(e.options[t]?.preload)return!0;return!1}const wA=["component","errorComponent","pendingComponent","notFoundComponent"];function c6(e){return{input:({url:t})=>{for(const n of e)t=Dv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=EA(e[n],t);return t}}}function l6(e){const t=mA(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=Zd(["/",t,l.pathname]),l)}}function Dv(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 EA(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 Xi(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 u6{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=jL(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=yL()),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=uh(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=new mL(d6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),QL(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=mA(d);b&&b!=="/"&&v.push(l6({basepath:d})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:c6(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=NL(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&OL(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=Dv(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:iy(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:b,search:Ws(r?.search,v),hash:iy(g.hash.split("#").reverse()[0]??""),state:Ws(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)=>UL({base:n,to:vb(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,ti(c.params,g)),_=fy({path:v,params:b}).interpolatedPath,x=this.getMatchedRoutes(_);let R=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:ao(_))&&(this.options.notFoundRoute?R=[...R,this.options.notFoundRoute]:f1(this.options.notFoundMode,R)),Object.keys(b).length>0)for(const G of R){const Z=G.options.params?.stringify??G.options.stringifyParams;Z&&Object.assign(b,Z(b))}const A=n.leaveParams?v:iy(fy({path:v,params:b,decoder:this.pathParamsDecoder}).interpolatedPath);let O=y;if(n._includeValidateSearch&&this.options.search?.strict){const G={};R.forEach(Z=>{if(Z.options.validateSearch)try{Object.assign(G,Yd(Z.options.validateSearch,{...G,...O}))}catch{}}),O=G}O=p6({search:O,dest:c,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),O=Ws(y,O);const D=this.options.stringifySearch(O),N=c.hash===!0?l.hash:c.hash?ti(c.hash,l.hash):void 0,U=N?`#${N}`:"";let B=c.state===!0?l.state:c.state?ti(c.state,l.state):{};B=Ws(l.state,B);const k=`${A}${D}${U}`;let K,ne,le=!1;if(this.rewrite){const G=new URL(k,this.origin),Z=EA(this.rewrite,G);K=G.href.replace(G.origin,""),Z.origin!==this.origin?(ne=Z.href,le=!0):ne=Z.pathname+Z.search+Z.hash}else K=TL(k),ne=K;return{publicHref:ne,href:K,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=ML(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,ti(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=Yi(i.state,this.latestLocation.state);return d.forEach(y=>{delete i.state[y]}),h},l=ao(this.latestLocation.href)===ao(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Ec(()=>{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=ah(f,{__TSR_index:n?g:g+1}),b=new URL(v.pathname,this.origin),_=Dv(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(lh(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",...Xi({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Xi({resolvedLocation:h,location:d})}),await u1({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=[];ou(()=>{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){rr(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ms(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(Xi({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=SA,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)]);ou(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await u1({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(rr(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:r});Ms(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=DL(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!Yi(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Yi(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??e6,parseSearch:t.parseSearch??JL}),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["**"]:ao(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const h=d?f1(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=Yd(v.options.validateSearch,{...ye})??void 0;return[{...ye,...q},{...fe,...q},void 0]}catch(q){let X=q;if(q instanceof hh||(X=new hh(q.message,{cause:q})),n?.throwOnError)throw X;return[ye,{},X]}})(),A=v.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=fy({path:v.fullPath,params:c,decoder:this.pathParamsDecoder}),U=v.id+D+O,B=this.getMatch(U),k=this.state.matches.find(ye=>ye.routeId===v.id),K=B?._strictParams??N;let ne;if(!B)try{d1(v,N,l,K)}catch(ye){if(Ms(ye)||rr(ye)?ne=ye:ne=new f6(ye.message,{cause:ye}),n?.throwOnError)throw ne}Object.assign(c,K);const le=k?"stay":"enter";let G;if(B)G={...B,cause:le,params:k?Ws(k.params,c):c,_strictParams:K,search:Ws(k?k.search:B.search,x),_strictSearch:R};else{const ye=v.options.loader||v.options.beforeLoad||v.lazyFn||_A(v)?"pending":"success";G={id:U,ssr:v.options.ssr,index:b,routeId:v.id,params:k?Ws(k.params,c):c,_strictParams:K,pathname:D,updatedAt:Date.now(),search:k?Ws(k.search,x):x,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:ne,__routeContext:void 0,_nonReactive:{loadPromise:Ec()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:k?Ws(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||(G.globalNotFound=h===v.id),G.searchError=C;const Z=g(_);G.context={...Z,...G.__routeContext,...G.__beforeLoadContext},y.push(G)}),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=vu(n),l={...t.search};for(const y of n)try{Object.assign(l,Yd(y.options.validateSearch,l))}catch{}const f=vu(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{d1(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class hh extends Error{}class f6 extends Error{}function d6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Yd(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new hh("Async validation not supported");if(n.issues)throw new hh(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=ao(e);let c,l;const f=kL(i,n,!0);return f&&(c=f.route,Object.assign(r,f.rawParams),l=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[tr]],routeParams:r,foundRoute:c,parsedParams:l}}function p6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return m6(n)(e,t,r??!1)}function m6(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,...Yd(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:ti(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 f1(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 tr}function d1(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 g6="Error preloading route! ☝️";class xA{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=tr:this.parentRoute||fo(!1);let c=i?tr:r?.path;c&&c!=="/"&&(c=pA(c));const l=r?.id||c;let f=i?tr:Zd([this.parentRoute.id===tr?"":this.parentRoute.id,l]);c===tr&&(c="/"),f!==tr&&(f=Zd(["/",f]));const d=f===tr?"/":Zd([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=d,this._to=ao(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=>bb({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 y6 extends xA{constructor(t){super(t)}}const v6="use",h1=pb[v6],Ad=typeof window<"u"?I.useLayoutEffect:I.useEffect;function hy(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 b6(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 S6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Sb(e){const t=e.errorComponent??_b;return $.jsx(_6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class _6 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 _b({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 w6({children:e,fallback:t=null}){return RA()?$.jsx(wc.Fragment,{children:e}):$.jsx(wc.Fragment,{children:t})}function RA(){return wc.useSyncExternalStore(E6,()=>!0,()=>!1)}function E6(){return()=>{}}var py={exports:{}},my={},gy={exports:{}},yy={};var p1;function x6(){if(p1)return yy;p1=1;var e=Mc();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 yy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,yy}var m1;function CA(){return m1||(m1=1,gy.exports=x6()),gy.exports}var g1;function R6(){if(g1)return my;g1=1;var e=Mc(),t=CA();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 my.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(U){if(!A){if(A=!0,O=U,U=v(U),b!==void 0&&x.hasValue){var B=x.value;if(b(B,U))return D=B}return D=U}if(B=D,r(O,U))return B;var k=v(U);return b!==void 0&&b(B,k)?(O=U,B):(O=U,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},my}var y1;function C6(){return y1||(y1=1,py.exports=R6()),py.exports}var TA=C6();function T6(e,t=r=>r,n={}){const r=n.equal??A6;return TA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function A6(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=v1(e);if(n.length!==v1(t).length)return!1;for(let r=0;r"u"?vy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=vy,vy)}function Yn(e){const t=I.useContext(AA());return e?.warn,t}function un(e){const t=Yn({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return T6(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const c=Ws(r.current,e.select(i));return r.current=c,c}return e.select(i)}return i})}const Zh=I.createContext(void 0),I6=I.createContext(void 0);function Mr(e){const t=I.useContext(e.from?I6:Zh);return un({select:r=>{const i=r.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(fo(!((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 wb(e){return Mr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Eb(e){const{select:t,...n}=e;return Mr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function xb(e){return Mr({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 Rb(e){return Mr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Qh(e){const t=Yn();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var by={exports:{}},qn={};var b1;function O6(){if(b1)return qn;b1=1;var e=Mc();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(),by.exports=O6(),by.exports}var pi=IA();function M6(e,t){const n=Yn(),r=S6(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:U,onMouseLeave:B,onTouchStart:k,ignoreBlocker:K,params:ne,search:le,hash:G,state:Z,mask:ye,reloadDocument:fe,unsafeRelative:q,from:X,_fromLocation:j,...ve}=e,Ce=RA(),P=un({select:gt=>gt.location.search,structuralSharing:!0}),te=e.from,oe=I.useMemo(()=>({...e,from:te}),[n,P,te,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),de=I.useMemo(()=>n.buildLocation({...oe}),[n,oe]),Re=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,Se=de.maskedLocation?de.maskedLocation.external:de.external,be=I.useMemo(()=>L6(Re,Se,n.history,C),[C,Se,Re,n.history]),Ye=I.useMemo(()=>{if(be?.external)return lh(be.href)?void 0:be.href;if(!B6(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),lh(f)?void 0:f}catch{}},[f,be]),He=un({select:gt=>{if(Ye)return!1;if(l?.exact){if(!$L(gt.location.pathname,de.pathname,n.basepath))return!1}else{const Bt=fh(gt.location.pathname,n.basepath),$t=fh(de.pathname,n.basepath);if(!(Bt.startsWith($t)&&(Bt.length===$t.length||Bt[$t.length]==="/")))return!1}return(l?.includeSearch??!0)&&!Yi(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Ce&>.location.hash===de.hash:!0}}),ht=He?ti(i,{})??D6:Sy,Ht=He?Sy:ti(c,{})??Sy,re=[O,ht.className,Ht.className].filter(Boolean).join(" "),Fe=(A||ht.style||Ht.style)&&{...A,...ht.style,...Ht.style},[Ae,Pt]=I.useState(!1),_e=I.useRef(!1),Pe=e.reloadDocument||Ye?!1:d??n.options.defaultPreload,Ve=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...oe}).catch(gt=>{console.warn(gt),console.warn(g6)})},[n,oe]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);b6(r,ut,z6,{disabled:!!C||Pe!=="viewport"}),I.useEffect(()=>{_e.current||!C&&Pe==="render"&&(Qe(),_e.current=!0)},[C,Qe,Pe]);const Be=gt=>{const Bt=gt.currentTarget.getAttribute("target"),$t=R!==void 0?R:Bt;if(!C&&!$6(gt)&&!gt.defaultPrevented&&(!$t||$t==="_self")&>.button===0){gt.preventDefault(),pi.flushSync(()=>{Pt(!0)});const nn=n.subscribe("onResolved",()=>{nn(),Pt(!1)});n.navigate({...oe,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:v,viewTransition:_,ignoreBlocker:K})}};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},...U&&{onMouseEnter:U},...B&&{onMouseLeave:B},...k&&{onTouchStart:k}};const Le=gt=>{C||Pe&&Qe()},tn=Le,it=gt=>{if(!(C||!Pe))if(!Ve)Qe();else{const Bt=gt.target;if(Gl.has(Bt))return;const $t=setTimeout(()=>{Gl.delete(Bt),Qe()},Ve);Gl.set(Bt,$t)}},vs=gt=>{if(C||!Pe||!Ve)return;const Bt=gt.target,$t=Gl.get(Bt);$t&&(clearTimeout($t),Gl.delete(Bt))};return{...ve,...ht,...Ht,href:be?.href,ref:r,onClick:Kl([D,Be]),onFocus:Kl([N,Le]),onMouseEnter:Kl([U,it]),onMouseLeave:Kl([B,vs]),onTouchStart:Kl([k,tn]),disabled:!!C,target:R,...Fe&&{style:Fe},...re&&{className:re},...C&&k6,...He&&P6,...Ce&&Ae&&N6}}const Sy={},D6={className:"active"},k6={role:"link","aria-disabled":!0},P6={"data-status":"active","aria-current":"page"},N6={"data-transitioning":"transitioning"},Gl=new WeakMap,z6={rootMargin:"100px"},Kl=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function L6(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function B6(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Cr=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=M6(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 $6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let U6=class extends xA{constructor(t){super(t),this.useMatch=n=>Mr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Mr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Rb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>xb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Eb({...n,from:this.id}),this.useLoaderData=n=>wb({...n,from:this.id}),this.useNavigate=()=>Qh({from:this.fullPath}),this.Link=wc.forwardRef((n,r)=>$.jsx(Cr,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function j6(e){return new U6(e)}function H6(){return e=>q6(e)}class F6 extends y6{constructor(t){super(t),this.useMatch=n=>Mr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Mr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Rb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>xb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Eb({...n,from:this.id}),this.useLoaderData=n=>wb({...n,from:this.id}),this.useNavigate=()=>Qh({from:this.fullPath}),this.Link=wc.forwardRef((n,r)=>$.jsx(Cr,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function q6(e){return new F6(e)}function mn(e){return typeof e=="object"?new _1(e,{silent:!0}).createRoute(e):new _1(e,{silent:!0}).createRoute}class _1{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=j6(r);return i.isRoot=!1,i},this.silent=n?.silent}}class w1{constructor(t){this.useMatch=n=>Mr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Mr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Rb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>xb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Eb({...n,from:this.options.id}),this.useLoaderData=n=>wb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Yn();return Qh({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function E1(e){return typeof e=="object"?new w1(e):t=>new w1({id:e,...t})}function Mn(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,wL(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(h1)h1(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function V6(){const e=Yn(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=un({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),l=hy(c),f=c||n||i,d=hy(f),h=c||i,y=hy(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 ao(e.latestLocation.publicHref)!==ao(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),Ad(()=>{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]),Ad(()=>{l&&!c&&e.emit({type:"onLoad",...Xi(e.state)})},[l,e,c]),Ad(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...Xi(e.state)})},[h,y,e]),Ad(()=>{if(d&&!f){const g=Xi(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&YL(e)}},[f,d,e]),null}function G6(e){const t=un({select:n=>`not-found-${n.location.pathname}-${n.status}`});return $.jsx(Sb,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ms(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ms(n))return e.fallback?.(n);throw n},children:e.children})}function K6(){return $.jsx("p",{children:"Not Found"})}function fc(e){return $.jsx($.Fragment,{children:e.children})}function OA(e,t,n){return t.options.notFoundComponent?$.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?$.jsx(e.options.defaultNotFoundComponent,{...n}):$.jsx(K6,{})}function Z6(){return Yn().isScrollRestoring,null}const MA=I.memo(function({matchId:t}){const n=Yn(),r=un({select:C=>{const A=C.matches.find(O=>O.id===t);return fo(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:fc,v=f?Sb:fc,b=h?G6:fc,_=un({select:C=>C.loadedAt}),x=un({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??fc:fc;return $.jsxs(R,{children:[$.jsx(Zh.Provider,{value:t,children:$.jsx(g,{fallback:l,children:$.jsx(v,{getResetKey:()=>_,errorComponent:f||_b,onCatch:(C,A)=>{if(Ms(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(w6,{fallback:l,children:$.jsx(x1,{matchId:t})}):$.jsx(x1,{matchId:t})})})})}),x===tr&&n.options.scrollRestoration?$.jsxs($.Fragment,{children:[$.jsx(Q6,{}),$.jsx(Z6,{})]}):null]})});function Q6(){const e=Yn(),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",...Xi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const x1=I.memo(function({matchId:t}){const n=Yn(),{match:r,key:i,routeId:c}=un({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(DA,{})},[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=Ec();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 fo(Ms(r.error)),OA(n,l,r.error);if(r.status==="redirected")throw fo(rr(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return f}),DA=I.memo(function(){const t=Yn(),n=I.useContext(Zh),r=un({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=un({select:h=>{const g=h.matches.find(v=>v.id===n);return fo(g),g.globalNotFound}}),l=un({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 OA(t,i,void 0);if(!l)return null;const d=$.jsx(MA,{matchId:l});return r===tr?$.jsx(I.Suspense,{fallback:f,children:d}):d});function Y6(){const e=Yn(),n=e.routesById[tr].options.pendingComponent??e.options.defaultPendingComponent,r=n?$.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?fc:I.Suspense,c=$.jsxs(i,{fallback:r,children:[$.jsx(V6,{}),$.jsx(X6,{})]});return e.options.InnerWrap?$.jsx(e.options.InnerWrap,{children:c}):c}function X6(){const e=Yn(),t=un({select:i=>i.matches[0]?.id}),n=un({select:i=>i.loadedAt}),r=t?$.jsx(MA,{matchId:t}):null;return $.jsx(Zh.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:$.jsx(Sb,{getResetKey:()=>n,errorComponent:_b,onCatch:i=>{i.message||i.toString()},children:r})})}const W6=e=>new J6(e);class J6 extends u6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=mn,globalThis.createLazyFileRoute=E1):typeof window<"u"&&(window.createFileRoute=mn,window.createLazyFileRoute=E1);function eB({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=AA(),i=$.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?$.jsx(e.options.Wrap,{children:i}):i}function tB({router:e,...t}){return $.jsx(eB,{router:e,...t,children:$.jsx(Y6,{})})}function nB(e){return un({select:t=>e?.select?e.select(t.location):t.location})}function sB({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(rB,{attrs:t,children:n});default:return null}}function rB({attrs:e,children:t}){Yn(),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 oB=()=>{const e=Yn(),t=e.options.ssr?.nonce,n=un({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:CL(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=un({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=un({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=un({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=un({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 iB([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function iB(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function aB(){const e=oB(),n=Yn().options.ssr?.nonce;return $.jsx($.Fragment,{children:e.map(r=>I.createElement(sB,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var _y={exports:{}},Zl={},wy={exports:{}},Ey={};var R1;function cB(){return R1||(R1=1,(function(e){function t(q,X){var j=q.length;q.push(X);e:for(;0>>1,Ce=q[ve];if(0>>1;vei(oe,j))dei(Re,oe)?(q[ve]=Re,q[de]=j,ve=de):(q[ve]=oe,q[te]=j,ve=te);else if(dei(Re,j))q[ve]=Re,q[de]=j,ve=de;else break e}}return X}function i(q,X){var j=q.sortIndex-X.sortIndex;return j!==0?j:q.id-X.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 X=n(h);X!==null;){if(X.callback===null)r(h);else if(X.startTime<=q)r(h),X.sortIndex=X.expirationTime,t(d,X);else break;X=n(h)}}function N(q){if(x=!1,D(q),!_)if(n(d)!==null)_=!0,U||(U=!0,G());else{var X=n(h);X!==null&&fe(N,X.startTime-q)}}var U=!1,B=-1,k=5,K=-1;function ne(){return R?!0:!(e.unstable_now()-Kq&&ne());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var Ce=ve(g.expirationTime<=q);if(q=e.unstable_now(),typeof Ce=="function"){g.callback=Ce,D(q),X=!0;break t}g===n(d)&&r(d),D(q)}else r(d);g=n(d)}if(g!==null)X=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-q),X=!1}}break e}finally{g=null,v=j,b=!1}X=void 0}}finally{X?G():U=!1}}}var G;if(typeof O=="function")G=function(){O(le)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ye=Z.port2;Z.port1.onmessage=le,G=function(){ye.postMessage(null)}}else G=function(){C(le,0)};function fe(q,X){B=C(function(){q(e.unstable_now())},X)}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=j,t(h,q),n(d)===null&&q===n(h)&&(x?(A(B),B=-1):x=!0,fe(N,j-ve))):(q.sortIndex=Ce,t(d,q),_||b||(_=!0,U||(U=!0,G()))),q},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(q){var X=v;return function(){var j=v;v=X;try{return q.apply(this,arguments)}finally{v=j}}}})(Ey)),Ey}var C1;function lB(){return C1||(C1=1,wy.exports=cB()),wy.exports}var T1;function uB(){if(T1)return Zl;T1=1;var e=lB(),t=Mc(),n=IA();function r(s){var o="https://react.dev/errors/"+s;if(1Ce||(s.current=ve[Ce],ve[Ce]=null,Ce--)}function oe(s,o){Ce++,ve[Ce]=s.current,s.current=o}var de=P(null),Re=P(null),Se=P(null),be=P(null);function Ye(s,o){switch(oe(Se,o),oe(Re,s),oe(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?dx(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=dx(o),s=hx(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}te(de),oe(de,s)}function He(){te(de),te(Re),te(Se)}function ht(s){s.memoizedState!==null&&oe(be,s);var o=de.current,a=hx(o,s.type);o!==a&&(oe(Re,s),oe(de,a))}function Ht(s){Re.current===s&&(te(de),te(Re)),be.current===s&&(te(be),$l._currentValue=j)}var re,Fe;function Ae(s){if(re===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);re=o&&o[1]||"",Fe=-1r[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)}})();function LA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xy={exports:{}},xu={};var C1;function tL(){if(C1)return xu;C1=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 xu.Fragment=t,xu.jsx=n,xu.jsxs=n,xu}var T1;function nL(){return T1||(T1=1,xy.exports=tL()),xy.exports}var $=nL(),_p=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(){}},sL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rL=class{#e=sL;#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)}},K0=new rL;function oL(e){setTimeout(e,0)}var wp=typeof window>"u"||"Deno"in globalThis;function vr(){}function iL(e,t){return typeof e=="function"?e(t):e}function aL(e){return typeof e=="number"&&e>=0&&e!==1/0}function cL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Z0(e,t){return typeof e=="function"?e(t):e}function lL(e,t){return typeof e=="function"?e(t):e}function A1(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==Dv(l,t.options))return!1}else if(!Wu(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 I1(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(Xu(t.options.mutationKey)!==Xu(c))return!1}else if(!Wu(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Dv(e,t){return(t?.queryKeyHashFn||Xu)(e)}function Xu(e){return JSON.stringify(e,(t,n)=>Q0(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Wu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Wu(e[n],t[n])):!1}var uL=Object.prototype.hasOwnProperty;function BA(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=O1(e)&&O1(t);if(!r&&!(Q0(e)&&Q0(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{K0.setTimeout(t,e)})}function dL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?BA(e,t):t}function hL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function pL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var kv=Symbol();function $A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===kv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function lye(e,t){return typeof e=="function"?e(...t):!!e}function mL(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 gL=class extends _p{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!wp&&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"}},UA=new gL;function yL(){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 vL=oL;function bL(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=vL;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 ts=bL(),SL=class extends _p{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!wp&&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}},Lh=new SL;function _L(e){return Math.min(1e3*2**e,3e4)}function jA(e){return(e??"online")==="online"?Lh.isOnline():!0}var Y0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function HA(e){let t=!1,n=0,r;const i=yL(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new Y0(x);v(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>UA.isFocused()&&(e.networkMode==="always"||Lh.isOnline())&&e.canRun(),y=()=>jA(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??(wp?0:3),O=e.retryDelay??_L,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 FA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),aL(this.gcTime)&&(this.#e=K0.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(K0.clearTimeout(this.#e),this.#e=void 0)}},wL=class extends FA{#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=k1(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=k1(this.options);t.data!==void 0&&(this.setState(D1(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=dL(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(vr).catch(vr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>lL(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Z0(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:!cL(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=$A(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=HA({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof Y0&&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 Y0){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,...EL(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...D1(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),ts.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function EL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function D1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function k1(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 P1(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=_=>{mL(_,()=>t.signal,()=>y=!0)},v=$A(t.options,t.fetchOptions),b=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(U),U})(),O=await v(A),{maxPages:D}=t.options,N=R?pL:hL;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?xL:N1,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:N1(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 N1(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 xL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var RL=class extends FA{#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||CL(),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=HA({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),ts.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function CL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var TL=class extends _p{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 RL({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=sh(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=sh(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=sh(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=sh(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ts.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=>I1(t,n))}findAll(e={}){return this.getAll().filter(t=>I1(e,t))}notify(e){ts.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ts.batch(()=>Promise.all(e.map(t=>t.continue().catch(vr))))}};function sh(e){return e.options.scope?.id}var AL=class extends _p{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Dv(r,t);let c=this.get(i);return c||(c=new wL({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(){ts.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=>A1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>A1(e,n)):t}notify(e){ts.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ts.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ts.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},IL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new AL,this.#n=e.mutationCache||new TL,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=UA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Lh.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(Z0(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=iL(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ts.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;ts.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return ts.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ts.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(vr).catch(vr)}invalidateQueries(e,t={}){return ts.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=ts.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(vr)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(vr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Z0(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vr).catch(vr)}fetchInfiniteQuery(e){return e.behavior=P1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vr).catch(vr)}ensureInfiniteQueryData(e){return e.behavior=P1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lh.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(Xu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Wu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(Xu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{Wu(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=Dv(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===kv&&(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()}},Ry={exports:{}},Ge={};var z1;function OL(){if(z1)return Ge;z1=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 U(){}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(U,U):(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 V(P,ne,ie,de,Re){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,V(be(P._payload),ne,ie,de,Re)}}if(be)return Re=Re(P),be=de===""?"."+ye(P,0):de,N(Re)?(ie="",be!=null&&(ie=be.replace(Q,"$&/")+"/"),V(Re,ne,ie,"",function(ht){return ht})):Re!=null&&(le(Re)&&(Re=se(Re,ie+(Re.key==null||P&&P.key===Re.key?"":(""+Re.key).replace(Q,"$&/")+"/")+be)),ne.push(Re)),1;be=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(qA);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ML=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(qA.Provider,{value:e,children:t}));const X0=new WeakMap,DL=new WeakMap,Bh={current:[]};let Cy=!1,$u=0;const Nu=new Set,rh=new Map;function GA(e){for(const t of e){if(Bh.current.includes(t))continue;Bh.current.push(t),t.recompute();const n=DL.get(t);if(n)for(const r of n){const i=X0.get(r);i?.length&&GA(i)}}}function kL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function PL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function KA(e){if($u>0&&!rh.has(e)&&rh.set(e,e.prevState),Nu.add(e),!($u>0)&&!Cy)try{for(Cy=!0;Nu.size>0;){const t=Array.from(Nu);Nu.clear();for(const n of t){const r=rh.get(n)??n.prevState;n.prevState=r,kL(n)}for(const n of t){const r=X0.get(n);r&&(Bh.current.push(n),GA(r))}for(const n of t){const r=X0.get(n);if(r)for(const i of r)PL(i)}}}finally{Cy=!1,Bh.current=[],rh.clear()}}function Uu(e){$u++;try{e()}finally{if($u--,$u===0){const t=Nu.values().next().value;t&&KA(t)}}}function NL(e){return typeof e=="function"}let zL=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):NL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),KA(this)}};const _i="__TSR_index",B1="popstate",$1="beforeunload";function LL(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=$h(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[_i];f=U1(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[_i];f=U1(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[_i]!==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 U1(e,t){t||(t={});const n=Nv();return{...t,key:n,__TSR_key:n,[_i]:e}}function BL(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=(()=>$h(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=Nv();t.history.replaceState({[_i]: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=$h(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[_i]-h.state[_i],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 V of fe)if(await V.blockerFn({currentLocation:h,nextLocation:k,action:Q})){v=!0,t.history.go(1),B.notify(ye);return}}}h=d(),B.notify(ye)},U=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=LL({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($1,U,{capture:!0}),t.removeEventListener(B1,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener($1,U,{capture:!0}),t.addEventListener(B1,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 $L(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function $h(e,t){const n=$L(e),r=n.indexOf("#"),i=n.indexOf("?"),c=Nv();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||{[_i]:0,key:c,__TSR_key:c}}}function Nv(){return(Math.random()+1).toString(36).substring(7)}const UL=!1;function Ju(e){return e[e.length-1]}function jL(e){return typeof e=="function"}function gi(e,t){return jL(e)?e(t):e}const HL=Object.prototype.hasOwnProperty,j1=Object.prototype.propertyIsEnumerable;function er(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=q1(e)&&q1(r);if(!i&&!(Uh(e)&&Uh(r)))return r;const c=i?e:H1(e);if(!c)return r;const l=i?r:H1(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!(!F1(n)||!n.hasOwnProperty("isPrototypeOf"))}function F1(e){return Object.prototype.toString.call(e)==="[object Object]"}function q1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wa(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||!wa(e[l],t[l],n)))return!1;return i===c}return!1}function Yc(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 FL(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 jc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function qL(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function V1(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 qL(t)}const ZA=["http:","https:","mailto:","tel:"];function jh(e){if(!e)return!1;try{const t=new URL(e);return!ZA.includes(t.protocol)}catch{return!1}}const VL={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},GL=/[&><\u2028\u2029]/g;function KL(e){return e.replace(GL,t=>VL[t])}function Ty(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=V1(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+V1(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function ZL(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var QL="Invariant failed";function go(e,t){if(!e)throw new Error(QL)}function Hh(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 Xc=0,Ta=1,Aa=2,ef=3,va=4,QA=5;function YL(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 zv(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]=Xc,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]=Aa,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=Ta,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=YL(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===U);if(B)_=B;else{const k=Iy(Ta,n.fullPath??n.from,D,N,U);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case ef:{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,U=O?D?O:O.toLowerCase():void 0,B=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===U);if(B)_=B;else{const k=Iy(ef,n.fullPath??n.from,D,N,U);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case Aa:{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,U=O?D?O:O.toLowerCase():void 0,B=Iy(Aa,n.fullPath??n.from,D,N,U);_=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=ba(n.fullPath??n.from);b.kind=QA,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=ba(n.fullPath??n.from);b.kind=va,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)Ep(e,t,d,f,i,c,l)}function Ay(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 pi(e){if(e.pathless)for(const t of e.pathless)pi(t);if(e.static)for(const t of e.static.values())pi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())pi(t);if(e.dynamic?.length){e.dynamic.sort(Ay);for(const t of e.dynamic)pi(t)}if(e.optional?.length){e.optional.sort(Ay);for(const t of e.optional)pi(t)}if(e.wildcard?.length){e.wildcard.sort(Ay);for(const t of e.wildcard)pi(t)}}function ba(e){return{kind:Xc,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 Iy(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 XL(e,t){const n=ba("/"),r=new Uint16Array(6);for(const i of e)Ep(!1,r,i,1,n,0);pi(n),t.masksTree=n,t.flatCache=Hh(1e3)}function WL(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Lv(e,t.masksTree);return t.flatCache.set(e,r),r}function JL(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=ba("/");const f=new Uint16Array(6);Ep(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return Lv(r,l,n)}function e6(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=Lv(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=s6(c.route)),t.matchCache.set(r,c),c}function t6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function n6(e,t=!1,n){const r=ba(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Ep(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=t6(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),pi(r),{processedTree:{segmentTree:r,singleCache:Hh(1e3),matchCache:Hh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function Lv(e,t,n=!1){const r=e.split("/"),i=o6(e,r,t,n);if(!i)return null;const[c]=YA(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function YA(e,t,n){const r=r6(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(!U)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(!U&&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(!U&&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(!U&&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 Ru(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===va)>(e.node.kind===va)||t.node.kind===va==(e.node.kind===va)&&t.depth>e.depth))):!0}function Ch(e){return Bv(e.filter(t=>t!==void 0).join("/"))}function Bv(e){return e.replace(/\/{2,}/g,"/")}function XA(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 WA(e){return ho(XA(e))}function Fh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function i6(e,t,n){return Fh(e,n)===Fh(t,n)}function a6({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&&Ju(f)==="";)f.pop();const g=t.split("/");for(let v=0,b=g.length;v1&&(Ju(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=zv(v,0,d);const b=d[0];if(b===Xc){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===Ta?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:b===Aa?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=Bv(h);const y=h||"/";return l&&r&&r.set(l,y),y}function c6(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 My(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):l6(r,n)}function Dy({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 d6(){const e=u6();if(!e)return null;const t=e.getItem(W0);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=gi(r,n)||n;try{e.setItem(W0,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const oh=d6(),h6=e=>e.state.__TSR_key||e.href;function p6(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 qh=!1;function m6({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];qh=!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)}}qh=!1}function g6(e,t){if(!oh||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!oh))return;e.isScrollRestorationSetup=!0,qh=!1;const r=e.options.getScrollRestorationKey||h6;window.history.scrollRestoration="manual";const i=c=>{if(qh||!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=p6(c.target)}const f=r(e.state.location);oh.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",f6(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})||(m6({storageKey:W0,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&oh.set(f=>(f[l]||={},f)))})}function y6(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 v6(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 ky(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function b6(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=ky(i):Array.isArray(c)?c.push(ky(i)):n[r]=[c,ky(i)]}return n}const S6=w6(JSON.parse),_6=E6(JSON.stringify,JSON.parse);function w6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=b6(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function E6(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=v6(i,r);return c?`?${c}`:""}}const sr="__root__";function $v(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&jh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${ZA.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 Th=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},xp=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Hc=(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},JA=(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,JA(e,t))},yi=(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:Hc(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):(JA(e,n),n)}},eI=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Cu=(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,yi(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,yi(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}))},tI=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!xp(e,t)&&(n.options.loader||n.options.beforeLoad||rI(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Th(e)},i);r._nonReactive.pendingTimeout=l}},x6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;tI(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&yi(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},R6=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Yc(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Cu(e,n,l,"PARSE_PARAMS"),f&&Cu(e,n,f,"VALIDATE_SEARCH"),tI(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,U=>({...U,isFetching:"beforeLoad",fetchCount:U.fetchCount+1,abortController:d})))},b=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,U=>({...U,isFetching:!1}))};if(!r.options.beforeLoad){Uu(()=>{v(),b()});return}i._nonReactive.beforeLoadPromise=Yc();const _={...Hc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=xp(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:U=>e.router.navigate({...U,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=U=>{if(U===void 0){Uu(()=>{v(),b()});return}(ir(U)||ks(U))&&(v(),Cu(e,n,U,"BEFORE_LOAD")),Uu(()=>{v(),e.updateMatch(t,B=>({...B,__beforeLoadContext:U})),b()})};let N;try{if(N=r.options.beforeLoad(O),jc(N))return v(),N.catch(U=>{Cu(e,n,U,"BEFORE_LOAD")}).then(D)}catch(U){v(),Cu(e,n,U,"BEFORE_LOAD")}D(N)},C6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>R6(e,n,t,i),f=()=>{if(eI(e,n))return;const d=x6(e,n,i);return jc(d)?d.then(l):l()};return c()},T6=(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}})},nI=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=Hc(e,n),y=xp(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}},G1=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(UL??e.router.isServer)||i.ssr===!0)&&sI(r);const c=r.options.loader?.(nI(e,t,n,r)),l=r.options.loader&&jc(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;yi(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:Hc(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:Hc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,ks(c)&&await r.options.notFoundComponent?.preload?.(),yi(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,yi(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:Hc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),yi(e,c,i)}},A6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!eI(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&&yi(e,y,g)}else{const y=Date.now()-h.updatedAt,g=xp(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(nI(e,n,t,l)):b,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Yc(),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 G1(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 G1(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 K1(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Th(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=T6(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=Th(t);jc(l)&&await l}catch(n){if(ks(n)&&!t.preload){const r=Th(t);throw jc(r)&&await r,n}if(ir(n))throw n}return t.matches}async function sI(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 oI){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 rI(e){for(const t of oI)if(e.options[t]?.preload)return!0;return!1}const oI=["component","errorComponent","pendingComponent","notFoundComponent"];function I6(e){return{input:({url:t})=>{for(const n of e)t=J0(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=iI(e[n],t);return t}}}function O6(e){const t=WA(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=Ch(["/",t,l.pathname]),l)}}function J0(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 iI(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 Ea(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 M6{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=c6(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=BL()),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=Hh(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=new zL(k6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),g6(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=WA(d);b&&b!=="/"&&v.push(O6({basepath:d})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:I6(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=n6(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&XL(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=J0(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:Ty(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:b,search:er(r?.search,v),hash:Ty(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)=>a6({base:n,to:Bv(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=>P6({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,gi(c.params,g)),_=Dy({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]:Z1(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:Ty(Dy({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,Ah(Q.options.validateSearch,{...K,...O}))}catch{}}),O=K}O=N6({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?gi(c.hash,l.hash):void 0,U=N?`#${N}`:"";let B=c.state===!0?l.state:c.state?gi(c.state,l.state):{};B=er(l.state,B);const k=`${A}${D}${U}`;let Z,se,le=!1;if(this.rewrite){const K=new URL(k,this.origin),Q=iI(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=ZL(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=WL(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,gi(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=wa(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=Yc(()=>{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=$h(f,{__TSR_index:n?g:g+1}),b=new URL(v.pathname,this.origin),_=J0(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(jh(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",...Ea({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Ea({resolvedLocation:h,location:d})}),await K1({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=[];Uu(()=>{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(Ea({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=sI,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)]);Uu(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await K1({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=JL(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!wa(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?wa(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??_6,parseSearch:t.parseSearch??S6}),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?Z1(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 V=Ah(v.options.validateSearch,{...ye})??void 0;return[{...ye,...V},{...fe,...V},void 0]}catch(V){let W=V;if(V instanceof Vh||(W=new Vh(V.message,{cause:V})),n?.throwOnError)throw W;return[ye,{},W]}})(),A=v.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=Dy({path:v.fullPath,params:c,decoder:this.pathParamsDecoder}),U=v.id+D+O,B=this.getMatch(U),k=this.state.matches.find(ye=>ye.routeId===v.id),Z=B?._strictParams??N;let se;if(!B)try{Q1(v,N,l,Z)}catch(ye){if(ks(ye)||ir(ye)?se=ye:se=new D6(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||rI(v)?"pending":"success";K={id:U,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:Yc()},__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=Ju(n),l={...t.search};for(const y of n)try{Object.assign(l,Ah(y.options.validateSearch,l))}catch{}const f=Ju(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{Q1(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class Vh extends Error{}class D6 extends Error{}function k6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Ah(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Vh("Async validation not supported");if(n.issues)throw new Vh(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 P6({pathname:e,routesById:t,processedTree:n}){const r={},i=ho(e);let c,l;const f=e6(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 N6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return z6(n)(e,t,r??!1)}function z6(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,...Ah(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:gi(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 Z1(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 Q1(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 L6="Error preloading route! ☝️";class aI{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=XA(c));const l=r?.id||c;let f=i?sr:Ch([this.parentRoute.id===sr?"":this.parentRoute.id,l]);c===sr&&(c="/"),f!==sr&&(f=Ch(["/",f]));const d=f===sr?"/":Ch([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=>$v({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 B6 extends aI{constructor(t){super(t)}}const $6="use",Y1=Pv[$6],ih=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Py(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 U6(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 j6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Uv(e){const t=e.errorComponent??jv;return $.jsx(H6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class H6 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 jv({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 F6({children:e,fallback:t=null}){return cI()?$.jsx(Qc.Fragment,{children:e}):$.jsx(Qc.Fragment,{children:t})}function cI(){return Qc.useSyncExternalStore(q6,()=>!0,()=>!1)}function q6(){return()=>{}}var Ny={exports:{}},zy={},Ly={exports:{}},By={};var X1;function V6(){if(X1)return By;X1=1;var e=ol();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 By.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,By}var W1;function lI(){return W1||(W1=1,Ly.exports=V6()),Ly.exports}var J1;function G6(){if(J1)return zy;J1=1;var e=ol(),t=lI();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 zy.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(U){if(!A){if(A=!0,O=U,U=v(U),b!==void 0&&x.hasValue){var B=x.value;if(b(B,U))return D=B}return D=U}if(B=D,r(O,U))return B;var k=v(U);return b!==void 0&&b(B,k)?(O=U,B):(O=U,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},zy}var eR;function K6(){return eR||(eR=1,Ny.exports=G6()),Ny.exports}var uI=K6();function Z6(e,t=r=>r,n={}){const r=n.equal??Q6;return uI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function Q6(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=tR(e);if(n.length!==tR(t).length)return!1;for(let r=0;r"u"?$y:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=$y,$y)}function Yn(e){const t=I.useContext(fI());return e?.warn,t}function un(e){const t=Yn({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return Z6(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 Rp=I.createContext(void 0),Y6=I.createContext(void 0);function kr(e){const t=I.useContext(e.from?Y6:Rp);return un({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 Hv(e){return kr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Fv(e){const{select:t,...n}=e;return kr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function qv(e){return kr({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 Vv(e){return kr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Cp(e){const t=Yn();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Uy={exports:{}},qn={};var nR;function X6(){if(nR)return qn;nR=1;var e=ol();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(),Uy.exports=X6(),Uy.exports}var Ii=dI();function W6(e,t){const n=Yn(),r=j6(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:U,onMouseLeave:B,onTouchStart:k,ignoreBlocker:Z,params:se,search:le,hash:K,state:Q,mask:ye,reloadDocument:fe,unsafeRelative:V,from:W,_fromLocation:j,...ve}=e,Te=cI(),P=un({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]),Re=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,Se=de.maskedLocation?de.maskedLocation.external:de.external,be=I.useMemo(()=>rB(Re,Se,n.history,C),[C,Se,Re,n.history]),Ye=I.useMemo(()=>{if(be?.external)return jh(be.href)?void 0:be.href;if(!oB(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),jh(f)?void 0:f}catch{}},[f,be]),He=un({select:gt=>{if(Ye)return!1;if(l?.exact){if(!i6(gt.location.pathname,de.pathname,n.basepath))return!1}else{const Bt=Fh(gt.location.pathname,n.basepath),$t=Fh(de.pathname,n.basepath);if(!(Bt.startsWith($t)&&(Bt.length===$t.length||Bt[$t.length]==="/")))return!1}return(l?.includeSearch??!0)&&!wa(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Te&>.location.hash===de.hash:!0}}),ht=He?gi(i,{})??J6:jy,Ft=He?jy:gi(c,{})??jy,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,Ve=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...ie}).catch(gt=>{console.warn(gt),console.warn(L6)})},[n,ie]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);U6(r,ut,sB,{disabled:!!C||Ne!=="viewport"}),I.useEffect(()=>{_e.current||!C&&Ne==="render"&&(Qe(),_e.current=!0)},[C,Qe,Ne]);const Be=gt=>{const Bt=gt.currentTarget.getAttribute("target"),$t=R!==void 0?R:Bt;if(!C&&!iB(gt)&&!gt.defaultPrevented&&(!$t||$t==="_self")&>.button===0){gt.preventDefault(),Ii.flushSync(()=>{Pt(!0)});const sn=n.subscribe("onResolved",()=>{sn(),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},...U&&{onMouseEnter:U},...B&&{onMouseLeave:B},...k&&{onTouchStart:k}};const Le=gt=>{C||Ne&&Qe()},nn=Le,it=gt=>{if(!(C||!Ne))if(!Ve)Qe();else{const Bt=gt.target;if(Tu.has(Bt))return;const $t=setTimeout(()=>{Tu.delete(Bt),Qe()},Ve);Tu.set(Bt,$t)}},Ss=gt=>{if(C||!Ne||!Ve)return;const Bt=gt.target,$t=Tu.get(Bt);$t&&(clearTimeout($t),Tu.delete(Bt))};return{...ve,...ht,...Ft,href:be?.href,ref:r,onClick:Au([D,Be]),onFocus:Au([N,Le]),onMouseEnter:Au([U,it]),onMouseLeave:Au([B,Ss]),onTouchStart:Au([k,nn]),disabled:!!C,target:R,...Fe&&{style:Fe},...oe&&{className:oe},...C&&eB,...He&&tB,...Te&&Ie&&nB}}const jy={},J6={className:"active"},eB={role:"link","aria-disabled":!0},tB={"data-status":"active","aria-current":"page"},nB={"data-transitioning":"transitioning"},Tu=new WeakMap,sB={rootMargin:"100px"},Au=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function rB(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function oB(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Ar=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=W6(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 iB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let aB=class extends aI{constructor(t){super(t),this.useMatch=n=>kr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>kr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Vv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>qv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Fv({...n,from:this.id}),this.useLoaderData=n=>Hv({...n,from:this.id}),this.useNavigate=()=>Cp({from:this.fullPath}),this.Link=Qc.forwardRef((n,r)=>$.jsx(Ar,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function cB(e){return new aB(e)}function lB(){return e=>fB(e)}class uB extends B6{constructor(t){super(t),this.useMatch=n=>kr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>kr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Vv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>qv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Fv({...n,from:this.id}),this.useLoaderData=n=>Hv({...n,from:this.id}),this.useNavigate=()=>Cp({from:this.fullPath}),this.Link=Qc.forwardRef((n,r)=>$.jsx(Ar,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function fB(e){return new uB(e)}function mn(e){return typeof e=="object"?new rR(e,{silent:!0}).createRoute(e):new rR(e,{silent:!0}).createRoute}class rR{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=cB(r);return i.isRoot=!1,i},this.silent=n?.silent}}class oR{constructor(t){this.useMatch=n=>kr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>kr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Vv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>qv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Fv({...n,from:this.options.id}),this.useLoaderData=n=>Hv({...n,from:this.options.id}),this.useNavigate=()=>{const n=Yn();return Cp({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function iR(e){return typeof e=="object"?new oR(e):t=>new oR({id:e,...t})}function Mn(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,FL(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(Y1)Y1(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function dB(){const e=Yn(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=un({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),l=Py(c),f=c||n||i,d=Py(f),h=c||i,y=Py(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]),ih(()=>{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]),ih(()=>{l&&!c&&e.emit({type:"onLoad",...Ea(e.state)})},[l,e,c]),ih(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...Ea(e.state)})},[h,y,e]),ih(()=>{if(d&&!f){const g=Ea(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&y6(e)}},[f,d,e]),null}function hB(e){const t=un({select:n=>`not-found-${n.location.pathname}-${n.status}`});return $.jsx(Uv,{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 pB(){return $.jsx("p",{children:"Not Found"})}function Bc(e){return $.jsx($.Fragment,{children:e.children})}function hI(e,t,n){return t.options.notFoundComponent?$.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?$.jsx(e.options.defaultNotFoundComponent,{...n}):$.jsx(pB,{})}function mB(){return Yn().isScrollRestoring,null}const pI=I.memo(function({matchId:t}){const n=Yn(),r=un({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:Bc,v=f?Uv:Bc,b=h?hB:Bc,_=un({select:C=>C.loadedAt}),x=un({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??Bc:Bc;return $.jsxs(R,{children:[$.jsx(Rp.Provider,{value:t,children:$.jsx(g,{fallback:l,children:$.jsx(v,{getResetKey:()=>_,errorComponent:f||jv,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(F6,{fallback:l,children:$.jsx(aR,{matchId:t})}):$.jsx(aR,{matchId:t})})})})}),x===sr&&n.options.scrollRestoration?$.jsxs($.Fragment,{children:[$.jsx(gB,{}),$.jsx(mB,{})]}):null]})});function gB(){const e=Yn(),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",...Ea(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const aR=I.memo(function({matchId:t}){const n=Yn(),{match:r,key:i,routeId:c}=un({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(mI,{})},[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=Yc();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)),hI(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}),mI=I.memo(function(){const t=Yn(),n=I.useContext(Rp),r=un({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=un({select:h=>{const g=h.matches.find(v=>v.id===n);return go(g),g.globalNotFound}}),l=un({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 hI(t,i,void 0);if(!l)return null;const d=$.jsx(pI,{matchId:l});return r===sr?$.jsx(I.Suspense,{fallback:f,children:d}):d});function yB(){const e=Yn(),n=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=n?$.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?Bc:I.Suspense,c=$.jsxs(i,{fallback:r,children:[$.jsx(dB,{}),$.jsx(vB,{})]});return e.options.InnerWrap?$.jsx(e.options.InnerWrap,{children:c}):c}function vB(){const e=Yn(),t=un({select:i=>i.matches[0]?.id}),n=un({select:i=>i.loadedAt}),r=t?$.jsx(pI,{matchId:t}):null;return $.jsx(Rp.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:$.jsx(Uv,{getResetKey:()=>n,errorComponent:jv,onCatch:i=>{i.message||i.toString()},children:r})})}const bB=e=>new SB(e);class SB extends M6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=mn,globalThis.createLazyFileRoute=iR):typeof window<"u"&&(window.createFileRoute=mn,window.createLazyFileRoute=iR);function _B({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=fI(),i=$.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?$.jsx(e.options.Wrap,{children:i}):i}function wB({router:e,...t}){return $.jsx(_B,{router:e,...t,children:$.jsx(yB,{})})}function EB(e){return un({select:t=>e?.select?e.select(t.location):t.location})}function xB({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(RB,{attrs:t,children:n});default:return null}}function RB({attrs:e,children:t}){Yn(),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 CB=()=>{const e=Yn(),t=e.options.ssr?.nonce,n=un({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:KL(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=un({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=un({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=un({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=un({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 TB([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function TB(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function AB(){const e=CB(),n=Yn().options.ssr?.nonce;return $.jsx($.Fragment,{children:e.map(r=>I.createElement(xB,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var Hy={exports:{}},Iu={},Fy={exports:{}},qy={};var cR;function IB(){return cR||(cR=1,(function(e){function t(V,W){var j=V.length;V.push(W);e:for(;0>>1,Te=V[ve];if(0>>1;vei(ie,j))dei(Re,ie)?(V[ve]=Re,V[de]=j,ve=de):(V[ve]=ie,V[ne]=j,ve=ne);else if(dei(Re,j))V[ve]=Re,V[de]=j,ve=de;else break e}}return W}function i(V,W){var j=V.sortIndex-W.sortIndex;return j!==0?j:V.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(V){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=V)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function N(V){if(x=!1,D(V),!_)if(n(d)!==null)_=!0,U||(U=!0,K());else{var W=n(h);W!==null&&fe(N,W.startTime-V)}}var U=!1,B=-1,k=5,Z=-1;function se(){return R?!0:!(e.unstable_now()-ZV&&se());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var Te=ve(g.expirationTime<=V);if(V=e.unstable_now(),typeof Te=="function"){g.callback=Te,D(V),W=!0;break t}g===n(d)&&r(d),D(V)}else r(d);g=n(d)}if(g!==null)W=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-V),W=!1}}break e}finally{g=null,v=j,b=!1}W=void 0}}finally{W?K():U=!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(V,W){B=C(function(){V(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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125ve?(V.sortIndex=j,t(h,V),n(d)===null&&V===n(h)&&(x?(A(B),B=-1):x=!0,fe(N,j-ve))):(V.sortIndex=Te,t(d,V),_||b||(_=!0,U||(U=!0,K()))),V},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(V){var W=v;return function(){var j=v;v=W;try{return V.apply(this,arguments)}finally{v=j}}}})(qy)),qy}var lR;function OB(){return lR||(lR=1,Fy.exports=IB()),Fy.exports}var uR;function MB(){if(uR)return Iu;uR=1;var e=OB(),t=ol(),n=dI();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),Re=P(null),Se=P(null),be=P(null);function Ye(s,o){switch(ie(Se,o),ie(Re,s),ie(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?Qx(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=Qx(o),s=Yx(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(Re),ne(Se)}function ht(s){s.memoizedState!==null&&ie(be,s);var o=de.current,a=Yx(o,s.type);o!==a&&(ie(Re,s),ie(de,a))}function Ft(s){Re.current===s&&(ne(de),ne(Re)),be.current===s&&(ne(be),Su._currentValue=j)}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)":-1p||z[u]!==Y[p]){var ie=` -`+z[u].replace(" at new "," at ");return s.displayName&&ie.includes("")&&(ie=ie.replace("",s.displayName)),ie}while(1<=u&&0<=p);break}}}finally{Pt=!1,Error.prepareStackTrace=a}return(a=s?s.displayName||s.name:"")?Ae(a):""}function Pe(s,o){switch(s.tag){case 26:case 27:case 5:return Ae(s.type);case 16:return Ae("Lazy");case 13:return s.child!==o&&o!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return _e(s.type,!1);case 11:return _e(s.type.render,!1);case 1:return _e(s.type,!0);case 31:return Ae("Activity");default:return""}}function Ve(s){try{var o="",a=null;do o+=Pe(s,a),a=s,s=s.return;while(s);return o}catch(u){return` +`+oe+s+Fe}var Pt=!1;function _e(s,o){if(!s||Pt)return"";Pt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(o){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(re){var J=re}Reflect.construct(s,[],pe)}else{try{pe.call()}catch(re){J=re}s.call(pe.prototype)}}else{try{throw Error()}catch(re){J=re}(pe=s())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),w=m[0],T=m[1];if(w&&T){var z=w.split(` +`),X=T.split(` +`);for(p=u=0;up||z[u]!==X[p]){var ae=` +`+z[u].replace(" at new "," at ");return s.displayName&&ae.includes("")&&(ae=ae.replace("",s.displayName)),ae}while(1<=u&&0<=p);break}}}finally{Pt=!1,Error.prepareStackTrace=a}return(a=s?s.displayName||s.name:"")?Ie(a):""}function Ne(s,o){switch(s.tag){case 26:case 27:case 5:return Ie(s.type);case 16:return Ie("Lazy");case 13:return s.child!==o&&o!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return _e(s.type,!1);case 11:return _e(s.type.render,!1);case 1:return _e(s.type,!0);case 31:return Ie("Activity");default:return""}}function Ve(s){try{var o="",a=null;do o+=Ne(s,a),a=s,s=s.return;while(s);return o}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var Qe=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,tn=e.unstable_requestPaint,it=e.unstable_now,vs=e.unstable_getCurrentPriorityLevel,gt=e.unstable_ImmediatePriority,Bt=e.unstable_UserBlockingPriority,$t=e.unstable_NormalPriority,nn=e.unstable_LowPriority,bs=e.unstable_IdlePriority,Ls=e.log,af=e.unstable_setDisableYieldValue,_o=null,jn=null;function cr(s){if(typeof Ls=="function"&&af(s),jn&&typeof jn.setStrictMode=="function")try{jn.setStrictMode(_o,s)}catch{}}var Hn=Math.clz32?Math.clz32:Bs,Kt=Math.log,Fn=Math.LN2;function Bs(s){return s>>>=0,s===0?32:31-(Kt(s)/Fn|0)|0}var Dn=256,lr=262144,ur=4194304;function $s(s){var o=s&42;if(o!==0)return o;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function wo(s,o,a){var u=s.pendingLanes;if(u===0)return 0;var p=0,m=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var T=u&134217727;return T!==0?(u=T&~m,u!==0?p=$s(u):(w&=T,w!==0?p=$s(w):a||(a=T&~s,a!==0&&(p=$s(a))))):(T=u&~m,T!==0?p=$s(T):w!==0?p=$s(w):a||(a=u&~s,a!==0&&(p=$s(a)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:p}function Eo(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function Kp(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cf(){var s=ur;return ur<<=1,(ur&62914560)===0&&(ur=4194304),s}function Yc(s){for(var o=[],a=0;31>a;a++)o.push(s);return o}function Ei(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Xc(s,o,a,u,p,m){var w=s.pendingLanes;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=a,s.entangledLanes&=a,s.errorRecoveryDisabledLanes&=a,s.shellSuspendCounter=0;var T=s.entanglements,z=s.expirationTimes,Y=s.hiddenUpdates;for(a=w&~a;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var TN=/[\n"\\]/g;function js(s){return s.replace(TN,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Xp(s,o,a,u,p,m,w,T){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+Us(o)):s.value!==""+Us(o)&&(s.value=""+Us(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?Wp(s,w,Us(o)):a!=null?Wp(s,w,Us(a)):u!=null&&s.removeAttribute("value"),p==null&&m!=null&&(s.defaultChecked=!!m),p!=null&&(s.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+Us(T):s.removeAttribute("name")}function i_(s,o,a,u,p,m,w,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(s.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){Yp(s);return}a=a!=null?""+Us(a):"",o=o!=null?""+Us(o):a,T||o===s.value||(s.value=o),s.defaultValue=o}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=T?s.checked:!!u,s.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Yp(s)}function Wp(s,o,a){o==="number"&&mf(s.ownerDocument)===s||s.defaultValue===""+a||(s.defaultValue=""+a)}function Ca(s,o,a,u){if(s=s.options,o){o={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sm=!1;if(Ur)try{var sl={};Object.defineProperty(sl,"passive",{get:function(){sm=!0}}),window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{sm=!1}var Ro=null,rm=null,yf=null;function h_(){if(yf)return yf;var s,o=rm,a=o.length,u,p="value"in Ro?Ro.value:Ro.textContent,m=p.length;for(s=0;s=il),b_=" ",S_=!1;function __(s,o){switch(s){case"keyup":return tz.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w_(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Oa=!1;function sz(s,o){switch(s){case"compositionend":return w_(o);case"keypress":return o.which!==32?null:(S_=!0,b_);case"textInput":return s=o.data,s===b_&&S_?null:s;default:return null}}function rz(s,o){if(Oa)return s==="compositionend"||!lm&&__(s,o)?(s=h_(),yf=rm=Ro=null,Oa=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-s};s=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=O_(a)}}function D_(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?D_(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function k_(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=mf(s.document);o instanceof s.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)s=o.contentWindow;else break;o=mf(s.document)}return o}function dm(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var dz=Ur&&"documentMode"in document&&11>=document.documentMode,Ma=null,hm=null,ul=null,pm=!1;function P_(s,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;pm||Ma==null||Ma!==mf(u)||(u=Ma,"selectionStart"in u&&dm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ul&&ll(ul,u)||(ul=u,u=ud(hm,"onSelect"),0>=w,p-=w,br=1<<32-Hn(o)+p|a<Je?(ct=ke,ke=null):ct=ke.sibling;var vt=W(V,ke,Q[Je],he);if(vt===null){ke===null&&(ke=ct);break}s&&ke&&vt.alternate===null&&o(V,ke),F=m(vt,F,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt,ke=ct}if(Je===Q.length)return a(V,ke),ft&&Hr(V,Je),ze;if(ke===null){for(;JeJe?(ct=ke,ke=null):ct=ke.sibling;var Ko=W(V,ke,vt.value,he);if(Ko===null){ke===null&&(ke=ct);break}s&&ke&&Ko.alternate===null&&o(V,ke),F=m(Ko,F,Je),yt===null?ze=Ko:yt.sibling=Ko,yt=Ko,ke=ct}if(vt.done)return a(V,ke),ft&&Hr(V,Je),ze;if(ke===null){for(;!vt.done;Je++,vt=Q.next())vt=pe(V,vt.value,he),vt!==null&&(F=m(vt,F,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return ft&&Hr(V,Je),ze}for(ke=u(ke);!vt.done;Je++,vt=Q.next())vt=se(ke,V,Je,vt.value,he),vt!==null&&(s&&vt.alternate!==null&&ke.delete(vt.key===null?Je:vt.key),F=m(vt,F,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return s&&ke.forEach(function(D4){return o(V,D4)}),ft&&Hr(V,Je),ze}function It(V,F,Q,he){if(typeof Q=="object"&&Q!==null&&Q.type===x&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:e:{for(var ze=Q.key;F!==null;){if(F.key===ze){if(ze=Q.type,ze===x){if(F.tag===7){a(V,F.sibling),he=p(F,Q.props.children),he.return=V,V=he;break e}}else if(F.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===k&&Pi(ze)===F.type){a(V,F.sibling),he=p(F,Q.props),gl(he,Q),he.return=V,V=he;break e}a(V,F);break}else o(V,F);F=F.sibling}Q.type===x?(he=Ii(Q.props.children,V.mode,he,Q.key),he.return=V,V=he):(he=Tf(Q.type,Q.key,Q.props,null,V.mode,he),gl(he,Q),he.return=V,V=he)}return w(V);case _:e:{for(ze=Q.key;F!==null;){if(F.key===ze)if(F.tag===4&&F.stateNode.containerInfo===Q.containerInfo&&F.stateNode.implementation===Q.implementation){a(V,F.sibling),he=p(F,Q.children||[]),he.return=V,V=he;break e}else{a(V,F);break}else o(V,F);F=F.sibling}he=_m(Q,V.mode,he),he.return=V,V=he}return w(V);case k:return Q=Pi(Q),It(V,F,Q,he)}if(fe(Q))return Ie(V,F,Q,he);if(G(Q)){if(ze=G(Q),typeof ze!="function")throw Error(r(150));return Q=ze.call(Q),Ue(V,F,Q,he)}if(typeof Q.then=="function")return It(V,F,Pf(Q),he);if(Q.$$typeof===O)return It(V,F,Of(V,Q),he);Nf(V,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,F!==null&&F.tag===6?(a(V,F.sibling),he=p(F,Q),he.return=V,V=he):(a(V,F),he=Sm(Q,V.mode,he),he.return=V,V=he),w(V)):a(V,F)}return function(V,F,Q,he){try{ml=0;var ze=It(V,F,Q,he);return Ha=null,ze}catch(ke){if(ke===ja||ke===Df)throw ke;var yt=_s(29,ke,null,V.mode);return yt.lanes=he,yt.return=V,yt}}}var zi=sw(!0),rw=sw(!1),Oo=!1;function km(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pm(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Mo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Do(s,o,a){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,o=Cf(s),j_(s,null,a),o}return Rf(s,u,o,a),Cf(s)}function yl(s,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,lf(s,a)}}function Nm(s,o){var a=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?p=m=o:m=m.next=o}else p=m=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=o:s.next=o,a.lastBaseUpdate=o}var zm=!1;function vl(){if(zm){var s=Ua;if(s!==null)throw s}}function bl(s,o,a,u){zm=!1;var p=s.updateQueue;Oo=!1;var m=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var z=T,Y=z.next;z.next=null,w===null?m=Y:w.next=Y,w=z;var ie=s.alternate;ie!==null&&(ie=ie.updateQueue,T=ie.lastBaseUpdate,T!==w&&(T===null?ie.firstBaseUpdate=Y:T.next=Y,ie.lastBaseUpdate=z))}if(m!==null){var pe=p.baseState;w=0,ie=Y=z=null,T=m;do{var W=T.lane&-536870913,se=W!==T.lane;if(se?(at&W)===W:(u&W)===W){W!==0&&W===$a&&(zm=!0),ie!==null&&(ie=ie.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Ie=s,Ue=T;W=o;var It=a;switch(Ue.tag){case 1:if(Ie=Ue.payload,typeof Ie=="function"){pe=Ie.call(It,pe,W);break e}pe=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Ue.payload,W=typeof Ie=="function"?Ie.call(It,pe,W):Ie,W==null)break e;pe=g({},pe,W);break e;case 2:Oo=!0}}W=T.callback,W!==null&&(s.flags|=64,se&&(s.flags|=8192),se=p.callbacks,se===null?p.callbacks=[W]:se.push(W))}else se={lane:W,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ie===null?(Y=ie=se,z=pe):ie=ie.next=se,w|=W;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;se=T,T=se.next,se.next=null,p.lastBaseUpdate=se,p.shared.pending=null}}while(!0);ie===null&&(z=pe),p.baseState=z,p.firstBaseUpdate=Y,p.lastBaseUpdate=ie,m===null&&(p.shared.lanes=0),Lo|=w,s.lanes=w,s.memoizedState=pe}}function ow(s,o){if(typeof s!="function")throw Error(r(191,s));s.call(o)}function iw(s,o){var a=s.callbacks;if(a!==null)for(s.callbacks=null,s=0;sm?m:8;var w=q.T,T={};q.T=T,tg(s,!1,o,a);try{var z=p(),Y=q.S;if(Y!==null&&Y(T,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ie=_z(z,u);wl(s,o,ie,Cs(s))}else wl(s,o,u,Cs(s))}catch(pe){wl(s,o,{then:function(){},status:"rejected",reason:pe},Cs())}finally{X.p=m,w!==null&&T.types!==null&&(w.types=T.types),q.T=w}}function Tz(){}function Jm(s,o,a,u){if(s.tag!==5)throw Error(r(476));var p=Bw(s).queue;Lw(s,p,o,j,a===null?Tz:function(){return $w(s),a(u)})}function Bw(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:j,baseState:j,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:j},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:a},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function $w(s){var o=Bw(s);o.next===null&&(o=s.alternate.memoizedState),wl(s,o.next.queue,{},Cs())}function eg(){return Nn($l)}function Uw(){return Xt().memoizedState}function jw(){return Xt().memoizedState}function Az(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var a=Cs();s=Mo(a);var u=Do(o,s,a);u!==null&&(us(u,o,a),yl(u,o,a)),o={cache:Im()},s.payload=o;return}o=o.return}}function Iz(s,o,a){var u=Cs();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vf(s)?Fw(o,a):(a=vm(s,o,a,u),a!==null&&(us(a,s,u),qw(a,o,u)))}function Hw(s,o,a){var u=Cs();wl(s,o,a,u)}function wl(s,o,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vf(s))Fw(o,p);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var w=o.lastRenderedState,T=m(w,a);if(p.hasEagerState=!0,p.eagerState=T,Ss(T,w))return Rf(s,o,p,0),Dt===null&&xf(),!1}catch{}if(a=vm(s,o,p,u),a!==null)return us(a,s,u),qw(a,o,u),!0}return!1}function tg(s,o,a,u){if(u={lane:2,revertLane:kg(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Vf(s)){if(o)throw Error(r(479))}else o=vm(s,a,u,2),o!==null&&us(o,s,2)}function Vf(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function Fw(s,o){qa=Bf=!0;var a=s.pending;a===null?o.next=o:(o.next=a.next,a.next=o),s.pending=o}function qw(s,o,a){if((a&4194048)!==0){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,lf(s,a)}}var El={readContext:Nn,use:jf,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};El.useEffectEvent=Zt;var Vw={readContext:Nn,use:jf,useCallback:function(s,o){return Xn().memoizedState=[s,o===void 0?null:o],s},useContext:Nn,useEffect:Aw,useImperativeHandle:function(s,o,a){a=a!=null?a.concat([s]):null,Ff(4194308,4,Dw.bind(null,o,s),a)},useLayoutEffect:function(s,o){return Ff(4194308,4,s,o)},useInsertionEffect:function(s,o){Ff(4,2,s,o)},useMemo:function(s,o){var a=Xn();o=o===void 0?null:o;var u=s();if(Li){cr(!0);try{s()}finally{cr(!1)}}return a.memoizedState=[u,o],u},useReducer:function(s,o,a){var u=Xn();if(a!==void 0){var p=a(o);if(Li){cr(!0);try{a(o)}finally{cr(!1)}}}else p=o;return u.memoizedState=u.baseState=p,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:p},u.queue=s,s=s.dispatch=Iz.bind(null,Xe,s),[u.memoizedState,s]},useRef:function(s){var o=Xn();return s={current:s},o.memoizedState=s},useState:function(s){s=Zm(s);var o=s.queue,a=Hw.bind(null,Xe,o);return o.dispatch=a,[s.memoizedState,a]},useDebugValue:Xm,useDeferredValue:function(s,o){var a=Xn();return Wm(a,s,o)},useTransition:function(){var s=Zm(!1);return s=Lw.bind(null,Xe,s.queue,!0,!1),Xn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,a){var u=Xe,p=Xn();if(ft){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),Dt===null)throw Error(r(349));(at&127)!==0||dw(u,o,a)}p.memoizedState=a;var m={value:a,getSnapshot:o};return p.queue=m,Aw(pw.bind(null,u,m,s),[s]),u.flags|=2048,Ga(9,{destroy:void 0},hw.bind(null,u,m,a,o),null),a},useId:function(){var s=Xn(),o=Dt.identifierPrefix;if(ft){var a=Sr,u=br;a=(u&~(1<<32-Hn(u)-1)).toString(32)+a,o="_"+o+"R_"+a,a=$f++,0<\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}m[kn]=o,m[rs]=u;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)m.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=m;e:switch(Ln(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Zr(o)}}return Lt(o),mg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,a),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==u&&Zr(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(s=Se.current,La(o)){if(s=o.stateNode,a=o.memoizedProps,u=null,p=Pn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}s[kn]=o,s=!!(s.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||ux(s.nodeValue,a)),s||Ao(o,!0)}else s=fd(s).createTextNode(u),s[kn]=o,o.stateNode=s}return Lt(o),null;case 31:if(a=o.memoizedState,s===null||s.memoizedState!==null){if(u=La(o),a!==null){if(s===null){if(!u)throw Error(r(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[kn]=o}else Oi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),s=!1}else a=Rm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=a),s=!0;if(!s)return o.flags&256?(Es(o),o):(Es(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Lt(o),null;case 13:if(u=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(p=La(o),u!==null&&u.dehydrated!==null){if(s===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[kn]=o}else Oi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),p=!1}else p=Rm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Es(o),o):(Es(o),null)}return Es(o),(o.flags&128)!==0?(o.lanes=a,o):(a=u!==null,s=s!==null&&s.memoizedState!==null,a&&(u=o.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==s&&a&&(o.child.flags|=8192),Yf(o,o.updateQueue),Lt(o),null);case 4:return He(),s===null&&Lg(o.stateNode.containerInfo),Lt(o),null;case 10:return qr(o.type),Lt(o),null;case 19:if(te(Yt),u=o.memoizedState,u===null)return Lt(o),null;if(p=(o.flags&128)!==0,m=u.rendering,m===null)if(p)Rl(u,!1);else{if(Qt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(m=Lf(s),m!==null){for(o.flags|=128,Rl(u,!1),s=m.updateQueue,o.updateQueue=s,Yf(o,s),o.subtreeFlags=0,s=a,a=o.child;a!==null;)H_(a,s),a=a.sibling;return oe(Yt,Yt.current&1|2),ft&&Hr(o,u.treeForkCount),o.child}s=s.sibling}u.tail!==null&&it()>td&&(o.flags|=128,p=!0,Rl(u,!1),o.lanes=4194304)}else{if(!p)if(s=Lf(m),s!==null){if(o.flags|=128,p=!0,s=s.updateQueue,o.updateQueue=s,Yf(o,s),Rl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ft)return Lt(o),null}else 2*it()-u.renderingStartTime>td&&a!==536870912&&(o.flags|=128,p=!0,Rl(u,!1),o.lanes=4194304);u.isBackwards?(m.sibling=o.child,o.child=m):(s=u.last,s!==null?s.sibling=m:o.child=m,u.last=m)}return u.tail!==null?(s=u.tail,u.rendering=s,u.tail=s.sibling,u.renderingStartTime=it(),s.sibling=null,a=Yt.current,oe(Yt,p?a&1|2:a&1),ft&&Hr(o,u.treeForkCount),s):(Lt(o),null);case 22:case 23:return Es(o),Bm(),u=o.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(a&536870912)!==0&&(o.flags&128)===0&&(Lt(o),o.subtreeFlags&6&&(o.flags|=8192)):Lt(o),a=o.updateQueue,a!==null&&Yf(o,a.retryQueue),a=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==a&&(o.flags|=2048),s!==null&&te(ki),null;case 24:return a=null,s!==null&&(a=s.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),qr(sn),Lt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function Pz(s,o){switch(Em(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return qr(sn),He(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Ht(o),null;case 31:if(o.memoizedState!==null){if(Es(o),o.alternate===null)throw Error(r(340));Oi()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Es(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Oi()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return te(Yt),null;case 4:return He(),null;case 10:return qr(o.type),null;case 22:case 23:return Es(o),Bm(),s!==null&&te(ki),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return qr(sn),null;case 25:return null;default:return null}}function mE(s,o){switch(Em(o),o.tag){case 3:qr(sn),He();break;case 26:case 27:case 5:Ht(o);break;case 4:He();break;case 31:o.memoizedState!==null&&Es(o);break;case 13:Es(o);break;case 19:te(Yt);break;case 10:qr(o.type);break;case 22:case 23:Es(o),Bm(),s!==null&&te(ki);break;case 24:qr(sn)}}function Cl(s,o){try{var a=o.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&s)===s){u=void 0;var m=a.create,w=a.inst;u=m(),w.destroy=u}a=a.next}while(a!==p)}}catch(T){xt(o,o.return,T)}}function No(s,o,a){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&s)===s){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=o;var z=a,Y=T;try{Y()}catch(ie){xt(p,z,ie)}}}u=u.next}while(u!==m)}}catch(ie){xt(o,o.return,ie)}}function gE(s){var o=s.updateQueue;if(o!==null){var a=s.stateNode;try{iw(o,a)}catch(u){xt(s,s.return,u)}}}function yE(s,o,a){a.props=Bi(s.type,s.memoizedProps),a.state=s.memoizedState;try{a.componentWillUnmount()}catch(u){xt(s,o,u)}}function Tl(s,o){try{var a=s.ref;if(a!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof a=="function"?s.refCleanup=a(u):a.current=u}}catch(p){xt(s,o,p)}}function _r(s,o){var a=s.ref,u=s.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){xt(s,o,p)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){xt(s,o,p)}else a.current=null}function vE(s){var o=s.type,a=s.memoizedProps,u=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){xt(s,s.return,p)}}function gg(s,o,a){try{var u=s.stateNode;n4(u,s.type,a,o),u[rs]=o}catch(p){xt(s,s.return,p)}}function bE(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ho(s.type)||s.tag===4}function yg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||bE(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ho(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function vg(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(s,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(s),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=$r));else if(u!==4&&(u===27&&Ho(s.type)&&(a=s.stateNode,o=null),s=s.child,s!==null))for(vg(s,o,a),s=s.sibling;s!==null;)vg(s,o,a),s=s.sibling}function Xf(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?a.insertBefore(s,o):a.appendChild(s);else if(u!==4&&(u===27&&Ho(s.type)&&(a=s.stateNode),s=s.child,s!==null))for(Xf(s,o,a),s=s.sibling;s!==null;)Xf(s,o,a),s=s.sibling}function SE(s){var o=s.stateNode,a=s.memoizedProps;try{for(var u=s.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Ln(o,u,a),o[kn]=s,o[rs]=a}catch(m){xt(s,s.return,m)}}var Qr=!1,an=!1,bg=!1,_E=typeof WeakSet=="function"?WeakSet:Set,Rn=null;function Nz(s,o){if(s=s.containerInfo,Ug=vd,s=k_(s),dm(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,T=-1,z=-1,Y=0,ie=0,pe=s,W=null;t:for(;;){for(var se;pe!==a||p!==0&&pe.nodeType!==3||(T=w+p),pe!==m||u!==0&&pe.nodeType!==3||(z=w+u),pe.nodeType===3&&(w+=pe.nodeValue.length),(se=pe.firstChild)!==null;)W=pe,pe=se;for(;;){if(pe===s)break t;if(W===a&&++Y===p&&(T=w),W===m&&++ie===u&&(z=w),(se=pe.nextSibling)!==null)break;pe=W,W=pe.parentNode}pe=se}a=T===-1||z===-1?null:{start:T,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(jg={focusedElem:s,selectionRange:a},vd=!1,Rn=o;Rn!==null;)if(o=Rn,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Rn=s;else for(;Rn!==null;){switch(o=Rn,m=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(a=0;a title"))),Ln(m,u,a),m[kn]=s,xn(m),u=m;break e;case"link":var w=Tx("link","href",p).get(u+(a.href||""));if(w){for(var T=0;TIt&&(w=It,It=Ue,Ue=w);var V=M_(T,Ue),F=M_(T,It);if(V&&F&&(se.rangeCount!==1||se.anchorNode!==V.node||se.anchorOffset!==V.offset||se.focusNode!==F.node||se.focusOffset!==F.offset)){var Q=pe.createRange();Q.setStart(V.node,V.offset),se.removeAllRanges(),Ue>It?(se.addRange(Q),se.extend(F.node,F.offset)):(Q.setEnd(F.node,F.offset),se.addRange(Q))}}}}for(pe=[],se=T;se=se.parentNode;)se.nodeType===1&&pe.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;Ta?32:a,q.T=null,a=Cg,Cg=null;var m=$o,w=eo;if(vn=0,Xa=$o=null,eo=0,(St&6)!==0)throw Error(r(331));var T=St;if(St|=4,DE(m.current),IE(m,m.current,w,a),St=T,kl(0,!1),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(_o,m)}catch{}return!0}finally{X.p=p,q.T=u,YE(s,o)}}function WE(s,o,a){o=Fs(a,o),o=og(s.stateNode,o,2),s=Do(s,o,2),s!==null&&(Ei(s,2),wr(s))}function xt(s,o,a){if(s.tag===3)WE(s,s,a);else for(;o!==null;){if(o.tag===3){WE(o,s,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Bo===null||!Bo.has(u))){s=Fs(a,s),a=Jw(2),u=Do(o,a,2),u!==null&&(eE(a,u,o,s),Ei(u,2),wr(u));break}}o=o.return}}function Og(s,o,a){var u=s.pingCache;if(u===null){u=s.pingCache=new Bz;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(wg=!0,p.add(a),s=Fz.bind(null,s,o,a),o.then(s,s))}function Fz(s,o,a){var u=s.pingCache;u!==null&&u.delete(o),s.pingedLanes|=s.suspendedLanes&a,s.warmLanes&=~a,Dt===s&&(at&a)===a&&(Qt===4||Qt===3&&(at&62914560)===at&&300>it()-ed?(St&2)===0&&Wa(s,0):Eg|=a,Ya===at&&(Ya=0)),wr(s)}function JE(s,o){o===0&&(o=cf()),s=Ai(s,o),s!==null&&(Ei(s,o),wr(s))}function qz(s){var o=s.memoizedState,a=0;o!==null&&(a=o.retryLane),JE(s,a)}function Vz(s,o){var a=0;switch(s.tag){case 31:case 13:var u=s.stateNode,p=s.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),JE(s,a)}function Gz(s,o){return ut(s,o)}var ad=null,ec=null,Mg=!1,cd=!1,Dg=!1,jo=0;function wr(s){s!==ec&&s.next===null&&(ec===null?ad=ec=s:ec=ec.next=s),cd=!0,Mg||(Mg=!0,Zz())}function kl(s,o){if(!Dg&&cd){Dg=!0;do for(var a=!1,u=ad;u!==null;){if(s!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var w=u.suspendedLanes,T=u.pingedLanes;m=(1<<31-Hn(42|s)+1)-1,m&=p&~(w&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,sx(u,m))}else m=at,m=wo(u,u===Dt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Eo(u,m)||(a=!0,sx(u,m));u=u.next}while(a);Dg=!1}}function Kz(){ex()}function ex(){cd=Mg=!1;var s=0;jo!==0&&r4()&&(s=jo);for(var o=it(),a=null,u=ad;u!==null;){var p=u.next,m=tx(u,o);m===0?(u.next=null,a===null?ad=p:a.next=p,p===null&&(ec=a)):(a=u,(s!==0||(m&3)!==0)&&(cd=!0)),u=p}vn!==0&&vn!==5||kl(s),jo!==0&&(jo=0)}function tx(s,o){for(var a=s.suspendedLanes,u=s.pingedLanes,p=s.expirationTimes,m=s.pendingLanes&-62914561;0T)break;var ie=z.transferSize,pe=z.initiatorType;ie&&fx(pe)&&(z=z.responseEnd,w+=ie*(z"u"?null:document;function Ex(s,o,a){var u=tc;if(u&&typeof o=="string"&&o){var p=js(o);p='link[rel="'+s+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),wx.has(p)||(wx.add(p),s={rel:s,crossOrigin:a,href:o},u.querySelector(p)===null&&(o=u.createElement("link"),Ln(o,"link",s),xn(o),u.head.appendChild(o)))}}function h4(s){to.D(s),Ex("dns-prefetch",s,null)}function p4(s,o){to.C(s,o),Ex("preconnect",s,o)}function m4(s,o,a){to.L(s,o,a);var u=tc;if(u&&s&&o){var p='link[rel="preload"][as="'+js(o)+'"]';o==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+js(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+js(a.imageSizes)+'"]')):p+='[href="'+js(s)+'"]';var m=p;switch(o){case"style":m=nc(s);break;case"script":m=sc(s)}Qs.has(m)||(s=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:s,as:o},a),Qs.set(m,s),u.querySelector(p)!==null||o==="style"&&u.querySelector(Ll(m))||o==="script"&&u.querySelector(Bl(m))||(o=u.createElement("link"),Ln(o,"link",s),xn(o),u.head.appendChild(o)))}}function g4(s,o){to.m(s,o);var a=tc;if(a&&s){var u=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+js(u)+'"][href="'+js(s)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=sc(s)}if(!Qs.has(m)&&(s=g({rel:"modulepreload",href:s},o),Qs.set(m,s),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bl(m)))return}u=a.createElement("link"),Ln(u,"link",s),xn(u),a.head.appendChild(u)}}}function y4(s,o,a){to.S(s,o,a);var u=tc;if(u&&s){var p=xa(u).hoistableStyles,m=nc(s);o=o||"default";var w=p.get(m);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(Ll(m)))T.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":o},a),(a=Qs.get(m))&&Zg(s,a);var z=w=u.createElement("link");xn(z),Ln(z,"link",s),z._p=new Promise(function(Y,ie){z.onload=Y,z.onerror=ie}),z.addEventListener("load",function(){T.loading|=1}),z.addEventListener("error",function(){T.loading|=2}),T.loading|=4,hd(w,o,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(m,w)}}}function v4(s,o){to.X(s,o);var a=tc;if(a&&s){var u=xa(a).hoistableScripts,p=sc(s),m=u.get(p);m||(m=a.querySelector(Bl(p)),m||(s=g({src:s,async:!0},o),(o=Qs.get(p))&&Qg(s,o),m=a.createElement("script"),xn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function b4(s,o){to.M(s,o);var a=tc;if(a&&s){var u=xa(a).hoistableScripts,p=sc(s),m=u.get(p);m||(m=a.querySelector(Bl(p)),m||(s=g({src:s,async:!0,type:"module"},o),(o=Qs.get(p))&&Qg(s,o),m=a.createElement("script"),xn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function xx(s,o,a,u){var p=(p=Se.current)?dd(p):null;if(!p)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=nc(a.href),a=xa(p).hoistableStyles,u=a.get(o),u||(u={type:"style",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){s=nc(a.href);var m=xa(p).hoistableStyles,w=m.get(s);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(s,w),(m=p.querySelector(Ll(s)))&&!m._p&&(w.instance=m,w.state.loading=5),Qs.has(s)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Qs.set(s,a),m||S4(p,s,a,w.state))),o&&u===null)throw Error(r(528,""));return w}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=sc(a),a=xa(p).hoistableScripts,u=a.get(o),u||(u={type:"script",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function nc(s){return'href="'+js(s)+'"'}function Ll(s){return'link[rel="stylesheet"]['+s+"]"}function Rx(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function S4(s,o,a,u){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=s.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),Ln(o,"link",a),xn(o),s.head.appendChild(o))}function sc(s){return'[src="'+js(s)+'"]'}function Bl(s){return"script[async]"+s}function Cx(s,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var u=s.querySelector('style[data-href~="'+js(a.href)+'"]');if(u)return o.instance=u,xn(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),xn(u),Ln(u,"style",p),hd(u,a.precedence,s),o.instance=u;case"stylesheet":p=nc(a.href);var m=s.querySelector(Ll(p));if(m)return o.state.loading|=4,o.instance=m,xn(m),m;u=Rx(a),(p=Qs.get(p))&&Zg(u,p),m=(s.ownerDocument||s).createElement("link"),xn(m);var w=m;return w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),o.state.loading|=4,hd(m,a.precedence,s),o.instance=m;case"script":return m=sc(a.src),(p=s.querySelector(Bl(m)))?(o.instance=p,xn(p),p):(u=a,(p=Qs.get(m))&&(u=g({},a),Qg(u,p)),s=s.ownerDocument||s,p=s.createElement("script"),xn(p),Ln(p,"link",u),s.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,hd(u,a.precedence,s));return o.instance}function hd(s,o,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,w=0;w title"):null)}function _4(s,o,a){if(a===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(s=o.disabled,typeof o.precedence=="string"&&s==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Ix(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function w4(s,o,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=nc(u.href),m=o.querySelector(Ll(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=md.bind(s),o.then(s,s)),a.state.loading|=4,a.instance=m,xn(m);return}m=o.ownerDocument||o,u=Rx(u),(p=Qs.get(p))&&Zg(u,p),m=m.createElement("link"),xn(m);var w=m;w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=md.bind(s),o.addEventListener("load",a),o.addEventListener("error",a))}}var Yg=0;function E4(s,o){return s.stylesheets&&s.count===0&&yd(s,s.stylesheets),0Yg?50:800)+o);return s.unsuspend=a,function(){s.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function md(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var gd=null;function yd(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,gd=new Map,o.forEach(x4,s),gd=null,md.call(s))}function x4(s,o){if(!(o.state.loading&4)){var a=gd.get(s);if(a)var u=a.get(null);else{a=new Map,gd.set(s,a);for(var p=s.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_y.exports=uB(),_y.exports}var dB=fB();const hB=eA(dB);var xy={exports:{}},Ry={};var I1;function pB(){if(I1)return Ry;I1=1;var e=Mc().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ry.c=function(t){return e.H.useMemoCache(t)},Ry}var O1;function mB(){return O1||(O1=1,xy.exports=pB()),xy.exports}var Ct=mB();const kA=I.createContext(void 0);function gB(e,t){try{const n=localStorage.getItem(e);if(n==="light"||n==="dark"||n==="system")return n}catch{}return t}function yB(e){const t=Ct.c(14),{children:n,defaultTheme:r,storageKey:i}=e,c=r===void 0?"system":r,l=i===void 0?"ui-theme":i;let f;t[0]!==c||t[1]!==l?(f=()=>gB(l,c),t[0]=c,t[1]=l,t[2]=f):f=t[2];const[d,h]=I.useState(f);let y,g;t[3]!==d?(y=()=>{const R=window.document.documentElement;if(R.classList.remove("light","dark"),d==="system"){const C=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";R.classList.add(C);return}R.classList.add(d)},g=[d],t[3]=d,t[4]=y,t[5]=g):(y=t[4],g=t[5]),I.useEffect(y,g);let v;t[6]!==l?(v=R=>{try{localStorage.setItem(l,R)}catch{}h(R)},t[6]=l,t[7]=v):v=t[7];let b;t[8]!==v||t[9]!==d?(b={theme:d,setTheme:v},t[8]=v,t[9]=d,t[10]=b):b=t[10];const _=b;let x;return t[11]!==n||t[12]!==_?(x=$.jsx(kA.Provider,{value:_,children:n}),t[11]=n,t[12]=_,t[13]=x):x=t[13],x}function vB(){const e=I.useContext(kA);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function kv(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const iu={};function Yh(e,t,n,r,i){let c={...Pv(e,iu)};return t&&(c=tu(c,t)),n&&(c=tu(c,n)),r&&(c=tu(c,r)),i&&(c=tu(c,i)),c}function bB(e){if(e.length===0)return iu;if(e.length===1)return Pv(e[0],iu);let t={...Pv(e[0],iu)};for(let n=1;n=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function PA(e){return typeof e=="function"}function Pv(e,t){return PA(e)?e(t):e??iu}function wB(e,t){return t?e?n=>{if(EB(n)){const i=n;Nv(i);const c=t(i);return i.baseUIHandlerPrevented||e?.(i),c}const r=t(n);return e?.(n),r}:t:e}function Nv(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function NA(e,t){return t?e?t+" "+e:t:e}function EB(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function go(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const M1={};function Dr(e,t){const n=I.useRef(M1);return n.current===M1&&(n.current=e(t)),n}function ph(e,t,n,r){const i=Dr(zA).current;return RB(i,e,t,n,r)&&LA(i,[e,t,n,r]),i.callback}function xB(e){const t=Dr(zA).current;return CB(t,e)&&LA(t,e),t.callback}function zA(){return{callback:null,cleanup:null,refs:[]}}function RB(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function CB(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function LA(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i{for(let i=0;i=e}function D1(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(Cb(19)?n?.ref:t.ref)??null}function AB(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const c=t[r](i);c!=null&&Object.assign(n,c);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function IB(e,t){return typeof e=="function"?e(t):e}function OB(e,t){return typeof e=="function"?e(t):e}function BA(){}const wge=Object.freeze([]),Is=Object.freeze({}),MB={style:{transition:"none"}},DB="data-base-ui-click-trigger",Ege={fallbackAxisSide:"none"},kB={fallbackAxisSide:"end"},PB={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function ir(e,t,n={}){const r=t.render,i=NB(t,n);if(n.enabled===!1)return null;const c=n.state??Is;return zB(e,r,i,c)}function NB(e,t={}){const{className:n,style:r,render:i}=e,{state:c=Is,ref:l,props:f,stateAttributesMapping:d,enabled:h=!0}=t,y=h?IB(n,c):void 0,g=h?OB(r,c):void 0,v=h?AB(c,d):Is,b=h?kv(v,Array.isArray(f)?bB(f):f)??Is:Is;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=xB([b.ref,D1(i),...l]):b.ref=ph(b.ref,D1(i),l):ph(null,null)),h?(y!==void 0&&(b.className=NA(b.className,y)),g!==void 0&&(b.style=kv(b.style,g)),b):Is}function zB(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Yh(n,t.props);return i.ref=n.ref,I.cloneElement(t,i)}if(e&&typeof e=="string")return LB(e,n);throw new Error(go(8))}function LB(e,t){return e==="button"?I.createElement("button",{type:"button",...t,key:t.key}):e==="img"?I.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function $A(e){return ir(e.defaultTagName??"div",e,e)}function UA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,P1=jA,HA=(e,t)=>n=>{var r;if(t?.variants==null)return P1(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,l=Object.keys(i).map(h=>{const y=n?.[h],g=c?.[h];if(y===null)return null;const v=k1(y)||k1(g);return i[h][v]}),f=n&&Object.entries(n).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(_=>{let[x,R]=_;return Array.isArray(R)?R.includes({...c,...f}[x]):{...c,...f}[x]===R})?[...h,g,v]:h},[]);return P1(e,l,d,n?.class,n?.className)};const FA=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const BB=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const $B=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const N1=e=>{const t=$B(e);return t.charAt(0).toUpperCase()+t.slice(1)};var UB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const jB=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const HB=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...f},d)=>I.createElement("svg",{ref:d,...UB,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:FA("lucide",i),...!c&&!jB(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,y])=>I.createElement(h,y)),...Array.isArray(c)?c:[c]]));const vr=(e,t)=>{const n=I.forwardRef(({className:r,...i},c)=>I.createElement(HB,{ref:c,iconNode:t,className:FA(`lucide-${BB(N1(e))}`,`lucide-${e}`,r),...i}));return n.displayName=N1(e),n};const FB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qB=vr("circle-alert",FB);const VB=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],GB=vr("hard-drive",VB);const KB=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],ZB=vr("house",KB);const QB=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],YB=vr("image",QB);const XB=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],WB=vr("key",XB);const JB=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],e$=vr("log-out",JB);const t$=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],n$=vr("moon",t$);const s$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],r$=vr("panel-left",s$);const o$=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],z1=vr("server",o$);const i$=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],a$=vr("sun",i$);const c$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],l$=vr("x",c$);function Xh(){return typeof window<"u"}function mi(e){return Tb(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(Tb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tb(e){return Xh()?e instanceof Node||e instanceof hn(e).Node:!1}function _t(e){return Xh()?e instanceof Element||e instanceof hn(e).Element:!1}function wn(e){return Xh()?e instanceof HTMLElement||e instanceof hn(e).HTMLElement:!1}function zv(e){return!Xh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}const u$=new Set(["inline","contents"]);function la(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ks(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!u$.has(i)}const f$=new Set(["table","td","th"]);function d$(e){return f$.has(mi(e))}const h$=[":popover-open",":modal"];function Wh(e){return h$.some(t=>{try{return e.matches(t)}catch{return!1}})}const p$=["transform","translate","scale","rotate","perspective"],m$=["transform","translate","scale","rotate","perspective","filter"],g$=["paint","layout","strict","content"];function Ab(e){const t=Jh(),n=_t(e)?ks(e):e;return p$.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||m$.some(r=>(n.willChange||"").includes(r))||g$.some(r=>(n.contain||"").includes(r))}function y$(e){let t=ho(e);for(;wn(t)&&!uo(t);){if(Ab(t))return t;if(Wh(t))return null;t=ho(t)}return null}function Jh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const v$=new Set(["html","body","#document"]);function uo(e){return v$.has(mi(e))}function ks(e){return hn(e).getComputedStyle(e)}function ep(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ho(e){if(mi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zv(e)&&e.host||kr(e);return zv(t)?t.host:t}function qA(e){const t=ho(e);return uo(t)?e.ownerDocument?e.ownerDocument.body:e.body:wn(t)&&la(t)?t:qA(t)}function ai(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=qA(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),l=hn(i);if(c){const f=Lv(l);return t.concat(l,l.visualViewport||[],la(i)?i:[],f&&n?ai(f):[])}return t.concat(i,ai(i,[],n))}function Lv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Cy=pb[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],b$=Cy&&Cy!==I.useLayoutEffect?Cy:e=>e();function Ze(e){const t=Dr(S$).current;return t.next=e,b$(t.effect),t.trampoline}function S$(){const e={next:void 0,callback:_$,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function _$(){}const w$=()=>{},mt=typeof document<"u"?I.useLayoutEffect:w$,E$=I.createContext(void 0);function x$(e=!1){const t=I.useContext(E$);if(t===void 0&&!e)throw new Error(go(16));return t}function R$(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:c}=e,l=r&&t!==!1,f=r&&t===!1;return{props:I.useMemo(()=>{const h={onKeyDown(y){n&&t&&y.key!=="Tab"&&y.preventDefault()}};return r||(h.tabIndex=i,!c&&n&&(h.tabIndex=t?i:-1)),(c&&(t||l)||!c&&n)&&(h["aria-disabled"]=n),c&&(!t||f)&&(h.disabled=n),h},[r,n,t,l,f,c,i])}}function VA(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,c=I.useRef(null),l=x$(!0)!==void 0,f=Ze(()=>{const v=c.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=R$({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),h=I.useCallback(()=>{const v=c.current;C$(v)&&l&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,l]);mt(h,[h]);const y=I.useCallback((v={})=>{const{onClick:b,onMouseDown:_,onKeyUp:x,onKeyDown:R,onPointerDown:C,...A}=v;return Yh({type:i?"button":void 0,onClick(D){if(t){D.preventDefault();return}b?.(D)},onMouseDown(D){t||_?.(D)},onKeyDown(D){if(t||(Nv(D),R?.(D)),D.baseUIHandlerPrevented)return;const N=D.target===D.currentTarget&&!i&&!f()&&!t,U=D.key==="Enter",B=D.key===" ";N&&((B||U)&&D.preventDefault(),U&&b?.(D))},onKeyUp(D){t||(Nv(D),x?.(D)),!D.baseUIHandlerPrevented&&D.target===D.currentTarget&&!i&&!t&&D.key===" "&&b?.(D)},onPointerDown(D){if(t){D.preventDefault();return}C?.(D)}},i?void 0:{role:"button"},d,A)},[t,d,i,f]),g=Ze(v=>{c.current=v,h()});return{getButtonProps:y,buttonRef:g}}function C$(e){return wn(e)&&e.tagName==="BUTTON"}const T$=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,focusableWhenDisabled:l=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:y}=VA({disabled:c,focusableWhenDisabled:l,native:f}),g=I.useMemo(()=>({disabled:c}),[c]);return ir("button",t,{state:g,ref:[n,y],props:[d,h]})}),A$=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),GA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),mh="-",L1=[],O$="arbitrary..",M$=e=>{const t=k$(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return D$(l);const f=l.split(mh),d=f[0]===""&&f.length>1?1:0;return KA(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=r[l],h=n[l];return d?h?A$(h,d):d:h||L1}return n[l]||L1}}},KA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],c=n.nextPart.get(i);if(c){const h=KA(e,t+1,c);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(mh):e.slice(t).join(mh),d=l.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?O$+r:void 0})(),k$=e=>{const{theme:t,classGroups:n}=e;return P$(n,t)},P$=(e,t)=>{const n=GA();for(const r in e){const i=e[r];Ib(i,n,r,t)}return n},Ib=(e,t,n,r)=>{const i=e.length;for(let c=0;c{if(typeof e=="string"){z$(e,t,n);return}if(typeof e=="function"){L$(e,t,n,r);return}B$(e,t,n,r)},z$=(e,t,n)=>{const r=e===""?t:ZA(t,e);r.classGroupId=n},L$=(e,t,n,r)=>{if($$(e)){Ib(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(I$(n,e))},B$=(e,t,n,r)=>{const i=Object.entries(e),c=i.length;for(let l=0;l{let n=e;const r=t.split(mh),i=r.length;for(let c=0;c"isThemeGetter"in e&&e.isThemeGetter===!0,U$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(c,l)=>{n[c]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(c){let l=n[c];if(l!==void 0)return l;if((l=r[c])!==void 0)return i(c,l),l},set(c,l){c in n?n[c]=l:i(c,l)}}},Bv="!",B1=":",j$=[],$1=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),H$=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let l=0,f=0,d=0,h;const y=i.length;for(let x=0;xd?h-d:void 0;return $1(c,b,v,_)};if(t){const i=t+B1,c=r;r=l=>l.startsWith(i)?c(l.slice(i.length)):$1(j$,!1,l,void 0,!0)}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},F$=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let c=0;c0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},q$=e=>({cache:U$(e.cacheSize),parseClassName:H$(e),sortModifiers:F$(e),...M$(e)}),V$=/\s+/,G$=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,l=[],f=e.trim().split(V$);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:x}=n(y);if(g){d=y+(d.length>0?" "+d:d);continue}let R=!!x,C=r(R?_.substring(0,x):_);if(!C){if(!R){d=y+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=y+(d.length>0?" "+d:d);continue}R=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),O=b?A+Bv:A,D=O+C;if(l.indexOf(D)>-1)continue;l.push(D);const N=i(C,R);for(let U=0;U0?" "+d:d)}return d},K$=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,c;const l=d=>{const h=t.reduce((y,g)=>g(y),e());return n=q$(h),r=n.cache.get,i=n.cache.set,c=f,f(d)},f=d=>{const h=r(d);if(h)return h;const y=G$(d,n);return i(d,y),y};return c=l,(...d)=>c(K$(...d))},Q$=[],bn=e=>{const t=n=>n[e]||Q$;return t.isThemeGetter=!0,t},YA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,XA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y$=/^\d+\/\d+$/,X$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,W$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,J$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oc=e=>Y$.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),Zo=e=>!!e&&Number.isInteger(Number(e)),Ty=e=>e.endsWith("%")&&tt(e.slice(0,-1)),no=e=>X$.test(e),nU=()=>!0,sU=e=>W$.test(e)&&!J$.test(e),WA=()=>!1,rU=e=>eU.test(e),oU=e=>tU.test(e),iU=e=>!Oe(e)&&!Me(e),aU=e=>Dc(e,tI,WA),Oe=e=>YA.test(e),ji=e=>Dc(e,nI,sU),Ay=e=>Dc(e,dU,tt),U1=e=>Dc(e,JA,WA),cU=e=>Dc(e,eI,oU),Id=e=>Dc(e,sI,rU),Me=e=>XA.test(e),Ql=e=>kc(e,nI),lU=e=>kc(e,hU),j1=e=>kc(e,JA),uU=e=>kc(e,tI),fU=e=>kc(e,eI),Od=e=>kc(e,sI,!0),Dc=(e,t,n)=>{const r=YA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},kc=(e,t,n=!1)=>{const r=XA.exec(e);return r?r[1]?t(r[1]):n:!1},JA=e=>e==="position"||e==="percentage",eI=e=>e==="image"||e==="url",tI=e=>e==="length"||e==="size"||e==="bg-size",nI=e=>e==="length",dU=e=>e==="number",hU=e=>e==="family-name",sI=e=>e==="shadow",pU=()=>{const e=bn("color"),t=bn("font"),n=bn("text"),r=bn("font-weight"),i=bn("tracking"),c=bn("leading"),l=bn("breakpoint"),f=bn("container"),d=bn("spacing"),h=bn("radius"),y=bn("shadow"),g=bn("inset-shadow"),v=bn("text-shadow"),b=bn("drop-shadow"),_=bn("blur"),x=bn("perspective"),R=bn("aspect"),C=bn("ease"),A=bn("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),Me,Oe],U=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],k=()=>[Me,Oe,d],K=()=>[oc,"full","auto",...k()],ne=()=>[Zo,"none","subgrid",Me,Oe],le=()=>["auto",{span:["full",Zo,Me,Oe]},Zo,Me,Oe],G=()=>[Zo,"auto",Me,Oe],Z=()=>["auto","min","max","fr",Me,Oe],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...k()],X=()=>[oc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],j=()=>[e,Me,Oe],ve=()=>[...D(),j1,U1,{position:[Me,Oe]}],Ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",uU,aU,{size:[Me,Oe]}],te=()=>[Ty,Ql,ji],oe=()=>["","none","full",h,Me,Oe],de=()=>["",tt,Ql,ji],Re=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[tt,Ty,j1,U1],Ye=()=>["","none",_,Me,Oe],He=()=>["none",tt,Me,Oe],ht=()=>["none",tt,Me,Oe],Ht=()=>[tt,Me,Oe],re=()=>[oc,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[no],breakpoint:[no],color:[nU],container:[no],"drop-shadow":[no],ease:["in","out","in-out"],font:[iU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[no],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[no],shadow:[no],spacing:["px",tt],text:[no],"text-shadow":[no],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oc,Oe,Me,R]}],container:["container"],columns:[{columns:[tt,Oe,Me,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Zo,"auto",Me,Oe]}],basis:[{basis:[oc,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,oc,"auto","initial","none",Oe]}],grow:[{grow:["",tt,Me,Oe]}],shrink:[{shrink:["",tt,Me,Oe]}],order:[{order:[Zo,"first","last","none",Me,Oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[f,"screen",...X()]}],"min-w":[{"min-w":[f,"screen","none",...X()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Ql,ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Me,Ay]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ty,Oe]}],"font-family":[{font:[lU,Oe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Me,Oe]}],"line-clamp":[{"line-clamp":[tt,"none",Me,Ay]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",Me,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",Me,ji]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[tt,"auto",Me,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:Ce()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zo,Me,Oe],radial:["",Me,Oe],conic:[Zo,Me,Oe]},fU,cU]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,Me,Oe]}],"outline-w":[{outline:["",tt,Ql,ji]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",y,Od,Id]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",g,Od,Id]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[tt,ji]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",v,Od,Id]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[tt,Me,Oe]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Me,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:Ce()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Oe]}],filter:[{filter:["","none",Me,Oe]}],blur:[{blur:Ye()}],brightness:[{brightness:[tt,Me,Oe]}],contrast:[{contrast:[tt,Me,Oe]}],"drop-shadow":[{"drop-shadow":["","none",b,Od,Id]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",tt,Me,Oe]}],"hue-rotate":[{"hue-rotate":[tt,Me,Oe]}],invert:[{invert:["",tt,Me,Oe]}],saturate:[{saturate:[tt,Me,Oe]}],sepia:[{sepia:["",tt,Me,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Oe]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[tt,Me,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[tt,Me,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,Me,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,Me,Oe]}],"backdrop-invert":[{"backdrop-invert":["",tt,Me,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[tt,Me,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[tt,Me,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,Me,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",Me,Oe]}],ease:[{ease:["linear","initial",C,Me,Oe]}],delay:[{delay:[tt,Me,Oe]}],animate:[{animate:["none",A,Me,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Me,Oe]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ht()}],"skew-x":[{"skew-x":Ht()}],"skew-y":[{"skew-y":Ht()}],transform:[{transform:[Me,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me,Oe]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[tt,Ql,ji,Ay]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mU=Z$(pU);function Jt(...e){return mU(jA(e))}function xge(e){return e?new Date(e).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Unknown"}function Rge(e){if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(2)} ${t[n]}`}const gU=/\/$/;function Cge(e){return e.replace(gU,"")}function yU(e){return e&&(e.endsWith("/")?e:`${e}/`)}function vU(e,t){return e.startsWith(t)?e:`${t}${e}`}function Tge(e,t){return e.startsWith(t)?e.slice(t.length):e}const bU=HA("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium text-xs/relaxed outline-none transition-all focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function Rc(e){const t=Ct.c(12);let n,r,i,c;t[0]!==e?({className:n,variant:i,size:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c):(n=t[1],r=t[2],i=t[3],c=t[4]);const l=i===void 0?"default":i,f=c===void 0?"default":c;let d;t[5]!==n||t[6]!==f||t[7]!==l?(d=Jt(bU({variant:l,size:f,className:n})),t[5]=n,t[6]=f,t[7]=l,t[8]=d):d=t[8];let h;return t[9]!==r||t[10]!==d?(h=$.jsx(T$,{className:d,"data-slot":"button",...r}),t[9]=r,t[10]=d,t[11]=h):h=t[11],h}const SU={...pb};let H1=0;function _U(e,t="mui"){const[n,r]=I.useState(e),i=e||n;return I.useEffect(()=>{n==null&&(H1+=1,r(`${t}-${H1}`))},[n,t]),i}const F1=SU.useId;function Pu(e,t){if(F1!==void 0){const n=F1();return e??(t?`${t}-${n}`:n)}return _U(e,t)}function Ob(e){return Pu(e,"base-ui")}const wU=[];function rI(e){I.useEffect(e,wU)}const Yl=0;class ui{static create(){return new ui}currentId=Yl;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Yl,n()},t)}isStarted(){return this.currentId!==Yl}clear=()=>{this.currentId!==Yl&&(clearTimeout(this.currentId),this.currentId=Yl)};disposeEffect=()=>this.clear}function fi(){const e=Dr(ui.create).current;return rI(e.disposeEffect),e}function ua(e){return e?.ownerDocument||document}const Pc=typeof navigator<"u",Iy=RU(),oI=TU(),iI=CU(),EU=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),aI=Iy.platform==="MacIntel"&&Iy.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Iy.platform),cI=Pc&&/apple/i.test(navigator.vendor),$v=Pc&&/android/i.test(oI)||/android/i.test(iI),xU=Pc&&oI.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,lI=iI.includes("jsdom/");function RU(){if(!Pc)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function CU(){if(!Pc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function TU(){if(!Pc)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Uv="data-base-ui-focusable",uI="active",fI="selected",dI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Age="ArrowLeft",Ige="ArrowRight",Oge="ArrowUp",Mge="ArrowDown";function ei(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&zv(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ns(e){return"composedPath"in e?e.composedPath()[0]:e.target}function pr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function AU(e){return e.matches("html,body")}function _n(e){return e?.ownerDocument||document}function hI(e){return wn(e)&&e.matches(dI)}function q1(e){return e?e.getAttribute("role")==="combobox"&&hI(e):!1}function IU(e){if(!e||lI)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function jv(e){return e?e.hasAttribute(Uv)?e:e.querySelector(`[${Uv}]`)||e:null}function Wi(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Wi(e,i.id,n)])}function V1(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(c=>c.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function OU(e){e.preventDefault(),e.stopPropagation()}function MU(e){return"nativeEvent"in e}function DU(e){return e.mozInputSource===0&&e.isTrusted?!0:$v&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kU(e){return lI?!1:!$v&&e.width===0&&e.height===0||$v&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Su(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function PU(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const NU=["top","right","bottom","left"],Cc=Math.min,As=Math.max,gh=Math.round,Md=Math.floor,Ir=e=>({x:e,y:e}),zU={left:"right",right:"left",bottom:"top",top:"bottom"},LU={start:"end",end:"start"};function Hv(e,t,n){return As(e,Cc(t,n))}function po(e,t){return typeof e=="function"?e(t):e}function hs(e){return e.split("-")[0]}function gi(e){return e.split("-")[1]}function Mb(e){return e==="x"?"y":"x"}function Db(e){return e==="y"?"height":"width"}const BU=new Set(["top","bottom"]);function or(e){return BU.has(hs(e))?"y":"x"}function kb(e){return Mb(or(e))}function $U(e,t,n){n===void 0&&(n=!1);const r=gi(e),i=kb(e),c=Db(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=yh(l)),[l,yh(l)]}function UU(e){const t=yh(e);return[Fv(e),t,Fv(t)]}function Fv(e){return e.replace(/start|end/g,t=>LU[t])}const G1=["left","right"],K1=["right","left"],jU=["top","bottom"],HU=["bottom","top"];function FU(e,t,n){switch(e){case"top":case"bottom":return n?t?K1:G1:t?G1:K1;case"left":case"right":return t?jU:HU;default:return[]}}function qU(e,t,n,r){const i=gi(e);let c=FU(hs(e),n==="start",r);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(Fv)))),c}function yh(e){return e.replace(/left|right|bottom|top/g,t=>zU[t])}function VU(e){return{top:0,right:0,bottom:0,left:0,...e}}function pI(e){return typeof e!="number"?VU(e):{top:e,right:e,bottom:e,left:e}}function vh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var GU=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],bh=GU.join(","),mI=typeof Element>"u",Tc=mI?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Sh=!mI&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},_h=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),c=i===""||i==="true",l=c||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):_h(t.parentNode));return l},KU=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},gI=function(t,n,r){if(_h(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(bh));return n&&Tc.call(t,bh)&&i.unshift(t),i=i.filter(r),i},wh=function(t,n,r){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!_h(l,!1))if(l.tagName==="SLOT"){var f=l.assignedElements(),d=f.length?f:l.children,h=wh(d,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:l,candidates:h})}else{var y=Tc.call(l,bh);y&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),v=!_h(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(g&&v){var b=wh(g===!0?l.children:g.children,!0,r);r.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},yI=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vI=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||KU(t))&&!yI(t)?0:t.tabIndex},ZU=function(t,n){var r=vI(t);return r<0&&n&&!yI(t)?0:r},QU=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},bI=function(t){return t.tagName==="INPUT"},YU=function(t){return bI(t)&&t.type==="hidden"},XU=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},WU=function(t,n){for(var r=0;rsummary:first-of-type"),f=l?t.parentElement:t;if(Tc.call(f,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var h=t.parentElement,y=Sh(t);if(h&&!h.shadowRoot&&i(h)===!0)return Z1(t);t.assignedSlot?t=t.assignedSlot:!h&&y!==t.ownerDocument?t=y.host:t=h}t=d}if(n5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Z1(t);return!1},r5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},SI=function(t){var n=[],r=[];return t.forEach(function(i,c){var l=!!i.scopeParent,f=l?i.scopeParent:i,d=ZU(f,l),h=l?SI(i.candidates):f;d===0?l?n.push.apply(n,h):n.push(f):r.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:h})}),r.sort(QU).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(n)},tp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wh([t],n.includeContainer,{filter:Vv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:o5}):r=gI(t,n.includeContainer,Vv.bind(null,n)),SI(r)},i5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wh([t],n.includeContainer,{filter:qv.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=gI(t,n.includeContainer,qv.bind(null,n)),r},_I=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Tc.call(t,bh)===!1?!1:Vv(n,t)};const Nu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wI(e,t){const n=tp(e,Nu()),r=n.length;if(r===0)return;const i=ei(_n(e)),c=n.indexOf(i),l=c===-1?t===1?0:r-1:c+t;return n[l]}function EI(e){return wI(_n(e).body,1)||e}function xI(e){return wI(_n(e).body,-1)||e}function au(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function a5(e){tp(e,Nu()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Q1(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Pb="none",Eh="trigger-press",yr="trigger-hover",Xd="trigger-focus",RI="outside-press",Dge="item-press",c5="close-press",CI="focus-out",Nb="escape-key",kge="list-navigation",Pge="cancel-open",l5="disabled",TI="imperative-action",Nge="window-resize";function qt(e,t,n,r){let i=!1,c=!1;const l=Is;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){c=!0},get isCanceled(){return i},get isPropagationAllowed(){return c},trigger:n,...l}}const AI=I.createContext(void 0);function fa(e){const t=I.useContext(AI);if(e===!1&&t===void 0)throw new Error(go(27));return t}let _u=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const u5={[_u.startingStyle]:""},f5={[_u.endingStyle]:""},zb={transitionStatus(e){return e==="starting"?u5:e==="ending"?f5:null}};let Zi=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=_u.startingStyle]="startingStyle",e[e.endingStyle=_u.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Gv=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const d5={[Gv.popupOpen]:""},h5={[Gv.popupOpen]:"",[Gv.pressed]:""},p5={[Zi.open]:""},m5={[Zi.closed]:""},g5={[Zi.anchorHidden]:""},y5={open(e){return e?d5:null}},zge={open(e){return e?h5:null}},zu={open(e){return e?p5:m5},anchorHidden(e){return e?g5:null}},v5={...zu,...zb},b5=I.forwardRef(function(t,n){const{render:r,className:i,forceRender:c=!1,...l}=t,{store:f}=fa(),d=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus"),v=I.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return ir("div",t,{state:v,ref:[f.context.backdropRef,n],stateAttributesMapping:v5,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:c||!h})}),S5=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,nativeButton:l=!0,...f}=t,{store:d}=fa(),h=d.useState("open");function y(_){h&&d.setOpen(!1,qt(c5,_.nativeEvent))}const{getButtonProps:g,buttonRef:v}=VA({disabled:c,native:l}),b=I.useMemo(()=>({disabled:c}),[c]);return ir("button",t,{state:b,ref:[n,v],props:[{onClick:y},f,g]})}),_5=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=fa(),d=Ob(c);return f.useSyncedValueWithCleanup("descriptionElementId",d),ir("p",t,{ref:n,props:[{id:d},l]})});function Ar(e){const t=Dr(w5,e).current;return t.next=e,mt(t.effect),t}function w5(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function E5(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const x5=I.createContext(null),R5=I.createContext(null),np=()=>I.useContext(x5)?.id||null,Lu=e=>{const t=I.useContext(R5);return e??t};function Ac(e){return`data-base-ui-${e}`}function Wd(e,t,n){if(n&&!Su(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const II=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ui,currentIdRef:{current:null},currentContextRef:{current:null}});function C5(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),c=I.useRef(n),l=I.useRef(null),f=I.useRef(null),d=fi();return $.jsx(II.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:f,timeout:d}),[r,d]),children:t})}function T5(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:i=!0,open:c}=t,l=I.useContext(II),{currentIdRef:f,delayRef:d,timeoutMs:h,initialDelayRef:y,currentContextRef:g,hasProvider:v,timeout:b}=l,[_,x]=I.useState(!1);return mt(()=>{function R(){x(!1),g.current?.setIsInstantPhase(!1),f.current=null,g.current=null,d.current=y.current}if(i&&f.current&&!c&&f.current===r){if(x(!1),h){const C=r;return b.start(h,()=>{n.select("open")||f.current&&f.current!==C||R()}),()=>{b.clear()}}R()}},[i,c,r,f,d,h,y,g,b,n]),mt(()=>{if(!i||!c)return;const R=g.current,C=f.current;b.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:x},f.current=r,d.current={open:0,close:Wd(y.current,"close")},C!==null&&C!==r?(x(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,qt(Pb))):(x(!1),R?.setIsInstantPhase(!1))},[i,c,r,n,f,d,h,y,g,b]),mt(()=>()=>{g.current=null},[g]),I.useMemo(()=>({hasProvider:v,delayRef:d,isInstantPhase:_}),[v,d,_])}const OI={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},MI={...OI,position:"fixed",top:0,left:0},Lge={...OI,position:"absolute"},Dd=null;class A5{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const kd=new A5;class Tr{static create(){return new Tr}static request(t){return kd.request(t)}static cancel(t){return kd.cancel(t)}currentId=Dd;request(t){this.cancel(),this.currentId=kd.request(()=>{this.currentId=Dd,t()})}cancel=()=>{this.currentId!==Dd&&(kd.cancel(this.currentId),this.currentId=Dd)};disposeEffect=()=>this.cancel}function DI(){const e=Dr(Tr.create).current;return rI(e.disposeEffect),e}const xh=I.forwardRef(function(t,n){const[r,i]=I.useState();mt(()=>{cI&&i("button")},[]);const c={tabIndex:0,role:r};return $.jsx("span",{...t,ref:n,style:MI,"aria-hidden":r?void 0:!0,...c,"data-base-ui-focus-guard":""})});let Y1=0;function Oy(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Y1);const c=()=>e?.focus({preventScroll:n});i?c():Y1=requestAnimationFrame(c)}const gc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function X1(e){return e==="inert"?gc.inert:e==="aria-hidden"?gc["aria-hidden"]:gc.none}let Pd=new WeakSet,Nd={},My=0;const kI=e=>e&&(e.host||kI(e.parentNode)),I5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=kI(n);return e.contains(r)?r:null}).filter(n=>n!=null);function O5(e,t,n,r){const i="data-base-ui-inert",c=r?"inert":n?"aria-hidden":null,l=I5(t,e),f=new Set,d=new Set(l),h=[];Nd[i]||(Nd[i]=new WeakMap);const y=Nd[i];l.forEach(g),v(t),f.clear();function g(b){!b||f.has(b)||(f.add(b),b.parentNode&&g(b.parentNode))}function v(b){!b||d.has(b)||[].forEach.call(b.children,_=>{if(mi(_)!=="script")if(f.has(_))v(_);else{const x=c?_.getAttribute(c):null,R=x!==null&&x!=="false",C=X1(c),A=(C.get(_)||0)+1,O=(y.get(_)||0)+1;C.set(_,A),y.set(_,O),h.push(_),A===1&&R&&Pd.add(_),O===1&&_.setAttribute(i,""),!R&&c&&_.setAttribute(c,c==="inert"?"":"true")}})}return My+=1,()=>{h.forEach(b=>{const _=X1(c),R=(_.get(b)||0)-1,C=(y.get(b)||0)-1;_.set(b,R),y.set(b,C),R||(!Pd.has(b)&&c&&b.removeAttribute(c),Pd.delete(b)),C||b.removeAttribute(i)}),My-=1,My||(gc.inert=new WeakMap,gc["aria-hidden"]=new WeakMap,gc.none=new WeakMap,Pd=new WeakSet,Nd={})}}function M5(e,t=!1,n=!1){const r=_n(e[0]).body;return O5(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const PI=I.createContext(null),NI=()=>I.useContext(PI),D5=Ac("portal");function zI(e={}){const{ref:t,container:n,componentProps:r=Is,elementProps:i,elementState:c}=e,l=Pu(),d=NI()?.portalNode,[h,y]=I.useState(null),[g,v]=I.useState(null),b=Ze(C=>{C!==null&&v(C)}),_=I.useRef(null);mt(()=>{if(n===null){_.current&&(_.current=null,v(null),y(null));return}if(l==null)return;const C=(n&&(Tb(n)?n:n.current))??d??document.body;if(C==null){_.current&&(_.current=null,v(null),y(null));return}_.current!==C&&(_.current=C,v(null),y(C))},[n,d,l]);const x=ir("div",r,{ref:[t,b],state:c,props:[{id:l,[D5]:""},i]});return{portalNode:g,portalSubtree:h&&x?pi.createPortal(x,h):null}}const k5=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:y}=zI({container:i,ref:n,componentProps:t,elementProps:d}),g=I.useRef(null),v=I.useRef(null),b=I.useRef(null),_=I.useRef(null),[x,R]=I.useState(null),C=x?.modal,A=x?.open,O=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!h;I.useEffect(()=>{if(!h||C)return;function N(U){h&&U.relatedTarget&&au(U)&&(U.type==="focusin"?Q1:a5)(h)}return h.addEventListener("focusin",N,!0),h.addEventListener("focusout",N,!0),()=>{h.removeEventListener("focusin",N,!0),h.removeEventListener("focusout",N,!0)}},[h,C]),I.useEffect(()=>{!h||A||Q1(h)},[A,h]);const D=I.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:b,afterInsideRef:_,portalNode:h,setFocusManagerState:R}),[h]);return $.jsxs(I.Fragment,{children:[y,$.jsxs(PI.Provider,{value:D,children:[O&&h&&$.jsx(xh,{"data-type":"outside",ref:g,onFocus:N=>{if(au(N,h))b.current?.focus();else{const U=x?x.domReference:null;xI(U)?.focus()}}}),O&&h&&$.jsx("span",{"aria-owns":h.id,style:PB}),h&&pi.createPortal(r,h),O&&h&&$.jsx(xh,{"data-type":"outside",ref:v,onFocus:N=>{if(au(N,h))_.current?.focus();else{const U=x?x.domReference:null;EI(U)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,qt(CI,N.nativeEvent))}}})]})]})});function ro(e){return e==null?e:"current"in e?e.current:e}function P5(e,t){const n=hn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const W1=20;let si=[];function Lb(){si=si.filter(e=>e.isConnected)}function N5(e){Lb(),e&&mi(e)!=="body"&&(si.push(e),si.length>W1&&(si=si.slice(-W1)))}function Dy(){return Lb(),si[si.length-1]}function z5(e){if(!e)return null;const t=Nu();return _I(e,t)?e:tp(e,t)[0]||e}function L5(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():ks(e).display!=="none"}function J1(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Nu(),i=i5(e,n).filter(l=>{const f=l.getAttribute("data-tabindex")||"";return _I(l,n)||l.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function B5(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:c=!0,returnFocus:l=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:y="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:b,beforeContentFocusGuardRef:_,externalTree:x}=e,R="rootStore"in t?t.rootStore:t,C=R.useState("open"),A=R.useState("domReferenceElement"),O=R.useState("floatingElement"),{events:D,dataRef:N}=R.context,U=Ze(()=>N.current.floatingContext?.nodeId),B=Ze(g),k=c===!1,K=q1(A)&&k,ne=Ar(i),le=Ar(c),G=Ar(l),Z=Ar(y),ye=Lu(x),fe=NI(),q=I.useRef(null),X=I.useRef(null),j=I.useRef(!1),ve=I.useRef(!1),Ce=I.useRef(!1),P=I.useRef(-1),te=I.useRef(""),oe=I.useRef(""),de=I.useRef(null),Re=I.useRef(null),Se=ph(de,_,fe?.beforeInsideRef),be=ph(Re,fe?.afterInsideRef),Ye=fi(),He=fi(),ht=DI(),Ht=fe!=null,re=jv(O),Fe=Ze((_e=re)=>_e?tp(_e,Nu()):[]),Ae=Ze(_e=>{const Pe=Fe(_e);return ne.current.map(()=>Pe).filter(Boolean).flat()});I.useEffect(()=>{if(r||!d)return;function _e(Ve){Ve.key==="Tab"&&bt(re,ei(_n(re)))&&Fe().length===0&&!K&&OU(Ve)}const Pe=_n(re);return Pe.addEventListener("keydown",_e),()=>{Pe.removeEventListener("keydown",_e)}},[r,A,re,d,ne,K,Fe,Ae]),I.useEffect(()=>{if(r||!O)return;function _e(Pe){const Ve=ns(Pe),ut=Fe().indexOf(Ve);ut!==-1&&(P.current=ut)}return O.addEventListener("focusin",_e),()=>{O.removeEventListener("focusin",_e)}},[r,O,Fe]),I.useEffect(()=>{if(r||!C)return;const _e=_n(re);function Pe(){Ce.current=!1}function Ve(ut){const Be=ns(ut),Le=bt(O,Be)||bt(A,Be)||bt(fe?.portalNode,Be);Ce.current=!Le,oe.current=ut.pointerType||"keyboard"}function Qe(){oe.current="keyboard"}return _e.addEventListener("pointerdown",Ve,!0),_e.addEventListener("pointerup",Pe,!0),_e.addEventListener("pointercancel",Pe,!0),_e.addEventListener("keydown",Qe,!0),()=>{_e.removeEventListener("pointerdown",Ve,!0),_e.removeEventListener("pointerup",Pe,!0),_e.removeEventListener("pointercancel",Pe,!0),_e.removeEventListener("keydown",Qe,!0)}},[r,O,A,re,C,fe]),I.useEffect(()=>{if(r||!h)return;function _e(){ve.current=!0,He.start(0,()=>{ve.current=!1})}function Pe(Be){const Le=Be.relatedTarget,tn=Be.currentTarget,it=ns(Be);queueMicrotask(()=>{const vs=U(),gt=R.context.triggerElements,Bt=Le?.hasAttribute(Ac("focus-guard"))&&[de.current,Re.current,fe?.beforeInsideRef.current,fe?.afterInsideRef.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,ro(b),ro(v)].includes(Le),$t=!(bt(A,Le)||bt(O,Le)||bt(Le,O)||bt(fe?.portalNode,Le)||Le!=null&>.hasElement(Le)||gt.hasMatchingElement(nn=>bt(nn,Le))||Bt||ye&&(Wi(ye.nodesRef.current,vs).find(nn=>bt(nn.context?.elements.floating,Le)||bt(nn.context?.elements.domReference,Le))||V1(ye.nodesRef.current,vs).find(nn=>[nn.context?.elements.floating,jv(nn.context?.elements.floating)].includes(Le)||nn.context?.elements.domReference===Le)));if(tn===A&&re&&J1(re,ne),f&&tn!==A&&!L5(it)&&ei(_n(re))===_n(re).body){if(wn(re)&&(re.focus(),f==="popup")){ht.request(()=>{re.focus()});return}const nn=P.current,bs=Fe(),Ls=bs[nn]||bs[bs.length-1]||re;wn(Ls)&&Ls.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(K||!d)&&Le&&$t&&!ve.current&&(K||Le!==Dy())&&(j.current=!0,R.setOpen(!1,qt(CI,Be)))})}function Ve(){Ce.current||(N.current.insideReactTree=!0,Ye.start(0,()=>{N.current.insideReactTree=!1}))}const Qe=wn(A)?A:null,ut=[];if(!(!O&&!Qe))return Qe&&(Qe.addEventListener("focusout",Pe),Qe.addEventListener("pointerdown",_e),ut.push(()=>{Qe.removeEventListener("focusout",Pe),Qe.removeEventListener("pointerdown",_e)})),O&&(O.addEventListener("focusout",Pe),fe&&(O.addEventListener("focusout",Ve,!0),ut.push(()=>{O.removeEventListener("focusout",Ve,!0)})),ut.push(()=>{O.removeEventListener("focusout",Pe)})),()=>{ut.forEach(Be=>{Be()})}},[r,A,O,re,d,ye,fe,R,h,f,Fe,K,U,ne,N,Ye,He,ht,v,b]),I.useEffect(()=>{if(r||!O||!C)return;const _e=Array.from(fe?.portalNode?.querySelectorAll(`[${Ac("portal")}]`)||[]),Ve=(ye?V1(ye.nodesRef.current,U()):[]).find(Be=>q1(Be.context?.elements.domReference||null))?.context?.elements.domReference,Qe=[O,Ve,..._e,...B(),q.current,X.current,de.current,Re.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,ro(b),ro(v),K?A:null].filter(Be=>Be!=null),ut=M5(Qe,d||K);return()=>{ut()}},[C,r,A,O,d,ne,fe,K,ye,U,B,v,b]),mt(()=>{if(!C||r||!wn(re))return;const _e=_n(re),Pe=ei(_e);queueMicrotask(()=>{const Ve=Ae(re),Qe=le.current,ut=typeof Qe=="function"?Qe(Z.current||""):Qe;if(ut===void 0||ut===!1)return;let Be;ut===!0||ut===null?Be=Ve[0]||re:Be=ro(ut),Be=Be||Ve[0]||re,!bt(re,Pe)&&Oy(Be,{preventScroll:Be===re})})},[r,C,re,k,Ae,le,Z]),mt(()=>{if(r||!re)return;const _e=_n(re),Pe=ei(_e);N5(Pe);function Ve(Be){if(Be.open||(te.current=P5(Be.nativeEvent,oe.current)),Be.reason===yr&&Be.nativeEvent.type==="mouseleave"&&(j.current=!0),Be.reason===RI)if(Be.nested)j.current=!1;else if(DU(Be.nativeEvent)||kU(Be.nativeEvent))j.current=!1;else{let Le=!1;document.createElement("div").focus({get preventScroll(){return Le=!0,!1}}),Le?j.current=!1:j.current=!0}}D.on("openchange",Ve);const Qe=_e.createElement("span");Qe.setAttribute("tabindex","-1"),Qe.setAttribute("aria-hidden","true"),Object.assign(Qe.style,MI),Ht&&A&&A.insertAdjacentElement("afterend",Qe);function ut(){const Be=G.current;let Le=typeof Be=="function"?Be(te.current):Be;if(Le===void 0||Le===!1)return null;if(Le===null&&(Le=!0),typeof Le=="boolean"){const it=A||Dy();return it&&it.isConnected?it:Qe}const tn=A||Dy()||Qe;return ro(Le)||tn}return()=>{D.off("openchange",Ve);const Be=ei(_e),Le=bt(O,Be)||ye&&Wi(ye.nodesRef.current,U(),!1).some(it=>bt(it.context?.elements.floating,Be)),tn=ut();queueMicrotask(()=>{const it=z5(tn),vs=typeof G.current!="boolean";G.current&&!j.current&&wn(it)&&(!(!vs&&it!==Be&&Be!==_e.body)||Le)&&it.focus({preventScroll:!0}),Qe.remove()})}},[r,O,re,G,N,D,ye,Ht,A,U]),I.useEffect(()=>{queueMicrotask(()=>{j.current=!1})},[r]),I.useEffect(()=>{if(r||!C)return;function _e(Ve){ns(Ve)?.closest(`[${DB}]`)&&(ve.current=!0)}const Pe=_n(re);return Pe.addEventListener("pointerdown",_e,!0),()=>{Pe.removeEventListener("pointerdown",_e,!0)}},[r,C,re]),mt(()=>{if(!r&&fe)return fe.setFocusManagerState({modal:d,closeOnFocusOut:h,open:C,onOpenChange:R.setOpen,domReference:A}),()=>{fe.setFocusManagerState(null)}},[r,fe,d,C,R,h,A]),mt(()=>{if(!(r||!re))return J1(re,ne),()=>{queueMicrotask(Lb)}},[r,re,ne]);const Pt=!r&&(d?!K:!0)&&(Ht||d);return $.jsxs(I.Fragment,{children:[Pt&&$.jsx(xh,{"data-type":"inside",ref:Se,onFocus:_e=>{if(d){const Pe=Ae();Oy(Pe[Pe.length-1])}else fe?.portalNode&&(j.current=!1,au(_e,fe.portalNode)?EI(A)?.focus():ro(b??fe.beforeOutsideRef)?.focus())}}),n,Pt&&$.jsx(xh,{"data-type":"inside",ref:be,onFocus:_e=>{d?Oy(Ae()[0]):fe?.portalNode&&(h&&(j.current=!0),au(_e,fe.portalNode)?xI(A)?.focus():ro(v??fe.afterOutsideRef)?.focus())}})]})}function $5(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,v=c.y;return n==null&&t.x&&l&&(n=c.x-t.x),r==null&&t.y&&f&&(r=c.y-t.y),g-=n||0,v-=r||0,h=0,y=0,!i||d?(h=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0,g=l&&t.x!=null?t.x:g,v=f&&t.y!=null?t.y:v):i&&!d&&(y=t.axis==="x"?c.height:y,h=t.axis==="y"?c.width:h),i=!0,{width:h,height:y,x:g,y:v,top:v,right:g+h,bottom:v+y,left:g}}}}function eR(e){return e!=null&&e.clientX!=null}function U5(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:f=!0,axis:d="both",x:h=null,y=null}=t,g=I.useRef(!1),v=I.useRef(null),[b,_]=I.useState(),[x,R]=I.useState([]),C=Ze((U,B,k)=>{g.current||l.current.openEvent&&!eR(l.current.openEvent)||n.set("positionReference",$5(k??c,{x:U,y:B,axis:d,dataRef:l,pointerType:b}))}),A=Ze(U=>{h!=null||y!=null||(r?v.current||R([]):C(U.clientX,U.clientY,U.currentTarget))}),O=Su(b)?i:r,D=I.useCallback(()=>{if(!O||!f||h!=null||y!=null)return;const U=hn(i);function B(k){const K=ns(k);bt(i,K)?(U.removeEventListener("mousemove",B),v.current=null):C(k.clientX,k.clientY)}if(!l.current.openEvent||eR(l.current.openEvent)){U.addEventListener("mousemove",B);const k=()=>{U.removeEventListener("mousemove",B),v.current=null};return v.current=k,k}n.set("positionReference",c)},[O,f,h,y,i,l,c,n,C]);I.useEffect(()=>D(),[D,x]),I.useEffect(()=>{f&&!i&&(g.current=!1)},[f,i]),I.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]),mt(()=>{f&&(h!=null||y!=null)&&(g.current=!1,C(h,y))},[f,h,y,C]);const N=I.useMemo(()=>{function U(B){_(B.pointerType)}return{onPointerDown:U,onPointerEnter:U,onMouseMove:A,onMouseEnter:A}},[A]);return I.useMemo(()=>f?{reference:N,trigger:N}:{},[f,N])}function tR(e,t,n){let{reference:r,floating:i}=e;const c=or(t),l=kb(t),f=Db(l),d=hs(t),h=c==="y",y=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,v=r[f]/2-i[f]/2;let b;switch(d){case"top":b={x:y,y:r.y-i.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-i.width,y:g};break;default:b={x:r.x,y:r.y}}switch(gi(t)){case"start":b[l]-=v*(n&&h?-1:1);break;case"end":b[l]+=v*(n&&h?-1:1);break}return b}const j5=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,f=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:g}=tR(h,r,d),v=r,b={},_=0;for(let x=0;xye<=0)){var le,G;const ye=(((le=c.flip)==null?void 0:le.index)||0)+1,fe=B[ye];if(fe&&(!(g==="alignment"?A!==or(fe):!1)||ne.every(j=>or(j.placement)===A?j.overflows[0]>0:!0)))return{data:{index:ye,overflows:ne},reset:{placement:fe}};let q=(G=ne.filter(X=>X.overflows[0]<=0).sort((X,j)=>X.overflows[1]-j.overflows[1])[0])==null?void 0:G.placement;if(!q)switch(b){case"bestFit":{var Z;const X=(Z=ne.filter(j=>{if(U){const ve=or(j.placement);return ve===A||ve==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(ve=>ve>0).reduce((ve,Ce)=>ve+Ce,0)]).sort((j,ve)=>j[1]-ve[1])[0])==null?void 0:Z[0];X&&(q=X);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function nR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sR(e){return NU.some(t=>e[t]>=0)}const F5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=po(e,t);switch(r){case"referenceHidden":{const c=await wu(t,{...i,elementContext:"reference"}),l=nR(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:sR(l)}}}case"escaped":{const c=await wu(t,{...i,altBoundary:!0}),l=nR(c,n.floating);return{data:{escapedOffsets:l,escaped:sR(l)}}}default:return{}}}}},LI=new Set(["left","top"]);async function q5(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=hs(n),f=gi(n),d=or(n)==="y",h=LI.has(l)?-1:1,y=c&&d?-1:1,g=po(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof _=="number"&&(b=f==="end"?_*-1:_),d?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const V5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:l,middlewareData:f}=t,d=await q5(t,e);return l===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},G5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:f={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...d}=po(e,t),h={x:n,y:r},y=await wu(t,d),g=or(hs(i)),v=Mb(g);let b=h[v],_=h[g];if(c){const R=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=b+y[R],O=b-y[C];b=Hv(A,b,O)}if(l){const R=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=_+y[R],O=_-y[C];_=Hv(A,_,O)}const x=f.fn({...t,[v]:b,[g]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:c,[g]:l}}}}}},K5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=po(e,t),y={x:n,y:r},g=or(i),v=Mb(g);let b=y[v],_=y[g];const x=po(f,t),R=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const O=v==="y"?"height":"width",D=c.reference[v]-c.floating[O]+R.mainAxis,N=c.reference[v]+c.reference[O]-R.mainAxis;bN&&(b=N)}if(h){var C,A;const O=v==="y"?"width":"height",D=LI.has(hs(i)),N=c.reference[g]-c.floating[O]+(D&&((C=l.offset)==null?void 0:C[g])||0)+(D?0:R.crossAxis),U=c.reference[g]+c.reference[O]+(D?0:((A=l.offset)==null?void 0:A[g])||0)-(D?R.crossAxis:0);_U&&(_=U)}return{[v]:b,[g]:_}}}},Z5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:l,elements:f}=t,{apply:d=()=>{},...h}=po(e,t),y=await wu(t,h),g=hs(i),v=gi(i),b=or(i)==="y",{width:_,height:x}=c.floating;let R,C;g==="top"||g==="bottom"?(R=g,C=v===(await(l.isRTL==null?void 0:l.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,R=v==="end"?"top":"bottom");const A=x-y.top-y.bottom,O=_-y.left-y.right,D=Cc(x-y[R],A),N=Cc(_-y[C],O),U=!t.middlewareData.shift;let B=D,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(B=A),U&&!v){const ne=As(y.left,0),le=As(y.right,0),G=As(y.top,0),Z=As(y.bottom,0);b?k=_-2*(ne!==0||le!==0?ne+le:As(y.left,y.right)):B=x-2*(G!==0||Z!==0?G+Z:As(y.top,y.bottom))}await d({...t,availableWidth:k,availableHeight:B});const K=await l.getDimensions(f.floating);return _!==K.width||x!==K.height?{reset:{rects:!0}}:{}}}};function BI(e){const t=ks(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=wn(e),c=i?e.offsetWidth:n,l=i?e.offsetHeight:r,f=gh(n)!==c||gh(r)!==l;return f&&(n=c,r=l),{width:n,height:r,$:f}}function Bb(e){return _t(e)?e:e.contextElement}function yc(e){const t=Bb(e);if(!wn(t))return Ir(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=BI(t);let l=(c?gh(n.width):n.width)/r,f=(c?gh(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!f||!Number.isFinite(f))&&(f=1),{x:l,y:f}}const Q5=Ir(0);function $I(e){const t=hn(e);return!Jh()||!t.visualViewport?Q5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Y5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hn(e)?!1:t}function sa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=Bb(e);let l=Ir(1);t&&(r?_t(r)&&(l=yc(r)):l=yc(e));const f=Y5(c,n,r)?$I(c):Ir(0);let d=(i.left+f.x)/l.x,h=(i.top+f.y)/l.y,y=i.width/l.x,g=i.height/l.y;if(c){const v=hn(c),b=r&&_t(r)?hn(r):r;let _=v,x=Lv(_);for(;x&&r&&b!==_;){const R=yc(x),C=x.getBoundingClientRect(),A=ks(x),O=C.left+(x.clientLeft+parseFloat(A.paddingLeft))*R.x,D=C.top+(x.clientTop+parseFloat(A.paddingTop))*R.y;d*=R.x,h*=R.y,y*=R.x,g*=R.y,d+=O,h+=D,_=hn(x),x=Lv(_)}}return vh({width:y,height:g,x:d,y:h})}function sp(e,t){const n=ep(e).scrollLeft;return t?t.left+n:sa(kr(e)).left+n}function UI(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-sp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function X5(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",l=kr(r),f=t?Wh(t.floating):!1;if(r===l||f&&c)return n;let d={scrollLeft:0,scrollTop:0},h=Ir(1);const y=Ir(0),g=wn(r);if((g||!g&&!c)&&((mi(r)!=="body"||la(l))&&(d=ep(r)),wn(r))){const b=sa(r);h=yc(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const v=l&&!g&&!c?UI(l,d):Ir(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+y.x+v.x,y:n.y*h.y-d.scrollTop*h.y+y.y+v.y}}function W5(e){return Array.from(e.getClientRects())}function J5(e){const t=kr(e),n=ep(e),r=e.ownerDocument.body,i=As(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=As(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+sp(e);const f=-n.scrollTop;return ks(r).direction==="rtl"&&(l+=As(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:f}}const rR=25;function e8(e,t){const n=hn(e),r=kr(e),i=n.visualViewport;let c=r.clientWidth,l=r.clientHeight,f=0,d=0;if(i){c=i.width,l=i.height;const y=Jh();(!y||y&&t==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}const h=sp(r);if(h<=0){const y=r.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-b);_<=rR&&(c-=_)}else h<=rR&&(c+=h);return{width:c,height:l,x:f,y:d}}const t8=new Set(["absolute","fixed"]);function n8(e,t){const n=sa(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=wn(e)?yc(e):Ir(1),l=e.clientWidth*c.x,f=e.clientHeight*c.y,d=i*c.x,h=r*c.y;return{width:l,height:f,x:d,y:h}}function oR(e,t,n){let r;if(t==="viewport")r=e8(e,n);else if(t==="document")r=J5(kr(e));else if(_t(t))r=n8(t,n);else{const i=$I(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return vh(r)}function jI(e,t){const n=ho(e);return n===t||!_t(n)||uo(n)?!1:ks(n).position==="fixed"||jI(n,t)}function s8(e,t){const n=t.get(e);if(n)return n;let r=ai(e,[],!1).filter(f=>_t(f)&&mi(f)!=="body"),i=null;const c=ks(e).position==="fixed";let l=c?ho(e):e;for(;_t(l)&&!uo(l);){const f=ks(l),d=Ab(l);!d&&f.position==="fixed"&&(i=null),(c?!d&&!i:!d&&f.position==="static"&&!!i&&t8.has(i.position)||la(l)&&!d&&jI(e,l))?r=r.filter(y=>y!==l):i=f,l=ho(l)}return t.set(e,r),r}function r8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Wh(t)?[]:s8(t,this._c):[].concat(n),r],f=l[0],d=l.reduce((h,y)=>{const g=oR(t,y,i);return h.top=As(g.top,h.top),h.right=Cc(g.right,h.right),h.bottom=Cc(g.bottom,h.bottom),h.left=As(g.left,h.left),h},oR(t,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function o8(e){const{width:t,height:n}=BI(e);return{width:t,height:n}}function i8(e,t,n){const r=wn(t),i=kr(t),c=n==="fixed",l=sa(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const d=Ir(0);function h(){d.x=sp(i)}if(r||!r&&!c)if((mi(t)!=="body"||la(i))&&(f=ep(t)),r){const b=sa(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&h();c&&!r&&i&&h();const y=i&&!r&&!c?UI(i,f):Ir(0),g=l.left+f.scrollLeft-d.x-y.x,v=l.top+f.scrollTop-d.y-y.y;return{x:g,y:v,width:l.width,height:l.height}}function ky(e){return ks(e).position==="static"}function iR(e,t){if(!wn(e)||ks(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function HI(e,t){const n=hn(e);if(Wh(e))return n;if(!wn(e)){let i=ho(e);for(;i&&!uo(i);){if(_t(i)&&!ky(i))return i;i=ho(i)}return n}let r=iR(e,t);for(;r&&d$(r)&&ky(r);)r=iR(r,t);return r&&uo(r)&&ky(r)&&!Ab(r)?n:r||y$(e)||n}const a8=async function(e){const t=this.getOffsetParent||HI,n=this.getDimensions,r=await n(e.floating);return{reference:i8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function c8(e){return ks(e).direction==="rtl"}const l8={convertOffsetParentRelativeRectToViewportRelativeRect:X5,getDocumentElement:kr,getClippingRect:r8,getOffsetParent:HI,getElementRects:a8,getClientRects:W5,getDimensions:o8,getScale:yc,isElement:_t,isRTL:c8};function FI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function u8(e,t){let n=null,r;const i=kr(e);function c(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function l(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||t(),!v||!b)return;const _=Md(g),x=Md(i.clientWidth-(y+v)),R=Md(i.clientHeight-(g+b)),C=Md(y),O={rootMargin:-_+"px "+-x+"px "+-R+"px "+-C+"px",threshold:As(0,Cc(1,d))||1};let D=!0;function N(U){const B=U[0].intersectionRatio;if(B!==d){if(!D)return l();B?l(!1,B):r=setTimeout(()=>{l(!1,1e-7)},1e3)}B===1&&!FI(h,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...O,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,O)}n.observe(e)}return l(!0),c}function aR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Bb(e),y=i||c?[...h?ai(h):[],...ai(t)]:[];y.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const g=h&&f?u8(h,n):null;let v=-1,b=null;l&&(b=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,x=d?sa(e):null;d&&R();function R(){const C=sa(e);x&&!FI(x,C)&&n(),x=C,_=requestAnimationFrame(R)}return n(),()=>{var C;y.forEach(A=>{i&&A.removeEventListener("scroll",n),c&&A.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const f8=V5,d8=G5,h8=H5,p8=Z5,m8=F5,g8=K5,y8=(e,t,n)=>{const r=new Map,i={platform:l8,...n},c={...i.platform,_c:r};return j5(e,t,{...i,platform:c})};var v8=typeof document<"u",b8=function(){},Jd=v8?I.useLayoutEffect:b8;function Rh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!Rh(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function qI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cR(e,t){const n=qI(e);return Math.round(t*n)/n}function Py(e){const t=I.useRef(e);return Jd(()=>{t.current=e}),t}function S8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:l}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=I.useState(r);Rh(v,r)||b(r);const[_,x]=I.useState(null),[R,C]=I.useState(null),A=I.useCallback(j=>{j!==U.current&&(U.current=j,x(j))},[]),O=I.useCallback(j=>{j!==B.current&&(B.current=j,C(j))},[]),D=c||_,N=l||R,U=I.useRef(null),B=I.useRef(null),k=I.useRef(y),K=d!=null,ne=Py(d),le=Py(i),G=Py(h),Z=I.useCallback(()=>{if(!U.current||!B.current)return;const j={placement:t,strategy:n,middleware:v};le.current&&(j.platform=le.current),y8(U.current,B.current,j).then(ve=>{const Ce={...ve,isPositioned:G.current!==!1};ye.current&&!Rh(k.current,Ce)&&(k.current=Ce,pi.flushSync(()=>{g(Ce)}))})},[v,t,n,le,G]);Jd(()=>{h===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,g(j=>({...j,isPositioned:!1})))},[h]);const ye=I.useRef(!1);Jd(()=>(ye.current=!0,()=>{ye.current=!1}),[]),Jd(()=>{if(D&&(U.current=D),N&&(B.current=N),D&&N){if(ne.current)return ne.current(D,N,Z);Z()}},[D,N,Z,ne,K]);const fe=I.useMemo(()=>({reference:U,floating:B,setReference:A,setFloating:O}),[A,O]),q=I.useMemo(()=>({reference:D,floating:N}),[D,N]),X=I.useMemo(()=>{const j={position:n,left:0,top:0};if(!q.floating)return j;const ve=cR(q.floating,y.x),Ce=cR(q.floating,y.y);return f?{...j,transform:"translate("+ve+"px, "+Ce+"px)",...qI(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:Ce}},[n,f,q.floating,y.x,y.y]);return I.useMemo(()=>({...y,update:Z,refs:fe,elements:q,floatingStyles:X}),[y,Z,fe,q,X])}const _8=(e,t)=>({...f8(e),options:[e,t]}),w8=(e,t)=>({...d8(e),options:[e,t]}),E8=(e,t)=>({...g8(e),options:[e,t]}),x8=(e,t)=>({...h8(e),options:[e,t]}),R8=(e,t)=>({...p8(e),options:[e,t]}),C8=(e,t)=>({...m8(e),options:[e,t]}),T8={intentional:"onClick",sloppy:"onPointerDown"};function A8(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function VI(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=n.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:b=!1,referencePressEvent:_="sloppy",ancestorScroll:x=!1,bubbles:R,externalTree:C}=t,A=Lu(C),O=Ze(typeof g=="function"?g:()=>!1),D=typeof g=="function"?O:g,N=I.useRef(!1),{escapeKey:U,outsidePress:B}=A8(R),k=I.useRef(null),K=fi(),ne=fi(),le=Ze(()=>{ne.clear(),d.current.insideReactTree=!1}),G=I.useRef(!1),Z=I.useRef(""),ye=Ze(re=>{Z.current=re.pointerType}),fe=Ze(()=>{const re=Z.current,Fe=re==="pen"||!re?"mouse":re,Ae=typeof v=="function"?v():v;return typeof Ae=="string"?Ae:Ae[Fe]}),q=Ze(re=>{if(!r||!h||!y||re.key!=="Escape"||G.current)return;const Fe=d.current.floatingContext?.nodeId,Ae=A?Wi(A.nodesRef.current,Fe):[];if(!U&&Ae.length>0){let Pe=!0;if(Ae.forEach(Ve=>{Ve.context?.open&&!Ve.context.dataRef.current.__escapeKeyBubbles&&(Pe=!1)}),!Pe)return}const Pt=MU(re)?re.nativeEvent:re,_e=qt(Nb,Pt);n.setOpen(!1,_e),!U&&!_e.isPropagationAllowed&&re.stopPropagation()}),X=Ze(re=>{const Fe=fe();return Fe==="intentional"&&re.type!=="click"||Fe==="sloppy"&&re.type==="click"}),j=Ze(()=>{d.current.insideReactTree=!0,ne.start(0,le)}),ve=Ze((re,Fe=!1)=>{if(X(re)){le();return}if(d.current.insideReactTree){le();return}if(fe()==="intentional"&&Fe||typeof D=="function"&&!D(re))return;const Ae=ns(re),Pt=`[${Ac("inert")}]`,_e=_n(n.select("floatingElement")).querySelectorAll(Pt),Pe=n.context.triggerElements;if(Ae&&(Pe.hasElement(Ae)||Pe.hasMatchingElement(Le=>bt(Le,Ae))))return;let Ve=_t(Ae)?Ae:null;for(;Ve&&!uo(Ve);){const Le=ho(Ve);if(uo(Le)||!_t(Le))break;Ve=Le}if(_e.length&&_t(Ae)&&!AU(Ae)&&!bt(Ae,n.select("floatingElement"))&&Array.from(_e).every(Le=>!bt(Ve,Le)))return;if(wn(Ae)&&!("touches"in re)){const Le=uo(Ae),tn=ks(Ae),it=/auto|scroll/,vs=Le||it.test(tn.overflowX),gt=Le||it.test(tn.overflowY),Bt=vs&&Ae.clientWidth>0&&Ae.scrollWidth>Ae.clientWidth,$t=gt&&Ae.clientHeight>0&&Ae.scrollHeight>Ae.clientHeight,nn=tn.direction==="rtl",bs=$t&&(nn?re.offsetX<=Ae.offsetWidth-Ae.clientWidth:re.offsetX>Ae.clientWidth),Ls=Bt&&re.offsetY>Ae.clientHeight;if(bs||Ls)return}const Qe=d.current.floatingContext?.nodeId,ut=A&&Wi(A.nodesRef.current,Qe).some(Le=>pr(re,Le.context?.elements.floating));if(pr(re,n.select("floatingElement"))||pr(re,n.select("domReferenceElement"))||ut)return;const Be=A?Wi(A.nodesRef.current,Qe):[];if(Be.length>0){let Le=!0;if(Be.forEach(tn=>{tn.context?.open&&!tn.context.dataRef.current.__outsidePressBubbles&&(Le=!1)}),!Le)return}n.setOpen(!1,qt(RI,re)),le()}),Ce=Ze(re=>{fe()!=="sloppy"||re.pointerType==="touch"||!n.select("open")||!h||pr(re,n.select("floatingElement"))||pr(re,n.select("domReferenceElement"))||ve(re)}),P=Ze(re=>{if(fe()!=="sloppy"||!n.select("open")||!h||pr(re,n.select("floatingElement"))||pr(re,n.select("domReferenceElement")))return;const Fe=re.touches[0];Fe&&(k.current={startTime:Date.now(),startX:Fe.clientX,startY:Fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},K.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),te=Ze(re=>{const Fe=ns(re);function Ae(){P(re),Fe?.removeEventListener(re.type,Ae)}Fe?.addEventListener(re.type,Ae)}),oe=Ze(re=>{const Fe=N.current;if(N.current=!1,K.clear(),re.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Ae=ns(re);function Pt(){re.type==="pointerdown"?Ce(re):ve(re,Fe),Ae?.removeEventListener(re.type,Pt)}Ae?.addEventListener(re.type,Pt)}),de=Ze(re=>{if(fe()!=="sloppy"||!k.current||pr(re,n.select("floatingElement"))||pr(re,n.select("domReferenceElement")))return;const Fe=re.touches[0];if(!Fe)return;const Ae=Math.abs(Fe.clientX-k.current.startX),Pt=Math.abs(Fe.clientY-k.current.startY),_e=Math.sqrt(Ae*Ae+Pt*Pt);_e>5&&(k.current.dismissOnTouchEnd=!0),_e>10&&(ve(re),K.clear(),k.current=null)}),Re=Ze(re=>{const Fe=ns(re);function Ae(){de(re),Fe?.removeEventListener(re.type,Ae)}Fe?.addEventListener(re.type,Ae)}),Se=Ze(re=>{fe()!=="sloppy"||!k.current||pr(re,n.select("floatingElement"))||pr(re,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&ve(re),K.clear(),k.current=null)}),be=Ze(re=>{const Fe=ns(re);function Ae(){Se(re),Fe?.removeEventListener(re.type,Ae)}Fe?.addEventListener(re.type,Ae)});I.useEffect(()=>{if(!r||!h)return;d.current.__escapeKeyBubbles=U,d.current.__outsidePressBubbles=B;const re=new ui;function Fe(Ve){n.setOpen(!1,qt(Pb,Ve))}function Ae(){re.clear(),G.current=!0}function Pt(){re.start(Jh()?5:0,()=>{G.current=!1})}const _e=_n(i);_e.addEventListener("pointerdown",ye,!0),y&&(_e.addEventListener("keydown",q),_e.addEventListener("compositionstart",Ae),_e.addEventListener("compositionend",Pt)),D&&(_e.addEventListener("click",oe,!0),_e.addEventListener("pointerdown",oe,!0),_e.addEventListener("touchstart",te,!0),_e.addEventListener("touchmove",Re,!0),_e.addEventListener("touchend",be,!0),_e.addEventListener("mousedown",oe,!0));let Pe=[];return x&&(_t(l)&&(Pe=ai(l)),_t(i)&&(Pe=Pe.concat(ai(i))),!_t(c)&&c&&c.contextElement&&(Pe=Pe.concat(ai(c.contextElement)))),Pe=Pe.filter(Ve=>Ve!==_e.defaultView?.visualViewport),Pe.forEach(Ve=>{Ve.addEventListener("scroll",Fe,{passive:!0})}),()=>{_e.removeEventListener("pointerdown",ye,!0),y&&(_e.removeEventListener("keydown",q),_e.removeEventListener("compositionstart",Ae),_e.removeEventListener("compositionend",Pt)),D&&(_e.removeEventListener("click",oe,!0),_e.removeEventListener("pointerdown",oe,!0),_e.removeEventListener("touchstart",te,!0),_e.removeEventListener("touchmove",Re,!0),_e.removeEventListener("touchend",be,!0),_e.removeEventListener("mousedown",oe,!0)),Pe.forEach(Ve=>{Ve.removeEventListener("scroll",Fe)}),re.clear(),N.current=!1}},[d,i,c,l,y,D,r,f,x,h,U,B,q,ve,oe,Ce,te,Re,be,ye,n]),I.useEffect(le,[D,le]);const Ye=I.useMemo(()=>({onKeyDown:q,...b&&{[T8[_]]:re=>{n.setOpen(!1,qt(Eh,re.nativeEvent))},..._!=="intentional"&&{onClick(re){n.setOpen(!1,qt(Eh,re.nativeEvent))}}}}),[q,n,b,_]),He=Ze(re=>{const Fe=ns(re.nativeEvent);!bt(n.select("floatingElement"),Fe)||re.button!==0||(N.current=!0)}),ht=Ze(re=>{!r||!h||re.button!==0||(N.current=!0)}),Ht=I.useMemo(()=>({onKeyDown:q,onPointerDown:He,onMouseDown:He,onMouseUp:He,onClickCapture:j,onMouseDownCapture(re){j(),ht(re)},onPointerDownCapture(re){j(),ht(re)},onMouseUpCapture:j,onTouchEndCapture:j,onTouchMoveCapture:j}),[q,He,j,ht]);return I.useMemo(()=>h?{reference:Ye,floating:Ht,trigger:Ye}:{},[h,Ye,Ht])}var Ch=Symbol("NOT_FOUND");function I8(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function O8(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function M8(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var lR=e=>Array.isArray(e)?e:[e];function D8(e){const t=Array.isArray(e[0])?e[0]:e;return M8(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function k8(e,t){const n=[],{length:r}=e;for(let i=0;it(f,h.key));if(d>-1){const h=n[d];return d>0&&(n.splice(d,1),n.unshift(h)),h.value}return Ch}function i(f,d){r(f)===Ch&&(n.unshift({key:f,value:d}),n.length>e&&n.pop())}function c(){return n}function l(){n=[]}return{get:r,put:i,getEntries:c,clear:l}}var z8=(e,t)=>e===t;function L8(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let c=0;cc(b.value,y));v&&(y=v.value,f!==0&&f--)}d.put(arguments,y)}return y}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var $8=class{constructor(e){this.value=e}deref(){return this.value}},U8=typeof WeakRef<"u"?WeakRef:$8,j8=0,uR=1;function zd(){return{s:j8,v:void 0,o:null,p:null}}function GI(e,t={}){let n=zd();const{resultEqualityCheck:r}=t;let i,c=0;function l(){let f=n;const{length:d}=arguments;for(let g=0,v=d;g{n=zd(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}function KI(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let c=0,l=0,f,d={},h=i.pop();typeof h=="object"&&(d=h,h=i.pop()),I8(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...n,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:b=GI,argsMemoizeOptions:_=[]}=y,x=lR(v),R=lR(_),C=D8(i),A=g(function(){return c++,h.apply(null,arguments)},...x),O=b(function(){l++;const N=k8(C,arguments);return f=A.apply(null,N),f},...R);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var H8=KI(GI),F8=Object.assign((e,t=H8)=>{O8(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(c=>e[c]);return t(r,(...c)=>c.reduce((l,f,d)=>(l[n[d]]=f,l),{}))},{withTypes:()=>F8});KI({memoize:B8,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ot=(e,t,n,r,i,c,...l)=>{if(l.length>0)throw new Error(go(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var q8=CA();const V8=Cb(19),G8=V8?Z8:Q8;function K8(e,t,n,r,i){return G8(e,t,n,r,i)}function Z8(e,t,n,r,i){const c=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return q8.useSyncExternalStore(e.subscribe,c,c)}function Q8(e,t,n,r,i){return TA.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,n,r,i))}class cu{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){cu.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||cu.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};cu.prototype.setState.call(this,t)}}class $b extends cu{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),mt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;mt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);mt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const i=this,c=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,c),!c&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),mt(()=>{c&&!Object.is(i.state[t],n)&&super.setState({...i.state,[t]:n})},[i,t,n,r,c])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const c=this.selectors[t];return c(this.state,n,r,i)};useState=(t,n,r,i)=>{I.useDebugValue(t);const c=this.selectors[t];return K8(this,c,n,r,i)};useContextCallback(t,n){I.useDebugValue(t);const r=Ze(n??BA);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(c=>{const l=r(c);if(!Object.is(i,l)){const f=i;i=l,n(l,f,this)}})}}const Y8={open:ot(e=>e.open),domReferenceElement:ot(e=>e.domReferenceElement),referenceElement:ot(e=>e.positionReference??e.referenceElement),floatingElement:ot(e=>e.floatingElement),floatingId:ot(e=>e.floatingId)};class Ub extends $b{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:c,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:E5(),nested:n,noEmit:r,triggerElements:c},Y8)}setOpen=(t,n)=>{if((!t||!this.state.open||PU(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function X8(e,t=!1,n=!1){const[r,i]=I.useState(e&&t?"idle":void 0),[c,l]=I.useState(e);return e&&!c&&(l(!0),i("starting")),!e&&c&&r!=="ending"&&!n&&i("ending"),!e&&!c&&r==="ending"&&i(void 0),mt(()=>{if(!e&&c&&r!=="ending"&&n){const f=Tr.request(()=>{i("ending")});return()=>{Tr.cancel(f)}}},[e,c,r,n]),mt(()=>{if(!e||t)return;const f=Tr.request(()=>{i(void 0)});return()=>{Tr.cancel(f)}},[t,e]),mt(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&i("starting");const f=Tr.request(()=>{i("idle")});return()=>{Tr.cancel(f)}},[t,e,c,i,r]),I.useMemo(()=>({mounted:c,setMounted:l,transitionStatus:r}),[c,r])}function W8(e,t=!1,n=!0){const r=DI();return Ze((i,c=null)=>{r.cancel();function l(){pi.flushSync(i)}const f=ro(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let h=function(){const g=_u.startingStyle;if(!d.hasAttribute(g)){r.request(y);return}const v=new MutationObserver(()=>{d.hasAttribute(g)||(v.disconnect(),y())});v.observe(d,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||l()}).catch(()=>{const g=d.getAnimations();if(n){if(c?.aborted)return;l()}else g.length>0&&g.some(v=>v.pending||v.playState!=="finished")&&y()})};if(t){h();return}r.request(y)}})}function jb(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,c=Ze(i),l=W8(r,n,!1);I.useEffect(()=>{if(!t)return;const f=new AbortController;return l(c,f.signal),()=>{f.abort()}},[t,n,c,l])}function J8(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(i=>{if(e!==void 0){if(n.current!==null){const c=n.current,l=r.current,f=t.context.triggerElements.getById(c);l&&f===l&&t.context.triggerElements.delete(c),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function ej(e,t,n,r){const i=n.useState("isMountedByTrigger",e),c=J8(e,n),l=Ze(f=>{if(c(f),!f||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:f,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:f,...r})});return mt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function ZI(e){const t=e.useState("open");mt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function QI(e,t,n){const{mounted:r,setMounted:i,transitionStatus:c}=X8(e);t.useSyncedValues({mounted:r,transitionStatus:c});const l=Ze(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return jb({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:c}}class rp{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function tj(){return new Ub({open:!1,floatingElement:null,referenceElement:null,triggerElements:new rp,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function YI(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:tj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Is,inactiveTriggerProps:Is,popupProps:Is}}const XI={open:ot(e=>e.open),mounted:ot(e=>e.mounted),transitionStatus:ot(e=>e.transitionStatus),floatingRootContext:ot(e=>e.floatingRootContext),preventUnmountingOnClose:ot(e=>e.preventUnmountingOnClose),payload:ot(e=>e.payload),activeTriggerId:ot(e=>e.activeTriggerId),activeTriggerElement:ot(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ot((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ot((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ot(e=>e.popupProps),popupElement:ot(e=>e.popupElement),positionerElement:ot(e=>e.positionerElement)};function nj(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Pu(),c=np()!=null,l=Dr(()=>new Ub({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new rp,floatingId:i,nested:c,noEmit:e.noEmit||!1})).current;return mt(()=>{const f={open:t,floatingId:i};r.reference!==void 0&&(f.referenceElement=r.reference,f.domReferenceElement=_t(r.reference)?r.reference:null),r.floating!==void 0&&(f.floatingElement=r.floating),l.update(f)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=c,l.context.noEmit=e.noEmit||!1,l}function sj(e={}){const{nodeId:t,externalTree:n}=e,r=nj(e),i=e.rootContext||r,c={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,f]=I.useState(null),d=I.useRef(null),h=Lu(n);mt(()=>{c.domReference&&(d.current=c.domReference)},[c.domReference]);const y=S8({...e,elements:{...c,...l&&{reference:l}}}),g=I.useCallback(B=>{const k=_t(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),getClientRects:()=>B.getClientRects(),contextElement:B}:B;f(k),y.refs.setReference(k)},[y.refs]),[v,b]=I.useState(null),[_,x]=I.useState(null);i.useSyncedValue("referenceElement",v),i.useSyncedValue("domReferenceElement",_t(v)?v:null),i.useSyncedValue("floatingElement",_);const R=I.useCallback(B=>{(_t(B)||B===null)&&(d.current=B,b(B)),(_t(y.refs.reference.current)||y.refs.reference.current===null||B!==null&&!_t(B))&&y.refs.setReference(B)},[y.refs,b]),C=I.useCallback(B=>{x(B),y.refs.setFloating(B)},[y.refs]),A=I.useMemo(()=>({...y.refs,setReference:R,setFloating:C,setPositionReference:g,domReference:d}),[y.refs,R,C,g]),O=I.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),D=i.useState("open"),N=i.useState("floatingId"),U=I.useMemo(()=>({...y,dataRef:i.context.dataRef,open:D,onOpenChange:i.setOpen,events:i.context.events,floatingId:N,refs:A,elements:O,nodeId:t,rootStore:i}),[y,A,O,t,i,D,N]);return mt(()=>{i.context.dataRef.current.floatingContext=U;const B=h?.nodesRef.current.find(k=>k.id===t);B&&(B.context=U)}),I.useMemo(()=>({...y,context:U,refs:A,elements:O,rootStore:i}),[y,A,O,U,i])}function WI(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,c=Pu(),l=np()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),y=t.context.triggerElements,g=Dr(()=>new Ub({open:f,referenceElement:d,floatingElement:h,triggerElements:y,onOpenChange:i,floatingId:c,nested:l,noEmit:n})).current;return mt(()=>{const v={open:f,floatingId:c,referenceElement:d,floatingElement:h};_t(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,c,d,h,g]),g.context.onOpenChange=i,g.context.nested=l,g.context.noEmit=n,g}const Ny=xU&&cI;function rj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:c=!0,visibleOnly:l=!0,delay:f}=t,d=I.useRef(!1),h=I.useRef(null),y=fi(),g=I.useRef(!0);I.useEffect(()=>{const b=n.select("domReferenceElement");if(!c)return;const _=hn(b);function x(){const A=n.select("domReferenceElement");!n.select("open")&&wn(A)&&A===ei(_n(A))&&(d.current=!0)}function R(){g.current=!0}function C(){g.current=!1}return _.addEventListener("blur",x),Ny&&(_.addEventListener("keydown",R,!0),_.addEventListener("pointerdown",C,!0)),()=>{_.removeEventListener("blur",x),Ny&&(_.removeEventListener("keydown",R,!0),_.removeEventListener("pointerdown",C,!0))}},[n,c]),I.useEffect(()=>{if(!c)return;function b(_){if(_.reason===Eh||_.reason===Nb){const x=n.select("domReferenceElement");_t(x)&&(h.current=x,d.current=!0)}}return r.on("openchange",b),()=>{r.off("openchange",b)}},[r,c,n]);const v=I.useMemo(()=>({onMouseLeave(){d.current=!1,h.current=null},onFocus(b){const _=b.currentTarget;if(d.current){if(h.current===_)return;d.current=!1,h.current=null}const x=ns(b.nativeEvent);if(l&&_t(x)){if(Ny&&!b.relatedTarget){if(!g.current&&!hI(x))return}else if(!IU(x))return}const R=b.relatedTarget&&n.context.triggerElements.hasElement(b.relatedTarget),{nativeEvent:C,currentTarget:A}=b,O=typeof f=="function"?f():f;if(n.select("open")&&R||O===0||O===void 0){n.setOpen(!0,qt(Xd,C,A));return}y.start(O,()=>{d.current||n.setOpen(!0,qt(Xd,C,A))})},onBlur(b){d.current=!1,h.current=null;const _=b.relatedTarget,x=b.nativeEvent,R=_t(_)&&_.hasAttribute(Ac("focus-guard"))&&_.getAttribute("data-type")==="outside";y.start(0,()=>{const C=n.select("domReferenceElement"),A=ei(C?C.ownerDocument:document);if(!_&&A===C||bt(i.current.floatingContext?.refs.floating.current,A)||bt(C,A)||R)return;const O=_??A;if(_t(O)){const D=n.context.triggerElements;if(D.hasElement(O)||D.hasMatchingElement(N=>bt(N,O)))return}n.setOpen(!1,qt(Xd,x))})}}),[i,n,l,y,f]);return I.useMemo(()=>c?{reference:v,trigger:v}:{},[c,v])}const Kv=Ac("safe-polygon"),oj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${dI}`;function ij(e){return e?!!e.closest(oj):!1}function JI(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(void 0),i=I.useRef(!0),c=I.useRef(!1),l=I.useRef(()=>{}),f=I.useRef(!1),d=fi(),h=fi(),y=I.useRef(void 0);return I.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:c,unbindMouseMoveRef:l,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:y}),g.hoverInteractionState},[e,t,n,r,i,c,l,f,d,h,y])}const aj=new Set(["click","mousedown"]);function cj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:y,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:b,unbindMouseMoveRef:_,restTimeoutPendingRef:x,openChangeTimeout:R,handleCloseOptionsRef:C}=JI(n),A=Lu(h),O=np(),D=Ze(()=>g.current?!0:l.current.openEvent?aj.has(l.current.openEvent.type):!1),N=Ze(()=>{const ne=l.current.openEvent?.type;return ne?.includes("mouse")&&ne!=="mousedown"}),U=I.useCallback((ne,le=!0)=>{const G=lj(d,y.current);G&&!v.current?R.start(G,()=>n.setOpen(!1,qt(yr,ne))):le&&(R.clear(),n.setOpen(!1,qt(yr,ne)))},[d,v,n,y,R]),B=Ze(()=>{_.current(),v.current=void 0}),k=Ze(()=>{if(b.current){const ne=_n(i).body;ne.style.pointerEvents="",ne.removeAttribute(Kv),b.current=!1}}),K=Ze(ne=>{const le=ns(ne);if(!ij(le)){g.current=!1;return}g.current=!0});mt(()=>{r||(y.current=void 0,x.current=!1,g.current=!1,B(),k())},[r,y,x,g,B,k]),I.useEffect(()=>()=>{B()},[B]),I.useEffect(()=>k,[k]),mt(()=>{if(f&&r&&C.current?.blockPointerEvents&&N()&&_t(c)&&i){b.current=!0;const ne=_n(i).body;ne.setAttribute(Kv,"");const le=c,G=i,Z=A?.nodesRef.current.find(ye=>ye.id===O)?.context?.elements.floating;return Z&&(Z.style.pointerEvents=""),ne.style.pointerEvents="none",le.style.pointerEvents="auto",G.style.pointerEvents="auto",()=>{ne.style.pointerEvents="",le.style.pointerEvents="",G.style.pointerEvents=""}}},[f,r,c,i,C,N,A,O,b]),I.useEffect(()=>{if(!f)return;function ne(ye){if(D()||!l.current.floatingContext||!n.select("open"))return;const fe=n.context.triggerElements;ye.relatedTarget&&fe.hasElement(ye.relatedTarget)||(k(),B(),D()||U(ye))}function le(ye){R.clear(),k(),v.current?.(ye),B()}function G(ye){D()||U(ye,!1)}const Z=i;return Z&&(Z.addEventListener("mouseleave",ne),Z.addEventListener("mouseenter",le),Z.addEventListener("mouseleave",G),Z.addEventListener("pointerdown",K,!0)),()=>{Z&&(Z.removeEventListener("mouseleave",ne),Z.removeEventListener("mouseenter",le),Z.removeEventListener("mouseleave",G),Z.removeEventListener("pointerdown",K,!0))}})}function lj(e,t){return t&&!Su(t)?0:typeof e=="function"?e():e}function zy(e){return typeof e=="function"?e():e}const uj={current:null};function fj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:c=!0,delay:l=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:y=!0,triggerElementRef:g=uj,externalTree:v,isActiveTrigger:b=!0}=t,_=Lu(v),{pointerTypeRef:x,interactedInsideRef:R,handlerRef:C,blockMouseMoveRef:A,performedPointerEventsMutationRef:O,unbindMouseMoveRef:D,restTimeoutPendingRef:N,openChangeTimeout:U,restTimeout:B,handleCloseOptionsRef:k}=JI(n),K=Ar(f),ne=Ar(l),le=Ar(h);b&&(k.current=K.current?.__options);const G=Ze(()=>R.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),Z=I.useCallback((X,j=!0)=>{const ve=Wd(ne.current,"close",x.current);ve&&!C.current?U.start(ve,()=>n.setOpen(!1,qt(yr,X))):j&&(U.clear(),n.setOpen(!1,qt(yr,X)))},[ne,C,n,x,U]),ye=Ze(()=>{D.current(),C.current=void 0}),fe=Ze(()=>{if(O.current){const X=_n(n.select("domReferenceElement")).body;X.style.pointerEvents="",X.removeAttribute(Kv),O.current=!1}});I.useEffect(()=>{if(!c)return;function X(j){j.open||(U.clear(),B.clear(),A.current=!0,N.current=!1)}return i.on("openchange",X),()=>{i.off("openchange",X)}},[c,i,U,B,A,N]);const q=Ze(X=>{if(G()||!r.current.floatingContext)return;const j=n.context.triggerElements;if(X.relatedTarget&&j.hasElement(X.relatedTarget))return;const ve=g.current;K.current?.({...r.current.floatingContext,tree:_,x:X.clientX,y:X.clientY,onClose(){fe(),ye(),!G()&&ve===n.select("domReferenceElement")&&Z(X)}})(X)});return I.useEffect(()=>{if(!c)return;const X=g.current??(b?n.select("domReferenceElement"):null);if(!_t(X))return;function j(P){if(U.clear(),A.current=!1,d&&!Su(x.current)||zy(le.current)>0&&!Wd(ne.current,"open"))return;const te=Wd(ne.current,"open",x.current),oe=n.select("domReferenceElement"),de=n.context.triggerElements,Re=(de.hasElement(P.target)||de.hasMatchingElement(He=>bt(He,P.target)))&&(!oe||!bt(oe,P.target)),Se=P.currentTarget??null,be=n.select("open"),Ye=!be||Re;Re&&be?n.setOpen(!0,qt(yr,P,Se)):te?U.start(te,()=>{Ye&&n.setOpen(!0,qt(yr,P,Se))}):Ye&&n.setOpen(!0,qt(yr,P,Se))}function ve(P){if(G()){fe();return}D.current();const te=n.select("domReferenceElement"),oe=_n(te);B.clear(),N.current=!1;const de=n.context.triggerElements;if(P.relatedTarget&&de.hasElement(P.relatedTarget))return;if(K.current&&r.current.floatingContext){n.select("open")||U.clear();const Se=g.current;C.current=K.current({...r.current.floatingContext,tree:_,x:P.clientX,y:P.clientY,onClose(){fe(),ye(),!G()&&Se===n.select("domReferenceElement")&&Z(P,!0)}});const be=C.current;be(P),oe.addEventListener("mousemove",be),D.current=()=>{oe.removeEventListener("mousemove",be)};return}(x.current!=="touch"||!bt(n.select("floatingElement"),P.relatedTarget))&&Z(P)}function Ce(P){q(P)}return n.select("open")&&X.addEventListener("mouseleave",Ce),y&&X.addEventListener("mousemove",j,{once:!0}),X.addEventListener("mouseenter",j),X.addEventListener("mouseleave",ve),()=>{X.removeEventListener("mouseleave",Ce),y&&X.removeEventListener("mousemove",j),X.removeEventListener("mouseenter",j),X.removeEventListener("mouseleave",ve)}},[ye,fe,A,r,ne,Z,n,c,K,q,b,G,d,y,x,le,B,N,U,g,_,D,C]),I.useMemo(()=>{function X(j){x.current=j.pointerType}return{onPointerDown:X,onPointerEnter:X,onMouseMove(j){const{nativeEvent:ve}=j,Ce=j.currentTarget,P=n.select("domReferenceElement"),te=n.context.triggerElements,oe=n.select("open"),de=(te.hasElement(j.target)||te.hasMatchingElement(Se=>bt(Se,j.target)))&&(!P||!bt(P,j.target));if(d&&!Su(x.current)||oe&&!de||zy(le.current)===0||!de&&N.current&&j.movementX**2+j.movementY**2<2)return;B.clear();function Re(){if(N.current=!1,G())return;const Se=n.select("open");!A.current&&(!Se||de)&&n.setOpen(!0,qt(yr,ve,Ce))}x.current==="touch"?pi.flushSync(()=>{Re()}):de&&oe?Re():(N.current=!0,B.start(zy(le.current),Re))}}},[A,G,d,n,x,le,B,N])}function e2(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),c=I.useCallback(h=>Ld(h,e,"reference"),t),l=I.useCallback(h=>Ld(h,e,"floating"),n),f=I.useCallback(h=>Ld(h,e,"item"),r),d=I.useCallback(h=>Ld(h,e,"trigger"),i);return I.useMemo(()=>({getReferenceProps:c,getFloatingProps:l,getItemProps:f,getTriggerProps:d}),[c,l,f,d])}function Ld(e,t,n){const r=new Map,i=n==="item",c={};n==="floating"&&(c.tabIndex=-1,c[Uv]="");for(const l in e)i&&e&&(l===uI||l===fI)||(c[l]=e[l]);for(let l=0;lr.get(i)?.map(f=>f(...l)).find(f=>f!==void 0))):e[i]=c)}}const dj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),c=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=Pu(),y=c?.id||h,g=I.useMemo(()=>jv(l)?.id||i,[l,i]),v=dj.get(d)??d,_=np()!=null,x=I.useMemo(()=>v==="tooltip"||d==="label"?Is:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,_,d]),R=I.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...v==="menu"&&{id:y}},[v,g,r,y,d,x]),C=I.useMemo(()=>{const O={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?O:{...O,...v==="menu"&&{"aria-labelledby":y}}},[v,g,y,d]),A=I.useCallback(({active:O,selected:D})=>{const N={role:"option",...O&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...N,"aria-selected":D}}return{}},[g,d]);return I.useMemo(()=>f?{reference:R,floating:C,item:A,trigger:x}:{},[f,R,C,x,A])}function dR(e,t){const[n,r]=e;let i=!1;const c=t.length;for(let l=0,f=c-1;l=r!=g>=r&&n<=(y-d)*(r-h)/(g-h)+d&&(i=!i)}return i}function pj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function mj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new ui;let c=!1,l=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const b=performance.now(),_=b-d;if(l===null||f===null||_===0)return l=g,f=v,d=b,null;const x=g-l,R=v-f,A=Math.sqrt(x*x+R*R)/_;return l=g,f=v,d=b,A}const y=({x:g,y:v,placement:b,elements:_,onClose:x,nodeId:R,tree:C})=>function(O){function D(){i.clear(),x()}if(i.clear(),!_.domReference||!_.floating||b==null||g==null||v==null)return;const{clientX:N,clientY:U}=O,B=[N,U],k=ns(O),K=O.type==="mouseleave",ne=bt(_.floating,k),le=bt(_.domReference,k),G=_.domReference.getBoundingClientRect(),Z=_.floating.getBoundingClientRect(),ye=b.split("-")[0],fe=g>Z.right-Z.width/2,q=v>Z.bottom-Z.height/2,X=pj(B,G),j=Z.width>G.width,ve=Z.height>G.height,Ce=(j?G:Z).left,P=(j?G:Z).right,te=(ve?G:Z).top,oe=(ve?G:Z).bottom;if(ne&&(c=!0,!K))return;if(le&&(c=!1),le&&!K){c=!0;return}if(K&&_t(O.relatedTarget)&&bt(_.floating,O.relatedTarget)||C&&Wi(C.nodesRef.current,R).some(({context:Se})=>Se?.open))return;if(ye==="top"&&v>=G.bottom-1||ye==="bottom"&&v<=G.top+1||ye==="left"&&g>=G.right-1||ye==="right"&&g<=G.left+1)return D();let de=[];switch(ye){case"top":de=[[Ce,G.top+1],[Ce,Z.bottom-1],[P,Z.bottom-1],[P,G.top+1]];break;case"bottom":de=[[Ce,Z.top+1],[Ce,G.bottom-1],[P,G.bottom-1],[P,Z.top+1]];break;case"left":de=[[Z.right-1,oe],[Z.right-1,te],[G.left+1,te],[G.left+1,oe]];break;case"right":de=[[G.right-1,oe],[G.right-1,te],[Z.left+1,te],[Z.left+1,oe]];break}function Re([Se,be]){switch(ye){case"top":{const Ye=[j?Se+t/2:fe?Se+t*4:Se-t*4,be+t+1],He=[j?Se-t/2:fe?Se+t*4:Se-t*4,be+t+1],ht=[[Z.left,fe||j?Z.bottom-t:Z.top],[Z.right,fe?j?Z.bottom-t:Z.top:Z.bottom-t]];return[Ye,He,...ht]}case"bottom":{const Ye=[j?Se+t/2:fe?Se+t*4:Se-t*4,be-t],He=[j?Se-t/2:fe?Se+t*4:Se-t*4,be-t],ht=[[Z.left,fe||j?Z.top+t:Z.bottom],[Z.right,fe?j?Z.top+t:Z.bottom:Z.top+t]];return[Ye,He,...ht]}case"left":{const Ye=[Se+t+1,ve?be+t/2:q?be+t*4:be-t*4],He=[Se+t+1,ve?be-t/2:q?be+t*4:be-t*4];return[...[[q||ve?Z.right-t:Z.left,Z.top],[q?ve?Z.right-t:Z.left:Z.right-t,Z.bottom]],Ye,He]}case"right":{const Ye=[Se-t,ve?be+t/2:q?be+t*4:be-t*4],He=[Se-t,ve?be-t/2:q?be+t*4:be-t*4],ht=[[q||ve?Z.left+t:Z.right,Z.top],[q?ve?Z.left+t:Z.right:Z.left+t,Z.bottom]];return[Ye,He,...ht]}default:return[]}}if(!dR([N,U],de)){if(c&&!X)return D();if(!K&&r){const Se=h(O.clientX,O.clientY);if(Se!==null&&Se<.1)return D()}dR([N,U],Re([g,v]))?!c&&r&&i.start(40,D):D()}};return y.__options={blockPointerEvents:n},y}let gj=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),yj=(function(e){return e[e.open=Zi.open]="open",e[e.closed=Zi.closed]="closed",e[e.startingStyle=Zi.startingStyle]="startingStyle",e[e.endingStyle=Zi.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const t2=I.createContext(void 0);function vj(){const e=I.useContext(t2);if(e===void 0)throw new Error(go(26));return e}const n2="ArrowUp",s2="ArrowDown",r2="ArrowLeft",o2="ArrowRight",i2="Home",a2="End",bj=new Set([r2,o2]),Sj=new Set([n2,s2]),_j=new Set([...bj,...Sj]);[..._j];const wj=new Set([n2,s2,r2,o2,i2,a2]),Ej={...zu,...zb,nestedDialogOpen(e){return e?{[yj.nestedDialogOpen]:""}:null}},xj=I.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:c,render:l,...f}=t,{store:d}=fa(),h=d.useState("descriptionElementId"),y=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),b=d.useState("modal"),_=d.useState("mounted"),x=d.useState("nested"),R=d.useState("nestedOpenDialogCount"),C=d.useState("open"),A=d.useState("openMethod"),O=d.useState("titleElementId"),D=d.useState("transitionStatus"),N=d.useState("role");vj(),jb({open:C,ref:d.context.popupRef,onComplete(){C&&d.context.onOpenChangeComplete?.(!0)}});function U(le){return le==="touch"?d.context.popupRef.current:!0}const B=c===void 0?U:c,k=R>0,K=I.useMemo(()=>({open:C,nested:x,transitionStatus:D,nestedDialogOpen:k}),[C,x,D,k]),ne=ir("div",t,{state:K,props:[v,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:N,tabIndex:-1,hidden:!_,onKeyDown(le){wj.has(le.key)&&le.stopPropagation()},style:{[gj.nestedDialogs]:R}},f],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:Ej});return $.jsx(B5,{context:g,openInteractionType:A,disabled:!_,closeOnFocusOut:!y,initialFocus:B,returnFocus:i,modal:b!==!1,restoreFocus:"popup",children:ne})});function Rj(e){return Cb(19)?e:e?"true":void 0}const Cj=I.forwardRef(function(t,n){const{cutout:r,...i}=t;let c;if(r){const l=r?.getBoundingClientRect();c=`polygon( +`+u.stack}}var Qe=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,nn=e.unstable_requestPaint,it=e.unstable_now,Ss=e.unstable_getCurrentPriorityLevel,gt=e.unstable_ImmediatePriority,Bt=e.unstable_UserBlockingPriority,$t=e.unstable_NormalPriority,sn=e.unstable_LowPriority,_s=e.unstable_IdlePriority,$s=e.log,$f=e.unstable_setDisableYieldValue,zo=null,jn=null;function ur(s){if(typeof $s=="function"&&$f(s),jn&&typeof jn.setStrictMode=="function")try{jn.setStrictMode(zo,s)}catch{}}var Hn=Math.clz32?Math.clz32:Us,Zt=Math.log,Fn=Math.LN2;function Us(s){return s>>>=0,s===0?32:31-(Zt(s)/Fn|0)|0}var Dn=256,fr=262144,dr=4194304;function js(s){var o=s&42;if(o!==0)return o;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Lo(s,o,a){var u=s.pendingLanes;if(u===0)return 0;var p=0,m=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var T=u&134217727;return T!==0?(u=T&~m,u!==0?p=js(u):(w&=T,w!==0?p=js(w):a||(a=T&~s,a!==0&&(p=js(a))))):(T=u&~m,T!==0?p=js(T):w!==0?p=js(w):a||(a=u&~s,a!==0&&(p=js(a)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:p}function Bo(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function pm(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Uf(){var s=dr;return dr<<=1,(dr&62914560)===0&&(dr=4194304),s}function Ml(s){for(var o=[],a=0;31>a;a++)o.push(s);return o}function Qi(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Dl(s,o,a,u,p,m){var w=s.pendingLanes;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=a,s.entangledLanes&=a,s.errorRecoveryDisabledLanes&=a,s.shellSuspendCounter=0;var T=s.entanglements,z=s.expirationTimes,X=s.hiddenUpdates;for(a=w&~a;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var ZN=/[\n"\\]/g;function Fs(s){return s.replace(ZN,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function vm(s,o,a,u,p,m,w,T){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+Hs(o)):s.value!==""+Hs(o)&&(s.value=""+Hs(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?bm(s,w,Hs(o)):a!=null?bm(s,w,Hs(a)):u!=null&&s.removeAttribute("value"),p==null&&m!=null&&(s.defaultChecked=!!m),p!=null&&(s.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+Hs(T):s.removeAttribute("name")}function F_(s,o,a,u,p,m,w,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(s.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){ym(s);return}a=a!=null?""+Hs(a):"",o=o!=null?""+Hs(o):a,T||o===s.value||(s.value=o),s.defaultValue=o}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=T?s.checked:!!u,s.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),ym(s)}function bm(s,o,a){o==="number"&&Kf(s.ownerDocument)===s||s.defaultValue===""+a||(s.defaultValue=""+a)}function Ja(s,o,a,u){if(s=s.options,o){o={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xm=!1;if(Vr)try{var Bl={};Object.defineProperty(Bl,"passive",{get:function(){xm=!0}}),window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{xm=!1}var Uo=null,Rm=null,Qf=null;function Y_(){if(Qf)return Qf;var s,o=Rm,a=o.length,u,p="value"in Uo?Uo.value:Uo.textContent,m=p.length;for(s=0;s=jl),nw=" ",sw=!1;function rw(s,o){switch(s){case"keyup":return wz.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ow(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var sc=!1;function xz(s,o){switch(s){case"compositionend":return ow(o);case"keypress":return o.which!==32?null:(sw=!0,nw);case"textInput":return s=o.data,s===nw&&sw?null:s;default:return null}}function Rz(s,o){if(sc)return s==="compositionend"||!Om&&rw(s,o)?(s=Y_(),Qf=Rm=Uo=null,sc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-s};s=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=hw(a)}}function mw(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?mw(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function gw(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Kf(s.document);o instanceof s.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)s=o.contentWindow;else break;o=Kf(s.document)}return o}function km(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var kz=Vr&&"documentMode"in document&&11>=document.documentMode,rc=null,Pm=null,Vl=null,Nm=!1;function yw(s,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Nm||rc==null||rc!==Kf(u)||(u=rc,"selectionStart"in u&&km(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Vl&&ql(Vl,u)||(Vl=u,u=Hd(Pm,"onSelect"),0>=w,p-=w,_r=1<<32-Hn(o)+p|a<Je?(ct=Pe,Pe=null):ct=Pe.sibling;var vt=J(G,Pe,Y[Je],he);if(vt===null){Pe===null&&(Pe=ct);break}s&&Pe&&vt.alternate===null&&o(G,Pe),q=m(vt,q,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt,Pe=ct}if(Je===Y.length)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;JeJe?(ct=Pe,Pe=null):ct=Pe.sibling;var ci=J(G,Pe,vt.value,he);if(ci===null){Pe===null&&(Pe=ct);break}s&&Pe&&ci.alternate===null&&o(G,Pe),q=m(ci,q,Je),yt===null?ze=ci:yt.sibling=ci,yt=ci,Pe=ct}if(vt.done)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;!vt.done;Je++,vt=Y.next())vt=pe(G,vt.value,he),vt!==null&&(q=m(vt,q,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return ft&&Kr(G,Je),ze}for(Pe=u(Pe);!vt.done;Je++,vt=Y.next())vt=re(Pe,G,Je,vt.value,he),vt!==null&&(s&&vt.alternate!==null&&Pe.delete(vt.key===null?Je:vt.key),q=m(vt,q,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return s&&Pe.forEach(function(J4){return o(G,J4)}),ft&&Kr(G,Je),ze}function It(G,q,Y,he){if(typeof Y=="object"&&Y!==null&&Y.type===x&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:e:{for(var ze=Y.key;q!==null;){if(q.key===ze){if(ze=Y.type,ze===x){if(q.tag===7){a(G,q.sibling),he=p(q,Y.props.children),he.return=G,G=he;break e}}else if(q.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===k&&ia(ze)===q.type){a(G,q.sibling),he=p(q,Y.props),Xl(he,Y),he.return=G,G=he;break e}a(G,q);break}else o(G,q);q=q.sibling}Y.type===x?(he=ta(Y.props.children,G.mode,he,Y.key),he.return=G,G=he):(he=od(Y.type,Y.key,Y.props,null,G.mode,he),Xl(he,Y),he.return=G,G=he)}return w(G);case _:e:{for(ze=Y.key;q!==null;){if(q.key===ze)if(q.tag===4&&q.stateNode.containerInfo===Y.containerInfo&&q.stateNode.implementation===Y.implementation){a(G,q.sibling),he=p(q,Y.children||[]),he.return=G,G=he;break e}else{a(G,q);break}else o(G,q);q=q.sibling}he=Hm(Y,G.mode,he),he.return=G,G=he}return w(G);case k:return Y=ia(Y),It(G,q,Y,he)}if(fe(Y))return Oe(G,q,Y,he);if(K(Y)){if(ze=K(Y),typeof ze!="function")throw Error(r(150));return Y=ze.call(Y),Ue(G,q,Y,he)}if(typeof Y.then=="function")return It(G,q,dd(Y),he);if(Y.$$typeof===O)return It(G,q,cd(G,Y),he);hd(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,q!==null&&q.tag===6?(a(G,q.sibling),he=p(q,Y),he.return=G,G=he):(a(G,q),he=jm(Y,G.mode,he),he.return=G,G=he),w(G)):a(G,q)}return function(G,q,Y,he){try{Yl=0;var ze=It(G,q,Y,he);return mc=null,ze}catch(Pe){if(Pe===pc||Pe===ud)throw Pe;var yt=Es(29,Pe,null,G.mode);return yt.lanes=he,yt.return=G,yt}}}var ca=Uw(!0),jw=Uw(!1),Vo=!1;function eg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tg(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Go(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ko(s,o,a){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,o=rd(s),xw(s,null,a),o}return sd(s,u,o,a),rd(s)}function Wl(s,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,jf(s,a)}}function ng(s,o){var a=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?p=m=o:m=m.next=o}else p=m=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=o:s.next=o,a.lastBaseUpdate=o}var sg=!1;function Jl(){if(sg){var s=hc;if(s!==null)throw s}}function eu(s,o,a,u){sg=!1;var p=s.updateQueue;Vo=!1;var m=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var z=T,X=z.next;z.next=null,w===null?m=X:w.next=X,w=z;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==w&&(T===null?ae.firstBaseUpdate=X:T.next=X,ae.lastBaseUpdate=z))}if(m!==null){var pe=p.baseState;w=0,ae=X=z=null,T=m;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(at&J)===J:(u&J)===J){J!==0&&J===dc&&(sg=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Oe=s,Ue=T;J=o;var It=a;switch(Ue.tag){case 1:if(Oe=Ue.payload,typeof Oe=="function"){pe=Oe.call(It,pe,J);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ue.payload,J=typeof Oe=="function"?Oe.call(It,pe,J):Oe,J==null)break e;pe=g({},pe,J);break e;case 2:Vo=!0}}J=T.callback,J!==null&&(s.flags|=64,re&&(s.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(X=ae=re,z=pe):ae=ae.next=re,w|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);ae===null&&(z=pe),p.baseState=z,p.firstBaseUpdate=X,p.lastBaseUpdate=ae,m===null&&(p.shared.lanes=0),Wo|=w,s.lanes=w,s.memoizedState=pe}}function Hw(s,o){if(typeof s!="function")throw Error(r(191,s));s.call(o)}function Fw(s,o){var a=s.callbacks;if(a!==null)for(s.callbacks=null,s=0;sm?m:8;var w=V.T,T={};V.T=T,wg(s,!1,o,a);try{var z=p(),X=V.S;if(X!==null&&X(T,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ae=Hz(z,u);su(s,o,ae,As(s))}else su(s,o,u,As(s))}catch(pe){su(s,o,{then:function(){},status:"rejected",reason:pe},As())}finally{W.p=m,w!==null&&T.types!==null&&(w.types=T.types),V.T=w}}function Zz(){}function Sg(s,o,a,u){if(s.tag!==5)throw Error(r(476));var p=_E(s).queue;SE(s,p,o,j,a===null?Zz:function(){return wE(s),a(u)})}function _E(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:j,baseState:j,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:j},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:a},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function wE(s){var o=_E(s);o.next===null&&(o=s.alternate.memoizedState),su(s,o.next.queue,{},As())}function _g(){return Nn(Su)}function EE(){return Wt().memoizedState}function xE(){return Wt().memoizedState}function Qz(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var a=As();s=Go(a);var u=Ko(o,s,a);u!==null&&(us(u,o,a),Wl(u,o,a)),o={cache:Ym()},s.payload=o;return}o=o.return}}function Yz(s,o,a){var u=As();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ed(s)?CE(o,a):(a=$m(s,o,a,u),a!==null&&(us(a,s,u),TE(a,o,u)))}function RE(s,o,a){var u=As();su(s,o,a,u)}function su(s,o,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ed(s))CE(o,p);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var w=o.lastRenderedState,T=m(w,a);if(p.hasEagerState=!0,p.eagerState=T,ws(T,w))return sd(s,o,p,0),Dt===null&&nd(),!1}catch{}if(a=$m(s,o,p,u),a!==null)return us(a,s,u),TE(a,o,u),!0}return!1}function wg(s,o,a,u){if(u={lane:2,revertLane:ey(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ed(s)){if(o)throw Error(r(479))}else o=$m(s,a,u,2),o!==null&&us(o,s,2)}function Ed(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function CE(s,o){yc=gd=!0;var a=s.pending;a===null?o.next=o:(o.next=a.next,a.next=o),s.pending=o}function TE(s,o,a){if((a&4194048)!==0){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,jf(s,a)}}var ru={readContext:Nn,use:bd,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt};ru.useEffectEvent=Qt;var AE={readContext:Nn,use:bd,useCallback:function(s,o){return Xn().memoizedState=[s,o===void 0?null:o],s},useContext:Nn,useEffect:fE,useImperativeHandle:function(s,o,a){a=a!=null?a.concat([s]):null,_d(4194308,4,mE.bind(null,o,s),a)},useLayoutEffect:function(s,o){return _d(4194308,4,s,o)},useInsertionEffect:function(s,o){_d(4,2,s,o)},useMemo:function(s,o){var a=Xn();o=o===void 0?null:o;var u=s();if(la){ur(!0);try{s()}finally{ur(!1)}}return a.memoizedState=[u,o],u},useReducer:function(s,o,a){var u=Xn();if(a!==void 0){var p=a(o);if(la){ur(!0);try{a(o)}finally{ur(!1)}}}else p=o;return u.memoizedState=u.baseState=p,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:p},u.queue=s,s=s.dispatch=Yz.bind(null,Xe,s),[u.memoizedState,s]},useRef:function(s){var o=Xn();return s={current:s},o.memoizedState=s},useState:function(s){s=mg(s);var o=s.queue,a=RE.bind(null,Xe,o);return o.dispatch=a,[s.memoizedState,a]},useDebugValue:vg,useDeferredValue:function(s,o){var a=Xn();return bg(a,s,o)},useTransition:function(){var s=mg(!1);return s=SE.bind(null,Xe,s.queue,!0,!1),Xn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,a){var u=Xe,p=Xn();if(ft){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),Dt===null)throw Error(r(349));(at&127)!==0||Qw(u,o,a)}p.memoizedState=a;var m={value:a,getSnapshot:o};return p.queue=m,fE(Xw.bind(null,u,m,s),[s]),u.flags|=2048,bc(9,{destroy:void 0},Yw.bind(null,u,m,a,o),null),a},useId:function(){var s=Xn(),o=Dt.identifierPrefix;if(ft){var a=wr,u=_r;a=(u&~(1<<32-Hn(u)-1)).toString(32)+a,o="_"+o+"R_"+a,a=yd++,0<\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}m[kn]=o,m[rs]=u;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)m.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=m;e:switch(Ln(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Jr(o)}}return Lt(o),zg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,a),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==u&&Jr(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(s=Se.current,uc(o)){if(s=o.stateNode,a=o.memoizedProps,u=null,p=Pn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}s[kn]=o,s=!!(s.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Kx(s.nodeValue,a)),s||Fo(o,!0)}else s=Fd(s).createTextNode(u),s[kn]=o,o.stateNode=s}return Lt(o),null;case 31:if(a=o.memoizedState,s===null||s.memoizedState!==null){if(u=uc(o),a!==null){if(s===null){if(!u)throw Error(r(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[kn]=o}else na(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),s=!1}else a=Gm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=a),s=!0;if(!s)return o.flags&256?(Rs(o),o):(Rs(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Lt(o),null;case 13:if(u=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(p=uc(o),u!==null&&u.dehydrated!==null){if(s===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[kn]=o}else na(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),p=!1}else p=Gm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Rs(o),o):(Rs(o),null)}return Rs(o),(o.flags&128)!==0?(o.lanes=a,o):(a=u!==null,s=s!==null&&s.memoizedState!==null,a&&(u=o.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==s&&a&&(o.child.flags|=8192),Ad(o,o.updateQueue),Lt(o),null);case 4:return He(),s===null&&ry(o.stateNode.containerInfo),Lt(o),null;case 10:return Qr(o.type),Lt(o),null;case 19:if(ne(Xt),u=o.memoizedState,u===null)return Lt(o),null;if(p=(o.flags&128)!==0,m=u.rendering,m===null)if(p)iu(u,!1);else{if(Yt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(m=md(s),m!==null){for(o.flags|=128,iu(u,!1),s=m.updateQueue,o.updateQueue=s,Ad(o,s),o.subtreeFlags=0,s=a,a=o.child;a!==null;)Rw(a,s),a=a.sibling;return ie(Xt,Xt.current&1|2),ft&&Kr(o,u.treeForkCount),o.child}s=s.sibling}u.tail!==null&&it()>kd&&(o.flags|=128,p=!0,iu(u,!1),o.lanes=4194304)}else{if(!p)if(s=md(m),s!==null){if(o.flags|=128,p=!0,s=s.updateQueue,o.updateQueue=s,Ad(o,s),iu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ft)return Lt(o),null}else 2*it()-u.renderingStartTime>kd&&a!==536870912&&(o.flags|=128,p=!0,iu(u,!1),o.lanes=4194304);u.isBackwards?(m.sibling=o.child,o.child=m):(s=u.last,s!==null?s.sibling=m:o.child=m,u.last=m)}return u.tail!==null?(s=u.tail,u.rendering=s,u.tail=s.sibling,u.renderingStartTime=it(),s.sibling=null,a=Xt.current,ie(Xt,p?a&1|2:a&1),ft&&Kr(o,u.treeForkCount),s):(Lt(o),null);case 22:case 23:return Rs(o),og(),u=o.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(a&536870912)!==0&&(o.flags&128)===0&&(Lt(o),o.subtreeFlags&6&&(o.flags|=8192)):Lt(o),a=o.updateQueue,a!==null&&Ad(o,a.retryQueue),a=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==a&&(o.flags|=2048),s!==null&&ne(oa),null;case 24:return a=null,s!==null&&(a=s.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),Qr(rn),Lt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function t4(s,o){switch(qm(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Qr(rn),He(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Ft(o),null;case 31:if(o.memoizedState!==null){if(Rs(o),o.alternate===null)throw Error(r(340));na()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Rs(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(r(340));na()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return ne(Xt),null;case 4:return He(),null;case 10:return Qr(o.type),null;case 22:case 23:return Rs(o),og(),s!==null&&ne(oa),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Qr(rn),null;case 25:return null;default:return null}}function WE(s,o){switch(qm(o),o.tag){case 3:Qr(rn),He();break;case 26:case 27:case 5:Ft(o);break;case 4:He();break;case 31:o.memoizedState!==null&&Rs(o);break;case 13:Rs(o);break;case 19:ne(Xt);break;case 10:Qr(o.type);break;case 22:case 23:Rs(o),og(),s!==null&&ne(oa);break;case 24:Qr(rn)}}function au(s,o){try{var a=o.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&s)===s){u=void 0;var m=a.create,w=a.inst;u=m(),w.destroy=u}a=a.next}while(a!==p)}}catch(T){xt(o,o.return,T)}}function Yo(s,o,a){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&s)===s){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=o;var z=a,X=T;try{X()}catch(ae){xt(p,z,ae)}}}u=u.next}while(u!==m)}}catch(ae){xt(o,o.return,ae)}}function JE(s){var o=s.updateQueue;if(o!==null){var a=s.stateNode;try{Fw(o,a)}catch(u){xt(s,s.return,u)}}}function ex(s,o,a){a.props=ua(s.type,s.memoizedProps),a.state=s.memoizedState;try{a.componentWillUnmount()}catch(u){xt(s,o,u)}}function cu(s,o){try{var a=s.ref;if(a!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof a=="function"?s.refCleanup=a(u):a.current=u}}catch(p){xt(s,o,p)}}function Er(s,o){var a=s.ref,u=s.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){xt(s,o,p)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){xt(s,o,p)}else a.current=null}function tx(s){var o=s.type,a=s.memoizedProps,u=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){xt(s,s.return,p)}}function Lg(s,o,a){try{var u=s.stateNode;E4(u,s.type,a,o),u[rs]=o}catch(p){xt(s,s.return,p)}}function nx(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&si(s.type)||s.tag===4}function Bg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||nx(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&si(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function $g(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(s,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(s),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=qr));else if(u!==4&&(u===27&&si(s.type)&&(a=s.stateNode,o=null),s=s.child,s!==null))for($g(s,o,a),s=s.sibling;s!==null;)$g(s,o,a),s=s.sibling}function Id(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?a.insertBefore(s,o):a.appendChild(s);else if(u!==4&&(u===27&&si(s.type)&&(a=s.stateNode),s=s.child,s!==null))for(Id(s,o,a),s=s.sibling;s!==null;)Id(s,o,a),s=s.sibling}function sx(s){var o=s.stateNode,a=s.memoizedProps;try{for(var u=s.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Ln(o,u,a),o[kn]=s,o[rs]=a}catch(m){xt(s,s.return,m)}}var eo=!1,cn=!1,Ug=!1,rx=typeof WeakSet=="function"?WeakSet:Set,Rn=null;function n4(s,o){if(s=s.containerInfo,ay=Yd,s=gw(s),km(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,T=-1,z=-1,X=0,ae=0,pe=s,J=null;t:for(;;){for(var re;pe!==a||p!==0&&pe.nodeType!==3||(T=w+p),pe!==m||u!==0&&pe.nodeType!==3||(z=w+u),pe.nodeType===3&&(w+=pe.nodeValue.length),(re=pe.firstChild)!==null;)J=pe,pe=re;for(;;){if(pe===s)break t;if(J===a&&++X===p&&(T=w),J===m&&++ae===u&&(z=w),(re=pe.nextSibling)!==null)break;pe=J,J=pe.parentNode}pe=re}a=T===-1||z===-1?null:{start:T,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(cy={focusedElem:s,selectionRange:a},Yd=!1,Rn=o;Rn!==null;)if(o=Rn,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Rn=s;else for(;Rn!==null;){switch(o=Rn,m=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(a=0;a title"))),Ln(m,u,a),m[kn]=s,xn(m),u=m;break e;case"link":var w=u1("link","href",p).get(u+(a.href||""));if(w){for(var T=0;TIt&&(w=It,It=Ue,Ue=w);var G=pw(T,Ue),q=pw(T,It);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var Y=pe.createRange();Y.setStart(G.node,G.offset),re.removeAllRanges(),Ue>It?(re.addRange(Y),re.extend(q.node,q.offset)):(Y.setEnd(q.node,q.offset),re.addRange(Y))}}}}for(pe=[],re=T;re=re.parentNode;)re.nodeType===1&&pe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;Ta?32:a,V.T=null,a=Kg,Kg=null;var m=ei,w=oo;if(vn=0,xc=ei=null,oo=0,(St&6)!==0)throw Error(r(331));var T=St;if(St|=4,mx(m.current),dx(m,m.current,w,a),St=T,pu(0,!1),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(zo,m)}catch{}return!0}finally{W.p=p,V.T=u,kx(s,o)}}function Nx(s,o,a){o=Vs(a,o),o=Cg(s.stateNode,o,2),s=Ko(s,o,2),s!==null&&(Qi(s,2),xr(s))}function xt(s,o,a){if(s.tag===3)Nx(s,s,a);else for(;o!==null;){if(o.tag===3){Nx(o,s,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jo===null||!Jo.has(u))){s=Vs(a,s),a=zE(2),u=Ko(o,a,2),u!==null&&(LE(a,u,o,s),Qi(u,2),xr(u));break}}o=o.return}}function Xg(s,o,a){var u=s.pingCache;if(u===null){u=s.pingCache=new o4;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(Fg=!0,p.add(a),s=u4.bind(null,s,o,a),o.then(s,s))}function u4(s,o,a){var u=s.pingCache;u!==null&&u.delete(o),s.pingedLanes|=s.suspendedLanes&a,s.warmLanes&=~a,Dt===s&&(at&a)===a&&(Yt===4||Yt===3&&(at&62914560)===at&&300>it()-Dd?(St&2)===0&&Rc(s,0):qg|=a,Ec===at&&(Ec=0)),xr(s)}function zx(s,o){o===0&&(o=Uf()),s=ea(s,o),s!==null&&(Qi(s,o),xr(s))}function f4(s){var o=s.memoizedState,a=0;o!==null&&(a=o.retryLane),zx(s,a)}function d4(s,o){var a=0;switch(s.tag){case 31:case 13:var u=s.stateNode,p=s.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),zx(s,a)}function h4(s,o){return ut(s,o)}var $d=null,Tc=null,Wg=!1,Ud=!1,Jg=!1,ni=0;function xr(s){s!==Tc&&s.next===null&&(Tc===null?$d=Tc=s:Tc=Tc.next=s),Ud=!0,Wg||(Wg=!0,m4())}function pu(s,o){if(!Jg&&Ud){Jg=!0;do for(var a=!1,u=$d;u!==null;){if(s!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var w=u.suspendedLanes,T=u.pingedLanes;m=(1<<31-Hn(42|s)+1)-1,m&=p&~(w&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,Ux(u,m))}else m=at,m=Lo(u,u===Dt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Bo(u,m)||(a=!0,Ux(u,m));u=u.next}while(a);Jg=!1}}function p4(){Lx()}function Lx(){Ud=Wg=!1;var s=0;ni!==0&&R4()&&(s=ni);for(var o=it(),a=null,u=$d;u!==null;){var p=u.next,m=Bx(u,o);m===0?(u.next=null,a===null?$d=p:a.next=p,p===null&&(Tc=a)):(a=u,(s!==0||(m&3)!==0)&&(Ud=!0)),u=p}vn!==0&&vn!==5||pu(s),ni!==0&&(ni=0)}function Bx(s,o){for(var a=s.suspendedLanes,u=s.pingedLanes,p=s.expirationTimes,m=s.pendingLanes&-62914561;0T)break;var ae=z.transferSize,pe=z.initiatorType;ae&&Zx(pe)&&(z=z.responseEnd,w+=ae*(z"u"?null:document;function i1(s,o,a){var u=Ac;if(u&&typeof o=="string"&&o){var p=Fs(o);p='link[rel="'+s+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),o1.has(p)||(o1.add(p),s={rel:s,crossOrigin:a,href:o},u.querySelector(p)===null&&(o=u.createElement("link"),Ln(o,"link",s),xn(o),u.head.appendChild(o)))}}function P4(s){io.D(s),i1("dns-prefetch",s,null)}function N4(s,o){io.C(s,o),i1("preconnect",s,o)}function z4(s,o,a){io.L(s,o,a);var u=Ac;if(u&&s&&o){var p='link[rel="preload"][as="'+Fs(o)+'"]';o==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Fs(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Fs(a.imageSizes)+'"]')):p+='[href="'+Fs(s)+'"]';var m=p;switch(o){case"style":m=Ic(s);break;case"script":m=Oc(s)}Xs.has(m)||(s=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:s,as:o},a),Xs.set(m,s),u.querySelector(p)!==null||o==="style"&&u.querySelector(vu(m))||o==="script"&&u.querySelector(bu(m))||(o=u.createElement("link"),Ln(o,"link",s),xn(o),u.head.appendChild(o)))}}function L4(s,o){io.m(s,o);var a=Ac;if(a&&s){var u=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fs(u)+'"][href="'+Fs(s)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Oc(s)}if(!Xs.has(m)&&(s=g({rel:"modulepreload",href:s},o),Xs.set(m,s),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(bu(m)))return}u=a.createElement("link"),Ln(u,"link",s),xn(u),a.head.appendChild(u)}}}function B4(s,o,a){io.S(s,o,a);var u=Ac;if(u&&s){var p=Xa(u).hoistableStyles,m=Ic(s);o=o||"default";var w=p.get(m);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(vu(m)))T.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":o},a),(a=Xs.get(m))&&my(s,a);var z=w=u.createElement("link");xn(z),Ln(z,"link",s),z._p=new Promise(function(X,ae){z.onload=X,z.onerror=ae}),z.addEventListener("load",function(){T.loading|=1}),z.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Vd(w,o,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(m,w)}}}function $4(s,o){io.X(s,o);var a=Ac;if(a&&s){var u=Xa(a).hoistableScripts,p=Oc(s),m=u.get(p);m||(m=a.querySelector(bu(p)),m||(s=g({src:s,async:!0},o),(o=Xs.get(p))&&gy(s,o),m=a.createElement("script"),xn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function U4(s,o){io.M(s,o);var a=Ac;if(a&&s){var u=Xa(a).hoistableScripts,p=Oc(s),m=u.get(p);m||(m=a.querySelector(bu(p)),m||(s=g({src:s,async:!0,type:"module"},o),(o=Xs.get(p))&&gy(s,o),m=a.createElement("script"),xn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function a1(s,o,a,u){var p=(p=Se.current)?qd(p):null;if(!p)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=Ic(a.href),a=Xa(p).hoistableStyles,u=a.get(o),u||(u={type:"style",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){s=Ic(a.href);var m=Xa(p).hoistableStyles,w=m.get(s);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(s,w),(m=p.querySelector(vu(s)))&&!m._p&&(w.instance=m,w.state.loading=5),Xs.has(s)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xs.set(s,a),m||j4(p,s,a,w.state))),o&&u===null)throw Error(r(528,""));return w}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Oc(a),a=Xa(p).hoistableScripts,u=a.get(o),u||(u={type:"script",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Ic(s){return'href="'+Fs(s)+'"'}function vu(s){return'link[rel="stylesheet"]['+s+"]"}function c1(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function j4(s,o,a,u){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=s.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),Ln(o,"link",a),xn(o),s.head.appendChild(o))}function Oc(s){return'[src="'+Fs(s)+'"]'}function bu(s){return"script[async]"+s}function l1(s,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var u=s.querySelector('style[data-href~="'+Fs(a.href)+'"]');if(u)return o.instance=u,xn(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),xn(u),Ln(u,"style",p),Vd(u,a.precedence,s),o.instance=u;case"stylesheet":p=Ic(a.href);var m=s.querySelector(vu(p));if(m)return o.state.loading|=4,o.instance=m,xn(m),m;u=c1(a),(p=Xs.get(p))&&my(u,p),m=(s.ownerDocument||s).createElement("link"),xn(m);var w=m;return w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),o.state.loading|=4,Vd(m,a.precedence,s),o.instance=m;case"script":return m=Oc(a.src),(p=s.querySelector(bu(m)))?(o.instance=p,xn(p),p):(u=a,(p=Xs.get(m))&&(u=g({},a),gy(u,p)),s=s.ownerDocument||s,p=s.createElement("script"),xn(p),Ln(p,"link",u),s.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,Vd(u,a.precedence,s));return o.instance}function Vd(s,o,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,w=0;w title"):null)}function H4(s,o,a){if(a===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(s=o.disabled,typeof o.precedence=="string"&&s==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function d1(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function F4(s,o,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Ic(u.href),m=o.querySelector(vu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Kd.bind(s),o.then(s,s)),a.state.loading|=4,a.instance=m,xn(m);return}m=o.ownerDocument||o,u=c1(u),(p=Xs.get(p))&&my(u,p),m=m.createElement("link"),xn(m);var w=m;w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=Kd.bind(s),o.addEventListener("load",a),o.addEventListener("error",a))}}var yy=0;function q4(s,o){return s.stylesheets&&s.count===0&&Qd(s,s.stylesheets),0yy?50:800)+o);return s.unsuspend=a,function(){s.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Kd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Zd=null;function Qd(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Zd=new Map,o.forEach(V4,s),Zd=null,Kd.call(s))}function V4(s,o){if(!(o.state.loading&4)){var a=Zd.get(s);if(a)var u=a.get(null);else{a=new Map,Zd.set(s,a);for(var p=s.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Hy.exports=MB(),Hy.exports}var kB=DB();const PB=LA(kB);var Vy={exports:{}},Gy={};var dR;function NB(){if(dR)return Gy;dR=1;var e=ol().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Gy.c=function(t){return e.H.useMemoCache(t)},Gy}var hR;function zB(){return hR||(hR=1,Vy.exports=NB()),Vy.exports}var Ct=zB();const gI=I.createContext(void 0);function LB(e,t){try{const n=localStorage.getItem(e);if(n==="light"||n==="dark"||n==="system")return n}catch{}return t}function BB(e){const t=Ct.c(14),{children:n,defaultTheme:r,storageKey:i}=e,c=r===void 0?"system":r,l=i===void 0?"ui-theme":i;let f;t[0]!==c||t[1]!==l?(f=()=>LB(l,c),t[0]=c,t[1]=l,t[2]=f):f=t[2];const[d,h]=I.useState(f);let y,g;t[3]!==d?(y=()=>{const R=window.document.documentElement;if(R.classList.remove("light","dark"),d==="system"){const C=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";R.classList.add(C);return}R.classList.add(d)},g=[d],t[3]=d,t[4]=y,t[5]=g):(y=t[4],g=t[5]),I.useEffect(y,g);let v;t[6]!==l?(v=R=>{try{localStorage.setItem(l,R)}catch{}h(R)},t[6]=l,t[7]=v):v=t[7];let b;t[8]!==v||t[9]!==d?(b={theme:d,setTheme:v},t[8]=v,t[9]=d,t[10]=b):b=t[10];const _=b;let x;return t[11]!==n||t[12]!==_?(x=$.jsx(gI.Provider,{value:_,children:n}),t[11]=n,t[12]=_,t[13]=x):x=t[13],x}function $B(){const e=I.useContext(gI);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function ev(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const ju={};function Tp(e,t,n,r,i){let c={...tv(e,ju)};return t&&(c=zu(c,t)),n&&(c=zu(c,n)),r&&(c=zu(c,r)),i&&(c=zu(c,i)),c}function UB(e){if(e.length===0)return ju;if(e.length===1)return tv(e[0],ju);let t={...tv(e[0],ju)};for(let n=1;n=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function yI(e){return typeof e=="function"}function tv(e,t){return yI(e)?e(t):e??ju}function FB(e,t){return t?e?n=>{if(qB(n)){const i=n;nv(i);const c=t(i);return i.baseUIHandlerPrevented||e?.(i),c}const r=t(n);return e?.(n),r}:t:e}function nv(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function vI(e,t){return t?e?t+" "+e:t:e}function qB(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function _o(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const pR={};function Pr(e,t){const n=I.useRef(pR);return n.current===pR&&(n.current=e(t)),n}function Gh(e,t,n,r){const i=Pr(bI).current;return GB(i,e,t,n,r)&&SI(i,[e,t,n,r]),i.callback}function VB(e){const t=Pr(bI).current;return KB(t,e)&&SI(t,e),t.callback}function bI(){return{callback:null,cleanup:null,refs:[]}}function GB(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function KB(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function SI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i{for(let i=0;i=e}function mR(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(Gv(19)?n?.ref:t.ref)??null}function QB(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const c=t[r](i);c!=null&&Object.assign(n,c);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function YB(e,t){return typeof e=="function"?e(t):e}function XB(e,t){return typeof e=="function"?e(t):e}function _I(){}const dye=Object.freeze([]),Ms=Object.freeze({}),WB={style:{transition:"none"}},JB="data-base-ui-click-trigger",hye={fallbackAxisSide:"none"},e$={fallbackAxisSide:"end"},t$={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function cr(e,t,n={}){const r=t.render,i=n$(t,n);if(n.enabled===!1)return null;const c=n.state??Ms;return s$(e,r,i,c)}function n$(e,t={}){const{className:n,style:r,render:i}=e,{state:c=Ms,ref:l,props:f,stateAttributesMapping:d,enabled:h=!0}=t,y=h?YB(n,c):void 0,g=h?XB(r,c):void 0,v=h?QB(c,d):Ms,b=h?ev(v,Array.isArray(f)?UB(f):f)??Ms:Ms;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=VB([b.ref,mR(i),...l]):b.ref=Gh(b.ref,mR(i),l):Gh(null,null)),h?(y!==void 0&&(b.className=vI(b.className,y)),g!==void 0&&(b.style=ev(b.style,g)),b):Ms}function s$(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Tp(n,t.props);return i.ref=n.ref,I.cloneElement(t,i)}if(e&&typeof e=="string")return r$(e,n);throw new Error(_o(8))}function r$(e,t){return e==="button"?I.createElement("button",{type:"button",...t,key:t.key}):e==="img"?I.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function wI(e){return cr(e.defaultTagName??"div",e,e)}function EI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,yR=xI,RI=(e,t)=>n=>{var r;if(t?.variants==null)return yR(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,l=Object.keys(i).map(h=>{const y=n?.[h],g=c?.[h];if(y===null)return null;const v=gR(y)||gR(g);return i[h][v]}),f=n&&Object.entries(n).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(_=>{let[x,R]=_;return Array.isArray(R)?R.includes({...c,...f}[x]):{...c,...f}[x]===R})?[...h,g,v]:h},[]);return yR(e,l,d,n?.class,n?.className)};const CI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const o$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const i$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const vR=e=>{const t=i$(e);return t.charAt(0).toUpperCase()+t.slice(1)};var a$={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c$=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const l$=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...f},d)=>I.createElement("svg",{ref:d,...a$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:CI("lucide",i),...!c&&!c$(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,y])=>I.createElement(h,y)),...Array.isArray(c)?c:[c]]));const Sr=(e,t)=>{const n=I.forwardRef(({className:r,...i},c)=>I.createElement(l$,{ref:c,iconNode:t,className:CI(`lucide-${o$(vR(e))}`,`lucide-${e}`,r),...i}));return n.displayName=vR(e),n};const u$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],f$=Sr("circle-alert",u$);const d$=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],h$=Sr("hard-drive",d$);const p$=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],m$=Sr("house",p$);const g$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],y$=Sr("image",g$);const v$=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],b$=Sr("key",v$);const S$=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],_$=Sr("log-out",S$);const w$=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],E$=Sr("moon",w$);const x$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],R$=Sr("panel-left",x$);const C$=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],bR=Sr("server",C$);const T$=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],A$=Sr("sun",T$);const I$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],O$=Sr("x",I$);function Ap(){return typeof window<"u"}function Oi(e){return Kv(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nr(e){var t;return(t=(Kv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kv(e){return Ap()?e instanceof Node||e instanceof hn(e).Node:!1}function _t(e){return Ap()?e instanceof Element||e instanceof hn(e).Element:!1}function wn(e){return Ap()?e instanceof HTMLElement||e instanceof hn(e).HTMLElement:!1}function sv(e){return!Ap()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}const M$=new Set(["inline","contents"]);function Na(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ns(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!M$.has(i)}const D$=new Set(["table","td","th"]);function k$(e){return D$.has(Oi(e))}const P$=[":popover-open",":modal"];function Ip(e){return P$.some(t=>{try{return e.matches(t)}catch{return!1}})}const N$=["transform","translate","scale","rotate","perspective"],z$=["transform","translate","scale","rotate","perspective","filter"],L$=["paint","layout","strict","content"];function Zv(e){const t=Op(),n=_t(e)?Ns(e):e;return N$.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||z$.some(r=>(n.willChange||"").includes(r))||L$.some(r=>(n.contain||"").includes(r))}function B$(e){let t=yo(e);for(;wn(t)&&!mo(t);){if(Zv(t))return t;if(Ip(t))return null;t=yo(t)}return null}function Op(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const $$=new Set(["html","body","#document"]);function mo(e){return $$.has(Oi(e))}function Ns(e){return hn(e).getComputedStyle(e)}function Mp(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yo(e){if(Oi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sv(e)&&e.host||Nr(e);return sv(t)?t.host:t}function TI(e){const t=yo(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:wn(t)&&Na(t)?t:TI(t)}function wi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=TI(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),l=hn(i);if(c){const f=rv(l);return t.concat(l,l.visualViewport||[],Na(i)?i:[],f&&n?wi(f):[])}return t.concat(i,wi(i,[],n))}function rv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ky=Pv[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],U$=Ky&&Ky!==I.useLayoutEffect?Ky:e=>e();function Ze(e){const t=Pr(j$).current;return t.next=e,U$(t.effect),t.trampoline}function j$(){const e={next:void 0,callback:H$,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function H$(){}const F$=()=>{},mt=typeof document<"u"?I.useLayoutEffect:F$,q$=I.createContext(void 0);function V$(e=!1){const t=I.useContext(q$);if(t===void 0&&!e)throw new Error(_o(16));return t}function G$(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:c}=e,l=r&&t!==!1,f=r&&t===!1;return{props:I.useMemo(()=>{const h={onKeyDown(y){n&&t&&y.key!=="Tab"&&y.preventDefault()}};return r||(h.tabIndex=i,!c&&n&&(h.tabIndex=t?i:-1)),(c&&(t||l)||!c&&n)&&(h["aria-disabled"]=n),c&&(!t||f)&&(h.disabled=n),h},[r,n,t,l,f,c,i])}}function AI(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,c=I.useRef(null),l=V$(!0)!==void 0,f=Ze(()=>{const v=c.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=G$({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),h=I.useCallback(()=>{const v=c.current;K$(v)&&l&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,l]);mt(h,[h]);const y=I.useCallback((v={})=>{const{onClick:b,onMouseDown:_,onKeyUp:x,onKeyDown:R,onPointerDown:C,...A}=v;return Tp({type:i?"button":void 0,onClick(D){if(t){D.preventDefault();return}b?.(D)},onMouseDown(D){t||_?.(D)},onKeyDown(D){if(t||(nv(D),R?.(D)),D.baseUIHandlerPrevented)return;const N=D.target===D.currentTarget&&!i&&!f()&&!t,U=D.key==="Enter",B=D.key===" ";N&&((B||U)&&D.preventDefault(),U&&b?.(D))},onKeyUp(D){t||(nv(D),x?.(D)),!D.baseUIHandlerPrevented&&D.target===D.currentTarget&&!i&&!t&&D.key===" "&&b?.(D)},onPointerDown(D){if(t){D.preventDefault();return}C?.(D)}},i?void 0:{role:"button"},d,A)},[t,d,i,f]),g=Ze(v=>{c.current=v,h()});return{getButtonProps:y,buttonRef:g}}function K$(e){return wn(e)&&e.tagName==="BUTTON"}const Z$=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,focusableWhenDisabled:l=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:y}=AI({disabled:c,focusableWhenDisabled:l,native:f}),g=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:g,ref:[n,y],props:[d,h]})}),Q$=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),II=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Kh="-",SR=[],X$="arbitrary..",W$=e=>{const t=eU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return J$(l);const f=l.split(Kh),d=f[0]===""&&f.length>1?1:0;return OI(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=r[l],h=n[l];return d?h?Q$(h,d):d:h||SR}return n[l]||SR}}},OI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],c=n.nextPart.get(i);if(c){const h=OI(e,t+1,c);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(Kh):e.slice(t).join(Kh),d=l.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?X$+r:void 0})(),eU=e=>{const{theme:t,classGroups:n}=e;return tU(n,t)},tU=(e,t)=>{const n=II();for(const r in e){const i=e[r];Qv(i,n,r,t)}return n},Qv=(e,t,n,r)=>{const i=e.length;for(let c=0;c{if(typeof e=="string"){sU(e,t,n);return}if(typeof e=="function"){rU(e,t,n,r);return}oU(e,t,n,r)},sU=(e,t,n)=>{const r=e===""?t:MI(t,e);r.classGroupId=n},rU=(e,t,n,r)=>{if(iU(e)){Qv(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Y$(n,e))},oU=(e,t,n,r)=>{const i=Object.entries(e),c=i.length;for(let l=0;l{let n=e;const r=t.split(Kh),i=r.length;for(let c=0;c"isThemeGetter"in e&&e.isThemeGetter===!0,aU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(c,l)=>{n[c]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(c){let l=n[c];if(l!==void 0)return l;if((l=r[c])!==void 0)return i(c,l),l},set(c,l){c in n?n[c]=l:i(c,l)}}},ov="!",_R=":",cU=[],wR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),lU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let l=0,f=0,d=0,h;const y=i.length;for(let x=0;xd?h-d:void 0;return wR(c,b,v,_)};if(t){const i=t+_R,c=r;r=l=>l.startsWith(i)?c(l.slice(i.length)):wR(cU,!1,l,void 0,!0)}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},uU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let c=0;c0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},fU=e=>({cache:aU(e.cacheSize),parseClassName:lU(e),sortModifiers:uU(e),...W$(e)}),dU=/\s+/,hU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,l=[],f=e.trim().split(dU);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:x}=n(y);if(g){d=y+(d.length>0?" "+d:d);continue}let R=!!x,C=r(R?_.substring(0,x):_);if(!C){if(!R){d=y+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=y+(d.length>0?" "+d:d);continue}R=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),O=b?A+ov:A,D=O+C;if(l.indexOf(D)>-1)continue;l.push(D);const N=i(C,R);for(let U=0;U0?" "+d:d)}return d},pU=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,c;const l=d=>{const h=t.reduce((y,g)=>g(y),e());return n=fU(h),r=n.cache.get,i=n.cache.set,c=f,f(d)},f=d=>{const h=r(d);if(h)return h;const y=hU(d,n);return i(d,y),y};return c=l,(...d)=>c(pU(...d))},gU=[],bn=e=>{const t=n=>n[e]||gU;return t.isThemeGetter=!0,t},kI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,PI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yU=/^\d+\/\d+$/,vU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bU=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_U=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dc=e=>yU.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),li=e=>!!e&&Number.isInteger(Number(e)),Zy=e=>e.endsWith("%")&&tt(e.slice(0,-1)),ao=e=>vU.test(e),EU=()=>!0,xU=e=>bU.test(e)&&!SU.test(e),NI=()=>!1,RU=e=>_U.test(e),CU=e=>wU.test(e),TU=e=>!Me(e)&&!De(e),AU=e=>il(e,BI,NI),Me=e=>kI.test(e),ha=e=>il(e,$I,xU),Qy=e=>il(e,kU,tt),ER=e=>il(e,zI,NI),IU=e=>il(e,LI,CU),ah=e=>il(e,UI,RU),De=e=>PI.test(e),Ou=e=>al(e,$I),OU=e=>al(e,PU),xR=e=>al(e,zI),MU=e=>al(e,BI),DU=e=>al(e,LI),ch=e=>al(e,UI,!0),il=(e,t,n)=>{const r=kI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},al=(e,t,n=!1)=>{const r=PI.exec(e);return r?r[1]?t(r[1]):n:!1},zI=e=>e==="position"||e==="percentage",LI=e=>e==="image"||e==="url",BI=e=>e==="length"||e==="size"||e==="bg-size",$I=e=>e==="length",kU=e=>e==="number",PU=e=>e==="family-name",UI=e=>e==="shadow",NU=()=>{const e=bn("color"),t=bn("font"),n=bn("text"),r=bn("font-weight"),i=bn("tracking"),c=bn("leading"),l=bn("breakpoint"),f=bn("container"),d=bn("spacing"),h=bn("radius"),y=bn("shadow"),g=bn("inset-shadow"),v=bn("text-shadow"),b=bn("drop-shadow"),_=bn("blur"),x=bn("perspective"),R=bn("aspect"),C=bn("ease"),A=bn("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),De,Me],U=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],k=()=>[De,Me,d],Z=()=>[Dc,"full","auto",...k()],se=()=>[li,"none","subgrid",De,Me],le=()=>["auto",{span:["full",li,De,Me]},li,De,Me],K=()=>[li,"auto",De,Me],Q=()=>["auto","min","max","fr",De,Me],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...k()],W=()=>[Dc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],j=()=>[e,De,Me],ve=()=>[...D(),xR,ER,{position:[De,Me]}],Te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",MU,AU,{size:[De,Me]}],ne=()=>[Zy,Ou,ha],ie=()=>["","none","full",h,De,Me],de=()=>["",tt,Ou,ha],Re=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[tt,Zy,xR,ER],Ye=()=>["","none",_,De,Me],He=()=>["none",tt,De,Me],ht=()=>["none",tt,De,Me],Ft=()=>[tt,De,Me],oe=()=>[Dc,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ao],breakpoint:[ao],color:[EU],container:[ao],"drop-shadow":[ao],ease:["in","out","in-out"],font:[TU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ao],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ao],shadow:[ao],spacing:["px",tt],text:[ao],"text-shadow":[ao],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dc,Me,De,R]}],container:["container"],columns:[{columns:[tt,Me,De,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",De,Me]}],basis:[{basis:[Dc,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,Dc,"auto","initial","none",Me]}],grow:[{grow:["",tt,De,Me]}],shrink:[{shrink:["",tt,De,Me]}],order:[{order:[li,"first","last","none",De,Me]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,Ou,ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,De,Qy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zy,Me]}],"font-family":[{font:[OU,Me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,De,Me]}],"line-clamp":[{"line-clamp":[tt,"none",De,Qy]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",De,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",De,ha]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[tt,"auto",De,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:Te()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,De,Me],radial:["",De,Me],conic:[li,De,Me]},DU,IU]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,De,Me]}],"outline-w":[{outline:["",tt,Ou,ha]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",y,ch,ah]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",g,ch,ah]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[tt,ha]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",v,ch,ah]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[tt,De,Me]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[De,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:Te()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Me]}],filter:[{filter:["","none",De,Me]}],blur:[{blur:Ye()}],brightness:[{brightness:[tt,De,Me]}],contrast:[{contrast:[tt,De,Me]}],"drop-shadow":[{"drop-shadow":["","none",b,ch,ah]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",tt,De,Me]}],"hue-rotate":[{"hue-rotate":[tt,De,Me]}],invert:[{invert:["",tt,De,Me]}],saturate:[{saturate:[tt,De,Me]}],sepia:[{sepia:["",tt,De,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Me]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[tt,De,Me]}],"backdrop-contrast":[{"backdrop-contrast":[tt,De,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,De,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,De,Me]}],"backdrop-invert":[{"backdrop-invert":["",tt,De,Me]}],"backdrop-opacity":[{"backdrop-opacity":[tt,De,Me]}],"backdrop-saturate":[{"backdrop-saturate":[tt,De,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,De,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",De,Me]}],ease:[{ease:["linear","initial",C,De,Me]}],delay:[{delay:[tt,De,Me]}],animate:[{animate:["none",A,De,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,De,Me]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[De,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Me]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[tt,Ou,ha,Qy]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zU=mU(NU);function en(...e){return zU(xI(e))}function pye(e){return e?new Date(e).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Unknown"}function mye(e){if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(2)} ${t[n]}`}const LU=/\/$/;function gye(e){return e.replace(LU,"")}function BU(e){return e&&(e.endsWith("/")?e:`${e}/`)}function $U(e,t){return e.startsWith(t)?e:`${t}${e}`}function yye(e,t){return e.startsWith(t)?e.slice(t.length):e}const UU=RI("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium text-xs/relaxed outline-none transition-all focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function Wc(e){const t=Ct.c(12);let n,r,i,c;t[0]!==e?({className:n,variant:i,size:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c):(n=t[1],r=t[2],i=t[3],c=t[4]);const l=i===void 0?"default":i,f=c===void 0?"default":c;let d;t[5]!==n||t[6]!==f||t[7]!==l?(d=en(UU({variant:l,size:f,className:n})),t[5]=n,t[6]=f,t[7]=l,t[8]=d):d=t[8];let h;return t[9]!==r||t[10]!==d?(h=$.jsx(Z$,{className:d,"data-slot":"button",...r}),t[9]=r,t[10]=d,t[11]=h):h=t[11],h}const jU={...Pv};let RR=0;function HU(e,t="mui"){const[n,r]=I.useState(e),i=e||n;return I.useEffect(()=>{n==null&&(RR+=1,r(`${t}-${RR}`))},[n,t]),i}const CR=jU.useId;function gf(e,t){if(CR!==void 0){const n=CR();return e??(t?`${t}-${n}`:n)}return HU(e,t)}function Yv(e){return gf(e,"base-ui")}const FU=[];function jI(e){I.useEffect(e,FU)}const Mu=0;class Ri{static create(){return new Ri}currentId=Mu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Mu,n()},t)}isStarted(){return this.currentId!==Mu}clear=()=>{this.currentId!==Mu&&(clearTimeout(this.currentId),this.currentId=Mu)};disposeEffect=()=>this.clear}function Ci(){const e=Pr(Ri.create).current;return jI(e.disposeEffect),e}function za(e){return e?.ownerDocument||document}const cl=typeof navigator<"u",Yy=GU(),HI=ZU(),FI=KU(),qU=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),qI=Yy.platform==="MacIntel"&&Yy.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Yy.platform),VI=cl&&/apple/i.test(navigator.vendor),iv=cl&&/android/i.test(HI)||/android/i.test(FI),VU=cl&&HI.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,GI=FI.includes("jsdom/");function GU(){if(!cl)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function KU(){if(!cl)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function ZU(){if(!cl)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const av="data-base-ui-focusable",KI="active",ZI="selected",QI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",vye="ArrowLeft",bye="ArrowRight",Sye="ArrowUp",_ye="ArrowDown";function mi(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&sv(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ns(e){return"composedPath"in e?e.composedPath()[0]:e.target}function gr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function QU(e){return e.matches("html,body")}function _n(e){return e?.ownerDocument||document}function YI(e){return wn(e)&&e.matches(QI)}function TR(e){return e?e.getAttribute("role")==="combobox"&&YI(e):!1}function YU(e){if(!e||GI)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function cv(e){return e?e.hasAttribute(av)?e:e.querySelector(`[${av}]`)||e:null}function xa(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...xa(e,i.id,n)])}function AR(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(c=>c.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function XU(e){e.preventDefault(),e.stopPropagation()}function WU(e){return"nativeEvent"in e}function JU(e){return e.mozInputSource===0&&e.isTrusted?!0:iv&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function e5(e){return GI?!1:!iv&&e.width===0&&e.height===0||iv&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function tf(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function t5(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const n5=["top","right","bottom","left"],Jc=Math.min,Os=Math.max,Zh=Math.round,lh=Math.floor,Mr=e=>({x:e,y:e}),s5={left:"right",right:"left",bottom:"top",top:"bottom"},r5={start:"end",end:"start"};function lv(e,t,n){return Os(e,Jc(t,n))}function vo(e,t){return typeof e=="function"?e(t):e}function ps(e){return e.split("-")[0]}function Mi(e){return e.split("-")[1]}function Xv(e){return e==="x"?"y":"x"}function Wv(e){return e==="y"?"height":"width"}const o5=new Set(["top","bottom"]);function ar(e){return o5.has(ps(e))?"y":"x"}function Jv(e){return Xv(ar(e))}function i5(e,t,n){n===void 0&&(n=!1);const r=Mi(e),i=Jv(e),c=Wv(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Qh(l)),[l,Qh(l)]}function a5(e){const t=Qh(e);return[uv(e),t,uv(t)]}function uv(e){return e.replace(/start|end/g,t=>r5[t])}const IR=["left","right"],OR=["right","left"],c5=["top","bottom"],l5=["bottom","top"];function u5(e,t,n){switch(e){case"top":case"bottom":return n?t?OR:IR:t?IR:OR;case"left":case"right":return t?c5:l5;default:return[]}}function f5(e,t,n,r){const i=Mi(e);let c=u5(ps(e),n==="start",r);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(uv)))),c}function Qh(e){return e.replace(/left|right|bottom|top/g,t=>s5[t])}function d5(e){return{top:0,right:0,bottom:0,left:0,...e}}function XI(e){return typeof e!="number"?d5(e):{top:e,right:e,bottom:e,left:e}}function Yh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var h5=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Xh=h5.join(","),WI=typeof Element>"u",el=WI?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wh=!WI&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Jh=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),c=i===""||i==="true",l=c||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Jh(t.parentNode));return l},p5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},JI=function(t,n,r){if(Jh(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Xh));return n&&el.call(t,Xh)&&i.unshift(t),i=i.filter(r),i},ep=function(t,n,r){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!Jh(l,!1))if(l.tagName==="SLOT"){var f=l.assignedElements(),d=f.length?f:l.children,h=ep(d,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:l,candidates:h})}else{var y=el.call(l,Xh);y&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),v=!Jh(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(g&&v){var b=ep(g===!0?l.children:g.children,!0,r);r.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},e2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},t2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||p5(t))&&!e2(t)?0:t.tabIndex},m5=function(t,n){var r=t2(t);return r<0&&n&&!e2(t)?0:r},g5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},n2=function(t){return t.tagName==="INPUT"},y5=function(t){return n2(t)&&t.type==="hidden"},v5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},b5=function(t,n){for(var r=0;rsummary:first-of-type"),f=l?t.parentElement:t;if(el.call(f,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var h=t.parentElement,y=Wh(t);if(h&&!h.shadowRoot&&i(h)===!0)return MR(t);t.assignedSlot?t=t.assignedSlot:!h&&y!==t.ownerDocument?t=y.host:t=h}t=d}if(E5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return MR(t);return!1},R5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},s2=function(t){var n=[],r=[];return t.forEach(function(i,c){var l=!!i.scopeParent,f=l?i.scopeParent:i,d=m5(f,l),h=l?s2(i.candidates):f;d===0?l?n.push.apply(n,h):n.push(f):r.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:h})}),r.sort(g5).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(n)},Dp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ep([t],n.includeContainer,{filter:dv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:C5}):r=JI(t,n.includeContainer,dv.bind(null,n)),s2(r)},T5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ep([t],n.includeContainer,{filter:fv.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=JI(t,n.includeContainer,fv.bind(null,n)),r},r2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return el.call(t,Xh)===!1?!1:dv(n,t)};const yf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function o2(e,t){const n=Dp(e,yf()),r=n.length;if(r===0)return;const i=mi(_n(e)),c=n.indexOf(i),l=c===-1?t===1?0:r-1:c+t;return n[l]}function i2(e){return o2(_n(e).body,1)||e}function a2(e){return o2(_n(e).body,-1)||e}function Hu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function A5(e){Dp(e,yf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function DR(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const eb="none",tp="trigger-press",br="trigger-hover",Ih="trigger-focus",c2="outside-press",wye="item-press",I5="close-press",l2="focus-out",tb="escape-key",Eye="list-navigation",xye="cancel-open",O5="disabled",u2="imperative-action",Rye="window-resize";function Vt(e,t,n,r){let i=!1,c=!1;const l=Ms;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){c=!0},get isCanceled(){return i},get isPropagationAllowed(){return c},trigger:n,...l}}const f2=I.createContext(void 0);function La(e){const t=I.useContext(f2);if(e===!1&&t===void 0)throw new Error(_o(27));return t}let nf=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const M5={[nf.startingStyle]:""},D5={[nf.endingStyle]:""},nb={transitionStatus(e){return e==="starting"?M5:e==="ending"?D5:null}};let Sa=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=nf.startingStyle]="startingStyle",e[e.endingStyle=nf.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),hv=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const k5={[hv.popupOpen]:""},P5={[hv.popupOpen]:"",[hv.pressed]:""},N5={[Sa.open]:""},z5={[Sa.closed]:""},L5={[Sa.anchorHidden]:""},B5={open(e){return e?k5:null}},Cye={open(e){return e?P5:null}},vf={open(e){return e?N5:z5},anchorHidden(e){return e?L5:null}},$5={...vf,...nb},U5=I.forwardRef(function(t,n){const{render:r,className:i,forceRender:c=!1,...l}=t,{store:f}=La(),d=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus"),v=I.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return cr("div",t,{state:v,ref:[f.context.backdropRef,n],stateAttributesMapping:$5,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:c||!h})}),j5=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,nativeButton:l=!0,...f}=t,{store:d}=La(),h=d.useState("open");function y(_){h&&d.setOpen(!1,Vt(I5,_.nativeEvent))}const{getButtonProps:g,buttonRef:v}=AI({disabled:c,native:l}),b=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:b,ref:[n,v],props:[{onClick:y},f,g]})}),H5=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=La(),d=Yv(c);return f.useSyncedValueWithCleanup("descriptionElementId",d),cr("p",t,{ref:n,props:[{id:d},l]})});function Or(e){const t=Pr(F5,e).current;return t.next=e,mt(t.effect),t}function F5(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function q5(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const V5=I.createContext(null),G5=I.createContext(null),kp=()=>I.useContext(V5)?.id||null,bf=e=>{const t=I.useContext(G5);return e??t};function tl(e){return`data-base-ui-${e}`}function Oh(e,t,n){if(n&&!tf(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const d2=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ri,currentIdRef:{current:null},currentContextRef:{current:null}});function K5(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),c=I.useRef(n),l=I.useRef(null),f=I.useRef(null),d=Ci();return $.jsx(d2.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:f,timeout:d}),[r,d]),children:t})}function Z5(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:i=!0,open:c}=t,l=I.useContext(d2),{currentIdRef:f,delayRef:d,timeoutMs:h,initialDelayRef:y,currentContextRef:g,hasProvider:v,timeout:b}=l,[_,x]=I.useState(!1);return mt(()=>{function R(){x(!1),g.current?.setIsInstantPhase(!1),f.current=null,g.current=null,d.current=y.current}if(i&&f.current&&!c&&f.current===r){if(x(!1),h){const C=r;return b.start(h,()=>{n.select("open")||f.current&&f.current!==C||R()}),()=>{b.clear()}}R()}},[i,c,r,f,d,h,y,g,b,n]),mt(()=>{if(!i||!c)return;const R=g.current,C=f.current;b.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:x},f.current=r,d.current={open:0,close:Oh(y.current,"close")},C!==null&&C!==r?(x(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,Vt(eb))):(x(!1),R?.setIsInstantPhase(!1))},[i,c,r,n,f,d,h,y,g,b]),mt(()=>()=>{g.current=null},[g]),I.useMemo(()=>({hasProvider:v,delayRef:d,isInstantPhase:_}),[v,d,_])}const h2={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},p2={...h2,position:"fixed",top:0,left:0},Tye={...h2,position:"absolute"},uh=null;class Q5{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const fh=new Q5;class Ir{static create(){return new Ir}static request(t){return fh.request(t)}static cancel(t){return fh.cancel(t)}currentId=uh;request(t){this.cancel(),this.currentId=fh.request(()=>{this.currentId=uh,t()})}cancel=()=>{this.currentId!==uh&&(fh.cancel(this.currentId),this.currentId=uh)};disposeEffect=()=>this.cancel}function m2(){const e=Pr(Ir.create).current;return jI(e.disposeEffect),e}const np=I.forwardRef(function(t,n){const[r,i]=I.useState();mt(()=>{VI&&i("button")},[]);const c={tabIndex:0,role:r};return $.jsx("span",{...t,ref:n,style:p2,"aria-hidden":r?void 0:!0,...c,"data-base-ui-focus-guard":""})});let kR=0;function Xy(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(kR);const c=()=>e?.focus({preventScroll:n});i?c():kR=requestAnimationFrame(c)}const Fc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function PR(e){return e==="inert"?Fc.inert:e==="aria-hidden"?Fc["aria-hidden"]:Fc.none}let dh=new WeakSet,hh={},Wy=0;const g2=e=>e&&(e.host||g2(e.parentNode)),Y5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=g2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function X5(e,t,n,r){const i="data-base-ui-inert",c=r?"inert":n?"aria-hidden":null,l=Y5(t,e),f=new Set,d=new Set(l),h=[];hh[i]||(hh[i]=new WeakMap);const y=hh[i];l.forEach(g),v(t),f.clear();function g(b){!b||f.has(b)||(f.add(b),b.parentNode&&g(b.parentNode))}function v(b){!b||d.has(b)||[].forEach.call(b.children,_=>{if(Oi(_)!=="script")if(f.has(_))v(_);else{const x=c?_.getAttribute(c):null,R=x!==null&&x!=="false",C=PR(c),A=(C.get(_)||0)+1,O=(y.get(_)||0)+1;C.set(_,A),y.set(_,O),h.push(_),A===1&&R&&dh.add(_),O===1&&_.setAttribute(i,""),!R&&c&&_.setAttribute(c,c==="inert"?"":"true")}})}return Wy+=1,()=>{h.forEach(b=>{const _=PR(c),R=(_.get(b)||0)-1,C=(y.get(b)||0)-1;_.set(b,R),y.set(b,C),R||(!dh.has(b)&&c&&b.removeAttribute(c),dh.delete(b)),C||b.removeAttribute(i)}),Wy-=1,Wy||(Fc.inert=new WeakMap,Fc["aria-hidden"]=new WeakMap,Fc.none=new WeakMap,dh=new WeakSet,hh={})}}function W5(e,t=!1,n=!1){const r=_n(e[0]).body;return X5(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const y2=I.createContext(null),v2=()=>I.useContext(y2),J5=tl("portal");function b2(e={}){const{ref:t,container:n,componentProps:r=Ms,elementProps:i,elementState:c}=e,l=gf(),d=v2()?.portalNode,[h,y]=I.useState(null),[g,v]=I.useState(null),b=Ze(C=>{C!==null&&v(C)}),_=I.useRef(null);mt(()=>{if(n===null){_.current&&(_.current=null,v(null),y(null));return}if(l==null)return;const C=(n&&(Kv(n)?n:n.current))??d??document.body;if(C==null){_.current&&(_.current=null,v(null),y(null));return}_.current!==C&&(_.current=C,v(null),y(C))},[n,d,l]);const x=cr("div",r,{ref:[t,b],state:c,props:[{id:l,[J5]:""},i]});return{portalNode:g,portalSubtree:h&&x?Ii.createPortal(x,h):null}}const e8=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:y}=b2({container:i,ref:n,componentProps:t,elementProps:d}),g=I.useRef(null),v=I.useRef(null),b=I.useRef(null),_=I.useRef(null),[x,R]=I.useState(null),C=x?.modal,A=x?.open,O=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!h;I.useEffect(()=>{if(!h||C)return;function N(U){h&&U.relatedTarget&&Hu(U)&&(U.type==="focusin"?DR:A5)(h)}return h.addEventListener("focusin",N,!0),h.addEventListener("focusout",N,!0),()=>{h.removeEventListener("focusin",N,!0),h.removeEventListener("focusout",N,!0)}},[h,C]),I.useEffect(()=>{!h||A||DR(h)},[A,h]);const D=I.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:b,afterInsideRef:_,portalNode:h,setFocusManagerState:R}),[h]);return $.jsxs(I.Fragment,{children:[y,$.jsxs(y2.Provider,{value:D,children:[O&&h&&$.jsx(np,{"data-type":"outside",ref:g,onFocus:N=>{if(Hu(N,h))b.current?.focus();else{const U=x?x.domReference:null;a2(U)?.focus()}}}),O&&h&&$.jsx("span",{"aria-owns":h.id,style:t$}),h&&Ii.createPortal(r,h),O&&h&&$.jsx(np,{"data-type":"outside",ref:v,onFocus:N=>{if(Hu(N,h))_.current?.focus();else{const U=x?x.domReference:null;i2(U)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,Vt(l2,N.nativeEvent))}}})]})]})});function lo(e){return e==null?e:"current"in e?e.current:e}function t8(e,t){const n=hn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const NR=20;let vi=[];function sb(){vi=vi.filter(e=>e.isConnected)}function n8(e){sb(),e&&Oi(e)!=="body"&&(vi.push(e),vi.length>NR&&(vi=vi.slice(-NR)))}function Jy(){return sb(),vi[vi.length-1]}function s8(e){if(!e)return null;const t=yf();return r2(e,t)?e:Dp(e,t)[0]||e}function r8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Ns(e).display!=="none"}function zR(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=yf(),i=T5(e,n).filter(l=>{const f=l.getAttribute("data-tabindex")||"";return r2(l,n)||l.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function o8(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:c=!0,returnFocus:l=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:y="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:b,beforeContentFocusGuardRef:_,externalTree:x}=e,R="rootStore"in t?t.rootStore:t,C=R.useState("open"),A=R.useState("domReferenceElement"),O=R.useState("floatingElement"),{events:D,dataRef:N}=R.context,U=Ze(()=>N.current.floatingContext?.nodeId),B=Ze(g),k=c===!1,Z=TR(A)&&k,se=Or(i),le=Or(c),K=Or(l),Q=Or(y),ye=bf(x),fe=v2(),V=I.useRef(null),W=I.useRef(null),j=I.useRef(!1),ve=I.useRef(!1),Te=I.useRef(!1),P=I.useRef(-1),ne=I.useRef(""),ie=I.useRef(""),de=I.useRef(null),Re=I.useRef(null),Se=Gh(de,_,fe?.beforeInsideRef),be=Gh(Re,fe?.afterInsideRef),Ye=Ci(),He=Ci(),ht=m2(),Ft=fe!=null,oe=cv(O),Fe=Ze((_e=oe)=>_e?Dp(_e,yf()):[]),Ie=Ze(_e=>{const Ne=Fe(_e);return se.current.map(()=>Ne).filter(Boolean).flat()});I.useEffect(()=>{if(r||!d)return;function _e(Ve){Ve.key==="Tab"&&bt(oe,mi(_n(oe)))&&Fe().length===0&&!Z&&XU(Ve)}const Ne=_n(oe);return Ne.addEventListener("keydown",_e),()=>{Ne.removeEventListener("keydown",_e)}},[r,A,oe,d,se,Z,Fe,Ie]),I.useEffect(()=>{if(r||!O)return;function _e(Ne){const Ve=ns(Ne),ut=Fe().indexOf(Ve);ut!==-1&&(P.current=ut)}return O.addEventListener("focusin",_e),()=>{O.removeEventListener("focusin",_e)}},[r,O,Fe]),I.useEffect(()=>{if(r||!C)return;const _e=_n(oe);function Ne(){Te.current=!1}function Ve(ut){const Be=ns(ut),Le=bt(O,Be)||bt(A,Be)||bt(fe?.portalNode,Be);Te.current=!Le,ie.current=ut.pointerType||"keyboard"}function Qe(){ie.current="keyboard"}return _e.addEventListener("pointerdown",Ve,!0),_e.addEventListener("pointerup",Ne,!0),_e.addEventListener("pointercancel",Ne,!0),_e.addEventListener("keydown",Qe,!0),()=>{_e.removeEventListener("pointerdown",Ve,!0),_e.removeEventListener("pointerup",Ne,!0),_e.removeEventListener("pointercancel",Ne,!0),_e.removeEventListener("keydown",Qe,!0)}},[r,O,A,oe,C,fe]),I.useEffect(()=>{if(r||!h)return;function _e(){ve.current=!0,He.start(0,()=>{ve.current=!1})}function Ne(Be){const Le=Be.relatedTarget,nn=Be.currentTarget,it=ns(Be);queueMicrotask(()=>{const Ss=U(),gt=R.context.triggerElements,Bt=Le?.hasAttribute(tl("focus-guard"))&&[de.current,Re.current,fe?.beforeInsideRef.current,fe?.afterInsideRef.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v)].includes(Le),$t=!(bt(A,Le)||bt(O,Le)||bt(Le,O)||bt(fe?.portalNode,Le)||Le!=null&>.hasElement(Le)||gt.hasMatchingElement(sn=>bt(sn,Le))||Bt||ye&&(xa(ye.nodesRef.current,Ss).find(sn=>bt(sn.context?.elements.floating,Le)||bt(sn.context?.elements.domReference,Le))||AR(ye.nodesRef.current,Ss).find(sn=>[sn.context?.elements.floating,cv(sn.context?.elements.floating)].includes(Le)||sn.context?.elements.domReference===Le)));if(nn===A&&oe&&zR(oe,se),f&&nn!==A&&!r8(it)&&mi(_n(oe))===_n(oe).body){if(wn(oe)&&(oe.focus(),f==="popup")){ht.request(()=>{oe.focus()});return}const sn=P.current,_s=Fe(),$s=_s[sn]||_s[_s.length-1]||oe;wn($s)&&$s.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(Z||!d)&&Le&&$t&&!ve.current&&(Z||Le!==Jy())&&(j.current=!0,R.setOpen(!1,Vt(l2,Be)))})}function Ve(){Te.current||(N.current.insideReactTree=!0,Ye.start(0,()=>{N.current.insideReactTree=!1}))}const Qe=wn(A)?A:null,ut=[];if(!(!O&&!Qe))return Qe&&(Qe.addEventListener("focusout",Ne),Qe.addEventListener("pointerdown",_e),ut.push(()=>{Qe.removeEventListener("focusout",Ne),Qe.removeEventListener("pointerdown",_e)})),O&&(O.addEventListener("focusout",Ne),fe&&(O.addEventListener("focusout",Ve,!0),ut.push(()=>{O.removeEventListener("focusout",Ve,!0)})),ut.push(()=>{O.removeEventListener("focusout",Ne)})),()=>{ut.forEach(Be=>{Be()})}},[r,A,O,oe,d,ye,fe,R,h,f,Fe,Z,U,se,N,Ye,He,ht,v,b]),I.useEffect(()=>{if(r||!O||!C)return;const _e=Array.from(fe?.portalNode?.querySelectorAll(`[${tl("portal")}]`)||[]),Ve=(ye?AR(ye.nodesRef.current,U()):[]).find(Be=>TR(Be.context?.elements.domReference||null))?.context?.elements.domReference,Qe=[O,Ve,..._e,...B(),V.current,W.current,de.current,Re.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v),Z?A:null].filter(Be=>Be!=null),ut=W5(Qe,d||Z);return()=>{ut()}},[C,r,A,O,d,se,fe,Z,ye,U,B,v,b]),mt(()=>{if(!C||r||!wn(oe))return;const _e=_n(oe),Ne=mi(_e);queueMicrotask(()=>{const Ve=Ie(oe),Qe=le.current,ut=typeof Qe=="function"?Qe(Q.current||""):Qe;if(ut===void 0||ut===!1)return;let Be;ut===!0||ut===null?Be=Ve[0]||oe:Be=lo(ut),Be=Be||Ve[0]||oe,!bt(oe,Ne)&&Xy(Be,{preventScroll:Be===oe})})},[r,C,oe,k,Ie,le,Q]),mt(()=>{if(r||!oe)return;const _e=_n(oe),Ne=mi(_e);n8(Ne);function Ve(Be){if(Be.open||(ne.current=t8(Be.nativeEvent,ie.current)),Be.reason===br&&Be.nativeEvent.type==="mouseleave"&&(j.current=!0),Be.reason===c2)if(Be.nested)j.current=!1;else if(JU(Be.nativeEvent)||e5(Be.nativeEvent))j.current=!1;else{let Le=!1;document.createElement("div").focus({get preventScroll(){return Le=!0,!1}}),Le?j.current=!1:j.current=!0}}D.on("openchange",Ve);const Qe=_e.createElement("span");Qe.setAttribute("tabindex","-1"),Qe.setAttribute("aria-hidden","true"),Object.assign(Qe.style,p2),Ft&&A&&A.insertAdjacentElement("afterend",Qe);function ut(){const Be=K.current;let Le=typeof Be=="function"?Be(ne.current):Be;if(Le===void 0||Le===!1)return null;if(Le===null&&(Le=!0),typeof Le=="boolean"){const it=A||Jy();return it&&it.isConnected?it:Qe}const nn=A||Jy()||Qe;return lo(Le)||nn}return()=>{D.off("openchange",Ve);const Be=mi(_e),Le=bt(O,Be)||ye&&xa(ye.nodesRef.current,U(),!1).some(it=>bt(it.context?.elements.floating,Be)),nn=ut();queueMicrotask(()=>{const it=s8(nn),Ss=typeof K.current!="boolean";K.current&&!j.current&&wn(it)&&(!(!Ss&&it!==Be&&Be!==_e.body)||Le)&&it.focus({preventScroll:!0}),Qe.remove()})}},[r,O,oe,K,N,D,ye,Ft,A,U]),I.useEffect(()=>{queueMicrotask(()=>{j.current=!1})},[r]),I.useEffect(()=>{if(r||!C)return;function _e(Ve){ns(Ve)?.closest(`[${JB}]`)&&(ve.current=!0)}const Ne=_n(oe);return Ne.addEventListener("pointerdown",_e,!0),()=>{Ne.removeEventListener("pointerdown",_e,!0)}},[r,C,oe]),mt(()=>{if(!r&&fe)return fe.setFocusManagerState({modal:d,closeOnFocusOut:h,open:C,onOpenChange:R.setOpen,domReference:A}),()=>{fe.setFocusManagerState(null)}},[r,fe,d,C,R,h,A]),mt(()=>{if(!(r||!oe))return zR(oe,se),()=>{queueMicrotask(sb)}},[r,oe,se]);const Pt=!r&&(d?!Z:!0)&&(Ft||d);return $.jsxs(I.Fragment,{children:[Pt&&$.jsx(np,{"data-type":"inside",ref:Se,onFocus:_e=>{if(d){const Ne=Ie();Xy(Ne[Ne.length-1])}else fe?.portalNode&&(j.current=!1,Hu(_e,fe.portalNode)?i2(A)?.focus():lo(b??fe.beforeOutsideRef)?.focus())}}),n,Pt&&$.jsx(np,{"data-type":"inside",ref:be,onFocus:_e=>{d?Xy(Ie()[0]):fe?.portalNode&&(h&&(j.current=!0),Hu(_e,fe.portalNode)?a2(A)?.focus():lo(v??fe.afterOutsideRef)?.focus())}})]})}function i8(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,v=c.y;return n==null&&t.x&&l&&(n=c.x-t.x),r==null&&t.y&&f&&(r=c.y-t.y),g-=n||0,v-=r||0,h=0,y=0,!i||d?(h=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0,g=l&&t.x!=null?t.x:g,v=f&&t.y!=null?t.y:v):i&&!d&&(y=t.axis==="x"?c.height:y,h=t.axis==="y"?c.width:h),i=!0,{width:h,height:y,x:g,y:v,top:v,right:g+h,bottom:v+y,left:g}}}}function LR(e){return e!=null&&e.clientX!=null}function a8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:f=!0,axis:d="both",x:h=null,y=null}=t,g=I.useRef(!1),v=I.useRef(null),[b,_]=I.useState(),[x,R]=I.useState([]),C=Ze((U,B,k)=>{g.current||l.current.openEvent&&!LR(l.current.openEvent)||n.set("positionReference",i8(k??c,{x:U,y:B,axis:d,dataRef:l,pointerType:b}))}),A=Ze(U=>{h!=null||y!=null||(r?v.current||R([]):C(U.clientX,U.clientY,U.currentTarget))}),O=tf(b)?i:r,D=I.useCallback(()=>{if(!O||!f||h!=null||y!=null)return;const U=hn(i);function B(k){const Z=ns(k);bt(i,Z)?(U.removeEventListener("mousemove",B),v.current=null):C(k.clientX,k.clientY)}if(!l.current.openEvent||LR(l.current.openEvent)){U.addEventListener("mousemove",B);const k=()=>{U.removeEventListener("mousemove",B),v.current=null};return v.current=k,k}n.set("positionReference",c)},[O,f,h,y,i,l,c,n,C]);I.useEffect(()=>D(),[D,x]),I.useEffect(()=>{f&&!i&&(g.current=!1)},[f,i]),I.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]),mt(()=>{f&&(h!=null||y!=null)&&(g.current=!1,C(h,y))},[f,h,y,C]);const N=I.useMemo(()=>{function U(B){_(B.pointerType)}return{onPointerDown:U,onPointerEnter:U,onMouseMove:A,onMouseEnter:A}},[A]);return I.useMemo(()=>f?{reference:N,trigger:N}:{},[f,N])}function BR(e,t,n){let{reference:r,floating:i}=e;const c=ar(t),l=Jv(t),f=Wv(l),d=ps(t),h=c==="y",y=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,v=r[f]/2-i[f]/2;let b;switch(d){case"top":b={x:y,y:r.y-i.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-i.width,y:g};break;default:b={x:r.x,y:r.y}}switch(Mi(t)){case"start":b[l]-=v*(n&&h?-1:1);break;case"end":b[l]+=v*(n&&h?-1:1);break}return b}const c8=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,f=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:g}=BR(h,r,d),v=r,b={},_=0;for(let x=0;xye<=0)){var le,K;const ye=(((le=c.flip)==null?void 0:le.index)||0)+1,fe=B[ye];if(fe&&(!(g==="alignment"?A!==ar(fe):!1)||se.every(j=>ar(j.placement)===A?j.overflows[0]>0:!0)))return{data:{index:ye,overflows:se},reset:{placement:fe}};let V=(K=se.filter(W=>W.overflows[0]<=0).sort((W,j)=>W.overflows[1]-j.overflows[1])[0])==null?void 0:K.placement;if(!V)switch(b){case"bestFit":{var Q;const W=(Q=se.filter(j=>{if(U){const ve=ar(j.placement);return ve===A||ve==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(ve=>ve>0).reduce((ve,Te)=>ve+Te,0)]).sort((j,ve)=>j[1]-ve[1])[0])==null?void 0:Q[0];W&&(V=W);break}case"initialPlacement":V=f;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function $R(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UR(e){return n5.some(t=>e[t]>=0)}const u8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vo(e,t);switch(r){case"referenceHidden":{const c=await sf(t,{...i,elementContext:"reference"}),l=$R(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:UR(l)}}}case"escaped":{const c=await sf(t,{...i,altBoundary:!0}),l=$R(c,n.floating);return{data:{escapedOffsets:l,escaped:UR(l)}}}default:return{}}}}},S2=new Set(["left","top"]);async function f8(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ps(n),f=Mi(n),d=ar(n)==="y",h=S2.has(l)?-1:1,y=c&&d?-1:1,g=vo(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof _=="number"&&(b=f==="end"?_*-1:_),d?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const d8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:l,middlewareData:f}=t,d=await f8(t,e);return l===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},h8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:f={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...d}=vo(e,t),h={x:n,y:r},y=await sf(t,d),g=ar(ps(i)),v=Xv(g);let b=h[v],_=h[g];if(c){const R=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=b+y[R],O=b-y[C];b=lv(A,b,O)}if(l){const R=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=_+y[R],O=_-y[C];_=lv(A,_,O)}const x=f.fn({...t,[v]:b,[g]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:c,[g]:l}}}}}},p8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=vo(e,t),y={x:n,y:r},g=ar(i),v=Xv(g);let b=y[v],_=y[g];const x=vo(f,t),R=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const O=v==="y"?"height":"width",D=c.reference[v]-c.floating[O]+R.mainAxis,N=c.reference[v]+c.reference[O]-R.mainAxis;bN&&(b=N)}if(h){var C,A;const O=v==="y"?"width":"height",D=S2.has(ps(i)),N=c.reference[g]-c.floating[O]+(D&&((C=l.offset)==null?void 0:C[g])||0)+(D?0:R.crossAxis),U=c.reference[g]+c.reference[O]+(D?0:((A=l.offset)==null?void 0:A[g])||0)-(D?R.crossAxis:0);_U&&(_=U)}return{[v]:b,[g]:_}}}},m8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:l,elements:f}=t,{apply:d=()=>{},...h}=vo(e,t),y=await sf(t,h),g=ps(i),v=Mi(i),b=ar(i)==="y",{width:_,height:x}=c.floating;let R,C;g==="top"||g==="bottom"?(R=g,C=v===(await(l.isRTL==null?void 0:l.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,R=v==="end"?"top":"bottom");const A=x-y.top-y.bottom,O=_-y.left-y.right,D=Jc(x-y[R],A),N=Jc(_-y[C],O),U=!t.middlewareData.shift;let B=D,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(B=A),U&&!v){const se=Os(y.left,0),le=Os(y.right,0),K=Os(y.top,0),Q=Os(y.bottom,0);b?k=_-2*(se!==0||le!==0?se+le:Os(y.left,y.right)):B=x-2*(K!==0||Q!==0?K+Q:Os(y.top,y.bottom))}await d({...t,availableWidth:k,availableHeight:B});const Z=await l.getDimensions(f.floating);return _!==Z.width||x!==Z.height?{reset:{rects:!0}}:{}}}};function _2(e){const t=Ns(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=wn(e),c=i?e.offsetWidth:n,l=i?e.offsetHeight:r,f=Zh(n)!==c||Zh(r)!==l;return f&&(n=c,r=l),{width:n,height:r,$:f}}function rb(e){return _t(e)?e:e.contextElement}function qc(e){const t=rb(e);if(!wn(t))return Mr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=_2(t);let l=(c?Zh(n.width):n.width)/r,f=(c?Zh(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!f||!Number.isFinite(f))&&(f=1),{x:l,y:f}}const g8=Mr(0);function w2(e){const t=hn(e);return!Op()||!t.visualViewport?g8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hn(e)?!1:t}function Ia(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=rb(e);let l=Mr(1);t&&(r?_t(r)&&(l=qc(r)):l=qc(e));const f=y8(c,n,r)?w2(c):Mr(0);let d=(i.left+f.x)/l.x,h=(i.top+f.y)/l.y,y=i.width/l.x,g=i.height/l.y;if(c){const v=hn(c),b=r&&_t(r)?hn(r):r;let _=v,x=rv(_);for(;x&&r&&b!==_;){const R=qc(x),C=x.getBoundingClientRect(),A=Ns(x),O=C.left+(x.clientLeft+parseFloat(A.paddingLeft))*R.x,D=C.top+(x.clientTop+parseFloat(A.paddingTop))*R.y;d*=R.x,h*=R.y,y*=R.x,g*=R.y,d+=O,h+=D,_=hn(x),x=rv(_)}}return Yh({width:y,height:g,x:d,y:h})}function Pp(e,t){const n=Mp(e).scrollLeft;return t?t.left+n:Ia(Nr(e)).left+n}function E2(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function v8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",l=Nr(r),f=t?Ip(t.floating):!1;if(r===l||f&&c)return n;let d={scrollLeft:0,scrollTop:0},h=Mr(1);const y=Mr(0),g=wn(r);if((g||!g&&!c)&&((Oi(r)!=="body"||Na(l))&&(d=Mp(r)),wn(r))){const b=Ia(r);h=qc(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const v=l&&!g&&!c?E2(l,d):Mr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+y.x+v.x,y:n.y*h.y-d.scrollTop*h.y+y.y+v.y}}function b8(e){return Array.from(e.getClientRects())}function S8(e){const t=Nr(e),n=Mp(e),r=e.ownerDocument.body,i=Os(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=Os(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Pp(e);const f=-n.scrollTop;return Ns(r).direction==="rtl"&&(l+=Os(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:f}}const jR=25;function _8(e,t){const n=hn(e),r=Nr(e),i=n.visualViewport;let c=r.clientWidth,l=r.clientHeight,f=0,d=0;if(i){c=i.width,l=i.height;const y=Op();(!y||y&&t==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}const h=Pp(r);if(h<=0){const y=r.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-b);_<=jR&&(c-=_)}else h<=jR&&(c+=h);return{width:c,height:l,x:f,y:d}}const w8=new Set(["absolute","fixed"]);function E8(e,t){const n=Ia(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=wn(e)?qc(e):Mr(1),l=e.clientWidth*c.x,f=e.clientHeight*c.y,d=i*c.x,h=r*c.y;return{width:l,height:f,x:d,y:h}}function HR(e,t,n){let r;if(t==="viewport")r=_8(e,n);else if(t==="document")r=S8(Nr(e));else if(_t(t))r=E8(t,n);else{const i=w2(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Yh(r)}function x2(e,t){const n=yo(e);return n===t||!_t(n)||mo(n)?!1:Ns(n).position==="fixed"||x2(n,t)}function x8(e,t){const n=t.get(e);if(n)return n;let r=wi(e,[],!1).filter(f=>_t(f)&&Oi(f)!=="body"),i=null;const c=Ns(e).position==="fixed";let l=c?yo(e):e;for(;_t(l)&&!mo(l);){const f=Ns(l),d=Zv(l);!d&&f.position==="fixed"&&(i=null),(c?!d&&!i:!d&&f.position==="static"&&!!i&&w8.has(i.position)||Na(l)&&!d&&x2(e,l))?r=r.filter(y=>y!==l):i=f,l=yo(l)}return t.set(e,r),r}function R8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Ip(t)?[]:x8(t,this._c):[].concat(n),r],f=l[0],d=l.reduce((h,y)=>{const g=HR(t,y,i);return h.top=Os(g.top,h.top),h.right=Jc(g.right,h.right),h.bottom=Jc(g.bottom,h.bottom),h.left=Os(g.left,h.left),h},HR(t,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function C8(e){const{width:t,height:n}=_2(e);return{width:t,height:n}}function T8(e,t,n){const r=wn(t),i=Nr(t),c=n==="fixed",l=Ia(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const d=Mr(0);function h(){d.x=Pp(i)}if(r||!r&&!c)if((Oi(t)!=="body"||Na(i))&&(f=Mp(t)),r){const b=Ia(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&h();c&&!r&&i&&h();const y=i&&!r&&!c?E2(i,f):Mr(0),g=l.left+f.scrollLeft-d.x-y.x,v=l.top+f.scrollTop-d.y-y.y;return{x:g,y:v,width:l.width,height:l.height}}function e0(e){return Ns(e).position==="static"}function FR(e,t){if(!wn(e)||Ns(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nr(e)===n&&(n=n.ownerDocument.body),n}function R2(e,t){const n=hn(e);if(Ip(e))return n;if(!wn(e)){let i=yo(e);for(;i&&!mo(i);){if(_t(i)&&!e0(i))return i;i=yo(i)}return n}let r=FR(e,t);for(;r&&k$(r)&&e0(r);)r=FR(r,t);return r&&mo(r)&&e0(r)&&!Zv(r)?n:r||B$(e)||n}const A8=async function(e){const t=this.getOffsetParent||R2,n=this.getDimensions,r=await n(e.floating);return{reference:T8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function I8(e){return Ns(e).direction==="rtl"}const O8={convertOffsetParentRelativeRectToViewportRelativeRect:v8,getDocumentElement:Nr,getClippingRect:R8,getOffsetParent:R2,getElementRects:A8,getClientRects:b8,getDimensions:C8,getScale:qc,isElement:_t,isRTL:I8};function C2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function M8(e,t){let n=null,r;const i=Nr(e);function c(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function l(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||t(),!v||!b)return;const _=lh(g),x=lh(i.clientWidth-(y+v)),R=lh(i.clientHeight-(g+b)),C=lh(y),O={rootMargin:-_+"px "+-x+"px "+-R+"px "+-C+"px",threshold:Os(0,Jc(1,d))||1};let D=!0;function N(U){const B=U[0].intersectionRatio;if(B!==d){if(!D)return l();B?l(!1,B):r=setTimeout(()=>{l(!1,1e-7)},1e3)}B===1&&!C2(h,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...O,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,O)}n.observe(e)}return l(!0),c}function qR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=rb(e),y=i||c?[...h?wi(h):[],...wi(t)]:[];y.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const g=h&&f?M8(h,n):null;let v=-1,b=null;l&&(b=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,x=d?Ia(e):null;d&&R();function R(){const C=Ia(e);x&&!C2(x,C)&&n(),x=C,_=requestAnimationFrame(R)}return n(),()=>{var C;y.forEach(A=>{i&&A.removeEventListener("scroll",n),c&&A.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const D8=d8,k8=h8,P8=l8,N8=m8,z8=u8,L8=p8,B8=(e,t,n)=>{const r=new Map,i={platform:O8,...n},c={...i.platform,_c:r};return c8(e,t,{...i,platform:c})};var $8=typeof document<"u",U8=function(){},Mh=$8?I.useLayoutEffect:U8;function sp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!sp(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function T2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function VR(e,t){const n=T2(e);return Math.round(t*n)/n}function t0(e){const t=I.useRef(e);return Mh(()=>{t.current=e}),t}function j8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:l}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=I.useState(r);sp(v,r)||b(r);const[_,x]=I.useState(null),[R,C]=I.useState(null),A=I.useCallback(j=>{j!==U.current&&(U.current=j,x(j))},[]),O=I.useCallback(j=>{j!==B.current&&(B.current=j,C(j))},[]),D=c||_,N=l||R,U=I.useRef(null),B=I.useRef(null),k=I.useRef(y),Z=d!=null,se=t0(d),le=t0(i),K=t0(h),Q=I.useCallback(()=>{if(!U.current||!B.current)return;const j={placement:t,strategy:n,middleware:v};le.current&&(j.platform=le.current),B8(U.current,B.current,j).then(ve=>{const Te={...ve,isPositioned:K.current!==!1};ye.current&&!sp(k.current,Te)&&(k.current=Te,Ii.flushSync(()=>{g(Te)}))})},[v,t,n,le,K]);Mh(()=>{h===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,g(j=>({...j,isPositioned:!1})))},[h]);const ye=I.useRef(!1);Mh(()=>(ye.current=!0,()=>{ye.current=!1}),[]),Mh(()=>{if(D&&(U.current=D),N&&(B.current=N),D&&N){if(se.current)return se.current(D,N,Q);Q()}},[D,N,Q,se,Z]);const fe=I.useMemo(()=>({reference:U,floating:B,setReference:A,setFloating:O}),[A,O]),V=I.useMemo(()=>({reference:D,floating:N}),[D,N]),W=I.useMemo(()=>{const j={position:n,left:0,top:0};if(!V.floating)return j;const ve=VR(V.floating,y.x),Te=VR(V.floating,y.y);return f?{...j,transform:"translate("+ve+"px, "+Te+"px)",...T2(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:Te}},[n,f,V.floating,y.x,y.y]);return I.useMemo(()=>({...y,update:Q,refs:fe,elements:V,floatingStyles:W}),[y,Q,fe,V,W])}const H8=(e,t)=>({...D8(e),options:[e,t]}),F8=(e,t)=>({...k8(e),options:[e,t]}),q8=(e,t)=>({...L8(e),options:[e,t]}),V8=(e,t)=>({...P8(e),options:[e,t]}),G8=(e,t)=>({...N8(e),options:[e,t]}),K8=(e,t)=>({...z8(e),options:[e,t]}),Z8={intentional:"onClick",sloppy:"onPointerDown"};function Q8(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function A2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=n.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:b=!1,referencePressEvent:_="sloppy",ancestorScroll:x=!1,bubbles:R,externalTree:C}=t,A=bf(C),O=Ze(typeof g=="function"?g:()=>!1),D=typeof g=="function"?O:g,N=I.useRef(!1),{escapeKey:U,outsidePress:B}=Q8(R),k=I.useRef(null),Z=Ci(),se=Ci(),le=Ze(()=>{se.clear(),d.current.insideReactTree=!1}),K=I.useRef(!1),Q=I.useRef(""),ye=Ze(oe=>{Q.current=oe.pointerType}),fe=Ze(()=>{const oe=Q.current,Fe=oe==="pen"||!oe?"mouse":oe,Ie=typeof v=="function"?v():v;return typeof Ie=="string"?Ie:Ie[Fe]}),V=Ze(oe=>{if(!r||!h||!y||oe.key!=="Escape"||K.current)return;const Fe=d.current.floatingContext?.nodeId,Ie=A?xa(A.nodesRef.current,Fe):[];if(!U&&Ie.length>0){let Ne=!0;if(Ie.forEach(Ve=>{Ve.context?.open&&!Ve.context.dataRef.current.__escapeKeyBubbles&&(Ne=!1)}),!Ne)return}const Pt=WU(oe)?oe.nativeEvent:oe,_e=Vt(tb,Pt);n.setOpen(!1,_e),!U&&!_e.isPropagationAllowed&&oe.stopPropagation()}),W=Ze(oe=>{const Fe=fe();return Fe==="intentional"&&oe.type!=="click"||Fe==="sloppy"&&oe.type==="click"}),j=Ze(()=>{d.current.insideReactTree=!0,se.start(0,le)}),ve=Ze((oe,Fe=!1)=>{if(W(oe)){le();return}if(d.current.insideReactTree){le();return}if(fe()==="intentional"&&Fe||typeof D=="function"&&!D(oe))return;const Ie=ns(oe),Pt=`[${tl("inert")}]`,_e=_n(n.select("floatingElement")).querySelectorAll(Pt),Ne=n.context.triggerElements;if(Ie&&(Ne.hasElement(Ie)||Ne.hasMatchingElement(Le=>bt(Le,Ie))))return;let Ve=_t(Ie)?Ie:null;for(;Ve&&!mo(Ve);){const Le=yo(Ve);if(mo(Le)||!_t(Le))break;Ve=Le}if(_e.length&&_t(Ie)&&!QU(Ie)&&!bt(Ie,n.select("floatingElement"))&&Array.from(_e).every(Le=>!bt(Ve,Le)))return;if(wn(Ie)&&!("touches"in oe)){const Le=mo(Ie),nn=Ns(Ie),it=/auto|scroll/,Ss=Le||it.test(nn.overflowX),gt=Le||it.test(nn.overflowY),Bt=Ss&&Ie.clientWidth>0&&Ie.scrollWidth>Ie.clientWidth,$t=gt&&Ie.clientHeight>0&&Ie.scrollHeight>Ie.clientHeight,sn=nn.direction==="rtl",_s=$t&&(sn?oe.offsetX<=Ie.offsetWidth-Ie.clientWidth:oe.offsetX>Ie.clientWidth),$s=Bt&&oe.offsetY>Ie.clientHeight;if(_s||$s)return}const Qe=d.current.floatingContext?.nodeId,ut=A&&xa(A.nodesRef.current,Qe).some(Le=>gr(oe,Le.context?.elements.floating));if(gr(oe,n.select("floatingElement"))||gr(oe,n.select("domReferenceElement"))||ut)return;const Be=A?xa(A.nodesRef.current,Qe):[];if(Be.length>0){let Le=!0;if(Be.forEach(nn=>{nn.context?.open&&!nn.context.dataRef.current.__outsidePressBubbles&&(Le=!1)}),!Le)return}n.setOpen(!1,Vt(c2,oe)),le()}),Te=Ze(oe=>{fe()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!h||gr(oe,n.select("floatingElement"))||gr(oe,n.select("domReferenceElement"))||ve(oe)}),P=Ze(oe=>{if(fe()!=="sloppy"||!n.select("open")||!h||gr(oe,n.select("floatingElement"))||gr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];Fe&&(k.current={startTime:Date.now(),startX:Fe.clientX,startY:Fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Z.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),ne=Ze(oe=>{const Fe=ns(oe);function Ie(){P(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),ie=Ze(oe=>{const Fe=N.current;if(N.current=!1,Z.clear(),oe.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Ie=ns(oe);function Pt(){oe.type==="pointerdown"?Te(oe):ve(oe,Fe),Ie?.removeEventListener(oe.type,Pt)}Ie?.addEventListener(oe.type,Pt)}),de=Ze(oe=>{if(fe()!=="sloppy"||!k.current||gr(oe,n.select("floatingElement"))||gr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];if(!Fe)return;const Ie=Math.abs(Fe.clientX-k.current.startX),Pt=Math.abs(Fe.clientY-k.current.startY),_e=Math.sqrt(Ie*Ie+Pt*Pt);_e>5&&(k.current.dismissOnTouchEnd=!0),_e>10&&(ve(oe),Z.clear(),k.current=null)}),Re=Ze(oe=>{const Fe=ns(oe);function Ie(){de(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),Se=Ze(oe=>{fe()!=="sloppy"||!k.current||gr(oe,n.select("floatingElement"))||gr(oe,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&ve(oe),Z.clear(),k.current=null)}),be=Ze(oe=>{const Fe=ns(oe);function Ie(){Se(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)});I.useEffect(()=>{if(!r||!h)return;d.current.__escapeKeyBubbles=U,d.current.__outsidePressBubbles=B;const oe=new Ri;function Fe(Ve){n.setOpen(!1,Vt(eb,Ve))}function Ie(){oe.clear(),K.current=!0}function Pt(){oe.start(Op()?5:0,()=>{K.current=!1})}const _e=_n(i);_e.addEventListener("pointerdown",ye,!0),y&&(_e.addEventListener("keydown",V),_e.addEventListener("compositionstart",Ie),_e.addEventListener("compositionend",Pt)),D&&(_e.addEventListener("click",ie,!0),_e.addEventListener("pointerdown",ie,!0),_e.addEventListener("touchstart",ne,!0),_e.addEventListener("touchmove",Re,!0),_e.addEventListener("touchend",be,!0),_e.addEventListener("mousedown",ie,!0));let Ne=[];return x&&(_t(l)&&(Ne=wi(l)),_t(i)&&(Ne=Ne.concat(wi(i))),!_t(c)&&c&&c.contextElement&&(Ne=Ne.concat(wi(c.contextElement)))),Ne=Ne.filter(Ve=>Ve!==_e.defaultView?.visualViewport),Ne.forEach(Ve=>{Ve.addEventListener("scroll",Fe,{passive:!0})}),()=>{_e.removeEventListener("pointerdown",ye,!0),y&&(_e.removeEventListener("keydown",V),_e.removeEventListener("compositionstart",Ie),_e.removeEventListener("compositionend",Pt)),D&&(_e.removeEventListener("click",ie,!0),_e.removeEventListener("pointerdown",ie,!0),_e.removeEventListener("touchstart",ne,!0),_e.removeEventListener("touchmove",Re,!0),_e.removeEventListener("touchend",be,!0),_e.removeEventListener("mousedown",ie,!0)),Ne.forEach(Ve=>{Ve.removeEventListener("scroll",Fe)}),oe.clear(),N.current=!1}},[d,i,c,l,y,D,r,f,x,h,U,B,V,ve,ie,Te,ne,Re,be,ye,n]),I.useEffect(le,[D,le]);const Ye=I.useMemo(()=>({onKeyDown:V,...b&&{[Z8[_]]:oe=>{n.setOpen(!1,Vt(tp,oe.nativeEvent))},..._!=="intentional"&&{onClick(oe){n.setOpen(!1,Vt(tp,oe.nativeEvent))}}}}),[V,n,b,_]),He=Ze(oe=>{const Fe=ns(oe.nativeEvent);!bt(n.select("floatingElement"),Fe)||oe.button!==0||(N.current=!0)}),ht=Ze(oe=>{!r||!h||oe.button!==0||(N.current=!0)}),Ft=I.useMemo(()=>({onKeyDown:V,onPointerDown:He,onMouseDown:He,onMouseUp:He,onClickCapture:j,onMouseDownCapture(oe){j(),ht(oe)},onPointerDownCapture(oe){j(),ht(oe)},onMouseUpCapture:j,onTouchEndCapture:j,onTouchMoveCapture:j}),[V,He,j,ht]);return I.useMemo(()=>h?{reference:Ye,floating:Ft,trigger:Ye}:{},[h,Ye,Ft])}var rp=Symbol("NOT_FOUND");function Y8(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function X8(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function W8(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var GR=e=>Array.isArray(e)?e:[e];function J8(e){const t=Array.isArray(e[0])?e[0]:e;return W8(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ej(e,t){const n=[],{length:r}=e;for(let i=0;it(f,h.key));if(d>-1){const h=n[d];return d>0&&(n.splice(d,1),n.unshift(h)),h.value}return rp}function i(f,d){r(f)===rp&&(n.unshift({key:f,value:d}),n.length>e&&n.pop())}function c(){return n}function l(){n=[]}return{get:r,put:i,getEntries:c,clear:l}}var sj=(e,t)=>e===t;function rj(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let c=0;cc(b.value,y));v&&(y=v.value,f!==0&&f--)}d.put(arguments,y)}return y}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var ij=class{constructor(e){this.value=e}deref(){return this.value}},aj=typeof WeakRef<"u"?WeakRef:ij,cj=0,KR=1;function ph(){return{s:cj,v:void 0,o:null,p:null}}function I2(e,t={}){let n=ph();const{resultEqualityCheck:r}=t;let i,c=0;function l(){let f=n;const{length:d}=arguments;for(let g=0,v=d;g{n=ph(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}function O2(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let c=0,l=0,f,d={},h=i.pop();typeof h=="object"&&(d=h,h=i.pop()),Y8(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...n,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:b=I2,argsMemoizeOptions:_=[]}=y,x=GR(v),R=GR(_),C=J8(i),A=g(function(){return c++,h.apply(null,arguments)},...x),O=b(function(){l++;const N=ej(C,arguments);return f=A.apply(null,N),f},...R);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var lj=O2(I2),uj=Object.assign((e,t=lj)=>{X8(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(c=>e[c]);return t(r,(...c)=>c.reduce((l,f,d)=>(l[n[d]]=f,l),{}))},{withTypes:()=>uj});O2({memoize:oj,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ot=(e,t,n,r,i,c,...l)=>{if(l.length>0)throw new Error(_o(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var fj=lI();const dj=Gv(19),hj=dj?mj:gj;function pj(e,t,n,r,i){return hj(e,t,n,r,i)}function mj(e,t,n,r,i){const c=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return fj.useSyncExternalStore(e.subscribe,c,c)}function gj(e,t,n,r,i){return uI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,n,r,i))}class Fu{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Fu.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Fu.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Fu.prototype.setState.call(this,t)}}class ob extends Fu{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),mt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;mt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);mt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const i=this,c=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,c),!c&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),mt(()=>{c&&!Object.is(i.state[t],n)&&super.setState({...i.state,[t]:n})},[i,t,n,r,c])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const c=this.selectors[t];return c(this.state,n,r,i)};useState=(t,n,r,i)=>{I.useDebugValue(t);const c=this.selectors[t];return pj(this,c,n,r,i)};useContextCallback(t,n){I.useDebugValue(t);const r=Ze(n??_I);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(c=>{const l=r(c);if(!Object.is(i,l)){const f=i;i=l,n(l,f,this)}})}}const yj={open:ot(e=>e.open),domReferenceElement:ot(e=>e.domReferenceElement),referenceElement:ot(e=>e.positionReference??e.referenceElement),floatingElement:ot(e=>e.floatingElement),floatingId:ot(e=>e.floatingId)};class ib extends ob{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:c,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:q5(),nested:n,noEmit:r,triggerElements:c},yj)}setOpen=(t,n)=>{if((!t||!this.state.open||t5(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function vj(e,t=!1,n=!1){const[r,i]=I.useState(e&&t?"idle":void 0),[c,l]=I.useState(e);return e&&!c&&(l(!0),i("starting")),!e&&c&&r!=="ending"&&!n&&i("ending"),!e&&!c&&r==="ending"&&i(void 0),mt(()=>{if(!e&&c&&r!=="ending"&&n){const f=Ir.request(()=>{i("ending")});return()=>{Ir.cancel(f)}}},[e,c,r,n]),mt(()=>{if(!e||t)return;const f=Ir.request(()=>{i(void 0)});return()=>{Ir.cancel(f)}},[t,e]),mt(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&i("starting");const f=Ir.request(()=>{i("idle")});return()=>{Ir.cancel(f)}},[t,e,c,i,r]),I.useMemo(()=>({mounted:c,setMounted:l,transitionStatus:r}),[c,r])}function bj(e,t=!1,n=!0){const r=m2();return Ze((i,c=null)=>{r.cancel();function l(){Ii.flushSync(i)}const f=lo(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let h=function(){const g=nf.startingStyle;if(!d.hasAttribute(g)){r.request(y);return}const v=new MutationObserver(()=>{d.hasAttribute(g)||(v.disconnect(),y())});v.observe(d,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||l()}).catch(()=>{const g=d.getAnimations();if(n){if(c?.aborted)return;l()}else g.length>0&&g.some(v=>v.pending||v.playState!=="finished")&&y()})};if(t){h();return}r.request(y)}})}function ab(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,c=Ze(i),l=bj(r,n,!1);I.useEffect(()=>{if(!t)return;const f=new AbortController;return l(c,f.signal),()=>{f.abort()}},[t,n,c,l])}function Sj(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(i=>{if(e!==void 0){if(n.current!==null){const c=n.current,l=r.current,f=t.context.triggerElements.getById(c);l&&f===l&&t.context.triggerElements.delete(c),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function _j(e,t,n,r){const i=n.useState("isMountedByTrigger",e),c=Sj(e,n),l=Ze(f=>{if(c(f),!f||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:f,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:f,...r})});return mt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function M2(e){const t=e.useState("open");mt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function D2(e,t,n){const{mounted:r,setMounted:i,transitionStatus:c}=vj(e);t.useSyncedValues({mounted:r,transitionStatus:c});const l=Ze(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return ab({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:c}}class Np{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function wj(){return new ib({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Np,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function k2(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:wj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ms,inactiveTriggerProps:Ms,popupProps:Ms}}const P2={open:ot(e=>e.open),mounted:ot(e=>e.mounted),transitionStatus:ot(e=>e.transitionStatus),floatingRootContext:ot(e=>e.floatingRootContext),preventUnmountingOnClose:ot(e=>e.preventUnmountingOnClose),payload:ot(e=>e.payload),activeTriggerId:ot(e=>e.activeTriggerId),activeTriggerElement:ot(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ot((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ot((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ot(e=>e.popupProps),popupElement:ot(e=>e.popupElement),positionerElement:ot(e=>e.positionerElement)};function Ej(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=gf(),c=kp()!=null,l=Pr(()=>new ib({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new Np,floatingId:i,nested:c,noEmit:e.noEmit||!1})).current;return mt(()=>{const f={open:t,floatingId:i};r.reference!==void 0&&(f.referenceElement=r.reference,f.domReferenceElement=_t(r.reference)?r.reference:null),r.floating!==void 0&&(f.floatingElement=r.floating),l.update(f)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=c,l.context.noEmit=e.noEmit||!1,l}function xj(e={}){const{nodeId:t,externalTree:n}=e,r=Ej(e),i=e.rootContext||r,c={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,f]=I.useState(null),d=I.useRef(null),h=bf(n);mt(()=>{c.domReference&&(d.current=c.domReference)},[c.domReference]);const y=j8({...e,elements:{...c,...l&&{reference:l}}}),g=I.useCallback(B=>{const k=_t(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),getClientRects:()=>B.getClientRects(),contextElement:B}:B;f(k),y.refs.setReference(k)},[y.refs]),[v,b]=I.useState(null),[_,x]=I.useState(null);i.useSyncedValue("referenceElement",v),i.useSyncedValue("domReferenceElement",_t(v)?v:null),i.useSyncedValue("floatingElement",_);const R=I.useCallback(B=>{(_t(B)||B===null)&&(d.current=B,b(B)),(_t(y.refs.reference.current)||y.refs.reference.current===null||B!==null&&!_t(B))&&y.refs.setReference(B)},[y.refs,b]),C=I.useCallback(B=>{x(B),y.refs.setFloating(B)},[y.refs]),A=I.useMemo(()=>({...y.refs,setReference:R,setFloating:C,setPositionReference:g,domReference:d}),[y.refs,R,C,g]),O=I.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),D=i.useState("open"),N=i.useState("floatingId"),U=I.useMemo(()=>({...y,dataRef:i.context.dataRef,open:D,onOpenChange:i.setOpen,events:i.context.events,floatingId:N,refs:A,elements:O,nodeId:t,rootStore:i}),[y,A,O,t,i,D,N]);return mt(()=>{i.context.dataRef.current.floatingContext=U;const B=h?.nodesRef.current.find(k=>k.id===t);B&&(B.context=U)}),I.useMemo(()=>({...y,context:U,refs:A,elements:O,rootStore:i}),[y,A,O,U,i])}function N2(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,c=gf(),l=kp()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),y=t.context.triggerElements,g=Pr(()=>new ib({open:f,referenceElement:d,floatingElement:h,triggerElements:y,onOpenChange:i,floatingId:c,nested:l,noEmit:n})).current;return mt(()=>{const v={open:f,floatingId:c,referenceElement:d,floatingElement:h};_t(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,c,d,h,g]),g.context.onOpenChange=i,g.context.nested=l,g.context.noEmit=n,g}const n0=VU&&VI;function Rj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:c=!0,visibleOnly:l=!0,delay:f}=t,d=I.useRef(!1),h=I.useRef(null),y=Ci(),g=I.useRef(!0);I.useEffect(()=>{const b=n.select("domReferenceElement");if(!c)return;const _=hn(b);function x(){const A=n.select("domReferenceElement");!n.select("open")&&wn(A)&&A===mi(_n(A))&&(d.current=!0)}function R(){g.current=!0}function C(){g.current=!1}return _.addEventListener("blur",x),n0&&(_.addEventListener("keydown",R,!0),_.addEventListener("pointerdown",C,!0)),()=>{_.removeEventListener("blur",x),n0&&(_.removeEventListener("keydown",R,!0),_.removeEventListener("pointerdown",C,!0))}},[n,c]),I.useEffect(()=>{if(!c)return;function b(_){if(_.reason===tp||_.reason===tb){const x=n.select("domReferenceElement");_t(x)&&(h.current=x,d.current=!0)}}return r.on("openchange",b),()=>{r.off("openchange",b)}},[r,c,n]);const v=I.useMemo(()=>({onMouseLeave(){d.current=!1,h.current=null},onFocus(b){const _=b.currentTarget;if(d.current){if(h.current===_)return;d.current=!1,h.current=null}const x=ns(b.nativeEvent);if(l&&_t(x)){if(n0&&!b.relatedTarget){if(!g.current&&!YI(x))return}else if(!YU(x))return}const R=b.relatedTarget&&n.context.triggerElements.hasElement(b.relatedTarget),{nativeEvent:C,currentTarget:A}=b,O=typeof f=="function"?f():f;if(n.select("open")&&R||O===0||O===void 0){n.setOpen(!0,Vt(Ih,C,A));return}y.start(O,()=>{d.current||n.setOpen(!0,Vt(Ih,C,A))})},onBlur(b){d.current=!1,h.current=null;const _=b.relatedTarget,x=b.nativeEvent,R=_t(_)&&_.hasAttribute(tl("focus-guard"))&&_.getAttribute("data-type")==="outside";y.start(0,()=>{const C=n.select("domReferenceElement"),A=mi(C?C.ownerDocument:document);if(!_&&A===C||bt(i.current.floatingContext?.refs.floating.current,A)||bt(C,A)||R)return;const O=_??A;if(_t(O)){const D=n.context.triggerElements;if(D.hasElement(O)||D.hasMatchingElement(N=>bt(N,O)))return}n.setOpen(!1,Vt(Ih,x))})}}),[i,n,l,y,f]);return I.useMemo(()=>c?{reference:v,trigger:v}:{},[c,v])}const pv=tl("safe-polygon"),Cj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${QI}`;function Tj(e){return e?!!e.closest(Cj):!1}function z2(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(void 0),i=I.useRef(!0),c=I.useRef(!1),l=I.useRef(()=>{}),f=I.useRef(!1),d=Ci(),h=Ci(),y=I.useRef(void 0);return I.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:c,unbindMouseMoveRef:l,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:y}),g.hoverInteractionState},[e,t,n,r,i,c,l,f,d,h,y])}const Aj=new Set(["click","mousedown"]);function Ij(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:y,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:b,unbindMouseMoveRef:_,restTimeoutPendingRef:x,openChangeTimeout:R,handleCloseOptionsRef:C}=z2(n),A=bf(h),O=kp(),D=Ze(()=>g.current?!0:l.current.openEvent?Aj.has(l.current.openEvent.type):!1),N=Ze(()=>{const se=l.current.openEvent?.type;return se?.includes("mouse")&&se!=="mousedown"}),U=I.useCallback((se,le=!0)=>{const K=Oj(d,y.current);K&&!v.current?R.start(K,()=>n.setOpen(!1,Vt(br,se))):le&&(R.clear(),n.setOpen(!1,Vt(br,se)))},[d,v,n,y,R]),B=Ze(()=>{_.current(),v.current=void 0}),k=Ze(()=>{if(b.current){const se=_n(i).body;se.style.pointerEvents="",se.removeAttribute(pv),b.current=!1}}),Z=Ze(se=>{const le=ns(se);if(!Tj(le)){g.current=!1;return}g.current=!0});mt(()=>{r||(y.current=void 0,x.current=!1,g.current=!1,B(),k())},[r,y,x,g,B,k]),I.useEffect(()=>()=>{B()},[B]),I.useEffect(()=>k,[k]),mt(()=>{if(f&&r&&C.current?.blockPointerEvents&&N()&&_t(c)&&i){b.current=!0;const se=_n(i).body;se.setAttribute(pv,"");const le=c,K=i,Q=A?.nodesRef.current.find(ye=>ye.id===O)?.context?.elements.floating;return Q&&(Q.style.pointerEvents=""),se.style.pointerEvents="none",le.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{se.style.pointerEvents="",le.style.pointerEvents="",K.style.pointerEvents=""}}},[f,r,c,i,C,N,A,O,b]),I.useEffect(()=>{if(!f)return;function se(ye){if(D()||!l.current.floatingContext||!n.select("open"))return;const fe=n.context.triggerElements;ye.relatedTarget&&fe.hasElement(ye.relatedTarget)||(k(),B(),D()||U(ye))}function le(ye){R.clear(),k(),v.current?.(ye),B()}function K(ye){D()||U(ye,!1)}const Q=i;return Q&&(Q.addEventListener("mouseleave",se),Q.addEventListener("mouseenter",le),Q.addEventListener("mouseleave",K),Q.addEventListener("pointerdown",Z,!0)),()=>{Q&&(Q.removeEventListener("mouseleave",se),Q.removeEventListener("mouseenter",le),Q.removeEventListener("mouseleave",K),Q.removeEventListener("pointerdown",Z,!0))}})}function Oj(e,t){return t&&!tf(t)?0:typeof e=="function"?e():e}function s0(e){return typeof e=="function"?e():e}const Mj={current:null};function Dj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:c=!0,delay:l=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:y=!0,triggerElementRef:g=Mj,externalTree:v,isActiveTrigger:b=!0}=t,_=bf(v),{pointerTypeRef:x,interactedInsideRef:R,handlerRef:C,blockMouseMoveRef:A,performedPointerEventsMutationRef:O,unbindMouseMoveRef:D,restTimeoutPendingRef:N,openChangeTimeout:U,restTimeout:B,handleCloseOptionsRef:k}=z2(n),Z=Or(f),se=Or(l),le=Or(h);b&&(k.current=Z.current?.__options);const K=Ze(()=>R.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),Q=I.useCallback((W,j=!0)=>{const ve=Oh(se.current,"close",x.current);ve&&!C.current?U.start(ve,()=>n.setOpen(!1,Vt(br,W))):j&&(U.clear(),n.setOpen(!1,Vt(br,W)))},[se,C,n,x,U]),ye=Ze(()=>{D.current(),C.current=void 0}),fe=Ze(()=>{if(O.current){const W=_n(n.select("domReferenceElement")).body;W.style.pointerEvents="",W.removeAttribute(pv),O.current=!1}});I.useEffect(()=>{if(!c)return;function W(j){j.open||(U.clear(),B.clear(),A.current=!0,N.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[c,i,U,B,A,N]);const V=Ze(W=>{if(K()||!r.current.floatingContext)return;const j=n.context.triggerElements;if(W.relatedTarget&&j.hasElement(W.relatedTarget))return;const ve=g.current;Z.current?.({...r.current.floatingContext,tree:_,x:W.clientX,y:W.clientY,onClose(){fe(),ye(),!K()&&ve===n.select("domReferenceElement")&&Q(W)}})(W)});return I.useEffect(()=>{if(!c)return;const W=g.current??(b?n.select("domReferenceElement"):null);if(!_t(W))return;function j(P){if(U.clear(),A.current=!1,d&&!tf(x.current)||s0(le.current)>0&&!Oh(se.current,"open"))return;const ne=Oh(se.current,"open",x.current),ie=n.select("domReferenceElement"),de=n.context.triggerElements,Re=(de.hasElement(P.target)||de.hasMatchingElement(He=>bt(He,P.target)))&&(!ie||!bt(ie,P.target)),Se=P.currentTarget??null,be=n.select("open"),Ye=!be||Re;Re&&be?n.setOpen(!0,Vt(br,P,Se)):ne?U.start(ne,()=>{Ye&&n.setOpen(!0,Vt(br,P,Se))}):Ye&&n.setOpen(!0,Vt(br,P,Se))}function ve(P){if(K()){fe();return}D.current();const ne=n.select("domReferenceElement"),ie=_n(ne);B.clear(),N.current=!1;const de=n.context.triggerElements;if(P.relatedTarget&&de.hasElement(P.relatedTarget))return;if(Z.current&&r.current.floatingContext){n.select("open")||U.clear();const Se=g.current;C.current=Z.current({...r.current.floatingContext,tree:_,x:P.clientX,y:P.clientY,onClose(){fe(),ye(),!K()&&Se===n.select("domReferenceElement")&&Q(P,!0)}});const be=C.current;be(P),ie.addEventListener("mousemove",be),D.current=()=>{ie.removeEventListener("mousemove",be)};return}(x.current!=="touch"||!bt(n.select("floatingElement"),P.relatedTarget))&&Q(P)}function Te(P){V(P)}return n.select("open")&&W.addEventListener("mouseleave",Te),y&&W.addEventListener("mousemove",j,{once:!0}),W.addEventListener("mouseenter",j),W.addEventListener("mouseleave",ve),()=>{W.removeEventListener("mouseleave",Te),y&&W.removeEventListener("mousemove",j),W.removeEventListener("mouseenter",j),W.removeEventListener("mouseleave",ve)}},[ye,fe,A,r,se,Q,n,c,Z,V,b,K,d,y,x,le,B,N,U,g,_,D,C]),I.useMemo(()=>{function W(j){x.current=j.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(j){const{nativeEvent:ve}=j,Te=j.currentTarget,P=n.select("domReferenceElement"),ne=n.context.triggerElements,ie=n.select("open"),de=(ne.hasElement(j.target)||ne.hasMatchingElement(Se=>bt(Se,j.target)))&&(!P||!bt(P,j.target));if(d&&!tf(x.current)||ie&&!de||s0(le.current)===0||!de&&N.current&&j.movementX**2+j.movementY**2<2)return;B.clear();function Re(){if(N.current=!1,K())return;const Se=n.select("open");!A.current&&(!Se||de)&&n.setOpen(!0,Vt(br,ve,Te))}x.current==="touch"?Ii.flushSync(()=>{Re()}):de&&ie?Re():(N.current=!0,B.start(s0(le.current),Re))}}},[A,K,d,n,x,le,B,N])}function L2(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),c=I.useCallback(h=>mh(h,e,"reference"),t),l=I.useCallback(h=>mh(h,e,"floating"),n),f=I.useCallback(h=>mh(h,e,"item"),r),d=I.useCallback(h=>mh(h,e,"trigger"),i);return I.useMemo(()=>({getReferenceProps:c,getFloatingProps:l,getItemProps:f,getTriggerProps:d}),[c,l,f,d])}function mh(e,t,n){const r=new Map,i=n==="item",c={};n==="floating"&&(c.tabIndex=-1,c[av]="");for(const l in e)i&&e&&(l===KI||l===ZI)||(c[l]=e[l]);for(let l=0;lr.get(i)?.map(f=>f(...l)).find(f=>f!==void 0))):e[i]=c)}}const kj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Pj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),c=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=gf(),y=c?.id||h,g=I.useMemo(()=>cv(l)?.id||i,[l,i]),v=kj.get(d)??d,_=kp()!=null,x=I.useMemo(()=>v==="tooltip"||d==="label"?Ms:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,_,d]),R=I.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...v==="menu"&&{id:y}},[v,g,r,y,d,x]),C=I.useMemo(()=>{const O={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?O:{...O,...v==="menu"&&{"aria-labelledby":y}}},[v,g,y,d]),A=I.useCallback(({active:O,selected:D})=>{const N={role:"option",...O&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...N,"aria-selected":D}}return{}},[g,d]);return I.useMemo(()=>f?{reference:R,floating:C,item:A,trigger:x}:{},[f,R,C,x,A])}function QR(e,t){const[n,r]=e;let i=!1;const c=t.length;for(let l=0,f=c-1;l=r!=g>=r&&n<=(y-d)*(r-h)/(g-h)+d&&(i=!i)}return i}function Nj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function zj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Ri;let c=!1,l=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const b=performance.now(),_=b-d;if(l===null||f===null||_===0)return l=g,f=v,d=b,null;const x=g-l,R=v-f,A=Math.sqrt(x*x+R*R)/_;return l=g,f=v,d=b,A}const y=({x:g,y:v,placement:b,elements:_,onClose:x,nodeId:R,tree:C})=>function(O){function D(){i.clear(),x()}if(i.clear(),!_.domReference||!_.floating||b==null||g==null||v==null)return;const{clientX:N,clientY:U}=O,B=[N,U],k=ns(O),Z=O.type==="mouseleave",se=bt(_.floating,k),le=bt(_.domReference,k),K=_.domReference.getBoundingClientRect(),Q=_.floating.getBoundingClientRect(),ye=b.split("-")[0],fe=g>Q.right-Q.width/2,V=v>Q.bottom-Q.height/2,W=Nj(B,K),j=Q.width>K.width,ve=Q.height>K.height,Te=(j?K:Q).left,P=(j?K:Q).right,ne=(ve?K:Q).top,ie=(ve?K:Q).bottom;if(se&&(c=!0,!Z))return;if(le&&(c=!1),le&&!Z){c=!0;return}if(Z&&_t(O.relatedTarget)&&bt(_.floating,O.relatedTarget)||C&&xa(C.nodesRef.current,R).some(({context:Se})=>Se?.open))return;if(ye==="top"&&v>=K.bottom-1||ye==="bottom"&&v<=K.top+1||ye==="left"&&g>=K.right-1||ye==="right"&&g<=K.left+1)return D();let de=[];switch(ye){case"top":de=[[Te,K.top+1],[Te,Q.bottom-1],[P,Q.bottom-1],[P,K.top+1]];break;case"bottom":de=[[Te,Q.top+1],[Te,K.bottom-1],[P,K.bottom-1],[P,Q.top+1]];break;case"left":de=[[Q.right-1,ie],[Q.right-1,ne],[K.left+1,ne],[K.left+1,ie]];break;case"right":de=[[K.right-1,ie],[K.right-1,ne],[Q.left+1,ne],[Q.left+1,ie]];break}function Re([Se,be]){switch(ye){case"top":{const Ye=[j?Se+t/2:fe?Se+t*4:Se-t*4,be+t+1],He=[j?Se-t/2:fe?Se+t*4:Se-t*4,be+t+1],ht=[[Q.left,fe||j?Q.bottom-t:Q.top],[Q.right,fe?j?Q.bottom-t:Q.top:Q.bottom-t]];return[Ye,He,...ht]}case"bottom":{const Ye=[j?Se+t/2:fe?Se+t*4:Se-t*4,be-t],He=[j?Se-t/2:fe?Se+t*4:Se-t*4,be-t],ht=[[Q.left,fe||j?Q.top+t:Q.bottom],[Q.right,fe?j?Q.top+t:Q.bottom:Q.top+t]];return[Ye,He,...ht]}case"left":{const Ye=[Se+t+1,ve?be+t/2:V?be+t*4:be-t*4],He=[Se+t+1,ve?be-t/2:V?be+t*4:be-t*4];return[...[[V||ve?Q.right-t:Q.left,Q.top],[V?ve?Q.right-t:Q.left:Q.right-t,Q.bottom]],Ye,He]}case"right":{const Ye=[Se-t,ve?be+t/2:V?be+t*4:be-t*4],He=[Se-t,ve?be-t/2:V?be+t*4:be-t*4],ht=[[V||ve?Q.left+t:Q.right,Q.top],[V?ve?Q.left+t:Q.right:Q.left+t,Q.bottom]];return[Ye,He,...ht]}default:return[]}}if(!QR([N,U],de)){if(c&&!W)return D();if(!Z&&r){const Se=h(O.clientX,O.clientY);if(Se!==null&&Se<.1)return D()}QR([N,U],Re([g,v]))?!c&&r&&i.start(40,D):D()}};return y.__options={blockPointerEvents:n},y}let Lj=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Bj=(function(e){return e[e.open=Sa.open]="open",e[e.closed=Sa.closed]="closed",e[e.startingStyle=Sa.startingStyle]="startingStyle",e[e.endingStyle=Sa.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const B2=I.createContext(void 0);function $j(){const e=I.useContext(B2);if(e===void 0)throw new Error(_o(26));return e}const $2="ArrowUp",U2="ArrowDown",j2="ArrowLeft",H2="ArrowRight",F2="Home",q2="End",Uj=new Set([j2,H2]),jj=new Set([$2,U2]),Hj=new Set([...Uj,...jj]);[...Hj];const Fj=new Set([$2,U2,j2,H2,F2,q2]),qj={...vf,...nb,nestedDialogOpen(e){return e?{[Bj.nestedDialogOpen]:""}:null}},Vj=I.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:c,render:l,...f}=t,{store:d}=La(),h=d.useState("descriptionElementId"),y=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),b=d.useState("modal"),_=d.useState("mounted"),x=d.useState("nested"),R=d.useState("nestedOpenDialogCount"),C=d.useState("open"),A=d.useState("openMethod"),O=d.useState("titleElementId"),D=d.useState("transitionStatus"),N=d.useState("role");$j(),ab({open:C,ref:d.context.popupRef,onComplete(){C&&d.context.onOpenChangeComplete?.(!0)}});function U(le){return le==="touch"?d.context.popupRef.current:!0}const B=c===void 0?U:c,k=R>0,Z=I.useMemo(()=>({open:C,nested:x,transitionStatus:D,nestedDialogOpen:k}),[C,x,D,k]),se=cr("div",t,{state:Z,props:[v,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:N,tabIndex:-1,hidden:!_,onKeyDown(le){Fj.has(le.key)&&le.stopPropagation()},style:{[Lj.nestedDialogs]:R}},f],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:qj});return $.jsx(o8,{context:g,openInteractionType:A,disabled:!_,closeOnFocusOut:!y,initialFocus:B,returnFocus:i,modal:b!==!1,restoreFocus:"popup",children:se})});function Gj(e){return Gv(19)?e:e?"true":void 0}const Kj=I.forwardRef(function(t,n){const{cutout:r,...i}=t;let c;if(r){const l=r?.getBoundingClientRect();c=`polygon( 0% 0%, 100% 0%, 100% 100%, @@ -18,9 +18,9 @@ Error generating stack: `+u.message+` ${l.right}px ${l.bottom}px, ${l.right}px ${l.top}px, ${l.left}px ${l.top}px - )`}return $.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),Tj=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:c}=fa(),l=c.useState("mounted"),f=c.useState("modal"),d=c.useState("open");return l||r?$.jsx(t2.Provider,{value:r,children:$.jsxs(k5,{ref:n,...i,children:[l&&f===!0&&$.jsx(Cj,{ref:c.context.internalBackdropRef,inert:Rj(!d)}),t.children]})}):null});let hR={},pR={},mR="";function Aj(e){if(typeof document>"u")return!1;const t=ua(e);return hn(t).innerWidth-t.documentElement.clientWidth>0}function Ij(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=ua(e).documentElement,i={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const c=r.offsetWidth;r.style.overflowY="hidden";const l=r.offsetWidth;return Object.assign(r.style,i),c===l}function Oj(e){const t=ua(e),n=t.documentElement,r=t.body,i=la(n)?n:r,c=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=c}}function Mj(e){const t=ua(e),n=t.documentElement,r=t.body,i=hn(n);let c=0,l=0,f=!1;const d=Tr.create();if(EU&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=i.getComputedStyle(n),b=i.getComputedStyle(r),R=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,l=n.scrollLeft,hR={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},mR=n.style.scrollBehavior,pR={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,A=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||b.overflowY==="scroll",D=v.overflowX==="scroll"||b.overflowX==="scroll",N=Math.max(0,i.innerWidth-r.clientWidth),U=Math.max(0,i.innerHeight-r.clientHeight),B=parseFloat(b.marginTop)+parseFloat(b.marginBottom),k=parseFloat(b.marginLeft)+parseFloat(b.marginRight),K=la(n)?n:r;if(f=Ij(e),f){n.style.scrollbarGutter=R,K.style.overflowY="hidden",K.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(A||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:B||U?`calc(100dvh - ${B+U}px)`:"100dvh",width:k||N?`calc(100vw - ${k+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=c,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,hR),Object.assign(r.style,pR),f||(n.scrollTop=c,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=mR)}function g(){y(),d.request(h)}return h(),i.addEventListener("resize",g),()=>{d.cancel(),y(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",g)}}class Dj{lockCount=0;restore=null;timeoutLock=ui.create();timeoutUnlock=ui.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=ua(t).documentElement,i=hn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=BA;return}const c=aI||!Aj(t);this.restore=c?Oj(t):Mj(t)}}const kj=new Dj;function Pj(e=!0,t=null){mt(()=>{if(e)return kj.acquire(t)},[e,t])}function Nj(e){const t=I.useRef(""),n=I.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:I.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function zj(e){const[t,n]=I.useState(null),r=Ze((f,d)=>{e||n(d||(aI?"touch":""))}),i=I.useCallback(()=>{n(null)},[]),{onClick:c,onPointerDown:l}=Nj(r);return I.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:c,onPointerDown:l}}),[t,i,c,l])}function Lj(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),c=t.useState("disablePointerDismissal"),l=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:y}=zj(i);ZI(t);const{forceUnmount:g}=QI(i,t,()=>{y()}),v=Ze(ne=>{const le=qt(ne);return le.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},le}),b=I.useCallback(()=>{t.setOpen(!1,v(TI))},[t,v]);I.useImperativeHandle(r,()=>({unmount:g,close:b}),[g,b]);const _=WI({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,R]=I.useState(0),C=x===0,A=hj(_),O=VI(_,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(ne){if("button"in ne&&ne.button!==0||"touches"in ne&&ne.touches.length!==1)return!1;const le=ns(ne);if(C&&!c){const G=le;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===G||t.context.backdropRef.current===G||bt(G,f)&&!G?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});Pj(i&&l===!0,f);const{getReferenceProps:D,getFloatingProps:N,getTriggerProps:U}=e2([A,O]);t.useContextCallback("onNestedDialogOpen",ne=>{R(ne+1)}),t.useContextCallback("onNestedDialogClose",()=>{R(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const B=I.useMemo(()=>D(h),[D,h]),k=I.useMemo(()=>U(h),[U,h]),K=I.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:d,activeTriggerProps:B,inactiveTriggerProps:k,popupProps:K,floatingRootContext:_,nestedOpenDialogCount:x})}const Bj={...XI,modal:ot(e=>e.modal),nested:ot(e=>e.nested),nestedOpenDialogCount:ot(e=>e.nestedOpenDialogCount),disablePointerDismissal:ot(e=>e.disablePointerDismissal),openMethod:ot(e=>e.openMethod),descriptionElementId:ot(e=>e.descriptionElementId),titleElementId:ot(e=>e.titleElementId),viewportElement:ot(e=>e.viewportElement),role:ot(e=>e.role)};class $j extends $b{constructor(t){super(Uj(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new rp,onOpenChange:void 0,onOpenChangeComplete:void 0},Bj)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},c=n.trigger?.id??null;(c||t)&&(i.activeTriggerId=c,i.activeTriggerElement=n.trigger??null),this.update(i)}}function Uj(e={}){return{...YI(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function jj(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:c,disablePointerDismissal:l=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:y,defaultTriggerId:g=null}=e,v=fa(!0),b=!!v,_=Dr(()=>h?.store??new $j({open:n??r,activeTriggerId:y!==void 0?y:g,modal:f,disablePointerDismissal:l,nested:b})).current;_.useControlledProp("open",n,r),_.useControlledProp("activeTriggerId",y,g),_.useSyncedValues({disablePointerDismissal:l,nested:b,modal:f}),_.useContextCallback("onOpenChange",i),_.useContextCallback("onOpenChangeComplete",c);const x=_.useState("payload");Lj({store:_,actionsRef:d,parentContext:v?.store.context});const R=I.useMemo(()=>({store:_}),[_]);return $.jsx(AI.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})}const Hj=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=fa(),d=Ob(c);return f.useSyncedValueWithCleanup("titleElementId",d),ir("h2",t,{ref:n,props:[{id:d},l]})});function Fj(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(jj,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function qj(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(Tj,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function Vj(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(b5,{className:i,"data-slot":"sheet-overlay",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function Gj(e){const t=Ct.c(17);let n,r,i,c,l;t[0]!==e?({className:r,children:n,side:c,showCloseButton:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5]);const f=c===void 0?"right":c,d=l===void 0?!0:l;let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(Vj,{}),t[6]=h):h=t[6];let y;t[7]!==r?(y=Jt("data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-closed:animate-out data-open:animate-in data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),t[7]=r,t[8]=y):y=t[8];let g;t[9]!==d?(g=d&&$.jsxs(S5,{"data-slot":"sheet-close",render:$.jsx(Rc,{className:"absolute top-4 right-4",size:"icon-sm",variant:"ghost"}),children:[$.jsx(l$,{}),$.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d,t[10]=g):g=t[10];let v;return t[11]!==n||t[12]!==i||t[13]!==f||t[14]!==y||t[15]!==g?(v=$.jsxs(qj,{children:[h,$.jsxs(xj,{className:y,"data-side":f,"data-slot":"sheet-content",...i,children:[n,g]})]}),t[11]=n,t[12]=i,t[13]=f,t[14]=y,t[15]=g,t[16]=v):v=t[16],v}function Kj(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("flex flex-col gap-1.5 p-6",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-slot":"sheet-header",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function Zj(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("font-medium text-foreground text-sm",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(Hj,{className:i,"data-slot":"sheet-title",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function Qj(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("text-muted-foreground text-xs/relaxed",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(_5,{className:i,"data-slot":"sheet-description",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const c2=I.createContext(void 0);function Bu(e){const t=I.useContext(c2);if(t===void 0&&!e)throw new Error(go(72));return t}const Yj={...XI,disabled:ot(e=>e.disabled),instantType:ot(e=>e.instantType),isInstantPhase:ot(e=>e.isInstantPhase),trackCursorAxis:ot(e=>e.trackCursorAxis),disableHoverablePopup:ot(e=>e.disableHoverablePopup),lastOpenChangeReason:ot(e=>e.openChangeReason),closeDelay:ot(e=>e.closeDelay),hasViewport:ot(e=>e.hasViewport)};class Hb extends $b{constructor(t){super({...Xj(),...t},{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new rp},Yj)}setOpen=(t,n)=>{const r=n.reason,i=r===yr,c=t&&r===Xd,l=!t&&(r===Eh||r===Nb);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const f=()=>{const d={open:t,openChangeReason:r};c?d.instantType="focus":l?d.instantType="dismiss":r===yr&&(d.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(d.activeTriggerId=h,d.activeTriggerElement=n.trigger??null),this.update(d)};i?pi.flushSync(f):f()};static useStore(t,n){const r=Dr(()=>new Hb(n)).current,i=t??r,c=WI({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=c,i}}function Xj(){return{...YI(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function Wj(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:y,defaultTriggerId:g=null,children:v}=e,b=Hb.useStore(h?.store,{open:r??n,activeTriggerId:y!==void 0?y:g});b.useControlledProp("open",r,n),b.useControlledProp("activeTriggerId",y,g),b.useContextCallback("onOpenChange",f),b.useContextCallback("onOpenChangeComplete",d);const _=b.useState("open"),x=!t&&_,R=b.useState("activeTriggerId"),C=b.useState("payload");b.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:i}),mt(()=>{_&&t&&b.setOpen(!1,qt(l5))},[_,t,b]),b.useSyncedValue("disabled",t),ZI(b);const{forceUnmount:A,transitionStatus:O}=QI(x,b),D=b.useState("isInstantPhase"),N=b.useState("instantType"),U=b.useState("lastOpenChangeReason"),B=I.useRef(null);mt(()=>{O==="ending"&&U===Pb||O!=="ending"&&D?(N!=="delay"&&(B.current=N),b.set("instantType","delay")):B.current!==null&&(b.set("instantType",B.current),B.current=null)},[O,D,U,N,b]),mt(()=>{x&&R==null&&b.set("payload",void 0)},[b,R,x]);const k=I.useCallback(()=>{b.setOpen(!1,Jj(b,TI))},[b]);I.useImperativeHandle(l,()=>({unmount:A,close:k}),[A,k]);const K=b.useState("floatingRootContext"),ne=rj(K,{enabled:!t}),le=VI(K,{enabled:!t,referencePress:!0}),G=U5(K,{enabled:!t&&c!=="none",axis:c==="none"?void 0:c}),{getReferenceProps:Z,getFloatingProps:ye,getTriggerProps:fe}=e2([ne,le,G]),q=I.useMemo(()=>Z(),[Z]),X=I.useMemo(()=>fe(),[fe]),j=I.useMemo(()=>ye(),[ye]);return b.useSyncedValues({activeTriggerProps:q,inactiveTriggerProps:X,popupProps:j}),$.jsx(c2.Provider,{value:b,children:typeof v=="function"?v({payload:C}):v})}function Jj(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const l2=I.createContext(void 0);function e9(){return I.useContext(l2)}const t9=600,n9=I.forwardRef(function(t,n){const{className:r,render:i,handle:c,payload:l,disabled:f,delay:d,closeDelay:h,id:y,...g}=t,v=Bu(!0),b=c?.store??v;if(!b)throw new Error(go(82));const _=Ob(y),x=b.useState("isTriggerActive",_),R=b.useState("isOpenedByTrigger",_),C=b.useState("floatingRootContext"),A=I.useRef(null),O=d??t9,D=h??0,{registerTrigger:N,isMountedByThisTrigger:U}=ej(_,A,b,{payload:l,closeDelay:D}),B=e9(),{delayRef:k,isInstantPhase:K,hasProvider:ne}=T5(C,{open:R});b.useSyncedValue("isInstantPhase",K);const le=b.useState("disabled"),G=f??le,Z=b.useState("trackCursorAxis"),ye=b.useState("disableHoverablePopup"),fe=fj(C,{enabled:!G,mouseOnly:!0,move:!1,handleClose:!ye&&Z!=="both"?mj():null,restMs(){const ve=B?.delay,Ce=typeof k.current=="object"?k.current.open:void 0;let P=O;return ne&&(Ce!==0?P=d??ve??O:P=0),P},delay(){const ve=typeof k.current=="object"?k.current.close:void 0;let Ce=D;return h==null&&ne&&(Ce=ve),{close:Ce}},triggerElementRef:A,isActiveTrigger:x}),q=I.useMemo(()=>({open:R}),[R]),X=b.useState("triggerProps",U);return ir("button",t,{state:q,ref:[n,N,A],props:[fe,X,{id:_},g],stateAttributesMapping:y5})}),u2=I.createContext(void 0);function s9(){const e=I.useContext(u2);if(e===void 0)throw new Error(go(70));return e}const r9=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,...f}=t,{portalNode:d,portalSubtree:h}=zI({container:i,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:$.jsxs(I.Fragment,{children:[h,d&&pi.createPortal(r,d)]})}),o9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Bu().useState("mounted")||r?$.jsx(u2.Provider,{value:r,children:$.jsx(r9,{ref:n,...i})}):null}),f2=I.createContext(void 0);function d2(){const e=I.useContext(f2);if(e===void 0)throw new Error(go(71));return e}const i9=I.createContext(void 0);function a9(){return I.useContext(i9)?.direction??"ltr"}const c9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:l,elements:f,middlewareData:d}=t,{element:h,padding:y=0,offsetParent:g="real"}=po(e,t)||{};if(h==null)return{};const v=pI(y),b={x:n,y:r},_=kb(i),x=Db(_),R=await l.getDimensions(h),C=_==="y",A=C?"top":"left",O=C?"bottom":"right",D=C?"clientHeight":"clientWidth",N=c.reference[x]+c.reference[_]-b[_]-c.floating[x],U=b[_]-c.reference[_],B=g==="real"?await l.getOffsetParent?.(h):f.floating;let k=f.floating[D]||c.floating[x];(!k||!await l.isElement?.(B))&&(k=f.floating[D]||c.floating[x]);const K=N/2-U/2,ne=k/2-R[x]/2-1,le=Math.min(v[A],ne),G=Math.min(v[O],ne),Z=le,ye=k-R[x]-G,fe=k/2-R[x]/2+K,q=Hv(Z,fe,ye),X=!d.arrow&&gi(i)!=null&&fe!==q&&c.reference[x]/2-(fe({...c9(e),options:[e,t]}),u9={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,c=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await C8().fn(e)).data?.referenceHidden||c}}}},eh={sideX:"left",sideY:"top"},f9={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:c,strategy:l,placement:f}=e,d=hn(i),h=d.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:eh};const g=await c.getOffsetParent?.(i);let v={width:0,height:0};if(l==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const A=ua(i);v={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(v=await c.getDimensions(g));const b=hs(f);let _=t,x=n;b==="left"&&(_=v.width-(t+r.width)),b==="top"&&(x=v.height-(n+r.height));const R=b==="left"?"right":eh.sideX,C=b==="top"?"bottom":eh.sideY;return{x:_,y:x,data:{sideX:R,sideY:C}}}};function h2(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function gR(e,t,n){const{rects:r,placement:i}=e;return{side:h2(t,hs(i),n),align:gi(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function d9(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:b,mounted:_,collisionAvoidance:x,shiftCrossAxis:R=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:O=!1,externalTree:D}=e,[N,U]=I.useState(null);!_&&N!==null&&U(null);const B=x.side||"flip",k=x.align||"flip",K=x.fallbackAxisSide||"end",ne=typeof t=="function"?t:void 0,le=Ze(ne),G=ne?le:t,Z=Ar(t),fe=a9()==="rtl",q=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":fe?"left":"right","inline-start":fe?"right":"left"}[r],X=c==="center"?q:`${q}-${c}`;let j=d;const ve=1,Ce=r==="bottom"?ve:0,P=r==="top"?ve:0,te=r==="right"?ve:0,oe=r==="left"?ve:0;typeof j=="number"?j={top:j+Ce,right:j+oe,bottom:j+P,left:j+te}:j&&(j={top:(j.top||0)+Ce,right:(j.right||0)+oe,bottom:(j.bottom||0)+P,left:(j.left||0)+te});const de={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:j},Re=I.useRef(null),Se=Ar(i),be=Ar(l),ht=[_8(Kt=>{const Fn=gR(Kt,r,fe),Bs=typeof Se.current=="function"?Se.current(Fn):Se.current,Dn=typeof be.current=="function"?be.current(Fn):be.current;return{mainAxis:Bs,crossAxis:Dn,alignmentAxis:Dn}},[typeof i!="function"?i:0,typeof l!="function"?l:0,fe,r])],Ht=k==="none"&&B!=="shift",re=!Ht&&(h||R||B==="shift"),Fe=B==="none"?null:x8({...de,padding:{top:j.top+ve,right:j.right+ve,bottom:j.bottom+ve,left:j.left+ve},mainAxis:!R&&B==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:K}),Ae=Ht?null:w8(Kt=>{const Fn=ua(Kt.elements.floating).documentElement;return{...de,rootBoundary:R?{x:0,y:0,width:Fn.clientWidth,height:Fn.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:re,limiter:h||R?void 0:E8(Bs=>{if(!Re.current)return{};const{width:Dn,height:lr}=Re.current.getBoundingClientRect(),ur=or(hs(Bs.placement)),$s=ur==="y"?Dn:lr,wo=ur==="y"?j.left+j.right:j.top+j.bottom;return{offset:$s/2+wo/2}})}},[de,h,R,j,k]);B==="shift"||k==="shift"||c==="center"?ht.push(Ae,Fe):ht.push(Fe,Ae),ht.push(R8({...de,apply({elements:{floating:Kt},rects:{reference:Fn},availableWidth:Bs,availableHeight:Dn}){Object.entries({"--available-width":`${Bs}px`,"--available-height":`${Dn}px`,"--anchor-width":`${Fn.width}px`,"--anchor-height":`${Fn.height}px`}).forEach(([lr,ur])=>{Kt.style.setProperty(lr,ur)})}}),l9(()=>({element:Re.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Kt){const{elements:Fn,middlewareData:Bs,placement:Dn,rects:lr,y:ur}=Kt,$s=hs(Dn),wo=or($s),Eo=Re.current,Kp=Bs.arrow?.x||0,cf=Bs.arrow?.y||0,Yc=Eo?.clientWidth||0,Ei=Eo?.clientHeight||0,Xc=Kp+Yc/2,Wc=cf+Ei/2,lf=Math.abs(Bs.shift?.y||0),uf=lr.reference.height/2,Lr=typeof i=="function"?i(gR(Kt,r,fe)):i,Jc=lf>Lr,ff={top:`${Xc}px calc(100% + ${Lr}px)`,bottom:`${Xc}px ${-Lr}px`,left:`calc(100% + ${Lr}px) ${Wc}px`,right:`${-Lr}px ${Wc}px`}[$s],df=`${Xc}px ${lr.reference.y+uf-ur}px`;return Fn.floating.style.setProperty("--transform-origin",re&&wo==="y"&&Jc?df:ff),{}}},u9,A),mt(()=>{!_&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[_,b]);const Pt=I.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:_e,elements:Pe,x:Ve,y:Qe,middlewareData:ut,update:Be,placement:Le,context:tn,isPositioned:it,floatingStyles:vs}=sj({rootContext:b,placement:X,middleware:ht,strategy:n,whileElementsMounted:v?void 0:(...Kt)=>aR(...Kt,Pt),nodeId:C,externalTree:D}),{sideX:gt,sideY:Bt}=ut.adaptiveOrigin||eh,$t=it?n:"fixed",nn=I.useMemo(()=>A?{position:$t,[gt]:Ve,[Bt]:Qe}:{position:$t,...vs},[A,$t,gt,Ve,Bt,Qe,vs]),bs=I.useRef(null);mt(()=>{if(!_)return;const Kt=Z.current,Fn=typeof Kt=="function"?Kt():Kt,Dn=(yR(Fn)?Fn.current:Fn)||null||null;Dn!==bs.current&&(_e.setPositionReference(Dn),bs.current=Dn)},[_,_e,G,Z]),I.useEffect(()=>{if(!_)return;const Kt=Z.current;typeof Kt!="function"&&yR(Kt)&&Kt.current!==bs.current&&(_e.setPositionReference(Kt.current),bs.current=Kt.current)},[_,_e,G,Z]),I.useEffect(()=>{if(v&&_&&Pe.domReference&&Pe.floating)return aR(Pe.domReference,Pe.floating,Be,Pt)},[v,_,Pe,Be,Pt]);const Ls=hs(Le),af=h2(r,Ls,fe),_o=gi(Le)||"center",jn=!!ut.hide?.referenceHidden;mt(()=>{O&&_&&it&&U(Ls)},[O,_,it,Ls]);const cr=I.useMemo(()=>({position:"absolute",top:ut.arrow?.y,left:ut.arrow?.x}),[ut.arrow]),Hn=ut.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:nn,arrowStyles:cr,arrowRef:Re,arrowUncentered:Hn,side:af,align:_o,physicalSide:Ls,anchorHidden:jn,refs:_e,context:tn,isPositioned:it,update:Be}),[nn,cr,Re,Hn,af,_o,Ls,jn,_e,tn,it,Be])}function yR(e){return e!=null&&"current"in e}function p2(e){return e==="starting"?MB:Is}const h9=I.forwardRef(function(t,n){const{render:r,className:i,anchor:c,positionMethod:l="absolute",side:f="top",align:d="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:_=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=kB,...C}=t,A=Bu(),O=s9(),D=A.useState("open"),N=A.useState("mounted"),U=A.useState("trackCursorAxis"),B=A.useState("disableHoverablePopup"),k=A.useState("floatingRootContext"),K=A.useState("instantType"),ne=A.useState("transitionStatus"),le=A.useState("hasViewport"),G=d9({anchor:c,positionMethod:l,floatingRootContext:k,mounted:N,side:f,sideOffset:h,align:d,alignOffset:y,collisionBoundary:g,collisionPadding:v,sticky:_,arrowPadding:b,disableAnchorTracking:x,keepMounted:O,collisionAvoidance:R,adaptiveOrigin:le?f9:void 0}),Z=I.useMemo(()=>{const X={};return(!D||U==="both"||B)&&(X.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...G.positionerStyles,...X}}},[D,U,B,N,G.positionerStyles]),ye=I.useMemo(()=>({open:D,side:G.side,align:G.align,anchorHidden:G.anchorHidden,instant:U!=="none"?"tracking-cursor":K}),[D,G.side,G.align,G.anchorHidden,U,K]),fe=I.useMemo(()=>({...ye,arrowRef:G.arrowRef,arrowStyles:G.arrowStyles,arrowUncentered:G.arrowUncentered}),[ye,G.arrowRef,G.arrowStyles,G.arrowUncentered]),q=ir("div",t,{state:ye,props:[Z,p2(ne),C],ref:[n,A.useStateSetter("positionerElement")],stateAttributesMapping:zu});return $.jsx(f2.Provider,{value:fe,children:q})}),p9={...zu,...zb},m9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,l=Bu(),{side:f,align:d}=d2(),h=l.useState("open"),y=l.useState("instantType"),g=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("floatingRootContext");jb({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});const _=l.useState("disabled"),x=l.useState("closeDelay");cj(b,{enabled:!_,closeDelay:x});const R=I.useMemo(()=>({open:h,side:f,align:d,instant:y,transitionStatus:g}),[h,f,d,y,g]);return ir("div",t,{state:R,ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[v,p2(g),c],stateAttributesMapping:p9})}),g9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,f=Bu().useState("instantType"),{open:d,arrowRef:h,side:y,align:g,arrowUncentered:v,arrowStyles:b}=d2(),_=I.useMemo(()=>({open:d,side:y,align:g,uncentered:v,instant:f}),[d,y,g,v,f]);return ir("div",t,{state:_,ref:[n,h],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:zu})}),y9=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,c=I.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=I.useMemo(()=>({open:n,close:r}),[n,r]);return $.jsx(l2.Provider,{value:c,children:$.jsx(C5,{delay:l,timeoutMs:i,children:t.children})})};function v9(e){const t=Ct.c(6);let n,r;t[0]!==e?({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const i=r===void 0?0:r;let c;return t[3]!==i||t[4]!==n?(c=$.jsx(y9,{"data-slot":"tooltip-provider",delay:i,...n}),t[3]=i,t[4]=n,t[5]=c):c=t[5],c}function b9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(v9,{children:$.jsx(Wj,{"data-slot":"tooltip",...n})}),t[2]=n,t[3]=r):r=t[3],r}function S9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(n9,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function _9(e){const t=Ct.c(21);let n,r,i,c,l,f,d;t[0]!==e?({className:r,side:c,sideOffset:l,align:f,alignOffset:d,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=c===void 0?"top":c,y=l===void 0?4:l,g=f===void 0?"center":f,v=d===void 0?0:d;let b;t[8]!==r?(b=Jt("data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-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 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:rounded-md",r),t[8]=r,t[9]=b):b=t[9];let _;t[10]===Symbol.for("react.memo_cache_sentinel")?(_=$.jsx(g9,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2"}),t[10]=_):_=t[10];let x;t[11]!==n||t[12]!==i||t[13]!==b?(x=$.jsxs(m9,{className:b,"data-slot":"tooltip-content",...i,children:[n,_]}),t[11]=n,t[12]=i,t[13]=b,t[14]=x):x=t[14];let R;return t[15]!==g||t[16]!==v||t[17]!==h||t[18]!==y||t[19]!==x?(R=$.jsx(o9,{children:$.jsx(h9,{align:g,alignOffset:v,className:"isolate z-50",side:h,sideOffset:y,children:x})}),t[15]=g,t[16]=v,t[17]=h,t[18]=y,t[19]=x,t[20]=R):R=t[20],R}const w9=768,m2=`(max-width: ${w9-1}px)`;function E9(e){const t=window.matchMedia(m2);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function x9(){return window.matchMedia(m2).matches}function R9(){return I.useSyncExternalStore(E9,x9)}const C9="sidebar_state",T9=3600*24*7,A9="12rem",I9="16rem",O9="3rem",M9="b",g2=I.createContext(null);function op(){const e=I.useContext(g2);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function D9(e){const t=Ct.c(36);let n,r,i,c,l,f,d;t[0]!==e?({defaultOpen:d,open:i,onOpenChange:l,className:r,style:f,children:n,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=d===void 0?!0:d,y=R9(),[g,v]=I.useState(!1),[b,_]=I.useState(h),x=i??b;let R;t[8]!==x||t[9]!==l?(R=ye=>{const fe=typeof ye=="function"?ye(x):ye;l?l(fe):_(fe),document.cookie=`${C9}=${fe}; path=/; max-age=${T9}`},t[8]=x,t[9]=l,t[10]=R):R=t[10];const C=R;let A;t[11]!==y||t[12]!==C?(A=()=>y?v(P9):C(k9),t[11]=y,t[12]=C,t[13]=A):A=t[13];const O=A;let D,N;t[14]!==O?(D=()=>{const ye=fe=>{fe.key===M9&&(fe.metaKey||fe.ctrlKey)&&(fe.preventDefault(),O())};return window.addEventListener("keydown",ye),()=>window.removeEventListener("keydown",ye)},N=[O],t[14]=O,t[15]=D,t[16]=N):(D=t[15],N=t[16]),I.useEffect(D,N);const U=x?"expanded":"collapsed";let B;t[17]!==y||t[18]!==x||t[19]!==g||t[20]!==C||t[21]!==U||t[22]!==O?(B={state:U,open:x,setOpen:C,isMobile:y,openMobile:g,setOpenMobile:v,toggleSidebar:O},t[17]=y,t[18]=x,t[19]=g,t[20]=C,t[21]=U,t[22]=O,t[23]=B):B=t[23];const k=B;let K;t[24]!==r?(K=Jt("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),t[24]=r,t[25]=K):K=t[25];let ne;t[26]!==f?(ne={"--sidebar-width":A9,"--sidebar-width-icon":O9,...f},t[26]=f,t[27]=ne):ne=t[27];const le=ne;let G;t[28]!==n||t[29]!==c||t[30]!==K||t[31]!==le?(G=$.jsx("div",{className:K,"data-slot":"sidebar-wrapper",style:le,...c,children:n}),t[28]=n,t[29]=c,t[30]=K,t[31]=le,t[32]=G):G=t[32];let Z;return t[33]!==k||t[34]!==G?(Z=$.jsx(g2.Provider,{value:k,children:G}),t[33]=k,t[34]=G,t[35]=Z):Z=t[35],Z}function k9(e){return!e}function P9(e){return!e}function N9(e){const t=Ct.c(46);let n,r,i,c,l,f;t[0]!==e?({side:c,variant:l,collapsible:f,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6]);const d=c===void 0?"left":c,h=l===void 0?"sidebar":l,y=f===void 0?"offExamples":f,{isMobile:g,state:v,openMobile:b,setOpenMobile:_}=op();if(y==="none"){let K;t[7]!==r?(K=Jt("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),t[7]=r,t[8]=K):K=t[8];let ne;return t[9]!==n||t[10]!==i||t[11]!==K?(ne=$.jsx("div",{className:K,"data-slot":"sidebar",...i,children:n}),t[9]=n,t[10]=i,t[11]=K,t[12]=ne):ne=t[12],ne}if(g){let K;t[13]===Symbol.for("react.memo_cache_sentinel")?(K={"--sidebar-width":I9},t[13]=K):K=t[13];let ne;t[14]===Symbol.for("react.memo_cache_sentinel")?(ne=$.jsxs(Kj,{className:"sr-only",children:[$.jsx(Zj,{children:"Sidebar"}),$.jsx(Qj,{children:"Displays the mobile sidebar."})]}),t[14]=ne):ne=t[14];let le;t[15]!==n?(le=$.jsx("div",{className:"flex h-full w-full flex-col",children:n}),t[15]=n,t[16]=le):le=t[16];let G;t[17]!==d||t[18]!==le?(G=$.jsxs(Gj,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:d,style:K,children:[ne,le]}),t[17]=d,t[18]=le,t[19]=G):G=t[19];let Z;return t[20]!==b||t[21]!==i||t[22]!==_||t[23]!==G?(Z=$.jsx(Fj,{onOpenChange:_,open:b,...i,children:G}),t[20]=b,t[21]=i,t[22]=_,t[23]=G,t[24]=Z):Z=t[24],Z}const x=v==="collapsed"?y:"",R=h==="floating"||h==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;t[25]!==R?(C=Jt("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",R),t[25]=R,t[26]=C):C=t[26];let A;t[27]!==C?(A=$.jsx("div",{className:C,"data-slot":"sidebar-gap"}),t[27]=C,t[28]=A):A=t[28];const O=d==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",D=h==="floating"||h==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;t[29]!==r||t[30]!==O||t[31]!==D?(N=Jt("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",O,D,r),t[29]=r,t[30]=O,t[31]=D,t[32]=N):N=t[32];let U;t[33]!==n?(U=$.jsx("div",{className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:n}),t[33]=n,t[34]=U):U=t[34];let B;t[35]!==i||t[36]!==N||t[37]!==U?(B=$.jsx("div",{className:N,"data-slot":"sidebar-container",...i,children:U}),t[35]=i,t[36]=N,t[37]=U,t[38]=B):B=t[38];let k;return t[39]!==d||t[40]!==v||t[41]!==B||t[42]!==x||t[43]!==A||t[44]!==h?(k=$.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":x,"data-side":d,"data-slot":"sidebar","data-state":v,"data-variant":h,children:[A,B]}),t[39]=d,t[40]=v,t[41]=B,t[42]=x,t[43]=A,t[44]=h,t[45]=k):k=t[45],k}function z9(e){const t=Ct.c(15);let n,r,i;t[0]!==e?({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]);const{toggleSidebar:c}=op();let l;t[4]!==n?(l=Jt(n),t[4]=n,t[5]=l):l=t[5];let f;t[6]!==r||t[7]!==c?(f=g=>{r?.(g),c()},t[6]=r,t[7]=c,t[8]=f):f=t[8];let d,h;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(r$,{}),h=$.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=d,t[10]=h):(d=t[9],h=t[10]);let y;return t[11]!==i||t[12]!==l||t[13]!==f?(y=$.jsxs(Rc,{className:l,"data-sidebar":"trigger","data-slot":"sidebar-trigger",onClick:f,size:"icon-lg",variant:"ghost",...i,children:[d,h]}),t[11]=i,t[12]=l,t[13]=f,t[14]=y):y=t[14],y}function L9(e){const t=Ct.c(9);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const{toggleSidebar:i}=op();let c;t[3]!==n?(c=Jt("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offExamples]:translate-x-0 hover:group-data-[collapsible=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",n),t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==c||t[7]!==i?(l=$.jsx("button",{"aria-label":"Toggle Sidebar",className:c,"data-sidebar":"rail","data-slot":"sidebar-rail",onClick:i,tabIndex:-1,title:"Toggle Sidebar",...r}),t[5]=r,t[6]=c,t[7]=i,t[8]=l):l=t[8],l}function B9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("flex flex-col gap-2 p-2",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function $9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"content","data-slot":"sidebar-content",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function Ly(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("relative flex w-full min-w-0 flex-col px-2 py-1",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"group","data-slot":"sidebar-group",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function By(e){const t=Ct.c(10);let n,r,i,c;if(t[0]!==e){const{className:d,render:h,...y}=e;n=h,c=$A,r="div",i=Yh({className:Jt("flex h-8 shrink-0 items-center rounded-md px-2 text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",d)},y),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c}else n=t[1],r=t[2],i=t[3],c=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},t[5]=l):l=t[5];let f;return t[6]!==n||t[7]!==r||t[8]!==i?(f={defaultTagName:r,props:i,render:n,state:l},t[6]=n,t[7]=r,t[8]=i,t[9]=f):f=t[9],c(f)}function Bd(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("flex w-full min-w-0 flex-col gap-px",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("ul",{className:i,"data-sidebar":"menu","data-slot":"sidebar-menu",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function Hi(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=Jt("group/menu-item relative",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("li",{className:i,"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const U9=HA("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Fi(e){const t=Ct.c(15);let{render:n,isActive:r,variant:i,size:c,tooltip:l,className:f,...d}=e;const h=r===void 0?!1:r,y=i===void 0?"default":i,g=c===void 0?"default":c,{isMobile:v,state:b}=op(),_="button",x=Yh({className:Jt(U9({variant:y,size:g}),f)},d),R=l?S9:n;let C;t[0]!==h||t[1]!==g?(C={slot:"sidebar-menu-button",sidebar:"menu-button",size:g,active:h},t[0]=h,t[1]=g,t[2]=C):C=t[2];let A;t[3]!==x||t[4]!==R||t[5]!==C?(A={defaultTagName:_,props:x,render:R,state:C},t[3]=x,t[4]=R,t[5]=C,t[6]=A):A=t[6];const O=$A(A);if(!l)return O;if(typeof l=="string"){let B;t[7]!==l?(B={children:l},t[7]=l,t[8]=B):B=t[8],l=B}const D=b!=="collapsed"||v;let N;t[9]!==D||t[10]!==l?(N=$.jsx(_9,{align:"center",hidden:D,side:"right",...l}),t[9]=D,t[10]=l,t[11]=N):N=t[11];let U;return t[12]!==O||t[13]!==N?(U=$.jsxs(b9,{children:[O,N]}),t[12]=O,t[13]=N,t[14]=U):U=t[14],U}function j9(){const e=Ct.c(8),{theme:t,setTheme:n}=vB();let r;e[0]!==n||e[1]!==t?(r=()=>{n(t==="light"?"dark":t==="dark"?"light":"dark")},e[0]=n,e[1]=t,e[2]=r):r=e[2];const i=r;let c,l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=$.jsx(a$,{className:"size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l=$.jsx(n$,{className:"absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),f=$.jsx("span",{className:"sr-only",children:"Toggle theme"}),e[3]=c,e[4]=l,e[5]=f):(c=e[3],l=e[4],f=e[5]);let d;return e[6]!==i?(d=$.jsxs(Rc,{className:"rounded-full",onClick:i,size:"icon-sm",variant:"ghost",children:[c,l,f]}),e[6]=i,e[7]=d):d=e[7],d}function y2(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=Jt("z-50 flex h-10 shrink-0 items-center gap-2 border-sidebar-border border-b bg-sidebar px-4 text-sidebar-foreground","sticky top-0"),n=$.jsx(z9,{className:"-ml-1"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("header",{className:t,children:[n,$.jsx("div",{className:"flex w-full justify-end",children:$.jsx(j9,{})})]}),e[2]=r):r=e[2],r}function H9(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=$.jsx("h1",{className:"font-bold text-4xl",children:"404"}),n=$.jsx("p",{className:"text-muted-foreground",children:"Page not found"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4",children:[t,n,$.jsx(Cr,{to:"/",children:$.jsx(Rc,{variant:"outline",children:"Go back home"})})]}),e[2]=r):r=e[2],r}function ge(e,t,n){function r(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,y=Object.keys(h);for(let g=0;gn?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class vc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class v2 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const b2={};function ra(e){return b2}function S2(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Zv(e,t){return typeof t=="bigint"?t.toString():t}function Fb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function qb(e){return e==null}function Vb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function F9(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const c=n>i?n:i,l=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return l%f/10**c}const vR=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==vR)return r===void 0&&(r=vR,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function da(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function yi(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function bR(e){return JSON.stringify(e)}function q9(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const _2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Th(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const V9=Fb(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Eu(e){if(Th(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Th(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function w2(e){return Eu(e)?{...e}:Array.isArray(e)?[...e]:e}const G9=new Set(["string","number","symbol"]);function ip(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vi(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function K9(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Z9={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Q9(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=yi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return da(this,"shape",l),l},checks:[]});return vi(e,c)}function Y9(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=yi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return da(this,"shape",l),l},checks:[]});return vi(e,c)}function X9(e,t){if(!Eu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const c=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(c,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=yi(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return da(this,"shape",c),c}});return vi(e,i)}function W9(e,t){if(!Eu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=yi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return da(this,"shape",r),r}});return vi(e,n)}function J9(e,t){const n=yi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return da(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return vi(e,n)}function eH(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=yi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return da(this,"shape",d),d},checks:[]});return vi(t,l)}function tH(e,t,n){const r=yi(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)c[l]=new e({type:"nonoptional",innerType:i[l]});return da(this,"shape",c),c}});return vi(t,r)}function dc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function $d(e){return typeof e=="string"?e:e?.message}function oa(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=$d(e.inst?._zod.def?.error?.(e))??$d(t?.error?.(e))??$d(n.customError?.(e))??$d(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Gb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function xu(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const x2=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Zv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},R2=ge("$ZodError",x2),ap=ge("$ZodError",x2,{Parent:Error});function nH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function sH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)n._errors.push(t(c));else{let l=n,f=0;for(;f(t,n,r,i)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise)throw new vc;if(l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>oa(d,c,ra())));throw _2(f,i?.callee),f}return l.value},Bge=cp(ap),lp=e=>async(t,n,r,i)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>oa(d,c,ra())));throw _2(f,i?.callee),f}return l.value},$ge=lp(ap),up=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new vc;return c.issues.length?{success:!1,error:new(e??R2)(c.issues.map(l=>oa(l,i,ra())))}:{success:!0,data:c.value}},rH=up(ap),fp=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(l=>oa(l,i,ra())))}:{success:!0,data:c.value}},oH=fp(ap),iH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return cp(e)(t,n,i)},aH=e=>(t,n,r)=>cp(e)(t,n,r),cH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return lp(e)(t,n,i)},lH=e=>async(t,n,r)=>lp(e)(t,n,r),uH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return up(e)(t,n,i)},fH=e=>(t,n,r)=>up(e)(t,n,r),dH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fp(e)(t,n,i)},hH=e=>async(t,n,r)=>fp(e)(t,n,r),pH=/^[cC][^\s-]{8,}$/,mH=/^[0-9a-z]+$/,gH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yH=/^[0-9a-vA-V]{20}$/,vH=/^[A-Za-z0-9]{27}$/,bH=/^[a-zA-Z0-9_-]{21}$/,SH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_H=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,SR=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,wH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,EH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xH(){return new RegExp(EH,"u")}const RH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,TH=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,AH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,IH=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,C2=/^[A-Za-z0-9_-]*$/,OH=/^\+[1-9]\d{6,14}$/,T2="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",MH=new RegExp(`^${T2}$`);function A2(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function DH(e){return new RegExp(`^${A2(e)}$`)}function kH(e){const t=A2({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${T2}T(?:${r})$`)}const PH=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},NH=/^-?\d+$/,zH=/^-?\d+(?:\.\d+)?$/,LH=/^[^A-Z]*$/,BH=/^[^a-z]*$/,ps=ge("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),I2={number:"number",bigint:"bigint",object:"date"},O2=ge("$ZodCheckLessThan",(e,t)=>{ps.init(e,t);const n=I2[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{ps.init(e,t);const n=I2[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$H=ge("$ZodCheckMultipleOf",(e,t)=>{ps.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):F9(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),UH=ge("$ZodCheckNumberFormat",(e,t)=>{ps.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,c]=Z9[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,n&&(f.pattern=NH)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}fc&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),jH=ge("$ZodCheckMaxLength",(e,t)=>{var n;ps.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!qb(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=r.value;if(i.length<=t.maximum)return;const l=Gb(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),HH=ge("$ZodCheckMinLength",(e,t)=>{var n;ps.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!qb(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Gb(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),FH=ge("$ZodCheckLengthEquals",(e,t)=>{var n;ps.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!qb(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,c=i.length;if(c===t.length)return;const l=Gb(i),f=c>t.length;r.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dp=ge("$ZodCheckStringFormat",(e,t)=>{var n,r;ps.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),qH=ge("$ZodCheckRegex",(e,t)=>{dp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),VH=ge("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=LH),dp.init(e,t)}),GH=ge("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=BH),dp.init(e,t)}),KH=ge("$ZodCheckIncludes",(e,t)=>{ps.init(e,t);const n=ip(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),ZH=ge("$ZodCheckStartsWith",(e,t)=>{ps.init(e,t);const n=new RegExp(`^${ip(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),QH=ge("$ZodCheckEndsWith",(e,t)=>{ps.init(e,t);const n=new RegExp(`.*${ip(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),YH=ge("$ZodCheckOverwrite",(e,t)=>{ps.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class XH{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` + )`}return $.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),Zj=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:c}=La(),l=c.useState("mounted"),f=c.useState("modal"),d=c.useState("open");return l||r?$.jsx(B2.Provider,{value:r,children:$.jsxs(e8,{ref:n,...i,children:[l&&f===!0&&$.jsx(Kj,{ref:c.context.internalBackdropRef,inert:Gj(!d)}),t.children]})}):null});let YR={},XR={},WR="";function Qj(e){if(typeof document>"u")return!1;const t=za(e);return hn(t).innerWidth-t.documentElement.clientWidth>0}function Yj(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=za(e).documentElement,i={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const c=r.offsetWidth;r.style.overflowY="hidden";const l=r.offsetWidth;return Object.assign(r.style,i),c===l}function Xj(e){const t=za(e),n=t.documentElement,r=t.body,i=Na(n)?n:r,c=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=c}}function Wj(e){const t=za(e),n=t.documentElement,r=t.body,i=hn(n);let c=0,l=0,f=!1;const d=Ir.create();if(qU&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=i.getComputedStyle(n),b=i.getComputedStyle(r),R=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,l=n.scrollLeft,YR={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},WR=n.style.scrollBehavior,XR={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,A=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||b.overflowY==="scroll",D=v.overflowX==="scroll"||b.overflowX==="scroll",N=Math.max(0,i.innerWidth-r.clientWidth),U=Math.max(0,i.innerHeight-r.clientHeight),B=parseFloat(b.marginTop)+parseFloat(b.marginBottom),k=parseFloat(b.marginLeft)+parseFloat(b.marginRight),Z=Na(n)?n:r;if(f=Yj(e),f){n.style.scrollbarGutter=R,Z.style.overflowY="hidden",Z.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(A||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:B||U?`calc(100dvh - ${B+U}px)`:"100dvh",width:k||N?`calc(100vw - ${k+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=c,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,YR),Object.assign(r.style,XR),f||(n.scrollTop=c,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=WR)}function g(){y(),d.request(h)}return h(),i.addEventListener("resize",g),()=>{d.cancel(),y(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",g)}}class Jj{lockCount=0;restore=null;timeoutLock=Ri.create();timeoutUnlock=Ri.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=za(t).documentElement,i=hn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=_I;return}const c=qI||!Qj(t);this.restore=c?Xj(t):Wj(t)}}const e9=new Jj;function t9(e=!0,t=null){mt(()=>{if(e)return e9.acquire(t)},[e,t])}function n9(e){const t=I.useRef(""),n=I.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:I.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function s9(e){const[t,n]=I.useState(null),r=Ze((f,d)=>{e||n(d||(qI?"touch":""))}),i=I.useCallback(()=>{n(null)},[]),{onClick:c,onPointerDown:l}=n9(r);return I.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:c,onPointerDown:l}}),[t,i,c,l])}function r9(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),c=t.useState("disablePointerDismissal"),l=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:y}=s9(i);M2(t);const{forceUnmount:g}=D2(i,t,()=>{y()}),v=Ze(se=>{const le=Vt(se);return le.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},le}),b=I.useCallback(()=>{t.setOpen(!1,v(u2))},[t,v]);I.useImperativeHandle(r,()=>({unmount:g,close:b}),[g,b]);const _=N2({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,R]=I.useState(0),C=x===0,A=Pj(_),O=A2(_,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(se){if("button"in se&&se.button!==0||"touches"in se&&se.touches.length!==1)return!1;const le=ns(se);if(C&&!c){const K=le;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===K||t.context.backdropRef.current===K||bt(K,f)&&!K?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});t9(i&&l===!0,f);const{getReferenceProps:D,getFloatingProps:N,getTriggerProps:U}=L2([A,O]);t.useContextCallback("onNestedDialogOpen",se=>{R(se+1)}),t.useContextCallback("onNestedDialogClose",()=>{R(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const B=I.useMemo(()=>D(h),[D,h]),k=I.useMemo(()=>U(h),[U,h]),Z=I.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:d,activeTriggerProps:B,inactiveTriggerProps:k,popupProps:Z,floatingRootContext:_,nestedOpenDialogCount:x})}const o9={...P2,modal:ot(e=>e.modal),nested:ot(e=>e.nested),nestedOpenDialogCount:ot(e=>e.nestedOpenDialogCount),disablePointerDismissal:ot(e=>e.disablePointerDismissal),openMethod:ot(e=>e.openMethod),descriptionElementId:ot(e=>e.descriptionElementId),titleElementId:ot(e=>e.titleElementId),viewportElement:ot(e=>e.viewportElement),role:ot(e=>e.role)};class i9 extends ob{constructor(t){super(a9(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new Np,onOpenChange:void 0,onOpenChangeComplete:void 0},o9)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},c=n.trigger?.id??null;(c||t)&&(i.activeTriggerId=c,i.activeTriggerElement=n.trigger??null),this.update(i)}}function a9(e={}){return{...k2(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function c9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:c,disablePointerDismissal:l=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:y,defaultTriggerId:g=null}=e,v=La(!0),b=!!v,_=Pr(()=>h?.store??new i9({open:n??r,activeTriggerId:y!==void 0?y:g,modal:f,disablePointerDismissal:l,nested:b})).current;_.useControlledProp("open",n,r),_.useControlledProp("activeTriggerId",y,g),_.useSyncedValues({disablePointerDismissal:l,nested:b,modal:f}),_.useContextCallback("onOpenChange",i),_.useContextCallback("onOpenChangeComplete",c);const x=_.useState("payload");r9({store:_,actionsRef:d,parentContext:v?.store.context});const R=I.useMemo(()=>({store:_}),[_]);return $.jsx(f2.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})}const l9=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=La(),d=Yv(c);return f.useSyncedValueWithCleanup("titleElementId",d),cr("h2",t,{ref:n,props:[{id:d},l]})});function u9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(c9,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function f9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(Zj,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function d9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(U5,{className:i,"data-slot":"sheet-overlay",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function h9(e){const t=Ct.c(17);let n,r,i,c,l;t[0]!==e?({className:r,children:n,side:c,showCloseButton:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5]);const f=c===void 0?"right":c,d=l===void 0?!0:l;let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(d9,{}),t[6]=h):h=t[6];let y;t[7]!==r?(y=en("data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-closed:animate-out data-open:animate-in data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),t[7]=r,t[8]=y):y=t[8];let g;t[9]!==d?(g=d&&$.jsxs(j5,{"data-slot":"sheet-close",render:$.jsx(Wc,{className:"absolute top-4 right-4",size:"icon-sm",variant:"ghost"}),children:[$.jsx(O$,{}),$.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d,t[10]=g):g=t[10];let v;return t[11]!==n||t[12]!==i||t[13]!==f||t[14]!==y||t[15]!==g?(v=$.jsxs(f9,{children:[h,$.jsxs(Vj,{className:y,"data-side":f,"data-slot":"sheet-content",...i,children:[n,g]})]}),t[11]=n,t[12]=i,t[13]=f,t[14]=y,t[15]=g,t[16]=v):v=t[16],v}function p9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("flex flex-col gap-1.5 p-6",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-slot":"sheet-header",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function m9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("font-medium text-foreground text-sm",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(l9,{className:i,"data-slot":"sheet-title",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function g9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("text-muted-foreground text-xs/relaxed",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(H5,{className:i,"data-slot":"sheet-description",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const V2=I.createContext(void 0);function Sf(e){const t=I.useContext(V2);if(t===void 0&&!e)throw new Error(_o(72));return t}const y9={...P2,disabled:ot(e=>e.disabled),instantType:ot(e=>e.instantType),isInstantPhase:ot(e=>e.isInstantPhase),trackCursorAxis:ot(e=>e.trackCursorAxis),disableHoverablePopup:ot(e=>e.disableHoverablePopup),lastOpenChangeReason:ot(e=>e.openChangeReason),closeDelay:ot(e=>e.closeDelay),hasViewport:ot(e=>e.hasViewport)};class cb extends ob{constructor(t){super({...v9(),...t},{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Np},y9)}setOpen=(t,n)=>{const r=n.reason,i=r===br,c=t&&r===Ih,l=!t&&(r===tp||r===tb);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const f=()=>{const d={open:t,openChangeReason:r};c?d.instantType="focus":l?d.instantType="dismiss":r===br&&(d.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(d.activeTriggerId=h,d.activeTriggerElement=n.trigger??null),this.update(d)};i?Ii.flushSync(f):f()};static useStore(t,n){const r=Pr(()=>new cb(n)).current,i=t??r,c=N2({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=c,i}}function v9(){return{...k2(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function b9(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:y,defaultTriggerId:g=null,children:v}=e,b=cb.useStore(h?.store,{open:r??n,activeTriggerId:y!==void 0?y:g});b.useControlledProp("open",r,n),b.useControlledProp("activeTriggerId",y,g),b.useContextCallback("onOpenChange",f),b.useContextCallback("onOpenChangeComplete",d);const _=b.useState("open"),x=!t&&_,R=b.useState("activeTriggerId"),C=b.useState("payload");b.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:i}),mt(()=>{_&&t&&b.setOpen(!1,Vt(O5))},[_,t,b]),b.useSyncedValue("disabled",t),M2(b);const{forceUnmount:A,transitionStatus:O}=D2(x,b),D=b.useState("isInstantPhase"),N=b.useState("instantType"),U=b.useState("lastOpenChangeReason"),B=I.useRef(null);mt(()=>{O==="ending"&&U===eb||O!=="ending"&&D?(N!=="delay"&&(B.current=N),b.set("instantType","delay")):B.current!==null&&(b.set("instantType",B.current),B.current=null)},[O,D,U,N,b]),mt(()=>{x&&R==null&&b.set("payload",void 0)},[b,R,x]);const k=I.useCallback(()=>{b.setOpen(!1,S9(b,u2))},[b]);I.useImperativeHandle(l,()=>({unmount:A,close:k}),[A,k]);const Z=b.useState("floatingRootContext"),se=Rj(Z,{enabled:!t}),le=A2(Z,{enabled:!t,referencePress:!0}),K=a8(Z,{enabled:!t&&c!=="none",axis:c==="none"?void 0:c}),{getReferenceProps:Q,getFloatingProps:ye,getTriggerProps:fe}=L2([se,le,K]),V=I.useMemo(()=>Q(),[Q]),W=I.useMemo(()=>fe(),[fe]),j=I.useMemo(()=>ye(),[ye]);return b.useSyncedValues({activeTriggerProps:V,inactiveTriggerProps:W,popupProps:j}),$.jsx(V2.Provider,{value:b,children:typeof v=="function"?v({payload:C}):v})}function S9(e,t){const n=Vt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const G2=I.createContext(void 0);function _9(){return I.useContext(G2)}const w9=600,E9=I.forwardRef(function(t,n){const{className:r,render:i,handle:c,payload:l,disabled:f,delay:d,closeDelay:h,id:y,...g}=t,v=Sf(!0),b=c?.store??v;if(!b)throw new Error(_o(82));const _=Yv(y),x=b.useState("isTriggerActive",_),R=b.useState("isOpenedByTrigger",_),C=b.useState("floatingRootContext"),A=I.useRef(null),O=d??w9,D=h??0,{registerTrigger:N,isMountedByThisTrigger:U}=_j(_,A,b,{payload:l,closeDelay:D}),B=_9(),{delayRef:k,isInstantPhase:Z,hasProvider:se}=Z5(C,{open:R});b.useSyncedValue("isInstantPhase",Z);const le=b.useState("disabled"),K=f??le,Q=b.useState("trackCursorAxis"),ye=b.useState("disableHoverablePopup"),fe=Dj(C,{enabled:!K,mouseOnly:!0,move:!1,handleClose:!ye&&Q!=="both"?zj():null,restMs(){const ve=B?.delay,Te=typeof k.current=="object"?k.current.open:void 0;let P=O;return se&&(Te!==0?P=d??ve??O:P=0),P},delay(){const ve=typeof k.current=="object"?k.current.close:void 0;let Te=D;return h==null&&se&&(Te=ve),{close:Te}},triggerElementRef:A,isActiveTrigger:x}),V=I.useMemo(()=>({open:R}),[R]),W=b.useState("triggerProps",U);return cr("button",t,{state:V,ref:[n,N,A],props:[fe,W,{id:_},g],stateAttributesMapping:B5})}),K2=I.createContext(void 0);function x9(){const e=I.useContext(K2);if(e===void 0)throw new Error(_o(70));return e}const R9=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,...f}=t,{portalNode:d,portalSubtree:h}=b2({container:i,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:$.jsxs(I.Fragment,{children:[h,d&&Ii.createPortal(r,d)]})}),C9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Sf().useState("mounted")||r?$.jsx(K2.Provider,{value:r,children:$.jsx(R9,{ref:n,...i})}):null}),Z2=I.createContext(void 0);function Q2(){const e=I.useContext(Z2);if(e===void 0)throw new Error(_o(71));return e}const T9=I.createContext(void 0);function A9(){return I.useContext(T9)?.direction??"ltr"}const I9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:l,elements:f,middlewareData:d}=t,{element:h,padding:y=0,offsetParent:g="real"}=vo(e,t)||{};if(h==null)return{};const v=XI(y),b={x:n,y:r},_=Jv(i),x=Wv(_),R=await l.getDimensions(h),C=_==="y",A=C?"top":"left",O=C?"bottom":"right",D=C?"clientHeight":"clientWidth",N=c.reference[x]+c.reference[_]-b[_]-c.floating[x],U=b[_]-c.reference[_],B=g==="real"?await l.getOffsetParent?.(h):f.floating;let k=f.floating[D]||c.floating[x];(!k||!await l.isElement?.(B))&&(k=f.floating[D]||c.floating[x]);const Z=N/2-U/2,se=k/2-R[x]/2-1,le=Math.min(v[A],se),K=Math.min(v[O],se),Q=le,ye=k-R[x]-K,fe=k/2-R[x]/2+Z,V=lv(Q,fe,ye),W=!d.arrow&&Mi(i)!=null&&fe!==V&&c.reference[x]/2-(fe({...I9(e),options:[e,t]}),M9={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,c=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await K8().fn(e)).data?.referenceHidden||c}}}},Dh={sideX:"left",sideY:"top"},D9={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:c,strategy:l,placement:f}=e,d=hn(i),h=d.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:Dh};const g=await c.getOffsetParent?.(i);let v={width:0,height:0};if(l==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const A=za(i);v={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(v=await c.getDimensions(g));const b=ps(f);let _=t,x=n;b==="left"&&(_=v.width-(t+r.width)),b==="top"&&(x=v.height-(n+r.height));const R=b==="left"?"right":Dh.sideX,C=b==="top"?"bottom":Dh.sideY;return{x:_,y:x,data:{sideX:R,sideY:C}}}};function Y2(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function JR(e,t,n){const{rects:r,placement:i}=e;return{side:Y2(t,ps(i),n),align:Mi(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function k9(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:b,mounted:_,collisionAvoidance:x,shiftCrossAxis:R=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:O=!1,externalTree:D}=e,[N,U]=I.useState(null);!_&&N!==null&&U(null);const B=x.side||"flip",k=x.align||"flip",Z=x.fallbackAxisSide||"end",se=typeof t=="function"?t:void 0,le=Ze(se),K=se?le:t,Q=Or(t),fe=A9()==="rtl",V=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":fe?"left":"right","inline-start":fe?"right":"left"}[r],W=c==="center"?V:`${V}-${c}`;let j=d;const ve=1,Te=r==="bottom"?ve:0,P=r==="top"?ve:0,ne=r==="right"?ve:0,ie=r==="left"?ve:0;typeof j=="number"?j={top:j+Te,right:j+ie,bottom:j+P,left:j+ne}:j&&(j={top:(j.top||0)+Te,right:(j.right||0)+ie,bottom:(j.bottom||0)+P,left:(j.left||0)+ne});const de={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:j},Re=I.useRef(null),Se=Or(i),be=Or(l),ht=[H8(Zt=>{const Fn=JR(Zt,r,fe),Us=typeof Se.current=="function"?Se.current(Fn):Se.current,Dn=typeof be.current=="function"?be.current(Fn):be.current;return{mainAxis:Us,crossAxis:Dn,alignmentAxis:Dn}},[typeof i!="function"?i:0,typeof l!="function"?l:0,fe,r])],Ft=k==="none"&&B!=="shift",oe=!Ft&&(h||R||B==="shift"),Fe=B==="none"?null:V8({...de,padding:{top:j.top+ve,right:j.right+ve,bottom:j.bottom+ve,left:j.left+ve},mainAxis:!R&&B==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:Z}),Ie=Ft?null:F8(Zt=>{const Fn=za(Zt.elements.floating).documentElement;return{...de,rootBoundary:R?{x:0,y:0,width:Fn.clientWidth,height:Fn.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:oe,limiter:h||R?void 0:q8(Us=>{if(!Re.current)return{};const{width:Dn,height:fr}=Re.current.getBoundingClientRect(),dr=ar(ps(Us.placement)),js=dr==="y"?Dn:fr,Lo=dr==="y"?j.left+j.right:j.top+j.bottom;return{offset:js/2+Lo/2}})}},[de,h,R,j,k]);B==="shift"||k==="shift"||c==="center"?ht.push(Ie,Fe):ht.push(Fe,Ie),ht.push(G8({...de,apply({elements:{floating:Zt},rects:{reference:Fn},availableWidth:Us,availableHeight:Dn}){Object.entries({"--available-width":`${Us}px`,"--available-height":`${Dn}px`,"--anchor-width":`${Fn.width}px`,"--anchor-height":`${Fn.height}px`}).forEach(([fr,dr])=>{Zt.style.setProperty(fr,dr)})}}),O9(()=>({element:Re.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Zt){const{elements:Fn,middlewareData:Us,placement:Dn,rects:fr,y:dr}=Zt,js=ps(Dn),Lo=ar(js),Bo=Re.current,pm=Us.arrow?.x||0,Uf=Us.arrow?.y||0,Ml=Bo?.clientWidth||0,Qi=Bo?.clientHeight||0,Dl=pm+Ml/2,kl=Uf+Qi/2,jf=Math.abs(Us.shift?.y||0),Hf=fr.reference.height/2,Hr=typeof i=="function"?i(JR(Zt,r,fe)):i,Pl=jf>Hr,Ff={top:`${Dl}px calc(100% + ${Hr}px)`,bottom:`${Dl}px ${-Hr}px`,left:`calc(100% + ${Hr}px) ${kl}px`,right:`${-Hr}px ${kl}px`}[js],qf=`${Dl}px ${fr.reference.y+Hf-dr}px`;return Fn.floating.style.setProperty("--transform-origin",oe&&Lo==="y"&&Pl?qf:Ff),{}}},M9,A),mt(()=>{!_&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[_,b]);const Pt=I.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:_e,elements:Ne,x:Ve,y:Qe,middlewareData:ut,update:Be,placement:Le,context:nn,isPositioned:it,floatingStyles:Ss}=xj({rootContext:b,placement:W,middleware:ht,strategy:n,whileElementsMounted:v?void 0:(...Zt)=>qR(...Zt,Pt),nodeId:C,externalTree:D}),{sideX:gt,sideY:Bt}=ut.adaptiveOrigin||Dh,$t=it?n:"fixed",sn=I.useMemo(()=>A?{position:$t,[gt]:Ve,[Bt]:Qe}:{position:$t,...Ss},[A,$t,gt,Ve,Bt,Qe,Ss]),_s=I.useRef(null);mt(()=>{if(!_)return;const Zt=Q.current,Fn=typeof Zt=="function"?Zt():Zt,Dn=(eC(Fn)?Fn.current:Fn)||null||null;Dn!==_s.current&&(_e.setPositionReference(Dn),_s.current=Dn)},[_,_e,K,Q]),I.useEffect(()=>{if(!_)return;const Zt=Q.current;typeof Zt!="function"&&eC(Zt)&&Zt.current!==_s.current&&(_e.setPositionReference(Zt.current),_s.current=Zt.current)},[_,_e,K,Q]),I.useEffect(()=>{if(v&&_&&Ne.domReference&&Ne.floating)return qR(Ne.domReference,Ne.floating,Be,Pt)},[v,_,Ne,Be,Pt]);const $s=ps(Le),$f=Y2(r,$s,fe),zo=Mi(Le)||"center",jn=!!ut.hide?.referenceHidden;mt(()=>{O&&_&&it&&U($s)},[O,_,it,$s]);const ur=I.useMemo(()=>({position:"absolute",top:ut.arrow?.y,left:ut.arrow?.x}),[ut.arrow]),Hn=ut.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:sn,arrowStyles:ur,arrowRef:Re,arrowUncentered:Hn,side:$f,align:zo,physicalSide:$s,anchorHidden:jn,refs:_e,context:nn,isPositioned:it,update:Be}),[sn,ur,Re,Hn,$f,zo,$s,jn,_e,nn,it,Be])}function eC(e){return e!=null&&"current"in e}function X2(e){return e==="starting"?WB:Ms}const P9=I.forwardRef(function(t,n){const{render:r,className:i,anchor:c,positionMethod:l="absolute",side:f="top",align:d="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:_=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=e$,...C}=t,A=Sf(),O=x9(),D=A.useState("open"),N=A.useState("mounted"),U=A.useState("trackCursorAxis"),B=A.useState("disableHoverablePopup"),k=A.useState("floatingRootContext"),Z=A.useState("instantType"),se=A.useState("transitionStatus"),le=A.useState("hasViewport"),K=k9({anchor:c,positionMethod:l,floatingRootContext:k,mounted:N,side:f,sideOffset:h,align:d,alignOffset:y,collisionBoundary:g,collisionPadding:v,sticky:_,arrowPadding:b,disableAnchorTracking:x,keepMounted:O,collisionAvoidance:R,adaptiveOrigin:le?D9:void 0}),Q=I.useMemo(()=>{const W={};return(!D||U==="both"||B)&&(W.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...W}}},[D,U,B,N,K.positionerStyles]),ye=I.useMemo(()=>({open:D,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:U!=="none"?"tracking-cursor":Z}),[D,K.side,K.align,K.anchorHidden,U,Z]),fe=I.useMemo(()=>({...ye,arrowRef:K.arrowRef,arrowStyles:K.arrowStyles,arrowUncentered:K.arrowUncentered}),[ye,K.arrowRef,K.arrowStyles,K.arrowUncentered]),V=cr("div",t,{state:ye,props:[Q,X2(se),C],ref:[n,A.useStateSetter("positionerElement")],stateAttributesMapping:vf});return $.jsx(Z2.Provider,{value:fe,children:V})}),N9={...vf,...nb},z9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,l=Sf(),{side:f,align:d}=Q2(),h=l.useState("open"),y=l.useState("instantType"),g=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("floatingRootContext");ab({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});const _=l.useState("disabled"),x=l.useState("closeDelay");Ij(b,{enabled:!_,closeDelay:x});const R=I.useMemo(()=>({open:h,side:f,align:d,instant:y,transitionStatus:g}),[h,f,d,y,g]);return cr("div",t,{state:R,ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[v,X2(g),c],stateAttributesMapping:N9})}),L9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,f=Sf().useState("instantType"),{open:d,arrowRef:h,side:y,align:g,arrowUncentered:v,arrowStyles:b}=Q2(),_=I.useMemo(()=>({open:d,side:y,align:g,uncentered:v,instant:f}),[d,y,g,v,f]);return cr("div",t,{state:_,ref:[n,h],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:vf})}),B9=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,c=I.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=I.useMemo(()=>({open:n,close:r}),[n,r]);return $.jsx(G2.Provider,{value:c,children:$.jsx(K5,{delay:l,timeoutMs:i,children:t.children})})};function $9(e){const t=Ct.c(6);let n,r;t[0]!==e?({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const i=r===void 0?0:r;let c;return t[3]!==i||t[4]!==n?(c=$.jsx(B9,{"data-slot":"tooltip-provider",delay:i,...n}),t[3]=i,t[4]=n,t[5]=c):c=t[5],c}function U9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx($9,{children:$.jsx(b9,{"data-slot":"tooltip",...n})}),t[2]=n,t[3]=r):r=t[3],r}function j9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(E9,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function H9(e){const t=Ct.c(21);let n,r,i,c,l,f,d;t[0]!==e?({className:r,side:c,sideOffset:l,align:f,alignOffset:d,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=c===void 0?"top":c,y=l===void 0?4:l,g=f===void 0?"center":f,v=d===void 0?0:d;let b;t[8]!==r?(b=en("data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-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 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:rounded-md",r),t[8]=r,t[9]=b):b=t[9];let _;t[10]===Symbol.for("react.memo_cache_sentinel")?(_=$.jsx(L9,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2"}),t[10]=_):_=t[10];let x;t[11]!==n||t[12]!==i||t[13]!==b?(x=$.jsxs(z9,{className:b,"data-slot":"tooltip-content",...i,children:[n,_]}),t[11]=n,t[12]=i,t[13]=b,t[14]=x):x=t[14];let R;return t[15]!==g||t[16]!==v||t[17]!==h||t[18]!==y||t[19]!==x?(R=$.jsx(C9,{children:$.jsx(P9,{align:g,alignOffset:v,className:"isolate z-50",side:h,sideOffset:y,children:x})}),t[15]=g,t[16]=v,t[17]=h,t[18]=y,t[19]=x,t[20]=R):R=t[20],R}const F9=768,W2=`(max-width: ${F9-1}px)`;function q9(e){const t=window.matchMedia(W2);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function V9(){return window.matchMedia(W2).matches}function G9(){return I.useSyncExternalStore(q9,V9)}const K9="sidebar_state",Z9=3600*24*7,Q9="12rem",Y9="16rem",X9="3rem",W9="b",J2=I.createContext(null);function zp(){const e=I.useContext(J2);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function J9(e){const t=Ct.c(36);let n,r,i,c,l,f,d;t[0]!==e?({defaultOpen:d,open:i,onOpenChange:l,className:r,style:f,children:n,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=d===void 0?!0:d,y=G9(),[g,v]=I.useState(!1),[b,_]=I.useState(h),x=i??b;let R;t[8]!==x||t[9]!==l?(R=ye=>{const fe=typeof ye=="function"?ye(x):ye;l?l(fe):_(fe),document.cookie=`${K9}=${fe}; path=/; max-age=${Z9}`},t[8]=x,t[9]=l,t[10]=R):R=t[10];const C=R;let A;t[11]!==y||t[12]!==C?(A=()=>y?v(tH):C(eH),t[11]=y,t[12]=C,t[13]=A):A=t[13];const O=A;let D,N;t[14]!==O?(D=()=>{const ye=fe=>{fe.key===W9&&(fe.metaKey||fe.ctrlKey)&&(fe.preventDefault(),O())};return window.addEventListener("keydown",ye),()=>window.removeEventListener("keydown",ye)},N=[O],t[14]=O,t[15]=D,t[16]=N):(D=t[15],N=t[16]),I.useEffect(D,N);const U=x?"expanded":"collapsed";let B;t[17]!==y||t[18]!==x||t[19]!==g||t[20]!==C||t[21]!==U||t[22]!==O?(B={state:U,open:x,setOpen:C,isMobile:y,openMobile:g,setOpenMobile:v,toggleSidebar:O},t[17]=y,t[18]=x,t[19]=g,t[20]=C,t[21]=U,t[22]=O,t[23]=B):B=t[23];const k=B;let Z;t[24]!==r?(Z=en("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),t[24]=r,t[25]=Z):Z=t[25];let se;t[26]!==f?(se={"--sidebar-width":Q9,"--sidebar-width-icon":X9,...f},t[26]=f,t[27]=se):se=t[27];const le=se;let K;t[28]!==n||t[29]!==c||t[30]!==Z||t[31]!==le?(K=$.jsx("div",{className:Z,"data-slot":"sidebar-wrapper",style:le,...c,children:n}),t[28]=n,t[29]=c,t[30]=Z,t[31]=le,t[32]=K):K=t[32];let Q;return t[33]!==k||t[34]!==K?(Q=$.jsx(J2.Provider,{value:k,children:K}),t[33]=k,t[34]=K,t[35]=Q):Q=t[35],Q}function eH(e){return!e}function tH(e){return!e}function nH(e){const t=Ct.c(46);let n,r,i,c,l,f;t[0]!==e?({side:c,variant:l,collapsible:f,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6]);const d=c===void 0?"left":c,h=l===void 0?"sidebar":l,y=f===void 0?"offExamples":f,{isMobile:g,state:v,openMobile:b,setOpenMobile:_}=zp();if(y==="none"){let Z;t[7]!==r?(Z=en("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),t[7]=r,t[8]=Z):Z=t[8];let se;return t[9]!==n||t[10]!==i||t[11]!==Z?(se=$.jsx("div",{className:Z,"data-slot":"sidebar",...i,children:n}),t[9]=n,t[10]=i,t[11]=Z,t[12]=se):se=t[12],se}if(g){let Z;t[13]===Symbol.for("react.memo_cache_sentinel")?(Z={"--sidebar-width":Y9},t[13]=Z):Z=t[13];let se;t[14]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsxs(p9,{className:"sr-only",children:[$.jsx(m9,{children:"Sidebar"}),$.jsx(g9,{children:"Displays the mobile sidebar."})]}),t[14]=se):se=t[14];let le;t[15]!==n?(le=$.jsx("div",{className:"flex h-full w-full flex-col",children:n}),t[15]=n,t[16]=le):le=t[16];let K;t[17]!==d||t[18]!==le?(K=$.jsxs(h9,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:d,style:Z,children:[se,le]}),t[17]=d,t[18]=le,t[19]=K):K=t[19];let Q;return t[20]!==b||t[21]!==i||t[22]!==_||t[23]!==K?(Q=$.jsx(u9,{onOpenChange:_,open:b,...i,children:K}),t[20]=b,t[21]=i,t[22]=_,t[23]=K,t[24]=Q):Q=t[24],Q}const x=v==="collapsed"?y:"",R=h==="floating"||h==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;t[25]!==R?(C=en("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",R),t[25]=R,t[26]=C):C=t[26];let A;t[27]!==C?(A=$.jsx("div",{className:C,"data-slot":"sidebar-gap"}),t[27]=C,t[28]=A):A=t[28];const O=d==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",D=h==="floating"||h==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;t[29]!==r||t[30]!==O||t[31]!==D?(N=en("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",O,D,r),t[29]=r,t[30]=O,t[31]=D,t[32]=N):N=t[32];let U;t[33]!==n?(U=$.jsx("div",{className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:n}),t[33]=n,t[34]=U):U=t[34];let B;t[35]!==i||t[36]!==N||t[37]!==U?(B=$.jsx("div",{className:N,"data-slot":"sidebar-container",...i,children:U}),t[35]=i,t[36]=N,t[37]=U,t[38]=B):B=t[38];let k;return t[39]!==d||t[40]!==v||t[41]!==B||t[42]!==x||t[43]!==A||t[44]!==h?(k=$.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":x,"data-side":d,"data-slot":"sidebar","data-state":v,"data-variant":h,children:[A,B]}),t[39]=d,t[40]=v,t[41]=B,t[42]=x,t[43]=A,t[44]=h,t[45]=k):k=t[45],k}function sH(e){const t=Ct.c(15);let n,r,i;t[0]!==e?({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]);const{toggleSidebar:c}=zp();let l;t[4]!==n?(l=en(n),t[4]=n,t[5]=l):l=t[5];let f;t[6]!==r||t[7]!==c?(f=g=>{r?.(g),c()},t[6]=r,t[7]=c,t[8]=f):f=t[8];let d,h;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(R$,{}),h=$.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=d,t[10]=h):(d=t[9],h=t[10]);let y;return t[11]!==i||t[12]!==l||t[13]!==f?(y=$.jsxs(Wc,{className:l,"data-sidebar":"trigger","data-slot":"sidebar-trigger",onClick:f,size:"icon-lg",variant:"ghost",...i,children:[d,h]}),t[11]=i,t[12]=l,t[13]=f,t[14]=y):y=t[14],y}function rH(e){const t=Ct.c(9);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const{toggleSidebar:i}=zp();let c;t[3]!==n?(c=en("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offExamples]:translate-x-0 hover:group-data-[collapsible=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",n),t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==c||t[7]!==i?(l=$.jsx("button",{"aria-label":"Toggle Sidebar",className:c,"data-sidebar":"rail","data-slot":"sidebar-rail",onClick:i,tabIndex:-1,title:"Toggle Sidebar",...r}),t[5]=r,t[6]=c,t[7]=i,t[8]=l):l=t[8],l}function oH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("flex flex-col gap-2 p-2",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function iH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"content","data-slot":"sidebar-content",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function r0(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("relative flex w-full min-w-0 flex-col px-2 py-1",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"group","data-slot":"sidebar-group",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function o0(e){const t=Ct.c(10);let n,r,i,c;if(t[0]!==e){const{className:d,render:h,...y}=e;n=h,c=wI,r="div",i=Tp({className:en("flex h-8 shrink-0 items-center rounded-md px-2 text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",d)},y),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c}else n=t[1],r=t[2],i=t[3],c=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},t[5]=l):l=t[5];let f;return t[6]!==n||t[7]!==r||t[8]!==i?(f={defaultTagName:r,props:i,render:n,state:l},t[6]=n,t[7]=r,t[8]=i,t[9]=f):f=t[9],c(f)}function gh(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("flex w-full min-w-0 flex-col gap-px",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("ul",{className:i,"data-sidebar":"menu","data-slot":"sidebar-menu",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function pa(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=en("group/menu-item relative",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("li",{className:i,"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const aH=RI("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ma(e){const t=Ct.c(15);let{render:n,isActive:r,variant:i,size:c,tooltip:l,className:f,...d}=e;const h=r===void 0?!1:r,y=i===void 0?"default":i,g=c===void 0?"default":c,{isMobile:v,state:b}=zp(),_="button",x=Tp({className:en(aH({variant:y,size:g}),f)},d),R=l?j9:n;let C;t[0]!==h||t[1]!==g?(C={slot:"sidebar-menu-button",sidebar:"menu-button",size:g,active:h},t[0]=h,t[1]=g,t[2]=C):C=t[2];let A;t[3]!==x||t[4]!==R||t[5]!==C?(A={defaultTagName:_,props:x,render:R,state:C},t[3]=x,t[4]=R,t[5]=C,t[6]=A):A=t[6];const O=wI(A);if(!l)return O;if(typeof l=="string"){let B;t[7]!==l?(B={children:l},t[7]=l,t[8]=B):B=t[8],l=B}const D=b!=="collapsed"||v;let N;t[9]!==D||t[10]!==l?(N=$.jsx(H9,{align:"center",hidden:D,side:"right",...l}),t[9]=D,t[10]=l,t[11]=N):N=t[11];let U;return t[12]!==O||t[13]!==N?(U=$.jsxs(U9,{children:[O,N]}),t[12]=O,t[13]=N,t[14]=U):U=t[14],U}function cH(){const e=Ct.c(8),{theme:t,setTheme:n}=$B();let r;e[0]!==n||e[1]!==t?(r=()=>{n(t==="light"?"dark":t==="dark"?"light":"dark")},e[0]=n,e[1]=t,e[2]=r):r=e[2];const i=r;let c,l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=$.jsx(A$,{className:"size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l=$.jsx(E$,{className:"absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),f=$.jsx("span",{className:"sr-only",children:"Toggle theme"}),e[3]=c,e[4]=l,e[5]=f):(c=e[3],l=e[4],f=e[5]);let d;return e[6]!==i?(d=$.jsxs(Wc,{className:"rounded-full",onClick:i,size:"icon-sm",variant:"ghost",children:[c,l,f]}),e[6]=i,e[7]=d):d=e[7],d}function eO(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=en("z-50 flex h-10 shrink-0 items-center gap-2 border-sidebar-border border-b bg-sidebar px-4 text-sidebar-foreground","sticky top-0"),n=$.jsx(sH,{className:"-ml-1"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("header",{className:t,children:[n,$.jsx("div",{className:"flex w-full justify-end",children:$.jsx(cH,{})})]}),e[2]=r):r=e[2],r}function lH(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=$.jsx("h1",{className:"font-bold text-4xl",children:"404"}),n=$.jsx("p",{className:"text-muted-foreground",children:"Page not found"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4",children:[t,n,$.jsx(Ar,{to:"/",children:$.jsx(Wc,{variant:"outline",children:"Go back home"})})]}),e[2]=r):r=e[2],r}function ge(e,t,n){function r(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,y=Object.keys(h);for(let g=0;gn?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Vc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tO extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const nO={};function Oa(e){return nO}function sO(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function mv(e,t){return typeof t=="bigint"?t.toString():t}function lb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ub(e){return e==null}function fb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function uH(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const c=n>i?n:i,l=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return l%f/10**c}const tC=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==tC)return r===void 0&&(r=tC,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ba(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Di(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function nC(e){return JSON.stringify(e)}function fH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const rO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function op(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const dH=lb(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function rf(e){if(op(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(op(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function oO(e){return rf(e)?{...e}:Array.isArray(e)?[...e]:e}const hH=new Set(["string","number","symbol"]);function Lp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ki(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function pH(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const mH={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function gH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=Di(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return Ba(this,"shape",l),l},checks:[]});return ki(e,c)}function yH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=Di(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return Ba(this,"shape",l),l},checks:[]});return ki(e,c)}function vH(e,t){if(!rf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const c=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(c,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Di(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return Ba(this,"shape",c),c}});return ki(e,i)}function bH(e,t){if(!rf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Di(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ba(this,"shape",r),r}});return ki(e,n)}function SH(e,t){const n=Di(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ba(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return ki(e,n)}function _H(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Di(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Ba(this,"shape",d),d},checks:[]});return ki(t,l)}function wH(e,t,n){const r=Di(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)c[l]=new e({type:"nonoptional",innerType:i[l]});return Ba(this,"shape",c),c}});return ki(t,r)}function $c(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function yh(e){return typeof e=="string"?e:e?.message}function Ma(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=yh(e.inst?._zod.def?.error?.(e))??yh(t?.error?.(e))??yh(n.customError?.(e))??yh(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function db(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function of(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const aO=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cO=ge("$ZodError",aO),Bp=ge("$ZodError",aO,{Parent:Error});function EH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)n._errors.push(t(c));else{let l=n,f=0;for(;f(t,n,r,i)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise)throw new Vc;if(l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>Ma(d,c,Oa())));throw rO(f,i?.callee),f}return l.value},Aye=$p(Bp),Up=e=>async(t,n,r,i)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>Ma(d,c,Oa())));throw rO(f,i?.callee),f}return l.value},Iye=Up(Bp),jp=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Vc;return c.issues.length?{success:!1,error:new(e??cO)(c.issues.map(l=>Ma(l,i,Oa())))}:{success:!0,data:c.value}},RH=jp(Bp),Hp=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(l=>Ma(l,i,Oa())))}:{success:!0,data:c.value}},CH=Hp(Bp),TH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $p(e)(t,n,i)},AH=e=>(t,n,r)=>$p(e)(t,n,r),IH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Up(e)(t,n,i)},OH=e=>async(t,n,r)=>Up(e)(t,n,r),MH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jp(e)(t,n,i)},DH=e=>(t,n,r)=>jp(e)(t,n,r),kH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hp(e)(t,n,i)},PH=e=>async(t,n,r)=>Hp(e)(t,n,r),NH=/^[cC][^\s-]{8,}$/,zH=/^[0-9a-z]+$/,LH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,BH=/^[0-9a-vA-V]{20}$/,$H=/^[A-Za-z0-9]{27}$/,UH=/^[a-zA-Z0-9_-]{21}$/,jH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,HH=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,sC=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,FH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function VH(){return new RegExp(qH,"u")}const GH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,KH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ZH=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,QH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,YH=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lO=/^[A-Za-z0-9_-]*$/,XH=/^\+[1-9]\d{6,14}$/,uO="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",WH=new RegExp(`^${uO}$`);function fO(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function JH(e){return new RegExp(`^${fO(e)}$`)}function e7(e){const t=fO({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${uO}T(?:${r})$`)}const t7=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},n7=/^-?\d+$/,s7=/^-?\d+(?:\.\d+)?$/,r7=/^[^A-Z]*$/,o7=/^[^a-z]*$/,gs=ge("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),dO={number:"number",bigint:"bigint",object:"date"},hO=ge("$ZodCheckLessThan",(e,t)=>{gs.init(e,t);const n=dO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{gs.init(e,t);const n=dO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),i7=ge("$ZodCheckMultipleOf",(e,t)=>{gs.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):uH(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),a7=ge("$ZodCheckNumberFormat",(e,t)=>{gs.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,c]=mH[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,n&&(f.pattern=n7)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}fc&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),c7=ge("$ZodCheckMaxLength",(e,t)=>{var n;gs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!ub(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=r.value;if(i.length<=t.maximum)return;const l=db(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),l7=ge("$ZodCheckMinLength",(e,t)=>{var n;gs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!ub(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=db(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),u7=ge("$ZodCheckLengthEquals",(e,t)=>{var n;gs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!ub(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,c=i.length;if(c===t.length)return;const l=db(i),f=c>t.length;r.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Fp=ge("$ZodCheckStringFormat",(e,t)=>{var n,r;gs.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),f7=ge("$ZodCheckRegex",(e,t)=>{Fp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),d7=ge("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=r7),Fp.init(e,t)}),h7=ge("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=o7),Fp.init(e,t)}),p7=ge("$ZodCheckIncludes",(e,t)=>{gs.init(e,t);const n=Lp(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),m7=ge("$ZodCheckStartsWith",(e,t)=>{gs.init(e,t);const n=new RegExp(`^${Lp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),g7=ge("$ZodCheckEndsWith",(e,t)=>{gs.init(e,t);const n=new RegExp(`.*${Lp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),y7=ge("$ZodCheckOverwrite",(e,t)=>{gs.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class v7{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` `).filter(l=>l),i=Math.min(...r.map(l=>l.length-l.trimStart().length)),c=r.map(l=>l.slice(i)).map(l=>" ".repeat(this.indent*2)+l);for(const l of c)this.content.push(l)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(c=>` ${c}`)];return new t(...n,i.join(` -`))}}const WH={major:4,minor:3,patch:6},gn=ge("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=WH;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const c of i._zod.onattach)c(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,f,d)=>{let h=dc(l),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=g._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new vc;if(y||b instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=dc(l,v)))});else{if(l.issues.length===v)continue;h||(h=dc(l,v))}}return y?y.then(()=>l):l},c=(l,f,d)=>{if(dc(l))return l.aborted=!0,l;const h=i(f,r,d);if(h instanceof Promise){if(d.async===!1)throw new vc;return h.then(y=>e._zod.parse(y,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(y=>c(y,l,f)):c(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new vc;return d.then(h=>i(h,r,f))}return i(d,r,f)}}Rt(e,"~standard",()=>({validate:i=>{try{const c=rH(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return oH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Kb=ge("$ZodString",(e,t)=>{gn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??PH(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),jt=ge("$ZodStringFormat",(e,t)=>{dp.init(e,t),Kb.init(e,t)}),JH=ge("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_H),jt.init(e,t)}),e7=ge("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=SR(r))}else t.pattern??(t.pattern=SR());jt.init(e,t)}),t7=ge("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wH),jt.init(e,t)}),n7=ge("$ZodURL",(e,t)=>{jt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),s7=ge("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xH()),jt.init(e,t)}),r7=ge("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=bH),jt.init(e,t)}),o7=ge("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pH),jt.init(e,t)}),i7=ge("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=mH),jt.init(e,t)}),a7=ge("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gH),jt.init(e,t)}),c7=ge("$ZodXID",(e,t)=>{t.pattern??(t.pattern=yH),jt.init(e,t)}),l7=ge("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=vH),jt.init(e,t)}),u7=ge("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=kH(t)),jt.init(e,t)}),f7=ge("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=MH),jt.init(e,t)}),d7=ge("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=DH(t)),jt.init(e,t)}),h7=ge("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=SH),jt.init(e,t)}),p7=ge("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=RH),jt.init(e,t),e._zod.bag.format="ipv4"}),m7=ge("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=CH),jt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),g7=ge("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=TH),jt.init(e,t)}),y7=ge("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=AH),jt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,c]=r;if(!c)throw new Error;const l=Number(c);if(`${l}`!==c)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function D2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const v7=ge("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=IH),jt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{D2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function b7(e){if(!C2.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return D2(n)}const S7=ge("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=C2),jt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{b7(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_7=ge("$ZodE164",(e,t)=>{t.pattern??(t.pattern=OH),jt.init(e,t)});function w7(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const E7=ge("$ZodJWT",(e,t)=>{jt.init(e,t),e._zod.check=n=>{w7(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),k2=ge("$ZodNumber",(e,t)=>{gn.init(e,t),e._zod.pattern=e._zod.bag.pattern??zH,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),n}}),x7=ge("$ZodNumberFormat",(e,t)=>{UH.init(e,t),k2.init(e,t)}),R7=ge("$ZodUnknown",(e,t)=>{gn.init(e,t),e._zod.parse=n=>n}),C7=ge("$ZodNever",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function _R(e,t,n){e.issues.length&&t.issues.push(...E2(n,e.issues)),t.value[n]=e.value}const T7=ge("$ZodArray",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const c=[];for(let l=0;l_R(h,n,l))):_R(d,n,l)}return c.length?Promise.all(c).then(()=>n):n}});function Ah(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...E2(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function P2(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=K9(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function N2(e,t,n,r,i,c){const l=[],f=i.keySet,d=i.catchall._zod,h=d.def.type,y=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){l.push(g);continue}const v=d.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(b=>Ah(b,n,g,t,y))):Ah(v,n,g,t,y)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:c}),e.length?Promise.all(e).then(()=>n):n}const A7=ge("$ZodObject",(e,t)=>{if(gn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Fb(()=>P2(t));Rt(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const y=f[h]._zod;if(y.values){d[h]??(d[h]=new Set);for(const g of y.values)d[h].add(g)}}return d});const i=Th,c=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=r.value);const h=f.value;if(!i(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const y=[],g=l.shape;for(const v of l.keys){const b=g[v],_=b._zod.optout==="optional",x=b._zod.run({value:h[v],issues:[]},d);x instanceof Promise?y.push(x.then(R=>Ah(R,f,v,h,_))):Ah(x,f,v,h,_)}return c?N2(y,h,f,d,r.value,e):y.length?Promise.all(y).then(()=>f):f}}),I7=ge("$ZodObjectJIT",(e,t)=>{A7.init(e,t);const n=e._zod.parse,r=Fb(()=>P2(t)),i=v=>{const b=new XH(["shape","payload","ctx"]),_=r.value,x=O=>{const D=bR(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const O of _.keys)R[O]=`key_${C++}`;b.write("const newResult = {};");for(const O of _.keys){const D=R[O],N=bR(O),B=v[O]?._zod?.optout==="optional";b.write(`const ${D} = ${x(O)};`),B?b.write(` +`))}}const b7={major:4,minor:3,patch:6},gn=ge("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=b7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const c of i._zod.onattach)c(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,f,d)=>{let h=$c(l),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=g._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Vc;if(y||b instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=$c(l,v)))});else{if(l.issues.length===v)continue;h||(h=$c(l,v))}}return y?y.then(()=>l):l},c=(l,f,d)=>{if($c(l))return l.aborted=!0,l;const h=i(f,r,d);if(h instanceof Promise){if(d.async===!1)throw new Vc;return h.then(y=>e._zod.parse(y,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(y=>c(y,l,f)):c(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Vc;return d.then(h=>i(h,r,f))}return i(d,r,f)}}Rt(e,"~standard",()=>({validate:i=>{try{const c=RH(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return CH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),hb=ge("$ZodString",(e,t)=>{gn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??t7(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ht=ge("$ZodStringFormat",(e,t)=>{Fp.init(e,t),hb.init(e,t)}),S7=ge("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=HH),Ht.init(e,t)}),_7=ge("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=sC(r))}else t.pattern??(t.pattern=sC());Ht.init(e,t)}),w7=ge("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=FH),Ht.init(e,t)}),E7=ge("$ZodURL",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),x7=ge("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=VH()),Ht.init(e,t)}),R7=ge("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=UH),Ht.init(e,t)}),C7=ge("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=NH),Ht.init(e,t)}),T7=ge("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=zH),Ht.init(e,t)}),A7=ge("$ZodULID",(e,t)=>{t.pattern??(t.pattern=LH),Ht.init(e,t)}),I7=ge("$ZodXID",(e,t)=>{t.pattern??(t.pattern=BH),Ht.init(e,t)}),O7=ge("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=$H),Ht.init(e,t)}),M7=ge("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=e7(t)),Ht.init(e,t)}),D7=ge("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=WH),Ht.init(e,t)}),k7=ge("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=JH(t)),Ht.init(e,t)}),P7=ge("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=jH),Ht.init(e,t)}),N7=ge("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=GH),Ht.init(e,t),e._zod.bag.format="ipv4"}),z7=ge("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=KH),Ht.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),L7=ge("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ZH),Ht.init(e,t)}),B7=ge("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=QH),Ht.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,c]=r;if(!c)throw new Error;const l=Number(c);if(`${l}`!==c)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function mO(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const $7=ge("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=YH),Ht.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{mO(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function U7(e){if(!lO.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return mO(n)}const j7=ge("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=lO),Ht.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{U7(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),H7=ge("$ZodE164",(e,t)=>{t.pattern??(t.pattern=XH),Ht.init(e,t)});function F7(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const q7=ge("$ZodJWT",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{F7(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),gO=ge("$ZodNumber",(e,t)=>{gn.init(e,t),e._zod.pattern=e._zod.bag.pattern??s7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),n}}),V7=ge("$ZodNumberFormat",(e,t)=>{a7.init(e,t),gO.init(e,t)}),G7=ge("$ZodUnknown",(e,t)=>{gn.init(e,t),e._zod.parse=n=>n}),K7=ge("$ZodNever",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function rC(e,t,n){e.issues.length&&t.issues.push(...iO(n,e.issues)),t.value[n]=e.value}const Z7=ge("$ZodArray",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const c=[];for(let l=0;lrC(h,n,l))):rC(d,n,l)}return c.length?Promise.all(c).then(()=>n):n}});function ip(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...iO(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function yO(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=pH(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function vO(e,t,n,r,i,c){const l=[],f=i.keySet,d=i.catchall._zod,h=d.def.type,y=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){l.push(g);continue}const v=d.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(b=>ip(b,n,g,t,y))):ip(v,n,g,t,y)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:c}),e.length?Promise.all(e).then(()=>n):n}const Q7=ge("$ZodObject",(e,t)=>{if(gn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=lb(()=>yO(t));Rt(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const y=f[h]._zod;if(y.values){d[h]??(d[h]=new Set);for(const g of y.values)d[h].add(g)}}return d});const i=op,c=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=r.value);const h=f.value;if(!i(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const y=[],g=l.shape;for(const v of l.keys){const b=g[v],_=b._zod.optout==="optional",x=b._zod.run({value:h[v],issues:[]},d);x instanceof Promise?y.push(x.then(R=>ip(R,f,v,h,_))):ip(x,f,v,h,_)}return c?vO(y,h,f,d,r.value,e):y.length?Promise.all(y).then(()=>f):f}}),Y7=ge("$ZodObjectJIT",(e,t)=>{Q7.init(e,t);const n=e._zod.parse,r=lb(()=>yO(t)),i=v=>{const b=new v7(["shape","payload","ctx"]),_=r.value,x=O=>{const D=nC(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const O of _.keys)R[O]=`key_${C++}`;b.write("const newResult = {};");for(const O of _.keys){const D=R[O],N=nC(O),B=v[O]?._zod?.optout==="optional";b.write(`const ${D} = ${x(O)};`),B?b.write(` if (${D}.issues.length) { if (${N} in input) { payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ @@ -54,28 +54,28 @@ Error generating stack: `+u.message+` newResult[${N}] = ${D}.value; } - `)}b.write("payload.value = newResult;"),b.write("return payload;");const A=b.compile();return(O,D)=>A(v,O,D)};let c;const l=Th,f=!b2.jitless,h=f&&V9.value,y=t.catchall;let g;e._zod.parse=(v,b)=>{g??(g=r.value);const _=v.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(c||(c=i(t.shape)),v=c(v,b),y?N2([],_,v,b,g,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),v)}});function wR(e,t,n,r){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!dc(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(c=>c.issues.map(l=>oa(l,r,ra())))}),t)}const O7=ge("$ZodUnion",(e,t)=>{gn.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>Vb(c.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(n)return r(i,c);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:i.value,issues:[]},c);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>wR(d,i,e,c)):wR(f,i,e,c)}}),M7=ge("$ZodIntersection",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,c=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return c instanceof Promise||l instanceof Promise?Promise.all([c,l]).then(([d,h])=>ER(n,d,h)):ER(n,c,l)}});function Qv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Eu(e)&&Eu(t)){const n=Object.keys(t),r=Object.keys(e).filter(c=>n.indexOf(c)!==-1),i={...e,...t};for(const c of r){const l=Qv(e[c],t[c]);if(!l.valid)return{valid:!1,mergeErrorPath:[c,...l.mergeErrorPath]};i[c]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;rf.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),dc(e))return e;const l=Qv(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const D7=ge("$ZodEnum",(e,t)=>{gn.init(e,t);const n=S2(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>G9.has(typeof i)).map(i=>typeof i=="string"?ip(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),k7=ge("$ZodTransform",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new v2(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new vc;return n.value=i,n}});function xR(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const z2=ge("$ZodOptional",(e,t)=>{gn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>xR(c,n.value)):xR(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),P7=ge("$ZodExactOptional",(e,t)=>{z2.init(e,t),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),N7=ge("$ZodNullable",(e,t)=>{gn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vb(n.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),z7=ge("$ZodDefault",(e,t)=>{gn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>RR(c,t)):RR(i,t)}});function RR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const L7=ge("$ZodPrefault",(e,t)=>{gn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),B7=ge("$ZodNonOptional",(e,t)=>{gn.init(e,t),Rt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>CR(c,e)):CR(i,e)}});function CR(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const $7=ge("$ZodCatch",(e,t)=>{gn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>(n.value=c.value,c.issues.length&&(n.value=t.catchValue({...n,error:{issues:c.issues.map(l=>oa(l,r,ra()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>oa(c,r,ra()))},input:n.value}),n.issues=[]),n)}}),U7=ge("$ZodPipe",(e,t)=>{gn.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const c=t.out._zod.run(n,r);return c instanceof Promise?c.then(l=>Ud(l,t.in,r)):Ud(c,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(c=>Ud(c,t.out,r)):Ud(i,t.out,r)}});function Ud(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const j7=ge("$ZodReadonly",(e,t)=>{gn.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>t.innerType?._zod?.optin),Rt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(TR):TR(i)}});function TR(e){return e.value=Object.freeze(e.value),e}const H7=ge("$ZodCustom",(e,t)=>{ps.init(e,t),gn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(c=>AR(c,n,r,e));AR(i,n,r,e)}});function AR(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(xu(i))}}var IR;class F7{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function q7(){return new F7}(IR=globalThis).__zod_globalRegistry??(IR.__zod_globalRegistry=q7());const nu=globalThis.__zod_globalRegistry;function V7(e,t){return new e({type:"string",...$e(t)})}function G7(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function OR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function K7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function Z7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function Q7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function Y7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function X7(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function W7(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function J7(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function eF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function tF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function nF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function sF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function rF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function oF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function iF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function aF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function cF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function lF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function uF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function fF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function dF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function hF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function pF(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function mF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function gF(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function yF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function vF(e){return new e({type:"unknown"})}function bF(e,t){return new e({type:"never",...$e(t)})}function MR(e,t){return new O2({check:"less_than",...$e(t),value:e,inclusive:!1})}function $y(e,t){return new O2({check:"less_than",...$e(t),value:e,inclusive:!0})}function DR(e,t){return new M2({check:"greater_than",...$e(t),value:e,inclusive:!1})}function Uy(e,t){return new M2({check:"greater_than",...$e(t),value:e,inclusive:!0})}function kR(e,t){return new $H({check:"multiple_of",...$e(t),value:e})}function L2(e,t){return new jH({check:"max_length",...$e(t),maximum:e})}function Ih(e,t){return new HH({check:"min_length",...$e(t),minimum:e})}function B2(e,t){return new FH({check:"length_equals",...$e(t),length:e})}function SF(e,t){return new qH({check:"string_format",format:"regex",...$e(t),pattern:e})}function _F(e){return new VH({check:"string_format",format:"lowercase",...$e(e)})}function wF(e){return new GH({check:"string_format",format:"uppercase",...$e(e)})}function EF(e,t){return new KH({check:"string_format",format:"includes",...$e(t),includes:e})}function xF(e,t){return new ZH({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function RF(e,t){return new QH({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function Nc(e){return new YH({check:"overwrite",tx:e})}function CF(e){return Nc(t=>t.normalize(e))}function TF(){return Nc(e=>e.trim())}function AF(){return Nc(e=>e.toLowerCase())}function IF(){return Nc(e=>e.toUpperCase())}function OF(){return Nc(e=>q9(e))}function MF(e,t,n){return new e({type:"array",element:t,...$e(n)})}function DF(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function kF(e){const t=PF(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(xu(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(xu(i))}},e(n.value,n)));return t}function PF(e,t){const n=new ps({check:"custom",...$e(t)});return n._zod.check=e,n}function $2(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??nu,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $n(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,n.schemaPath.includes(e)&&(c.cycle=n.path),c.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,y);else{const v=l.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,v,y)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),$n(g,t,y),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&Wn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function U2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=r.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,l[0])}}const i=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(l[0])?.id,v=e.external.uri??(_=>_);if(g)return{ref:v(g)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,y=l[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:h+y}},c=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=i(l);f.def={...f.schema},h&&(f.defId=h);const y=f.schema;for(const g in y)delete y[g];y.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ + `)}b.write("payload.value = newResult;"),b.write("return payload;");const A=b.compile();return(O,D)=>A(v,O,D)};let c;const l=op,f=!nO.jitless,h=f&&dH.value,y=t.catchall;let g;e._zod.parse=(v,b)=>{g??(g=r.value);const _=v.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(c||(c=i(t.shape)),v=c(v,b),y?vO([],_,v,b,g,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),v)}});function oC(e,t,n,r){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!$c(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(c=>c.issues.map(l=>Ma(l,r,Oa())))}),t)}const X7=ge("$ZodUnion",(e,t)=>{gn.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>fb(c.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(n)return r(i,c);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:i.value,issues:[]},c);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>oC(d,i,e,c)):oC(f,i,e,c)}}),W7=ge("$ZodIntersection",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,c=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return c instanceof Promise||l instanceof Promise?Promise.all([c,l]).then(([d,h])=>iC(n,d,h)):iC(n,c,l)}});function gv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(rf(e)&&rf(t)){const n=Object.keys(t),r=Object.keys(e).filter(c=>n.indexOf(c)!==-1),i={...e,...t};for(const c of r){const l=gv(e[c],t[c]);if(!l.valid)return{valid:!1,mergeErrorPath:[c,...l.mergeErrorPath]};i[c]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;rf.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),$c(e))return e;const l=gv(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const J7=ge("$ZodEnum",(e,t)=>{gn.init(e,t);const n=sO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>hH.has(typeof i)).map(i=>typeof i=="string"?Lp(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),eF=ge("$ZodTransform",(e,t)=>{gn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new tO(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Vc;return n.value=i,n}});function aC(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const bO=ge("$ZodOptional",(e,t)=>{gn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${fb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>aC(c,n.value)):aC(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),tF=ge("$ZodExactOptional",(e,t)=>{bO.init(e,t),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),nF=ge("$ZodNullable",(e,t)=>{gn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${fb(n.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),sF=ge("$ZodDefault",(e,t)=>{gn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>cC(c,t)):cC(i,t)}});function cC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const rF=ge("$ZodPrefault",(e,t)=>{gn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),oF=ge("$ZodNonOptional",(e,t)=>{gn.init(e,t),Rt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>lC(c,e)):lC(i,e)}});function lC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const iF=ge("$ZodCatch",(e,t)=>{gn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>(n.value=c.value,c.issues.length&&(n.value=t.catchValue({...n,error:{issues:c.issues.map(l=>Ma(l,r,Oa()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>Ma(c,r,Oa()))},input:n.value}),n.issues=[]),n)}}),aF=ge("$ZodPipe",(e,t)=>{gn.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const c=t.out._zod.run(n,r);return c instanceof Promise?c.then(l=>vh(l,t.in,r)):vh(c,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(c=>vh(c,t.out,r)):vh(i,t.out,r)}});function vh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const cF=ge("$ZodReadonly",(e,t)=>{gn.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>t.innerType?._zod?.optin),Rt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(uC):uC(i)}});function uC(e){return e.value=Object.freeze(e.value),e}const lF=ge("$ZodCustom",(e,t)=>{gs.init(e,t),gn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(c=>fC(c,n,r,e));fC(i,n,r,e)}});function fC(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(of(i))}}var dC;class uF{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function fF(){return new uF}(dC=globalThis).__zod_globalRegistry??(dC.__zod_globalRegistry=fF());const Lu=globalThis.__zod_globalRegistry;function dF(e,t){return new e({type:"string",...$e(t)})}function hF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function hC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function pF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function mF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function gF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function yF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function vF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function bF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function SF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function _F(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function wF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function EF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function xF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function RF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function CF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function TF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function AF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function IF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function OF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function MF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function DF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function kF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function PF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function NF(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function zF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function LF(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function BF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function $F(e){return new e({type:"unknown"})}function UF(e,t){return new e({type:"never",...$e(t)})}function pC(e,t){return new hO({check:"less_than",...$e(t),value:e,inclusive:!1})}function i0(e,t){return new hO({check:"less_than",...$e(t),value:e,inclusive:!0})}function mC(e,t){return new pO({check:"greater_than",...$e(t),value:e,inclusive:!1})}function a0(e,t){return new pO({check:"greater_than",...$e(t),value:e,inclusive:!0})}function gC(e,t){return new i7({check:"multiple_of",...$e(t),value:e})}function SO(e,t){return new c7({check:"max_length",...$e(t),maximum:e})}function ap(e,t){return new l7({check:"min_length",...$e(t),minimum:e})}function _O(e,t){return new u7({check:"length_equals",...$e(t),length:e})}function jF(e,t){return new f7({check:"string_format",format:"regex",...$e(t),pattern:e})}function HF(e){return new d7({check:"string_format",format:"lowercase",...$e(e)})}function FF(e){return new h7({check:"string_format",format:"uppercase",...$e(e)})}function qF(e,t){return new p7({check:"string_format",format:"includes",...$e(t),includes:e})}function VF(e,t){return new m7({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function GF(e,t){return new g7({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function ll(e){return new y7({check:"overwrite",tx:e})}function KF(e){return ll(t=>t.normalize(e))}function ZF(){return ll(e=>e.trim())}function QF(){return ll(e=>e.toLowerCase())}function YF(){return ll(e=>e.toUpperCase())}function XF(){return ll(e=>fH(e))}function WF(e,t,n){return new e({type:"array",element:t,...$e(n)})}function JF(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function eq(e){const t=tq(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(of(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(of(i))}},e(n.value,n)));return t}function tq(e,t){const n=new gs({check:"custom",...$e(t)});return n._zod.check=e,n}function wO(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Lu,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $n(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,n.schemaPath.includes(e)&&(c.cycle=n.path),c.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,y);else{const v=l.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,v,y)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),$n(g,t,y),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&Wn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function EO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=r.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,l[0])}}const i=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(l[0])?.id,v=e.external.uri??(_=>_);if(g)return{ref:v(g)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,y=l[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:h+y}},c=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=i(l);f.def={...f.schema},h&&(f.defId=h);const y=f.schema;for(const g in y)delete y[g];y.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){c(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){c(l);continue}}if(e.metadataRegistry.get(l[0])?.id){c(l);continue}if(f.cycle){c(l);continue}if(f.count>1&&e.reused==="ref"){c(l);continue}}}function j2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},y=f.ref;if(f.ref=null,y){r(y);const v=e.seen.get(y),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===y)for(const x in d)x==="$ref"||x==="allOf"||x in h||delete d[x];if(b.$ref&&v.def)for(const x in d)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(d[x])===JSON.stringify(v.def[x])&&delete d[x]}const g=l._zod.parent;if(g&&g!==y){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const c=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Oh(t,"input",e.processors),output:Oh(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Wn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Wn(r.element,n);if(r.type==="set")return Wn(r.valueType,n);if(r.type==="lazy")return Wn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Wn(r.innerType,n);if(r.type==="intersection")return Wn(r.left,n)||Wn(r.right,n);if(r.type==="record"||r.type==="map")return Wn(r.keyType,n)||Wn(r.valueType,n);if(r.type==="pipe")return Wn(r.in,n)||Wn(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Wn(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Wn(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Wn(i,n))return!0;return!!(r.rest&&Wn(r.rest,n))}return!1}const NF=(e,t={})=>n=>{const r=$2({...n,processors:t});return $n(e,r),U2(r,e),j2(r,e)},Oh=(e,t,n={})=>r=>{const{libraryOptions:i,target:c}=r??{},l=$2({...i??{},target:c,io:t,processors:n});return $n(e,l),U2(l,e),j2(l,e)},zF={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},LF=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:c,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof l=="number"&&(i.maxLength=l),f&&(i.format=zF[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),h&&(i.contentEncoding=h),d&&d.size>0){const y=[...d];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},BF=(e,t,n,r)=>{const i=n,{minimum:c,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof l=="number"&&(i.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},$F=(e,t,n,r)=>{n.not={}},UF=(e,t,n,r)=>{},jF=(e,t,n,r)=>{const i=e._zod.def,c=S2(i.entries);c.every(l=>typeof l=="number")&&(n.type="number"),c.every(l=>typeof l=="string")&&(n.type="string"),n.enum=c},HF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},FF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},qF=(e,t,n,r)=>{const i=n,c=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=$n(c.element,t,{...r,path:[...r.path,"items"]})},VF=(e,t,n,r)=>{const i=n,c=e._zod.def;i.type="object",i.properties={};const l=c.shape;for(const h in l)i.properties[h]=$n(l[h],t,{...r,path:[...r.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const y=c.shape[h]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));d.size>0&&(i.required=Array.from(d)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=$n(c.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},GF=(e,t,n,r)=>{const i=e._zod.def,c=i.inclusive===!1,l=i.options.map((f,d)=>$n(f,t,{...r,path:[...r.path,c?"oneOf":"anyOf",d]}));c?n.oneOf=l:n.anyOf=l},KF=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=$n(i.right,t,{...r,path:[...r.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(c)?c.allOf:[c],...f(l)?l.allOf:[l]];n.allOf=d},ZF=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[c,{type:"null"}]},QF=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},YF=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},XF=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},WF=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},JF=(e,t,n,r)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;$n(c,t,r);const l=t.seen.get(e);l.ref=c},eq=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.readOnly=!0},H2=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},tq=ge("ZodISODateTime",(e,t)=>{u7.init(e,t),Gt.init(e,t)});function nq(e){return hF(tq,e)}const sq=ge("ZodISODate",(e,t)=>{f7.init(e,t),Gt.init(e,t)});function rq(e){return pF(sq,e)}const oq=ge("ZodISOTime",(e,t)=>{d7.init(e,t),Gt.init(e,t)});function iq(e){return mF(oq,e)}const aq=ge("ZodISODuration",(e,t)=>{h7.init(e,t),Gt.init(e,t)});function cq(e){return gF(aq,e)}const lq=(e,t)=>{R2.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sH(e,n)},flatten:{value:n=>nH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Zv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Zv,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=ge("ZodError",lq,{Parent:Error}),uq=cp(ar),fq=lp(ar),dq=up(ar),hq=fp(ar),pq=iH(ar),mq=aH(ar),gq=cH(ar),yq=lH(ar),vq=uH(ar),bq=fH(ar),Sq=dH(ar),_q=hH(ar),yn=ge("ZodType",(e,t)=>(gn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Oh(e,"input"),output:Oh(e,"output")}}),e.toJSONSchema=NF(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(yi(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>vi(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>uq(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>dq(e,n,r),e.parseAsync=async(n,r)=>fq(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>hq(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>pq(e,n,r),e.decode=(n,r)=>mq(e,n,r),e.encodeAsync=async(n,r)=>gq(e,n,r),e.decodeAsync=async(n,r)=>yq(e,n,r),e.safeEncode=(n,r)=>vq(e,n,r),e.safeDecode=(n,r)=>bq(e,n,r),e.safeEncodeAsync=async(n,r)=>Sq(e,n,r),e.safeDecodeAsync=async(n,r)=>_q(e,n,r),e.refine=(n,r)=>e.check(mV(n,r)),e.superRefine=n=>e.check(gV(n)),e.overwrite=n=>e.check(Nc(n)),e.optional=()=>zR(e),e.exactOptional=()=>nV(e),e.nullable=()=>LR(e),e.nullish=()=>zR(LR(e)),e.nonoptional=n=>cV(e,n),e.array=()=>Gq(e),e.or=n=>Qq([e,n]),e.and=n=>Xq(e,n),e.transform=n=>BR(e,eV(n)),e.default=n=>oV(e,n),e.prefault=n=>aV(e,n),e.catch=n=>uV(e,n),e.pipe=n=>BR(e,n),e.readonly=()=>hV(e),e.describe=n=>{const r=e.clone();return nu.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return nu.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return nu.get(e);const r=e.clone();return nu.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),F2=ge("_ZodString",(e,t)=>{Kb.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>LF(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(SF(...r)),e.includes=(...r)=>e.check(EF(...r)),e.startsWith=(...r)=>e.check(xF(...r)),e.endsWith=(...r)=>e.check(RF(...r)),e.min=(...r)=>e.check(Ih(...r)),e.max=(...r)=>e.check(L2(...r)),e.length=(...r)=>e.check(B2(...r)),e.nonempty=(...r)=>e.check(Ih(1,...r)),e.lowercase=r=>e.check(_F(r)),e.uppercase=r=>e.check(wF(r)),e.trim=()=>e.check(TF()),e.normalize=(...r)=>e.check(CF(...r)),e.toLowerCase=()=>e.check(AF()),e.toUpperCase=()=>e.check(IF()),e.slugify=()=>e.check(OF())}),wq=ge("ZodString",(e,t)=>{Kb.init(e,t),F2.init(e,t),e.email=n=>e.check(G7(Eq,n)),e.url=n=>e.check(X7(xq,n)),e.jwt=n=>e.check(dF($q,n)),e.emoji=n=>e.check(W7(Rq,n)),e.guid=n=>e.check(OR(PR,n)),e.uuid=n=>e.check(K7(jd,n)),e.uuidv4=n=>e.check(Z7(jd,n)),e.uuidv6=n=>e.check(Q7(jd,n)),e.uuidv7=n=>e.check(Y7(jd,n)),e.nanoid=n=>e.check(J7(Cq,n)),e.guid=n=>e.check(OR(PR,n)),e.cuid=n=>e.check(eF(Tq,n)),e.cuid2=n=>e.check(tF(Aq,n)),e.ulid=n=>e.check(nF(Iq,n)),e.base64=n=>e.check(lF(zq,n)),e.base64url=n=>e.check(uF(Lq,n)),e.xid=n=>e.check(sF(Oq,n)),e.ksuid=n=>e.check(rF(Mq,n)),e.ipv4=n=>e.check(oF(Dq,n)),e.ipv6=n=>e.check(iF(kq,n)),e.cidrv4=n=>e.check(aF(Pq,n)),e.cidrv6=n=>e.check(cF(Nq,n)),e.e164=n=>e.check(fF(Bq,n)),e.datetime=n=>e.check(nq(n)),e.date=n=>e.check(rq(n)),e.time=n=>e.check(iq(n)),e.duration=n=>e.check(cq(n))});function ci(e){return V7(wq,e)}const Gt=ge("ZodStringFormat",(e,t)=>{jt.init(e,t),F2.init(e,t)}),Eq=ge("ZodEmail",(e,t)=>{t7.init(e,t),Gt.init(e,t)}),PR=ge("ZodGUID",(e,t)=>{JH.init(e,t),Gt.init(e,t)}),jd=ge("ZodUUID",(e,t)=>{e7.init(e,t),Gt.init(e,t)}),xq=ge("ZodURL",(e,t)=>{n7.init(e,t),Gt.init(e,t)}),Rq=ge("ZodEmoji",(e,t)=>{s7.init(e,t),Gt.init(e,t)}),Cq=ge("ZodNanoID",(e,t)=>{r7.init(e,t),Gt.init(e,t)}),Tq=ge("ZodCUID",(e,t)=>{o7.init(e,t),Gt.init(e,t)}),Aq=ge("ZodCUID2",(e,t)=>{i7.init(e,t),Gt.init(e,t)}),Iq=ge("ZodULID",(e,t)=>{a7.init(e,t),Gt.init(e,t)}),Oq=ge("ZodXID",(e,t)=>{c7.init(e,t),Gt.init(e,t)}),Mq=ge("ZodKSUID",(e,t)=>{l7.init(e,t),Gt.init(e,t)}),Dq=ge("ZodIPv4",(e,t)=>{p7.init(e,t),Gt.init(e,t)}),kq=ge("ZodIPv6",(e,t)=>{m7.init(e,t),Gt.init(e,t)}),Pq=ge("ZodCIDRv4",(e,t)=>{g7.init(e,t),Gt.init(e,t)}),Nq=ge("ZodCIDRv6",(e,t)=>{y7.init(e,t),Gt.init(e,t)}),zq=ge("ZodBase64",(e,t)=>{v7.init(e,t),Gt.init(e,t)}),Lq=ge("ZodBase64URL",(e,t)=>{S7.init(e,t),Gt.init(e,t)}),Bq=ge("ZodE164",(e,t)=>{_7.init(e,t),Gt.init(e,t)}),$q=ge("ZodJWT",(e,t)=>{E7.init(e,t),Gt.init(e,t)}),Uq=ge("ZodNumber",(e,t)=>{k2.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>BF(e,r,i),e.gt=(r,i)=>e.check(DR(r,i)),e.gte=(r,i)=>e.check(Uy(r,i)),e.min=(r,i)=>e.check(Uy(r,i)),e.lt=(r,i)=>e.check(MR(r,i)),e.lte=(r,i)=>e.check($y(r,i)),e.max=(r,i)=>e.check($y(r,i)),e.int=r=>e.check(Yv(r)),e.safe=r=>e.check(Yv(r)),e.positive=r=>e.check(DR(0,r)),e.nonnegative=r=>e.check(Uy(0,r)),e.negative=r=>e.check(MR(0,r)),e.nonpositive=r=>e.check($y(0,r)),e.multipleOf=(r,i)=>e.check(kR(r,i)),e.step=(r,i)=>e.check(kR(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),jq=ge("ZodNumberFormat",(e,t)=>{x7.init(e,t),Uq.init(e,t)});function Yv(e){return yF(jq,e)}const Hq=ge("ZodUnknown",(e,t)=>{R7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>UF()});function NR(){return vF(Hq)}const Fq=ge("ZodNever",(e,t)=>{C7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$F(e,n,r)});function qq(e){return bF(Fq,e)}const Vq=ge("ZodArray",(e,t)=>{T7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>qF(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Ih(n,r)),e.nonempty=n=>e.check(Ih(1,n)),e.max=(n,r)=>e.check(L2(n,r)),e.length=(n,r)=>e.check(B2(n,r)),e.unwrap=()=>e.element});function Gq(e,t){return MF(Vq,e,t)}const Kq=ge("ZodObject",(e,t)=>{I7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>VF(e,n,r,i),Rt(e,"shape",()=>t.shape),e.keyof=()=>Wq(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:NR()}),e.loose=()=>e.clone({...e._zod.def,catchall:NR()}),e.strict=()=>e.clone({...e._zod.def,catchall:qq()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>X9(e,n),e.safeExtend=n=>W9(e,n),e.merge=n=>J9(e,n),e.pick=n=>Q9(e,n),e.omit=n=>Y9(e,n),e.partial=(...n)=>eH(q2,e,n[0]),e.required=(...n)=>tH(V2,e,n[0])});function hp(e,t){const n={type:"object",shape:e??{},...$e(t)};return new Kq(n)}const Zq=ge("ZodUnion",(e,t)=>{O7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>GF(e,n,r,i),e.options=t.options});function Qq(e,t){return new Zq({type:"union",options:e,...$e(t)})}const Yq=ge("ZodIntersection",(e,t)=>{M7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>KF(e,n,r,i)});function Xq(e,t){return new Yq({type:"intersection",left:e,right:t})}const Xv=ge("ZodEnum",(e,t)=>{D7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>jF(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const c={};for(const l of r)if(n.has(l))c[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Xv({...t,checks:[],...$e(i),entries:c})},e.exclude=(r,i)=>{const c={...t.entries};for(const l of r)if(n.has(l))delete c[l];else throw new Error(`Key ${l} not found in enum`);return new Xv({...t,checks:[],...$e(i),entries:c})}});function Wq(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Xv({type:"enum",entries:n,...$e(t)})}const Jq=ge("ZodTransform",(e,t)=>{k7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>FF(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new v2(e.constructor.name);n.addIssue=c=>{if(typeof c=="string")n.issues.push(xu(c,n.value,t));else{const l=c;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(xu(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(c=>(n.value=c,n)):(n.value=i,n)}});function eV(e){return new Jq({type:"transform",transform:e})}const q2=ge("ZodOptional",(e,t)=>{z2.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>H2(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function zR(e){return new q2({type:"optional",innerType:e})}const tV=ge("ZodExactOptional",(e,t)=>{P7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>H2(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function nV(e){return new tV({type:"optional",innerType:e})}const sV=ge("ZodNullable",(e,t)=>{N7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ZF(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function LR(e){return new sV({type:"nullable",innerType:e})}const rV=ge("ZodDefault",(e,t)=>{z7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>YF(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function oV(e,t){return new rV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():w2(t)}})}const iV=ge("ZodPrefault",(e,t)=>{L7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>XF(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function aV(e,t){return new iV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():w2(t)}})}const V2=ge("ZodNonOptional",(e,t)=>{B7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>QF(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function cV(e,t){return new V2({type:"nonoptional",innerType:e,...$e(t)})}const lV=ge("ZodCatch",(e,t)=>{$7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>WF(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uV(e,t){return new lV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const fV=ge("ZodPipe",(e,t)=>{U7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>JF(e,n,r,i),e.in=t.in,e.out=t.out});function BR(e,t){return new fV({type:"pipe",in:e,out:t})}const dV=ge("ZodReadonly",(e,t)=>{j7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>eq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function hV(e){return new dV({type:"readonly",innerType:e})}const pV=ge("ZodCustom",(e,t)=>{H7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>HF(e,n)});function mV(e,t={}){return DF(pV,e,t)}function gV(e){return kF(e)}const Zb="hive:v1:aws-credentials",yV=hp({accessKeyId:ci().min(16,"Access Key ID must be at least 16 characters"),secretAccessKey:ci().min(1,"Secret Access Key is required")});let oo;function pp(){if(oo!==void 0)return oo;try{const e=localStorage.getItem(Zb);if(!e)return oo=null,null;const t=JSON.parse(e),n=yV.safeParse(t);return oo=n.success?n.data:null,oo}catch{return oo=null,null}}function Uge(e){try{localStorage.setItem(Zb,JSON.stringify(e)),oo=e}catch{oo=e}}function vV(){try{localStorage.removeItem(Zb)}catch{}oo=null}const G2=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),K2=e=>({httpHandler:e.httpHandler()});var Ru;(function(e){e.HTTP="http",e.HTTPS="https"})(Ru||(Ru={}));var Mh;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(Mh||(Mh={}));const Wv="__smithy_context";class On{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new On({...t,headers:{...t.headers}});return n.query&&(n.query=bV(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return On.clone(this)}}function bV(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class ia{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const SV=e=>t=>async n=>{if(!On.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let c=r.hostname;r.port!=null&&(c+=`:${r.port}`),r.headers.host=c}return t(n)},_V={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Z2=e=>({applyToStack:t=>{t.add(SV(e),_V)}}),wV=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:h}=f,y=d??t.inputFilterSensitiveLog,g=h??t.outputFilterSensitiveLog,{$metadata:v,...b}=r.output;return l?.info?.({clientName:i,commandName:c,input:y(n.input),output:g(b),metadata:v}),r}catch(r){const{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d}=f,h=d??t.inputFilterSensitiveLog;throw l?.error?.({clientName:i,commandName:c,input:h(n.input),error:r,metadata:r.$metadata}),r}},EV={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Q2=e=>({applyToStack:t=>{t.add(wV(),EV)}}),xV={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},RV=()=>e=>async t=>e(t),Y2=e=>({applyToStack:t=>{t.add(RV(),xV)}}),yo=e=>e[Wv]||(e[Wv]={}),Ds=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},CV=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const i of e)i.schemeId.split("#")[1]===r&&n.push(i);for(const r of e)n.find(({schemeId:i})=>i===r.schemeId)||n.push(r);return n};function TV(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const AV=(e,t)=>(n,r)=>async i=>{const c=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),l=e.authSchemePreference?await e.authSchemePreference():[],f=CV(c,l),d=TV(e.httpAuthSchemes),h=yo(r),y=[];for(const g of f){const v=d.get(g.schemeId);if(!v){y.push(`HttpAuthScheme \`${g.schemeId}\` was not enabled for this service.`);continue}const b=v.identityProvider(await t.identityProviderConfigProvider(e));if(!b){y.push(`HttpAuthScheme \`${g.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:_={},signingProperties:x={}}=g.propertiesExtractor?.(e,r)||{};g.identityProperties=Object.assign(g.identityProperties||{},_),g.signingProperties=Object.assign(g.signingProperties||{},x),h.selectedHttpAuthScheme={httpAuthOption:g,identity:await b(g.identityProperties),signer:v.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(y.join(` -`));return n(i)},IV={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},X2=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(AV(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),IV)}}),OV={name:"serializerMiddleware"},MV=e=>t=>{throw t},DV=(e,t)=>{},kV=e=>(t,n)=>async r=>{if(!On.isInstance(r.request))return t(r);const c=yo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c,h=await t({...r,request:await d.sign(r.request,f,l)}).catch((d.errorHandler||MV)(l));return(d.successHandler||DV)(h.response,l),h},W2={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},J2=e=>({applyToStack:t=>{t.addRelativeTo(kV(),W2)}}),bc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},eO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$R=Object.entries(eO).reduce((e,[t,n])=>(e[n]=Number(t),e),{}),PV=eO.split(""),Sc=6,lu=8,NV=63,aa=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i>=Sc;const f=i/4*3;c>>=l%lu;const d=Math.floor(l/lu);for(let h=0;h>y)}}return new Uint8Array(n)},mo=e=>new TextEncoder().encode(e),Cu=e=>typeof e=="string"?mo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ha=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function di(e){let t;typeof e=="string"?t=mo(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let c=0;c>y]}i+="==".slice(0,4-d)}return i}class Ji extends Uint8Array{static fromString(t,n="utf-8"){if(typeof t=="string")return n==="base64"?Ji.mutate(aa(t)):Ji.mutate(mo(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Ji.prototype),t}transformToString(t="utf-8"){return t==="base64"?di(this):ha(this)}}const UR=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),zV=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:l}=t,f=n!==void 0&&r!==void 0&&i!==void 0&&c!==void 0&&l!==void 0,d=f?l(i,e):void 0,h=e.getReader();return new ReadableStream({async pull(y){const{value:g,done:v}=await h.read();if(v){if(y.enqueue(`0\r +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){c(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){c(l);continue}}if(e.metadataRegistry.get(l[0])?.id){c(l);continue}if(f.cycle){c(l);continue}if(f.count>1&&e.reused==="ref"){c(l);continue}}}function xO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},y=f.ref;if(f.ref=null,y){r(y);const v=e.seen.get(y),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===y)for(const x in d)x==="$ref"||x==="allOf"||x in h||delete d[x];if(b.$ref&&v.def)for(const x in d)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(d[x])===JSON.stringify(v.def[x])&&delete d[x]}const g=l._zod.parent;if(g&&g!==y){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const c=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:cp(t,"input",e.processors),output:cp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Wn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Wn(r.element,n);if(r.type==="set")return Wn(r.valueType,n);if(r.type==="lazy")return Wn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Wn(r.innerType,n);if(r.type==="intersection")return Wn(r.left,n)||Wn(r.right,n);if(r.type==="record"||r.type==="map")return Wn(r.keyType,n)||Wn(r.valueType,n);if(r.type==="pipe")return Wn(r.in,n)||Wn(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Wn(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Wn(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Wn(i,n))return!0;return!!(r.rest&&Wn(r.rest,n))}return!1}const nq=(e,t={})=>n=>{const r=wO({...n,processors:t});return $n(e,r),EO(r,e),xO(r,e)},cp=(e,t,n={})=>r=>{const{libraryOptions:i,target:c}=r??{},l=wO({...i??{},target:c,io:t,processors:n});return $n(e,l),EO(l,e),xO(l,e)},sq={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rq=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:c,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof l=="number"&&(i.maxLength=l),f&&(i.format=sq[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),h&&(i.contentEncoding=h),d&&d.size>0){const y=[...d];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},oq=(e,t,n,r)=>{const i=n,{minimum:c,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof l=="number"&&(i.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},iq=(e,t,n,r)=>{n.not={}},aq=(e,t,n,r)=>{},cq=(e,t,n,r)=>{const i=e._zod.def,c=sO(i.entries);c.every(l=>typeof l=="number")&&(n.type="number"),c.every(l=>typeof l=="string")&&(n.type="string"),n.enum=c},lq=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},uq=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},fq=(e,t,n,r)=>{const i=n,c=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=$n(c.element,t,{...r,path:[...r.path,"items"]})},dq=(e,t,n,r)=>{const i=n,c=e._zod.def;i.type="object",i.properties={};const l=c.shape;for(const h in l)i.properties[h]=$n(l[h],t,{...r,path:[...r.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const y=c.shape[h]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));d.size>0&&(i.required=Array.from(d)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=$n(c.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},hq=(e,t,n,r)=>{const i=e._zod.def,c=i.inclusive===!1,l=i.options.map((f,d)=>$n(f,t,{...r,path:[...r.path,c?"oneOf":"anyOf",d]}));c?n.oneOf=l:n.anyOf=l},pq=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=$n(i.right,t,{...r,path:[...r.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(c)?c.allOf:[c],...f(l)?l.allOf:[l]];n.allOf=d},mq=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[c,{type:"null"}]},gq=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},yq=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},vq=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},bq=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},Sq=(e,t,n,r)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;$n(c,t,r);const l=t.seen.get(e);l.ref=c},_q=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.readOnly=!0},RO=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},wq=ge("ZodISODateTime",(e,t)=>{M7.init(e,t),Kt.init(e,t)});function Eq(e){return PF(wq,e)}const xq=ge("ZodISODate",(e,t)=>{D7.init(e,t),Kt.init(e,t)});function Rq(e){return NF(xq,e)}const Cq=ge("ZodISOTime",(e,t)=>{k7.init(e,t),Kt.init(e,t)});function Tq(e){return zF(Cq,e)}const Aq=ge("ZodISODuration",(e,t)=>{P7.init(e,t),Kt.init(e,t)});function Iq(e){return LF(Aq,e)}const Oq=(e,t)=>{cO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>xH(e,n)},flatten:{value:n=>EH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,mv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,mv,2)}},isEmpty:{get(){return e.issues.length===0}}})},lr=ge("ZodError",Oq,{Parent:Error}),Mq=$p(lr),Dq=Up(lr),kq=jp(lr),Pq=Hp(lr),Nq=TH(lr),zq=AH(lr),Lq=IH(lr),Bq=OH(lr),$q=MH(lr),Uq=DH(lr),jq=kH(lr),Hq=PH(lr),yn=ge("ZodType",(e,t)=>(gn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:cp(e,"input"),output:cp(e,"output")}}),e.toJSONSchema=nq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Di(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>ki(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Mq(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>kq(e,n,r),e.parseAsync=async(n,r)=>Dq(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Pq(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Nq(e,n,r),e.decode=(n,r)=>zq(e,n,r),e.encodeAsync=async(n,r)=>Lq(e,n,r),e.decodeAsync=async(n,r)=>Bq(e,n,r),e.safeEncode=(n,r)=>$q(e,n,r),e.safeDecode=(n,r)=>Uq(e,n,r),e.safeEncodeAsync=async(n,r)=>jq(e,n,r),e.safeDecodeAsync=async(n,r)=>Hq(e,n,r),e.refine=(n,r)=>e.check(zV(n,r)),e.superRefine=n=>e.check(LV(n)),e.overwrite=n=>e.check(ll(n)),e.optional=()=>bC(e),e.exactOptional=()=>EV(e),e.nullable=()=>SC(e),e.nullish=()=>bC(SC(e)),e.nonoptional=n=>IV(e,n),e.array=()=>hV(e),e.or=n=>gV([e,n]),e.and=n=>vV(e,n),e.transform=n=>_C(e,_V(n)),e.default=n=>CV(e,n),e.prefault=n=>AV(e,n),e.catch=n=>MV(e,n),e.pipe=n=>_C(e,n),e.readonly=()=>PV(e),e.describe=n=>{const r=e.clone();return Lu.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Lu.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Lu.get(e);const r=e.clone();return Lu.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),CO=ge("_ZodString",(e,t)=>{hb.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>rq(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(jF(...r)),e.includes=(...r)=>e.check(qF(...r)),e.startsWith=(...r)=>e.check(VF(...r)),e.endsWith=(...r)=>e.check(GF(...r)),e.min=(...r)=>e.check(ap(...r)),e.max=(...r)=>e.check(SO(...r)),e.length=(...r)=>e.check(_O(...r)),e.nonempty=(...r)=>e.check(ap(1,...r)),e.lowercase=r=>e.check(HF(r)),e.uppercase=r=>e.check(FF(r)),e.trim=()=>e.check(ZF()),e.normalize=(...r)=>e.check(KF(...r)),e.toLowerCase=()=>e.check(QF()),e.toUpperCase=()=>e.check(YF()),e.slugify=()=>e.check(XF())}),Fq=ge("ZodString",(e,t)=>{hb.init(e,t),CO.init(e,t),e.email=n=>e.check(hF(qq,n)),e.url=n=>e.check(vF(Vq,n)),e.jwt=n=>e.check(kF(iV,n)),e.emoji=n=>e.check(bF(Gq,n)),e.guid=n=>e.check(hC(yC,n)),e.uuid=n=>e.check(pF(bh,n)),e.uuidv4=n=>e.check(mF(bh,n)),e.uuidv6=n=>e.check(gF(bh,n)),e.uuidv7=n=>e.check(yF(bh,n)),e.nanoid=n=>e.check(SF(Kq,n)),e.guid=n=>e.check(hC(yC,n)),e.cuid=n=>e.check(_F(Zq,n)),e.cuid2=n=>e.check(wF(Qq,n)),e.ulid=n=>e.check(EF(Yq,n)),e.base64=n=>e.check(OF(sV,n)),e.base64url=n=>e.check(MF(rV,n)),e.xid=n=>e.check(xF(Xq,n)),e.ksuid=n=>e.check(RF(Wq,n)),e.ipv4=n=>e.check(CF(Jq,n)),e.ipv6=n=>e.check(TF(eV,n)),e.cidrv4=n=>e.check(AF(tV,n)),e.cidrv6=n=>e.check(IF(nV,n)),e.e164=n=>e.check(DF(oV,n)),e.datetime=n=>e.check(Eq(n)),e.date=n=>e.check(Rq(n)),e.time=n=>e.check(Tq(n)),e.duration=n=>e.check(Iq(n))});function Ei(e){return dF(Fq,e)}const Kt=ge("ZodStringFormat",(e,t)=>{Ht.init(e,t),CO.init(e,t)}),qq=ge("ZodEmail",(e,t)=>{w7.init(e,t),Kt.init(e,t)}),yC=ge("ZodGUID",(e,t)=>{S7.init(e,t),Kt.init(e,t)}),bh=ge("ZodUUID",(e,t)=>{_7.init(e,t),Kt.init(e,t)}),Vq=ge("ZodURL",(e,t)=>{E7.init(e,t),Kt.init(e,t)}),Gq=ge("ZodEmoji",(e,t)=>{x7.init(e,t),Kt.init(e,t)}),Kq=ge("ZodNanoID",(e,t)=>{R7.init(e,t),Kt.init(e,t)}),Zq=ge("ZodCUID",(e,t)=>{C7.init(e,t),Kt.init(e,t)}),Qq=ge("ZodCUID2",(e,t)=>{T7.init(e,t),Kt.init(e,t)}),Yq=ge("ZodULID",(e,t)=>{A7.init(e,t),Kt.init(e,t)}),Xq=ge("ZodXID",(e,t)=>{I7.init(e,t),Kt.init(e,t)}),Wq=ge("ZodKSUID",(e,t)=>{O7.init(e,t),Kt.init(e,t)}),Jq=ge("ZodIPv4",(e,t)=>{N7.init(e,t),Kt.init(e,t)}),eV=ge("ZodIPv6",(e,t)=>{z7.init(e,t),Kt.init(e,t)}),tV=ge("ZodCIDRv4",(e,t)=>{L7.init(e,t),Kt.init(e,t)}),nV=ge("ZodCIDRv6",(e,t)=>{B7.init(e,t),Kt.init(e,t)}),sV=ge("ZodBase64",(e,t)=>{$7.init(e,t),Kt.init(e,t)}),rV=ge("ZodBase64URL",(e,t)=>{j7.init(e,t),Kt.init(e,t)}),oV=ge("ZodE164",(e,t)=>{H7.init(e,t),Kt.init(e,t)}),iV=ge("ZodJWT",(e,t)=>{q7.init(e,t),Kt.init(e,t)}),aV=ge("ZodNumber",(e,t)=>{gO.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>oq(e,r,i),e.gt=(r,i)=>e.check(mC(r,i)),e.gte=(r,i)=>e.check(a0(r,i)),e.min=(r,i)=>e.check(a0(r,i)),e.lt=(r,i)=>e.check(pC(r,i)),e.lte=(r,i)=>e.check(i0(r,i)),e.max=(r,i)=>e.check(i0(r,i)),e.int=r=>e.check(yv(r)),e.safe=r=>e.check(yv(r)),e.positive=r=>e.check(mC(0,r)),e.nonnegative=r=>e.check(a0(0,r)),e.negative=r=>e.check(pC(0,r)),e.nonpositive=r=>e.check(i0(0,r)),e.multipleOf=(r,i)=>e.check(gC(r,i)),e.step=(r,i)=>e.check(gC(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),cV=ge("ZodNumberFormat",(e,t)=>{V7.init(e,t),aV.init(e,t)});function yv(e){return BF(cV,e)}const lV=ge("ZodUnknown",(e,t)=>{G7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>aq()});function vC(){return $F(lV)}const uV=ge("ZodNever",(e,t)=>{K7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>iq(e,n,r)});function fV(e){return UF(uV,e)}const dV=ge("ZodArray",(e,t)=>{Z7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fq(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(ap(n,r)),e.nonempty=n=>e.check(ap(1,n)),e.max=(n,r)=>e.check(SO(n,r)),e.length=(n,r)=>e.check(_O(n,r)),e.unwrap=()=>e.element});function hV(e,t){return WF(dV,e,t)}const pV=ge("ZodObject",(e,t)=>{Y7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>dq(e,n,r,i),Rt(e,"shape",()=>t.shape),e.keyof=()=>bV(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vC()}),e.loose=()=>e.clone({...e._zod.def,catchall:vC()}),e.strict=()=>e.clone({...e._zod.def,catchall:fV()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>vH(e,n),e.safeExtend=n=>bH(e,n),e.merge=n=>SH(e,n),e.pick=n=>gH(e,n),e.omit=n=>yH(e,n),e.partial=(...n)=>_H(TO,e,n[0]),e.required=(...n)=>wH(AO,e,n[0])});function qp(e,t){const n={type:"object",shape:e??{},...$e(t)};return new pV(n)}const mV=ge("ZodUnion",(e,t)=>{X7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hq(e,n,r,i),e.options=t.options});function gV(e,t){return new mV({type:"union",options:e,...$e(t)})}const yV=ge("ZodIntersection",(e,t)=>{W7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pq(e,n,r,i)});function vV(e,t){return new yV({type:"intersection",left:e,right:t})}const vv=ge("ZodEnum",(e,t)=>{J7.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>cq(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const c={};for(const l of r)if(n.has(l))c[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new vv({...t,checks:[],...$e(i),entries:c})},e.exclude=(r,i)=>{const c={...t.entries};for(const l of r)if(n.has(l))delete c[l];else throw new Error(`Key ${l} not found in enum`);return new vv({...t,checks:[],...$e(i),entries:c})}});function bV(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new vv({type:"enum",entries:n,...$e(t)})}const SV=ge("ZodTransform",(e,t)=>{eF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>uq(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new tO(e.constructor.name);n.addIssue=c=>{if(typeof c=="string")n.issues.push(of(c,n.value,t));else{const l=c;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(of(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(c=>(n.value=c,n)):(n.value=i,n)}});function _V(e){return new SV({type:"transform",transform:e})}const TO=ge("ZodOptional",(e,t)=>{bO.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RO(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function bC(e){return new TO({type:"optional",innerType:e})}const wV=ge("ZodExactOptional",(e,t)=>{tF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RO(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function EV(e){return new wV({type:"optional",innerType:e})}const xV=ge("ZodNullable",(e,t)=>{nF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function SC(e){return new xV({type:"nullable",innerType:e})}const RV=ge("ZodDefault",(e,t)=>{sF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function CV(e,t){return new RV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():oO(t)}})}const TV=ge("ZodPrefault",(e,t)=>{rF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function AV(e,t){return new TV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():oO(t)}})}const AO=ge("ZodNonOptional",(e,t)=>{oF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function IV(e,t){return new AO({type:"nonoptional",innerType:e,...$e(t)})}const OV=ge("ZodCatch",(e,t)=>{iF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bq(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function MV(e,t){return new OV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const DV=ge("ZodPipe",(e,t)=>{aF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Sq(e,n,r,i),e.in=t.in,e.out=t.out});function _C(e,t){return new DV({type:"pipe",in:e,out:t})}const kV=ge("ZodReadonly",(e,t)=>{cF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>_q(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function PV(e){return new kV({type:"readonly",innerType:e})}const NV=ge("ZodCustom",(e,t)=>{lF.init(e,t),yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>lq(e,n)});function zV(e,t={}){return JF(NV,e,t)}function LV(e){return eq(e)}const pb="hive:v1:aws-credentials",BV=qp({accessKeyId:Ei().min(16,"Access Key ID must be at least 16 characters"),secretAccessKey:Ei().min(1,"Secret Access Key is required")});let uo;function Vp(){if(uo!==void 0)return uo;try{const e=localStorage.getItem(pb);if(!e)return uo=null,null;const t=JSON.parse(e),n=BV.safeParse(t);return uo=n.success?n.data:null,uo}catch{return uo=null,null}}function Oye(e){try{localStorage.setItem(pb,JSON.stringify(e)),uo=e}catch{uo=e}}function $V(){try{localStorage.removeItem(pb)}catch{}uo=null}const IO=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),OO=e=>({httpHandler:e.httpHandler()});var af;(function(e){e.HTTP="http",e.HTTPS="https"})(af||(af={}));var lp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(lp||(lp={}));const bv="__smithy_context";class On{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new On({...t,headers:{...t.headers}});return n.query&&(n.query=UV(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return On.clone(this)}}function UV(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Da{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const jV=e=>t=>async n=>{if(!On.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let c=r.hostname;r.port!=null&&(c+=`:${r.port}`),r.headers.host=c}return t(n)},HV={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},MO=e=>({applyToStack:t=>{t.add(jV(e),HV)}}),FV=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:h}=f,y=d??t.inputFilterSensitiveLog,g=h??t.outputFilterSensitiveLog,{$metadata:v,...b}=r.output;return l?.info?.({clientName:i,commandName:c,input:y(n.input),output:g(b),metadata:v}),r}catch(r){const{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d}=f,h=d??t.inputFilterSensitiveLog;throw l?.error?.({clientName:i,commandName:c,input:h(n.input),error:r,metadata:r.$metadata}),r}},qV={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},DO=e=>({applyToStack:t=>{t.add(FV(),qV)}}),VV={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},GV=()=>e=>async t=>e(t),kO=e=>({applyToStack:t=>{t.add(GV(),VV)}}),wo=e=>e[bv]||(e[bv]={}),Ps=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},KV=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const i of e)i.schemeId.split("#")[1]===r&&n.push(i);for(const r of e)n.find(({schemeId:i})=>i===r.schemeId)||n.push(r);return n};function ZV(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const QV=(e,t)=>(n,r)=>async i=>{const c=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),l=e.authSchemePreference?await e.authSchemePreference():[],f=KV(c,l),d=ZV(e.httpAuthSchemes),h=wo(r),y=[];for(const g of f){const v=d.get(g.schemeId);if(!v){y.push(`HttpAuthScheme \`${g.schemeId}\` was not enabled for this service.`);continue}const b=v.identityProvider(await t.identityProviderConfigProvider(e));if(!b){y.push(`HttpAuthScheme \`${g.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:_={},signingProperties:x={}}=g.propertiesExtractor?.(e,r)||{};g.identityProperties=Object.assign(g.identityProperties||{},_),g.signingProperties=Object.assign(g.signingProperties||{},x),h.selectedHttpAuthScheme={httpAuthOption:g,identity:await b(g.identityProperties),signer:v.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(y.join(` +`));return n(i)},YV={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},PO=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(QV(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),YV)}}),XV={name:"serializerMiddleware"},WV=e=>t=>{throw t},JV=(e,t)=>{},eG=e=>(t,n)=>async r=>{if(!On.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,h=await t({...r,request:await d.sign(r.request,f,l)}).catch((d.errorHandler||WV)(l));return(d.successHandler||JV)(h.response,l),h},NO={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},zO=e=>({applyToStack:t=>{t.addRelativeTo(eG(),NO)}}),Gc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},LO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wC=Object.entries(LO).reduce((e,[t,n])=>(e[n]=Number(t),e),{}),tG=LO.split(""),Kc=6,qu=8,nG=63,ka=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i>=Kc;const f=i/4*3;c>>=l%qu;const d=Math.floor(l/qu);for(let h=0;h>y)}}return new Uint8Array(n)},bo=e=>new TextEncoder().encode(e),cf=e=>typeof e=="string"?bo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),$a=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Ti(e){let t;typeof e=="string"?t=bo(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let c=0;c>y]}i+="==".slice(0,4-d)}return i}class Ra extends Uint8Array{static fromString(t,n="utf-8"){if(typeof t=="string")return n==="base64"?Ra.mutate(ka(t)):Ra.mutate(bo(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Ra.prototype),t}transformToString(t="utf-8"){return t==="base64"?Ti(this):$a(this)}}const EC=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),sG=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:l}=t,f=n!==void 0&&r!==void 0&&i!==void 0&&c!==void 0&&l!==void 0,d=f?l(i,e):void 0,h=e.getReader();return new ReadableStream({async pull(y){const{value:g,done:v}=await h.read();if(v){if(y.enqueue(`0\r `),f){const b=n(await d);y.enqueue(`${c}:${b}\r `),y.enqueue(`\r `)}y.close()}else y.enqueue(`${(r(g)||0).toString(16)}\r ${g}\r -`)}})};async function LV(e,t){let n=0;const r=[],i=e.getReader();let c=!1;for(;!c;){const{done:d,value:h}=await i.read();if(h&&(r.push(h),n+=h?.byteLength??0),n>=t)break;c=d}i.releaseLock();const l=new Uint8Array(Math.min(t,n));let f=0;for(const d of r){if(d.byteLength>l.byteLength-f){l.set(d.subarray(0,l.byteLength-f),f);break}else l.set(d,f);f+=d.length}return l}const ea=e=>encodeURIComponent(e).replace(/[!'()*]/g,BV),BV=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function $V(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ea(n),Array.isArray(r))for(let i=0,c=r.length;i{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const jy={supported:void 0};class mp{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new mp(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),jy.supported===void 0&&(jy.supported=typeof Request<"u"&&"keepalive"in jR("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,c=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let f=t.path;const d=$V(t.query||{});d&&(f+=`?${d}`),t.fragment&&(f+=`#${t.fragment}`);let h="";if(t.username!=null||t.password!=null){const A=t.username??"",O=t.password??"";h=`${A}:${O}@`}const{port:y,method:g}=t,v=`${t.protocol}//${h}${t.hostname}${y?`:${y}`:""}${f}`,b=g==="GET"||g==="HEAD"?void 0:t.body,_={body:b,headers:new Headers(t.headers),method:g,credentials:l};this.config?.cache&&(_.cache=this.config.cache),b&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=n),jy.supported&&(_.keepalive=c),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let x=()=>{};const R=jR(v,_),C=[fetch(R).then(A=>{const O=A.headers,D={};for(const U of O.entries())D[U[0]]=U[1];return A.body!=null?{response:new ia({headers:D,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(U=>({response:new ia({headers:D,reason:A.statusText,statusCode:A.status,body:U})}))}),UV(i)];return n&&C.push(new Promise((A,O)=>{const D=()=>{const N=new Error("Request aborted");N.name="AbortError",O(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",D,{once:!0}),x=()=>N.removeEventListener("abort",D)}else n.onabort=D})),Promise.race(C).finally(x)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const Qb=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):jV(e):HV(e);async function jV(e){const t=await FV(e),n=aa(t);return new Uint8Array(n)}async function HV(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:f,value:d}=await n.read();d&&(t.push(d),i+=d.length),r=f}const c=new Uint8Array(i);let l=0;for(const f of t)c.set(f,l),l+=f.length;return c}function FV(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const i=r.result??"",c=i.indexOf(","),l=c>-1?c+1:i.length;t(i.substring(l))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const tO={},Jv={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),tO[e]=t,Jv[t]=e}function nO(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{if(!FR(e)&&!UR(e)){const i=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${i}`)}let t=!1;const n=async()=>{if(t)throw new Error(HR);return t=!0,await Qb(e)},r=i=>{if(typeof i.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. -If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async i=>{const c=await n();if(i==="base64")return di(c);if(i==="hex")return fs(c);if(i===void 0||i==="utf8"||i==="utf-8")return ha(c);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(c);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(HR);if(t=!0,FR(e))return r(e);if(UR(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},FR=e=>typeof Blob=="function"&&e instanceof Blob;async function qV(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const ri=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ji.mutate(e);if(!e)return Ji.mutate(new Uint8Array);const n=t.streamCollector(e);return Ji.mutate(await n)};function Dh(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const th=e=>typeof e=="function"?e():e,rO=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),VV=e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:c}=yo(n),[,l,f,d,h,y]=c??[];try{const g=await e.protocol.deserializeResponse(rO(l,f,d,h,y),{...e,...n},i);return{response:i,output:g}}catch(g){if(Object.defineProperty(g,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in g)){const v="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{g.message+=` - `+v}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(v):n.logger?.warn?.(v)}typeof g.$responseBodyText<"u"&&g.$response&&(g.$response.body=g.$responseBodyText);try{if(ia.isInstance(i)){const{headers:b={}}=i,_=Object.entries(b);g.$metadata={httpStatusCode:i.statusCode,requestId:Hy(/^x-[\w-]+-request-?id$/,_),extendedRequestId:Hy(/^x-[\w-]+-id-2$/,_),cfId:Hy(/^x-[\w-]+-cf-id$/,_)}}}catch{}}throw g}},Hy=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],GV=e=>(t,n)=>async r=>{const{operationSchema:i}=yo(n),[,c,l,f,d,h]=i??[],y=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,g=await e.protocol.serializeRequest(rO(c,l,f,d,h),r.input,{...e,...n,endpoint:y});return t({...r,request:g})},KV={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ZV={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function oO(e){return{applyToStack:t=>{t.add(GV(e),ZV),t.add(VV(e),KV),e.protocol.setSerdeContext(e)}}}function hc(e){if(typeof e=="object")return e;e=e|0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>n++&1)===1&&(t[r]=1);return t}const qR={it:Symbol.for("@smithy/nor-struct-it")};class wt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=wt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,n){this.ref=t,this.memberName=n;const r=[];let i=t,c=t;for(this._isMemberSchema=!1;Fy(i);)r.push(i[1]),i=i[0],c=th(i),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let l=r.length-1;l>=0;--l){const f=r[l];Object.assign(this.memberTraits,hc(f))}}else this.memberTraits=0;if(c instanceof wt){const l=this.memberTraits;Object.assign(this,c),this.memberTraits=Object.assign({},l,c.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=n??c.memberName;return}if(this.schema=th(c),QV(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(c),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const n=this.prototype.isPrototypeOf(t);return!n&&typeof t=="object"&&t!==null?t.symbol===this.symbol:n}static of(t){const n=th(t);if(n instanceof wt)return n;if(Fy(n)){const[r,i]=n;if(r instanceof wt)return Object.assign(r.getMergedTraits(),hc(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new wt(n)}getSchema(){const t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){const{name:n}=this;return!t&&n&&n.includes("#")?n.split("#")[1]:n||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const n=this.getSchema()[0];return n===3||n===-3||n===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return hc(this.memberTraits)}getOwnTraits(){return hc(this.traits)}getKeySchema(){const[t,n]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!n)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema(),i=t?15:r[4]??0;return Xl([i,0],"key")}getValueSchema(){const t=this.getSchema(),[n,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],c=typeof t=="number"?63&t:t&&typeof t=="object"&&(r||i)?t[3+t[0]]:n?15:void 0;if(c!=null)return Xl([c,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const n=this.getSchema();if(this.isStructSchema()&&n[4].includes(t)){const r=n[4].indexOf(t),i=n[5][r];return Xl(Fy(i)?i:[i,0],t)}if(this.isDocumentSchema())return Xl([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[n,r]of this.structIterator())t[n]=r}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,n]of this.structIterator())if(n.isStreaming()&&n.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),n=t[4].length;let r=t[qR.it];if(r&&n===r.length){yield*r;return}r=Array(n);for(let i=0;iArray.isArray(e)&&e.length===2,QV=e=>Array.isArray(e)&&e.length>=5;class Mt{namespace;schemas;exceptions;static registries=new Map;constructor(t,n=new Map,r=new Map){this.namespace=t,this.schemas=n,this.exceptions=r}static for(t){return Mt.registries.has(t)||Mt.registries.set(t,new Mt(t)),Mt.registries.get(t)}register(t,n){const r=this.normalizeShapeId(t);Mt.for(r.split("#")[0]).schemas.set(r,n)}getSchema(t){const n=this.normalizeShapeId(t);if(!this.schemas.has(n))throw new Error(`@smithy/core/schema - schema not found for ${n}`);return this.schemas.get(n)}registerError(t,n){const r=t,i=Mt.for(r[1]);i.schemas.set(r[1]+"#"+r[2],r),i.exceptions.set(r,n)}getErrorCtor(t){const n=t;return Mt.for(n[1]).exceptions.get(n)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,n,r]=t,i=n+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const YV=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&rG.warn(sG(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},XV=Math.ceil(2**127*(2-2**-23)),VR=e=>{const t=YV(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>XV)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},WV=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},GR=e=>iO(e,16),KR=e=>iO(e,8),iO=(e,t)=>{const n=WV(e);if(n!==void 0&&JV(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},JV=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},eG=e=>VR(typeof e=="string"?Yb(e):e),tG=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Yb=e=>{const t=e.match(tG);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},eb=e=>GR(typeof e=="string"?Yb(e):e),nG=e=>KR(typeof e=="string"?Yb(e):e),sG=e=>String(new TypeError(e).stack||e).split(` +`)}})};async function rG(e,t){let n=0;const r=[],i=e.getReader();let c=!1;for(;!c;){const{done:d,value:h}=await i.read();if(h&&(r.push(h),n+=h?.byteLength??0),n>=t)break;c=d}i.releaseLock();const l=new Uint8Array(Math.min(t,n));let f=0;for(const d of r){if(d.byteLength>l.byteLength-f){l.set(d.subarray(0,l.byteLength-f),f);break}else l.set(d,f);f+=d.length}return l}const Ca=e=>encodeURIComponent(e).replace(/[!'()*]/g,oG),oG=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function iG(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Ca(n),Array.isArray(r))for(let i=0,c=r.length;i{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const c0={supported:void 0};class Gp{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Gp(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),c0.supported===void 0&&(c0.supported=typeof Request<"u"&&"keepalive"in xC("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,c=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let f=t.path;const d=iG(t.query||{});d&&(f+=`?${d}`),t.fragment&&(f+=`#${t.fragment}`);let h="";if(t.username!=null||t.password!=null){const A=t.username??"",O=t.password??"";h=`${A}:${O}@`}const{port:y,method:g}=t,v=`${t.protocol}//${h}${t.hostname}${y?`:${y}`:""}${f}`,b=g==="GET"||g==="HEAD"?void 0:t.body,_={body:b,headers:new Headers(t.headers),method:g,credentials:l};this.config?.cache&&(_.cache=this.config.cache),b&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=n),c0.supported&&(_.keepalive=c),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let x=()=>{};const R=xC(v,_),C=[fetch(R).then(A=>{const O=A.headers,D={};for(const U of O.entries())D[U[0]]=U[1];return A.body!=null?{response:new Da({headers:D,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(U=>({response:new Da({headers:D,reason:A.statusText,statusCode:A.status,body:U})}))}),aG(i)];return n&&C.push(new Promise((A,O)=>{const D=()=>{const N=new Error("Request aborted");N.name="AbortError",O(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",D,{once:!0}),x=()=>N.removeEventListener("abort",D)}else n.onabort=D})),Promise.race(C).finally(x)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const mb=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):cG(e):lG(e);async function cG(e){const t=await uG(e),n=ka(t);return new Uint8Array(n)}async function lG(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:f,value:d}=await n.read();d&&(t.push(d),i+=d.length),r=f}const c=new Uint8Array(i);let l=0;for(const f of t)c.set(f,l),l+=f.length;return c}function uG(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const i=r.result??"",c=i.indexOf(","),l=c>-1?c+1:i.length;t(i.substring(l))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const BO={},Sv={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),BO[e]=t,Sv[t]=e}function $O(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{if(!CC(e)&&!EC(e)){const i=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${i}`)}let t=!1;const n=async()=>{if(t)throw new Error(RC);return t=!0,await mb(e)},r=i=>{if(typeof i.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. +If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async i=>{const c=await n();if(i==="base64")return Ti(c);if(i==="hex")return fs(c);if(i===void 0||i==="utf8"||i==="utf-8")return $a(c);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(c);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(RC);if(t=!0,CC(e))return r(e);if(EC(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},CC=e=>typeof Blob=="function"&&e instanceof Blob;async function fG(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const bi=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ra.mutate(e);if(!e)return Ra.mutate(new Uint8Array);const n=t.streamCollector(e);return Ra.mutate(await n)};function up(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const kh=e=>typeof e=="function"?e():e,jO=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),dG=e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:c}=wo(n),[,l,f,d,h,y]=c??[];try{const g=await e.protocol.deserializeResponse(jO(l,f,d,h,y),{...e,...n},i);return{response:i,output:g}}catch(g){if(Object.defineProperty(g,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in g)){const v="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{g.message+=` + `+v}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(v):n.logger?.warn?.(v)}typeof g.$responseBodyText<"u"&&g.$response&&(g.$response.body=g.$responseBodyText);try{if(Da.isInstance(i)){const{headers:b={}}=i,_=Object.entries(b);g.$metadata={httpStatusCode:i.statusCode,requestId:l0(/^x-[\w-]+-request-?id$/,_),extendedRequestId:l0(/^x-[\w-]+-id-2$/,_),cfId:l0(/^x-[\w-]+-cf-id$/,_)}}}catch{}}throw g}},l0=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],hG=e=>(t,n)=>async r=>{const{operationSchema:i}=wo(n),[,c,l,f,d,h]=i??[],y=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,g=await e.protocol.serializeRequest(jO(c,l,f,d,h),r.input,{...e,...n,endpoint:y});return t({...r,request:g})},pG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},mG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function HO(e){return{applyToStack:t=>{t.add(hG(e),mG),t.add(dG(e),pG),e.protocol.setSerdeContext(e)}}}function Uc(e){if(typeof e=="object")return e;e=e|0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>n++&1)===1&&(t[r]=1);return t}const TC={it:Symbol.for("@smithy/nor-struct-it")};class wt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=wt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,n){this.ref=t,this.memberName=n;const r=[];let i=t,c=t;for(this._isMemberSchema=!1;u0(i);)r.push(i[1]),i=i[0],c=kh(i),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let l=r.length-1;l>=0;--l){const f=r[l];Object.assign(this.memberTraits,Uc(f))}}else this.memberTraits=0;if(c instanceof wt){const l=this.memberTraits;Object.assign(this,c),this.memberTraits=Object.assign({},l,c.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=n??c.memberName;return}if(this.schema=kh(c),gG(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(c),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const n=this.prototype.isPrototypeOf(t);return!n&&typeof t=="object"&&t!==null?t.symbol===this.symbol:n}static of(t){const n=kh(t);if(n instanceof wt)return n;if(u0(n)){const[r,i]=n;if(r instanceof wt)return Object.assign(r.getMergedTraits(),Uc(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new wt(n)}getSchema(){const t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){const{name:n}=this;return!t&&n&&n.includes("#")?n.split("#")[1]:n||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const n=this.getSchema()[0];return n===3||n===-3||n===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Uc(this.memberTraits)}getOwnTraits(){return Uc(this.traits)}getKeySchema(){const[t,n]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!n)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema(),i=t?15:r[4]??0;return Du([i,0],"key")}getValueSchema(){const t=this.getSchema(),[n,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],c=typeof t=="number"?63&t:t&&typeof t=="object"&&(r||i)?t[3+t[0]]:n?15:void 0;if(c!=null)return Du([c,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const n=this.getSchema();if(this.isStructSchema()&&n[4].includes(t)){const r=n[4].indexOf(t),i=n[5][r];return Du(u0(i)?i:[i,0],t)}if(this.isDocumentSchema())return Du([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[n,r]of this.structIterator())t[n]=r}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,n]of this.structIterator())if(n.isStreaming()&&n.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),n=t[4].length;let r=t[TC.it];if(r&&n===r.length){yield*r;return}r=Array(n);for(let i=0;iArray.isArray(e)&&e.length===2,gG=e=>Array.isArray(e)&&e.length>=5;class Mt{namespace;schemas;exceptions;static registries=new Map;constructor(t,n=new Map,r=new Map){this.namespace=t,this.schemas=n,this.exceptions=r}static for(t){return Mt.registries.has(t)||Mt.registries.set(t,new Mt(t)),Mt.registries.get(t)}register(t,n){const r=this.normalizeShapeId(t);Mt.for(r.split("#")[0]).schemas.set(r,n)}getSchema(t){const n=this.normalizeShapeId(t);if(!this.schemas.has(n))throw new Error(`@smithy/core/schema - schema not found for ${n}`);return this.schemas.get(n)}registerError(t,n){const r=t,i=Mt.for(r[1]);i.schemas.set(r[1]+"#"+r[2],r),i.exceptions.set(r,n)}getErrorCtor(t){const n=t;return Mt.for(n[1]).exceptions.get(n)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,n,r]=t,i=n+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const yG=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&RG.warn(xG(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},vG=Math.ceil(2**127*(2-2**-23)),AC=e=>{const t=yG(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>vG)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},bG=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},IC=e=>FO(e,16),OC=e=>FO(e,8),FO=(e,t)=>{const n=bG(e);if(n!==void 0&&SG(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},SG=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},_G=e=>AC(typeof e=="string"?gb(e):e),wG=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,gb=e=>{const t=e.match(wG);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},_v=e=>IC(typeof e=="string"?gb(e):e),EG=e=>OC(typeof e=="string"?gb(e):e),xG=e=>String(new TypeError(e).stack||e).split(` `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(` -`),rG={warn:console.warn},oG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function kh(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),c=e.getUTCHours(),l=e.getUTCMinutes(),f=e.getUTCSeconds(),d=i<10?`0${i}`:`${i}`,h=c<10?`0${c}`:`${c}`,y=l<10?`0${l}`:`${l}`,g=f<10?`0${f}`:`${f}`;return`${oG[r]}, ${d} ${Xb[n]} ${t} ${h}:${y}:${g} GMT`}const iG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),aG=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),cG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),jge=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=iG.exec(e);if(t){const[n,r,i,c,l,f,d,h]=t;return qy(eb(Ph(c)),Vy(i),_c(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h})}if(t=aG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return fG(qy(lG(c),Vy(i),_c(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h}))}if(t=cG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return qy(eb(Ph(h)),Vy(r),_c(i.trimLeft(),"day",1,31),{hours:c,minutes:l,seconds:f,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},qy=(e,t,n,r)=>{const i=t-1;return hG(e,i,n),new Date(Date.UTC(e,i,n,_c(r.hours,"hour",0,23),_c(r.minutes,"minute",0,59),_c(r.seconds,"seconds",0,60),mG(r.fractionalMilliseconds)))},lG=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+eb(Ph(e));return ne.getTime()-new Date().getTime()>uG?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Vy=e=>{const t=Xb.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},dG=[31,28,31,30,31,30,31,31,30,31,30,31],hG=(e,t,n)=>{let r=dG[t];if(t===1&&pG(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${Xb[t]} in ${e}: ${n}`)},pG=e=>e%4===0&&(e%100!==0||e%400===0),_c=(e,t,n,r)=>{const i=nG(Ph(e));if(ir)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},mG=e=>e==null?0:eG("0."+e)*1e3,Ph=e=>{let t=0;for(;tt.toString(16).padStart(2,"0")),gp=()=>{if(ZR)return ZR();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Vn[e[0]]+Vn[e[1]]+Vn[e[2]]+Vn[e[3]]+"-"+Vn[e[4]]+Vn[e[5]]+"-"+Vn[e[6]]+Vn[e[7]]+"-"+Vn[e[8]]+Vn[e[9]]+"-"+Vn[e[10]]+Vn[e[11]]+Vn[e[12]]+Vn[e[13]]+Vn[e[14]]+Vn[e[15]]},oi=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};oi.from=e=>e&&typeof e=="object"&&(e instanceof oi||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?oi(String(e)):oi(JSON.stringify(e));oi.fromObject=oi.from;function gG(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const Wb="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Jb="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",e0="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",aO="(\\d?\\d)",cO="(\\d{4})",yG=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),vG=new RegExp(`^${Wb}, ${aO} ${Jb} ${cO} ${e0} GMT$`),bG=new RegExp(`^${Wb}, ${aO}-${Jb}-(\\d\\d) ${e0} GMT$`),SG=new RegExp(`^${Wb} ${Jb} ( [1-9]|\\d\\d) ${e0} ${cO}$`),_G=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wG=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},EG=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=yG.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,c,l,f,,d,h]=t;io(r,1,12),io(i,1,31),io(c,0,23),io(l,0,59),io(f,0,60);const y=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(c),Number(l),Number(f),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(y.setUTCFullYear(Number(n)),h.toUpperCase()!="Z"){const[,g,v,b]=/([+-])(\d\d):(\d\d)/.exec(h)||[void 0,"+",0,0],_=g==="-"?1:-1;y.setTime(y.getTime()+_*(Number(v)*60*60*1e3+Number(b)*60*1e3))}return y},xG=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,c,l,f,d;if((d=vG.exec(e))?[,t,n,r,i,c,l,f]=d:(d=bG.exec(e))?([,t,n,r,i,c,l,f]=d,r=(Number(r)+1900).toString()):(d=SG.exec(e))&&([,n,t,i,c,l,f,r]=d),r&&l){const h=Date.UTC(Number(r),_G.indexOf(n),Number(t),Number(i),Number(c),Number(l),f?Math.round(parseFloat(`0.${f}`)*1e3):0);io(t,1,31),io(i,0,23),io(c,0,59),io(l,0,60);const y=new Date(h);return y.setUTCFullYear(Number(r)),y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function io(e,t,n){const r=Number(e);if(rn)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function RG(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let c="";for(let l=0;l{const t=e.length,n=[];let r=!1,i,c=0;for(let l=0;l{l=l.trim();const f=l.length;return f<2?l:(l[0]==='"'&&l[f-1]==='"'&&(l=l.slice(1,f-1)),l.replace(/\\"/g,'"'))})},QR=/^-?\d*(\.\d+)?$/;class $u{string;type;constructor(t,n){if(this.string=t,this.type=n,!QR.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const n=t;return $u.prototype.isPrototypeOf(t)||n.type==="bigDecimal"&&QR.test(n.string)}}const CG="modulepreload",TG=function(e){return"/"+e},YR={},En=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=TG(h),h in YR)return;YR[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":CG,y||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),y)return new Promise((b,_)=>{v.addEventListener("load",b),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(l){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=l,window.dispatchEvent(f),!f.defaultPrevented)throw l}return i.then(l=>{for(const f of l||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};class yp{serdeContext;setSerdeContext(t){this.serdeContext=t}}class uO extends yp{options;constructor(t){super(),this.options=t}getRequestType(){return On}getResponseType(){return ia}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,n){if("url"in n){t.protocol=n.url.protocol,t.hostname=n.url.hostname,t.port=n.url.port?Number(n.url.port):void 0,t.path=n.url.pathname,t.fragment=n.url.hash||void 0,t.username=n.url.username||void 0,t.password=n.url.password||void 0,t.query||(t.query={});for(const[r,i]of n.url.searchParams.entries())t.query[r]=i;return t}else return t.protocol=n.protocol,t.hostname=n.hostname,t.port=n.port?Number(n.port):void 0,t.path=n.path,t.query={...n.query},t}setHostPrefix(t,n,r){if(this.serdeContext?.disableHostPrefix)return;const i=wt.of(n.input),c=hc(n.traits??{});if(c.endpoint){let l=c.endpoint?.[0];if(typeof l=="string"){const f=[...i.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(const[d]of f){const h=r[d];if(typeof h!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);l=l.replace(`{${d}}`,h)}t.hostname=l+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await En(async()=>{const{EventStreamSerde:n}=await import("./index2.js");return{EventStreamSerde:n}},[]);return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,n,r,i,c){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class AG extends uO{async serializeRequest(t,n,r){const i={...n??{}},c=this.serializer,l={},f={},d=await r.endpoint(),h=wt.of(t?.input),y=h.getSchema();let g=!1,v;const b=new On({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:l,headers:f,body:void 0});if(d){this.updateServiceEndpoint(b,d),this.setHostPrefix(b,t,i);const _=hc(t.traits);if(_.http){b.method=_.http[0];const[x,R]=_.http[1].split("?");b.path=="/"?b.path=x:b.path+=x;const C=new URLSearchParams(R??"");Object.assign(l,Object.fromEntries(C))}}for(const[_,x]of h.structIterator()){const R=x.getMergedTraits()??{},C=i[_];if(C==null&&!x.isIdempotencyToken()){if(R.httpLabel&&(b.path.includes(`{${_}+}`)||b.path.includes(`{${_}}`)))throw new Error(`No value provided for input HTTP label: ${_}.`);continue}if(R.httpPayload)x.isStreaming()?x.isStructSchema()?i[_]&&(v=await this.serializeEventStream({eventStream:i[_],requestSchema:h})):v=C:(c.write(x,C),v=c.flush()),delete i[_];else if(R.httpLabel){c.write(x,C);const A=c.flush();b.path.includes(`{${_}+}`)?b.path=b.path.replace(`{${_}+}`,A.split("/").map(Dh).join("/")):b.path.includes(`{${_}}`)&&(b.path=b.path.replace(`{${_}}`,Dh(A))),delete i[_]}else if(R.httpHeader)c.write(x,C),f[R.httpHeader.toLowerCase()]=String(c.flush()),delete i[_];else if(typeof R.httpPrefixHeaders=="string"){for(const[A,O]of Object.entries(C)){const D=R.httpPrefixHeaders+A;c.write([x.getValueSchema(),{httpHeader:D}],O),f[D.toLowerCase()]=c.flush()}delete i[_]}else R.httpQuery||R.httpQueryParams?(this.serializeQuery(x,C,l),delete i[_]):g=!0}return g&&i&&(c.write(y,i),v=c.flush()),b.headers=f,b.query=l,b.body=v,b}serializeQuery(t,n,r){const i=this.serializer,c=t.getMergedTraits();if(c.httpQueryParams){for(const[l,f]of Object.entries(n))if(!(l in r)){const d=t.getValueSchema();Object.assign(d.getMergedTraits(),{...c,httpQuery:l,httpQueryParams:void 0}),this.serializeQuery(d,f,r)}return}if(t.isListSchema()){const l=!!t.getMergedTraits().sparse,f=[];for(const d of n){i.write([t.getValueSchema(),c],d);const h=i.flush();(l||h!==void 0)&&f.push(h)}r[c.httpQuery]=f}else i.write([t,c],n),r[c.httpQuery]=i.flush()}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await ri(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=await this.deserializeHttpMessage(c,n,r,l);if(f.length){const d=await ri(r.body,n);if(d.byteLength>0){const h=await i.read(c,d);for(const y of f)l[y]=h[y]}}else f.discardResponseBody&&await ri(r.body,n);return l.$metadata=this.deserializeMetadata(r),l}async deserializeHttpMessage(t,n,r,i,c){let l;i instanceof Set?l=c:l=i;let f=!0;const d=this.deserializer,h=wt.of(t),y=[];for(const[g,v]of h.structIterator()){const b=v.getMemberTraits();if(b.httpPayload){if(f=!1,v.isStreaming())v.isStructSchema()?l[g]=await this.deserializeEventStream({response:r,responseSchema:h}):l[g]=sO(r.body);else if(r.body){const x=await ri(r.body,n);x.byteLength>0&&(l[g]=await d.read(v,x))}}else if(b.httpHeader){const _=String(b.httpHeader).toLowerCase(),x=r.headers[_];if(x!=null)if(v.isListSchema()){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_;let C;R.isTimestampSchema()&&R.getSchema()===4?C=RG(x,",",2):C=lO(x);const A=[];for(const O of C)A.push(await d.read(R,O.trim()));l[g]=A}else l[g]=await d.read(v,x)}else if(b.httpPrefixHeaders!==void 0){l[g]={};for(const[_,x]of Object.entries(r.headers))if(_.startsWith(b.httpPrefixHeaders)){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_,l[g][_.slice(b.httpPrefixHeaders.length)]=await d.read(R,x)}}else b.httpResponseCode?l[g]=r.statusCode:y.push(g)}return y.discardResponseBody=f,y}}class IG extends uO{async serializeRequest(t,n,r){const i=this.serializer,c={},l={},f=await r.endpoint(),d=wt.of(t?.input),h=d.getSchema();let y;const g=new On({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:c,headers:l,body:void 0});f&&(this.updateServiceEndpoint(g,f),this.setHostPrefix(g,t,n));const v={...n};if(n){const b=d.getEventStreamMember();if(b){if(v[b]){const _={};for(const[x,R]of d.structIterator())x!==b&&v[x]&&(i.write(R,v[x]),_[x]=i.flush());y=await this.serializeEventStream({eventStream:v[b],requestSchema:d,initialRequest:_})}}else i.write(h,v),y=i.flush()}return g.headers=l,g.query=c,g.body=y,g.method="POST",g}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await ri(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=c.getEventStreamMember();if(f)l[f]=await this.deserializeEventStream({response:r,responseSchema:c,initialResponseContainer:l});else{const d=await ri(r.body,n);d.byteLength>0&&Object.assign(l,await i.read(c,d))}return l.$metadata=this.deserializeMetadata(r),l}}function vp(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:c}=e.getMergedTraits();return(t.httpBindings?typeof r=="string"||i?6:c||n?5:void 0:void 0)??t.timestampFormat.default}class fO extends yp{settings;constructor(t){super(),this.settings=t}read(t,n){const r=wt.of(t);if(r.isListSchema())return lO(n).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??aa)(n);if(r.isTimestampSchema())switch(vp(r,this.settings)){case 5:return EG(n);case 6:return xG(n);case 7:return wG(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let c=n;if(i)return r.getMergedTraits().httpHeader&&(c=this.base64ToUtf8(c)),(i==="application/json"||i.endsWith("+json"))&&(c=oi.from(c)),c}return r.isNumericSchema()?Number(n):r.isBigIntegerSchema()?BigInt(n):r.isBigDecimalSchema()?new $u(n,"bigDecimal"):r.isBooleanSchema()?String(n).toLowerCase()==="true":n}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??ha)((this.serdeContext?.base64Decoder??aa)(t))}}class OG extends yp{codecDeserializer;stringDeserializer;constructor(t,n){super(),this.codecDeserializer=t,this.stringDeserializer=new fO(n)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,n){const r=wt.of(t),i=r.getMergedTraits(),c=this.serdeContext?.utf8Encoder??ha;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,c(n));if(i.httpPayload){if(r.isBlobSchema()){const l=this.serdeContext?.utf8Decoder??mo;return typeof n=="string"?l(n):n}else if(r.isStringSchema())return"byteLength"in n?c(n):n}return this.codecDeserializer.read(r,n)}}class MG extends yp{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);switch(typeof n){case"object":if(n===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(n instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${n} when schema expected Date in ${r.getName(!0)}`);switch(vp(r,this.settings)){case 5:this.stringBuffer=n.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=kh(n);break;case 7:this.stringBuffer=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",n),this.stringBuffer=String(n.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in n){this.stringBuffer=(this.serdeContext?.base64Encoder??di)(n);return}if(r.isListSchema()&&Array.isArray(n)){let l="";for(const f of n){this.write([r.getValueSchema(),r.getMergedTraits()],f);const d=this.flush(),h=r.getValueSchema().isTimestampSchema()?d:gG(d);l!==""&&(l+=", "),l+=h}this.stringBuffer=l;return}this.stringBuffer=JSON.stringify(n,null,2);break;case"string":const i=r.getMergedTraits().mediaType;let c=n;if(i&&((i==="application/json"||i.endsWith("+json"))&&(c=oi.from(c)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??di)(c.toString());return}this.stringBuffer=n;break;default:r.isIdempotencyToken()?this.stringBuffer=gp():this.stringBuffer=String(n)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class DG{codecSerializer;stringSerializer;buffer;constructor(t,n,r=new MG(n)){this.codecSerializer=t,this.stringSerializer=r}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,n){const r=wt.of(t),i=r.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(r,n),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,n)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function kG(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class dO{authSchemes=new Map;constructor(t){for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const PG=e=>function(n){return hO(n)&&n.expiration.getTime()-Date.now()e.expiration!==void 0,LG=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let i,c,l,f=!1;const d=async h=>{c||(c=r(h));try{i=await c,l=!0,f=!1}finally{c=void 0}return i};return t===void 0?async h=>((!l||h?.forceRefresh)&&(i=await d(h)),i):async h=>((!l||h?.forceRefresh)&&(i=await d(h)),f?i:n(i)?(t(i)&&await d(h),i):(f=!0,i))},BG=void 0;function $G(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function pO(e){const t=bc(e.userAgentAppId??BG),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!$G(r)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class mO{capacity;data=new Map;parameters=[];constructor({size:t,params:n}){this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const i=this.data.keys();let c=0;for(;;){const{value:l,done:f}=i.next();if(this.data.delete(l),f||++c>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const i of r){const c=String(t[i]??"");if(c.includes("|;"))return!1;n+=c+"|;"}return n}}const UG=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gO=e=>UG.test(e)||e.startsWith("[")&&e.endsWith("]"),jG=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),bp=(e,t=!1)=>{if(!t)return jG.test(e);const n=e.split(".");for(const r of n)if(!bp(r))return!1;return!0},Tu={},Au="endpoints";function hi(e){return typeof e!="object"||e==null?e:"ref"in e?`$${hi(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(hi).join(", ")})`:JSON.stringify(e,null,2)}class Ps extends Error{constructor(t){super(t),this.name="EndpointError"}}const HG=(e,t)=>e===t,FG=e=>{const t=e.split("."),n=[];for(const r of t){const i=r.indexOf("[");if(i!==-1){if(r.indexOf("]")!==r.length-1)throw new Ps(`Path: '${e}' does not end with ']'`);const c=r.slice(i+1,-1);if(Number.isNaN(parseInt(c)))throw new Ps(`Invalid array index: '${c}' in path: '${e}'`);i!==0&&n.push(r.slice(0,i)),n.push(c)}else n.push(r)}return n},yO=(e,t)=>FG(t).reduce((n,r)=>{if(typeof n!="object")throw new Ps(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),qG=e=>e!=null,VG=e=>!e,Gy={[Ru.HTTP]:80,[Ru.HTTPS]:443},GG=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:v,port:b,protocol:_="",path:x="",query:R={}}=e,C=new URL(`${_}//${v}${b?`:${b}`:""}${x}`);return C.search=Object.entries(R).map(([A,O])=>`${A}=${O}`).join("&"),C}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:c,protocol:l,search:f}=t;if(f)return null;const d=l.slice(0,-1);if(!Object.values(Ru).includes(d))return null;const h=gO(i),y=n.includes(`${r}:${Gy[d]}`)||typeof e=="string"&&e.includes(`${r}:${Gy[d]}`),g=`${r}${y?`:${Gy[d]}`:""}`;return{scheme:d,authority:g,path:c,normalizedPath:c.endsWith("/")?c:`${c}/`,isIp:h}},KG=(e,t)=>e===t,ZG=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),YG={booleanEquals:HG,getAttr:yO,isSet:qG,isValidHostLabel:bp,not:VG,parseURL:GG,stringEquals:KG,substring:ZG,uriEncode:QG},vO=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i({...t.endpointParams,...t.referenceRecord})[e],Sp=(e,t,n)=>{if(typeof e=="string")return vO(e,n);if(e.fn)return SO.callFunction(e,n);if(e.ref)return XG(e,n);throw new Ps(`'${t}': ${String(e)} is not a string, function or reference.`)},bO=({fn:e,argv:t},n)=>{const r=t.map(c=>["boolean","number"].includes(typeof c)?c:SO.evaluateExpression(c,"arg",n)),i=e.split(".");return i[0]in Tu&&i[1]!=null?Tu[i[0]][i[1]](...r):YG[e](...r)},SO={evaluateExpression:Sp,callFunction:bO},WG=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ps(`'${e}' is already defined in Reference Record.`);const r=bO(t,n);return n.logger?.debug?.(`${Au} evaluateCondition: ${hi(t)} = ${hi(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},t0=(e=[],t)=>{const n={};for(const r of e){const{result:i,toAssign:c}=WG(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!i)return{result:i};c&&(n[c.name]=c.value,t.logger?.debug?.(`${Au} assign: ${c.name} := ${hi(c.value)}`))}return{result:!0,referenceRecord:n}},JG=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:i.map(c=>{const l=Sp(c,"Header value entry",t);if(typeof l!="string")throw new Ps(`Header '${r}' value '${l}' is not a string`);return l})}),{}),_O=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:EO.getEndpointProperty(i,t)}),{}),wO=(e,t)=>{if(Array.isArray(e))return e.map(n=>wO(n,t));switch(typeof e){case"string":return vO(e,t);case"object":if(e===null)throw new Ps(`Unexpected endpoint property: ${e}`);return EO.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ps(`Unexpected endpoint property type: ${typeof e}`)}},EO={getEndpointProperty:wO,getEndpointProperties:_O},eK=(e,t)=>{const n=Sp(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new Ps(`Endpoint URL must be a string, got ${typeof n}`)},tK=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:c}=t0(n,t);if(!i)return;const l={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:d,headers:h}=r;return t.logger?.debug?.(`${Au} Resolving endpoint from template: ${hi(r)}`),{...h!=null&&{headers:JG(h,l)},...d!=null&&{properties:_O(d,l)},url:eK(f,l)}},nK=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:c}=t0(n,t);if(i)throw new Ps(Sp(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))},xO=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=tK(n,t);if(r)return r}else if(n.type==="error")nK(n,t);else if(n.type==="tree"){const r=RO.evaluateTreeRule(n,t);if(r)return r}else throw new Ps(`Unknown endpoint rule: ${n}`);throw new Ps("Rules evaluation failed")},sK=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:c}=t0(n,t);if(i)return RO.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...c}})},RO={evaluateRules:xO,evaluateTreeRule:sK},CO=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:c}=e;t.logger?.debug?.(`${Au} Initial EndpointParams: ${hi(n)}`);const l=Object.entries(i).filter(([,h])=>h.default!=null).map(([h,y])=>[h,y.default]);if(l.length>0)for(const[h,y]of l)n[h]=n[h]??y;const f=Object.entries(i).filter(([,h])=>h.required).map(([h])=>h);for(const h of f)if(n[h]==null)throw new Ps(`Missing required parameter: '${h}'`);const d=xO(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Au} Resolved endpoint: ${hi(d)}`),d},TO=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!TO(n))return!1;return!0}return!(!bp(e)||e.length<3||e.length>63||e!==e.toLowerCase()||gO(e))},XR=":",rK="/",oK=e=>{const t=e.split(XR);if(t.length<6)return null;const[n,r,i,c,l,...f]=t;if(n!=="arn"||r===""||i===""||f.join(XR)==="")return null;const d=f.map(h=>h.split(rK)).flat();return{partition:r,service:i,region:c,accountId:l,resourceId:d}},iK=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],aK={partitions:iK};let cK=aK;const lK=e=>{const{partitions:t}=cK;for(const r of t){const{regions:i,outputs:c}=r;for(const[l,f]of Object.entries(i))if(l===e)return{...c,...f}}for(const r of t){const{regionRegex:i,outputs:c}=r;if(new RegExp(i).test(e))return{...c}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},n0={isVirtualHostableS3Bucket:TO,parseArn:oK,partition:lK};Tu.aws=n0;function uK(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,i=null]=n.split("=");r=decodeURIComponent(r),i&&(i=decodeURIComponent(i)),r in t?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}return t}const Iu=e=>{if(typeof e=="string")return Iu(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:c}=e;let l;return c&&(l=uK(c)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:l}};function fK(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function mr(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const WR=e=>ia.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,s0=e=>new Date(Date.now()+e),dK=(e,t)=>Math.abs(s0(t).getTime()-e)>=3e5,JR=(e,t)=>{const n=Date.parse(e);return dK(n,t)?n-Date.now():t},uu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},AO=async e=>{const t=uu("context",e.context),n=uu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],c=await uu("signer",n.signer)(r),l=e?.signingRegion,f=e?.signingRegionSet,d=e?.signingName;return{config:n,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}};class r0{async sign(t,n,r){if(!On.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await AO(r),{config:c,signer:l}=i;let{signingRegion:f,signingName:d}=i;const h=r.context;if(h?.authSchemes?.length??!1){const[g,v]=h.authSchemes;g?.name==="sigv4a"&&v?.name==="sigv4"&&(f=v?.signingRegion??f,d=v?.signingName??d)}return await l.sign(t,{signingDate:s0(c.systemClockOffset),signingRegion:f,signingService:d})}errorHandler(t){return n=>{const r=n.ServerTime??WR(n.$response);if(r){const i=uu("config",t.config),c=i.systemClockOffset;i.systemClockOffset=JR(r,i.systemClockOffset),i.systemClockOffset!==c&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=WR(t);if(r){const i=uu("config",n.config);i.systemClockOffset=JR(r,i.systemClockOffset)}}}class hK extends r0{async sign(t,n,r){if(!On.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}=await AO(r),y=(await i.sigv4aSigningRegionSet?.()??f??[l]).join(",");return await c.sign(t,{signingDate:s0(i.systemClockOffset),signingRegion:y,signingService:d})}}const pK=(e,t,n)=>{let r,i,c,l=!1;const f=async()=>{i||(i=e());try{r=await i,c=!0,l=!1}finally{i=void 0}return r};return async d=>((!c||d?.forceRefresh)&&(r=await f()),r)},mK=e=>(e.sigv4aSigningRegionSet=bc(e.sigv4aSigningRegionSet),e),gK="X-Amz-Algorithm",yK="X-Amz-Credential",IO="X-Amz-Date",vK="X-Amz-SignedHeaders",bK="X-Amz-Expires",OO="X-Amz-Signature",MO="X-Amz-Security-Token",DO="authorization",kO=IO.toLowerCase(),SK="date",_K=[DO,kO,SK],wK=OO.toLowerCase(),tb="x-amz-content-sha256",EK=MO.toLowerCase(),xK={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},RK=/^proxy-/,CK=/^sec-/,Ky="AWS4-HMAC-SHA256",TK="AWS4-HMAC-SHA256-PAYLOAD",AK="UNSIGNED-PAYLOAD",IK=50,PO="aws4_request",OK=3600*24*7,Hd={},Zy=[],Qy=(e,t,n)=>`${e}/${t}/${n}/${PO}`,MK=async(e,t,n,r,i)=>{const c=await eC(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${i}:${fs(c)}:${t.sessionToken}`;if(l in Hd)return Hd[l];for(Zy.push(l);Zy.length>IK;)delete Hd[Zy.shift()];let f=`AWS4${t.secretAccessKey}`;for(const d of[n,r,i,PO])f=await eC(e,f,d);return Hd[l]=f},eC=(e,t,n)=>{const r=new e(t);return r.update(Cu(n)),r.digest()},tC=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const c=i.toLowerCase();(c in xK||t?.has(c)||RK.test(c)||CK.test(c))&&(!n||n&&!n.has(c))||(r[c]=e[i].trim().replace(/\s+/g," "))}return r},DK=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",Yy=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===tb)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||DK(t)){const r=new n;return r.update(Cu(t)),fs(await r.digest())}return AK};class kK{format(t){const n=[];for(const c of Object.keys(t)){const l=mo(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=mo(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(NK.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!PK.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(nO(t.value.replace(/\-/g,"")),1),g}}}var nC;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(nC||(nC={}));const PK=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let NK=class NO{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&&sC(n),new NO(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&sC(t),parseInt(fs(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function sC(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const zK=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},LK=(e,t={})=>{const{headers:n,query:r={}}=On.clone(e);for(const i of Object.keys(n)){const c=i.toLowerCase();(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))&&(r[i]=n[i],delete n[i])}return{...e,headers:n,query:r}},rC=e=>{e=On.clone(e);for(const t of Object.keys(e.headers))_K.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},BK=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===wK)continue;const i=ea(r);t.push(i);const c=e[r];typeof c=="string"?n[i]=`${i}=${ea(c)}`:Array.isArray(c)&&(n[i]=c.slice(0).reduce((l,f)=>l.concat([`${i}=${ea(f)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},$K=e=>UK(e).toISOString().replace(/\.\d{3}Z$/,"Z"),UK=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class jK{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){this.service=i,this.sha256=c,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ds(r),this.credentialProvider=Ds(n)}createCanonicalRequest(t,n,r){const i=Object.keys(n).sort();return`${t.method} +`),RG={warn:console.warn},CG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fp(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),c=e.getUTCHours(),l=e.getUTCMinutes(),f=e.getUTCSeconds(),d=i<10?`0${i}`:`${i}`,h=c<10?`0${c}`:`${c}`,y=l<10?`0${l}`:`${l}`,g=f<10?`0${f}`:`${f}`;return`${CG[r]}, ${d} ${yb[n]} ${t} ${h}:${y}:${g} GMT`}const TG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),AG=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),IG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Mye=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=TG.exec(e);if(t){const[n,r,i,c,l,f,d,h]=t;return f0(_v(dp(c)),d0(i),Zc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h})}if(t=AG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return DG(f0(OG(c),d0(i),Zc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h}))}if(t=IG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return f0(_v(dp(h)),d0(r),Zc(i.trimLeft(),"day",1,31),{hours:c,minutes:l,seconds:f,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},f0=(e,t,n,r)=>{const i=t-1;return PG(e,i,n),new Date(Date.UTC(e,i,n,Zc(r.hours,"hour",0,23),Zc(r.minutes,"minute",0,59),Zc(r.seconds,"seconds",0,60),zG(r.fractionalMilliseconds)))},OG=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+_v(dp(e));return ne.getTime()-new Date().getTime()>MG?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,d0=e=>{const t=yb.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},kG=[31,28,31,30,31,30,31,31,30,31,30,31],PG=(e,t,n)=>{let r=kG[t];if(t===1&&NG(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${yb[t]} in ${e}: ${n}`)},NG=e=>e%4===0&&(e%100!==0||e%400===0),Zc=(e,t,n,r)=>{const i=EG(dp(e));if(ir)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},zG=e=>e==null?0:_G("0."+e)*1e3,dp=e=>{let t=0;for(;tt.toString(16).padStart(2,"0")),Kp=()=>{if(MC)return MC();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Vn[e[0]]+Vn[e[1]]+Vn[e[2]]+Vn[e[3]]+"-"+Vn[e[4]]+Vn[e[5]]+"-"+Vn[e[6]]+Vn[e[7]]+"-"+Vn[e[8]]+Vn[e[9]]+"-"+Vn[e[10]]+Vn[e[11]]+Vn[e[12]]+Vn[e[13]]+Vn[e[14]]+Vn[e[15]]},Si=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Si.from=e=>e&&typeof e=="object"&&(e instanceof Si||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Si(String(e)):Si(JSON.stringify(e));Si.fromObject=Si.from;function LG(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const vb="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",bb="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Sb="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",qO="(\\d?\\d)",VO="(\\d{4})",BG=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),$G=new RegExp(`^${vb}, ${qO} ${bb} ${VO} ${Sb} GMT$`),UG=new RegExp(`^${vb}, ${qO}-${bb}-(\\d\\d) ${Sb} GMT$`),jG=new RegExp(`^${vb} ${bb} ( [1-9]|\\d\\d) ${Sb} ${VO}$`),HG=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],FG=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},qG=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=BG.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,c,l,f,,d,h]=t;fo(r,1,12),fo(i,1,31),fo(c,0,23),fo(l,0,59),fo(f,0,60);const y=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(c),Number(l),Number(f),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(y.setUTCFullYear(Number(n)),h.toUpperCase()!="Z"){const[,g,v,b]=/([+-])(\d\d):(\d\d)/.exec(h)||[void 0,"+",0,0],_=g==="-"?1:-1;y.setTime(y.getTime()+_*(Number(v)*60*60*1e3+Number(b)*60*1e3))}return y},VG=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,c,l,f,d;if((d=$G.exec(e))?[,t,n,r,i,c,l,f]=d:(d=UG.exec(e))?([,t,n,r,i,c,l,f]=d,r=(Number(r)+1900).toString()):(d=jG.exec(e))&&([,n,t,i,c,l,f,r]=d),r&&l){const h=Date.UTC(Number(r),HG.indexOf(n),Number(t),Number(i),Number(c),Number(l),f?Math.round(parseFloat(`0.${f}`)*1e3):0);fo(t,1,31),fo(i,0,23),fo(c,0,59),fo(l,0,60);const y=new Date(h);return y.setUTCFullYear(Number(r)),y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function fo(e,t,n){const r=Number(e);if(rn)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function GG(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let c="";for(let l=0;l{const t=e.length,n=[];let r=!1,i,c=0;for(let l=0;l{l=l.trim();const f=l.length;return f<2?l:(l[0]==='"'&&l[f-1]==='"'&&(l=l.slice(1,f-1)),l.replace(/\\"/g,'"'))})},DC=/^-?\d*(\.\d+)?$/;class _f{string;type;constructor(t,n){if(this.string=t,this.type=n,!DC.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const n=t;return _f.prototype.isPrototypeOf(t)||n.type==="bigDecimal"&&DC.test(n.string)}}const KG="modulepreload",ZG=function(e){return"/"+e},kC={},En=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=ZG(h),h in kC)return;kC[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":KG,y||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),y)return new Promise((b,_)=>{v.addEventListener("load",b),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(l){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=l,window.dispatchEvent(f),!f.defaultPrevented)throw l}return i.then(l=>{for(const f of l||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};class Zp{serdeContext;setSerdeContext(t){this.serdeContext=t}}class KO extends Zp{options;constructor(t){super(),this.options=t}getRequestType(){return On}getResponseType(){return Da}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,n){if("url"in n){t.protocol=n.url.protocol,t.hostname=n.url.hostname,t.port=n.url.port?Number(n.url.port):void 0,t.path=n.url.pathname,t.fragment=n.url.hash||void 0,t.username=n.url.username||void 0,t.password=n.url.password||void 0,t.query||(t.query={});for(const[r,i]of n.url.searchParams.entries())t.query[r]=i;return t}else return t.protocol=n.protocol,t.hostname=n.hostname,t.port=n.port?Number(n.port):void 0,t.path=n.path,t.query={...n.query},t}setHostPrefix(t,n,r){if(this.serdeContext?.disableHostPrefix)return;const i=wt.of(n.input),c=Uc(n.traits??{});if(c.endpoint){let l=c.endpoint?.[0];if(typeof l=="string"){const f=[...i.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(const[d]of f){const h=r[d];if(typeof h!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);l=l.replace(`{${d}}`,h)}t.hostname=l+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await En(async()=>{const{EventStreamSerde:n}=await import("./index2.js");return{EventStreamSerde:n}},[]);return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,n,r,i,c){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class QG extends KO{async serializeRequest(t,n,r){const i={...n??{}},c=this.serializer,l={},f={},d=await r.endpoint(),h=wt.of(t?.input),y=h.getSchema();let g=!1,v;const b=new On({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:l,headers:f,body:void 0});if(d){this.updateServiceEndpoint(b,d),this.setHostPrefix(b,t,i);const _=Uc(t.traits);if(_.http){b.method=_.http[0];const[x,R]=_.http[1].split("?");b.path=="/"?b.path=x:b.path+=x;const C=new URLSearchParams(R??"");Object.assign(l,Object.fromEntries(C))}}for(const[_,x]of h.structIterator()){const R=x.getMergedTraits()??{},C=i[_];if(C==null&&!x.isIdempotencyToken()){if(R.httpLabel&&(b.path.includes(`{${_}+}`)||b.path.includes(`{${_}}`)))throw new Error(`No value provided for input HTTP label: ${_}.`);continue}if(R.httpPayload)x.isStreaming()?x.isStructSchema()?i[_]&&(v=await this.serializeEventStream({eventStream:i[_],requestSchema:h})):v=C:(c.write(x,C),v=c.flush()),delete i[_];else if(R.httpLabel){c.write(x,C);const A=c.flush();b.path.includes(`{${_}+}`)?b.path=b.path.replace(`{${_}+}`,A.split("/").map(up).join("/")):b.path.includes(`{${_}}`)&&(b.path=b.path.replace(`{${_}}`,up(A))),delete i[_]}else if(R.httpHeader)c.write(x,C),f[R.httpHeader.toLowerCase()]=String(c.flush()),delete i[_];else if(typeof R.httpPrefixHeaders=="string"){for(const[A,O]of Object.entries(C)){const D=R.httpPrefixHeaders+A;c.write([x.getValueSchema(),{httpHeader:D}],O),f[D.toLowerCase()]=c.flush()}delete i[_]}else R.httpQuery||R.httpQueryParams?(this.serializeQuery(x,C,l),delete i[_]):g=!0}return g&&i&&(c.write(y,i),v=c.flush()),b.headers=f,b.query=l,b.body=v,b}serializeQuery(t,n,r){const i=this.serializer,c=t.getMergedTraits();if(c.httpQueryParams){for(const[l,f]of Object.entries(n))if(!(l in r)){const d=t.getValueSchema();Object.assign(d.getMergedTraits(),{...c,httpQuery:l,httpQueryParams:void 0}),this.serializeQuery(d,f,r)}return}if(t.isListSchema()){const l=!!t.getMergedTraits().sparse,f=[];for(const d of n){i.write([t.getValueSchema(),c],d);const h=i.flush();(l||h!==void 0)&&f.push(h)}r[c.httpQuery]=f}else i.write([t,c],n),r[c.httpQuery]=i.flush()}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await bi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=await this.deserializeHttpMessage(c,n,r,l);if(f.length){const d=await bi(r.body,n);if(d.byteLength>0){const h=await i.read(c,d);for(const y of f)l[y]=h[y]}}else f.discardResponseBody&&await bi(r.body,n);return l.$metadata=this.deserializeMetadata(r),l}async deserializeHttpMessage(t,n,r,i,c){let l;i instanceof Set?l=c:l=i;let f=!0;const d=this.deserializer,h=wt.of(t),y=[];for(const[g,v]of h.structIterator()){const b=v.getMemberTraits();if(b.httpPayload){if(f=!1,v.isStreaming())v.isStructSchema()?l[g]=await this.deserializeEventStream({response:r,responseSchema:h}):l[g]=UO(r.body);else if(r.body){const x=await bi(r.body,n);x.byteLength>0&&(l[g]=await d.read(v,x))}}else if(b.httpHeader){const _=String(b.httpHeader).toLowerCase(),x=r.headers[_];if(x!=null)if(v.isListSchema()){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_;let C;R.isTimestampSchema()&&R.getSchema()===4?C=GG(x,",",2):C=GO(x);const A=[];for(const O of C)A.push(await d.read(R,O.trim()));l[g]=A}else l[g]=await d.read(v,x)}else if(b.httpPrefixHeaders!==void 0){l[g]={};for(const[_,x]of Object.entries(r.headers))if(_.startsWith(b.httpPrefixHeaders)){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_,l[g][_.slice(b.httpPrefixHeaders.length)]=await d.read(R,x)}}else b.httpResponseCode?l[g]=r.statusCode:y.push(g)}return y.discardResponseBody=f,y}}class YG extends KO{async serializeRequest(t,n,r){const i=this.serializer,c={},l={},f=await r.endpoint(),d=wt.of(t?.input),h=d.getSchema();let y;const g=new On({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:c,headers:l,body:void 0});f&&(this.updateServiceEndpoint(g,f),this.setHostPrefix(g,t,n));const v={...n};if(n){const b=d.getEventStreamMember();if(b){if(v[b]){const _={};for(const[x,R]of d.structIterator())x!==b&&v[x]&&(i.write(R,v[x]),_[x]=i.flush());y=await this.serializeEventStream({eventStream:v[b],requestSchema:d,initialRequest:_})}}else i.write(h,v),y=i.flush()}return g.headers=l,g.query=c,g.body=y,g.method="POST",g}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await bi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=c.getEventStreamMember();if(f)l[f]=await this.deserializeEventStream({response:r,responseSchema:c,initialResponseContainer:l});else{const d=await bi(r.body,n);d.byteLength>0&&Object.assign(l,await i.read(c,d))}return l.$metadata=this.deserializeMetadata(r),l}}function Qp(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:c}=e.getMergedTraits();return(t.httpBindings?typeof r=="string"||i?6:c||n?5:void 0:void 0)??t.timestampFormat.default}class ZO extends Zp{settings;constructor(t){super(),this.settings=t}read(t,n){const r=wt.of(t);if(r.isListSchema())return GO(n).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??ka)(n);if(r.isTimestampSchema())switch(Qp(r,this.settings)){case 5:return qG(n);case 6:return VG(n);case 7:return FG(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let c=n;if(i)return r.getMergedTraits().httpHeader&&(c=this.base64ToUtf8(c)),(i==="application/json"||i.endsWith("+json"))&&(c=Si.from(c)),c}return r.isNumericSchema()?Number(n):r.isBigIntegerSchema()?BigInt(n):r.isBigDecimalSchema()?new _f(n,"bigDecimal"):r.isBooleanSchema()?String(n).toLowerCase()==="true":n}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??$a)((this.serdeContext?.base64Decoder??ka)(t))}}class XG extends Zp{codecDeserializer;stringDeserializer;constructor(t,n){super(),this.codecDeserializer=t,this.stringDeserializer=new ZO(n)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,n){const r=wt.of(t),i=r.getMergedTraits(),c=this.serdeContext?.utf8Encoder??$a;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,c(n));if(i.httpPayload){if(r.isBlobSchema()){const l=this.serdeContext?.utf8Decoder??bo;return typeof n=="string"?l(n):n}else if(r.isStringSchema())return"byteLength"in n?c(n):n}return this.codecDeserializer.read(r,n)}}class WG extends Zp{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);switch(typeof n){case"object":if(n===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(n instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${n} when schema expected Date in ${r.getName(!0)}`);switch(Qp(r,this.settings)){case 5:this.stringBuffer=n.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=fp(n);break;case 7:this.stringBuffer=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",n),this.stringBuffer=String(n.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in n){this.stringBuffer=(this.serdeContext?.base64Encoder??Ti)(n);return}if(r.isListSchema()&&Array.isArray(n)){let l="";for(const f of n){this.write([r.getValueSchema(),r.getMergedTraits()],f);const d=this.flush(),h=r.getValueSchema().isTimestampSchema()?d:LG(d);l!==""&&(l+=", "),l+=h}this.stringBuffer=l;return}this.stringBuffer=JSON.stringify(n,null,2);break;case"string":const i=r.getMergedTraits().mediaType;let c=n;if(i&&((i==="application/json"||i.endsWith("+json"))&&(c=Si.from(c)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??Ti)(c.toString());return}this.stringBuffer=n;break;default:r.isIdempotencyToken()?this.stringBuffer=Kp():this.stringBuffer=String(n)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class JG{codecSerializer;stringSerializer;buffer;constructor(t,n,r=new WG(n)){this.codecSerializer=t,this.stringSerializer=r}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,n){const r=wt.of(t),i=r.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(r,n),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,n)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function eK(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class QO{authSchemes=new Map;constructor(t){for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const tK=e=>function(n){return YO(n)&&n.expiration.getTime()-Date.now()e.expiration!==void 0,rK=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let i,c,l,f=!1;const d=async h=>{c||(c=r(h));try{i=await c,l=!0,f=!1}finally{c=void 0}return i};return t===void 0?async h=>((!l||h?.forceRefresh)&&(i=await d(h)),i):async h=>((!l||h?.forceRefresh)&&(i=await d(h)),f?i:n(i)?(t(i)&&await d(h),i):(f=!0,i))},oK=void 0;function iK(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function XO(e){const t=Gc(e.userAgentAppId??oK),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!iK(r)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class WO{capacity;data=new Map;parameters=[];constructor({size:t,params:n}){this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const i=this.data.keys();let c=0;for(;;){const{value:l,done:f}=i.next();if(this.data.delete(l),f||++c>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const i of r){const c=String(t[i]??"");if(c.includes("|;"))return!1;n+=c+"|;"}return n}}const aK=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),JO=e=>aK.test(e)||e.startsWith("[")&&e.endsWith("]"),cK=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Yp=(e,t=!1)=>{if(!t)return cK.test(e);const n=e.split(".");for(const r of n)if(!Yp(r))return!1;return!0},lf={},uf="endpoints";function Ai(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Ai(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ai).join(", ")})`:JSON.stringify(e,null,2)}class zs extends Error{constructor(t){super(t),this.name="EndpointError"}}const lK=(e,t)=>e===t,uK=e=>{const t=e.split("."),n=[];for(const r of t){const i=r.indexOf("[");if(i!==-1){if(r.indexOf("]")!==r.length-1)throw new zs(`Path: '${e}' does not end with ']'`);const c=r.slice(i+1,-1);if(Number.isNaN(parseInt(c)))throw new zs(`Invalid array index: '${c}' in path: '${e}'`);i!==0&&n.push(r.slice(0,i)),n.push(c)}else n.push(r)}return n},eM=(e,t)=>uK(t).reduce((n,r)=>{if(typeof n!="object")throw new zs(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),fK=e=>e!=null,dK=e=>!e,h0={[af.HTTP]:80,[af.HTTPS]:443},hK=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:v,port:b,protocol:_="",path:x="",query:R={}}=e,C=new URL(`${_}//${v}${b?`:${b}`:""}${x}`);return C.search=Object.entries(R).map(([A,O])=>`${A}=${O}`).join("&"),C}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:c,protocol:l,search:f}=t;if(f)return null;const d=l.slice(0,-1);if(!Object.values(af).includes(d))return null;const h=JO(i),y=n.includes(`${r}:${h0[d]}`)||typeof e=="string"&&e.includes(`${r}:${h0[d]}`),g=`${r}${y?`:${h0[d]}`:""}`;return{scheme:d,authority:g,path:c,normalizedPath:c.endsWith("/")?c:`${c}/`,isIp:h}},pK=(e,t)=>e===t,mK=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),yK={booleanEquals:lK,getAttr:eM,isSet:fK,isValidHostLabel:Yp,not:dK,parseURL:hK,stringEquals:pK,substring:mK,uriEncode:gK},tM=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i({...t.endpointParams,...t.referenceRecord})[e],Xp=(e,t,n)=>{if(typeof e=="string")return tM(e,n);if(e.fn)return sM.callFunction(e,n);if(e.ref)return vK(e,n);throw new zs(`'${t}': ${String(e)} is not a string, function or reference.`)},nM=({fn:e,argv:t},n)=>{const r=t.map(c=>["boolean","number"].includes(typeof c)?c:sM.evaluateExpression(c,"arg",n)),i=e.split(".");return i[0]in lf&&i[1]!=null?lf[i[0]][i[1]](...r):yK[e](...r)},sM={evaluateExpression:Xp,callFunction:nM},bK=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new zs(`'${e}' is already defined in Reference Record.`);const r=nM(t,n);return n.logger?.debug?.(`${uf} evaluateCondition: ${Ai(t)} = ${Ai(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},_b=(e=[],t)=>{const n={};for(const r of e){const{result:i,toAssign:c}=bK(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!i)return{result:i};c&&(n[c.name]=c.value,t.logger?.debug?.(`${uf} assign: ${c.name} := ${Ai(c.value)}`))}return{result:!0,referenceRecord:n}},SK=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:i.map(c=>{const l=Xp(c,"Header value entry",t);if(typeof l!="string")throw new zs(`Header '${r}' value '${l}' is not a string`);return l})}),{}),rM=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:iM.getEndpointProperty(i,t)}),{}),oM=(e,t)=>{if(Array.isArray(e))return e.map(n=>oM(n,t));switch(typeof e){case"string":return tM(e,t);case"object":if(e===null)throw new zs(`Unexpected endpoint property: ${e}`);return iM.getEndpointProperties(e,t);case"boolean":return e;default:throw new zs(`Unexpected endpoint property type: ${typeof e}`)}},iM={getEndpointProperty:oM,getEndpointProperties:rM},_K=(e,t)=>{const n=Xp(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new zs(`Endpoint URL must be a string, got ${typeof n}`)},wK=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:c}=_b(n,t);if(!i)return;const l={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:d,headers:h}=r;return t.logger?.debug?.(`${uf} Resolving endpoint from template: ${Ai(r)}`),{...h!=null&&{headers:SK(h,l)},...d!=null&&{properties:rM(d,l)},url:_K(f,l)}},EK=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:c}=_b(n,t);if(i)throw new zs(Xp(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))},aM=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=wK(n,t);if(r)return r}else if(n.type==="error")EK(n,t);else if(n.type==="tree"){const r=cM.evaluateTreeRule(n,t);if(r)return r}else throw new zs(`Unknown endpoint rule: ${n}`);throw new zs("Rules evaluation failed")},xK=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:c}=_b(n,t);if(i)return cM.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...c}})},cM={evaluateRules:aM,evaluateTreeRule:xK},lM=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:c}=e;t.logger?.debug?.(`${uf} Initial EndpointParams: ${Ai(n)}`);const l=Object.entries(i).filter(([,h])=>h.default!=null).map(([h,y])=>[h,y.default]);if(l.length>0)for(const[h,y]of l)n[h]=n[h]??y;const f=Object.entries(i).filter(([,h])=>h.required).map(([h])=>h);for(const h of f)if(n[h]==null)throw new zs(`Missing required parameter: '${h}'`);const d=aM(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${uf} Resolved endpoint: ${Ai(d)}`),d},uM=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!uM(n))return!1;return!0}return!(!Yp(e)||e.length<3||e.length>63||e!==e.toLowerCase()||JO(e))},PC=":",RK="/",CK=e=>{const t=e.split(PC);if(t.length<6)return null;const[n,r,i,c,l,...f]=t;if(n!=="arn"||r===""||i===""||f.join(PC)==="")return null;const d=f.map(h=>h.split(RK)).flat();return{partition:r,service:i,region:c,accountId:l,resourceId:d}},TK=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],AK={partitions:TK};let IK=AK;const OK=e=>{const{partitions:t}=IK;for(const r of t){const{regions:i,outputs:c}=r;for(const[l,f]of Object.entries(i))if(l===e)return{...c,...f}}for(const r of t){const{regionRegex:i,outputs:c}=r;if(new RegExp(i).test(e))return{...c}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},wb={isVirtualHostableS3Bucket:uM,parseArn:CK,partition:OK};lf.aws=wb;function MK(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,i=null]=n.split("=");r=decodeURIComponent(r),i&&(i=decodeURIComponent(i)),r in t?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}return t}const ff=e=>{if(typeof e=="string")return ff(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:c}=e;let l;return c&&(l=MK(c)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:l}};function DK(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function yr(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const NC=e=>Da.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Eb=e=>new Date(Date.now()+e),kK=(e,t)=>Math.abs(Eb(t).getTime()-e)>=3e5,zC=(e,t)=>{const n=Date.parse(e);return kK(n,t)?n-Date.now():t},Vu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},fM=async e=>{const t=Vu("context",e.context),n=Vu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],c=await Vu("signer",n.signer)(r),l=e?.signingRegion,f=e?.signingRegionSet,d=e?.signingName;return{config:n,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}};class xb{async sign(t,n,r){if(!On.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await fM(r),{config:c,signer:l}=i;let{signingRegion:f,signingName:d}=i;const h=r.context;if(h?.authSchemes?.length??!1){const[g,v]=h.authSchemes;g?.name==="sigv4a"&&v?.name==="sigv4"&&(f=v?.signingRegion??f,d=v?.signingName??d)}return await l.sign(t,{signingDate:Eb(c.systemClockOffset),signingRegion:f,signingService:d})}errorHandler(t){return n=>{const r=n.ServerTime??NC(n.$response);if(r){const i=Vu("config",t.config),c=i.systemClockOffset;i.systemClockOffset=zC(r,i.systemClockOffset),i.systemClockOffset!==c&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=NC(t);if(r){const i=Vu("config",n.config);i.systemClockOffset=zC(r,i.systemClockOffset)}}}class PK extends xb{async sign(t,n,r){if(!On.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}=await fM(r),y=(await i.sigv4aSigningRegionSet?.()??f??[l]).join(",");return await c.sign(t,{signingDate:Eb(i.systemClockOffset),signingRegion:y,signingService:d})}}const NK=(e,t,n)=>{let r,i,c,l=!1;const f=async()=>{i||(i=e());try{r=await i,c=!0,l=!1}finally{i=void 0}return r};return async d=>((!c||d?.forceRefresh)&&(r=await f()),r)},zK=e=>(e.sigv4aSigningRegionSet=Gc(e.sigv4aSigningRegionSet),e),LK="X-Amz-Algorithm",BK="X-Amz-Credential",dM="X-Amz-Date",$K="X-Amz-SignedHeaders",UK="X-Amz-Expires",hM="X-Amz-Signature",pM="X-Amz-Security-Token",mM="authorization",gM=dM.toLowerCase(),jK="date",HK=[mM,gM,jK],FK=hM.toLowerCase(),wv="x-amz-content-sha256",qK=pM.toLowerCase(),VK={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},GK=/^proxy-/,KK=/^sec-/,p0="AWS4-HMAC-SHA256",ZK="AWS4-HMAC-SHA256-PAYLOAD",QK="UNSIGNED-PAYLOAD",YK=50,yM="aws4_request",XK=3600*24*7,Sh={},m0=[],g0=(e,t,n)=>`${e}/${t}/${n}/${yM}`,WK=async(e,t,n,r,i)=>{const c=await LC(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${i}:${fs(c)}:${t.sessionToken}`;if(l in Sh)return Sh[l];for(m0.push(l);m0.length>YK;)delete Sh[m0.shift()];let f=`AWS4${t.secretAccessKey}`;for(const d of[n,r,i,yM])f=await LC(e,f,d);return Sh[l]=f},LC=(e,t,n)=>{const r=new e(t);return r.update(cf(n)),r.digest()},BC=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const c=i.toLowerCase();(c in VK||t?.has(c)||GK.test(c)||KK.test(c))&&(!n||n&&!n.has(c))||(r[c]=e[i].trim().replace(/\s+/g," "))}return r},JK=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",y0=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===wv)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||JK(t)){const r=new n;return r.update(cf(t)),fs(await r.digest())}return QK};class eZ{format(t){const n=[];for(const c of Object.keys(t)){const l=bo(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=bo(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(nZ.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!tZ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set($O(t.value.replace(/\-/g,"")),1),g}}}var $C;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})($C||($C={}));const tZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let nZ=class vM{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&&UC(n),new vM(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&UC(t),parseInt(fs(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function UC(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const sZ=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},rZ=(e,t={})=>{const{headers:n,query:r={}}=On.clone(e);for(const i of Object.keys(n)){const c=i.toLowerCase();(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))&&(r[i]=n[i],delete n[i])}return{...e,headers:n,query:r}},jC=e=>{e=On.clone(e);for(const t of Object.keys(e.headers))HK.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},oZ=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===FK)continue;const i=Ca(r);t.push(i);const c=e[r];typeof c=="string"?n[i]=`${i}=${Ca(c)}`:Array.isArray(c)&&(n[i]=c.slice(0).reduce((l,f)=>l.concat([`${i}=${Ca(f)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},iZ=e=>aZ(e).toISOString().replace(/\.\d{3}Z$/,"Z"),aZ=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class cZ{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){this.service=i,this.sha256=c,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ps(r),this.credentialProvider=Ps(n)}createCanonicalRequest(t,n,r){const i=Object.keys(n).sort();return`${t.method} ${this.getCanonicalPath(t)} -${BK(t)} +${oZ(t)} ${i.map(c=>`${c}:${n[c]}`).join(` `)} ${i.join(";")} -${r}`}async createStringToSign(t,n,r,i){const c=new this.sha256;c.update(Cu(r));const l=await c.digest();return`${i} +${r}`}async createStringToSign(t,n,r,i){const c=new this.sha256;c.update(cf(r));const l=await c.digest();return`${i} ${t} ${n} -${fs(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const c of t.split("/"))c?.length!==0&&c!=="."&&(c===".."?n.pop():n.push(c));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return ea(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=$K(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class nb extends jK{headerFormatter=new kK;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>OK)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=Qy(_,v,y??this.service),R=LK(rC(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[MO]=g.sessionToken),R.query[gK]=Ky,R.query[yK]=`${g.accessKeyId}/${x}`,R.query[IO]=b,R.query[bK]=i.toString(10);const C=tC(R,c,f);return R.query[vK]=this.getCanonicalHeaderList(C),R.query[OO]=await this.getSignature(b,x,this.getSigningKey(g,v,_,y),this.createCanonicalRequest(R,C,await Yy(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=Qy(d,f,l??this.service),g=await Yy({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const b=fs(await v.digest()),_=[TK,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(Cu(t)),fs(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=rC(t),{longDate:y,shortDate:g}=this.formatDate(n),v=Qy(g,d,l??this.service);h.headers[kO]=y,f.sessionToken&&(h.headers[EK]=f.sessionToken);const b=await Yy(h,this.sha256);!zK(tb,h.headers)&&this.applyChecksum&&(h.headers[tb]=b);const _=tC(h,i,r),x=await this.getSignature(y,v,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,b));return h.headers[DO]=`${Ky} Credential=${f.accessKeyId}/${v}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,Ky),l=new this.sha256(await r);return l.update(Cu(c)),fs(await l.digest())}getSigningKey(t,n,r,i){return MK(this.sha256,t,r,n,i||this.service)}}const zO=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=HK(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=FK(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)?fK(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=bc(e.signer):e.regionInfoProvider?f=()=>bc(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||nb;return new _(b)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await bc(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||nb;return new b(v)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function HK(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=LG(t,zG,hO):n?r=bc(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 FK(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 oC=typeof TextEncoder=="function"?new TextEncoder:null,LO=e=>{if(typeof e=="string"){if(oC)return oC.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}`)},qi=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},Qo=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Nh=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((v,b)=>iC[b.step]-iC[v.step]||aC[b.priority||"normal"]-aC[v.priority||"normal"]),c=g=>{let v=!1;const b=_=>{const x=qi(_.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 qi(_.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 qi(C.name,C.aliases))_[A]=C;v.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of qi(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 ${Qo(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=qi(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${Qo(b,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(U=>U===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${Qo(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${Qo(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=qi(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${Qo(b,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(U=>U===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${Qo(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${Qo(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(Nh()),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=qi(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(Nh());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 Qo(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},iC={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},aC={high:3,normal:2,low:1};class BO{config;middlewareStack=Nh();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 Xy="***SensitiveInformation***";function sb(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return Xy;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Xy}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Xy}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=sb(l,r[c]));return i}return t}class Pr{middlewareStack=Nh();schema;static classBuilder(){return new qK}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 qK{_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 Pr{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?sb.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?sb.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Qi 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 Qi.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===Qi?Qi.isInstance(t):Qi.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const cC=(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},$O=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{}}},VK=e=>{const t=[];for(const n in Mh){const r=Mh[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},GK=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},KK=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),ZK=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},UO=e=>Object.assign(VK(e),KK(e)),jO=e=>Object.assign(GK(e),ZK(e)),HO=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]=HO(e[n]));return e};class o0{trace(){}debug(){}info(){}warn(){}error(){}}class FO{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=cC(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 cC(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 _p{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*qO(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 YK(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function XK(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class rb{value;constructor(t){this.value=t}toString(){return XK(""+this.value)}}class es{name;children;attributes={};static of(t,n,r){const i=new es(t);return n!==void 0&&i.addChildNode(new rb(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=es.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 es(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}="${YK(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let Wy;function WK(e){Wy||(Wy=new DOMParser);const t=Wy.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 VO extends _p{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new fO(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??ha)(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 QK(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=WK(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]),HO(c)}return{}}}class JK extends _p{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??di)(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(gp()));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 $u?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),vp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(kh(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 qO(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+=`&${Dh(t)}=`}writeValue(t){this.buffer+=Dh(t)}}class eZ extends IG{options;serializer;deserializer;mixin=new FO;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 JK(n),this.deserializer=new VO(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"}),(th(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 ri(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 ri(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 tZ extends eZ{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 nZ=(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 sZ extends _p{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??aa)(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=es.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of qO(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=es.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=es.of(y);if(typeof g!="string")if(n instanceof es||n instanceof rb)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=es.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=es.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=es.of(h,O),[U,B]=this.getXmlnsAttribute(f,R);B&&N.addAttribute(U,B),A.addChildNode(N);let k=es.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=es.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=es.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=es.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??di)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(vp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=kh(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=kh(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof $u?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=gp():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 rb(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 rZ extends _p{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new sZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new VO(this.settings);return t.setSerdeContext(this.serdeContext),t}}class oZ extends AG{codec;serializer;deserializer;mixin=new FO;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new rZ(n),this.serializer=new DG(this.codec.createSerializer(),n),this.deserializer=new OG(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=nZ(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 iZ=/\d{12}\.ddb/;async function aZ(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&mr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?mr(e,"RETRY_MODE_ADAPTIVE","F"):mr(e,"RETRY_MODE_STANDARD","E"):mr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match(iZ)&&mr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":mr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":mr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":mr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&mr(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))mr(e,l,f)}}const lC="user-agent",Jy="x-amz-user-agent",uC=" ",ev="/",cZ=/[^!$%&'*+\-.^_`|~\w]/g,lZ=/[^!$%&'*+\-.^_`|~\w#]/g,fC="-",uZ=1024;function fZ(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 dZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!On.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(Fd)||[],f=(await e.defaultUserAgentProvider()).map(Fd);await aZ(n,e,r);const d=n;f.push(`m/${fZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(Fd)||[],y=await e.userAgentAppId();y&&f.push(Fd(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(uC),v=[...f.filter(b=>b.startsWith("aws-sdk-")),...h].join(uC);return e.runtime!=="browser"?(v&&(c[Jy]=c[Jy]?`${c[lC]} ${v}`:v),c[lC]=g):c[Jy]=g,t({...r,request:i})},Fd=e=>{const t=e[0].split(ev).map(l=>l.replace(cZ,fC)).join(ev),n=e[1]?.replace(lZ,fC),r=t.indexOf(ev),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}`}},"")},hZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},GO=e=>({applyToStack:t=>{t.add(dZ(e),hZ)}}),KO=!1,ZO=!1,dC=new Set,pZ=(e,t=bp)=>{if(!dC.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 dC.add(e)},QO=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),mZ=e=>QO(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,YO=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=mZ(r);return pZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return QO(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},hC="content-length";function gZ(e){return t=>async n=>{const r=n.request;if(On.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(hC)===-1)try{const l=e(i);r.headers={...r.headers,[hC]:String(l)}}catch{}}return t({...n,request:r})}}const yZ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},XO=e=>({applyToStack:t=>{t.add(gZ(e.bodyLengthChecker),yZ)}}),vZ=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),EZ(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},bZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,SZ=/(\d+\.){3}\d+/,_Z=/\.\./,wZ=e=>bZ.test(e)&&!SZ.test(e)&&!_Z.test(e),EZ=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},xZ=(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},WO=async e=>{},JO=e=>typeof e=="object"?"url"in e?Iu(e.url):e:Iu(e),RZ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await WO(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(JO(l)),n.isCustomEndpoint=!0)}const i=await eM(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},eM=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 xZ(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 vZ(r),r},CZ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&kG(r,"ENDPOINT_OVERRIDE","N");const c=await RZ(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=yo(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})},TZ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:OV.name},vo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(CZ({config:e,instructions:t}),TZ)}}),tM=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>JO(await Ds(n)()):void 0,f=Object.assign(e,{endpoint:c,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:Ds(r??!1),useFipsEndpoint:Ds(i??!1)});let d;return f.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=WO(e.serviceId)),d),f};var Ic;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Ic||(Ic={}));const Ou=3,nM=Ic.STANDARD,AZ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],IZ=["TimeoutError","RequestTimeout","RequestTimeoutException"],OZ=[500,502,503,504],MZ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],DZ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],kZ=e=>e?.$retryable!==void 0,PZ=e=>e.$metadata?.clockSkewCorrected,NZ=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},sM=e=>e.$metadata?.httpStatusCode===429||AZ.includes(e.name)||e.$retryable?.throttling==!0,i0=(e,t=0)=>kZ(e)||PZ(e)||IZ.includes(e.name)||MZ.includes(e?.code||"")||DZ.includes(e?.code||"")||OZ.includes(e.$metadata?.httpStatusCode||0)||NZ(e)||e.cause!==void 0&&t<=10&&i0(e.cause,t+1),zZ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!i0(e)}return!1};class a0{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=>a0.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(),sM(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 ob=100,rM=20*1e3,LZ=500,pC=500,BZ=5,$Z=10,UZ=1,jZ="amz-sdk-invocation-id",HZ="amz-sdk-request",FZ=()=>{let e=ob;return{computeNextBackoffDelay:r=>Math.floor(Math.min(rM,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},mC=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(rM,e),getRetryCost:()=>n});class oM{maxAttempts;mode=Ic.STANDARD;capacity=pC;retryBackoffStrategy=FZ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return mC({retryDelay:ob,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"?LZ:ob);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,mC({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(pC,this.capacity+(t.getRetryCost()??UZ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Ou}`),Ou}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?$Z:BZ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class qZ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=Ic.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new a0,this.standardRetryStrategy=new oM(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 VZ=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}`),iM=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ds(r??Ou);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ds(n)()===Ic.ADAPTIVE?new qZ(i):new oM(i))})},GZ=e=>e?.body instanceof ReadableStream,KZ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(ZZ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=On.isInstance(y);for(g&&(y.headers[jZ]=gp());;)try{g&&(y.headers[HZ]=`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=QZ(v);if(f=VZ(v),g&&GZ(y))throw(n.logger instanceof o0?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)},ZZ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",QZ=e=>{const t={error:e,errorType:YZ(e)},n=WZ(e.$response);return n&&(t.retryAfterHint=n),t},YZ=e=>sM(e)?"THROTTLING":i0(e)?"TRANSIENT":zZ(e)?"SERVER_ERROR":"CLIENT_ERROR",XZ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},aM=e=>({applyToStack:t=>{t.add(KZ(e),XZ)}}),WZ=e=>{if(!ia.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)},JZ=async(e,t,n)=>({operation:yo(t).operation,region:await Ds(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function eQ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const tQ=e=>{const t=[];switch(e.operation){default:t.push(eQ(e))}return t},nQ=e=>{const t=zO(e);return Object.assign(t,{authSchemePreference:Ds(e.authSchemePreference??[])})},sQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),zc={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rQ="3.975.0",oQ={version:rQ},cM=e=>new TextEncoder().encode(e);var iQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:cM;function ca(e){return e instanceof Uint8Array?e:typeof e=="string"?iQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function zh(e){return typeof e=="string"?e.length===0:e.byteLength===0}function aQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function cQ(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 er=64,hQ=32,pQ=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]),mQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],gQ=Math.pow(2,53)-1,nh=(function(){function e(){this.state=Int32Array.from(mQ),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===er&&(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%er>=er-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+(pQ[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})(),yQ=(function(){function e(t){this.secret=t,this.hash=new nh,this.reset()}return e.prototype.update=function(t){if(!(zh(t)||this.error))try{this.hash.update(ca(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 uM(this,void 0,void 0,function(){return fM(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new nh,this.secret){this.outer=new nh;var t=vQ(this.secret),n=new Uint8Array(er);n.set(t);for(var r=0;rer){var n=new nh;n.update(t),t=n.digest()}var r=new Uint8Array(er);return r.set(t),r}var bQ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function dM(e){if(SQ(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return _Q(t)}return!1}function SQ(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function _Q(e){return e&&bQ.every(function(t){return typeof e[t]=="function"})}var hM=(function(){function e(t){dM(li())?this.hash=new fQ(t):this.hash=new yQ(t)}return e.prototype.update=function(t,n){this.hash.update(ca(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const pM=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??yC.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??yC.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},yC={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"}},mM=e=>()=>Promise.reject(e),wQ=["in-region","cross-region","mobile","standard","legacy"],gM=({defaultsMode:e}={})=>pK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(EQ()?"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}`)}}),EQ=()=>{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},yM="required",nr="fn",sr="argv",Lc="ref",vC=!0,bC="isSet",Mu="booleanEquals",ic="error",ac="endpoint",so="tree",c0="PartitionResult",l0="getAttr",SC={[yM]:!1,type:"string"},_C={[yM]:!0,default:!1,type:"boolean"},wC={[Lc]:"Endpoint"},vM={[nr]:Mu,[sr]:[{[Lc]:"UseFIPS"},!0]},bM={[nr]:Mu,[sr]:[{[Lc]:"UseDualStack"},!0]},Ys={},EC={[nr]:l0,[sr]:[{[Lc]:c0},"supportsFIPS"]},SM={[Lc]:c0},xC={[nr]:Mu,[sr]:[!0,{[nr]:l0,[sr]:[SM,"supportsDualStack"]}]},RC=[vM],CC=[bM],TC=[{[Lc]:"Region"}],xQ={parameters:{Region:SC,UseDualStack:_C,UseFIPS:_C,Endpoint:SC},rules:[{conditions:[{[nr]:bC,[sr]:[wC]}],rules:[{conditions:RC,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ic},{conditions:CC,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ic},{endpoint:{url:wC,properties:Ys,headers:Ys},type:ac}],type:so},{conditions:[{[nr]:bC,[sr]:TC}],rules:[{conditions:[{[nr]:"aws.partition",[sr]:TC,assign:c0}],rules:[{conditions:[vM,bM],rules:[{conditions:[{[nr]:Mu,[sr]:[vC,EC]},xC],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ys,headers:Ys},type:ac}],type:so},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ic}],type:so},{conditions:RC,rules:[{conditions:[{[nr]:Mu,[sr]:[EC,vC]}],rules:[{conditions:[{[nr]:"stringEquals",[sr]:[{[nr]:l0,[sr]:[SM,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ys,headers:Ys},type:ac},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ys,headers:Ys},type:ac}],type:so},{error:"FIPS is enabled but this partition does not support FIPS",type:ic}],type:so},{conditions:CC,rules:[{conditions:[xC],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ys,headers:Ys},type:ac}],type:so},{error:"DualStack is enabled but this partition does not support DualStack",type:ic}],type:so},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ys,headers:Ys},type:ac}],type:so}],type:so},{error:"Invalid Configuration: Missing Region",type:ic}]},RQ=xQ,CQ=new mO({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),TQ=(e,t={})=>CQ.get(e,()=>CO(RQ,{endpointParams:e,logger:t.logger}));Tu.aws=n0;const AQ=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??aa,base64Encoder:e?.base64Encoder??di,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??TQ,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??tQ,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new r0}],logger:e?.logger??new o0,protocol:e?.protocol??tZ,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??Iu,utf8Decoder:e?.utf8Decoder??mo,utf8Encoder:e?.utf8Encoder??ha}),IQ=e=>{const t=gM(e),n=()=>t().then($O),r=AQ(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??LO,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??pM({serviceId:r.serviceId,clientVersion:oQ.version}),maxAttempts:e?.maxAttempts??Ou,region:e?.region??mM("Region is missing"),requestHandler:mp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||nM),sha256:e?.sha256??hM,streamCollector:e?.streamCollector??Qb,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(KO)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(ZO))}},_M=e=>({setRegion(t){e.region=t},region(){return e.region}}),wM=e=>({region:e.region()}),OQ=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}}},MQ=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),DQ=(e,t)=>{const n=Object.assign(_M(e),UO(e),G2(e),OQ(e));return t.forEach(r=>r.configure(n)),Object.assign(e,wM(n),jO(n),K2(n),MQ(n))};class kQ extends BO{config;constructor(...[t]){const n=IQ(t||{});super(n),this.initConfig=n;const r=sQ(n),i=pO(r),c=iM(i),l=YO(c),f=l,d=tM(f),h=nQ(d),y=DQ(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(oO(this.config)),this.middlewareStack.use(GO(this.config)),this.middlewareStack.use(aM(this.config)),this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(Z2(this.config)),this.middlewareStack.use(Q2(this.config)),this.middlewareStack.use(Y2(this.config)),this.middlewareStack.use(X2(this.config,{httpAuthSchemeParametersProvider:JZ,identityProviderConfigProvider:async g=>new dO({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(J2(this.config))}destroy(){super.destroy()}}class u0 extends Qi{constructor(t){super(t),Object.setPrototypeOf(this,u0.prototype)}}const PQ="AssociateCarrierIpAddress",EM="AdditionalInfo",NQ="AttachmentId",zQ="AmiLaunchIndex",LQ="AttachmentLimitType",BQ="AssociatePublicIpAddress",$Q="AutoRecoverySupported",UQ="AllRegions",xM="AssociatedResource",RM="AutoRecovery",CM="AmdSevSnp",jQ="ArchitectureTypeList",f0="AttachTime",d0="AvailabilityZone",h0="AvailabilityZoneId",TM="Accelerators",HQ="Affinity",AM="Arn",IM="Architecture",OM="Association",FQ="Attachment",qQ="Attachments",VQ="BaselineBandwidthInGbps",MM="BaselineBandwidthInMbps",p0="BlockDeviceMapping",GQ="BlockDeviceMappingList",KQ="BlockDeviceMappingRequestList",m0="BlockDeviceMappings",ZQ="BlockDurationMinutes",DM="BaselineIops",kM="BootMode",QQ="BootModeTypeList",YQ="BareMetal",XQ="BurstablePerformanceSupported",PM="BaselineThroughputInMBps",NM="BandwidthWeighting",WQ="BandwidthWeightingTypeList",JQ="BandwidthWeightings",eY="CapacityBlockId",tY="CoreCountList",zM="CoreCount",nY="CpuCredits",sY="CreationDate",rY="CurrentGeneration",oY="CarrierIp",iY="CurrentInstanceBootMode",aY="CoreInfo",cY="CreateKeyPair",lY="CreateKeyPairRequest",g0="CpuOptions",uY="CustomerOwnedIp",fY="CpuOptionsRequest",y0="CapacityReservationId",LM="CapacityReservationPreference",BM="CapacityReservationResourceGroupArn",dY="CapacityReservationSpecificationResponse",v0="CapacityReservationSpecification",b0="CapacityReservationTarget",hY="CapacityReservationTargetResponse",pY="CreditSpecificationRequest",mY="CreditSpecification",gY="CurrentState",$M="ClientToken",yY="ConnectionTrackingConfiguration",vY="ConnectionTrackingSpecification",bY="ConnectionTrackingSpecificationRequest",SY="ConnectionTrackingSpecificationResponse",UM="CreateTime",jM="Code",HM="Configured",bi="Count",_Y="DisableApiStop",wY="DisableApiTermination",EY="DefaultCores",xY="DefaultEnaQueueCountPerInterface",RY="DedicatedHostsSupported",FM="DeviceIndex",CY="DiskInfoList",TY="DescribeImagesRequest",AY="DescribeImagesResult",IY="DescribeInstancesRequest",OY="DescribeInstancesResult",MY="DescribeInstanceTypesRequest",DY="DescribeInstanceTypesResult",kY="DescribeInstanceTypes",PY="DescribeImages",NY="DescribeInstances",zY="DiskInfo",LY="DeleteKeyPair",BY="DeleteKeyPairRequest",$Y="DeleteKeyPairResult",UY="DescribeKeyPairsRequest",jY="DescribeKeyPairsResult",HY="DescribeKeyPairs",qM="DeviceName",FY="DefaultNetworkCardIndex",Uu="DeleteOnTermination",qY="DeregistrationProtection",ms="DryRun",VY="DescribeRegionsRequest",GY="DescribeRegionsResult",KY="DescribeRegions",ZY="DefaultThreadsPerCore",QY="DeprecationTime",YY="DefaultVCpus",XY="DescribeVolumesRequest",WY="DescribeVolumesResult",JY="DescribeVolumes",S0="Description",eX="Device",tX="Disks",nX="EbsBlockDevice",sX="ExecutableByStringList",VM="ExecutableBy",wp="EbsCardIndex",rX="EbsCardInfoList",oX="EbsCardInfo",iX="EbsCards",aX="ElasticGpuAssociation",cX="ElasticGpuAssociationId",lX="ElasticGpuAssociationList",uX="ElasticGpuAssociationState",fX="ElasticGpuAssociationTime",dX="ElasticGpuAssociations",hX="ElasticGpuId",GM="ElasticGpuSpecification",pX="ElasticGpuSpecifications",KM="ElasticInferenceAccelerator",mX="ElasticInferenceAcceleratorAssociation",gX="ElasticInferenceAcceleratorAssociationId",yX="ElasticInferenceAcceleratorAssociationList",vX="ElasticInferenceAcceleratorAssociationState",bX="ElasticInferenceAcceleratorAssociationTime",SX="ElasticInferenceAcceleratorArn",_X="ElasticInferenceAcceleratorAssociations",ZM="ElasticInferenceAccelerators",wX="EbsInstanceBlockDevice",EX="EncryptionInTransitSupported",QM="EbsInfo",YM="EfaInfo",XM="EbsOptimized",WM="EbsOptimizedInfo",xX="EnclaveOptionsRequest",RX="EbsOptimizedSupport",_0="EnclaveOptions",CX="EnablePrimaryIpv6",JM="EnaQueueCount",eD="EnableResourceNameDnsAAAARecord",tD="EnableResourceNameDnsARecord",nD="EnaSrdEnabled",sD="EnaSrdSpecification",TX="EnaSrdSpecificationRequest",AX="EnaSrdSupported",rD="EnaSrdUdpEnabled",oD="EnaSrdUdpSpecification",IX="EnaSrdUdpSpecificationRequest",OX="EfaSupported",iD="EncryptionSupport",w0="EnaSupport",MX="ExecutableUsers",aD="Ebs",E0="Enabled",cD="Encrypted",DX="Endpoint",lD="Force",kX="FpgaDeviceInfo",PX="FpgaDeviceInfoList",NX="FpgaDeviceMemoryInfo",zX="FlexibleEnaQueuesSupport",uD="FpgaInfo",LX="FilterList",BX="FastRestored",fD="FreeTierEligible",Bc="Filters",Si="Filter",$X="Fpgas",x0="Groups",UX="GpuDeviceInfo",jX="GpuDeviceInfoList",HX="GpuDeviceMemoryInfo",FX="GroupIdentifierList",dD="GpuInfo",hD="GroupId",qX="GroupIdentifier",pD="GroupName",VX="GpuPartitionSize",GX="Gpus",mD="HttpEndpoint",KX="HostId",R0="HibernationOptions",ZX="HibernationOptionsRequest",gD="HttpProtocolIpv6",yD="HttpPutResponseHopLimit",QX="HostResourceGroupArn",YX="HibernationSupported",vD="HttpTokens",bD="HostnameType",XX="Hibernate",C0="Hypervisor",WX="Id",T0="Ipv6Addresses",SD="Ipv6AddressCount",JX="InstanceAttachmentEnaSrdSpecification",eW="InstanceAttachmentEnaSrdUdpSpecification",_D="InferenceAcceleratorInfo",tW="Ipv4AddressesPerInterface",nW="Ipv6AddressesPerInterface",sW="ImageAllowed",A0="Ipv6Address",rW="InstanceBlockDeviceMapping",oW="InstanceBlockDeviceMappingList",iW="IncludeDeprecated",aW="InferenceDeviceInfo",cW="InferenceDeviceInfoList",lW="InferenceDeviceMemoryInfo",uW="IncludeDisabled",bo="InstanceId",fW="InstanceIpv6Address",dW="InstanceIpv6AddressList",hW="InstanceInterruptionBehavior",I0="IamInstanceProfile",pW="InstanceIpv4PrefixList",mW="InstanceIpv6PrefixList",gW="IamInstanceProfileSpecification",yW="InstanceIpv4Prefix",vW="InstanceIpv6Prefix",bW="InstanceInitiatedShutdownBehavior",SW="ImageIdStringList",_W="InstanceIdStringList",ju="ImageId",wW="ImageIds",Hu="InstanceIds",EW="ImportKeyPair",xW="ImportKeyPairRequest",RW="ImportKeyPairResult",CW="ImageLocation",TW="ImageList",AW="InstanceLifecycle",IW="InstanceList",OW="InstanceMaintenanceOptions",MW="InstanceMaintenanceOptionsRequest",DW="InstanceMarketOptionsRequest",kW="InstanceMetadataOptionsRequest",PW="InstanceMetadataOptionsResponse",NW="InstanceMarketOptions",wD="InstanceMetadataTags",zW="InstanceNetworkInterface",LW="InstanceNetworkInterfaceAssociation",BW="InstanceNetworkInterfaceAttachment",$W="InstanceNetworkInterfaceList",UW="InstanceNetworkInterfaceSpecification",jW="InstanceNetworkInterfaceSpecificationList",HW="InstanceNetworkPerformanceOptions",FW="InstanceNetworkPerformanceOptionsRequest",qW="ImageOwnerAlias",VW="IpOwnerId",GW="InstanceOwningService",KW="Ipv6PrefixCount",ZW="Ipv4PrefixCount",QW="InstancePrivateIpAddress",YW="InstancePrivateIpAddressList",XW="IsPrimaryIpv6",WW="IncludePublicKey",JW="Ipv4PrefixList",eJ="Ipv6PrefixList",tJ="Ipv4PrefixSpecificationRequest",nJ="Ipv6PrefixSpecificationRequest",ED="Ipv6Prefixes",O0="Ipv6Prefix",xD="Ipv4Prefixes",M0="Ipv4Prefix",sJ="InstanceStateChange",rJ="InstanceStateChangeList",RD="InstanceStorageInfo",oJ="InstanceStorageSupported",iJ="ImdsSupport",aJ="InstanceState",cJ="Ipv6Supported",Ep="InstanceType",lJ="InstanceTypeInfoList",uJ="InstanceTypeInfo",fJ="ImageType",CD="InstanceTypes",TD="InterfaceType",dJ="Images",hJ="Image",pJ="Instance",mJ="Instances",AD="Iops",gJ="Key",yJ="KeyFormat",D0="KeyFingerprint",k0="KernelId",ID="KmsKeyId",vJ="KeyMaterial",Nr="KeyName",bJ="KeyNameStringList",SJ="KeyNames",_J="KeyPairs",pa="KeyPairId",wJ="KeyPairIdStringList",EJ="KeyPairIds",xJ="KeyPairInfo",RJ="KeyPairList",CJ="KeyPair",OD="KeyType",MD="LicenseConfigurationArn",TJ="LicenseConfigurationRequest",AJ="LicenseConfiguration",IJ="LogicalGpuCount",OJ="LicenseList",MJ="LastLaunchedTime",DJ="LicenseSpecifications",kJ="LicenseSpecificationListRequest",PJ="LicenseSpecification",NJ="LaunchTemplate",zJ="LaunchTemplateId",LJ="LaunchTemplateName",BJ="LaunchTemplateSpecification",$J="LaunchTime",UJ="Licenses",jJ="MultiAttachEnabled",DD="MediaAcceleratorInfo",HJ="MacAddress",kD="MaximumBandwidthInMbps",FJ="MaxCount",qJ="MinCount",VJ="MediaDeviceInfo",GJ="MediaDeviceInfoList",KJ="MediaDeviceMemoryInfo",ZJ="MaximumEbsAttachments",QJ="MaximumEbsCards",YJ="MaximumEfaInterfaces",XJ="MaximumEnaQueueCount",WJ="MaximumEnaQueueCountPerInterface",PD="MaximumIops",ma="MemoryInfo",JJ="MaximumNetworkCards",ND="MaximumNetworkInterfaces",zD="MetadataOptions",LD="MaintenanceOptions",eee="MaxPrice",xp="MaxResults",tee="MarketType",BD="MaximumThroughputInMBps",Fu="Manufacturer",nee="Managed",see="Message",P0="Monitoring",So="Name",ree="NetworkCards",N0="NetworkCardIndex",oee="NetworkCardInfoList",iee="NetworkCardInfo",aee="NoDevice",cee="NeuronDeviceCoreInfo",lee="NeuronDeviceInfo",uee="NeuronDeviceInfoList",fee="NeuronDeviceMemoryInfo",dee="NeuronDevices",hee="NitroEnclavesSupport",$D="NetworkInterfaceId",UD="NetworkInterfaces",jD="NetworkInfo",HD="NeuronInfo",FD="NetworkPerformanceOptions",qD="NetworkPerformance",VD="NvmeSupport",GD="NitroTpmInfo",pee="NitroTpmSupport",mee="NitroTpmSupportedVersionsList",_i="NextToken",z0="OutpostArn",L0="OwnerId",gee="OptInStatus",yee="OperatorRequest",vee="OperatorResponse",bee="OwnerStringList",qu="Operator",See="Owners",KD="Owner",ZD="Principal",_ee="PeakBandwidthInGbps",wee="ProductCodeId",Eee="ProductCodeList",xee="ProductCodeType",Ree="ProductCode",QD="ProductCodes",B0="PrivateDnsName",YD="PrivateDnsNameOptions",Cee="PrivateDnsNameOptionsRequest",Tee="PrivateDnsNameOptionsResponse",XD="PublicDnsName",WD="PlatformDetails",JD="PlacementGroupInfo",Aee="PlacementGroupStrategyList",Iee="PublicIp",Oee="PrivateIpAddressSpecification",Mee="PrivateIpAddressSpecificationList",$c="PrivateIpAddress",ek="PrivateIpAddresses",Dee="PublicIpAddress",kee="PrimaryIpv6",tk="ProcessorInfo",Pee="PublicKey",Nee="PublicKeyMaterial",zee="PartitionNumber",Lee="PhcSupport",Bee="PreviousState",nk="Platform",$0="Placement",sk="Primary",$ee="Public",Uee="Return",rk="RootDeviceName",ok="RootDeviceType",jee="RootDeviceTypeList",Hee="RunInstancesMonitoringEnabled",Fee="RebootInstancesRequest",qee="RunInstancesRequest",Vee="RunInstancesUserData",U0="RamdiskId",Gee="ReservationId",Kee="RebootInstances",Zee="RequesterId",Qee="RunInstances",Yee="RegionList",Xee="ReservationList",Wee="RebootMigrationSupport",Jee="RebootMigration",j0="RegionName",ete="RegionNameStringList",tte="RegionNames",nte="ResourceType",ste="Regions",rte="Region",ote="Reservations",ite="Reservation",ate="SupportedAdditionalProcessorFeatureList",cte="SupportedArchitectures",lte="SupportedBootModes",ute="SustainedClockSpeedInGhz",ik="SourceDestCheck",fte="SpreadDomain",dte="SupportedFeatures",ak="SecurityGroups",H0="SecurityGroupId",hte="SecurityGroupIdStringList",pte="SecurityGroupIds",mte="SecurityGroupStringList",ck="SecurityGroup",gte="SizeInGB",yte="SourceImageId",vte="SourceInstanceId",Uc="SizeInMiB",bte="SpotInstanceRequestId",Ste="SourceImageRegion",_te="StartInstancesRequest",wte="StartInstancesResult",Ete="StopInstancesRequest",xte="StopInstancesResult",Rte="SpotInstanceType",lk="SnapshotId",Cte="StartingInstances",Tte="StartInstances",Ate="StoppingInstances",Ite="StopInstances",Rp="SubnetId",Ote="SpotMarketOptions",uk="SriovNetSupport",Mte="SpotOptions",fk="SkipOsShutdown",Dte="SecondaryPrivateIpAddressCount",kte="SupportedRootDeviceTypes",F0="StateReason",Pte="SupportedStrategies",Nte="StateTransitionReason",zte="SseType",Lte="SupportedUsageClasses",Bte="SensitiveUserData",$te="SourceVolumeId",Ute="SupportedVirtualizationTypes",jte="SupportedVersions",Hte="Size",jc="State",q0="Status",ga="Tags",dk="TcpEstablishedTimeout",Fte="TotalFpgaMemoryInMiB",qte="TotalGpuMemoryInMiB",Vte="TerminateInstances",Gte="TotalInferenceMemoryInMiB",Kte="TerminateInstancesRequest",Zte="TerminateInstancesResult",Qte="TerminatingInstances",Yte="TagList",Xte="TotalMediaMemoryInMiB",Wte="TotalNeuronDeviceMemoryInMiB",hk="ThreadsPerCore",Jte="ThreadsPerCoreList",V0="TagSpecifications",ene="TotalSizeInGB",tne="TagSpecificationList",Cp="TagSpecification",pk="TpmSupport",mk="Tag",nne="Tenancy",gk="Throughput",G0="Type",sne="UsageClassTypeList",rne="UserData",yk="UsageOperation",one="UsageOperationUpdateTime",vk="UdpStreamTimeout",bk="UdpTimeout",Sk="Value",ine="VolumeAttachmentList",ane="VolumeAttachment",_k="VCpuInfo",cne="ValidCores",wk="VpcId",Ek="VolumeInitializationRate",lne="VolumeIdStringList",Vu="VolumeId",une="VolumeIds",fne="VolumeList",dne="VirtualName",hne="VolumeOwnerId",pne="ValueStringList",mne="VolumeSize",xk="VolumeType",gne="VirtualizationTypeList",yne="ValidThreadsPerCore",Rk="VirtualizationType",vne="ValidUntil",bne="Values",Ck="Version",Sne="Volumes",_ne="Volume",wne="WorkloadsList",Ene="Workloads",Tk="additionalInfo",xne="attachmentId",Rne="amiLaunchIndex",Cne="attachmentLimitType",Tne="associatePublicIpAddress",Ane="autoRecoverySupported",Ak="associatedResource",Ine="autoRecovery",One="amdSevSnp",Mne="attachmentSet",K0="attachTime",Z0="availabilityZone",Ik="availabilityZoneId",Ok="accelerators",Dne="affinity",Mk="arn",Dk="architecture",kk="association",kne="attachment",Pne="baselineBandwidthInGbps",Pk="baselineBandwidthInMbps",Nk="blockDeviceMapping",zk="baselineIops",Lk="bootMode",Nne="bareMetal",zne="burstablePerformanceSupported",Bk="baselineThroughputInMBps",Lne="bandwidthWeighting",Bne="bandwidthWeightings",$ne="capacityBlockId",Une="coreCount",jne="creationDate",Hne="currentGeneration",Fne="carrierIp",qne="currentInstanceBootMode",Vne="coreInfo",Gne="cpuOptions",Kne="customerOwnedIp",$k="capacityReservationId",Zne="capacityReservationPreference",Qne="capacityReservationResourceGroupArn",Yne="capacityReservationSpecification",Xne="capacityReservationTarget",Wne="currentState",Uk="clientToken",Jne="connectionTrackingConfiguration",jk="createTime",Hk="code",ese="configured",ya="count",tse="disableApiTermination",nse="defaultCores",sse="defaultEnaQueueCountPerInterface",rse="dedicatedHostsSupported",Fk="deviceIndex",qk="deviceName",ose="defaultNetworkCardIndex",ise="dnsName",Gu="deleteOnTermination",ase="deregistrationProtection",Ns="dryRun",cse="defaultThreadsPerCore",lse="deprecationTime",use="defaultVCpus",Q0="description",fse="device",dse="disks",Y0="ebsCardIndex",hse="ebsCardSet",pse="elasticGpuAssociationId",mse="elasticGpuAssociationState",gse="elasticGpuAssociationSet",yse="elasticGpuAssociationTime",vse="elasticGpuId",bse="elasticInferenceAcceleratorArn",Sse="elasticInferenceAcceleratorAssociationId",_se="elasticInferenceAcceleratorAssociationState",wse="elasticInferenceAcceleratorAssociationSet",Ese="elasticInferenceAcceleratorAssociationTime",xse="encryptionInTransitSupported",Rse="ebsInfo",Cse="efaInfo",Vk="ebsOptimized",Tse="ebsOptimizedInfo",Ase="ebsOptimizedSupport",Ise="enclaveOptions",Ose="enaQueueCount",E="ec2QueryName",Mse="enableResourceNameDnsAAAARecord",Dse="enableResourceNameDnsARecord",kse="enaSrdEnabled",Pse="enaSrdSpecification",Nse="enaSrdSupported",zse="enaSrdUdpEnabled",Lse="enaSrdUdpSpecification",Bse="efaSupported",Gk="encryptionSupport",X0="enaSupport",Kk="ebs",Zk="enabled",Qk="encrypted",$se="flexibleEnaQueuesSupport",Use="fpgaInfo",jse="fastRestored",Yk="freeTierEligible",Hse="force",Fse="fpgas",qse="gpuInfo",Xk="groupId",Wk="groupName",Vse="gpuPartitionSize",W0="groupSet",Gse="gpus",J0="hypervisor",Kse="httpEndpoint",Zse="hostId",Qse="hibernationOptions",Yse="httpProtocolIpv6",Xse="httpPutResponseHopLimit",Wse="hostResourceGroupArn",Jse="hibernationSupported",ere="httpTokens",tre="hostnameType",nre="id",sre="ipv6AddressCount",rre="inferenceAcceleratorInfo",ore="ipv4AddressesPerInterface",ire="ipv6AddressesPerInterface",Jk="ipv6AddressesSet",are="imageAllowed",cre="ipAddress",e3="ipv6Address",eS="instanceId",t3="iamInstanceProfile",lre="instanceInitiatedShutdownBehavior",n3="imageId",ure="imageLocation",fre="instanceLifecycle",dre="instanceMetadataTags",hre="imageOwnerAlias",pre="imageOwnerId",mre="ipOwnerId",gre="instanceOwningService",yre="isPrimaryIpv6",vre="ipv4PrefixSet",bre="ipv6PrefixSet",Sre="ipv4Prefix",_re="ipv6Prefix",wre="isPublic",Ere="instanceStorageInfo",xre="instanceStorageSupported",Rre="imagesSet",Cre="imageState",Tre="imdsSupport",Tp="instancesSet",Are="instanceState",Ire="ipv6Supported",s3="instanceType",Ore="instanceTypeSet",Mre="idempotencyToken",Dre="imageType",kre="interfaceType",r3="iops",je="item",Pre="key",tS="keyFingerprint",o3="kernelId",i3="kmsKeyId",Nre="keyMaterial",Ku="keyName",Ap="keyPairId",zre="keySet",Lre="keyType",Bre="licenseConfigurationArn",$re="logicalGpuCount",Ure="lastLaunchedTime",jre="licenseSet",Hre="launchTime",Fre="multiAttachEnabled",qre="mediaAcceleratorInfo",Vre="macAddress",a3="maximumBandwidthInMbps",Gre="maximumEbsAttachments",Kre="maximumEbsCards",Zre="maximumEfaInterfaces",Qre="maximumEnaQueueCount",Yre="maximumEnaQueueCountPerInterface",c3="maximumIops",Hc="memoryInfo",Xre="maximumNetworkCards",l3="maximumNetworkInterfaces",Wre="metadataOptions",Jre="maintenanceOptions",u3="maxResults",f3="maximumThroughputInMBps",Zu="manufacturer",eoe="managed",toe="message",noe="monitoring",wi="name",soe="networkCards",d3="networkCardIndex",roe="noDevice",ooe="neuronDevices",ioe="nitroEnclavesSupport",h3="networkInterfaceId",aoe="networkInterfaceSet",coe="networkInterface",loe="networkInfo",uoe="neuronInfo",foe="networkPerformanceOptions",p3="networkPerformance",m3="nvmeSupport",doe="nitroTpmInfo",hoe="nitroTpmSupport",Fc="nextToken",nS="outpostArn",g3="ownerId",poe="optInStatus",Ip="operator",moe="principal",goe="peakBandwidthInGbps",y3="productCodes",yoe="productCode",voe="privateDnsNameOptions",sS="privateDnsName",boe="publicDnsName",v3="platformDetails",Soe="placementGroupInfo",_oe="publicIp",b3="privateIpAddressesSet",qc="privateIpAddress",woe="processorInfo",Eoe="publicKey",xoe="publicKeyMaterial",Roe="partitionNumber",Coe="phcSupport",Toe="previousState",S3="platform",Aoe="placement",_3="primary",Ioe="return",w3="rootDeviceName",E3="rootDeviceType",Ooe="regionEndpoint",Moe="reservationId",x3="ramdiskId",Doe="regionInfo",koe="requesterId",Poe="rebootMigrationSupport",Noe="rebootMigration",zoe="regionName",Loe="reservationSet",Boe="resourceType",$oe="reason",Uoe="supportedArchitectures",joe="supportedBootModes",Hoe="sustainedClockSpeedInGhz",R3="sourceDestCheck",Foe="spreadDomain",qoe="supportedFeatures",Voe="sizeInGB",Goe="sourceInstanceId",Koe="sourceImageId",Vc="sizeInMiB",Zoe="sourceImageRegion",Qoe="spotInstanceRequestId",C3="snapshotId",rS="subnetId",T3="sriovNetSupport",Yoe="secondaryPrivateIpAddressCount",Xoe="supportedRootDeviceTypes",A3="stateReason",Woe="supportedStrategies",Joe="sseType",eie="supportedUsageClasses",tie="sourceVolumeId",nie="supportedVirtualizationTypes",sie="supportedVersions",rie="size",I3="smithy.ts.sdk.synthetic.com.amazonaws.ec2",O3="state",Qu="status",oie="tenancy",iie="tcpEstablishedTimeout",aie="totalFpgaMemoryInMiB",cie="totalGpuMemoryInMiB",lie="totalInferenceMemoryInMiB",uie="totalMediaMemoryInMiB",fie="totalNeuronDeviceMemoryInMiB",die="threadsPerCore",Gc="tagSet",hie="totalSizeInGB",M3="tpmSupport",D3="throughput",k3="type",P3="usageOperation",pie="usageOperationUpdateTime",mie="udpStreamTimeout",gie="udpTimeout",yie="value",vie="vCpuInfo",bie="validCores",N3="vpcId",Sie="volumeInitializationRate",oS="volumeId",_ie="virtualName",wie="volumeOwnerId",Eie="volumeSet",xie="volumeSize",z3="volumeType",Rie="validThreadsPerCore",L3="virtualizationType",Cie="version",Tie="workloadSet",S="xmlName",H="com.amazonaws.ec2";var Aie=[0,H,Vee,8,0],Iie=[0,H,Bte,8,0],B3=[3,H,p0,0,[aD,aee,qM,dne],[[()=>tae,{[E]:"Ebs",[S]:Kk}],[0,{[E]:"NoDevice",[S]:roe}],[0,{[E]:"DeviceName",[S]:qk}],[0,{[E]:"VirtualName",[S]:_ie}]]],Oie=[3,H,v0,0,[LM,b0],[0,()=>Die]],Mie=[3,H,dY,0,[LM,b0],[[0,{[E]:"CapacityReservationPreference",[S]:Zne}],[()=>kie,{[E]:"CapacityReservationTarget",[S]:Xne}]]],Die=[3,H,b0,0,[y0,BM],[0,0]],kie=[3,H,hY,0,[y0,BM],[[0,{[E]:"CapacityReservationId",[S]:$k}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:Qne}]]],Pie=[3,H,bY,0,[dk,vk,bk],[1,1,1]],Nie=[3,H,SY,0,[dk,vk,bk],[[1,{[E]:"TcpEstablishedTimeout",[S]:iie}],[1,{[E]:"UdpStreamTimeout",[S]:mie}],[1,{[E]:"UdpTimeout",[S]:gie}]]],zie=[3,H,g0,0,[zM,hk,CM],[[1,{[E]:"CoreCount",[S]:Une}],[1,{[E]:"ThreadsPerCore",[S]:die}],[0,{[E]:"AmdSevSnp",[S]:One}]]],Lie=[3,H,fY,0,[zM,hk,CM],[1,1,0]],Bie=[3,H,lY,0,[Nr,OD,V0,yJ,ms],[0,0,[()=>lS,{[S]:Cp}],0,[2,{[E]:"DryRun",[S]:Ns}]],1],$ie=[3,H,pY,0,[nY],[0],1],Uie=[3,H,BY,0,[Nr,pa,ms],[0,0,[2,{[E]:"DryRun",[S]:Ns}]]],jie=[3,H,$Y,0,[Uee,pa],[[2,{[E]:"Return",[S]:Ioe}],[0,{[E]:"KeyPairId",[S]:Ap}]]],Hie=[3,H,TY,0,[MX,wW,See,iW,uW,xp,_i,ms,Bc],[[()=>nle,{[S]:VM}],[()=>ole,{[S]:ju}],[()=>Tle,{[S]:KD}],2,2,1,0,[2,{[E]:"DryRun",[S]:Ns}],[()=>Kc,{[S]:Si}]]],Fie=[3,H,AY,0,[_i,dJ],[[0,{[E]:"NextToken",[S]:Fc}],[()=>ile,{[E]:"ImagesSet",[S]:Rre}]]],qie=[3,H,IY,0,[Hu,ms,Bc,_i,xp],[[()=>Yu,{[S]:bo}],[2,{[E]:"DryRun",[S]:Ns}],[()=>Kc,{[S]:Si}],[0,{[E]:"NextToken",[S]:Fc}],[1,{[E]:"MaxResults",[S]:u3}]]],Vie=[3,H,OY,0,[_i,ote],[[0,{[E]:"NextToken",[S]:Fc}],[()=>Dle,{[E]:"ReservationSet",[S]:Loe}]]],Gie=[3,H,MY,0,[ms,CD,Bc,xp,_i],[2,[64,{[S]:Ep}],[()=>Kc,{[S]:Si}],1,0]],Kie=[3,H,DY,0,[CD,_i],[[()=>mle,{[E]:"InstanceTypeSet",[S]:Ore}],[0,{[E]:"NextToken",[S]:Fc}]]],Zie=[3,H,UY,0,[SJ,EJ,WW,ms,Bc],[[()=>vle,{[S]:Nr}],[()=>ble,{[S]:pa}],2,[2,{[E]:"DryRun",[S]:Ns}],[()=>Kc,{[S]:Si}]]],Qie=[3,H,jY,0,[_J],[[()=>Sle,{[E]:"KeySet",[S]:zre}]]],Yie=[3,H,VY,0,[tte,UQ,ms,Bc],[[()=>Mle,{[S]:j0}],2,[2,{[E]:"DryRun",[S]:Ns}],[()=>Kc,{[S]:Si}]]],Xie=[3,H,GY,0,[ste],[[()=>Ole,{[E]:"RegionInfo",[S]:Doe}]]],Wie=[3,H,XY,0,[une,ms,Bc,_i,xp],[[()=>jle,{[S]:Vu}],[2,{[E]:"DryRun",[S]:Ns}],[()=>Kc,{[S]:Si}],[0,{[E]:"NextToken",[S]:Fc}],[1,{[E]:"MaxResults",[S]:u3}]]],Jie=[3,H,WY,0,[_i,Sne],[[0,{[E]:"NextToken",[S]:Fc}],[()=>Hle,{[E]:"VolumeSet",[S]:Eie}]]],eae=[3,H,zY,0,[gte,bi,G0],[[1,{[E]:"SizeInGB",[S]:Voe}],[1,{[E]:"Count",[S]:ya}],[0,{[E]:"Type",[S]:k3}]]],tae=[3,H,nX,0,[Uu,AD,lk,mne,xk,ID,gk,z0,d0,cD,Ek,h0,wp],[[2,{[E]:"DeleteOnTermination",[S]:Gu}],[1,{[E]:"Iops",[S]:r3}],[0,{[E]:"SnapshotId",[S]:C3}],[1,{[E]:"VolumeSize",[S]:xie}],[0,{[E]:"VolumeType",[S]:z3}],[0,{[E]:"KmsKeyId",[S]:i3}],[1,{[E]:"Throughput",[S]:D3}],[0,{[E]:"OutpostArn",[S]:nS}],[0,{[E]:"AvailabilityZone",[S]:Z0}],[2,{[E]:"Encrypted",[S]:Qk}],1,0,1]],nae=[3,H,oX,0,[wp,MM,PM,DM,kD,BD,PD],[[1,{[E]:"EbsCardIndex",[S]:Y0}],[1,{[E]:"BaselineBandwidthInMbps",[S]:Pk}],[1,{[E]:"BaselineThroughputInMBps",[S]:Bk}],[1,{[E]:"BaselineIops",[S]:zk}],[1,{[E]:"MaximumBandwidthInMbps",[S]:a3}],[1,{[E]:"MaximumThroughputInMBps",[S]:f3}],[1,{[E]:"MaximumIops",[S]:c3}]]],sae=[3,H,QM,0,[RX,iD,WM,VD,ZJ,LQ,QJ,iX],[[0,{[E]:"EbsOptimizedSupport",[S]:Ase}],[0,{[E]:"EncryptionSupport",[S]:Gk}],[()=>oae,{[E]:"EbsOptimizedInfo",[S]:Tse}],[0,{[E]:"NvmeSupport",[S]:m3}],[1,{[E]:"MaximumEbsAttachments",[S]:Gre}],[0,{[E]:"AttachmentLimitType",[S]:Cne}],[1,{[E]:"MaximumEbsCards",[S]:Kre}],[()=>Xce,{[E]:"EbsCardSet",[S]:hse}]]],rae=[3,H,wX,0,[f0,Uu,q0,Vu,xM,hne,qu,wp],[[4,{[E]:"AttachTime",[S]:K0}],[2,{[E]:"DeleteOnTermination",[S]:Gu}],[0,{[E]:"Status",[S]:Qu}],[0,{[E]:"VolumeId",[S]:oS}],[0,{[E]:"AssociatedResource",[S]:Ak}],[0,{[E]:"VolumeOwnerId",[S]:wie}],[()=>Op,{[E]:"Operator",[S]:Ip}],[1,{[E]:"EbsCardIndex",[S]:Y0}]]],oae=[3,H,WM,0,[MM,PM,DM,kD,BD,PD],[[1,{[E]:"BaselineBandwidthInMbps",[S]:Pk}],[1,{[E]:"BaselineThroughputInMBps",[S]:Bk}],[1,{[E]:"BaselineIops",[S]:zk}],[1,{[E]:"MaximumBandwidthInMbps",[S]:a3}],[1,{[E]:"MaximumThroughputInMBps",[S]:f3}],[1,{[E]:"MaximumIops",[S]:c3}]]],iae=[3,H,YM,0,[YJ],[[1,{[E]:"MaximumEfaInterfaces",[S]:Zre}]]],aae=[3,H,aX,0,[hX,cX,uX,fX],[[0,{[E]:"ElasticGpuId",[S]:vse}],[0,{[E]:"ElasticGpuAssociationId",[S]:pse}],[0,{[E]:"ElasticGpuAssociationState",[S]:mse}],[0,{[E]:"ElasticGpuAssociationTime",[S]:yse}]]],cae=[3,H,GM,0,[G0],[0],1],lae=[3,H,KM,0,[G0,bi],[0,1],1],uae=[3,H,mX,0,[SX,gX,vX,bX],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:bse}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:Sse}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:_se}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:Ese}]]],fae=[3,H,TX,0,[nD,oD],[2,()=>dae]],dae=[3,H,IX,0,[rD],[2]],hae=[3,H,_0,0,[E0],[[2,{[E]:"Enabled",[S]:Zk}]]],pae=[3,H,xX,0,[E0],[2]],mae=[3,H,Si,0,[So,bne],[0,[()=>Ble,{[S]:Sk}]]],gae=[3,H,kX,0,[So,Fu,bi,ma],[[0,{[E]:"Name",[S]:wi}],[0,{[E]:"Manufacturer",[S]:Zu}],[1,{[E]:"Count",[S]:ya}],[()=>yae,{[E]:"MemoryInfo",[S]:Hc}]]],yae=[3,H,NX,0,[Uc],[[1,{[E]:"SizeInMiB",[S]:Vc}]]],vae=[3,H,uD,0,[$X,Fte],[[()=>sle,{[E]:"Fpgas",[S]:Fse}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:aie}]]],bae=[3,H,UX,0,[So,Fu,bi,IJ,VX,Ene,ma],[[0,{[E]:"Name",[S]:wi}],[0,{[E]:"Manufacturer",[S]:Zu}],[1,{[E]:"Count",[S]:ya}],[1,{[E]:"LogicalGpuCount",[S]:$re}],[1,{[E]:"GpuPartitionSize",[S]:Vse}],[()=>Fle,{[E]:"WorkloadSet",[S]:Tie}],[()=>Sae,{[E]:"MemoryInfo",[S]:Hc}]]],Sae=[3,H,HX,0,[Uc],[[1,{[E]:"SizeInMiB",[S]:Vc}]]],_ae=[3,H,dD,0,[GX,qte],[[()=>rle,{[E]:"Gpus",[S]:Gse}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:cie}]]],wae=[3,H,qX,0,[hD,pD],[[0,{[E]:"GroupId",[S]:Xk}],[0,{[E]:"GroupName",[S]:Wk}]]],Eae=[3,H,R0,0,[HM],[[2,{[E]:"Configured",[S]:ese}]]],xae=[3,H,ZX,0,[HM],[2]],Rae=[3,H,I0,0,[AM,WX],[[0,{[E]:"Arn",[S]:Mk}],[0,{[E]:"Id",[S]:nre}]]],Cae=[3,H,gW,0,[AM,So],[[0,{[E]:"Arn",[S]:Mk}],[0,{[E]:"Name",[S]:wi}]]],Tae=[3,H,hJ,0,[WD,yk,m0,S0,w0,C0,qW,So,rk,ok,uk,F0,ga,Rk,kM,pk,QY,iJ,vte,qY,MJ,sW,yte,Ste,fD,ju,CW,jc,L0,sY,$ee,QD,IM,fJ,k0,U0,nk],[[0,{[E]:"PlatformDetails",[S]:v3}],[0,{[E]:"UsageOperation",[S]:P3}],[()=>Gce,{[E]:"BlockDeviceMapping",[S]:Nk}],[0,{[E]:"Description",[S]:Q0}],[2,{[E]:"EnaSupport",[S]:X0}],[0,{[E]:"Hypervisor",[S]:J0}],[0,{[E]:"ImageOwnerAlias",[S]:hre}],[0,{[E]:"Name",[S]:wi}],[0,{[E]:"RootDeviceName",[S]:w3}],[0,{[E]:"RootDeviceType",[S]:E3}],[0,{[E]:"SriovNetSupport",[S]:T3}],[()=>H3,{[E]:"StateReason",[S]:A3}],[()=>va,{[E]:"TagSet",[S]:Gc}],[0,{[E]:"VirtualizationType",[S]:L3}],[0,{[E]:"BootMode",[S]:Lk}],[0,{[E]:"TpmSupport",[S]:M3}],[0,{[E]:"DeprecationTime",[S]:lse}],[0,{[E]:"ImdsSupport",[S]:Tre}],[0,{[E]:"SourceInstanceId",[S]:Goe}],[0,{[E]:"DeregistrationProtection",[S]:ase}],[0,{[E]:"LastLaunchedTime",[S]:Ure}],[2,{[E]:"ImageAllowed",[S]:are}],[0,{[E]:"SourceImageId",[S]:Koe}],[0,{[E]:"SourceImageRegion",[S]:Zoe}],[2,{[E]:"FreeTierEligible",[S]:Yk}],[0,{[E]:"ImageId",[S]:n3}],[0,{[E]:"ImageLocation",[S]:ure}],[0,{[E]:"ImageState",[S]:Cre}],[0,{[E]:"ImageOwnerId",[S]:pre}],[0,{[E]:"CreationDate",[S]:jne}],[2,{[E]:"IsPublic",[S]:wre}],[()=>F3,{[E]:"ProductCodes",[S]:y3}],[0,{[E]:"Architecture",[S]:Dk}],[0,{[E]:"ImageType",[S]:Dre}],[0,{[E]:"KernelId",[S]:o3}],[0,{[E]:"RamdiskId",[S]:x3}],[0,{[E]:"Platform",[S]:S3}]]],Aae=[3,H,xW,0,[Nr,Nee,V0,ms],[[0,{[E]:"KeyName",[S]:Ku}],[21,{[E]:"PublicKeyMaterial",[S]:xoe}],[()=>lS,{[S]:Cp}],[2,{[E]:"DryRun",[S]:Ns}]],2],Iae=[3,H,RW,0,[D0,Nr,pa,ga],[[0,{[E]:"KeyFingerprint",[S]:tS}],[0,{[E]:"KeyName",[S]:Ku}],[0,{[E]:"KeyPairId",[S]:Ap}],[()=>va,{[E]:"TagSet",[S]:Gc}]]],Oae=[3,H,_D,0,[TM,Gte],[[()=>ale,{[E]:"Accelerators",[S]:Ok}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:lie}]]],Mae=[3,H,aW,0,[bi,So,Fu,ma],[[1,{[E]:"Count",[S]:ya}],[0,{[E]:"Name",[S]:wi}],[0,{[E]:"Manufacturer",[S]:Zu}],[()=>Dae,{[E]:"MemoryInfo",[S]:Hc}]]],Dae=[3,H,lW,0,[Uc],[[1,{[E]:"SizeInMiB",[S]:Vc}]]],kae=[3,H,pJ,0,[IM,m0,$M,XM,w0,C0,I0,AW,dX,_X,UD,z0,rk,ok,ak,ik,bte,uk,F0,ga,Rk,g0,eY,y0,v0,R0,UJ,zD,_0,kM,WD,yk,one,YD,A0,pk,LD,iY,FD,qu,bo,ju,jc,B0,XD,Nte,Nr,zQ,QD,Ep,$J,$0,k0,U0,nk,P0,Rp,wk,$c,Dee],[[0,{[E]:"Architecture",[S]:Dk}],[()=>cle,{[E]:"BlockDeviceMapping",[S]:Nk}],[0,{[E]:"ClientToken",[S]:Uk}],[2,{[E]:"EbsOptimized",[S]:Vk}],[2,{[E]:"EnaSupport",[S]:X0}],[0,{[E]:"Hypervisor",[S]:J0}],[()=>Rae,{[E]:"IamInstanceProfile",[S]:t3}],[0,{[E]:"InstanceLifecycle",[S]:fre}],[()=>Wce,{[E]:"ElasticGpuAssociationSet",[S]:gse}],[()=>ele,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:wse}],[()=>dle,{[E]:"NetworkInterfaceSet",[S]:aoe}],[0,{[E]:"OutpostArn",[S]:nS}],[0,{[E]:"RootDeviceName",[S]:w3}],[0,{[E]:"RootDeviceType",[S]:E3}],[()=>iS,{[E]:"GroupSet",[S]:W0}],[2,{[E]:"SourceDestCheck",[S]:R3}],[0,{[E]:"SpotInstanceRequestId",[S]:Qoe}],[0,{[E]:"SriovNetSupport",[S]:T3}],[()=>H3,{[E]:"StateReason",[S]:A3}],[()=>va,{[E]:"TagSet",[S]:Gc}],[0,{[E]:"VirtualizationType",[S]:L3}],[()=>zie,{[E]:"CpuOptions",[S]:Gne}],[0,{[E]:"CapacityBlockId",[S]:$ne}],[0,{[E]:"CapacityReservationId",[S]:$k}],[()=>Mie,{[E]:"CapacityReservationSpecification",[S]:Yne}],[()=>Eae,{[E]:"HibernationOptions",[S]:Qse}],[()=>_le,{[E]:"LicenseSet",[S]:jre}],[()=>qae,{[E]:"MetadataOptions",[S]:Wre}],[()=>hae,{[E]:"EnclaveOptions",[S]:Ise}],[0,{[E]:"BootMode",[S]:Lk}],[0,{[E]:"PlatformDetails",[S]:v3}],[0,{[E]:"UsageOperation",[S]:P3}],[4,{[E]:"UsageOperationUpdateTime",[S]:pie}],[()=>wce,{[E]:"PrivateDnsNameOptions",[S]:voe}],[0,{[E]:"Ipv6Address",[S]:e3}],[0,{[E]:"TpmSupport",[S]:M3}],[()=>Uae,{[E]:"MaintenanceOptions",[S]:Jre}],[0,{[E]:"CurrentInstanceBootMode",[S]:qne}],[()=>Zae,{[E]:"NetworkPerformanceOptions",[S]:foe}],[()=>Op,{[E]:"Operator",[S]:Ip}],[0,{[E]:"InstanceId",[S]:eS}],[0,{[E]:"ImageId",[S]:n3}],[()=>ib,{[E]:"InstanceState",[S]:Are}],[0,{[E]:"PrivateDnsName",[S]:sS}],[0,{[E]:"DnsName",[S]:ise}],[0,{[E]:"Reason",[S]:$oe}],[0,{[E]:"KeyName",[S]:Ku}],[1,{[E]:"AmiLaunchIndex",[S]:Rne}],[()=>F3,{[E]:"ProductCodes",[S]:y3}],[0,{[E]:"InstanceType",[S]:s3}],[4,{[E]:"LaunchTime",[S]:Hre}],[()=>U3,{[E]:"Placement",[S]:Aoe}],[0,{[E]:"KernelId",[S]:o3}],[0,{[E]:"RamdiskId",[S]:x3}],[0,{[E]:"Platform",[S]:S3}],[()=>fce,{[E]:"Monitoring",[S]:noe}],[0,{[E]:"SubnetId",[S]:rS}],[0,{[E]:"VpcId",[S]:N3}],[0,{[E]:"PrivateIpAddress",[S]:qc}],[0,{[E]:"IpAddress",[S]:cre}]]],Pae=[3,H,JX,0,[nD,oD],[[2,{[E]:"EnaSrdEnabled",[S]:kse}],[()=>Nae,{[E]:"EnaSrdUdpSpecification",[S]:Lse}]]],Nae=[3,H,eW,0,[rD],[[2,{[E]:"EnaSrdUdpEnabled",[S]:zse}]]],zae=[3,H,rW,0,[qM,aD],[[0,{[E]:"DeviceName",[S]:qk}],[()=>rae,{[E]:"Ebs",[S]:Kk}]]],Lae=[3,H,yW,0,[M0],[[0,{[E]:"Ipv4Prefix",[S]:Sre}]]],Bae=[3,H,fW,0,[A0,XW],[[0,{[E]:"Ipv6Address",[S]:e3}],[2,{[E]:"IsPrimaryIpv6",[S]:yre}]]],$ae=[3,H,vW,0,[O0],[[0,{[E]:"Ipv6Prefix",[S]:_re}]]],Uae=[3,H,OW,0,[RM,Jee],[[0,{[E]:"AutoRecovery",[S]:Ine}],[0,{[E]:"RebootMigration",[S]:Noe}]]],jae=[3,H,MW,0,[RM],[0]],Hae=[3,H,DW,0,[tee,Mte],[0,()=>Oce]],Fae=[3,H,kW,0,[vD,yD,mD,gD,wD],[0,1,0,0,0]],qae=[3,H,PW,0,[jc,vD,yD,mD,gD,wD],[[0,{[E]:"State",[S]:O3}],[0,{[E]:"HttpTokens",[S]:ere}],[1,{[E]:"HttpPutResponseHopLimit",[S]:Xse}],[0,{[E]:"HttpEndpoint",[S]:Kse}],[0,{[E]:"HttpProtocolIpv6",[S]:Yse}],[0,{[E]:"InstanceMetadataTags",[S]:dre}]]],Vae=[3,H,zW,0,[OM,FQ,S0,x0,T0,HJ,$D,L0,B0,$c,ek,ik,q0,Rp,wk,TD,xD,ED,yY,qu],[[()=>$3,{[E]:"Association",[S]:kk}],[()=>Gae,{[E]:"Attachment",[S]:kne}],[0,{[E]:"Description",[S]:Q0}],[()=>iS,{[E]:"GroupSet",[S]:W0}],[()=>aS,{[E]:"Ipv6AddressesSet",[S]:Jk}],[0,{[E]:"MacAddress",[S]:Vre}],[0,{[E]:"NetworkInterfaceId",[S]:h3}],[0,{[E]:"OwnerId",[S]:g3}],[0,{[E]:"PrivateDnsName",[S]:sS}],[0,{[E]:"PrivateIpAddress",[S]:qc}],[()=>ple,{[E]:"PrivateIpAddressesSet",[S]:b3}],[2,{[E]:"SourceDestCheck",[S]:R3}],[0,{[E]:"Status",[S]:Qu}],[0,{[E]:"SubnetId",[S]:rS}],[0,{[E]:"VpcId",[S]:N3}],[0,{[E]:"InterfaceType",[S]:kre}],[()=>lle,{[E]:"Ipv4PrefixSet",[S]:vre}],[()=>ule,{[E]:"Ipv6PrefixSet",[S]:bre}],[()=>Nie,{[E]:"ConnectionTrackingConfiguration",[S]:Jne}],[()=>Op,{[E]:"Operator",[S]:Ip}]]],$3=[3,H,LW,0,[oY,uY,VW,XD,Iee],[[0,{[E]:"CarrierIp",[S]:Fne}],[0,{[E]:"CustomerOwnedIp",[S]:Kne}],[0,{[E]:"IpOwnerId",[S]:mre}],[0,{[E]:"PublicDnsName",[S]:boe}],[0,{[E]:"PublicIp",[S]:_oe}]]],Gae=[3,H,BW,0,[f0,NQ,Uu,FM,q0,N0,sD,JM],[[4,{[E]:"AttachTime",[S]:K0}],[0,{[E]:"AttachmentId",[S]:xne}],[2,{[E]:"DeleteOnTermination",[S]:Gu}],[1,{[E]:"DeviceIndex",[S]:Fk}],[0,{[E]:"Status",[S]:Qu}],[1,{[E]:"NetworkCardIndex",[S]:d3}],[()=>Pae,{[E]:"EnaSrdSpecification",[S]:Pse}],[1,{[E]:"EnaQueueCount",[S]:Ose}]]],Kae=[3,H,UW,0,[BQ,Uu,S0,FM,x0,SD,T0,$D,$c,ek,Dte,Rp,PQ,TD,N0,xD,ZW,ED,KW,kee,sD,vY,JM],[[2,{[E]:"AssociatePublicIpAddress",[S]:Tne}],[2,{[E]:"DeleteOnTermination",[S]:Gu}],[0,{[E]:"Description",[S]:Q0}],[1,{[E]:"DeviceIndex",[S]:Fk}],[()=>q3,{[S]:H0}],[1,{[E]:"Ipv6AddressCount",[S]:sre}],[()=>aS,{[E]:"Ipv6Addresses",[S]:Jk}],[0,{[E]:"NetworkInterfaceId",[S]:h3}],[0,{[E]:"PrivateIpAddress",[S]:qc}],[()=>Ile,{[E]:"PrivateIpAddresses",[S]:b3}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:Yoe}],[0,{[E]:"SubnetId",[S]:rS}],2,0,1,[()=>gle,{[S]:M0}],1,[()=>yle,{[S]:O0}],1,2,()=>fae,()=>Pie,1]],Zae=[3,H,HW,0,[NM],[[0,{[E]:"BandwidthWeighting",[S]:Lne}]]],Qae=[3,H,FW,0,[NM],[0]],Yae=[3,H,QW,0,[OM,sk,B0,$c],[[()=>$3,{[E]:"Association",[S]:kk}],[2,{[E]:"Primary",[S]:_3}],[0,{[E]:"PrivateDnsName",[S]:sS}],[0,{[E]:"PrivateIpAddress",[S]:qc}]]],ib=[3,H,aJ,0,[jM,So],[[1,{[E]:"Code",[S]:Hk}],[0,{[E]:"Name",[S]:wi}]]],Xae=[3,H,sJ,0,[bo,gY,Bee],[[0,{[E]:"InstanceId",[S]:eS}],[()=>ib,{[E]:"CurrentState",[S]:Wne}],[()=>ib,{[E]:"PreviousState",[S]:Toe}]]],Wae=[3,H,RD,0,[ene,tX,VD,iD],[[1,{[E]:"TotalSizeInGB",[S]:hie}],[()=>Yce,{[E]:"Disks",[S]:dse}],[0,{[E]:"NvmeSupport",[S]:m3}],[0,{[E]:"EncryptionSupport",[S]:Gk}]]],Jae=[3,H,uJ,0,[Ep,rY,fD,Lte,kte,Ute,YQ,C0,tk,_k,ma,oJ,RD,QM,jD,dD,uD,JD,_D,YX,XQ,RY,$Q,lte,hee,pee,GD,DD,HD,Lee,Wee],[[0,{[E]:"InstanceType",[S]:s3}],[2,{[E]:"CurrentGeneration",[S]:Hne}],[2,{[E]:"FreeTierEligible",[S]:Yk}],[()=>Lle,{[E]:"SupportedUsageClasses",[S]:eie}],[()=>kle,{[E]:"SupportedRootDeviceTypes",[S]:Xoe}],[()=>$le,{[E]:"SupportedVirtualizationTypes",[S]:nie}],[2,{[E]:"BareMetal",[S]:Nne}],[0,{[E]:"Hypervisor",[S]:J0}],[()=>xce,{[E]:"ProcessorInfo",[S]:woe}],[()=>$ce,{[E]:"VCpuInfo",[S]:vie}],[()=>uce,{[E]:"MemoryInfo",[S]:Hc}],[2,{[E]:"InstanceStorageSupported",[S]:xre}],[()=>Wae,{[E]:"InstanceStorageInfo",[S]:Ere}],[()=>sae,{[E]:"EbsInfo",[S]:Rse}],[()=>hce,{[E]:"NetworkInfo",[S]:loe}],[()=>_ae,{[E]:"GpuInfo",[S]:qse}],[()=>vae,{[E]:"FpgaInfo",[S]:Use}],[()=>Sce,{[E]:"PlacementGroupInfo",[S]:Soe}],[()=>Oae,{[E]:"InferenceAcceleratorInfo",[S]:rre}],[2,{[E]:"HibernationSupported",[S]:Jse}],[2,{[E]:"BurstablePerformanceSupported",[S]:zne}],[2,{[E]:"DedicatedHostsSupported",[S]:rse}],[2,{[E]:"AutoRecoverySupported",[S]:Ane}],[()=>Zce,{[E]:"SupportedBootModes",[S]:joe}],[0,{[E]:"NitroEnclavesSupport",[S]:ioe}],[0,{[E]:"NitroTpmSupport",[S]:hoe}],[()=>vce,{[E]:"NitroTpmInfo",[S]:doe}],[()=>ace,{[E]:"MediaAcceleratorInfo",[S]:qre}],[()=>yce,{[E]:"NeuronInfo",[S]:uoe}],[0,{[E]:"PhcSupport",[S]:Coe}],[0,{[E]:"RebootMigrationSupport",[S]:Poe}]]],ece=[3,H,tJ,0,[M0],[0]],tce=[3,H,nJ,0,[O0],[0]],nce=[3,H,CJ,0,[pa,ga,Nr,D0,vJ],[[0,{[E]:"KeyPairId",[S]:Ap}],[()=>va,{[E]:"TagSet",[S]:Gc}],[0,{[E]:"KeyName",[S]:Ku}],[0,{[E]:"KeyFingerprint",[S]:tS}],[()=>Iie,{[E]:"KeyMaterial",[S]:Nre}]]],sce=[3,H,xJ,0,[pa,OD,ga,Pee,UM,Nr,D0],[[0,{[E]:"KeyPairId",[S]:Ap}],[0,{[E]:"KeyType",[S]:Lre}],[()=>va,{[E]:"TagSet",[S]:Gc}],[0,{[E]:"PublicKey",[S]:Eoe}],[4,{[E]:"CreateTime",[S]:jk}],[0,{[E]:"KeyName",[S]:Ku}],[0,{[E]:"KeyFingerprint",[S]:tS}]]],rce=[3,H,BJ,0,[zJ,LJ,Ck],[0,0,0]],oce=[3,H,AJ,0,[MD],[[0,{[E]:"LicenseConfigurationArn",[S]:Bre}]]],ice=[3,H,TJ,0,[MD],[0]],ace=[3,H,DD,0,[TM,Xte],[[()=>Ele,{[E]:"Accelerators",[S]:Ok}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:uie}]]],cce=[3,H,VJ,0,[bi,So,Fu,ma],[[1,{[E]:"Count",[S]:ya}],[0,{[E]:"Name",[S]:wi}],[0,{[E]:"Manufacturer",[S]:Zu}],[()=>lce,{[E]:"MemoryInfo",[S]:Hc}]]],lce=[3,H,KJ,0,[Uc],[[1,{[E]:"SizeInMiB",[S]:Vc}]]],uce=[3,H,ma,0,[Uc],[[1,{[E]:"SizeInMiB",[S]:Vc}]]],fce=[3,H,P0,0,[jc],[[0,{[E]:"State",[S]:O3}]]],dce=[3,H,iee,0,[N0,qD,ND,VQ,_ee,xY,XJ,WJ],[[1,{[E]:"NetworkCardIndex",[S]:d3}],[0,{[E]:"NetworkPerformance",[S]:p3}],[1,{[E]:"MaximumNetworkInterfaces",[S]:l3}],[1,{[E]:"BaselineBandwidthInGbps",[S]:Pne}],[1,{[E]:"PeakBandwidthInGbps",[S]:goe}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:sse}],[1,{[E]:"MaximumEnaQueueCount",[S]:Qre}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:Yre}]]],hce=[3,H,jD,0,[qD,ND,JJ,FY,ree,tW,nW,cJ,w0,OX,YM,EX,AX,JQ,zX],[[0,{[E]:"NetworkPerformance",[S]:p3}],[1,{[E]:"MaximumNetworkInterfaces",[S]:l3}],[1,{[E]:"MaximumNetworkCards",[S]:Xre}],[1,{[E]:"DefaultNetworkCardIndex",[S]:ose}],[()=>xle,{[E]:"NetworkCards",[S]:soe}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:ore}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:ire}],[2,{[E]:"Ipv6Supported",[S]:Ire}],[0,{[E]:"EnaSupport",[S]:X0}],[2,{[E]:"EfaSupported",[S]:Bse}],[()=>iae,{[E]:"EfaInfo",[S]:Cse}],[2,{[E]:"EncryptionInTransitSupported",[S]:xse}],[2,{[E]:"EnaSrdSupported",[S]:Nse}],[()=>Vce,{[E]:"BandwidthWeightings",[S]:Bne}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:$se}]]],pce=[3,H,cee,0,[bi,Ck],[[1,{[E]:"Count",[S]:ya}],[1,{[E]:"Version",[S]:Cie}]]],mce=[3,H,lee,0,[bi,So,aY,ma],[[1,{[E]:"Count",[S]:ya}],[0,{[E]:"Name",[S]:wi}],[()=>pce,{[E]:"CoreInfo",[S]:Vne}],[()=>gce,{[E]:"MemoryInfo",[S]:Hc}]]],gce=[3,H,fee,0,[Uc],[[1,{[E]:"SizeInMiB",[S]:Vc}]]],yce=[3,H,HD,0,[dee,Wte],[[()=>Rle,{[E]:"NeuronDevices",[S]:ooe}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:fie}]]],vce=[3,H,GD,0,[jte],[[()=>Cle,{[E]:"SupportedVersions",[S]:sie}]]],bce=[3,H,yee,0,[ZD],[0]],Op=[3,H,vee,0,[nee,ZD],[[2,{[E]:"Managed",[S]:eoe}],[0,{[E]:"Principal",[S]:moe}]]],U3=[3,H,$0,0,[h0,HQ,pD,zee,KX,nne,fte,QX,hD,d0],[[0,{[E]:"AvailabilityZoneId",[S]:Ik}],[0,{[E]:"Affinity",[S]:Dne}],[0,{[E]:"GroupName",[S]:Wk}],[1,{[E]:"PartitionNumber",[S]:Roe}],[0,{[E]:"HostId",[S]:Zse}],[0,{[E]:"Tenancy",[S]:oie}],[0,{[E]:"SpreadDomain",[S]:Foe}],[0,{[E]:"HostResourceGroupArn",[S]:Wse}],[0,{[E]:"GroupId",[S]:Xk}],[0,{[E]:"AvailabilityZone",[S]:Z0}]]],Sce=[3,H,JD,0,[Pte],[[()=>Ale,{[E]:"SupportedStrategies",[S]:Woe}]]],_ce=[3,H,Cee,0,[bD,tD,eD],[0,2,2]],wce=[3,H,Tee,0,[bD,tD,eD],[[0,{[E]:"HostnameType",[S]:tre}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:Dse}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Mse}]]],Ece=[3,H,Oee,0,[sk,$c],[[2,{[E]:"Primary",[S]:_3}],[0,{[E]:"PrivateIpAddress",[S]:qc}]]],xce=[3,H,tk,0,[cte,ute,dte,Fu],[[()=>qce,{[E]:"SupportedArchitectures",[S]:Uoe}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:Hoe}],[()=>Nle,{[E]:"SupportedFeatures",[S]:qoe}],[0,{[E]:"Manufacturer",[S]:Zu}]]],Rce=[3,H,Ree,0,[wee,xee],[[0,{[E]:"ProductCode",[S]:yoe}],[0,{[E]:"Type",[S]:k3}]]],Cce=[3,H,Fee,0,[Hu,ms],[[()=>Yu,{[S]:bo}],[2,{[E]:"DryRun",[S]:Ns}]],1],Tce=[3,H,rte,0,[gee,j0,DX],[[0,{[E]:"OptInStatus",[S]:poe}],[0,{[E]:"RegionName",[S]:zoe}],[0,{[E]:"RegionEndpoint",[S]:Ooe}]]],j3=[3,H,ite,0,[Gee,L0,Zee,x0,mJ],[[0,{[E]:"ReservationId",[S]:Moe}],[0,{[E]:"OwnerId",[S]:g3}],[0,{[E]:"RequesterId",[S]:koe}],[()=>iS,{[E]:"GroupSet",[S]:W0}],[()=>fle,{[E]:"InstancesSet",[S]:Tp}]]],Ace=[3,H,Hee,0,[E0],[[2,{[E]:"Enabled",[S]:Zk}]],1],Ice=[3,H,qee,0,[FJ,qJ,m0,ju,Ep,SD,T0,k0,Nr,P0,$0,U0,pte,ak,Rp,rne,GM,ZM,V0,NJ,NW,mY,g0,v0,R0,DJ,zD,_0,YD,LD,_Y,CX,FD,qu,ms,wY,bW,$c,$M,EM,UD,I0,XM],[1,1,[()=>Kce,{[S]:p0}],0,0,1,[()=>aS,{[S]:A0}],0,0,[()=>Ace,0],[()=>U3,0],0,[()=>q3,{[S]:H0}],[()=>Ple,{[S]:ck}],0,[()=>Aie,0],[()=>Jce,0],[()=>tle,{[S]:KM}],[()=>lS,{[S]:Cp}],()=>rce,()=>Hae,()=>$ie,()=>Lie,()=>Oie,()=>xae,[()=>wle,{[S]:PJ}],()=>Fae,()=>pae,()=>_ce,()=>jae,2,2,()=>Qae,()=>bce,[2,{[E]:"DryRun",[S]:Ns}],[2,{[E]:"DisableApiTermination",[S]:tse}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:lre}],[0,{[E]:"PrivateIpAddress",[S]:qc}],[0,{[E]:"ClientToken",[Mre]:1,[S]:Uk}],[0,{[E]:"AdditionalInfo",[S]:Tk}],[()=>hle,{[E]:"NetworkInterface",[S]:coe}],[()=>Cae,{[E]:"IamInstanceProfile",[S]:t3}],[2,{[E]:"EbsOptimized",[S]:Vk}]],2],Oce=[3,H,Ote,0,[eee,Rte,ZQ,vne,hW],[0,0,1,4,0]],Mce=[3,H,_te,0,[Hu,EM,ms],[[()=>Yu,{[S]:bo}],[0,{[E]:"AdditionalInfo",[S]:Tk}],[2,{[E]:"DryRun",[S]:Ns}]],1],Dce=[3,H,wte,0,[Cte],[[()=>cS,{[E]:"InstancesSet",[S]:Tp}]]],H3=[3,H,F0,0,[jM,see],[[0,{[E]:"Code",[S]:Hk}],[0,{[E]:"Message",[S]:toe}]]],kce=[3,H,Ete,0,[Hu,XX,fk,ms,lD],[[()=>Yu,{[S]:bo}],2,2,[2,{[E]:"DryRun",[S]:Ns}],[2,{[E]:"Force",[S]:Hse}]],1],Pce=[3,H,xte,0,[Ate],[[()=>cS,{[E]:"InstancesSet",[S]:Tp}]]],Nce=[3,H,mk,0,[gJ,Sk],[[0,{[E]:"Key",[S]:Pre}],[0,{[E]:"Value",[S]:yie}]]],zce=[3,H,Cp,0,[nte,ga],[[0,{[E]:"ResourceType",[S]:Boe}],[()=>va,{[S]:mk}]]],Lce=[3,H,Kte,0,[Hu,lD,fk,ms],[[()=>Yu,{[S]:bo}],2,2,[2,{[E]:"DryRun",[S]:Ns}]],1],Bce=[3,H,Zte,0,[Qte],[[()=>cS,{[E]:"InstancesSet",[S]:Tp}]]],$ce=[3,H,_k,0,[YY,EY,ZY,cne,yne],[[1,{[E]:"DefaultVCpus",[S]:use}],[1,{[E]:"DefaultCores",[S]:nse}],[1,{[E]:"DefaultThreadsPerCore",[S]:cse}],[()=>Qce,{[E]:"ValidCores",[S]:bie}],[()=>zle,{[E]:"ValidThreadsPerCore",[S]:Rie}]]],Uce=[3,H,_ne,0,[h0,z0,$te,AD,ga,xk,BX,jJ,gk,zte,qu,Ek,Vu,Hte,lk,d0,jc,UM,qQ,cD,ID],[[0,{[E]:"AvailabilityZoneId",[S]:Ik}],[0,{[E]:"OutpostArn",[S]:nS}],[0,{[E]:"SourceVolumeId",[S]:tie}],[1,{[E]:"Iops",[S]:r3}],[()=>va,{[E]:"TagSet",[S]:Gc}],[0,{[E]:"VolumeType",[S]:z3}],[2,{[E]:"FastRestored",[S]:jse}],[2,{[E]:"MultiAttachEnabled",[S]:Fre}],[1,{[E]:"Throughput",[S]:D3}],[0,{[E]:"SseType",[S]:Joe}],[()=>Op,{[E]:"Operator",[S]:Ip}],[1,{[E]:"VolumeInitializationRate",[S]:Sie}],[0,{[E]:"VolumeId",[S]:oS}],[1,{[E]:"Size",[S]:rie}],[0,{[E]:"SnapshotId",[S]:C3}],[0,{[E]:"AvailabilityZone",[S]:Z0}],[0,{[E]:"Status",[S]:Qu}],[4,{[E]:"CreateTime",[S]:jk}],[()=>Ule,{[E]:"AttachmentSet",[S]:Mne}],[2,{[E]:"Encrypted",[S]:Qk}],[0,{[E]:"KmsKeyId",[S]:i3}]]],jce=[3,H,ane,0,[Uu,xM,GW,wp,Vu,bo,eX,jc,f0],[[2,{[E]:"DeleteOnTermination",[S]:Gu}],[0,{[E]:"AssociatedResource",[S]:Ak}],[0,{[E]:"InstanceOwningService",[S]:gre}],[1,{[E]:"EbsCardIndex",[S]:Y0}],[0,{[E]:"VolumeId",[S]:oS}],[0,{[E]:"InstanceId",[S]:eS}],[0,{[E]:"Device",[S]:fse}],[0,{[E]:"Status",[S]:Qu}],[4,{[E]:"AttachTime",[S]:K0}]]],Hce="unit",Fce=[-3,I3,"EC2ServiceException",0,[],[]];Mt.for(I3).registerError(Fce,u0);var qce=[1,H,jQ,0,[0,{[S]:je}]],Vce=[1,H,WQ,0,[0,{[S]:je}]],Gce=[1,H,GQ,0,[()=>B3,{[S]:je}]],Kce=[1,H,KQ,0,[()=>B3,{[S]:p0}]],Zce=[1,H,QQ,0,[0,{[S]:je}]],Qce=[1,H,tY,0,[1,{[S]:je}]],Yce=[1,H,CY,0,[()=>eae,{[S]:je}]],Xce=[1,H,rX,0,[()=>nae,{[S]:je}]],Wce=[1,H,lX,0,[()=>aae,{[S]:je}]],Jce=[1,H,pX,0,[()=>cae,{[S]:je}]],ele=[1,H,yX,0,[()=>uae,{[S]:je}]],tle=[1,H,ZM,0,[()=>lae,{[S]:je}]],nle=[1,H,sX,0,[0,{[S]:VM}]],Kc=[1,H,LX,0,[()=>mae,{[S]:Si}]],sle=[1,H,PX,0,[()=>gae,{[S]:je}]],rle=[1,H,jX,0,[()=>bae,{[S]:je}]],iS=[1,H,FX,0,[()=>wae,{[S]:je}]],ole=[1,H,SW,0,[0,{[S]:ju}]],ile=[1,H,TW,0,[()=>Tae,{[S]:je}]],ale=[1,H,cW,0,[()=>Mae,0]],cle=[1,H,oW,0,[()=>zae,{[S]:je}]],Yu=[1,H,_W,0,[0,{[S]:bo}]],lle=[1,H,pW,0,[()=>Lae,{[S]:je}]],aS=[1,H,dW,0,[()=>Bae,{[S]:je}]],ule=[1,H,mW,0,[()=>$ae,{[S]:je}]],fle=[1,H,IW,0,[()=>kae,{[S]:je}]],dle=[1,H,$W,0,[()=>Vae,{[S]:je}]],hle=[1,H,jW,0,[()=>Kae,{[S]:je}]],ple=[1,H,YW,0,[()=>Yae,{[S]:je}]],cS=[1,H,rJ,0,[()=>Xae,{[S]:je}]],mle=[1,H,lJ,0,[()=>Jae,{[S]:je}]],gle=[1,H,JW,0,[()=>ece,{[S]:je}]],yle=[1,H,eJ,0,[()=>tce,{[S]:je}]],vle=[1,H,bJ,0,[0,{[S]:Nr}]],ble=[1,H,wJ,0,[0,{[S]:pa}]],Sle=[1,H,RJ,0,[()=>sce,{[S]:je}]],_le=[1,H,OJ,0,[()=>oce,{[S]:je}]],wle=[1,H,kJ,0,[()=>ice,{[S]:je}]],Ele=[1,H,GJ,0,[()=>cce,{[S]:je}]],xle=[1,H,oee,0,[()=>dce,{[S]:je}]],Rle=[1,H,uee,0,[()=>mce,{[S]:je}]],Cle=[1,H,mee,0,[0,{[S]:je}]],Tle=[1,H,bee,0,[0,{[S]:KD}]],Ale=[1,H,Aee,0,[0,{[S]:je}]],Ile=[1,H,Mee,0,[()=>Ece,{[S]:je}]],F3=[1,H,Eee,0,[()=>Rce,{[S]:je}]],Ole=[1,H,Yee,0,[()=>Tce,{[S]:je}]],Mle=[1,H,ete,0,[0,{[S]:j0}]],Dle=[1,H,Xee,0,[()=>j3,{[S]:je}]],kle=[1,H,jee,0,[0,{[S]:je}]],q3=[1,H,hte,0,[0,{[S]:H0}]],Ple=[1,H,mte,0,[0,{[S]:ck}]],Nle=[1,H,ate,0,[0,{[S]:je}]],va=[1,H,Yte,0,[()=>Nce,{[S]:je}]],lS=[1,H,tne,0,[()=>zce,{[S]:je}]],zle=[1,H,Jte,0,[1,{[S]:je}]],Lle=[1,H,sne,0,[0,{[S]:je}]],Ble=[1,H,pne,0,[0,{[S]:je}]],$le=[1,H,gne,0,[0,{[S]:je}]],Ule=[1,H,ine,0,[()=>jce,{[S]:je}]],jle=[1,H,lne,0,[0,{[S]:Vu}]],Hle=[1,H,fne,0,[()=>Uce,{[S]:je}]],Fle=[1,H,wne,0,[0,{[S]:je}]],Hge=[9,H,cY,0,()=>Bie,()=>nce],Fge=[9,H,LY,0,()=>Uie,()=>jie],qle=[9,H,PY,0,()=>Hie,()=>Fie],Vle=[9,H,NY,0,()=>qie,()=>Vie],Gle=[9,H,kY,0,()=>Gie,()=>Kie],Kle=[9,H,HY,0,()=>Zie,()=>Qie],Zle=[9,H,KY,0,()=>Yie,()=>Xie],Qle=[9,H,JY,0,()=>Wie,()=>Jie],qge=[9,H,EW,0,()=>Aae,()=>Iae],Vge=[9,H,Kee,0,()=>Cce,()=>Hce],Gge=[9,H,Qee,0,()=>Ice,()=>j3],Kge=[9,H,Tte,0,()=>Mce,()=>Dce],Zge=[9,H,Ite,0,()=>kce,()=>Pce],Qge=[9,H,Vte,0,()=>Lce,()=>Bce];class V3 extends Pr.classBuilder().ep(zc).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(qle).build(){}class G3 extends Pr.classBuilder().ep(zc).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(Vle).build(){}class Yle extends Pr.classBuilder().ep(zc).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(Gle).build(){}class K3 extends Pr.classBuilder().ep(zc).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(Kle).build(){}class Xle extends Pr.classBuilder().ep(zc).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(Zle).build(){}class Z3 extends Pr.classBuilder().ep(zc).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(Qle).build(){}function Wle(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&On.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 Jle={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},eue=e=>({applyToStack:t=>{t.add(Wle(e),Jle)}}),Q3={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},tue=Q3.WHEN_SUPPORTED,Yge={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},nue=Q3.WHEN_SUPPORTED;var ab;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(ab||(ab={}));var AC;(function(e){e.HEADER="header",e.TRAILER="trailer"})(AC||(AC={}));const Xge=ab.CRC32;var Wge=(function(){function e(){this.crc32=new Lh}return e.prototype.update=function(t){zh(t)||this.crc32.update(ca(t))},e.prototype.digest=function(){return uM(this,void 0,void 0,function(){return fM(this,function(t){return[2,aQ(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new Lh},e})(),Lh=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=dQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^rue[(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})(),sue=[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],rue=cQ(sue);const oue=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ds(t??tue),responseChecksumValidation:Ds(n??nue),requestStreamBufferSize:Number(r??0)})},iue=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}},aue={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function cue(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 lue={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},uue=e=>({applyToStack:t=>{t.add(cue(e),lue),t.addRelativeTo(iue(e),aue)}});class uS{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+uS.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 tv(Promise.resolve(h)))})),l)):i.set(r,new tv(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 fue="Directory",due="S3Express",hue="sigv4-s3express",pue="X-Amz-S3session-Token",mue=pue.toLowerCase(),gue=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===hue;if((i.properties?.backend===due||i.properties?.bucketType===fue)&&(mr(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,On.isInstance(r.request)&&d.sessionToken&&(r.request.headers[mue]=d.sessionToken)}}}return t(r)},yue={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},vue=e=>({applyToStack:t=>{t.add(gue(e),yue)}}),bue=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},Sue=e=>t=>{throw t},_ue=(e,t)=>{},wue=e=>(t,n)=>async r=>{if(!On.isInstance(r.request))return t(r);const c=yo(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 bue(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||Sue)(l));return(d.successHandler||_ue)(y.response,l),y},Eue=e=>({applyToStack:t=>{t.addRelativeTo(wue(e),W2)}}),xue=(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 fS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},Rue={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Cue=3e3,Tue=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!ia.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 qV(f)),c.body=y;const g=await Aue(h,{streamCollector:async b=>LV(b,Cue)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&Rue[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},Aue=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Iue={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},dS=e=>({applyToStack:t=>{t.addRelativeTo(Tue(e),Iue)}}),Oue=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Mue(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 Due={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function kue({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!Oue(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const Pue={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Nue=e=>({applyToStack:t=>{t.add(kue(e),Pue),t.addRelativeTo(Mue(e),Due)}}),zue=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),cb="X-Amz-S3session-Token",IC=cb.toLowerCase();class Lue extends nb{async signWithCredentials(t,n,r){const i=OC(n);t.headers[IC]=n.sessionToken;const c=this;return MC(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=OC(n);return delete t.headers[IC],t.headers[cb]=n.sessionToken,t.query=t.query??{},t.query[cb]=n.sessionToken,MC(this,i),this.presign(t,r)}}function OC(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function MC(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 Y3{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new Lue(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 hS="required",M="type",ce="rules",L="conditions",J="fn",ee="argv",De="ref",We="assign",we="url",Ee="properties",co="backend",In="authSchemes",fn="disableDoubleEncoding",dn="signingName",Bn="signingRegion",xe="headers",pS="signingRegionSet",Bue=6,$ue=!1,Er=!0,Os="isSet",en="booleanEquals",Te="error",Bh="aws.partition",pt="stringEquals",Ft="getAttr",Vt="name",kt="substring",DC="bucketSuffix",mS="parseURL",me="endpoint",ue="tree",$h="aws.isVirtualHostableS3Bucket",Uh="{url#scheme}://{Bucket}.{url#authority}{url#path}",Or="not",kC="accessPointSuffix",sh="{url#scheme}://{url#authority}{url#path}",X3="hardwareType",W3="regionPrefix",PC="bucketAliasSuffix",lb="outpostId",ba="isValidHostLabel",gS="sigv4a",Du="s3-outposts",Oc="s3",J3="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",eP="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",NC="https://{Bucket}.s3.{partitionResult#dnsSuffix}",tP="aws.parseArn",nP="bucketArn",sP="arnType",jh="",yS="s3-object-lambda",rP="accesspoint",vS="accessPointName",zC="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",LC="mrapPartition",BC="outpostType",$C="arnPrefix",oP="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",UC="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",jC="https://s3.{partitionResult#dnsSuffix}",cc={[hS]:!1,[M]:"string"},lc={[hS]:!0,default:!1,[M]:"boolean"},Wl={[hS]:!1,[M]:"boolean"},Js={[J]:en,[ee]:[{[De]:"Accelerate"},!0]},Nt={[J]:en,[ee]:[{[De]:"UseFIPS"},!0]},Ot={[J]:en,[ee]:[{[De]:"UseDualStack"},!0]},Wt={[J]:Os,[ee]:[{[De]:"Endpoint"}]},iP={[J]:Bh,[ee]:[{[De]:"Region"}],[We]:"partitionResult"},HC={[J]:pt,[ee]:[{[J]:Ft,[ee]:[{[De]:"partitionResult"},Vt]},"aws-cn"]},fu={[J]:Os,[ee]:[{[De]:"Bucket"}]},dt={[De]:"Bucket"},FC={[L]:[Js],[Te]:"S3Express does not support S3 Accelerate.",[M]:Te},qC={[L]:[Wt,{[J]:mS,[ee]:[{[De]:"Endpoint"}],[We]:"url"}],[ce]:[{[L]:[{[J]:Os,[ee]:[{[De]:"DisableS3ExpressSessionAuth"}]},{[J]:en,[ee]:[{[De]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[L]:[{[J]:en,[ee]:[{[J]:Ft,[ee]:[{[De]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[J]:"uriEncode",[ee]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[we]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[J]:$h,[ee]:[dt,!1]}],[ce]:[{[me]:{[we]:Uh,[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue},{[Te]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Te}],[M]:ue},{[L]:[{[J]:en,[ee]:[{[J]:Ft,[ee]:[{[De]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[J]:"uriEncode",[ee]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[we]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[J]:$h,[ee]:[dt,!1]}],[ce]:[{[me]:{[we]:Uh,[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue},{[Te]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Te}],[M]:ue},Jn={[J]:mS,[ee]:[{[De]:"Endpoint"}],[We]:"url"},nv={[J]:en,[ee]:[{[J]:Ft,[ee]:[{[De]:"url"},"isIp"]},!0]},aP={[De]:"url"},cP={[J]:"uriEncode",[ee]:[dt],[We]:"uri_encoded_bucket"},Ts={[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:"s3express",[Bn]:"{Region}"}]},qe={},lP={[J]:$h,[ee]:[dt,!1]},VC={[Te]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Te},GC={[J]:Os,[ee]:[{[De]:"UseS3ExpressControlEndpoint"}]},KC={[J]:en,[ee]:[{[De]:"UseS3ExpressControlEndpoint"},!0]},Ke={[J]:Or,[ee]:[Wt]},rt={[J]:en,[ee]:[{[De]:"UseDualStack"},!1]},et={[J]:en,[ee]:[{[De]:"UseFIPS"},!1]},qd={[Te]:"Unrecognized S3Express bucket name format.",[M]:Te},ZC={[J]:Or,[ee]:[fu]},QC={[De]:X3},YC={[L]:[Ke],[Te]:"Expected a endpoint to be specified but no endpoint was found",[M]:Te},Vd={[In]:[{[fn]:!0,[Vt]:gS,[dn]:Du,[pS]:["*"]},{[fn]:!0,[Vt]:"sigv4",[dn]:Du,[Bn]:"{Region}"}]},sv={[J]:en,[ee]:[{[De]:"ForcePathStyle"},!1]},Uue={[De]:"ForcePathStyle"},cn={[J]:en,[ee]:[{[De]:"Accelerate"},!1]},Sn={[J]:pt,[ee]:[{[De]:"Region"},"aws-global"]},Cn={[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:Oc,[Bn]:"us-east-1"}]},lt={[J]:Or,[ee]:[Sn]},Tn={[J]:en,[ee]:[{[De]:"UseGlobalEndpoint"},!0]},XC={[we]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:Oc,[Bn]:"{Region}"}]},[xe]:{}},pn={[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:Oc,[Bn]:"{Region}"}]},An={[J]:en,[ee]:[{[De]:"UseGlobalEndpoint"},!1]},WC={[we]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},JC={[we]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},eT={[we]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},rv={[J]:en,[ee]:[{[J]:Ft,[ee]:[aP,"isIp"]},!1]},ov={[we]:J3,[Ee]:pn,[xe]:{}},ub={[we]:Uh,[Ee]:pn,[xe]:{}},tT={[me]:ub,[M]:me},iv={[we]:eP,[Ee]:pn,[xe]:{}},nT={[we]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},Gd={[Te]:"Invalid region: region was not a valid DNS name.",[M]:Te},ds={[De]:nP},uP={[De]:sP},av={[J]:Ft,[ee]:[ds,"service"]},bS={[De]:vS},sT={[L]:[Ot],[Te]:"S3 Object Lambda does not support Dual-stack",[M]:Te},rT={[L]:[Js],[Te]:"S3 Object Lambda does not support S3 Accelerate",[M]:Te},oT={[L]:[{[J]:Os,[ee]:[{[De]:"DisableAccessPoints"}]},{[J]:en,[ee]:[{[De]:"DisableAccessPoints"},!0]}],[Te]:"Access points are not supported for this operation",[M]:Te},cv={[L]:[{[J]:Os,[ee]:[{[De]:"UseArnRegion"}]},{[J]:en,[ee]:[{[De]:"UseArnRegion"},!1]},{[J]:Or,[ee]:[{[J]:pt,[ee]:[{[J]:Ft,[ee]:[ds,"region"]},"{Region}"]}]}],[Te]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Te},fP={[J]:Ft,[ee]:[{[De]:"bucketPartition"},Vt]},dP={[J]:Ft,[ee]:[ds,"accountId"]},lv={[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:yS,[Bn]:"{bucketArn#region}"}]},iT={[Te]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Te},uv={[Te]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Te},fv={[Te]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Te},dv={[Te]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Te},aT={[Te]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Te},cT={[Te]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Te},Jl={[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:Oc,[Bn]:"{bucketArn#region}"}]},lT={[In]:[{[fn]:!0,[Vt]:gS,[dn]:Du,[pS]:["*"]},{[fn]:!0,[Vt]:"sigv4",[dn]:Du,[Bn]:"{bucketArn#region}"}]},uT={[J]:tP,[ee]:[dt]},fT={[we]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},dT={[we]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},hT={[we]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},hv={[we]:oP,[Ee]:pn,[xe]:{}},pT={[we]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},mT={[De]:"UseObjectLambdaEndpoint"},pv={[In]:[{[fn]:!0,[Vt]:"sigv4",[dn]:yS,[Bn]:"{Region}"}]},gT={[we]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},yT={[we]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},vT={[we]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},mv={[we]:sh,[Ee]:pn,[xe]:{}},bT={[we]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},gv=[{[De]:"Region"}],jue=[{[De]:"Endpoint"}],Hue=[dt],yv=[Js],uc=[Wt,Jn],ST=[{[J]:Os,[ee]:[{[De]:"DisableS3ExpressSessionAuth"}]},{[J]:en,[ee]:[{[De]:"DisableS3ExpressSessionAuth"},!0]}],Fue=[cP],vv=[lP],Xs=[iP],bv=[Nt,Ot],du=[Nt,rt],hu=[et,Ot],pu=[et,rt],_T=[{[J]:kt,[ee]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],xr=[{[L]:[Nt,Ot],[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:{}},[M]:me},{[L]:du,[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:{}},[M]:me},{[L]:hu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:{}},[M]:me},{[L]:pu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:{}},[M]:me}],wT=[{[J]:kt,[ee]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],ET=[{[J]:kt,[ee]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],xT=[{[J]:kt,[ee]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],RT=[{[J]:kt,[ee]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],Rr=[{[L]:[Nt,Ot],[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me},{[L]:du,[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me},{[L]:hu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me},{[L]:pu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[co]:"S3Express",[In]:[{[fn]:!0,[Vt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],CT=[dt,0,7,!0],TT=[{[J]:kt,[ee]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],AT=[{[J]:kt,[ee]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],IT=[{[J]:kt,[ee]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],OT=[{[J]:kt,[ee]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],MT=[{[J]:kt,[ee]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[J]:kt,[ee]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[J]:pt,[ee]:[{[De]:"s3expressAvailabilityZoneDelim"},"--"]}],que=[fu],DT=[{[J]:ba,[ee]:[{[De]:lb},!1]}],kT=[{[J]:pt,[ee]:[{[De]:W3},"beta"]}],Vue=["*"],PT=[{[J]:ba,[ee]:[{[De]:"Region"},!1]}],Yo=[{[J]:pt,[ee]:[{[De]:"Region"},"us-east-1"]}],Sv=[{[J]:pt,[ee]:[uP,rP]}],NT=[{[J]:Ft,[ee]:[ds,"resourceId[1]"],[We]:vS},{[J]:Or,[ee]:[{[J]:pt,[ee]:[bS,jh]}]}],Gue=[ds,"resourceId[1]"],zT=[Ot],_v=[{[J]:Or,[ee]:[{[J]:pt,[ee]:[{[J]:Ft,[ee]:[ds,"region"]},jh]}]}],LT=[{[J]:Or,[ee]:[{[J]:Os,[ee]:[{[J]:Ft,[ee]:[ds,"resourceId[2]"]}]}]}],Kue=[ds,"resourceId[2]"],wv=[{[J]:Bh,[ee]:[{[J]:Ft,[ee]:[ds,"region"]}],[We]:"bucketPartition"}],BT=[{[J]:pt,[ee]:[fP,{[J]:Ft,[ee]:[{[De]:"partitionResult"},Vt]}]}],Ev=[{[J]:ba,[ee]:[{[J]:Ft,[ee]:[ds,"region"]},!0]}],xv=[{[J]:ba,[ee]:[dP,!1]}],$T=[{[J]:ba,[ee]:[bS,!1]}],Kd=[Nt],UT=[{[J]:ba,[ee]:[{[De]:"Region"},!0]}],Zue={parameters:{Bucket:cc,Region:cc,UseFIPS:lc,UseDualStack:lc,Endpoint:cc,ForcePathStyle:lc,Accelerate:lc,UseGlobalEndpoint:lc,UseObjectLambdaEndpoint:Wl,Key:cc,Prefix:cc,CopySource:cc,DisableAccessPoints:Wl,DisableMultiRegionAccessPoints:lc,UseArnRegion:Wl,UseS3ExpressControlEndpoint:Wl,DisableS3ExpressSessionAuth:Wl},[ce]:[{[L]:[{[J]:Os,[ee]:gv}],[ce]:[{[L]:[Js,Nt],error:"Accelerate cannot be used with FIPS",[M]:Te},{[L]:[Ot,Wt],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Te},{[L]:[Wt,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Te},{[L]:[Wt,Js],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Te},{[L]:[Nt,iP,HC],error:"Partition does not support FIPS",[M]:Te},{[L]:[fu,{[J]:kt,[ee]:[dt,0,Bue,Er],[We]:DC},{[J]:pt,[ee]:[{[De]:DC},"--x-s3"]}],[ce]:[FC,qC,{[L]:[GC,KC],[ce]:[{[L]:Xs,[ce]:[{[L]:[cP,Ke],[ce]:[{[L]:bv,endpoint:{[we]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Ts,[xe]:qe},[M]:me},{[L]:du,endpoint:{[we]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Ts,[xe]:qe},[M]:me},{[L]:hu,endpoint:{[we]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Ts,[xe]:qe},[M]:me},{[L]:pu,endpoint:{[we]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Ts,[xe]:qe},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:vv,[ce]:[{[L]:Xs,[ce]:[{[L]:ST,[ce]:[{[L]:_T,[ce]:xr,[M]:ue},{[L]:wT,[ce]:xr,[M]:ue},{[L]:ET,[ce]:xr,[M]:ue},{[L]:xT,[ce]:xr,[M]:ue},{[L]:RT,[ce]:xr,[M]:ue},qd],[M]:ue},{[L]:_T,[ce]:Rr,[M]:ue},{[L]:wT,[ce]:Rr,[M]:ue},{[L]:ET,[ce]:Rr,[M]:ue},{[L]:xT,[ce]:Rr,[M]:ue},{[L]:RT,[ce]:Rr,[M]:ue},qd],[M]:ue}],[M]:ue},VC],[M]:ue},{[L]:[fu,{[J]:kt,[ee]:CT,[We]:kC},{[J]:pt,[ee]:[{[De]:kC},"--xa-s3"]}],[ce]:[FC,qC,{[L]:vv,[ce]:[{[L]:Xs,[ce]:[{[L]:ST,[ce]:[{[L]:TT,[ce]:xr,[M]:ue},{[L]:AT,[ce]:xr,[M]:ue},{[L]:IT,[ce]:xr,[M]:ue},{[L]:OT,[ce]:xr,[M]:ue},{[L]:MT,[ce]:xr,[M]:ue},qd],[M]:ue},{[L]:TT,[ce]:Rr,[M]:ue},{[L]:AT,[ce]:Rr,[M]:ue},{[L]:IT,[ce]:Rr,[M]:ue},{[L]:OT,[ce]:Rr,[M]:ue},{[L]:MT,[ce]:Rr,[M]:ue},qd],[M]:ue}],[M]:ue},VC],[M]:ue},{[L]:[ZC,GC,KC],[ce]:[{[L]:Xs,[ce]:[{[L]:uc,endpoint:{[we]:sh,[Ee]:Ts,[xe]:qe},[M]:me},{[L]:bv,endpoint:{[we]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:qe},[M]:me},{[L]:du,endpoint:{[we]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:qe},[M]:me},{[L]:hu,endpoint:{[we]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:qe},[M]:me},{[L]:pu,endpoint:{[we]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[Ee]:Ts,[xe]:qe},[M]:me}],[M]:ue}],[M]:ue},{[L]:[fu,{[J]:kt,[ee]:[dt,49,50,Er],[We]:X3},{[J]:kt,[ee]:[dt,8,12,Er],[We]:W3},{[J]:kt,[ee]:CT,[We]:PC},{[J]:kt,[ee]:[dt,32,49,Er],[We]:lb},{[J]:Bh,[ee]:gv,[We]:"regionPartition"},{[J]:pt,[ee]:[{[De]:PC},"--op-s3"]}],[ce]:[{[L]:DT,[ce]:[{[L]:vv,[ce]:[{[L]:[{[J]:pt,[ee]:[QC,"e"]}],[ce]:[{[L]:kT,[ce]:[YC,{[L]:uc,endpoint:{[we]:"https://{Bucket}.ec2.{url#authority}",[Ee]:Vd,[xe]:qe},[M]:me}],[M]:ue},{endpoint:{[we]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[Ee]:Vd,[xe]:qe},[M]:me}],[M]:ue},{[L]:[{[J]:pt,[ee]:[QC,"o"]}],[ce]:[{[L]:kT,[ce]:[YC,{[L]:uc,endpoint:{[we]:"https://{Bucket}.op-{outpostId}.{url#authority}",[Ee]:Vd,[xe]:qe},[M]:me}],[M]:ue},{endpoint:{[we]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[Ee]:Vd,[xe]:qe},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Te}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Te}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Te}],[M]:ue},{[L]:que,[ce]:[{[L]:[Wt,{[J]:Or,[ee]:[{[J]:Os,[ee]:[{[J]:mS,[ee]:jue}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Te},{[L]:[sv,lP],[ce]:[{[L]:Xs,[ce]:[{[L]:PT,[ce]:[{[L]:[Js,HC],error:"S3 Accelerate cannot be used in this region",[M]:Te},{[L]:[Ot,Nt,cn,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,Nt,cn,Ke,lt,Tn],[ce]:[{endpoint:XC,[M]:me}],[M]:ue},{[L]:[Ot,Nt,cn,Ke,lt,An],endpoint:XC,[M]:me},{[L]:[rt,Nt,cn,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Nt,cn,Ke,lt,Tn],[ce]:[{endpoint:WC,[M]:me}],[M]:ue},{[L]:[rt,Nt,cn,Ke,lt,An],endpoint:WC,[M]:me},{[L]:[Ot,et,Js,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,et,Js,Ke,lt,Tn],[ce]:[{endpoint:JC,[M]:me}],[M]:ue},{[L]:[Ot,et,Js,Ke,lt,An],endpoint:JC,[M]:me},{[L]:[Ot,et,cn,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,et,cn,Ke,lt,Tn],[ce]:[{endpoint:eT,[M]:me}],[M]:ue},{[L]:[Ot,et,cn,Ke,lt,An],endpoint:eT,[M]:me},{[L]:[rt,et,cn,Wt,Jn,nv,Sn],endpoint:{[we]:J3,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,cn,Wt,Jn,rv,Sn],endpoint:{[we]:Uh,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,cn,Wt,Jn,nv,lt,Tn],[ce]:[{[L]:Yo,endpoint:ov,[M]:me},{endpoint:ov,[M]:me}],[M]:ue},{[L]:[rt,et,cn,Wt,Jn,rv,lt,Tn],[ce]:[{[L]:Yo,endpoint:ub,[M]:me},tT],[M]:ue},{[L]:[rt,et,cn,Wt,Jn,nv,lt,An],endpoint:ov,[M]:me},{[L]:[rt,et,cn,Wt,Jn,rv,lt,An],endpoint:ub,[M]:me},{[L]:[rt,et,Js,Ke,Sn],endpoint:{[we]:eP,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,Js,Ke,lt,Tn],[ce]:[{[L]:Yo,endpoint:iv,[M]:me},{endpoint:iv,[M]:me}],[M]:ue},{[L]:[rt,et,Js,Ke,lt,An],endpoint:iv,[M]:me},{[L]:[rt,et,cn,Ke,Sn],endpoint:{[we]:NC,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,cn,Ke,lt,Tn],[ce]:[{[L]:Yo,endpoint:{[we]:NC,[Ee]:pn,[xe]:qe},[M]:me},{endpoint:nT,[M]:me}],[M]:ue},{[L]:[rt,et,cn,Ke,lt,An],endpoint:nT,[M]:me}],[M]:ue},Gd],[M]:ue}],[M]:ue},{[L]:[Wt,Jn,{[J]:pt,[ee]:[{[J]:Ft,[ee]:[aP,"scheme"]},"http"]},{[J]:$h,[ee]:[dt,Er]},sv,et,rt,cn],[ce]:[{[L]:Xs,[ce]:[{[L]:PT,[ce]:[tT],[M]:ue},Gd],[M]:ue}],[M]:ue},{[L]:[sv,{[J]:tP,[ee]:Hue,[We]:nP}],[ce]:[{[L]:[{[J]:Ft,[ee]:[ds,"resourceId[0]"],[We]:sP},{[J]:Or,[ee]:[{[J]:pt,[ee]:[uP,jh]}]}],[ce]:[{[L]:[{[J]:pt,[ee]:[av,yS]}],[ce]:[{[L]:Sv,[ce]:[{[L]:NT,[ce]:[sT,rT,{[L]:_v,[ce]:[oT,{[L]:LT,[ce]:[cv,{[L]:wv,[ce]:[{[L]:Xs,[ce]:[{[L]:BT,[ce]:[{[L]:Ev,[ce]:[{[L]:[{[J]:pt,[ee]:[dP,jh]}],error:"Invalid ARN: Missing account id",[M]:Te},{[L]:xv,[ce]:[{[L]:$T,[ce]:[{[L]:uc,endpoint:{[we]:zC,[Ee]:lv,[xe]:qe},[M]:me},{[L]:Kd,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:lv,[xe]:qe},[M]:me},{endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:lv,[xe]:qe},[M]:me}],[M]:ue},iT],[M]:ue},uv],[M]:ue},fv],[M]:ue},dv],[M]:ue}],[M]:ue}],[M]:ue},aT],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Te}],[M]:ue},cT],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Te}],[M]:ue},{[L]:Sv,[ce]:[{[L]:NT,[ce]:[{[L]:_v,[ce]:[{[L]:Sv,[ce]:[{[L]:_v,[ce]:[oT,{[L]:LT,[ce]:[cv,{[L]:wv,[ce]:[{[L]:Xs,[ce]:[{[L]:[{[J]:pt,[ee]:[fP,"{partitionResult#name}"]}],[ce]:[{[L]:Ev,[ce]:[{[L]:[{[J]:pt,[ee]:[av,Oc]}],[ce]:[{[L]:xv,[ce]:[{[L]:$T,[ce]:[{[L]:yv,error:"Access Points do not support S3 Accelerate",[M]:Te},{[L]:bv,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Jl,[xe]:qe},[M]:me},{[L]:du,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Jl,[xe]:qe},[M]:me},{[L]:hu,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Jl,[xe]:qe},[M]:me},{[L]:[et,rt,Wt,Jn],endpoint:{[we]:zC,[Ee]:Jl,[xe]:qe},[M]:me},{[L]:pu,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Jl,[xe]:qe},[M]:me}],[M]:ue},iT],[M]:ue},uv],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Te}],[M]:ue},fv],[M]:ue},dv],[M]:ue}],[M]:ue}],[M]:ue},aT],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[J]:ba,[ee]:[bS,Er]}],[ce]:[{[L]:zT,error:"S3 MRAP does not support dual-stack",[M]:Te},{[L]:Kd,error:"S3 MRAP does not support FIPS",[M]:Te},{[L]:yv,error:"S3 MRAP does not support S3 Accelerate",[M]:Te},{[L]:[{[J]:en,[ee]:[{[De]:"DisableMultiRegionAccessPoints"},Er]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Te},{[L]:[{[J]:Bh,[ee]:gv,[We]:LC}],[ce]:[{[L]:[{[J]:pt,[ee]:[{[J]:Ft,[ee]:[{[De]:LC},Vt]},{[J]:Ft,[ee]:[ds,"partition"]}]}],[ce]:[{endpoint:{[we]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[Ee]:{[In]:[{[fn]:Er,name:gS,[dn]:Oc,[pS]:Vue}]},[xe]:qe},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Te}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Te}],[M]:ue},cT],[M]:ue},{[L]:[{[J]:pt,[ee]:[av,Du]}],[ce]:[{[L]:zT,error:"S3 Outposts does not support Dual-stack",[M]:Te},{[L]:Kd,error:"S3 Outposts does not support FIPS",[M]:Te},{[L]:yv,error:"S3 Outposts does not support S3 Accelerate",[M]:Te},{[L]:[{[J]:Os,[ee]:[{[J]:Ft,[ee]:[ds,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Te},{[L]:[{[J]:Ft,[ee]:Gue,[We]:lb}],[ce]:[{[L]:DT,[ce]:[cv,{[L]:wv,[ce]:[{[L]:Xs,[ce]:[{[L]:BT,[ce]:[{[L]:Ev,[ce]:[{[L]:xv,[ce]:[{[L]:[{[J]:Ft,[ee]:Kue,[We]:BC}],[ce]:[{[L]:[{[J]:Ft,[ee]:[ds,"resourceId[3]"],[We]:vS}],[ce]:[{[L]:[{[J]:pt,[ee]:[{[De]:BC},rP]}],[ce]:[{[L]:uc,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[Ee]:lT,[xe]:qe},[M]:me},{endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:lT,[xe]:qe},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Te}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Te}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Te}],[M]:ue},uv],[M]:ue},fv],[M]:ue},dv],[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]:Te}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Te}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Te}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Te}],[M]:ue},{[L]:[{[J]:kt,[ee]:[dt,0,4,$ue],[We]:$C},{[J]:pt,[ee]:[{[De]:$C},"arn:"]},{[J]:Or,[ee]:[{[J]:Os,[ee]:[uT]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Te},{[L]:[{[J]:en,[ee]:[Uue,Er]},uT],error:"Path-style addressing cannot be used with ARN buckets",[M]:Te},{[L]:Fue,[ce]:[{[L]:Xs,[ce]:[{[L]:[cn],[ce]:[{[L]:[Ot,Ke,Nt,Sn],endpoint:{[we]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,Ke,Nt,lt,Tn],[ce]:[{endpoint:fT,[M]:me}],[M]:ue},{[L]:[Ot,Ke,Nt,lt,An],endpoint:fT,[M]:me},{[L]:[rt,Ke,Nt,Sn],endpoint:{[we]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Ke,Nt,lt,Tn],[ce]:[{endpoint:dT,[M]:me}],[M]:ue},{[L]:[rt,Ke,Nt,lt,An],endpoint:dT,[M]:me},{[L]:[Ot,Ke,et,Sn],endpoint:{[we]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,Ke,et,lt,Tn],[ce]:[{endpoint:hT,[M]:me}],[M]:ue},{[L]:[Ot,Ke,et,lt,An],endpoint:hT,[M]:me},{[L]:[rt,Wt,Jn,et,Sn],endpoint:{[we]:oP,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Wt,Jn,et,lt,Tn],[ce]:[{[L]:Yo,endpoint:hv,[M]:me},{endpoint:hv,[M]:me}],[M]:ue},{[L]:[rt,Wt,Jn,et,lt,An],endpoint:hv,[M]:me},{[L]:[rt,Ke,et,Sn],endpoint:{[we]:UC,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Ke,et,lt,Tn],[ce]:[{[L]:Yo,endpoint:{[we]:UC,[Ee]:pn,[xe]:qe},[M]:me},{endpoint:pT,[M]:me}],[M]:ue},{[L]:[rt,Ke,et,lt,An],endpoint:pT,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Te}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[J]:Os,[ee]:[mT]},{[J]:en,[ee]:[mT,Er]}],[ce]:[{[L]:Xs,[ce]:[{[L]:UT,[ce]:[sT,rT,{[L]:uc,endpoint:{[we]:sh,[Ee]:pv,[xe]:qe},[M]:me},{[L]:Kd,endpoint:{[we]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:pv,[xe]:qe},[M]:me},{endpoint:{[we]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[Ee]:pv,[xe]:qe},[M]:me}],[M]:ue},Gd],[M]:ue}],[M]:ue},{[L]:[ZC],[ce]:[{[L]:Xs,[ce]:[{[L]:UT,[ce]:[{[L]:[Nt,Ot,Ke,Sn],endpoint:{[we]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Nt,Ot,Ke,lt,Tn],[ce]:[{endpoint:gT,[M]:me}],[M]:ue},{[L]:[Nt,Ot,Ke,lt,An],endpoint:gT,[M]:me},{[L]:[Nt,rt,Ke,Sn],endpoint:{[we]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Nt,rt,Ke,lt,Tn],[ce]:[{endpoint:yT,[M]:me}],[M]:ue},{[L]:[Nt,rt,Ke,lt,An],endpoint:yT,[M]:me},{[L]:[et,Ot,Ke,Sn],endpoint:{[we]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[et,Ot,Ke,lt,Tn],[ce]:[{endpoint:vT,[M]:me}],[M]:ue},{[L]:[et,Ot,Ke,lt,An],endpoint:vT,[M]:me},{[L]:[et,rt,Wt,Jn,Sn],endpoint:{[we]:sh,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[et,rt,Wt,Jn,lt,Tn],[ce]:[{[L]:Yo,endpoint:mv,[M]:me},{endpoint:mv,[M]:me}],[M]:ue},{[L]:[et,rt,Wt,Jn,lt,An],endpoint:mv,[M]:me},{[L]:[et,rt,Ke,Sn],endpoint:{[we]:jC,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[et,rt,Ke,lt,Tn],[ce]:[{[L]:Yo,endpoint:{[we]:jC,[Ee]:pn,[xe]:qe},[M]:me},{endpoint:bT,[M]:me}],[M]:ue},{[L]:[et,rt,Ke,lt,An],endpoint:bT,[M]:me}],[M]:ue},Gd],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Te}]},Que=Zue,Yue=new mO({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),hP=(e,t={})=>Yue.get(e,()=>CO(Que,{endpointParams:e,logger:t.logger}));Tu.aws=n0;const Xue=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=yo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await eM(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},Wue=async(e,t,n)=>({operation:yo(t).operation,region:await Ds(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Jue=Xue(Wue);function pP(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function mP(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const efe=(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(Y3.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},tfe=e=>{const t=[];switch(e.operation){default:t.push(pP(e)),t.push(mP(e))}return t},nfe=efe(hP,tfe,{"aws.auth#sigv4":pP,"aws.auth#sigv4a":mP}),sfe=e=>{const t=zO(e),n=mK(t);return Object.assign(n,{authSchemePreference:Ds(e.authSchemePreference??[])})},rfe=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??{}}),SS={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 Qi{constructor(t){super(t),Object.setPrototypeOf(this,Un.prototype)}}class _S extends Un{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,_S.prototype)}}class wS extends Un{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,wS.prototype)}}class ES extends Un{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,ES.prototype)}}class xS extends Un{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,xS.prototype)}}class RS extends Un{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,RS.prototype)}}class CS extends Un{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,CS.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class TS extends Un{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,TS.prototype)}}class AS extends Un{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,AS.prototype)}}class IS extends Un{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,IS.prototype)}}class OS extends Un{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,OS.prototype)}}class MS extends Un{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,MS.prototype)}}class DS extends Un{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,DS.prototype)}}class kS extends Un{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,kS.prototype)}}class PS extends Un{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,PS.prototype)}}const ofe="ACL",jT="AccessKeyId",ife="AcceptRanges",afe="AccessTier",Sa="Bucket",cfe="BucketArn",lfe="BucketAlreadyExists",ufe="BucketAlreadyOwnedByYou",ffe="BypassGovernanceRetention",Xu="BucketKeyEnabled",gP="BucketRegion",yP="Body",vP="Buckets",bP="ChecksumAlgorithm",SP="CacheControl",NS="ChecksumCRC32",zS="ChecksumCRC32C",LS="ChecksumCRC64NVME",_P="Cache-Control",dfe="CreationDate",wP="Content-Disposition",EP="ContentDisposition",xP="Content-Encoding",RP="ContentEncoding",CP="ContentLanguage",TP="Content-Language",AP="Content-Length",IP="ContentLength",hfe="Content-MD5",pfe="ContentMD5",mfe="ChecksumMode",gfe="CommonPrefix",yfe="CommonPrefixList",vfe="CommonPrefixes",bfe="ContentRange",Sfe="Content-Range",BS="ChecksumSHA1",$S="ChecksumSHA256",_fe="CreateSessionOutput",wfe="CreateSessionResult",Efe="CreateSessionRequest",xfe="CreateSession",US="ChecksumType",OP="Content-Type",MP="ContentType",Mp="ContinuationToken",Rfe="Contents",HT="Credentials",DP="DeleteMarker",Cfe="DisplayName",Tfe="DeleteObjectOutput",Afe="DeleteObjectRequest",Ife="DeleteObject",kP="Delimiter",Hh="Expiration",Dp="ExpectedBucketOwner",FT="ExpiresString",Ofe="EncryptionTypeMismatch",ku="ETag",PP="EncodingType",Fh="Expires",Mfe="FetchOwner",Dfe="GrantFullControl",kfe="GetObject",Pfe="GetObjectOutput",Nfe="GetObjectRequest",zfe="GrantRead",Lfe="GrantReadACP",Bfe="GrantWriteACP",$fe="ID",jS="IfMatch",Ufe="IfMatchLastModifiedTime",jfe="IfMatchSize",Hfe="If-Modified-Since",Ffe="IfModifiedSince",HS="If-Match",NP="IfNoneMatch",zP="If-None-Match",qfe="InvalidObjectState",Vfe="IdempotencyParameterMismatch",Gfe="InvalidRequest",Kfe="IsRestoreInProgress",Zfe="IsTruncated",Qfe="IfUnmodifiedSince",Yfe="If-Unmodified-Since",Xfe="InvalidWriteOffset",kp="Key",Wfe="KeyCount",Jfe="ListAllMyBucketsResult",ede="ListBuckets",tde="ListBucketsOutput",nde="ListBucketsRequest",sde="ListBucketResult",LP="LastModified",rde="Last-Modified",ode="ListObjectsV2",ide="ListObjectsV2Output",ade="ListObjectsV2Request",BP="Metadata",cde="MaxBuckets",lde="MFA",$P="MaxKeys",ude="MissingMeta",UP="Name",fde="NextContinuationToken",dde="NotFound",hde="NoSuchBucket",pde="NoSuchKey",mde="NoSuchUpload",FS="Owner",gde="ObjectAlreadyInActiveTierError",jP="ObjectLockLegalHoldStatus",HP="ObjectLockMode",FP="ObjectLockRetainUntilDate",yde="ObjectList",vde="ObjectNotInActiveTierError",bde="OptionalObjectAttributes",Sde="Object",Wu="Prefix",_de="PartsCount",wde="PartNumber",Ede="PutObject",xde="PutObjectOutput",Rde="PutObjectRequest",Pp="RequestCharged",Cde="ResponseCacheControl",Tde="ResponseContentDisposition",Ade="ResponseContentEncoding",Ide="ResponseContentLanguage",Ode="ResponseContentType",Mde="ResponseExpires",Dde="RestoreExpiryDate",Np="RequestPayer",kde="ReplicationStatus",qP="RestoreStatus",qT="Range",Pde="Restore",VP="StartAfter",VT="SecretAccessKey",Nde="StreamingBlob",zp="StorageClass",zde="SessionCredentialValue",Lde="SessionCredentials",Bde="SessionMode",Ju="ServerSideEncryption",Lp="SSECustomerAlgorithm",qS="SSECustomerKey",Bp="SSECustomerKeyMD5",ef="SSEKMSEncryptionContext",Zc="SSEKMSKeyId",GT="SessionToken",GP="Size",$de="TagCount",Ude="TooManyParts",jde="Tagging",tf="VersionId",Hde="WriteOffsetBytes",KP="WebsiteRedirectLocation",Fde="accept-ranges",qde="bucket-region",gs="client",ZP="continuation-token",Vde="delimiter",ys="error",Gde="encoding-type",Kde="fetch-owner",Qc="http",QP="httpChecksum",zs="httpError",ae="httpHeader",YP="httpPrefixHeaders",ln="httpQuery",Zde="max-buckets",Qde="max-keys",XP="prefix",Yde="partNumber",Xde="response-cache-control",Wde="response-content-disposition",Jde="response-content-encoding",ehe="response-content-language",the="response-content-type",nhe="response-expires",she="streaming",rhe="start-after",WP="smithy.ts.sdk.synthetic.com.amazonaws.s3",JP="versionId",fb="xmlFlattened",lo="xmlName",ohe="x-amz-acl",ihe="x-amz-bypass-governance-retention",VS="x-amz-checksum-crc32",GS="x-amz-checksum-crc32c",KS="x-amz-checksum-crc64nvme",ahe="x-amz-checksum-mode",ZS="x-amz-checksum-sha1",QS="x-amz-checksum-sha256",che="x-amz-create-session-mode",eN="x-amz-checksum-type",tN="x-amz-delete-marker",nN="x-amz-expiration",$p="x-amz-expected-bucket-owner",lhe="x-amz-grant-full-control",uhe="x-amz-grant-read",fhe="x-amz-grant-read-acp",dhe="x-amz-grant-write-acp",hhe="x-amz-if-match-last-modified-time",phe="x-amz-if-match-size",sN="x-amz-meta-",mhe="x-amz-mfa",ghe="x-amz-missing-meta",yhe="x-amz-mp-parts-count",rN="x-amz-object-lock-legal-hold",oN="x-amz-object-lock-mode",iN="x-amz-object-lock-retain-until-date",vhe="x-amz-optional-object-attributes",bhe="x-amz-object-size",She="x-amz-restore",Up="x-amz-request-charged",jp="x-amz-request-payer",_he="x-amz-replication-status",aN="x-amz-storage-class",whe="x-amz-sdk-checksum-algorithm",nf="x-amz-server-side-encryption",sf="x-amz-server-side-encryption-aws-kms-key-id",rf="x-amz-server-side-encryption-bucket-key-enabled",Hp="x-amz-server-side-encryption-context",Fp="x-amz-server-side-encryption-customer-algorithm",cN="x-amz-server-side-encryption-customer-key",qp="x-amz-server-side-encryption-customer-key-MD5",Ehe="x-amz-tagging",xhe="x-amz-tagging-count",YS="x-amz-version-id",Rhe="x-amz-write-offset-bytes",lN="x-amz-website-redirect-location",Ne="com.amazonaws.s3";var KT=[0,Ne,zde,8,0],uN=[0,Ne,qS,8,0],Vp=[0,Ne,ef,8,0],of=[0,Ne,Zc,8,0],fN=[0,Ne,Nde,{[she]:1},42],Che=[3,Ne,Sa,0,[UP,dfe,gP,cfe],[0,4,0,0]],The=[-3,Ne,lfe,{[ys]:gs,[zs]:409},[],[]];Mt.for(Ne).registerError(The,ES);var Ahe=[-3,Ne,ufe,{[ys]:gs,[zs]:409},[],[]];Mt.for(Ne).registerError(Ahe,xS);var Ihe=[3,Ne,gfe,0,[Wu],[0]],Ohe=[3,Ne,_fe,{[lo]:wfe},[HT,Ju,Zc,ef,Xu],[[()=>tpe,{[lo]:HT}],[0,{[ae]:nf}],[()=>of,{[ae]:sf}],[()=>Vp,{[ae]:Hp}],[2,{[ae]:rf}]],1],Mhe=[3,Ne,Efe,0,[Sa,Bde,Ju,Zc,ef,Xu],[[0,1],[0,{[ae]:che}],[0,{[ae]:nf}],[()=>of,{[ae]:sf}],[()=>Vp,{[ae]:Hp}],[2,{[ae]:rf}]],1],Dhe=[3,Ne,Tfe,0,[DP,tf,Pp],[[2,{[ae]:tN}],[0,{[ae]:YS}],[0,{[ae]:Up}]]],khe=[3,Ne,Afe,0,[Sa,kp,lde,tf,Np,ffe,Dp,jS,Ufe,jfe],[[0,1],[0,1],[0,{[ae]:mhe}],[0,{[ln]:JP}],[0,{[ae]:jp}],[2,{[ae]:ihe}],[0,{[ae]:$p}],[0,{[ae]:HS}],[6,{[ae]:hhe}],[1,{[ae]:phe}]],2],Phe=[-3,Ne,Ofe,{[ys]:gs,[zs]:400},[],[]];Mt.for(Ne).registerError(Phe,IS);var Nhe=[3,Ne,Pfe,0,[yP,DP,ife,Hh,Pde,LP,IP,ku,NS,zS,LS,BS,$S,US,ude,tf,SP,EP,RP,CP,bfe,MP,Fh,FT,KP,Ju,BP,Lp,Bp,Zc,Xu,zp,Pp,kde,_de,$de,HP,FP,jP],[[()=>fN,16],[2,{[ae]:tN}],[0,{[ae]:Fde}],[0,{[ae]:nN}],[0,{[ae]:She}],[4,{[ae]:rde}],[1,{[ae]:AP}],[0,{[ae]:ku}],[0,{[ae]:VS}],[0,{[ae]:GS}],[0,{[ae]:KS}],[0,{[ae]:ZS}],[0,{[ae]:QS}],[0,{[ae]:eN}],[1,{[ae]:ghe}],[0,{[ae]:YS}],[0,{[ae]:_P}],[0,{[ae]:wP}],[0,{[ae]:xP}],[0,{[ae]:TP}],[0,{[ae]:Sfe}],[0,{[ae]:OP}],[4,{[ae]:Fh}],[0,{[ae]:FT}],[0,{[ae]:lN}],[0,{[ae]:nf}],[128,{[YP]:sN}],[0,{[ae]:Fp}],[0,{[ae]:qp}],[()=>of,{[ae]:sf}],[2,{[ae]:rf}],[0,{[ae]:aN}],[0,{[ae]:Up}],[0,{[ae]:_he}],[1,{[ae]:yhe}],[1,{[ae]:xhe}],[0,{[ae]:oN}],[5,{[ae]:iN}],[0,{[ae]:rN}]]],zhe=[3,Ne,Nfe,0,[Sa,kp,jS,Ffe,NP,Qfe,qT,Cde,Tde,Ade,Ide,Ode,Mde,tf,Lp,qS,Bp,Np,wde,Dp,mfe],[[0,1],[0,1],[0,{[ae]:HS}],[4,{[ae]:Hfe}],[0,{[ae]:zP}],[4,{[ae]:Yfe}],[0,{[ae]:qT}],[0,{[ln]:Xde}],[0,{[ln]:Wde}],[0,{[ln]:Jde}],[0,{[ln]:ehe}],[0,{[ln]:the}],[6,{[ln]:nhe}],[0,{[ln]:JP}],[0,{[ae]:Fp}],[()=>uN,{[ae]:cN}],[0,{[ae]:qp}],[0,{[ae]:jp}],[1,{[ln]:Yde}],[0,{[ae]:$p}],[0,{[ae]:ahe}]],2],Lhe=[-3,Ne,Vfe,{[ys]:gs,[zs]:400},[],[]];Mt.for(Ne).registerError(Lhe,kS);var Bhe=[-3,Ne,qfe,{[ys]:gs,[zs]:403},[zp,afe],[0,0]];Mt.for(Ne).registerError(Bhe,CS);var $he=[-3,Ne,Gfe,{[ys]:gs,[zs]:400},[],[]];Mt.for(Ne).registerError($he,OS);var Uhe=[-3,Ne,Xfe,{[ys]:gs,[zs]:400},[],[]];Mt.for(Ne).registerError(Uhe,MS);var jhe=[3,Ne,tde,{[lo]:Jfe},[vP,FS,Mp,Wu],[[()=>rpe,0],()=>dN,0,0]],Hhe=[3,Ne,nde,0,[cde,Mp,Wu,gP],[[1,{[ln]:Zde}],[0,{[ln]:ZP}],[0,{[ln]:XP}],[0,{[ln]:qde}]]],Fhe=[3,Ne,ide,{[lo]:sde},[Zfe,Rfe,UP,Wu,kP,$P,vfe,PP,Wfe,Mp,fde,VP,Pp],[2,[()=>ipe,{[fb]:1}],0,0,0,1,[()=>ope,{[fb]:1}],0,1,0,0,0,[0,{[ae]:Up}]]],qhe=[3,Ne,ade,0,[Sa,kP,PP,$P,Wu,Mp,Mfe,VP,Np,Dp,bde],[[0,1],[0,{[ln]:Vde}],[0,{[ln]:Gde}],[1,{[ln]:Qde}],[0,{[ln]:XP}],[0,{[ln]:ZP}],[2,{[ln]:Kde}],[0,{[ln]:rhe}],[0,{[ae]:jp}],[0,{[ae]:$p}],[64,{[ae]:vhe}]],1],Vhe=[-3,Ne,hde,{[ys]:gs,[zs]:404},[],[]];Mt.for(Ne).registerError(Vhe,RS);var Ghe=[-3,Ne,pde,{[ys]:gs,[zs]:404},[],[]];Mt.for(Ne).registerError(Ghe,TS);var Khe=[-3,Ne,mde,{[ys]:gs,[zs]:404},[],[]];Mt.for(Ne).registerError(Khe,_S);var Zhe=[-3,Ne,dde,{[ys]:gs},[],[]];Mt.for(Ne).registerError(Zhe,AS);var Qhe=[3,Ne,Sde,0,[kp,LP,ku,bP,US,GP,zp,FS,qP],[0,4,0,[64,{[fb]:1}],0,1,0,()=>dN,()=>epe]],Yhe=[-3,Ne,gde,{[ys]:gs,[zs]:403},[],[]];Mt.for(Ne).registerError(Yhe,PS);var Xhe=[-3,Ne,vde,{[ys]:gs,[zs]:403},[],[]];Mt.for(Ne).registerError(Xhe,wS);var dN=[3,Ne,FS,0,[Cfe,$fe],[0,0]],Whe=[3,Ne,xde,0,[Hh,ku,NS,zS,LS,BS,$S,US,Ju,tf,Lp,Bp,Zc,ef,Xu,GP,Pp],[[0,{[ae]:nN}],[0,{[ae]:ku}],[0,{[ae]:VS}],[0,{[ae]:GS}],[0,{[ae]:KS}],[0,{[ae]:ZS}],[0,{[ae]:QS}],[0,{[ae]:eN}],[0,{[ae]:nf}],[0,{[ae]:YS}],[0,{[ae]:Fp}],[0,{[ae]:qp}],[()=>of,{[ae]:sf}],[()=>Vp,{[ae]:Hp}],[2,{[ae]:rf}],[1,{[ae]:bhe}],[0,{[ae]:Up}]]],Jhe=[3,Ne,Rde,0,[Sa,kp,ofe,yP,SP,EP,RP,CP,IP,pfe,MP,bP,NS,zS,LS,BS,$S,Fh,jS,NP,Dfe,zfe,Lfe,Bfe,Hde,BP,Ju,zp,KP,Lp,qS,Bp,Zc,ef,Xu,Np,jde,HP,FP,jP,Dp],[[0,1],[0,1],[0,{[ae]:ohe}],[()=>fN,16],[0,{[ae]:_P}],[0,{[ae]:wP}],[0,{[ae]:xP}],[0,{[ae]:TP}],[1,{[ae]:AP}],[0,{[ae]:hfe}],[0,{[ae]:OP}],[0,{[ae]:whe}],[0,{[ae]:VS}],[0,{[ae]:GS}],[0,{[ae]:KS}],[0,{[ae]:ZS}],[0,{[ae]:QS}],[4,{[ae]:Fh}],[0,{[ae]:HS}],[0,{[ae]:zP}],[0,{[ae]:lhe}],[0,{[ae]:uhe}],[0,{[ae]:fhe}],[0,{[ae]:dhe}],[1,{[ae]:Rhe}],[128,{[YP]:sN}],[0,{[ae]:nf}],[0,{[ae]:aN}],[0,{[ae]:lN}],[0,{[ae]:Fp}],[()=>uN,{[ae]:cN}],[0,{[ae]:qp}],[()=>of,{[ae]:sf}],[()=>Vp,{[ae]:Hp}],[2,{[ae]:rf}],[0,{[ae]:jp}],[0,{[ae]:Ehe}],[0,{[ae]:oN}],[5,{[ae]:iN}],[0,{[ae]:rN}],[0,{[ae]:$p}]],2],epe=[3,Ne,qP,0,[Kfe,Dde],[2,4]],tpe=[3,Ne,Lde,0,[jT,VT,GT,Hh],[[0,{[lo]:jT}],[()=>KT,{[lo]:VT}],[()=>KT,{[lo]:GT}],[4,{[lo]:Hh}]],4],npe=[-3,Ne,Ude,{[ys]:gs,[zs]:400},[],[]];Mt.for(Ne).registerError(npe,DS);var spe=[-3,WP,"S3ServiceException",0,[],[]];Mt.for(WP).registerError(spe,Un);var rpe=[1,Ne,vP,0,[()=>Che,{[lo]:Sa}]],ope=[1,Ne,yfe,0,()=>Ihe],ipe=[1,Ne,yde,0,[()=>Qhe,0]],ape=[9,Ne,xfe,{[Qc]:["GET","/?session",200]},()=>Mhe,()=>Ohe],Jge=[9,Ne,Ife,{[Qc]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>khe,()=>Dhe],eye=[9,Ne,kfe,{[QP]:"-",[Qc]:["GET","/{Key+}?x-id=GetObject",200]},()=>zhe,()=>Nhe],cpe=[9,Ne,ede,{[Qc]:["GET","/?x-id=ListBuckets",200]},()=>Hhe,()=>jhe],lpe=[9,Ne,ode,{[Qc]:["GET","/?list-type=2",200]},()=>qhe,()=>Fhe],tye=[9,Ne,Ede,{[QP]:"-",[Qc]:["PUT","/{Key+}?x-id=PutObject",200]},()=>Jhe,()=>Whe];class upe extends Pr.classBuilder().ep({...SS,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions()),dS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(ape).build(){}const fpe="3.975.0",dpe={version:fpe};function ZT(e){return typeof e=="string"?e.length===0:e.byteLength===0}var hN={name:"SHA-1"},QT={name:"HMAC",hash:hN},hpe=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),ppe=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){li().crypto.subtle.importKey("raw",YT(t),QT,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!ZT(t)){var n=YT(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 li().crypto.subtle.sign(QT,n,t.toHash).then(function(r){return new Uint8Array(r)})}):ZT(this.toHash)?Promise.resolve(hpe):Promise.resolve().then(function(){return li().crypto.subtle.digest(hN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function YT(e){return typeof e=="string"?cM(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var mpe=(function(){function e(t){if(dM(li()))this.hash=new ppe(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(ca(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class mu{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&&XT(n),new mu(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&XT(t),parseInt(fs(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function XT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class gpe{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(mu.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!Rpe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(nO(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()}}}),Lpe=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 Bpe{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Npe({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=$pe(t)?zpe(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Lpe(r):r}}const $pe=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,Upe=e=>new Bpe(e);async function jpe(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},Xo=64,Fpe=16,qpe=[1732584193,4023233417,2562383102,271733878];class Vpe{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(Gpe(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=Kpe(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===Xo&&(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%Xo>=Xo-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(Xo-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(Fpe));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(qpe),this.buffer=new DataView(new ArrayBuffer(Xo)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function Gp(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 Gp(t&n|~t&r,e,t,i,c,l)}function Kn(e,t,n,r,i,c,l){return Gp(t&r|n&~r,e,t,i,c,l)}function Zn(e,t,n,r,i,c,l){return Gp(t^n^r,e,t,i,c,l)}function Qn(e,t,n,r,i,c,l){return Gp(n^(t|~r),e,t,i,c,l)}function Gpe(e){return typeof e=="string"?e.length===0:e.byteLength===0}function Kpe(e){return typeof e=="string"?mo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const Zpe=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??aa,base64Encoder:e?.base64Encoder??di,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??hP,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??zV,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??nfe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new r0},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new hK}],logger:e?.logger??new o0,protocol:e?.protocol??oZ,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??sO,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??Y3,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??Iu,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??mo,utf8Encoder:e?.utf8Encoder??ha}),Qpe=e=>{const t=gM(e),n=()=>t().then($O),r=Zpe(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??LO,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??pM({serviceId:r.serviceId,clientVersion:dpe.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Upe,maxAttempts:e?.maxAttempts??Ou,md5:e?.md5??Vpe,region:e?.region??mM("Region is missing"),requestHandler:mp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||nM),sha1:e?.sha1??mpe,sha256:e?.sha256??hM,streamCollector:e?.streamCollector??Qb,streamHasher:e?.streamHasher??Hpe,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(KO)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(ZO))}},Ype=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}}},Xpe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Wpe=(e,t)=>{const n=Object.assign(_M(e),UO(e),G2(e),Ype(e));return t.forEach(r=>r.configure(n)),Object.assign(e,wM(n),jO(n),K2(n),Xpe(n))};class Jpe extends BO{config;constructor(...[t]){const n=Qpe(t||{});super(n),this.initConfig=n;const r=rfe(n),i=pO(r),c=oue(i),l=iM(c),f=YO(l),d=f,h=tM(d),y=zue(h),g=sfe(y),v=xue(g,{session:[()=>this,upe]}),b=Wpe(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(oO(this.config)),this.middlewareStack.use(GO(this.config)),this.middlewareStack.use(aM(this.config)),this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(Z2(this.config)),this.middlewareStack.use(Q2(this.config)),this.middlewareStack.use(Y2(this.config)),this.middlewareStack.use(X2(this.config,{httpAuthSchemeParametersProvider:Jue,identityProviderConfigProvider:async _=>new dO({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(J2(this.config)),this.middlewareStack.use(Nue(this.config)),this.middlewareStack.use(eue(this.config)),this.middlewareStack.use(uue(this.config)),this.middlewareStack.use(vue(this.config)),this.middlewareStack.use(Eue(this.config))}destroy(){super.destroy()}}class eme extends Pr.classBuilder().ep(SS).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions()),dS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(cpe).build(){}class tme extends Pr.classBuilder().ep({...SS,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[vo(r,t.getEndpointParameterInstructions()),dS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(lpe).build(){}let rh=null,su=null;function zr(){if(!rh){const e=pp();if(!e)throw new Error("AWS credentials not configured");rh=new kQ({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return rh}function mN(){if(!su){const e=pp();if(!e)throw new Error("AWS credentials not configured");su=new Jpe({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),su.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 su}function nme(){rh=null,su=null}function gN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:sme},e[0]=t):t=e[0];const n=nB(t),r=Qh(),i=cA();let c;e[1]!==r||e[2]!==i?(c=function(){vV(),nme(),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(By,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(ZB,{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(Ly,{children:[f,$.jsx(Bd,{children:$.jsx(Hi,{children:$.jsx(Cr,{to:"/",children:$.jsxs(Fi,{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(By,{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(z1,{className:"size-4"}),_=$.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=$.jsx(Hi,{children:$.jsx(Cr,{to:"/ec2/describe-instances",children:$.jsxs(Fi,{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(YB,{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(Hi,{children:$.jsx(Cr,{to:"/ec2/describe-images",children:$.jsxs(Fi,{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 U,B;e[24]===Symbol.for("react.memo_cache_sentinel")?(U=$.jsx(WB,{className:"size-4"}),B=$.jsx("span",{children:"Key Pairs"}),e[24]=U,e[25]=B):(U=e[24],B=e[25]);let k;e[26]!==N?(k=$.jsx(Hi,{children:$.jsx(Cr,{to:"/ec2/describe-key-pairs",children:$.jsxs(Fi,{isActive:N,tooltip:"Key Pairs",children:[U,B]})})}),e[26]=N,e[27]=k):k=e[27];let K;e[28]!==n?(K=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=K):K=e[29];let ne,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(ne=$.jsx(GB,{className:"size-4"}),le=$.jsx("span",{children:"Volumes"}),e[30]=ne,e[31]=le):(ne=e[30],le=e[31]);let G;e[32]!==K?(G=$.jsx(Hi,{children:$.jsx(Cr,{to:"/ec2/describe-volumes",children:$.jsxs(Fi,{isActive:K,tooltip:"Volumes",children:[ne,le]})})}),e[32]=K,e[33]=G):G=e[33];let Z;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==G?(Z=$.jsxs(Ly,{children:[v,$.jsxs(Bd,{children:[R,D,k,G]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=G,e[38]=Z):Z=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=$.jsx(By,{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,X;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=$.jsx(z1,{className:"size-4"}),X=$.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=X):(q=e[42],X=e[43]);let j;e[44]!==fe?(j=$.jsxs(Ly,{children:[ye,$.jsx(Bd,{children:$.jsx(Hi,{children:$.jsx(Cr,{to:"/s3/ls",children:$.jsxs(Fi,{isActive:fe,tooltip:"Buckets",children:[q,X]})})})})]}),e[44]=fe,e[45]=j):j=e[45];let ve;e[46]!==Z||e[47]!==j||e[48]!==g?(ve=$.jsxs($9,{children:[g,Z,j]}),e[46]=Z,e[47]=j,e[48]=g,e[49]=ve):ve=e[49];let Ce,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Ce=$.jsx(e$,{className:"size-4"}),P=$.jsx("span",{children:"Sign out"}),e[50]=Ce,e[51]=P):(Ce=e[50],P=e[51]);let te;e[52]!==l?(te=$.jsx(B9,{children:$.jsx(Bd,{children:$.jsx(Hi,{children:$.jsxs(Fi,{onClick:l,tooltip:"Sign out",children:[Ce,P]})})})}),e[52]=l,e[53]=te):te=e[53];let oe;e[54]===Symbol.for("react.memo_cache_sentinel")?(oe=$.jsx(L9,{}),e[54]=oe):oe=e[54];let de;return e[55]!==ve||e[56]!==te?(de=$.jsxs(N9,{collapsible:"icon",children:[ve,te,oe]}),e[55]=ve,e[56]=te,e[57]=de):de=e[57],de}function sme(e){return e.pathname}function rme(e){const t=Ct.c(18),{error:n,reset:r}=e,i=Yn(),c=cA();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(gN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(y2,{}),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(qB,{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(Rc,{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(Cr,{to:"/",children:$.jsx(Rc,{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 XS=H6()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>$.jsxs($.Fragment,{children:[$.jsx(aB,{}),$.jsx(gN,{}),$.jsxs("main",{className:"flex flex-1 flex-col",children:[$.jsx(y2,{}),$.jsx("div",{className:"flex flex-1 flex-col p-8",children:$.jsx(DA,{})})]})]}),errorComponent:rme,notFoundComponent:H9}),ome=()=>En(()=>import("./login.js"),__vite__mapDeps([0,1])),ime=mn("/login")({beforeLoad:()=>{if(pp())throw bb({to:"/"})},component:Mn(ome,"component")}),ame=()=>En(()=>import("./route.js"),[]),cme=mn("/_auth")({beforeLoad:()=>{if(!pp())throw bb({to:"/login"})},component:Mn(ame,"component")}),lme={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new G3({});return await zr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},ume=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new G3({InstanceIds:[e]});return await zr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),fme={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new Yle({Filters:[{Name:"capacity",Values:["true"]}]});return await zr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},yN={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new V3({});return await zr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},vN=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new V3({ImageIds:[e]});return await zr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),bN={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new K3({});return await zr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},dme=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new K3({KeyPairIds:[e]});return await zr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),hme={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new Xle({});return await zr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},pme={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new Z3({});return await zr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},mme=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new Z3({VolumeIds:[e]});return await zr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),gme=()=>En(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),yme=mn("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(hme)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:Mn(gme,"component")}),vme={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new eme({});return await mN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},SN=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new tme({Bucket:e,Prefix:t,Delimiter:"/"});return await mN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),bme=()=>En(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),Sme=mn("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(vme)},component:Mn(bme,"component")}),sye=hp({imageId:ci("Please select an Image"),instanceType:ci("Please select an instance type"),keyName:ci("Please select a key pair"),count:Yv("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),rye=hp({keyName:ci().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),oye=hp({keyName:ci().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:ci().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),_me=()=>En(()=>import("./import-key-pair.js"),__vite__mapDeps([7,1,8,9,4,10,11,12])),wme=mn("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:Mn(_me,"component")}),Eme=()=>En(()=>import("./create-key-pair.js"),__vite__mapDeps([13,1,8,9,4,11,12,14,10,15,16])),xme=mn("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:Mn(Eme,"component")}),Rme=()=>En(()=>import("./run-instances.js"),__vite__mapDeps([17,1,3,8,9,4,15,11,12])),Cme=mn("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(yN),e.queryClient.ensureQueryData(bN),e.queryClient.ensureQueryData(fme)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:Mn(Rme,"component")}),Tme=()=>En(()=>import("./route2.js"),[]),Ame=mn("/_auth/s3/ls/$bucket")({component:Mn(Tme,"component")}),Ime=()=>En(()=>import("./index5.js"),__vite__mapDeps([18,3,8,4,19,14,16,20,12])),Ome=mn("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(SN(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:Mn(Ime,"component")}),Mme=()=>En(()=>import("./index6.js"),__vite__mapDeps([21,3,6,4,22])),Dme=mn("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(pme)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:Mn(Mme,"component")}),kme=()=>En(()=>import("./index7.js"),__vite__mapDeps([23,3,6,4])),Pme=mn("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(bN)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:Mn(kme,"component")}),Nme=()=>En(()=>import("./index8.js"),__vite__mapDeps([24,3,6,4,25])),zme=mn("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(lme)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:Mn(Nme,"component")}),Lme=()=>En(()=>import("./index9.js"),__vite__mapDeps([26,3,6,4,22])),Bme=mn("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yN)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:Mn(Lme,"component")}),$me=()=>En(()=>import("./_.js"),__vite__mapDeps([27,3,8,19,14,16,20,12])),Ume=mn("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=yU(t._splat||"");await e.queryClient.ensureQueryData(SN(t.bucket,n))},head:({params:e})=>({meta:[{title:`${vU(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:Mn($me,"component")}),jme=()=>En(()=>import("./_id.js"),__vite__mapDeps([28,3,8,29,4,22])),Hme=mn("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(mme(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:Mn(jme,"component")}),Fme=()=>En(()=>import("./_id2.js"),__vite__mapDeps([30,3,8,29,4,14,11,12,20])),qme=mn("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(dme(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:Mn(Fme,"component")}),Vme=()=>En(()=>import("./_id3.js"),__vite__mapDeps([31,3,8,29,4,25,32,11,12,20])),Gme=mn("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(ume(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(vN(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:Mn(Vme,"component")}),Kme=()=>En(()=>import("./_id4.js"),__vite__mapDeps([33,3,8,4,22,32,29])),Zme=mn("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(vN(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:Mn(Kme,"component")}),Qme=ime.update({id:"/login",path:"/login",getParentRoute:()=>XS}),ss=cme.update({id:"/_auth",getParentRoute:()=>XS}),Yme=yme.update({id:"/",path:"/",getParentRoute:()=>ss}),Xme=Sme.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>ss}),Wme=wme.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>ss}),Jme=xme.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>ss}),ege=Cme.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>ss}),WS=Ame.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>ss}),tge=Ome.update({id:"/",path:"/",getParentRoute:()=>WS}),nge=Dme.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>ss}),sge=Pme.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>ss}),rge=zme.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>ss}),oge=Bme.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>ss}),ige=Ume.update({id:"/$",path:"/$",getParentRoute:()=>WS}),age=Hme.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>ss}),cge=qme.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>ss}),lge=Gme.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>ss}),uge=Zme.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>ss}),fge={AuthS3LsBucketSplatRoute:ige,AuthS3LsBucketIndexRoute:tge},dge=WS._addFileChildren(fge),hge={AuthIndexRoute:Yme,AuthS3LsBucketRouteRoute:dge,AuthEc2instancesRunInstancesRoute:ege,AuthEc2keyCreateKeyPairRoute:Jme,AuthEc2keyImportKeyPairRoute:Wme,AuthS3LsIndexRoute:Xme,AuthEc2imagesDescribeImagesIdRoute:uge,AuthEc2instancesDescribeInstancesIdRoute:lge,AuthEc2keyDescribeKeyPairsIdRoute:cge,AuthEc2volumesDescribeVolumesIdRoute:age,AuthEc2imagesDescribeImagesIndexRoute:oge,AuthEc2instancesDescribeInstancesIndexRoute:rge,AuthEc2keyDescribeKeyPairsIndexRoute:sge,AuthEc2volumesDescribeVolumesIndexRoute:nge},pge=ss._addFileChildren(hge),mge={AuthRouteRoute:pge,LoginRoute:Qme},gge=XS._addFileChildren(mge)._addFileTypes(),_N=new cL,yge=W6({routeTree:gge,context:{queryClient:_N},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),Rv=document.getElementById("app");Rv&&!Rv.innerHTML&&hB.createRoot(Rv).render($.jsx(I.StrictMode,{children:$.jsx(yB,{defaultTheme:"system",storageKey:"hive-ui-theme",children:$.jsx(uL,{client:_N,children:$.jsx(D9,{children:$.jsx(tB,{router:yge})})})})}));export{K8 as $,Oge as A,Rc as B,Ar as C,np as D,Is as E,Lu as F,mt as G,q1 as H,Ze as I,Oy as J,ei as K,_n as L,bt as M,kge as N,DA as O,wn as P,ns as Q,CI as R,DU as S,kU as T,wge as U,go as V,ot as W,X8 as X,zj as Y,Dr as Z,cu as _,Jt as a,aQ as a$,RI as a0,jb as a1,nj as a2,VI as a3,e2 as a4,Yh as a5,ph as a6,Lge as a7,MI as a8,Pb as a9,BA as aA,Ob as aB,_t as aC,wc as aD,Bge as aE,$ge as aF,R2 as aG,Ome as aH,Cge as aI,SN as aJ,pme as aK,Cr as aL,lme as aM,Ume as aN,yU as aO,Tge as aP,vU as aQ,UR as aR,di as aS,ab as aT,Xge as aU,Q3 as aV,DK as aW,zh as aX,ca as aY,uM as aZ,fM as a_,VA as aa,ir as ab,ua as ac,Pge as ad,zge as ae,y5 as af,k5 as ag,Ege as ah,Pj as ai,d9 as aj,Cj as ak,Rj as al,zu as am,hn as an,EU as ao,pi as ap,B5 as aq,Nge as ar,zb as as,p2 as at,wj as au,Dge as av,yN as aw,bN as ax,fme as ay,sye as az,HA as b,Cv as b$,dQ as b0,cQ as b1,Wge as b2,Cu as b3,On as b4,mr as b5,Yge as b6,o0 as b7,ia as b8,jge as b9,ume as bA,vN as bB,zc as bC,Hge as bD,Fge as bE,qge as bF,Vge as bG,Gge as bH,Kge as bI,Zge as bJ,Qge as bK,zr as bL,qh as bM,vge as bN,gu as bO,oL as bP,ts as bQ,gr as bR,bge as bS,Zme as bT,$A as bU,Y4 as bV,H4 as bW,Tv as bX,Vh as bY,U4 as bZ,j4 as b_,Pr as ba,SS as bb,vo as bc,dS as bd,Jge as be,eye as bf,tye as bg,cA as bh,mN as bi,Rge as bj,Hme as bk,xge as bl,mme as bm,qme as bn,dme as bo,fa as bp,$j as bq,Lj as br,AI as bs,_5 as bt,Hj as bu,S5 as bv,xj as bw,Tj as bx,b5 as by,Gme as bz,Ct as c,sA as c0,nL as c1,V4 as c2,ha as c3,mo as c4,yV as d,hme as e,vme as f,vr as g,rye as h,oye as i,$ as j,OU as k,Mge as l,Age as m,Ige as n,Md as o,DI as p,fi as q,I as r,Uge as s,Su as t,Qh as u,PU as v,qt as w,Eh as x,hI as y,jv as z}; +${fs(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const c of t.split("/"))c?.length!==0&&c!=="."&&(c===".."?n.pop():n.push(c));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Ca(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=iZ(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Ev extends cZ{headerFormatter=new eZ;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>XK)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=g0(_,v,y??this.service),R=rZ(jC(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[pM]=g.sessionToken),R.query[LK]=p0,R.query[BK]=`${g.accessKeyId}/${x}`,R.query[dM]=b,R.query[UK]=i.toString(10);const C=BC(R,c,f);return R.query[$K]=this.getCanonicalHeaderList(C),R.query[hM]=await this.getSignature(b,x,this.getSigningKey(g,v,_,y),this.createCanonicalRequest(R,C,await y0(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=g0(d,f,l??this.service),g=await y0({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const b=fs(await v.digest()),_=[ZK,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(cf(t)),fs(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=jC(t),{longDate:y,shortDate:g}=this.formatDate(n),v=g0(g,d,l??this.service);h.headers[gM]=y,f.sessionToken&&(h.headers[qK]=f.sessionToken);const b=await y0(h,this.sha256);!sZ(wv,h.headers)&&this.applyChecksum&&(h.headers[wv]=b);const _=BC(h,i,r),x=await this.getSignature(y,v,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,b));return h.headers[mM]=`${p0} Credential=${f.accessKeyId}/${v}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,p0),l=new this.sha256(await r);return l.update(cf(c)),fs(await l.digest())}getSigningKey(t,n,r,i){return WK(this.sha256,t,r,n,i||this.service)}}const bM=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=lZ(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=uZ(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)?DK(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=Gc(e.signer):e.regionInfoProvider?f=()=>Gc(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||Ev;return new _(b)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Gc(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||Ev;return new b(v)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function lZ(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=rK(t,sK,YO):n?r=Gc(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 uZ(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 HC=typeof TextEncoder=="function"?new TextEncoder:null,SM=e=>{if(typeof e=="string"){if(HC)return HC.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}`)},ga=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},ui=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,hp=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((v,b)=>FC[b.step]-FC[v.step]||qC[b.priority||"normal"]-qC[v.priority||"normal"]),c=g=>{let v=!1;const b=_=>{const x=ga(_.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 ga(_.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 ga(C.name,C.aliases))_[A]=C;v.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ga(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 ${ui(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=ga(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${ui(b,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(U=>U===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${ui(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${ui(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=ga(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${ui(b,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(U=>U===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${ui(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${ui(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(hp()),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=ga(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(hp());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 ui(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},FC={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},qC={high:3,normal:2,low:1};class _M{config;middlewareStack=hp();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 v0="***SensitiveInformation***";function xv(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return v0;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return v0}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return v0}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=xv(l,r[c]));return i}return t}class zr{middlewareStack=hp();schema;static classBuilder(){return new fZ}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,[bv]:{commandInstance:this,...h},...y},{requestHandler:x}=n;return v.resolve(R=>x.handle(R.request,r||{}),_)}}class fZ{_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 zr{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?xv.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?xv.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class _a 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 _a.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===_a?_a.isInstance(t):_a.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const VC=(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},wM=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{}}},dZ=e=>{const t=[];for(const n in lp){const r=lp[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},hZ=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},pZ=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),mZ=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},EM=e=>Object.assign(dZ(e),pZ(e)),xM=e=>Object.assign(hZ(e),mZ(e)),RM=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]=RM(e[n]));return e};class Rb{trace(){}debug(){}info(){}warn(){}error(){}}class CM{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=VC(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 VC(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 Wp{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*TM(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 yZ(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function vZ(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class Rv{value;constructor(t){this.value=t}toString(){return vZ(""+this.value)}}class es{name;children;attributes={};static of(t,n,r){const i=new es(t);return n!==void 0&&i.addChildNode(new Rv(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=es.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 es(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}="${yZ(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let b0;function bZ(e){b0||(b0=new DOMParser);const t=b0.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 AM extends Wp{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new ZO(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??$a)(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 gZ(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=bZ(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]),RM(c)}return{}}}class SZ extends Wp{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??Ti)(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(Kp()));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 _f?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),Qp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(fp(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 TM(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+=`&${up(t)}=`}writeValue(t){this.buffer+=up(t)}}class _Z extends YG{options;serializer;deserializer;mixin=new CM;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 SZ(n),this.deserializer=new AM(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"}),(kh(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 bi(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 bi(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 wZ extends _Z{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 EZ=(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 xZ extends Wp{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??ka)(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=es.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of TM(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=es.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=es.of(y);if(typeof g!="string")if(n instanceof es||n instanceof Rv)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=es.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=es.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=es.of(h,O),[U,B]=this.getXmlnsAttribute(f,R);B&&N.addAttribute(U,B),A.addChildNode(N);let k=es.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=es.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=es.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=es.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??Ti)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(Qp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=fp(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=fp(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof _f?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=Kp():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 Rv(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 RZ extends Wp{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new xZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new AM(this.settings);return t.setSerdeContext(this.serdeContext),t}}class CZ extends QG{codec;serializer;deserializer;mixin=new CM;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new RZ(n),this.serializer=new JG(this.codec.createSerializer(),n),this.deserializer=new XG(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=EZ(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 TZ=/\d{12}\.ddb/;async function AZ(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&yr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?yr(e,"RETRY_MODE_ADAPTIVE","F"):yr(e,"RETRY_MODE_STANDARD","E"):yr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match(TZ)&&yr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":yr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":yr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":yr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&yr(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))yr(e,l,f)}}const GC="user-agent",S0="x-amz-user-agent",KC=" ",_0="/",IZ=/[^!$%&'*+\-.^_`|~\w]/g,OZ=/[^!$%&'*+\-.^_`|~\w#]/g,ZC="-",MZ=1024;function DZ(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=MZ){t.length?t+=","+r:t+=r;continue}break}return t}const kZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!On.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(_h)||[],f=(await e.defaultUserAgentProvider()).map(_h);await AZ(n,e,r);const d=n;f.push(`m/${DZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(_h)||[],y=await e.userAgentAppId();y&&f.push(_h(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(KC),v=[...f.filter(b=>b.startsWith("aws-sdk-")),...h].join(KC);return e.runtime!=="browser"?(v&&(c[S0]=c[S0]?`${c[GC]} ${v}`:v),c[GC]=g):c[S0]=g,t({...r,request:i})},_h=e=>{const t=e[0].split(_0).map(l=>l.replace(IZ,ZC)).join(_0),n=e[1]?.replace(OZ,ZC),r=t.indexOf(_0),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}`}},"")},PZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},IM=e=>({applyToStack:t=>{t.add(kZ(e),PZ)}}),OM=!1,MM=!1,QC=new Set,NZ=(e,t=Yp)=>{if(!QC.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 QC.add(e)},DM=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),zZ=e=>DM(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,kM=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=zZ(r);return NZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return DM(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},YC="content-length";function LZ(e){return t=>async n=>{const r=n.request;if(On.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(YC)===-1)try{const l=e(i);r.headers={...r.headers,[YC]:String(l)}}catch{}}return t({...n,request:r})}}const BZ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},PM=e=>({applyToStack:t=>{t.add(LZ(e.bodyLengthChecker),BZ)}}),$Z=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),qZ(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!FZ(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},UZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,jZ=/(\d+\.){3}\d+/,HZ=/\.\./,FZ=e=>UZ.test(e)&&!jZ.test(e)&&!HZ.test(e),qZ=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},VZ=(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},NM=async e=>{},zM=e=>typeof e=="object"?"url"in e?ff(e.url):e:ff(e),GZ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await NM(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(zM(l)),n.isCustomEndpoint=!0)}const i=await LM(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},LM=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 VZ(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 $Z(r),r},KZ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&eK(r,"ENDPOINT_OVERRIDE","N");const c=await GZ(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})},ZZ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:XV.name},Eo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(KZ({config:e,instructions:t}),ZZ)}}),BM=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>zM(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=NM(e.serviceId)),d),f};var nl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(nl||(nl={}));const df=3,$M=nl.STANDARD,QZ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],YZ=["TimeoutError","RequestTimeout","RequestTimeoutException"],XZ=[500,502,503,504],WZ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],JZ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],eQ=e=>e?.$retryable!==void 0,tQ=e=>e.$metadata?.clockSkewCorrected,nQ=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},UM=e=>e.$metadata?.httpStatusCode===429||QZ.includes(e.name)||e.$retryable?.throttling==!0,Cb=(e,t=0)=>eQ(e)||tQ(e)||YZ.includes(e.name)||WZ.includes(e?.code||"")||JZ.includes(e?.code||"")||XZ.includes(e.$metadata?.httpStatusCode||0)||nQ(e)||e.cause!==void 0&&t<=10&&Cb(e.cause,t+1),sQ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Cb(e)}return!1};class Tb{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=>Tb.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(),UM(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 Cv=100,jM=20*1e3,rQ=500,XC=500,oQ=5,iQ=10,aQ=1,cQ="amz-sdk-invocation-id",lQ="amz-sdk-request",uQ=()=>{let e=Cv;return{computeNextBackoffDelay:r=>Math.floor(Math.min(jM,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},WC=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(jM,e),getRetryCost:()=>n});class HM{maxAttempts;mode=nl.STANDARD;capacity=XC;retryBackoffStrategy=uQ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return WC({retryDelay:Cv,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"?rQ:Cv);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,WC({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(XC,this.capacity+(t.getRetryCost()??aQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${df}`),df}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?iQ:oQ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class fQ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=nl.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Tb,this.standardRetryStrategy=new HM(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 dQ=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}`),FM=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ps(r??df);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ps(n)()===nl.ADAPTIVE?new fQ(i):new HM(i))})},hQ=e=>e?.body instanceof ReadableStream,pQ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(mQ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=On.isInstance(y);for(g&&(y.headers[cQ]=Kp());;)try{g&&(y.headers[lQ]=`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=gQ(v);if(f=dQ(v),g&&hQ(y))throw(n.logger instanceof Rb?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)},mQ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",gQ=e=>{const t={error:e,errorType:yQ(e)},n=bQ(e.$response);return n&&(t.retryAfterHint=n),t},yQ=e=>UM(e)?"THROTTLING":Cb(e)?"TRANSIENT":sQ(e)?"SERVER_ERROR":"CLIENT_ERROR",vQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},qM=e=>({applyToStack:t=>{t.add(pQ(e),vQ)}}),bQ=e=>{if(!Da.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)},SQ=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 _Q(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const wQ=e=>{const t=[];switch(e.operation){default:t.push(_Q(e))}return t},EQ=e=>{const t=bM(e);return Object.assign(t,{authSchemePreference:Ps(e.authSchemePreference??[])})},xQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),ul={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},RQ="3.975.0",CQ={version:RQ},VM=e=>new TextEncoder().encode(e);var TQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:VM;function Pa(e){return e instanceof Uint8Array?e:typeof e=="string"?TQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function pp(e){return typeof e=="string"?e.length===0:e.byteLength===0}function AQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function IQ(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,PQ=32,NQ=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]),zQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],LQ=Math.pow(2,53)-1,Ph=(function(){function e(){this.state=Int32Array.from(zQ),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>LQ)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+(NQ[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})(),BQ=(function(){function e(t){this.secret=t,this.hash=new Ph,this.reset()}return e.prototype.update=function(t){if(!(pp(t)||this.error))try{this.hash.update(Pa(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 KM(this,void 0,void 0,function(){return ZM(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Ph,this.secret){this.outer=new Ph;var t=$Q(this.secret),n=new Uint8Array(nr);n.set(t);for(var r=0;rnr){var n=new Ph;n.update(t),t=n.digest()}var r=new Uint8Array(nr);return r.set(t),r}var UQ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function QM(e){if(jQ(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return HQ(t)}return!1}function jQ(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function HQ(e){return e&&UQ.every(function(t){return typeof e[t]=="function"})}var YM=(function(){function e(t){QM(xi())?this.hash=new DQ(t):this.hash=new BQ(t)}return e.prototype.update=function(t,n){this.hash.update(Pa(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const XM=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??eT.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??eT.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},eT={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"}},WM=e=>()=>Promise.reject(e),FQ=["in-region","cross-region","mobile","standard","legacy"],JM=({defaultsMode:e}={})=>NK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(qQ()?"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 ${FQ.join(", ")}, got ${t}`)}}),qQ=()=>{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},eD="required",rr="fn",or="argv",fl="ref",tT=!0,nT="isSet",hf="booleanEquals",kc="error",Pc="endpoint",co="tree",Ab="PartitionResult",Ib="getAttr",sT={[eD]:!1,type:"string"},rT={[eD]:!0,default:!1,type:"boolean"},oT={[fl]:"Endpoint"},tD={[rr]:hf,[or]:[{[fl]:"UseFIPS"},!0]},nD={[rr]:hf,[or]:[{[fl]:"UseDualStack"},!0]},Ws={},iT={[rr]:Ib,[or]:[{[fl]:Ab},"supportsFIPS"]},sD={[fl]:Ab},aT={[rr]:hf,[or]:[!0,{[rr]:Ib,[or]:[sD,"supportsDualStack"]}]},cT=[tD],lT=[nD],uT=[{[fl]:"Region"}],VQ={parameters:{Region:sT,UseDualStack:rT,UseFIPS:rT,Endpoint:sT},rules:[{conditions:[{[rr]:nT,[or]:[oT]}],rules:[{conditions:cT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:kc},{conditions:lT,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:kc},{endpoint:{url:oT,properties:Ws,headers:Ws},type:Pc}],type:co},{conditions:[{[rr]:nT,[or]:uT}],rules:[{conditions:[{[rr]:"aws.partition",[or]:uT,assign:Ab}],rules:[{conditions:[tD,nD],rules:[{conditions:[{[rr]:hf,[or]:[tT,iT]},aT],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Pc}],type:co},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:kc}],type:co},{conditions:cT,rules:[{conditions:[{[rr]:hf,[or]:[iT,tT]}],rules:[{conditions:[{[rr]:"stringEquals",[or]:[{[rr]:Ib,[or]:[sD,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ws,headers:Ws},type:Pc},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Pc}],type:co},{error:"FIPS is enabled but this partition does not support FIPS",type:kc}],type:co},{conditions:lT,rules:[{conditions:[aT],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Pc}],type:co},{error:"DualStack is enabled but this partition does not support DualStack",type:kc}],type:co},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Pc}],type:co}],type:co},{error:"Invalid Configuration: Missing Region",type:kc}]},GQ=VQ,KQ=new WO({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ZQ=(e,t={})=>KQ.get(e,()=>lM(GQ,{endpointParams:e,logger:t.logger}));lf.aws=wb;const QQ=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??ka,base64Encoder:e?.base64Encoder??Ti,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ZQ,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??wQ,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new xb}],logger:e?.logger??new Rb,protocol:e?.protocol??wZ,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??ff,utf8Decoder:e?.utf8Decoder??bo,utf8Encoder:e?.utf8Encoder??$a}),YQ=e=>{const t=JM(e),n=()=>t().then(wM),r=QQ(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??SM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??XM({serviceId:r.serviceId,clientVersion:CQ.version}),maxAttempts:e?.maxAttempts??df,region:e?.region??WM("Region is missing"),requestHandler:Gp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||$M),sha256:e?.sha256??YM,streamCollector:e?.streamCollector??mb,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(OM)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(MM))}},rD=e=>({setRegion(t){e.region=t},region(){return e.region}}),oD=e=>({region:e.region()}),XQ=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}}},WQ=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),JQ=(e,t)=>{const n=Object.assign(rD(e),EM(e),IO(e),XQ(e));return t.forEach(r=>r.configure(n)),Object.assign(e,oD(n),xM(n),OO(n),WQ(n))};class eY extends _M{config;constructor(...[t]){const n=YQ(t||{});super(n),this.initConfig=n;const r=xQ(n),i=XO(r),c=FM(i),l=kM(c),f=l,d=BM(f),h=EQ(d),y=JQ(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(HO(this.config)),this.middlewareStack.use(IM(this.config)),this.middlewareStack.use(qM(this.config)),this.middlewareStack.use(PM(this.config)),this.middlewareStack.use(MO(this.config)),this.middlewareStack.use(DO(this.config)),this.middlewareStack.use(kO(this.config)),this.middlewareStack.use(PO(this.config,{httpAuthSchemeParametersProvider:SQ,identityProviderConfigProvider:async g=>new QO({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(zO(this.config))}destroy(){super.destroy()}}class Ob extends _a{constructor(t){super(t),Object.setPrototypeOf(this,Ob.prototype)}}const tY="AssociateCarrierIpAddress",iD="AdditionalInfo",nY="AttachmentId",sY="AmiLaunchIndex",rY="AttachmentLimitType",oY="AssociatePublicIpAddress",iY="AutoRecoverySupported",aY="AllRegions",aD="AssociatedResource",cD="AutoRecovery",lD="AmdSevSnp",cY="ArchitectureTypeList",Mb="AttachTime",Db="AvailabilityZone",kb="AvailabilityZoneId",uD="Accelerators",lY="Affinity",fD="Arn",dD="Architecture",hD="Association",uY="Attachment",fY="Attachments",dY="BaselineBandwidthInGbps",pD="BaselineBandwidthInMbps",Pb="BlockDeviceMapping",hY="BlockDeviceMappingList",pY="BlockDeviceMappingRequestList",Nb="BlockDeviceMappings",mY="BlockDurationMinutes",mD="BaselineIops",gD="BootMode",gY="BootModeTypeList",yY="BareMetal",vY="BurstablePerformanceSupported",yD="BaselineThroughputInMBps",vD="BandwidthWeighting",bY="BandwidthWeightingTypeList",SY="BandwidthWeightings",_Y="CapacityBlockId",wY="CoreCountList",bD="CoreCount",EY="CpuCredits",xY="CreationDate",RY="CurrentGeneration",CY="CarrierIp",TY="CurrentInstanceBootMode",AY="CoreInfo",IY="CreateKeyPair",OY="CreateKeyPairRequest",zb="CpuOptions",MY="CustomerOwnedIp",DY="CpuOptionsRequest",Lb="CapacityReservationId",SD="CapacityReservationPreference",_D="CapacityReservationResourceGroupArn",kY="CapacityReservationSpecificationResponse",Bb="CapacityReservationSpecification",$b="CapacityReservationTarget",PY="CapacityReservationTargetResponse",NY="CreditSpecificationRequest",zY="CreditSpecification",LY="CurrentState",wD="ClientToken",BY="ConnectionTrackingConfiguration",$Y="ConnectionTrackingSpecification",UY="ConnectionTrackingSpecificationRequest",jY="ConnectionTrackingSpecificationResponse",ED="CreateTime",xD="Code",RD="Configured",Pi="Count",HY="DisableApiStop",FY="DisableApiTermination",qY="DefaultCores",VY="DefaultEnaQueueCountPerInterface",GY="DedicatedHostsSupported",CD="DeviceIndex",KY="DiskInfoList",ZY="DescribeImagesRequest",QY="DescribeImagesResult",YY="DescribeInstancesRequest",XY="DescribeInstancesResult",WY="DescribeInstanceTypesRequest",JY="DescribeInstanceTypesResult",eX="DescribeInstanceTypes",tX="DescribeImages",nX="DescribeInstances",sX="DiskInfo",rX="DeleteKeyPair",oX="DeleteKeyPairRequest",iX="DeleteKeyPairResult",aX="DescribeKeyPairsRequest",cX="DescribeKeyPairsResult",lX="DescribeKeyPairs",TD="DeviceName",uX="DefaultNetworkCardIndex",wf="DeleteOnTermination",fX="DeregistrationProtection",ys="DryRun",dX="DescribeRegionsRequest",hX="DescribeRegionsResult",pX="DescribeRegions",mX="DefaultThreadsPerCore",gX="DeprecationTime",yX="DefaultVCpus",vX="DescribeVolumesRequest",bX="DescribeVolumesResult",SX="DescribeVolumes",Ub="Description",_X="Device",wX="Disks",EX="EbsBlockDevice",xX="ExecutableByStringList",AD="ExecutableBy",Jp="EbsCardIndex",RX="EbsCardInfoList",CX="EbsCardInfo",TX="EbsCards",AX="ElasticGpuAssociation",IX="ElasticGpuAssociationId",OX="ElasticGpuAssociationList",MX="ElasticGpuAssociationState",DX="ElasticGpuAssociationTime",kX="ElasticGpuAssociations",PX="ElasticGpuId",ID="ElasticGpuSpecification",NX="ElasticGpuSpecifications",OD="ElasticInferenceAccelerator",zX="ElasticInferenceAcceleratorAssociation",LX="ElasticInferenceAcceleratorAssociationId",BX="ElasticInferenceAcceleratorAssociationList",$X="ElasticInferenceAcceleratorAssociationState",UX="ElasticInferenceAcceleratorAssociationTime",jX="ElasticInferenceAcceleratorArn",HX="ElasticInferenceAcceleratorAssociations",MD="ElasticInferenceAccelerators",FX="EbsInstanceBlockDevice",qX="EncryptionInTransitSupported",DD="EbsInfo",kD="EfaInfo",PD="EbsOptimized",ND="EbsOptimizedInfo",VX="EnclaveOptionsRequest",GX="EbsOptimizedSupport",jb="EnclaveOptions",KX="EnablePrimaryIpv6",zD="EnaQueueCount",LD="EnableResourceNameDnsAAAARecord",BD="EnableResourceNameDnsARecord",$D="EnaSrdEnabled",UD="EnaSrdSpecification",ZX="EnaSrdSpecificationRequest",QX="EnaSrdSupported",jD="EnaSrdUdpEnabled",HD="EnaSrdUdpSpecification",YX="EnaSrdUdpSpecificationRequest",XX="EfaSupported",FD="EncryptionSupport",Hb="EnaSupport",WX="ExecutableUsers",qD="Ebs",Fb="Enabled",VD="Encrypted",JX="Endpoint",GD="Force",eW="FpgaDeviceInfo",tW="FpgaDeviceInfoList",nW="FpgaDeviceMemoryInfo",sW="FlexibleEnaQueuesSupport",KD="FpgaInfo",rW="FilterList",oW="FastRestored",ZD="FreeTierEligible",dl="Filters",Ni="Filter",iW="Fpgas",qb="Groups",aW="GpuDeviceInfo",cW="GpuDeviceInfoList",lW="GpuDeviceMemoryInfo",uW="GroupIdentifierList",QD="GpuInfo",YD="GroupId",fW="GroupIdentifier",XD="GroupName",dW="GpuPartitionSize",hW="Gpus",WD="HttpEndpoint",pW="HostId",Vb="HibernationOptions",mW="HibernationOptionsRequest",JD="HttpProtocolIpv6",ek="HttpPutResponseHopLimit",gW="HostResourceGroupArn",yW="HibernationSupported",tk="HttpTokens",nk="HostnameType",vW="Hibernate",Gb="Hypervisor",bW="Id",Kb="Ipv6Addresses",sk="Ipv6AddressCount",SW="InstanceAttachmentEnaSrdSpecification",_W="InstanceAttachmentEnaSrdUdpSpecification",rk="InferenceAcceleratorInfo",wW="Ipv4AddressesPerInterface",EW="Ipv6AddressesPerInterface",xW="ImageAllowed",Zb="Ipv6Address",RW="InstanceBlockDeviceMapping",CW="InstanceBlockDeviceMappingList",TW="IncludeDeprecated",AW="InferenceDeviceInfo",IW="InferenceDeviceInfoList",OW="InferenceDeviceMemoryInfo",MW="IncludeDisabled",xo="InstanceId",DW="InstanceIpv6Address",kW="InstanceIpv6AddressList",PW="InstanceInterruptionBehavior",Qb="IamInstanceProfile",NW="InstanceIpv4PrefixList",zW="InstanceIpv6PrefixList",LW="IamInstanceProfileSpecification",BW="InstanceIpv4Prefix",$W="InstanceIpv6Prefix",UW="InstanceInitiatedShutdownBehavior",jW="ImageIdStringList",HW="InstanceIdStringList",Ef="ImageId",FW="ImageIds",xf="InstanceIds",qW="ImportKeyPair",VW="ImportKeyPairRequest",GW="ImportKeyPairResult",KW="ImageLocation",ZW="ImageList",QW="InstanceLifecycle",YW="InstanceList",XW="InstanceMaintenanceOptions",WW="InstanceMaintenanceOptionsRequest",JW="InstanceMarketOptionsRequest",eJ="InstanceMetadataOptionsRequest",tJ="InstanceMetadataOptionsResponse",nJ="InstanceMarketOptions",ok="InstanceMetadataTags",sJ="InstanceNetworkInterface",rJ="InstanceNetworkInterfaceAssociation",oJ="InstanceNetworkInterfaceAttachment",iJ="InstanceNetworkInterfaceList",aJ="InstanceNetworkInterfaceSpecification",cJ="InstanceNetworkInterfaceSpecificationList",lJ="InstanceNetworkPerformanceOptions",uJ="InstanceNetworkPerformanceOptionsRequest",fJ="ImageOwnerAlias",dJ="IpOwnerId",hJ="InstanceOwningService",pJ="Ipv6PrefixCount",mJ="Ipv4PrefixCount",gJ="InstancePrivateIpAddress",yJ="InstancePrivateIpAddressList",vJ="IsPrimaryIpv6",bJ="IncludePublicKey",SJ="Ipv4PrefixList",_J="Ipv6PrefixList",wJ="Ipv4PrefixSpecificationRequest",EJ="Ipv6PrefixSpecificationRequest",ik="Ipv6Prefixes",Yb="Ipv6Prefix",ak="Ipv4Prefixes",Xb="Ipv4Prefix",xJ="InstanceStateChange",RJ="InstanceStateChangeList",ck="InstanceStorageInfo",CJ="InstanceStorageSupported",TJ="ImdsSupport",AJ="InstanceState",IJ="Ipv6Supported",em="InstanceType",OJ="InstanceTypeInfoList",MJ="InstanceTypeInfo",DJ="ImageType",lk="InstanceTypes",uk="InterfaceType",kJ="Images",PJ="Image",NJ="Instance",zJ="Instances",fk="Iops",LJ="Key",BJ="KeyFormat",Wb="KeyFingerprint",Jb="KernelId",dk="KmsKeyId",$J="KeyMaterial",Lr="KeyName",UJ="KeyNameStringList",jJ="KeyNames",HJ="KeyPairs",Ua="KeyPairId",FJ="KeyPairIdStringList",qJ="KeyPairIds",VJ="KeyPairInfo",GJ="KeyPairList",KJ="KeyPair",hk="KeyType",pk="LicenseConfigurationArn",ZJ="LicenseConfigurationRequest",QJ="LicenseConfiguration",YJ="LogicalGpuCount",XJ="LicenseList",WJ="LastLaunchedTime",JJ="LicenseSpecifications",eee="LicenseSpecificationListRequest",tee="LicenseSpecification",nee="LaunchTemplate",see="LaunchTemplateId",ree="LaunchTemplateName",oee="LaunchTemplateSpecification",iee="LaunchTime",aee="Licenses",cee="MultiAttachEnabled",mk="MediaAcceleratorInfo",lee="MacAddress",gk="MaximumBandwidthInMbps",uee="MaxCount",fee="MinCount",dee="MediaDeviceInfo",hee="MediaDeviceInfoList",pee="MediaDeviceMemoryInfo",mee="MaximumEbsAttachments",gee="MaximumEbsCards",yee="MaximumEfaInterfaces",vee="MaximumEnaQueueCount",bee="MaximumEnaQueueCountPerInterface",yk="MaximumIops",ja="MemoryInfo",See="MaximumNetworkCards",vk="MaximumNetworkInterfaces",bk="MetadataOptions",Sk="MaintenanceOptions",_ee="MaxPrice",tm="MaxResults",wee="MarketType",_k="MaximumThroughputInMBps",Rf="Manufacturer",Eee="Managed",xee="Message",eS="Monitoring",Ro="Name",Ree="NetworkCards",tS="NetworkCardIndex",Cee="NetworkCardInfoList",Tee="NetworkCardInfo",Aee="NoDevice",Iee="NeuronDeviceCoreInfo",Oee="NeuronDeviceInfo",Mee="NeuronDeviceInfoList",Dee="NeuronDeviceMemoryInfo",kee="NeuronDevices",Pee="NitroEnclavesSupport",wk="NetworkInterfaceId",Ek="NetworkInterfaces",xk="NetworkInfo",Rk="NeuronInfo",Ck="NetworkPerformanceOptions",Tk="NetworkPerformance",Ak="NvmeSupport",Ik="NitroTpmInfo",Nee="NitroTpmSupport",zee="NitroTpmSupportedVersionsList",zi="NextToken",nS="OutpostArn",sS="OwnerId",Lee="OptInStatus",Bee="OperatorRequest",$ee="OperatorResponse",Uee="OwnerStringList",Cf="Operator",jee="Owners",Ok="Owner",Mk="Principal",Hee="PeakBandwidthInGbps",Fee="ProductCodeId",qee="ProductCodeList",Vee="ProductCodeType",Gee="ProductCode",Dk="ProductCodes",rS="PrivateDnsName",kk="PrivateDnsNameOptions",Kee="PrivateDnsNameOptionsRequest",Zee="PrivateDnsNameOptionsResponse",Pk="PublicDnsName",Nk="PlatformDetails",zk="PlacementGroupInfo",Qee="PlacementGroupStrategyList",Yee="PublicIp",Xee="PrivateIpAddressSpecification",Wee="PrivateIpAddressSpecificationList",hl="PrivateIpAddress",Lk="PrivateIpAddresses",Jee="PublicIpAddress",ete="PrimaryIpv6",Bk="ProcessorInfo",tte="PublicKey",nte="PublicKeyMaterial",ste="PartitionNumber",rte="PhcSupport",ote="PreviousState",$k="Platform",oS="Placement",Uk="Primary",ite="Public",ate="Return",jk="RootDeviceName",Hk="RootDeviceType",cte="RootDeviceTypeList",lte="RunInstancesMonitoringEnabled",ute="RebootInstancesRequest",fte="RunInstancesRequest",dte="RunInstancesUserData",iS="RamdiskId",hte="ReservationId",pte="RebootInstances",mte="RequesterId",gte="RunInstances",yte="RegionList",vte="ReservationList",bte="RebootMigrationSupport",Ste="RebootMigration",aS="RegionName",_te="RegionNameStringList",wte="RegionNames",Ete="ResourceType",xte="Regions",Rte="Region",Cte="Reservations",Tte="Reservation",Ate="SupportedAdditionalProcessorFeatureList",Ite="SupportedArchitectures",Ote="SupportedBootModes",Mte="SustainedClockSpeedInGhz",Fk="SourceDestCheck",Dte="SpreadDomain",kte="SupportedFeatures",qk="SecurityGroups",cS="SecurityGroupId",Pte="SecurityGroupIdStringList",Nte="SecurityGroupIds",zte="SecurityGroupStringList",Vk="SecurityGroup",Lte="SizeInGB",Bte="SourceImageId",$te="SourceInstanceId",pl="SizeInMiB",Ute="SpotInstanceRequestId",jte="SourceImageRegion",Hte="StartInstancesRequest",Fte="StartInstancesResult",qte="StopInstancesRequest",Vte="StopInstancesResult",Gte="SpotInstanceType",Gk="SnapshotId",Kte="StartingInstances",Zte="StartInstances",Qte="StoppingInstances",Yte="StopInstances",nm="SubnetId",Xte="SpotMarketOptions",Kk="SriovNetSupport",Wte="SpotOptions",Zk="SkipOsShutdown",Jte="SecondaryPrivateIpAddressCount",ene="SupportedRootDeviceTypes",lS="StateReason",tne="SupportedStrategies",nne="StateTransitionReason",sne="SseType",rne="SupportedUsageClasses",one="SensitiveUserData",ine="SourceVolumeId",ane="SupportedVirtualizationTypes",cne="SupportedVersions",lne="Size",ml="State",uS="Status",Ha="Tags",Qk="TcpEstablishedTimeout",une="TotalFpgaMemoryInMiB",fne="TotalGpuMemoryInMiB",dne="TerminateInstances",hne="TotalInferenceMemoryInMiB",pne="TerminateInstancesRequest",mne="TerminateInstancesResult",gne="TerminatingInstances",yne="TagList",vne="TotalMediaMemoryInMiB",bne="TotalNeuronDeviceMemoryInMiB",Yk="ThreadsPerCore",Sne="ThreadsPerCoreList",fS="TagSpecifications",_ne="TotalSizeInGB",wne="TagSpecificationList",sm="TagSpecification",Xk="TpmSupport",Wk="Tag",Ene="Tenancy",Jk="Throughput",dS="Type",xne="UsageClassTypeList",Rne="UserData",e3="UsageOperation",Cne="UsageOperationUpdateTime",t3="UdpStreamTimeout",n3="UdpTimeout",s3="Value",Tne="VolumeAttachmentList",Ane="VolumeAttachment",r3="VCpuInfo",Ine="ValidCores",o3="VpcId",i3="VolumeInitializationRate",One="VolumeIdStringList",Tf="VolumeId",Mne="VolumeIds",Dne="VolumeList",kne="VirtualName",Pne="VolumeOwnerId",Nne="ValueStringList",zne="VolumeSize",a3="VolumeType",Lne="VirtualizationTypeList",Bne="ValidThreadsPerCore",c3="VirtualizationType",$ne="ValidUntil",Une="Values",l3="Version",jne="Volumes",Hne="Volume",Fne="WorkloadsList",qne="Workloads",u3="additionalInfo",Vne="attachmentId",Gne="amiLaunchIndex",Kne="attachmentLimitType",Zne="associatePublicIpAddress",Qne="autoRecoverySupported",f3="associatedResource",Yne="autoRecovery",Xne="amdSevSnp",Wne="attachmentSet",hS="attachTime",pS="availabilityZone",d3="availabilityZoneId",h3="accelerators",Jne="affinity",p3="arn",m3="architecture",g3="association",ese="attachment",tse="baselineBandwidthInGbps",y3="baselineBandwidthInMbps",v3="blockDeviceMapping",b3="baselineIops",S3="bootMode",nse="bareMetal",sse="burstablePerformanceSupported",_3="baselineThroughputInMBps",rse="bandwidthWeighting",ose="bandwidthWeightings",ise="capacityBlockId",ase="coreCount",cse="creationDate",lse="currentGeneration",use="carrierIp",fse="currentInstanceBootMode",dse="coreInfo",hse="cpuOptions",pse="customerOwnedIp",w3="capacityReservationId",mse="capacityReservationPreference",gse="capacityReservationResourceGroupArn",yse="capacityReservationSpecification",vse="capacityReservationTarget",bse="currentState",E3="clientToken",Sse="connectionTrackingConfiguration",x3="createTime",R3="code",_se="configured",Fa="count",wse="disableApiTermination",Ese="defaultCores",xse="defaultEnaQueueCountPerInterface",Rse="dedicatedHostsSupported",C3="deviceIndex",T3="deviceName",Cse="defaultNetworkCardIndex",Tse="dnsName",Af="deleteOnTermination",Ase="deregistrationProtection",Ls="dryRun",Ise="defaultThreadsPerCore",Ose="deprecationTime",Mse="defaultVCpus",mS="description",Dse="device",kse="disks",gS="ebsCardIndex",Pse="ebsCardSet",Nse="elasticGpuAssociationId",zse="elasticGpuAssociationState",Lse="elasticGpuAssociationSet",Bse="elasticGpuAssociationTime",$se="elasticGpuId",Use="elasticInferenceAcceleratorArn",jse="elasticInferenceAcceleratorAssociationId",Hse="elasticInferenceAcceleratorAssociationState",Fse="elasticInferenceAcceleratorAssociationSet",qse="elasticInferenceAcceleratorAssociationTime",Vse="encryptionInTransitSupported",Gse="ebsInfo",Kse="efaInfo",A3="ebsOptimized",Zse="ebsOptimizedInfo",Qse="ebsOptimizedSupport",Yse="enclaveOptions",Xse="enaQueueCount",E="ec2QueryName",Wse="enableResourceNameDnsAAAARecord",Jse="enableResourceNameDnsARecord",ere="enaSrdEnabled",tre="enaSrdSpecification",nre="enaSrdSupported",sre="enaSrdUdpEnabled",rre="enaSrdUdpSpecification",ore="efaSupported",I3="encryptionSupport",yS="enaSupport",O3="ebs",M3="enabled",D3="encrypted",ire="flexibleEnaQueuesSupport",are="fpgaInfo",cre="fastRestored",k3="freeTierEligible",lre="force",ure="fpgas",fre="gpuInfo",P3="groupId",N3="groupName",dre="gpuPartitionSize",vS="groupSet",hre="gpus",bS="hypervisor",pre="httpEndpoint",mre="hostId",gre="hibernationOptions",yre="httpProtocolIpv6",vre="httpPutResponseHopLimit",bre="hostResourceGroupArn",Sre="hibernationSupported",_re="httpTokens",wre="hostnameType",Ere="id",xre="ipv6AddressCount",Rre="inferenceAcceleratorInfo",Cre="ipv4AddressesPerInterface",Tre="ipv6AddressesPerInterface",z3="ipv6AddressesSet",Are="imageAllowed",Ire="ipAddress",L3="ipv6Address",SS="instanceId",B3="iamInstanceProfile",Ore="instanceInitiatedShutdownBehavior",$3="imageId",Mre="imageLocation",Dre="instanceLifecycle",kre="instanceMetadataTags",Pre="imageOwnerAlias",Nre="imageOwnerId",zre="ipOwnerId",Lre="instanceOwningService",Bre="isPrimaryIpv6",$re="ipv4PrefixSet",Ure="ipv6PrefixSet",jre="ipv4Prefix",Hre="ipv6Prefix",Fre="isPublic",qre="instanceStorageInfo",Vre="instanceStorageSupported",Gre="imagesSet",Kre="imageState",Zre="imdsSupport",rm="instancesSet",Qre="instanceState",Yre="ipv6Supported",U3="instanceType",Xre="instanceTypeSet",Wre="idempotencyToken",Jre="imageType",eoe="interfaceType",j3="iops",je="item",toe="key",_S="keyFingerprint",H3="kernelId",F3="kmsKeyId",noe="keyMaterial",If="keyName",om="keyPairId",soe="keySet",roe="keyType",ooe="licenseConfigurationArn",ioe="logicalGpuCount",aoe="lastLaunchedTime",coe="licenseSet",loe="launchTime",uoe="multiAttachEnabled",foe="mediaAcceleratorInfo",doe="macAddress",q3="maximumBandwidthInMbps",hoe="maximumEbsAttachments",poe="maximumEbsCards",moe="maximumEfaInterfaces",goe="maximumEnaQueueCount",yoe="maximumEnaQueueCountPerInterface",V3="maximumIops",gl="memoryInfo",voe="maximumNetworkCards",G3="maximumNetworkInterfaces",boe="metadataOptions",Soe="maintenanceOptions",K3="maxResults",Z3="maximumThroughputInMBps",Of="manufacturer",_oe="managed",woe="message",Eoe="monitoring",Li="name",xoe="networkCards",Q3="networkCardIndex",Roe="noDevice",Coe="neuronDevices",Toe="nitroEnclavesSupport",Y3="networkInterfaceId",Aoe="networkInterfaceSet",Ioe="networkInterface",Ooe="networkInfo",Moe="neuronInfo",Doe="networkPerformanceOptions",X3="networkPerformance",W3="nvmeSupport",koe="nitroTpmInfo",Poe="nitroTpmSupport",yl="nextToken",wS="outpostArn",J3="ownerId",Noe="optInStatus",im="operator",zoe="principal",Loe="peakBandwidthInGbps",eP="productCodes",Boe="productCode",$oe="privateDnsNameOptions",ES="privateDnsName",Uoe="publicDnsName",tP="platformDetails",joe="placementGroupInfo",Hoe="publicIp",nP="privateIpAddressesSet",vl="privateIpAddress",Foe="processorInfo",qoe="publicKey",Voe="publicKeyMaterial",Goe="partitionNumber",Koe="phcSupport",Zoe="previousState",sP="platform",Qoe="placement",rP="primary",Yoe="return",oP="rootDeviceName",iP="rootDeviceType",Xoe="regionEndpoint",Woe="reservationId",aP="ramdiskId",Joe="regionInfo",eie="requesterId",tie="rebootMigrationSupport",nie="rebootMigration",sie="regionName",rie="reservationSet",oie="resourceType",iie="reason",aie="supportedArchitectures",cie="supportedBootModes",lie="sustainedClockSpeedInGhz",cP="sourceDestCheck",uie="spreadDomain",fie="supportedFeatures",die="sizeInGB",hie="sourceInstanceId",pie="sourceImageId",bl="sizeInMiB",mie="sourceImageRegion",gie="spotInstanceRequestId",lP="snapshotId",xS="subnetId",uP="sriovNetSupport",yie="secondaryPrivateIpAddressCount",vie="supportedRootDeviceTypes",fP="stateReason",bie="supportedStrategies",Sie="sseType",_ie="supportedUsageClasses",wie="sourceVolumeId",Eie="supportedVirtualizationTypes",xie="supportedVersions",Rie="size",dP="smithy.ts.sdk.synthetic.com.amazonaws.ec2",hP="state",Mf="status",Cie="tenancy",Tie="tcpEstablishedTimeout",Aie="totalFpgaMemoryInMiB",Iie="totalGpuMemoryInMiB",Oie="totalInferenceMemoryInMiB",Mie="totalMediaMemoryInMiB",Die="totalNeuronDeviceMemoryInMiB",kie="threadsPerCore",Sl="tagSet",Pie="totalSizeInGB",pP="tpmSupport",mP="throughput",gP="type",yP="usageOperation",Nie="usageOperationUpdateTime",zie="udpStreamTimeout",Lie="udpTimeout",Bie="value",$ie="vCpuInfo",Uie="validCores",vP="vpcId",jie="volumeInitializationRate",RS="volumeId",Hie="virtualName",Fie="volumeOwnerId",qie="volumeSet",Vie="volumeSize",bP="volumeType",Gie="validThreadsPerCore",SP="virtualizationType",Kie="version",Zie="workloadSet",S="xmlName",F="com.amazonaws.ec2";var Qie=[0,F,dte,8,0],Yie=[0,F,one,8,0],_P=[3,F,Pb,0,[qD,Aee,TD,kne],[[()=>wae,{[E]:"Ebs",[S]:O3}],[0,{[E]:"NoDevice",[S]:Roe}],[0,{[E]:"DeviceName",[S]:T3}],[0,{[E]:"VirtualName",[S]:Hie}]]],Xie=[3,F,Bb,0,[SD,$b],[0,()=>Jie]],Wie=[3,F,kY,0,[SD,$b],[[0,{[E]:"CapacityReservationPreference",[S]:mse}],[()=>eae,{[E]:"CapacityReservationTarget",[S]:vse}]]],Jie=[3,F,$b,0,[Lb,_D],[0,0]],eae=[3,F,PY,0,[Lb,_D],[[0,{[E]:"CapacityReservationId",[S]:w3}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:gse}]]],tae=[3,F,UY,0,[Qk,t3,n3],[1,1,1]],nae=[3,F,jY,0,[Qk,t3,n3],[[1,{[E]:"TcpEstablishedTimeout",[S]:Tie}],[1,{[E]:"UdpStreamTimeout",[S]:zie}],[1,{[E]:"UdpTimeout",[S]:Lie}]]],sae=[3,F,zb,0,[bD,Yk,lD],[[1,{[E]:"CoreCount",[S]:ase}],[1,{[E]:"ThreadsPerCore",[S]:kie}],[0,{[E]:"AmdSevSnp",[S]:Xne}]]],rae=[3,F,DY,0,[bD,Yk,lD],[1,1,0]],oae=[3,F,OY,0,[Lr,hk,fS,BJ,ys],[0,0,[()=>IS,{[S]:sm}],0,[2,{[E]:"DryRun",[S]:Ls}]],1],iae=[3,F,NY,0,[EY],[0],1],aae=[3,F,oX,0,[Lr,Ua,ys],[0,0,[2,{[E]:"DryRun",[S]:Ls}]]],cae=[3,F,iX,0,[ate,Ua],[[2,{[E]:"Return",[S]:Yoe}],[0,{[E]:"KeyPairId",[S]:om}]]],lae=[3,F,ZY,0,[WX,FW,jee,TW,MW,tm,zi,ys,dl],[[()=>Ele,{[S]:AD}],[()=>Cle,{[S]:Ef}],[()=>Zle,{[S]:Ok}],2,2,1,0,[2,{[E]:"DryRun",[S]:Ls}],[()=>_l,{[S]:Ni}]]],uae=[3,F,QY,0,[zi,kJ],[[0,{[E]:"NextToken",[S]:yl}],[()=>Tle,{[E]:"ImagesSet",[S]:Gre}]]],fae=[3,F,YY,0,[xf,ys,dl,zi,tm],[[()=>Df,{[S]:xo}],[2,{[E]:"DryRun",[S]:Ls}],[()=>_l,{[S]:Ni}],[0,{[E]:"NextToken",[S]:yl}],[1,{[E]:"MaxResults",[S]:K3}]]],dae=[3,F,XY,0,[zi,Cte],[[0,{[E]:"NextToken",[S]:yl}],[()=>Jle,{[E]:"ReservationSet",[S]:rie}]]],hae=[3,F,WY,0,[ys,lk,dl,tm,zi],[2,[64,{[S]:em}],[()=>_l,{[S]:Ni}],1,0]],pae=[3,F,JY,0,[lk,zi],[[()=>zle,{[E]:"InstanceTypeSet",[S]:Xre}],[0,{[E]:"NextToken",[S]:yl}]]],mae=[3,F,aX,0,[jJ,qJ,bJ,ys,dl],[[()=>$le,{[S]:Lr}],[()=>Ule,{[S]:Ua}],2,[2,{[E]:"DryRun",[S]:Ls}],[()=>_l,{[S]:Ni}]]],gae=[3,F,cX,0,[HJ],[[()=>jle,{[E]:"KeySet",[S]:soe}]]],yae=[3,F,dX,0,[wte,aY,ys,dl],[[()=>Wle,{[S]:aS}],2,[2,{[E]:"DryRun",[S]:Ls}],[()=>_l,{[S]:Ni}]]],vae=[3,F,hX,0,[xte],[[()=>Xle,{[E]:"RegionInfo",[S]:Joe}]]],bae=[3,F,vX,0,[Mne,ys,dl,zi,tm],[[()=>cue,{[S]:Tf}],[2,{[E]:"DryRun",[S]:Ls}],[()=>_l,{[S]:Ni}],[0,{[E]:"NextToken",[S]:yl}],[1,{[E]:"MaxResults",[S]:K3}]]],Sae=[3,F,bX,0,[zi,jne],[[0,{[E]:"NextToken",[S]:yl}],[()=>lue,{[E]:"VolumeSet",[S]:qie}]]],_ae=[3,F,sX,0,[Lte,Pi,dS],[[1,{[E]:"SizeInGB",[S]:die}],[1,{[E]:"Count",[S]:Fa}],[0,{[E]:"Type",[S]:gP}]]],wae=[3,F,EX,0,[wf,fk,Gk,zne,a3,dk,Jk,nS,Db,VD,i3,kb,Jp],[[2,{[E]:"DeleteOnTermination",[S]:Af}],[1,{[E]:"Iops",[S]:j3}],[0,{[E]:"SnapshotId",[S]:lP}],[1,{[E]:"VolumeSize",[S]:Vie}],[0,{[E]:"VolumeType",[S]:bP}],[0,{[E]:"KmsKeyId",[S]:F3}],[1,{[E]:"Throughput",[S]:mP}],[0,{[E]:"OutpostArn",[S]:wS}],[0,{[E]:"AvailabilityZone",[S]:pS}],[2,{[E]:"Encrypted",[S]:D3}],1,0,1]],Eae=[3,F,CX,0,[Jp,pD,yD,mD,gk,_k,yk],[[1,{[E]:"EbsCardIndex",[S]:gS}],[1,{[E]:"BaselineBandwidthInMbps",[S]:y3}],[1,{[E]:"BaselineThroughputInMBps",[S]:_3}],[1,{[E]:"BaselineIops",[S]:b3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:q3}],[1,{[E]:"MaximumThroughputInMBps",[S]:Z3}],[1,{[E]:"MaximumIops",[S]:V3}]]],xae=[3,F,DD,0,[GX,FD,ND,Ak,mee,rY,gee,TX],[[0,{[E]:"EbsOptimizedSupport",[S]:Qse}],[0,{[E]:"EncryptionSupport",[S]:I3}],[()=>Cae,{[E]:"EbsOptimizedInfo",[S]:Zse}],[0,{[E]:"NvmeSupport",[S]:W3}],[1,{[E]:"MaximumEbsAttachments",[S]:hoe}],[0,{[E]:"AttachmentLimitType",[S]:Kne}],[1,{[E]:"MaximumEbsCards",[S]:poe}],[()=>vle,{[E]:"EbsCardSet",[S]:Pse}]]],Rae=[3,F,FX,0,[Mb,wf,uS,Tf,aD,Pne,Cf,Jp],[[4,{[E]:"AttachTime",[S]:hS}],[2,{[E]:"DeleteOnTermination",[S]:Af}],[0,{[E]:"Status",[S]:Mf}],[0,{[E]:"VolumeId",[S]:RS}],[0,{[E]:"AssociatedResource",[S]:f3}],[0,{[E]:"VolumeOwnerId",[S]:Fie}],[()=>am,{[E]:"Operator",[S]:im}],[1,{[E]:"EbsCardIndex",[S]:gS}]]],Cae=[3,F,ND,0,[pD,yD,mD,gk,_k,yk],[[1,{[E]:"BaselineBandwidthInMbps",[S]:y3}],[1,{[E]:"BaselineThroughputInMBps",[S]:_3}],[1,{[E]:"BaselineIops",[S]:b3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:q3}],[1,{[E]:"MaximumThroughputInMBps",[S]:Z3}],[1,{[E]:"MaximumIops",[S]:V3}]]],Tae=[3,F,kD,0,[yee],[[1,{[E]:"MaximumEfaInterfaces",[S]:moe}]]],Aae=[3,F,AX,0,[PX,IX,MX,DX],[[0,{[E]:"ElasticGpuId",[S]:$se}],[0,{[E]:"ElasticGpuAssociationId",[S]:Nse}],[0,{[E]:"ElasticGpuAssociationState",[S]:zse}],[0,{[E]:"ElasticGpuAssociationTime",[S]:Bse}]]],Iae=[3,F,ID,0,[dS],[0],1],Oae=[3,F,OD,0,[dS,Pi],[0,1],1],Mae=[3,F,zX,0,[jX,LX,$X,UX],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:Use}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:jse}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:Hse}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:qse}]]],Dae=[3,F,ZX,0,[$D,HD],[2,()=>kae]],kae=[3,F,YX,0,[jD],[2]],Pae=[3,F,jb,0,[Fb],[[2,{[E]:"Enabled",[S]:M3}]]],Nae=[3,F,VX,0,[Fb],[2]],zae=[3,F,Ni,0,[Ro,Une],[0,[()=>oue,{[S]:s3}]]],Lae=[3,F,eW,0,[Ro,Rf,Pi,ja],[[0,{[E]:"Name",[S]:Li}],[0,{[E]:"Manufacturer",[S]:Of}],[1,{[E]:"Count",[S]:Fa}],[()=>Bae,{[E]:"MemoryInfo",[S]:gl}]]],Bae=[3,F,nW,0,[pl],[[1,{[E]:"SizeInMiB",[S]:bl}]]],$ae=[3,F,KD,0,[iW,une],[[()=>xle,{[E]:"Fpgas",[S]:ure}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:Aie}]]],Uae=[3,F,aW,0,[Ro,Rf,Pi,YJ,dW,qne,ja],[[0,{[E]:"Name",[S]:Li}],[0,{[E]:"Manufacturer",[S]:Of}],[1,{[E]:"Count",[S]:Fa}],[1,{[E]:"LogicalGpuCount",[S]:ioe}],[1,{[E]:"GpuPartitionSize",[S]:dre}],[()=>uue,{[E]:"WorkloadSet",[S]:Zie}],[()=>jae,{[E]:"MemoryInfo",[S]:gl}]]],jae=[3,F,lW,0,[pl],[[1,{[E]:"SizeInMiB",[S]:bl}]]],Hae=[3,F,QD,0,[hW,fne],[[()=>Rle,{[E]:"Gpus",[S]:hre}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:Iie}]]],Fae=[3,F,fW,0,[YD,XD],[[0,{[E]:"GroupId",[S]:P3}],[0,{[E]:"GroupName",[S]:N3}]]],qae=[3,F,Vb,0,[RD],[[2,{[E]:"Configured",[S]:_se}]]],Vae=[3,F,mW,0,[RD],[2]],Gae=[3,F,Qb,0,[fD,bW],[[0,{[E]:"Arn",[S]:p3}],[0,{[E]:"Id",[S]:Ere}]]],Kae=[3,F,LW,0,[fD,Ro],[[0,{[E]:"Arn",[S]:p3}],[0,{[E]:"Name",[S]:Li}]]],Zae=[3,F,PJ,0,[Nk,e3,Nb,Ub,Hb,Gb,fJ,Ro,jk,Hk,Kk,lS,Ha,c3,gD,Xk,gX,TJ,$te,fX,WJ,xW,Bte,jte,ZD,Ef,KW,ml,sS,xY,ite,Dk,dD,DJ,Jb,iS,$k],[[0,{[E]:"PlatformDetails",[S]:tP}],[0,{[E]:"UsageOperation",[S]:yP}],[()=>hle,{[E]:"BlockDeviceMapping",[S]:v3}],[0,{[E]:"Description",[S]:mS}],[2,{[E]:"EnaSupport",[S]:yS}],[0,{[E]:"Hypervisor",[S]:bS}],[0,{[E]:"ImageOwnerAlias",[S]:Pre}],[0,{[E]:"Name",[S]:Li}],[0,{[E]:"RootDeviceName",[S]:oP}],[0,{[E]:"RootDeviceType",[S]:iP}],[0,{[E]:"SriovNetSupport",[S]:uP}],[()=>RP,{[E]:"StateReason",[S]:fP}],[()=>qa,{[E]:"TagSet",[S]:Sl}],[0,{[E]:"VirtualizationType",[S]:SP}],[0,{[E]:"BootMode",[S]:S3}],[0,{[E]:"TpmSupport",[S]:pP}],[0,{[E]:"DeprecationTime",[S]:Ose}],[0,{[E]:"ImdsSupport",[S]:Zre}],[0,{[E]:"SourceInstanceId",[S]:hie}],[0,{[E]:"DeregistrationProtection",[S]:Ase}],[0,{[E]:"LastLaunchedTime",[S]:aoe}],[2,{[E]:"ImageAllowed",[S]:Are}],[0,{[E]:"SourceImageId",[S]:pie}],[0,{[E]:"SourceImageRegion",[S]:mie}],[2,{[E]:"FreeTierEligible",[S]:k3}],[0,{[E]:"ImageId",[S]:$3}],[0,{[E]:"ImageLocation",[S]:Mre}],[0,{[E]:"ImageState",[S]:Kre}],[0,{[E]:"ImageOwnerId",[S]:Nre}],[0,{[E]:"CreationDate",[S]:cse}],[2,{[E]:"IsPublic",[S]:Fre}],[()=>CP,{[E]:"ProductCodes",[S]:eP}],[0,{[E]:"Architecture",[S]:m3}],[0,{[E]:"ImageType",[S]:Jre}],[0,{[E]:"KernelId",[S]:H3}],[0,{[E]:"RamdiskId",[S]:aP}],[0,{[E]:"Platform",[S]:sP}]]],Qae=[3,F,VW,0,[Lr,nte,fS,ys],[[0,{[E]:"KeyName",[S]:If}],[21,{[E]:"PublicKeyMaterial",[S]:Voe}],[()=>IS,{[S]:sm}],[2,{[E]:"DryRun",[S]:Ls}]],2],Yae=[3,F,GW,0,[Wb,Lr,Ua,Ha],[[0,{[E]:"KeyFingerprint",[S]:_S}],[0,{[E]:"KeyName",[S]:If}],[0,{[E]:"KeyPairId",[S]:om}],[()=>qa,{[E]:"TagSet",[S]:Sl}]]],Xae=[3,F,rk,0,[uD,hne],[[()=>Ale,{[E]:"Accelerators",[S]:h3}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:Oie}]]],Wae=[3,F,AW,0,[Pi,Ro,Rf,ja],[[1,{[E]:"Count",[S]:Fa}],[0,{[E]:"Name",[S]:Li}],[0,{[E]:"Manufacturer",[S]:Of}],[()=>Jae,{[E]:"MemoryInfo",[S]:gl}]]],Jae=[3,F,OW,0,[pl],[[1,{[E]:"SizeInMiB",[S]:bl}]]],ece=[3,F,NJ,0,[dD,Nb,wD,PD,Hb,Gb,Qb,QW,kX,HX,Ek,nS,jk,Hk,qk,Fk,Ute,Kk,lS,Ha,c3,zb,_Y,Lb,Bb,Vb,aee,bk,jb,gD,Nk,e3,Cne,kk,Zb,Xk,Sk,TY,Ck,Cf,xo,Ef,ml,rS,Pk,nne,Lr,sY,Dk,em,iee,oS,Jb,iS,$k,eS,nm,o3,hl,Jee],[[0,{[E]:"Architecture",[S]:m3}],[()=>Ile,{[E]:"BlockDeviceMapping",[S]:v3}],[0,{[E]:"ClientToken",[S]:E3}],[2,{[E]:"EbsOptimized",[S]:A3}],[2,{[E]:"EnaSupport",[S]:yS}],[0,{[E]:"Hypervisor",[S]:bS}],[()=>Gae,{[E]:"IamInstanceProfile",[S]:B3}],[0,{[E]:"InstanceLifecycle",[S]:Dre}],[()=>ble,{[E]:"ElasticGpuAssociationSet",[S]:Lse}],[()=>_le,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:Fse}],[()=>kle,{[E]:"NetworkInterfaceSet",[S]:Aoe}],[0,{[E]:"OutpostArn",[S]:wS}],[0,{[E]:"RootDeviceName",[S]:oP}],[0,{[E]:"RootDeviceType",[S]:iP}],[()=>CS,{[E]:"GroupSet",[S]:vS}],[2,{[E]:"SourceDestCheck",[S]:cP}],[0,{[E]:"SpotInstanceRequestId",[S]:gie}],[0,{[E]:"SriovNetSupport",[S]:uP}],[()=>RP,{[E]:"StateReason",[S]:fP}],[()=>qa,{[E]:"TagSet",[S]:Sl}],[0,{[E]:"VirtualizationType",[S]:SP}],[()=>sae,{[E]:"CpuOptions",[S]:hse}],[0,{[E]:"CapacityBlockId",[S]:ise}],[0,{[E]:"CapacityReservationId",[S]:w3}],[()=>Wie,{[E]:"CapacityReservationSpecification",[S]:yse}],[()=>qae,{[E]:"HibernationOptions",[S]:gre}],[()=>Hle,{[E]:"LicenseSet",[S]:coe}],[()=>fce,{[E]:"MetadataOptions",[S]:boe}],[()=>Pae,{[E]:"EnclaveOptions",[S]:Yse}],[0,{[E]:"BootMode",[S]:S3}],[0,{[E]:"PlatformDetails",[S]:tP}],[0,{[E]:"UsageOperation",[S]:yP}],[4,{[E]:"UsageOperationUpdateTime",[S]:Nie}],[()=>Fce,{[E]:"PrivateDnsNameOptions",[S]:$oe}],[0,{[E]:"Ipv6Address",[S]:L3}],[0,{[E]:"TpmSupport",[S]:pP}],[()=>ace,{[E]:"MaintenanceOptions",[S]:Soe}],[0,{[E]:"CurrentInstanceBootMode",[S]:fse}],[()=>mce,{[E]:"NetworkPerformanceOptions",[S]:Doe}],[()=>am,{[E]:"Operator",[S]:im}],[0,{[E]:"InstanceId",[S]:SS}],[0,{[E]:"ImageId",[S]:$3}],[()=>Tv,{[E]:"InstanceState",[S]:Qre}],[0,{[E]:"PrivateDnsName",[S]:ES}],[0,{[E]:"DnsName",[S]:Tse}],[0,{[E]:"Reason",[S]:iie}],[0,{[E]:"KeyName",[S]:If}],[1,{[E]:"AmiLaunchIndex",[S]:Gne}],[()=>CP,{[E]:"ProductCodes",[S]:eP}],[0,{[E]:"InstanceType",[S]:U3}],[4,{[E]:"LaunchTime",[S]:loe}],[()=>EP,{[E]:"Placement",[S]:Qoe}],[0,{[E]:"KernelId",[S]:H3}],[0,{[E]:"RamdiskId",[S]:aP}],[0,{[E]:"Platform",[S]:sP}],[()=>Dce,{[E]:"Monitoring",[S]:Eoe}],[0,{[E]:"SubnetId",[S]:xS}],[0,{[E]:"VpcId",[S]:vP}],[0,{[E]:"PrivateIpAddress",[S]:vl}],[0,{[E]:"IpAddress",[S]:Ire}]]],tce=[3,F,SW,0,[$D,HD],[[2,{[E]:"EnaSrdEnabled",[S]:ere}],[()=>nce,{[E]:"EnaSrdUdpSpecification",[S]:rre}]]],nce=[3,F,_W,0,[jD],[[2,{[E]:"EnaSrdUdpEnabled",[S]:sre}]]],sce=[3,F,RW,0,[TD,qD],[[0,{[E]:"DeviceName",[S]:T3}],[()=>Rae,{[E]:"Ebs",[S]:O3}]]],rce=[3,F,BW,0,[Xb],[[0,{[E]:"Ipv4Prefix",[S]:jre}]]],oce=[3,F,DW,0,[Zb,vJ],[[0,{[E]:"Ipv6Address",[S]:L3}],[2,{[E]:"IsPrimaryIpv6",[S]:Bre}]]],ice=[3,F,$W,0,[Yb],[[0,{[E]:"Ipv6Prefix",[S]:Hre}]]],ace=[3,F,XW,0,[cD,Ste],[[0,{[E]:"AutoRecovery",[S]:Yne}],[0,{[E]:"RebootMigration",[S]:nie}]]],cce=[3,F,WW,0,[cD],[0]],lce=[3,F,JW,0,[wee,Wte],[0,()=>Xce]],uce=[3,F,eJ,0,[tk,ek,WD,JD,ok],[0,1,0,0,0]],fce=[3,F,tJ,0,[ml,tk,ek,WD,JD,ok],[[0,{[E]:"State",[S]:hP}],[0,{[E]:"HttpTokens",[S]:_re}],[1,{[E]:"HttpPutResponseHopLimit",[S]:vre}],[0,{[E]:"HttpEndpoint",[S]:pre}],[0,{[E]:"HttpProtocolIpv6",[S]:yre}],[0,{[E]:"InstanceMetadataTags",[S]:kre}]]],dce=[3,F,sJ,0,[hD,uY,Ub,qb,Kb,lee,wk,sS,rS,hl,Lk,Fk,uS,nm,o3,uk,ak,ik,BY,Cf],[[()=>wP,{[E]:"Association",[S]:g3}],[()=>hce,{[E]:"Attachment",[S]:ese}],[0,{[E]:"Description",[S]:mS}],[()=>CS,{[E]:"GroupSet",[S]:vS}],[()=>TS,{[E]:"Ipv6AddressesSet",[S]:z3}],[0,{[E]:"MacAddress",[S]:doe}],[0,{[E]:"NetworkInterfaceId",[S]:Y3}],[0,{[E]:"OwnerId",[S]:J3}],[0,{[E]:"PrivateDnsName",[S]:ES}],[0,{[E]:"PrivateIpAddress",[S]:vl}],[()=>Nle,{[E]:"PrivateIpAddressesSet",[S]:nP}],[2,{[E]:"SourceDestCheck",[S]:cP}],[0,{[E]:"Status",[S]:Mf}],[0,{[E]:"SubnetId",[S]:xS}],[0,{[E]:"VpcId",[S]:vP}],[0,{[E]:"InterfaceType",[S]:eoe}],[()=>Ole,{[E]:"Ipv4PrefixSet",[S]:$re}],[()=>Mle,{[E]:"Ipv6PrefixSet",[S]:Ure}],[()=>nae,{[E]:"ConnectionTrackingConfiguration",[S]:Sse}],[()=>am,{[E]:"Operator",[S]:im}]]],wP=[3,F,rJ,0,[CY,MY,dJ,Pk,Yee],[[0,{[E]:"CarrierIp",[S]:use}],[0,{[E]:"CustomerOwnedIp",[S]:pse}],[0,{[E]:"IpOwnerId",[S]:zre}],[0,{[E]:"PublicDnsName",[S]:Uoe}],[0,{[E]:"PublicIp",[S]:Hoe}]]],hce=[3,F,oJ,0,[Mb,nY,wf,CD,uS,tS,UD,zD],[[4,{[E]:"AttachTime",[S]:hS}],[0,{[E]:"AttachmentId",[S]:Vne}],[2,{[E]:"DeleteOnTermination",[S]:Af}],[1,{[E]:"DeviceIndex",[S]:C3}],[0,{[E]:"Status",[S]:Mf}],[1,{[E]:"NetworkCardIndex",[S]:Q3}],[()=>tce,{[E]:"EnaSrdSpecification",[S]:tre}],[1,{[E]:"EnaQueueCount",[S]:Xse}]]],pce=[3,F,aJ,0,[oY,wf,Ub,CD,qb,sk,Kb,wk,hl,Lk,Jte,nm,tY,uk,tS,ak,mJ,ik,pJ,ete,UD,$Y,zD],[[2,{[E]:"AssociatePublicIpAddress",[S]:Zne}],[2,{[E]:"DeleteOnTermination",[S]:Af}],[0,{[E]:"Description",[S]:mS}],[1,{[E]:"DeviceIndex",[S]:C3}],[()=>TP,{[S]:cS}],[1,{[E]:"Ipv6AddressCount",[S]:xre}],[()=>TS,{[E]:"Ipv6Addresses",[S]:z3}],[0,{[E]:"NetworkInterfaceId",[S]:Y3}],[0,{[E]:"PrivateIpAddress",[S]:vl}],[()=>Yle,{[E]:"PrivateIpAddresses",[S]:nP}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:yie}],[0,{[E]:"SubnetId",[S]:xS}],2,0,1,[()=>Lle,{[S]:Xb}],1,[()=>Ble,{[S]:Yb}],1,2,()=>Dae,()=>tae,1]],mce=[3,F,lJ,0,[vD],[[0,{[E]:"BandwidthWeighting",[S]:rse}]]],gce=[3,F,uJ,0,[vD],[0]],yce=[3,F,gJ,0,[hD,Uk,rS,hl],[[()=>wP,{[E]:"Association",[S]:g3}],[2,{[E]:"Primary",[S]:rP}],[0,{[E]:"PrivateDnsName",[S]:ES}],[0,{[E]:"PrivateIpAddress",[S]:vl}]]],Tv=[3,F,AJ,0,[xD,Ro],[[1,{[E]:"Code",[S]:R3}],[0,{[E]:"Name",[S]:Li}]]],vce=[3,F,xJ,0,[xo,LY,ote],[[0,{[E]:"InstanceId",[S]:SS}],[()=>Tv,{[E]:"CurrentState",[S]:bse}],[()=>Tv,{[E]:"PreviousState",[S]:Zoe}]]],bce=[3,F,ck,0,[_ne,wX,Ak,FD],[[1,{[E]:"TotalSizeInGB",[S]:Pie}],[()=>yle,{[E]:"Disks",[S]:kse}],[0,{[E]:"NvmeSupport",[S]:W3}],[0,{[E]:"EncryptionSupport",[S]:I3}]]],Sce=[3,F,MJ,0,[em,RY,ZD,rne,ene,ane,yY,Gb,Bk,r3,ja,CJ,ck,DD,xk,QD,KD,zk,rk,yW,vY,GY,iY,Ote,Pee,Nee,Ik,mk,Rk,rte,bte],[[0,{[E]:"InstanceType",[S]:U3}],[2,{[E]:"CurrentGeneration",[S]:lse}],[2,{[E]:"FreeTierEligible",[S]:k3}],[()=>rue,{[E]:"SupportedUsageClasses",[S]:_ie}],[()=>eue,{[E]:"SupportedRootDeviceTypes",[S]:vie}],[()=>iue,{[E]:"SupportedVirtualizationTypes",[S]:Eie}],[2,{[E]:"BareMetal",[S]:nse}],[0,{[E]:"Hypervisor",[S]:bS}],[()=>Vce,{[E]:"ProcessorInfo",[S]:Foe}],[()=>ile,{[E]:"VCpuInfo",[S]:$ie}],[()=>Mce,{[E]:"MemoryInfo",[S]:gl}],[2,{[E]:"InstanceStorageSupported",[S]:Vre}],[()=>bce,{[E]:"InstanceStorageInfo",[S]:qre}],[()=>xae,{[E]:"EbsInfo",[S]:Gse}],[()=>Pce,{[E]:"NetworkInfo",[S]:Ooe}],[()=>Hae,{[E]:"GpuInfo",[S]:fre}],[()=>$ae,{[E]:"FpgaInfo",[S]:are}],[()=>jce,{[E]:"PlacementGroupInfo",[S]:joe}],[()=>Xae,{[E]:"InferenceAcceleratorInfo",[S]:Rre}],[2,{[E]:"HibernationSupported",[S]:Sre}],[2,{[E]:"BurstablePerformanceSupported",[S]:sse}],[2,{[E]:"DedicatedHostsSupported",[S]:Rse}],[2,{[E]:"AutoRecoverySupported",[S]:Qne}],[()=>mle,{[E]:"SupportedBootModes",[S]:cie}],[0,{[E]:"NitroEnclavesSupport",[S]:Toe}],[0,{[E]:"NitroTpmSupport",[S]:Poe}],[()=>$ce,{[E]:"NitroTpmInfo",[S]:koe}],[()=>Ace,{[E]:"MediaAcceleratorInfo",[S]:foe}],[()=>Bce,{[E]:"NeuronInfo",[S]:Moe}],[0,{[E]:"PhcSupport",[S]:Koe}],[0,{[E]:"RebootMigrationSupport",[S]:tie}]]],_ce=[3,F,wJ,0,[Xb],[0]],wce=[3,F,EJ,0,[Yb],[0]],Ece=[3,F,KJ,0,[Ua,Ha,Lr,Wb,$J],[[0,{[E]:"KeyPairId",[S]:om}],[()=>qa,{[E]:"TagSet",[S]:Sl}],[0,{[E]:"KeyName",[S]:If}],[0,{[E]:"KeyFingerprint",[S]:_S}],[()=>Yie,{[E]:"KeyMaterial",[S]:noe}]]],xce=[3,F,VJ,0,[Ua,hk,Ha,tte,ED,Lr,Wb],[[0,{[E]:"KeyPairId",[S]:om}],[0,{[E]:"KeyType",[S]:roe}],[()=>qa,{[E]:"TagSet",[S]:Sl}],[0,{[E]:"PublicKey",[S]:qoe}],[4,{[E]:"CreateTime",[S]:x3}],[0,{[E]:"KeyName",[S]:If}],[0,{[E]:"KeyFingerprint",[S]:_S}]]],Rce=[3,F,oee,0,[see,ree,l3],[0,0,0]],Cce=[3,F,QJ,0,[pk],[[0,{[E]:"LicenseConfigurationArn",[S]:ooe}]]],Tce=[3,F,ZJ,0,[pk],[0]],Ace=[3,F,mk,0,[uD,vne],[[()=>qle,{[E]:"Accelerators",[S]:h3}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:Mie}]]],Ice=[3,F,dee,0,[Pi,Ro,Rf,ja],[[1,{[E]:"Count",[S]:Fa}],[0,{[E]:"Name",[S]:Li}],[0,{[E]:"Manufacturer",[S]:Of}],[()=>Oce,{[E]:"MemoryInfo",[S]:gl}]]],Oce=[3,F,pee,0,[pl],[[1,{[E]:"SizeInMiB",[S]:bl}]]],Mce=[3,F,ja,0,[pl],[[1,{[E]:"SizeInMiB",[S]:bl}]]],Dce=[3,F,eS,0,[ml],[[0,{[E]:"State",[S]:hP}]]],kce=[3,F,Tee,0,[tS,Tk,vk,dY,Hee,VY,vee,bee],[[1,{[E]:"NetworkCardIndex",[S]:Q3}],[0,{[E]:"NetworkPerformance",[S]:X3}],[1,{[E]:"MaximumNetworkInterfaces",[S]:G3}],[1,{[E]:"BaselineBandwidthInGbps",[S]:tse}],[1,{[E]:"PeakBandwidthInGbps",[S]:Loe}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:xse}],[1,{[E]:"MaximumEnaQueueCount",[S]:goe}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:yoe}]]],Pce=[3,F,xk,0,[Tk,vk,See,uX,Ree,wW,EW,IJ,Hb,XX,kD,qX,QX,SY,sW],[[0,{[E]:"NetworkPerformance",[S]:X3}],[1,{[E]:"MaximumNetworkInterfaces",[S]:G3}],[1,{[E]:"MaximumNetworkCards",[S]:voe}],[1,{[E]:"DefaultNetworkCardIndex",[S]:Cse}],[()=>Vle,{[E]:"NetworkCards",[S]:xoe}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:Cre}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:Tre}],[2,{[E]:"Ipv6Supported",[S]:Yre}],[0,{[E]:"EnaSupport",[S]:yS}],[2,{[E]:"EfaSupported",[S]:ore}],[()=>Tae,{[E]:"EfaInfo",[S]:Kse}],[2,{[E]:"EncryptionInTransitSupported",[S]:Vse}],[2,{[E]:"EnaSrdSupported",[S]:nre}],[()=>dle,{[E]:"BandwidthWeightings",[S]:ose}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:ire}]]],Nce=[3,F,Iee,0,[Pi,l3],[[1,{[E]:"Count",[S]:Fa}],[1,{[E]:"Version",[S]:Kie}]]],zce=[3,F,Oee,0,[Pi,Ro,AY,ja],[[1,{[E]:"Count",[S]:Fa}],[0,{[E]:"Name",[S]:Li}],[()=>Nce,{[E]:"CoreInfo",[S]:dse}],[()=>Lce,{[E]:"MemoryInfo",[S]:gl}]]],Lce=[3,F,Dee,0,[pl],[[1,{[E]:"SizeInMiB",[S]:bl}]]],Bce=[3,F,Rk,0,[kee,bne],[[()=>Gle,{[E]:"NeuronDevices",[S]:Coe}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:Die}]]],$ce=[3,F,Ik,0,[cne],[[()=>Kle,{[E]:"SupportedVersions",[S]:xie}]]],Uce=[3,F,Bee,0,[Mk],[0]],am=[3,F,$ee,0,[Eee,Mk],[[2,{[E]:"Managed",[S]:_oe}],[0,{[E]:"Principal",[S]:zoe}]]],EP=[3,F,oS,0,[kb,lY,XD,ste,pW,Ene,Dte,gW,YD,Db],[[0,{[E]:"AvailabilityZoneId",[S]:d3}],[0,{[E]:"Affinity",[S]:Jne}],[0,{[E]:"GroupName",[S]:N3}],[1,{[E]:"PartitionNumber",[S]:Goe}],[0,{[E]:"HostId",[S]:mre}],[0,{[E]:"Tenancy",[S]:Cie}],[0,{[E]:"SpreadDomain",[S]:uie}],[0,{[E]:"HostResourceGroupArn",[S]:bre}],[0,{[E]:"GroupId",[S]:P3}],[0,{[E]:"AvailabilityZone",[S]:pS}]]],jce=[3,F,zk,0,[tne],[[()=>Qle,{[E]:"SupportedStrategies",[S]:bie}]]],Hce=[3,F,Kee,0,[nk,BD,LD],[0,2,2]],Fce=[3,F,Zee,0,[nk,BD,LD],[[0,{[E]:"HostnameType",[S]:wre}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:Jse}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Wse}]]],qce=[3,F,Xee,0,[Uk,hl],[[2,{[E]:"Primary",[S]:rP}],[0,{[E]:"PrivateIpAddress",[S]:vl}]]],Vce=[3,F,Bk,0,[Ite,Mte,kte,Rf],[[()=>fle,{[E]:"SupportedArchitectures",[S]:aie}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:lie}],[()=>nue,{[E]:"SupportedFeatures",[S]:fie}],[0,{[E]:"Manufacturer",[S]:Of}]]],Gce=[3,F,Gee,0,[Fee,Vee],[[0,{[E]:"ProductCode",[S]:Boe}],[0,{[E]:"Type",[S]:gP}]]],Kce=[3,F,ute,0,[xf,ys],[[()=>Df,{[S]:xo}],[2,{[E]:"DryRun",[S]:Ls}]],1],Zce=[3,F,Rte,0,[Lee,aS,JX],[[0,{[E]:"OptInStatus",[S]:Noe}],[0,{[E]:"RegionName",[S]:sie}],[0,{[E]:"RegionEndpoint",[S]:Xoe}]]],xP=[3,F,Tte,0,[hte,sS,mte,qb,zJ],[[0,{[E]:"ReservationId",[S]:Woe}],[0,{[E]:"OwnerId",[S]:J3}],[0,{[E]:"RequesterId",[S]:eie}],[()=>CS,{[E]:"GroupSet",[S]:vS}],[()=>Dle,{[E]:"InstancesSet",[S]:rm}]]],Qce=[3,F,lte,0,[Fb],[[2,{[E]:"Enabled",[S]:M3}]],1],Yce=[3,F,fte,0,[uee,fee,Nb,Ef,em,sk,Kb,Jb,Lr,eS,oS,iS,Nte,qk,nm,Rne,ID,MD,fS,nee,nJ,zY,zb,Bb,Vb,JJ,bk,jb,kk,Sk,HY,KX,Ck,Cf,ys,FY,UW,hl,wD,iD,Ek,Qb,PD],[1,1,[()=>ple,{[S]:Pb}],0,0,1,[()=>TS,{[S]:Zb}],0,0,[()=>Qce,0],[()=>EP,0],0,[()=>TP,{[S]:cS}],[()=>tue,{[S]:Vk}],0,[()=>Qie,0],[()=>Sle,0],[()=>wle,{[S]:OD}],[()=>IS,{[S]:sm}],()=>Rce,()=>lce,()=>iae,()=>rae,()=>Xie,()=>Vae,[()=>Fle,{[S]:tee}],()=>uce,()=>Nae,()=>Hce,()=>cce,2,2,()=>gce,()=>Uce,[2,{[E]:"DryRun",[S]:Ls}],[2,{[E]:"DisableApiTermination",[S]:wse}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:Ore}],[0,{[E]:"PrivateIpAddress",[S]:vl}],[0,{[E]:"ClientToken",[Wre]:1,[S]:E3}],[0,{[E]:"AdditionalInfo",[S]:u3}],[()=>Ple,{[E]:"NetworkInterface",[S]:Ioe}],[()=>Kae,{[E]:"IamInstanceProfile",[S]:B3}],[2,{[E]:"EbsOptimized",[S]:A3}]],2],Xce=[3,F,Xte,0,[_ee,Gte,mY,$ne,PW],[0,0,1,4,0]],Wce=[3,F,Hte,0,[xf,iD,ys],[[()=>Df,{[S]:xo}],[0,{[E]:"AdditionalInfo",[S]:u3}],[2,{[E]:"DryRun",[S]:Ls}]],1],Jce=[3,F,Fte,0,[Kte],[[()=>AS,{[E]:"InstancesSet",[S]:rm}]]],RP=[3,F,lS,0,[xD,xee],[[0,{[E]:"Code",[S]:R3}],[0,{[E]:"Message",[S]:woe}]]],ele=[3,F,qte,0,[xf,vW,Zk,ys,GD],[[()=>Df,{[S]:xo}],2,2,[2,{[E]:"DryRun",[S]:Ls}],[2,{[E]:"Force",[S]:lre}]],1],tle=[3,F,Vte,0,[Qte],[[()=>AS,{[E]:"InstancesSet",[S]:rm}]]],nle=[3,F,Wk,0,[LJ,s3],[[0,{[E]:"Key",[S]:toe}],[0,{[E]:"Value",[S]:Bie}]]],sle=[3,F,sm,0,[Ete,Ha],[[0,{[E]:"ResourceType",[S]:oie}],[()=>qa,{[S]:Wk}]]],rle=[3,F,pne,0,[xf,GD,Zk,ys],[[()=>Df,{[S]:xo}],2,2,[2,{[E]:"DryRun",[S]:Ls}]],1],ole=[3,F,mne,0,[gne],[[()=>AS,{[E]:"InstancesSet",[S]:rm}]]],ile=[3,F,r3,0,[yX,qY,mX,Ine,Bne],[[1,{[E]:"DefaultVCpus",[S]:Mse}],[1,{[E]:"DefaultCores",[S]:Ese}],[1,{[E]:"DefaultThreadsPerCore",[S]:Ise}],[()=>gle,{[E]:"ValidCores",[S]:Uie}],[()=>sue,{[E]:"ValidThreadsPerCore",[S]:Gie}]]],ale=[3,F,Hne,0,[kb,nS,ine,fk,Ha,a3,oW,cee,Jk,sne,Cf,i3,Tf,lne,Gk,Db,ml,ED,fY,VD,dk],[[0,{[E]:"AvailabilityZoneId",[S]:d3}],[0,{[E]:"OutpostArn",[S]:wS}],[0,{[E]:"SourceVolumeId",[S]:wie}],[1,{[E]:"Iops",[S]:j3}],[()=>qa,{[E]:"TagSet",[S]:Sl}],[0,{[E]:"VolumeType",[S]:bP}],[2,{[E]:"FastRestored",[S]:cre}],[2,{[E]:"MultiAttachEnabled",[S]:uoe}],[1,{[E]:"Throughput",[S]:mP}],[0,{[E]:"SseType",[S]:Sie}],[()=>am,{[E]:"Operator",[S]:im}],[1,{[E]:"VolumeInitializationRate",[S]:jie}],[0,{[E]:"VolumeId",[S]:RS}],[1,{[E]:"Size",[S]:Rie}],[0,{[E]:"SnapshotId",[S]:lP}],[0,{[E]:"AvailabilityZone",[S]:pS}],[0,{[E]:"Status",[S]:Mf}],[4,{[E]:"CreateTime",[S]:x3}],[()=>aue,{[E]:"AttachmentSet",[S]:Wne}],[2,{[E]:"Encrypted",[S]:D3}],[0,{[E]:"KmsKeyId",[S]:F3}]]],cle=[3,F,Ane,0,[wf,aD,hJ,Jp,Tf,xo,_X,ml,Mb],[[2,{[E]:"DeleteOnTermination",[S]:Af}],[0,{[E]:"AssociatedResource",[S]:f3}],[0,{[E]:"InstanceOwningService",[S]:Lre}],[1,{[E]:"EbsCardIndex",[S]:gS}],[0,{[E]:"VolumeId",[S]:RS}],[0,{[E]:"InstanceId",[S]:SS}],[0,{[E]:"Device",[S]:Dse}],[0,{[E]:"Status",[S]:Mf}],[4,{[E]:"AttachTime",[S]:hS}]]],lle="unit",ule=[-3,dP,"EC2ServiceException",0,[],[]];Mt.for(dP).registerError(ule,Ob);var fle=[1,F,cY,0,[0,{[S]:je}]],dle=[1,F,bY,0,[0,{[S]:je}]],hle=[1,F,hY,0,[()=>_P,{[S]:je}]],ple=[1,F,pY,0,[()=>_P,{[S]:Pb}]],mle=[1,F,gY,0,[0,{[S]:je}]],gle=[1,F,wY,0,[1,{[S]:je}]],yle=[1,F,KY,0,[()=>_ae,{[S]:je}]],vle=[1,F,RX,0,[()=>Eae,{[S]:je}]],ble=[1,F,OX,0,[()=>Aae,{[S]:je}]],Sle=[1,F,NX,0,[()=>Iae,{[S]:je}]],_le=[1,F,BX,0,[()=>Mae,{[S]:je}]],wle=[1,F,MD,0,[()=>Oae,{[S]:je}]],Ele=[1,F,xX,0,[0,{[S]:AD}]],_l=[1,F,rW,0,[()=>zae,{[S]:Ni}]],xle=[1,F,tW,0,[()=>Lae,{[S]:je}]],Rle=[1,F,cW,0,[()=>Uae,{[S]:je}]],CS=[1,F,uW,0,[()=>Fae,{[S]:je}]],Cle=[1,F,jW,0,[0,{[S]:Ef}]],Tle=[1,F,ZW,0,[()=>Zae,{[S]:je}]],Ale=[1,F,IW,0,[()=>Wae,0]],Ile=[1,F,CW,0,[()=>sce,{[S]:je}]],Df=[1,F,HW,0,[0,{[S]:xo}]],Ole=[1,F,NW,0,[()=>rce,{[S]:je}]],TS=[1,F,kW,0,[()=>oce,{[S]:je}]],Mle=[1,F,zW,0,[()=>ice,{[S]:je}]],Dle=[1,F,YW,0,[()=>ece,{[S]:je}]],kle=[1,F,iJ,0,[()=>dce,{[S]:je}]],Ple=[1,F,cJ,0,[()=>pce,{[S]:je}]],Nle=[1,F,yJ,0,[()=>yce,{[S]:je}]],AS=[1,F,RJ,0,[()=>vce,{[S]:je}]],zle=[1,F,OJ,0,[()=>Sce,{[S]:je}]],Lle=[1,F,SJ,0,[()=>_ce,{[S]:je}]],Ble=[1,F,_J,0,[()=>wce,{[S]:je}]],$le=[1,F,UJ,0,[0,{[S]:Lr}]],Ule=[1,F,FJ,0,[0,{[S]:Ua}]],jle=[1,F,GJ,0,[()=>xce,{[S]:je}]],Hle=[1,F,XJ,0,[()=>Cce,{[S]:je}]],Fle=[1,F,eee,0,[()=>Tce,{[S]:je}]],qle=[1,F,hee,0,[()=>Ice,{[S]:je}]],Vle=[1,F,Cee,0,[()=>kce,{[S]:je}]],Gle=[1,F,Mee,0,[()=>zce,{[S]:je}]],Kle=[1,F,zee,0,[0,{[S]:je}]],Zle=[1,F,Uee,0,[0,{[S]:Ok}]],Qle=[1,F,Qee,0,[0,{[S]:je}]],Yle=[1,F,Wee,0,[()=>qce,{[S]:je}]],CP=[1,F,qee,0,[()=>Gce,{[S]:je}]],Xle=[1,F,yte,0,[()=>Zce,{[S]:je}]],Wle=[1,F,_te,0,[0,{[S]:aS}]],Jle=[1,F,vte,0,[()=>xP,{[S]:je}]],eue=[1,F,cte,0,[0,{[S]:je}]],TP=[1,F,Pte,0,[0,{[S]:cS}]],tue=[1,F,zte,0,[0,{[S]:Vk}]],nue=[1,F,Ate,0,[0,{[S]:je}]],qa=[1,F,yne,0,[()=>nle,{[S]:je}]],IS=[1,F,wne,0,[()=>sle,{[S]:je}]],sue=[1,F,Sne,0,[1,{[S]:je}]],rue=[1,F,xne,0,[0,{[S]:je}]],oue=[1,F,Nne,0,[0,{[S]:je}]],iue=[1,F,Lne,0,[0,{[S]:je}]],aue=[1,F,Tne,0,[()=>cle,{[S]:je}]],cue=[1,F,One,0,[0,{[S]:Tf}]],lue=[1,F,Dne,0,[()=>ale,{[S]:je}]],uue=[1,F,Fne,0,[0,{[S]:je}]],Dye=[9,F,IY,0,()=>oae,()=>Ece],kye=[9,F,rX,0,()=>aae,()=>cae],fue=[9,F,tX,0,()=>lae,()=>uae],due=[9,F,nX,0,()=>fae,()=>dae],hue=[9,F,eX,0,()=>hae,()=>pae],pue=[9,F,lX,0,()=>mae,()=>gae],mue=[9,F,pX,0,()=>yae,()=>vae],gue=[9,F,SX,0,()=>bae,()=>Sae],Pye=[9,F,qW,0,()=>Qae,()=>Yae],Nye=[9,F,pte,0,()=>Kce,()=>lle],zye=[9,F,gte,0,()=>Yce,()=>xP],Lye=[9,F,Zte,0,()=>Wce,()=>Jce],Bye=[9,F,Yte,0,()=>ele,()=>tle],$ye=[9,F,dne,0,()=>rle,()=>ole];class AP extends zr.classBuilder().ep(ul).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(fue).build(){}class IP extends zr.classBuilder().ep(ul).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(due).build(){}class yue extends zr.classBuilder().ep(ul).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(hue).build(){}class OP extends zr.classBuilder().ep(ul).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(pue).build(){}class vue extends zr.classBuilder().ep(ul).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(mue).build(){}class MP extends zr.classBuilder().ep(ul).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(gue).build(){}function bue(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&On.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 Sue={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},_ue=e=>({applyToStack:t=>{t.add(bue(e),Sue)}}),DP={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},wue=DP.WHEN_SUPPORTED,Uye={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},Eue=DP.WHEN_SUPPORTED;var Av;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(Av||(Av={}));var fT;(function(e){e.HEADER="header",e.TRAILER="trailer"})(fT||(fT={}));const jye=Av.CRC32;var Hye=(function(){function e(){this.crc32=new mp}return e.prototype.update=function(t){pp(t)||this.crc32.update(Pa(t))},e.prototype.digest=function(){return KM(this,void 0,void 0,function(){return ZM(this,function(t){return[2,AQ(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new mp},e})(),mp=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=kQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^Rue[(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})(),xue=[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],Rue=IQ(xue);const Cue=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ps(t??wue),responseChecksumValidation:Ps(n??Eue),requestStreamBufferSize:Number(r??0)})},Tue=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}},Aue={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Iue(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 Oue={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Mue=e=>({applyToStack:t=>{t.add(Iue(e),Oue),t.addRelativeTo(Tue(e),Aue)}});class OS{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+OS.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 w0(Promise.resolve(h)))})),l)):i.set(r,new w0(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 Due="Directory",kue="S3Express",Pue="sigv4-s3express",Nue="X-Amz-S3session-Token",zue=Nue.toLowerCase(),Lue=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===Pue;if((i.properties?.backend===kue||i.properties?.bucketType===Due)&&(yr(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,On.isInstance(r.request)&&d.sessionToken&&(r.request.headers[zue]=d.sessionToken)}}}return t(r)},Bue={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},$ue=e=>({applyToStack:t=>{t.add(Lue(e),Bue)}}),Uue=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},jue=e=>t=>{throw t},Hue=(e,t)=>{},Fue=e=>(t,n)=>async r=>{if(!On.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 Uue(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||jue)(l));return(d.successHandler||Hue)(y.response,l),y},que=e=>({applyToStack:t=>{t.addRelativeTo(Fue(e),NO)}}),Vue=(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 MS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},Gue={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Kue=3e3,Zue=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!Da.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 fG(f)),c.body=y;const g=await Que(h,{streamCollector:async b=>rG(b,Kue)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&Gue[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},Que=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Yue={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},DS=e=>({applyToStack:t=>{t.addRelativeTo(Zue(e),Yue)}}),Xue=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Wue(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 Jue={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function efe({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!Xue(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const tfe={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},nfe=e=>({applyToStack:t=>{t.add(efe(e),tfe),t.addRelativeTo(Wue(e),Jue)}}),sfe=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),Iv="X-Amz-S3session-Token",dT=Iv.toLowerCase();class rfe extends Ev{async signWithCredentials(t,n,r){const i=hT(n);t.headers[dT]=n.sessionToken;const c=this;return pT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=hT(n);return delete t.headers[dT],t.headers[Iv]=n.sessionToken,t.query=t.query??{},t.query[Iv]=n.sessionToken,pT(this,i),this.presign(t,r)}}function hT(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function pT(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 kP{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new rfe(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 kS="required",M="type",ce="rules",L="conditions",ee="fn",te="argv",ke="ref",We="assign",we="url",Ee="properties",po="backend",In="authSchemes",fn="disableDoubleEncoding",dn="signingName",Bn="signingRegion",xe="headers",PS="signingRegionSet",ofe=6,ife=!1,Rr=!0,Ds="isSet",tn="booleanEquals",Ae="error",gp="aws.partition",pt="stringEquals",qt="getAttr",Gt="name",kt="substring",mT="bucketSuffix",NS="parseURL",me="endpoint",ue="tree",yp="aws.isVirtualHostableS3Bucket",vp="{url#scheme}://{Bucket}.{url#authority}{url#path}",Dr="not",gT="accessPointSuffix",Nh="{url#scheme}://{url#authority}{url#path}",PP="hardwareType",NP="regionPrefix",yT="bucketAliasSuffix",Ov="outpostId",Va="isValidHostLabel",zS="sigv4a",pf="s3-outposts",sl="s3",zP="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",LP="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",vT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",BP="aws.parseArn",$P="bucketArn",UP="arnType",bp="",LS="s3-object-lambda",jP="accesspoint",BS="accessPointName",bT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",ST="mrapPartition",_T="outpostType",wT="arnPrefix",HP="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",ET="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",xT="https://s3.{partitionResult#dnsSuffix}",Nc={[kS]:!1,[M]:"string"},zc={[kS]:!0,default:!1,[M]:"boolean"},ku={[kS]:!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"}]},FP={[ee]:gp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},RT={[ee]:pt,[te]:[{[ee]:qt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Gu={[ee]:Ds,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},CT={[L]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},TT={[L]:[Jt,{[ee]:NS,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[L]:[{[ee]:Ds,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:tn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[L]:[{[ee]:tn,[te]:[{[ee]:qt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[we]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:yp,[te]:[dt,!1]}],[ce]:[{[me]:{[we]:vp,[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[L]:[{[ee]:tn,[te]:[{[ee]:qt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[we]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:yp,[te]:[dt,!1]}],[ce]:[{[me]:{[we]:vp,[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},Jn={[ee]:NS,[te]:[{[ke]:"Endpoint"}],[We]:"url"},E0={[ee]:tn,[te]:[{[ee]:qt,[te]:[{[ke]:"url"},"isIp"]},!0]},qP={[ke]:"url"},VP={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Is={[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:"s3express",[Bn]:"{Region}"}]},qe={},GP={[ee]:yp,[te]:[dt,!1]},AT={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},IT={[ee]:Ds,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},OT={[ee]:tn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Dr,[te]:[Jt]},rt={[ee]:tn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:tn,[te]:[{[ke]:"UseFIPS"},!1]},wh={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},MT={[ee]:Dr,[te]:[Gu]},DT={[ke]:PP},kT={[L]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Eh={[In]:[{[fn]:!0,[Gt]:zS,[dn]:pf,[PS]:["*"]},{[fn]:!0,[Gt]:"sigv4",[dn]:pf,[Bn]:"{Region}"}]},x0={[ee]:tn,[te]:[{[ke]:"ForcePathStyle"},!1]},afe={[ke]:"ForcePathStyle"},ln={[ee]:tn,[te]:[{[ke]:"Accelerate"},!1]},Sn={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Cn={[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:sl,[Bn]:"us-east-1"}]},lt={[ee]:Dr,[te]:[Sn]},Tn={[ee]:tn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},PT={[we]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:sl,[Bn]:"{Region}"}]},[xe]:{}},pn={[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:sl,[Bn]:"{Region}"}]},An={[ee]:tn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},NT={[we]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},zT={[we]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},LT={[we]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},R0={[ee]:tn,[te]:[{[ee]:qt,[te]:[qP,"isIp"]},!1]},C0={[we]:zP,[Ee]:pn,[xe]:{}},Mv={[we]:vp,[Ee]:pn,[xe]:{}},BT={[me]:Mv,[M]:me},T0={[we]:LP,[Ee]:pn,[xe]:{}},$T={[we]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},xh={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},ds={[ke]:$P},KP={[ke]:UP},A0={[ee]:qt,[te]:[ds,"service"]},$S={[ke]:BS},UT={[L]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},jT={[L]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},HT={[L]:[{[ee]:Ds,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:tn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},I0={[L]:[{[ee]:Ds,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:tn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Dr,[te]:[{[ee]:pt,[te]:[{[ee]:qt,[te]:[ds,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},ZP={[ee]:qt,[te]:[{[ke]:"bucketPartition"},Gt]},QP={[ee]:qt,[te]:[ds,"accountId"]},O0={[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:LS,[Bn]:"{bucketArn#region}"}]},FT={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},M0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},D0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},k0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},qT={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},VT={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},Pu={[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:sl,[Bn]:"{bucketArn#region}"}]},GT={[In]:[{[fn]:!0,[Gt]:zS,[dn]:pf,[PS]:["*"]},{[fn]:!0,[Gt]:"sigv4",[dn]:pf,[Bn]:"{bucketArn#region}"}]},KT={[ee]:BP,[te]:[dt]},ZT={[we]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},QT={[we]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},YT={[we]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},P0={[we]:HP,[Ee]:pn,[xe]:{}},XT={[we]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:pn,[xe]:{}},WT={[ke]:"UseObjectLambdaEndpoint"},N0={[In]:[{[fn]:!0,[Gt]:"sigv4",[dn]:LS,[Bn]:"{Region}"}]},JT={[we]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},eA={[we]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},tA={[we]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},z0={[we]:Nh,[Ee]:pn,[xe]:{}},nA={[we]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[Ee]:pn,[xe]:{}},L0=[{[ke]:"Region"}],cfe=[{[ke]:"Endpoint"}],lfe=[dt],B0=[tr],Lc=[Jt,Jn],sA=[{[ee]:Ds,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:tn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],ufe=[VP],$0=[GP],Js=[FP],U0=[Nt,Ot],Ku=[Nt,rt],Zu=[et,Ot],Qu=[et,rt],rA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Cr=[{[L]:[Nt,Ot],[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:{}},[M]:me},{[L]:Ku,[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:{}},[M]:me},{[L]:Zu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:{}},[M]:me},{[L]:Qu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:{}},[M]:me}],oA=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],iA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],aA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],cA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Tr=[{[L]:[Nt,Ot],[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me},{[L]:Ku,[me]:{[we]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me},{[L]:Zu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me},{[L]:Qu,[me]:{[we]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[Ee]:{[po]:"S3Express",[In]:[{[fn]:!0,[Gt]:"sigv4-s3express",[dn]:"s3express",[Bn]:"{Region}"}]},[xe]:{}},[M]:me}],lA=[dt,0,7,!0],uA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],fA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],dA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],hA=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],pA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],ffe=[Gu],mA=[{[ee]:Va,[te]:[{[ke]:Ov},!1]}],gA=[{[ee]:pt,[te]:[{[ke]:NP},"beta"]}],dfe=["*"],yA=[{[ee]:Va,[te]:[{[ke]:"Region"},!1]}],fi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],j0=[{[ee]:pt,[te]:[KP,jP]}],vA=[{[ee]:qt,[te]:[ds,"resourceId[1]"],[We]:BS},{[ee]:Dr,[te]:[{[ee]:pt,[te]:[$S,bp]}]}],hfe=[ds,"resourceId[1]"],bA=[Ot],H0=[{[ee]:Dr,[te]:[{[ee]:pt,[te]:[{[ee]:qt,[te]:[ds,"region"]},bp]}]}],SA=[{[ee]:Dr,[te]:[{[ee]:Ds,[te]:[{[ee]:qt,[te]:[ds,"resourceId[2]"]}]}]}],pfe=[ds,"resourceId[2]"],F0=[{[ee]:gp,[te]:[{[ee]:qt,[te]:[ds,"region"]}],[We]:"bucketPartition"}],_A=[{[ee]:pt,[te]:[ZP,{[ee]:qt,[te]:[{[ke]:"partitionResult"},Gt]}]}],q0=[{[ee]:Va,[te]:[{[ee]:qt,[te]:[ds,"region"]},!0]}],V0=[{[ee]:Va,[te]:[QP,!1]}],wA=[{[ee]:Va,[te]:[$S,!1]}],Rh=[Nt],EA=[{[ee]:Va,[te]:[{[ke]:"Region"},!0]}],mfe={parameters:{Bucket:Nc,Region:Nc,UseFIPS:zc,UseDualStack:zc,Endpoint:Nc,ForcePathStyle:zc,Accelerate:zc,UseGlobalEndpoint:zc,UseObjectLambdaEndpoint:ku,Key:Nc,Prefix:Nc,CopySource:Nc,DisableAccessPoints:ku,DisableMultiRegionAccessPoints:zc,UseArnRegion:ku,UseS3ExpressControlEndpoint:ku,DisableS3ExpressSessionAuth:ku},[ce]:[{[L]:[{[ee]:Ds,[te]:L0}],[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,FP,RT],error:"Partition does not support FIPS",[M]:Ae},{[L]:[Gu,{[ee]:kt,[te]:[dt,0,ofe,Rr],[We]:mT},{[ee]:pt,[te]:[{[ke]:mT},"--x-s3"]}],[ce]:[CT,TT,{[L]:[IT,OT],[ce]:[{[L]:Js,[ce]:[{[L]:[VP,Ke],[ce]:[{[L]:U0,endpoint:{[we]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Is,[xe]:qe},[M]:me},{[L]:Ku,endpoint:{[we]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Is,[xe]:qe},[M]:me},{[L]:Zu,endpoint:{[we]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Is,[xe]:qe},[M]:me},{[L]:Qu,endpoint:{[we]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Is,[xe]:qe},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:$0,[ce]:[{[L]:Js,[ce]:[{[L]:sA,[ce]:[{[L]:rA,[ce]:Cr,[M]:ue},{[L]:oA,[ce]:Cr,[M]:ue},{[L]:iA,[ce]:Cr,[M]:ue},{[L]:aA,[ce]:Cr,[M]:ue},{[L]:cA,[ce]:Cr,[M]:ue},wh],[M]:ue},{[L]:rA,[ce]:Tr,[M]:ue},{[L]:oA,[ce]:Tr,[M]:ue},{[L]:iA,[ce]:Tr,[M]:ue},{[L]:aA,[ce]:Tr,[M]:ue},{[L]:cA,[ce]:Tr,[M]:ue},wh],[M]:ue}],[M]:ue},AT],[M]:ue},{[L]:[Gu,{[ee]:kt,[te]:lA,[We]:gT},{[ee]:pt,[te]:[{[ke]:gT},"--xa-s3"]}],[ce]:[CT,TT,{[L]:$0,[ce]:[{[L]:Js,[ce]:[{[L]:sA,[ce]:[{[L]:uA,[ce]:Cr,[M]:ue},{[L]:fA,[ce]:Cr,[M]:ue},{[L]:dA,[ce]:Cr,[M]:ue},{[L]:hA,[ce]:Cr,[M]:ue},{[L]:pA,[ce]:Cr,[M]:ue},wh],[M]:ue},{[L]:uA,[ce]:Tr,[M]:ue},{[L]:fA,[ce]:Tr,[M]:ue},{[L]:dA,[ce]:Tr,[M]:ue},{[L]:hA,[ce]:Tr,[M]:ue},{[L]:pA,[ce]:Tr,[M]:ue},wh],[M]:ue}],[M]:ue},AT],[M]:ue},{[L]:[MT,IT,OT],[ce]:[{[L]:Js,[ce]:[{[L]:Lc,endpoint:{[we]:Nh,[Ee]:Is,[xe]:qe},[M]:me},{[L]:U0,endpoint:{[we]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:qe},[M]:me},{[L]:Ku,endpoint:{[we]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:qe},[M]:me},{[L]:Zu,endpoint:{[we]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:qe},[M]:me},{[L]:Qu,endpoint:{[we]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[Ee]:Is,[xe]:qe},[M]:me}],[M]:ue}],[M]:ue},{[L]:[Gu,{[ee]:kt,[te]:[dt,49,50,Rr],[We]:PP},{[ee]:kt,[te]:[dt,8,12,Rr],[We]:NP},{[ee]:kt,[te]:lA,[We]:yT},{[ee]:kt,[te]:[dt,32,49,Rr],[We]:Ov},{[ee]:gp,[te]:L0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:yT},"--op-s3"]}],[ce]:[{[L]:mA,[ce]:[{[L]:$0,[ce]:[{[L]:[{[ee]:pt,[te]:[DT,"e"]}],[ce]:[{[L]:gA,[ce]:[kT,{[L]:Lc,endpoint:{[we]:"https://{Bucket}.ec2.{url#authority}",[Ee]:Eh,[xe]:qe},[M]:me}],[M]:ue},{endpoint:{[we]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[Ee]:Eh,[xe]:qe},[M]:me}],[M]:ue},{[L]:[{[ee]:pt,[te]:[DT,"o"]}],[ce]:[{[L]:gA,[ce]:[kT,{[L]:Lc,endpoint:{[we]:"https://{Bucket}.op-{outpostId}.{url#authority}",[Ee]:Eh,[xe]:qe},[M]:me}],[M]:ue},{endpoint:{[we]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[Ee]:Eh,[xe]:qe},[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]:ffe,[ce]:[{[L]:[Jt,{[ee]:Dr,[te]:[{[ee]:Ds,[te]:[{[ee]:NS,[te]:cfe}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[L]:[x0,GP],[ce]:[{[L]:Js,[ce]:[{[L]:yA,[ce]:[{[L]:[tr,RT],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[L]:[Ot,Nt,ln,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,Nt,ln,Ke,lt,Tn],[ce]:[{endpoint:PT,[M]:me}],[M]:ue},{[L]:[Ot,Nt,ln,Ke,lt,An],endpoint:PT,[M]:me},{[L]:[rt,Nt,ln,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Nt,ln,Ke,lt,Tn],[ce]:[{endpoint:NT,[M]:me}],[M]:ue},{[L]:[rt,Nt,ln,Ke,lt,An],endpoint:NT,[M]:me},{[L]:[Ot,et,tr,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,et,tr,Ke,lt,Tn],[ce]:[{endpoint:zT,[M]:me}],[M]:ue},{[L]:[Ot,et,tr,Ke,lt,An],endpoint:zT,[M]:me},{[L]:[Ot,et,ln,Ke,Sn],endpoint:{[we]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,et,ln,Ke,lt,Tn],[ce]:[{endpoint:LT,[M]:me}],[M]:ue},{[L]:[Ot,et,ln,Ke,lt,An],endpoint:LT,[M]:me},{[L]:[rt,et,ln,Jt,Jn,E0,Sn],endpoint:{[we]:zP,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,ln,Jt,Jn,R0,Sn],endpoint:{[we]:vp,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,ln,Jt,Jn,E0,lt,Tn],[ce]:[{[L]:fi,endpoint:C0,[M]:me},{endpoint:C0,[M]:me}],[M]:ue},{[L]:[rt,et,ln,Jt,Jn,R0,lt,Tn],[ce]:[{[L]:fi,endpoint:Mv,[M]:me},BT],[M]:ue},{[L]:[rt,et,ln,Jt,Jn,E0,lt,An],endpoint:C0,[M]:me},{[L]:[rt,et,ln,Jt,Jn,R0,lt,An],endpoint:Mv,[M]:me},{[L]:[rt,et,tr,Ke,Sn],endpoint:{[we]:LP,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,tr,Ke,lt,Tn],[ce]:[{[L]:fi,endpoint:T0,[M]:me},{endpoint:T0,[M]:me}],[M]:ue},{[L]:[rt,et,tr,Ke,lt,An],endpoint:T0,[M]:me},{[L]:[rt,et,ln,Ke,Sn],endpoint:{[we]:vT,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,et,ln,Ke,lt,Tn],[ce]:[{[L]:fi,endpoint:{[we]:vT,[Ee]:pn,[xe]:qe},[M]:me},{endpoint:$T,[M]:me}],[M]:ue},{[L]:[rt,et,ln,Ke,lt,An],endpoint:$T,[M]:me}],[M]:ue},xh],[M]:ue}],[M]:ue},{[L]:[Jt,Jn,{[ee]:pt,[te]:[{[ee]:qt,[te]:[qP,"scheme"]},"http"]},{[ee]:yp,[te]:[dt,Rr]},x0,et,rt,ln],[ce]:[{[L]:Js,[ce]:[{[L]:yA,[ce]:[BT],[M]:ue},xh],[M]:ue}],[M]:ue},{[L]:[x0,{[ee]:BP,[te]:lfe,[We]:$P}],[ce]:[{[L]:[{[ee]:qt,[te]:[ds,"resourceId[0]"],[We]:UP},{[ee]:Dr,[te]:[{[ee]:pt,[te]:[KP,bp]}]}],[ce]:[{[L]:[{[ee]:pt,[te]:[A0,LS]}],[ce]:[{[L]:j0,[ce]:[{[L]:vA,[ce]:[UT,jT,{[L]:H0,[ce]:[HT,{[L]:SA,[ce]:[I0,{[L]:F0,[ce]:[{[L]:Js,[ce]:[{[L]:_A,[ce]:[{[L]:q0,[ce]:[{[L]:[{[ee]:pt,[te]:[QP,bp]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[L]:V0,[ce]:[{[L]:wA,[ce]:[{[L]:Lc,endpoint:{[we]:bT,[Ee]:O0,[xe]:qe},[M]:me},{[L]:Rh,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:O0,[xe]:qe},[M]:me},{endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:O0,[xe]:qe},[M]:me}],[M]:ue},FT],[M]:ue},M0],[M]:ue},D0],[M]:ue},k0],[M]:ue}],[M]:ue}],[M]:ue},qT],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},VT],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[L]:j0,[ce]:[{[L]:vA,[ce]:[{[L]:H0,[ce]:[{[L]:j0,[ce]:[{[L]:H0,[ce]:[HT,{[L]:SA,[ce]:[I0,{[L]:F0,[ce]:[{[L]:Js,[ce]:[{[L]:[{[ee]:pt,[te]:[ZP,"{partitionResult#name}"]}],[ce]:[{[L]:q0,[ce]:[{[L]:[{[ee]:pt,[te]:[A0,sl]}],[ce]:[{[L]:V0,[ce]:[{[L]:wA,[ce]:[{[L]:B0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[L]:U0,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Pu,[xe]:qe},[M]:me},{[L]:Ku,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Pu,[xe]:qe},[M]:me},{[L]:Zu,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Pu,[xe]:qe},[M]:me},{[L]:[et,rt,Jt,Jn],endpoint:{[we]:bT,[Ee]:Pu,[xe]:qe},[M]:me},{[L]:Qu,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:Pu,[xe]:qe},[M]:me}],[M]:ue},FT],[M]:ue},M0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},D0],[M]:ue},k0],[M]:ue}],[M]:ue}],[M]:ue},qT],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Va,[te]:[$S,Rr]}],[ce]:[{[L]:bA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[L]:Rh,error:"S3 MRAP does not support FIPS",[M]:Ae},{[L]:B0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:tn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Rr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[L]:[{[ee]:gp,[te]:L0,[We]:ST}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ee]:qt,[te]:[{[ke]:ST},Gt]},{[ee]:qt,[te]:[ds,"partition"]}]}],[ce]:[{endpoint:{[we]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[Ee]:{[In]:[{[fn]:Rr,name:zS,[dn]:sl,[PS]:dfe}]},[xe]:qe},[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},VT],[M]:ue},{[L]:[{[ee]:pt,[te]:[A0,pf]}],[ce]:[{[L]:bA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[L]:Rh,error:"S3 Outposts does not support FIPS",[M]:Ae},{[L]:B0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:Ds,[te]:[{[ee]:qt,[te]:[ds,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[L]:[{[ee]:qt,[te]:hfe,[We]:Ov}],[ce]:[{[L]:mA,[ce]:[I0,{[L]:F0,[ce]:[{[L]:Js,[ce]:[{[L]:_A,[ce]:[{[L]:q0,[ce]:[{[L]:V0,[ce]:[{[L]:[{[ee]:qt,[te]:pfe,[We]:_T}],[ce]:[{[L]:[{[ee]:qt,[te]:[ds,"resourceId[3]"],[We]:BS}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ke]:_T},jP]}],[ce]:[{[L]:Lc,endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[Ee]:GT,[xe]:qe},[M]:me},{endpoint:{[we]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Ee]:GT,[xe]:qe},[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},M0],[M]:ue},D0],[M]:ue},k0],[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,ife],[We]:wT},{[ee]:pt,[te]:[{[ke]:wT},"arn:"]},{[ee]:Dr,[te]:[{[ee]:Ds,[te]:[KT]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[L]:[{[ee]:tn,[te]:[afe,Rr]},KT],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[L]:ufe,[ce]:[{[L]:Js,[ce]:[{[L]:[ln],[ce]:[{[L]:[Ot,Ke,Nt,Sn],endpoint:{[we]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,Ke,Nt,lt,Tn],[ce]:[{endpoint:ZT,[M]:me}],[M]:ue},{[L]:[Ot,Ke,Nt,lt,An],endpoint:ZT,[M]:me},{[L]:[rt,Ke,Nt,Sn],endpoint:{[we]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Ke,Nt,lt,Tn],[ce]:[{endpoint:QT,[M]:me}],[M]:ue},{[L]:[rt,Ke,Nt,lt,An],endpoint:QT,[M]:me},{[L]:[Ot,Ke,et,Sn],endpoint:{[we]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Ot,Ke,et,lt,Tn],[ce]:[{endpoint:YT,[M]:me}],[M]:ue},{[L]:[Ot,Ke,et,lt,An],endpoint:YT,[M]:me},{[L]:[rt,Jt,Jn,et,Sn],endpoint:{[we]:HP,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Jt,Jn,et,lt,Tn],[ce]:[{[L]:fi,endpoint:P0,[M]:me},{endpoint:P0,[M]:me}],[M]:ue},{[L]:[rt,Jt,Jn,et,lt,An],endpoint:P0,[M]:me},{[L]:[rt,Ke,et,Sn],endpoint:{[we]:ET,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[rt,Ke,et,lt,Tn],[ce]:[{[L]:fi,endpoint:{[we]:ET,[Ee]:pn,[xe]:qe},[M]:me},{endpoint:XT,[M]:me}],[M]:ue},{[L]:[rt,Ke,et,lt,An],endpoint:XT,[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]:[WT]},{[ee]:tn,[te]:[WT,Rr]}],[ce]:[{[L]:Js,[ce]:[{[L]:EA,[ce]:[UT,jT,{[L]:Lc,endpoint:{[we]:Nh,[Ee]:N0,[xe]:qe},[M]:me},{[L]:Rh,endpoint:{[we]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[Ee]:N0,[xe]:qe},[M]:me},{endpoint:{[we]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[Ee]:N0,[xe]:qe},[M]:me}],[M]:ue},xh],[M]:ue}],[M]:ue},{[L]:[MT],[ce]:[{[L]:Js,[ce]:[{[L]:EA,[ce]:[{[L]:[Nt,Ot,Ke,Sn],endpoint:{[we]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Nt,Ot,Ke,lt,Tn],[ce]:[{endpoint:JT,[M]:me}],[M]:ue},{[L]:[Nt,Ot,Ke,lt,An],endpoint:JT,[M]:me},{[L]:[Nt,rt,Ke,Sn],endpoint:{[we]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[Nt,rt,Ke,lt,Tn],[ce]:[{endpoint:eA,[M]:me}],[M]:ue},{[L]:[Nt,rt,Ke,lt,An],endpoint:eA,[M]:me},{[L]:[et,Ot,Ke,Sn],endpoint:{[we]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[et,Ot,Ke,lt,Tn],[ce]:[{endpoint:tA,[M]:me}],[M]:ue},{[L]:[et,Ot,Ke,lt,An],endpoint:tA,[M]:me},{[L]:[et,rt,Jt,Jn,Sn],endpoint:{[we]:Nh,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[et,rt,Jt,Jn,lt,Tn],[ce]:[{[L]:fi,endpoint:z0,[M]:me},{endpoint:z0,[M]:me}],[M]:ue},{[L]:[et,rt,Jt,Jn,lt,An],endpoint:z0,[M]:me},{[L]:[et,rt,Ke,Sn],endpoint:{[we]:xT,[Ee]:Cn,[xe]:qe},[M]:me},{[L]:[et,rt,Ke,lt,Tn],[ce]:[{[L]:fi,endpoint:{[we]:xT,[Ee]:pn,[xe]:qe},[M]:me},{endpoint:nA,[M]:me}],[M]:ue},{[L]:[et,rt,Ke,lt,An],endpoint:nA,[M]:me}],[M]:ue},xh],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},gfe=mfe,yfe=new WO({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),YP=(e,t={})=>yfe.get(e,()=>lM(gfe,{endpointParams:e,logger:t.logger}));lf.aws=wb;const vfe=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 LM(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},bfe=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`")})()}),Sfe=vfe(bfe);function XP(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function WP(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const _fe=(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(kP.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},wfe=e=>{const t=[];switch(e.operation){default:t.push(XP(e)),t.push(WP(e))}return t},Efe=_fe(YP,wfe,{"aws.auth#sigv4":XP,"aws.auth#sigv4a":WP}),xfe=e=>{const t=bM(e),n=zK(t);return Object.assign(n,{authSchemePreference:Ps(e.authSchemePreference??[])})},Rfe=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??{}}),US={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 _a{constructor(t){super(t),Object.setPrototypeOf(this,Un.prototype)}}class jS extends Un{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,jS.prototype)}}class HS extends Un{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,HS.prototype)}}class FS extends Un{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,FS.prototype)}}class qS extends Un{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,qS.prototype)}}class VS extends Un{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,VS.prototype)}}class GS extends Un{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,GS.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class KS extends Un{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,KS.prototype)}}class ZS extends Un{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,ZS.prototype)}}class QS extends Un{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,QS.prototype)}}class YS extends Un{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,YS.prototype)}}class XS extends Un{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,XS.prototype)}}class WS extends Un{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,WS.prototype)}}class JS extends Un{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,JS.prototype)}}class e_ extends Un{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,e_.prototype)}}const JP="ACL",Cfe="AbortDate",xA="AccessKeyId",Tfe="AbortMultipartUpload",Afe="AbortMultipartUploadOutput",Ife="AbortMultipartUploadRequest",Ofe="AcceptRanges",Mfe="AbortRuleId",Dfe="AccessTier",ms="Bucket",kfe="BucketArn",Pfe="BucketAlreadyExists",Nfe="BucketAlreadyOwnedByYou",zfe="BypassGovernanceRetention",Co="BucketKeyEnabled",eN="BucketRegion",t_="Body",tN="Buckets",kf="ChecksumAlgorithm",n_="CacheControl",Bi="ChecksumCRC32",$i="ChecksumCRC32C",Ui="ChecksumCRC64NVME",s_="Cache-Control",Lfe="CreationDate",r_="Content-Disposition",o_="ContentDisposition",i_="Content-Encoding",a_="ContentEncoding",c_="ContentLanguage",l_="Content-Language",u_="Content-Length",f_="ContentLength",nN="Content-MD5",sN="ContentMD5",Bfe="CompletedMultipartUpload",$fe="CompleteMultipartUploadOutput",Ufe="CreateMultipartUploadOutput",jfe="CompleteMultipartUploadResult",Hfe="CompleteMultipartUploadRequest",Ffe="CreateMultipartUploadRequest",rN="CompleteMultipartUpload",qfe="CreateMultipartUpload",Vfe="ChecksumMode",Gfe="CommonPrefix",Kfe="CommonPrefixList",Zfe="CompletedPartList",Qfe="CompletedPart",Yfe="CommonPrefixes",Xfe="ContentRange",Wfe="Content-Range",ji="ChecksumSHA1",Hi="ChecksumSHA256",Jfe="CreateSessionOutput",ede="CreateSessionResult",tde="CreateSessionRequest",nde="CreateSession",Ga="ChecksumType",d_="Content-Type",h_="ContentType",cm="ContinuationToken",sde="Contents",RA="Credentials",oN="DeleteMarker",rde="DisplayName",ode="DeleteObjectOutput",ide="DeleteObjectRequest",ade="DeleteObject",iN="Delimiter",mf="Expiration",Fi="ExpectedBucketOwner",CA="ExpiresString",cde="EncryptionTypeMismatch",So="ETag",aN="EncodingType",rl="Expires",lde="FetchOwner",cN="GrantFullControl",ude="GetObject",fde="GetObjectOutput",dde="GetObjectRequest",lN="GrantRead",uN="GrantReadACP",fN="GrantWriteACP",hde="ID",lm="IfMatch",pde="IfMatchInitiatedTime",mde="IfMatchLastModifiedTime",gde="IfMatchSize",yde="If-Modified-Since",vde="IfModifiedSince",bde="InitiateMultipartUploadResult",um="If-Match",p_="IfNoneMatch",m_="If-None-Match",Sde="InvalidObjectState",_de="IdempotencyParameterMismatch",wde="InvalidRequest",Ede="IsRestoreInProgress",xde="IsTruncated",Rde="IfUnmodifiedSince",Cde="If-Unmodified-Since",Tde="InvalidWriteOffset",Br="Key",Ade="KeyCount",Ide="Location",Ode="ListAllMyBucketsResult",Mde="ListBuckets",Dde="ListBucketsOutput",kde="ListBucketsRequest",Pde="ListBucketResult",dN="LastModified",Nde="Last-Modified",zde="ListObjectsV2",Lde="ListObjectsV2Output",Bde="ListObjectsV2Request",g_="Metadata",$de="MaxBuckets",Ude="MFA",hN="MaxKeys",jde="MissingMeta",Hde="MpuObjectSize",Fde="MultipartUpload",pN="Name",qde="NextContinuationToken",Vde="NotFound",Gde="NoSuchBucket",Kde="NoSuchKey",Zde="NoSuchUpload",y_="Owner",Qde="ObjectAlreadyInActiveTierError",v_="ObjectLockLegalHoldStatus",b_="ObjectLockMode",S_="ObjectLockRetainUntilDate",Yde="ObjectList",Xde="ObjectNotInActiveTierError",Wde="OptionalObjectAttributes",Jde="Object",Pf="Prefix",ehe="PartsCount",__="PartNumber",the="PutObject",nhe="PutObjectOutput",she="PutObjectRequest",rhe="Parts",ohe="Part",qi="RequestCharged",ihe="ResponseCacheControl",ahe="ResponseContentDisposition",che="ResponseContentEncoding",lhe="ResponseContentLanguage",uhe="ResponseContentType",fhe="ResponseExpires",dhe="RestoreExpiryDate",Vi="RequestPayer",hhe="ReplicationStatus",mN="RestoreStatus",TA="Range",phe="Restore",gN="StartAfter",AA="SecretAccessKey",mhe="StreamingBlob",Nf="StorageClass",ghe="SessionCredentialValue",yhe="SessionCredentials",vhe="SessionMode",To="ServerSideEncryption",Ao="SSECustomerAlgorithm",wl="SSECustomerKey",Io="SSECustomerKeyMD5",Ka="SSEKMSEncryptionContext",$r="SSEKMSKeyId",IA="SessionToken",yN="Size",bhe="TagCount",She="TooManyParts",vN="Tagging",fm="UploadId",_he="UploadPart",whe="UploadPartOutput",Ehe="UploadPartRequest",El="VersionId",xhe="WriteOffsetBytes",w_="WebsiteRedirectLocation",Rhe="accept-ranges",Che="bucket-region",vs="client",bN="continuation-token",The="delimiter",bs="error",Ahe="encoding-type",Ihe="fetch-owner",Ur="http",E_="httpChecksum",Bs="httpError",H="httpHeader",Ohe="httpPayload",x_="httpPrefixHeaders",jt="httpQuery",Mhe="max-buckets",Dhe="max-keys",SN="prefix",_N="partNumber",khe="response-cache-control",Phe="response-content-disposition",Nhe="response-content-encoding",zhe="response-content-language",Lhe="response-content-type",Bhe="response-expires",$he="streaming",Uhe="start-after",wN="smithy.ts.sdk.synthetic.com.amazonaws.s3",R_="uploadId",EN="versionId",Sp="xmlFlattened",hs="xmlName",xN="x-amz-acl",jhe="x-amz-abort-date",Hhe="x-amz-abort-rule-id",Fhe="x-amz-bypass-governance-retention",RN="x-amz-checksum-algorithm",xl="x-amz-checksum-crc32",Rl="x-amz-checksum-crc32c",Cl="x-amz-checksum-crc64nvme",qhe="x-amz-checksum-mode",Tl="x-amz-checksum-sha1",Al="x-amz-checksum-sha256",Vhe="x-amz-create-session-mode",zf="x-amz-checksum-type",CN="x-amz-delete-marker",C_="x-amz-expiration",Gi="x-amz-expected-bucket-owner",TN="x-amz-grant-full-control",AN="x-amz-grant-read",IN="x-amz-grant-read-acp",ON="x-amz-grant-write-acp",Ghe="x-amz-if-match-initiated-time",Khe="x-amz-if-match-last-modified-time",Zhe="x-amz-if-match-size",T_="x-amz-meta-",Qhe="x-amz-mfa",Yhe="x-amz-missing-meta",Xhe="x-amz-mp-object-size",Whe="x-amz-mp-parts-count",A_="x-amz-object-lock-legal-hold",I_="x-amz-object-lock-mode",O_="x-amz-object-lock-retain-until-date",Jhe="x-amz-optional-object-attributes",epe="x-amz-object-size",tpe="x-amz-restore",Ki="x-amz-request-charged",Zi="x-amz-request-payer",npe="x-amz-replication-status",M_="x-amz-storage-class",MN="x-amz-sdk-checksum-algorithm",Oo="x-amz-server-side-encryption",Mo="x-amz-server-side-encryption-aws-kms-key-id",Do="x-amz-server-side-encryption-bucket-key-enabled",Il="x-amz-server-side-encryption-context",ko="x-amz-server-side-encryption-customer-algorithm",Lf="x-amz-server-side-encryption-customer-key",Po="x-amz-server-side-encryption-customer-key-MD5",DN="x-amz-tagging",spe="x-amz-tagging-count",dm="x-amz-version-id",rpe="x-amz-write-offset-bytes",D_="x-amz-website-redirect-location",Ce="com.amazonaws.s3";var OA=[0,Ce,ghe,8,0],Bf=[0,Ce,wl,8,0],Ol=[0,Ce,Ka,8,0],No=[0,Ce,$r,8,0],k_=[0,Ce,mhe,{[$he]:1},42],ope=[3,Ce,Afe,0,[qi],[[0,{[H]:Ki}]]],ipe=[3,Ce,Ife,0,[ms,Br,fm,Vi,Fi,pde],[[0,1],[0,1],[0,{[jt]:R_}],[0,{[H]:Zi}],[0,{[H]:Gi}],[6,{[H]:Ghe}]],3],ape=[3,Ce,ms,0,[pN,Lfe,eN,kfe],[0,4,0,0]],cpe=[-3,Ce,Pfe,{[bs]:vs,[Bs]:409},[],[]];Mt.for(Ce).registerError(cpe,FS);var lpe=[-3,Ce,Nfe,{[bs]:vs,[Bs]:409},[],[]];Mt.for(Ce).registerError(lpe,qS);var upe=[3,Ce,Gfe,0,[Pf],[0]],fpe=[3,Ce,Bfe,0,[rhe],[[()=>Qpe,{[Sp]:1,[hs]:ohe}]]],dpe=[3,Ce,Qfe,0,[So,Bi,$i,Ui,ji,Hi,__],[0,0,0,0,0,0,1]],hpe=[3,Ce,$fe,{[hs]:jfe},[Ide,ms,Br,mf,So,Bi,$i,Ui,ji,Hi,Ga,To,El,$r,Co,qi],[0,0,0,[0,{[H]:C_}],0,0,0,0,0,0,0,[0,{[H]:Oo}],[0,{[H]:dm}],[()=>No,{[H]:Mo}],[2,{[H]:Do}],[0,{[H]:Ki}]]],ppe=[3,Ce,Hfe,0,[ms,Br,fm,Fde,Bi,$i,Ui,ji,Hi,Ga,Hde,Vi,Fi,lm,p_,Ao,wl,Io],[[0,1],[0,1],[0,{[jt]:R_}],[()=>fpe,{[Ohe]:1,[hs]:rN}],[0,{[H]:xl}],[0,{[H]:Rl}],[0,{[H]:Cl}],[0,{[H]:Tl}],[0,{[H]:Al}],[0,{[H]:zf}],[1,{[H]:Xhe}],[0,{[H]:Zi}],[0,{[H]:Gi}],[0,{[H]:um}],[0,{[H]:m_}],[0,{[H]:ko}],[()=>Bf,{[H]:Lf}],[0,{[H]:Po}]],3],mpe=[3,Ce,Ufe,{[hs]:bde},[Cfe,Mfe,ms,Br,fm,To,Ao,Io,$r,Ka,Co,qi,kf,Ga],[[4,{[H]:jhe}],[0,{[H]:Hhe}],[0,{[hs]:ms}],0,0,[0,{[H]:Oo}],[0,{[H]:ko}],[0,{[H]:Po}],[()=>No,{[H]:Mo}],[()=>Ol,{[H]:Il}],[2,{[H]:Do}],[0,{[H]:Ki}],[0,{[H]:RN}],[0,{[H]:zf}]]],gpe=[3,Ce,Ffe,0,[ms,Br,JP,n_,o_,a_,c_,h_,rl,cN,lN,uN,fN,g_,To,Nf,w_,Ao,wl,Io,$r,Ka,Co,Vi,vN,b_,S_,v_,Fi,kf,Ga],[[0,1],[0,1],[0,{[H]:xN}],[0,{[H]:s_}],[0,{[H]:r_}],[0,{[H]:i_}],[0,{[H]:l_}],[0,{[H]:d_}],[4,{[H]:rl}],[0,{[H]:TN}],[0,{[H]:AN}],[0,{[H]:IN}],[0,{[H]:ON}],[128,{[x_]:T_}],[0,{[H]:Oo}],[0,{[H]:M_}],[0,{[H]:D_}],[0,{[H]:ko}],[()=>Bf,{[H]:Lf}],[0,{[H]:Po}],[()=>No,{[H]:Mo}],[()=>Ol,{[H]:Il}],[2,{[H]:Do}],[0,{[H]:Zi}],[0,{[H]:DN}],[0,{[H]:I_}],[5,{[H]:O_}],[0,{[H]:A_}],[0,{[H]:Gi}],[0,{[H]:RN}],[0,{[H]:zf}]],2],ype=[3,Ce,Jfe,{[hs]:ede},[RA,To,$r,Ka,Co],[[()=>Hpe,{[hs]:RA}],[0,{[H]:Oo}],[()=>No,{[H]:Mo}],[()=>Ol,{[H]:Il}],[2,{[H]:Do}]],1],vpe=[3,Ce,tde,0,[ms,vhe,To,$r,Ka,Co],[[0,1],[0,{[H]:Vhe}],[0,{[H]:Oo}],[()=>No,{[H]:Mo}],[()=>Ol,{[H]:Il}],[2,{[H]:Do}]],1],bpe=[3,Ce,ode,0,[oN,El,qi],[[2,{[H]:CN}],[0,{[H]:dm}],[0,{[H]:Ki}]]],Spe=[3,Ce,ide,0,[ms,Br,Ude,El,Vi,zfe,Fi,lm,mde,gde],[[0,1],[0,1],[0,{[H]:Qhe}],[0,{[jt]:EN}],[0,{[H]:Zi}],[2,{[H]:Fhe}],[0,{[H]:Gi}],[0,{[H]:um}],[6,{[H]:Khe}],[1,{[H]:Zhe}]],2],_pe=[-3,Ce,cde,{[bs]:vs,[Bs]:400},[],[]];Mt.for(Ce).registerError(_pe,QS);var wpe=[3,Ce,fde,0,[t_,oN,Ofe,mf,phe,dN,f_,So,Bi,$i,Ui,ji,Hi,Ga,jde,El,n_,o_,a_,c_,Xfe,h_,rl,CA,w_,To,g_,Ao,Io,$r,Co,Nf,qi,hhe,ehe,bhe,b_,S_,v_],[[()=>k_,16],[2,{[H]:CN}],[0,{[H]:Rhe}],[0,{[H]:C_}],[0,{[H]:tpe}],[4,{[H]:Nde}],[1,{[H]:u_}],[0,{[H]:So}],[0,{[H]:xl}],[0,{[H]:Rl}],[0,{[H]:Cl}],[0,{[H]:Tl}],[0,{[H]:Al}],[0,{[H]:zf}],[1,{[H]:Yhe}],[0,{[H]:dm}],[0,{[H]:s_}],[0,{[H]:r_}],[0,{[H]:i_}],[0,{[H]:l_}],[0,{[H]:Wfe}],[0,{[H]:d_}],[4,{[H]:rl}],[0,{[H]:CA}],[0,{[H]:D_}],[0,{[H]:Oo}],[128,{[x_]:T_}],[0,{[H]:ko}],[0,{[H]:Po}],[()=>No,{[H]:Mo}],[2,{[H]:Do}],[0,{[H]:M_}],[0,{[H]:Ki}],[0,{[H]:npe}],[1,{[H]:Whe}],[1,{[H]:spe}],[0,{[H]:I_}],[5,{[H]:O_}],[0,{[H]:A_}]]],Epe=[3,Ce,dde,0,[ms,Br,lm,vde,p_,Rde,TA,ihe,ahe,che,lhe,uhe,fhe,El,Ao,wl,Io,Vi,__,Fi,Vfe],[[0,1],[0,1],[0,{[H]:um}],[4,{[H]:yde}],[0,{[H]:m_}],[4,{[H]:Cde}],[0,{[H]:TA}],[0,{[jt]:khe}],[0,{[jt]:Phe}],[0,{[jt]:Nhe}],[0,{[jt]:zhe}],[0,{[jt]:Lhe}],[6,{[jt]:Bhe}],[0,{[jt]:EN}],[0,{[H]:ko}],[()=>Bf,{[H]:Lf}],[0,{[H]:Po}],[0,{[H]:Zi}],[1,{[jt]:_N}],[0,{[H]:Gi}],[0,{[H]:qhe}]],2],xpe=[-3,Ce,_de,{[bs]:vs,[Bs]:400},[],[]];Mt.for(Ce).registerError(xpe,JS);var Rpe=[-3,Ce,Sde,{[bs]:vs,[Bs]:403},[Nf,Dfe],[0,0]];Mt.for(Ce).registerError(Rpe,GS);var Cpe=[-3,Ce,wde,{[bs]:vs,[Bs]:400},[],[]];Mt.for(Ce).registerError(Cpe,YS);var Tpe=[-3,Ce,Tde,{[bs]:vs,[Bs]:400},[],[]];Mt.for(Ce).registerError(Tpe,XS);var Ape=[3,Ce,Dde,{[hs]:Ode},[tN,y_,cm,Pf],[[()=>Kpe,0],()=>kN,0,0]],Ipe=[3,Ce,kde,0,[$de,cm,Pf,eN],[[1,{[jt]:Mhe}],[0,{[jt]:bN}],[0,{[jt]:SN}],[0,{[jt]:Che}]]],Ope=[3,Ce,Lde,{[hs]:Pde},[xde,sde,pN,Pf,iN,hN,Yfe,aN,Ade,cm,qde,gN,qi],[2,[()=>Ype,{[Sp]:1}],0,0,0,1,[()=>Zpe,{[Sp]:1}],0,1,0,0,0,[0,{[H]:Ki}]]],Mpe=[3,Ce,Bde,0,[ms,iN,aN,hN,Pf,cm,lde,gN,Vi,Fi,Wde],[[0,1],[0,{[jt]:The}],[0,{[jt]:Ahe}],[1,{[jt]:Dhe}],[0,{[jt]:SN}],[0,{[jt]:bN}],[2,{[jt]:Ihe}],[0,{[jt]:Uhe}],[0,{[H]:Zi}],[0,{[H]:Gi}],[64,{[H]:Jhe}]],1],Dpe=[-3,Ce,Gde,{[bs]:vs,[Bs]:404},[],[]];Mt.for(Ce).registerError(Dpe,VS);var kpe=[-3,Ce,Kde,{[bs]:vs,[Bs]:404},[],[]];Mt.for(Ce).registerError(kpe,KS);var Ppe=[-3,Ce,Zde,{[bs]:vs,[Bs]:404},[],[]];Mt.for(Ce).registerError(Ppe,jS);var Npe=[-3,Ce,Vde,{[bs]:vs},[],[]];Mt.for(Ce).registerError(Npe,ZS);var zpe=[3,Ce,Jde,0,[Br,dN,So,kf,Ga,yN,Nf,y_,mN],[0,4,0,[64,{[Sp]:1}],0,1,0,()=>kN,()=>jpe]],Lpe=[-3,Ce,Qde,{[bs]:vs,[Bs]:403},[],[]];Mt.for(Ce).registerError(Lpe,e_);var Bpe=[-3,Ce,Xde,{[bs]:vs,[Bs]:403},[],[]];Mt.for(Ce).registerError(Bpe,HS);var kN=[3,Ce,y_,0,[rde,hde],[0,0]],$pe=[3,Ce,nhe,0,[mf,So,Bi,$i,Ui,ji,Hi,Ga,To,El,Ao,Io,$r,Ka,Co,yN,qi],[[0,{[H]:C_}],[0,{[H]:So}],[0,{[H]:xl}],[0,{[H]:Rl}],[0,{[H]:Cl}],[0,{[H]:Tl}],[0,{[H]:Al}],[0,{[H]:zf}],[0,{[H]:Oo}],[0,{[H]:dm}],[0,{[H]:ko}],[0,{[H]:Po}],[()=>No,{[H]:Mo}],[()=>Ol,{[H]:Il}],[2,{[H]:Do}],[1,{[H]:epe}],[0,{[H]:Ki}]]],Upe=[3,Ce,she,0,[ms,Br,JP,t_,n_,o_,a_,c_,f_,sN,h_,kf,Bi,$i,Ui,ji,Hi,rl,lm,p_,cN,lN,uN,fN,xhe,g_,To,Nf,w_,Ao,wl,Io,$r,Ka,Co,Vi,vN,b_,S_,v_,Fi],[[0,1],[0,1],[0,{[H]:xN}],[()=>k_,16],[0,{[H]:s_}],[0,{[H]:r_}],[0,{[H]:i_}],[0,{[H]:l_}],[1,{[H]:u_}],[0,{[H]:nN}],[0,{[H]:d_}],[0,{[H]:MN}],[0,{[H]:xl}],[0,{[H]:Rl}],[0,{[H]:Cl}],[0,{[H]:Tl}],[0,{[H]:Al}],[4,{[H]:rl}],[0,{[H]:um}],[0,{[H]:m_}],[0,{[H]:TN}],[0,{[H]:AN}],[0,{[H]:IN}],[0,{[H]:ON}],[1,{[H]:rpe}],[128,{[x_]:T_}],[0,{[H]:Oo}],[0,{[H]:M_}],[0,{[H]:D_}],[0,{[H]:ko}],[()=>Bf,{[H]:Lf}],[0,{[H]:Po}],[()=>No,{[H]:Mo}],[()=>Ol,{[H]:Il}],[2,{[H]:Do}],[0,{[H]:Zi}],[0,{[H]:DN}],[0,{[H]:I_}],[5,{[H]:O_}],[0,{[H]:A_}],[0,{[H]:Gi}]],2],jpe=[3,Ce,mN,0,[Ede,dhe],[2,4]],Hpe=[3,Ce,yhe,0,[xA,AA,IA,mf],[[0,{[hs]:xA}],[()=>OA,{[hs]:AA}],[()=>OA,{[hs]:IA}],[4,{[hs]:mf}]],4],Fpe=[-3,Ce,She,{[bs]:vs,[Bs]:400},[],[]];Mt.for(Ce).registerError(Fpe,WS);var qpe=[3,Ce,whe,0,[To,So,Bi,$i,Ui,ji,Hi,Ao,Io,$r,Co,qi],[[0,{[H]:Oo}],[0,{[H]:So}],[0,{[H]:xl}],[0,{[H]:Rl}],[0,{[H]:Cl}],[0,{[H]:Tl}],[0,{[H]:Al}],[0,{[H]:ko}],[0,{[H]:Po}],[()=>No,{[H]:Mo}],[2,{[H]:Do}],[0,{[H]:Ki}]]],Vpe=[3,Ce,Ehe,0,[ms,Br,__,fm,t_,f_,sN,kf,Bi,$i,Ui,ji,Hi,Ao,wl,Io,Vi,Fi],[[0,1],[0,1],[1,{[jt]:_N}],[0,{[jt]:R_}],[()=>k_,16],[1,{[H]:u_}],[0,{[H]:nN}],[0,{[H]:MN}],[0,{[H]:xl}],[0,{[H]:Rl}],[0,{[H]:Cl}],[0,{[H]:Tl}],[0,{[H]:Al}],[0,{[H]:ko}],[()=>Bf,{[H]:Lf}],[0,{[H]:Po}],[0,{[H]:Zi}],[0,{[H]:Gi}]],4],Gpe=[-3,wN,"S3ServiceException",0,[],[]];Mt.for(wN).registerError(Gpe,Un);var Kpe=[1,Ce,tN,0,[()=>ape,{[hs]:ms}]],Zpe=[1,Ce,Kfe,0,()=>upe],Qpe=[1,Ce,Zfe,0,()=>dpe],Ype=[1,Ce,Yde,0,[()=>zpe,0]],Fye=[9,Ce,Tfe,{[Ur]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>ipe,()=>ope],qye=[9,Ce,rN,{[Ur]:["POST","/{Key+}",200]},()=>ppe,()=>hpe],Vye=[9,Ce,qfe,{[Ur]:["POST","/{Key+}?uploads",200]},()=>gpe,()=>mpe],Xpe=[9,Ce,nde,{[Ur]:["GET","/?session",200]},()=>vpe,()=>ype],Gye=[9,Ce,ade,{[Ur]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>Spe,()=>bpe],Kye=[9,Ce,ude,{[E_]:"-",[Ur]:["GET","/{Key+}?x-id=GetObject",200]},()=>Epe,()=>wpe],Wpe=[9,Ce,Mde,{[Ur]:["GET","/?x-id=ListBuckets",200]},()=>Ipe,()=>Ape],Jpe=[9,Ce,zde,{[Ur]:["GET","/?list-type=2",200]},()=>Mpe,()=>Ope],Zye=[9,Ce,the,{[E_]:"-",[Ur]:["PUT","/{Key+}?x-id=PutObject",200]},()=>Upe,()=>$pe],Qye=[9,Ce,_he,{[E_]:"-",[Ur]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>Vpe,()=>qpe];class eme extends zr.classBuilder().ep({...US,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),DS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(Xpe).build(){}const tme="3.975.0",nme={version:tme};function MA(e){return typeof e=="string"?e.length===0:e.byteLength===0}var PN={name:"SHA-1"},DA={name:"HMAC",hash:PN},sme=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),rme=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){xi().crypto.subtle.importKey("raw",kA(t),DA,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!MA(t)){var n=kA(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 xi().crypto.subtle.sign(DA,n,t.toHash).then(function(r){return new Uint8Array(r)})}):MA(this.toHash)?Promise.resolve(sme):Promise.resolve().then(function(){return xi().crypto.subtle.digest(PN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function kA(e){return typeof e=="string"?VM(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var ome=(function(){function e(t){if(QM(xi()))this.hash=new rme(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(Pa(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class Yu{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&&PA(n),new Yu(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&PA(t),parseInt(fs(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function PA(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class ime{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(Yu.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!mme.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set($O(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()}}}),Tme=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 Ame{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Rme({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=Ime(t)?Cme(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Tme(r):r}}const Ime=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,Ome=e=>new Ame(e);async function Mme(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},di=64,kme=16,Pme=[1732584193,4023233417,2562383102,271733878];class Nme{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(zme(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=Lme(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===di&&(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%di>=di-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(di-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(kme));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(Pme),this.buffer=new DataView(new ArrayBuffer(di)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function hm(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 hm(t&n|~t&r,e,t,i,c,l)}function Kn(e,t,n,r,i,c,l){return hm(t&r|n&~r,e,t,i,c,l)}function Zn(e,t,n,r,i,c,l){return hm(t^n^r,e,t,i,c,l)}function Qn(e,t,n,r,i,c,l){return hm(n^(t|~r),e,t,i,c,l)}function zme(e){return typeof e=="string"?e.length===0:e.byteLength===0}function Lme(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 Bme=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??ka,base64Encoder:e?.base64Encoder??Ti,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??YP,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??sG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Efe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new xb},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new PK}],logger:e?.logger??new Rb,protocol:e?.protocol??CZ,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??UO,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??kP,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??ff,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??bo,utf8Encoder:e?.utf8Encoder??$a}),$me=e=>{const t=JM(e),n=()=>t().then(wM),r=Bme(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??SM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??XM({serviceId:r.serviceId,clientVersion:nme.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Ome,maxAttempts:e?.maxAttempts??df,md5:e?.md5??Nme,region:e?.region??WM("Region is missing"),requestHandler:Gp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||$M),sha1:e?.sha1??ome,sha256:e?.sha256??YM,streamCollector:e?.streamCollector??mb,streamHasher:e?.streamHasher??Dme,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(OM)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(MM))}},Ume=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}}},jme=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Hme=(e,t)=>{const n=Object.assign(rD(e),EM(e),IO(e),Ume(e));return t.forEach(r=>r.configure(n)),Object.assign(e,oD(n),xM(n),OO(n),jme(n))};class Fme extends _M{config;constructor(...[t]){const n=$me(t||{});super(n),this.initConfig=n;const r=Rfe(n),i=XO(r),c=Cue(i),l=FM(c),f=kM(l),d=f,h=BM(d),y=sfe(h),g=xfe(y),v=Vue(g,{session:[()=>this,eme]}),b=Hme(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(HO(this.config)),this.middlewareStack.use(IM(this.config)),this.middlewareStack.use(qM(this.config)),this.middlewareStack.use(PM(this.config)),this.middlewareStack.use(MO(this.config)),this.middlewareStack.use(DO(this.config)),this.middlewareStack.use(kO(this.config)),this.middlewareStack.use(PO(this.config,{httpAuthSchemeParametersProvider:Sfe,identityProviderConfigProvider:async _=>new QO({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(zO(this.config)),this.middlewareStack.use(nfe(this.config)),this.middlewareStack.use(_ue(this.config)),this.middlewareStack.use(Mue(this.config)),this.middlewareStack.use($ue(this.config)),this.middlewareStack.use(que(this.config))}destroy(){super.destroy()}}class qme extends zr.classBuilder().ep(US).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),DS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(Wpe).build(){}class Vme extends zr.classBuilder().ep({...US,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[Eo(r,t.getEndpointParameterInstructions()),DS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(Jpe).build(){}let zh=null,Bu=null;function jr(){if(!zh){const e=Vp();if(!e)throw new Error("AWS credentials not configured");zh=new eY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return zh}function zN(){if(!Bu){const e=Vp();if(!e)throw new Error("AWS credentials not configured");Bu=new Fme({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Bu.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 Bu}function Gme(){zh=null,Bu=null}function LN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:Kme},e[0]=t):t=e[0];const n=EB(t),r=Cp(),i=VA();let c;e[1]!==r||e[2]!==i?(c=function(){$V(),Gme(),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(o0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(m$,{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(r0,{children:[f,$.jsx(gh,{children:$.jsx(pa,{children:$.jsx(Ar,{to:"/",children:$.jsxs(ma,{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(o0,{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(bR,{className:"size-4"}),_=$.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=$.jsx(pa,{children:$.jsx(Ar,{to:"/ec2/describe-instances",children:$.jsxs(ma,{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(y$,{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(pa,{children:$.jsx(Ar,{to:"/ec2/describe-images",children:$.jsxs(ma,{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 U,B;e[24]===Symbol.for("react.memo_cache_sentinel")?(U=$.jsx(b$,{className:"size-4"}),B=$.jsx("span",{children:"Key Pairs"}),e[24]=U,e[25]=B):(U=e[24],B=e[25]);let k;e[26]!==N?(k=$.jsx(pa,{children:$.jsx(Ar,{to:"/ec2/describe-key-pairs",children:$.jsxs(ma,{isActive:N,tooltip:"Key Pairs",children:[U,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(h$,{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(pa,{children:$.jsx(Ar,{to:"/ec2/describe-volumes",children:$.jsxs(ma,{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(r0,{children:[v,$.jsxs(gh,{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(o0,{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 V,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(V=$.jsx(bR,{className:"size-4"}),W=$.jsx("span",{children:"Buckets"}),e[42]=V,e[43]=W):(V=e[42],W=e[43]);let j;e[44]!==fe?(j=$.jsxs(r0,{children:[ye,$.jsx(gh,{children:$.jsx(pa,{children:$.jsx(Ar,{to:"/s3/ls",children:$.jsxs(ma,{isActive:fe,tooltip:"Buckets",children:[V,W]})})})})]}),e[44]=fe,e[45]=j):j=e[45];let ve;e[46]!==Q||e[47]!==j||e[48]!==g?(ve=$.jsxs(iH,{children:[g,Q,j]}),e[46]=Q,e[47]=j,e[48]=g,e[49]=ve):ve=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=$.jsx(_$,{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(oH,{children:$.jsx(gh,{children:$.jsx(pa,{children:$.jsxs(ma,{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(rH,{}),e[54]=ie):ie=e[54];let de;return e[55]!==ve||e[56]!==ne?(de=$.jsxs(nH,{collapsible:"icon",children:[ve,ne,ie]}),e[55]=ve,e[56]=ne,e[57]=de):de=e[57],de}function Kme(e){return e.pathname}function Zme(e){const t=Ct.c(18),{error:n,reset:r}=e,i=Yn(),c=VA();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(LN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(eO,{}),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(f$,{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(Wc,{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(Ar,{to:"/",children:$.jsx(Wc,{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 P_=lB()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>$.jsxs($.Fragment,{children:[$.jsx(AB,{}),$.jsx(LN,{}),$.jsxs("main",{className:"flex flex-1 flex-col",children:[$.jsx(eO,{}),$.jsx("div",{className:"flex flex-1 flex-col p-8",children:$.jsx(mI,{})})]})]}),errorComponent:Zme,notFoundComponent:lH}),Qme=()=>En(()=>import("./login.js"),__vite__mapDeps([0,1])),Yme=mn("/login")({beforeLoad:()=>{if(Vp())throw $v({to:"/"})},component:Mn(Qme,"component")}),Xme=()=>En(()=>import("./route.js"),[]),Wme=mn("/_auth")({beforeLoad:()=>{if(!Vp())throw $v({to:"/login"})},component:Mn(Xme,"component")}),Jme={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new IP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},ege=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new IP({InstanceIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),tge={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new yue({Filters:[{Name:"capacity",Values:["true"]}]});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},BN={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new AP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},$N=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new AP({ImageIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),UN={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new OP({});return await jr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},nge=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new OP({KeyPairIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),sge={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new vue({});return await jr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},rge={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new MP({});return await jr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},oge=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new MP({VolumeIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),ige=()=>En(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),age=mn("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(sge)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:Mn(ige,"component")}),cge={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new qme({});return await zN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},jN=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new Vme({Bucket:e,Prefix:t,Delimiter:"/"});return await zN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),lge=()=>En(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),uge=mn("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(cge)},component:Mn(lge,"component")}),Xye=qp({imageId:Ei("Please select an Image"),instanceType:Ei("Please select an instance type"),keyName:Ei("Please select a key pair"),count:yv("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),Wye=qp({keyName:Ei().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),Jye=qp({keyName:Ei().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:Ei().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),fge=()=>En(()=>import("./import-key-pair.js"),__vite__mapDeps([7,1,8,9,4,10,11,12])),dge=mn("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:Mn(fge,"component")}),hge=()=>En(()=>import("./create-key-pair.js"),__vite__mapDeps([13,1,8,9,4,11,12,14,10,15,16])),pge=mn("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:Mn(hge,"component")}),mge=()=>En(()=>import("./run-instances.js"),__vite__mapDeps([17,1,3,8,9,4,15,11,12])),gge=mn("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(BN),e.queryClient.ensureQueryData(UN),e.queryClient.ensureQueryData(tge)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:Mn(mge,"component")}),yge=()=>En(()=>import("./route2.js"),[]),vge=mn("/_auth/s3/ls/$bucket")({component:Mn(yge,"component")}),bge=()=>En(()=>import("./index5.js"),__vite__mapDeps([18,3,8,4,19,14,16,20,12])),Sge=mn("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(jN(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:Mn(bge,"component")}),_ge=()=>En(()=>import("./index6.js"),__vite__mapDeps([21,3,6,4,22])),wge=mn("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(rge)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:Mn(_ge,"component")}),Ege=()=>En(()=>import("./index7.js"),__vite__mapDeps([23,3,6,4])),xge=mn("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(UN)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:Mn(Ege,"component")}),Rge=()=>En(()=>import("./index8.js"),__vite__mapDeps([24,3,6,4,25])),Cge=mn("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Jme)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:Mn(Rge,"component")}),Tge=()=>En(()=>import("./index9.js"),__vite__mapDeps([26,3,6,4,22])),Age=mn("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(BN)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:Mn(Tge,"component")}),Ige=()=>En(()=>import("./_.js"),__vite__mapDeps([27,3,8,19,14,16,20,12])),Oge=mn("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=BU(t._splat||"");await e.queryClient.ensureQueryData(jN(t.bucket,n))},head:({params:e})=>({meta:[{title:`${$U(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:Mn(Ige,"component")}),Mge=()=>En(()=>import("./_id.js"),__vite__mapDeps([28,3,8,29,4,22])),Dge=mn("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(oge(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:Mn(Mge,"component")}),kge=()=>En(()=>import("./_id2.js"),__vite__mapDeps([30,3,8,29,4,14,11,12,20])),Pge=mn("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(nge(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:Mn(kge,"component")}),Nge=()=>En(()=>import("./_id3.js"),__vite__mapDeps([31,3,8,29,4,25,32,11,12,20])),zge=mn("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(ege(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData($N(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:Mn(Nge,"component")}),Lge=()=>En(()=>import("./_id4.js"),__vite__mapDeps([33,3,8,4,22,32,29])),Bge=mn("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData($N(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:Mn(Lge,"component")}),$ge=Yme.update({id:"/login",path:"/login",getParentRoute:()=>P_}),ss=Wme.update({id:"/_auth",getParentRoute:()=>P_}),Uge=age.update({id:"/",path:"/",getParentRoute:()=>ss}),jge=uge.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>ss}),Hge=dge.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>ss}),Fge=pge.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>ss}),qge=gge.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>ss}),N_=vge.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>ss}),Vge=Sge.update({id:"/",path:"/",getParentRoute:()=>N_}),Gge=wge.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>ss}),Kge=xge.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>ss}),Zge=Cge.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>ss}),Qge=Age.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>ss}),Yge=Oge.update({id:"/$",path:"/$",getParentRoute:()=>N_}),Xge=Dge.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>ss}),Wge=Pge.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>ss}),Jge=zge.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>ss}),eye=Bge.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>ss}),tye={AuthS3LsBucketSplatRoute:Yge,AuthS3LsBucketIndexRoute:Vge},nye=N_._addFileChildren(tye),sye={AuthIndexRoute:Uge,AuthS3LsBucketRouteRoute:nye,AuthEc2instancesRunInstancesRoute:qge,AuthEc2keyCreateKeyPairRoute:Fge,AuthEc2keyImportKeyPairRoute:Hge,AuthS3LsIndexRoute:jge,AuthEc2imagesDescribeImagesIdRoute:eye,AuthEc2instancesDescribeInstancesIdRoute:Jge,AuthEc2keyDescribeKeyPairsIdRoute:Wge,AuthEc2volumesDescribeVolumesIdRoute:Xge,AuthEc2imagesDescribeImagesIndexRoute:Qge,AuthEc2instancesDescribeInstancesIndexRoute:Zge,AuthEc2keyDescribeKeyPairsIndexRoute:Kge,AuthEc2volumesDescribeVolumesIndexRoute:Gge},rye=ss._addFileChildren(sye),oye={AuthRouteRoute:rye,LoginRoute:$ge},iye=P_._addFileChildren(oye)._addFileTypes(),HN=new IL,aye=bB({routeTree:iye,context:{queryClient:HN},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),G0=document.getElementById("app");G0&&!G0.innerHTML&&PB.createRoot(G0).render($.jsx(I.StrictMode,{children:$.jsx(BB,{defaultTheme:"system",storageKey:"hive-ui-theme",children:$.jsx(ML,{client:HN,children:$.jsx(J9,{children:$.jsx(wB,{router:aye})})})})}));export{pj as $,Sye as A,Wc as B,Or as C,kp as D,Ms as E,bf as F,mt as G,TR as H,Ze as I,Xy as J,mi as K,_n as L,bt as M,Eye as N,mI as O,wn as P,ns as Q,l2 as R,JU as S,e5 as T,dye as U,_o as V,ot as W,vj as X,s9 as Y,Pr as Z,Fu as _,en as a,AQ as a$,c2 as a0,ab as a1,Ej as a2,A2 as a3,L2 as a4,Tp as a5,Gh as a6,Tye as a7,p2 as a8,eb as a9,_I as aA,Yv as aB,_t as aC,Qc as aD,Aye as aE,Iye as aF,cO as aG,Sge as aH,gye as aI,jN as aJ,rge as aK,Ar as aL,Jme as aM,Oge as aN,BU as aO,yye as aP,$U as aQ,EC as aR,Ti as aS,Av as aT,jye as aU,DP as aV,JK as aW,pp as aX,Pa as aY,KM as aZ,ZM as a_,AI as aa,cr as ab,za as ac,xye as ad,Cye as ae,B5 as af,e8 as ag,hye as ah,t9 as ai,k9 as aj,Kj as ak,Gj as al,vf as am,hn as an,qU as ao,Ii as ap,o8 as aq,Rye as ar,nb as as,X2 as at,Fj as au,wye as av,BN as aw,UN as ax,tge as ay,Xye as az,RI as b,Z0 as b$,kQ as b0,IQ as b1,Hye as b2,cf as b3,On as b4,yr as b5,Uye as b6,Rb as b7,Da as b8,Mye as b9,Vj as bA,Zj as bB,U5 as bC,zge as bD,ege as bE,$N as bF,ul as bG,Dye as bH,kye as bI,Pye as bJ,Nye as bK,zye as bL,Lye as bM,Bye as bN,$ye as bO,jr as bP,_p as bQ,cye as bR,Xu as bS,CL as bT,ts as bU,vr as bV,lye as bW,Bge as bX,wI as bY,yL as bZ,lL as b_,zr as ba,US as bb,Eo as bc,DS as bd,Fye as be,qye as bf,Vye as bg,Gye as bh,Kye as bi,Zye as bj,Qye as bk,VA as bl,zN as bm,mye as bn,Dge as bo,pye as bp,oge as bq,Pge as br,nge as bs,La as bt,i9 as bu,r9 as bv,f2 as bw,H5 as bx,l9 as by,j5 as bz,Ct as c,wp as c0,aL as c1,cL as c2,K0 as c3,UA as c4,EL as c5,dL as c6,$a as c7,bo as c8,BV as d,sge as e,cge as f,Sr as g,Wye as h,Jye as i,$ as j,XU as k,_ye as l,vye as m,bye as n,lh as o,m2 as p,Ci as q,I as r,Oye as s,tf as t,Cp as u,t5 as v,Vt as w,tp as x,YI as y,cv as z}; diff --git a/hive/services/hiveui/frontend/dist/assets/index2.js b/hive/services/hiveui/frontend/dist/assets/index2.js index 79837a41b..583c84181 100644 --- a/hive/services/hiveui/frontend/dist/assets/index2.js +++ b/hive/services/hiveui/frontend/dist/assets/index2.js @@ -1 +1 @@ -import{c3 as z,c4 as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde}; +import{c7 as z,c8 as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde}; diff --git a/hive/services/hiveui/frontend/dist/assets/run-instances.js b/hive/services/hiveui/frontend/dist/assets/run-instances.js index 314339a48..cb10c24a3 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 In,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 N,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 Wn,ag as Kn,ah as $n,ai as qn,aj as Yn,ak as Gn,al as Xn,am as ln,an as Wt,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 Ke,a as $e,u as rr,aw as sr,ax as or,ay as ir,az as lr,B as Kt}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:o=1}={}){let r=e;do r+=n?-o:o;while(r>=0&&r<=t.current.length-1&&Qe(t,r,s));return r}function Sr(t,{event:e,orientation:n,loopFocus:s,rtl:o,cols:r,disabledIndices:a,minIndex:u,maxIndex:d,prevIndex:m,stopEvent:g=!1}){let p=m;const b=[],A={};let R=!1;{let c=null,w=-1;t.current.forEach((i,f)=>{if(i==null)return;const v=i.closest('[role="row"]');v&&(R=!0),(v!==c||w===-1)&&(c=v,w+=1,b[w]=[]),b[w].push(f),A[f]=w})}const x=R&&b.length>0&&b.some(c=>c.length!==r);function T(c){if(!x||m===-1)return;const w=A[m];if(w==null)return;const i=b[w].indexOf(m);let f=c==="up"?w-1:w+1;s&&(f<0?f=b.length-1:f>=b.length&&(f=0));const v=new Set;for(;f>=0&&f=0;k-=1){const re=V[k];if(!Qe(t,re,a))return re}f=c==="up"?f-1:f+1,s&&(f<0?f=b.length-1:f>=b.length&&(f=0))}}if(e.key===jt){const c=T("up");if(c!==void 0)g&&Re(e),p=c;else{if(g&&Re(e),m===-1)p=d;else if(p=he(t,{startingIndex:p,amount:r,decrement:!0,disabledIndices:a}),s&&(m-rw?f:f-r}Xe(t,p)&&(p=m)}}if(e.key===Je){const c=T("down");c!==void 0?(g&&Re(e),p=c):(g&&Re(e),m===-1?p=u:(p=he(t,{startingIndex:m,amount:r,disabledIndices:a}),s&&m+r>d&&(p=he(t,{startingIndex:m%r-r,amount:r,disabledIndices:a}))),Xe(t,p)&&(p=m))}if(n==="both"){const c=Ut(m/r);e.key===(o?Fe:Ue)&&(g&&Re(e),m%r!==r-1?(p=he(t,{startingIndex:m,disabledIndices:a}),s&&ot(p,r,c)&&(p=he(t,{startingIndex:m-m%r-1,disabledIndices:a}))):s&&(p=he(t,{startingIndex:m-m%r-1,disabledIndices:a})),ot(p,r,c)&&(p=m)),e.key===(o?Ue:Fe)&&(g&&Re(e),m%r!==0?(p=he(t,{startingIndex:m,decrement:!0,disabledIndices:a}),s&&ot(p,r,c)&&(p=he(t,{startingIndex:m+(r-m%r),decrement:!0,disabledIndices:a}))):s&&(p=he(t,{startingIndex:m+(r-m%r),decrement:!0,disabledIndices:a})),ot(p,r,c)&&(p=m));const w=Ut(d/r)===c;Xe(t,p)&&(s&&w?p=e.key===(o?Ue:Fe)?d:he(t,{startingIndex:m-m%r-1,disabledIndices:a}):p=m)}return p}function vr(t,e,n){const s=[];let o=0;return t.forEach(({width:r,height:a},u)=>{let d=!1;for(n&&(o=0);!d;){const m=[];for(let g=0;gs[g]==null)?(m.forEach(g=>{s[g]=u}),d=!0):o+=1}}),[...s]}function Ir(t,e,n,s,o){if(t===-1)return-1;const r=n.indexOf(t),a=e[t];switch(o){case"tl":return r;case"tr":return a?r+a.width-1:r;case"bl":return a?r+(a.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:o=!0,event:r="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:d=!0,touchOpenDelay:m=0}=e,g=l.useRef(void 0),p=Zt(),b=He(),A=l.useMemo(()=>({onPointerDown(R){g.current=R.pointerType},onMouseDown(R){const x=g.current,T=R.nativeEvent,c=n.select("open");if(R.button!==0||r==="click"||Bt(x,!0)&&u)return;const w=s.current.openEvent,i=w?.type,f=n.select("domReferenceElement")!==R.currentTarget,v=c&&f||!(c&&a&&(!(w&&d)||i==="click"||i==="mousedown"));if(Tn(T.target)){const B=xe(ht,T,T.target);v&&x==="touch"&&m>0?b.start(m,()=>{n.setOpen(!0,B)}):n.setOpen(v,B);return}const V=R.currentTarget;p.request(()=>{const B=xe(ht,T,V);v&&x==="touch"&&m>0?b.start(m,()=>{n.setOpen(!0,B)}):n.setOpen(v,B)})},onClick(R){if(r==="mousedown-only")return;const x=g.current;if(r==="mousedown"&&x){g.current=void 0;return}if(Bt(x,!0)&&u)return;const T=n.select("open"),c=s.current.openEvent,w=n.select("domReferenceElement")!==R.currentTarget,i=T&&w||!(T&&a&&(!(c&&d)||In(c))),f=xe(ht,R.nativeEvent,R.currentTarget);i&&x==="touch"&&m>0?b.start(m,()=>{n.setOpen(!0,f)}):n.setOpen(i,f)},onKeyDown(){g.current=void 0}}),[s,r,u,n,d,a,p,b,m]);return l.useMemo(()=>o?{reference:A}:en,[o,A])}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 o=n?t===Ue:t===Fe,r=t===jt;return e==="both"||e==="horizontal"&&s&&s>1?t===Cr:dt(e,o,r)}function Pr(t,e){const n="rootStore"in t?t.rootStore:t,s=n.useState("open"),o=n.useState("floatingElement"),r=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:u,activeIndex:d,onNavigate:m=()=>{},enabled:g=!0,selectedIndex:p=null,allowEscape:b=!1,loopFocus:A=!1,nested:R=!1,rtl:x=!1,virtual:T=!1,focusItemOnOpen:c="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:i=!0,disabledIndices:f=void 0,orientation:v="vertical",parentOrientation:V,cols:B=1,scrollItemIntoView:k=!0,itemSizes:re,dense:ae=!1,id:W,resetOnPointerLeave:K=!0,externalTree:z}=e,L=tn(o),ee=De(L),F=Mn(),te=Cn(z);Y(()=>{a.current.orientation=v},[a,v]);const I=En(r),U=l.useRef(c),S=l.useRef(p??-1),E=l.useRef(null),ie=l.useRef(!0),M=de(h=>{m(S.current===-1?null:S.current,h)}),oe=l.useRef(M),G=l.useRef(!!o),O=l.useRef(s),_=l.useRef(!1),ue=l.useRef(!1),ve=De(f),H=De(s),fe=De(k),X=De(p),me=De(K),we=de(()=>{function h(Z){T?te?.events.emit("virtualfocus",Z):An(Z,{sync:_.current,preventScroll:!0})}const j=u.current[S.current],C=ue.current;j&&h(j),(_.current?Z=>Z():requestAnimationFrame)(()=>{const Z=u.current[S.current]||j;if(!Z)return;j||h(Z);const le=fe.current;le&&Q&&(C||!ie.current)&&Z.scrollIntoView?.(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le)})});Y(()=>{g&&(s&&o?(S.current=p??-1,U.current&&p!=null&&(ue.current=!0,M())):G.current&&(S.current=-1,oe.current()))},[g,s,o,p,M]),Y(()=>{if(g){if(!s){_.current=!1;return}if(o)if(d==null){if(_.current=!1,X.current!=null)return;if(G.current&&(S.current=-1,we()),(!O.current||!G.current)&&U.current&&(E.current!=null||U.current===!0&&E.current==null)){let h=0;const j=()=>{u.current[0]==null?(h<2&&(h?requestAnimationFrame:queueMicrotask)(j),h+=1):(S.current=E.current==null||St(E.current,v,x)||R?wt(u):Yt(u),E.current=null,M())};j()}}else Xe(u,d)||(S.current=d,we(),ue.current=!1)}},[g,s,o,d,X,R,u,v,x,M,we,ve]),Y(()=>{if(!g||o||!te||T||!G.current)return;const h=te.nodesRef.current,j=h.find(Z=>Z.id===F)?.context?.elements.floating,C=_t(Pn(o)),$=h.some(Z=>Z.context&&Ge(Z.context.elements.floating,C));j&&!$&&ie.current&&j.focus({preventScroll:!0})},[g,o,te,F,T]),Y(()=>{oe.current=M,O.current=s,G.current=!!o}),Y(()=>{s||(E.current=null,U.current=c)},[s,c]);const pe=d!=null,Q=l.useMemo(()=>{function h(C){if(!H.current)return;const $=u.current.indexOf(C.currentTarget);$!==-1&&S.current!==$&&(S.current=$,M(C))}return{onFocus(C){_.current=!0,h(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){_.current=!0,ue.current=!1,w&&h(C)},onPointerLeave(C){if(!H.current||!ie.current||C.pointerType==="touch")return;_.current=!0;const $=C.relatedTarget;!w||u.current.includes($)||me.current&&(S.current=-1,M(C),T||ee.current?.focus({preventScroll:!0}))}}},[H,ee,w,u,M,me,T]),J=l.useCallback(()=>V??te?.nodesRef.current.find(h=>h.id===F)?.context?.dataRef?.current.orientation,[F,te,V]),ye=de(h=>{if(ie.current=!1,_.current=!0,h.which===229||!H.current&&h.currentTarget===ee.current)return;if(R&&Ar(h.key,v,x,B)){it(h.key,J())||Re(h),n.setOpen(!1,xe(xt,h.nativeEvent)),zt(r)&&(T?te?.events.emit("virtualfocus",r):r.focus());return}const j=S.current,C=wt(u,f),$=Yt(u,f);if(I||(h.key==="Home"&&(Re(h),S.current=C,M(h)),h.key==="End"&&(Re(h),S.current=$,M(h))),B>1){const Z=re||Array.from({length:u.current.length},()=>({width:1,height:1})),le=vr(Z,B,ae),ge=le.findIndex(Se=>Se!=null&&!Qe(u,Se,f)),be=le.reduce((Se,Me,Le)=>Me!=null&&!Qe(u,Me,f)?Le:Se,-1),je=le[Sr({current:le.map(Se=>Se!=null?u.current[Se]:null)},{event:h,orientation:v,loopFocus:A,rtl:x,cols:B,disabledIndices:Tr([...(typeof f!="function"?f:null)||u.current.map((Se,Me)=>Qe(u,Me,f)?Me:void 0),void 0],le),minIndex:ge,maxIndex:be,prevIndex:Ir(S.current>$?C:S.current,Z,le,B,h.key===Je?"bl":h.key===(x?Fe:Ue)?"tr":"tl"),stopEvent:!0})];if(je!=null&&(S.current=je,M(h)),v==="both")return}if(it(h.key,v)){if(Re(h),s&&!T&&_t(h.currentTarget.ownerDocument)===h.currentTarget){S.current=St(h.key,v,x)?C:$,M(h);return}St(h.key,v,x)?A?j>=$?b&&j!==u.current.length?S.current=-1:(_.current=!1,S.current=C):S.current=he(u,{startingIndex:j,disabledIndices:f}):S.current=Math.min($,he(u,{startingIndex:j,disabledIndices:f})):A?j<=C?b&&j!==-1?S.current=u.current.length:(_.current=!1,S.current=$):S.current=he(u,{startingIndex:j,decrement:!0,disabledIndices:f}):S.current=Math.max(C,he(u,{startingIndex:j,decrement:!0,disabledIndices:f})),Xe(u,S.current)&&(S.current=-1),M(h)}}),se=l.useMemo(()=>T&&s&&pe&&{"aria-activedescendant":`${W}-${d}`},[T,s,pe,W,d]),ne=l.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...I?{}:se,onKeyDown(h){if(h.key==="Tab"&&h.shiftKey&&s&&!T){const j=On(h.nativeEvent);if(j&&!Ge(ee.current,j))return;Re(h),n.setOpen(!1,xe(nn,h.nativeEvent)),zt(r)&&r.focus();return}ye(h)},onPointerMove(){ie.current=!0}}),[se,ye,ee,v,I,n,s,T,r]),Te=l.useMemo(()=>{function h(C){c==="auto"&&Nn(C.nativeEvent)&&(U.current=!T)}function j(C){U.current=c,c==="auto"&&Vn(C.nativeEvent)&&(U.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,v),be=(R?le:ge)||C.key==="Enter"||C.key.trim()==="";if(T&&$)return ye(C);if(!(!$&&!i&&Z)){if(be){const je=it(C.key,J());E.current=R&&je?null:C.key}if(R){le&&(Re(C),$?(S.current=wt(u,ve.current),M(C)):n.setOpen(!0,xe(xt,C.nativeEvent,C.currentTarget)));return}ge&&(X.current!=null&&(S.current=X.current),Re(C),!$&&i?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:j,onPointerEnter:j,onMouseDown:h,onClick:h}},[ye,ve,c,u,R,M,n,i,v,J,x,X,T]),Ae=l.useMemo(()=>({...se,...Te}),[se,Te]);return l.useMemo(()=>g?{reference:Ae,floating:ne,item:Q,trigger:Te}:{},[g,Ae,ne,Te,Q])}function Or(t,e){const n="rootStore"in t?t.rootStore:t,s=n.useState("open"),o=n.context.dataRef,{listRef:r,activeIndex:a,onMatch:u,onTypingChange:d,enabled:m=!0,findMatch:g=null,resetMs:p=750,ignoreKeys:b=At,selectedIndex:A=null}=e,R=He(),x=l.useRef(""),T=l.useRef(A??a??-1),c=l.useRef(null);Y(()=>{s&&(R.clear(),c.current=null,x.current="")},[s,R]),Y(()=>{s&&x.current===""&&(T.current=A??a??-1)},[s,A,a]);const w=de(V=>{V?o.current.typing||(o.current.typing=V,d?.(V)):o.current.typing&&(o.current.typing=V,d?.(V))}),i=de(V=>{function B(K,z,L){const ee=g?g(z,L):z.find(F=>F?.toLocaleLowerCase().indexOf(L.toLocaleLowerCase())===0);return ee?K.indexOf(ee):-1}const k=r.current;if(x.current.length>0&&x.current[0]!==" "&&(B(k,k,x.current)===-1?w(!1):V.key===" "&&Re(V)),k==null||b.includes(V.key)||V.key.length!==1||V.ctrlKey||V.metaKey||V.altKey)return;s&&V.key!==" "&&(Re(V),w(!0)),k.every(K=>K?K[0]?.toLocaleLowerCase()!==K[1]?.toLocaleLowerCase():!0)&&x.current===V.key&&(x.current="",T.current=c.current),x.current+=V.key,R.start(p,()=>{x.current="",T.current=c.current,w(!1)});const ae=T.current,W=B(k,[...k.slice((ae||0)+1),...k.slice(0,(ae||0)+1)],x.current);W!==-1?(u?.(W),c.current=W):V.key!==" "&&(x.current="",w(!1))}),f=l.useMemo(()=>({onKeyDown:i}),[i]),v=l.useMemo(()=>({onKeyDown:i,onKeyUp(V){V.key===" "&&w(!1)}}),[i,w]);return l.useMemo(()=>m?{reference:f,floating:v}:{},[m,f,v])}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 We(t,e,n){return t==null||e==null?Object.is(t,e):n(t,e)}function vt(t,e,n){return!t||t.length===0?!1:t.some(s=>s===void 0?!1:We(s,e,n))}function Nt(t,e,n){return!t||t.length===0?-1:t.findIndex(s=>s===void 0?!1:We(s,e,n))}function kr(t,e,n){return t.filter(s=>!We(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 o=gn(e)?e.flatMap(r=>r.items):e;if(t==null||typeof t!="object"){const r=o.find(a=>a.value===t);return r&&r.label!=null?r.label:s()}if("value"in t){const r=o.find(a=>a&&a.value===t.value);if(r&&r.label!=null)return r.label}}return s()}function Dr(t,e,n){return t.reduce((s,o,r)=>(r>0&&s.push(", "),s.push(y.jsx(l.Fragment,{children:hn(o,e,n)},r)),s),[])}const P={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,o=t.value;return t.multiple?Array.isArray(o)&&o.some(r=>We(r,n,s)):t.selectedIndex===e&&t.selectedIndex!==null?!0:We(o,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:o,open:r,defaultOpen:a=!1,onOpenChange:u,name:d,disabled:m=!1,readOnly:g=!1,required:p=!1,modal:b=!0,actionsRef:A,inputRef:R,onOpenChangeComplete:x,items:T,multiple:c=!1,itemToStringLabel:w,itemToStringValue:i,isItemEqualToValue:f=Vr,highlightItemOnHover:v=!0,children:V}=t,{clearErrors:B}=cr(),{setDirty:k,setTouched:re,setFocused:ae,shouldValidateOnChange:W,validityData:K,setFilled:z,name:L,disabled:ee,validation:F,validationMode:te}=an(),I=un({id:e}),U=ee||m,S=L??d,[E,ie]=$t({controlled:n,default:c?s??At:s,name:"Select",state:"value"}),[M,oe]=$t({controlled:r,default:a,name:"Select",state:"open"}),G=l.useRef([]),O=l.useRef([]),_=l.useRef(null),ue=l.useRef(null),ve=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:se}=Lt(M),{openMethod:ne,triggerProps:Te,reset:Ae}=kn(M),h=Pt(()=>new jn({id:I,modal:b,multiple:c,itemToStringLabel:w,itemToStringValue:i,isItemEqualToValue:f,value:E,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,j=N(h,P.activeIndex),C=N(h,P.selectedIndex),$=N(h,P.triggerElement),Z=N(h,P.positionerElement),le=l.useMemo(()=>c&&Array.isArray(E)&&E.length===0?"":ze(E,i),[c,E,i]),ge=l.useMemo(()=>c&&Array.isArray(E)?E.map(D=>ze(D,i)):ze(E,i),[c,E,i]),be=De(h.state.triggerElement);ar({id:I,commit:F.commit,value:E,controlRef:be,name:S,getValue:()=>ge});const je=l.useRef(E);Y(()=>{E!==je.current&&h.set("forceMount",!0)},[h,E]),Y(()=>{z(c?Array.isArray(E)&&E.length>0:E!=null)},[c,E,z]),Y(function(){if(M)return;const ce=fe.current;if(c){const Ee=Array.isArray(E)?E:[];if(Ee.length===0){h.set("selectedIndex",null);return}const Ie=Ee[Ee.length-1],rt=Nt(ce,Ie,f);h.set("selectedIndex",rt===-1?null:rt);return}const Ce=Nt(ce,E,f);h.set("selectedIndex",Ce===-1?null:Ce)},[c,M,E,fe,f,h]),Hr(E,()=>{B(S),k(E!==K.initialValue),W()?F.commit(E):F.commit(E,!0)});const Se=de((D,ce)=>{if(u?.(D,ce),!ce.isCanceled&&(oe(D),!D&&(ce.reason===nn||ce.reason===Ln)&&(re(!0),ae(!1),te==="onBlur"&&F.commit(E)),!D&&h.state.activeIndex!==null)){const Ce=G.current[h.state.activeIndex];queueMicrotask(()=>{Ce?.setAttribute("tabindex","-1")})}}),Me=de(()=>{ye(!1),h.set("activeIndex",null),Ae(),x?.(!1)});ft({enabled:!A,open:M,ref:_,onComplete(){M||Me()}}),l.useImperativeHandle(A,()=>({unmount:Me}),[Me]);const Le=de((D,ce)=>{o?.(D,ce),!ce.isCanceled&&ie(D)}),Pe=de(()=>{const D=h.state.listElement||_.current;if(!D)return;const ce=D.scrollTop,Ce=D.scrollTop+D.clientHeight,Ee=ce>1,Ie=Cern(Be(),Te,I?{id:I}:en),[Be,Te,I]);Nr(()=>{h.update({popupProps:_e(),triggerProps:Ye})}),Y(()=>{h.update({id:I,modal:b,multiple:c,value:E,open:M,mounted:J,transitionStatus:se,popupProps:_e(),triggerProps:Ye,items:T,itemToStringLabel:w,itemToStringValue:i,isItemEqualToValue:f,openMethod:ne})},[h,I,b,c,E,M,J,se,_e,Ye,T,w,i,f,ne]);const tt=l.useMemo(()=>({store:h,name:S,required:p,disabled:U,readOnly:g,multiple:c,itemToStringLabel:w,itemToStringValue:i,highlightItemOnHover:v,setValue:Le,setOpen:Se,listRef:G,popupRef:_,scrollHandlerRef:ue,handleScrollArrowVisibility:Pe,scrollArrowsMountedCountRef:ve,getItemProps:et,events:Oe.context.events,valueRef:H,valuesRef:fe,labelsRef:O,typingRef:X,selectionRef:pe,selectedItemTextRef:we,validation:F,onOpenChangeComplete:x,keyboardActiveRef:me,alignItemWithTriggerActiveRef:Q,initialValueRef:je}),[h,S,p,U,g,c,w,i,v,Le,Se,et,Oe.context.events,F,x,Pe]),nt=sn(R,F.inputRef),mt=c&&Array.isArray(E)&&E.length>0,gt=l.useMemo(()=>!c||!Array.isArray(E)||!S?null:E.map(D=>{const ce=ze(D,i);return y.jsx("input",{type:"hidden",name:S,value:ce},ce)}),[c,E,S,i]);return y.jsx(dn.Provider,{value:tt,children:y.jsxs(pn.Provider,{value:Oe,children:[V,y.jsx("input",{...F.getInputValidationProps({onFocus(){h.state.triggerElement?.focus({focusVisible:!0})},onChange(D){if(D.nativeEvent.defaultPrevented)return;const ce=D.target.value,Ce=xe(Dt,D.nativeEvent);function Ee(){if(c)return;const Ie=fe.current.find(rt=>ze(rt,i).toLowerCase()===ce.toLowerCase());Ie!=null&&(k(Ie!==K.initialValue),Le(Ie,Ce),W()&&F.commit(Ie))}h.set("forceMount",!0),queueMicrotask(Ee)}}),name:c?void 0:S,value:le,disabled:U,required:p&&!mt,readOnly:g,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,a=parseFloat(n.height)||0,u=parseFloat(s.width)||0,d=parseFloat(s.height)||0,m=Math.max(e.width,r,u),g=Math.max(e.height,a,d),p=m-e.width,b=g-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:o,id:r,disabled:a=!1,nativeButton:u=!0,...d}=e,{setTouched:m,setFocused:g,validationMode:p,state:b,disabled:A}=an(),{labelId:R}=ur(),{store:x,setOpen:T,selectionRef:c,validation:w,readOnly:i,required:f,alignItemWithTriggerActiveRef:v,disabled:V,keyboardActiveRef:B}=ke(),k=A||V||a,re=N(x,P.open),ae=N(x,P.value),W=N(x,P.triggerProps),K=N(x,P.positionerElement),z=N(x,P.listElement),L=N(x,P.id),ee=N(x,P.hasSelectedValue),F=!ee&&re,te=N(x,P.hasNullItemLabel,F),I=r??L;un({id:I});const U=De(K),S=l.useRef(null),{getButtonProps:E,buttonRef:ie}=on({disabled:k,native:u}),M=de(X=>{x.set("triggerElement",X)}),oe=sn(n,S,ie,M),G=He(),O=He(),_=He(),ue=He();l.useEffect(()=>{if(re)return!(ee||te)?_.start(Br,()=>{c.current.allowUnselectedMouseUp=!0,c.current.allowSelectedMouseUp=!0}):ue.start(Gt,()=>{c.current.allowUnselectedMouseUp=!0,_.start(Gt,()=>{c.current.allowSelectedMouseUp=!0})}),()=>{_.clear(),ue.clear()};c.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},O.clear()},[re,ee,te,c,O,_,ue]);const ve=l.useMemo(()=>z?.id??tn(K)?.id,[z,K]),H=rn(W,{id:I,role:"combobox","aria-expanded":re?"true":"false","aria-haspopup":"listbox","aria-controls":re?ve:void 0,"aria-labelledby":R,"aria-readonly":i||void 0,"aria-required":f||void 0,tabIndex:k?-1:0,ref:oe,onFocus(X){g(!0),re&&v.current&&T(!1,xe(Dt,X.nativeEvent)),G.start(0,()=>{x.set("forceMount",!0)})},onBlur(X){Ge(K,X.relatedTarget)||(m(!0),g(!1),p==="onBlur"&&w.commit(ae))},onPointerMove(){B.current=!1},onKeyDown(){B.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(U.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))}O.start(0,()=>{me.addEventListener("mouseup",we,{once:!0})})}},w.getValidationProps,d,E);H.role="combobox";const fe=l.useMemo(()=>({...b,open:re,disabled:k,value:ae,readOnly:i,placeholder:!ee}),[b,re,k,ae,i,ee]);return Ve("button",e,{ref:[n,S],state:fe,stateAttributesMapping:_r,props:H})}),Wr={value:()=>null},Kr=l.forwardRef(function(e,n){const{className:s,render:o,children:r,placeholder:a,...u}=e,{store:d,valueRef:m}=ke(),g=N(d,P.value),p=N(d,P.items),b=N(d,P.itemToStringLabel),A=N(d,P.hasSelectedValue),R=!A&&a!=null&&r==null,x=N(d,P.hasNullItemLabel,R),T=l.useMemo(()=>({value:g,placeholder:!A}),[g,A]);let c=null;return typeof r=="function"?c=r(g):r!=null?c=r:!A&&a!=null&&!x?c=a:Array.isArray(g)?c=Dr(g,p,b):c=hn(g,p,b),Ve("span",e,{state:T,ref:[n,m],props:[{children:c},u],stateAttributesMapping:Wr})}),$r=l.forwardRef(function(e,n){const{className:s,render:o,...r}=e,{store:a}=ke(),u=N(a,P.open),d=l.useMemo(()=>({open:u}),[u]);return Ve("span",e,{state:d,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:Wn})}),qr=l.createContext(void 0),Yr=l.forwardRef(function(e,n){const{store:s}=ke(),o=N(s,P.mounted),r=N(s,P.forceMount);return o||r?y.jsx(qr.Provider,{value:!0,children:y.jsx(Kn,{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:o}=t,r=de(o),a=l.useRef(0),u=Pt(Jr).current,d=Pt(Qr).current,[m,g]=l.useState(0),p=l.useRef(m),b=de((c,w)=>{d.set(c,w??null),p.current+=1,g(p.current)}),A=de(c=>{d.delete(c),p.current+=1,g(p.current)}),R=l.useMemo(()=>{const c=new Map;return Array.from(d.keys()).filter(i=>i.isConnected).sort(Zr).forEach((i,f)=>{const v=d.get(i)??{};c.set(i,{...v,index:f})}),c},[d,m]);Y(()=>{if(typeof MutationObserver!="function"||R.size===0)return;const c=new MutationObserver(w=>{const i=new Set,f=v=>i.has(v)?i.delete(v):i.add(v);w.forEach(v=>{v.removedNodes.forEach(f),v.addedNodes.forEach(f)}),i.size===0&&(p.current+=1,g(p.current))});return R.forEach((w,i)=>{i.parentElement&&c.observe(i.parentElement,{childList:!0})}),()=>{c.disconnect()}},[R]),Y(()=>{p.current===m&&(n.current.length!==R.size&&(n.current.length=R.size),s&&s.current.length!==R.size&&(s.current.length=R.size),a.current=R.size),r(R)},[r,R,n,s,m]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{s&&(s.current=[])},[s]);const x=de(c=>(u.add(c),()=>{u.delete(c)}));Y(()=>{u.forEach(c=>c(R))},[u,R]);const T=l.useMemo(()=>({register:b,unregister:A,subscribeMapChange:x,elementsRef:n,labelsRef:s,nextIndexRef:a}),[b,A,x,n,s,a]);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:o="absolute",className:r,render:a,side:u="bottom",align:d="center",sideOffset:m=0,alignOffset:g=0,collisionBoundary:p="clipping-ancestors",collisionPadding:b,arrowPadding:A=5,sticky:R=!1,disableAnchorTracking:x,alignItemWithTrigger:T=!0,collisionAvoidance:c=$n,...w}=e,{store:i,listRef:f,labelsRef:v,alignItemWithTriggerActiveRef:V,selectedItemTextRef:B,valuesRef:k,initialValueRef:re,popupRef:ae,setValue:W}=ke(),K=mn(),z=N(i,P.open),L=N(i,P.mounted),ee=N(i,P.modal),F=N(i,P.value),te=N(i,P.openMethod),I=N(i,P.positionerElement),U=N(i,P.triggerElement),S=N(i,P.isItemEqualToValue),E=l.useRef(null),ie=l.useRef(null),[M,oe]=l.useState(T),G=L&&M&&te!=="touch";!L&&M!==T&&oe(T),Y(()=>{L||(P.scrollUpArrowVisible(i.state)&&i.set("scrollUpArrowVisible",!1),P.scrollDownArrowVisible(i.state)&&i.set("scrollDownArrowVisible",!1))},[i,L]),l.useImperativeHandle(V,()=>G),qn((G||ee)&&z&&te!=="touch",U);const O=Yn({anchor:s,floatingRootContext:K,positionMethod:o,mounted:L,side:u,sideOffset:m,align:d,alignOffset:g,arrowPadding:A,collisionBoundary:p,collisionPadding:b,sticky:R,disableAnchorTracking:x??G,collisionAvoidance:c,keepMounted:!0}),_=G?"none":O.side,ue=G?es:O.positionerStyles,ve=l.useMemo(()=>{const Q={};return z||(Q.pointerEvents="none"),{role:"presentation",hidden:!L,style:{...ue,...Q}}},[z,L,ue]),H=l.useMemo(()=>({open:z,side:_,align:O.align,anchorHidden:O.anchorHidden}),[z,_,O.align,O.anchorHidden]),fe=de(Q=>{i.set("positionerElement",Q)}),X=Ve("div",e,{ref:[n,fe],state:H,stateAttributesMapping:ln,props:[ve,w]}),me=l.useRef(0),we=de(Q=>{if(Q.size===0&&me.current===0||k.current.length===0)return;const J=me.current;if(me.current=Q.size,Q.size===J)return;const ye=xe(Dt);if(J!==0&&!i.state.multiple&&F!==null&&Nt(k.current,F,S)===-1){const ne=re.current,Ae=ne!=null&&vt(k.current,ne,S)?ne:null;W(Ae,ye),Ae===null&&(i.set("selectedIndex",null),B.current=null)}if(J!==0&&i.state.multiple&&Array.isArray(F)){const se=F.filter(ne=>vt(k.current,ne,S));(se.length!==F.length||se.some(ne=>!vt(F,ne,S)))&&(W(se,ye),se.length===0&&(i.set("selectedIndex",null),B.current=null))}if(z&&G){i.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const se={height:""};at(I,se),at(ae.current,se)}}),pe=l.useMemo(()=>({...O,side:_,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:oe,scrollUpArrowRef:E,scrollDownArrowRef:ie}),[O,_,G,oe]);return y.jsx(Xr,{elementsRef:f,labelsRef:v,onMapChange:we,children:y.jsxs(yn.Provider,{value:pe,children:[L&&ee&&y.jsx(Gn,{inert:Xn(!z),cutout:U}),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:o,...r}=e,{store:a,popupRef:u,onOpenChangeComplete:d,setOpen:m,valueRef:g,selectedItemTextRef:p,keyboardActiveRef:b,multiple:A,handleScrollArrowVisibility:R,scrollHandlerRef:x,highlightItemOnHover:T}=ke(),{side:c,align:w,alignItemWithTriggerActive:i,setControlledAlignItemWithTrigger:f,scrollDownArrowRef:v,scrollUpArrowRef:V}=Ht(),B=rs()!=null,k=mn(),{nonce:re,disableStyleElements:ae}=ls(),W=He(),K=N(a,P.id),z=N(a,P.open),L=N(a,P.mounted),ee=N(a,P.popupProps),F=N(a,P.transitionStatus),te=N(a,P.triggerElement),I=N(a,P.positionerElement),U=N(a,P.listElement),S=l.useRef(0),E=l.useRef(!1),ie=l.useRef(0),M=l.useRef(!1),oe=l.useRef({}),G=Zt(),O=de(H=>{if(!I||!u.current||!M.current)return;if(E.current||!i){R();return}const fe=I.style.top==="0px",X=I.style.bottom==="0px",me=I.getBoundingClientRect().height,we=Ot(I),pe=getComputedStyle(I),Q=parseFloat(pe.marginTop),J=parseFloat(pe.marginBottom),ye=Xt(getComputedStyle(u.current)),se=we.documentElement.clientHeight-Q-J,ne=H.scrollTop,Te=H.scrollHeight,Ae=H.clientHeight,h=Te-Ae;let j=0,C=null,$=!1;if(fe){const Z=h-ne,le=me+Z,ge=Math.min(le,se);j=ge,ge!==se?C=h:$=!0}else if(X){const Z=ne-0,le=me+Z,ge=Math.min(le,se),be=le-se;j=ge,ge!==se?C=0:($=!0,ne=ye)&&(E.current=!0),R()});l.useImperativeHandle(x,()=>O,[O]),ft({open:z,ref:u,onComplete(){z&&d?.(!0)}});const _=l.useMemo(()=>({open:z,transitionStatus:F,side:c,align:w}),[z,F,c,w]);Y(()=>{!I||!u.current||Object.keys(oe.current).length||(oe.current={top:I.style.top||"0",left:I.style.left||"0",right:I.style.right,height:I.style.height,bottom:I.style.bottom,minHeight:I.style.minHeight,maxHeight:I.style.maxHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom})},[u,I]),Y(()=>{z||i||(M.current=!1,E.current=!1,S.current=0,ie.current=0,at(I,oe.current))},[z,i,I,u]),Y(()=>{const H=u.current;if(!(!z||!te||!I||!H||a.state.transitionStatus==="ending")){if(!i){M.current=!0,G.request(R),H.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const fe=fs(H);H.style.removeProperty("--transform-origin");try{const X=getComputedStyle(I),me=getComputedStyle(H),we=Ot(te),pe=Wt(I),Q=te.getBoundingClientRect(),J=I.getBoundingClientRect(),ye=Q.left,se=Q.height,ne=U||H,Te=ne.scrollHeight,Ae=parseFloat(me.borderBottomWidth),h=parseFloat(X.marginTop)||10,j=parseFloat(X.marginBottom)||10,C=parseFloat(X.minHeight)||100,$=Xt(me),Z=5,le=5,ge=20,be=we.documentElement.clientHeight-h-j,je=we.documentElement.clientWidth,Se=be-Q.bottom+se,Me=p.current,Le=g.current;let Pe,Oe=0,Ze=0;if(Me&&Le){const D=Le.getBoundingClientRect();Pe=Me.getBoundingClientRect();const ce=D.left-ye,Ce=Pe.left-J.left,Ee=D.top-Q.top+D.height/2,Ie=Pe.top-J.top+Pe.height/2;Oe=ce-Ce,Ze=Ie-Ee}const qe=Se+Ze+j+Ae;let Ne=Math.min(be,qe);const pt=be-h-j,Be=qe-Ne,_e=Math.max(Z,ye+Oe),et=je-le,Ye=Math.max(0,_e+J.width-et);I.style.left=`${_e-Ye}px`,I.style.height=`${Ne}px`,I.style.maxHeight="auto",I.style.marginTop=`${h}px`,I.style.marginBottom=`${j}px`,H.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||Nef(!1));return}if(nt){const D=Math.max(0,be-qe);I.style.top=J.height>=pt?"0":`${D}px`,I.style.height=`${Ne}px`,ne.scrollTop=ne.scrollHeight-ne.clientHeight,S.current=Math.max(C,Ne)}else I.style.bottom="0",S.current=Math.max(C,Ne),ne.scrollTop=Be;if(Pe){const D=J.top,ce=J.height,Ce=Pe.top+Pe.height/2,Ee=ce>0?(Ce-D)/ce*100:50,Ie=ss(Ee,0,100);H.style.setProperty("--transform-origin",`50% ${Ie}%`)}(S.current===be||Ne>=$)&&(E.current=!0),R(),setTimeout(()=>{M.current=!0})}finally{fe()}})}},[a,z,I,te,g,p,u,R,i,f,G,v,V,U]),l.useEffect(()=>{if(!i||!I||!z)return;const H=Wt(I);function fe(X){m(!1,xe(er,X))}return H.addEventListener("resize",fe),()=>{H.removeEventListener("resize",fe)}},[m,i,I,z]);const ue={...U?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":A||void 0,id:`${K}-list`},onKeyDown(H){b.current=!0,B&&nr.has(H.key)&&H.stopPropagation()},onMouseMove(){b.current=!1},onPointerLeave(H){if(!T||Rn(H)||H.pointerType==="touch")return;const fe=H.currentTarget;W.start(0,()=>{a.set("activeIndex",null),fe.focus({preventScroll:!0})})},onScroll(H){U||x.current?.(H.currentTarget)},...i&&{style:U?{height:"100%"}:bn}},ve=Ve("div",e,{ref:[n,u],state:_,stateAttributesMapping:cs,props:[ee,ue,tr(F),{className:!U&&i?kt.className:void 0},r]});return y.jsxs(l.Fragment,{children:[!ae&&kt.getElement(re),y.jsx(Zn,{context:k,modal:!1,disabled:!L,restoreFocus:!0,children:ve})]})});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 o of s)n[o]=e.getPropertyValue(o),e.setProperty(o,Qt[o]);return()=>{for(const o of s)us(e,o,n[o])}}const ds=l.forwardRef(function(e,n){const{className:s,render:o,...r}=e,{store:a,scrollHandlerRef:u}=ke(),{alignItemWithTriggerActive:d}=Ht(),m=N(a,P.hasScrollArrows),g=N(a,P.openMethod),p=N(a,P.multiple),A={id:`${N(a,P.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(x){u.current?.(x.currentTarget)},...d&&{style:bn},className:m&&g!=="touch"?kt.className:void 0},R=de(x=>{a.set("listElement",x)});return Ve("div",e,{ref:[n,R],props:[A,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:o,index:r}=t,{register:a,unregister:u,subscribeMapChange:d,elementsRef:m,labelsRef:g,nextIndexRef:p}=Gr(),b=l.useRef(-1),[A,R]=l.useState(r??(o===wn.GuessFromOrder?()=>{if(b.current===-1){const c=p.current;p.current+=1,b.current=c}return b.current}:-1)),x=l.useRef(null),T=l.useCallback(c=>{if(x.current=c,A!==-1&&c!==null&&(m.current[A]=c,g)){const w=e!==void 0;g.current[A]=w?e:s?.current?.textContent??c.textContent}},[A,m,g,e,s]);return Y(()=>{if(r!=null)return;const c=x.current;if(c)return a(c,n),()=>{u(c)}},[r,a,u,n]),Y(()=>{if(r==null)return d(c=>{const w=x.current?c.get(x.current)?.index:null;w!=null&&R(w)})},[r,d,R]),l.useMemo(()=>({ref:T,index:A}),[A,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:o,value:r=null,label:a,disabled:u=!1,nativeButton:d=!1,...m}=e,g=l.useRef(null),p=ps({label:a,textRef:g,indexGuessBehavior:wn.GuessFromOrder}),{store:b,getItemProps:A,setOpen:R,setValue:x,selectionRef:T,typingRef:c,valuesRef:w,keyboardActiveRef:i,multiple:f,highlightItemOnHover:v}=ke(),V=He(),B=N(b,P.isActive,p.index),k=N(b,P.isSelected,p.index,r),re=N(b,P.isSelectedByFocus,p.index),ae=N(b,P.isItemEqualToValue),W=p.index,K=W!==-1,z=l.useRef(null),L=De(W);Y(()=>{if(!K)return;const O=w.current;return O[W]=r,()=>{delete O[W]}},[K,W,r,w]),Y(()=>{if(!K)return;const O=b.state.value;let _=O;f&&Array.isArray(O)&&O.length>0&&(_=O[O.length-1]),_!==void 0&&We(_,r,ae)&&b.set("selectedIndex",W)},[K,W,f,ae,b,r]);const ee=l.useMemo(()=>({disabled:u,selected:k,highlighted:B}),[u,k,B]),F=A({active:B,selected:k});F.onFocus=void 0,F.id=void 0;const te=l.useRef(null),I=l.useRef("mouse"),U=l.useRef(!1),{getButtonProps:S,buttonRef:E}=on({disabled:u,focusableWhenDisabled:!0,native:d});function ie(O){const _=b.state.value;if(f){const ue=Array.isArray(_)?_:[],ve=k?kr(ue,r,ae):[...ue,r];x(ve,xe(yt,O))}else x(r,xe(yt,O)),R(!1,xe(yt,O))}const M={role:"option","aria-selected":k,tabIndex:B?0:-1,onFocus(){b.set("activeIndex",W)},onMouseEnter(){!i.current&&b.state.selectedIndex===null&&b.set("activeIndex",W)},onMouseMove(){v&&b.set("activeIndex",W)},onMouseLeave(O){!v||i.current||Rn(O)||V.start(0,()=>{b.state.activeIndex===W&&b.set("activeIndex",null)})},onTouchStart(){T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(O){te.current=O.key,b.set("activeIndex",W)},onClick(O){U.current=!1,!(O.type==="keydown"&&te.current===null)&&(u||te.current===" "&&c.current||I.current!=="touch"&&!B||(te.current=null,ie(O.nativeEvent)))},onPointerEnter(O){I.current=O.pointerType},onPointerDown(O){I.current=O.pointerType,U.current=!0},onMouseUp(O){if(u)return;if(U.current){U.current=!1;return}const _=!T.current.allowSelectedMouseUp&&k,ue=!T.current.allowUnselectedMouseUp&&!k;_||ue||I.current!=="touch"&&!B||ie(O.nativeEvent)}},oe=Ve("div",e,{ref:[E,n,p.ref,z],state:ee,props:[F,M,m,S]}),G=l.useMemo(()=>({selected:k,indexRef:L,textRef:g,selectedByFocus:re,hasRegistered:K}),[k,L,g,re,K]);return y.jsx(Sn.Provider,{value:G,children:oe})})),gs=l.forwardRef(function(e,n){const s=e.keepMounted??!1,{selected:o}=Ft();return s||o?y.jsx(hs,{...e,ref:n}):null}),hs=l.memo(l.forwardRef((t,e)=>{const{render:n,className:s,keepMounted:o,...r}=t,{selected:a}=Ft(),u=l.useRef(null),{transitionStatus:d,setMounted:m}=Lt(a),g=l.useMemo(()=>({selected:a,transitionStatus:d}),[a,d]),p=Ve("span",t,{ref:[e,u],state:g,props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:cn});return ft({open:a,ref:u,onComplete(){a||m(!1)}}),p})),xs=l.memo(l.forwardRef(function(e,n){const{indexRef:s,textRef:o,selectedByFocus:r,hasRegistered:a}=Ft(),{selectedItemTextRef:u}=ke(),{className:d,render:m,...g}=e,p=l.useCallback(A=>{if(!A||!a)return;const R=u.current===null||!u.current.isConnected;(r||R&&s.current===0)&&(u.current=A)},[u,s,r,a]);return Ve("div",e,{ref:[p,n,o],props:g})})),vn=l.forwardRef(function(e,n){const{render:s,className:o,direction:r,keepMounted:a=!1,...u}=e,{store:d,popupRef:m,listRef:g,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:b}=ke(),{side:A,scrollDownArrowRef:R,scrollUpArrowRef:x}=Ht(),T=r==="up"?P.scrollUpArrowVisible:P.scrollDownArrowVisible,c=N(d,T),w=N(d,P.openMethod),i=c&&w!=="touch",f=He(),v=r==="up"?x:R,{transitionStatus:V,setMounted:B}=Lt(i);Y(()=>(b.current+=1,d.state.hasScrollArrows||d.set("hasScrollArrows",!0),()=>{b.current=Math.max(0,b.current-1),b.current===0&&d.state.hasScrollArrows&&d.set("hasScrollArrows",!1)}),[d,b]),ft({open:i,ref:v,onComplete(){i||B(!1)}});const k=l.useMemo(()=>({direction:r,visible:i,side:A,transitionStatus:V}),[r,i,A,V]),ae=Ve("div",e,{ref:[n,v],state:k,props:[{"aria-hidden":!0,children:r==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(K){if(K.movementX===0&&K.movementY===0||f.isStarted())return;d.set("activeIndex",null);function z(){const L=d.state.listElement??m.current;if(!L)return;d.set("activeIndex",null),p();const ee=L.scrollTop===0,F=Math.round(L.scrollTop+L.clientHeight)>=L.scrollHeight;if(g.current.length===0&&(r==="up"?d.set("scrollUpArrowVisible",!ee):d.set("scrollDownArrowVisible",!F)),r==="up"&&ee||r==="down"&&F){f.clear();return}if((d.state.listElement||m.current)&&g.current&&g.current.length>0){const I=g.current,U=v.current?.offsetHeight||0;if(r==="up"){let S=0;const E=L.scrollTop+U;for(let M=0;M=E){S=M;break}}const ie=Math.max(0,S-1);if(ieE){S=Math.max(0,M-1);break}}const ie=Math.min(I.length-1,S+1);if(ie>S){const M=I[ie];M&&(L.scrollTop=M.offsetTop+M.offsetHeight-L.clientHeight+U)}else L.scrollTop=L.scrollHeight-L.clientHeight}}f.start(40,z)}f.start(40,z)},onMouseLeave(){f.clear()}},u]});return i||a?ae:null}),ys=l.forwardRef(function(e,n){return y.jsx(vn,{...e,ref:n,direction:"down"})}),bs=l.forwardRef(function(e,n){return y.jsx(vn,{...e,ref:n,direction:"up"})}),It=Fr;function Tt(t){const e=Ke.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 o;e[3]!==n?(o=$e("flex flex-1 text-left",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=y.jsx(Kr,{className:o,"data-slot":"select-value",...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Mt(t){const e=Ke.c(15);let n,s,o,r,a;e[0]!==t?({className:s,size:a,id:o,children:n,...r}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=a):(n=e[1],s=e[2],o=e[3],r=e[4],a=e[5]);const u=a===void 0?"default":a;let d;e[6]!==s?(d=$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]=d):d=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=y.jsx($r,{render:y.jsx(fn,{className:"pointer-events-none size-3.5 text-muted-foreground"})}),e[8]=m):m=e[8];let g;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==u||e[13]!==d?(g=y.jsxs(zr,{className:d,"data-size":u,"data-slot":"select-trigger",id:o,...r,children:[n,m]}),e[9]=n,e[10]=o,e[11]=r,e[12]=u,e[13]=d,e[14]=g):g=e[14],g}function Ct(t){const e=Ke.c(26);let n,s,o,r,a,u,d,m;e[0]!==t?({className:s,children:n,side:r,sideOffset:a,align:u,alignOffset:d,alignItemWithTrigger:m,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=a,e[6]=u,e[7]=d,e[8]=m):(n=e[1],s=e[2],o=e[3],r=e[4],a=e[5],u=e[6],d=e[7],m=e[8]);const g=r===void 0?"bottom":r,p=a===void 0?4:a,b=u===void 0?"center":u,A=d===void 0?0:d,R=m===void 0?!0:m;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 c;e[12]!==n?(c=y.jsx(ds,{children:n}),e[12]=n,e[13]=c):c=e[13];let w;e[14]===Symbol.for("react.memo_cache_sentinel")?(w=y.jsx(ws,{}),e[14]=w):w=e[14];let i;e[15]!==o||e[16]!==x||e[17]!==c?(i=y.jsxs(as,{className:x,"data-slot":"select-content",...o,children:[T,c,w]}),e[15]=o,e[16]=x,e[17]=c,e[18]=i):i=e[18];let f;return e[19]!==b||e[20]!==R||e[21]!==A||e[22]!==g||e[23]!==p||e[24]!==i?(f=y.jsx(Yr,{children:y.jsx(ts,{align:b,alignItemWithTrigger:R,alignOffset:A,className:"isolate z-50",side:g,sideOffset:p,children:i})}),e[19]=b,e[20]=R,e[21]=A,e[22]=g,e[23]=p,e[24]=i,e[25]=f):f=e[25],f}function Et(t){const e=Ke.c(13);let n,s,o;e[0]!==t?({className:s,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=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 a;e[6]!==n?(a=y.jsx(xs,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),e[6]=n,e[7]=a):a=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 d;return e[9]!==o||e[10]!==r||e[11]!==a?(d=y.jsxs(ms,{className:r,"data-slot":"select-item",...o,children:[a,u]}),e[9]=o,e[10]=r,e[11]=a,e[12]=d):d=e[12],d}function Rs(t){const e=Ke.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 o;e[3]!==n?(o=$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]=o):o=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=y.jsx(wr,{}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o?(a=y.jsx(bs,{className:o,"data-slot":"select-scroll-up-button",...s,children:r}),e[6]=s,e[7]=o,e[8]=a):a=e[8],a}function ws(t){const e=Ke.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 o;e[3]!==n?(o=$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]=o):o=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=y.jsx(fn,{}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o?(a=y.jsx(ys,{className:o,"data-slot":"select-scroll-down-button",...s,children:r}),e[6]=s,e[7]=o,e[8]=a):a=e[8],a}const Ss=["sg-placeholder"],vs="subnet-placeholder";function ks(){const t=rr(),{data:e}=Rt(sr),{data:n}=Rt(or),{data:s}=Rt(ir),o=yr(),r=e.Images??[],a=n.KeyPairs??[],u=s.InstanceTypes?.flatMap(i=>i.InstanceType?[i.InstanceType]:[])??[],d=s.InstanceTypes?.reduce((i,f)=>{const v=f.InstanceType;return v&&(i[v]=(i[v]||0)+1),i},{})??{},m=Object.keys(d).sort(),{control:g,handleSubmit:p,register:b,watch:A,formState:{errors:R,isSubmitting:x}}=dr({resolver:pr(lr.refine(i=>i.count<=(d[i.instanceType]??1),{message:"Cannot exceed available capacity",path:["count"]})),defaultValues:{count:1}}),T=A("instanceType"),c=T?d[T]??1:1,w=async i=>{await o.mutateAsync({...i,securityGroupIds:Ss,subnetId:vs}),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."}),o.error&&y.jsx(qt,{error:o.error,msg:"Failed to create instance"}),y.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:p(w),children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"imageId",children:"Image"}),y.jsx(bt,{control:g,name:"imageId",render:({field:i})=>{const f=r.find(v=>v.ImageId===i.value);return y.jsxs(It,{onValueChange:v=>i.onChange(v),value:i.value??"",children:[y.jsx(Mt,{className:"w-full",id:"imageId",children:y.jsx(Tt,{children:f?`${f.Name||"Unnamed"} (${f.Architecture})`:""})}),y.jsx(Ct,{children:r.map(v=>y.jsxs(Et,{value:v.ImageId??"",children:[v.Name||"Unnamed"," (",v.Architecture,")"]},v.ImageId))})]})}}),R.imageId&&y.jsx("p",{className:"text-destructive text-sm",children:R.imageId.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"instanceType",children:"Instance Type"}),y.jsx(bt,{control:g,name:"instanceType",render:({field:i})=>y.jsxs(It,{onValueChange:f=>i.onChange(f),value:i.value?i.value:"",children:[y.jsx(Mt,{className:"w-full",id:"instanceType",children:y.jsx(Tt,{})}),y.jsx(Ct,{children:m.map(f=>y.jsxs(Et,{value:f,children:[f," (",d[f]," available)"]},f))})]})}),R.instanceType&&y.jsx("p",{className:"text-destructive text-sm",children:R.instanceType.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(st,{htmlFor:"keyName",children:"Key Pair"}),y.jsx(bt,{control:g,name:"keyName",render:({field:i})=>y.jsxs(It,{onValueChange:f=>i.onChange(f),value:i.value?i.value:"",children:[y.jsx(Mt,{className:"w-full",id:"keyName",children:y.jsx(Tt,{})}),y.jsx(Ct,{children:a.map(f=>y.jsx(Et,{value:f.KeyName??"",children:f.KeyName},f.KeyPairId))})]})}),R.keyName&&y.jsx("p",{className:"text-destructive text-sm",children:R.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",...b("count",{valueAsNumber:!0})}),y.jsx("p",{className:"text-muted-foreground text-xs",id:"count-description",children:T&&`Available capacity for ${T}: ${c}`}),R.count&&y.jsx("p",{className:"text-destructive text-sm",children:R.count.message})]}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx(Kt,{disabled:x||o.isPending,onClick:()=>t({to:"/ec2/describe-instances"}),type:"button",variant:"outline",children:"Cancel"}),y.jsx(Kt,{disabled:x||o.isPending||u.length===0,type:"submit",children:x||o.isPending?"Creating…":"Create Instance"})]})]})]})}export{ks as component}; +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}; diff --git a/hive/services/hiveui/frontend/dist/assets/upload-button.js b/hive/services/hiveui/frontend/dist/assets/upload-button.js index 228283f09..0c901401b 100644 --- a/hive/services/hiveui/frontend/dist/assets/upload-button.js +++ b/hive/services/hiveui/frontend/dist/assets/upload-button.js @@ -1 +1 @@ -import{g as ee,aR as be,aS as ge,aT as d,aU as $,aV as P,aW as Fe,aX as Se,aY as ke,aZ as we,a_ as Re,a$ as _e,b0 as Me,b1 as Ne,b2 as Le,b3 as He,b4 as te,b5 as y,b6 as I,b7 as je,b8 as Oe,b9 as ve,ba as se,bb as ne,bc as re,bd as ue,be as Te,bf as Pe,bg as Ue,c as U,j as u,aL as qe,bh as de,bi as ae,r as xe,bj as Ie,B as ze}from"./index.js";import{a as Ke,b as $e,c as We,e as Ve,d as Ge,h as Qe,f as Xe,g as Ye}from"./alert-dialog.js";import{D as Ze}from"./download.js";import{T as Je}from"./trash-2.js";import{u as me}from"./useMutation.js";const et=[["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"}]],tt=ee("file",et);const st=[["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"}]],nt=ee("folder",st);const rt=[["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"}]],at=ee("upload",rt),ct=typeof ReadableStream=="function"?ReadableStream:function(){};class ot extends ct{}const it=({expectedChecksum:t,checksum:e,source:s,checksumSourceLocation:n,base64Encoder:r})=>{if(!be(s))throw new Error(`@smithy/util-stream: unsupported source type ${s?.constructor?.name??s} in ChecksumStream.`);const a=r??ge;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const c=new TransformStream({start(){},async transform(i,l){e.update(i),l.enqueue(i)},async flush(i){const l=await e.digest(),m=a(l);if(t!==m){const C=new Error(`Checksum mismatch: expected "${t}" but received "${m}" in response header "${n}".`);i.error(C)}else i.terminate()}});s.pipeThrough(c);const o=c.readable;return Object.setPrototypeOf(o,ot.prototype),o};class lt{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){const n=this.byteArrays[0];return this.reset(),n}const e=this.allocByteArray(this.byteLength);let s=0;for(let n=0;nnew Uint8Array(l))];let o=-1;const i=async l=>{const{value:m,done:C}=await n.read(),x=m;if(C){if(o!==-1){const f=z(c,o);L(f)>0&&l.enqueue(f)}l.close()}else{const f=mt(x,!1);if(o!==f&&(o>=0&&l.enqueue(z(c,o)),o=f),o===-1){l.enqueue(x);return}const E=L(x);a+=E;const A=L(c[o]);if(E>=e&&A===0)l.enqueue(x);else{const p=xt(c,o,x);!r&&a>e*2&&(r=!0,s?.warn(`@smithy/util-stream - stream chunk size ${E} is below threshold of ${e}, automatically buffering.`)),p>=e?l.enqueue(z(c,o)):await i(l)}}};return new ReadableStream({pull:i})}const dt=ut;function xt(t,e,s){switch(e){case 0:return t[0]+=s,L(t[0]);case 1:case 2:return t[e].push(s),L(t[e])}}function z(t,e){switch(e){case 0:const s=t[0];return t[0]="",s;case 1:case 2:return t[e].flush()}throw new Error(`@smithy/util-stream - invalid index ${e} given to flush()`)}function L(t){return t?.byteLength??t?.length??0}function mt(t,e=!0){return e&&typeof Buffer<"u"&&t instanceof Buffer?2:t instanceof Uint8Array?1:typeof t=="string"?0:-1}const W=[d.CRC32,d.CRC32C,d.CRC64NVME,d.SHA1,d.SHA256],Ct=[d.SHA256,d.SHA1,d.CRC32,d.CRC32C,d.CRC64NVME],ht=(t,{requestChecksumRequired:e,requestAlgorithmMember:s,requestChecksumCalculation:n})=>{if(!s)return n===P.WHEN_SUPPORTED||e?$:void 0;if(!t[s])return;const r=t[s];if(!W.includes(r))throw new Error(`The checksum algorithm "${r}" is not supported by the client. Select one of ${W}.`);return r},ce=t=>t===d.MD5?"content-md5":`x-amz-checksum-${t.toLowerCase()}`,ft=(t,e)=>{const s=t.toLowerCase();for(const n of Object.keys(e))if(s===n.toLowerCase())return!0;return!1},Et=(t,e)=>{const s=t.toLowerCase();for(const n of Object.keys(e))if(n.toLowerCase().startsWith(s))return!0;return!1},Ce=t=>t!==void 0&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!Fe(t);var At=(function(){function t(){this.crc32c=new le}return t.prototype.update=function(e){Se(e)||this.crc32c.update(ke(e))},t.prototype.digest=function(){return we(this,void 0,void 0,function(){return Re(this,function(e){return[2,_e(this.crc32c.digest())]})})},t.prototype.reset=function(){this.crc32c=new le},t})(),le=(function(){function t(){this.checksum=4294967295}return t.prototype.update=function(e){var s,n;try{for(var r=Me(e),a=r.next();!a.done;a=r.next()){var c=a.value;this.checksum=this.checksum>>>8^Dt[(this.checksum^c)&255]}}catch(o){s={error:o}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return this},t.prototype.digest=function(){return(this.checksum^4294967295)>>>0},t})(),pt=[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],Dt=Ne(pt);const Bt=()=>{const e=new Array(8);for(let s=0;s<8;s++){const n=new Array(512);for(let r=0;r<256;r++){let a=BigInt(r);for(let c=0;c<8*(s+1);c++)a&1n?a=a>>1n^0x9a6c9329ac4bc9b5n:a=a>>1n;n[r*2]=Number(a>>32n&0xffffffffn),n[r*2+1]=Number(a&0xffffffffn)}e[s]=new Uint32Array(n)}return e};let K,N,V,G,Q,X,Y,Z,J;const yt=()=>{K||(K=Bt(),[N,V,G,Q,X,Y,Z,J]=K)};class bt{c1=0;c2=0;constructor(){yt(),this.reset()}update(e){const s=e.length;let n=0,r=this.c1,a=this.c2;for(;n+8<=s;){const c=((a^e[n++])&255)<<1,o=((a>>>8^e[n++])&255)<<1,i=((a>>>16^e[n++])&255)<<1,l=((a>>>24^e[n++])&255)<<1,m=((r^e[n++])&255)<<1,C=((r>>>8^e[n++])&255)<<1,x=((r>>>16^e[n++])&255)<<1,f=((r>>>24^e[n++])&255)<<1;r=J[c]^Z[o]^Y[i]^X[l]^Q[m]^G[C]^V[x]^N[f],a=J[c+1]^Z[o+1]^Y[i+1]^X[l+1]^Q[m+1]^G[C+1]^V[x+1]^N[f+1]}for(;n>>8|(r&255)<<24)>>>0,r=r>>>8^N[c],a^=N[c+1],n++}this.c1=r,this.c2=a}async digest(){const e=this.c1^4294967295,s=this.c2^4294967295;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,e&255,s>>>24,s>>>16&255,s>>>8&255,s&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const gt=()=>Le,he=(t,e)=>{switch(t){case d.MD5:return e.md5;case d.CRC32:return gt();case d.CRC32C:return At;case d.CRC64NVME:return bt;case d.SHA1:return e.sha1;case d.SHA256:return e.sha256;default:throw new Error(`Unsupported checksum algorithm: ${t}`)}},fe=(t,e)=>{const s=new t;return s.update(He(e||"")),s.digest()},Ft={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},St=(t,e)=>(s,n)=>async r=>{if(!te.isInstance(r.request)||Et("x-amz-checksum-",r.request.headers))return s(r);const{request:a,input:c}=r,{body:o,headers:i}=a,{base64Encoder:l,streamHasher:m}=t,{requestChecksumRequired:C,requestAlgorithmMember:x}=e,f=await t.requestChecksumCalculation(),E=x?.name,A=x?.httpHeader;E&&!c[E]&&(f===P.WHEN_SUPPORTED||C)&&(c[E]=$,A&&(i[A]=$));const p=ht(c,{requestChecksumRequired:C,requestAlgorithmMember:x?.name,requestChecksumCalculation:f});let B=o,b=i;if(p){switch(p){case d.CRC32:y(n,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case d.CRC32C:y(n,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case d.CRC64NVME:y(n,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case d.SHA1:y(n,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case d.SHA256:y(n,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const h=ce(p),D=he(p,t);if(Ce(o)){const{getAwsChunkedEncodingStream:g,bodyLengthChecker:F}=t;B=g(typeof t.requestStreamBufferSize=="number"&&t.requestStreamBufferSize>=8*1024?dt(o,t.requestStreamBufferSize,n.logger):o,{base64Encoder:l,bodyLengthChecker:F,checksumLocationName:h,checksumAlgorithmFn:D,streamHasher:m}),b={...i,"content-encoding":i["content-encoding"]?`${i["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":i["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":h},delete b["content-length"]}else if(!ft(h,i)){const g=await fe(D,o);b={...i,[h]:l(g)}}}try{return await s({...r,request:{...a,headers:b,body:B}})}catch(h){if(h instanceof Error&&h.name==="InvalidChunkSizeError")try{h.message.endsWith(".")||(h.message+="."),h.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw h}},kt={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},wt=(t,e)=>(s,n)=>async r=>{const a=r.input,{requestValidationModeMember:c}=e,o=await t.requestChecksumCalculation(),i=await t.responseChecksumValidation();switch(o){case P.WHEN_REQUIRED:y(n,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case P.WHEN_SUPPORTED:y(n,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(i){case I.WHEN_REQUIRED:y(n,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case I.WHEN_SUPPORTED:y(n,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return c&&!a[c]&&i===I.WHEN_SUPPORTED&&(a[c]="ENABLED"),s(r)},Ee=(t=[])=>{const e=[];for(const s of Ct)!t.includes(s)||!W.includes(s)||e.push(s);return e},Rt=t=>{const e=t.lastIndexOf("-");if(e!==-1){const s=t.slice(e+1);if(!s.startsWith("0")){const n=parseInt(s,10);if(!isNaN(n)&&n>=1&&n<=1e4)return!0}}return!1},_t=async(t,{checksumAlgorithmFn:e,base64Encoder:s})=>s(await fe(e,t)),Mt=async(t,{config:e,responseAlgorithms:s,logger:n})=>{const r=Ee(s),{body:a,headers:c}=t;for(const o of r){const i=ce(o),l=c[i];if(l){let m;try{m=he(o,e)}catch(f){if(o===d.CRC64NVME){n?.warn(`Skipping ${d.CRC64NVME} checksum validation: ${f.message}`);continue}throw f}const{base64Encoder:C}=e;if(Ce(a)){t.body=it({expectedChecksum:l,checksumSourceLocation:i,checksum:new m,source:a,base64Encoder:C});return}const x=await _t(a,{checksumAlgorithmFn:m,base64Encoder:C});if(x===l)break;throw new Error(`Checksum mismatch: expected "${x}" but received "${l}" in response header "${i}".`)}}},Nt={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Lt=(t,e)=>(s,n)=>async r=>{if(!te.isInstance(r.request))return s(r);const a=r.input,c=await s(r),o=c.response,{requestValidationModeMember:i,responseAlgorithms:l}=e;if(i&&a[i]==="ENABLED"){const{clientName:m,commandName:C}=n;if(m==="S3Client"&&C==="GetObjectCommand"&&Ee(l).every(f=>{const E=ce(f),A=o.headers[E];return!A||Rt(A)}))return c;await Mt(o,{config:t,responseAlgorithms:l,logger:n.logger})}return c},Ae=(t,e)=>({applyToStack:s=>{s.add(St(t,e),Ft),s.addRelativeTo(wt(t,e),kt),s.addRelativeTo(Lt(t,e),Nt)}}),Ht="content-length",jt="x-amz-decoded-content-length";function Ot(){return(t,e)=>async s=>{const{request:n}=s;if(te.isInstance(n)&&!(Ht in n.headers)&&!(jt in n.headers)){const r="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 e?.logger?.warn=="function"&&!(e.logger instanceof je)?e.logger.warn(r):console.warn(r)}return t({...s})}}const vt={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Tt=t=>({applyToStack:e=>{e.add(Ot(),vt)}}),Pt=t=>(e,s)=>async n=>{const r=await e(n),{response:a}=r;if(Oe.isInstance(a)&&a.headers.expires){a.headers.expiresstring=a.headers.expires;try{ve(a.headers.expires)}catch(c){s.logger?.warn(`AWS SDK Warning for ${s.clientName}::${s.commandName} response parsing (${a.headers.expires}): ${c}`),delete a.headers.expires}}return r},Ut={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},qt=t=>({applyToStack:e=>{e.addRelativeTo(Pt(),Ut)}});function It(t){return e=>async s=>{const n={...s.input},r=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const a of r){const c=n[a.target];if(c){let o;typeof c=="string"?Kt(c,t)?o=t.base64Decoder(c):(o=t.utf8Decoder(c),n[a.target]=t.base64Encoder(o)):(o=ArrayBuffer.isView(c)?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):new Uint8Array(c),n[a.target]=t.base64Encoder(o));const i=new t.md5;i.update(o),n[a.hash]=t.base64Encoder(await i.digest())}}return e({...s,input:n})}}const zt={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},pe=t=>({applyToStack:e=>{e.add(It(t),zt)}});function Kt(t,e){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return!1;try{return e.base64Decoder(t).length===32}catch{return!1}}class $t extends se.classBuilder().ep({...ne,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,s,n,r){return[re(n,e.getEndpointParameterInstructions()),ue(n)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Te).build(){}class Wt extends se.classBuilder().ep({...ne,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,s,n,r){return[re(n,e.getEndpointParameterInstructions()),Ae(n,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),pe(n),qt()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Pe).build(){}class Vt extends se.classBuilder().ep({...ne,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,s,n,r){return[re(n,e.getEndpointParameterInstructions()),Ae(n,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Tt(),ue(n),pe(n)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(Ue).build(){}function ns(t){const e=U.c(9),{folderName:s,fullPrefix:n,bucketName:r}=t;let a;e[0]!==r||e[1]!==n?(a={bucket:r,_splat:n},e[0]=r,e[1]=n,e[2]=a):a=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u.jsx(nt,{className:"size-5 text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==s?(o=u.jsx("span",{className:"font-medium",children:s}),e[4]=s,e[5]=o):o=e[5];let i;return e[6]!==a||e[7]!==o?(i=u.jsxs(qe,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:a,to:"/s3/ls/$bucket/$",children:[c,o]}),e[6]=a,e[7]=o,e[8]=i):i=e[8],i}function Gt(){const t=U.c(2),e=de();let s;return t[0]!==e?(s={mutationFn:Qt,onSuccess:(n,r)=>{e.invalidateQueries({queryKey:["s3","buckets",r.bucket,"objects"]})}},t[0]=e,t[1]=s):s=t[1],me(s)}async function Qt(t){const{bucket:e,key:s,file:n}=t,r=await n.arrayBuffer(),a=new Uint8Array(r),c=new Vt({Bucket:e,Key:s,Body:a,ContentType:n.type});return await ae().send(c)}function Xt(){const t=U.c(2),e=de();let s;return t[0]!==e?(s={mutationFn:Yt,onSuccess:(n,r)=>{e.invalidateQueries({queryKey:["s3","buckets",r.bucket,"objects"]})}},t[0]=e,t[1]=s):s=t[1],me(s)}async function Yt(t){const{bucket:e,key:s}=t,n=new $t({Bucket:e,Key:s});return await ae().send(n)}function rs(t){const e=U.c(46),{object:s,bucketName:n,displayName:r,fullKey:a}=t,[c,o]=xe.useState(!1),i=Xt();let l;e[0]!==n||e[1]!==r||e[2]!==a?(l=async function(){try{const Be=new Wt({Bucket:n,Key:a}),oe=await ae().send(Be);if(oe.Body){const ye=await oe.Body.transformToByteArray(),ie=URL.createObjectURL(new Blob([ye])),M=document.createElement("a");M.href=ie,M.download=r,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(ie)}}catch{throw new Error("Failed to download object")}},e[0]=n,e[1]=r,e[2]=a,e[3]=l):l=e[3];const m=l;let C;e[4]!==n||e[5]!==i||e[6]!==a?(C=async function(){await i.mutateAsync({bucket:n,key:a}),o(!1)},e[4]=n,e[5]=i,e[6]=a,e[7]=C):C=e[7];const x=C,f=s.Key;let E;e[8]===Symbol.for("react.memo_cache_sentinel")?(E=u.jsx(tt,{className:"size-5 text-muted-foreground"}),e[8]=E):E=e[8];let A;e[9]!==r?(A=u.jsx("h3",{className:"font-medium",children:r}),e[9]=r,e[10]=A):A=e[10];let p;e[11]!==s.LastModified?(p=s.LastModified&&u.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",s.LastModified.toLocaleString()]}),e[11]=s.LastModified,e[12]=p):p=e[12];let B;e[13]!==A||e[14]!==p?(B=u.jsxs("div",{className:"flex items-center gap-3",children:[E,u.jsxs("div",{children:[A,p]})]}),e[13]=A,e[14]=p,e[15]=B):B=e[15];const b=s.Size||0;let h;e[16]!==b?(h=Ie(b),e[16]=b,e[17]=h):h=e[17];let D;e[18]!==h?(D=u.jsx("div",{className:"text-muted-foreground text-sm",children:h}),e[18]=h,e[19]=D):D=e[19];let g;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=u.jsx(Ze,{className:"size-4"}),e[20]=g):g=e[20];let F;e[21]!==m?(F=u.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:m,type:"button",children:g}),e[21]=m,e[22]=F):F=e[22];let H;e[23]===Symbol.for("react.memo_cache_sentinel")?(H=()=>o(!0),e[23]=H):H=e[23];let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=u.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:H,type:"button",children:u.jsx(Je,{className:"size-4"})}),e[24]=j):j=e[24];let S;e[25]!==D||e[26]!==F?(S=u.jsxs("div",{className:"flex items-center gap-3",children:[D,F,j]}),e[25]=D,e[26]=F,e[27]=S):S=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=u.jsx(Ke,{children:"Delete Object"}),e[28]=O):O=e[28];let k;e[29]!==r?(k=u.jsxs($e,{children:[O,u.jsxs(We,{children:["Are you sure you want to delete ",u.jsx("strong",{children:r}),"? This action cannot be undone."]})]}),e[29]=r,e[30]=k):k=e[30];let v;e[31]===Symbol.for("react.memo_cache_sentinel")?(v=u.jsx(Ve,{children:"Cancel"}),e[31]=v):v=e[31];const q=i.isPending?"Deleting…":"Delete";let w;e[32]!==x||e[33]!==q?(w=u.jsxs(Ge,{children:[v,u.jsx(Qe,{className:"bg-destructive hover:bg-destructive/90",onClick:x,children:q})]}),e[32]=x,e[33]=q,e[34]=w):w=e[34];let R;e[35]!==k||e[36]!==w?(R=u.jsxs(Xe,{children:[k,w]}),e[35]=k,e[36]=w,e[37]=R):R=e[37];let _;e[38]!==c||e[39]!==R?(_=u.jsx(Ye,{onOpenChange:o,open:c,children:R}),e[38]=c,e[39]=R,e[40]=_):_=e[40];let T;return e[41]!==s.Key||e[42]!==S||e[43]!==_||e[44]!==B?(T=u.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[B,S,_]},f),e[41]=s.Key,e[42]=S,e[43]=_,e[44]=B,e[45]=T):T=e[45],T}function as({bucket:t,prefix:e=""}){const s=xe.useRef(null),n=Gt();async function r(a){const c=a.target.files;if(!(!c||c.length===0))try{await Promise.all(Array.from(c).map(o=>{const i=`${e}${o.name}`;return n.mutateAsync({bucket:t,key:i,file:o})}))}finally{s.current&&(s.current.value="")}}return u.jsxs(u.Fragment,{children:[u.jsx("input",{accept:"*/*",className:"hidden",multiple:!0,onChange:r,ref:s,type:"file"}),u.jsxs(ze,{disabled:n.isPending,onClick:()=>s.current?.click(),size:"sm",children:[u.jsx(at,{className:"mr-2 size-4"}),n.isPending?"Uploading…":"Upload Files"]})]})}export{ns as F,rs as O,as as U}; +import{g as oe,aR as De,aS as ge,aT as d,aU as Y,aV as z,aW as Fe,aX as Se,aY as ke,aZ as we,a_ as Re,a$ as Me,b0 as _e,b1 as Ne,b2 as Le,b3 as He,b4 as ce,b5 as b,b6 as G,b7 as Pe,b8 as Ue,b9 as je,ba as S,bb as k,bc as w,bd as H,be as Oe,bf as Te,bg as ve,bh as Ie,bi as Ke,bj as qe,bk as ze,c as $,j as u,aL as $e,bl as xe,bm as W,r as Ce,bn as We,B as Ve}from"./index.js";import{a as Ge,b as Qe,c as Xe,e as Ye,d as Ze,h as Je,f as et,g as tt}from"./alert-dialog.js";import{D as st}from"./download.js";import{T as nt}from"./trash-2.js";import{u as he}from"./useMutation.js";const rt=[["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"}]],at=oe("file",rt);const ot=[["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"}]],ct=oe("folder",ot);const it=[["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"}]],lt=oe("upload",it),ut=typeof ReadableStream=="function"?ReadableStream:function(){};class dt extends ut{}const mt=({expectedChecksum:t,checksum:e,source:n,checksumSourceLocation:s,base64Encoder:r})=>{if(!De(n))throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);const a=r??ge;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const o=new TransformStream({start(){},async transform(i,l){e.update(i),l.enqueue(i)},async flush(i){const l=await e.digest(),m=a(l);if(t!==m){const x=new Error(`Checksum mismatch: expected "${t}" but received "${m}" in response header "${s}".`);i.error(x)}else i.terminate()}});n.pipeThrough(o);const c=o.readable;return Object.setPrototypeOf(c,dt.prototype),c};class xt{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){const s=this.byteArrays[0];return this.reset(),s}const e=this.allocByteArray(this.byteLength);let n=0;for(let s=0;snew Uint8Array(l))];let c=-1;const i=async l=>{const{value:m,done:x}=await s.read(),C=m;if(x){if(c!==-1){const f=Q(o,c);j(f)>0&&l.enqueue(f)}l.close()}else{const f=Et(C,!1);if(c!==f&&(c>=0&&l.enqueue(Q(o,c)),c=f),c===-1){l.enqueue(C);return}const E=j(C);a+=E;const p=j(o[c]);if(E>=e&&p===0)l.enqueue(C);else{const A=ft(o,c,C);!r&&a>e*2&&(r=!0,n?.warn(`@smithy/util-stream - stream chunk size ${E} is below threshold of ${e}, automatically buffering.`)),A>=e?l.enqueue(Q(o,c)):await i(l)}}};return new ReadableStream({pull:i})}const ht=Ct;function ft(t,e,n){switch(e){case 0:return t[0]+=n,j(t[0]);case 1:case 2:return t[e].push(n),j(t[e])}}function Q(t,e){switch(e){case 0:const n=t[0];return t[0]="",n;case 1:case 2:return t[e].flush()}throw new Error(`@smithy/util-stream - invalid index ${e} given to flush()`)}function j(t){return t?.byteLength??t?.length??0}function Et(t,e=!0){return e&&typeof Buffer<"u"&&t instanceof Buffer?2:t instanceof Uint8Array?1:typeof t=="string"?0:-1}const Z=[d.CRC32,d.CRC32C,d.CRC64NVME,d.SHA1,d.SHA256],pt=[d.SHA256,d.SHA1,d.CRC32,d.CRC32C,d.CRC64NVME],At=(t,{requestChecksumRequired:e,requestAlgorithmMember:n,requestChecksumCalculation:s})=>{if(!n)return s===z.WHEN_SUPPORTED||e?Y:void 0;if(!t[n])return;const r=t[n];if(!Z.includes(r))throw new Error(`The checksum algorithm "${r}" is not supported by the client. Select one of ${Z}.`);return r},ie=t=>t===d.MD5?"content-md5":`x-amz-checksum-${t.toLowerCase()}`,yt=(t,e)=>{const n=t.toLowerCase();for(const s of Object.keys(e))if(n===s.toLowerCase())return!0;return!1},Bt=(t,e)=>{const n=t.toLowerCase();for(const s of Object.keys(e))if(s.toLowerCase().startsWith(n))return!0;return!1},fe=t=>t!==void 0&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!Fe(t);var bt=(function(){function t(){this.crc32c=new me}return t.prototype.update=function(e){Se(e)||this.crc32c.update(ke(e))},t.prototype.digest=function(){return we(this,void 0,void 0,function(){return Re(this,function(e){return[2,Me(this.crc32c.digest())]})})},t.prototype.reset=function(){this.crc32c=new me},t})(),me=(function(){function t(){this.checksum=4294967295}return t.prototype.update=function(e){var n,s;try{for(var r=_e(e),a=r.next();!a.done;a=r.next()){var o=a.value;this.checksum=this.checksum>>>8^gt[(this.checksum^o)&255]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(s=r.return)&&s.call(r)}finally{if(n)throw n.error}}return this},t.prototype.digest=function(){return(this.checksum^4294967295)>>>0},t})(),Dt=[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],gt=Ne(Dt);const Ft=()=>{const e=new Array(8);for(let n=0;n<8;n++){const s=new Array(512);for(let r=0;r<256;r++){let a=BigInt(r);for(let o=0;o<8*(n+1);o++)a&1n?a=a>>1n^0x9a6c9329ac4bc9b5n:a=a>>1n;s[r*2]=Number(a>>32n&0xffffffffn),s[r*2+1]=Number(a&0xffffffffn)}e[n]=new Uint32Array(s)}return e};let X,U,J,ee,te,se,ne,re,ae;const St=()=>{X||(X=Ft(),[U,J,ee,te,se,ne,re,ae]=X)};class kt{c1=0;c2=0;constructor(){St(),this.reset()}update(e){const n=e.length;let s=0,r=this.c1,a=this.c2;for(;s+8<=n;){const o=((a^e[s++])&255)<<1,c=((a>>>8^e[s++])&255)<<1,i=((a>>>16^e[s++])&255)<<1,l=((a>>>24^e[s++])&255)<<1,m=((r^e[s++])&255)<<1,x=((r>>>8^e[s++])&255)<<1,C=((r>>>16^e[s++])&255)<<1,f=((r>>>24^e[s++])&255)<<1;r=ae[o]^re[c]^ne[i]^se[l]^te[m]^ee[x]^J[C]^U[f],a=ae[o+1]^re[c+1]^ne[i+1]^se[l+1]^te[m+1]^ee[x+1]^J[C+1]^U[f+1]}for(;s>>8|(r&255)<<24)>>>0,r=r>>>8^U[o],a^=U[o+1],s++}this.c1=r,this.c2=a}async digest(){const e=this.c1^4294967295,n=this.c2^4294967295;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const wt=()=>Le,Ee=(t,e)=>{switch(t){case d.MD5:return e.md5;case d.CRC32:return wt();case d.CRC32C:return bt;case d.CRC64NVME:return kt;case d.SHA1:return e.sha1;case d.SHA256:return e.sha256;default:throw new Error(`Unsupported checksum algorithm: ${t}`)}},pe=(t,e)=>{const n=new t;return n.update(He(e||"")),n.digest()},Rt={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},Mt=(t,e)=>(n,s)=>async r=>{if(!ce.isInstance(r.request)||Bt("x-amz-checksum-",r.request.headers))return n(r);const{request:a,input:o}=r,{body:c,headers:i}=a,{base64Encoder:l,streamHasher:m}=t,{requestChecksumRequired:x,requestAlgorithmMember:C}=e,f=await t.requestChecksumCalculation(),E=C?.name,p=C?.httpHeader;E&&!o[E]&&(f===z.WHEN_SUPPORTED||x)&&(o[E]=Y,p&&(i[p]=Y));const A=At(o,{requestChecksumRequired:x,requestAlgorithmMember:C?.name,requestChecksumCalculation:f});let B=c,D=i;if(A){switch(A){case d.CRC32:b(s,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case d.CRC32C:b(s,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case d.CRC64NVME:b(s,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case d.SHA1:b(s,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case d.SHA256:b(s,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const h=ie(A),y=Ee(A,t);if(fe(c)){const{getAwsChunkedEncodingStream:g,bodyLengthChecker:F}=t;B=g(typeof t.requestStreamBufferSize=="number"&&t.requestStreamBufferSize>=8*1024?ht(c,t.requestStreamBufferSize,s.logger):c,{base64Encoder:l,bodyLengthChecker:F,checksumLocationName:h,checksumAlgorithmFn:y,streamHasher:m}),D={...i,"content-encoding":i["content-encoding"]?`${i["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":i["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":h},delete D["content-length"]}else if(!yt(h,i)){const g=await pe(y,c);D={...i,[h]:l(g)}}}try{return await n({...r,request:{...a,headers:D,body:B}})}catch(h){if(h instanceof Error&&h.name==="InvalidChunkSizeError")try{h.message.endsWith(".")||(h.message+="."),h.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw h}},_t={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},Nt=(t,e)=>(n,s)=>async r=>{const a=r.input,{requestValidationModeMember:o}=e,c=await t.requestChecksumCalculation(),i=await t.responseChecksumValidation();switch(c){case z.WHEN_REQUIRED:b(s,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case z.WHEN_SUPPORTED:b(s,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(i){case G.WHEN_REQUIRED:b(s,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case G.WHEN_SUPPORTED:b(s,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return o&&!a[o]&&i===G.WHEN_SUPPORTED&&(a[o]="ENABLED"),n(r)},Ae=(t=[])=>{const e=[];for(const n of pt)!t.includes(n)||!Z.includes(n)||e.push(n);return e},Lt=t=>{const e=t.lastIndexOf("-");if(e!==-1){const n=t.slice(e+1);if(!n.startsWith("0")){const s=parseInt(n,10);if(!isNaN(s)&&s>=1&&s<=1e4)return!0}}return!1},Ht=async(t,{checksumAlgorithmFn:e,base64Encoder:n})=>n(await pe(e,t)),Pt=async(t,{config:e,responseAlgorithms:n,logger:s})=>{const r=Ae(n),{body:a,headers:o}=t;for(const c of r){const i=ie(c),l=o[i];if(l){let m;try{m=Ee(c,e)}catch(f){if(c===d.CRC64NVME){s?.warn(`Skipping ${d.CRC64NVME} checksum validation: ${f.message}`);continue}throw f}const{base64Encoder:x}=e;if(fe(a)){t.body=mt({expectedChecksum:l,checksumSourceLocation:i,checksum:new m,source:a,base64Encoder:x});return}const C=await Ht(a,{checksumAlgorithmFn:m,base64Encoder:x});if(C===l)break;throw new Error(`Checksum mismatch: expected "${C}" but received "${l}" in response header "${i}".`)}}},Ut={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},jt=(t,e)=>(n,s)=>async r=>{if(!ce.isInstance(r.request))return n(r);const a=r.input,o=await n(r),c=o.response,{requestValidationModeMember:i,responseAlgorithms:l}=e;if(i&&a[i]==="ENABLED"){const{clientName:m,commandName:x}=s;if(m==="S3Client"&&x==="GetObjectCommand"&&Ae(l).every(f=>{const E=ie(f),p=c.headers[E];return!p||Lt(p)}))return o;await Pt(c,{config:t,responseAlgorithms:l,logger:s.logger})}return o},le=(t,e)=>({applyToStack:n=>{n.add(Mt(t,e),Rt),n.addRelativeTo(Nt(t,e),_t),n.addRelativeTo(jt(t,e),Ut)}}),Ot="content-length",Tt="x-amz-decoded-content-length";function vt(){return(t,e)=>async n=>{const{request:s}=n;if(ce.isInstance(s)&&!(Ot in s.headers)&&!(Tt in s.headers)){const r="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 e?.logger?.warn=="function"&&!(e.logger instanceof Pe)?e.logger.warn(r):console.warn(r)}return t({...n})}}const It={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Kt=t=>({applyToStack:e=>{e.add(vt(),It)}}),qt=t=>(e,n)=>async s=>{const r=await e(s),{response:a}=r;if(Ue.isInstance(a)&&a.headers.expires){a.headers.expiresstring=a.headers.expires;try{je(a.headers.expires)}catch(o){n.logger?.warn(`AWS SDK Warning for ${n.clientName}::${n.commandName} response parsing (${a.headers.expires}): ${o}`),delete a.headers.expires}}return r},zt={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},$t=t=>({applyToStack:e=>{e.addRelativeTo(qt(),zt)}});class Wt extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),H(s)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Oe).build(){}function Vt(t){return e=>async n=>{const s={...n.input},r=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const a of r){const o=s[a.target];if(o){let c;typeof o=="string"?Qt(o,t)?c=t.base64Decoder(o):(c=t.utf8Decoder(o),s[a.target]=t.base64Encoder(c)):(c=ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o),s[a.target]=t.base64Encoder(c));const i=new t.md5;i.update(c),s[a.hash]=t.base64Encoder(await i.digest())}}return e({...n,input:s})}}const Gt={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},O=t=>({applyToStack:e=>{e.add(Vt(t),Gt)}});function Qt(t,e){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return!1;try{return e.base64Decoder(t).length===32}catch{return!1}}class Xt extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),H(s),O(s)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Te).build(){}class Yt extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),H(s),O(s)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(ve).build(){}class Zt extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),H(s)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Ie).build(){}class Jt extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),le(s,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),O(s),$t()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Ke).build(){}class es extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),le(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Kt(),H(s),O(s)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(qe).build(){}class ts extends S.classBuilder().ep({...k,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,n,s,r){return[w(s,e.getEndpointParameterInstructions()),le(s,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),H(s),O(s)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(ze).build(){}function Cs(t){const e=$.c(9),{folderName:n,fullPrefix:s,bucketName:r}=t;let a;e[0]!==r||e[1]!==s?(a={bucket:r,_splat:s},e[0]=r,e[1]=s,e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=u.jsx(ct,{className:"size-5 text-muted-foreground"}),e[3]=o):o=e[3];let c;e[4]!==n?(c=u.jsx("span",{className:"font-medium",children:n}),e[4]=n,e[5]=c):c=e[5];let i;return e[6]!==a||e[7]!==c?(i=u.jsxs($e,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:a,to:"/s3/ls/$bucket/$",children:[o,c]}),e[6]=a,e[7]=c,e[8]=i):i=e[8],i}const ss=4*1024*1024,ns=5*1024*1024;async function rs(t,e,n){const s=W(),{UploadId:r}=await s.send(new Yt({Bucket:t,Key:e,ContentType:n.type})),a=[];try{let o=1,c=0;for(;c{e.invalidateQueries({queryKey:["s3","buckets",r.bucket,"objects"]})}},t[0]=e,t[1]=n):n=t[1],he(n)}async function os(t){const{bucket:e,key:n,file:s}=t;if(s.size>ss)return await rs(e,n,s);const r=await s.arrayBuffer(),a=new Uint8Array(r),o=new es({Bucket:e,Key:n,Body:a,ContentType:s.type});return await W().send(o)}function cs(){const t=$.c(2),e=xe();let n;return t[0]!==e?(n={mutationFn:is,onSuccess:(s,r)=>{e.invalidateQueries({queryKey:["s3","buckets",r.bucket,"objects"]})}},t[0]=e,t[1]=n):n=t[1],he(n)}async function is(t){const{bucket:e,key:n}=t,s=new Zt({Bucket:e,Key:n});return await W().send(s)}function hs(t){const e=$.c(46),{object:n,bucketName:s,displayName:r,fullKey:a}=t,[o,c]=Ce.useState(!1),i=cs();let l;e[0]!==s||e[1]!==r||e[2]!==a?(l=async function(){try{const Be=new Jt({Bucket:s,Key:a}),ue=await W().send(Be);if(ue.Body){const be=await ue.Body.transformToByteArray(),de=URL.createObjectURL(new Blob([be])),P=document.createElement("a");P.href=de,P.download=r,document.body.appendChild(P),P.click(),document.body.removeChild(P),URL.revokeObjectURL(de)}}catch{throw new Error("Failed to download object")}},e[0]=s,e[1]=r,e[2]=a,e[3]=l):l=e[3];const m=l;let x;e[4]!==s||e[5]!==i||e[6]!==a?(x=async function(){await i.mutateAsync({bucket:s,key:a}),c(!1)},e[4]=s,e[5]=i,e[6]=a,e[7]=x):x=e[7];const C=x,f=n.Key;let E;e[8]===Symbol.for("react.memo_cache_sentinel")?(E=u.jsx(at,{className:"size-5 text-muted-foreground"}),e[8]=E):E=e[8];let p;e[9]!==r?(p=u.jsx("h3",{className:"font-medium",children:r}),e[9]=r,e[10]=p):p=e[10];let A;e[11]!==n.LastModified?(A=n.LastModified&&u.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",n.LastModified.toLocaleString()]}),e[11]=n.LastModified,e[12]=A):A=e[12];let B;e[13]!==p||e[14]!==A?(B=u.jsxs("div",{className:"flex items-center gap-3",children:[E,u.jsxs("div",{children:[p,A]})]}),e[13]=p,e[14]=A,e[15]=B):B=e[15];const D=n.Size||0;let h;e[16]!==D?(h=We(D),e[16]=D,e[17]=h):h=e[17];let y;e[18]!==h?(y=u.jsx("div",{className:"text-muted-foreground text-sm",children:h}),e[18]=h,e[19]=y):y=e[19];let g;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=u.jsx(st,{className:"size-4"}),e[20]=g):g=e[20];let F;e[21]!==m?(F=u.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:m,type:"button",children:g}),e[21]=m,e[22]=F):F=e[22];let T;e[23]===Symbol.for("react.memo_cache_sentinel")?(T=()=>c(!0),e[23]=T):T=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=u.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:T,type:"button",children:u.jsx(nt,{className:"size-4"})}),e[24]=v):v=e[24];let R;e[25]!==y||e[26]!==F?(R=u.jsxs("div",{className:"flex items-center gap-3",children:[y,F,v]}),e[25]=y,e[26]=F,e[27]=R):R=e[27];let I;e[28]===Symbol.for("react.memo_cache_sentinel")?(I=u.jsx(Ge,{children:"Delete Object"}),e[28]=I):I=e[28];let M;e[29]!==r?(M=u.jsxs(Qe,{children:[I,u.jsxs(Xe,{children:["Are you sure you want to delete ",u.jsx("strong",{children:r}),"? This action cannot be undone."]})]}),e[29]=r,e[30]=M):M=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=u.jsx(Ye,{children:"Cancel"}),e[31]=K):K=e[31];const V=i.isPending?"Deleting…":"Delete";let _;e[32]!==C||e[33]!==V?(_=u.jsxs(Ze,{children:[K,u.jsx(Je,{className:"bg-destructive hover:bg-destructive/90",onClick:C,children:V})]}),e[32]=C,e[33]=V,e[34]=_):_=e[34];let N;e[35]!==M||e[36]!==_?(N=u.jsxs(et,{children:[M,_]}),e[35]=M,e[36]=_,e[37]=N):N=e[37];let L;e[38]!==o||e[39]!==N?(L=u.jsx(tt,{onOpenChange:c,open:o,children:N}),e[38]=o,e[39]=N,e[40]=L):L=e[40];let q;return e[41]!==n.Key||e[42]!==R||e[43]!==L||e[44]!==B?(q=u.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[B,R,L]},f),e[41]=n.Key,e[42]=R,e[43]=L,e[44]=B,e[45]=q):q=e[45],q}function fs({bucket:t,prefix:e=""}){const n=Ce.useRef(null),s=as();async function r(a){const o=a.target.files;if(!(!o||o.length===0))try{await Promise.all(Array.from(o).map(c=>{const i=`${e}${c.name}`;return s.mutateAsync({bucket:t,key:i,file:c})}))}finally{n.current&&(n.current.value="")}}return u.jsxs(u.Fragment,{children:[u.jsx("input",{accept:"*/*",className:"hidden",multiple:!0,onChange:r,ref:n,type:"file"}),u.jsxs(Ve,{disabled:s.isPending,onClick:()=>n.current?.click(),size:"sm",children:[u.jsx(lt,{className:"mr-2 size-4"}),s.isPending?"Uploading…":"Upload Files"]})]})}export{Cs as F,hs as O,fs as U}; diff --git a/hive/services/hiveui/frontend/dist/assets/useMutation.js b/hive/services/hiveui/frontend/dist/assets/useMutation.js index 6ecbf8256..cbb7f4a35 100644 --- a/hive/services/hiveui/frontend/dist/assets/useMutation.js +++ b/hive/services/hiveui/frontend/dist/assets/useMutation.js @@ -1 +1 @@ -import{bM as l,bN as b,bO as a,bP as d,bQ as h,bh as p,r as o,bR as m,bS 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),b(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??d();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{bQ as l,bR as b,bS as a,bT as d,bU as h,bl as p,r as o,bV as m,bW 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),b(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??d();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 8dfb2c92b..e31a873fa 100644 --- a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js +++ b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js @@ -1 +1 @@ -import{bM as X,bV as N,bW as l,bN as Q,bX as g,bR as M,bY as _,bZ as B,b_ as Y,b$ as C,c0 as Z,c1 as $,c2 as A,bQ as V,r as d,bS as z,bh as G}from"./index.js";var J=class extends X{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(M)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(_||this.#e.isStale||!B(t))return;const s=Y(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,!(_||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||Z.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,...$(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){V.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"?z(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||z(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=G(),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(V.batchCalls(o)):M;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&&!_&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(M).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},J)}export{bt as u}; +import{bQ as Z,bZ as N,b_ as l,bR as Q,b$ as g,bV as _,c0 as M,c1 as B,c2 as $,c3 as C,c4 as G,c5 as J,c6 as A,bU as V,r as d,bW as z,bl as X}from"./index.js";var Y=class extends Z{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=$(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||G.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,...J(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){V.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"?z(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||z(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=X(),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(V.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},Y)}export{bt as u}; diff --git a/hive/services/hiveui/frontend/src/mutations/s3.ts b/hive/services/hiveui/frontend/src/mutations/s3.ts index 107f27375..255020826 100644 --- a/hive/services/hiveui/frontend/src/mutations/s3.ts +++ b/hive/services/hiveui/frontend/src/mutations/s3.ts @@ -1,21 +1,91 @@ -import { DeleteObjectCommand, PutObjectCommand } from "@aws-sdk/client-s3" +import { + AbortMultipartUploadCommand, + CompleteMultipartUploadCommand, + CreateMultipartUploadCommand, + DeleteObjectCommand, + PutObjectCommand, + UploadPartCommand, +} from "@aws-sdk/client-s3" import { useMutation, useQueryClient } from "@tanstack/react-query" import { getS3Client } from "@/lib/awsClient" +const MULTIPART_THRESHOLD = 4 * 1024 * 1024 // 4 MB +const PART_SIZE = 5 * 1024 * 1024 // 5 MB per part + +interface CompletedPart { + ETag: string + PartNumber: number +} + interface UploadObjectParams { bucket: string key: string file: File } +async function uploadMultipart(bucket: string, key: string, file: File) { + const client = getS3Client() + + const { UploadId } = await client.send( + new CreateMultipartUploadCommand({ + Bucket: bucket, + Key: key, + ContentType: file.type, + }), + ) + + if (!UploadId) { + throw new Error("Failed to initialize multipart upload: missing UploadId") + } + + const completedParts: CompletedPart[] = [] + + try { + for (let offset = 0, partNumber = 1; offset < file.size; partNumber++) { + const end = Math.min(offset + PART_SIZE, file.size) + const body = new Uint8Array(await file.slice(offset, end).arrayBuffer()) + + const { ETag } = await client.send( + new UploadPartCommand({ + Bucket: bucket, + Key: key, + UploadId, + PartNumber: partNumber, + Body: body, + }), + ) + + completedParts.push({ ETag: ETag ?? "", PartNumber: partNumber }) + offset = end + } + + return await client.send( + new CompleteMultipartUploadCommand({ + Bucket: bucket, + Key: key, + UploadId, + MultipartUpload: { Parts: completedParts }, + }), + ) + } catch (error) { + await client.send( + new AbortMultipartUploadCommand({ Bucket: bucket, Key: key, UploadId }), + ) + throw error + } +} + export function useUploadObject() { const queryClient = useQueryClient() return useMutation({ mutationFn: async ({ bucket, key, file }: UploadObjectParams) => { - const arrayBuffer = await file.arrayBuffer() - const body = new Uint8Array(arrayBuffer) + if (file.size > MULTIPART_THRESHOLD) { + return await uploadMultipart(bucket, key, file) + } + + const body = new Uint8Array(await file.arrayBuffer()) const command = new PutObjectCommand({ Bucket: bucket,