efficient-shell 13.18.0 → 13.19.0
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.
- package/README.md +7 -2
- package/dist/{Browser-ORLSC6T4.js → Browser-ZTKWHNYX.js} +14 -14
- package/dist/{Files-PI3Z4TAO.js → Files-R2IVXZJJ.js} +70 -70
- package/dist/{Notepad-6FPZHJQ7.js → Notepad-Z2XMVRSD.js} +8 -8
- package/dist/{Preview-4XSAIYMZ.js → Preview-STATKTFB.js} +12 -12
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-BNI3N4TT.js → chunk-25T4YQO7.js} +2 -2
- package/dist/{chunk-J5NBRYBF.js → chunk-46A3BMJB.js} +1 -1
- package/dist/{chunk-OFFJHTNM.js → chunk-BCQSNK2Z.js} +4 -4
- package/dist/{chunk-VR6LMREE.js → chunk-GNRH43N3.js} +2 -2
- package/dist/chunk-HNMWF6OG.js +1 -0
- package/dist/{chunk-WHPYQOXA.js → chunk-HPZLV3KD.js} +5 -5
- package/dist/{chunk-V6HKE4HV.js → chunk-IQPYTW2O.js} +2 -2
- package/dist/{chunk-NVKRYUCM.js → chunk-JB4WXBJB.js} +4 -4
- package/dist/{chunk-SHBZTW7P.js → chunk-K42FXX7J.js} +1 -1
- package/dist/{chunk-F5F5RKB5.js → chunk-NY6MLFBX.js} +5 -5
- package/dist/{chunk-S43DEWMZ.js → chunk-P52LXNUU.js} +1 -1
- package/dist/{chunk-KBZMOPPH.js → chunk-RA2UNNJC.js} +10 -10
- package/dist/chunk-X3LMTOMA.js +2 -0
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/UnitMenu.js +1 -1
- package/dist/forms/WidestLabel.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.js +64 -64
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2WBKQOLF.js +0 -2
- package/dist/chunk-43JCG6EB.js +0 -1
package/README.md
CHANGED
|
@@ -5457,12 +5457,17 @@ to `kinds`.
|
|
|
5457
5457
|
|
|
5458
5458
|
On a pull request (`GITHUB_BASE_REF` set and not empty) it also compares with
|
|
5459
5459
|
the base branch's baseline: no kind's total may be higher there. It fetches
|
|
5460
|
-
`origin/<base>` when the checkout lacks it; when that fails,
|
|
5460
|
+
`origin/<base>` when the checkout lacks it (up to 3 tries); when that fails,
|
|
5461
|
+
the check fails.
|
|
5461
5462
|
When git cannot read the checkout (no git, not a checkout, or a folder git
|
|
5462
5463
|
does not trust), the check fails too.
|
|
5463
5464
|
On a push (`GITHUB_EVENT_NAME` is `push`, no `GITHUB_BASE_REF`: main after a
|
|
5464
5465
|
merge) it compares with the commit before this one (`HEAD^1`), and deepens a
|
|
5465
|
-
shallow checkout by one commit to read it
|
|
5466
|
+
shallow checkout by one commit to read it (up to 3 tries, each stopped after
|
|
5467
|
+
120 s, with waits of 5 s and 15 s). When `HEAD^1` still cannot be read, it
|
|
5468
|
+
fetches the push event's `before` commit by its sha (`GITHUB_EVENT_PATH`) and
|
|
5469
|
+
compares with that. When neither can be read, the check fails, and the failure
|
|
5470
|
+
names each git error and `RUNNER_NAME`.
|
|
5466
5471
|
Give that job `fetch-depth: 2` in `actions/checkout`, so the commit is there
|
|
5467
5472
|
without a fetch.
|
|
5468
5473
|
`--no-base` skips the comparison where `GITHUB_BASE_REF` is not set; on a pull
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import{InputEndActionButton as e}from"./chunk-3SIRRK3F.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-NWS5G7FE.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-
|
|
1
|
+
import{InputEndActionButton as e}from"./chunk-3SIRRK3F.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-NWS5G7FE.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-IQPYTW2O.js";import{WindowTitle as n}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-BG3C4ALM.js";import{confirm as s}from"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-HNMWF6OG.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as a}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.js";import"./chunk-C3QOHMR6.js";import{useRef as i,useEffect as c,useState as l}from"react";import{jsxs as m,jsx as u,Fragment as h}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",p="react-os-shell:browser-homepage",k="https://en.wikipedia.org/wiki/Main_Page",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],g=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function f(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&g.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var w=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function y(){return"undefined"==typeof window?k:localStorage.getItem(p)||k}function v(){const h=i(void 0);void 0===h.current&&(h.current=t()),c(()=>{null!=h.current&&o(h.current)},[]);const k=h.current?f(h.current.url):"",[b,g]=l(y),[w,v]=l(k||b),[C,R]=l(w),[S,W]=l([w]),[U,z]=l(0),[D,F]=l(0),[T,E]=l(x),[H,A]=l(!1),[I,L]=l(null),O=i(null),M=i(null);c(()=>{try{localStorage.setItem(d,JSON.stringify(T))}catch{}},[T]);const Z=e=>{const t=f(e);t&&(v(t),R(t),W(e=>{const o=e.slice(0,U+1);return o.push(t),o}),z(e=>e+1),A(!1))},G=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},Q=()=>{const e=I?.trim();e?(E(t=>[...t,{label:e,url:w}]),L(null)):L(null)};c(()=>{if(null===I)return;O.current?.focus(),O.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||L(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==I]);const J=e=>{E(t=>t.filter((t,o)=>o!==e))},V=U>0,Y=U<S.length-1,B=T.some(e=>e.url===w),K="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"relative flex flex-col h-full bg-white",children:[
|
|
3
3
|
/* @__PURE__ */u(n,{title:`Browser - ${j(w)}`}),
|
|
4
4
|
/* @__PURE__ */u(r,{app:"browser"}),
|
|
5
5
|
/* @__PURE__ */m("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0",children:[
|
|
6
|
-
/* @__PURE__ */u("button",{onClick:()=>{if(U>0){const e=U-1;z(e),v(S[e]),R(S[e]),A(!1)}},disabled:!
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{if(U<S.length-1){const e=U+1;z(e),v(S[e]),R(S[e]),A(!1)}},disabled:!
|
|
8
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
9
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
10
|
-
/* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),
|
|
6
|
+
/* @__PURE__ */u("button",{onClick:()=>{if(U>0){const e=U-1;z(e),v(S[e]),R(S[e]),A(!1)}},disabled:!V,className:K,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
|
|
7
|
+
/* @__PURE__ */u("button",{onClick:()=>{if(U<S.length-1){const e=U+1;z(e),v(S[e]),R(S[e]),A(!1)}},disabled:!Y,className:K,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
|
|
8
|
+
/* @__PURE__ */u("button",{onClick:()=>F(e=>e+1),className:K,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
9
|
+
/* @__PURE__ */u("button",{onClick:()=>Z(b),className:K,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
10
|
+
/* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),Z(C)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */m("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
|
|
11
11
|
/* @__PURE__ */u("span",{className:"px-2 text-gray-400 text-xs",children:w.startsWith("https://")?"🔒":"⚠️"}),
|
|
12
12
|
/* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>R(e.target.value),onFocus:e=>e.target.select(),className:"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono",spellCheck:!1,placeholder:"Enter URL or search…"}),w!==C&&
|
|
13
13
|
/* @__PURE__ */u("span",{className:"flex pr-1",children:/* @__PURE__ */u(e,{action:{label:"Reset to current URL",icon:/* @__PURE__ */u(a,{name:"close"}),onClick:()=>R(w)}})})]})}),
|
|
14
|
-
/* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>A(e=>!e),className:K,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==
|
|
14
|
+
/* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>B?J(T.findIndex(e=>e.url===w)):void L(j(w)),className:K+" "+(B?"text-yellow-500":""),title:B?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:B?"currentColor":"none",strokeWidth:1.5})}),
|
|
15
|
+
/* @__PURE__ */u("button",{onClick:G,className:K,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
|
|
16
|
+
/* @__PURE__ */u("button",{onClick:()=>A(e=>!e),className:K,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==I&&/* @__PURE__ */m("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
|
|
17
17
|
/* @__PURE__ */u("div",{className:"text-2xs font-semibold uppercase tracking-wide text-ink-faint mb-1",children:"Bookmark this page"}),
|
|
18
18
|
/* @__PURE__ */u("div",{className:"text-2xs text-ink-faintest truncate mb-2 font-mono",title:w,children:w}),
|
|
19
|
-
/* @__PURE__ */u("input",{ref:
|
|
19
|
+
/* @__PURE__ */u("input",{ref:O,type:"text",value:I,onChange:e=>L(e.target.value),onKeyDown:e=>{"Enter"===e.key?Q():"Escape"===e.key&&L(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
|
|
20
20
|
/* @__PURE__ */m("div",{className:"flex justify-end gap-1 mt-2",children:[
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:
|
|
23
|
-
/* @__PURE__ */m("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===
|
|
21
|
+
/* @__PURE__ */u("button",{onClick:()=>L(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
22
|
+
/* @__PURE__ */u("button",{onClick:Q,disabled:!I.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
|
|
23
|
+
/* @__PURE__ */m("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===T.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),T.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>Z(e.url),onContextMenu:async o=>{o.preventDefault();await s({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&J(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
|
|
24
24
|
/* @__PURE__ */u("img",{src:`https://icons.duckduckgo.com/ip3/${new URL(e.url).hostname}.ico`,alt:"",className:"h-3.5 w-3.5",onError:e=>{e.target.style.visibility="hidden"}}),e.label]},t)),
|
|
25
25
|
/* @__PURE__ */u("div",{className:"flex-1"}),
|
|
26
26
|
/* @__PURE__ */u("button",{onClick:()=>{g(w);try{localStorage.setItem(p,w)}catch{}},className:"px-2 py-0.5 text-2xs text-ink-faint hover:text-ink-strong",title:"Set current page as homepage",children:"Set as home"})]}),
|
|
27
|
-
/* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(N,{url:w,iframeKey:D,iframeRef:
|
|
27
|
+
/* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(N,{url:w,iframeKey:D,iframeRef:M,openExternal:G,showHelp:H,dismissHelp:()=>A(!1)})})]})}function j(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function N({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:s}){const[i,d]=l(!1);c(()=>{d(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return w.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!i?/* @__PURE__ */u("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */m("div",{className:"max-w-md text-center",children:[
|
|
28
28
|
/* @__PURE__ */u(a,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
|
|
29
29
|
/* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[j(e)," can't be embedded"]}),
|
|
30
30
|
/* @__PURE__ */m("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-R6GXVLY7.js";import{SidebarLayout as t}from"./chunk-U5RG34NE.js";import"./chunk-QWK6DRSN.js";import"./chunk-HMOKKMIV.js";import{SearchableSelect as n}from"./chunk-G2JPTPRS.js";import{Breadcrumbs as a}from"./chunk-OZ4R6U2M.js";import{Select_default as r}from"./chunk-GEITUFYK.js";import"./chunk-EO5RLFRX.js";import"./chunk-K5YT5PMJ.js";import"./chunk-2NMW66P5.js";import{useContextMenu as i,ContextMenu as s}from"./chunk-VKZC3NPM.js";import{Input_default as l}from"./chunk-3SIRRK3F.js";import{DropdownMenu as o}from"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import{IconButton_default as c}from"./chunk-NWS5G7FE.js";import"./chunk-AYZY3YNC.js";import{formatBytes as d}from"./chunk-OJI4ROSD.js";import{dayKeyInZone as m,formatTime as h,formatDateTime as u,userToday as f,instantOnDayKey as p}from"./chunk-NHKT5IH6.js";import{EMPTY_VALUE as k}from"./chunk-36BRD5J3.js";import{fromDateKey as g,toDateKey as w}from"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as y,subscribeFilesChoice as b,getFilesChoice as v,holdFilesChoice as x,answerFilesChoice as N,choiceTakes as C}from"./chunk-CUNYWXUT.js";import{AboutApp as S}from"./chunk-
|
|
2
|
-
return re(
|
|
1
|
+
import{openPreviewFile as e}from"./chunk-R6GXVLY7.js";import{SidebarLayout as t}from"./chunk-U5RG34NE.js";import"./chunk-QWK6DRSN.js";import"./chunk-HMOKKMIV.js";import{SearchableSelect as n}from"./chunk-G2JPTPRS.js";import{Breadcrumbs as a}from"./chunk-OZ4R6U2M.js";import{Select_default as r}from"./chunk-GEITUFYK.js";import"./chunk-EO5RLFRX.js";import"./chunk-K5YT5PMJ.js";import"./chunk-2NMW66P5.js";import{useContextMenu as i,ContextMenu as s}from"./chunk-VKZC3NPM.js";import{Input_default as l}from"./chunk-3SIRRK3F.js";import{DropdownMenu as o}from"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import{IconButton_default as c}from"./chunk-NWS5G7FE.js";import"./chunk-AYZY3YNC.js";import{formatBytes as d}from"./chunk-OJI4ROSD.js";import{dayKeyInZone as m,formatTime as h,formatDateTime as u,userToday as f,instantOnDayKey as p}from"./chunk-NHKT5IH6.js";import{EMPTY_VALUE as k}from"./chunk-36BRD5J3.js";import{fromDateKey as g,toDateKey as w}from"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as y,subscribeFilesChoice as b,getFilesChoice as v,holdFilesChoice as x,answerFilesChoice as N,choiceTakes as C}from"./chunk-CUNYWXUT.js";import{AboutApp as S}from"./chunk-IQPYTW2O.js";import{getFilesStore as j,peekFilesViewRequest as D,consumeFilesViewRequest as T,FILES_SHOW_TRASH_EVENT as M,FILES_OPEN_DESKTOP_FOLDER_EVENT as $,subscribeDesktopFolders as R,getDesktopFoldersSnapshot as L,filesRoleWrites as F,hasHostFilesStore as A,FolderGlyph as E,DesktopItemMiniIcon as I,desktopItemTypeLabel as O,FilesQuotaError as P,FILES_OFFICE_EXTENSIONS as W,FILES_ROLE_LABELS as z}from"./chunk-KGRJSTPM.js";import"./chunk-I4RJAMLJ.js";import{useWindowManager as U,WindowTitle as K}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-BG3C4ALM.js";import{confirm as V,prompt as Y}from"./chunk-GMLOMLCS.js";import{Dialog as J}from"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import{ItemCount as G}from"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-HNMWF6OG.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import{Button_default as Z}from"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as Q}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as B}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import{TH_ONE_LINE as H}from"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import{toast_default as X}from"./chunk-VQ35LXDC.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.js";import"./chunk-C3QOHMR6.js";import{useState as q,useRef as _,useEffect as ee,useCallback as te,useSyncExternalStore as ne,useMemo as ae}from"react";import{jsxs as re,jsx as ie,Fragment as se}from"react/jsx-runtime";var le={doc:"document",docx:"document",odt:"document",rtf:"document",txt:"document",md:"document",xls:"spreadsheet",xlsx:"spreadsheet",ods:"spreadsheet",csv:"spreadsheet",sheet:"spreadsheet",ppt:"slides",pptx:"slides",odp:"slides",key:"slides",slides:"slides",pdf:"pdf",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",heic:"image",tif:"image",tiff:"image",mp4:"video",mov:"video",webm:"video",avi:"video",mkv:"video",mp3:"audio",wav:"audio",m4a:"audio",ogg:"audio",flac:"audio",zip:"archive",rar:"archive","7z":"archive",gz:"archive",tar:"archive",dxf:"drawing",dwg:"drawing",stp:"drawing",step:"drawing",stl:"drawing",obj:"drawing",iges:"drawing",igs:"drawing","3mf":"drawing",glb:"drawing",gltf:"drawing"};function oe(e){const t=e.lastIndexOf(".");return t>0?e.slice(t+1).toLowerCase():""}function ce(e){if("folder"===e.kind)return"folder";if("document"===e.officeKind)return"document";if("spreadsheet"===e.officeKind)return"spreadsheet";if("deck"===e.officeKind)return"slides";const t=e.contentType??"";return"application/pdf"===t?"pdf":t.startsWith("image/")?"image":t.startsWith("video/")?"video":t.startsWith("audio/")?"audio":le[oe(e.name)]??"other"}var de={folder:"Folder",document:"Document",spreadsheet:"Spreadsheet",slides:"Slides",pdf:"PDF",image:"Image",video:"Video",audio:"Audio",archive:"Archive",drawing:"Drawing",other:"File"},me={folder:{name:"folder",tone:"muted"},document:{name:"document",tone:"accent"},spreadsheet:{name:"table",tone:"success"},slides:{name:"presentation-chart-bar",tone:"warning"},pdf:{name:"document",tone:"danger"},image:{name:"image",tone:"muted"},video:{name:"play",tone:"muted"},audio:{name:"speaker-wave",tone:"muted"},archive:{name:"archive-box",tone:"muted"},drawing:{name:"cube-transparent",tone:"muted"},other:{name:"page",tone:"muted"}};function he(e){const t=e.officeKind?W[e.officeKind]:"";return t&&e.name.toLowerCase().endsWith(t)&&e.name.length>t.length?e.name.slice(0,-t.length):e.name}function ue(e){return"folder"===e.kind||e.officeKind&&e.size<=2?"—":d(e.size)}function fe(e,t=/* @__PURE__ */new Date){const n=m(e),a=m(t.toISOString());return n&&a?n===a?h(e,{clock:{hour:"numeric",minute:"2-digit"}}):n.slice(0,4)===a.slice(0,4)?u(e,{clock:{day:"numeric",month:"short"}}):u(e,{clock:{day:"numeric",month:"short",year:"numeric"}}):k}function pe(e){return h(e,{clock:{dateStyle:"short",timeStyle:"short"}})}function ke(e){return"owner"===(e.role??"owner")?"me":e.owner?.name??"—"}var ge=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function we(e,t){const n="asc"===t.dir?1:-1;return[...e].sort((e,a)=>e.kind!==a.kind?"folder"===e.kind?-1:1:n*((e,n)=>{switch(t.key){case"owner":return ge.compare(ke(e),ke(n));case"size":return e.size-n.size;case"modified":return(Date.parse(e.modifiedAt)||0)-(Date.parse(n.modifiedAt)||0);default:return ge.compare(he(e),he(n))}})(e,a)||ge.compare(e.name,a.name))}var ye=["folder","document","spreadsheet","slides","pdf","image","video"],be={today:"Today",week:"Last 7 days",month:"Last 30 days",year:"This year"};function ve(e,t,n=/* @__PURE__ */new Date){const a=t.modified?function(e,t){const n=f(t),a=g(n);if(!n||!a)return Number.NEGATIVE_INFINITY;"week"===e&&a.setDate(a.getDate()-6),"month"===e&&a.setDate(a.getDate()-29),"year"===e&&a.setMonth(0,1);const r=p(w(a),{hour:0,minute:0});return r?Date.parse(r):Number.NEGATIVE_INFINITY}(t.modified,n):null;return e.filter(e=>{if(t.type&&ce(e)!==t.type)return!1;if(t.person){const n="owner"===(e.role??"owner");if("me"===t.person?!n:n||e.owner?.id!==t.person)return!1}return null===a||(Date.parse(e.modifiedAt)||0)>=a})}var xe=[{value:"viewer",label:"Viewer"},{value:"commenter",label:"Commenter"},{value:"editor",label:"Editor"}];function Ne({store:e,entry:t,onClose:a,onChanged:i}){const[s,l]=q(null),[o,d]=q(""),[m,h]=q([]),[u,f]=q(!1),[p,k]=q(""),[g,w]=q("viewer"),[y,b]=q(!1),v=_(/* @__PURE__ */new Map),x=t?.id??null;if(ee(()=>{if(l(null),k(""),d(""),!x||!e.shares)return;let t=!0;return e.shares(x).then(e=>{t&&l(e)}).catch(e=>{t&&(X.error(e.message),l([]))}),()=>{t=!1}},[x,e]),ee(()=>{if(!e.searchPeople||!x)return;let t=!0;f(!0);const n=setTimeout(()=>{e.searchPeople(o).then(e=>{if(t){for(const t of e)v.current.set(t.id,t);h(e)}}).catch(()=>{t&&h([])}).finally(()=>{t&&f(!1)})},250);return()=>{t=!1,clearTimeout(n)}},[o,x,e]),!t)return null;const N=new Set((s??[]).map(e=>e.person.id)),C=m.filter(e=>!N.has(e.id)).map(e=>({value:e.id,label:e.name})),S=async n=>{b(!0);try{await n(),l(await e.shares(t.id)),i()}catch(e){X.error(e.message)}finally{b(!1)}};/* @__PURE__ */
|
|
2
|
+
return re(J,{open:!0,onClose:a,size:"md",title:`Share “${t.name}”`,description:"folder"===t.kind?"Everything inside this folder is shared too. Editors’ uploads count toward your quota.":"Viewers can open and download it. Editors can also replace, rename and delete it.",footer:/* @__PURE__ */ie(Z,{variant:"secondary",onClick:a,children:"Done"}),children:[
|
|
3
3
|
/* @__PURE__ */re("div",{className:"flex items-center gap-2",children:[
|
|
4
4
|
/* @__PURE__ */ie("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */ie(n,{value:p,onChange:k,onSearchChange:d,loading:u&&0===m.length,options:C,placeholder:"Search colleagues by name","aria-label":"Colleague to share with"})}),
|
|
5
5
|
/* @__PURE__ */ie("div",{className:"w-28 shrink-0",children:/* @__PURE__ */ie(r,{value:g,onChange:e=>w(e),options:xe,"aria-label":"Access"})}),
|
|
6
6
|
/* @__PURE__ */ie(Z,{variant:"primary",onClick:()=>{if(!p||!e.share)return;const n=v.current.get(p);S(async()=>{await e.share(t.id,p,g),k(""),d(""),n&&X.success(`Shared with ${n.name}`)})},disabled:!p||y,children:"Add"})]}),
|
|
7
|
-
/* @__PURE__ */ie("div",{className:"mt-4 mb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Who has access"}),null===s?/* @__PURE__ */ie(
|
|
7
|
+
/* @__PURE__ */ie("div",{className:"mt-4 mb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Who has access"}),null===s?/* @__PURE__ */ie(B,{size:"sm",padding:"p-4",label:"Loading"}):/* @__PURE__ */re("ul",{className:"divide-y divide-line-subtle text-sm",children:[
|
|
8
8
|
/* @__PURE__ */re("li",{className:"flex items-center gap-2 h-10",children:[
|
|
9
9
|
/* @__PURE__ */ie("span",{className:"flex-1 truncate",children:"You"}),
|
|
10
10
|
/* @__PURE__ */ie("span",{className:"text-xs text-ink-faint",children:"Owner"})]}),s.map(n=>/* @__PURE__ */re("li",{className:"flex items-center gap-2 h-10",children:[
|
|
11
11
|
/* @__PURE__ */ie("span",{className:"flex-1 truncate",title:n.person.name,children:n.person.name}),
|
|
12
12
|
/* @__PURE__ */ie("div",{className:"w-28 shrink-0",children:/* @__PURE__ */ie(r,{value:n.role,onChange:a=>S(()=>e.share(t.id,n.person.id,a)),options:xe,"aria-label":`Access for ${n.person.name}`,disabled:y})}),
|
|
13
|
-
/* @__PURE__ */ie(c,{"aria-label":`Remove ${n.person.name}`,variant:"ghost",size:"sm",disabled:y,onClick:()=>S(()=>e.unshare(t.id,n.person.id)),children:/* @__PURE__ */ie(
|
|
14
|
-
return re(
|
|
13
|
+
/* @__PURE__ */ie(c,{"aria-label":`Remove ${n.person.name}`,variant:"ghost",size:"sm",disabled:y,onClick:()=>S(()=>e.unshare(t.id,n.person.id)),children:/* @__PURE__ */ie(Q,{name:"close",className:"h-4 w-4",strokeWidth:1.8})})]},n.person.id))]})]})}function Ce({store:e,items:t,from:n,onClose:a,onMove:r}){const[i,s]=q(n??null),[l,o]=q(null),[d,m]=q(!1);ee(()=>{t&&s(n??null)},[t,n]),ee(()=>{if(!t)return;let n=!0;return m(!0),e.list(i).then(e=>{n&&o(e)}).catch(()=>{n&&o(null)}).finally(()=>{n&&m(!1)}),()=>{n=!1}},[e,i,t]);const h=new Set((t??[]).map(e=>e.id)),u=(l?.entries??[]).filter(e=>"folder"===e.kind&&!h.has(e.id)),f=(l?.folder.path??[]).filter(e=>null!==e.id),p=f.length>1?f[f.length-2].id:null,k=l?.folder,g=F(k?.role??"owner"),w=void 0!==n&&i===n,y=t?.length??0,b=1===y?`"${t[0].name}"`:`${y} items`;/* @__PURE__ */
|
|
14
|
+
return re(J,{open:!!t,onClose:a,title:`Move ${b}`,size:"sm",footer:/* @__PURE__ */re(se,{children:[
|
|
15
15
|
/* @__PURE__ */ie(Z,{variant:"secondary",onClick:a,children:"Cancel"}),
|
|
16
16
|
/* @__PURE__ */ie(Z,{variant:"primary",onClick:()=>r(i),disabled:d||!g||w,children:"Move here"})]}),children:[
|
|
17
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-1 mb-2 min-h-8",children:[null!==i&&/* @__PURE__ */ie(c,{"aria-label":"Back",size:"sm",onClick:()=>s(p),children:/* @__PURE__ */ie(
|
|
17
|
+
/* @__PURE__ */re("div",{className:"flex items-center gap-1 mb-2 min-h-8",children:[null!==i&&/* @__PURE__ */ie(c,{"aria-label":"Back",size:"sm",onClick:()=>s(p),children:/* @__PURE__ */ie(Q,{name:"arrow-left",className:"h-4 w-4"})}),
|
|
18
18
|
/* @__PURE__ */ie("span",{className:"text-sm font-medium text-ink-strong truncate",children:null===i?"My files":k?.name??""})]}),
|
|
19
|
-
/* @__PURE__ */ie("div",{className:"border border-line rounded-(--radius-control) h-64 overflow-auto",children:d?/* @__PURE__ */ie(
|
|
20
|
-
/* @__PURE__ */ie(
|
|
19
|
+
/* @__PURE__ */ie("div",{className:"border border-line rounded-(--radius-control) h-64 overflow-auto",children:d?/* @__PURE__ */ie(B,{size:"sm",padding:"p-6",label:"Loading"}):0===u.length?/* @__PURE__ */ie("div",{className:"p-6 text-center text-sm text-ink-faintest",children:"No folders here."}):/* @__PURE__ */ie("ul",{children:u.map(e=>/* @__PURE__ */ie("li",{children:/* @__PURE__ */re("button",{type:"button",onClick:()=>s(e.id),className:"flex w-full items-center gap-2 px-3 h-9 text-left text-sm hover:bg-row-hover",children:[
|
|
20
|
+
/* @__PURE__ */ie(Q,{name:"folder",look:"solid",tone:"muted",className:"h-4 w-4 shrink-0"}),
|
|
21
21
|
/* @__PURE__ */ie("span",{className:"truncate flex-1",children:e.name}),
|
|
22
|
-
/* @__PURE__ */ie(
|
|
22
|
+
/* @__PURE__ */ie(Q,{name:"chevron-right",tone:"muted",className:"h-4 w-4 shrink-0"})]})},e.id))})}),!g&&/* @__PURE__ */ie("p",{className:"mt-2 text-xs text-ink-faint",children:"You can view this folder but not move things into it."})]})}function Se({store:e,entry:t,selectedCount:n,onClose:a}){const[r,i]=q(null),[s,l]=q(null);ee(()=>{if(i(null),l(null),!t)return;let n=!0;return e.info?.(t.id).then(e=>{n&&i(e)}).catch(()=>{}),e.shares?.(t.id).then(e=>{n&&l(e)}).catch(()=>{}),()=>{n=!1}},[e,t]);const o=t?ce(t):null,d=o?me[o]:null,m=r?.path.slice(0,-1).map(e=>e.name||"My files").join(" / "),h=(e,t)=>t?/* @__PURE__ */re("div",{className:"py-2",children:[
|
|
23
23
|
/* @__PURE__ */ie("dt",{className:"text-2xs text-ink-faint",children:e}),
|
|
24
24
|
/* @__PURE__ */ie("dd",{className:"text-sm text-ink break-words",children:t})]}):null;/* @__PURE__ */
|
|
25
25
|
return re("aside",{className:"w-72 shrink-0 border-l border-line flex flex-col min-h-0 bg-surface","aria-label":"Details",children:[
|
|
26
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-2 px-3 h-12 shrink-0",children:[d&&/* @__PURE__ */ie(
|
|
26
|
+
/* @__PURE__ */re("div",{className:"flex items-center gap-2 px-3 h-12 shrink-0",children:[d&&/* @__PURE__ */ie(Q,{name:d.name,tone:d.tone,className:"h-5 w-5 shrink-0"}),
|
|
27
27
|
/* @__PURE__ */ie("span",{className:"flex-1 truncate text-sm font-medium text-ink-strong",children:t?he(t):n>1?`${n} items selected`:"Details"}),
|
|
28
|
-
/* @__PURE__ */ie(c,{"aria-label":"Close details",size:"sm",onClick:a,children:/* @__PURE__ */ie(
|
|
28
|
+
/* @__PURE__ */ie(c,{"aria-label":"Close details",size:"sm",onClick:a,children:/* @__PURE__ */ie(Q,{name:"close",className:"h-4 w-4"})})]}),
|
|
29
29
|
/* @__PURE__ */ie("div",{className:"flex-1 overflow-auto px-4 pb-4",children:t?/* @__PURE__ */re(se,{children:[
|
|
30
|
-
/* @__PURE__ */ie("div",{className:"h-32 rounded-(--radius-control) bg-surface-sunken flex items-center justify-center mb-3",children:d&&/* @__PURE__ */ie(
|
|
30
|
+
/* @__PURE__ */ie("div",{className:"h-32 rounded-(--radius-control) bg-surface-sunken flex items-center justify-center mb-3",children:d&&/* @__PURE__ */ie(Q,{name:d.name,tone:d.tone,className:"h-12 w-12"})}),s&&/* @__PURE__ */re("div",{className:"mb-3",children:[
|
|
31
31
|
/* @__PURE__ */ie("div",{className:"text-xs font-medium text-ink-strong mb-1",children:"Who has access"}),0===s.length?/* @__PURE__ */re("p",{className:"text-sm text-ink-faint",children:["Only ","owner"!==t.role&&t.role?t.owner?.name??"its owner":"you"]}):/* @__PURE__ */ie("ul",{className:"text-sm text-ink",children:s.map(e=>/* @__PURE__ */re("li",{className:"flex justify-between py-0.5",children:[
|
|
32
32
|
/* @__PURE__ */ie("span",{className:"truncate",children:e.person.name}),
|
|
33
|
-
/* @__PURE__ */ie("span",{className:"text-ink-faint text-xs",children:
|
|
33
|
+
/* @__PURE__ */ie("span",{className:"text-ink-faint text-xs",children:z[e.role]})]},e.person.id))})]}),
|
|
34
34
|
/* @__PURE__ */re("dl",{className:"border-t border-line pt-2",children:[h("Type",o?de[o]:null),"file"===t.kind&&h("Size",ue(t)),h("Location",m),h("Owner","me"===ke(t)?"me":ke(t)),h("Modified",t.modifiedAt?`${fe(t.modifiedAt)}${t.modifiedBy?` by ${t.modifiedBy.name}`:""}`:null),h("Created",r?.createdAt?fe(r.createdAt):null)]})]}):/* @__PURE__ */ie("p",{className:"pt-6 text-center text-sm text-ink-faintest",children:n>1?"Select one item to see its details.":"Select a file or folder to see its details."})})]})}var je=e=>"recent"===e||"starred"===e||"shared"===e||"search"===e,De="files.layout",Te={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"},Me=[{kind:"document",label:"Document"},{kind:"spreadsheet",label:"Spreadsheet"},{kind:"deck",label:"Slides"}],$e="application/x-efficient-files";function Re(){try{return"grid"===localStorage.getItem(De)?"grid":"list"}catch{return"list"}}function Le(e){const t=e??"/",n=t.split("/").filter(Boolean);let a=y()??[];for(const e of n){const t=a.find(t=>"folder"===t.kind&&t.name===e);a=t?.children??[]}return{folder:{id:e,name:n[n.length-1]??"",role:"owner",path:[{id:null,name:""},...n.map((e,t)=>({id:"/"+n.slice(0,t+1).join("/"),name:e}))]},entries:a.map(e=>({id:("/"===t?"":t)+"/"+e.name,name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}}function Fe(e,t){return`Not enough space for “${e}” (${d(t.attempted)}). You've used ${d(t.used)} of ${d(t.limit)}. Empty Trash or ask an administrator for more space.`}var Ae=(e,t)=>e instanceof Error&&e.message||t;function Ee(e){const t=[];for(const n of e)("divider"!==n.type||0!==t.length&&"divider"!==t[t.length-1].type)&&t.push(n);for(;t.length&&"divider"===t[t.length-1].type;)t.pop();return t}function Ie({entry:e,className:t="h-5 w-5"}){const{name:n,tone:a}=me[ce(e)];/* @__PURE__ */
|
|
35
|
-
return ie(B,{name:n,tone:a,look:"folder"===e.kind?"solid":void 0,className:`${t} shrink-0`})}function Pe({entry:e,read:t}){const[n,a]=q(null),r="image"===ce(e)&&e.size<=5242880;return ee(()=>{if(!r||!t||"function"!=typeof URL.createObjectURL)return;let n=!0,i=null;return t(e.id).then(e=>{n&&(i=URL.createObjectURL(e),a(i))}).catch(()=>{}),()=>{n=!1,i&&URL.revokeObjectURL(i)}},[e.id,e.modifiedAt,r,t]),n?/* @__PURE__ */ie("img",{src:n,alt:"",className:"h-full w-full object-cover",draggable:!1}):/* @__PURE__ */ie(Ie,{entry:e,className:"h-10 w-10"})}function Oe(){const n=j(),r=n.title??"Files",m=null!==y(),h=!m&&!!n.shares&&!!n.sharedWithMe,[u,f]=q(null),[p,k]=q(null),[g,w]=q([]),[K,Y]=q(()=>/* @__PURE__ */new Set),le=_(null),[ce,xe]=q(!0),[Oe,ze]=q(!1),[Ke,Ue]=q(null),[We,Ve]=q(!1),[Je,Ye]=q(null),[Ge,Ze]=q(null),[Be,He]=q(null),[Qe,Xe]=q(Re),[qe,_e]=q(!1),[et,tt]=q(""),[nt,at]=q(""),[rt,it]=q({}),[st,lt]=q({key:"name",dir:"asc"}),[ot,ct]=q(()=>{const e=D();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"}),dt=_("files"),mt=_(ot);mt.current=ot,ee(()=>{T()},[]);const[ht,ut]=q([]),ft=e=>{Xe(e);try{localStorage.setItem(De,e)}catch{}},pt=te(e=>{ct(e),it({}),lt("recent"===e?{key:"modified",dir:"desc"}:{key:"name",dir:"asc"}),"search"!==e&&(tt(""),at(""))},[]);ee(()=>{const e=()=>{T(),pt("trash")},t=e=>{T();const t=e.detail?.folderId;t&&pt({desktopFolderId:t})};return window.addEventListener(M,e),window.addEventListener($,t),()=>{window.removeEventListener(M,e),window.removeEventListener($,t)}},[pt]);const kt=ne(R,L,L),gt="object"==typeof ot?ot.desktopFolderId:null,wt=gt?kt?.folders.find(e=>e.id===gt)??null:null,yt=gt&&kt?.itemsByFolder[gt]||[];ee(()=>{gt&&kt&&!kt.folders.some(e=>e.id===gt)&&pt("files")},[gt,kt,pt]);const bt=_(0),vt=_(null),xt=_(null),{openPage:Nt,openEntity:Ct}=U(),St=i(),jt=i(),Dt=i(),Tt=ne(b,v,v);ee(()=>x(),[]),ee(()=>{!Tt||"trash"!==ot&&"object"!=typeof ot||pt("files")},[Tt,ot,pt]);const Mt=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>Nt(e)}):"page"===t.entityType?Nt(t.entityId):Ct(t.entityType,t.entityId,null,t.label)},$t=te(async()=>{if(!m)try{Ue(await n.quota())}catch{}},[n,m]),Rt=te(async(e,t)=>{xe(!0);try{await e(),ze(!1)}catch(e){e instanceof TypeError?ze(!0):X.error(Ae(e,t))}finally{xe(!1)}},[]),Lt=te(async e=>{if(m)return k(Le(e)),ze(!1),void xe(!1);await Rt(async()=>{k(await n.list(e))},"Failed to list"),$t()},[n,$t,m,Rt]),Ft=te(async(e,t)=>{if("search"===e&&!n.search){const e=t.toLowerCase(),a=m?Le(u):await n.list(u).catch(()=>null);return w((a?.entries??[]).filter(t=>t.name.toLowerCase().includes(e))),void xe(!1)}const a={recent:()=>n.recent?.()??Promise.resolve([]),starred:()=>n.starred?.()??Promise.resolve([]),shared:()=>n.sharedWithMe?.()??Promise.resolve([]),search:()=>n.search?.(t)??Promise.resolve([])}[e];await Rt(async()=>{w(await a())},"Failed to list files")},[n,m,u,Rt]),At=te(async()=>{if(m)return ut([]),void xe(!1);await Rt(async()=>{ut(await n.trash())},"Failed to list trash"),$t()},[n,$t,m,Rt]),Et=()=>{"files"===ot?Lt(u):je(ot)?Ft(ot,nt):"trash"===ot&&At()};ee(()=>{Y(/* @__PURE__ */new Set),le.current=null,Et()},[u,ot,nt]),ee(()=>{const e=et.trim();if(!e)return;const t=setTimeout(()=>{e===nt&&"search"===mt.current||("search"!==mt.current&&(dt.current=mt.current),ct("search"),it({}),at(e))},300);return()=>clearTimeout(t)},[et]);const It=()=>{tt(""),"search"===mt.current&&pt(dt.current)},Pt=e=>{pt("files"),f(e)},Ot=async(e,t)=>{try{await e()}catch(e){X.error(Ae(e,t))}Et()},zt=e=>Ot(async()=>{await n.restore(e.id),X.success(`Restored "${e.name}"`)},"Restore failed"),Kt=async e=>{await V({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"})&&Ot(()=>n.purge(e.id),"Delete failed")},Ut=async e=>{try{const t=await n.read(e.id),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e.name,r.click(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}catch(e){X.error(Ae(e,"Download failed"))}},Wt="files"===ot?p?.folder??null:null,Vt=Wt?.role??"owner",Jt="owner"!==Vt,Yt="files"===ot?u:null,Gt=!m&&("files"!==ot||F(Vt)),Zt=!m&&"files"===ot&&F(Vt),Bt=async(e,{withFolders:t=!1}={})=>{let a=0;for(const r of Array.from(e)){const e=r.webkitRelativePath??"",i=t?e.split("/").slice(0,-1).join("/"):"";try{await n.upload(Yt,r,i?{folderPath:i}:void 0),a++}catch(e){e instanceof O?X.error(Fe(r.name,e)):X.error(`Upload ${r.name}: ${Ae(e,"failed")}`)}}a>1&&X.success(`Uploaded ${a} files`),"files"===ot?Lt(u):Pt(null)},Ht=async e=>{const t=he(e),a=await J({title:`Rename ${e.kind}`,defaultValue:t,confirmLabel:"Rename"});a&&a!==t&&(/[\\/]/.test(a)?X.error("Names cannot contain slashes"):Ot(()=>n.rename(e.id,function(e,t){const n=e.officeKind?z[e.officeKind]:"";return n&&!t.toLowerCase().endsWith(n)?t+n:t}(e,a)),"Rename failed"))},Qt=async e=>{if(0===e.length)return;const t=1===e.length?e[0]:null,a=e.some(e=>"owner"!==(e.role??"owner")),r=t?(t.owner??p?.folder.owner)?.name??"its owner":"their owners";await V({title:t?`Move ${t.kind} to trash`:`Move ${e.length} items to trash`,message:(t?`"${he(t)}"${"folder"===t.kind?" and everything inside":""}`:`${e.length} items`)+" will move to "+(a?`${r}'s Trash.`:"Trash. You can restore it from there."),confirmLabel:"Move to trash",variant:"danger"})&&(await Ot(async()=>{for(const t of e)await n.remove(t.id)},"Delete failed"),X.success(t?`"${he(t)}" moved to trash`:`${e.length} items moved to trash`))},Xt=(e,t)=>Ot(async()=>{for(const a of e)await n.setStarred(a.id,t)},t?"Star failed":"Unstar failed"),qt=async(e,t)=>{He(null);const a=e.filter(e=>e.id!==t);0!==a.length&&(await Ot(async()=>{for(const e of a)await n.move(e.id,t)},"Move failed"),X.success(1===a.length?`Moved "${he(a[0])}"`:`Moved ${a.length} items`))},_t=()=>{bt.current=0,Ve(!1),Ye(null)};ee(()=>{const e=()=>_t();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]);const en="files"===ot?p?.entries??[]:je(ot)?g:[],tn=ae(()=>we(ve(en,rt),st),[en,rt,st]),nn=ae(()=>new Map(tn.map(e=>[e.id,e])),[tn]),an=[...K].map(e=>nn.get(e)).filter(e=>!!e),rn=1===an.length?an[0]:null,sn=e=>e.role??("files"===ot?Vt:"owner"),ln=e=>!m&&F(sn(e)),on=e=>h&&"owner"===sn(e),cn=e=>!!n.move&&ln(e),dn=(e,t)=>{if(Tt){const t=nn.get(e);if(t&&"file"===t.kind&&!hn(t))return;return void Y(/* @__PURE__ */new Set([e]))}if(t.shiftKey&&le.current){const t=tn.map(e=>e.id),n=t.indexOf(le.current),a=t.indexOf(e);if(n>=0&&a>=0)return void Y(new Set(t.slice(Math.min(n,a),Math.max(n,a)+1)))}le.current=e,t.metaKey||t.ctrlKey?Y(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}):Y(/* @__PURE__ */new Set([e]))},mn=()=>{Y(/* @__PURE__ */new Set),le.current=null},hn=e=>!!Tt&&"file"===e.kind&&C(Tt.request,e.name),un=e=>Tt&&"file"===e.kind&&!hn(e)?"text-ink-faintest":"",fn=e=>{if(!Tt||!hn(e))return;const t="files"===ot?p?.folder:null,n=t?["owner"===t.role?"My files":"Shared with me",...t.path.filter(e=>null!==e.id).map(e=>e.name)].join(" › "):"shared"===ot?"Shared with me":"My files";N(Tt.id,{entry:e,folderId:"files"===ot?u:null,location:n})},pn=Tt&&rn&&hn(rn)?rn:null,kn=t=>{"folder"===t.kind?Pt(t.id):Tt?fn(t):(async t=>{if(m)return;if(n.open?.(t))return;const a=Te[oe(t.name)];a?await e({filePath:n.shortcutPath?.(t.id)??t.id,filename:t.name,kind:a,load:()=>n.read(t.id),onStaged:e=>Nt(e)}):Ut(t)})(t)},gn=e=>{if(0===e.length)return[];const t=1===e.length?e[0]:null;if(Tt)return t&&("folder"===t.kind||hn(t))?[{key:"open",label:"Open",icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[];const a=t&&"file"===t.kind&&n.openLabel?.(t)||"Open",r=e.every(e=>"file"===e.kind),i=e.every(ln);if(m)return t?[{key:"open",label:"Open",icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[];const s=e.some(e=>!e.starred);return Ee([...t?[{key:"open",label:a,icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[],{type:"divider",key:"d1"},...r?[{key:"download",label:"Download",icon:/* @__PURE__ */ie(B,{name:"download",className:"h-4 w-4"}),onSelect:()=>{e.forEach(Ut)}}]:[],...t&&i?[{key:"rename",label:"Rename",icon:/* @__PURE__ */ie(B,{name:"edit",className:"h-4 w-4"}),onSelect:()=>Ht(t)}]:[],...r&&n.copy?[{key:"copy",label:"Make a copy",icon:/* @__PURE__ */ie(B,{name:"copy",className:"h-4 w-4"}),onSelect:()=>(e=>Ot(async()=>{for(const t of e)await n.copy(t.id);X.success(1===e.length?`Copied "${he(e[0])}"`:`Copied ${e.length} files`)},"Copy failed"))(e)}]:[],{type:"divider",key:"d2"},...t&&on(t)?[{key:"share",label:"Share",icon:/* @__PURE__ */ie(B,{name:"add-person",className:"h-4 w-4"}),onSelect:()=>Ze(t)}]:[],...e.every(cn)?[{key:"move",label:"Move",icon:/* @__PURE__ */ie(B,{name:"forward",className:"h-4 w-4"}),onSelect:()=>He(e)}]:[],...n.setStarred?[{key:"star",label:s?"Add to starred":"Remove from starred",icon:/* @__PURE__ */ie(B,{name:"star",className:"h-4 w-4"}),onSelect:()=>Xt(e,s)}]:[],...t?[{key:"info",label:"File information",icon:/* @__PURE__ */ie(B,{name:"info",className:"h-4 w-4"}),onSelect:()=>{Y(/* @__PURE__ */new Set([t.id])),_e(!0)}}]:[],{type:"divider",key:"d3"},...i?[{key:"trash",label:"Move to trash",danger:!0,icon:/* @__PURE__ */ie(B,{name:"trash",className:"h-4 w-4"}),onSelect:()=>Qt(e)}]:[]])},wn=(e,t)=>{const n=K.has(t.id)?an:[t];St.open(e,n)&&!K.has(t.id)&&(Y(/* @__PURE__ */new Set([t.id])),le.current=t.id)},yn=e=>cn(e)?{draggable:!0,onDragStart:t=>{const n=K.has(e.id)?an:[e];t.dataTransfer.setData($e,JSON.stringify(n.map(e=>e.id))),t.dataTransfer.effectAllowed="move"}}:{},bn=e=>"folder"===e.kind&&ln(e)&&n.move?{onDragOver:t=>{t.dataTransfer.types.includes($e)&&(t.preventDefault(),t.stopPropagation(),Je!==e.id&&Ye(e.id))},onDragLeave:()=>{Je===e.id&&Ye(null)},onDrop:t=>{if(!t.dataTransfer.types.includes($e))return;t.preventDefault(),t.stopPropagation(),Ye(null);const n=JSON.parse(t.dataTransfer.getData($e)||"[]").map(e=>nn.get(e)).filter(t=>!!t&&t.id!==e.id);qt(n,e.id)}}:{};if(Oe)/* @__PURE__ */
|
|
35
|
+
return ie(Q,{name:n,tone:a,look:"folder"===e.kind?"solid":void 0,className:`${t} shrink-0`})}function Oe({entry:e,read:t}){const[n,a]=q(null),r="image"===ce(e)&&e.size<=5242880;return ee(()=>{if(!r||!t||"function"!=typeof URL.createObjectURL)return;let n=!0,i=null;return t(e.id).then(e=>{n&&(i=URL.createObjectURL(e),a(i))}).catch(()=>{}),()=>{n=!1,i&&URL.revokeObjectURL(i)}},[e.id,e.modifiedAt,r,t]),n?/* @__PURE__ */ie("img",{src:n,alt:"",className:"h-full w-full object-cover",draggable:!1}):/* @__PURE__ */ie(Ie,{entry:e,className:"h-10 w-10"})}function Pe(){const n=j(),r=n.title??"Files",m=null!==y(),h=!m&&!!n.shares&&!!n.sharedWithMe,[u,f]=q(null),[p,k]=q(null),[g,w]=q([]),[z,J]=q(()=>/* @__PURE__ */new Set),le=_(null),[ce,xe]=q(!0),[Pe,We]=q(!1),[ze,Ue]=q(null),[Ke,Ve]=q(!1),[Ye,Je]=q(null),[Ge,Ze]=q(null),[Qe,Be]=q(null),[He,Xe]=q(Re),[qe,_e]=q(!1),[et,tt]=q(""),[nt,at]=q(""),[rt,it]=q({}),[st,lt]=q({key:"name",dir:"asc"}),[ot,ct]=q(()=>{const e=D();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"}),dt=_("files"),mt=_(ot);mt.current=ot,ee(()=>{T()},[]);const[ht,ut]=q([]),ft=e=>{Xe(e);try{localStorage.setItem(De,e)}catch{}},pt=te(e=>{ct(e),it({}),lt("recent"===e?{key:"modified",dir:"desc"}:{key:"name",dir:"asc"}),"search"!==e&&(tt(""),at(""))},[]);ee(()=>{const e=()=>{T(),pt("trash")},t=e=>{T();const t=e.detail?.folderId;t&&pt({desktopFolderId:t})};return window.addEventListener(M,e),window.addEventListener($,t),()=>{window.removeEventListener(M,e),window.removeEventListener($,t)}},[pt]);const kt=ne(R,L,L),gt="object"==typeof ot?ot.desktopFolderId:null,wt=gt?kt?.folders.find(e=>e.id===gt)??null:null,yt=gt&&kt?.itemsByFolder[gt]||[];ee(()=>{gt&&kt&&!kt.folders.some(e=>e.id===gt)&&pt("files")},[gt,kt,pt]);const bt=_(0),vt=_(null),xt=_(null),{openPage:Nt,openEntity:Ct}=U(),St=i(),jt=i(),Dt=i(),Tt=ne(b,v,v);ee(()=>x(),[]),ee(()=>{!Tt||"trash"!==ot&&"object"!=typeof ot||pt("files")},[Tt,ot,pt]);const Mt=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>Nt(e)}):"page"===t.entityType?Nt(t.entityId):Ct(t.entityType,t.entityId,null,t.label)},$t=te(async()=>{if(!m)try{Ue(await n.quota())}catch{}},[n,m]),Rt=te(async(e,t)=>{xe(!0);try{await e(),We(!1)}catch(e){e instanceof TypeError?We(!0):X.error(Ae(e,t))}finally{xe(!1)}},[]),Lt=te(async e=>{if(m)return k(Le(e)),We(!1),void xe(!1);await Rt(async()=>{k(await n.list(e))},"Failed to list"),$t()},[n,$t,m,Rt]),Ft=te(async(e,t)=>{if("search"===e&&!n.search){const e=t.toLowerCase(),a=m?Le(u):await n.list(u).catch(()=>null);return w((a?.entries??[]).filter(t=>t.name.toLowerCase().includes(e))),void xe(!1)}const a={recent:()=>n.recent?.()??Promise.resolve([]),starred:()=>n.starred?.()??Promise.resolve([]),shared:()=>n.sharedWithMe?.()??Promise.resolve([]),search:()=>n.search?.(t)??Promise.resolve([])}[e];await Rt(async()=>{w(await a())},"Failed to list files")},[n,m,u,Rt]),At=te(async()=>{if(m)return ut([]),void xe(!1);await Rt(async()=>{ut(await n.trash())},"Failed to list trash"),$t()},[n,$t,m,Rt]),Et=()=>{"files"===ot?Lt(u):je(ot)?Ft(ot,nt):"trash"===ot&&At()};ee(()=>{J(/* @__PURE__ */new Set),le.current=null,Et()},[u,ot,nt]),ee(()=>{const e=et.trim();if(!e)return;const t=setTimeout(()=>{e===nt&&"search"===mt.current||("search"!==mt.current&&(dt.current=mt.current),ct("search"),it({}),at(e))},300);return()=>clearTimeout(t)},[et]);const It=()=>{tt(""),"search"===mt.current&&pt(dt.current)},Ot=e=>{pt("files"),f(e)},Pt=async(e,t)=>{try{await e()}catch(e){X.error(Ae(e,t))}Et()},Wt=e=>Pt(async()=>{await n.restore(e.id),X.success(`Restored "${e.name}"`)},"Restore failed"),zt=async e=>{await V({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"})&&Pt(()=>n.purge(e.id),"Delete failed")},Ut=async e=>{try{const t=await n.read(e.id),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e.name,r.click(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}catch(e){X.error(Ae(e,"Download failed"))}},Kt="files"===ot?p?.folder??null:null,Vt=Kt?.role??"owner",Yt="owner"!==Vt,Jt="files"===ot?u:null,Gt=!m&&("files"!==ot||F(Vt)),Zt=!m&&"files"===ot&&F(Vt),Qt=async(e,{withFolders:t=!1}={})=>{let a=0;for(const r of Array.from(e)){const e=r.webkitRelativePath??"",i=t?e.split("/").slice(0,-1).join("/"):"";try{await n.upload(Jt,r,i?{folderPath:i}:void 0),a++}catch(e){e instanceof P?X.error(Fe(r.name,e)):X.error(`Upload ${r.name}: ${Ae(e,"failed")}`)}}a>1&&X.success(`Uploaded ${a} files`),"files"===ot?Lt(u):Ot(null)},Bt=async e=>{const t=he(e),a=await Y({title:`Rename ${e.kind}`,defaultValue:t,confirmLabel:"Rename"});a&&a!==t&&(/[\\/]/.test(a)?X.error("Names cannot contain slashes"):Pt(()=>n.rename(e.id,function(e,t){const n=e.officeKind?W[e.officeKind]:"";return n&&!t.toLowerCase().endsWith(n)?t+n:t}(e,a)),"Rename failed"))},Ht=async e=>{if(0===e.length)return;const t=1===e.length?e[0]:null,a=e.some(e=>"owner"!==(e.role??"owner")),r=t?(t.owner??p?.folder.owner)?.name??"its owner":"their owners";await V({title:t?`Move ${t.kind} to trash`:`Move ${e.length} items to trash`,message:(t?`"${he(t)}"${"folder"===t.kind?" and everything inside":""}`:`${e.length} items`)+" will move to "+(a?`${r}'s Trash.`:"Trash. You can restore it from there."),confirmLabel:"Move to trash",variant:"danger"})&&(await Pt(async()=>{for(const t of e)await n.remove(t.id)},"Delete failed"),X.success(t?`"${he(t)}" moved to trash`:`${e.length} items moved to trash`))},Xt=(e,t)=>Pt(async()=>{for(const a of e)await n.setStarred(a.id,t)},t?"Star failed":"Unstar failed"),qt=async(e,t)=>{Be(null);const a=e.filter(e=>e.id!==t);0!==a.length&&(await Pt(async()=>{for(const e of a)await n.move(e.id,t)},"Move failed"),X.success(1===a.length?`Moved "${he(a[0])}"`:`Moved ${a.length} items`))},_t=()=>{bt.current=0,Ve(!1),Je(null)};ee(()=>{const e=()=>_t();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]);const en="files"===ot?p?.entries??[]:je(ot)?g:[],tn=ae(()=>we(ve(en,rt),st),[en,rt,st]),nn=ae(()=>new Map(tn.map(e=>[e.id,e])),[tn]),an=[...z].map(e=>nn.get(e)).filter(e=>!!e),rn=1===an.length?an[0]:null,sn=e=>e.role??("files"===ot?Vt:"owner"),ln=e=>!m&&F(sn(e)),on=e=>h&&"owner"===sn(e),cn=e=>!!n.move&&ln(e),dn=(e,t)=>{if(Tt){const t=nn.get(e);if(t&&"file"===t.kind&&!hn(t))return;return void J(/* @__PURE__ */new Set([e]))}if(t.shiftKey&&le.current){const t=tn.map(e=>e.id),n=t.indexOf(le.current),a=t.indexOf(e);if(n>=0&&a>=0)return void J(new Set(t.slice(Math.min(n,a),Math.max(n,a)+1)))}le.current=e,t.metaKey||t.ctrlKey?J(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}):J(/* @__PURE__ */new Set([e]))},mn=()=>{J(/* @__PURE__ */new Set),le.current=null},hn=e=>!!Tt&&"file"===e.kind&&C(Tt.request,e.name),un=e=>Tt&&"file"===e.kind&&!hn(e)?"text-ink-faintest":"",fn=e=>{if(!Tt||!hn(e))return;const t="files"===ot?p?.folder:null,n=t?["owner"===t.role?"My files":"Shared with me",...t.path.filter(e=>null!==e.id).map(e=>e.name)].join(" › "):"shared"===ot?"Shared with me":"My files";N(Tt.id,{entry:e,folderId:"files"===ot?u:null,location:n})},pn=Tt&&rn&&hn(rn)?rn:null,kn=t=>{"folder"===t.kind?Ot(t.id):Tt?fn(t):(async t=>{if(m)return;if(n.open?.(t))return;const a=Te[oe(t.name)];a?await e({filePath:n.shortcutPath?.(t.id)??t.id,filename:t.name,kind:a,load:()=>n.read(t.id),onStaged:e=>Nt(e)}):Ut(t)})(t)},gn=e=>{if(0===e.length)return[];const t=1===e.length?e[0]:null;if(Tt)return t&&("folder"===t.kind||hn(t))?[{key:"open",label:"Open",icon:/* @__PURE__ */ie(Q,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[];const a=t&&"file"===t.kind&&n.openLabel?.(t)||"Open",r=e.every(e=>"file"===e.kind),i=e.every(ln);if(m)return t?[{key:"open",label:"Open",icon:/* @__PURE__ */ie(Q,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[];const s=e.some(e=>!e.starred);return Ee([...t?[{key:"open",label:a,icon:/* @__PURE__ */ie(Q,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[],{type:"divider",key:"d1"},...r?[{key:"download",label:"Download",icon:/* @__PURE__ */ie(Q,{name:"download",className:"h-4 w-4"}),onSelect:()=>{e.forEach(Ut)}}]:[],...t&&i?[{key:"rename",label:"Rename",icon:/* @__PURE__ */ie(Q,{name:"edit",className:"h-4 w-4"}),onSelect:()=>Bt(t)}]:[],...r&&n.copy?[{key:"copy",label:"Make a copy",icon:/* @__PURE__ */ie(Q,{name:"copy",className:"h-4 w-4"}),onSelect:()=>(e=>Pt(async()=>{for(const t of e)await n.copy(t.id);X.success(1===e.length?`Copied "${he(e[0])}"`:`Copied ${e.length} files`)},"Copy failed"))(e)}]:[],{type:"divider",key:"d2"},...t&&on(t)?[{key:"share",label:"Share",icon:/* @__PURE__ */ie(Q,{name:"add-person",className:"h-4 w-4"}),onSelect:()=>Ze(t)}]:[],...e.every(cn)?[{key:"move",label:"Move",icon:/* @__PURE__ */ie(Q,{name:"forward",className:"h-4 w-4"}),onSelect:()=>Be(e)}]:[],...n.setStarred?[{key:"star",label:s?"Add to starred":"Remove from starred",icon:/* @__PURE__ */ie(Q,{name:"star",className:"h-4 w-4"}),onSelect:()=>Xt(e,s)}]:[],...t?[{key:"info",label:"File information",icon:/* @__PURE__ */ie(Q,{name:"info",className:"h-4 w-4"}),onSelect:()=>{J(/* @__PURE__ */new Set([t.id])),_e(!0)}}]:[],{type:"divider",key:"d3"},...i?[{key:"trash",label:"Move to trash",danger:!0,icon:/* @__PURE__ */ie(Q,{name:"trash",className:"h-4 w-4"}),onSelect:()=>Ht(e)}]:[]])},wn=(e,t)=>{const n=z.has(t.id)?an:[t];St.open(e,n)&&!z.has(t.id)&&(J(/* @__PURE__ */new Set([t.id])),le.current=t.id)},yn=e=>cn(e)?{draggable:!0,onDragStart:t=>{const n=z.has(e.id)?an:[e];t.dataTransfer.setData($e,JSON.stringify(n.map(e=>e.id))),t.dataTransfer.effectAllowed="move"}}:{},bn=e=>"folder"===e.kind&&ln(e)&&n.move?{onDragOver:t=>{t.dataTransfer.types.includes($e)&&(t.preventDefault(),t.stopPropagation(),Ye!==e.id&&Je(e.id))},onDragLeave:()=>{Ye===e.id&&Je(null)},onDrop:t=>{if(!t.dataTransfer.types.includes($e))return;t.preventDefault(),t.stopPropagation(),Je(null);const n=JSON.parse(t.dataTransfer.getData($e)||"[]").map(e=>nn.get(e)).filter(t=>!!t&&t.id!==e.id);qt(n,e.id)}}:{};if(Pe)/* @__PURE__ */
|
|
36
36
|
return re("div",{className:"flex flex-col h-full bg-surface",children:[
|
|
37
|
-
/* @__PURE__ */ie(
|
|
37
|
+
/* @__PURE__ */ie(K,{title:`${r} - offline`}),
|
|
38
38
|
/* @__PURE__ */ie("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */re("div",{className:"max-w-md",children:[
|
|
39
|
-
/* @__PURE__ */ie(
|
|
39
|
+
/* @__PURE__ */ie(Q,{name:"close-circle",tone:"muted",className:"h-12 w-12 mx-auto mb-3",strokeWidth:1.4}),A()?/* @__PURE__ */re(se,{children:[
|
|
40
40
|
/* @__PURE__ */ie("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach your files"}),
|
|
41
41
|
/* @__PURE__ */ie("p",{className:"text-sm text-ink-faint mb-3",children:"Check your connection and try again."})]}):/* @__PURE__ */re(se,{children:[
|
|
42
42
|
/* @__PURE__ */ie("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach the file server"}),
|
|
43
43
|
/* @__PURE__ */re("p",{className:"text-sm text-ink-faint mb-3",children:["No response from the file server. Make sure the server is running — see ",
|
|
44
44
|
/* @__PURE__ */ie("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]})]}),
|
|
45
|
-
/* @__PURE__ */ie(Z,{variant:"primary",onClick:Et,children:"Retry"})]})})]});const vn=
|
|
45
|
+
/* @__PURE__ */ie(Z,{variant:"primary",onClick:Et,children:"Retry"})]})})]});const vn=ze&&ze.limit>0?Math.min(100,Math.round(ze.used/ze.limit*100)):0,xn=vn>90?"bg-danger":vn>75?"bg-warning":"bg-accent-fill",Nn=[Yt?{label:"Shared with me",onClick:()=>pt("shared")}:{label:"My files",onClick:()=>Ot(null)},...(Kt?.path??[]).filter(e=>null!==e.id).map(e=>({label:e.name,onClick:()=>Ot(e.id)}))],Cn="recent"===ot?"Recent":"starred"===ot?"Starred":"shared"===ot?"Shared with me":"search"===ot?`Results for “${nt}”`:"trash"===ot?"Trash":wt?wt.name:null,Sn=Tt?`${r} - Choosing`:Cn?`${r} - ${"search"===ot?"Search":Cn}`:Kt&&null!==Kt.id?`${r} - ${Kt.name}`:r,jn=e=>"flex w-full items-center gap-3 rounded-full px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-accent-tint font-medium text-accent-text":"text-ink hover:bg-row-hover"),Dn=Ee([{key:"folder",label:"New folder",icon:/* @__PURE__ */ie(Q,{name:"folder-plus",className:"h-4 w-4"}),onSelect:async()=>{const e=await Y({title:"New folder",placeholder:"Folder name",defaultValue:"Untitled folder",confirmLabel:"Create"});e&&(/[\\/]/.test(e)?X.error("Folder names cannot contain slashes"):(await Pt(()=>n.createFolder(Jt,e),"Create folder failed"),"files"!==ot&&Ot(null)))}},{type:"divider",key:"d1"},{key:"upload",label:"File upload",icon:/* @__PURE__ */ie(Q,{name:"upload",className:"h-4 w-4"}),onSelect:()=>vt.current?.click()},...n.folderUpload?[{key:"upload-folder",label:"Folder upload",icon:/* @__PURE__ */ie(Q,{name:"cloud-arrow-up",className:"h-4 w-4"}),onSelect:()=>xt.current?.click()}]:[],{type:"divider",key:"d2"},...n.createOfficeFile?Me.filter(e=>!n.officeKinds||n.officeKinds.includes(e.kind)).map(e=>{const t=me["deck"===e.kind?"slides":e.kind];return{key:e.kind,label:e.label,icon:/* @__PURE__ */ie(Q,{name:t.name,tone:t.tone,className:"h-4 w-4"}),onSelect:()=>{Promise.resolve(n.createOfficeFile(e.kind,Jt)).catch(e=>X.error(Ae(e,"Could not create it")))}}}):[]]),Tn=/* @__PURE__ */re("div",{className:"flex h-full flex-col",children:[
|
|
46
46
|
/* @__PURE__ */ie("div",{className:"p-3 pb-2",children:/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */re(se,{children:[
|
|
47
|
-
/* @__PURE__ */ie(
|
|
47
|
+
/* @__PURE__ */ie(Q,{name:"add",className:"h-5 w-5"}),
|
|
48
48
|
/* @__PURE__ */ie("span",{children:"New"})]}),items:Dn,align:"start","aria-label":"New",disabled:!Gt,triggerClassName:"inline-flex items-center gap-2 h-11 pl-4 pr-5 rounded-2xl bg-surface-raised border border-line shadow-sm text-sm font-medium text-ink-strong hover:bg-row-hover disabled:opacity-50 rosh-focus-ring focus-visible:ring-2"})}),
|
|
49
49
|
/* @__PURE__ */re("nav",{className:"px-2 flex-1 overflow-auto","aria-label":"Locations",children:[
|
|
50
|
-
/* @__PURE__ */re("button",{onClick:()=>
|
|
51
|
-
/* @__PURE__ */ie(
|
|
52
|
-
/* @__PURE__ */ie(
|
|
53
|
-
/* @__PURE__ */ie(
|
|
54
|
-
/* @__PURE__ */ie(
|
|
55
|
-
/* @__PURE__ */ie(
|
|
50
|
+
/* @__PURE__ */re("button",{onClick:()=>Ot(null),className:jn("files"===ot&&!Yt),children:[
|
|
51
|
+
/* @__PURE__ */ie(Q,{name:"home",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"My files"]}),n.recent&&!m&&/* @__PURE__ */re("button",{onClick:()=>pt("recent"),className:jn("recent"===ot),children:[
|
|
52
|
+
/* @__PURE__ */ie(Q,{name:"clock",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Recent"]}),n.starred&&!m&&/* @__PURE__ */re("button",{onClick:()=>pt("starred"),className:jn("starred"===ot),children:[
|
|
53
|
+
/* @__PURE__ */ie(Q,{name:"star",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Starred"]}),h&&/* @__PURE__ */re("button",{onClick:()=>pt("shared"),className:jn("shared"===ot||"files"===ot&&Yt),children:[
|
|
54
|
+
/* @__PURE__ */ie(Q,{name:"team",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Shared with me"]}),!m&&/* @__PURE__ */re("button",{onClick:()=>pt("trash"),className:jn("trash"===ot),children:[
|
|
55
|
+
/* @__PURE__ */ie(Q,{name:"trash",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Trash"]}),kt&&kt.folders.length>0&&/* @__PURE__ */re(se,{children:[
|
|
56
56
|
/* @__PURE__ */ie("div",{className:"px-3 pt-4 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),kt.folders.map(e=>/* @__PURE__ */re("button",{onClick:()=>pt({desktopFolderId:e.id}),className:jn(gt===e.id),children:[
|
|
57
57
|
/* @__PURE__ */ie(E,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
58
58
|
/* @__PURE__ */ie("span",{className:"truncate",children:e.name}),
|
|
59
|
-
/* @__PURE__ */ie(G,{count:e.itemCount,active:gt===e.id,className:"ml-auto"})]},e.id))]})]}),
|
|
59
|
+
/* @__PURE__ */ie(G,{count:e.itemCount,active:gt===e.id,className:"ml-auto"})]},e.id))]})]}),ze&&/* @__PURE__ */re("div",{className:"px-5 py-3 shrink-0",title:`${d(ze.used)} of ${d(ze.limit)} used`,children:[
|
|
60
60
|
/* @__PURE__ */ie("div",{className:"h-1 rounded-full bg-line overflow-hidden",children:/* @__PURE__ */ie("div",{className:`h-full ${xn} transition-all`,style:{width:`${vn}%`}})}),
|
|
61
|
-
/* @__PURE__ */re("div",{className:"mt-2 text-2xs text-ink-faint tabular-nums",children:[d(
|
|
62
|
-
/* @__PURE__ */ie(
|
|
61
|
+
/* @__PURE__ */re("div",{className:"mt-2 text-2xs text-ink-faint tabular-nums",children:[d(ze.used)," of ",d(ze.limit)," used"]})]})]}),Mn=(e,t)=>/* @__PURE__ */re("span",{className:"inline-flex items-center gap-1",children:[e,
|
|
62
|
+
/* @__PURE__ */ie(Q,{name:"chevron-down",className:"h-3.5 w-3.5"}),t?"":null]}),$n=e=>"inline-flex items-center h-7 px-3 rounded-(--radius-control) border text-xs whitespace-nowrap rosh-focus-ring focus-visible:ring-2 "+(e?"border-accent-border bg-accent-tint text-accent-text":"border-line-strong text-ink-muted hover:bg-row-hover"),Rn=je(ot)||"files"===ot,Ln=function(e){const t=/* @__PURE__ */new Map;for(const n of e)"owner"!==(n.role??"owner")&&n.owner&&t.set(n.owner.id,n.owner.name);return[...t].map(([e,t])=>({id:e,name:t})).sort((e,t)=>ge.compare(e.name,t.name))}(en),Fn=Rn&&en.length>0?/* @__PURE__ */re("div",{className:"flex items-center gap-2 shrink-0",children:[
|
|
63
63
|
/* @__PURE__ */ie(o,{trigger:Mn(rt.type?de[rt.type]:"Type",!!rt.type),"aria-label":"Type",triggerClassName:$n(!!rt.type),items:[...ye.map(e=>({type:"radio",key:e,label:de[e],checked:rt.type===e,onSelect:()=>it(t=>({...t,type:t.type===e?null:e}))})),...rt.type?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>it(e=>({...e,type:null}))}]:[]]}),h&&/* @__PURE__ */ie(o,{trigger:Mn(rt.person?"me"===rt.person?"Owned by me":Ln.find(e=>e.id===rt.person)?.name??"People":"People",!!rt.person),"aria-label":"People",triggerClassName:$n(!!rt.person),items:[{type:"radio",key:"me",label:"Owned by me",checked:"me"===rt.person,onSelect:()=>it(e=>({...e,person:"me"===e.person?null:"me"}))},...Ln.map(e=>({type:"radio",key:e.id,label:e.name,checked:rt.person===e.id,onSelect:()=>it(t=>({...t,person:t.person===e.id?null:e.id}))})),...rt.person?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>it(e=>({...e,person:null}))}]:[]]}),
|
|
64
64
|
/* @__PURE__ */ie(o,{trigger:Mn(rt.modified?be[rt.modified]:"Modified",!!rt.modified),"aria-label":"Modified",triggerClassName:$n(!!rt.modified),items:[...Object.keys(be).map(e=>({type:"radio",key:e,label:be[e],checked:rt.modified===e,onSelect:()=>it(t=>({...t,modified:t.modified===e?null:e}))})),...rt.modified?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>it(e=>({...e,modified:null}))}]:[]]})]}):null,An=Rn&&an.length>0&&!Tt?/* @__PURE__ */re("div",{className:"flex items-center gap-0.5 h-10 px-2 rounded-full bg-surface-sunken",role:"toolbar","aria-label":"Selection",children:[
|
|
65
|
-
/* @__PURE__ */ie(c,{"aria-label":"Clear selection",size:"sm",onClick:mn,children:/* @__PURE__ */ie(
|
|
66
|
-
/* @__PURE__ */re("span",{className:"text-sm text-ink mr-2 whitespace-nowrap",children:[an.length," selected"]}),rn&&on(rn)&&/* @__PURE__ */ie(c,{"aria-label":"Share",size:"sm",onClick:()=>Ze(rn),children:/* @__PURE__ */ie(
|
|
67
|
-
/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */ie(
|
|
65
|
+
/* @__PURE__ */ie(c,{"aria-label":"Clear selection",size:"sm",onClick:mn,children:/* @__PURE__ */ie(Q,{name:"close",className:"h-4 w-4"})}),
|
|
66
|
+
/* @__PURE__ */re("span",{className:"text-sm text-ink mr-2 whitespace-nowrap",children:[an.length," selected"]}),rn&&on(rn)&&/* @__PURE__ */ie(c,{"aria-label":"Share",size:"sm",onClick:()=>Ze(rn),children:/* @__PURE__ */ie(Q,{name:"add-person",className:"h-4 w-4"})}),!m&&an.every(e=>"file"===e.kind)&&/* @__PURE__ */ie(c,{"aria-label":"Download",size:"sm",onClick:()=>an.forEach(Ut),children:/* @__PURE__ */ie(Q,{name:"download",className:"h-4 w-4"})}),an.every(cn)&&/* @__PURE__ */ie(c,{"aria-label":"Move",size:"sm",onClick:()=>Be(an),children:/* @__PURE__ */ie(Q,{name:"forward",className:"h-4 w-4"})}),!m&&an.every(ln)&&/* @__PURE__ */ie(c,{"aria-label":"Move to trash",size:"sm",onClick:()=>Ht(an),children:/* @__PURE__ */ie(Q,{name:"trash",className:"h-4 w-4"})}),
|
|
67
|
+
/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */ie(Q,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(an)})]}):null,En=/* @__PURE__ */ie("div",{className:"flex items-center gap-2 px-4 pb-2 min-h-12 shrink-0",children:An??/* @__PURE__ */re(se,{children:[
|
|
68
68
|
/* @__PURE__ */re("div",{className:"min-w-0 flex-1 flex items-center gap-2",children:["files"===ot?/* @__PURE__ */ie("div",{className:"min-w-0 text-base [&_*]:text-base",children:/* @__PURE__ */ie(a,{items:Nn,maxItems:5})}):"trash"===ot?/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong",children:"Trash"}):"object"==typeof ot?/* @__PURE__ */re(se,{children:[
|
|
69
69
|
/* @__PURE__ */ie(E,{className:"h-4 w-4 text-amber-500 shrink-0"}),
|
|
70
70
|
/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong truncate",children:wt?.name??"Desktop folder"}),
|
|
71
|
-
/* @__PURE__ */ie("span",{className:"text-2xs text-ink-faintest whitespace-nowrap",children:"Desktop shortcuts"})]}):/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong truncate",children:Cn}),"files"===ot&&
|
|
72
|
-
/* @__PURE__ */ie(
|
|
73
|
-
/* @__PURE__ */ie("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */ie(
|
|
71
|
+
/* @__PURE__ */ie("span",{className:"text-2xs text-ink-faintest whitespace-nowrap",children:"Desktop shortcuts"})]}):/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong truncate",children:Cn}),"files"===ot&&Yt&&!F(Vt)&&/* @__PURE__ */re("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs text-ink-faint whitespace-nowrap",children:[
|
|
72
|
+
/* @__PURE__ */ie(Q,{name:"eye",className:"h-3 w-3",strokeWidth:1.8}),"View only"]}),"files"===ot&&Yt&&Kt?.owner&&/* @__PURE__ */re("span",{className:"shrink-0 text-2xs text-ink-faint whitespace-nowrap",children:["Shared by ",Kt.owner.name]})]}),Fn,"trash"===ot&&/* @__PURE__ */ie(Z,{variant:"secondary-danger",size:"sm",onClick:async()=>{if(0===ht.length)return;await V({title:"Empty trash",message:`${ht.length} item${1===ht.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"})&&Pt(()=>n.emptyTrash(),"Empty trash failed")},disabled:0===ht.length,children:"Empty trash"})]})}),In=(e,t)=>Tt?null:/* @__PURE__ */re("div",{className:"flex items-center justify-end "+(t?"":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),children:[on(e)&&/* @__PURE__ */ie(c,{"aria-label":"Share",size:"sm",onClick:t=>{t.stopPropagation(),Ze(e)},children:/* @__PURE__ */ie(Q,{name:"add-person",className:"h-4 w-4"})}),!m&&"file"===e.kind&&/* @__PURE__ */ie(c,{"aria-label":"Download",size:"sm",onClick:t=>{t.stopPropagation(),Ut(e)},children:/* @__PURE__ */ie(Q,{name:"download",className:"h-4 w-4"})}),n.setStarred&&!m&&/* @__PURE__ */ie(c,{"aria-label":e.starred?"Remove from starred":"Add to starred","aria-pressed":!!e.starred,size:"sm",onClick:t=>{t.stopPropagation(),Xt([e],!e.starred)},children:/* @__PURE__ */ie(Q,{name:"star",look:e.starred?"solid":void 0,tone:e.starred?"warning":void 0,className:"h-4 w-4"})}),
|
|
73
|
+
/* @__PURE__ */ie("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */ie(Q,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(z.has(e.id)&&an.length>1?an:[e])})})]}),On=e=>/* @__PURE__ */re("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
74
74
|
/* @__PURE__ */ie(Ie,{entry:e}),
|
|
75
|
-
/* @__PURE__ */ie("span",{className:"truncate",title:e.name,children:he(e)}),!!e.shareCount&&/* @__PURE__ */ie("span",{className:"shrink-0",role:"img","aria-label":"Shared with "+(1===e.shareCount?"1 person":`${e.shareCount} people`),title:"Shared with "+(1===e.shareCount?"1 person":`${e.shareCount} people`),children:/* @__PURE__ */ie(
|
|
76
|
-
return ie("th",{className:`${
|
|
77
|
-
/* @__PURE__ */ie("span",{className:"font-medium",children:"New"}),"."]})]})}):"grid"===
|
|
75
|
+
/* @__PURE__ */ie("span",{className:"truncate",title:e.name,children:he(e)}),!!e.shareCount&&/* @__PURE__ */ie("span",{className:"shrink-0",role:"img","aria-label":"Shared with "+(1===e.shareCount?"1 person":`${e.shareCount} people`),title:"Shared with "+(1===e.shareCount?"1 person":`${e.shareCount} people`),children:/* @__PURE__ */ie(Q,{name:"team",tone:"muted",className:"h-3.5 w-3.5"})}),e.starred&&/* @__PURE__ */ie("span",{className:"shrink-0",role:"img","aria-label":"Starred",title:"Starred",children:/* @__PURE__ */ie(Q,{name:"star",look:"solid",tone:"warning",className:"h-3.5 w-3.5"})})]}),Pn=(e,t,n)=>{const a=st.key===e;/* @__PURE__ */
|
|
76
|
+
return ie("th",{className:`${H} font-medium px-3 h-9 ${n}`,"aria-sort":a?"asc"===st.dir?"ascending":"descending":void 0,children:/* @__PURE__ */re("button",{type:"button",className:"inline-flex items-center gap-1 rounded hover:text-ink "+(a?"text-ink":""),onClick:()=>lt(t=>({key:e,dir:t.key===e&&"asc"===t.dir?"desc":"asc"})),children:[t,a&&("asc"===st.dir?/* @__PURE__ */ie(Q,{name:"arrow-up",className:"h-3 w-3"}):/* @__PURE__ */ie(Q,{name:"arrow-down",className:"h-3 w-3"}))]})})},Wn="recent"===ot?"Files you and your colleagues change show here.":"starred"===ot?"Star the files and folders you want to find quickly.":"shared"===ot?"Nothing has been shared with you yet. Files and folders colleagues share with you show here.":"search"===ot?`Nothing matches “${nt}”.`:null,zn=0===tn.length?ce?/* @__PURE__ */ie(B,{size:"sm",padding:"p-6",label:"Loading"}):/* @__PURE__ */ie("div",{className:"p-10 text-center text-sm text-ink-faintest",children:en.length>0?"Nothing matches these filters.":Wn??/* @__PURE__ */re(se,{children:["This folder is empty.",Zt&&/* @__PURE__ */re(se,{children:[" Drop files here or choose ",
|
|
77
|
+
/* @__PURE__ */ie("span",{className:"font-medium",children:"New"}),"."]})]})}):"grid"===He?/* @__PURE__ */ie("div",{className:"px-4 pb-4",children:["folder","file"].map(e=>{const t=tn.filter(t=>t.kind===e);return 0===t.length?null:/* @__PURE__ */re("section",{className:"mb-4",children:[
|
|
78
78
|
/* @__PURE__ */ie("h3",{className:"text-xs font-medium text-ink-faint mb-2",children:"folder"===e?"Folders":"Files"}),
|
|
79
|
-
/* @__PURE__ */ie("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))"},children:t.map(t=>{const a=
|
|
80
|
-
return re("div",{role:"button",tabIndex:0,"aria-pressed":a,"aria-label":he(t),onClick:e=>dn(t.id,e),onDoubleClick:()=>kn(t),onContextMenu:e=>wn(e,t),...yn(t),...bn(t),className:"group rounded-xl border cursor-default select-none outline-none focus-visible:ring-2 focus-visible:ring-accent-border "+(a||
|
|
79
|
+
/* @__PURE__ */ie("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))"},children:t.map(t=>{const a=z.has(t.id);/* @__PURE__ */
|
|
80
|
+
return re("div",{role:"button",tabIndex:0,"aria-pressed":a,"aria-label":he(t),onClick:e=>dn(t.id,e),onDoubleClick:()=>kn(t),onContextMenu:e=>wn(e,t),...yn(t),...bn(t),className:"group rounded-xl border cursor-default select-none outline-none focus-visible:ring-2 focus-visible:ring-accent-border "+(a||Ye===t.id?"border-accent-border bg-accent-tint":"border-line bg-surface-sunken hover:bg-row-hover"),children:[
|
|
81
81
|
/* @__PURE__ */re("div",{className:"flex items-center gap-2 pl-3 pr-1 h-11",children:[
|
|
82
82
|
/* @__PURE__ */ie(Ie,{entry:t,className:"h-4 w-4"}),
|
|
83
83
|
/* @__PURE__ */ie("span",{className:"flex-1 truncate text-sm",title:t.name,children:he(t)}),
|
|
84
|
-
/* @__PURE__ */ie("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */ie(
|
|
85
|
-
/* @__PURE__ */ie("div",{className:"mx-2 h-28 rounded-lg bg-surface flex items-center justify-center overflow-hidden",children:/* @__PURE__ */ie(
|
|
84
|
+
/* @__PURE__ */ie("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */ie(o,{trigger:/* @__PURE__ */ie(Q,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(a&&an.length>1?an:[t])})})]}),"file"===e&&/* @__PURE__ */re(se,{children:[
|
|
85
|
+
/* @__PURE__ */ie("div",{className:"mx-2 h-28 rounded-lg bg-surface flex items-center justify-center overflow-hidden",children:/* @__PURE__ */ie(Oe,{entry:t,read:m?void 0:n.read})}),
|
|
86
86
|
/* @__PURE__ */re("div",{className:"px-3 py-2 text-2xs text-ink-faint truncate",children:["me"===ke(t)?"You":ke(t)," · ",fe(t.modifiedAt)]})]})]},t.id)})})]},e)})}):/* @__PURE__ */re("table",{className:"w-full text-sm table-fixed",children:[
|
|
87
|
-
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[
|
|
88
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
89
|
-
/* @__PURE__ */ie("tbody",{children:tn.map(e=>{const t=
|
|
90
|
-
return re("tr",{"aria-selected":t,onClick:t=>dn(e.id,t),onDoubleClick:()=>kn(e),onContextMenu:t=>wn(t,e),...yn(e),...bn(e),className:`group cursor-default select-none border-b border-line-subtle ${un(e)} ${t||
|
|
91
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:
|
|
87
|
+
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[Pn("name","Name","text-left"),h&&Pn("owner","Owner","text-left w-32"),Pn("modified","Modified","text-left w-28"),Pn("size","Size","text-right w-20"),
|
|
88
|
+
/* @__PURE__ */ie("th",{className:`${H} w-32`,children:/* @__PURE__ */ie("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
89
|
+
/* @__PURE__ */ie("tbody",{children:tn.map(e=>{const t=z.has(e.id);/* @__PURE__ */
|
|
90
|
+
return re("tr",{"aria-selected":t,onClick:t=>dn(e.id,t),onDoubleClick:()=>kn(e),onContextMenu:t=>wn(t,e),...yn(e),...bn(e),className:`group cursor-default select-none border-b border-line-subtle ${un(e)} ${t||Ye===e.id?"bg-accent-tint":"hover:bg-row-hover"}`,children:[
|
|
91
|
+
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:On(e)}),h&&/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint truncate",children:ke(e)}),
|
|
92
92
|
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint whitespace-nowrap",title:pe(e.modifiedAt),children:fe(e.modifiedAt)}),
|
|
93
93
|
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-right tabular-nums text-ink-faint whitespace-nowrap",children:Tt&&"file"===e.kind&&!hn(e)&&Tt.request.otherLabel?Tt.request.otherLabel:ue(e)}),
|
|
94
|
-
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:In(e,t)})]},e.id)})})]}),Un=ce&&0===ht.length?/* @__PURE__ */ie(
|
|
94
|
+
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:In(e,t)})]},e.id)})})]}),Un=ce&&0===ht.length?/* @__PURE__ */ie(B,{size:"sm",padding:"p-6",label:"Loading"}):0===ht.length?/* @__PURE__ */ie("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Trash is empty. What you delete stays here for 30 days."}):/* @__PURE__ */re("table",{className:"w-full text-sm table-fixed",children:[
|
|
95
95
|
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[
|
|
96
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
97
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
98
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
99
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
100
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
96
|
+
/* @__PURE__ */ie("th",{className:`${H} text-left font-medium px-3 h-9`,children:"Name"}),
|
|
97
|
+
/* @__PURE__ */ie("th",{className:`${H} text-left font-medium px-3 h-9 w-48`,children:"Original location"}),
|
|
98
|
+
/* @__PURE__ */ie("th",{className:`${H} text-left font-medium px-3 h-9 w-32`,children:"Deleted"}),
|
|
99
|
+
/* @__PURE__ */ie("th",{className:`${H} text-right font-medium px-3 h-9 w-24`,children:"Size"}),
|
|
100
|
+
/* @__PURE__ */ie("th",{className:`${H} w-28`,children:/* @__PURE__ */ie("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
101
101
|
/* @__PURE__ */ie("tbody",{children:ht.map(e=>/* @__PURE__ */re("tr",{className:"group border-b border-line-subtle hover:bg-row-hover",onContextMenu:t=>jt.open(t,e),children:[
|
|
102
102
|
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:/* @__PURE__ */re("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
103
103
|
/* @__PURE__ */ie(Ie,{entry:e}),
|
|
@@ -106,36 +106,36 @@ return re("tr",{"aria-selected":t,onClick:t=>dn(e.id,t),onDoubleClick:()=>kn(e),
|
|
|
106
106
|
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint whitespace-nowrap",title:e.deletedAt?pe(e.deletedAt):void 0,children:e.deletedAt?fe(e.deletedAt):"—"}),
|
|
107
107
|
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-right tabular-nums text-ink-faint",children:"folder"===e.kind?"—":d(e.size)}),
|
|
108
108
|
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:/* @__PURE__ */re("div",{className:"flex justify-end opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",children:[
|
|
109
|
-
/* @__PURE__ */ie(c,{"aria-label":"Restore",size:"sm",onClick:()=>
|
|
110
|
-
/* @__PURE__ */ie(c,{"aria-label":"Delete forever",size:"sm",variant:"ghost-danger",onClick:()=>
|
|
109
|
+
/* @__PURE__ */ie(c,{"aria-label":"Restore",size:"sm",onClick:()=>Wt(e),children:/* @__PURE__ */ie(Q,{name:"revert",className:"h-4 w-4"})}),
|
|
110
|
+
/* @__PURE__ */ie(c,{"aria-label":"Delete forever",size:"sm",variant:"ghost-danger",onClick:()=>zt(e),children:/* @__PURE__ */ie(Q,{name:"trash",className:"h-4 w-4"})})]})})]},e.id))})]}),Kn=0===yt.length?/* @__PURE__ */ie("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */re("table",{className:"w-full text-sm table-fixed",children:[
|
|
111
111
|
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[
|
|
112
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
113
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
114
|
-
/* @__PURE__ */ie("th",{className:`${
|
|
112
|
+
/* @__PURE__ */ie("th",{className:`${H} text-left font-medium px-3 h-9`,children:"Name"}),
|
|
113
|
+
/* @__PURE__ */ie("th",{className:`${H} text-left font-medium px-3 h-9 w-32`,children:"Type"}),
|
|
114
|
+
/* @__PURE__ */ie("th",{className:`${H} w-32`,children:/* @__PURE__ */ie("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
115
115
|
/* @__PURE__ */ie("tbody",{children:yt.map(e=>/* @__PURE__ */re("tr",{onDoubleClick:()=>Mt(e),onContextMenu:t=>Dt.open(t,e),className:"group cursor-default border-b border-line-subtle hover:bg-row-hover",children:[
|
|
116
116
|
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:/* @__PURE__ */re("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
117
117
|
/* @__PURE__ */ie(I,{item:e}),
|
|
118
118
|
/* @__PURE__ */ie("span",{className:"truncate",title:e.label,children:e.label})]})}),
|
|
119
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-xs text-ink-faint",children:
|
|
119
|
+
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-xs text-ink-faint",children:O(e)}),
|
|
120
120
|
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:/* @__PURE__ */re("div",{className:"flex justify-end opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",children:[
|
|
121
|
-
/* @__PURE__ */ie(c,{"aria-label":"Open",size:"sm",onClick:()=>Mt(e),children:/* @__PURE__ */ie(
|
|
122
|
-
/* @__PURE__ */ie(c,{"aria-label":"Move to desktop",size:"sm",onClick:()=>kt?.moveToDesktop([e]),children:/* @__PURE__ */ie(
|
|
123
|
-
/* @__PURE__ */ie(c,{"aria-label":"Remove",size:"sm",variant:"ghost-danger",onClick:()=>kt?.removeShortcuts([e]),children:/* @__PURE__ */ie(
|
|
124
|
-
return re("div",{className:"relative flex flex-col h-full bg-surface",onDragEnter:e=>{Zt&&e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),bt.current++,
|
|
125
|
-
/* @__PURE__ */ie(
|
|
121
|
+
/* @__PURE__ */ie(c,{"aria-label":"Open",size:"sm",onClick:()=>Mt(e),children:/* @__PURE__ */ie(Q,{name:"external",className:"h-4 w-4"})}),
|
|
122
|
+
/* @__PURE__ */ie(c,{"aria-label":"Move to desktop",size:"sm",onClick:()=>kt?.moveToDesktop([e]),children:/* @__PURE__ */ie(Q,{name:"desktop",className:"h-4 w-4"})}),
|
|
123
|
+
/* @__PURE__ */ie(c,{"aria-label":"Remove",size:"sm",variant:"ghost-danger",onClick:()=>kt?.removeShortcuts([e]),children:/* @__PURE__ */ie(Q,{name:"close",className:"h-4 w-4"})})]})})]},`${e.entityType}|${e.entityId}`))})]});/* @__PURE__ */
|
|
124
|
+
return re("div",{className:"relative flex flex-col h-full bg-surface",onDragEnter:e=>{Zt&&e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),bt.current++,Ke||Ve(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{bt.current>0&&bt.current--,0===bt.current&&Ve(!1)},onDrop:e=>{e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),_t(),Zt&&e.dataTransfer.files?.length&&Qt(e.dataTransfer.files))},children:[
|
|
125
|
+
/* @__PURE__ */ie(K,{title:Sn}),
|
|
126
126
|
/* @__PURE__ */ie(S,{app:"files"}),
|
|
127
|
-
/* @__PURE__ */ie("input",{ref:vt,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&
|
|
128
|
-
/* @__PURE__ */ie("input",{ref:e=>{xt.current=e,e?.setAttribute("webkitdirectory","")},type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&
|
|
127
|
+
/* @__PURE__ */ie("input",{ref:vt,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&Qt(e.target.files),vt.current&&(vt.current.value="")}}),
|
|
128
|
+
/* @__PURE__ */ie("input",{ref:e=>{xt.current=e,e?.setAttribute("webkitdirectory","")},type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&Qt(e.target.files,{withFolders:!0}),xt.current&&(xt.current.value="")}}),
|
|
129
129
|
/* @__PURE__ */ie("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */ie(t,{sidebar:Tn,storageKey:"files.sidebarWidth",defaultWidth:220,minWidth:170,maxWidth:320,children:/* @__PURE__ */re("div",{className:"flex h-full min-w-0",children:[
|
|
130
130
|
/* @__PURE__ */re("div",{className:"flex flex-1 min-w-0 flex-col",children:[Tt&&/* @__PURE__ */re("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-line bg-accent-tint text-accent-text text-sm shrink-0",role:"status",children:[
|
|
131
|
-
/* @__PURE__ */ie(
|
|
131
|
+
/* @__PURE__ */ie(Q,{name:"cursor",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),
|
|
132
132
|
/* @__PURE__ */ie("span",{className:"flex-1 min-w-0 truncate",children:Tt.request.title}),
|
|
133
133
|
/* @__PURE__ */ie(Z,{variant:"secondary",size:"sm",onClick:()=>N(Tt.id,null),children:"Cancel"}),
|
|
134
134
|
/* @__PURE__ */ie(Z,{variant:"primary",size:"sm",disabled:!pn,onClick:()=>{pn&&fn(pn)},children:"Open"})]}),
|
|
135
135
|
/* @__PURE__ */re("div",{className:"flex items-center gap-1 px-4 py-2 shrink-0",children:[
|
|
136
|
-
/* @__PURE__ */ie("div",{className:"flex-1 min-w-48 max-w-2xl",role:"search",children:/* @__PURE__ */ie(l,{type:"text",enterKeyHint:"search",value:et,onChange:e=>{tt(e.target.value),e.target.value.trim()||It()},onKeyDown:e=>{"Escape"===e.key&&et&&(e.stopPropagation(),It())},placeholder:`Search in ${r}`,"aria-label":`Search in ${r}`,leftIcon:/* @__PURE__ */ie(
|
|
136
|
+
/* @__PURE__ */ie("div",{className:"flex-1 min-w-48 max-w-2xl",role:"search",children:/* @__PURE__ */ie(l,{type:"text",enterKeyHint:"search",value:et,onChange:e=>{tt(e.target.value),e.target.value.trim()||It()},onKeyDown:e=>{"Escape"===e.key&&et&&(e.stopPropagation(),It())},placeholder:`Search in ${r}`,"aria-label":`Search in ${r}`,leftIcon:/* @__PURE__ */ie(Q,{name:"search",className:"h-4 w-4"}),endAction:et?{label:"Clear search",icon:/* @__PURE__ */ie(Q,{name:"close",className:"h-4 w-4"}),onClick:It}:void 0})}),
|
|
137
137
|
/* @__PURE__ */ie("div",{className:"flex-1"}),"object"!=typeof ot&&"trash"!==ot&&/* @__PURE__ */re(se,{children:[
|
|
138
|
-
/* @__PURE__ */ie(c,{"aria-label":"List view","aria-pressed":"list"===
|
|
139
|
-
/* @__PURE__ */ie(c,{"aria-label":"Grid view","aria-pressed":"grid"===
|
|
140
|
-
/* @__PURE__ */ie(c,{"aria-label":"Details","aria-pressed":qe,onClick:()=>_e(e=>!e),children:/* @__PURE__ */ie(
|
|
141
|
-
/* @__PURE__ */ie("div",{className:"flex-1 overflow-auto outline-none",tabIndex:-1,onKeyDown:e=>{e.target instanceof HTMLInputElement||(Tt?"Enter"===e.key&&pn&&(e.preventDefault(),fn(pn)):("Delete"===e.key||"Backspace"===e.key)&&an.length&&an.every(ln)?(e.preventDefault(),
|
|
138
|
+
/* @__PURE__ */ie(c,{"aria-label":"List view","aria-pressed":"list"===He,onClick:()=>ft("list"),children:/* @__PURE__ */ie(Q,{name:"list",className:"h-4 w-4"})}),
|
|
139
|
+
/* @__PURE__ */ie(c,{"aria-label":"Grid view","aria-pressed":"grid"===He,onClick:()=>ft("grid"),children:/* @__PURE__ */ie(Q,{name:"grid",className:"h-4 w-4"})})]}),
|
|
140
|
+
/* @__PURE__ */ie(c,{"aria-label":"Details","aria-pressed":qe,onClick:()=>_e(e=>!e),children:/* @__PURE__ */ie(Q,{name:"info",className:"h-4 w-4"})})]}),En,
|
|
141
|
+
/* @__PURE__ */ie("div",{className:"flex-1 overflow-auto outline-none",tabIndex:-1,onKeyDown:e=>{e.target instanceof HTMLInputElement||(Tt?"Enter"===e.key&&pn&&(e.preventDefault(),fn(pn)):("Delete"===e.key||"Backspace"===e.key)&&an.length&&an.every(ln)?(e.preventDefault(),Ht(an)):"Enter"===e.key&&rn?(e.preventDefault(),kn(rn)):(e.metaKey||e.ctrlKey)&&"a"===e.key.toLowerCase()&&tn.length&&(e.preventDefault(),J(new Set(tn.map(e=>e.id)))))},onClick:e=>{e.target===e.currentTarget&&mn()},children:"object"==typeof ot?Kn:"trash"===ot?Un:zn})]}),qe&&Rn&&/* @__PURE__ */ie(Se,{store:n,entry:rn,selectedCount:an.length,onClose:()=>_e(!1)})]})})}),St.state&&/* @__PURE__ */ie(s,{...St.props,items:gn(St.state.data),"aria-label":"File actions"}),jt.state&&/* @__PURE__ */ie(s,{...jt.props,"aria-label":"Trash actions",items:[{key:"restore",label:"Restore",icon:/* @__PURE__ */ie(Q,{name:"revert",className:"h-4 w-4"}),onSelect:()=>Wt(jt.state.data)},{type:"divider",key:"d"},{key:"purge",label:"Delete forever",danger:!0,icon:/* @__PURE__ */ie(Q,{name:"trash",className:"h-4 w-4"}),onSelect:()=>zt(jt.state.data)}]}),Dt.state&&/* @__PURE__ */ie(s,{...Dt.props,"aria-label":"Shortcut actions",items:[{key:"open",label:"Open",icon:/* @__PURE__ */ie(Q,{name:"external",className:"h-4 w-4"}),onSelect:()=>Mt(Dt.state.data)},{key:"desktop",label:"Move to desktop",icon:/* @__PURE__ */ie(Q,{name:"desktop",className:"h-4 w-4"}),onSelect:()=>kt?.moveToDesktop([Dt.state.data])},{type:"divider",key:"d"},{key:"remove",label:"Remove",danger:!0,icon:/* @__PURE__ */ie(Q,{name:"close",className:"h-4 w-4"}),onSelect:()=>kt?.removeShortcuts([Dt.state.data])}]}),h&&/* @__PURE__ */ie(Ne,{store:n,entry:Ge,onClose:()=>Ze(null),onChanged:Et}),n.move&&/* @__PURE__ */ie(Ce,{store:n,items:Qe,from:"files"===ot?u:void 0,onClose:()=>Be(null),onMove:e=>Qe&&qt(Qe,e)}),Ke&&/* @__PURE__ */ie("div",{className:"absolute inset-0 bg-accent-tint border-4 border-dashed border-accent-border pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */ie("div",{className:"px-4 py-2 rounded-md bg-accent-fill text-on-accent text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{Pe as default,Fe as quotaExceededMessage};
|