most-box 0.2.7 → 0.2.9

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.
Files changed (99) hide show
  1. package/README.md +9 -1
  2. package/electron/main.js +30 -420
  3. package/electron/preload.js +1 -16
  4. package/electron/updateChecker.js +6 -3
  5. package/electron/updateChecker.test.js +13 -97
  6. package/out/admin/index.html +0 -0
  7. package/out/app/index.html +0 -0
  8. package/out/assets/{FilePreviewOverlay-CW8lKJCw.js → FilePreviewOverlay-BYZIAMJ-.js} +1 -1
  9. package/out/assets/LanguageToggle-CSQtRZ3A.js +1 -0
  10. package/out/assets/MarketingHeader-ceWdRCpe.js +1 -0
  11. package/out/assets/MarketingLayout-Bun1d2wL.js +1 -0
  12. package/out/assets/{MarketingThemeToggle-Cl7PhFgv.js → MarketingThemeToggle-CIKP8x9W.js} +1 -1
  13. package/out/assets/{MilkdownEditor-B5SKAyjg.js → MilkdownEditor-CT6SHYKG.js} +1 -1
  14. package/out/assets/{OpenSidebarButton-Bdx86oG8.js → OpenSidebarButton-CLSCB7CG.js} +1 -1
  15. package/out/assets/{SidebarAccount-c8jirEMF.js → SidebarAccount-CNh0kvtB.js} +1 -1
  16. package/out/assets/SidebarHomeLink-DXv0c9Ob.js +1 -0
  17. package/out/assets/arrow-right-BU9c_SL4.js +1 -0
  18. package/out/assets/{circle-alert-Dkgyw_GE.js → circle-alert-iuHzciph.js} +1 -1
  19. package/out/assets/{copy-KIwotKoP.js → copy-DEzFUzeX.js} +1 -1
  20. package/out/assets/{download-DPA-3LpR.js → download-jEPn2njL.js} +1 -1
  21. package/out/assets/{downloadValidation-CH8BeY7_.js → downloadValidation-Bzl7cci9.js} +1 -1
  22. package/out/assets/{external-link-BmR2rZ80.js → external-link-BFaoZeK0.js} +1 -1
  23. package/out/assets/{file-text-BJQfDW9r.js → file-text-DPA1riJ_.js} +1 -1
  24. package/out/assets/{folder-Gb80aQnO.js → folder-Cfgc70_F.js} +1 -1
  25. package/out/assets/{hard-drive-P2dGA7FX.js → hard-drive-Dar_AZEq.js} +1 -1
  26. package/out/assets/i18n-NjvOSuV6.js +1 -0
  27. package/out/assets/index-BHZhApbo.css +1 -0
  28. package/out/assets/index-BI8oNSVC.js +31 -0
  29. package/out/assets/index.lazy-7omTRykl.js +2 -0
  30. package/out/assets/index.lazy-BOMHingE.js +3 -0
  31. package/out/assets/index.lazy-BSY5_gby.js +1 -0
  32. package/out/assets/{index.lazy-CIqPn0cy.js → index.lazy-C4ipXKZ7.js} +1 -1
  33. package/out/assets/index.lazy-CPZbEnJZ.js +1 -0
  34. package/out/assets/{index.lazy-Bh4jDrUl.js → index.lazy-Ch4Y17pJ.js} +1 -1
  35. package/out/assets/index.lazy-CvBIIYbm.js +1 -0
  36. package/out/assets/{index.lazy-B7u3Ztoe.js → index.lazy-Cz-OZwYL.js} +1 -1
  37. package/out/assets/index.lazy-D4zNn3D6.js +2 -0
  38. package/out/assets/index.lazy-DRY3xoQp.js +1 -0
  39. package/out/assets/{index.lazy-DAKkwnV2.js → index.lazy-_mEd0Q_u.js} +1 -1
  40. package/out/assets/index.lazy-bAp_Hgck.js +1 -0
  41. package/out/assets/index.lazy-ur0joIFl.js +1 -0
  42. package/out/assets/{key-round-DvpIlAJY.js → key-round-DNcpSuMw.js} +1 -1
  43. package/out/assets/{loader-8eVY8_SD.js → loader-BXQtdens.js} +1 -1
  44. package/out/assets/{lock-Cvtl60UJ.js → lock-CLIE8cct.js} +1 -1
  45. package/out/assets/{message-square-JK7ABH3O.js → message-square-Dp09WY1I.js} +1 -1
  46. package/out/assets/{mp-CMvgV1-c.js → mp-B6kdA94c.js} +1 -1
  47. package/out/assets/{music-YRSH1Jq6.js → music-B19Tg557.js} +1 -1
  48. package/out/assets/{notebook-pen-BjGx0coX.js → notebook-pen-C8TlK5sB.js} +1 -1
  49. package/out/assets/play-B-BjsTZz.js +1 -0
  50. package/out/assets/plus-4hygj-1Z.js +1 -0
  51. package/out/assets/{save-BcI68ZgS.js → save-BjrbPwhJ.js} +1 -1
  52. package/out/assets/search-DSkiWdvX.js +1 -0
  53. package/out/assets/{send-_ups0_3f.js → send-BL4d5iOt.js} +1 -1
  54. package/out/assets/{shield-check-Dzw5rdPe.js → shield-check-DzDuWO8r.js} +1 -1
  55. package/out/assets/{smartphone-DSQ5L_sr.js → smartphone-tRRFFO0a.js} +1 -1
  56. package/out/assets/{trash-2-BIrBn6Ce.js → trash-2-V12tJ8lI.js} +1 -1
  57. package/out/assets/triangle-alert-DGWc8ZHu.js +1 -0
  58. package/out/assets/{ui-u9yJHkb-.js → ui-BpDGD3IR.js} +2 -2
  59. package/out/assets/{upload-1jmNeGjH.js → upload-CoCptKya.js} +1 -1
  60. package/out/assets/{useChannelMessages-DNxfCew-.js → useChannelMessages-BeKF0gwo.js} +1 -1
  61. package/out/assets/{useGameRoom-Du07VEgb.js → useGameRoom-cs9YpYt7.js} +1 -1
  62. package/out/assets/{userProfile-CL1Ev2GK.js → userProfile-qcc60tHK.js} +1 -1
  63. package/out/assets/{wallet-BvM_X5nW.js → wallet-T7ONZ3Kg.js} +1 -1
  64. package/out/assets/{wifi-66t1dsgC.js → wifi-Bgo8eHY0.js} +1 -1
  65. package/out/chat/index.html +0 -0
  66. package/out/chat/join/index.html +0 -0
  67. package/out/download/index.html +2 -2
  68. package/out/game/gandengyan/index.html +0 -0
  69. package/out/game/index.html +0 -0
  70. package/out/game/zhajinhua/index.html +0 -0
  71. package/out/index.html +2 -2
  72. package/out/note/index.html +0 -0
  73. package/out/ping/index.html +2 -2
  74. package/out/profile/index.html +0 -0
  75. package/out/web3/index.html +0 -0
  76. package/package.json +1 -8
  77. package/server/src/core/releaseManifest.js +1 -18
  78. package/server/src/index.js +34 -286
  79. package/out/assets/LanguageToggle-Cfh33R2h.js +0 -1
  80. package/out/assets/MarketingHeader-BKBngzf5.js +0 -1
  81. package/out/assets/MarketingLayout-C3xrXmfU.js +0 -1
  82. package/out/assets/SidebarHomeLink-LzYXrJRr.js +0 -1
  83. package/out/assets/arrow-right-BC_GWahx.js +0 -1
  84. package/out/assets/i18n-Cqyi6NZb.js +0 -1
  85. package/out/assets/index-CSBg7dZN.css +0 -1
  86. package/out/assets/index-CiHRnvMj.js +0 -31
  87. package/out/assets/index.lazy-BdOfbfjo.js +0 -2
  88. package/out/assets/index.lazy-Bo6McUf1.js +0 -1
  89. package/out/assets/index.lazy-BxUje7fk.js +0 -1
  90. package/out/assets/index.lazy-CfuoMz6P.js +0 -1
  91. package/out/assets/index.lazy-DRaxm9OS.js +0 -1
  92. package/out/assets/index.lazy-DkrwcEBu.js +0 -2
  93. package/out/assets/index.lazy-K6IB-5kb.js +0 -3
  94. package/out/assets/index.lazy-Uu9DCtrI.js +0 -1
  95. package/out/assets/index.lazy-mXESMo49.js +0 -1
  96. package/out/assets/play-Ds19moWN.js +0 -1
  97. package/out/assets/plus-CvGkRhJV.js +0 -1
  98. package/out/assets/search-BIa4RSPA.js +0 -1
  99. package/out/assets/triangle-alert-CgWIEl4u.js +0 -1
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MilkdownEditor-CT6SHYKG.js","assets/jsx-runtime-Bt-cYkS5.js","assets/index-BI8oNSVC.js","assets/ui-BpDGD3IR.js","assets/useNavigate-DWlBD_-b.js","assets/i18n-NjvOSuV6.js","assets/index-BHZhApbo.css","assets/dist-zyJb88Zz.js","assets/dist-CbTzBiwL.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{C as r,S as i,T as a,a as o,f as s,n as c,p as l,r as u,s as d}from"./ui-BpDGD3IR.js";import{n as f}from"./useNavigate-DWlBD_-b.js";import{a as p}from"./i18n-NjvOSuV6.js";import{n as m,r as h}from"./LanguageToggle-CSQtRZ3A.js";import{n as g,t as _}from"./lock-CLIE8cct.js";import{n as v,t as y}from"./folder-Cfgc70_F.js";import{t as ee}from"./file-text-DPA1riJ_.js";import{n as b,t as x}from"./SidebarHomeLink-DXv0c9Ob.js";import{t as S}from"./notebook-pen-C8TlK5sB.js";import{t as te}from"./OpenSidebarButton-CLSCB7CG.js";import{t as ne}from"./plus-4hygj-1Z.js";import{t as C}from"./save-BjrbPwhJ.js";import{t as re}from"./search-DSkiWdvX.js";import{t as ie}from"./trash-2-V12tJ8lI.js";import{D as ae,L as oe,N as se,O as ce,c as w,k as T,t as le}from"./index-BI8oNSVC.js";import{t as E}from"./SidebarAccount-CNh0kvtB.js";var ue=r(`move`,[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m19 9 3 3-3 3`,key:`1mg7y2`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}],[`path`,{d:`m5 9-3 3 3 3`,key:`j64kie`}],[`path`,{d:`m9 5 3-3 3 3`,key:`l8vdw6`}]]),de=r(`pencil-ruler`,[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),D=t(e(),1),O=n();function fe(e){return e.type===`directory`?T(e.path?`${e.path}/${e.name}`:e.name):ce(e)}function pe({target:e,directories:t,onMove:n,onClose:r}){let{t:a}=p(),s=T(e.path||``),c=fe(e),l=t.filter(t=>e.type===`directory`?t.path!==c&&!t.path.startsWith(`${c}/`):!0),[u,d]=(0,D.useState)(s),[f,m]=(0,D.useState)(``),[h,_]=(0,D.useState)(new Set),ee=T(f),b=f.trim()?ee:u,x=T(b)===s,S=new Map;for(let e of l){let t=S.get(e.parentPath)||[];t.push(e),S.set(e.parentPath,t)}let te=l.filter(e=>{if(!e.parentPath)return!0;let t=e.parentPath.split(`/`).filter(Boolean);return t.every((e,n)=>h.has(t.slice(0,n+1).join(`/`)))}),ne=[{label:a(`note.root`),path:``},...u.split(`/`).filter(Boolean).map((e,t,n)=>({label:e,path:n.slice(0,t+1).join(`/`)}))];function C(e){d(T(e)),m(``)}function re(e){C(e),S.has(e)&&_(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function ie(){x||n(b)}return(0,O.jsx)(o,{onClose:r,children:(0,O.jsxs)(`div`,{className:`note-move-modal`,onClick:e=>e.stopPropagation(),children:[(0,O.jsxs)(`div`,{className:`modal-header`,children:[(0,O.jsx)(`h3`,{children:a(`note.move.title`)}),(0,O.jsx)(`button`,{className:`btn btn-icon`,onClick:r,children:(0,O.jsx)(i,{size:18})})]}),(0,O.jsxs)(`div`,{className:`note-move-target`,children:[(0,O.jsx)(`span`,{children:a(`note.move.moving`)}),(0,O.jsx)(`strong`,{translate:`no`,children:e.name})]}),(0,O.jsx)(`div`,{className:`note-move-path`,children:ne.map((e,t)=>(0,O.jsxs)(D.Fragment,{children:[t>0&&(0,O.jsx)(`span`,{children:`/`}),(0,O.jsx)(`button`,{type:`button`,onClick:()=>C(e.path),children:(0,O.jsx)(`span`,{translate:e.path?`no`:`yes`,children:e.label})})]},e.path||`root`))}),(0,O.jsxs)(`div`,{className:`note-move-folder-list`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`note-move-folder-item ${u===``?`selected`:``}`,onClick:()=>C(``),children:[(0,O.jsx)(`span`,{className:`note-move-folder-spacer`}),(0,O.jsx)(y,{className:`note-move-folder-icon`,size:16}),(0,O.jsx)(`span`,{children:a(`note.root`)})]}),l.length===0?(0,O.jsx)(`p`,{className:`note-move-empty`,children:a(`note.move.noFolders`)}):te.map(e=>{let t=S.has(e.path),n=h.has(e.path);return(0,O.jsxs)(`button`,{type:`button`,className:`note-move-folder-item note-move-depth-${Math.min(e.depth,4)} ${u===e.path?`selected`:``}`,onClick:()=>re(e.path),children:[t?n?(0,O.jsx)(g,{className:`note-move-expander`,size:14}):(0,O.jsx)(v,{className:`note-move-expander`,size:14}):(0,O.jsx)(`span`,{className:`note-move-folder-spacer`}),(0,O.jsx)(y,{className:`note-move-folder-icon`,size:16}),(0,O.jsx)(`span`,{translate:`no`,children:e.name}),e.parentPath&&(0,O.jsx)(`small`,{translate:`no`,children:e.parentPath})]},e.path)})]}),(0,O.jsx)(`input`,{className:`input input-compact`,value:f,onChange:e=>m(e.target.value),placeholder:a(`note.move.pathPlaceholder`),translate:`no`}),(0,O.jsxs)(`div`,{className:`note-move-destination`,children:[(0,O.jsx)(`span`,{children:a(`note.move.destinationLabel`)}),(0,O.jsx)(`span`,{translate:b?`no`:`yes`,children:b||a(`note.root`)})]}),(0,O.jsxs)(`div`,{className:`modal-actions`,children:[(0,O.jsx)(`button`,{className:`btn btn-secondary`,onClick:r,children:a(`common.cancel`)}),(0,O.jsx)(`button`,{className:`btn btn-primary`,onClick:ie,disabled:x,children:a(`note.action.move`)})]})]})})}function me({children:e}){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x,{}),e,(0,O.jsx)(E,{})]})}var he=(0,D.lazy)(async()=>({default:(await le(()=>import(`./MilkdownEditor-CT6SHYKG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).MilkdownEditor}));function ge(e){let t=new URLSearchParams(e),n=t.get(`mode`);return{cid:t.get(`cid`)||void 0,mode:n===`edit`?`edit`:void 0}}function _e(e={}){let t=new URLSearchParams;e.cid&&t.set(`cid`,e.cid),e.mode&&t.set(`mode`,e.mode);let n=t.toString();return n?`/note/?${n}`:`/note/`}function ve(e,t){return e.isSecret||e.content.startsWith(`mp://1`)?t(`note.preview.encrypted`):String(e.content||``).replace(/```[\s\S]*?```/g,` `).replace(/!\[[^\]]*]\([^)]*\)/g,` `).replace(/\[([^\]]+)]\([^)]*\)/g,`$1`).replace(/[#>*_`~|-]/g,` `).replace(/\s+/g,` `).trim()||t(`note.preview.empty`)}var k={"note.error.nameRequired":`note.error.nameRequired`,"note.error.nameNoSlash":`note.error.nameNoSlash`,"note.error.nameNoBackslash":`note.error.nameNoBackslash`,"note.error.nameInvalid":`note.error.nameInvalid`,"note.error.nameConflict":`note.error.nameConflict`,"note.error.moveIntoSelf":`note.error.moveIntoSelf`};function A(e,t,n){let r=e instanceof Error?e.message:``,i=k[r];return i?n(i):r||t}function ye(e){return e.type===`directory`?T(e.path?`${e.path}/${e.name}`:e.name):ce(e)}function be(e,t){let n=new Set;for(let t of e){let e=T(t.path).split(`/`).filter(Boolean);for(let t=0;t<e.length;t+=1)n.add(e.slice(0,t+1).join(`/`))}return Array.from(n).sort(t).map(e=>{let t=e.split(`/`);return{path:e,name:t[t.length-1]||e,parentPath:t.slice(0,-1).join(`/`),depth:Math.max(t.length-1,0)}})}function j(){let{t:e,formatDate:t,compareStrings:n}=p(),r=f(),a=oe({select:e=>e.searchStr}),o=(0,D.useMemo)(()=>ge(a),[a]),g=(0,D.useRef)(null),v=w(e=>e.addToast),x=w(e=>e.isDarkMode),le=w(e=>e.setIsDarkMode),E=d(e=>e.wallet),fe=d(e=>e.openLoginModal),k=w(e=>e.notes),j=w(e=>e.notesPath),M=w(e=>e.setNotesPath),N=w(e=>e.saveNote),xe=w(e=>e.deleteNote),Se=w(e=>e.renameNote),P=w(e=>e.localDataReady),F=o.cid||``,I=k.find(e=>e.cid===F),L=!!F,R=L&&o.mode===`edit`,[z,Ce]=(0,D.useState)(``),[B,V]=(0,D.useState)(null),[H,U]=(0,D.useState)(null),[W,G]=(0,D.useState)(null),[we,K]=(0,D.useState)(``),[Te,q]=(0,D.useState)(``),[Ee,J]=(0,D.useState)(``),[De,Oe]=(0,D.useState)(``),[ke,Ae]=(0,D.useState)(``),[je,Y]=(0,D.useState)(``),[X,Me]=(0,D.useState)(!1),[Ne,Z]=(0,D.useState)(``),[Pe,Fe]=(0,D.useState)(!1);(0,D.useEffect)(()=>{if(!F){K(``),q(``);return}if(!I){K(``),q(P?e(`note.error.notFound`):``);return}if(I.content.startsWith(`mp://1`)){if(!E){K(``),q(e(`note.error.loginToDecrypt`));return}let t=s(I.content,E.danger);if(!t){K(``),q(e(`note.error.decryptFailed`));return}K(t),q(``);return}K(I.content||``),q(``)},[F,P,I,e,E]),(0,D.useEffect)(()=>{if(!R){Fe(!1);return}if(!F||!I){Oe(``),Ae(``),Y(``),Me(!1),Z(P?e(`note.error.notFound`):``);return}if(Oe(I.name),Ae(I.path||``),Me(I.isSecret===!0||I.content.startsWith(`mp://1`)),I.content.startsWith(`mp://1`)){if(!E){Y(``),Z(e(`note.error.loginToDecrypt`));return}let t=s(I.content,E.danger);if(!t){Y(``),Z(e(`note.error.decryptFailed`));return}Y(t),Z(``);return}Y(I.content||``),Z(``)},[F,R,P,I,e,E]),(0,D.useEffect)(()=>{J(I?.name||``)},[I?.cid,I?.name]);let Ie=(0,D.useMemo)(()=>ae(k,j,z),[k,j,z]),Le=Ie.filter(e=>e.type===`file`).length,Re=I?.isSecret===!0||I?.content.startsWith(`mp://1`)===!0,ze=e(R?X?`note.privacy.secret`:`note.privacy.public`:Re?`note.privacy.secret`:`note.privacy.public`),Be=(0,D.useMemo)(()=>{let t=j.split(`/`).filter(Boolean);return[{label:e(`note.root`),path:``},...t.map((e,n)=>({label:e,path:t.slice(0,n+1).join(`/`)}))]},[j,e]),Ve=(0,D.useMemo)(()=>be(k,n),[n,k]);function Q(e={},t=!1){r({href:_e(e),replace:t})}function He(e){Q({cid:e.cid})}function Ue(e){Q({cid:e.cid,mode:`edit`})}function $(){return E?!0:(fe(),!1)}function We(){Q(I?{cid:I.cid}:{})}async function Ge(){if($()){if(!I){v(e(`note.toast.notFound`),`error`);return}if(!De.trim()){v(e(`note.toast.nameRequired`),`warning`);return}Fe(!0);try{let t=g.current?.getMarkdown()??je,n=X?l(t,E.danger):t,r=await N({cid:I.cid,name:De,path:ke,content:n,isSecret:X});Y(t),Q({cid:r},!0),v(e(`note.toast.saved`),`success`)}catch(t){v(A(t,e(`note.toast.saveFailed`),e),`error`)}finally{Fe(!1)}}}function Ke(){$()&&V({title:e(`note.create.title`),placeholder:e(`note.namePlaceholder`),confirmText:e(`note.create.action`),onConfirm:async t=>{if($())try{let n=await N({name:t,path:j,content:``,isSecret:!1});V(null),v(e(`note.toast.created`),`success`),Q({cid:n,mode:`edit`})}catch(t){v(A(t,e(`note.toast.createFailed`),e),`error`)}}})}async function qe(){if(!$()||!I)return;let t=Ee.trim();if(!t){J(I.name),v(e(`note.toast.nameRequired`),`warning`);return}if(t!==I.name)try{Se(ce(I),I.path,t),v(e(`note.toast.renamed`),`success`)}catch(t){J(I.name),v(A(t,e(`note.toast.renameFailed`),e),`error`)}}function Je(e){$()&&G(e)}async function Ye(t){if(W)try{Se(ye(W),t,W.name),G(null),v(e(`note.toast.moved`),`success`)}catch(t){v(A(t,e(`note.toast.moveFailed`),e),`error`)}}function Xe(t){if(!$())return;let n=t.type===`directory`;U({title:e(n?`note.delete.folderTitle`:`note.delete.noteTitle`),message:e(`note.delete.message`,{name:t.name}),confirmText:e(`note.action.delete`),onConfirm:async()=>{xe(n?void 0:t.cid,t.path,t.name),U(null),v(e(`note.toast.deleted`),`success`),t.type===`file`&&t.cid===F&&Q()}})}let Ze=(0,O.jsxs)(`div`,{className:`note-header-title`,children:[(0,O.jsx)(`h2`,{className:`header-title`,children:e(`note.title`)}),(0,O.jsx)(`span`,{children:e(`note.count`,{count:k.length})})]}),Qe=(0,O.jsx)(`div`,{className:`note-theme-wrap`,children:(0,O.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>le(!x),title:e(`common.theme.toggle`),"aria-label":e(`common.theme.toggle`),children:x?(0,O.jsx)(m,{size:16}):(0,O.jsx)(h,{size:16})})}),$e=(0,O.jsxs)(`section`,{className:`note-list-panel note-sidebar-list`,"aria-label":e(`note.listLabel`),children:[(0,O.jsxs)(`div`,{className:`note-list-header`,children:[(0,O.jsx)(`div`,{className:`note-current-location`,children:(0,O.jsx)(`div`,{className:`note-breadcrumbs`,children:Be.map((e,t)=>(0,O.jsxs)(D.Fragment,{children:[t>0&&(0,O.jsx)(`span`,{children:`/`}),(0,O.jsx)(`button`,{onClick:()=>M(e.path),children:(0,O.jsx)(`span`,{translate:e.path?`no`:`yes`,children:e.label})})]},e.path||`root`))})}),(0,O.jsx)(`span`,{className:`note-count`,children:e(`note.count`,{count:Le})})]}),(0,O.jsxs)(`div`,{className:`note-search`,children:[(0,O.jsx)(re,{size:16}),(0,O.jsx)(`input`,{className:`input input-flex`,value:z,onChange:e=>Ce(e.target.value),placeholder:e(`note.search.placeholder`)})]}),Ie.length===0?(0,O.jsxs)(`div`,{className:`ui-empty-state note-empty-state`,children:[(0,O.jsx)(S,{size:32}),(0,O.jsx)(`p`,{children:e(z?`note.empty.noMatches`:`note.empty.noNotes`)})]}):(0,O.jsx)(`div`,{className:`note-list`,children:Ie.map(n=>(0,O.jsx)(`article`,{className:`ui-list-item note-list-item ${n.type===`file`&&n.cid===F?`active`:``}`,children:(0,O.jsxs)(`button`,{className:`ui-list-item-main note-list-item-main ${n.type===`directory`?`folder`:``}`,onClick:()=>{n.type===`directory`?M(T(n.path?`${n.path}/${n.name}`:n.name)):He(n)},children:[(0,O.jsx)(`span`,{className:`ui-list-icon note-list-icon ${n.type===`directory`?`warning`:``}`,children:n.type===`directory`?(0,O.jsx)(y,{size:18}):n.isSecret?(0,O.jsx)(_,{size:18}):(0,O.jsx)(ee,{size:18})}),(0,O.jsxs)(`span`,{className:`ui-list-copy note-list-copy`,children:[(0,O.jsx)(`span`,{className:`ui-list-title note-list-name`,translate:`no`,children:n.name}),n.type===`file`?(0,O.jsx)(`span`,{className:`ui-list-desc note-list-preview`,translate:`no`,children:ve(n,e)}):(0,O.jsx)(`span`,{className:`ui-list-desc note-list-preview`,children:e(`note.folder`)})]}),n.type===`file`&&(0,O.jsx)(`span`,{className:`ui-list-meta note-list-date`,children:t(n.updated_at)})]})},`${n.cid}:${n.path}:${n.name}`))}),(0,O.jsx)(`div`,{className:`note-create-btn`,children:(0,O.jsxs)(`button`,{className:`btn`,onClick:Ke,children:[(0,O.jsx)(ne,{size:16}),e(`note.newNote`)]})})]});return(0,O.jsxs)(b,{sidebar:()=>(0,O.jsx)(me,{children:$e}),headerTitle:Ze,headerRight:Qe,children:[(0,O.jsx)(`main`,{className:`note-page note-browser-page ${L?`has-editor`:``}`,children:(0,O.jsx)(`section`,{className:`note-workspace`,children:(0,O.jsx)(`section`,{className:`note-editor-panel`,"aria-label":e(R?`note.editorLabel.edit`:`note.editorLabel.read`),children:L?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`note-editor-panel-header`,children:[(0,O.jsxs)(`div`,{className:`note-editor-title-area`,children:[R?(0,O.jsx)(`input`,{className:`note-title-input`,value:De,onChange:e=>Oe(e.target.value),placeholder:e(`note.namePlaceholder`),translate:`no`,disabled:!I}):I?(0,O.jsx)(`input`,{className:`note-title-input`,value:Ee,onBlur:qe,onChange:e=>J(e.target.value),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(J(I.name),e.currentTarget.blur())},placeholder:e(`note.namePlaceholder`),title:e(`app.rename`),translate:`no`}):(0,O.jsx)(`h3`,{children:e(`note.untitled`)}),I&&(0,O.jsxs)(`div`,{className:`note-editor-info`,children:[(0,O.jsx)(`span`,{children:e(R?`note.mode.edit`:`note.mode.read`)}),(0,O.jsx)(`span`,{children:ze}),(0,O.jsx)(`span`,{children:t(I.updated_at)})]})]}),(0,O.jsxs)(`div`,{className:`note-editor-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`btn btn-icon`,onClick:R?We:()=>Q(),title:e(R?`common.cancel`:`common.close`),"aria-label":e(R?`common.cancel`:`common.close`),children:(0,O.jsx)(i,{size:16})}),R?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{className:`btn btn-sm ${X?`btn-warning`:`btn-secondary`}`,onClick:()=>Me(!X),disabled:!I,children:[X?(0,O.jsx)(_,{size:16}):(0,O.jsx)(se,{size:16}),e(X?`note.privacy.secret`:`note.privacy.public`)]}),(0,O.jsxs)(`button`,{className:`btn btn-sm btn-primary`,onClick:Ge,disabled:Pe||!!Ne||!I,children:[(0,O.jsx)(C,{size:16}),e(Pe?`note.action.saving`:`note.action.save`)]})]}):I&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`button`,{type:`button`,className:`btn btn-icon`,onClick:()=>Je(I),title:e(`note.action.move`),"aria-label":e(`note.action.move`),children:(0,O.jsx)(ue,{size:16})}),(0,O.jsx)(`button`,{type:`button`,className:`btn btn-icon note-editor-action-danger`,onClick:()=>Xe(I),title:e(`note.action.delete`),"aria-label":e(`note.action.delete`),children:(0,O.jsx)(ie,{size:16})}),(0,O.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-primary`,onClick:()=>Ue(I),disabled:!!Te,title:e(`note.action.edit`),"aria-label":e(`note.action.edit`),children:[(0,O.jsx)(de,{size:16}),e(`note.action.edit`)]})]})]})]}),R?Ne?(0,O.jsxs)(`div`,{className:`note-empty-state editor-error`,children:[(0,O.jsx)(_,{size:36}),(0,O.jsx)(`p`,{children:Ne})]}):I?(0,O.jsx)(`div`,{className:`note-editor-frame editing`,children:(0,O.jsx)(he,{ref:g,content:je,onChange:Y,className:`milkdown-editor`})}):(0,O.jsxs)(`div`,{className:`note-empty-state editor-error`,children:[(0,O.jsx)(S,{size:36}),(0,O.jsx)(`p`,{children:e(P?`note.error.notFound`:`note.loading`)})]}):Te?(0,O.jsxs)(`div`,{className:`ui-empty-state note-empty-state editor-error`,children:[(0,O.jsx)(_,{size:36}),(0,O.jsx)(`p`,{children:Te})]}):I?(0,O.jsx)(`div`,{className:`note-editor-frame reading`,children:(0,O.jsx)(he,{content:we,readOnly:!0,className:`milkdown-editor`})}):(0,O.jsxs)(`div`,{className:`ui-empty-state note-empty-state editor-error`,children:[(0,O.jsx)(S,{size:36}),(0,O.jsx)(`p`,{children:e(P?`note.error.notFound`:`note.loading`)})]})]}):(0,O.jsxs)(`div`,{className:`ui-empty-state note-editor-empty`,children:[(0,O.jsx)(`div`,{className:`ui-empty-icon note-editor-empty-icon`,children:(0,O.jsx)(S,{size:32})}),(0,O.jsx)(`h3`,{className:`ui-empty-title`,children:e(`note.noOpen.title`)}),(0,O.jsx)(`p`,{className:`ui-empty-desc`,children:k.length>0?e(`note.noOpen.select`):e(`note.noOpen.createFirst`)}),(0,O.jsx)(te,{label:e(`note.openList`),variant:`default`})]})})})}),B&&(0,O.jsx)(c,{title:B.title,placeholder:B.placeholder,defaultValue:B.defaultValue,confirmText:B.confirmText,onConfirm:B.onConfirm,onClose:()=>V(null)}),H&&(0,O.jsx)(u,{title:H.title,message:H.message,confirmText:H.confirmText,danger:!0,onConfirm:H.onConfirm,onClose:()=>U(null)}),W&&(0,O.jsx)(pe,{target:W,directories:Ve,onMove:Ye,onClose:()=>G(null)})]})}function M(){let{t:e}=p();return(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(`div`,{className:`note-editor-loading`,children:e(`note.loading`)}),children:(0,O.jsx)(j,{})})}var N=a(`/note/`)({component:M});export{N as Route};
@@ -0,0 +1 @@
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{C as r,S as i,T as a,a as o,n as s,r as c,s as l,t as u}from"./ui-BpDGD3IR.js";import{a as d}from"./i18n-NjvOSuV6.js";import{t as ee}from"./arrow-right-BU9c_SL4.js";import{n as te,r as ne}from"./LanguageToggle-CSQtRZ3A.js";import{t as f}from"./circle-alert-iuHzciph.js";import{t as p}from"./download-jEPn2njL.js";import{t as m}from"./file-text-DPA1riJ_.js";import{a as h,i as g,n as re,r as ie,t as ae}from"./FilePreviewOverlay-BYZIAMJ-.js";import{t as oe}from"./loader-BXQtdens.js";import{i as se,n as ce,t as le}from"./SidebarHomeLink-DXv0c9Ob.js";import{t as ue}from"./message-square-Dp09WY1I.js";import{t as _}from"./music-B19Tg557.js";import{t as de}from"./OpenSidebarButton-CLSCB7CG.js";import{t as fe}from"./plus-4hygj-1Z.js";import{t as pe}from"./search-DSkiWdvX.js";import{t as me}from"./trash-2-V12tJ8lI.js";import{N as v,c as y,f as he,i as ge,l as _e}from"./index-BI8oNSVC.js";import{t as ve}from"./format-CR8oUWq6.js";import{t as ye}from"./SidebarAccount-CNh0kvtB.js";import{n as be,r as xe,t as Se}from"./downloadValidation-Bzl7cci9.js";import{t as Ce}from"./LogoIcon-B2fFe0l1.js";import{i as b,t as we}from"./userProfile-qcc60tHK.js";import{t as Te}from"./useChannelMessages-BeKF0gwo.js";var Ee=r(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),De=r(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Oe=r(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),ke=r(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Ae=r(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),je=r(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),x=t(e(),1),S=n();function Me(e){return String(e||``).split(`/`).pop()||e}function Ne(e){return e===`image`?(0,S.jsx)(g,{size:20}):e===`video`?(0,S.jsx)(h,{size:20}):e===`audio`?(0,S.jsx)(_,{size:20}):(0,S.jsx)(m,{size:20})}function Pe({attachment:e,status:t=`idle`,pending:n=!1,onOpen:r}){let{t:i}=d(),a=t===`checking`,o=`ui-file-action chat-attachment-action ${t===`error`?`error`:t===`available`?`available`:``}`.trim(),s=Number.isFinite(e.size)&&e.size>0?ve(e.size):i(`chat.mostboxFile`);return(0,S.jsxs)(`button`,{type:`button`,className:`ui-file-card chat-attachment-card`,onClick:()=>r?.(e),disabled:n||a,title:e.link,translate:`no`,children:[(0,S.jsx)(`span`,{className:`ui-file-icon chat-attachment-icon ${e.kind}`,children:a?(0,S.jsx)(oe,{size:20,className:`ui-spinner chat-attachment-spinner`}):Ne(e.kind)}),(0,S.jsxs)(`span`,{className:`ui-file-info chat-attachment-info`,children:[(0,S.jsx)(`span`,{className:`ui-file-name chat-attachment-name`,translate:`no`,children:Me(e.fileName)}),(0,S.jsx)(`span`,{className:`ui-file-meta chat-attachment-meta`,translate:`yes`,children:n?i(`chat.sending`):s})]}),(0,S.jsx)(`span`,{className:o,translate:`yes`,children:a?i(`chat.checking`):t===`available`?(0,S.jsx)(v,{size:16}):t===`error`?(0,S.jsx)(f,{size:17}):(0,S.jsx)(p,{size:16})})]})}var C=[{key:`image`,labelKey:`chat.attachment.image`,accept:`image/*`,icon:g},{key:`video`,labelKey:`chat.attachment.video`,accept:`video/*`,icon:h},{key:`file`,labelKey:`chat.attachment.file`,accept:``,icon:m}],Fe=C.map(e=>e.accept).join(`,`);function Ie({children:e}){return(0,S.jsx)(`div`,{className:`message-bubble`,translate:`no`,children:e})}function Le({children:e}){return(0,S.jsx)(`div`,{className:`message-bubble has-attachment`,children:e})}function Re({variant:e,pending:t=!1,avatarSrc:n,isOnline:r=!1,author:i,time:a,children:o}){return(0,S.jsxs)(`div`,{className:[`chat-message`,e,t?`pending`:``].filter(Boolean).join(` `),children:[(0,S.jsxs)(`span`,{className:`chat-avatar-wrap`,children:[(0,S.jsx)(`img`,{className:`msg-avatar`,src:n,alt:`avatar`}),r&&(0,S.jsx)(`span`,{className:`chat-online-dot`,"aria-hidden":`true`})]}),(0,S.jsxs)(`div`,{className:`msg-content`,children:[(0,S.jsx)(`span`,{className:`message-author`,translate:`no`,children:i}),o,(0,S.jsx)(`span`,{className:`message-time`,children:a})]})]})}function ze({active:e=!1,pinned:t=!1,unread:n=!1,title:r,onSelect:i,onTogglePin:a,onRename:o,onLeave:s}){let{t:c}=d(),l=!!(a||o||s);return(0,S.jsxs)(`div`,{className:[`sidebar-nav-btn`,e?`active`:``,t?`pinned`:``,n?`unread`:``].filter(Boolean).join(` `),onClick:i,role:`button`,tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&e.key===`Enter`&&i?.()},children:[(0,S.jsxs)(`span`,{className:`chat-channel-icon-wrap`,children:[(0,S.jsx)(ue,{size:16}),n&&(0,S.jsx)(`span`,{className:`chat-channel-unread-dot`,title:c(`chat.unread`),"aria-hidden":`true`})]}),(0,S.jsx)(`span`,{className:`chat-channel-title`,children:(0,S.jsx)(`span`,{className:`chat-channel-title-text`,translate:`no`,children:r})}),l&&(0,S.jsx)(u,{ariaLabel:c(`chat.channelActions`),className:`channel-actions-anchor`,placement:`bottom-end`,items:[{key:`pin`,label:c(t?`chat.unpin`:`chat.pin`),icon:t?(0,S.jsx)(Ae,{size:16}):(0,S.jsx)(ke,{size:16}),onSelect:()=>a?.()},{key:`rename`,label:c(`chat.rename`),icon:(0,S.jsx)(ie,{size:16}),onSelect:()=>o?.()},{key:`delete`,label:c(`chat.delete`),icon:(0,S.jsx)(me,{size:16}),onSelect:()=>s?.()}],renderTrigger:e=>(0,S.jsx)(`button`,{...e,className:`leave-channel-btn channel-actions-trigger`,title:c(`common.moreActions`),"aria-label":c(`common.moreActions`),children:(0,S.jsx)(De,{size:16})})})]})}function Be({members:e}){let{t}=d();return e.length===0?(0,S.jsx)(`div`,{className:`ui-empty-inline channel-members-empty`,children:t(`chat.noMembers`)}):(0,S.jsx)(`div`,{className:`channel-members-grid`,children:e.map(e=>(0,S.jsxs)(`div`,{className:`channel-member`,children:[(0,S.jsxs)(`span`,{className:`channel-member-avatar-wrap`,children:[(0,S.jsx)(`img`,{className:`channel-member-avatar`,src:e.avatarSrc,alt:`avatar`}),e.online&&(0,S.jsx)(`span`,{className:`chat-online-dot`,"aria-hidden":`true`})]}),(0,S.jsx)(`span`,{className:`channel-member-name`,translate:`no`,children:e.name})]},e.id))})}function Ve({message:e,placeholder:t,disabled:n=!1,isPublishingAttachment:r=!1,attachmentButtonTitle:i,attachmentInputRef:a,onMessageChange:o,onSend:s,onSelectAttachmentFiles:c}){let{t:l}=d(),te=n||r,ne=n||!e.trim(),f=i||l(`chat.attachment.add`);function p(e,t){t?.(e.currentTarget.files),e.currentTarget.value=``}function m(t){t.key===`Enter`&&e.trim()&&s()}function h(e){if(te)return;let t=a?.current;t&&(t.accept=e,t.click())}return(0,S.jsxs)(`div`,{className:`chat-input-area`,children:[(0,S.jsx)(`input`,{ref:a,type:`file`,accept:Fe,className:`chat-file-input`,onChange:e=>p(e,c)}),(0,S.jsx)(u,{ariaLabel:l(`chat.attachmentType`),placement:`top-start`,disabled:te,items:C.map(e=>{let t=e.icon;return{key:e.key,label:l(e.labelKey),icon:(0,S.jsx)(t,{size:16}),onSelect:()=>h(e.accept)}}),renderTrigger:e=>(0,S.jsx)(`button`,{...e,className:`btn btn-circle chat-tool-btn`,"aria-label":f,children:r?(0,S.jsx)(oe,{size:18,className:`ui-spinner chat-attachment-spinner`}):(0,S.jsx)(fe,{size:18})})}),(0,S.jsx)(`input`,{type:`text`,className:`input input-pill`,placeholder:t,value:e,disabled:n,onChange:e=>o(e.target.value),onKeyDown:m}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-circle btn-primary send-btn`,onClick:s,disabled:ne,title:l(`chat.sendMessage`),children:(0,S.jsx)(ee,{size:18})})]})}var w=`mostbox.chat.lastReadAt`;function T(e){return Date.parse(e?.lastMessageAt||``)||Date.parse(e?.createdAt||``)||0}function He(e){let t=String(e||``).trim().toLowerCase();return t?`${w}:${t}`:``}function E(e,t=Date.now()){let n=Number(e);return Math.max(0,Math.floor(Number.isFinite(n)&&n>0?n:t))}function Ue(e,t=D()){if(!e||!t)return{};try{let n=t.getItem(e);if(!n)return{};let r=JSON.parse(n);return!r||typeof r!=`object`?{}:Object.entries(r).reduce((e,[t,n])=>{let r=Number(n);return t&&Number.isFinite(r)&&r>=0&&(e[t]=r),e},{})}catch{return{}}}function We(e,t,n=D()){if(!(!e||!n))try{n.setItem(e,JSON.stringify(t))}catch{}}function Ge(e,t,n=Date.now(),r=Date.now()){if(!t)return{changed:!1,value:e};let i=E(n,r);return(e[t]||0)>=i?{changed:!1,value:e}:{changed:!0,value:{...e,[t]:i}}}function Ke(e,t,n=Date.now()){let r=!1,i={...e};for(let e of t){let t=e?.channelKey||e?.name;!t||i[t]!==void 0||(i[t]=E(T(e),n),r=!0)}return{changed:r,value:r?i:e}}function qe(e,{channelName:t,messageTime:n,activeChannelName:r=``,messageAuthor:i=``,userAddress:a=``,now:o=Date.now()}){if(!t)return{changed:!1,notify:!1,value:e};let s=E(n,o),c=t===r,l=String(i||``).toLowerCase()===String(a||``).toLowerCase();if(c||l)return{...Ge(e,t,s,o),notify:!1};let u=e[t]||0;if(u<s)return{changed:!1,notify:!0,value:e};let d=Math.max(0,s-1);return u===d?{changed:!1,notify:!0,value:e}:{changed:!0,notify:!0,value:{...e,[t]:d}}}function Je(e,t){let n=e?.channelKey||e?.name;return T(e)>(t[n]||0)}function D(){if(!(typeof window>`u`))return window.localStorage}var Ye=3,Xe=30,Ze=/^[a-zA-Z0-9_-]+$/,Qe=1e4,$e=12e3,et=1200;function O(e){return e?.channelKey||e?.name||``}function k(e){return e?.channelId||e?.name||``}function A(e){return e?.remark||k(e)}function tt(){return typeof window>`u`?``:(new URLSearchParams(window.location.search).get(`channel`)||``).trim()}var nt=`chat-file`;function rt(e,t){return e.type.startsWith(`image/`)?`image`:e.type.startsWith(`video/`)?`video`:e.type.startsWith(`audio/`)?`audio`:e.type.startsWith(`text/`)?`text`:re(t)}function it(e){return e?`${e.slice(0,6)}...${e.slice(-4)}`:`Unknown`}function at(e){return/#[a-fA-F0-9]{4}$/.test(String(e||``).trim())}function j(e){return String(e||``).trim().toLowerCase()}function ot(e){let t=new Set;return e.forEach(e=>{e.memberAddresses?.forEach(e=>{let n=j(e);n&&t.add(n)})}),[...t]}function st(){if(typeof window>`u`)return;let e=window;return e.AudioContext||e.webkitAudioContext}function ct(){let e=y(e=>e.isDarkMode),t=y(e=>e.setIsDarkMode),n=y(e=>e.hasBackend),r=y(e=>e.addToast),a=y(e=>e.openConnectModal),u=l(e=>e.identity),ee=l(e=>e.openLoginModal),[f,p]=(0,x.useState)([]),[m,h]=(0,x.useState)(null),[g,_]=(0,x.useState)(``),[me,v]=(0,x.useState)(!1),[ve,De]=(0,x.useState)(``),[ke,Ae]=(0,x.useState)(``),[Ne,C]=se(!1),[Fe,w]=(0,x.useState)(``),[E,D]=(0,x.useState)(!1),[ct,lt]=(0,x.useState)(!1),[ut,dt]=se(!1),[ft,pt]=(0,x.useState)(null),[mt,M]=(0,x.useState)(null),[ht,N]=(0,x.useState)(!1),[gt,_t]=(0,x.useState)(``),[vt,yt]=(0,x.useState)(!1),[bt,xt]=(0,x.useState)(null),[St,Ct]=(0,x.useState)(!1),[P,F]=(0,x.useState)({}),[I,L]=(0,x.useState)(null),[wt,Tt]=(0,x.useState)(!1),[Et,Dt]=(0,x.useState)(!1),[Ot,R]=(0,x.useState)({}),[kt,z]=(0,x.useState)([]),B=u?.identity===`user`,At=B&&!Et?u.logo:``,jt=(0,x.useRef)(null),Mt=(0,x.useRef)(null),Nt=(0,x.useRef)(``),Pt=(0,x.useRef)(new Set),Ft=(0,x.useRef)(new Set),V=(0,x.useRef)(null),H=(0,x.useRef)(!1),It=(0,x.useRef)(0),U=(0,x.useRef)(new Map),W=(0,x.useRef)(new Set),G=n===!0,{t:K,compareStrings:Lt,formatDate:Rt,formatTime:zt}=d(),q=(0,x.useCallback)(async(e,t)=>{r(await he(e,t),`error`)},[r]),J=(0,x.useMemo)(()=>He(u?.address),[u?.address]),Bt=(0,x.useCallback)((e,t=Date.now())=>{e&&R(n=>{let r=Ge(n,e,t);return r.changed?(We(J,r.value),r.value):n})},[J]),Y=(0,x.useCallback)(()=>{if(H.current||typeof window>`u`)return;let e=st();if(e)try{let t=V.current||new e;V.current=t,t.state===`suspended`&&t.resume().catch(()=>{}),H.current=!0}catch{}},[]),Vt=(0,x.useCallback)(()=>{if(!H.current)return;let e=Date.now();if(e-It.current<et)return;It.current=e;let t=st();if(t)try{let e=V.current||new t;if(V.current=e,e.state===`suspended`){e.resume().catch(()=>{});return}let n=e.createGain();n.gain.setValueAtTime(1e-4,e.currentTime),n.gain.exponentialRampToValueAtTime(.08,e.currentTime+.015),n.gain.exponentialRampToValueAtTime(1e-4,e.currentTime+.18),n.connect(e.destination),[740,980].forEach((t,r)=>{let i=e.createOscillator();i.type=`sine`,i.frequency.setValueAtTime(t,e.currentTime),i.connect(n),i.start(e.currentTime+r*.035),i.stop(e.currentTime+.16+r*.035)})}catch{}},[]),Ht=(0,x.useCallback)(async(e=m)=>{let t=O(e);if(!t||!G){z([]);return}try{let e=await b.getChannelPeers(t);if(Nt.current!==t)return;z(ot(e))}catch(e){console.warn(`[Chat] Failed to fetch channel peers:`,e instanceof Error?e.message:e)}},[m,G]);function Ut(e,t){switch(e){case`channel:message`:{let e=t?.channelKey||t?.channel,n=t?.message,r=Number(n?.timestamp)||Date.now();if(e){p(t=>t.map(t=>O(t)===e?{...t,lastMessageAt:new Date(r).toISOString()}:t));let t=e===Nt.current;R(i=>{let a=qe(i,{channelName:e,messageTime:r,activeChannelName:t?e:``,messageAuthor:n?.author,userAddress:u?.address});return a.changed&&We(J,a.value),a.notify&&Vt(),a.changed?a.value:i})}break}case`channel:peer:online`:case`channel:peer:offline`:m&&Ht(m);break;case`channel:joined`:case`channel:left`:$();break;case`user:metadata:updated`:t?.scope===`channels`&&$();break;case`download:success`:{let e=U.current.get(t.taskId);e&&(U.current.delete(t.taskId),W.current.delete(e.cid),F(t=>({...t,[e.cid]:{status:`available`}})),r(K(`chat.attachment.downloadCompleted`,{fileName:t.fileName||Me(e.fileName)}),`success`),Zt(e,t.fileName||e.fileName));break}case`download:error`:case`download:cancelled`:{let n=U.current.get(t.taskId);n&&(U.current.delete(t.taskId),W.current.delete(n.cid),F(r=>({...r,[n.cid]:{status:`error`,message:e===`download:cancelled`?K(`chat.attachment.downloadCancelled`):t.error||K(`chat.attachment.downloadFailed`)}})),r(e===`download:cancelled`?K(`chat.attachment.downloadCancelled`):t.error||K(`chat.attachment.downloadFailed`),`error`));break}}}let Wt=(0,x.useMemo)(()=>f.map(e=>O(e)),[f]),{clearMessages:Gt,messages:X,sendMessage:Kt,syncMessages:qt}=Te({isReady:G,enabled:!!u,channelName:O(m),extraSubscribedChannelNames:Wt,peerId:Fe,waitForPeerId:!0,onSyncError:e=>q(e,K(`chat.error.messages`)),onSocketEvent:Ut,onReconnect:$}),Jt=(0,x.useMemo)(()=>{let e=new Map;return X.forEach((t,n)=>{let r=String(t.author||``).trim();if(!r)return;let i=r.toLowerCase(),a=Number(t.timestamp)||0,o=String(t.authorName||``).trim(),s=String(t.avatar||``).trim(),c=e.get(i);if(!c){e.set(i,{address:r,displayName:o,...s?{avatar:s}:{},firstSeenAt:a,lastSeenAt:a,index:n});return}a>=c.lastSeenAt&&(c.lastSeenAt=a,o&&(c.displayName=o),s&&(c.avatar=s))}),[...e.values()].sort((e,t)=>e.firstSeenAt-t.firstSeenAt||e.index-t.index)},[X]),Yt=(0,x.useMemo)(()=>{let e=new Set(kt),t=j(u?.address);return t&&m&&G&&e.add(t),e},[m,G,kt,u?.address]);function Z(){return G?!0:(a(),!1)}function Q(){return u?!0:(ee(),!1)}(0,x.useEffect)(()=>{let e=()=>{_(tt())};return e(),window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,x.useEffect)(()=>{u&&_(tt())},[u?.address]),(0,x.useEffect)(()=>{Dt(!1)},[u?.logo]),(0,x.useEffect)(()=>{Nt.current=O(m)},[m]),(0,x.useEffect)(()=>{R(Ue(J))},[J]),(0,x.useEffect)(()=>{!J||f.length===0||R(e=>{let t=Ke(e,f);return t.changed&&We(J,t.value),t.changed?t.value:e})},[J,f]),(0,x.useEffect)(()=>(window.addEventListener(`pointerdown`,Y,{passive:!0}),window.addEventListener(`keydown`,Y),()=>{window.removeEventListener(`pointerdown`,Y),window.removeEventListener(`keydown`,Y)}),[Y]),(0,x.useEffect)(()=>()=>{V.current?.close().catch(()=>{}),V.current=null,H.current=!1},[]),(0,x.useEffect)(()=>{jt.current?.scrollIntoView({behavior:`smooth`})},[X]),(0,x.useEffect)(()=>{if(!G){w(``);return}_e.get(`/api/node-id`).json().then(e=>w(e.id)).catch(e=>{console.warn(`[Chat] Failed to fetch node ID:`,e.message),q(e,K(`chat.error.nodeId`))})},[G,q,K]),(0,x.useEffect)(()=>{G&&u?(v(!1),$()):v(!1)},[n,G,u?.address]),(0,x.useEffect)(()=>{if(m){if(G){let e=O(m);z([]),qt(e,{replace:!0}),Ht(m)}}else z([])},[m,G,Ht,qt]),(0,x.useEffect)(()=>{if(!g)return;if(!u){Ft.current.has(g)||(Ft.current.add(g),ee());return}if(!G||!me)return;let e=f.find(e=>O(e)===g)||f.find(e=>k(e)===g);if(e&&(!m||O(m)!==O(e))){tn(e);return}if(e&&m&&O(m)===O(e)&&(m.createdAt!==e.createdAt||m.coreKey!==e.coreKey||m.lastMessageAt!==e.lastMessageAt||m.pinned!==e.pinned||m.remark!==e.remark||m.type!==e.type)){h(e);return}if(e)return;let t=`${u.address}:${g}`;if(Pt.current.has(t)||E)return;let n=Xt(g);if(Pt.current.add(t),n){r(n,`error`);return}an(g)},[f,m,g,me,G,E,u?.address]),(0,x.useEffect)(()=>{u||(p([]),v(!1),h(null),_(tt()),M(null),Gt(),Ae(``),w(``),N(!1),xt(null),F({}),R({}),W.current.clear(),U.current.clear())},[Gt,u?.address]);function Xt(e){return e.length<Ye?K(`chat.validation.nameMin`,{count:Ye}):e.length>Xe?K(`chat.validation.nameMax`,{count:Xe}):e.includes(`.`)?K(`chat.validation.dotReserved`):Ze.test(e)?``:K(`chat.validation.allowedChars`)}async function $(){if(!G){v(!1);return}try{p(await b.getChannels()),v(!0)}catch(e){p([]),v(!1),await q(e,K(`chat.error.channelList`))}}function Zt(e,t=e.fileName){let n=re(t);xt({cid:e.cid,fileName:t,subtype:n===`file`?e.kind:n})}async function Qt(e){let t=Se(e.link,K);if(t)return F(n=>({...n,[e.cid]:{status:`error`,message:t}})),!1;try{F(t=>({...t,[e.cid]:{status:`checking`}}));let t=await be.checkDownload(e.link,{timeout:Qe,requestTimeout:$e});return F(n=>({...n,[e.cid]:{status:`available`,message:t.alreadyExists?K(`chat.attachment.localAvailable`):K(`chat.attachment.previewAvailable`)}})),!0}catch(t){let n=await xe(t);return F(t=>({...t,[e.cid]:{status:`error`,message:n}})),!1}}async function $t(e){L(null),await Qt(e)&&await en(e)}async function en(e){if(!W.current.has(e.cid)){W.current.add(e.cid),F(t=>({...t,[e.cid]:{status:`available`}}));try{let t=await be.downloadFile(e.link);if(t.alreadyExists||t.fileName){W.current.delete(e.cid),F(t=>({...t,[e.cid]:{status:`available`}})),Zt({...e,fileName:t.fileName||e.fileName},t.fileName||e.fileName);return}t.taskId&&(U.current.set(t.taskId,e),r(K(`chat.attachment.downloadStarted`),`success`))}catch(t){let n=await xe(t);W.current.delete(e.cid),F(t=>({...t,[e.cid]:{status:`error`,message:n}}))}}}async function tn(e){if(!Q()||!Z())return;let t=O(e);Bt(t,Math.max(T(e),Date.now())),h(e),_(t),window.history.pushState({},``,`?channel=${encodeURIComponent(t)}`)}async function nn(e,t){if(t&&t.stopPropagation(),Q()&&Z()&&!ct){lt(!0);try{if(await b.leaveChannel(e),O(m)===e){h(null),_(``),Gt();let e=new URL(window.location.href);e.searchParams.delete(`channel`),window.history.pushState({},``,e.pathname)}$(),dt.close(),pt(null)}catch(e){await q(e,K(`chat.error.leave`))}finally{lt(!1)}}}async function rn(e){if(!Q()||!Z())return;let t=!e.pinned,n=O(e);try{let e=await b.setChannelPinned(n,t);p(t=>t.map(t=>O(t)===n?{...t,pinned:e.pinned}:t)),h(t=>t&&O(t)===n?{...t,pinned:e.pinned}:t)}catch(e){await q(e,K(t?`chat.error.pin`:`chat.error.unpin`))}}async function an(e){let t=e.trim();if(!t||E)return;let n=Xt(t);if(n){r(n,`error`);return}if(Q()&&Z()){D(!0);try{let e=await b.createChannel(t,`public`,we(u)),n=e.channelKey||e.key||e.name||t,r=f.find(e=>O(e)===n),i={...r,name:e.name||t,channelId:e.channelId||e.name||t,channelKey:e.channelKey||e.key||r?.channelKey,type:e.type||r?.type||`public`,createdAt:e.createdAt||r?.createdAt,coreKey:e.coreKey||e.key||r?.coreKey,localWriterCoreKey:e.localWriterCoreKey||r?.localWriterCoreKey,writerCoreKeys:e.writerCoreKeys||r?.writerCoreKeys,remark:e.remark||r?.remark},a=O(i);p(e=>e.some(e=>O(e)===a)?e.map(e=>O(e)===a?{...e,...i}:e):[...e,i]),C.close(),await tn(i),$()}catch(e){await q(e,K(`chat.error.join`))}finally{D(!1)}}}async function on(e,t){if(!e.trim()||!m||!Q()||!Z())return!1;let n=e.trim(),r=O(m);try{let e=await Kt({channelName:r,content:n,attachment:t});return p(t=>t.map(t=>O(t)===r?{...t,lastMessageAt:new Date(Number(e?.timestamp)||Date.now()).toISOString()}:t)),e&&Bt(r,Number(e.timestamp)||Date.now()),!0}catch(e){return await q(e,K(`chat.error.send`)),!1}}async function sn(){if(!ke.trim())return;let e=ke.trim();Ae(``),await on(e)}function cn(e,t){return`${nt}/${e}/${t}`}async function ln(e){if(!(!e||e.length===0||!m)&&Q()&&Z()&&!St){Ct(!0);try{for(let t of Array.from(e)){let e=cn(k(m),t.name),n=await be.publishFile(t,e),i=n.fileName||e,a=n.link||`most://${n.cid}?filename=${encodeURIComponent(i)}`;await on(a,{kind:rt(t,i),cid:n.cid,fileName:i,link:a,mimeType:t.type||void 0,size:t.size})&&r(K(`chat.attachment.published`,{fileName:Me(i)}),`success`)}}catch(e){await q(e,K(`chat.error.attachmentSend`))}finally{Ct(!1)}}}async function un(e){if(!Q()||!Z())return;let t=P[e.cid];if(t?.status!==`checking`){if(t?.status===`error`){L(e);return}if(t?.status!==`available`){await Qt(e)&&await en(e);return}await en(e)}}async function dn(e,t){if(!Q()||!Z())return;let n=O(e),r=await b.setChannelRemark(n,t);return p(e=>e.map(e=>O(e)===n?{...e,remark:r.remark}:e)),h(e=>e&&O(e)===n?{...e,remark:r.remark}:e),r.remark}async function fn(){if(m)try{await dn(m,gt)}catch(e){await q(e,K(`chat.error.remark`))}}async function pn(e){if(!(!mt||vt)){yt(!0);try{await dn(mt,e),M(null)}catch(e){await q(e,K(`chat.error.rename`))}finally{yt(!1)}}}function mn(e){if(!e.attachment)return(0,S.jsx)(Ie,{children:e.content});let t=e.attachment,n=P[t.cid]?.status;return(0,S.jsx)(Le,{children:(0,S.jsx)(Pe,{attachment:t,status:n,pending:e.pending,onOpen:un})})}function hn(e,t){let n=String(e||``).trim();return n?wt?at(n)?n:t?`${n}#${t.slice(-4).toUpperCase()}`:n:n.replace(/#[a-fA-F0-9]{4}$/,``):it(t)}function gn(){return(0,S.jsx)(Be,{members:Jt.map(e=>({id:e.address,name:hn(e.displayName,e.address),avatarSrc:ge(e.address,e.avatar),online:Yt.has(j(e.address))}))})}let _n=B&&!!g&&!m,vn=m?(0,S.jsx)(`h2`,{className:`header-title`,translate:`no`,children:A(m)}):(0,S.jsx)(`h2`,{className:`header-title`,children:K(`chat.title`)}),yn=ve.trim().toLowerCase(),bn=(0,x.useMemo)(()=>[...f].sort((e,t)=>{let n=Number(!!t.pinned)-Number(!!e.pinned);if(n!==0)return n;let r=T(t)-T(e);return r===0?Lt(A(e),A(t)):r}),[f,Lt]),xn=yn?bn.filter(e=>[A(e),k(e),O(e)].some(e=>e.toLowerCase().includes(yn))):bn;return(0,S.jsxs)(ce,{className:`chat-app-layout`,defaultHide:B,sidebar:({closeSidebar:e})=>(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(le,{onNavigate:e}),(0,S.jsx)(`div`,{className:`chat-channel-search`,children:(0,S.jsxs)(`div`,{className:`ui-input-control`,children:[(0,S.jsx)(pe,{className:`ui-input-icon`,size:15}),(0,S.jsx)(`input`,{type:`search`,className:`input input-compact`,placeholder:K(`chat.search.placeholder`),value:ve,onChange:e=>De(e.target.value),"aria-label":K(`chat.search.placeholder`)})]})}),(0,S.jsx)(`nav`,{className:`sidebar-nav`,children:f.length===0?(0,S.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,S.jsx)(`p`,{children:K(`chat.empty.noChannels`)})}):xn.length===0?(0,S.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,S.jsx)(`p`,{children:K(`chat.empty.noMatches`)})}):xn.map(t=>(0,S.jsx)(ze,{active:O(m)===O(t),pinned:!!t.pinned,unread:Je(t,Ot),title:A(t),onSelect:()=>{tn(t),e()},onTogglePin:()=>void rn(t),onRename:()=>M(t),onLeave:()=>{pt(t),dt.open()}},O(t)))}),(0,S.jsxs)(`button`,{className:`ui-action-dashed create-channel-btn`,onClick:()=>{!Q()||!Z()||C.open()},children:[(0,S.jsx)(fe,{size:16}),K(`chat.joinChannel`)]}),(0,S.jsx)(ye,{})]}),headerTitle:vn,sidebarToggleReplacement:B?(0,S.jsx)(`span`,{className:`sidebar-toggle-static-logo`,"aria-hidden":`true`,children:At?(0,S.jsx)(`img`,{className:`sidebar-toggle-static-logo-img`,src:At,alt:``,onError:()=>Dt(!0)}):(0,S.jsx)(Ce,{size:18})}):void 0,headerRight:(0,S.jsxs)(`div`,{className:`header-right-actions`,children:[(0,S.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>t(!e),title:K(`common.theme.toggle`),children:e?(0,S.jsx)(te,{size:16}):(0,S.jsx)(ne,{size:16})}),m&&(0,S.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>N(!0),title:K(`chat.channelSettings`),children:(0,S.jsx)(je,{size:16})})]}),children:[m?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`chat-messages`,children:[X.length===0?(0,S.jsxs)(`div`,{className:`ui-empty-state chat-messages-empty`,children:[(0,S.jsx)(`div`,{className:`ui-empty-icon empty-icon`,children:(0,S.jsx)(ue,{size:28})}),(0,S.jsx)(`p`,{children:K(`chat.empty.noMessages`)})]}):X.map(e=>{let t=e.author?.toLowerCase()===u?.address.toLowerCase(),n=Yt.has(j(e.author));return(0,S.jsx)(Re,{variant:t?`self`:`other`,pending:e.pending,isOnline:n,avatarSrc:ge(e.author,e.avatar||(t?u.avatar:void 0)),author:hn(e.authorName,e.author),time:zt(e.timestamp),children:mn(e)},e.id||`${e.author}-${e.timestamp}`)}),(0,S.jsx)(`div`,{ref:jt})]}),(0,S.jsx)(Ve,{message:ke,placeholder:K(u?`chat.composer.placeholder`:`chat.composer.signInPlaceholder`),disabled:!u,isPublishingAttachment:St,attachmentInputRef:Mt,onMessageChange:Ae,onSend:sn,onSelectAttachmentFiles:e=>{ln(e)}})]}):_n?(0,S.jsxs)(`div`,{className:`ui-empty-state chat-welcome`,children:[(0,S.jsx)(`div`,{className:`ui-empty-icon ui-empty-icon-lg welcome-icon`,children:(0,S.jsx)(oe,{size:36,className:`ui-spinner`})}),(0,S.jsx)(`h2`,{className:`ui-empty-title`,children:K(`chat.restoring.title`)}),(0,S.jsx)(`p`,{className:`ui-empty-desc`,children:K(`chat.restoring.desc`)})]}):(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)(`div`,{className:`ui-empty-state chat-welcome`,children:[(0,S.jsx)(`div`,{className:`ui-empty-icon ui-empty-icon-lg welcome-icon`,children:(0,S.jsx)(ue,{size:36})}),(0,S.jsx)(`h2`,{className:`ui-empty-title`,children:K(`chat.select.title`)}),(0,S.jsx)(`p`,{className:`ui-empty-desc`,children:K(`chat.select.desc`)}),(0,S.jsx)(de,{label:K(`chat.openChannelList`)})]})}),Ne&&(0,S.jsx)(s,{title:K(`chat.joinChannel`),placeholder:K(`chat.join.placeholder`),confirmText:K(`chat.join.confirm`),validate:Xt,onConfirm:an,onClose:()=>C.close(),isLoading:E,loadingText:K(`chat.join.joining`)}),mt&&(0,S.jsx)(s,{title:K(`chat.renameChannel`),placeholder:K(`chat.remark.placeholder`),defaultValue:mt.remark||``,confirmText:K(`chat.remark.save`),onConfirm:pn,onClose:()=>{vt||M(null)},isLoading:vt,loadingText:K(`chat.remark.saving`),allowEmpty:!0,validate:e=>e.length>50?K(`chat.remark.tooLong`):``}),ut&&ft&&(0,S.jsx)(c,{title:K(`chat.leaveChannel`),message:K(`chat.leaveConfirm`,{channel:A(ft)}),confirmText:K(ct?`chat.leaving`:`chat.leaveChannel`),onConfirm:()=>nn(O(ft),void 0),danger:!0,onClose:()=>{dt.close(),pt(null)}}),I&&(0,S.jsx)(o,{onClose:()=>L(null),children:(0,S.jsxs)(`div`,{className:`confirm-modal`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`modal-header`,children:[(0,S.jsx)(`h3`,{children:K(`chat.attachment.noSeedsTitle`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-icon`,onClick:()=>L(null),"aria-label":K(`common.close`),children:(0,S.jsx)(i,{size:18})})]}),(0,S.jsx)(`p`,{children:P[I.cid]?.message||K(`chat.attachment.noSeedsFallback`)}),(0,S.jsxs)(`div`,{className:`modal-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-secondary`,onClick:()=>L(null),children:K(`common.cancel`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>$t(I),disabled:P[I.cid]?.status===`checking`,children:P[I.cid]?.status===`checking`?K(`app.checking`):K(`chat.attachment.retryCheck`)})]})]})}),bt&&(0,S.jsx)(ae,{item:bt,isBackendReady:G,getFileDownloadUrl:be.getFileDownloadUrl,onClose:()=>xt(null)}),ht&&m&&(0,S.jsx)(`div`,{className:`channel-detail-overlay`,onClick:()=>N(!1),children:(0,S.jsxs)(`div`,{className:`channel-detail-drawer`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`channel-detail-header`,children:[(0,S.jsx)(`h3`,{children:K(`chat.details.title`)}),(0,S.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>N(!1),children:(0,S.jsx)(i,{size:18})})]}),(0,S.jsxs)(`div`,{className:`channel-detail-body`,children:[(0,S.jsxs)(`div`,{className:`channel-detail-section channel-members-section`,children:[(0,S.jsx)(`div`,{className:`channel-detail-label`,children:(0,S.jsx)(`span`,{children:K(`chat.details.members`,{count:Jt.length})})}),gn()]}),!B&&(0,S.jsx)(`div`,{className:`channel-detail-section`,children:(0,S.jsxs)(`label`,{className:`setting-switch`,children:[(0,S.jsx)(`span`,{children:K(`chat.details.showAddressSuffix`)}),(0,S.jsx)(`input`,{type:`checkbox`,checked:wt,onChange:e=>Tt(e.target.checked)})]})}),!B&&(0,S.jsxs)(`div`,{className:`channel-detail-section`,children:[(0,S.jsxs)(`div`,{className:`channel-detail-label`,children:[(0,S.jsx)(Oe,{size:14}),(0,S.jsx)(`span`,{children:K(`chat.details.channelId`)})]}),(0,S.jsx)(`div`,{className:`ui-meta-box channel-detail-value channel-detail-mono`,translate:`no`,children:k(m)})]}),(0,S.jsxs)(`div`,{className:`channel-detail-section`,children:[(0,S.jsxs)(`div`,{className:`channel-detail-label`,children:[(0,S.jsx)(ie,{size:14}),(0,S.jsx)(`span`,{children:K(`chat.remark.placeholder`)})]}),(0,S.jsx)(`input`,{type:`text`,className:`input input-compact`,placeholder:K(`chat.remark.placeholder`),value:gt,onChange:e=>_t(e.target.value),onFocus:()=>_t(m.remark||``),onBlur:()=>fn(),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},maxLength:50})]}),(0,S.jsxs)(`div`,{className:`channel-detail-section`,children:[(0,S.jsxs)(`div`,{className:`channel-detail-label`,children:[(0,S.jsx)(Ee,{size:14}),(0,S.jsx)(`span`,{children:K(`chat.channel.createdAt`)})]}),(0,S.jsx)(`div`,{className:`ui-meta-box channel-detail-value`,children:m.createdAt?Rt(m.createdAt):`-`})]})]}),!B&&(0,S.jsx)(`div`,{className:`channel-detail-footer`,children:(0,S.jsx)(`button`,{className:`btn btn-secondary btn-block`,onClick:()=>{N(!1),pt(m),dt.open()},children:K(`chat.leaveChannel`)})})]})})]})}var lt=a(`/chat/`)({component:ct});export{lt as Route};
@@ -1 +1 @@
1
- import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{E as r,c as i,l as a}from"./ui-u9yJHkb-.js";import{a as o,i as s,n as c}from"./i18n-Cqyi6NZb.js";import{a as l,o as u,r as d}from"./LanguageToggle-Cfh33R2h.js";import{t as f}from"./circle-alert-Dkgyw_GE.js";import{t as p}from"./key-round-DvpIlAJY.js";import{n as m,t as h}from"./SidebarHomeLink-LzYXrJRr.js";import{L as g,_,c as v,d as y,u as b,v as x,y as S}from"./index-CiHRnvMj.js";import{i as C,t as w}from"./userProfile-CL1Ev2GK.js";var T=t(e(),1),E=[{name:`node_url`,required:!1,descriptionKey:`chatJoin.field.nodeUrl`},{name:`node_invite`,required:!1,descriptionKey:`chatJoin.field.nodeInvite`},{name:`uid`,required:!0,descriptionKey:`chatJoin.field.uid`},{name:`identity`,required:!1,descriptionKey:`chatJoin.field.identity`},{name:`logo`,required:!1,descriptionKey:`chatJoin.field.logo`},{name:`avatar`,required:!1,descriptionKey:`chatJoin.field.avatar`},{name:`name`,required:!1,descriptionKey:`chatJoin.field.name`},{name:`locale`,required:!1,descriptionKey:`chatJoin.field.locale`},{name:`channels[].id`,required:!0,descriptionKey:`chatJoin.field.channelId`},{name:`channels[].name`,required:!1,descriptionKey:`chatJoin.field.channelName`}];function D(e){let t=typeof e==`string`?e.trim():e;return c(t)?t:void 0}function O(e){return String(e||``).trim().replace(/\/+$/,``)}function k(e){return String(e||``).trim()}function A({inviteNodeUrl:e,inviteNodeInvite:t,hasBackend:n,activeBackendUrl:r,activeRemoteUrl:i,activeRemoteInvite:a}){let o=O(e),s=O(i),c=O(r);return!!o&&!!s&&n===!0&&c===s&&s===o&&k(a)===k(t)}function j(e){return!!O(e.inviteNodeUrl)&&!A(e)}var M=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Crect width="64" height="64" rx="16" fill="%232f7dd1"/%3E%3Ccircle cx="32" cy="25" r="11" fill="%23f8fbff"/%3E%3Cpath d="M14 56c3-12 12-18 18-18s15 6 18 18" fill="%23f8fbff"/%3E%3C/svg%3E`,N=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Crect width="64" height="64" rx="16" fill="%230f9f7a"/%3E%3Cpath d="M18 20h28v22H18z" rx="6" fill="%23f7fff9"/%3E%3Ccircle cx="27" cy="31" r="3" fill="%230f9f7a"/%3E%3Ccircle cx="37" cy="31" r="3" fill="%230f9f7a"/%3E%3Cpath d="M29 39h6" stroke="%230f9f7a" stroke-width="4" stroke-linecap="round"/%3E%3Cpath d="M32 12v8" stroke="%23f7fff9" stroke-width="5" stroke-linecap="round"/%3E%3C/svg%3E`,P=Object.freeze({id:`chatjoin_support`,name:`User / Service 测试频道`}),F=Object.freeze([Object.freeze({uid:`user`,identity:`user`,name:`测试用户`,avatar:M}),Object.freeze({uid:`service`,identity:`service`,name:`测试客服`,avatar:N})]),I=Object.freeze(F.map(e=>Object.freeze({locale:`zh-CN`,uid:e.uid,identity:e.identity,avatar:e.avatar,name:e.name,channels:[P]})));function L(e){let t=String(e||``).trim();return I.find(e=>e.uid===t)||null}function R(e){return JSON.stringify(e,null,2)}var z=n(),B=`0x955fe80bdb8312165471fcacd6a8f83df88a770dda6f38657ca4e62ec28d5b54`,V=50,H=`https://api.most.box`;function U(e){try{return JSON.parse(e)}catch{return null}}function W(e){return typeof e==`string`?U(e):e}function G(e,t){return t===null?e:JSON.stringify(t,null,2)}function K(e,t,n){if(t&&typeof t==`object`&&`error`in t){let e=t.error;if(typeof e==`string`)return e}return e||n}function q(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function J(e){return typeof e==`string`?e.trim():``}function Y(e){let t=J(e);return t===`user`||t===`service`||t===`service_ai`?t:void 0}function X(e){let t=W(e);if(!q(t))return null;let n=J(t.uid),r=(Array.isArray(t.channels)?t.channels:[]).filter(q).map(e=>({id:J(e.id),name:J(e.name)||void 0})).filter(e=>e.id);return!n||r.length===0?null:{node_url:J(t.node_url)||void 0,node_invite:J(t.node_invite)||void 0,locale:D(t.locale),uid:n,identity:Y(t.identity),logo:J(t.logo)||void 0,avatar:J(t.avatar)||void 0,name:J(t.name)||void 0,channels:r}}function Z(e){return`/chat?channel=${encodeURIComponent(e)}`}function Q(e){return String(e||``).trim().slice(0,V)}function $(){let{t:e,setLocale:t}=o(),n=g({select:e=>e.searchStr}),{token:r,pub:c,fixture:D}=(0,T.useMemo)(()=>{let e=new URLSearchParams(n);return{token:e.get(`token`)||``,pub:e.get(`pub`)||``,fixture:e.get(`fixture`)||``}},[n]),O=v(e=>e.isDarkMode),k=v(e=>e.setIsDarkMode),A=v(e=>e.hasBackend),M=i(e=>e.setUserIdentity),[N,P]=(0,T.useState)(``),[F,I]=(0,T.useState)(``),[V,W]=(0,T.useState)(!0),[q,J]=(0,T.useState)(``),Y=(0,T.useRef)(``);return(0,T.useEffect)(()=>{let n=L(D);if(D&&!n){I(e(`chatJoin.error.unknownFixture`,{fixture:D})),W(!1);return}if(!n&&!r){I(e(`chatJoin.error.missingToken`)),W(!1);return}if(!n&&!c){I(e(`chatJoin.error.missingPub`)),W(!1);return}if(A===null){J(e(`chatJoin.status.checkingBackend`));return}let i=n?`fixture:${D}`:`${r}:${c}`;if(Y.current===i)return;Y.current=i;async function o(n){let r=(t,r)=>n.locale?s(t,n.locale,r):e(t,r);n.locale&&t(n.locale);let i=S(),o=x(),c=_();if(j({inviteNodeUrl:n.node_url,inviteNodeInvite:n.node_invite,hasBackend:A,activeBackendUrl:c,activeRemoteUrl:i,activeRemoteInvite:o})){if(J(r(`chatJoin.status.connectingRemote`)),!(await b({url:n.node_url,invite:n.node_invite||``})).ok)throw Error(r(`chatJoin.error.remoteConnectFailed`));y({url:n.node_url,invite:n.node_invite||``}),v.setState({hasBackend:!0})}else if(!A)throw Error(r(`chatJoin.error.noBackend`));J(r(`chatJoin.status.signingIn`));let l=a(n.uid,``),u={...l,identity:n.identity,displayName:n.name||l.displayName,logo:n.logo,avatar:n.avatar};M(u),J(r(`chatJoin.status.joiningChannel`));let d=``;for(let e of n.channels){let t=await C.createChannel(e.id,`public`,w(u)),n=t.channelKey||t.key||e.id;d||=n;let r=Q(e.name);r&&await C.setChannelRemark(n,r)}let f=n.channels[0];J(r(`chatJoin.status.openingChannel`)),window.location.href=Z(d||f.id)}async function l(){try{if(n){J(e(`chatJoin.status.loadingFixture`,{name:n.name||D})),P(R(n)),await o(n);return}J(e(`chatJoin.status.decryptingInvite`));let t=await fetch(`${H}/api/chat.join.decrypt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:r,pub:c})}),i=await t.text(),a=U(i);if(!t.ok)I(K(i,a,e(`chatJoin.error.decrypt`)));else{P(G(i,a));let t=X(a);if(!t){I(e(`chatJoin.error.invalidInvite`));return}await o(t)}}catch(t){I(e(`chatJoin.error.request`,{message:t instanceof Error?t.message:String(t)}))}finally{W(!1)}}l()},[D,A,c,t,M,e,r]),(0,z.jsx)(m,{sidebar:()=>(0,z.jsx)(h,{}),headerTitle:(0,z.jsx)(`h2`,{className:`header-title`,children:e(`chatJoin.title`)}),headerRight:(0,z.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>k(!O),title:e(`common.theme.toggle`),children:O?(0,z.jsx)(d,{size:16}):(0,z.jsx)(l,{size:16})}),children:(0,z.jsx)(`div`,{className:`chat-join-container`,children:(0,z.jsxs)(`div`,{className:`chat-join-panel`,children:[V?(0,z.jsxs)(`div`,{className:`chat-join-loading`,children:[(0,z.jsx)(p,{size:32}),(0,z.jsx)(`p`,{children:q||e(`chatJoin.status.decrypting`)})]}):F?(0,z.jsxs)(`div`,{className:`chat-join-error`,children:[(0,z.jsx)(f,{size:32}),(0,z.jsx)(`p`,{children:F}),q&&(0,z.jsx)(`p`,{className:`chat-join-status`,children:q}),N&&(0,z.jsx)(`pre`,{className:`chat-join-result`,translate:`no`,children:N})]}):(0,z.jsxs)(`div`,{className:`chat-join-success`,children:[(0,z.jsx)(u,{size:32}),(0,z.jsx)(`p`,{children:q||e(`chatJoin.status.decryptSuccess`)}),(0,z.jsx)(`pre`,{className:`chat-join-result`,translate:`no`,children:N})]}),(0,z.jsxs)(`section`,{className:`chat-join-spec`,"aria-labelledby":`chat-join-spec-title`,children:[(0,z.jsxs)(`div`,{className:`chat-join-helper-title`,children:[(0,z.jsx)(p,{size:18}),(0,z.jsx)(`h3`,{id:`chat-join-spec-title`,children:e(`chatJoin.specTitle`)})]}),(0,z.jsx)(`div`,{className:`chat-join-field-list`,children:E.map(t=>(0,z.jsxs)(`div`,{className:`chat-join-field`,children:[(0,z.jsxs)(`div`,{className:`chat-join-field-meta`,children:[(0,z.jsx)(`code`,{className:`chat-join-field-name`,children:t.name}),(0,z.jsx)(`span`,{children:t.required?e(`chatJoin.field.required`):e(`chatJoin.field.optional`)})]}),(0,z.jsx)(`p`,{children:e(t.descriptionKey)})]},t.name))})]}),(0,z.jsxs)(`section`,{className:`chat-join-helper`,"aria-labelledby":`ea-test-title`,children:[(0,z.jsxs)(`div`,{className:`chat-join-helper-title`,children:[(0,z.jsx)(p,{size:18}),(0,z.jsx)(`h3`,{id:`ea-test-title`,children:e(`chatJoin.testPublicKey`)})]}),(0,z.jsx)(`code`,{className:`ui-code-box chat-join-public-key`,translate:`no`,children:B}),(0,z.jsx)(`a`,{className:`btn`,href:`/web3/#EA`,target:`_blank`,children:e(`chatJoin.openWeb3`)})]})]})})})}function ee(){return(0,z.jsx)(T.Suspense,{children:(0,z.jsx)($,{})})}var te=r(`/chat/join/`)({component:ee});export{te as Route};
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{T as r,c as i,s as a}from"./ui-BpDGD3IR.js";import{a as o,i as s,n as c}from"./i18n-NjvOSuV6.js";import{i as l,n as u,r as d}from"./LanguageToggle-CSQtRZ3A.js";import{t as f}from"./circle-alert-iuHzciph.js";import{t as p}from"./key-round-DNcpSuMw.js";import{n as m,t as h}from"./SidebarHomeLink-DXv0c9Ob.js";import{L as g,_,c as v,d as y,u as b,v as x,y as S}from"./index-BI8oNSVC.js";import{i as C,t as w}from"./userProfile-qcc60tHK.js";var T=t(e(),1),E=[{name:`node_url`,required:!1,descriptionKey:`chatJoin.field.nodeUrl`},{name:`node_invite`,required:!1,descriptionKey:`chatJoin.field.nodeInvite`},{name:`uid`,required:!0,descriptionKey:`chatJoin.field.uid`},{name:`identity`,required:!1,descriptionKey:`chatJoin.field.identity`},{name:`logo`,required:!1,descriptionKey:`chatJoin.field.logo`},{name:`avatar`,required:!1,descriptionKey:`chatJoin.field.avatar`},{name:`name`,required:!1,descriptionKey:`chatJoin.field.name`},{name:`locale`,required:!1,descriptionKey:`chatJoin.field.locale`},{name:`channels[].id`,required:!0,descriptionKey:`chatJoin.field.channelId`},{name:`channels[].name`,required:!1,descriptionKey:`chatJoin.field.channelName`}];function D(e){let t=typeof e==`string`?e.trim():e;return c(t)?t:void 0}function O(e){return String(e||``).trim().replace(/\/+$/,``)}function k(e){return String(e||``).trim()}function A({inviteNodeUrl:e,inviteNodeInvite:t,hasBackend:n,activeBackendUrl:r,activeRemoteUrl:i,activeRemoteInvite:a}){let o=O(e),s=O(i),c=O(r);return!!o&&!!s&&n===!0&&c===s&&s===o&&k(a)===k(t)}function j(e){return!!O(e.inviteNodeUrl)&&!A(e)}var M=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Crect width="64" height="64" rx="16" fill="%232f7dd1"/%3E%3Ccircle cx="32" cy="25" r="11" fill="%23f8fbff"/%3E%3Cpath d="M14 56c3-12 12-18 18-18s15 6 18 18" fill="%23f8fbff"/%3E%3C/svg%3E`,N=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Crect width="64" height="64" rx="16" fill="%230f9f7a"/%3E%3Cpath d="M18 20h28v22H18z" rx="6" fill="%23f7fff9"/%3E%3Ccircle cx="27" cy="31" r="3" fill="%230f9f7a"/%3E%3Ccircle cx="37" cy="31" r="3" fill="%230f9f7a"/%3E%3Cpath d="M29 39h6" stroke="%230f9f7a" stroke-width="4" stroke-linecap="round"/%3E%3Cpath d="M32 12v8" stroke="%23f7fff9" stroke-width="5" stroke-linecap="round"/%3E%3C/svg%3E`,P=Object.freeze({id:`chatjoin_support`,name:`User / Service 测试频道`}),F=Object.freeze([Object.freeze({uid:`user`,identity:`user`,name:`测试用户`,avatar:M}),Object.freeze({uid:`service`,identity:`service`,name:`测试客服`,avatar:N})]),I=Object.freeze(F.map(e=>Object.freeze({locale:`zh-CN`,uid:e.uid,identity:e.identity,avatar:e.avatar,name:e.name,channels:[P]})));function L(e){let t=String(e||``).trim();return I.find(e=>e.uid===t)||null}function R(e){return JSON.stringify(e,null,2)}var z=n(),B=`0x955fe80bdb8312165471fcacd6a8f83df88a770dda6f38657ca4e62ec28d5b54`,V=50,H=`https://api.most.box`;function U(e){try{return JSON.parse(e)}catch{return null}}function W(e){return typeof e==`string`?U(e):e}function G(e,t){return t===null?e:JSON.stringify(t,null,2)}function K(e,t,n){if(t&&typeof t==`object`&&`error`in t){let e=t.error;if(typeof e==`string`)return e}return e||n}function q(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function J(e){return typeof e==`string`?e.trim():``}function Y(e){let t=J(e);return t===`user`||t===`service`||t===`service_ai`?t:void 0}function X(e){let t=W(e);if(!q(t))return null;let n=J(t.uid),r=(Array.isArray(t.channels)?t.channels:[]).filter(q).map(e=>({id:J(e.id),name:J(e.name)||void 0})).filter(e=>e.id);return!n||r.length===0?null:{node_url:J(t.node_url)||void 0,node_invite:J(t.node_invite)||void 0,locale:D(t.locale),uid:n,identity:Y(t.identity),logo:J(t.logo)||void 0,avatar:J(t.avatar)||void 0,name:J(t.name)||void 0,channels:r}}function Z(e){return`/chat?channel=${encodeURIComponent(e)}`}function Q(e){return String(e||``).trim().slice(0,V)}function $(){let{t:e,setLocale:t}=o(),n=g({select:e=>e.searchStr}),{token:r,pub:c,fixture:D}=(0,T.useMemo)(()=>{let e=new URLSearchParams(n);return{token:e.get(`token`)||``,pub:e.get(`pub`)||``,fixture:e.get(`fixture`)||``}},[n]),O=v(e=>e.isDarkMode),k=v(e=>e.setIsDarkMode),A=v(e=>e.hasBackend),M=a(e=>e.setUserIdentity),[N,P]=(0,T.useState)(``),[F,I]=(0,T.useState)(``),[V,W]=(0,T.useState)(!0),[q,J]=(0,T.useState)(``),Y=(0,T.useRef)(``);return(0,T.useEffect)(()=>{let n=L(D);if(D&&!n){I(e(`chatJoin.error.unknownFixture`,{fixture:D})),W(!1);return}if(!n&&!r){I(e(`chatJoin.error.missingToken`)),W(!1);return}if(!n&&!c){I(e(`chatJoin.error.missingPub`)),W(!1);return}if(A===null){J(e(`chatJoin.status.checkingBackend`));return}let a=n?`fixture:${D}`:`${r}:${c}`;if(Y.current===a)return;Y.current=a;async function o(n){let r=(t,r)=>n.locale?s(t,n.locale,r):e(t,r);n.locale&&t(n.locale);let a=S(),o=x(),c=_();if(j({inviteNodeUrl:n.node_url,inviteNodeInvite:n.node_invite,hasBackend:A,activeBackendUrl:c,activeRemoteUrl:a,activeRemoteInvite:o})){if(J(r(`chatJoin.status.connectingRemote`)),!(await b({url:n.node_url,invite:n.node_invite||``})).ok)throw Error(r(`chatJoin.error.remoteConnectFailed`));y({url:n.node_url,invite:n.node_invite||``}),v.setState({hasBackend:!0})}else if(!A)throw Error(r(`chatJoin.error.noBackend`));J(r(`chatJoin.status.signingIn`));let l=i(n.uid,``),u={...l,identity:n.identity,displayName:n.name||l.displayName,logo:n.logo,avatar:n.avatar};M(u),J(r(`chatJoin.status.joiningChannel`));let d=``;for(let e of n.channels){let t=await C.createChannel(e.id,`public`,w(u)),n=t.channelKey||t.key||e.id;d||=n;let r=Q(e.name);r&&await C.setChannelRemark(n,r)}let f=n.channels[0];J(r(`chatJoin.status.openingChannel`)),window.location.href=Z(d||f.id)}async function l(){try{if(n){J(e(`chatJoin.status.loadingFixture`,{name:n.name||D})),P(R(n)),await o(n);return}J(e(`chatJoin.status.decryptingInvite`));let t=await fetch(`${H}/api/chat.join.decrypt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:r,pub:c})}),i=await t.text(),a=U(i);if(!t.ok)I(K(i,a,e(`chatJoin.error.decrypt`)));else{P(G(i,a));let t=X(a);if(!t){I(e(`chatJoin.error.invalidInvite`));return}await o(t)}}catch(t){I(e(`chatJoin.error.request`,{message:t instanceof Error?t.message:String(t)}))}finally{W(!1)}}l()},[D,A,c,t,M,e,r]),(0,z.jsx)(m,{sidebar:()=>(0,z.jsx)(h,{}),headerTitle:(0,z.jsx)(`h2`,{className:`header-title`,children:e(`chatJoin.title`)}),headerRight:(0,z.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>k(!O),title:e(`common.theme.toggle`),children:O?(0,z.jsx)(u,{size:16}):(0,z.jsx)(d,{size:16})}),children:(0,z.jsx)(`div`,{className:`chat-join-container`,children:(0,z.jsxs)(`div`,{className:`chat-join-panel`,children:[V?(0,z.jsxs)(`div`,{className:`chat-join-loading`,children:[(0,z.jsx)(p,{size:32}),(0,z.jsx)(`p`,{children:q||e(`chatJoin.status.decrypting`)})]}):F?(0,z.jsxs)(`div`,{className:`chat-join-error`,children:[(0,z.jsx)(f,{size:32}),(0,z.jsx)(`p`,{children:F}),q&&(0,z.jsx)(`p`,{className:`chat-join-status`,children:q}),N&&(0,z.jsx)(`pre`,{className:`chat-join-result`,translate:`no`,children:N})]}):(0,z.jsxs)(`div`,{className:`chat-join-success`,children:[(0,z.jsx)(l,{size:32}),(0,z.jsx)(`p`,{children:q||e(`chatJoin.status.decryptSuccess`)}),(0,z.jsx)(`pre`,{className:`chat-join-result`,translate:`no`,children:N})]}),(0,z.jsxs)(`section`,{className:`chat-join-spec`,"aria-labelledby":`chat-join-spec-title`,children:[(0,z.jsxs)(`div`,{className:`chat-join-helper-title`,children:[(0,z.jsx)(p,{size:18}),(0,z.jsx)(`h3`,{id:`chat-join-spec-title`,children:e(`chatJoin.specTitle`)})]}),(0,z.jsx)(`div`,{className:`chat-join-field-list`,children:E.map(t=>(0,z.jsxs)(`div`,{className:`chat-join-field`,children:[(0,z.jsxs)(`div`,{className:`chat-join-field-meta`,children:[(0,z.jsx)(`code`,{className:`chat-join-field-name`,children:t.name}),(0,z.jsx)(`span`,{children:t.required?e(`chatJoin.field.required`):e(`chatJoin.field.optional`)})]}),(0,z.jsx)(`p`,{children:e(t.descriptionKey)})]},t.name))})]}),(0,z.jsxs)(`section`,{className:`chat-join-helper`,"aria-labelledby":`ea-test-title`,children:[(0,z.jsxs)(`div`,{className:`chat-join-helper-title`,children:[(0,z.jsx)(p,{size:18}),(0,z.jsx)(`h3`,{id:`ea-test-title`,children:e(`chatJoin.testPublicKey`)})]}),(0,z.jsx)(`code`,{className:`ui-code-box chat-join-public-key`,translate:`no`,children:B}),(0,z.jsx)(`a`,{className:`btn`,href:`/web3/#EA`,target:`_blank`,children:e(`chatJoin.openWeb3`)})]})]})})})}function ee(){return(0,z.jsx)(T.Suspense,{children:(0,z.jsx)($,{})})}var te=r(`/chat/join/`)({component:ee});export{te as Route};
@@ -0,0 +1 @@
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{C as r,D as i,T as a}from"./ui-BpDGD3IR.js";import{a as o}from"./i18n-NjvOSuV6.js";import{n as s,t as c}from"./smartphone-tRRFFO0a.js";import{t as l}from"./download-jEPn2njL.js";import{F as u}from"./index-BI8oNSVC.js";import{t as d}from"./MarketingHeader-ceWdRCpe.js";import{n as f}from"./format-CR8oUWq6.js";var p=r(`apple`,[[`path`,{d:`M12 6.528V3a1 1 0 0 1 1-1h0`,key:`11qiee`}],[`path`,{d:`M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21`,key:`110c12`}]]),m=r(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),h=r(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),g=r(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),_=r(`tablet-smartphone`,[[`rect`,{width:`10`,height:`14`,x:`3`,y:`8`,rx:`2`,key:`1vrsiq`}],[`path`,{d:`M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4`,key:`1j4zmg`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]),v=t(e(),1),y=[`windows`,`macos`,`linux`],b=[`x64`,`arm64`],x=[`installer`];Object.freeze([{platform:`windows`,arch:`x64`},{platform:`windows`,arch:`arm64`},{platform:`macos`,arch:`x64`},{platform:`macos`,arch:`arm64`},{platform:`linux`,arch:`x64`},{platform:`linux`,arch:`arm64`}]);var S=new Set(y),C=new Set(b),w=new Set(x);function T(e){return typeof e==`object`&&!!e}function E(e){return typeof e==`string`&&e.trim().length>0}function D(e){return Number.isFinite(e)&&e>0}function O(e){return e===void 0||E(e)}function k(e){return T(e)?S.has(e.platform)&&C.has(e.arch)&&w.has(e.kind)&&E(e.filename)&&D(e.size)&&E(e.cid)&&E(e.githubUrl)&&O(e.r2Url):!1}function A(e){return!T(e)||!E(e.version)||!E(e.publishedAt)||!Array.isArray(e.assets)?!1:e.assets.every(k)}function j(e){return`${e.platform}:${e.arch}`}function M(e){return A(e)?e.assets.filter(e=>e.kind===`installer`):[]}function N(e){return Array.isArray(e)?e.some(e=>T(e)&&E(e.r2Url)):!1}function P(e,t=`r2`){return t===`r2`&&T(e)&&E(e.r2Url)?{source:`r2`,url:e.r2Url}:{source:`github`,url:T(e)&&E(e.githubUrl)?e.githubUrl:``}}var F=`https://github.com/most-people/most/releases/latest`,I=[{platform:`windows`,arch:`x64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`windows`,arch:`arm64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`macos`,arch:`x64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`macos`,arch:`arm64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`linux`,arch:`x64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`linux`,arch:`arm64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F}];function L(e){return e.VITE_RELEASE_MANIFEST_URL||`${(e.VITE_R2_PUBLIC_BASE_URL||`https://download.most.box`).replace(/\/+$/,``)}/releases/latest.json`}function R({manifest:e,currentKey:t,requestedSource:n}){let r=e?M(e):[],i=r.length?r:I,a=N(i),o=n===`r2`&&a?`r2`:`github`,s=i.find(e=>j(e)===t)||null;return{assets:i,currentAsset:s,otherAssets:s?i.filter(e=>j(e)!==t):i,hasR2Assets:a,activeSource:o,currentDownload:s?P(s,o):null}}function z(e,t){return P(e,t)}var B=n(),V=L({VITE_RELEASE_MANIFEST_URL:void 0,VITE_R2_PUBLIC_BASE_URL:void 0}),H={windows:{name:`Windows`,ext:`.exe`,descKey:`download.platform.windows.desc`,icon:g},macos:{name:`macOS`,ext:`.dmg`,descKey:`download.platform.macos.desc`,icon:p},linux:{name:`Linux`,ext:`.AppImage`,descKey:`download.platform.linux.desc`,icon:h}},U=[{key:`ios`,nameKey:`download.platform.ios.name`,descKey:`download.platform.ios.desc`,icon:c},{key:`android`,nameKey:`download.platform.android.name`,descKey:`download.platform.android.desc`,icon:_}];function W(){return[navigator.userAgentData?.platform,navigator.platform,navigator.userAgent].filter(Boolean).join(` `).toLowerCase()}function G(){if(typeof navigator>`u`)return`windows:x64`;let e=W(),t=/arm|aarch64/.test(e)?`arm64`:`x64`;return/mac|darwin/.test(e)?`macos:${t}`:/linux/.test(e)?`linux:${t}`:`windows:${t}`}function K(){let{t:e}=o(),[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(V?`loading`:`fallback`),[a,c]=(0,v.useState)(`windows:x64`),[d,p]=(0,v.useState)(`r2`);(0,v.useEffect)(()=>{c(G())},[]),(0,v.useEffect)(()=>{if(!V)return;let e=new AbortController;return fetch(V,{cache:`no-store`,signal:e.signal}).then(e=>{if(!e.ok)throw Error(`Manifest request failed: ${e.status}`);return e.json()}).then(e=>{if(!A(e))throw Error(`Invalid download manifest`);n(e),i(`ready`)}).catch(e=>{e instanceof DOMException&&e.name===`AbortError`||(n(null),i(`fallback`))}),()=>e.abort()},[]),(0,v.useEffect)(()=>{r===`fallback`&&p(`github`)},[r]);let{currentAsset:h,otherAssets:g,hasR2Assets:_,activeSource:y}=R({manifest:t,currentKey:a,requestedSource:d}),b=t=>z(t,y).source===`r2`?e(`download.source.r2Mirror`):`GitHub Releases`,x=e=>z(e,y).url,S=t=>{let n=H[t.platform],r=n.icon;return(0,B.jsxs)(`article`,{className:`download-current-card`,children:[(0,B.jsxs)(`div`,{className:`download-current-main`,children:[(0,B.jsx)(`div`,{className:`download-current-icon`,children:(0,B.jsx)(r,{size:34})}),(0,B.jsxs)(`div`,{className:`download-current-copy`,children:[(0,B.jsxs)(`div`,{className:`download-current-labels`,children:[(0,B.jsxs)(`span`,{className:`download-current-kicker`,children:[(0,B.jsx)(u,{size:14}),e(`download.platform.currentSystem`)]}),(0,B.jsx)(`span`,{className:`download-current-recommended`,children:e(`download.platform.recommended`)})]}),(0,B.jsxs)(`div`,{className:`download-current-heading`,children:[(0,B.jsx)(`h3`,{children:n.name}),(0,B.jsx)(`span`,{children:t.arch})]}),(0,B.jsx)(`p`,{children:e(n.descKey)}),(0,B.jsxs)(`dl`,{className:`download-current-meta`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.source`)}),(0,B.jsx)(`dd`,{children:b(t)})]}),t.size?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.size`)}),(0,B.jsx)(`dd`,{children:f(t.size)})]}):null,t.cid?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`CID`}),(0,B.jsx)(`dd`,{children:t.cid.slice(0,12)})]}):null]})]})]}),(0,B.jsxs)(`div`,{className:`download-current-actions`,children:[(0,B.jsx)(`span`,{children:e(`download.platform.matchedSystem`)}),(0,B.jsxs)(`a`,{href:x(t),className:`btn btn-primary`,children:[(0,B.jsx)(l,{size:17}),e(`download.platform.action`,{ext:n.ext})]}),(0,B.jsx)(`p`,{children:b(t)})]})]})},C=t=>{let n=H[t.platform],r=n.icon,i=j(t),o=i===a;return(0,B.jsxs)(`article`,{className:[`download-platform-card`,o?`is-recommended`:``].filter(Boolean).join(` `),children:[(0,B.jsx)(`div`,{className:`download-platform-icon`,children:(0,B.jsx)(r,{size:32})}),(0,B.jsxs)(`div`,{className:`download-platform-content`,children:[(0,B.jsxs)(`div`,{className:`download-platform-heading`,children:[(0,B.jsx)(`h3`,{children:n.name}),(0,B.jsx)(`span`,{children:t.arch})]}),(0,B.jsx)(`p`,{children:e(n.descKey)}),(0,B.jsxs)(`dl`,{className:`download-platform-meta`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.source`)}),(0,B.jsx)(`dd`,{children:b(t)})]}),t.size?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.size`)}),(0,B.jsx)(`dd`,{children:f(t.size)})]}):null,t.cid?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`CID`}),(0,B.jsx)(`dd`,{children:t.cid.slice(0,12)})]}):null]}),(0,B.jsx)(`div`,{className:`download-platform-actions`,children:(0,B.jsxs)(`a`,{href:x(t),className:`btn btn-primary`,children:[(0,B.jsx)(l,{size:16}),e(`download.platform.action`,{ext:n.ext})]})})]}),o?(0,B.jsx)(`span`,{className:`download-recommended-badge`,children:e(`download.platform.current`)}):null]},i)},w=t=>{let n=t.icon;return(0,B.jsxs)(`article`,{className:`download-coming-soon-card`,children:[(0,B.jsx)(`div`,{className:`download-platform-icon download-coming-soon-icon`,children:(0,B.jsx)(n,{size:32})}),(0,B.jsxs)(`div`,{className:`download-platform-content`,children:[(0,B.jsxs)(`div`,{className:`download-platform-heading`,children:[(0,B.jsx)(`h3`,{children:e(t.nameKey)}),(0,B.jsx)(`span`,{children:e(`download.platform.comingSoon`)})]}),(0,B.jsx)(`p`,{children:e(t.descKey)})]})]},t.key)};return(0,B.jsxs)(`div`,{className:`download-options`,children:[(0,B.jsxs)(`div`,{className:`ui-segmented-control download-source-tabs`,role:`tablist`,"aria-label":e(`download.source.label`),children:[(0,B.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`r2`,disabled:!_,className:y===`r2`?`ui-segmented-option download-source-tab is-active`:`ui-segmented-option download-source-tab`,onClick:()=>p(`r2`),children:[(0,B.jsx)(s,{size:15}),`Cloudflare R2`]}),(0,B.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`github`,className:y===`github`?`ui-segmented-option download-source-tab is-active`:`ui-segmented-option download-source-tab`,onClick:()=>p(`github`),children:[(0,B.jsx)(m,{size:15}),`GitHub Releases`]})]}),(0,B.jsx)(`p`,{className:`download-source-note`,children:r===`loading`?e(`download.source.loading`):r===`ready`&&t?e(`download.source.ready`,{version:t.version}):e(`download.source.fallback`)}),h?(0,B.jsx)(`div`,{className:`download-current-platform`,"aria-label":e(`download.platform.currentSystem`),children:S(h)}):null,g.length?(0,B.jsxs)(`div`,{className:`download-other-platforms`,children:[(0,B.jsx)(`p`,{className:`download-other-platforms-title`,children:e(`download.platform.otherPlatforms`)}),(0,B.jsx)(`div`,{className:`download-platform-grid`,children:g.map(e=>C(e))}),(0,B.jsxs)(`div`,{className:`download-coming-soon`,children:[(0,B.jsx)(`p`,{className:`download-coming-soon-title`,children:e(`download.platform.mobilePlatforms`)}),(0,B.jsx)(`div`,{className:`download-coming-soon-grid`,children:U.map(e=>w(e))})]})]}):null]})}var q=[{featureKey:`download.comparison.node`,webKey:`download.comparison.webConnectsNode`,desktopKey:`download.comparison.desktopBuiltinNode`},{featureKey:`download.comparison.fileSharing`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktopFull`},{featureKey:`download.comparison.verification`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktopFull`},{featureKey:`download.comparison.seeding`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktopDefaultOn`},{featureKey:`download.comparison.largeFiles`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktop10gb`}];function J(){let{t:e}=o();return(0,v.useEffect)(()=>{document.title=e(`download.meta.title`)},[e]),(0,B.jsxs)(`div`,{className:`download-page`,children:[(0,B.jsx)(d,{}),(0,B.jsx)(`section`,{className:`download-hero`,children:(0,B.jsxs)(`div`,{className:`mkt-container`,children:[(0,B.jsx)(`div`,{className:`download-hero-icon`,children:(0,B.jsx)(l,{size:40})}),(0,B.jsx)(`h1`,{className:`download-hero-title`,children:e(`download.hero.title`)}),(0,B.jsx)(`p`,{className:`download-hero-desc`,children:e(`download.hero.desc`)})]})}),(0,B.jsx)(`section`,{className:`download-platforms`,children:(0,B.jsxs)(`div`,{className:`mkt-container`,children:[(0,B.jsx)(`h2`,{className:`download-section-title`,children:e(`download.platforms.title`)}),(0,B.jsx)(K,{})]})}),(0,B.jsx)(`section`,{className:`download-comparison`,children:(0,B.jsxs)(`div`,{className:`mkt-container`,children:[(0,B.jsx)(`h2`,{className:`download-section-title`,children:e(`download.comparison.title`)}),(0,B.jsx)(`div`,{className:`download-table-wrap`,children:(0,B.jsxs)(`table`,{className:`download-table`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:e(`download.comparison.feature`)}),(0,B.jsx)(`th`,{children:e(`download.comparison.web`)}),(0,B.jsx)(`th`,{children:e(`download.comparison.desktop`)})]})}),(0,B.jsx)(`tbody`,{children:q.map(t=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{children:e(t.featureKey)}),(0,B.jsx)(`td`,{className:`col-web`,children:e(t.webKey)}),(0,B.jsx)(`td`,{className:`col-desktop`,children:e(t.desktopKey)})]},t.featureKey))})]})})]})}),(0,B.jsx)(`section`,{className:`download-cta`,children:(0,B.jsx)(`div`,{className:`mkt-container`,children:(0,B.jsx)(`p`,{className:`download-hero-desc`,children:e(`download.npmNote`)})})}),(0,B.jsx)(`section`,{className:`download-cta`,children:(0,B.jsx)(`div`,{className:`mkt-container`,children:(0,B.jsx)(i,{to:`/`,className:`btn btn-primary`,children:e(`common.backHome`)})})}),(0,B.jsx)(`footer`,{className:`mkt-footer`,children:(0,B.jsx)(`div`,{className:`mkt-container`,children:(0,B.jsx)(`div`,{className:`mkt-footer-inner`,children:(0,B.jsx)(`p`,{className:`mkt-footer-copy`,children:`MostBox`})})})})]})}var Y=a(`/download/`)({component:J});export{Y as Route};
@@ -0,0 +1 @@
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{C as r,S as i,T as a,a as o,n as s,r as ee,s as c}from"./ui-BpDGD3IR.js";import{a as te}from"./i18n-NjvOSuV6.js";import{i as l,n as u,r as ne}from"./LanguageToggle-CSQtRZ3A.js";import{n as re,t as d}from"./folder-Cfgc70_F.js";import{t as ie}from"./copy-DEzFUzeX.js";import{t as ae}from"./download-jEPn2njL.js";import{t as oe}from"./file-text-DPA1riJ_.js";import{a as f,i as p,n as m,r as se,t as ce}from"./FilePreviewOverlay-BYZIAMJ-.js";import{t as le}from"./loader-BXQtdens.js";import{i as ue,n as de,t as fe}from"./SidebarHomeLink-DXv0c9Ob.js";import{t as h}from"./music-B19Tg557.js";import{t as pe}from"./OpenSidebarButton-CLSCB7CG.js";import{t as me}from"./search-DSkiWdvX.js";import{t as he}from"./trash-2-V12tJ8lI.js";import{t as ge}from"./upload-CoCptKya.js";import{c as g,f as _,g as _e,m as ve}from"./index-BI8oNSVC.js";import{t as ye}from"./format-CR8oUWq6.js";import{t as be}from"./SidebarAccount-CNh0kvtB.js";import{n as v,r as xe,t as Se}from"./downloadValidation-Bzl7cci9.js";var Ce=r(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),we=r(`files`,[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`14sh0y`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`,key:`1970lx`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`,key:`l4dndm`}]]),Te=r(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ee=r(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),y=t(e(),1);function De(e={}){let t=e.timeout??2e3,[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(!1),o=(0,y.useRef)(null);(0,y.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var b=n();function x(e){let t=e.lastIndexOf(`/`);return t===-1?{folder:``,name:e}:{folder:e.substring(0,t),name:e.substring(t+1)}}function Oe({file:e,isSelected:t,onSelect:n,onPreview:r}){let i=m(e.fileName),a=(0,b.jsx)(oe,{size:24,color:`#fff`});return i===`image`?a=(0,b.jsx)(p,{size:24,color:`#fff`}):i===`video`?a=(0,b.jsx)(f,{size:24,color:`#fff`}):i===`audio`&&(a=(0,b.jsx)(h,{size:24,color:`#fff`})),(0,b.jsxs)(`div`,{"data-id":e.cid,onClick:()=>n(e.cid),onDoubleClick:()=>r(e),className:`card ${t?`selected`:``}`,children:[(0,b.jsx)(`div`,{className:`card-icon ${e.starred?`starred`:`file`}`,children:a}),(0,b.jsx)(`p`,{className:`card-name`,translate:`no`,children:x(e.fileName).name})]})}function ke({folder:e,onClick:t}){return(0,b.jsxs)(`div`,{onClick:t,className:`card`,children:[(0,b.jsx)(`div`,{className:`card-icon folder`,children:(0,b.jsx)(d,{size:28,color:`#fff`})}),(0,b.jsx)(`p`,{className:`card-name`,translate:`no`,children:e.name})]})}function S(e,t){return e?[{path:``,name:t},...e.split(`/`).filter(Boolean).map((e,t,n)=>({path:n.slice(0,t+1).join(`/`),name:e}))]:[]}function Ae({items:e,allFolders:t,currentPath:n,onMove:r,onClose:a}){let[s,ee]=(0,y.useState)(``),[c,l]=(0,y.useState)(n),{t:u}=te(),ne=S(s,u(`move.root`));function re(){r(s||c.trim())}let ie=t.filter(e=>{if(s===``)return!e.path.includes(`/`);let t=s+`/`;return e.path.startsWith(t)?!e.path.substring(t.length).includes(`/`):!1});return(0,b.jsx)(o,{onClose:a,children:(0,b.jsxs)(`div`,{className:`move-modal`,onClick:e=>e.stopPropagation(),children:[(0,b.jsxs)(`div`,{className:`modal-header`,children:[(0,b.jsx)(`h3`,{children:u(`move.title`)}),(0,b.jsx)(`button`,{type:`button`,onClick:a,className:`btn btn-icon`,children:(0,b.jsx)(i,{size:18})})]}),(0,b.jsx)(`p`,{className:`move-modal-desc`,children:u(`move.selectedCount`,{count:e.length})}),(0,b.jsx)(`div`,{className:`move-new-folder`,children:(0,b.jsx)(`input`,{type:`text`,className:`input`,value:c,onChange:e=>l(e.target.value),placeholder:u(`move.pathPlaceholder`),translate:`no`})}),(0,b.jsx)(`p`,{className:`move-modal-hint`,children:u(`move.pathExample`)}),(0,b.jsx)(`div`,{className:`move-breadcrumb`,children:ne.map((e,t)=>(0,b.jsxs)(y.Fragment,{children:[t>0&&(0,b.jsx)(`span`,{className:`breadcrumb-separator`,children:`/`}),(0,b.jsx)(`button`,{type:`button`,onClick:()=>{ee(e.path),l(e.path)},className:`move-breadcrumb-btn ${s===e.path&&!c?`active`:``}`,children:(0,b.jsx)(`span`,{translate:e.path?`no`:`yes`,children:e.name})})]},e.path))}),(0,b.jsxs)(`div`,{className:`move-folder-list`,children:[ie.length===0&&(0,b.jsx)(`p`,{className:`move-modal-empty`,children:u(`move.noSubfolders`)}),ie.map(e=>(0,b.jsxs)(`button`,{type:`button`,onClick:()=>ee(e.path),className:`move-folder-item ${s===e.path&&!c?`selected`:``}`,children:[(0,b.jsx)(d,{size:16}),(0,b.jsx)(`span`,{translate:`no`,children:e.name})]},e.path))]}),(0,b.jsxs)(`div`,{className:`modal-actions`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:a,className:`btn btn-secondary`,children:u(`common.cancel`)}),(0,b.jsx)(`button`,{type:`button`,onClick:re,className:`btn btn-primary`,children:u(`move.action`)})]})]})})}var je=`https://most.box`;function Me(e,t){let n=String(t||``).trim(),r=`${je}/cid/${encodeURIComponent(e)}`;return n?`${r}?filename=${encodeURIComponent(n)}`:r}function C(e){return x(e)}function Ne(e){let t=new Set;return e.forEach(e=>{let{folder:n}=C(e.fileName),r=n.split(`/`).filter(Boolean),i=``;for(let e of r)i+=(i?`/`:``)+e,t.add(i)}),[...t].sort()}function w(e,t){let n=t?t+`/`:``;return e.filter(e=>{let t=e.toLowerCase().startsWith(n.toLowerCase()),r=e.substring(n.length);return t&&!r.includes(`/`)}).map(e=>({name:e.substring(n.length),path:e}))}function Pe(e,t,n){return{folders:w(t,n),files:e.filter(e=>C(e.fileName).folder===n)}}function Fe(e,t){return e?[{path:``,name:t},...e.split(`/`).filter(Boolean).map((e,t,n)=>({path:n.slice(0,t+1).join(`/`),name:e}))]:[]}function T(){let e=g(e=>e.isDarkMode),t=g(e=>e.setIsDarkMode),n=g(e=>e.addToast),r=g(e=>e.hasBackend),a=g(e=>e.openConnectModal),d=c(e=>e.identity),f=c(e=>e.openLoginModal),[p,h]=(0,y.useState)([]),[x,S]=(0,y.useState)([]),[je,w]=(0,y.useState)(null),[T,Ie]=(0,y.useState)(`all`),[Le,Re]=(0,y.useState)(!1),[E,D]=(0,y.useState)([]),[ze,O]=(0,y.useState)(null),[k,A]=(0,y.useState)(null),[Be,Ve]=ue(!1),[He,j]=(0,y.useState)(``),[M,N]=(0,y.useState)(null),[P,Ue]=(0,y.useState)(!1),[We,F]=(0,y.useState)([]),[Ge,I]=ue(!1),[L,R]=(0,y.useState)(``),{copy:Ke,copied:qe}=De({timeout:2e3}),[Je,Ye]=ue(!1),[z,B]=(0,y.useState)(null),[V,Xe]=(0,y.useState)(null),[Ze,Qe]=(0,y.useState)(!1),{t:H,formatDate:$e}=te(),U=r===!0,et=e=>e?$e(e):``,W=je||``,tt=Ne(p),{folders:nt,files:rt}=Pe(p,tt,W);function G(){return U?!0:(a(),!1)}function K(){return d?!0:(f(),!1)}let it=L?p.filter(e=>C(e.fileName).name.toLowerCase().includes(L.toLowerCase())):rt,q=async()=>{if(!U||!d){h([]);return}try{h(await v.listPublishedFiles()||[])}catch{h([])}},J=async()=>{if(!U||!d){S([]);return}try{S(await v.listTrashFiles()||[])}catch{S([])}},at=e=>{D(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ot=async e=>{if(K()&&G())try{await v.restoreTrashFile(e),n(H(`app.toast.restored`),`success`),q(),J()}catch(e){n(await _(e,H(`app.toast.restoreFailed`)),`error`)}},st=async()=>{K()&&G()&&B({title:H(`app.clearTrash.title`),message:H(`app.clearTrash.message`),confirmText:H(`app.clear`),danger:!0,onConfirm:async()=>{B(null);try{await v.emptyTrash(),n(H(`app.toast.trashEmptied`),`success`),J()}catch(e){n(await _(e,H(`app.toast.emptyFailed`)),`error`)}}})},ct=async e=>{if(K()&&G())try{let t=await v.toggleStar(e);h(n=>n.map(n=>n.cid===e?{...n,starred:t.starred}:n)),n(t.starred?H(`app.toast.favorited`):H(`app.toast.unfavorited`),`success`)}catch(e){n(await _(e,H(`app.toast.actionFailed`)),`error`)}},lt=async()=>{if(!K()||!G())return;let e=T===`trash`;B({title:H(e?`app.permanentDelete`:`app.batchDelete`),message:H(e?`app.deleteSelectedPermanent`:`app.deleteSelected`,{count:E.length}),confirmText:H(e?`app.permanentDelete`:`app.delete`),danger:!0,onConfirm:async()=>{B(null);try{for(let t of E)e?await v.permanentDeleteTrashFile(t):t.startsWith(`__`)||await v.deletePublishedFile(t);D([]),n(H(e?`app.toast.deletedPermanently`:`app.toast.deleted`),`success`),q(),J()}catch(e){n(await _(e,H(`app.toast.deleteFailed`)),`error`)}}})},ut=async e=>{if(K()&&G())try{for(let t of E){let n=p.find(e=>e.cid===t);if(!n)continue;let{name:r}=C(n.fileName),i=e?`${e}/${r}`:r;n.fileName!==i&&await v.moveFile(t,i)}D([]),Ye.close(),n(H(`app.toast.moved`),`success`),q()}catch(e){n(await _(e,H(`app.toast.moveFailed`)),`error`)}},dt=e=>{let t=!!e.path,r=t?e.name:C(e.fileName).name;Xe({title:H(t?`app.renameFolder`:`app.renameFile`),placeholder:H(`app.enterNewName`),defaultValue:r,confirmText:H(`app.rename`),onConfirm:async i=>{if(i!==r&&K()&&G()){Qe(!0);try{if(t){let t=e.path.lastIndexOf(`/`),r=t===-1?``:e.path.substring(0,t),a=r?`${r}/${i}`:i;await v.renameFolder(e.path,a),n(H(`app.toast.renamed`),`success`),q(),Q(a)}else{let{folder:t}=C(e.fileName),r=t?`${t}/${i}`:i;await v.moveFile(e.cid,r),n(H(`app.toast.renamed`),`success`),q()}Xe(null)}catch(e){n(await _(e,H(`app.toast.renameFailed`)),`error`)}finally{Qe(!1)}}}})},ft=async e=>{if(!d){f(),n(H(`app.toast.signInBeforePublish`),`warning`);return}if(!G())return;let t=W?W+`/`:``,r=[];for(let i of Array.from(e)){let e=t+i.name;if(p.some(t=>t.fileName===e)){n(H(`app.fileAlreadyExists`,{fileName:i.name}),`warning`);continue}let a=`upload_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,o={id:a,fileName:i.name,progress:0,type:`upload`,status:`uploading`};r.push(o),F(e=>[...e,o]),r.length>0&&I.open();try{(await v.publishFile(i,e)).alreadyExists?(F(e=>e.map(e=>e.id===a?{...e,status:`completed`}:e)),n(H(`app.fileAlreadyExists`,{fileName:i.name}),`warning`)):(F(e=>e.map(e=>e.id===a?{...e,progress:100,status:`completed`}:e)),n(H(`app.fileAddedLocal`,{fileName:i.name}),`success`))}catch(e){F(e=>e.map(e=>e.id===a?{...e,status:`error`}:e)),n(await _(e,H(`app.publishFailedWithFile`,{fileName:i.name})),`error`)}}setTimeout(()=>{F(e=>e.filter(e=>e.status!==`completed`&&e.status!==`error`&&e.status!==`cancelled`))},3e3),q()},pt=k?Me(k.cid,k.fileName):``,mt=()=>{pt&&Ke(pt)},[Y,ht]=(0,y.useState)(!1),X=He.trim(),Z=M?.status===`success`&&M.link===X,gt=()=>{Ve.close(),N(null)},_t=e=>{j(e.target.value),N(null)},vt=async()=>{let e=Se(X,H);if(e){N({status:`error`,link:X,message:e}),n(e,`warning`);return}if(!(P||Y)&&K()&&G()){Ue(!0),N(null);try{let e=await v.checkDownload(X);N({status:`success`,link:X,message:e.alreadyExists?H(`app.fileAlreadyLocal`,{fileName:e.fileName}):H(`app.fileAvailable`,{fileName:e.fileName})}),n(e.alreadyExists?H(`app.fileAlreadyExists`,{fileName:e.fileName}):H(`app.toast.checkPassed`),e.alreadyExists?`warning`:`success`)}catch(e){let t=await xe(e);N({status:`error`,link:X,message:t}),n(t,`error`)}finally{Ue(!1)}}},yt=async()=>{if(!d){f(),n(H(`app.toast.signInBeforeDownload`),`warning`);return}if(!G())return;let e=Se(X,H);if(e){n(e,`warning`);return}if(!Z){n(H(`app.toast.checkLinkFirst`),`warning`);return}if(!Y){ht(!0);try{let e=await v.downloadFile(X);if(j(``),N(null),gt(),e.alreadyExists)n(H(`app.fileAlreadyExists`,{fileName:e.fileName}),`warning`);else{let t={id:e.taskId,fileName:H(`app.downloadFallbackName`),progress:0,type:`download`,status:`downloading`};F(e=>[...e,t]),I.open(),n(H(`app.toast.downloadStarted`),`info`)}}catch(e){n(await _(e,H(`app.toast.downloadFailed`)),`error`)}finally{ht(!1)}}},bt=async e=>{if(K()&&G()&&e.type===`download`&&e.status===`downloading`){F(t=>t.map(t=>t.id===e.id?{...t,status:`cancelling`}:t));try{await v.cancelDownload(e.id)}catch(t){F(t=>t.map(t=>t.id===e.id?{...t,status:`downloading`}:t)),n(await _(t,H(`app.toast.cancelFailed`)),`error`)}}},xt=async e=>{if(K()&&G()){if(e.localAvailable===!1){n(H(`app.toast.fileNotLocal`),`warning`);return}try{let t=await fetch(v.getFileDownloadUrl(e.cid),{headers:await ve(`GET`,`/api/files/${e.cid}/download`)});if(!t.ok)throw Error(H(`app.toast.getFileFailed`));let r=await t.blob(),i=window.showSaveFilePicker;if(i){let t=await(await i({suggestedName:e.fileName})).createWritable();await t.write(r),await t.close(),n(H(`app.toast.fileSaved`),`success`)}else{let t=URL.createObjectURL(r),i=document.createElement(`a`);i.href=t,i.download=e.fileName,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(t),n(H(`app.toast.fileDownloaded`),`success`)}}catch(e){e.name!==`AbortError`&&n(H(`app.saveFailedWithError`,{error:e.message}),`error`)}}},St=async e=>{if(K()&&G())try{n(H(`app.toast.startPullLocal`),`info`),await v.cacheFile(e.cid),n(H(`app.toast.pulledAndSeeding`),`success`),q()}catch(e){n(await _(e,H(`app.toast.pullFailed`)),`error`)}},Q=e=>{w(e||null),D([])};(0,y.useEffect)(()=>{if(r!==!0)return;let e=null,t=!1;return(async()=>{if(e=new WebSocket(await _e(`/ws`)),t){e.close();return}e.onmessage=e=>{try{let{event:t,data:r}=JSON.parse(e.data);if(t===`publish:success`||t===`download:success`){q();let e=r.taskId||r.fileName;F(t=>t.map(t=>t.id===e||t.fileName===r.fileName?{...t,progress:100,status:`completed`}:t)),t===`download:success`&&(r.alreadyExists?n(H(`app.fileAlreadyExists`,{fileName:r.fileName}),`warning`):n(H(`app.fileDownloadCompleted`,{fileName:r.fileName}),`success`),setTimeout(()=>{F(t=>t.filter(t=>!(t.id===e&&t.status===`completed`)))},3e3))}t===`publish:progress`&&F(e=>e.map(e=>{if(r.file&&e.fileName===r.file&&e.type===`upload`){let t=50;return r.stage===`calculating-cid`?t=25:r.stage===`uploading`?t=75:r.stage===`complete`&&(t=100),{...e,progress:t}}return e})),t===`download:progress`&&F(e=>e.map(e=>e.id===r.taskId?{...e,progress:r.percent||0,loaded:r.loaded,total:r.total}:e)),t===`download:error`&&(F(e=>e.map(e=>e.id===r.taskId?{...e,status:`error`}:e)),n(H(`app.downloadFailedWithError`,{error:r.error}),`error`)),t===`download:status`&&F(e=>e.map(e=>e.id===r.taskId?{...e,fileName:r.file||e.fileName}:e)),t===`download:cancelled`&&(F(e=>e.map(e=>e.id===r.taskId?{...e,status:`cancelled`}:e)),n(H(`app.toast.downloadCancelled`),`warning`)),t===`user:metadata:updated`&&(q(),J())}catch(e){console.warn(`[App WS] Failed to parse message:`,e.message)}}})(),()=>{t=!0,e?.close()}},[r,d?.address]),(0,y.useEffect)(()=>{if(r===!0&&d){q(),J();return}r===!1&&(h([]),S([]))},[r,d?.address]),(0,y.useEffect)(()=>{d||(D([]),O(null),A(null),j(``),N(null),F([]),R(``),w(null),Ie(`all`))},[d?.address]);let Ct=H(T===`all`?`app.nav.local`:T===`starred`?`app.nav.favorites`:`app.nav.trash`),$=T===`all`?it:T===`starred`?p.filter(e=>e.starred&&C(e.fileName).name.toLowerCase().includes(L.toLowerCase())):x.filter(e=>C(e.fileName).name.toLowerCase().includes(L.toLowerCase())),wt=T===`starred`?[]:nt.filter(e=>e.name.toLowerCase().includes(L.toLowerCase())),Tt=Fe(W,H(`app.allContent`));return(0,b.jsxs)(de,{sidebar:({closeSidebar:e})=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(fe,{onNavigate:e}),(0,b.jsx)(`nav`,{className:`sidebar-nav`,children:[{id:`all`,icon:(0,b.jsx)(we,{size:18}),label:H(`app.nav.local`)},{id:`starred`,icon:(0,b.jsx)(Ee,{size:18}),label:H(`app.nav.favorites`)},{id:`trash`,icon:(0,b.jsx)(he,{size:18}),label:H(`app.nav.trash`)}].map(t=>(0,b.jsxs)(`button`,{onClick:()=>{Ie(t.id),w(null),D([]),R(``),e()},className:`sidebar-nav-btn ${T===t.id?`active`:``}`,children:[t.icon,(0,b.jsx)(`span`,{children:t.label})]},t.id))}),(0,b.jsx)(be,{})]}),headerTitle:(0,b.jsx)(`h2`,{className:`header-title`,children:Ct}),headerRight:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`search-box`,children:[(0,b.jsx)(me,{size:14}),(0,b.jsx)(`input`,{type:`text`,value:L,onChange:e=>R(e.target.value),placeholder:H(`app.search.placeholder`)}),L&&(0,b.jsx)(`button`,{onClick:()=>R(``),children:(0,b.jsx)(i,{size:12})})]}),T===`trash`&&x.length>0&&(0,b.jsx)(`button`,{onClick:st,className:`btn btn-sm btn-empty-trash`,children:H(`app.emptyTrash`)}),(0,b.jsx)(`button`,{onClick:()=>I.open(),className:`btn btn-icon`,children:(0,b.jsx)(Ce,{size:16})}),(0,b.jsx)(`button`,{onClick:()=>t(!e),className:`btn btn-icon`,children:e?(0,b.jsx)(u,{size:16}):(0,b.jsx)(ne,{size:16})})]}),children:[T===`all`&&(0,b.jsxs)(`div`,{className:`action-grid`,children:[(0,b.jsxs)(`div`,{className:`action-card upload ${Le?`drag-over`:``}`,onDragOver:e=>{e.preventDefault(),Re(!0)},onDragLeave:()=>Re(!1),onDrop:e=>{e.preventDefault(),Re(!1),!(!K()||!G())&&ft(e.dataTransfer.files)},children:[(0,b.jsx)(`input`,{type:`file`,multiple:!0,onClick:e=>{(!K()||!G())&&e.preventDefault()},onChange:e=>ft(e.target.files),className:`action-card-input`}),(0,b.jsx)(ge,{size:20,className:`action-grid-icon`}),(0,b.jsx)(`p`,{children:H(`app.publishFile`)})]}),(0,b.jsxs)(`div`,{className:`action-card action-card-download`,onClick:()=>{!K()||!G()||Ve.open()},children:[(0,b.jsx)(ae,{size:20,className:`action-grid-icon`}),(0,b.jsx)(`p`,{children:H(`app.downloadFile`)})]})]}),T===`all`&&(0,b.jsx)(`div`,{className:`breadcrumb`,children:W?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`button`,{onClick:()=>Q(``),children:H(`app.allContent`)}),Tt.slice(1).map((e,t)=>(0,b.jsxs)(y.Fragment,{children:[(0,b.jsx)(re,{size:12}),(0,b.jsx)(`button`,{onClick:()=>Q(e.path),className:t===Tt.length-2?`current`:``,children:(0,b.jsx)(`span`,{translate:`no`,children:e.name})}),t===Tt.length-2&&(0,b.jsx)(`button`,{onClick:()=>dt(e),className:`breadcrumb-edit-btn`,children:(0,b.jsx)(se,{size:12})})]},e.path))]}):null}),(0,b.jsxs)(`div`,{className:`content-grid`,children:[T===`trash`&&($.length===0?(0,b.jsxs)(`div`,{className:`empty-state app-empty-state`,children:[(0,b.jsx)(`p`,{children:H(L?`app.noMatches`:`app.trashEmpty`)}),(0,b.jsx)(pe,{label:H(`app.openFileNavigation`)})]}):(0,b.jsx)(`div`,{className:`file-grid`,children:$.map(e=>(0,b.jsxs)(`div`,{onClick:()=>D(t=>t.includes(e.cid)?t.filter(t=>t!==e.cid):[...t,e.cid]),onDoubleClick:()=>ot(e.cid),className:`card ${E.includes(e.cid)?`selected`:``}`,children:[(0,b.jsx)(`div`,{className:`card-icon trash`,children:(0,b.jsx)(oe,{size:24,color:`#fff`})}),(0,b.jsx)(`p`,{className:`card-name`,translate:`no`,children:C(e.fileName).name}),(0,b.jsx)(`p`,{className:`card-date`,children:H(`app.deletedOn`,{date:et(e.deletedAt)})})]},e.cid))})),T!==`trash`&&($.length===0&&wt.length===0?(0,b.jsxs)(`div`,{className:`empty-state app-empty-state`,children:[(0,b.jsx)(`p`,{children:H(L?`app.noMatches`:T===`starred`?`app.noFavorites`:`app.noLocalFiles`)}),(0,b.jsx)(pe,{label:H(`app.openFileNavigation`)})]}):(0,b.jsxs)(`div`,{className:`file-grid`,children:[wt.map(e=>(0,b.jsx)(ke,{folder:e,onClick:()=>Q(e.path)},e.path)),$.map(e=>(0,b.jsx)(Oe,{file:e,isSelected:E.includes(e.cid),onSelect:at,onPreview:e=>{if(e.localAvailable===!1){n(H(`app.toast.fileNotLocal`),`warning`);return}O({...e,subtype:m(e.fileName)})}},e.cid))]}))]}),z&&(0,b.jsx)(ee,{title:z.title,message:z.message,confirmText:z.confirmText,danger:z.danger,onConfirm:z.onConfirm,onClose:()=>B(null)}),V&&(0,b.jsx)(s,{title:V.title,placeholder:V.placeholder,defaultValue:V.defaultValue,confirmText:V.confirmText,isLoading:Ze,onConfirm:V.onConfirm,onClose:()=>Xe(null)}),Je&&(0,b.jsx)(Ae,{items:E.map(e=>p.find(t=>t.cid===e)).filter(Boolean),allFolders:tt.map(e=>({path:e,name:e.split(`/`).pop()})),currentPath:W,onMove:ut,onClose:()=>Ye.close()}),k&&(0,b.jsx)(o,{onClose:()=>A(null),children:(0,b.jsxs)(`div`,{className:`share-modal`,onClick:e=>e.stopPropagation(),children:[(0,b.jsxs)(`div`,{className:`modal-header`,children:[(0,b.jsx)(`h3`,{children:H(`app.shareLink`)}),(0,b.jsx)(`button`,{onClick:()=>A(null),className:`btn btn-icon`,children:(0,b.jsx)(i,{size:18})})]}),(0,b.jsxs)(`div`,{className:`share-link-box`,children:[(0,b.jsx)(`div`,{className:`share-link-text`,translate:`no`,children:pt}),(0,b.jsx)(`button`,{onClick:mt,className:`btn btn-circle btn-primary ${qe?`copied`:``}`,children:qe?(0,b.jsx)(l,{size:18}):(0,b.jsx)(ie,{size:18})})]}),(0,b.jsx)(`div`,{className:`share-storage-note`,children:(0,b.jsx)(`span`,{children:H(`app.shareSeedNote`)})})]})}),Be&&(0,b.jsx)(o,{onClose:gt,children:(0,b.jsxs)(`div`,{className:`download-modal`,onClick:e=>e.stopPropagation(),children:[(0,b.jsxs)(`div`,{className:`modal-header`,children:[(0,b.jsx)(`h3`,{children:H(`app.downloadFile`)}),(0,b.jsx)(`button`,{onClick:gt,className:`btn btn-icon`,children:(0,b.jsx)(i,{size:18})})]}),(0,b.jsxs)(`div`,{className:`download-link-row`,children:[(0,b.jsx)(`input`,{type:`text`,className:`input`,value:He,onChange:_t,placeholder:H(`app.downloadLink.placeholder`)}),(0,b.jsxs)(`button`,{type:`button`,onClick:vt,disabled:!X||P||Y,className:`btn btn-secondary download-check-btn`,children:[P?(0,b.jsx)(le,{size:14,className:`spin`}):Z?(0,b.jsx)(l,{size:14}):(0,b.jsx)(me,{size:14}),H(P?`app.checking`:Z?`app.passed`:`app.check`)]})]}),M&&(0,b.jsxs)(`div`,{className:`download-check-status ${M.status}`,children:[M.status===`success`?(0,b.jsx)(l,{size:14}):(0,b.jsx)(Te,{size:14}),(0,b.jsx)(`span`,{children:M.message})]}),(0,b.jsxs)(`button`,{onClick:yt,disabled:!Z||Y||P,className:`btn btn-info btn-full`,children:[Y?(0,b.jsx)(le,{size:14,className:`spin`}):(0,b.jsx)(ae,{size:14}),H(Y?`app.downloading`:`app.startDownload`)]})]})}),ze&&(0,b.jsx)(ce,{item:ze,isBackendReady:U,getFileDownloadUrl:v.getFileDownloadUrl,onClose:()=>O(null)}),E.length>0&&(0,b.jsxs)(`div`,{className:`batch-bar`,children:[(0,b.jsx)(`span`,{className:`batch-info`,children:H(`app.selectedItems`,{count:E.length})}),(0,b.jsx)(`button`,{onClick:()=>D([]),className:`batch-dismiss`,children:(0,b.jsx)(i,{size:16})}),(0,b.jsx)(`div`,{className:`batch-divider`}),T===`trash`?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`button`,{onClick:async()=>{K()&&G()&&(await Promise.all(E.map(e=>v.restoreTrashFile(e))),D([]),n(H(`app.toast.restored`),`success`),q(),J())},className:`btn btn-sm`,children:H(`app.restore`)}),(0,b.jsx)(`button`,{onClick:lt,className:`btn btn-sm btn-danger`,children:H(`app.permanentDelete`)})]}):(0,b.jsxs)(b.Fragment,{children:[E.length===1&&(()=>{let e=p.find(e=>e.cid===E[0]);return e&&m(e.fileName)!==`file`})()&&(0,b.jsx)(`button`,{onClick:()=>{let e=p.find(e=>e.cid===E[0]);if(e){if(e.localAvailable===!1){n(H(`app.toast.fileNotLocal`),`warning`);return}let t=m(e.fileName);O({...e,subtype:t})}},className:`btn btn-sm`,children:H(`app.preview`)}),(0,b.jsx)(`button`,{onClick:()=>{let e=E.some(e=>{let t=p.find(t=>t.cid===e);return t&&!t.starred});E.forEach(t=>{let n=p.find(e=>e.cid===t);n&&(e?!n.starred:n.starred)&&ct(t)})},className:`btn btn-sm btn-star`,children:H(`app.favorite`)}),E.length===1&&(0,b.jsx)(`button`,{onClick:()=>{let e=p.find(e=>e.cid===E[0]);e&&dt(e)},className:`btn btn-sm`,children:H(`app.rename`)}),(0,b.jsx)(`button`,{onClick:()=>Ye.open(),className:`btn btn-sm btn-move`,children:H(`app.move`)}),(0,b.jsx)(`button`,{onClick:lt,className:`btn btn-sm btn-danger`,children:H(`app.delete`)}),E.length===1&&(()=>{let e=p.find(e=>e.cid===E[0]);return e&&e.localAvailable===!1})()&&(0,b.jsx)(`button`,{onClick:()=>{let e=p.find(e=>e.cid===E[0]);e&&St(e)},className:`btn btn-sm`,children:H(`app.pullToLocal`)}),E.length===1&&(0,b.jsx)(`button`,{onClick:()=>A(p.find(e=>e.cid===E[0])),className:`btn btn-sm`,children:H(`app.share`)}),E.length===1&&(0,b.jsx)(`button`,{onClick:()=>{let e=p.find(e=>e.cid===E[0]);e&&xt(e)},className:`btn btn-sm`,children:H(`app.saveAs`)})]})]}),Ge&&(0,b.jsx)(o,{onClose:()=>I.close(),children:(0,b.jsxs)(`div`,{className:`transfer-modal`,onClick:e=>e.stopPropagation(),children:[(0,b.jsxs)(`div`,{className:`modal-header`,children:[(0,b.jsx)(`h3`,{children:H(`app.transfers`)}),(0,b.jsx)(`button`,{onClick:()=>I.close(),className:`btn btn-icon`,children:(0,b.jsx)(i,{size:18})})]}),We.length===0?(0,b.jsx)(`div`,{className:`empty-transfer`,children:H(`app.noTransfers`)}):We.map(e=>(0,b.jsxs)(`div`,{className:`transfer-item`,children:[(0,b.jsxs)(`div`,{className:`transfer-item-header`,children:[e.type===`upload`?(0,b.jsx)(ge,{size:14}):(0,b.jsx)(ae,{size:14}),(0,b.jsx)(`span`,{className:`transfer-item-name`,translate:`no`,children:e.fileName}),e.status===`downloading`&&e.type===`download`&&(0,b.jsx)(`button`,{onClick:()=>bt(e),className:`transfer-item-cancel`,children:(0,b.jsx)(i,{size:14})})]}),(0,b.jsxs)(`div`,{className:`transfer-progress-row`,children:[(0,b.jsx)(`progress`,{className:`transfer-progress-meter ${e.type===`download`?`download`:``} ${e.status===`error`?`error`:``} ${e.status===`cancelled`?`cancelled`:``}`,value:Math.max(0,Math.min(100,e.progress)),max:100,"aria-label":H(`app.transferProgress`,{fileName:e.fileName})}),(0,b.jsx)(`span`,{className:`transfer-progress-text`,children:e.status===`completed`?H(`app.completed`):e.status===`error`?H(`app.failed`):e.status===`cancelled`?H(`app.cancelled`):e.status===`cancelling`?H(`app.cancelling`):e.loaded&&e.total?`${ye(e.loaded)}/${ye(e.total)}`:`${e.progress}%`})]})]},e.id))]})})]})}var Ie=a(`/app/`)({component:T});export{Ie as Route};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),n=e(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);export{t as n,n as t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),n=e(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);export{t as n,n as t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);export{t};
@@ -1 +1 @@
1
- import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{w as r,x as i,y as a}from"./ui-u9yJHkb-.js";import{a as o}from"./i18n-Cqyi6NZb.js";import{o as s}from"./LanguageToggle-Cfh33R2h.js";import{t as c}from"./copy-KIwotKoP.js";import{t as l}from"./dayjs.min-Dcc0B6Je.js";var u=r(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),d=r(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),f=t(e(),1),p=n();function m({text:e,label:t,copiedLabel:n,className:r=`btn btn-icon`,iconSize:i=14}){let{t:a}=o(),[l,u]=(0,f.useState)(!1),d=n||a(`common.copied`),m=t||a(`common.copy`);async function h(){try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500)}catch{}}return(0,p.jsxs)(`button`,{type:`button`,className:r,onClick:h,title:l?d:m,children:[l?(0,p.jsx)(s,{size:i}):(0,p.jsx)(c,{size:i}),t?l?d:t:null]})}var h=t(a(),1);l();var g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=e=>{let t=[];for(;e>=128;)t.push(e&127|128),e>>=7;return t.push(e),t},v=e=>{let t=new Uint8Array([8,1,18,..._(e.length)]),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n},y=(e,t)=>{if(e.length===0)return``;let n=t.length,r=0;for(;r<e.length&&e[r]===0;)r++;let i=[0];for(let t=r;t<e.length;t++){let r=e[t];for(let e=0;e<i.length;e++){let t=i[e]*256+r;i[e]=t%n,r=Math.floor(t/n)}for(;r>0;)i.push(r%n),r=Math.floor(r/n)}let a=``;for(let e=0;e<r;e++)a+=t[0];for(let e=i.length-1;e>=0;e--)a+=t[i[e]];return a},b=(e,t)=>{let n=t.slice(2),r=new Uint8Array(i(e+n));return h.default.sign.keyPair.fromSecretKey(r)},x=(e,t)=>{let n=v(b(e,t).publicKey),r=new Uint8Array(2+n.length);r[0]=0,r[1]=36,r.set(n,2);let i=new Uint8Array([1,114]),a=new Uint8Array(i.length+r.length);return a.set(i,0),a.set(r,i.length),`k`+y(a,g)};export{u as a,d as i,x as n,m as r,b as t};
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{C as r,b as i,v as a}from"./ui-BpDGD3IR.js";import{a as o}from"./i18n-NjvOSuV6.js";import{i as s}from"./LanguageToggle-CSQtRZ3A.js";import{t as c}from"./copy-DEzFUzeX.js";import{t as l}from"./dayjs.min-Dcc0B6Je.js";var u=r(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),d=r(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),f=t(e(),1),p=n();function m({text:e,label:t,copiedLabel:n,className:r=`btn btn-icon`,iconSize:i=14}){let{t:a}=o(),[l,u]=(0,f.useState)(!1),d=n||a(`common.copied`),m=t||a(`common.copy`);async function h(){try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500)}catch{}}return(0,p.jsxs)(`button`,{type:`button`,className:r,onClick:h,title:l?d:m,children:[l?(0,p.jsx)(s,{size:i}):(0,p.jsx)(c,{size:i}),t?l?d:t:null]})}var h=t(a(),1);l();var g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=e=>{let t=[];for(;e>=128;)t.push(e&127|128),e>>=7;return t.push(e),t},v=e=>{let t=new Uint8Array([8,1,18,..._(e.length)]),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n},y=(e,t)=>{if(e.length===0)return``;let n=t.length,r=0;for(;r<e.length&&e[r]===0;)r++;let i=[0];for(let t=r;t<e.length;t++){let r=e[t];for(let e=0;e<i.length;e++){let t=i[e]*256+r;i[e]=t%n,r=Math.floor(t/n)}for(;r>0;)i.push(r%n),r=Math.floor(r/n)}let a=``;for(let e=0;e<r;e++)a+=t[0];for(let e=i.length-1;e>=0;e--)a+=t[i[e]];return a},b=(e,t)=>{let n=t.slice(2),r=new Uint8Array(i(e+n));return h.default.sign.keyPair.fromSecretKey(r)},x=(e,t)=>{let n=v(b(e,t).publicKey),r=new Uint8Array(2+n.length);r[0]=0,r[1]=36,r.set(n,2);let i=new Uint8Array([1,114]),a=new Uint8Array(i.length+r.length);return a.set(i,0),a.set(r,i.length),`k`+y(a,g)};export{u as a,d as i,x as n,m as r,b as t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`notebook-pen`,[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`notebook-pen`,[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),n=e(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]);export{t as n,n as t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),n=e(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]);export{t as n,n as t};
@@ -1 +1 @@
1
- import{w as e}from"./ui-u9yJHkb-.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{C as e}from"./ui-BpDGD3IR.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),n=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t as n,n as t};