@dudousxd/nestjs-media-dashboard 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{Q as t,c as o,j as e,r as n,a as s,A as i}from"./styles-B7u5Z056.js";const c=new t({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),r=document.getElementById("root");if(!r)throw new Error("Missing #root");o(r).render(e.jsx(n.StrictMode,{children:e.jsx(s,{client:c,children:e.jsx(i,{})})}));
1
+ import{Q as t,c as o,j as e,r as n,a as s,A as i}from"./styles-B7kWQZMr.js";const c=new t({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),r=document.getElementById("root");if(!r)throw new Error("Missing #root");o(r).render(e.jsx(n.StrictMode,{children:e.jsx(s,{client:c,children:e.jsx(i,{})})}));
@@ -1 +1 @@
1
- import{Q as c,c as a,j as s,r as l,a as d,A as f}from"./styles-B7u5Z056.js";const y={hasStore:!0,hasUploads:!0,disks:3,actions:!0},h={"/topology":y,"/disks":{disks:[]},"/uploads":{uploads:[]},"/library/collections":{collections:[]},"/library":{records:[]}},u=window.fetch.bind(window);window.fetch=async(e,o)=>{const r=typeof e=="string"?e:e instanceof URL?e.href:e.url;for(const[n,i]of Object.entries(h))if(r.endsWith(n))return new Response(JSON.stringify(i),{status:200,headers:{"Content-Type":"application/json"}});return u(e,o)};const p=new c({defaultOptions:{queries:{retry:!1}}}),t=document.getElementById("root");if(!t)throw new Error("Missing #root");a(t).render(s.jsx(l.StrictMode,{children:s.jsx(d,{client:p,children:s.jsx(f,{})})}));
1
+ import{Q as c,c as a,j as s,r as l,a as d,A as f}from"./styles-B7kWQZMr.js";const y={hasStore:!0,hasUploads:!0,disks:3,actions:!0},h={"/topology":y,"/disks":{disks:[]},"/uploads":{uploads:[]},"/library/collections":{collections:[]},"/library":{records:[]}},u=window.fetch.bind(window);window.fetch=async(e,o)=>{const r=typeof e=="string"?e:e instanceof URL?e.href:e.url;for(const[n,i]of Object.entries(h))if(r.endsWith(n))return new Response(JSON.stringify(i),{status:200,headers:{"Content-Type":"application/json"}});return u(e,o)};const p=new c({defaultOptions:{queries:{retry:!1}}}),t=document.getElementById("root");if(!t)throw new Error("Missing #root");a(t).render(s.jsx(l.StrictMode,{children:s.jsx(d,{client:p,children:s.jsx(f,{})})}));
@@ -77,4 +77,4 @@ ${r}`}function Bm(e,r){return e===(r??"")}function bm({depth:e,expanded:r,active
77
77
  `,o=l.charCodeAt(0),c=new RegExp((s=="|"?"\\|":s)+"+$"),u="",f=[];n.dense=Array.isArray(e);for(var h=n.skipHidden&&e["!cols"]||[],x=n.skipHidden&&e["!rows"]||[],p=a.s.c;p<=a.e.c;++p)(h[p]||{}).hidden||(f[p]=pr(p));for(var d=0,v=a.s.r;v<=a.e.r;++v)(x[v]||{}).hidden||(u=zC(e,a,v,f,i,o,s,n),u!=null&&(n.strip&&(u=u.replace(c,"")),(u||n.blankrows!==!1)&&t.push((d++?l:"")+u)));return delete n.dense,t.join("")}function HC(e,r){r||(r={}),r.FS=" ",r.RS=`
78
78
  `;var t=vg(e,r);return t}function VC(e){var r="",t,n="";if(e==null||e["!ref"]==null)return[];var a=Ze(e["!ref"]),s="",i=[],l,o=[],c=Array.isArray(e);for(l=a.s.c;l<=a.e.c;++l)i[l]=pr(l);for(var u=a.s.r;u<=a.e.r;++u)for(s=Sr(u),l=a.s.c;l<=a.e.c;++l)if(r=i[l]+s,t=c?(e[u]||[])[l]:e[r],n="",t!==void 0){if(t.F!=null){if(r=t.F,!t.f)continue;n=t.f,r.indexOf(":")==-1&&(r=r+":"+r)}if(t.f!=null)n=t.f;else{if(t.t=="z")continue;if(t.t=="n"&&t.v!=null)n=""+t.v;else if(t.t=="b")n=t.v?"TRUE":"FALSE";else if(t.w!==void 0)n="'"+t.w;else{if(t.v===void 0)continue;t.t=="s"?n="'"+t.v:n=""+t.v}}o[o.length]=r+"="+n}return o}function gg(e,r,t){var n=t||{},a=+!n.skipHeader,s=e||{},i=0,l=0;if(s&&n.origin!=null)if(typeof n.origin=="number")i=n.origin;else{var o=typeof n.origin=="string"?Gr(n.origin):n.origin;i=o.r,l=o.c}var c,u={s:{c:0,r:0},e:{c:l,r:i+r.length-1+a}};if(s["!ref"]){var f=Ze(s["!ref"]);u.e.c=Math.max(u.e.c,f.e.c),u.e.r=Math.max(u.e.r,f.e.r),i==-1&&(i=f.e.r+1,u.e.r=i+r.length-1+a)}else i==-1&&(i=0,u.e.r=r.length-1+a);var h=n.header||[],x=0;r.forEach(function(d,v){cn(d).forEach(function(g){(x=h.indexOf(g))==-1&&(h[x=h.length]=g);var y=d[g],m="z",T="",P=we({c:l+x,r:i+v+a});c=A0(s,P),y&&typeof y=="object"&&!(y instanceof Date)?s[P]=y:(typeof y=="number"?m="n":typeof y=="boolean"?m="b":typeof y=="string"?m="s":y instanceof Date?(m="d",n.cellDates||(m="n",y=Qr(y)),T=n.dateNF||_e[14]):y===null&&n.nullError&&(m="e",y=0),c?(c.t=m,c.v=y,delete c.w,delete c.R,T&&(c.z=T)):s[P]=c={t:m,v:y},T&&(c.z=T))})}),u.e.c=Math.max(u.e.c,l+h.length-1);var p=Sr(i);if(a)for(x=0;x<h.length;++x)s[pr(x+l)+p]={t:"s",v:h[x]};return s["!ref"]=Oe(u),s}function WC(e,r){return gg(null,e,r)}function A0(e,r,t){if(typeof r=="string"){if(Array.isArray(e)){var n=Gr(r);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[r]||(e[r]={t:"z"})}return typeof r!="number"?A0(e,we(r)):A0(e,we({r,c:t||0}))}function $C(e,r){if(typeof r=="number"){if(r>=0&&e.SheetNames.length>r)return r;throw new Error("Cannot find sheet # "+r)}else if(typeof r=="string"){var t=e.SheetNames.indexOf(r);if(t>-1)return t;throw new Error("Cannot find sheet name |"+r+"|")}else throw new Error("Cannot find sheet |"+r+"|")}function wh(){return{SheetNames:[],Sheets:{}}}function kh(e,r,t,n){var a=1;if(!t)for(;a<=65535&&e.SheetNames.indexOf(t="Sheet"+a)!=-1;++a,t=void 0);if(!t||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(t)>=0){var s=t.match(/(^.*?)(\d+)$/);a=s&&+s[2]||0;var i=s&&s[1]||t;for(++a;a<=65535&&e.SheetNames.indexOf(t=i+a)!=-1;++a);}if(NF(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=r,t}function GC(e,r,t){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=$C(e,r);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),t){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+t)}e.Workbook.Sheets[n].Hidden=t}function KC(e,r){return e.z=r,e}function yg(e,r,t){return r?(e.l={Target:r},t&&(e.l.Tooltip=t)):delete e.l,e}function XC(e,r,t){return yg(e,"#"+r,t)}function QC(e,r,t){e.c||(e.c=[]),e.c.push({t:r,a:t||"SheetJS"})}function YC(e,r,t,n){for(var a=typeof r!="string"?r:Ze(r),s=typeof r=="string"?r:Oe(r),i=a.s.r;i<=a.e.r;++i)for(var l=a.s.c;l<=a.e.c;++l){var o=A0(e,i,l);o.t="n",o.F=s,delete o.v,i==a.s.r&&l==a.s.c&&(o.f=t,n&&(o.D=!0))}return e}var qC={encode_col:pr,encode_row:Sr,encode_cell:we,encode_range:Oe,decode_col:ih,decode_row:sh,split_cell:o_,decode_cell:Gr,decode_range:di,format_cell:Dn,sheet_add_aoa:Ev,sheet_add_json:gg,sheet_add_dom:dg,aoa_to_sheet:xi,json_to_sheet:WC,table_to_sheet:xg,table_to_book:dC,sheet_to_csv:vg,sheet_to_txt:HC,sheet_to_json:Gu,sheet_to_html:hC,sheet_to_formulae:VC,sheet_to_row_object_array:Gu,sheet_get_cell:A0,book_new:wh,book_append_sheet:kh,book_set_sheet_visibility:GC,cell_set_number_format:KC,cell_set_hyperlink:yg,cell_set_internal_link:XC,cell_add_comment:QC,sheet_set_array_formula:YC,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const Ai=26,Q1=12;function JC(e,r){const t=Number(e),n=Number(r);return e.trim()!==""&&r.trim()!==""&&!Number.isNaN(t)&&!Number.isNaN(n)?t-n:e.localeCompare(r,void 0,{numeric:!0,sensitivity:"base"})}function wg({header:e,body:r}){const[t,n]=ve.useState(""),[a,s]=ve.useState({}),[i,l]=ve.useState(null),o=ve.useRef(null),[c,u]=ve.useState(0),[f,h]=ve.useState(0);ve.useEffect(()=>{const A=o.current;if(!A)return;const U=new ResizeObserver(()=>h(A.clientHeight));return U.observe(A),h(A.clientHeight),()=>U.disconnect()},[]);const x=ve.useMemo(()=>{const A=t.trim().toLowerCase(),U=Object.entries(a).map(([B,q])=>[Number(B),q.trim().toLowerCase()]).filter(([,B])=>B!=="");let z=r.filter(B=>A&&!B.some(q=>q.toLowerCase().includes(A))?!1:U.every(([q,fe])=>(B[q]??"").toLowerCase().includes(fe)));if(i){const B=i.dir==="asc"?1:-1;z=[...z].sort((q,fe)=>B*JC(q[i.index]??"",fe[i.index]??""))}return z},[r,t,a,i]),p=x.length,d=Math.max(0,Math.floor(c/Ai)-Q1),v=(f>0?Math.ceil(f/Ai):40)+Q1*2,g=Math.min(p,d+v),y=d*Ai,m=Math.max(0,(p-g)*Ai),T=x.slice(d,g),P=t.trim()!==""||Object.values(a).some(A=>A.trim()!==""),N=i!==null||P;function _(A){l(U=>!U||U.index!==A?{index:A,dir:"asc"}:U.dir==="asc"?{index:A,dir:"desc"}:null)}function I(){l(null),s({}),n("")}return w.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsxs("div",{className:"flex flex-1 items-center gap-1.5 rounded-md border border-[var(--line)] px-2",children:[w.jsx("span",{className:"text-zinc-600",children:"⌕"}),w.jsx("input",{value:t,onChange:A=>n(A.target.value),placeholder:"filter all columns…",className:"mono w-full bg-transparent py-1.5 text-xs text-zinc-200 placeholder:text-zinc-600 focus:outline-none"})]}),N&&w.jsx("button",{type:"button",onClick:I,className:"mono shrink-0 rounded-md border border-[var(--line)] px-2 py-1 text-[10px] text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100",children:"reset"}),w.jsxs("span",{className:"mono tnum shrink-0 text-[10px] text-zinc-600",children:[p,P?` / ${r.length}`:""," ",r.length===1?"row":"rows"]})]}),w.jsx("div",{ref:o,onScroll:A=>u(A.currentTarget.scrollTop),className:"min-h-0 flex-1 overflow-auto rounded-md border border-[var(--line)]",children:w.jsxs("table",{className:"w-full text-left text-xs",children:[w.jsx("thead",{className:"sticky top-0 z-10 bg-[var(--panel)]",children:w.jsx("tr",{className:"border-b border-[var(--line)]",children:e.map((A,U)=>{const z=(i==null?void 0:i.index)===U;return w.jsxs("th",{className:"px-3 py-1.5 align-top",children:[w.jsxs("button",{type:"button",onClick:()=>_(U),className:"mono flex max-w-full items-center gap-1 whitespace-nowrap uppercase tracking-wider text-zinc-500 transition-colors hover:text-zinc-200",children:[w.jsx("span",{className:"truncate",children:A}),w.jsx("span",{className:"shrink-0 text-[9px] text-zinc-600",children:z?(i==null?void 0:i.dir)==="asc"?"▲":"▼":"↕"})]}),w.jsx("input",{value:a[U]??"",onChange:B=>s(q=>({...q,[U]:B.target.value})),placeholder:"filter",className:"mono mt-1 w-full min-w-[5rem] rounded border border-[var(--line)] bg-transparent px-1 py-0.5 text-[10px] font-normal normal-case tracking-normal text-zinc-300 placeholder:text-zinc-700 focus:border-emerald-500/40 focus:outline-none"})]},U)})})}),w.jsxs("tbody",{className:"divide-y divide-[var(--line-soft)]",children:[y>0&&w.jsx("tr",{"aria-hidden":!0,children:w.jsx("td",{colSpan:e.length,style:{height:y}})}),T.map((A,U)=>w.jsx("tr",{style:{height:Ai},className:"hover:bg-zinc-900/40",children:e.map((z,B)=>w.jsx("td",{className:"mono whitespace-nowrap px-3 text-zinc-300",children:A[B]??""},B))},d+U)),m>0&&w.jsx("tr",{"aria-hidden":!0,children:w.jsx("td",{colSpan:e.length,style:{height:m}})})]})]})})]})}const ZC=[[/\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i,"image"],[/\.pdf$/i,"pdf"],[/\.(mp4|webm|mov|m4v|ogv)$/i,"video"],[/\.(mp3|wav|ogg|oga|flac|m4a|aac)$/i,"audio"],[/\.(xlsx|xls|xlsm|ods)$/i,"sheet"],[/\.(txt|json|csv|tsv|md|log|xml|ya?ml)$/i,"text"]];function eA(e){return e.includes("spreadsheetml")||e==="application/vnd.ms-excel"||e==="application/vnd.oasis.opendocument.spreadsheet"}function rA(e){var t;const r=((t=e.contentType)==null?void 0:t.toLowerCase())??"";if(r.startsWith("image/"))return"image";if(r==="application/pdf")return"pdf";if(r.startsWith("video/"))return"video";if(r.startsWith("audio/"))return"audio";if(eA(r))return"sheet";if(r.startsWith("text/")||r==="application/json")return"text";for(const[n,a]of ZC)if(n.test(e.name))return a;return"other"}function tA(e){var t;const r=((t=e.contentType)==null?void 0:t.toLowerCase())??"";return r.includes("csv")||/\.csv$/i.test(e.name)?"csv":r.includes("tab-separated")||/\.tsv$/i.test(e.name)?"tsv":r.includes("json")||/\.json$/i.test(e.name)?"json":"plain"}const nA=8*1024*1024;function wo({item:e,message:r}){return w.jsx("div",{className:"grid h-full min-h-[320px] place-items-center gap-4 px-6 text-center",children:w.jsxs("div",{className:"flex flex-col items-center gap-4",children:[w.jsx("div",{className:"grid h-14 w-14 place-items-center rounded-lg border border-[var(--line)] bg-zinc-900 text-2xl text-zinc-600",children:"⬡"}),w.jsx("div",{className:"mono max-w-md text-sm text-zinc-400",children:r}),w.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"mono rounded-md border border-emerald-500/30 bg-emerald-500/10 px-3 py-1.5 text-xs text-emerald-300 transition-colors hover:bg-emerald-500/20",children:"Open original ↗"})]})})}function aA(e,r){const t=[];let n=[],a="",s=!1;for(let i=0;i<e.length;i++){const l=e[i];s?l==='"'?e[i+1]==='"'?(a+='"',i++):s=!1:a+=l:l==='"'?s=!0:l===r?(n.push(a),a=""):l===`
79
79
  `?(n.push(a),t.push(n),n=[],a=""):l!=="\r"&&(a+=l)}return(a.length>0||n.length>0)&&(n.push(a),t.push(n)),t}function Y1({text:e,delimiter:r}){const t=aA(e.trimEnd(),r),n=t[0];return n?w.jsx(wg,{header:n,body:t.slice(1)}):w.jsx(dr,{children:"Empty file."})}const sA=15*1024*1024;function iA({item:e}){const r=e.size>sA,t=Kt({queryKey:["object-bytes",e.disk,e.key],queryFn:()=>be.objectBytes(e.disk,e.key),retry:!1,staleTime:6e4,enabled:!r}),[n,a]=ve.useState(0),s=ve.useMemo(()=>t.data?$u(t.data,{type:"array"}):void 0,[t.data]),i=ve.useMemo(()=>{if(!s)return;const l=s.SheetNames[Math.min(n,s.SheetNames.length-1)],o=l?s.Sheets[l]:void 0;if(!o)return{header:[],body:[]};const u=qC.sheet_to_json(o,{header:1,blankrows:!1,defval:""}).map(f=>f.map(h=>h==null?"":String(h)));return{header:u[0]??[],body:u.slice(1)}},[s,n]);return r?w.jsx(wo,{item:e,message:`Too large to preview inline (${Rn(e.size)}). Open the original to view it.`}):t.isLoading?w.jsx(dr,{children:"Loading…"}):t.isError||!s||!i?w.jsx(wo,{item:e,message:"Could not read this spreadsheet."}):w.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[s.SheetNames.length>1&&w.jsx("div",{className:"flex flex-wrap gap-1",children:s.SheetNames.map((l,o)=>w.jsx("button",{type:"button",onClick:()=>a(o),className:`mono rounded-md border px-2 py-0.5 text-[11px] transition-colors ${o===n?"border-zinc-600 bg-zinc-900 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"}`,children:l},l))}),w.jsx(wg,{header:i.header,body:i.body})]})}function lA(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function oA({item:e}){const r=Kt({queryKey:["object-text-head",e.disk,e.key],queryFn:()=>be.objectTextHead(e.disk,e.key,nA),retry:!1,staleTime:6e4});if(r.isLoading)return w.jsx(dr,{children:"Loading…"});if(r.isError||!r.data)return w.jsx(wo,{item:e,message:"Could not read this file."});const{text:t,bytesRead:n}=r.data,a=n<e.size,s=a?t.slice(0,Math.max(0,t.lastIndexOf(`
80
- `))):t,i=tA(e),l=i==="csv"?w.jsx(Y1,{text:s,delimiter:","}):i==="tsv"?w.jsx(Y1,{text:s,delimiter:" "}):w.jsx("pre",{className:"mono min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words rounded-md border border-[var(--line)] bg-black/30 p-3 text-xs text-zinc-300",children:i==="json"?lA(s):s});return w.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[a&&w.jsxs("div",{className:"mono shrink-0 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1.5 text-[11px] text-amber-300",children:["Sample — the first ",Rn(n)," of ",Rn(e.size),". Filters and sort apply to this sample; open the original ↗ for the whole file."]}),l]})}function cA({item:e,kind:r}){switch(r){case"image":return w.jsx("div",{className:"grid min-h-0 flex-1 place-items-center",children:w.jsx("img",{src:e.url,alt:e.name,className:"max-h-full max-w-full rounded-md object-contain"})});case"video":return w.jsx("div",{className:"grid min-h-0 flex-1 place-items-center",children:w.jsx("video",{src:e.url,controls:!0,className:"max-h-full max-w-full rounded-md"})});case"audio":return w.jsx("div",{className:"grid min-h-0 flex-1 place-items-center",children:w.jsx("audio",{src:e.url,controls:!0,className:"w-full max-w-md"})});case"pdf":return w.jsx("iframe",{src:be.objectRawUrl(e.disk,e.key),title:e.name,className:"min-h-0 w-full flex-1 rounded-md border border-[var(--line)] bg-white"});case"text":return w.jsx(oA,{item:e});case"sheet":return w.jsx(iA,{item:e});default:return w.jsx(wo,{item:e,message:`No inline preview for ${e.contentType??"this type"}`})}}function uA({item:e,onClose:r}){if(ve.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,r]),!e)return null;const t=rA(e);return Gf.createPortal(w.jsx("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-black/80 p-6 backdrop-blur-sm",onClick:n=>{n.target===n.currentTarget&&r()},children:w.jsxs("div",{className:"flex h-[86vh] max-h-full w-full max-w-5xl flex-col overflow-hidden rounded-lg border border-[var(--line)] bg-[var(--panel)] shadow-2xl","aria-label":`Preview of ${e.name}`,children:[w.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--line)] px-4 py-2.5",children:[w.jsxs("div",{className:"min-w-0 flex-1",children:[w.jsx("div",{className:"mono truncate text-sm text-zinc-200",children:e.name}),w.jsxs("div",{className:"mono tnum mt-0.5 flex items-center gap-2 text-[10px] text-zinc-600",children:[w.jsx("span",{children:Rn(e.size)}),e.contentType&&w.jsx("span",{className:"rounded border border-[var(--line)] px-1 text-zinc-500",children:e.contentType})]})]}),w.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"mono shrink-0 rounded-md border border-[var(--line)] px-2 py-1 text-[11px] text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100",children:"Open ↗"}),w.jsx("button",{type:"button",onClick:r,"aria-label":"Close preview",className:"mono shrink-0 rounded-md border border-[var(--line)] px-2 py-1 text-[11px] text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100",children:"✕"})]}),w.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden p-4",children:w.jsx(cA,{item:e,kind:t})})]})}),document.body)}function fA(e){if(!e)return[];const r=e.split("/").filter(a=>a.length>0),t=[];let n="";for(const a of r)n=n?`${n}/${a}`:a,t.push({label:a,prefix:n});return t}function yl(e,r){const t=r?`?prefix=${encodeURIComponent(r)}`:"";window.location.hash=`#/disks/${encodeURIComponent(e)}${t}`}function hA(e,r){const t={};return e!==void 0&&(t.prefix=e),r!==void 0&&(t.cursor=r),t}function Gn(e){return e instanceof Error?e.message:String(e)}function _h(e,r){const t=e==null?void 0:e.replace(/\/+$/,"");return t?`${t}/${r}`:r}function dA({disk:e,prefix:r,onClose:t,onUploaded:n}){const[a,s]=ve.useState([]),[i,l]=ve.useState(null),[o,c]=ve.useState(null),[u,f]=ve.useState(!1),h=ve.useRef(null);function x(v){s(g=>[...g,...Array.from(v)])}async function p(){if(a.length!==0){l({done:0,total:a.length}),c(null);try{for(let v=0;v<a.length;v++){const g=a[v];g&&(await be.uploadObject(e,_h(r,g.name),g),l({done:v+1,total:a.length}))}await n(),t()}catch(v){c(Gn(v)),l(null)}}}const d=i!==null;return w.jsxs(bo,{title:`Upload to ${r?`/${r}`:e}`,onClose:t,footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:t,disabled:d,children:"Cancel"}),w.jsx(va,{tone:"emerald",onClick:p,disabled:d||a.length===0,children:d?`Uploading ${i.done}/${i.total}…`:"Upload"})]}),children:[w.jsxs("div",{onClick:()=>{var v;return(v=h.current)==null?void 0:v.click()},onDragOver:v=>{v.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:v=>{v.preventDefault(),f(!1),x(v.dataTransfer.files)},className:`mono cursor-pointer rounded-md border border-dashed px-3 py-6 text-center text-xs transition-colors ${u?"border-emerald-500/50 bg-emerald-500/5 text-emerald-300":"border-[var(--line)] text-zinc-500 hover:text-zinc-300"}`,children:["Drop files here, or click to choose",w.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:v=>{v.target.files&&x(v.target.files),v.target.value=""}})]}),a.length>0&&w.jsx("ul",{className:"mt-3 max-h-48 space-y-1 overflow-auto",children:a.map((v,g)=>w.jsxs("li",{className:"mono flex items-center justify-between gap-2 rounded border border-[var(--line)] px-2 py-1 text-[11px]",children:[w.jsx("span",{className:"truncate text-zinc-300",children:v.name}),w.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[w.jsx("span",{className:"tnum text-zinc-600",children:Rn(v.size)}),!d&&w.jsx("button",{type:"button","aria-label":`Remove ${v.name}`,onClick:()=>s(y=>y.filter((m,T)=>T!==g)),className:"text-zinc-600 hover:text-rose-400",children:"✕"})]})]},`${v.name}-${g}`))}),o&&w.jsx("p",{className:"mono mt-3 text-[11px] s-error",children:o})]})}function xA({disk:e,prefix:r,onClose:t,onCreated:n}){const[a,s]=ve.useState(""),[i,l]=ve.useState(!1),[o,c]=ve.useState(null),u=ve.useRef(null);ve.useEffect(()=>{var h;(h=u.current)==null||h.focus()},[]);async function f(){const h=a.trim();if(h!==""){l(!0),c(null);try{await be.createFolder(e,_h(r,h)),await n(),t()}catch(x){c(Gn(x)),l(!1)}}}return w.jsxs(bo,{title:"New folder",onClose:t,footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:t,disabled:i,children:"Cancel"}),w.jsx(va,{tone:"emerald",onClick:f,disabled:i||a.trim()==="",children:i?"Creating…":"Create"})]}),children:[w.jsxs("label",{className:"mono flex flex-col gap-1 text-[10px] uppercase tracking-wider text-zinc-600",children:["Folder name",w.jsx("input",{ref:u,value:a,onChange:h=>s(h.target.value),onKeyDown:h=>{h.key==="Enter"&&f()},placeholder:"reports",className:"mono rounded-md border border-[var(--line)] bg-black/30 px-3 py-2 text-sm normal-case tracking-normal text-zinc-100 focus:border-emerald-500/40 focus:outline-none"})]}),w.jsxs("p",{className:"mono mt-2 text-[10px] text-zinc-600",children:["Creates ",r?`/${r}/`:"",w.jsx("span",{className:"text-zinc-400",children:a.trim()||"name"}),"/"]}),o&&w.jsx("p",{className:"mono mt-3 text-[11px] s-error",children:o})]})}function pA({kind:e,disk:r,sourceKey:t,onClose:n,onDone:a}){const[s,i]=ve.useState(t),[l,o]=ve.useState(!1),[c,u]=ve.useState(null),f=ve.useRef(null);ve.useEffect(()=>{const v=f.current;if(!v)return;v.focus();const g=t.lastIndexOf("/");v.setSelectionRange(g+1,t.length)},[t]);const h=e==="copy"?"Copy":"Move",x=s.trim(),p=x===t;async function d(){if(!(x===""||p)){o(!0),u(null);try{e==="copy"?await be.copyObject(r,t,x):await be.moveObject(r,t,x),await a(),n()}catch(v){u(Gn(v)),o(!1)}}}return w.jsxs(bo,{title:`${h} object`,onClose:n,footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:n,disabled:l,children:"Cancel"}),w.jsx(va,{tone:e==="move"?"rose":"emerald",onClick:d,disabled:l||x===""||p,children:l?`${h==="Copy"?"Copying":"Moving"}…`:h})]}),children:[w.jsxs("p",{className:"mono mb-3 text-[11px] text-zinc-500",children:["From ",w.jsx("span",{className:"text-zinc-300",children:t})]}),w.jsxs("label",{className:"mono flex flex-col gap-1 text-[10px] uppercase tracking-wider text-zinc-600",children:["Destination key",w.jsx("input",{ref:f,value:s,onChange:v=>i(v.target.value),onKeyDown:v=>{v.key==="Enter"&&d()},className:"mono rounded-md border border-[var(--line)] bg-black/30 px-3 py-2 text-sm normal-case tracking-normal text-zinc-100 focus:border-emerald-500/40 focus:outline-none"})]}),p&&w.jsx("p",{className:"mono mt-2 text-[10px] text-zinc-600",children:"Change the key to a new destination."}),c&&w.jsx("p",{className:"mono mt-3 text-[11px] s-error",children:c})]})}function mA({route:e,actions:r}){var he,ce;const t=as(),n=Kt({queryKey:["disks"],queryFn:()=>be.disks()}),a=((he=n.data)==null?void 0:he.disks)??[],s=e.disk??((ce=a[0])==null?void 0:ce.name),i=e.prefix,l=`${s??""}::${i??""}`,[o,c]=ve.useState(void 0),[u,f]=ve.useState({key:l,folders:[],files:[],cursor:void 0,lastData:void 0}),[h,x]=ve.useState(null),[p,d]=ve.useState(null),[v,g]=ve.useState(null),[y,m]=ve.useState(!1);u.key!==l&&(f({key:l,folders:[],files:[],cursor:void 0,lastData:void 0}),c(void 0));const T=a.find(X=>X.name===s),P=T?T.capabilities.list:!0,N=Kt({queryKey:["objects",s,i,o],queryFn:()=>{if(!s)throw new Error("No disk selected");return be.objects(s,hA(i,o))},enabled:!!s&&P}),_=N.data;_&&u.key===l&&u.lastData!==_&&f(o===void 0?{key:l,folders:_.folders,files:_.files,cursor:_.cursor,lastData:_}:{key:l,folders:[...u.folders,..._.folders],files:[...u.files,..._.files],cursor:_.cursor,lastData:_});function I(){c(void 0),f({key:l,folders:[],files:[],cursor:void 0,lastData:void 0})}async function A(X){await t.invalidateQueries({queryKey:["objects",X]}),I()}async function U(X,M,J){x(M);try{const le=await be.object(X,M);d({...le,disk:X,name:J})}catch(le){window.alert(`Failed to open "${M}": ${Gn(le)}`)}finally{x(null)}}async function z(X){await navigator.clipboard.writeText(X)}async function B(X,M){const J=Array.from(M);if(J.length!==0){x("__drop__");try{for(const le of J)await be.uploadObject(X,_h(i,le.name),le);await A(X)}catch(le){window.alert(`Upload failed: ${Gn(le)}`)}finally{x(null)}}}async function q(X){if(!v||v.kind!=="delete-file"&&v.kind!=="delete-folder")return;const M=v;x("__delete__");try{M.kind==="delete-file"?await be.deleteObject(X,M.key):await be.deleteFolder(X,M.prefix),await A(X),g(null)}catch(J){window.alert(`Failed to delete: ${Gn(J)}`)}finally{x(null)}}const fe=fA(i),ae=!N.isLoading&&!N.isError&&u.folders.length===0&&u.files.length===0;return w.jsxs("section",{className:"rise",children:[w.jsxs("div",{className:"grid grid-cols-[220px_1fr] gap-4",children:[w.jsxs(si,{className:"h-fit p-2",children:[w.jsx("h3",{className:"mono px-2 py-1 text-[10px] uppercase tracking-wider text-zinc-600",children:"explorer"}),n.isLoading&&w.jsx(dr,{children:"Loading…"}),n.isError&&w.jsx("p",{className:"px-2 py-1 text-sm s-error",children:Gn(n.error)}),!n.isLoading&&a.length===0&&w.jsx(dr,{children:"No disks configured."}),w.jsx(Qw,{disks:a,selectedDisk:s,currentPrefix:i,onNavigate:yl})]}),w.jsxs(si,{className:"p-3",children:[!s&&w.jsx(dr,{children:"Select a disk to browse its objects."}),s&&!P&&w.jsxs(dr,{children:["Listing is not supported on disk"," ",w.jsx("span",{className:"mono text-zinc-300",children:s}),"."]}),s&&P&&w.jsxs("div",{onDragOver:r?X=>{X.preventDefault(),m(!0)}:void 0,onDragLeave:r?()=>m(!1):void 0,onDrop:r?X=>{X.preventDefault(),m(!1),B(s,X.dataTransfer.files)}:void 0,className:`rounded-md ${y?"ring-2 ring-inset ring-emerald-500/50":""}`,children:[w.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[w.jsxs("nav",{className:"mono flex flex-wrap items-center gap-1 text-xs text-zinc-500",children:[w.jsx("button",{type:"button",onClick:()=>yl(s,""),className:`rounded px-1.5 py-0.5 hover:bg-zinc-800/60 ${i?"":"text-zinc-100"}`,children:s}),fe.map((X,M)=>w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx("span",{className:"text-zinc-700",children:"/"}),w.jsx("button",{type:"button",onClick:()=>yl(s,X.prefix),className:`rounded px-1.5 py-0.5 hover:bg-zinc-800/60 ${M===fe.length-1?"text-zinc-100":""}`,children:X.label})]},X.prefix))]}),r&&w.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[w.jsx(kt,{tone:"emerald",onClick:()=>g({kind:"upload"}),children:"↑ Upload"}),w.jsx(kt,{onClick:()=>g({kind:"folder"}),children:"+ New folder"})]})]}),N.isLoading&&w.jsx(dr,{children:"Loading objects…"}),N.isError&&w.jsx("p",{className:"text-sm s-error",children:Gn(N.error)}),ae&&w.jsx(dr,{children:"This folder is empty."}),(u.folders.length>0||u.files.length>0)&&w.jsxs("table",{className:"w-full text-left text-sm",children:[w.jsx("thead",{children:w.jsxs("tr",{className:"mono border-b border-[var(--line)] text-[10px] uppercase tracking-wider text-zinc-600",children:[w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Name"}),w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Size"}),w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Last modified"}),w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Actions"})]})}),w.jsxs("tbody",{className:"divide-y divide-[var(--line-soft)]",children:[u.folders.map(X=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"py-2 pr-2",children:w.jsxs("button",{type:"button",onClick:()=>yl(s,X.prefix),className:"flex items-center gap-2 text-zinc-200 hover:text-emerald-300",children:[w.jsx("span",{className:"text-zinc-600",children:"▸"}),X.name]})}),w.jsx("td",{className:"py-2 pr-2 text-zinc-700",children:"—"}),w.jsx("td",{className:"py-2 pr-2 text-zinc-700",children:"—"}),w.jsx("td",{className:"py-2 pr-2",children:r&&w.jsx(kt,{tone:"rose",onClick:()=>g({kind:"delete-folder",prefix:X.prefix,name:X.name}),children:"Delete"})})]},X.prefix)),u.files.map(X=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"mono py-2 pr-2 text-[13px] text-zinc-200",children:X.name}),w.jsx("td",{className:"mono tnum py-2 pr-2 text-xs text-zinc-500",children:Rn(X.sizeBytes)}),w.jsx("td",{className:"py-2 pr-2 text-xs text-zinc-500",children:Kf(X.lastModified)}),w.jsx("td",{className:"py-2 pr-2",children:w.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[w.jsx(kt,{disabled:h===X.key,onClick:()=>U(s,X.key,X.name),children:"Preview"}),w.jsx(kt,{onClick:()=>z(X.key),children:"Copy key"}),r&&w.jsxs(w.Fragment,{children:[w.jsx(kt,{onClick:()=>g({kind:"copy",key:X.key,name:X.name}),children:"Copy to…"}),w.jsx(kt,{onClick:()=>g({kind:"move",key:X.key,name:X.name}),children:"Move to…"}),w.jsx(kt,{tone:"rose",onClick:()=>g({kind:"delete-file",key:X.key,name:X.name}),children:"Delete"})]})]})})]},X.key))]})]}),u.cursor!==void 0&&w.jsx("div",{className:"mt-3",children:w.jsx(kt,{disabled:N.isFetching,onClick:()=>c(u.cursor),children:N.isFetching?"Loading…":"Load more"})}),r&&y&&w.jsxs("p",{className:"mono mt-3 rounded-md border border-dashed border-emerald-500/40 bg-emerald-500/5 px-3 py-4 text-center text-xs text-emerald-300/80",children:["Drop files to upload to ",i?`/${i}`:s]})]})]})]}),s&&(v==null?void 0:v.kind)==="upload"&&w.jsx(dA,{disk:s,prefix:i,onClose:()=>g(null),onUploaded:()=>A(s)}),s&&(v==null?void 0:v.kind)==="folder"&&w.jsx(xA,{disk:s,prefix:i,onClose:()=>g(null),onCreated:()=>A(s)}),s&&((v==null?void 0:v.kind)==="copy"||(v==null?void 0:v.kind)==="move")&&w.jsx(pA,{kind:v.kind,disk:s,sourceKey:v.key,onClose:()=>g(null),onDone:()=>A(s)}),s&&((v==null?void 0:v.kind)==="delete-file"||(v==null?void 0:v.kind)==="delete-folder")&&w.jsxs(bo,{title:v.kind==="delete-folder"?"Delete folder":"Delete object",onClose:()=>g(null),footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:()=>g(null),disabled:h==="__delete__",children:"Cancel"}),w.jsx(va,{tone:"rose",onClick:()=>q(s),disabled:h==="__delete__",children:h==="__delete__"?"Deleting…":"Delete"})]}),children:[w.jsxs("p",{className:"text-sm text-zinc-300",children:["Delete ",w.jsx("span",{className:"mono text-zinc-100",children:v.name}),"?"]}),w.jsx("p",{className:"mono mt-2 text-[11px] text-zinc-600",children:v.kind==="delete-folder"?"Every object inside this folder is removed. This cannot be undone.":"This cannot be undone."})]}),w.jsx(uA,{item:p,onClose:()=>d(null)})]})}function ko(e){return e===void 0?"#/library":`#/library?collection=${encodeURIComponent(e)}`}function vA(e){return e.startsWith("image/")}function gA({collections:e,selected:r}){const t=n=>`mono flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs transition-colors ${n?"border-zinc-600 bg-zinc-900 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"}`;return w.jsxs("div",{className:"mb-4 flex flex-wrap gap-1",children:[w.jsx("a",{href:ko(void 0),className:t(r===void 0),children:"all"}),e.map(n=>w.jsxs("a",{href:ko(n.key),className:t(r===n.key),children:[n.key,w.jsxs("span",{className:"tnum text-zinc-600",children:[n.count," · ",Rn(n.sumSize)]})]},n.key))]})}function yA({records:e,collection:r}){return e.length===0?w.jsxs(dr,{children:["No records",r?` in "${r}"`:"","."]}):w.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:e.map(t=>w.jsxs("a",{href:`#/library/${encodeURIComponent(t.id)}${r?`?collection=${encodeURIComponent(r)}`:""}`,className:"rounded-lg border border-[var(--line)] bg-[var(--panel)] p-3 text-sm transition-colors hover:border-zinc-600",children:[w.jsx("div",{className:"truncate font-medium text-zinc-200",children:t.fileName}),w.jsx("div",{className:"mono mt-1 text-[10px] text-zinc-500",children:t.mimeType}),w.jsxs("div",{className:"mono tnum mt-2 flex justify-between text-[10px] text-zinc-600",children:[w.jsx("span",{children:Rn(t.size)}),w.jsx("span",{children:Kf(t.createdAt)})]})]},t.id))})}function Ca({label:e,children:r}){return w.jsxs(w.Fragment,{children:[w.jsx("dt",{className:"mono text-[10px] uppercase tracking-wider text-zinc-600",children:e}),w.jsx("dd",{className:"truncate text-zinc-200",children:r})]})}function wA({route:e}){const r=as(),[t,n]=ve.useState(void 0),a=e.recordId,s=Kt({queryKey:["libraryRecord",a??null],queryFn:()=>a===void 0?Promise.reject(new Error("missing record id")):be.libraryRecord(a),enabled:a!==void 0});async function i(){if(a!==void 0){n(void 0);try{await be.deleteLibraryRecord(a),await r.invalidateQueries({queryKey:["library"]}),await r.invalidateQueries({queryKey:["collections"]}),window.location.hash=ko(e.collection)}catch{n("Delete failed (actions may be disabled)")}}}const l=s.data;return w.jsxs("div",{children:[w.jsx("a",{href:ko(e.collection),className:"mono text-xs text-zinc-500 hover:text-zinc-300",children:"← back to library"}),s.isLoading&&w.jsx(dr,{children:"Loading record…"}),s.isError&&w.jsx("p",{className:"mt-3 text-sm s-error",children:"Failed to load record."}),l&&w.jsxs("div",{className:"mt-3",children:[w.jsxs(si,{className:"p-4",children:[w.jsx("h3",{className:"font-semibold text-zinc-100",children:l.record.fileName}),w.jsxs("dl",{className:"mt-3 grid grid-cols-[110px_1fr] gap-x-4 gap-y-2 text-xs",children:[w.jsx(Ca,{label:"Collection",children:l.record.collection}),w.jsx(Ca,{label:"Mime type",children:w.jsx("span",{className:"mono",children:l.record.mimeType})}),w.jsx(Ca,{label:"Size",children:Rn(l.record.size)}),w.jsx(Ca,{label:"Disk",children:w.jsx("span",{className:"mono",children:l.record.disk})}),w.jsx(Ca,{label:"Path",children:w.jsx("span",{className:"mono",children:l.record.path})}),w.jsxs(Ca,{label:"Owner",children:[l.record.ownerType," · ",l.record.ownerId]}),w.jsx(Ca,{label:"Created",children:Kf(l.record.createdAt)})]}),w.jsxs("div",{className:"mt-4",children:[w.jsx(kt,{tone:"rose",onClick:i,children:"Delete"}),t&&w.jsx("p",{className:"mt-2 text-xs s-error",children:t})]})]}),w.jsx("h4",{className:"mono mb-2 mt-4 text-[10px] uppercase tracking-wider text-zinc-600",children:"variants"}),l.variants.length===0?w.jsx(dr,{children:"No variants."}):w.jsx("div",{className:"flex flex-wrap gap-3",children:l.variants.map(o=>w.jsxs("div",{className:"rounded-lg border border-[var(--line)] bg-[var(--panel)] p-2 text-xs",children:[w.jsx("div",{className:"mono mb-1.5 text-[10px] uppercase tracking-wider text-zinc-500",children:o.name}),vA(l.record.mimeType)?w.jsx("img",{src:o.url,alt:o.name,className:"max-h-40 rounded border border-[var(--line)]"}):w.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",className:"text-emerald-300 hover:text-emerald-200",children:"Open ↗"})]},o.name))})]})]})}function kA(e,r){const t={};return e!==void 0&&(t.collection=e),r!==void 0&&(t.cursor=r),t}function _A({route:e,hasStore:r}){var s;const t=Kt({queryKey:["collections"],queryFn:()=>be.collections(),enabled:r}),n=L2({queryKey:["library",e.collection??null],queryFn:({pageParam:i})=>be.library(kA(e.collection,i)),initialPageParam:"",getNextPageParam:i=>i.cursor,enabled:r}),a=n.data?n.data.pages.flatMap(i=>i.records):[];return w.jsxs("div",{children:[w.jsx(gA,{collections:((s=t.data)==null?void 0:s.collections)??[],selected:e.collection}),n.isLoading&&w.jsx(dr,{children:"Loading library…"}),n.isError&&w.jsx("p",{className:"text-sm s-error",children:"Failed to load library."}),w.jsx(yA,{records:a,collection:e.collection}),n.hasNextPage&&w.jsx("div",{className:"mt-4",children:w.jsx(kt,{onClick:()=>n.fetchNextPage(),disabled:n.isFetchingNextPage,children:n.isFetchingNextPage?"Loading…":"Load more"})})]})}function EA({route:e,hasStore:r}){return r?w.jsx("section",{className:"rise",children:e.recordId?w.jsx(wA,{route:e}):w.jsx(_A,{route:e,hasStore:r})}):w.jsx("section",{className:"rise",children:w.jsx("div",{className:"grid place-items-center py-16 text-center",children:w.jsxs("div",{className:"max-w-sm",children:[w.jsx("div",{className:"mono mb-2 text-[10px] uppercase tracking-[0.2em] text-zinc-600",children:"library"}),w.jsxs("p",{className:"text-sm text-zinc-500",children:["No media store configured. Bind a"," ",w.jsx("code",{className:"mono text-zinc-300",children:"MediaStore"})," to browse collections and their variants here."]})]})})})}const kg=["uploads"];function _g({percent:e}){if(e===null)return w.jsx("span",{className:"mono text-[10px] text-zinc-600",children:"unknown size"});const r=Math.min(100,Math.max(0,e));return w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("div",{className:"h-1.5 w-28 overflow-hidden rounded-full bg-zinc-800",children:w.jsx("div",{className:"h-full rounded-full bg-emerald-500/80 transition-[width]",style:{width:`${r}%`}})}),w.jsxs("span",{className:"mono tnum text-[10px] text-zinc-500",children:[r,"%"]})]})}function TA({actions:e}){var n;const r=Kt({queryKey:kg,queryFn:()=>be.uploads({}),refetchInterval:2e3});if(r.isLoading)return w.jsx(dr,{children:"Loading uploads…"});if(r.isError)return w.jsx(dr,{children:"Failed to load uploads."});const t=((n=r.data)==null?void 0:n.uploads)??[];return w.jsxs("section",{className:"rise",children:[w.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[w.jsx(lo,{tone:"live",pulse:!0}),w.jsxs("span",{className:"mono text-[11px] text-zinc-500",children:["Live resumable sessions · refreshed every 2s",e?" · cancel from a session detail":""]})]}),t.length===0?w.jsx(dr,{children:"No uploads in progress."}):w.jsx(si,{className:"overflow-hidden",children:w.jsxs("table",{className:"w-full text-left text-sm",children:[w.jsx("thead",{children:w.jsxs("tr",{className:"mono border-b border-[var(--line)] text-[10px] uppercase tracking-wider text-zinc-600",children:[w.jsx("th",{className:"px-4 py-2 font-normal",children:"Key"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Disk"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Progress"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Parts"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Age"})]})}),w.jsx("tbody",{className:"divide-y divide-[var(--line-soft)]",children:t.map(a=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"max-w-xs truncate px-4 py-2",children:w.jsx("a",{href:`#/uploads/${encodeURIComponent(a.id)}`,className:"mono text-xs text-zinc-200 hover:text-emerald-300",children:a.key})}),w.jsx("td",{className:"mono px-4 py-2 text-xs text-zinc-400",children:a.disk}),w.jsx("td",{className:"px-4 py-2",children:w.jsx(_g,{percent:a.percent})}),w.jsx("td",{className:"mono tnum px-4 py-2 text-xs text-zinc-400",children:a.parts}),w.jsx("td",{className:"px-4 py-2 text-xs text-zinc-500",children:Mm(a.createdAt)??"—"})]},a.id))})]})})]})}function Aa({label:e,children:r}){return w.jsxs(w.Fragment,{children:[w.jsx("dt",{className:"mono text-[10px] uppercase tracking-wider text-zinc-600",children:e}),w.jsx("dd",{className:"text-zinc-200",children:r})]})}function SA({uploadId:e,actions:r}){const t=as(),n=Kt({queryKey:["upload",e],queryFn:()=>be.upload(e)}),a=I2({mutationFn:()=>be.abortUpload(e),onSuccess:async()=>{await t.invalidateQueries({queryKey:kg}),window.location.hash="#/uploads"}});return w.jsxs("section",{className:"rise",children:[w.jsx("a",{href:"#/uploads",className:"mono text-xs text-zinc-500 hover:text-zinc-300",children:"← back"}),n.isLoading&&w.jsx(dr,{children:"Loading upload…"}),n.isError&&w.jsx(dr,{children:"Failed to load upload."}),n.data&&w.jsxs("div",{className:"mt-2",children:[w.jsxs(si,{className:"p-4",children:[w.jsxs("dl",{className:"grid grid-cols-[120px_1fr] gap-x-4 gap-y-2 text-sm",children:[w.jsx(Aa,{label:"Key",children:w.jsx("span",{className:"mono truncate text-xs",children:n.data.upload.key})}),w.jsx(Aa,{label:"Disk",children:w.jsx("span",{className:"mono text-xs",children:n.data.upload.disk})}),w.jsx(Aa,{label:"Progress",children:w.jsx(_g,{percent:n.data.upload.percent})}),w.jsx(Aa,{label:"Offset",children:w.jsx("span",{className:"mono tnum text-xs",children:n.data.upload.offset})}),w.jsx(Aa,{label:"Size",children:w.jsx("span",{className:"mono tnum text-xs",children:n.data.upload.size??"unknown"})}),w.jsx(Aa,{label:"Multipart",children:n.data.upload.multipart?"yes":"no"}),w.jsx(Aa,{label:"Age",children:Mm(n.data.upload.createdAt)??"—"})]}),r&&w.jsxs("div",{className:"mt-4",children:[w.jsx(kt,{tone:"rose",onClick:()=>a.mutate(),disabled:a.isPending,title:"Removes the resumable session so it stops here. An incomplete underlying multipart upload is reaped by the bucket lifecycle policy, not by this action.",children:a.isPending?"Canceling…":"Cancel session"}),a.isError&&w.jsx("p",{className:"mt-2 text-xs s-error",children:"Failed to cancel session."})]})]}),w.jsx("h3",{className:"mono mb-1 mt-4 text-[10px] uppercase tracking-wider text-zinc-600",children:"parts"}),n.data.parts.length===0?w.jsx(dr,{children:"No parts uploaded yet."}):w.jsx(si,{className:"overflow-hidden",children:w.jsxs("table",{className:"w-full text-left text-sm",children:[w.jsx("thead",{children:w.jsxs("tr",{className:"mono border-b border-[var(--line)] text-[10px] uppercase tracking-wider text-zinc-600",children:[w.jsx("th",{className:"px-4 py-2 font-normal",children:"Part"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"ETag"})]})}),w.jsx("tbody",{className:"divide-y divide-[var(--line-soft)]",children:n.data.parts.map(s=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"mono tnum px-4 py-2 text-xs text-zinc-300",children:s.partNumber}),w.jsx("td",{className:"mono px-4 py-2 text-xs text-zinc-500",children:s.etag})]},s.partNumber))})]})})]})]})}function FA({route:e,actions:r}){return e.uploadId?w.jsx(SA,{uploadId:e.uploadId,actions:r}):w.jsx(TA,{actions:r})}const CA=[{id:"disks",label:"disks"},{id:"uploads",label:"uploads"},{id:"library",label:"library"}];function AA({className:e}){return w.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:e,role:"img","aria-label":"media",children:[w.jsx("title",{children:"media"}),w.jsx("path",{d:"M12 3 21 7.5 12 12 3 7.5z",opacity:.9}),w.jsx("path",{d:"M3 12l9 4.5L21 12",opacity:.55}),w.jsx("path",{d:"M3 16.5 12 21l9-4.5",opacity:.3})]})}function PA(){var l,o,c,u,f,h;const e=Gw(),r=as(),t=Kt({queryKey:["me"],queryFn:()=>be.me()}),n=((l=t.data)==null?void 0:l.state)==="authenticated",a=Kt({queryKey:["topology"],queryFn:()=>be.topology(),enabled:t.data!==void 0&&t.data.state!=="login"});async function s(){await be.logout(),await r.invalidateQueries()}if(((o=t.data)==null?void 0:o.state)==="login")return w.jsx(Vw,{modes:t.data.modes});const i=(x,p)=>w.jsxs("span",{className:`mono flex items-center gap-1 text-[10px] ${p?"text-zinc-400":"text-zinc-700"}`,children:[w.jsx(lo,{tone:p?"ok":"idle"}),x]});return w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"app-bg"}),w.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[w.jsxs("header",{className:"z-10 flex items-center gap-4 border-b border-[var(--line)] px-5 py-3",children:[w.jsxs("div",{className:"flex items-center gap-2.5",children:[w.jsx("div",{className:"grid h-7 w-7 place-items-center rounded-md border border-emerald-500/30 bg-emerald-500/10",children:w.jsx(AA,{className:"h-4 w-4 text-emerald-400"})}),w.jsxs("div",{className:"leading-none",children:[w.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"media"}),w.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-zinc-600",children:"console"})]})]}),w.jsx("nav",{className:"ml-2 flex flex-wrap items-center gap-1",children:CA.map(x=>w.jsx("a",{href:`#/${x.id}`,className:`mono flex items-center gap-2 rounded-md border px-2.5 py-1 text-xs uppercase tracking-wide transition-colors ${e.tab===x.id?"border-zinc-600 bg-zinc-900 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"}`,children:x.label},x.id))}),a.data&&w.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[w.jsxs("span",{className:"mono tnum text-[10px] text-zinc-500",children:[a.data.disks," ",a.data.disks===1?"disk":"disks"]}),i("store",a.data.hasStore),i("uploads",a.data.hasUploads),i("actions",a.data.actions),w.jsxs("span",{className:"ml-1 flex items-center gap-1.5 text-xs text-zinc-500",children:[w.jsx(lo,{tone:"ok",pulse:!0}),"live"]}),n&&w.jsx("button",{type:"button",onClick:s,className:"mono ml-1 rounded-md border border-[var(--line)] px-2 py-1 text-[10px] uppercase tracking-wider text-zinc-500 transition-colors hover:bg-zinc-800 hover:text-zinc-200",children:((c=t.data)==null?void 0:c.state)==="authenticated"&&t.data.user.name?`sign out · ${t.data.user.name}`:"sign out"})]})]}),w.jsxs("main",{className:"min-h-0 flex-1 overflow-auto p-6",children:[e.tab==="disks"&&w.jsx(mA,{route:e,actions:((u=a.data)==null?void 0:u.actions)??!1}),e.tab==="uploads"&&w.jsx(FA,{route:e,actions:((f=a.data)==null?void 0:f.actions)??!1}),e.tab==="library"&&w.jsx(EA,{route:e,hasStore:((h=a.data)==null?void 0:h.hasStore)??!1})]})]})]})}export{PA as A,OA as Q,DA as a,Uw as c,w as j,ve as r};
80
+ `))):t,i=tA(e),l=i==="csv"?w.jsx(Y1,{text:s,delimiter:","}):i==="tsv"?w.jsx(Y1,{text:s,delimiter:" "}):w.jsx("pre",{className:"mono min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words rounded-md border border-[var(--line)] bg-black/30 p-3 text-xs text-zinc-300",children:i==="json"?lA(s):s});return w.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[a&&w.jsxs("div",{className:"mono shrink-0 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1.5 text-[11px] text-amber-300",children:["Sample — the first ",Rn(n)," of ",Rn(e.size),". Filters and sort apply to this sample; open the original ↗ for the whole file."]}),l]})}function cA({item:e,kind:r}){switch(r){case"image":return w.jsx("div",{className:"grid min-h-0 flex-1 place-items-center",children:w.jsx("img",{src:e.url,alt:e.name,className:"max-h-full max-w-full rounded-md object-contain"})});case"video":return w.jsx("div",{className:"grid min-h-0 flex-1 place-items-center",children:w.jsx("video",{src:e.url,controls:!0,className:"max-h-full max-w-full rounded-md"})});case"audio":return w.jsx("div",{className:"grid min-h-0 flex-1 place-items-center",children:w.jsx("audio",{src:e.url,controls:!0,className:"w-full max-w-md"})});case"pdf":return w.jsx("iframe",{src:be.objectRawUrl(e.disk,e.key),title:e.name,className:"min-h-0 w-full flex-1 rounded-md border border-[var(--line)] bg-white"});case"text":return w.jsx(oA,{item:e});case"sheet":return w.jsx(iA,{item:e});default:return w.jsx(wo,{item:e,message:`No inline preview for ${e.contentType??"this type"}`})}}function uA({item:e,onClose:r}){if(ve.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,r]),!e)return null;const t=rA(e);return Gf.createPortal(w.jsx("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-black/80 p-6 backdrop-blur-sm",onClick:n=>{n.target===n.currentTarget&&r()},children:w.jsxs("div",{className:"flex h-[86vh] max-h-full w-full max-w-5xl flex-col overflow-hidden rounded-lg border border-[var(--line)] bg-[var(--panel)] shadow-2xl","aria-label":`Preview of ${e.name}`,children:[w.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--line)] px-4 py-2.5",children:[w.jsxs("div",{className:"min-w-0 flex-1",children:[w.jsx("div",{className:"mono truncate text-sm text-zinc-200",children:e.name}),w.jsxs("div",{className:"mono tnum mt-0.5 flex items-center gap-2 text-[10px] text-zinc-600",children:[w.jsx("span",{children:Rn(e.size)}),e.contentType&&w.jsx("span",{className:"rounded border border-[var(--line)] px-1 text-zinc-500",children:e.contentType})]})]}),w.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"mono shrink-0 rounded-md border border-[var(--line)] px-2 py-1 text-[11px] text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100",children:"Open ↗"}),w.jsx("button",{type:"button",onClick:r,"aria-label":"Close preview",className:"mono shrink-0 rounded-md border border-[var(--line)] px-2 py-1 text-[11px] text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100",children:"✕"})]}),w.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden p-4",children:w.jsx(cA,{item:e,kind:t})})]})}),document.body)}function fA(e){if(!e)return[];const r=e.split("/").filter(a=>a.length>0),t=[];let n="";for(const a of r)n=n?`${n}/${a}`:a,t.push({label:a,prefix:n});return t}function yl(e,r){const t=r?`?prefix=${encodeURIComponent(r)}`:"";window.location.hash=`#/disks/${encodeURIComponent(e)}${t}`}function hA(e,r){const t={};return e!==void 0&&(t.prefix=e),r!==void 0&&(t.cursor=r),t}function Gn(e){return e instanceof Error?e.message:String(e)}function _h(e,r){const t=e==null?void 0:e.replace(/\/+$/,"");return t?`${t}/${r}`:r}function dA({disk:e,prefix:r,onClose:t,onUploaded:n}){const[a,s]=ve.useState([]),[i,l]=ve.useState(null),[o,c]=ve.useState(null),[u,f]=ve.useState(!1),h=ve.useRef(null);function x(v){s(g=>[...g,...Array.from(v)])}async function p(){if(a.length!==0){l({done:0,total:a.length}),c(null);try{for(let v=0;v<a.length;v++){const g=a[v];g&&(await be.uploadObject(e,_h(r,g.name),g),l({done:v+1,total:a.length}))}await n(),t()}catch(v){c(Gn(v)),l(null)}}}const d=i!==null;return w.jsxs(bo,{title:`Upload to ${r?`/${r}`:e}`,onClose:t,footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:t,disabled:d,children:"Cancel"}),w.jsx(va,{tone:"emerald",onClick:p,disabled:d||a.length===0,children:d?`Uploading ${i.done}/${i.total}…`:"Upload"})]}),children:[w.jsxs("div",{onClick:()=>{var v;return(v=h.current)==null?void 0:v.click()},onDragOver:v=>{v.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:v=>{v.preventDefault(),f(!1),x(v.dataTransfer.files)},className:`mono cursor-pointer rounded-md border border-dashed px-3 py-6 text-center text-xs transition-colors ${u?"border-emerald-500/50 bg-emerald-500/5 text-emerald-300":"border-[var(--line)] text-zinc-500 hover:text-zinc-300"}`,children:["Drop files here, or click to choose",w.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:v=>{v.target.files&&x(v.target.files),v.target.value=""}})]}),a.length>0&&w.jsx("ul",{className:"mt-3 max-h-48 space-y-1 overflow-auto",children:a.map((v,g)=>w.jsxs("li",{className:"mono flex items-center justify-between gap-2 rounded border border-[var(--line)] px-2 py-1 text-[11px]",children:[w.jsx("span",{className:"truncate text-zinc-300",children:v.name}),w.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[w.jsx("span",{className:"tnum text-zinc-600",children:Rn(v.size)}),!d&&w.jsx("button",{type:"button","aria-label":`Remove ${v.name}`,onClick:()=>s(y=>y.filter((m,T)=>T!==g)),className:"text-zinc-600 hover:text-rose-400",children:"✕"})]})]},`${v.name}-${g}`))}),o&&w.jsx("p",{className:"mono mt-3 text-[11px] s-error",children:o})]})}function xA({disk:e,prefix:r,onClose:t,onCreated:n}){const[a,s]=ve.useState(""),[i,l]=ve.useState(!1),[o,c]=ve.useState(null),u=ve.useRef(null);ve.useEffect(()=>{var h;(h=u.current)==null||h.focus()},[]);async function f(){const h=a.trim();if(h!==""){l(!0),c(null);try{await be.createFolder(e,_h(r,h)),await n(),t()}catch(x){c(Gn(x)),l(!1)}}}return w.jsxs(bo,{title:"New folder",onClose:t,footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:t,disabled:i,children:"Cancel"}),w.jsx(va,{tone:"emerald",onClick:f,disabled:i||a.trim()==="",children:i?"Creating…":"Create"})]}),children:[w.jsxs("label",{className:"mono flex flex-col gap-1 text-[10px] uppercase tracking-wider text-zinc-600",children:["Folder name",w.jsx("input",{ref:u,value:a,onChange:h=>s(h.target.value),onKeyDown:h=>{h.key==="Enter"&&f()},placeholder:"reports",className:"mono rounded-md border border-[var(--line)] bg-black/30 px-3 py-2 text-sm normal-case tracking-normal text-zinc-100 focus:border-emerald-500/40 focus:outline-none"})]}),w.jsxs("p",{className:"mono mt-2 text-[10px] text-zinc-600",children:["Creates ",r?`/${r}/`:"",w.jsx("span",{className:"text-zinc-400",children:a.trim()||"name"}),"/"]}),o&&w.jsx("p",{className:"mono mt-3 text-[11px] s-error",children:o})]})}function pA({kind:e,disk:r,sourceKey:t,onClose:n,onDone:a}){const[s,i]=ve.useState(t),[l,o]=ve.useState(!1),[c,u]=ve.useState(null),f=ve.useRef(null);ve.useEffect(()=>{const v=f.current;if(!v)return;v.focus();const g=t.lastIndexOf("/");v.setSelectionRange(g+1,t.length)},[t]);const h=e==="copy"?"Copy":"Move",x=s.trim(),p=x===t;async function d(){if(!(x===""||p)){o(!0),u(null);try{e==="copy"?await be.copyObject(r,t,x):await be.moveObject(r,t,x),await a(),n()}catch(v){u(Gn(v)),o(!1)}}}return w.jsxs(bo,{title:`${h} object`,onClose:n,footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:n,disabled:l,children:"Cancel"}),w.jsx(va,{tone:e==="move"?"rose":"emerald",onClick:d,disabled:l||x===""||p,children:l?`${h==="Copy"?"Copying":"Moving"}…`:h})]}),children:[w.jsxs("p",{className:"mono mb-3 text-[11px] text-zinc-500",children:["From ",w.jsx("span",{className:"text-zinc-300",children:t})]}),w.jsxs("label",{className:"mono flex flex-col gap-1 text-[10px] uppercase tracking-wider text-zinc-600",children:["Destination key",w.jsx("input",{ref:f,value:s,onChange:v=>i(v.target.value),onKeyDown:v=>{v.key==="Enter"&&d()},className:"mono rounded-md border border-[var(--line)] bg-black/30 px-3 py-2 text-sm normal-case tracking-normal text-zinc-100 focus:border-emerald-500/40 focus:outline-none"})]}),p&&w.jsx("p",{className:"mono mt-2 text-[10px] text-zinc-600",children:"Change the key to a new destination."}),c&&w.jsx("p",{className:"mono mt-3 text-[11px] s-error",children:c})]})}function mA({route:e,actions:r}){var he,ce;const t=as(),n=Kt({queryKey:["disks"],queryFn:()=>be.disks()}),a=((he=n.data)==null?void 0:he.disks)??[],s=e.disk??((ce=a[0])==null?void 0:ce.name),i=e.prefix,l=`${s??""}::${i??""}`,[o,c]=ve.useState(void 0),[u,f]=ve.useState({key:l,folders:[],files:[],cursor:void 0,lastData:void 0}),[h,x]=ve.useState(null),[p,d]=ve.useState(null),[v,g]=ve.useState(null),[y,m]=ve.useState(!1);u.key!==l&&(f({key:l,folders:[],files:[],cursor:void 0,lastData:void 0}),c(void 0));const T=a.find(X=>X.name===s),P=T?T.capabilities.list:!0,N=Kt({queryKey:["objects",s,i,o],queryFn:()=>{if(!s)throw new Error("No disk selected");return be.objects(s,hA(i,o))},enabled:!!s&&P}),_=N.data;_&&u.key===l&&u.lastData!==_&&f(o===void 0?{key:l,folders:_.folders,files:_.files,cursor:_.cursor,lastData:_}:{key:l,folders:[...u.folders,..._.folders],files:[...u.files,..._.files],cursor:_.cursor,lastData:_});function I(){c(void 0),f({key:l,folders:[],files:[],cursor:void 0,lastData:void 0})}async function A(X){await t.invalidateQueries({queryKey:["objects",X]}),I()}async function U(X,M,J){x(M);try{const le=await be.object(X,M);d({...le,disk:X,name:J})}catch(le){window.alert(`Failed to open "${M}": ${Gn(le)}`)}finally{x(null)}}async function z(X){await navigator.clipboard.writeText(X)}async function B(X,M){const J=Array.from(M);if(J.length!==0){x("__drop__");try{for(const le of J)await be.uploadObject(X,_h(i,le.name),le);await A(X)}catch(le){window.alert(`Upload failed: ${Gn(le)}`)}finally{x(null)}}}async function q(X){if(!v||v.kind!=="delete-file"&&v.kind!=="delete-folder")return;const M=v;x("__delete__");try{M.kind==="delete-file"?await be.deleteObject(X,M.key):await be.deleteFolder(X,M.prefix),await A(X),g(null)}catch(J){window.alert(`Failed to delete: ${Gn(J)}`)}finally{x(null)}}const fe=fA(i),ae=!N.isLoading&&!N.isError&&u.folders.length===0&&u.files.length===0;return w.jsxs("section",{className:"rise",children:[w.jsxs("div",{className:"grid grid-cols-[220px_1fr] gap-4",children:[w.jsxs(si,{className:"h-fit p-2",children:[w.jsx("h3",{className:"mono px-2 py-1 text-[10px] uppercase tracking-wider text-zinc-600",children:"explorer"}),n.isLoading&&w.jsx(dr,{children:"Loading…"}),n.isError&&w.jsx("p",{className:"px-2 py-1 text-sm s-error",children:Gn(n.error)}),!n.isLoading&&a.length===0&&w.jsx(dr,{children:"No disks configured."}),a.length>0&&w.jsx(Qw,{disks:a,selectedDisk:s,currentPrefix:i,onNavigate:yl})]}),w.jsxs(si,{className:"p-3",children:[!s&&w.jsx(dr,{children:"Select a disk to browse its objects."}),s&&!P&&w.jsxs(dr,{children:["Listing is not supported on disk"," ",w.jsx("span",{className:"mono text-zinc-300",children:s}),"."]}),s&&P&&w.jsxs("div",{onDragOver:r?X=>{X.preventDefault(),m(!0)}:void 0,onDragLeave:r?()=>m(!1):void 0,onDrop:r?X=>{X.preventDefault(),m(!1),B(s,X.dataTransfer.files)}:void 0,className:`rounded-md ${y?"ring-2 ring-inset ring-emerald-500/50":""}`,children:[w.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[w.jsxs("nav",{className:"mono flex flex-wrap items-center gap-1 text-xs text-zinc-500",children:[w.jsx("button",{type:"button",onClick:()=>yl(s,""),className:`rounded px-1.5 py-0.5 hover:bg-zinc-800/60 ${i?"":"text-zinc-100"}`,children:s}),fe.map((X,M)=>w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx("span",{className:"text-zinc-700",children:"/"}),w.jsx("button",{type:"button",onClick:()=>yl(s,X.prefix),className:`rounded px-1.5 py-0.5 hover:bg-zinc-800/60 ${M===fe.length-1?"text-zinc-100":""}`,children:X.label})]},X.prefix))]}),r&&w.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[w.jsx(kt,{tone:"emerald",onClick:()=>g({kind:"upload"}),children:"↑ Upload"}),w.jsx(kt,{onClick:()=>g({kind:"folder"}),children:"+ New folder"})]})]}),N.isLoading&&w.jsx(dr,{children:"Loading objects…"}),N.isError&&w.jsx("p",{className:"text-sm s-error",children:Gn(N.error)}),ae&&w.jsx(dr,{children:"This folder is empty."}),(u.folders.length>0||u.files.length>0)&&w.jsxs("table",{className:"w-full text-left text-sm",children:[w.jsx("thead",{children:w.jsxs("tr",{className:"mono border-b border-[var(--line)] text-[10px] uppercase tracking-wider text-zinc-600",children:[w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Name"}),w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Size"}),w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Last modified"}),w.jsx("th",{className:"py-2 pr-2 font-normal",children:"Actions"})]})}),w.jsxs("tbody",{className:"divide-y divide-[var(--line-soft)]",children:[u.folders.map(X=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"py-2 pr-2",children:w.jsxs("button",{type:"button",onClick:()=>yl(s,X.prefix),className:"flex items-center gap-2 text-zinc-200 hover:text-emerald-300",children:[w.jsx("span",{className:"text-zinc-600",children:"▸"}),X.name]})}),w.jsx("td",{className:"py-2 pr-2 text-zinc-700",children:"—"}),w.jsx("td",{className:"py-2 pr-2 text-zinc-700",children:"—"}),w.jsx("td",{className:"py-2 pr-2",children:r&&w.jsx(kt,{tone:"rose",onClick:()=>g({kind:"delete-folder",prefix:X.prefix,name:X.name}),children:"Delete"})})]},X.prefix)),u.files.map(X=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"mono py-2 pr-2 text-[13px] text-zinc-200",children:X.name}),w.jsx("td",{className:"mono tnum py-2 pr-2 text-xs text-zinc-500",children:Rn(X.sizeBytes)}),w.jsx("td",{className:"py-2 pr-2 text-xs text-zinc-500",children:Kf(X.lastModified)}),w.jsx("td",{className:"py-2 pr-2",children:w.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[w.jsx(kt,{disabled:h===X.key,onClick:()=>U(s,X.key,X.name),children:"Preview"}),w.jsx(kt,{onClick:()=>z(X.key),children:"Copy key"}),r&&w.jsxs(w.Fragment,{children:[w.jsx(kt,{onClick:()=>g({kind:"copy",key:X.key,name:X.name}),children:"Copy to…"}),w.jsx(kt,{onClick:()=>g({kind:"move",key:X.key,name:X.name}),children:"Move to…"}),w.jsx(kt,{tone:"rose",onClick:()=>g({kind:"delete-file",key:X.key,name:X.name}),children:"Delete"})]})]})})]},X.key))]})]}),u.cursor!==void 0&&w.jsx("div",{className:"mt-3",children:w.jsx(kt,{disabled:N.isFetching,onClick:()=>c(u.cursor),children:N.isFetching?"Loading…":"Load more"})}),r&&y&&w.jsxs("p",{className:"mono mt-3 rounded-md border border-dashed border-emerald-500/40 bg-emerald-500/5 px-3 py-4 text-center text-xs text-emerald-300/80",children:["Drop files to upload to ",i?`/${i}`:s]})]})]})]}),s&&(v==null?void 0:v.kind)==="upload"&&w.jsx(dA,{disk:s,prefix:i,onClose:()=>g(null),onUploaded:()=>A(s)}),s&&(v==null?void 0:v.kind)==="folder"&&w.jsx(xA,{disk:s,prefix:i,onClose:()=>g(null),onCreated:()=>A(s)}),s&&((v==null?void 0:v.kind)==="copy"||(v==null?void 0:v.kind)==="move")&&w.jsx(pA,{kind:v.kind,disk:s,sourceKey:v.key,onClose:()=>g(null),onDone:()=>A(s)}),s&&((v==null?void 0:v.kind)==="delete-file"||(v==null?void 0:v.kind)==="delete-folder")&&w.jsxs(bo,{title:v.kind==="delete-folder"?"Delete folder":"Delete object",onClose:()=>g(null),footer:w.jsxs(w.Fragment,{children:[w.jsx(va,{onClick:()=>g(null),disabled:h==="__delete__",children:"Cancel"}),w.jsx(va,{tone:"rose",onClick:()=>q(s),disabled:h==="__delete__",children:h==="__delete__"?"Deleting…":"Delete"})]}),children:[w.jsxs("p",{className:"text-sm text-zinc-300",children:["Delete ",w.jsx("span",{className:"mono text-zinc-100",children:v.name}),"?"]}),w.jsx("p",{className:"mono mt-2 text-[11px] text-zinc-600",children:v.kind==="delete-folder"?"Every object inside this folder is removed. This cannot be undone.":"This cannot be undone."})]}),w.jsx(uA,{item:p,onClose:()=>d(null)})]})}function ko(e){return e===void 0?"#/library":`#/library?collection=${encodeURIComponent(e)}`}function vA(e){return e.startsWith("image/")}function gA({collections:e,selected:r}){const t=n=>`mono flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs transition-colors ${n?"border-zinc-600 bg-zinc-900 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"}`;return w.jsxs("div",{className:"mb-4 flex flex-wrap gap-1",children:[w.jsx("a",{href:ko(void 0),className:t(r===void 0),children:"all"}),e.map(n=>w.jsxs("a",{href:ko(n.key),className:t(r===n.key),children:[n.key,w.jsxs("span",{className:"tnum text-zinc-600",children:[n.count," · ",Rn(n.sumSize)]})]},n.key))]})}function yA({records:e,collection:r}){return e.length===0?w.jsxs(dr,{children:["No records",r?` in "${r}"`:"","."]}):w.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:e.map(t=>w.jsxs("a",{href:`#/library/${encodeURIComponent(t.id)}${r?`?collection=${encodeURIComponent(r)}`:""}`,className:"rounded-lg border border-[var(--line)] bg-[var(--panel)] p-3 text-sm transition-colors hover:border-zinc-600",children:[w.jsx("div",{className:"truncate font-medium text-zinc-200",children:t.fileName}),w.jsx("div",{className:"mono mt-1 text-[10px] text-zinc-500",children:t.mimeType}),w.jsxs("div",{className:"mono tnum mt-2 flex justify-between text-[10px] text-zinc-600",children:[w.jsx("span",{children:Rn(t.size)}),w.jsx("span",{children:Kf(t.createdAt)})]})]},t.id))})}function Ca({label:e,children:r}){return w.jsxs(w.Fragment,{children:[w.jsx("dt",{className:"mono text-[10px] uppercase tracking-wider text-zinc-600",children:e}),w.jsx("dd",{className:"truncate text-zinc-200",children:r})]})}function wA({route:e}){const r=as(),[t,n]=ve.useState(void 0),a=e.recordId,s=Kt({queryKey:["libraryRecord",a??null],queryFn:()=>a===void 0?Promise.reject(new Error("missing record id")):be.libraryRecord(a),enabled:a!==void 0});async function i(){if(a!==void 0){n(void 0);try{await be.deleteLibraryRecord(a),await r.invalidateQueries({queryKey:["library"]}),await r.invalidateQueries({queryKey:["collections"]}),window.location.hash=ko(e.collection)}catch{n("Delete failed (actions may be disabled)")}}}const l=s.data;return w.jsxs("div",{children:[w.jsx("a",{href:ko(e.collection),className:"mono text-xs text-zinc-500 hover:text-zinc-300",children:"← back to library"}),s.isLoading&&w.jsx(dr,{children:"Loading record…"}),s.isError&&w.jsx("p",{className:"mt-3 text-sm s-error",children:"Failed to load record."}),l&&w.jsxs("div",{className:"mt-3",children:[w.jsxs(si,{className:"p-4",children:[w.jsx("h3",{className:"font-semibold text-zinc-100",children:l.record.fileName}),w.jsxs("dl",{className:"mt-3 grid grid-cols-[110px_1fr] gap-x-4 gap-y-2 text-xs",children:[w.jsx(Ca,{label:"Collection",children:l.record.collection}),w.jsx(Ca,{label:"Mime type",children:w.jsx("span",{className:"mono",children:l.record.mimeType})}),w.jsx(Ca,{label:"Size",children:Rn(l.record.size)}),w.jsx(Ca,{label:"Disk",children:w.jsx("span",{className:"mono",children:l.record.disk})}),w.jsx(Ca,{label:"Path",children:w.jsx("span",{className:"mono",children:l.record.path})}),w.jsxs(Ca,{label:"Owner",children:[l.record.ownerType," · ",l.record.ownerId]}),w.jsx(Ca,{label:"Created",children:Kf(l.record.createdAt)})]}),w.jsxs("div",{className:"mt-4",children:[w.jsx(kt,{tone:"rose",onClick:i,children:"Delete"}),t&&w.jsx("p",{className:"mt-2 text-xs s-error",children:t})]})]}),w.jsx("h4",{className:"mono mb-2 mt-4 text-[10px] uppercase tracking-wider text-zinc-600",children:"variants"}),l.variants.length===0?w.jsx(dr,{children:"No variants."}):w.jsx("div",{className:"flex flex-wrap gap-3",children:l.variants.map(o=>w.jsxs("div",{className:"rounded-lg border border-[var(--line)] bg-[var(--panel)] p-2 text-xs",children:[w.jsx("div",{className:"mono mb-1.5 text-[10px] uppercase tracking-wider text-zinc-500",children:o.name}),vA(l.record.mimeType)?w.jsx("img",{src:o.url,alt:o.name,className:"max-h-40 rounded border border-[var(--line)]"}):w.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",className:"text-emerald-300 hover:text-emerald-200",children:"Open ↗"})]},o.name))})]})]})}function kA(e,r){const t={};return e!==void 0&&(t.collection=e),r!==void 0&&(t.cursor=r),t}function _A({route:e,hasStore:r}){var s;const t=Kt({queryKey:["collections"],queryFn:()=>be.collections(),enabled:r}),n=L2({queryKey:["library",e.collection??null],queryFn:({pageParam:i})=>be.library(kA(e.collection,i)),initialPageParam:"",getNextPageParam:i=>i.cursor,enabled:r}),a=n.data?n.data.pages.flatMap(i=>i.records):[];return w.jsxs("div",{children:[w.jsx(gA,{collections:((s=t.data)==null?void 0:s.collections)??[],selected:e.collection}),n.isLoading&&w.jsx(dr,{children:"Loading library…"}),n.isError&&w.jsx("p",{className:"text-sm s-error",children:"Failed to load library."}),w.jsx(yA,{records:a,collection:e.collection}),n.hasNextPage&&w.jsx("div",{className:"mt-4",children:w.jsx(kt,{onClick:()=>n.fetchNextPage(),disabled:n.isFetchingNextPage,children:n.isFetchingNextPage?"Loading…":"Load more"})})]})}function EA({route:e,hasStore:r}){return r?w.jsx("section",{className:"rise",children:e.recordId?w.jsx(wA,{route:e}):w.jsx(_A,{route:e,hasStore:r})}):w.jsx("section",{className:"rise",children:w.jsx("div",{className:"grid place-items-center py-16 text-center",children:w.jsxs("div",{className:"max-w-sm",children:[w.jsx("div",{className:"mono mb-2 text-[10px] uppercase tracking-[0.2em] text-zinc-600",children:"library"}),w.jsxs("p",{className:"text-sm text-zinc-500",children:["No media store configured. Bind a"," ",w.jsx("code",{className:"mono text-zinc-300",children:"MediaStore"})," to browse collections and their variants here."]})]})})})}const kg=["uploads"];function _g({percent:e}){if(e===null)return w.jsx("span",{className:"mono text-[10px] text-zinc-600",children:"unknown size"});const r=Math.min(100,Math.max(0,e));return w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("div",{className:"h-1.5 w-28 overflow-hidden rounded-full bg-zinc-800",children:w.jsx("div",{className:"h-full rounded-full bg-emerald-500/80 transition-[width]",style:{width:`${r}%`}})}),w.jsxs("span",{className:"mono tnum text-[10px] text-zinc-500",children:[r,"%"]})]})}function TA({actions:e}){var n;const r=Kt({queryKey:kg,queryFn:()=>be.uploads({}),refetchInterval:2e3});if(r.isLoading)return w.jsx(dr,{children:"Loading uploads…"});if(r.isError)return w.jsx(dr,{children:"Failed to load uploads."});const t=((n=r.data)==null?void 0:n.uploads)??[];return w.jsxs("section",{className:"rise",children:[w.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[w.jsx(lo,{tone:"live",pulse:!0}),w.jsxs("span",{className:"mono text-[11px] text-zinc-500",children:["Live resumable sessions · refreshed every 2s",e?" · cancel from a session detail":""]})]}),t.length===0?w.jsx(dr,{children:"No uploads in progress."}):w.jsx(si,{className:"overflow-hidden",children:w.jsxs("table",{className:"w-full text-left text-sm",children:[w.jsx("thead",{children:w.jsxs("tr",{className:"mono border-b border-[var(--line)] text-[10px] uppercase tracking-wider text-zinc-600",children:[w.jsx("th",{className:"px-4 py-2 font-normal",children:"Key"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Disk"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Progress"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Parts"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"Age"})]})}),w.jsx("tbody",{className:"divide-y divide-[var(--line-soft)]",children:t.map(a=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"max-w-xs truncate px-4 py-2",children:w.jsx("a",{href:`#/uploads/${encodeURIComponent(a.id)}`,className:"mono text-xs text-zinc-200 hover:text-emerald-300",children:a.key})}),w.jsx("td",{className:"mono px-4 py-2 text-xs text-zinc-400",children:a.disk}),w.jsx("td",{className:"px-4 py-2",children:w.jsx(_g,{percent:a.percent})}),w.jsx("td",{className:"mono tnum px-4 py-2 text-xs text-zinc-400",children:a.parts}),w.jsx("td",{className:"px-4 py-2 text-xs text-zinc-500",children:Mm(a.createdAt)??"—"})]},a.id))})]})})]})}function Aa({label:e,children:r}){return w.jsxs(w.Fragment,{children:[w.jsx("dt",{className:"mono text-[10px] uppercase tracking-wider text-zinc-600",children:e}),w.jsx("dd",{className:"text-zinc-200",children:r})]})}function SA({uploadId:e,actions:r}){const t=as(),n=Kt({queryKey:["upload",e],queryFn:()=>be.upload(e)}),a=I2({mutationFn:()=>be.abortUpload(e),onSuccess:async()=>{await t.invalidateQueries({queryKey:kg}),window.location.hash="#/uploads"}});return w.jsxs("section",{className:"rise",children:[w.jsx("a",{href:"#/uploads",className:"mono text-xs text-zinc-500 hover:text-zinc-300",children:"← back"}),n.isLoading&&w.jsx(dr,{children:"Loading upload…"}),n.isError&&w.jsx(dr,{children:"Failed to load upload."}),n.data&&w.jsxs("div",{className:"mt-2",children:[w.jsxs(si,{className:"p-4",children:[w.jsxs("dl",{className:"grid grid-cols-[120px_1fr] gap-x-4 gap-y-2 text-sm",children:[w.jsx(Aa,{label:"Key",children:w.jsx("span",{className:"mono truncate text-xs",children:n.data.upload.key})}),w.jsx(Aa,{label:"Disk",children:w.jsx("span",{className:"mono text-xs",children:n.data.upload.disk})}),w.jsx(Aa,{label:"Progress",children:w.jsx(_g,{percent:n.data.upload.percent})}),w.jsx(Aa,{label:"Offset",children:w.jsx("span",{className:"mono tnum text-xs",children:n.data.upload.offset})}),w.jsx(Aa,{label:"Size",children:w.jsx("span",{className:"mono tnum text-xs",children:n.data.upload.size??"unknown"})}),w.jsx(Aa,{label:"Multipart",children:n.data.upload.multipart?"yes":"no"}),w.jsx(Aa,{label:"Age",children:Mm(n.data.upload.createdAt)??"—"})]}),r&&w.jsxs("div",{className:"mt-4",children:[w.jsx(kt,{tone:"rose",onClick:()=>a.mutate(),disabled:a.isPending,title:"Removes the resumable session so it stops here. An incomplete underlying multipart upload is reaped by the bucket lifecycle policy, not by this action.",children:a.isPending?"Canceling…":"Cancel session"}),a.isError&&w.jsx("p",{className:"mt-2 text-xs s-error",children:"Failed to cancel session."})]})]}),w.jsx("h3",{className:"mono mb-1 mt-4 text-[10px] uppercase tracking-wider text-zinc-600",children:"parts"}),n.data.parts.length===0?w.jsx(dr,{children:"No parts uploaded yet."}):w.jsx(si,{className:"overflow-hidden",children:w.jsxs("table",{className:"w-full text-left text-sm",children:[w.jsx("thead",{children:w.jsxs("tr",{className:"mono border-b border-[var(--line)] text-[10px] uppercase tracking-wider text-zinc-600",children:[w.jsx("th",{className:"px-4 py-2 font-normal",children:"Part"}),w.jsx("th",{className:"px-4 py-2 font-normal",children:"ETag"})]})}),w.jsx("tbody",{className:"divide-y divide-[var(--line-soft)]",children:n.data.parts.map(s=>w.jsxs("tr",{className:"hover:bg-zinc-900/40",children:[w.jsx("td",{className:"mono tnum px-4 py-2 text-xs text-zinc-300",children:s.partNumber}),w.jsx("td",{className:"mono px-4 py-2 text-xs text-zinc-500",children:s.etag})]},s.partNumber))})]})})]})]})}function FA({route:e,actions:r}){return e.uploadId?w.jsx(SA,{uploadId:e.uploadId,actions:r}):w.jsx(TA,{actions:r})}const CA=[{id:"disks",label:"disks"},{id:"uploads",label:"uploads"},{id:"library",label:"library"}];function AA({className:e}){return w.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:e,role:"img","aria-label":"media",children:[w.jsx("title",{children:"media"}),w.jsx("path",{d:"M12 3 21 7.5 12 12 3 7.5z",opacity:.9}),w.jsx("path",{d:"M3 12l9 4.5L21 12",opacity:.55}),w.jsx("path",{d:"M3 16.5 12 21l9-4.5",opacity:.3})]})}function PA(){var l,o,c,u,f,h;const e=Gw(),r=as(),t=Kt({queryKey:["me"],queryFn:()=>be.me()}),n=((l=t.data)==null?void 0:l.state)==="authenticated",a=Kt({queryKey:["topology"],queryFn:()=>be.topology(),enabled:t.data!==void 0&&t.data.state!=="login"});async function s(){await be.logout(),await r.invalidateQueries()}if(((o=t.data)==null?void 0:o.state)==="login")return w.jsx(Vw,{modes:t.data.modes});const i=(x,p)=>w.jsxs("span",{className:`mono flex items-center gap-1 text-[10px] ${p?"text-zinc-400":"text-zinc-700"}`,children:[w.jsx(lo,{tone:p?"ok":"idle"}),x]});return w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"app-bg"}),w.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[w.jsxs("header",{className:"z-10 flex items-center gap-4 border-b border-[var(--line)] px-5 py-3",children:[w.jsxs("div",{className:"flex items-center gap-2.5",children:[w.jsx("div",{className:"grid h-7 w-7 place-items-center rounded-md border border-emerald-500/30 bg-emerald-500/10",children:w.jsx(AA,{className:"h-4 w-4 text-emerald-400"})}),w.jsxs("div",{className:"leading-none",children:[w.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"media"}),w.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-zinc-600",children:"console"})]})]}),w.jsx("nav",{className:"ml-2 flex flex-wrap items-center gap-1",children:CA.map(x=>w.jsx("a",{href:`#/${x.id}`,className:`mono flex items-center gap-2 rounded-md border px-2.5 py-1 text-xs uppercase tracking-wide transition-colors ${e.tab===x.id?"border-zinc-600 bg-zinc-900 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"}`,children:x.label},x.id))}),a.data&&w.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[w.jsxs("span",{className:"mono tnum text-[10px] text-zinc-500",children:[a.data.disks," ",a.data.disks===1?"disk":"disks"]}),i("store",a.data.hasStore),i("uploads",a.data.hasUploads),i("actions",a.data.actions),w.jsxs("span",{className:"ml-1 flex items-center gap-1.5 text-xs text-zinc-500",children:[w.jsx(lo,{tone:"ok",pulse:!0}),"live"]}),n&&w.jsx("button",{type:"button",onClick:s,className:"mono ml-1 rounded-md border border-[var(--line)] px-2 py-1 text-[10px] uppercase tracking-wider text-zinc-500 transition-colors hover:bg-zinc-800 hover:text-zinc-200",children:((c=t.data)==null?void 0:c.state)==="authenticated"&&t.data.user.name?`sign out · ${t.data.user.name}`:"sign out"})]})]}),w.jsxs("main",{className:"min-h-0 flex-1 overflow-auto p-6",children:[e.tab==="disks"&&w.jsx(mA,{route:e,actions:((u=a.data)==null?void 0:u.actions)??!1}),e.tab==="uploads"&&w.jsx(FA,{route:e,actions:((f=a.data)==null?void 0:f.actions)??!1}),e.tab==="library"&&w.jsx(EA,{route:e,hasStore:((h=a.data)==null?void 0:h.hasStore)??!1})]})]})]})}export{PA as A,OA as Q,DA as a,Uw as c,w as j,ve as r};
@@ -10,8 +10,8 @@
10
10
  rel="stylesheet"
11
11
  />
12
12
  <title>Media Console</title>
13
- <script type="module" crossorigin src="/media/assets/index-DaZ3KCTX.js"></script>
14
- <link rel="modulepreload" crossorigin href="/media/assets/styles-B7u5Z056.js">
13
+ <script type="module" crossorigin src="/media/assets/index-CfXOVsyK.js"></script>
14
+ <link rel="modulepreload" crossorigin href="/media/assets/styles-B7kWQZMr.js">
15
15
  <link rel="stylesheet" crossorigin href="/media/assets/styles-BidUcq72.css">
16
16
  </head>
17
17
  <body>
@@ -10,8 +10,8 @@
10
10
  rel="stylesheet"
11
11
  />
12
12
  <title>Media Console — Preview</title>
13
- <script type="module" crossorigin src="/media/assets/preview-CFXg_1Uc.js"></script>
14
- <link rel="modulepreload" crossorigin href="/media/assets/styles-B7u5Z056.js">
13
+ <script type="module" crossorigin src="/media/assets/preview-D9uW3_cF.js"></script>
14
+ <link rel="modulepreload" crossorigin href="/media/assets/styles-B7kWQZMr.js">
15
15
  <link rel="stylesheet" crossorigin href="/media/assets/styles-BidUcq72.css">
16
16
  </head>
17
17
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudousxd/nestjs-media-dashboard",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Standalone navigable /media console (disks, live uploads, media library) for nestjs-media — a bundled React SPA served by NestJS",
5
5
  "license": "MIT",
6
6
  "author": "Davide Carvalho",