diff --git a/.vscode/settings.json b/.vscode/settings.json index 80dab2d35..1427e8c3d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,13 +24,13 @@ "editor.defaultFormatter": "golang.go", "editor.tabSize": 4 }, - "biome.configurationPath": "./hive-ui/frontend/biome.jsonc", + "biome.configurationPath": "./hive/services/hiveui/frontend/biome.jsonc", "biome.requireConfiguration": true, - "biome.lsp.bin": "./hive-ui/frontend/node_modules/.bin/biome", + "biome.lsp.bin": "./hive/services/hiveui/frontend/node_modules/.bin/biome", "editor.formatOnSave": true, "editor.formatOnPaste": true, "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, - "typescript.tsdk": "./hive-ui/frontend/node_modules/typescript/lib" + "typescript.tsdk": "./hive/services/hiveui/frontend/node_modules/typescript/lib" } diff --git a/Makefile b/Makefile index a058e62ec..fd5468703 100644 --- a/Makefile +++ b/Makefile @@ -43,10 +43,6 @@ build-ui: # GO commands go_build: @echo "\n....Building $(GO_PROJECT_NAME)" - @if [ ! -f hive/services/hiveui/frontend/dist/index.html ]; then \ - mkdir -p hive/services/hiveui/frontend/dist && \ - echo '
Frontend not built. Run make build-ui
i(oe,j))de 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(;Jeve?(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(1
E){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};
diff --git a/hive/services/hiveui/frontend/dist/assets/state-badge.js b/hive/services/hiveui/frontend/dist/assets/state-badge.js
new file mode 100644
index 000000000..768a9017f
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/state-badge.js
@@ -0,0 +1 @@
+import{c as d,j as g}from"./index.js";function o(n){const e=d.c(3),{state:t}=n;let a="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100";t==="running"?a="bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100":t==="stopped"&&(a="bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100");const s=`rounded-full px-2 py-1 text-xs ${a}`;let r;return e[0]!==t||e[1]!==s?(r=g.jsx("div",{className:s,children:t}),e[0]=t,e[1]=s,e[2]=r):r=e[2],r}export{o as S};
diff --git a/hive/services/hiveui/frontend/dist/assets/textarea.js b/hive/services/hiveui/frontend/dist/assets/textarea.js
new file mode 100644
index 000000000..afa9530e4
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/textarea.js
@@ -0,0 +1 @@
+import{c as n,a as o,j as d}from"./index.js";function c(s){const e=n.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=o("field-sizing-content flex min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=d.jsx("textarea",{className:t,"data-slot":"textarea",...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
diff --git a/hive/services/hiveui/frontend/dist/assets/trash-2.js b/hive/services/hiveui/frontend/dist/assets/trash-2.js
new file mode 100644
index 000000000..7b651d25b
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/trash-2.js
@@ -0,0 +1 @@
+import{g as a}from"./index.js";const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T};
diff --git a/hive/services/hiveui/frontend/dist/assets/upload-button.js b/hive/services/hiveui/frontend/dist/assets/upload-button.js
new file mode 100644
index 000000000..228283f09
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/upload-button.js
@@ -0,0 +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;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};
diff --git a/hive/services/hiveui/frontend/dist/assets/useMutation.js b/hive/services/hiveui/frontend/dist/assets/useMutation.js
new file mode 100644
index 000000000..6ecbf8256
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/useMutation.js
@@ -0,0 +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};
diff --git a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js
new file mode 100644
index 000000000..8dfb2c92b
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js
@@ -0,0 +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};
diff --git a/hive/services/hiveui/frontend/dist/assets/zod.js b/hive/services/hiveui/frontend/dist/assets/zod.js
new file mode 100644
index 000000000..2a3f2f469
--- /dev/null
+++ b/hive/services/hiveui/frontend/dist/assets/zod.js
@@ -0,0 +1 @@
+import{r as ee,aA as re,V as jt,E as et,aB as Wt,G as he,aC as qt,I as mt,ap as Ht,ab as $t,w as zt,a9 as Gt,j as bt,c as Kt,a as Yt,aD as b,aE as Zt,aF as Jt,aG as Qt}from"./index.js";let tt=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Xt={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},er={valid(e){return e===null?null:e?{[tt.valid]:""}:{[tt.invalid]:""}}},tr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:Xt,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=et)=>e,getInputValidationProps:(e=et)=>e,inputRef:{current:null},commit:async()=>{}}});function Se(e=!0){const r=ee.useContext(tr);if(r.setValidityData===re&&!e)throw new Error(jt(28));return r}const rr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function sr(){return ee.useContext(rr)}const ir=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function Vt(){return ee.useContext(ir)}function ar(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function nr({controlled:e,default:r,name:t,state:s="value"}){const{current:l}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=l?e:a,V=ee.useCallback(E=>{l||o(E)},[]);return[d,V]}function lr(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:l,setControlId:a}=Vt(),o=Wt(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;qt(d)&&d.closest("label")!=null?a(r??null):a(l??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,l,a,t,o]),l??o}function or(e){const{enabled:r=!0,value:t,id:s,name:l,controlRef:a,commit:o}=e,{formRef:d}=sr(),{invalid:V,markedDirtyRef:E,validityData:R,setValidityData:m}=Se(),F=mt(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=F()),R.initialValue===null&&h!==null&&m(O=>({...O,initialValue:h}))},[r,m,t,R.initialValue,F]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:F,name:l,controlRef:a,validityData:ar(R,V),validate(h=!0){let O=t;O===void 0&&(O=F()),E.current=!0,h?Ht.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,F,s,V,E,l,R,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const ur=ee.forwardRef(function(r,t){const{render:s,className:l,id:a,name:o,value:d,disabled:V=!1,onValueChange:E,defaultValue:R,...m}=r,{state:F,name:h,disabled:O}=Se(),T=O||V,L=h??o,M=ee.useMemo(()=>({...F,disabled:T}),[F,T]),{setTouched:_,setDirty:H,validityData:x,setFocused:w,setFilled:W,validationMode:te,validation:q}=Se(),{labelId:X}=Vt(),z=lr({id:a});he(()=>{const S=d!=null;q.inputRef.current?.value||S&&d!==""?W(!0):S&&d===""&&W(!1)},[q.inputRef,W,d]);const[le,p]=nr({controlled:d,default:R,name:"FieldControl",state:"value"}),C=d!==void 0,U=mt((S,N)=>{E?.(S,N),!N.isCanceled&&p(S)});return or({id:z,name:L,commit:q.commit,value:le,getValue:()=>q.inputRef.current?.value,controlRef:q.inputRef}),$t("input",r,{ref:t,state:M,props:[{id:z,disabled:T,name:L,ref:q.inputRef,"aria-labelledby":X,...C?{value:le}:{defaultValue:R},onChange(S){const N=S.currentTarget.value;U(N,zt(Gt,S.nativeEvent)),H(N!==x.initialValue),W(N!=="")},onFocus(){w(!0)},onBlur(S){_(!0),w(!1),te==="onBlur"&&q.commit(S.currentTarget.value)},onKeyDown(S){S.currentTarget.tagName==="INPUT"&&S.key==="Enter"&&(_(!0),q.commit(S.currentTarget.value))}},q.getInputValidationProps(),m],stateAttributesMapping:er})}),dr=ee.forwardRef(function(r,t){return bt.jsx(ur,{ref:t,...r})});function Ur(e){const r=Kt.c(10);let t,s,l;r[0]!==e?({className:t,type:l,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=l):(t=r[1],s=r[2],l=r[3]);let a;r[4]!==t?(a=Yt("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==l?(o=bt.jsx(dr,{className:a,"data-slot":"input",type:l,...s}),r[6]=s,r[7]=a,r[8]=l,r[9]=o):o=r[9],o}var Ve=e=>e.type==="checkbox",ue=e=>e instanceof Date,Z=e=>e==null;const _t=e=>typeof e=="object";var j=e=>!Z(e)&&!Array.isArray(e)&&_t(e)&&!ue(e),Ft=e=>j(e)&&e.target?Ve(e.target)?e.target.checked:e.target.value:e,fr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xt=(e,r)=>e.has(fr(r)),cr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Me=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Me&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&cr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(s[l]=P(e[l]));return s}var pe=e=>/^\w*$/.test(e),I=e=>e===void 0,Ue=e=>Array.isArray(e)?e.filter(Boolean):[],Le=e=>Ue(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(pe(r)?[r]:Le(r)).reduce((l,a)=>Z(l)?l:l[a],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",Y=e=>typeof e=="function",k=(e,r,t)=>{let s=-1;const l=pe(r)?[r]:Le(r),a=l.length,o=a-1;for(;++sb.useContext(pt);var wt=(e,r,t,s=!0)=>{const l={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(l,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return l};const Pe=typeof window<"u"?b.useLayoutEffect:b.useEffect;function yr(e){const r=Ne(),{control:t=r,disabled:s,name:l,exact:a}=e||{},[o,d]=b.useState(t._formState),V=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pe(()=>t._subscribe({name:l,formState:V.current,exact:a,callback:E=>{!s&&d({...t._formState,...E})}}),[l,s,a]),b.useEffect(()=>{V.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>wt(o,t,V.current,!1),[o,t])}var Q=e=>typeof e=="string",Re=(e,r,t,s,l)=>Q(e)?(s&&r.watch.add(e),y(t,e,l)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Oe=e=>Z(e)||!_t(e);function ie(e,r,t=new WeakSet){if(Oe(e)||Oe(r))return Object.is(e,r);if(ue(e)&&ue(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),l=Object.keys(r);if(s.length!==l.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!l.includes(a))return!1;if(a!=="ref"){const d=r[a];if(ue(o)&&ue(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function vr(e){const r=Ne(),{control:t=r,name:s,defaultValue:l,disabled:a,exact:o,compute:d}=e||{},V=b.useRef(l),E=b.useRef(d),R=b.useRef(void 0),m=b.useRef(t),F=b.useRef(s);E.current=d;const[h,O]=b.useState(()=>{const x=t._getWatch(s,V.current);return E.current?E.current(x):x}),T=b.useCallback(x=>{const w=Re(s,t._names,x||t._formValues,!1,V.current);return E.current?E.current(w):w},[t._formValues,t._names,s]),L=b.useCallback(x=>{if(!a){const w=Re(s,t._names,x||t._formValues,!1,V.current);if(E.current){const W=E.current(w);ie(W,R.current)||(O(W),R.current=W)}else O(w)}},[t._formValues,t._names,a,s]);Pe(()=>((m.current!==t||!ie(F.current,s))&&(m.current=t,F.current=s,L()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:x=>{L(x.values)}})),[t,o,s,L]),b.useEffect(()=>t._removeUnmounted());const M=m.current!==t,_=F.current,H=b.useMemo(()=>{if(a)return null;const x=!M&&!ie(_,s);return M||x?T():null},[a,M,s,_,T]);return H!==null?H:h}function gr(e){const r=Ne(),{name:t,disabled:s,control:l=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,V=xt(l._names.array,t),E=b.useMemo(()=>y(l._formValues,t,y(l._defaultValues,t,o)),[l,t,o]),R=vr({control:l,name:t,defaultValue:E,exact:d}),m=yr({control:l,name:t,exact:d}),F=b.useRef(e),h=b.useRef(void 0),O=b.useRef(l.register(t,{...e.rules,value:R,...J(e.disabled)?{disabled:e.disabled}:{}}));F.current=e;const T=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),L=b.useCallback(x=>O.current.onChange({target:{value:Ft(x),name:t},type:_e.CHANGE}),[t]),M=b.useCallback(()=>O.current.onBlur({target:{value:y(l._formValues,t),name:t},type:_e.BLUR}),[t,l._formValues]),_=b.useCallback(x=>{const w=y(l._fields,t);w&&w._f&&x&&(w._f.ref={focus:()=>Y(x.focus)&&x.focus(),select:()=>Y(x.select)&&x.select(),setCustomValidity:W=>Y(x.setCustomValidity)&&x.setCustomValidity(W),reportValidity:()=>Y(x.reportValidity)&&x.reportValidity()})},[l._fields,t]),H=b.useMemo(()=>({name:t,value:R,...J(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:L,onBlur:M,ref:_}),[t,s,m.disabled,L,M,_,R]);return b.useEffect(()=>{const x=l._options.shouldUnregister||a,w=h.current;w&&w!==t&&!V&&l.unregister(w),l.register(t,{...F.current.rules,...J(F.current.disabled)?{disabled:F.current.disabled}:{}});const W=(te,q)=>{const X=y(l._fields,te);X&&X._f&&(X._f.mount=q)};if(W(t,!0),x){const te=P(y(l._options.defaultValues,t,F.current.defaultValue));k(l._defaultValues,t,te),I(y(l._formValues,t))&&k(l._formValues,t,te)}return!V&&l.register(t),h.current=t,()=>{(V?x&&!l._state.action:x)?l.unregister(t):W(t,!1)}},[t,l,V,a]),b.useEffect(()=>{l._setDisabledField({disabled:s,name:t})},[s,t,l]),b.useMemo(()=>({field:H,formState:m,fieldState:T}),[H,m,T])}const Lr=e=>e.render(gr(e)),hr=b.createContext(null);hr.displayName="HookFormContext";var Be=(e,r,t,s,l)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:l||!0}}:{},me=e=>Array.isArray(e)?e:[e],rt=()=>{let e=[];return{get observers(){return e},next:l=>{for(const a of e)a.next&&a.next(l)},subscribe:l=>(e.push(l),{unsubscribe:()=>{e=e.filter(a=>a!==l)}}),unsubscribe:()=>{e=[]}}};function Et(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const l=e[s],a=r[s];if(l&&j(l)&&a){const o=Et(l,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var K=e=>j(e)&&!Object.keys(e).length,je=e=>e.type==="file",Fe=e=>{if(!Me)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Ct=e=>e.type==="select-multiple",We=e=>e.type==="radio",mr=e=>We(e)||Ve(e),ke=e=>Fe(e)&&e.isConnected;function br(e,r){const t=r.slice(0,-1).length;let s=0;for(;s