@unciatech/file-manager 0.0.9 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,27 +1,27 @@
1
- var $n=Object.defineProperty,Wn=Object.defineProperties;var Kn=Object.getOwnPropertyDescriptors;var sa=Object.getOwnPropertySymbols;var Ao=Object.prototype.hasOwnProperty,_o=Object.prototype.propertyIsEnumerable;var Eo=(e,t,a)=>t in e?$n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,r=(e,t)=>{for(var a in t||(t={}))Ao.call(t,a)&&Eo(e,a,t[a]);if(sa)for(var a of sa(t))_o.call(t,a)&&Eo(e,a,t[a]);return e},d=(e,t)=>Wn(e,Kn(t));var g=(e,t)=>{var a={};for(var o in e)Ao.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&sa)for(var o of sa(e))t.indexOf(o)<0&&_o.call(e,o)&&(a[o]=e[o]);return a};import{useCallback as Ee}from"react";var J={PAGE:"page",MODAL:"modal"},ds=Object.values(J),K={IMAGE:"images",VIDEO:"videos",AUDIO:"audios",FILE:"files"},cs=Object.values(K),Re={SINGLE:"single",MULTIPLE:"multiple"},ps=Object.values(Re),Yn={GRID:"grid",LIST:"list"},ms=Object.values(Yn),Ya={LOCAL:"local",REMOTE:"remote",YOUTUBE:"youtube",VIMEO:"vimeo"},us=Object.values(Ya);import{useRouter as qn}from"next/navigation";import{toast as Ae}from"sonner";var qa=(e,t)=>{let a=[...e];return t.forEach(o=>{a.some(i=>i.id===o.id)?a=a.filter(i=>i.id!==o.id):a.push(o)}),a},Lo=(e,t)=>{let a=[...e];return t.forEach(o=>{a.some(i=>i.id===o.id)?a=a.filter(i=>i.id!==o.id):a.push(o)}),a};function Vo(e){let{mode:t,selectionMode:a,files:o,folders:n,selectedFiles:i,selectedFolders:l,currentFolder:c,setSelectedFiles:s,setSelectedFolders:f,setCurrentFolder:m,setFiles:b,setFolders:p,setPagination:y,loadData:w,isInSelectionMode:D,provider:F,onFilesSelected:M,onClose:I,basePath:P,setIsLoading:h,setFileDetailsModalFile:N}=e,H=qn(),q=Ee((k,z,O=!1)=>{let G=[k];if(O||z&&(z.metaKey||z.ctrlKey)){s($=>qa($,G));return}if(D()&&t!==J.MODAL){s($=>qa($,G));return}if(t===J.MODAL){a==="single"?(s([k]),M==null||M([k]),I==null||I()):s($=>qa($,G));return}N(k)},[t,a,D,s,M,I,N]),oe=Ee((k,z,O=!1)=>{let G=k?k.id:null;if((O||z&&(z.metaKey||z.ctrlKey))&&k){f($=>Lo($,[k]));return}if(D()&&k){f($=>Lo($,[k]));return}if(t===J.PAGE){h(!0);let $=P!=null?P:"/media",De=G===null?$:`${$}/${G}`;H.push(De)}else{h(!0),s([]),f([]);let $=new URLSearchParams(window.location.search);G===null?$.delete("folderId"):$.set("folderId",String(G)),$.set("page","1");let De=`${window.location.pathname}?${$.toString()}`;H.push(De,{scroll:!1})}},[D,t,H,f,s,P,h]),we=Ee(()=>{s([]),f([])},[s,f]),u=Ee(k=>{k?(s(o),f(t===J.PAGE?n:[])):(s([]),f([]))},[o,n,t,s,f]),S=Ee(async(k=!1)=>{await w(k)},[w]),v=Ee(async k=>{var z;try{await F.uploadFiles(k,(z=c==null?void 0:c.id)!=null?z:null),await S(!0),s([]),Ae.success("Upload Successful",{description:`${k.length} file(s) uploaded successfully`})}catch(O){let G=O instanceof Error?O.message:"Failed to upload files";Ae.error("Upload Failed",{description:G}),console.error("Upload failed:",O)}},[c,F,S,s]),T=Ee(async k=>{var z;try{await F.createFolder(k,(z=c==null?void 0:c.id)!=null?z:null),await S(!0),s([]),Ae.success("Folder Created",{description:`Folder "${k}" created successfully`})}catch(O){let G=O instanceof Error?O.message:"Failed to create folder";Ae.error("Create Folder Failed",{description:G}),console.error("Failed to create folder:",O)}},[c,F,S,s]),R=Ee(async k=>{try{i.length>0&&await F.moveFiles(i.map(O=>O.id),k),l.length>0&&await F.moveFolders(l.map(O=>O.id),k),await S(!0),s([]),f([]);let z=i.length+l.length;Ae.success("Move Successful",{description:`${z} item(s) moved successfully`})}catch(z){let O=z instanceof Error?z.message:"Failed to move items";Ae.error("Move Failed",{description:O}),console.error("Failed to move items:",z)}},[i,l,F,S,s,f]),V=Ee(async(k,z)=>{try{p(O=>O.map(G=>G.id===k?d(r({},G),{name:z}):G)),await F.renameFolder(k,z),await S(!0),Ae.success("Folder Renamed",{description:`Folder renamed to "${z}"`})}catch(O){let G=O instanceof Error?O.message:"Failed to rename folder";Ae.error("Rename Failed",{description:G}),console.error("Failed to rename folder:",O)}},[F,S]),fe=Ee(async(k,z)=>{try{b(O=>O.map(G=>{if(G.id===k){let Ke=z,{metaData:$}=Ke,De=g(Ke,["metaData"]);return d(r(r({},G),De),{metaData:$?r(r({},G.metaData),$):G.metaData})}return G})),await F.updateFileMetaData(k,z),await S(!0)}catch(O){let G=O instanceof Error?O.message:"Failed to update metadata";Ae.error("Update Failed",{description:G}),console.error("Failed to update metadata:",O)}},[F,S]),It=Ee(async()=>{try{i.length>0&&await F.deleteFiles(i.map(z=>z.id)),l.length>0&&await F.deleteFolders(l.map(z=>z.id)),await S(!0),s([]),f([]);let k=i.length+l.length;Ae.success("Delete Successful",{description:`${k} item(s) deleted successfully`})}catch(k){let z=k instanceof Error?k.message:"Failed to delete items";Ae.error("Delete Failed",{description:z}),console.error("Failed to delete items:",k)}},[i,l,F,S,s,f]);return{handleFileClick:q,handleFolderClick:oe,handleClearSelection:we,handleSelectAllGlobal:u,uploadFiles:v,createFolder:T,bulkMove:R,renameFolder:V,updateFileMetadata:fe,bulkDelete:It,refreshData:S}}import{useParams as Qn,useSearchParams as Jn,useRouter as Xn,usePathname as ei}from"next/navigation";import{useCallback as da,useEffect as Zt,useMemo as Oo,useRef as Go,useState as de}from"react";import{toast as Qa}from"sonner";function Bo(e){let{mode:t,selectionMode:a,initialFolderId:o,acceptedFileTypesForModal:n,allowedFileTypes:i,provider:l,onFilesSelected:c,onClose:s,basePath:f}=e,m=Qn(),b=Jn(),p=Xn(),y=ei(),w=Math.max(1,parseInt(b.get("page")||"1",10)),D=Math.max(1,parseInt(b.get("limit")||"24",10)),F=b.get("query")||"",M=Oo(()=>{if(t===J.PAGE&&(m!=null&&m.path)){let _=Array.isArray(m.path)?m.path[0]:m.path;return typeof _=="string"&&/^\d+$/.test(_)?Number(_):null}if(t===J.MODAL){let _=b.get("folderId");if(_&&/^\d+$/.test(_))return Number(_)}return o!=null?o:null},[t,m,b,o]),[I,P]=de([]),[h,N]=de([]),[H,q]=de([]),[oe,we]=de([]),[u,S]=de(null),[v,T]=de(!0),[R,V]=de({currentPage:w,totalPages:1,totalFiles:0,filesPerPage:D}),fe=Go(null);fe.current=u;let[It,k]=de(F),[z,O]=de(F);Zt(()=>{let _=setTimeout(()=>{O(It)},300);return()=>clearTimeout(_)},[It]);let G=Go(M),Ke=da((_,ie)=>{let le=new URLSearchParams(b.toString());le.set("page",_.toString()),le.set("limit",ie.toString()),p.push(`${y}?${le.toString()}`,{scroll:!1})},[p,y]);Zt(()=>{V(_=>d(r({},_),{currentPage:w,filesPerPage:D})),k(F)},[w,D,F]),Zt(()=>{M!==G.current&&(t===J.PAGE&&Ke(1,D),G.current=M)},[M,D,Ke,t]);let $=R.currentPage,De=R.filesPerPage;Zt(()=>{let _=!1,ie=async()=>{if(M&&(!fe.current||fe.current.id!==M))try{T(!0);let se=await l.getFolder(M);if(_)return;S(se),await le(se)}catch(se){let la=se instanceof Error?se.message:"Failed to load folder";if(Qa.error("Load Folder Failed",{description:la}),console.error("Failed to fetch current folder",se),_)return;S(null),_||T(!1)}else M===null&&fe.current!==null?(S(null),await le(null)):fe.current?await le(fe.current):await le(null)},le=async se=>{var la;if(!_){T(!0);try{let bt=[];t===J.MODAL?bt=n:bt=i;let Ut=await l.getItems((la=se==null?void 0:se.id)!=null?la:null,bt,$,De,z);if(_)return;N(Ut.folders),P(Ut.files),V(Ut.pagination)}catch(bt){let Ut=bt instanceof Error?bt.message:"Failed to load data";Qa.error("Load Data Failed",{description:Ut}),console.error("Failed to load data:",bt)}finally{_||T(!1)}}};return ie(),()=>{_=!0}},[M,l,t,n,i,$,De,z]),Zt(()=>{we([]),q([])},[u]);let[Nn,In]=de(!1),[Pn,kn]=de(!1),[Sn,zn]=de(!1),[Tn,Rn]=de(!1),[En,An]=de(!1),[_n,Ln]=de(null),[Vn,On]=de(null),Gn=da(async(_=!1)=>{var ie;_||T(!0);try{let le=[];t===J.MODAL?le=n:le=i;let se=await l.getItems((ie=u==null?void 0:u.id)!=null?ie:null,le,$,De,z);N(se.folders),P(se.files),V(se.pagination)}catch(le){let se=le instanceof Error?le.message:"Failed to load data";Qa.error("Load Data Failed",{description:se}),console.error("Failed to load data:",le)}finally{_||T(!1)}},[u,t,n,i,l,$,De,z]),Bn=()=>H.length>0||oe.length>0,Hn=()=>u,Un=Oo(()=>()=>{let _=I.length+(t===J.PAGE?h.length:0),ie=H.length+oe.length;return ie===0?!1:ie===_?!0:"indeterminate"},[I.length,h.length,H.length,oe.length,t]),Zn=da(_=>{V(ie=>d(r({},ie),{currentPage:_})),t===J.PAGE&&Ke(_,De)},[Ke,De,t]),jn=da(_=>{k(_);let ie=new URLSearchParams(b.toString());_.trim()?(ie.set("query",_),ie.set("page","1")):ie.delete("query"),p.push(`${y}?${ie.toString()}`,{scroll:!1})},[p,y,b]);return{files:I,folders:h,selectedFiles:H,selectedFolders:oe,currentFolder:u,isLoading:v,pagination:R,isUploadModalOpen:Nn,isCreateFolderModalOpen:Pn,isSearchModalOpen:Sn,isMoveFileModalOpen:Tn,isRenameFolderModalOpen:En,fileDetailsModalFile:Vn,folderToRename:_n,setFiles:P,setFolders:N,setSelectedFiles:q,setSelectedFolders:we,setCurrentFolder:S,setPagination:V,setIsUploadModalOpen:In,setIsCreateFolderModalOpen:kn,setIsSearchModalOpen:zn,setIsMoveFileModalOpen:Rn,setIsRenameFolderModalOpen:An,setFileDetailsModalFile:On,setFolderToRename:Ln,loadData:Gn,setIsLoading:T,isInSelectionMode:Bn,getCurrentFolder:Hn,getSelectionState:Un,handlePageChange:Zn,searchQuery:It,updateSearchQuery:jn,mode:t,selectionMode:a,acceptedFileTypesForModal:n,provider:l,onFilesSelected:c,onClose:s,basePath:f}}import{createContext as ti,useContext as ai,useMemo as oi}from"react";import{jsx as ri}from"react/jsx-runtime";var Ho=ti(void 0);function ca({children:e,mode:t=J.PAGE,selectionMode:a=Re.SINGLE,allowedFileTypes:o,onFilesSelected:n,onClose:i,acceptedFileTypesForModal:l,initialFolderId:c=null,provider:s,basePath:f="/media",maxUploadFiles:m=50,maxUploadSize:b=100*1024*1024}){let p=Bo({mode:t,selectionMode:a,initialFolderId:c,acceptedFileTypesForModal:l,allowedFileTypes:o,provider:s,onFilesSelected:n,onClose:i,basePath:f}),y=Vo(p),w=oi(()=>({files:p.files,folders:p.folders,selectedFiles:p.selectedFiles,selectedFolders:p.selectedFolders,currentFolder:p.currentFolder,isLoading:p.isLoading,pagination:p.pagination,isUploadModalOpen:p.isUploadModalOpen,isCreateFolderModalOpen:p.isCreateFolderModalOpen,isSearchModalOpen:p.isSearchModalOpen,isMoveFileModalOpen:p.isMoveFileModalOpen,isRenameFolderModalOpen:p.isRenameFolderModalOpen,fileDetailsModalFile:p.fileDetailsModalFile,folderToRename:p.folderToRename,mode:p.mode,selectionMode:p.selectionMode,allowedFileTypes:o,acceptedFileTypesForModal:p.acceptedFileTypesForModal,maxUploadFiles:m,maxUploadSize:b,setIsUploadModalOpen:p.setIsUploadModalOpen,setIsCreateFolderModalOpen:p.setIsCreateFolderModalOpen,setIsSearchModalOpen:p.setIsSearchModalOpen,setIsMoveFileModalOpen:p.setIsMoveFileModalOpen,setSelectedFiles:p.setSelectedFiles,setSelectedFolders:p.setSelectedFolders,setIsRenameFolderModalOpen:p.setIsRenameFolderModalOpen,setFileDetailsModalFile:p.setFileDetailsModalFile,setFolderToRename:p.setFolderToRename,handleFileClick:y.handleFileClick,handleFolderClick:y.handleFolderClick,handleClearSelection:y.handleClearSelection,handleSelectAllGlobal:y.handleSelectAllGlobal,handlePageChange:p.handlePageChange,searchQuery:p.searchQuery,updateSearchQuery:p.updateSearchQuery,uploadFiles:y.uploadFiles,createFolder:y.createFolder,bulkMove:y.bulkMove,renameFolder:y.renameFolder,updateFileMetadata:y.updateFileMetadata,bulkDelete:y.bulkDelete,refreshData:y.refreshData,isInSelectionMode:p.isInSelectionMode,getCurrentFolder:p.getCurrentFolder,getSelectionState:p.getSelectionState,onClose:p.onClose,onFilesSelected:p.onFilesSelected,provider:s,basePath:p.basePath}),[p,y,s,o,m,b]);return ri(Ho.Provider,{value:w,children:e})}function E(){let e=ai(Ho);if(e===void 0)throw new Error("useFileManager must be used within a FileManagerProvider");return e}import{clsx as ni}from"clsx";import{twMerge as ii}from"tailwind-merge";function x(...e){return ii(ni(e))}import{MoreHorizontal as li}from"lucide-react";import{jsx as jt,jsxs as si}from"react/jsx-runtime";var Uo=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return jt("nav",r({"data-slot":"pagination",role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e)},t))};function Zo(a){var o=a,{className:e}=o,t=g(o,["className"]);return jt("ul",r({"data-slot":"pagination-content",className:x("flex flex-row items-center gap-1",e)},t))}function $t(a){var o=a,{className:e}=o,t=g(o,["className"]);return jt("li",r({"data-slot":"pagination-item",className:x("",e)},t))}var jo=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return si("span",d(r({"data-slot":"pagination-ellipsis","aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e)},t),{children:[jt(li,{className:"h-4 w-4"}),jt("span",{className:"sr-only",children:"More pages"})]}))};import{cva as di}from"class-variance-authority";import{ChevronDown as sd}from"lucide-react";import{Slot as ci}from"radix-ui";import{jsx as mi}from"react/jsx-runtime";var pi=di("cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",mono:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",outline:"bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",dashed:"text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",ghost:"text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",dim:"text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",foreground:"",inverse:""},appearance:{default:"",ghost:""},underline:{solid:"",dashed:""},underlined:{solid:"",dashed:""},size:{lg:"h-10 px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",md:"h-9 px-3 gap-1.5 text-sm [&_svg:not([class*=size-])]:size-4",sm:"h-8 px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",xs:"h-7 px-2 gap-1 text-xs [&_svg:not([class*=size-])]:size-3.5",icon:"size-9 [&_svg:not([class*=size-])]:size-4 shrink-0"},autoHeight:{true:"",false:""},radius:{md:"rounded-md",full:"rounded-full"},mode:{default:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",icon:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",link:"text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",input:`
1
+ var oi=Object.defineProperty,ai=Object.defineProperties;var ri=Object.getOwnPropertyDescriptors;var ho=Object.getOwnPropertySymbols;var Wa=Object.prototype.hasOwnProperty,$a=Object.prototype.propertyIsEnumerable;var ja=(e,t,o)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,r=(e,t)=>{for(var o in t||(t={}))Wa.call(t,o)&&ja(e,o,t[o]);if(ho)for(var o of ho(t))$a.call(t,o)&&ja(e,o,t[o]);return e},s=(e,t)=>ai(e,ri(t));var g=(e,t)=>{var o={};for(var a in e)Wa.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&ho)for(var a of ho(e))t.indexOf(a)<0&&$a.call(e,a)&&(o[a]=e[a]);return o};import{useCallback as Le}from"react";var J={PAGE:"page",MODAL:"modal"},ls=Object.values(J),K={IMAGE:"images",VIDEO:"videos",AUDIO:"audios",FILE:"files"},ss=Object.values(K),Ee={SINGLE:"single",MULTIPLE:"multiple"},ds=Object.values(Ee),ni={GRID:"grid",LIST:"list"},cs=Object.values(ni),la={LOCAL:"local",REMOTE:"remote",YOUTUBE:"youtube",VIMEO:"vimeo"},ps=Object.values(la);import{useRouter as ii}from"next/navigation";import{toast as Ae}from"sonner";var sa=(e,t)=>{let o=[...e];return t.forEach(a=>{o.some(i=>i.id===a.id)?o=o.filter(i=>i.id!==a.id):o.push(a)}),o},Ka=(e,t)=>{let o=[...e];return t.forEach(a=>{o.some(i=>i.id===a.id)?o=o.filter(i=>i.id!==a.id):o.push(a)}),o};function Ya(e){let{mode:t,selectionMode:o,files:a,folders:n,selectedFiles:i,selectedFolders:l,currentFolder:c,setSelectedFiles:d,setSelectedFolders:f,setCurrentFolder:m,setFiles:b,setFolders:p,setPagination:y,loadData:w,isInSelectionMode:D,provider:F,onFilesSelected:M,onClose:N,basePath:k,setIsLoading:h,setFileDetailsModalFile:I}=e,H=ii(),q=Le((P,z,G=!1)=>{let O=[P];if(G||z&&(z.metaKey||z.ctrlKey)){d(W=>sa(W,O));return}if(D()&&t!==J.MODAL){d(W=>sa(W,O));return}if(t===J.MODAL){o==="single"?(d([P]),M==null||M([P]),N==null||N()):d(W=>sa(W,O));return}I(P)},[t,o,D,d,M,N,I]),re=Le((P,z,G=!1)=>{let O=P?P.id:null;if((G||z&&(z.metaKey||z.ctrlKey))&&P){f(W=>Ka(W,[P]));return}if(D()&&P){f(W=>Ka(W,[P]));return}if(t===J.PAGE){h(!0);let W=k!=null?k:"/media",Ne=O===null?W:`${W}/${O}`;H.push(Ne)}else{h(!0),d([]),f([]);let W=new URLSearchParams(window.location.search);O===null?W.delete("folderId"):W.set("folderId",String(O)),W.set("page","1");let Ne=`${window.location.pathname}?${W.toString()}`;H.push(Ne,{scroll:!1})}},[D,t,H,f,d,k,h]),ye=Le(()=>{d([]),f([])},[d,f]),u=Le(P=>{P?(d(a),f(t===J.PAGE?n:[])):(d([]),f([]))},[a,n,t,d,f]),S=Le(async(P=!1)=>{await w(P)},[w]),v=Le(async P=>{var z;try{await F.uploadFiles(P,(z=c==null?void 0:c.id)!=null?z:null),await S(!0),d([]),Ae.success("Upload Successful",{description:`${P.length} file(s) uploaded successfully`})}catch(G){let O=G instanceof Error?G.message:"Failed to upload files";Ae.error("Upload Failed",{description:O}),console.error("Upload failed:",G)}},[c,F,S,d]),R=Le(async P=>{var z;try{await F.createFolder(P,(z=c==null?void 0:c.id)!=null?z:null),await S(!0),d([]),Ae.success("Folder Created",{description:`Folder "${P}" created successfully`})}catch(G){let O=G instanceof Error?G.message:"Failed to create folder";Ae.error("Create Folder Failed",{description:O}),console.error("Failed to create folder:",G)}},[c,F,S,d]),T=Le(async P=>{try{i.length>0&&await F.moveFiles(i.map(G=>G.id),P),l.length>0&&await F.moveFolders(l.map(G=>G.id),P),await S(!0),d([]),f([]);let z=i.length+l.length;Ae.success("Move Successful",{description:`${z} item(s) moved successfully`})}catch(z){let G=z instanceof Error?z.message:"Failed to move items";Ae.error("Move Failed",{description:G}),console.error("Failed to move items:",z)}},[i,l,F,S,d,f]),V=Le(async(P,z)=>{try{p(G=>G.map(O=>O.id===P?s(r({},O),{name:z}):O)),await F.renameFolder(P,z),await S(!0),Ae.success("Folder Renamed",{description:`Folder renamed to "${z}"`})}catch(G){let O=G instanceof Error?G.message:"Failed to rename folder";Ae.error("Rename Failed",{description:O}),console.error("Failed to rename folder:",G)}},[F,S]),ge=Le(async(P,z)=>{try{b(G=>G.map(O=>{if(O.id===P){let Ye=z,{metaData:W}=Ye,Ne=g(Ye,["metaData"]);return s(r(r({},O),Ne),{metaData:W?r(r({},O.metaData),W):O.metaData})}return O})),await F.updateFileMetaData(P,z),await S(!0)}catch(G){let O=G instanceof Error?G.message:"Failed to update metadata";Ae.error("Update Failed",{description:O}),console.error("Failed to update metadata:",G)}},[F,S]),Tt=Le(async()=>{try{i.length>0&&await F.deleteFiles(i.map(z=>z.id)),l.length>0&&await F.deleteFolders(l.map(z=>z.id)),await S(!0),d([]),f([]);let P=i.length+l.length;Ae.success("Delete Successful",{description:`${P} item(s) deleted successfully`})}catch(P){let z=P instanceof Error?P.message:"Failed to delete items";Ae.error("Delete Failed",{description:z}),console.error("Failed to delete items:",P)}},[i,l,F,S,d,f]);return{handleFileClick:q,handleFolderClick:re,handleClearSelection:ye,handleSelectAllGlobal:u,uploadFiles:v,createFolder:R,bulkMove:T,renameFolder:V,updateFileMetadata:ge,bulkDelete:Tt,refreshData:S}}import{useParams as li,useSearchParams as si,useRouter as di,usePathname as ci}from"next/navigation";import{useCallback as vo,useEffect as Xt,useMemo as qa,useRef as Qa,useState as ce}from"react";import{toast as da}from"sonner";function Ja(e){let{mode:t,selectionMode:o,initialFolderId:a,acceptedFileTypesForModal:n,allowedFileTypes:i,provider:l,onFilesSelected:c,onClose:d,basePath:f}=e,m=li(),b=si(),p=di(),y=ci(),w=Math.max(1,parseInt(b.get("page")||"1",10)),D=Math.max(1,parseInt(b.get("limit")||"24",10)),F=b.get("query")||"",M=qa(()=>{if(t===J.PAGE&&(m!=null&&m.path)){let A=Array.isArray(m.path)?m.path[0]:m.path;return typeof A=="string"&&/^\d+$/.test(A)?Number(A):null}if(t===J.MODAL){let A=b.get("folderId");if(A&&/^\d+$/.test(A))return Number(A)}return a!=null?a:null},[t,m,b,a]),[N,k]=ce([]),[h,I]=ce([]),[H,q]=ce([]),[re,ye]=ce([]),[u,S]=ce(null),[v,R]=ce(!0),[T,V]=ce({currentPage:w,totalPages:1,totalFiles:0,filesPerPage:D}),ge=Qa(null);ge.current=u;let[Tt,P]=ce(F),[z,G]=ce(F);Xt(()=>{let A=setTimeout(()=>{G(Tt)},300);return()=>clearTimeout(A)},[Tt]);let O=Qa(M),Ye=vo((A,le)=>{let se=new URLSearchParams(b.toString());se.set("page",A.toString()),se.set("limit",le.toString()),p.push(`${y}?${se.toString()}`,{scroll:!1})},[p,y]);Xt(()=>{V(A=>s(r({},A),{currentPage:w,filesPerPage:D})),P(F)},[w,D,F]),Xt(()=>{M!==O.current&&(t===J.PAGE&&Ye(1,D),O.current=M)},[M,D,Ye,t]);let W=T.currentPage,Ne=T.filesPerPage;Xt(()=>{let A=!1,le=async()=>{if(M&&(!ge.current||ge.current.id!==M))try{R(!0);let de=await l.getFolder(M);if(A)return;S(de),await se(de)}catch(de){let go=de instanceof Error?de.message:"Failed to load folder";if(da.error("Load Folder Failed",{description:go}),console.error("Failed to fetch current folder",de),A)return;S(null),A||R(!1)}else M===null&&ge.current!==null?(S(null),await se(null)):ge.current?await se(ge.current):await se(null)},se=async de=>{var go;if(!A){R(!0);try{let Mt=[];t===J.MODAL?Mt=n:Mt=i;let Jt=await l.getItems((go=de==null?void 0:de.id)!=null?go:null,Mt,W,Ne,z);if(A)return;I(Jt.folders),k(Jt.files),V(Jt.pagination)}catch(Mt){let Jt=Mt instanceof Error?Mt.message:"Failed to load data";da.error("Load Data Failed",{description:Jt}),console.error("Failed to load data:",Mt)}finally{A||R(!1)}}};return le(),()=>{A=!0}},[M,l,t,n,i,W,Ne,z]),Xt(()=>{ye([]),q([])},[u]);let[An,_n]=ce(!1),[Vn,Gn]=ce(!1),[On,Bn]=ce(!1),[Hn,Zn]=ce(!1),[Un,jn]=ce(!1),[Wn,$n]=ce(null),[Kn,Yn]=ce(null),qn=vo(async(A=!1)=>{var le;A||R(!0);try{let se=[];t===J.MODAL?se=n:se=i;let de=await l.getItems((le=u==null?void 0:u.id)!=null?le:null,se,W,Ne,z);I(de.folders),k(de.files),V(de.pagination)}catch(se){let de=se instanceof Error?se.message:"Failed to load data";da.error("Load Data Failed",{description:de}),console.error("Failed to load data:",se)}finally{A||R(!1)}},[u,t,n,i,l,W,Ne,z]),Qn=()=>H.length>0||re.length>0,Jn=()=>u,Xn=qa(()=>()=>{let A=N.length+(t===J.PAGE?h.length:0),le=H.length+re.length;return le===0?!1:le===A?!0:"indeterminate"},[N.length,h.length,H.length,re.length,t]),ei=vo(A=>{V(le=>s(r({},le),{currentPage:A})),t===J.PAGE&&Ye(A,Ne)},[Ye,Ne,t]),ti=vo(A=>{P(A);let le=new URLSearchParams(b.toString());A.trim()?(le.set("query",A),le.set("page","1")):le.delete("query"),p.push(`${y}?${le.toString()}`,{scroll:!1})},[p,y,b]);return{files:N,folders:h,selectedFiles:H,selectedFolders:re,currentFolder:u,isLoading:v,pagination:T,isUploadModalOpen:An,isCreateFolderModalOpen:Vn,isSearchModalOpen:On,isMoveFileModalOpen:Hn,isRenameFolderModalOpen:Un,fileDetailsModalFile:Kn,folderToRename:Wn,setFiles:k,setFolders:I,setSelectedFiles:q,setSelectedFolders:ye,setCurrentFolder:S,setPagination:V,setIsUploadModalOpen:_n,setIsCreateFolderModalOpen:Gn,setIsSearchModalOpen:Bn,setIsMoveFileModalOpen:Zn,setIsRenameFolderModalOpen:jn,setFileDetailsModalFile:Yn,setFolderToRename:$n,loadData:qn,setIsLoading:R,isInSelectionMode:Qn,getCurrentFolder:Jn,getSelectionState:Xn,handlePageChange:ei,searchQuery:Tt,updateSearchQuery:ti,mode:t,selectionMode:o,acceptedFileTypesForModal:n,provider:l,onFilesSelected:c,onClose:d,basePath:f}}import{createContext as pi,useContext as mi,useMemo as ui}from"react";import{jsx as fi}from"react/jsx-runtime";var Xa=pi(void 0);function xo({children:e,mode:t=J.PAGE,selectionMode:o=Ee.SINGLE,allowedFileTypes:a,onFilesSelected:n,onClose:i,acceptedFileTypesForModal:l,initialFolderId:c=null,provider:d,basePath:f="/media",maxUploadFiles:m=50,maxUploadSize:b=100*1024*1024}){let p=Ja({mode:t,selectionMode:o,initialFolderId:c,acceptedFileTypesForModal:l,allowedFileTypes:a,provider:d,onFilesSelected:n,onClose:i,basePath:f}),y=Ya(p),w=ui(()=>({files:p.files,folders:p.folders,selectedFiles:p.selectedFiles,selectedFolders:p.selectedFolders,currentFolder:p.currentFolder,isLoading:p.isLoading,pagination:p.pagination,isUploadModalOpen:p.isUploadModalOpen,isCreateFolderModalOpen:p.isCreateFolderModalOpen,isSearchModalOpen:p.isSearchModalOpen,isMoveFileModalOpen:p.isMoveFileModalOpen,isRenameFolderModalOpen:p.isRenameFolderModalOpen,fileDetailsModalFile:p.fileDetailsModalFile,folderToRename:p.folderToRename,mode:p.mode,selectionMode:p.selectionMode,allowedFileTypes:a,acceptedFileTypesForModal:p.acceptedFileTypesForModal,maxUploadFiles:m,maxUploadSize:b,setIsUploadModalOpen:p.setIsUploadModalOpen,setIsCreateFolderModalOpen:p.setIsCreateFolderModalOpen,setIsSearchModalOpen:p.setIsSearchModalOpen,setIsMoveFileModalOpen:p.setIsMoveFileModalOpen,setSelectedFiles:p.setSelectedFiles,setSelectedFolders:p.setSelectedFolders,setIsRenameFolderModalOpen:p.setIsRenameFolderModalOpen,setFileDetailsModalFile:p.setFileDetailsModalFile,setFolderToRename:p.setFolderToRename,handleFileClick:y.handleFileClick,handleFolderClick:y.handleFolderClick,handleClearSelection:y.handleClearSelection,handleSelectAllGlobal:y.handleSelectAllGlobal,handlePageChange:p.handlePageChange,searchQuery:p.searchQuery,updateSearchQuery:p.updateSearchQuery,uploadFiles:y.uploadFiles,createFolder:y.createFolder,bulkMove:y.bulkMove,renameFolder:y.renameFolder,updateFileMetadata:y.updateFileMetadata,bulkDelete:y.bulkDelete,refreshData:y.refreshData,isInSelectionMode:p.isInSelectionMode,getCurrentFolder:p.getCurrentFolder,getSelectionState:p.getSelectionState,onClose:p.onClose,onFilesSelected:p.onFilesSelected,provider:d,basePath:p.basePath}),[p,y,d,a,m,b]);return fi(Xa.Provider,{value:w,children:e})}function E(){let e=mi(Xa);if(e===void 0)throw new Error("useFileManager must be used within a FileManagerProvider");return e}import{clsx as gi}from"clsx";import{twMerge as hi}from"tailwind-merge";function x(...e){return hi(gi(e))}import{jsx as ca,jsxs as vi}from"react/jsx-runtime";function bo(e){return vi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[ca("path",{fill:"#e5252a",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),ca("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),ca("path",{fill:"#fff",fillRule:"nonzero",d:"M5.79 29.86l0 -7.31 3.11 0c0.77,0 1.38,0.21 1.84,0.64 0.46,0.42 0.69,0.99 0.69,1.7 0,0.71 -0.23,1.28 -0.69,1.7 -0.46,0.43 -1.07,0.64 -1.84,0.64l-1.24 0 0 2.63 -1.87 0zm1.87 -4.22l1.03 0c0.28,0 0.5,-0.06 0.65,-0.2 0.15,-0.13 0.23,-0.31 0.23,-0.55 0,-0.24 -0.08,-0.42 -0.23,-0.55 -0.15,-0.14 -0.37,-0.2 -0.65,-0.2l-1.03 0 0 1.5zm4.54 4.22l0 -7.31 2.59 0c0.51,0 0.99,0.07 1.44,0.22 0.45,0.15 0.86,0.36 1.22,0.65 0.36,0.28 0.65,0.66 0.86,1.14 0.2,0.48 0.31,1.03 0.31,1.65 0,0.61 -0.11,1.16 -0.31,1.64 -0.21,0.48 -0.5,0.86 -0.86,1.14 -0.36,0.29 -0.77,0.5 -1.22,0.65 -0.45,0.15 -0.93,0.22 -1.44,0.22l-2.59 0zm1.83 -1.59l0.54 0c0.29,0 0.56,-0.03 0.81,-0.1 0.24,-0.07 0.47,-0.18 0.69,-0.33 0.21,-0.15 0.38,-0.36 0.5,-0.64 0.12,-0.28 0.18,-0.61 0.18,-0.99 0,-0.39 -0.06,-0.72 -0.18,-1 -0.12,-0.28 -0.29,-0.49 -0.5,-0.64 -0.22,-0.15 -0.45,-0.26 -0.69,-0.33 -0.25,-0.07 -0.52,-0.1 -0.81,-0.1l-0.54 0 0 4.13zm5.53 1.59l0 -7.31 5.2 0 0 1.59 -3.33 0 0 1.17 2.66 0 0 1.58 -2.66 0 0 2.97 -1.87 0z"})]}))}import{jsx as pa,jsxs as xi}from"react/jsx-runtime";function wo(e){return xi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[pa("path",{fill:"#00733b",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),pa("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),pa("path",{fill:"#fff",d:"M5.21 17.35l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 -6.08l3.15 0 0 1.18 -3.15 0 0 -1.18zm-4.12 0l3.14 0 0 1.18 -3.14 0 0 -1.18zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2.08l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19z"})]}))}import{jsx as ma,jsxs as bi}from"react/jsx-runtime";function Co(e){return bi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[ma("path",{fill:"#e03303",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),ma("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),ma("path",{fill:"#fff",fillRule:"nonzero",d:"M11.76 16.13c-2.44,0.12 -4.38,2.15 -4.35,4.62 0.04,2.46 2.04,4.47 4.5,4.5 2.48,0.04 4.51,-1.9 4.62,-4.34 0.01,-0.12 -0.09,-0.22 -0.21,-0.22l-4.13 0c-0.12,0 -0.22,-0.1 -0.22,-0.21l0 -4.14c0,-0.12 -0.09,-0.21 -0.21,-0.21zm1.1 -0.67l0 4.13c0,0.12 0.09,0.21 0.21,0.21l4.14 0c0.12,0 0.21,-0.1 0.21,-0.22 -0.11,-2.34 -1.99,-4.22 -4.34,-4.33 -0.12,-0.01 -0.22,0.09 -0.22,0.21z"})]}))}import{jsx as ua,jsxs as wi}from"react/jsx-runtime";function yo(e){return wi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 38.89 51.99",width:"100",height:"100"},e),{children:[ua("path",{fill:"#0263d1",fillRule:"nonzero",d:"M6.76 0l17.4 0 14.73 15.36 0 29.87c0,3.73 -3.03,6.76 -6.77,6.76l-25.36 0c-3.73,0 -6.76,-3.03 -6.76,-6.76l0 -38.47c0,-3.73 3.03,-6.76 6.76,-6.76z"}),ua("polygon",{fill:"#fff",fillOpacity:".302",points:"24.14 0 24.14 15.24 38.89 15.24"}),ua("path",{fill:"#fff",fillRule:"nonzero",d:"M26.3 27.05l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm-4.57 13.71l-9.14 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l9.14 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm4.57 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm0 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0z"})]}))}import{jsx as fa,jsxs as Ci}from"react/jsx-runtime";function Fo(e){return Ci("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[fa("path",{fill:"#ffc000",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),fa("polygon",{fill:"#ffffff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),fa("path",{fill:"#ffffff",fillRule:"nonzero",d:"M16.45 21.21l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm0 2.86l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm-4.36 -8.57l-4.21 0c-0.4,0 -0.72,0.31 -0.72,0.71 0,0.4 0.32,0.71 0.72,0.71l4.21 0c0.4,0 0.72,-0.31 0.72,-0.71 0,-0.4 -0.32,-0.71 -0.72,-0.71l0 0zm4.36 2.85l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0z"})]}))}import{jsx as Et,jsxs as ga}from"react/jsx-runtime";function Mo(e){return ga("svg",s(r({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:[ga("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1",x1:"37.127",x2:"25.868",y1:"6.873",y2:"18.132",gradientUnits:"userSpaceOnUse",children:[Et("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),Et("stop",{offset:".913",stopColor:"#262626",stopOpacity:".8"})]}),Et("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1)",d:"M28,4v8c0,2.209,1.791,4,4,4h8L28,4z",children:" "}),ga("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2",x1:"-8.398",x2:"74.731",y1:"51.185",y2:"-18.568",gradientUnits:"userSpaceOnUse",children:[Et("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),Et("stop",{offset:"1",stopColor:"#262626",stopOpacity:".8"})]}),Et("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2)",d:"M40,16v23c0,2.761-2.239,5-5,5H8V9c0-2.761,2.239-5,5-5h15L40,16z"})]}))}import{jsx as ha,jsxs as yi}from"react/jsx-runtime";function Do(e){return yi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100","aria-hidden":"true"},e),{children:[ha("path",{fill:"#ffb11f",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),ha("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),ha("path",{fill:"#fff",fillRule:"nonzero",d:"M8.96 16.9l0 -2.22c0,-0.24 -0.19,-0.43 -0.43,-0.43l-1.2 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 2.22 -0.67 1.96c-0.19,0.55 -0.1,1.16 0.24,1.63 0.33,0.47 0.88,0.75 1.46,0.75 0.58,0 1.12,-0.28 1.46,-0.75 0.34,-0.47 0.43,-1.08 0.24,-1.63l-0.67 -1.96zm-0.28 3.08c-0.34,0.49 -1.16,0.49 -1.51,0 -0.17,-0.24 -0.22,-0.56 -0.12,-0.84l0.22 -0.66 1.31 0 0.23 0.66c0.09,0.28 0.05,0.6 -0.13,0.84zm-3.41 -17.65l0 1.22c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.82 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.94c0,0.24 0.19,0.44 0.43,0.44l1.63 0 0 1.81 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.95c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.38c0,0.24 0.2,0.43 0.44,0.43l2.39 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.23 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.24 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.2 0.43,-0.44l0 -0.94c0,-0.24 -0.2,-0.44 -0.43,-0.44l-1.64 0 0 -1.66c0,0 -3.25,0.01 -3.25,0.01z"})]}))}import{jsx as va,jsxs as Fi}from"react/jsx-runtime";function Io(e){return Fi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 20.49 27.4",width:"100",height:"100","aria-hidden":"true"},e),{children:[va("path",{fill:"#00a1e0",d:"M3.56 0l9.17 0 7.76 8.1 0 15.73c0,1.97 -1.59,3.57 -3.56,3.57l-13.37 0c-1.96,0 -3.56,-1.6 -3.56,-3.57l0 -20.27c0,-1.96 1.6,-3.56 3.56,-3.56z"}),va("polygon",{fill:"#fff",fillOpacity:".302",points:"12.72 0 12.72 8.03 20.49 8.03"}),va("path",{fill:"#fff",fillRule:"nonzero",d:"M12.07 20.44l-0.52 0 0 -0.99 0.11 0c0.26,0 0.39,-0.14 0.39,-0.42l0 -1.45c0,-0.23 0.06,-0.41 0.16,-0.53 0.11,-0.11 0.27,-0.21 0.48,-0.3 -0.2,-0.08 -0.36,-0.18 -0.47,-0.3 -0.11,-0.12 -0.17,-0.29 -0.17,-0.52l0 -1.45c0,-0.28 -0.13,-0.42 -0.39,-0.42l-0.11 0 0 -0.99 0.52 0c0.31,0 0.56,0.1 0.76,0.3 0.2,0.2 0.3,0.45 0.3,0.75l0 1.55c0,0.38 0.21,0.57 0.63,0.57l0 1.03c-0.42,0 -0.63,0.19 -0.63,0.58l0 1.54c0,0.3 -0.1,0.55 -0.3,0.75 -0.2,0.2 -0.45,0.3 -0.76,0.3zm-3.65 0c-0.3,0 -0.56,-0.1 -0.76,-0.3 -0.2,-0.2 -0.3,-0.45 -0.3,-0.75l0 -1.54c0,-0.39 -0.21,-0.58 -0.63,-0.58l0 -1.03c0.42,0 0.63,-0.19 0.63,-0.57l0 -1.55c0,-0.3 0.1,-0.55 0.3,-0.75 0.2,-0.2 0.46,-0.3 0.76,-0.3l0.53 0 0 0.99 -0.12 0c-0.26,0 -0.39,0.14 -0.39,0.42l0 1.45c0,0.23 -0.05,0.4 -0.16,0.52 -0.11,0.12 -0.27,0.22 -0.48,0.3 0.21,0.09 0.37,0.19 0.48,0.3 0.11,0.12 0.16,0.3 0.16,0.53l0 1.45c0,0.28 0.13,0.42 0.39,0.42l0.12 0 0 0.99 -0.53 0z"})]}))}import{jsx as xa,jsxs as Mi}from"react/jsx-runtime";function Lt(e){return Mi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[xa("path",{fill:"#90c",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),xa("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),xa("path",{fill:"#fff",fillRule:"nonzero",d:"M15.07 21.38c0.31,-0.52 0.52,-1.18 0.56,-1.83 0.02,-0.42 -0.07,-0.86 -0.27,-1.27 -0.32,-0.65 -0.86,-1.01 -1.39,-1.37 -0.39,-0.26 -0.76,-0.51 -1.02,-0.86l-0.05 -0.06c-0.15,-0.21 -0.33,-0.45 -0.36,-0.65 -0.02,-0.2 -0.21,-0.34 -0.4,-0.33 -0.21,0.02 -0.36,0.18 -0.36,0.39l0 6.86c-0.32,-0.2 -0.72,-0.32 -1.16,-0.32 -1.06,0 -1.92,0.69 -1.92,1.54 0,0.85 0.86,1.54 1.92,1.54 1.06,0 1.93,-0.69 1.93,-1.54l0 -4.49c0.58,0.23 1.52,0.79 1.78,2.1 -0.05,0.07 -0.09,0.15 -0.15,0.21 -0.14,0.16 -0.12,0.4 0.04,0.55 0.16,0.14 0.4,0.12 0.54,-0.04 0.1,-0.12 0.2,-0.25 0.28,-0.4 0.01,-0.01 0.02,-0.02 0.03,-0.03z"})]}))}import{jsx as te,jsxs as er}from"react/jsx-runtime";function No(e){return er("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[te("path",{fill:"#188a32",d:"M56,35v8c0,1.66-1.34,3-3,3H11c-1.66,0-3-1.34-3-3v-8c0-1.66,1.34-3,3-3h42C54.66,32,56,33.34,56,35z"}),te("path",{fill:"#0082AA",d:"M44,29v5c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3v-5h4v4h16v-4H44z"}),te("path",{fill:"#4d50c6",d:`M53,32H11c-1.657,0-3-1.343-3-3v-8c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
2
+ C56,30.657,54.657,32,53,32z`}),te("path",{fill:"#e6275e",d:`M53,18H11c-1.657,0-3-1.343-3-3V7c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
3
+ C56,16.657,54.657,18,53,18z`}),te("rect",{width:"16",height:"42",x:"24",y:"4",fill:"#FAB400"}),te("path",{fill:"#DC9600",d:"M32,46L32,46c-4.418,0-8-3.582-8-8v-4h16v4C40,42.418,36.418,46,32,46z"}),te("path",{fill:"#FAB400",d:"M32,44L32,44c-4.418,0-8-3.582-8-8v-4h16v4C40,40.418,36.418,44,32,44z"}),te("rect",{width:"16",height:"4",x:"24",y:"33",fill:"#DC9600"}),te("path",{fill:"#F0F0F0",d:`M44,17v16c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3V17c0-1.66,1.34-3,3-3h1v18h16V14h1
4
+ C42.66,14,44,15.34,44,17z`}),te("path",{fill:"#D2D2D2",d:"M34,31v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H34z"}),te("path",{fill:"#F0F0F0",d:`M32,34L32,34c-1.105,0-2-0.895-2-2v-8c0-1.105,0.895-2,2-2h0c1.105,0,2,0.895,2,2v8
5
+ C34,33.105,33.105,34,32,34z`}),te("circle",{cx:"32",cy:"18",r:"2",fill:"#C80A50"}),te("circle",{cx:"32",cy:"10",r:"2",fill:"#00A0C8"}),te("path",{fill:"#F0F0F0",d:"M34,18h-4c0-1.1,0.9-2,2-2S34,16.9,34,18z"}),te("path",{fill:"#0A5078",d:`M47,60H17c-1.105,0-2-0.895-2-2V44c0-1.105,0.895-2,2-2h30c1.105,0,2,0.895,2,2v14
6
+ C49,59.105,48.105,60,47,60z`}),te("path",{fill:"#F0F0F0",d:`M35,53h-6c-0.552,0-1-0.448-1-1v-3c0-2.206,1.794-4,4-4s4,1.794,4,4v3C36,52.552,35.552,53,35,53z
7
+ M30,51h4v-2c0-1.103-0.897-2-2-2s-2,0.897-2,2V51z`}),te("path",{fill:"#F0F0F0",d:"M29 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C30 56.552 29.552 57 29 57zM35 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C36 56.552 35.552 57 35 57zM42 53h-3c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h3c2.206 0 4 1.794 4 4S44.206 53 42 53zM40 51h2c1.103 0 2-.897 2-2s-.897-2-2-2h-2V51z"}),te("path",{fill:"#F0F0F0",d:"M39 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C40 56.552 39.552 57 39 57zM45.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C45.304 56.966 45.151 57 45.001 57z"}),er("g",{children:[te("path",{fill:"#F0F0F0",d:`M22,53h-3c-0.552,0-1-0.448-1-1v-6c0-0.552,0.448-1,1-1h3c2.206,0,4,1.794,4,4S24.206,53,22,53z
8
+ M20,51h2c1.103,0,2-0.897,2-2s-0.897-2-2-2h-2V51z`}),te("path",{fill:"#F0F0F0",d:"M19 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C20 56.552 19.552 57 19 57zM25.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C25.304 56.966 25.151 57 25.001 57z"})]})]}))}import{jsx as tr,jsxs as Di}from"react/jsx-runtime";function ko(e){return Di("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"100",height:"100"},e),{children:[tr("path",{fill:"#e8e9ea",d:`M8.16,17.51V3.74c0-1.79,1.45-3.24,3.24-3.24h20.53l12.79,12.8v30.96c0,1.79-1.45,3.24-3.24,3.24H11.4
9
+ c-1.79,0-3.24-1.45-3.24-3.24v-1.62`}),tr("path",{fill:"#697d7f",d:"M44.72 13.3h-9.93c-1.58 0-2.86-1.28-2.86-2.86V.5M11.53 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H4.78c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76H11.53zM36.33 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-6.75c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-5.25v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-3.98v-2.76H36.33zM15.55 36.67c.26.19.57.28.87.28.47 0 .93-.22 1.22-.63l2.92-4.07 2.92 4.07c.29.41.75.63 1.22.63.3 0 .61-.09.87-.28.67-.48.83-1.42.34-2.09l-3.51-4.89 3.51-4.89c.48-.67.33-1.61-.34-2.09-.67-.48-1.61-.33-2.09.34l-2.92 4.07-2.92-4.07c-.48-.67-1.42-.83-2.09-.34-.67.48-.83 1.42-.34 2.09l3.51 4.89-3.51 4.89C14.72 35.25 14.87 36.19 15.55 36.67z"})]}))}import{jsx as ba,jsxs as Ii}from"react/jsx-runtime";function At(e){return Ii("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[ba("path",{fill:"#0ac963",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),ba("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),ba("path",{fill:"#fff",d:"M11.85 11.82l-6.01 0c-0.45,0 -0.82,0.37 -0.82,0.82l0 3.82c0,0.45 0.37,0.82 0.82,0.82l6.01 0c0.45,0 0.81,-0.37 0.81,-0.82l0 -3.82c0,-0.45 -0.36,-0.82 -0.81,-0.82zm-4.37 1.03c0.49,0 0.88,0.4 0.88,0.88 0,0.49 -0.39,0.89 -0.88,0.89 -0.49,0 -0.89,-0.4 -0.89,-0.89 0,-0.48 0.4,-0.88 0.89,-0.88zm4.64 3.61c0,0.15 -0.12,0.28 -0.27,0.28l-6.01 0c-0.15,0 -0.27,-0.13 -0.27,-0.28l0 -0.16 1.09 -1.09 0.9 0.9c0.11,0.11 0.28,0.11 0.39,0l2.26 -2.26 1.91 1.91 0 0.7 0 0z"})]}))}import{jsx as wa,jsxs as Ni}from"react/jsx-runtime";function Po(e){return Ni("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[wa("path",{fill:"#fa0000",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),wa("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),wa("path",{fill:"#fff",fillRule:"nonzero",d:"M14.97 18.16c-3.57,0 -6.47,2.9 -6.47,6.47 0,3.57 2.9,6.46 6.47,6.46 3.57,0 6.46,-2.89 6.46,-6.46 0,-3.57 -2.9,-6.46 -6.46,-6.47zm2.72 6.67c-0.05,0.09 -0.12,0.16 -0.21,0.21l0 0 -3.69 1.85c-0.23,0.11 -0.51,0.02 -0.62,-0.21 -0.04,-0.06 -0.05,-0.13 -0.05,-0.21l0 -3.69c0,-0.26 0.21,-0.46 0.46,-0.46 0.07,0 0.14,0.01 0.21,0.05l3.69 1.84c0.23,0.12 0.32,0.39 0.21,0.62z"})]}))}import{jsx as Dt,jsxs as ki}from"react/jsx-runtime";function So(e){return ki("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[Dt("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
10
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),Dt("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
11
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),Dt("rect",{width:"58.6",height:"21.1",x:"1.6",y:"14.7",fill:"#ffffff"}),Dt("rect",{width:".8",height:"21.1",x:"1.6",y:"14.7",fill:"#f3f3f3"}),Dt("rect",{width:"58.6",height:".9",x:"1.6",y:"14.7",fill:"#f3f1f1"}),Dt("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
12
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),Dt("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
13
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}import{jsx as zo,jsxs as Pi}from"react/jsx-runtime";function Ro(e){return Pi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[zo("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
14
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),zo("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
15
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),zo("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
16
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),zo("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
17
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}import{jsx as ne,jsxs as _t}from"react/jsx-runtime";function qe(e){return ne("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:_t("g",{fill:"none",children:[ne("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"origin",mask:"url(#1752500502786-6297956_folder_mask_2iow0yqdp)"}),ne("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"clone",filter:"url(#1752500502786-6297956_folder_filter_56qas2ark)",clipPath:"url(#1752500502786-6297956_folder_clipPath_gygn8e14a)"}),ne("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)","data-glass":"blur"}),ne("path",{d:"M18.6807 9.00586C19.7975 9.02423 20.4692 9.09846 20.9864 9.39258C21.5915 9.73676 22.0586 10.2802 22.3067 10.9307C22.5894 11.6719 22.4426 12.6251 22.1495 14.5303L21.626 17.9297C21.4038 19.3742 21.2926 20.097 20.9385 20.6396L20.8155 20.8135C20.5147 21.2098 20.1193 21.5262 19.6641 21.7324C19.074 21.9997 18.3431 22 16.8819 22V21.25C17.624 21.25 18.1389 21.2495 18.543 21.2188C18.9374 21.1887 19.1709 21.133 19.3546 21.0498C19.7447 20.873 20.0766 20.5882 20.3106 20.2295C20.4208 20.0606 20.5119 19.8385 20.6016 19.4531C20.6935 19.0584 20.772 18.5489 20.8848 17.8154L21.4083 14.416C21.5568 13.4504 21.6601 12.7732 21.6954 12.2441C21.7302 11.7223 21.6913 11.4231 21.6055 11.1982C21.4194 10.7103 21.0693 10.3021 20.6153 10.0439C20.4061 9.92506 20.1166 9.84086 19.5958 9.7959C19.0675 9.75031 18.3823 9.75 17.4053 9.75H6.59479C5.61785 9.75 4.93266 9.75032 4.40436 9.7959C3.88353 9.84086 3.59399 9.92504 3.38483 10.0439C2.93088 10.3021 2.5807 10.7103 2.3946 11.1982C2.30885 11.4231 2.26996 11.7223 2.30475 12.2441C2.34005 12.7732 2.44331 13.4504 2.59186 14.416L3.1153 17.8154C3.22814 18.5489 3.30665 19.0584 3.3985 19.4531C3.4882 19.8385 3.5793 20.0606 3.68952 20.2295C3.92357 20.5882 4.25545 20.873 4.64558 21.0498C4.82929 21.133 5.06268 21.1887 5.4571 21.2188C5.86121 21.2495 6.37613 21.25 7.11823 21.25V22L6.14948 21.9961C5.44148 21.9856 4.96108 21.9493 4.56452 21.8213L4.336 21.7324C3.88079 21.5262 3.48544 21.2098 3.18464 20.8135L3.06159 20.6396C2.79608 20.2327 2.66703 19.7244 2.52546 18.8867L2.37409 17.9297L1.85065 14.5303C1.57585 12.744 1.42974 11.7947 1.64558 11.0723L1.6944 10.9307C1.91158 10.3615 2.29578 9.8738 2.79401 9.53027L3.01374 9.39258C3.70332 9.00046 4.66737 9 6.59479 9H17.4053L18.6807 9.00586ZM16.8819 21.25V22H7.11823V21.25H16.8819Z",fill:"url(#1752500502786-6297956_folder_existing_2_vhap9347d)"}),_t("defs",{children:[_t("linearGradient",{id:"1752500502786-6297956_folder_existing_0_ekojck6b3",x1:"12",y1:"2",x2:"12",y2:"16",gradientUnits:"userSpaceOnUse",children:[ne("stop",{stopColor:"#575757"}),ne("stop",{offset:"1",stopColor:"#151515"})]}),_t("linearGradient",{id:"1752500502786-6297956_folder_existing_1_v5o9796uz",x1:"23",y1:"15.5",x2:"1",y2:"15.5",gradientUnits:"userSpaceOnUse",children:[ne("stop",{stopColor:"#E3E3E5",stopOpacity:".6"}),ne("stop",{offset:"1",stopColor:"#BBBBC0",stopOpacity:".6"})]}),_t("linearGradient",{id:"1752500502786-6297956_folder_existing_2_vhap9347d",x1:"12",y1:"9",x2:"12",y2:"16.528",gradientUnits:"userSpaceOnUse",children:[ne("stop",{stopColor:"#fff"}),ne("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0"})]}),ne("filter",{id:"1752500502786-6297956_folder_filter_56qas2ark",x:"-100%",y:"-100%",width:"400%",height:"400%",filterUnits:"objectBoundingBox",primitiveUnits:"userSpaceOnUse",children:ne("feGaussianBlur",{stdDeviation:"2",x:"0%",y:"0%",width:"100%",height:"100%",in:"SourceGraphic",edgeMode:"none",result:"blur"})}),ne("clipPath",{id:"1752500502786-6297956_folder_clipPath_gygn8e14a",children:ne("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)"})}),_t("mask",{id:"1752500502786-6297956_folder_mask_2iow0yqdp",children:[ne("rect",{width:"100%",height:"100%",fill:"#FFF"}),ne("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"#000"})]})]})]})}))}import{jsx as or,jsxs as Si}from"react/jsx-runtime";function To(e){return Si("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[or("path",{opacity:"0.4",d:"M13.4919 2.29395C13.0743 1.94268 12.5457 1.75 11.9997 1.75C11.5221 1.75 11.058 1.89775 10.6697 2.16992L10.5085 2.29395L1.5974 9.78906C1.18491 10.1364 1.13178 10.7528 1.47924 11.165C1.78946 11.5327 2.31307 11.6121 2.71557 11.3789V15.9531V15.955C2.71555 17.0543 2.71553 17.9612 2.7976 18.6885C2.88313 19.4463 3.06823 20.1292 3.52318 20.7217L3.68627 20.9199C3.85487 21.1119 4.04268 21.2876 4.24584 21.4434L4.47143 21.6016C5.01004 21.9427 5.61706 22.0932 6.281 22.168C7.00121 22.2491 7.89724 22.249 8.98176 22.249H8.99975H14.9997H15.0178C16.1023 22.249 16.9983 22.2491 17.7185 22.168C18.4771 22.0825 19.1606 21.8977 19.7537 21.4434L19.9529 21.2803C20.145 21.1119 20.3205 20.9245 20.4763 20.7217L20.6345 20.4961C20.976 19.9581 21.127 19.3517 21.2019 18.6885C21.284 17.9612 21.2839 17.0543 21.2839 15.955V15.9531V11.3789C21.6864 11.6121 22.21 11.5327 22.5203 11.165C22.846 10.7785 22.8199 10.2127 22.4753 9.85742L13.4919 2.29395Z",fill:"#141B34"}),or("path",{d:"M14.9998 17V22.249H8.99979V17C8.99979 15.5859 9.00002 14.8788 9.43924 14.4395C9.87855 14.0001 10.5857 14 11.9998 14C13.4139 14 14.121 14.0002 14.5603 14.4395C14.9997 14.8788 14.9998 15.5858 14.9998 17Z",fill:"#141B34"})]}))}import{jsx as ar}from"react/jsx-runtime";function be(e){return ar("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:ar("path",{fill:"currentColor",d:"M46.599 46.599a4.498 4.498 0 0 1-6.363 0l-7.941-7.941C29.028 40.749 25.167 42 21 42 9.402 42 0 32.598 0 21S9.402 0 21 0s21 9.402 21 21c0 4.167-1.251 8.028-3.342 11.295l7.941 7.941a4.498 4.498 0 0 1 0 6.363zM21 6C12.717 6 6 12.714 6 21s6.717 15 15 15c8.286 0 15-6.714 15-15S29.286 6 21 6z"})}))}import{jsx as rr,jsxs as zi}from"react/jsx-runtime";function Qe(e){return zi("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[rr("path",{fill:"currentColor",opacity:"0.4",d:"M20.4155 3.66085C22.3012 5.52939 19.2842 20.7253 16.1883 20.9931C13.5911 21.2177 12.7819 16.0954 12.2348 14.4719C11.695 12.8696 11.0943 12.2927 9.50513 11.767C5.46811 10.4315 3.4496 9.76374 3.04996 8.70639C1.99171 5.90649 18.0071 1.27438 20.4155 3.66085Z"}),rr("path",{fill:"currentColor",d:"M3.04996 8.70639C3.4496 9.76374 5.46811 10.4315 9.50513 11.767C10.3308 12.0402 10.8897 12.3271 11.3118 12.7646L20.4155 3.66085C18.0071 1.27438 1.99171 5.90649 3.04996 8.70639Z"})]}))}import{jsx as a0,jsxs as r0}from"react/jsx-runtime";import{jsx as nr,jsxs as Ri}from"react/jsx-runtime";function It(e){return Ri("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[nr("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.75 11.7499C18.3023 11.7499 18.75 12.1977 18.75 12.7499V15.7499H21.75C22.3023 15.7499 22.75 16.1977 22.75 16.7499C22.75 17.3022 22.3023 17.7499 21.75 17.7499H18.75V20.7499C18.75 21.3022 18.3023 21.7499 17.75 21.7499C17.1977 21.7499 16.75 21.3022 16.75 20.7499V17.7499H13.75C13.1977 17.7499 12.75 17.3022 12.75 16.7499C12.75 16.1977 13.1977 15.7499 13.75 15.7499H16.75V12.7499C16.75 12.1977 17.1977 11.7499 17.75 11.7499Z",fill:"currentColor"}),nr("path",{opacity:"0.4",d:"M9.4626 2.48876C8.82373 2.24919 8.11205 2.24951 7.08264 2.24996C6.2039 2.24995 5.32205 2.24999 4.7497 2.30044C4.15996 2.35243 3.64388 2.46238 3.17258 2.7254C2.56533 3.06428 2.06428 3.56534 1.7254 4.17258C1.46238 4.64388 1.35242 5.15996 1.30044 5.7497C1.24999 6.32205 1.24999 7.03077 1.25 7.9095V11.0574C1.24999 13.3658 1.24998 15.1748 1.43975 16.5863C1.63399 18.031 2.03933 19.1711 2.93414 20.0659C3.82895 20.9607 4.96897 21.366 6.41371 21.5603C7.82519 21.75 9.63423 21.75 11.9426 21.75H13.2923C14.1084 21.75 14.8409 21.75 15.5 21.7383V18.9999H13.75C12.5074 18.9999 11.5 17.9926 11.5 16.7499C11.5 15.5073 12.5074 14.4999 13.75 14.4999H15.5V12.7499C15.5 11.5073 16.5074 10.4999 17.75 10.4999C18.9926 10.4999 20 11.5073 20 12.7499V14.4999H22.7383C22.75 13.8408 22.75 13.1084 22.75 12.2923C22.75 11.2733 22.75 10.3688 22.683 9.70949C22.6137 9.02893 22.4669 8.43872 22.118 7.91661C21.8444 7.50715 21.4929 7.15559 21.0834 6.88199C20.5613 6.53313 19.9711 6.38628 19.2905 6.31705C18.6312 6.24998 17.8095 6.24999 16.7905 6.25L13.2361 6.25C12.92 6.25 12.7396 6.24908 12.6064 6.23531C12.5044 6.22817 12.4348 6.15255 12.4128 6.11563C12.3409 6.0027 12.0838 5.48909 11.9425 5.20636C11.4704 4.25121 10.8581 3.01205 9.4626 2.48876Z",fill:"currentColor"})]}))}import{jsx as ir}from"react/jsx-runtime";function lt(e){return ir("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ir("path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"#141B34",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}import{jsx as lr}from"react/jsx-runtime";function Vt(e){return lr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:lr("path",{fill:"currentColor",d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z"})}))}import{jsx as sr}from"react/jsx-runtime";function Nt(e){return sr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:sr("path",{fill:"currentColor",d:"M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"})}))}import{jsx as Ca,jsxs as Ti}from"react/jsx-runtime";function Be(e){return Ti("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:[Ca("path",{fill:"currentColor",d:"M3 6.386c0-.484.345-.877.771-.877h2.665c.529-.016.996-.399 1.176-.965l.03-.1l.115-.391c.07-.24.131-.45.217-.637c.338-.739.964-1.252 1.687-1.383c.184-.033.378-.033.6-.033h3.478c.223 0 .417 0 .6.033c.723.131 1.35.644 1.687 1.383c.086.187.147.396.218.637l.114.391l.03.1c.18.566.74.95 1.27.965h2.57c.427 0 .772.393.772.877s-.345.877-.771.877H3.77c-.425 0-.77-.393-.77-.877"}),Ca("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.425 11.482c.413-.044.78.273.821.707l.5 5.263c.041.433-.26.82-.671.864c-.412.043-.78-.273-.821-.707l-.5-5.263c-.041-.434.26-.821.671-.864m5.15 0c.412.043.713.43.671.864l-.5 5.263c-.04.434-.408.75-.82.707c-.413-.044-.713-.43-.672-.864l.5-5.264c.041-.433.409-.75.82-.707",clipRule:"evenodd"}),Ca("path",{fill:"currentColor",d:"M11.596 22h.808c2.783 0 4.174 0 5.08-.886c.904-.886.996-2.339 1.181-5.245l.267-4.188c.1-1.577.15-2.366-.303-2.865c-.454-.5-1.22-.5-2.753-.5H8.124c-1.533 0-2.3 0-2.753.5s-.404 1.288-.303 2.865l.267 4.188c.185 2.906.277 4.36 1.182 5.245c.905.886 2.296.886 5.079.886",opacity:"0.5"})]}))}import{jsx as dr}from"react/jsx-runtime";function oe(e){return dr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),{children:dr("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"})}))}import{jsx as Eo,jsxs as Ei}from"react/jsx-runtime";function Lo(e){return Ei("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Eo("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Eo("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),Eo("path",{d:"M7 11l5 5l5 -5"}),Eo("path",{d:"M12 4l0 12"})]}))}import{jsx as Ao,jsxs as Li}from"react/jsx-runtime";function _o(e){return Li("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Ao("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Ao("path",{d:"M9 15l6 -6"}),Ao("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),Ao("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]}))}import{jsx as cr}from"react/jsx-runtime";function Vo(e){return cr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:cr("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.944 1.25H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S3.025 4.705 2.89 5.71c-.138 1.029-.14 2.383-.14 4.29a.75.75 0 0 1-1.5 0v-.056c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153m8.345 1.64c-1.027-.138-2.382-.14-4.289-.14a.75.75 0 0 1 0-1.5h.056c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238c.748.749 1.08 1.698 1.238 2.87c.153 1.14.153 2.595.153 4.433V10a.75.75 0 0 1-1.5 0c0-1.907-.002-3.261-.14-4.29c-.135-1.005-.389-1.585-.812-2.008s-1.003-.677-2.009-.812M2 13.25a.75.75 0 0 1 .75.75c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V14a.75.75 0 0 1 .75-.75m20 0a.75.75 0 0 1 .75.75v.056c0 1.838 0 3.294-.153 4.433c-.158 1.172-.49 2.121-1.238 2.87c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812s.677-1.003.812-2.009c.138-1.027.14-2.382.14-4.289a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})}))}import{jsx as pr,jsxs as Ai}from"react/jsx-runtime";function Je(e){return Ai("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[pr("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),pr("path",{d:"M5 12l5 5l10 -10"})]}))}import{jsx as mr}from"react/jsx-runtime";function Gt(e){return mr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:mr("path",{fill:"currentColor",fillRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-5.97-3.03a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})}))}import{jsx as ur}from"react/jsx-runtime";function Ot(e){return ur("svg",s(r({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 72 72",fill:"currentColor"},e),{children:ur("path",{d:"M38.406 22.234l11.36 11.36L28.784 54.576l-12.876 4.307c-1.725.577-3.367-1.065-2.791-2.79l4.307-12.876L38.406 22.234zM41.234 19.406l5.234-5.234c1.562-1.562 4.095-1.562 5.657 0l5.703 5.703c1.562 1.562 1.562 4.095 0 5.657l-5.234 5.234L41.234 19.406z"})}))}import{jsx as ya,jsxs as _i}from"react/jsx-runtime";function kt(e){return _i("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[ya("circle",{cx:"12",cy:"12",r:"1"}),ya("circle",{cx:"19",cy:"12",r:"1"}),ya("circle",{cx:"5",cy:"12",r:"1"})]}))}import{jsx as fr}from"react/jsx-runtime";function Go(e){return fr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:fr("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6.75a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5zm0 14a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5zM13.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0z",fill:"#000000"})}))}import{jsx as gr}from"react/jsx-runtime";function Oo(e){return gr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:gr("path",{d:"M18 11h-12c-1.104 0-2 .896-2 2s.896 2 2 2h12c1.104 0 2-.896 2-2s-.896-2-2-2z"})}))}import{jsx as st,jsxs as Vi}from"react/jsx-runtime";function pe(e){return Vi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[st("path",{d:"M12 3L12 6",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M21 12L18 12",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M12 21L12 18",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M3 12L6 12",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M5.63586 5.63605L7.75718 7.75737",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M18.3639 5.63605L16.2426 7.75737",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M18.3641 18.3639L16.2428 16.2426",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M5.63623 18.3639L7.75755 16.2426",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))}import{jsx as Bo,jsxs as Gi}from"react/jsx-runtime";function eo(e){return Gi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Bo("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),Bo("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),Bo("g",{id:"SVGRepo_iconCarrier",children:Bo("path",{d:"M21.4086 9.35258C23.5305 10.5065 23.5305 13.4935 21.4086 14.6474L8.59662 21.6145C6.53435 22.736 4 21.2763 4 18.9671L4 5.0329C4 2.72368 6.53435 1.26402 8.59661 2.38548L21.4086 9.35258Z",fill:"#000000"})})]}))}import{jsx as hr}from"react/jsx-runtime";function Ho(e){return hr("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:hr("path",{clipRule:"evenodd",d:"M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM7 9V3H9V9H7ZM7 13V11H9V13H7Z",fill:"#030708",fillRule:"evenodd"})}))}import{jsx as Zo,jsxs as Oi}from"react/jsx-runtime";function Uo(e){return Oi("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Zo("path",{id:"primary",d:"M14,18H9A6,6,0,0,1,5.54,7.11",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),Zo("path",{id:"primary-2","data-name":"primary",d:"M10,6h5a6,6,0,0,1,3.46,10.89",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),Zo("polyline",{id:"primary-3","data-name":"primary",points:"12 16 14 18 12 20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),Zo("polyline",{id:"primary-4","data-name":"primary",points:"12 8 10 6 12 4",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]}))}import{jsx as pc}from"react/jsx-runtime";import{jsx as to,jsxs as Hi}from"react/jsx-runtime";var vr=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return to("nav",r({"data-slot":"pagination",role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e)},t))};function xr(o){var a=o,{className:e}=a,t=g(a,["className"]);return to("ul",r({"data-slot":"pagination-content",className:x("flex flex-row items-center gap-1",e)},t))}function oo(o){var a=o,{className:e}=a,t=g(a,["className"]);return to("li",r({"data-slot":"pagination-item",className:x("",e)},t))}var br=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return Hi("span",s(r({"data-slot":"pagination-ellipsis","aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e)},t),{children:[to(kt,{className:"h-4 w-4"}),to("span",{className:"sr-only",children:"More pages"})]}))};import{cva as Zi}from"class-variance-authority";import{Slot as Ui}from"radix-ui";import{jsx as Wi}from"react/jsx-runtime";var ji=Zi("cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",mono:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",outline:"bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",dashed:"text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",ghost:"text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",dim:"text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",foreground:"",inverse:""},appearance:{default:"",ghost:""},underline:{solid:"",dashed:""},underlined:{solid:"",dashed:""},size:{lg:"h-10 px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",md:"h-9 px-3 gap-1.5 text-sm [&_svg:not([class*=size-])]:size-4",sm:"h-8 px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",xs:"h-7 px-2 gap-1 text-xs [&_svg:not([class*=size-])]:size-3.5",icon:"size-9 [&_svg:not([class*=size-])]:size-4 shrink-0"},autoHeight:{true:"",false:""},radius:{md:"rounded-md",full:"rounded-full"},mode:{default:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",icon:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",link:"text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",input:`
2
18
  justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background
3
19
  focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30
4
20
  [[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px]
5
21
  [[data-state=open]>&]:ring-ring/30
6
22
  aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
7
23
  in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10 dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
8
- `},placeholder:{true:"text-muted-foreground",false:""}},compoundVariants:[{variant:"ghost",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"dashed",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"secondary",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"input",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"icon",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{size:"xs",autoHeight:!0,className:"h-auto min-h-7"},{size:"md",autoHeight:!0,className:"h-auto min-h-9"},{size:"sm",autoHeight:!0,className:"h-auto min-h-8"},{size:"lg",autoHeight:!0,className:"h-auto min-h-10"},{variant:"primary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"link",underline:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"primary",mode:"link",underline:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"primary",mode:"link",underlined:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"primary",mode:"link",underlined:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underline:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"inverse",mode:"link",underline:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underlined:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"inverse",mode:"link",underlined:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underline:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"foreground",mode:"link",underline:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underlined:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"foreground",mode:"link",underlined:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"primary",appearance:"ghost",className:"bg-transparent text-primary/90 hover:bg-primary/5 data-[state=open]:bg-primary/5"},{variant:"destructive",appearance:"ghost",className:"bg-transparent text-destructive/90 hover:bg-destructive/5 data-[state=open]:bg-destructive/5"},{variant:"ghost",mode:"icon",className:"text-muted-foreground"},{size:"xs",mode:"icon",className:"w-7 h-7 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"sm",mode:"icon",className:"w-8 h-8 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"md",mode:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"lg",mode:"icon",className:"w-10 h-10 p-0 [&_svg:not([class*=size-])]:size-4"},{mode:"input",placeholder:!0,variant:"outline",className:"font-normal text-muted-foreground"},{mode:"input",variant:"outline",size:"sm",className:"gap-1.25"},{mode:"input",variant:"outline",size:"md",className:"gap-1.5"},{mode:"input",variant:"outline",size:"lg",className:"gap-1.5"}],defaultVariants:{variant:"primary",mode:"default",size:"md",radius:"md",appearance:"default"}});function C(y){var w=y,{className:e,selected:t,variant:a,radius:o,appearance:n,mode:i,size:l,autoHeight:c,underlined:s,underline:f,asChild:m=!1,placeholder:b=!1}=w,p=g(w,["className","selected","variant","radius","appearance","mode","size","autoHeight","underlined","underline","asChild","placeholder"]);let D=m?ci.Slot:"button";return mi(D,r(r({"data-slot":"button",className:x(pi({variant:a,size:l,radius:o,appearance:n,mode:i,autoHeight:c,placeholder:b,underlined:s,underline:f,className:e}),m&&p.disabled&&"pointer-events-none opacity-50")},t&&{"data-state":"open"}),p))}import{jsx as $o}from"react/jsx-runtime";function pa(e){return $o("svg",d(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:$o("path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"#141B34",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}import{jsx as Wo}from"react/jsx-runtime";function Pt(e){return Wo("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:Wo("path",{fill:"currentColor",d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z"})}))}import{jsx as Ne,jsxs as Ja}from"react/jsx-runtime";function ui(e,t){let a=[];if(t<=7)for(let o=1;o<=t;o++)a.push(o);else e<=4?a.push(1,2,3,4,5,"ellipsis",t):e>=t-3?a.push(1,"ellipsis",t-4,t-3,t-2,t-1,t):a.push(1,"ellipsis",e-1,e,e+1,"ellipsis",t);return a}function Ko({className:e}){let{pagination:t,handlePageChange:a,files:o,folders:n}=E(),{currentPage:i,totalPages:l}=t,c=((o==null?void 0:o.length)||0)+((n==null?void 0:n.length)||0);if(l<=1||c===0)return null;let s=ui(i,l);return Ne(Uo,{className:e,children:Ja(Zo,{children:[Ne($t,{children:Ne(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===1,onClick:()=>i>1&&a(i-1),children:Ja("span",{children:[Ne(Pt,{className:"rtl:rotate-180"})," Previous"]})})}),s.map((f,m)=>f==="ellipsis"?Ne($t,{children:Ne(jo,{})},`ellipsis-${i}-${l}-${m}`):Ne($t,{children:Ne(C,{variant:f===i?"outline":"ghost",mode:"icon",size:"icon",radius:"full",asChild:!0,onClick:()=>a(f),disabled:f===i,children:Ne("span",{children:f})})},f)),Ne($t,{children:Ne(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===l,onClick:()=>i<l&&a(i+1),children:Ja("span",{children:["Next ",Ne(pa,{className:"rtl:rotate-180"})]})})})]})})}import{jsx as fi}from"react/jsx-runtime";function Yo({children:e,className:t}){return fi("div",{className:x("p-4 flex md:flex-row gap-2",t),children:e})}import{useState as tl}from"react";import{cva as gi}from"class-variance-authority";import{X as hi}from"lucide-react";import{Dialog as wt}from"radix-ui";import{jsx as _e,jsxs as Xa}from"react/jsx-runtime";var vi=gi("flex flex-col fixed outline-0 z-50 border border-border bg-background p-6 shadow-lg shadow-black/5 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-2xl",{variants:{variant:{default:"left-[50%] top-[50%] max-w-lg translate-x-[-50%] translate-y-[-50%] w-full",fullscreen:"inset-5"}},defaultVariants:{variant:"default"}});function Ie(t){var e=g(t,[]);return _e(wt.Root,r({"data-slot":"dialog"},e))}function xi(t){var e=g(t,[]);return _e(wt.Portal,r({"data-slot":"dialog-portal"},e))}function Ye(t){var e=g(t,[]);return _e(wt.Close,r({"data-slot":"dialog-close"},e))}function bi(a){var o=a,{className:e}=o,t=g(o,["className"]);return _e(wt.Overlay,r({"data-slot":"dialog-overlay",className:x("fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t))}function Pe(l){var c=l,{className:e,children:t,showCloseButton:a=!0,overlay:o=!0,variant:n}=c,i=g(c,["className","children","showCloseButton","overlay","variant"]);return Xa(xi,{children:[o&&_e(bi,{}),Xa(wt.Content,d(r({"data-slot":"dialog-content",className:x(vi({variant:n}),e)},i),{children:[t,a&&Xa(Ye,{className:"cursor-pointer outline-0 absolute end-5 top-5 rounded-full opacity-60 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[_e(hi,{className:"size-4"}),_e("span",{className:"sr-only",children:"Close"})]})]}))]})}var Ge=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return _e("div",r({"data-slot":"dialog-header",className:x("flex flex-col space-y-1 text-center sm:text-start mb-5",e)},t))},Be=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return _e("div",r({"data-slot":"dialog-footer",className:x("flex flex-col-reverse sm:flex-row sm:justify-end pt-5 sm:space-x-2.5",e)},t))};function ke(a){var o=a,{className:e}=o,t=g(o,["className"]);return _e(wt.Title,r({"data-slot":"dialog-title",className:x("text-lg font-semibold leading-none tracking-tight",e)},t))}function rt(a){var o=a,{className:e}=o,t=g(o,["className"]);return _e(wt.Description,r({"data-slot":"dialog-description",className:x("text-sm text-muted-foreground",e)},t))}import{cva as wi}from"class-variance-authority";import{X as Ci}from"lucide-react";import{jsx as kt,jsxs as Fi}from"react/jsx-runtime";var yi=wi("flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",{variants:{variant:{secondary:"",primary:"",destructive:"",success:"",info:"",mono:"",warning:""},icon:{primary:"",destructive:"",success:"",info:"",warning:""},appearance:{solid:"",outline:"",light:"",stroke:"text-foreground"},size:{lg:"rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 *:data-slot=alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-1",md:"rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 *:data-slot=alert-icon:mt-0 [&_[data-slot=alert-close]]:mt-0.5",sm:"rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 *:data-alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"}},compoundVariants:[{variant:"secondary",appearance:"solid",className:"bg-muted text-foreground"},{variant:"primary",appearance:"solid",className:"bg-primary text-primary-foreground"},{variant:"destructive",appearance:"solid",className:"bg-destructive text-destructive-foreground"},{variant:"success",appearance:"solid",className:"bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"},{variant:"info",appearance:"solid",className:"bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"},{variant:"warning",appearance:"solid",className:"bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"},{variant:"mono",appearance:"solid",className:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"},{variant:"secondary",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"primary",appearance:"outline",className:"border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"},{variant:"destructive",appearance:"outline",className:"border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"},{variant:"success",appearance:"outline",className:"border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"info",appearance:"outline",className:"border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"warning",appearance:"outline",className:"border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"mono",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"secondary",appearance:"light",className:"bg-muted border border-border text-foreground"},{variant:"primary",appearance:"light",className:"text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"},{variant:"destructive",appearance:"light",className:"bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "},{variant:"success",appearance:"light",className:"bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"},{variant:"info",appearance:"light",className:"bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"},{variant:"warning",appearance:"light",className:"bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"},{variant:"mono",icon:"primary",className:"[&_[data-slot=alert-icon]]:text-primary"},{variant:"mono",icon:"warning",className:"[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"},{variant:"mono",icon:"success",className:"[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"},{variant:"mono",icon:"destructive",className:"[&_[data-slot=alert-icon]]:text-destructive"},{variant:"mono",icon:"info",className:"[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"}],defaultVariants:{variant:"secondary",appearance:"solid",size:"md"}});function qo(f){var m=f,{className:e,variant:t,size:a,icon:o,appearance:n,close:i=!1,onClose:l,children:c}=m,s=g(m,["className","variant","size","icon","appearance","close","onClose","children"]);return Fi("div",d(r({"data-slot":"alert",role:"alert",className:x(yi({variant:t,size:a,icon:o,appearance:n}),e)},s),{children:[c,i&&kt("button",{onClick:l,"aria-label":"Dismiss","data-slot":"alert-close",className:x("group shrink-0 size-4 cursor-pointer"),children:kt(Ci,{className:"opacity-60 group-hover:opacity-100 size-4"})})]}))}function Qo(a){var o=a,{className:e}=o,t=g(o,["className"]);return kt("div",r({"data-slot":"alert-title",className:x("grow tracking-tight",e)},t))}function Jo(o){var n=o,{children:e,className:t}=n,a=g(n,["children","className"]);return kt("div",d(r({"data-slot":"alert-icon",className:x("shrink-0",t)},a),{children:e}))}function Xo(a){var o=a,{className:e}=o,t=g(o,["className"]);return kt("div",r({"data-slot":"alert-description",className:x("text-sm [&_p]:leading-relaxed [&_p]:mb-2",e)},t))}function er(a){var o=a,{className:e}=o,t=g(o,["className"]);return kt("div",r({"data-slot":"alert-content",className:x("space-y-2 [&_[data-slot=alert-title]]:font-semibold",e)},t))}import*as Se from"@radix-ui/react-tooltip";import{jsx as St,jsxs as Di}from"react/jsx-runtime";function Mi(a){var o=a,{delayDuration:e=0}=o,t=g(o,["delayDuration"]);return St(Se.Provider,r({"data-slot":"tooltip-provider",delayDuration:e},t))}function tr(t){var e=g(t,[]);return St(Mi,{children:St(Se.Root,r({"data-slot":"tooltip"},e))})}function ar(t){var e=g(t,[]);return St(Se.Trigger,r({"data-slot":"tooltip-trigger"},e))}function or(n){var i=n,{className:e,sideOffset:t=0,children:a}=i,o=g(i,["className","sideOffset","children"]);return St(Se.Portal,{children:Di(Se.Content,d(r({"data-slot":"tooltip-content",sideOffset:t,className:x("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e)},o),{children:[a,St(Se.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})}function ae(e){if(e===0)return"0 Bytes";let t=1024,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(t));return Number.parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+a[o]}import{useCallback as xe,useRef as Ni,useState as Ii,useEffect as Pi}from"react";var rr=(e={})=>{let{maxFiles:t=Number.POSITIVE_INFINITY,maxSize:a=Number.POSITIVE_INFINITY,accept:o="*",multiple:n=!1,initialFiles:i=[],onFilesChange:l,onFilesAdded:c,onError:s}=e,[f,m]=Ii({files:i.map(u=>({file:u,id:u.id,preview:u.url})),isDragging:!1,errors:[]}),b=Ni(null);Pi(()=>()=>{f.files.forEach(u=>{u.preview&&u.file instanceof File&&URL.revokeObjectURL(u.preview)})},[f.files]);let p=xe(u=>{if(u instanceof File){if(u.size>a)return`File "${u.name}" exceeds the maximum size of ${ae(a)}.`}else if(u.size>a)return`File "${u.name}" exceeds the maximum size of ${ae(a)}.`;if(o!=="*"){let S=o.split(",").map(V=>V.trim()),v=u instanceof File?u.type||"":u.type,T=`.${u instanceof File,u.name.split(".").pop()}`;if(!S.some(V=>{if(V.startsWith("."))return T.toLowerCase()===V.toLowerCase();if(V.endsWith("/*")){let fe=V.split("/")[0];return v.startsWith(`${fe}/`)}return v===V}))return`File "${u instanceof File,u.name}" is not an accepted file type.`}return null},[o,a]),y=xe(u=>u instanceof File?URL.createObjectURL(u):u.url,[]),w=xe(u=>u instanceof File?`${u.name}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`:u.id.toString(),[]),D=xe(()=>{m(u=>{for(let v of u.files)v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);b.current&&(b.current.value="");let S=d(r({},u),{files:[],errors:[]});return l==null||l(S.files),S})},[l]),F=xe(u=>{if(!u||u.length===0)return;let S=Array.from(u),v=[];m(T=>d(r({},T),{errors:[]})),n||D(),m(T=>{if(n&&t!==Number.POSITIVE_INFINITY&&T.files.length+S.length>t)return v.push(`You can only upload a maximum of ${t} files.`),s==null||s(v),d(r({},T),{errors:v});let R=[];for(let V of S){if(n&&T.files.some(k=>k.file.name===V.name&&k.file.size===V.size))continue;if(V.size>a){v.push(n?`Some files exceed the maximum size of ${ae(a)}.`:`File exceeds the maximum size of ${ae(a)}.`);continue}let fe=p(V);fe?v.push(fe):R.push({file:V,id:w(V),preview:y(V)})}if(R.length>0){c==null||c(R);let V=n?[...T.files,...R]:R;return l==null||l(V),d(r({},T),{files:V,errors:v})}else if(v.length>0)return s==null||s(v),d(r({},T),{errors:v});return T}),b.current&&(b.current.value="")},[t,n,a,p,y,w,D,l,c,s]),M=xe(u=>{m(S=>{let v=S.files.find(R=>R.id===u);v&&v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);let T=S.files.filter(R=>R.id!==u);return l==null||l(T),d(r({},S),{files:T,errors:[]})})},[l]),I=xe(()=>{m(u=>d(r({},u),{errors:[]}))},[]),P=xe(u=>{u.preventDefault(),u.stopPropagation(),m(S=>d(r({},S),{isDragging:!0}))},[]),h=xe(u=>{u.preventDefault(),u.stopPropagation(),!u.currentTarget.contains(u.relatedTarget)&&m(S=>d(r({},S),{isDragging:!1}))},[]),N=xe(u=>{u.preventDefault(),u.stopPropagation()},[]),H=xe(u=>{var S;if(u.preventDefault(),u.stopPropagation(),m(v=>d(r({},v),{isDragging:!1})),!((S=b.current)!=null&&S.disabled)&&u.dataTransfer.files&&u.dataTransfer.files.length>0)if(n)F(u.dataTransfer.files);else{let v=u.dataTransfer.files[0];F([v])}},[F,n]),q=xe(u=>{u.target.files&&u.target.files.length>0&&F(u.target.files)},[F]),oe=xe(()=>{b.current&&b.current.click()},[]),we=xe((u={})=>d(r({},u),{type:"file",onChange:q,accept:u.accept||o,multiple:u.multiple!==void 0?u.multiple:n,ref:b}),[o,n,q]);return[f,{addFiles:F,removeFile:M,clearFiles:D,clearErrors:I,handleDragEnter:P,handleDragLeave:h,handleDragOver:N,handleDrop:H,handleFileChange:q,openFileDialog:oe,getInputProps:we}]};import{RefreshCwIcon as al,TriangleAlert as ol}from"lucide-react";import fr from"mime";import{jsx as eo,jsxs as ki}from"react/jsx-runtime";function ma(e){return ki("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[eo("path",{fill:"#e5252a",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),eo("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),eo("path",{fill:"#fff",fillRule:"nonzero",d:"M5.79 29.86l0 -7.31 3.11 0c0.77,0 1.38,0.21 1.84,0.64 0.46,0.42 0.69,0.99 0.69,1.7 0,0.71 -0.23,1.28 -0.69,1.7 -0.46,0.43 -1.07,0.64 -1.84,0.64l-1.24 0 0 2.63 -1.87 0zm1.87 -4.22l1.03 0c0.28,0 0.5,-0.06 0.65,-0.2 0.15,-0.13 0.23,-0.31 0.23,-0.55 0,-0.24 -0.08,-0.42 -0.23,-0.55 -0.15,-0.14 -0.37,-0.2 -0.65,-0.2l-1.03 0 0 1.5zm4.54 4.22l0 -7.31 2.59 0c0.51,0 0.99,0.07 1.44,0.22 0.45,0.15 0.86,0.36 1.22,0.65 0.36,0.28 0.65,0.66 0.86,1.14 0.2,0.48 0.31,1.03 0.31,1.65 0,0.61 -0.11,1.16 -0.31,1.64 -0.21,0.48 -0.5,0.86 -0.86,1.14 -0.36,0.29 -0.77,0.5 -1.22,0.65 -0.45,0.15 -0.93,0.22 -1.44,0.22l-2.59 0zm1.83 -1.59l0.54 0c0.29,0 0.56,-0.03 0.81,-0.1 0.24,-0.07 0.47,-0.18 0.69,-0.33 0.21,-0.15 0.38,-0.36 0.5,-0.64 0.12,-0.28 0.18,-0.61 0.18,-0.99 0,-0.39 -0.06,-0.72 -0.18,-1 -0.12,-0.28 -0.29,-0.49 -0.5,-0.64 -0.22,-0.15 -0.45,-0.26 -0.69,-0.33 -0.25,-0.07 -0.52,-0.1 -0.81,-0.1l-0.54 0 0 4.13zm5.53 1.59l0 -7.31 5.2 0 0 1.59 -3.33 0 0 1.17 2.66 0 0 1.58 -2.66 0 0 2.97 -1.87 0z"})]}))}import{jsx as to,jsxs as Si}from"react/jsx-runtime";function ua(e){return Si("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[to("path",{fill:"#00733b",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),to("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),to("path",{fill:"#fff",d:"M5.21 17.35l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 -6.08l3.15 0 0 1.18 -3.15 0 0 -1.18zm-4.12 0l3.14 0 0 1.18 -3.14 0 0 -1.18zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2.08l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19z"})]}))}import{jsx as ao,jsxs as zi}from"react/jsx-runtime";function fa(e){return zi("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[ao("path",{fill:"#e03303",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),ao("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),ao("path",{fill:"#fff",fillRule:"nonzero",d:"M11.76 16.13c-2.44,0.12 -4.38,2.15 -4.35,4.62 0.04,2.46 2.04,4.47 4.5,4.5 2.48,0.04 4.51,-1.9 4.62,-4.34 0.01,-0.12 -0.09,-0.22 -0.21,-0.22l-4.13 0c-0.12,0 -0.22,-0.1 -0.22,-0.21l0 -4.14c0,-0.12 -0.09,-0.21 -0.21,-0.21zm1.1 -0.67l0 4.13c0,0.12 0.09,0.21 0.21,0.21l4.14 0c0.12,0 0.21,-0.1 0.21,-0.22 -0.11,-2.34 -1.99,-4.22 -4.34,-4.33 -0.12,-0.01 -0.22,0.09 -0.22,0.21z"})]}))}import{jsx as oo,jsxs as Ti}from"react/jsx-runtime";function ga(e){return Ti("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 38.89 51.99",width:"100",height:"100"},e),{children:[oo("path",{fill:"#0263d1",fillRule:"nonzero",d:"M6.76 0l17.4 0 14.73 15.36 0 29.87c0,3.73 -3.03,6.76 -6.77,6.76l-25.36 0c-3.73,0 -6.76,-3.03 -6.76,-6.76l0 -38.47c0,-3.73 3.03,-6.76 6.76,-6.76z"}),oo("polygon",{fill:"#fff",fillOpacity:".302",points:"24.14 0 24.14 15.24 38.89 15.24"}),oo("path",{fill:"#fff",fillRule:"nonzero",d:"M26.3 27.05l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm-4.57 13.71l-9.14 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l9.14 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm4.57 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm0 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0z"})]}))}import{jsx as ro,jsxs as Ri}from"react/jsx-runtime";function ha(e){return Ri("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[ro("path",{fill:"#ffc000",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),ro("polygon",{fill:"#ffffff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),ro("path",{fill:"#ffffff",fillRule:"nonzero",d:"M16.45 21.21l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm0 2.86l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm-4.36 -8.57l-4.21 0c-0.4,0 -0.72,0.31 -0.72,0.71 0,0.4 0.32,0.71 0.72,0.71l4.21 0c0.4,0 0.72,-0.31 0.72,-0.71 0,-0.4 -0.32,-0.71 -0.72,-0.71l0 0zm4.36 2.85l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0z"})]}))}import{jsx as zt,jsxs as no}from"react/jsx-runtime";function va(e){return no("svg",d(r({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:[no("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1",x1:"37.127",x2:"25.868",y1:"6.873",y2:"18.132",gradientUnits:"userSpaceOnUse",children:[zt("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),zt("stop",{offset:".913",stopColor:"#262626",stopOpacity:".8"})]}),zt("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1)",d:"M28,4v8c0,2.209,1.791,4,4,4h8L28,4z",children:" "}),no("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2",x1:"-8.398",x2:"74.731",y1:"51.185",y2:"-18.568",gradientUnits:"userSpaceOnUse",children:[zt("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),zt("stop",{offset:"1",stopColor:"#262626",stopOpacity:".8"})]}),zt("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2)",d:"M40,16v23c0,2.761-2.239,5-5,5H8V9c0-2.761,2.239-5,5-5h15L40,16z"})]}))}import{jsx as io,jsxs as Ei}from"react/jsx-runtime";function xa(e){return Ei("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100","aria-hidden":"true"},e),{children:[io("path",{fill:"#ffb11f",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),io("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),io("path",{fill:"#fff",fillRule:"nonzero",d:"M8.96 16.9l0 -2.22c0,-0.24 -0.19,-0.43 -0.43,-0.43l-1.2 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 2.22 -0.67 1.96c-0.19,0.55 -0.1,1.16 0.24,1.63 0.33,0.47 0.88,0.75 1.46,0.75 0.58,0 1.12,-0.28 1.46,-0.75 0.34,-0.47 0.43,-1.08 0.24,-1.63l-0.67 -1.96zm-0.28 3.08c-0.34,0.49 -1.16,0.49 -1.51,0 -0.17,-0.24 -0.22,-0.56 -0.12,-0.84l0.22 -0.66 1.31 0 0.23 0.66c0.09,0.28 0.05,0.6 -0.13,0.84zm-3.41 -17.65l0 1.22c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.82 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.94c0,0.24 0.19,0.44 0.43,0.44l1.63 0 0 1.81 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.95c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.38c0,0.24 0.2,0.43 0.44,0.43l2.39 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.23 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.24 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.2 0.43,-0.44l0 -0.94c0,-0.24 -0.2,-0.44 -0.43,-0.44l-1.64 0 0 -1.66c0,0 -3.25,0.01 -3.25,0.01z"})]}))}import{jsx as lo,jsxs as Ai}from"react/jsx-runtime";function ba(e){return Ai("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 20.49 27.4",width:"100",height:"100","aria-hidden":"true"},e),{children:[lo("path",{fill:"#00a1e0",d:"M3.56 0l9.17 0 7.76 8.1 0 15.73c0,1.97 -1.59,3.57 -3.56,3.57l-13.37 0c-1.96,0 -3.56,-1.6 -3.56,-3.57l0 -20.27c0,-1.96 1.6,-3.56 3.56,-3.56z"}),lo("polygon",{fill:"#fff",fillOpacity:".302",points:"12.72 0 12.72 8.03 20.49 8.03"}),lo("path",{fill:"#fff",fillRule:"nonzero",d:"M12.07 20.44l-0.52 0 0 -0.99 0.11 0c0.26,0 0.39,-0.14 0.39,-0.42l0 -1.45c0,-0.23 0.06,-0.41 0.16,-0.53 0.11,-0.11 0.27,-0.21 0.48,-0.3 -0.2,-0.08 -0.36,-0.18 -0.47,-0.3 -0.11,-0.12 -0.17,-0.29 -0.17,-0.52l0 -1.45c0,-0.28 -0.13,-0.42 -0.39,-0.42l-0.11 0 0 -0.99 0.52 0c0.31,0 0.56,0.1 0.76,0.3 0.2,0.2 0.3,0.45 0.3,0.75l0 1.55c0,0.38 0.21,0.57 0.63,0.57l0 1.03c-0.42,0 -0.63,0.19 -0.63,0.58l0 1.54c0,0.3 -0.1,0.55 -0.3,0.75 -0.2,0.2 -0.45,0.3 -0.76,0.3zm-3.65 0c-0.3,0 -0.56,-0.1 -0.76,-0.3 -0.2,-0.2 -0.3,-0.45 -0.3,-0.75l0 -1.54c0,-0.39 -0.21,-0.58 -0.63,-0.58l0 -1.03c0.42,0 0.63,-0.19 0.63,-0.57l0 -1.55c0,-0.3 0.1,-0.55 0.3,-0.75 0.2,-0.2 0.46,-0.3 0.76,-0.3l0.53 0 0 0.99 -0.12 0c-0.26,0 -0.39,0.14 -0.39,0.42l0 1.45c0,0.23 -0.05,0.4 -0.16,0.52 -0.11,0.12 -0.27,0.22 -0.48,0.3 0.21,0.09 0.37,0.19 0.48,0.3 0.11,0.12 0.16,0.3 0.16,0.53l0 1.45c0,0.28 0.13,0.42 0.39,0.42l0.12 0 0 0.99 -0.53 0z"})]}))}import{jsx as so,jsxs as _i}from"react/jsx-runtime";function wa(e){return _i("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[so("path",{fill:"#90c",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),so("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),so("path",{fill:"#fff",fillRule:"nonzero",d:"M15.07 21.38c0.31,-0.52 0.52,-1.18 0.56,-1.83 0.02,-0.42 -0.07,-0.86 -0.27,-1.27 -0.32,-0.65 -0.86,-1.01 -1.39,-1.37 -0.39,-0.26 -0.76,-0.51 -1.02,-0.86l-0.05 -0.06c-0.15,-0.21 -0.33,-0.45 -0.36,-0.65 -0.02,-0.2 -0.21,-0.34 -0.4,-0.33 -0.21,0.02 -0.36,0.18 -0.36,0.39l0 6.86c-0.32,-0.2 -0.72,-0.32 -1.16,-0.32 -1.06,0 -1.92,0.69 -1.92,1.54 0,0.85 0.86,1.54 1.92,1.54 1.06,0 1.93,-0.69 1.93,-1.54l0 -4.49c0.58,0.23 1.52,0.79 1.78,2.1 -0.05,0.07 -0.09,0.15 -0.15,0.21 -0.14,0.16 -0.12,0.4 0.04,0.55 0.16,0.14 0.4,0.12 0.54,-0.04 0.1,-0.12 0.2,-0.25 0.28,-0.4 0.01,-0.01 0.02,-0.02 0.03,-0.03z"})]}))}import{jsx as te,jsxs as nr}from"react/jsx-runtime";function Ca(e){return nr("svg",d(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[te("path",{fill:"#188a32",d:"M56,35v8c0,1.66-1.34,3-3,3H11c-1.66,0-3-1.34-3-3v-8c0-1.66,1.34-3,3-3h42C54.66,32,56,33.34,56,35z"}),te("path",{fill:"#0082AA",d:"M44,29v5c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3v-5h4v4h16v-4H44z"}),te("path",{fill:"#4d50c6",d:`M53,32H11c-1.657,0-3-1.343-3-3v-8c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
9
- C56,30.657,54.657,32,53,32z`}),te("path",{fill:"#e6275e",d:`M53,18H11c-1.657,0-3-1.343-3-3V7c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
10
- C56,16.657,54.657,18,53,18z`}),te("rect",{width:"16",height:"42",x:"24",y:"4",fill:"#FAB400"}),te("path",{fill:"#DC9600",d:"M32,46L32,46c-4.418,0-8-3.582-8-8v-4h16v4C40,42.418,36.418,46,32,46z"}),te("path",{fill:"#FAB400",d:"M32,44L32,44c-4.418,0-8-3.582-8-8v-4h16v4C40,40.418,36.418,44,32,44z"}),te("rect",{width:"16",height:"4",x:"24",y:"33",fill:"#DC9600"}),te("path",{fill:"#F0F0F0",d:`M44,17v16c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3V17c0-1.66,1.34-3,3-3h1v18h16V14h1
11
- C42.66,14,44,15.34,44,17z`}),te("path",{fill:"#D2D2D2",d:"M34,31v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H34z"}),te("path",{fill:"#F0F0F0",d:`M32,34L32,34c-1.105,0-2-0.895-2-2v-8c0-1.105,0.895-2,2-2h0c1.105,0,2,0.895,2,2v8
12
- C34,33.105,33.105,34,32,34z`}),te("circle",{cx:"32",cy:"18",r:"2",fill:"#C80A50"}),te("circle",{cx:"32",cy:"10",r:"2",fill:"#00A0C8"}),te("path",{fill:"#F0F0F0",d:"M34,18h-4c0-1.1,0.9-2,2-2S34,16.9,34,18z"}),te("path",{fill:"#0A5078",d:`M47,60H17c-1.105,0-2-0.895-2-2V44c0-1.105,0.895-2,2-2h30c1.105,0,2,0.895,2,2v14
13
- C49,59.105,48.105,60,47,60z`}),te("path",{fill:"#F0F0F0",d:`M35,53h-6c-0.552,0-1-0.448-1-1v-3c0-2.206,1.794-4,4-4s4,1.794,4,4v3C36,52.552,35.552,53,35,53z
14
- M30,51h4v-2c0-1.103-0.897-2-2-2s-2,0.897-2,2V51z`}),te("path",{fill:"#F0F0F0",d:"M29 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C30 56.552 29.552 57 29 57zM35 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C36 56.552 35.552 57 35 57zM42 53h-3c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h3c2.206 0 4 1.794 4 4S44.206 53 42 53zM40 51h2c1.103 0 2-.897 2-2s-.897-2-2-2h-2V51z"}),te("path",{fill:"#F0F0F0",d:"M39 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C40 56.552 39.552 57 39 57zM45.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C45.304 56.966 45.151 57 45.001 57z"}),nr("g",{children:[te("path",{fill:"#F0F0F0",d:`M22,53h-3c-0.552,0-1-0.448-1-1v-6c0-0.552,0.448-1,1-1h3c2.206,0,4,1.794,4,4S24.206,53,22,53z
15
- M20,51h2c1.103,0,2-0.897,2-2s-0.897-2-2-2h-2V51z`}),te("path",{fill:"#F0F0F0",d:"M19 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C20 56.552 19.552 57 19 57zM25.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C25.304 56.966 25.151 57 25.001 57z"})]})]}))}import{jsx as ir,jsxs as Li}from"react/jsx-runtime";function ya(e){return Li("svg",d(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"100",height:"100"},e),{children:[ir("path",{fill:"#e8e9ea",d:`M8.16,17.51V3.74c0-1.79,1.45-3.24,3.24-3.24h20.53l12.79,12.8v30.96c0,1.79-1.45,3.24-3.24,3.24H11.4
16
- c-1.79,0-3.24-1.45-3.24-3.24v-1.62`}),ir("path",{fill:"#697d7f",d:"M44.72 13.3h-9.93c-1.58 0-2.86-1.28-2.86-2.86V.5M11.53 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H4.78c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76H11.53zM36.33 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-6.75c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-5.25v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-3.98v-2.76H36.33zM15.55 36.67c.26.19.57.28.87.28.47 0 .93-.22 1.22-.63l2.92-4.07 2.92 4.07c.29.41.75.63 1.22.63.3 0 .61-.09.87-.28.67-.48.83-1.42.34-2.09l-3.51-4.89 3.51-4.89c.48-.67.33-1.61-.34-2.09-.67-.48-1.61-.33-2.09.34l-2.92 4.07-2.92-4.07c-.48-.67-1.42-.83-2.09-.34-.67.48-.83 1.42-.34 2.09l3.51 4.89-3.51 4.89C14.72 35.25 14.87 36.19 15.55 36.67z"})]}))}import{jsx as co,jsxs as Vi}from"react/jsx-runtime";function Tt(e){return Vi("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[co("path",{fill:"#0ac963",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),co("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),co("path",{fill:"#fff",d:"M11.85 11.82l-6.01 0c-0.45,0 -0.82,0.37 -0.82,0.82l0 3.82c0,0.45 0.37,0.82 0.82,0.82l6.01 0c0.45,0 0.81,-0.37 0.81,-0.82l0 -3.82c0,-0.45 -0.36,-0.82 -0.81,-0.82zm-4.37 1.03c0.49,0 0.88,0.4 0.88,0.88 0,0.49 -0.39,0.89 -0.88,0.89 -0.49,0 -0.89,-0.4 -0.89,-0.89 0,-0.48 0.4,-0.88 0.89,-0.88zm4.64 3.61c0,0.15 -0.12,0.28 -0.27,0.28l-6.01 0c-0.15,0 -0.27,-0.13 -0.27,-0.28l0 -0.16 1.09 -1.09 0.9 0.9c0.11,0.11 0.28,0.11 0.39,0l2.26 -2.26 1.91 1.91 0 0.7 0 0z"})]}))}import{jsx as po,jsxs as Oi}from"react/jsx-runtime";function Fa(e){return Oi("svg",d(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[po("path",{fill:"#fa0000",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),po("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),po("path",{fill:"#fff",fillRule:"nonzero",d:"M14.97 18.16c-3.57,0 -6.47,2.9 -6.47,6.47 0,3.57 2.9,6.46 6.47,6.46 3.57,0 6.46,-2.89 6.46,-6.46 0,-3.57 -2.9,-6.46 -6.46,-6.47zm2.72 6.67c-0.05,0.09 -0.12,0.16 -0.21,0.21l0 0 -3.69 1.85c-0.23,0.11 -0.51,0.02 -0.62,-0.21 -0.04,-0.06 -0.05,-0.13 -0.05,-0.21l0 -3.69c0,-0.26 0.21,-0.46 0.46,-0.46 0.07,0 0.14,0.01 0.21,0.05l3.69 1.84c0.23,0.12 0.32,0.39 0.21,0.62z"})]}))}import{jsx as Ct,jsxs as Gi}from"react/jsx-runtime";function Ma(e){return Gi("svg",d(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[Ct("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
17
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),Ct("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
18
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),Ct("rect",{width:"58.6",height:"21.1",x:"1.6",y:"14.7",fill:"#ffffff"}),Ct("rect",{width:".8",height:"21.1",x:"1.6",y:"14.7",fill:"#f3f3f3"}),Ct("rect",{width:"58.6",height:".9",x:"1.6",y:"14.7",fill:"#f3f1f1"}),Ct("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
19
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),Ct("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
20
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}import{jsx as Da,jsxs as Bi}from"react/jsx-runtime";function Na(e){return Bi("svg",d(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[Da("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
21
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),Da("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
22
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),Da("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
23
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),Da("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
24
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}import{jsx as re,jsxs as Rt}from"react/jsx-runtime";function qe(e){return re("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:Rt("g",{fill:"none",children:[re("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"origin",mask:"url(#1752500502786-6297956_folder_mask_2iow0yqdp)"}),re("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"clone",filter:"url(#1752500502786-6297956_folder_filter_56qas2ark)",clipPath:"url(#1752500502786-6297956_folder_clipPath_gygn8e14a)"}),re("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)","data-glass":"blur"}),re("path",{d:"M18.6807 9.00586C19.7975 9.02423 20.4692 9.09846 20.9864 9.39258C21.5915 9.73676 22.0586 10.2802 22.3067 10.9307C22.5894 11.6719 22.4426 12.6251 22.1495 14.5303L21.626 17.9297C21.4038 19.3742 21.2926 20.097 20.9385 20.6396L20.8155 20.8135C20.5147 21.2098 20.1193 21.5262 19.6641 21.7324C19.074 21.9997 18.3431 22 16.8819 22V21.25C17.624 21.25 18.1389 21.2495 18.543 21.2188C18.9374 21.1887 19.1709 21.133 19.3546 21.0498C19.7447 20.873 20.0766 20.5882 20.3106 20.2295C20.4208 20.0606 20.5119 19.8385 20.6016 19.4531C20.6935 19.0584 20.772 18.5489 20.8848 17.8154L21.4083 14.416C21.5568 13.4504 21.6601 12.7732 21.6954 12.2441C21.7302 11.7223 21.6913 11.4231 21.6055 11.1982C21.4194 10.7103 21.0693 10.3021 20.6153 10.0439C20.4061 9.92506 20.1166 9.84086 19.5958 9.7959C19.0675 9.75031 18.3823 9.75 17.4053 9.75H6.59479C5.61785 9.75 4.93266 9.75032 4.40436 9.7959C3.88353 9.84086 3.59399 9.92504 3.38483 10.0439C2.93088 10.3021 2.5807 10.7103 2.3946 11.1982C2.30885 11.4231 2.26996 11.7223 2.30475 12.2441C2.34005 12.7732 2.44331 13.4504 2.59186 14.416L3.1153 17.8154C3.22814 18.5489 3.30665 19.0584 3.3985 19.4531C3.4882 19.8385 3.5793 20.0606 3.68952 20.2295C3.92357 20.5882 4.25545 20.873 4.64558 21.0498C4.82929 21.133 5.06268 21.1887 5.4571 21.2188C5.86121 21.2495 6.37613 21.25 7.11823 21.25V22L6.14948 21.9961C5.44148 21.9856 4.96108 21.9493 4.56452 21.8213L4.336 21.7324C3.88079 21.5262 3.48544 21.2098 3.18464 20.8135L3.06159 20.6396C2.79608 20.2327 2.66703 19.7244 2.52546 18.8867L2.37409 17.9297L1.85065 14.5303C1.57585 12.744 1.42974 11.7947 1.64558 11.0723L1.6944 10.9307C1.91158 10.3615 2.29578 9.8738 2.79401 9.53027L3.01374 9.39258C3.70332 9.00046 4.66737 9 6.59479 9H17.4053L18.6807 9.00586ZM16.8819 21.25V22H7.11823V21.25H16.8819Z",fill:"url(#1752500502786-6297956_folder_existing_2_vhap9347d)"}),Rt("defs",{children:[Rt("linearGradient",{id:"1752500502786-6297956_folder_existing_0_ekojck6b3",x1:"12",y1:"2",x2:"12",y2:"16",gradientUnits:"userSpaceOnUse",children:[re("stop",{stopColor:"#575757"}),re("stop",{offset:"1",stopColor:"#151515"})]}),Rt("linearGradient",{id:"1752500502786-6297956_folder_existing_1_v5o9796uz",x1:"23",y1:"15.5",x2:"1",y2:"15.5",gradientUnits:"userSpaceOnUse",children:[re("stop",{stopColor:"#E3E3E5",stopOpacity:".6"}),re("stop",{offset:"1",stopColor:"#BBBBC0",stopOpacity:".6"})]}),Rt("linearGradient",{id:"1752500502786-6297956_folder_existing_2_vhap9347d",x1:"12",y1:"9",x2:"12",y2:"16.528",gradientUnits:"userSpaceOnUse",children:[re("stop",{stopColor:"#fff"}),re("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0"})]}),re("filter",{id:"1752500502786-6297956_folder_filter_56qas2ark",x:"-100%",y:"-100%",width:"400%",height:"400%",filterUnits:"objectBoundingBox",primitiveUnits:"userSpaceOnUse",children:re("feGaussianBlur",{stdDeviation:"2",x:"0%",y:"0%",width:"100%",height:"100%",in:"SourceGraphic",edgeMode:"none",result:"blur"})}),re("clipPath",{id:"1752500502786-6297956_folder_clipPath_gygn8e14a",children:re("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)"})}),Rt("mask",{id:"1752500502786-6297956_folder_mask_2iow0yqdp",children:[re("rect",{width:"100%",height:"100%",fill:"#FFF"}),re("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"#000"})]})]})]})}))}import{jsx as lr,jsxs as Hi}from"react/jsx-runtime";function Ia(e){return Hi("svg",d(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[lr("path",{opacity:"0.4",d:"M13.4919 2.29395C13.0743 1.94268 12.5457 1.75 11.9997 1.75C11.5221 1.75 11.058 1.89775 10.6697 2.16992L10.5085 2.29395L1.5974 9.78906C1.18491 10.1364 1.13178 10.7528 1.47924 11.165C1.78946 11.5327 2.31307 11.6121 2.71557 11.3789V15.9531V15.955C2.71555 17.0543 2.71553 17.9612 2.7976 18.6885C2.88313 19.4463 3.06823 20.1292 3.52318 20.7217L3.68627 20.9199C3.85487 21.1119 4.04268 21.2876 4.24584 21.4434L4.47143 21.6016C5.01004 21.9427 5.61706 22.0932 6.281 22.168C7.00121 22.2491 7.89724 22.249 8.98176 22.249H8.99975H14.9997H15.0178C16.1023 22.249 16.9983 22.2491 17.7185 22.168C18.4771 22.0825 19.1606 21.8977 19.7537 21.4434L19.9529 21.2803C20.145 21.1119 20.3205 20.9245 20.4763 20.7217L20.6345 20.4961C20.976 19.9581 21.127 19.3517 21.2019 18.6885C21.284 17.9612 21.2839 17.0543 21.2839 15.955V15.9531V11.3789C21.6864 11.6121 22.21 11.5327 22.5203 11.165C22.846 10.7785 22.8199 10.2127 22.4753 9.85742L13.4919 2.29395Z",fill:"#141B34"}),lr("path",{d:"M14.9998 17V22.249H8.99979V17C8.99979 15.5859 9.00002 14.8788 9.43924 14.4395C9.87855 14.0001 10.5857 14 11.9998 14C13.4139 14 14.121 14.0002 14.5603 14.4395C14.9997 14.8788 14.9998 15.5858 14.9998 17Z",fill:"#141B34"})]}))}import{jsx as sr}from"react/jsx-runtime";function ze(e){return sr("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:sr("path",{fill:"currentColor",d:"M46.599 46.599a4.498 4.498 0 0 1-6.363 0l-7.941-7.941C29.028 40.749 25.167 42 21 42 9.402 42 0 32.598 0 21S9.402 0 21 0s21 9.402 21 21c0 4.167-1.251 8.028-3.342 11.295l7.941 7.941a4.498 4.498 0 0 1 0 6.363zM21 6C12.717 6 6 12.714 6 21s6.717 15 15 15c8.286 0 15-6.714 15-15S29.286 6 21 6z"})}))}import{jsx as dr,jsxs as Ui}from"react/jsx-runtime";function Wt(e){return Ui("svg",d(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[dr("path",{fill:"currentColor",opacity:"0.4",d:"M20.4155 3.66085C22.3012 5.52939 19.2842 20.7253 16.1883 20.9931C13.5911 21.2177 12.7819 16.0954 12.2348 14.4719C11.695 12.8696 11.0943 12.2927 9.50513 11.767C5.46811 10.4315 3.4496 9.76374 3.04996 8.70639C1.99171 5.90649 18.0071 1.27438 20.4155 3.66085Z"}),dr("path",{fill:"currentColor",d:"M3.04996 8.70639C3.4496 9.76374 5.46811 10.4315 9.50513 11.767C10.3308 12.0402 10.8897 12.3271 11.3118 12.7646L20.4155 3.66085C18.0071 1.27438 1.99171 5.90649 3.04996 8.70639Z"})]}))}import{jsx as rc,jsxs as nc}from"react/jsx-runtime";import{jsx as cr,jsxs as Zi}from"react/jsx-runtime";function yt(e){return Zi("svg",d(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[cr("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.75 11.7499C18.3023 11.7499 18.75 12.1977 18.75 12.7499V15.7499H21.75C22.3023 15.7499 22.75 16.1977 22.75 16.7499C22.75 17.3022 22.3023 17.7499 21.75 17.7499H18.75V20.7499C18.75 21.3022 18.3023 21.7499 17.75 21.7499C17.1977 21.7499 16.75 21.3022 16.75 20.7499V17.7499H13.75C13.1977 17.7499 12.75 17.3022 12.75 16.7499C12.75 16.1977 13.1977 15.7499 13.75 15.7499H16.75V12.7499C16.75 12.1977 17.1977 11.7499 17.75 11.7499Z",fill:"currentColor"}),cr("path",{opacity:"0.4",d:"M9.4626 2.48876C8.82373 2.24919 8.11205 2.24951 7.08264 2.24996C6.2039 2.24995 5.32205 2.24999 4.7497 2.30044C4.15996 2.35243 3.64388 2.46238 3.17258 2.7254C2.56533 3.06428 2.06428 3.56534 1.7254 4.17258C1.46238 4.64388 1.35242 5.15996 1.30044 5.7497C1.24999 6.32205 1.24999 7.03077 1.25 7.9095V11.0574C1.24999 13.3658 1.24998 15.1748 1.43975 16.5863C1.63399 18.031 2.03933 19.1711 2.93414 20.0659C3.82895 20.9607 4.96897 21.366 6.41371 21.5603C7.82519 21.75 9.63423 21.75 11.9426 21.75H13.2923C14.1084 21.75 14.8409 21.75 15.5 21.7383V18.9999H13.75C12.5074 18.9999 11.5 17.9926 11.5 16.7499C11.5 15.5073 12.5074 14.4999 13.75 14.4999H15.5V12.7499C15.5 11.5073 16.5074 10.4999 17.75 10.4999C18.9926 10.4999 20 11.5073 20 12.7499V14.4999H22.7383C22.75 13.8408 22.75 13.1084 22.75 12.2923C22.75 11.2733 22.75 10.3688 22.683 9.70949C22.6137 9.02893 22.4669 8.43872 22.118 7.91661C21.8444 7.50715 21.4929 7.15559 21.0834 6.88199C20.5613 6.53313 19.9711 6.38628 19.2905 6.31705C18.6312 6.24998 17.8095 6.24999 16.7905 6.25L13.2361 6.25C12.92 6.25 12.7396 6.24908 12.6064 6.23531C12.5044 6.22817 12.4348 6.15255 12.4128 6.11563C12.3409 6.0027 12.0838 5.48909 11.9425 5.20636C11.4704 4.25121 10.8581 3.01205 9.4626 2.48876Z",fill:"currentColor"})]}))}import{jsx as pr}from"react/jsx-runtime";function Ft(e){return pr("svg",d(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:pr("path",{fill:"currentColor",d:"M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"})}))}import{jsx as mo,jsxs as ji}from"react/jsx-runtime";function He(e){return ji("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:[mo("path",{fill:"currentColor",d:"M3 6.386c0-.484.345-.877.771-.877h2.665c.529-.016.996-.399 1.176-.965l.03-.1l.115-.391c.07-.24.131-.45.217-.637c.338-.739.964-1.252 1.687-1.383c.184-.033.378-.033.6-.033h3.478c.223 0 .417 0 .6.033c.723.131 1.35.644 1.687 1.383c.086.187.147.396.218.637l.114.391l.03.1c.18.566.74.95 1.27.965h2.57c.427 0 .772.393.772.877s-.345.877-.771.877H3.77c-.425 0-.77-.393-.77-.877"}),mo("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.425 11.482c.413-.044.78.273.821.707l.5 5.263c.041.433-.26.82-.671.864c-.412.043-.78-.273-.821-.707l-.5-5.263c-.041-.434.26-.821.671-.864m5.15 0c.412.043.713.43.671.864l-.5 5.263c-.04.434-.408.75-.82.707c-.413-.044-.713-.43-.672-.864l.5-5.264c.041-.433.409-.75.82-.707",clipRule:"evenodd"}),mo("path",{fill:"currentColor",d:"M11.596 22h.808c2.783 0 4.174 0 5.08-.886c.904-.886.996-2.339 1.181-5.245l.267-4.188c.1-1.577.15-2.366-.303-2.865c-.454-.5-1.22-.5-2.753-.5H8.124c-1.533 0-2.3 0-2.753.5s-.404 1.288-.303 2.865l.267 4.188c.185 2.906.277 4.36 1.182 5.245c.905.886 2.296.886 5.079.886",opacity:"0.5"})]}))}import{jsx as mr}from"react/jsx-runtime";function ce(e){return mr("svg",d(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),{children:mr("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"})}))}import{jsx as Pa,jsxs as $i}from"react/jsx-runtime";function ka(e){return $i("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Pa("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Pa("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),Pa("path",{d:"M7 11l5 5l5 -5"}),Pa("path",{d:"M12 4l0 12"})]}))}import{jsx as Sa,jsxs as Wi}from"react/jsx-runtime";function za(e){return Wi("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Sa("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Sa("path",{d:"M9 15l6 -6"}),Sa("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),Sa("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]}))}import{jsx as ur}from"react/jsx-runtime";function Ta(e){return ur("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:ur("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.944 1.25H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S3.025 4.705 2.89 5.71c-.138 1.029-.14 2.383-.14 4.29a.75.75 0 0 1-1.5 0v-.056c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153m8.345 1.64c-1.027-.138-2.382-.14-4.289-.14a.75.75 0 0 1 0-1.5h.056c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238c.748.749 1.08 1.698 1.238 2.87c.153 1.14.153 2.595.153 4.433V10a.75.75 0 0 1-1.5 0c0-1.907-.002-3.261-.14-4.29c-.135-1.005-.389-1.585-.812-2.008s-1.003-.677-2.009-.812M2 13.25a.75.75 0 0 1 .75.75c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V14a.75.75 0 0 1 .75-.75m20 0a.75.75 0 0 1 .75.75v.056c0 1.838 0 3.294-.153 4.433c-.158 1.172-.49 2.121-1.238 2.87c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812s.677-1.003.812-2.009c.138-1.027.14-2.382.14-4.289a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})}))}import{jsx as ge}from"react/jsx-runtime";function Ue(e,t){if(typeof e!="string")return console.warn("getFileTypeFromMime: mimeType is not a string:",e),K.FILE;let a=e;if(t){let o=t.toLowerCase().replace(/^\./,""),n=fr.getType(o);n&&(a=n)}return a.startsWith("image/")?K.IMAGE:a.startsWith("video/")?K.VIDEO:a.startsWith("audio/")?K.AUDIO:K.FILE}function Ra(e,t){let a=e;if(t){let o=t.toLowerCase().replace(/^\./,""),n=fr.getType(o);n&&(a=n)}if(a.startsWith("image/"))return"image";if(a.startsWith("video/"))return"video";if(a.startsWith("audio/"))return"audio";switch(a){case"application/pdf":return"pdf";case"application/json":return"json";case"application/zip":case"application/x-zip-compressed":return"zip";case"application/x-rar-compressed":case"application/vnd.rar":return"rar";case"application/x-msdownload":case"application/x-executable":return"exe";case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.ms-excel":case"text/csv":return"excel";case"application/vnd.openxmlformats-officedocument.presentationml.presentation":case"application/vnd.ms-powerpoint":return"powerpoint";case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return"document"}if(a.startsWith("text/"))return"txt";if(t)switch(t.toLowerCase().replace(/^\./,"")){case"exe":case"msi":return"exe";case"zip":return"zip";case"rar":return"rar";case"pdf":return"pdf";case"csv":return"excel"}return"file"}var nt=o=>{var n=o,{type:e,className:t}=n,a=g(n,["type","className"]);switch(e){case"folder-with-files":return ge(Ma,r({className:t},a));case"folder":return ge(Na,r({className:t},a));case"image":return ge(Tt,r({className:t},a));case"video":return ge(Fa,r({className:t},a));case"audio":return ge(wa,r({className:t},a));case"pdf":return ge(ma,r({className:t},a));case"excel":case"xlsx":return ge(ua,r({className:t},a));case"powerpoint":case"pptx":return ge(fa,r({className:t},a));case"document":case"docx":case"doc":return ge(ga,r({className:t},a));case"txt":return ge(ha,r({className:t},a));case"json":return ge(ba,r({className:t},a));case"zip":return ge(xa,r({className:t},a));case"rar":return ge(Ca,r({className:t},a));case"exe":return ge(ya,r({className:t},a));default:return ge(va,r({className:t},a))}};function gr(e){if(!e||e.length===0)return"*/*";let t=[];for(let a of e)switch(a){case K.IMAGE:t.push("image/*");break;case K.VIDEO:t.push("video/*");break;case K.AUDIO:t.push("audio/*");break;case K.FILE:t.push("application/*","text/*");break}return t.join(",")}function hr(e){if(!e||e.length===0)return"All files";let t=[];for(let a of e)switch(a){case K.IMAGE:t.push("Images");break;case K.VIDEO:t.push("Videos");break;case K.AUDIO:t.push("Audio");break;case K.FILE:t.push("Files");break}return t.join(", ")}import{jsx as vr,jsxs as Ki}from"react/jsx-runtime";function uo(e){return Ki("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",color:"currentColor"},e),{children:[vr("path",{d:"M13.0059 21.25C13.0059 21.8023 12.5581 22.25 12.0059 22.25C11.4536 22.25 11.0059 21.8023 11.0059 21.25L11.0059 16.75L10.4116 16.75C10.236 16.7501 10.0203 16.7503 9.84387 16.7282L9.84053 16.7278C9.71408 16.712 9.13804 16.6402 8.86368 16.0746C8.58872 15.5078 8.89065 15.0076 8.95597 14.8994L8.95841 14.8954C9.05062 14.7424 9.18477 14.5715 9.29511 14.4309L9.31885 14.4007C9.61348 14.0249 9.99545 13.5406 10.3759 13.1496C10.5657 12.9545 10.783 12.7533 11.0139 12.5944C11.2191 12.4532 11.5693 12.25 12 12.25C12.4307 12.25 12.7809 12.4532 12.9861 12.5944C13.217 12.7533 13.4343 12.9545 13.6241 13.1496C14.0046 13.5406 14.3865 14.0249 14.6812 14.4007L14.7049 14.4309C14.8152 14.5715 14.9494 14.7424 15.0416 14.8954L15.044 14.8994C15.1093 15.0076 15.4113 15.5078 15.1363 16.0746C14.862 16.6402 14.2859 16.712 14.1595 16.7278L14.1561 16.7282C13.9797 16.7503 13.764 16.7501 13.5884 16.75L13.0059 16.75L13.0059 21.25Z",fill:"currentColor",fillRule:"evenodd"}),vr("path",{d:"M1.25 12.5C1.25 9.85827 3.03106 7.63322 5.45825 6.9592C5.65424 6.90478 5.75224 6.87756 5.80872 6.81971C5.8652 6.76186 5.88991 6.66386 5.93931 6.46785C6.62272 3.75655 9.07671 1.75002 12 1.75002C15.2149 1.75002 17.8628 4.17733 18.2112 7.29925C18.2385 7.54461 18.2522 7.66731 18.3147 7.7383C18.3772 7.80929 18.4989 7.83881 18.7423 7.89787C21.0422 8.4559 22.75 10.5285 22.75 13C22.75 15.8995 20.3995 18.25 17.5 18.25H16.4006C15.942 18.25 15.7126 18.25 15.6826 18.2119C15.6679 18.1933 15.6641 18.1839 15.6617 18.1604C15.6567 18.1121 15.8519 17.9223 16.2425 17.5427C17.2326 16.5804 17.255 14.9976 16.2927 14.0075C15.6442 13.1982 15.0315 12.3422 14.2379 11.6663C13.6086 11.1303 12.8426 10.75 12 10.75C11.1574 10.75 10.3914 11.1303 9.76209 11.6663C8.96846 12.3422 8.35575 13.1982 7.7073 14.0075C6.74496 14.9976 6.76745 16.5804 7.75753 17.5427C8.14807 17.9223 8.34334 18.1121 8.33832 18.1604C8.33587 18.1839 8.33206 18.1933 8.31739 18.2119C8.28737 18.25 8.05801 18.25 7.59942 18.25H7C3.82436 18.25 1.25 15.6757 1.25 12.5Z",fill:"currentColor"})]}))}import{useState as Yi}from"react";import{jsx as xr,jsxs as qi}from"react/jsx-runtime";function br({file:e}){var n;let[t,a]=Yi(!1),o=e.previewUrl||e.url;return o&&!t?xr("img",{src:o,alt:((n=e==null?void 0:e.name)==null?void 0:n.substring(0,10))||"image",className:"w-full h-full object-contain rounded-md drop-shadow-md",onError:()=>a(!0)}):xr(Tt,{})}function wr({file:e}){return e.caption?qi("p",{className:"text-xs text-blue-600 line-clamp-2 mb-2",children:[e.height," x ",e.width]}):null}import{Play as Cr}from"lucide-react";import{useState as Qi}from"react";import{jsx as Te,jsxs as fo}from"react/jsx-runtime";function yr({file:e,className:t}){let[a,o]=Qi(!1);return e.previewUrl&&!a?fo("div",{className:"relative w-full h-full",children:[Te("img",{src:e.previewUrl,className:"w-full h-full object-contain rounded-md",alt:e.name,onError:()=>o(!0)}),Te("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:Te("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:Te(Cr,{className:"size-5 text-white fill-white"})})})]}):e.url&&!a?fo("div",{className:"relative w-full h-full",children:[Te("video",{src:e.url,className:"w-full h-full object-contain rounded-md",preload:"metadata",onError:()=>o(!0)}),Te("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:Te("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:Te(Cr,{className:"size-5 text-white fill-white"})})})]}):Te("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:Te("div",{className:"text-center",children:Te("div",{className:"text-4xl",children:Te(nt,{type:"video",className:t})})})})}function Fr({file:e}){var t;return(t=e.metaData)!=null&&t.duration?fo("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}import{jsx as Ea,jsxs as Ji}from"react/jsx-runtime";function Mr({file:e,className:t}){return Ea("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:Ea("div",{className:"text-center",children:Ea("div",{className:"text-4xl",children:Ea(nt,{type:"audio",className:t})})})})}function Dr({file:e}){var t;return(t=e.metaData)!=null&&t.duration?Ji("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}import{jsx as Kt,jsxs as Xi}from"react/jsx-runtime";function Nr({file:e,className:t}){let a=Ra(e.mime,e.ext);return Kt("div",{className:"w-full h-full flex items-center justify-center bg-transparent relative",children:e.previewUrl?Kt("img",{src:e.previewUrl,alt:e.name,className:"w-full h-full object-contain rounded-md drop-shadow-md"}):Kt("div",{className:"text-center",children:Kt("div",{className:"text-4xl",children:Kt(nt,{type:a,className:t})})})})}function Ir({file:e}){var t;return(t=e.metaData)!=null&&t.pageCount?Xi("p",{className:"text-xs text-blue-600 mb-2",children:["Pages: ",e.metaData.pageCount]}):null}import{jsx as el}from"react/jsx-runtime";function Pr({file:e}){let t=Ra(e.mime,e.ext);return el(nt,{type:t})}var kr={images:{component:br,metadataComponent:wr},videos:{component:yr,metadataComponent:Fr},files:{component:Nr,metadataComponent:Ir},audios:{component:Mr,metadataComponent:Dr},default:{component:Pr}};function it(e){let t=Ue(e.mime,e.ext);return kr[t]||kr.default}import{jsx as Sr}from"react/jsx-runtime";function Et(a){var o=a,{className:e}=o,t=g(o,["className"]);return Sr("kbd",r({"data-slot":"kbd",className:x("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e)},t))}function At(a){var o=a,{className:e}=o,t=g(o,["className"]);return Sr("kbd",r({"data-slot":"kbd-group",className:x("inline-flex items-center gap-1",e)},t))}import{jsx as A,jsxs as Y}from"react/jsx-runtime";function zr(){let{isUploadModalOpen:e,setIsUploadModalOpen:t,uploadFiles:a,allowedFileTypes:o,maxUploadFiles:n,maxUploadSize:i}=E(),l=gr(o),c=hr(o),[s,f]=tl([]),[{isDragging:m,errors:b},{removeFile:p,clearFiles:y,handleDragEnter:w,handleDragLeave:D,handleDragOver:F,handleDrop:M,openFileDialog:I,getInputProps:P}]=rr({maxFiles:n,maxSize:i,accept:l,multiple:!0,onFilesChange:v=>{let T=v.map(R=>{let V=s.find(fe=>fe.id===R.id);return V?r(r({},V),R):d(r({},R),{progress:100,status:"completed"})});f(T)}}),h=v=>{p(v)},N=v=>{f(T=>T.map(R=>R.id===v?d(r({},R),{progress:0,status:"uploading",error:void 0}):R))},H=()=>{let v=s.filter(T=>T.status==="completed");if(v.length>0){let T=v.map(R=>({name:R.file.name,size:R.file.size,type:Ue(R.file.type,R.file.name.split(".").pop()),lastModified:R.file instanceof File?R.file.lastModified:Date.now(),file:R.file,metadata:{}}));a(T),q()}},q=()=>{t(!1),y(),f([])},oe=(v,T)=>{let R={id:"temp",name:v.name,size:v.size,mime:v.type,ext:v.name.split(".").pop()||"",url:T||"",createdAt:new Date(v.lastModified),updatedAt:new Date(v.lastModified),folderId:null,metaData:{}},{component:V}=it(R);return A(V,{file:R,metaData:R.metaData})},we=s.filter(v=>v.status==="completed").length,u=s.filter(v=>v.status==="uploading").length,S=we>0&&u===0;return A(Ie,{open:e,onOpenChange:t,children:Y(Pe,{className:"p-0 max-w-4xl max-h-[80vh] flex flex-col",variant:"default",showCloseButton:!1,children:[Y(Ge,{className:"pt-5 pb-3 m-0 border-b border-border",children:[A(ke,{className:"px-6 text-base",children:Y("div",{className:"flex w-full items-center justify-between gap-2",children:[Y("span",{children:["Upload Files",A(At,{className:"ml-2",children:Y(Et,{children:[A("span",{className:"text-lg",children:"\u2318"})," + U"]})})]}),Y(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>t(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[A(ce,{className:"size-5"}),A("span",{className:"hidden",children:"Close"})]})]})}),A(rt,{})]}),Y("div",{className:"p-6 overflow-y-auto flex-1",children:[Y("div",{className:x("relative rounded-lg border-dashed border-[2.5px] bg-gray-100 border-gray-300 px-6 py-16 text-center transition-colors mb-4",m?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50"),onDragEnter:w,onDragLeave:D,onDragOver:F,onDrop:M,children:[A("input",d(r({},P()),{className:"sr-only"})),Y("div",{className:"flex flex-col items-center",children:[A("div",{className:x("flex h-12 w-12 items-center justify-center rounded-full transition-colors",m?"border-primary bg-primary/10":"border-muted-foreground/25"),children:A(uo,{className:"mb-3 text-zinc-400 dark:text-zinc-500"})}),Y("div",{className:"space-y-2",children:[Y("p",{className:"text-sm font-medium",children:["Drop files here or"," ",A("button",{type:"button",onClick:I,className:"cursor-pointer text-primary underline-offset-4 hover:underline",children:"browse files"})]}),Y("p",{className:"text-xs text-muted-foreground",children:[c," \u2022 Max size: ",ae(i)," \u2022 Max files: ",n]})]})]})]}),s.length>0&&A("div",{className:"space-y-4",children:A("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3 lg:grid-cols-4",children:s.map(v=>Y("div",{className:"relative group",children:[A(C,{onClick:()=>h(v.id),variant:"outline",size:"icon",className:"absolute -end-2 -top-2 z-10 size-6 rounded-full opacity-0 transition-opacity group-hover:opacity-100",children:A(ce,{className:"size-3"})}),Y("div",{className:"relative overflow-hidden rounded-lg border bg-card transition-colors",children:[A("div",{className:"relative aspect-square bg-muted border-b border-border",children:A("div",{className:"flex h-full items-center justify-center p-4",children:A("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:v.status==="uploading"?Y("div",{className:"relative w-full h-full flex items-center justify-center",children:[Y("svg",{className:"size-12 -rotate-90 absolute",viewBox:"0 0 48 48",children:[A("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-muted-foreground/20"}),A("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:`${2*Math.PI*20}`,strokeDashoffset:`${2*Math.PI*20*(1-v.progress/100)}`,className:"text-primary transition-all duration-300",strokeLinecap:"round"})]}),v.file instanceof File&&oe(v.file,v.preview)]}):v.file instanceof File&&oe(v.file,v.preview)})})}),A("div",{className:"p-3",children:Y("div",{className:"space-y-1",children:[A("p",{className:"truncate text-xs font-medium",children:v.file.name}),Y("div",{className:"relative flex items-center justify-between gap-2",children:[A("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:ae(v.file.size)}),v.status==="error"&&v.error&&Y(tr,{children:[A(ar,{asChild:!0,children:A(C,{onClick:()=>N(v.id),variant:"ghost",size:"icon",className:"absolute end-0 -top-1.25 size-6 text-destructive hover:bg-destructive/10 hover:text-destructive",children:A(al,{className:"size-3 opacity-100"})})}),A(or,{children:"Upload failed. Retry"})]})]})]})})]})]},v.id))})}),b.length>0&&Y(qo,{variant:"destructive",appearance:"light",className:"mt-5",children:[A(Jo,{children:A(ol,{})}),Y(er,{children:[A(Qo,{children:"File upload error(s)"}),A(Xo,{children:b.map((v,T)=>A("p",{className:"last:mb-0",children:v},T))})]})]})]}),Y(Be,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[A(Ye,{asChild:!0,children:A(C,{type:"button",radius:"full",variant:"outline",onClick:q,className:"w-full md:w-auto",children:"Cancel"})}),Y(C,{type:"button",radius:"full",onClick:H,disabled:!S,className:"w-full md:w-auto",children:["Upload ",we>0&&`(${we})`]})]})]})})}import{useState as il,useEffect as ll}from"react";import{cva as Aa}from"class-variance-authority";import{jsx as nl}from"react/jsx-runtime";var rl=Aa(`
24
+ `},placeholder:{true:"text-muted-foreground",false:""}},compoundVariants:[{variant:"ghost",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"dashed",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"secondary",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"input",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"icon",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{size:"xs",autoHeight:!0,className:"h-auto min-h-7"},{size:"md",autoHeight:!0,className:"h-auto min-h-9"},{size:"sm",autoHeight:!0,className:"h-auto min-h-8"},{size:"lg",autoHeight:!0,className:"h-auto min-h-10"},{variant:"primary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"link",underline:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"primary",mode:"link",underline:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"primary",mode:"link",underlined:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"primary",mode:"link",underlined:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underline:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"inverse",mode:"link",underline:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underlined:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"inverse",mode:"link",underlined:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underline:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"foreground",mode:"link",underline:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underlined:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"foreground",mode:"link",underlined:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"primary",appearance:"ghost",className:"bg-transparent text-primary/90 hover:bg-primary/5 data-[state=open]:bg-primary/5"},{variant:"destructive",appearance:"ghost",className:"bg-transparent text-destructive/90 hover:bg-destructive/5 data-[state=open]:bg-destructive/5"},{variant:"ghost",mode:"icon",className:"text-muted-foreground"},{size:"xs",mode:"icon",className:"w-7 h-7 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"sm",mode:"icon",className:"w-8 h-8 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"md",mode:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"lg",mode:"icon",className:"w-10 h-10 p-0 [&_svg:not([class*=size-])]:size-4"},{mode:"input",placeholder:!0,variant:"outline",className:"font-normal text-muted-foreground"},{mode:"input",variant:"outline",size:"sm",className:"gap-1.25"},{mode:"input",variant:"outline",size:"md",className:"gap-1.5"},{mode:"input",variant:"outline",size:"lg",className:"gap-1.5"}],defaultVariants:{variant:"primary",mode:"default",size:"md",radius:"md",appearance:"default"}});function C(y){var w=y,{className:e,selected:t,variant:o,radius:a,appearance:n,mode:i,size:l,autoHeight:c,underlined:d,underline:f,asChild:m=!1,placeholder:b=!1}=w,p=g(w,["className","selected","variant","radius","appearance","mode","size","autoHeight","underlined","underline","asChild","placeholder"]);let D=m?Ui.Slot:"button";return Wi(D,r(r({"data-slot":"button",className:x(ji({variant:o,size:l,radius:a,appearance:n,mode:i,autoHeight:c,placeholder:b,underlined:d,underline:f,className:e}),m&&p.disabled&&"pointer-events-none opacity-50")},t&&{"data-state":"open"}),p))}import{jsx as ke,jsxs as Fa}from"react/jsx-runtime";function $i(e,t){let o=[];if(t<=7)for(let a=1;a<=t;a++)o.push(a);else e<=4?o.push(1,2,3,4,5,"ellipsis",t):e>=t-3?o.push(1,"ellipsis",t-4,t-3,t-2,t-1,t):o.push(1,"ellipsis",e-1,e,e+1,"ellipsis",t);return o}function wr({className:e}){let{pagination:t,handlePageChange:o,files:a,folders:n}=E(),{currentPage:i,totalPages:l}=t,c=((a==null?void 0:a.length)||0)+((n==null?void 0:n.length)||0);if(l<=1||c===0)return null;let d=$i(i,l);return ke(vr,{className:e,children:Fa(xr,{children:[ke(oo,{children:ke(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===1,onClick:()=>i>1&&o(i-1),children:Fa("span",{children:[ke(Vt,{className:"rtl:rotate-180"})," Previous"]})})}),d.map((f,m)=>f==="ellipsis"?ke(oo,{children:ke(br,{})},`ellipsis-${i}-${l}-${m}`):ke(oo,{children:ke(C,{variant:f===i?"outline":"ghost",mode:"icon",size:"icon",radius:"full",asChild:!0,onClick:()=>o(f),disabled:f===i,children:ke("span",{children:f})})},f)),ke(oo,{children:ke(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===l,onClick:()=>i<l&&o(i+1),children:Fa("span",{children:["Next ",ke(lt,{className:"rtl:rotate-180"})]})})})]})})}import{jsx as Ki}from"react/jsx-runtime";function Cr({children:e,className:t}){return Ki("div",{className:x("p-4 flex md:flex-row gap-2",t),children:e})}import{useState as fl}from"react";import{cva as Yi}from"class-variance-authority";import{Dialog as Pt}from"radix-ui";import{jsx as _e,jsxs as Ma}from"react/jsx-runtime";var qi=Yi("flex flex-col fixed outline-0 z-50 border border-border bg-background shadow-lg shadow-black/5 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-2xl",{variants:{variant:{default:"left-[50%] top-[50%] max-w-lg translate-x-[-50%] translate-y-[-50%] w-full p-6 max-h-[90dvh]",fullscreen:"top-5 left-5 right-5 bottom-5"}},defaultVariants:{variant:"default"}});function Pe(t){var e=g(t,[]);return _e(Pt.Root,r({"data-slot":"dialog"},e))}function Qi(t){var e=g(t,[]);return _e(Pt.Portal,r({"data-slot":"dialog-portal"},e))}function Xe(t){var e=g(t,[]);return _e(Pt.Close,r({"data-slot":"dialog-close"},e))}function Ji(o){var a=o,{className:e}=a,t=g(a,["className"]);return _e(Pt.Overlay,r({"data-slot":"dialog-overlay",className:x("fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t))}function Se(l){var c=l,{className:e,children:t,showCloseButton:o=!0,overlay:a=!0,variant:n}=c,i=g(c,["className","children","showCloseButton","overlay","variant"]);return Ma(Qi,{children:[a&&_e(Ji,{}),Ma(Pt.Content,s(r({"data-slot":"dialog-content",className:x(qi({variant:n}),e)},i),{children:[t,o&&Ma(Xe,{className:"cursor-pointer outline-0 absolute end-5 top-5 rounded-full opacity-60 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[_e(oe,{className:"size-4"}),_e("span",{className:"sr-only",children:"Close"})]})]}))]})}var He=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return _e("div",r({"data-slot":"dialog-header",className:x("flex flex-col space-y-1 text-center sm:text-start mb-5",e)},t))},Ze=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return _e("div",r({"data-slot":"dialog-footer",className:x("flex flex-col-reverse sm:flex-row sm:justify-end pt-5 sm:space-x-2.5",e)},t))};function ze(o){var a=o,{className:e}=a,t=g(a,["className"]);return _e(Pt.Title,r({"data-slot":"dialog-title",className:x("text-lg font-semibold leading-none tracking-tight",e)},t))}function dt(o){var a=o,{className:e}=a,t=g(a,["className"]);return _e(Pt.Description,r({"data-slot":"dialog-description",className:x("text-sm text-muted-foreground",e)},t))}import{cva as Xi}from"class-variance-authority";import{jsx as Bt,jsxs as tl}from"react/jsx-runtime";var el=Xi("flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",{variants:{variant:{secondary:"",primary:"",destructive:"",success:"",info:"",mono:"",warning:""},icon:{primary:"",destructive:"",success:"",info:"",warning:""},appearance:{solid:"",outline:"",light:"",stroke:"text-foreground"},size:{lg:"rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 *:data-slot=alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-1",md:"rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 *:data-slot=alert-icon:mt-0 [&_[data-slot=alert-close]]:mt-0.5",sm:"rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 *:data-alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"}},compoundVariants:[{variant:"secondary",appearance:"solid",className:"bg-muted text-foreground"},{variant:"primary",appearance:"solid",className:"bg-primary text-primary-foreground"},{variant:"destructive",appearance:"solid",className:"bg-destructive text-destructive-foreground"},{variant:"success",appearance:"solid",className:"bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"},{variant:"info",appearance:"solid",className:"bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"},{variant:"warning",appearance:"solid",className:"bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"},{variant:"mono",appearance:"solid",className:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"},{variant:"secondary",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"primary",appearance:"outline",className:"border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"},{variant:"destructive",appearance:"outline",className:"border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"},{variant:"success",appearance:"outline",className:"border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"info",appearance:"outline",className:"border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"warning",appearance:"outline",className:"border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"mono",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"secondary",appearance:"light",className:"bg-muted border border-border text-foreground"},{variant:"primary",appearance:"light",className:"text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"},{variant:"destructive",appearance:"light",className:"bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "},{variant:"success",appearance:"light",className:"bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"},{variant:"info",appearance:"light",className:"bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"},{variant:"warning",appearance:"light",className:"bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"},{variant:"mono",icon:"primary",className:"[&_[data-slot=alert-icon]]:text-primary"},{variant:"mono",icon:"warning",className:"[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"},{variant:"mono",icon:"success",className:"[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"},{variant:"mono",icon:"destructive",className:"[&_[data-slot=alert-icon]]:text-destructive"},{variant:"mono",icon:"info",className:"[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"}],defaultVariants:{variant:"secondary",appearance:"solid",size:"md"}});function yr(f){var m=f,{className:e,variant:t,size:o,icon:a,appearance:n,close:i=!1,onClose:l,children:c}=m,d=g(m,["className","variant","size","icon","appearance","close","onClose","children"]);return tl("div",s(r({"data-slot":"alert",role:"alert",className:x(el({variant:t,size:o,icon:a,appearance:n}),e)},d),{children:[c,i&&Bt("button",{onClick:l,"aria-label":"Dismiss","data-slot":"alert-close",className:x("group shrink-0 size-4 cursor-pointer"),children:Bt(oe,{className:"opacity-60 group-hover:opacity-100 size-4"})})]}))}function Fr(o){var a=o,{className:e}=a,t=g(a,["className"]);return Bt("div",r({"data-slot":"alert-title",className:x("grow tracking-tight",e)},t))}function Mr(a){var n=a,{children:e,className:t}=n,o=g(n,["children","className"]);return Bt("div",s(r({"data-slot":"alert-icon",className:x("shrink-0",t)},o),{children:e}))}function Dr(o){var a=o,{className:e}=a,t=g(a,["className"]);return Bt("div",r({"data-slot":"alert-description",className:x("text-sm [&_p]:leading-relaxed [&_p]:mb-2",e)},t))}function Ir(o){var a=o,{className:e}=a,t=g(a,["className"]);return Bt("div",r({"data-slot":"alert-content",className:x("space-y-2 [&_[data-slot=alert-title]]:font-semibold",e)},t))}import*as Re from"@radix-ui/react-tooltip";import{jsx as Ht,jsxs as al}from"react/jsx-runtime";function ol(o){var a=o,{delayDuration:e=0}=a,t=g(a,["delayDuration"]);return Ht(Re.Provider,r({"data-slot":"tooltip-provider",delayDuration:e},t))}function Nr(t){var e=g(t,[]);return Ht(ol,{children:Ht(Re.Root,r({"data-slot":"tooltip"},e))})}function kr(t){var e=g(t,[]);return Ht(Re.Trigger,r({"data-slot":"tooltip-trigger"},e))}function Pr(n){var i=n,{className:e,sideOffset:t=0,children:o}=i,a=g(i,["className","sideOffset","children"]);return Ht(Re.Portal,{children:al(Re.Content,s(r({"data-slot":"tooltip-content",sideOffset:t,className:x("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e)},a),{children:[o,Ht(Re.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})}function ae(e){if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(t));return Number.parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+o[a]}import{useCallback as we,useRef as rl,useState as nl,useEffect as il}from"react";var Sr=(e={})=>{let{maxFiles:t=Number.POSITIVE_INFINITY,maxSize:o=Number.POSITIVE_INFINITY,accept:a="*",multiple:n=!1,initialFiles:i=[],onFilesChange:l,onFilesAdded:c,onError:d}=e,[f,m]=nl({files:i.map(u=>({file:u,id:u.id,preview:u.url})),isDragging:!1,errors:[]}),b=rl(null);il(()=>()=>{f.files.forEach(u=>{u.preview&&u.file instanceof File&&URL.revokeObjectURL(u.preview)})},[f.files]);let p=we(u=>{if(u instanceof File){if(u.size>o)return`File "${u.name}" exceeds the maximum size of ${ae(o)}.`}else if(u.size>o)return`File "${u.name}" exceeds the maximum size of ${ae(o)}.`;if(a!=="*"){let S=a.split(",").map(V=>V.trim()),v=u instanceof File?u.type||"":u.type,R=`.${u instanceof File,u.name.split(".").pop()}`;if(!S.some(V=>{if(V.startsWith("."))return R.toLowerCase()===V.toLowerCase();if(V.endsWith("/*")){let ge=V.split("/")[0];return v.startsWith(`${ge}/`)}return v===V}))return`File "${u instanceof File,u.name}" is not an accepted file type.`}return null},[a,o]),y=we(u=>u instanceof File?URL.createObjectURL(u):u.url,[]),w=we(u=>u instanceof File?`${u.name}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`:u.id.toString(),[]),D=we(()=>{m(u=>{for(let v of u.files)v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);b.current&&(b.current.value="");let S=s(r({},u),{files:[],errors:[]});return l==null||l(S.files),S})},[l]),F=we(u=>{if(!u||u.length===0)return;let S=Array.from(u),v=[];m(R=>s(r({},R),{errors:[]})),n||D(),m(R=>{if(n&&t!==Number.POSITIVE_INFINITY&&R.files.length+S.length>t)return v.push(`You can only upload a maximum of ${t} files.`),d==null||d(v),s(r({},R),{errors:v});let T=[];for(let V of S){if(n&&R.files.some(P=>P.file.name===V.name&&P.file.size===V.size))continue;if(V.size>o){v.push(n?`Some files exceed the maximum size of ${ae(o)}.`:`File exceeds the maximum size of ${ae(o)}.`);continue}let ge=p(V);ge?v.push(ge):T.push({file:V,id:w(V),preview:y(V)})}if(T.length>0){c==null||c(T);let V=n?[...R.files,...T]:T;return l==null||l(V),s(r({},R),{files:V,errors:v})}else if(v.length>0)return d==null||d(v),s(r({},R),{errors:v});return R}),b.current&&(b.current.value="")},[t,n,o,p,y,w,D,l,c,d]),M=we(u=>{m(S=>{let v=S.files.find(T=>T.id===u);v&&v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);let R=S.files.filter(T=>T.id!==u);return l==null||l(R),s(r({},S),{files:R,errors:[]})})},[l]),N=we(()=>{m(u=>s(r({},u),{errors:[]}))},[]),k=we(u=>{u.preventDefault(),u.stopPropagation(),m(S=>s(r({},S),{isDragging:!0}))},[]),h=we(u=>{u.preventDefault(),u.stopPropagation(),!u.currentTarget.contains(u.relatedTarget)&&m(S=>s(r({},S),{isDragging:!1}))},[]),I=we(u=>{u.preventDefault(),u.stopPropagation()},[]),H=we(u=>{var S;if(u.preventDefault(),u.stopPropagation(),m(v=>s(r({},v),{isDragging:!1})),!((S=b.current)!=null&&S.disabled)&&u.dataTransfer.files&&u.dataTransfer.files.length>0)if(n)F(u.dataTransfer.files);else{let v=u.dataTransfer.files[0];F([v])}},[F,n]),q=we(u=>{u.target.files&&u.target.files.length>0&&F(u.target.files)},[F]),re=we(()=>{b.current&&b.current.click()},[]),ye=we((u={})=>s(r({},u),{type:"file",onChange:q,accept:u.accept||a,multiple:u.multiple!==void 0?u.multiple:n,ref:b}),[a,n,q]);return[f,{addFiles:F,removeFile:M,clearFiles:D,clearErrors:N,handleDragEnter:k,handleDragLeave:h,handleDragOver:I,handleDrop:H,handleFileChange:q,openFileDialog:re,getInputProps:ye}]};import{RefreshCwIcon as gl,TriangleAlert as hl}from"lucide-react";import zr from"mime";import{jsx as he}from"react/jsx-runtime";function Ue(e,t){if(typeof e!="string")return console.warn("getFileTypeFromMime: mimeType is not a string:",e),K.FILE;let o=e;if(t){let a=t.toLowerCase().replace(/^\./,""),n=zr.getType(a);n&&(o=n)}return o.startsWith("image/")?K.IMAGE:o.startsWith("video/")?K.VIDEO:o.startsWith("audio/")?K.AUDIO:K.FILE}function jo(e,t){let o=e;if(t){let a=t.toLowerCase().replace(/^\./,""),n=zr.getType(a);n&&(o=n)}if(o.startsWith("image/"))return"image";if(o.startsWith("video/"))return"video";if(o.startsWith("audio/"))return"audio";switch(o){case"application/pdf":return"pdf";case"application/json":return"json";case"application/zip":case"application/x-zip-compressed":return"zip";case"application/x-rar-compressed":case"application/vnd.rar":return"rar";case"application/x-msdownload":case"application/x-executable":return"exe";case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.ms-excel":case"text/csv":return"excel";case"application/vnd.openxmlformats-officedocument.presentationml.presentation":case"application/vnd.ms-powerpoint":return"powerpoint";case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return"document"}if(o.startsWith("text/"))return"txt";if(t)switch(t.toLowerCase().replace(/^\./,"")){case"exe":case"msi":return"exe";case"zip":return"zip";case"rar":return"rar";case"pdf":return"pdf";case"csv":return"excel"}return"file"}var ct=a=>{var n=a,{type:e,className:t}=n,o=g(n,["type","className"]);switch(e){case"folder-with-files":return he(So,r({className:t},o));case"folder":return he(Ro,r({className:t},o));case"image":return he(At,r({className:t},o));case"video":return he(Po,r({className:t},o));case"audio":return he(Lt,r({className:t},o));case"pdf":return he(bo,r({className:t},o));case"excel":case"xlsx":return he(wo,r({className:t},o));case"powerpoint":case"pptx":return he(Co,r({className:t},o));case"document":case"docx":case"doc":return he(yo,r({className:t},o));case"txt":return he(Fo,r({className:t},o));case"json":return he(Io,r({className:t},o));case"zip":return he(Do,r({className:t},o));case"rar":return he(No,r({className:t},o));case"exe":return he(ko,r({className:t},o));default:return he(Mo,r({className:t},o))}};function Rr(e){if(!e||e.length===0)return"*/*";let t=[];for(let o of e)switch(o){case K.IMAGE:t.push("image/*");break;case K.VIDEO:t.push("video/*");break;case K.AUDIO:t.push("audio/*");break;case K.FILE:t.push("application/*","text/*");break}return t.join(",")}function Tr(e){if(!e||e.length===0)return"All files";let t=[];for(let o of e)switch(o){case K.IMAGE:t.push("Images");break;case K.VIDEO:t.push("Videos");break;case K.AUDIO:t.push("Audio");break;case K.FILE:t.push("Files");break}return t.join(", ")}import{jsx as Er,jsxs as ll}from"react/jsx-runtime";function Da(e){return ll("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",color:"currentColor"},e),{children:[Er("path",{d:"M13.0059 21.25C13.0059 21.8023 12.5581 22.25 12.0059 22.25C11.4536 22.25 11.0059 21.8023 11.0059 21.25L11.0059 16.75L10.4116 16.75C10.236 16.7501 10.0203 16.7503 9.84387 16.7282L9.84053 16.7278C9.71408 16.712 9.13804 16.6402 8.86368 16.0746C8.58872 15.5078 8.89065 15.0076 8.95597 14.8994L8.95841 14.8954C9.05062 14.7424 9.18477 14.5715 9.29511 14.4309L9.31885 14.4007C9.61348 14.0249 9.99545 13.5406 10.3759 13.1496C10.5657 12.9545 10.783 12.7533 11.0139 12.5944C11.2191 12.4532 11.5693 12.25 12 12.25C12.4307 12.25 12.7809 12.4532 12.9861 12.5944C13.217 12.7533 13.4343 12.9545 13.6241 13.1496C14.0046 13.5406 14.3865 14.0249 14.6812 14.4007L14.7049 14.4309C14.8152 14.5715 14.9494 14.7424 15.0416 14.8954L15.044 14.8994C15.1093 15.0076 15.4113 15.5078 15.1363 16.0746C14.862 16.6402 14.2859 16.712 14.1595 16.7278L14.1561 16.7282C13.9797 16.7503 13.764 16.7501 13.5884 16.75L13.0059 16.75L13.0059 21.25Z",fill:"currentColor",fillRule:"evenodd"}),Er("path",{d:"M1.25 12.5C1.25 9.85827 3.03106 7.63322 5.45825 6.9592C5.65424 6.90478 5.75224 6.87756 5.80872 6.81971C5.8652 6.76186 5.88991 6.66386 5.93931 6.46785C6.62272 3.75655 9.07671 1.75002 12 1.75002C15.2149 1.75002 17.8628 4.17733 18.2112 7.29925C18.2385 7.54461 18.2522 7.66731 18.3147 7.7383C18.3772 7.80929 18.4989 7.83881 18.7423 7.89787C21.0422 8.4559 22.75 10.5285 22.75 13C22.75 15.8995 20.3995 18.25 17.5 18.25H16.4006C15.942 18.25 15.7126 18.25 15.6826 18.2119C15.6679 18.1933 15.6641 18.1839 15.6617 18.1604C15.6567 18.1121 15.8519 17.9223 16.2425 17.5427C17.2326 16.5804 17.255 14.9976 16.2927 14.0075C15.6442 13.1982 15.0315 12.3422 14.2379 11.6663C13.6086 11.1303 12.8426 10.75 12 10.75C11.1574 10.75 10.3914 11.1303 9.76209 11.6663C8.96846 12.3422 8.35575 13.1982 7.7073 14.0075C6.74496 14.9976 6.76745 16.5804 7.75753 17.5427C8.14807 17.9223 8.34334 18.1121 8.33832 18.1604C8.33587 18.1839 8.33206 18.1933 8.31739 18.2119C8.28737 18.25 8.05801 18.25 7.59942 18.25H7C3.82436 18.25 1.25 15.6757 1.25 12.5Z",fill:"currentColor"})]}))}import{useState as sl}from"react";import{jsx as Lr,jsxs as dl}from"react/jsx-runtime";function Ar({file:e}){var n;let[t,o]=sl(!1),a=e.previewUrl||e.url;return a&&!t?Lr("img",{src:a,alt:((n=e==null?void 0:e.name)==null?void 0:n.substring(0,10))||"image",className:"w-full h-full object-contain rounded-md drop-shadow-md",onError:()=>o(!0)}):Lr(At,{})}function _r({file:e}){return e.caption?dl("p",{className:"text-xs text-blue-600 line-clamp-2 mb-2",children:[e.height," x ",e.width]}):null}import{useState as cl}from"react";import{jsx as Te,jsxs as Ia}from"react/jsx-runtime";function Vr({file:e,className:t}){let[o,a]=cl(!1);return e.previewUrl&&!o?Ia("div",{className:"relative w-full h-full",children:[Te("img",{src:e.previewUrl,className:"w-full h-full object-contain rounded-md",alt:e.name,onError:()=>a(!0)}),Te("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:Te("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:Te(eo,{className:"size-5 text-white fill-white"})})})]}):e.url&&!o?Ia("div",{className:"relative w-full h-full",children:[Te("video",{src:`${e.url}#t=0.001`,className:"w-full h-full object-contain rounded-md",preload:"metadata",muted:!0,playsInline:!0,onError:()=>a(!0)}),Te("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:Te("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:Te(eo,{className:"size-5 text-white fill-white"})})})]}):Te("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:Te("div",{className:"text-center",children:Te("div",{className:"text-4xl",children:Te(ct,{type:"video",className:t})})})})}function Gr({file:e}){var t;return(t=e.metaData)!=null&&t.duration?Ia("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}import{jsx as Wo,jsxs as pl}from"react/jsx-runtime";function Or({file:e,className:t}){return Wo("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:Wo("div",{className:"text-center",children:Wo("div",{className:"text-4xl",children:Wo(ct,{type:"audio",className:t})})})})}function Br({file:e}){var t;return(t=e.metaData)!=null&&t.duration?pl("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}import{jsx as ao,jsxs as ml}from"react/jsx-runtime";function Hr({file:e,className:t}){let o=jo(e.mime,e.ext);return ao("div",{className:"w-full h-full flex items-center justify-center bg-transparent relative",children:e.previewUrl?ao("img",{src:e.previewUrl,alt:e.name,className:"w-full h-full object-contain rounded-md drop-shadow-md"}):ao("div",{className:"text-center",children:ao("div",{className:"text-4xl",children:ao(ct,{type:o,className:t})})})})}function Zr({file:e}){var t;return(t=e.metaData)!=null&&t.pageCount?ml("p",{className:"text-xs text-blue-600 mb-2",children:["Pages: ",e.metaData.pageCount]}):null}import{jsx as ul}from"react/jsx-runtime";function Ur({file:e}){let t=jo(e.mime,e.ext);return ul(ct,{type:t})}var jr={images:{component:Ar,metadataComponent:_r},videos:{component:Vr,metadataComponent:Gr},files:{component:Hr,metadataComponent:Zr},audios:{component:Or,metadataComponent:Br},default:{component:Ur}};function pt(e){let t=Ue(e.mime,e.ext);return jr[t]||jr.default}import{jsx as Wr}from"react/jsx-runtime";function Zt(o){var a=o,{className:e}=a,t=g(a,["className"]);return Wr("kbd",r({"data-slot":"kbd",className:x("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e)},t))}function Ut(o){var a=o,{className:e}=a,t=g(a,["className"]);return Wr("kbd",r({"data-slot":"kbd-group",className:x("inline-flex items-center gap-1",e)},t))}import{jsx as L,jsxs as Y}from"react/jsx-runtime";function $r(){let{isUploadModalOpen:e,setIsUploadModalOpen:t,uploadFiles:o,allowedFileTypes:a,maxUploadFiles:n,maxUploadSize:i}=E(),l=Rr(a),c=Tr(a),[d,f]=fl([]),[{isDragging:m,errors:b},{removeFile:p,clearFiles:y,handleDragEnter:w,handleDragLeave:D,handleDragOver:F,handleDrop:M,openFileDialog:N,getInputProps:k}]=Sr({maxFiles:n,maxSize:i,accept:l,multiple:!0,onFilesChange:v=>{let R=v.map(T=>{let V=d.find(ge=>ge.id===T.id);return V?r(r({},V),T):s(r({},T),{progress:100,status:"completed"})});f(R)}}),h=v=>{p(v)},I=v=>{f(R=>R.map(T=>T.id===v?s(r({},T),{progress:0,status:"uploading",error:void 0}):T))},H=()=>{let v=d.filter(R=>R.status==="completed");if(v.length>0){let R=v.map(T=>({name:T.file.name,size:T.file.size,type:Ue(T.file.type,T.file.name.split(".").pop()),lastModified:T.file instanceof File?T.file.lastModified:Date.now(),file:T.file,metadata:{}}));o(R),q()}},q=()=>{t(!1),y(),f([])},re=(v,R)=>{let T={id:"temp",name:v.name,size:v.size,mime:v.type,ext:v.name.split(".").pop()||"",url:R||"",createdAt:new Date(v.lastModified),updatedAt:new Date(v.lastModified),folderId:null,metaData:{}},{component:V}=pt(T);return L(V,{file:T,metaData:T.metaData})},ye=d.filter(v=>v.status==="completed").length,u=d.filter(v=>v.status==="uploading").length,S=ye>0&&u===0;return L(Pe,{open:e,onOpenChange:t,children:Y(Se,{className:"p-0 max-w-4xl max-h-[80vh] flex flex-col",variant:"default",showCloseButton:!1,children:[Y(He,{className:"pt-5 pb-3 m-0 border-b border-border",children:[L(ze,{className:"px-6 text-base",children:Y("div",{className:"flex w-full items-center justify-between gap-2",children:[Y("span",{children:["Upload Files",L(Ut,{className:"ml-2",children:Y(Zt,{children:[L("span",{className:"text-lg",children:"\u2318"})," + U"]})})]}),Y(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>t(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[L(oe,{className:"size-5"}),L("span",{className:"hidden",children:"Close"})]})]})}),L(dt,{})]}),Y("div",{className:"p-6 overflow-y-auto flex-1",children:[Y("div",{className:x("relative rounded-lg border-dashed border-[2.5px] bg-gray-100 border-gray-300 px-6 py-16 text-center transition-colors mb-4",m?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50"),onDragEnter:w,onDragLeave:D,onDragOver:F,onDrop:M,children:[L("input",s(r({},k()),{className:"sr-only"})),Y("div",{className:"flex flex-col items-center",children:[L("div",{className:x("flex h-12 w-12 items-center justify-center rounded-full transition-colors",m?"border-primary bg-primary/10":"border-muted-foreground/25"),children:L(Da,{className:"mb-3 text-zinc-400 dark:text-zinc-500"})}),Y("div",{className:"space-y-2",children:[Y("p",{className:"text-sm font-medium",children:["Drop files here or"," ",L("button",{type:"button",onClick:N,className:"cursor-pointer text-primary underline-offset-4 hover:underline",children:"browse files"})]}),Y("p",{className:"text-xs text-muted-foreground",children:[c," \u2022 Max size: ",ae(i)," \u2022 Max files: ",n]})]})]})]}),d.length>0&&L("div",{className:"space-y-4",children:L("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3 lg:grid-cols-4",children:d.map(v=>Y("div",{className:"relative group",children:[L(C,{onClick:()=>h(v.id),variant:"outline",size:"icon",className:"absolute -end-2 -top-2 z-10 size-6 rounded-full opacity-0 transition-opacity group-hover:opacity-100",children:L(oe,{className:"size-3"})}),Y("div",{className:"relative overflow-hidden rounded-lg border bg-card transition-colors",children:[L("div",{className:"relative aspect-square bg-muted border-b border-slate-200",children:L("div",{className:"flex h-full items-center justify-center p-4",children:L("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:v.status==="uploading"?Y("div",{className:"relative w-full h-full flex items-center justify-center",children:[Y("svg",{className:"size-12 -rotate-90 absolute",viewBox:"0 0 48 48",children:[L("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-muted-foreground/20"}),L("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:`${2*Math.PI*20}`,strokeDashoffset:`${2*Math.PI*20*(1-v.progress/100)}`,className:"text-primary transition-all duration-300",strokeLinecap:"round"})]}),v.file instanceof File&&re(v.file,v.preview)]}):v.file instanceof File&&re(v.file,v.preview)})})}),L("div",{className:"p-3",children:Y("div",{className:"space-y-1",children:[L("p",{className:"truncate text-xs font-medium",children:v.file.name}),Y("div",{className:"relative flex items-center justify-between gap-2",children:[L("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:ae(v.file.size)}),v.status==="error"&&v.error&&Y(Nr,{children:[L(kr,{asChild:!0,children:L(C,{onClick:()=>I(v.id),variant:"ghost",size:"icon",className:"absolute end-0 -top-1.25 size-6 text-destructive hover:bg-destructive/10 hover:text-destructive",children:L(gl,{className:"size-3 opacity-100"})})}),L(Pr,{children:"Upload failed. Retry"})]})]})]})})]})]},v.id))})}),b.length>0&&Y(yr,{variant:"destructive",appearance:"light",className:"mt-5",children:[L(Mr,{children:L(hl,{})}),Y(Ir,{children:[L(Fr,{children:"File upload error(s)"}),L(Dr,{children:b.map((v,R)=>L("p",{className:"last:mb-0",children:v},R))})]})]})]}),Y(Ze,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[L(Xe,{asChild:!0,children:L(C,{type:"button",radius:"full",variant:"outline",onClick:q,className:"w-full md:w-auto",children:"Cancel"})}),Y(C,{type:"button",radius:"full",onClick:H,disabled:!S,className:"w-full md:w-auto",children:["Upload ",ye>0&&`(${ye})`]})]})]})})}import{useState as bl,useEffect as wl}from"react";import{cva as $o}from"class-variance-authority";import{jsx as xl}from"react/jsx-runtime";var vl=$o(`
25
25
  flex w-full bg-background border border-input shadow-xs shadow-black/5 transition-[color,box-shadow] text-foreground placeholder:text-muted-foreground/80
26
26
  focus-visible:ring-ring/30 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
27
27
  disabled:cursor-not-allowed disabled:opacity-60
@@ -29,7 +29,7 @@ var $n=Object.defineProperty,Wn=Object.defineProperties;var Kn=Object.getOwnProp
29
29
  file:h-full [&[type=file]]:py-0 file:border-solid file:border-input file:bg-transparent
30
30
  file:font-medium file:not-italic file:text-foreground file:p-0 file:border-0 file:border-e
31
31
  aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
32
- `,{variants:{variant:{lg:"h-10 px-4 text-sm rounded-md file:pe-4 file:me-4",md:"h-9 px-3 text-sm rounded-md file:pe-3 file:me-3",sm:"h-8 px-2.5 text-xs rounded-md file:pe-2.5 file:me-2.5"}},defaultVariants:{variant:"md"}}),pm=Aa("flex items-center shrink-0 justify-center bg-muted border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] text-secondary-foreground [&_svg]:text-secondary-foreground/60",{variants:{variant:{lg:"rounded-md h-10 min-w-10 px-4 text-sm [&_svg:not([class*=size-])]:size-4.5",md:"rounded-md h-9 min-w-9 px-3 text-sm [&_svg:not([class*=size-])]:size-4.5",sm:"rounded-md h-8 min-w-7 text-xs px-2.5 [&_svg:not([class*=size-])]:size-3.5"},mode:{default:"",icon:"px-0 justify-center"}},defaultVariants:{variant:"md",mode:"default"}}),mm=Aa(`
32
+ `,{variants:{variant:{lg:"h-10 px-4 text-sm rounded-md file:pe-4 file:me-4",md:"h-9 px-3 text-sm rounded-md file:pe-3 file:me-3",sm:"h-8 px-2.5 text-xs rounded-md file:pe-2.5 file:me-2.5"}},defaultVariants:{variant:"md"}}),Jm=$o("flex items-center shrink-0 justify-center bg-muted border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] text-secondary-foreground [&_svg]:text-secondary-foreground/60",{variants:{variant:{lg:"rounded-md h-10 min-w-10 px-4 text-sm [&_svg:not([class*=size-])]:size-4.5",md:"rounded-md h-9 min-w-9 px-3 text-sm [&_svg:not([class*=size-])]:size-4.5",sm:"rounded-md h-8 min-w-7 text-xs px-2.5 [&_svg:not([class*=size-])]:size-3.5"},mode:{default:"",icon:"px-0 justify-center"}},defaultVariants:{variant:"md",mode:"default"}}),Xm=$o(`
33
33
  flex items-stretch
34
34
  [&_[data-slot=input]]:grow
35
35
  [&_[data-slot=input-addon]:has(+[data-slot=input])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=input])]:border-e-0
@@ -48,7 +48,7 @@ var $n=Object.defineProperty,Wn=Object.defineProperties;var Kn=Object.getOwnProp
48
48
  [&_[data-slot=datefield]+[data-slot=input-addon]]:border-s-0
49
49
  [&_[data-slot=datefield]:has(~[data-slot=input-addon])]:[&_[data-slot=input]]:rounded-e-none
50
50
  [&_[data-slot=datefield]~[data-slot=input-addon]]:rounded-s-none
51
- `,{variants:{},defaultVariants:{}}),um=Aa(`
51
+ `,{variants:{},defaultVariants:{}}),eu=$o(`
52
52
  flex items-center gap-1.5
53
53
  has-[:focus-visible]:ring-ring/30
54
54
  has-[:focus-visible]:border-ring
@@ -81,35 +81,35 @@ var $n=Object.defineProperty,Wn=Object.defineProperties;var Kn=Object.getOwnProp
81
81
  has-[[aria-invalid=true]]:ring-destructive/10
82
82
  dark:has-[[aria-invalid=true]]:border-destructive
83
83
  dark:has-[[aria-invalid=true]]:ring-destructive/20
84
- `,{variants:{variant:{sm:"gap-1.25 [&_svg:not([class*=size-])]:size-3.5",md:"gap-1.5 [&_svg:not([class*=size-])]:size-4",lg:"gap-1.5 [&_svg:not([class*=size-])]:size-4"}},defaultVariants:{variant:"md"}});function _t(n){var i=n,{className:e,type:t,variant:a}=i,o=g(i,["className","type","variant"]);return nl("input",r({"data-slot":"input",type:t,className:x(rl({variant:a}),e)},o))}import{jsx as Ce,jsxs as Mt}from"react/jsx-runtime";function Tr(){let{isCreateFolderModalOpen:e,setIsCreateFolderModalOpen:t,isRenameFolderModalOpen:a,setIsRenameFolderModalOpen:o,createFolder:n,renameFolder:i,folderToRename:l,setFolderToRename:c}=E(),[s,f]=il(""),m=a,b=e||a;ll(()=>{a&&l?f(l.name):e||f("")},[a,e,l]);let p=async()=>{if(s.trim()!==""){if(m&&l){let w=l.id;w!==null&&await i(w,s.trim()),o(!1),c(null)}else n(s.trim()),t(!1);f("")}},y=()=>{m?(o(!1),c(null)):t(!1),f("")};return b?Ce(Ie,{open:b,onOpenChange:y,children:Mt(Pe,{className:"p-0 max-w-xl m-auto min-h-fit max-h-[80vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[Ce(Ge,{className:"pt-5 pb-3 m-0 border-b border-border flex w-full justify-between",children:Ce(ke,{className:"px-6 text-base",children:Mt("div",{className:"flex w-full items-center justify-between gap-2",children:[Mt("span",{children:[m?"Rename Folder":"Create New Folder",!m&&Ce("span",{className:"ml-4",children:Ce(At,{children:Mt(Et,{children:[Ce("span",{className:"text-lg",children:"\u2318"})," + F"]})})})]}),Mt(C,{variant:"outline",size:"icon",radius:"full",onClick:y,className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[Ce(ce,{className:"size-5"}),Ce("span",{className:"hidden",children:"Close"})]})]})})}),Mt("div",{className:"p-6",children:[Ce("label",{htmlFor:"folder-name",className:"hidden mb-2",children:"Folder Name:"}),Ce(_t,{id:"folder-name",name:"folder-name",value:s,onChange:w=>f(w.target.value),placeholder:"Enter folder name",autoFocus:!0,onKeyDown:w=>{w.key==="Enter"&&s.trim()!==""&&p()}})]}),Mt(Be,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[Ce(Ye,{asChild:!0,children:Ce(C,{type:"button",variant:"outline",onClick:y,radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),Ce(C,{type:"button",disabled:s.trim()==="",onClick:p,radius:"full",className:"w-full md:w-auto",children:m?"Rename":"Create"})]})]})}):null}import{useState as ho,useEffect as vo}from"react";import{ChevronRight as cl,Loader2 as Er}from"lucide-react";function Ze(e,t=30){if(e.length<=t)return e;let a=e.slice(0,Math.ceil(t/2)),o=e.slice(-Math.floor(t/2));return`${a}...${o}`}import{useEffect as sl,useRef as dl,useState as Rr}from"react";function go({threshold:e=0,root:t=null,rootMargin:a="0%"}={}){let[o,n]=Rr(),[i,l]=Rr(null),c=dl(null);return sl(()=>(c.current&&c.current.disconnect(),i&&typeof window!="undefined"&&"IntersectionObserver"in window&&(c.current=new IntersectionObserver(([s])=>{n(s)},{threshold:e,root:t,rootMargin:a}),c.current.observe(i)),()=>{c.current&&c.current.disconnect()}),[i,e,t,a]),{ref:l,entry:o}}import{jsx as L,jsxs as pe}from"react/jsx-runtime";function Ar({folder:e,selectedFolderId:t,onSelect:a,onLoadChildren:o,disabledFolderIds:n=[],treeState:i}){var h;let[l,c]=ho(!1),s=((h=e.folderCount)!=null?h:0)>0,f=t===e.id,m=n.includes(e.id),b=i.loading.has(e.id),p=i.loaded.has(e.id),y=i.folders.get(e.id)||[],w=i.pagination.get(e.id),{ref:D,entry:F}=go({threshold:.1,rootMargin:"100px"}),M=w&&w.currentPage<w.totalPages;return vo(()=>{if(l&&(F!=null&&F.isIntersecting)&&M&&!b){let N=((w==null?void 0:w.currentPage)||1)+1;o(e.id,N)}},[F==null?void 0:F.isIntersecting,M,b,l,w,e.id,o]),pe("li",{children:[pe("div",{className:"flex items-center gap-1.5 py-1",children:[s?L("button",{onClick:async()=>{if(!s)return;let N=!l;c(N),N&&!p&&!b&&await o(e.id,1)},className:"p-1 -m-1 hover:bg-gray-100 rounded transition-colors","aria-label":l?"Collapse folder":"Expand folder",children:L(cl,{className:`size-4 text-gray-500 transition-transform ${!m&&l?"rotate-90":""}`})}):L("div",{className:"w-4"}),pe("button",{onClick:()=>{m||a(e.id)},disabled:m,title:e.name,className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${f?"bg-blue-100 text-blue-600 font-semibold":m?"opacity-50 cursor-not-allowed":"hover:bg-gray-100"}`,children:[L(qe,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),pe("div",{className:"flex flex-col gap-1",children:[L("span",{className:"truncate min-w-0",children:Ze(e.name,15)}),m?L("span",{className:"text-[0.6rem] text-left font-medium text-gray-900",children:"(Already selected)"}):""]})]})]}),!m&&l&&pe("ul",{className:"pl-6",children:[y.map(N=>L(Ar,{folder:N,selectedFolderId:t,onSelect:a,onLoadChildren:o,disabledFolderIds:n,treeState:i},N.id)),(b||M)&&L("li",{ref:D,className:"py-2 pl-6 flex justify-start",children:L(Er,{className:"h-4 w-4 animate-spin text-blue-500"})}),b&&y.length===0&&L("li",{className:"py-1",children:L("div",{className:"flex items-center gap-1.5 px-2",children:L("span",{className:"text-sm text-gray-500",children:"Loading..."})})})]})]})}function _r(){let{isMoveFileModalOpen:e,setIsMoveFileModalOpen:t,selectedFiles:a,selectedFolders:o,bulkMove:n,provider:i}=E(),[l,c]=ho(void 0),[s,f]=ho({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}),{ref:m,entry:b}=go({threshold:.1,rootMargin:"100px"}),p=s.pagination.get(null),y=p&&p.currentPage<p.totalPages,w=s.loading.has(null),D=o.map(h=>h.id),F=s.folders.get(null)||[];vo(()=>{e&&!s.loaded.has(null)&&!s.loading.has(null)&&M(null,1)},[e]),vo(()=>{if(e&&(b!=null&&b.isIntersecting)&&y&&!w){let h=((p==null?void 0:p.currentPage)||1)+1;M(null,h)}},[b==null?void 0:b.isIntersecting,y,w,p,e]);let M=async(h,N=1)=>{if(!s.loading.has(h)){f(H=>d(r({},H),{loading:new Set(H.loading).add(h)}));try{let H=await i.getFolders(h,N,20);f(q=>{let oe=new Set(q.loading);oe.delete(h);let we=new Set(q.loaded);we.add(h);let u=new Map(q.folders),S=u.get(h)||[];N>1?u.set(h,[...S,...H.folders]):u.set(h,H.folders);let v=new Map(q.pagination);return v.set(h,H.pagination),{folders:u,loading:oe,loaded:we,pagination:v}})}catch(H){console.error(`Failed to load folders for ${h}:`,H),f(q=>{let oe=new Set(q.loading);return oe.delete(h),d(r({},q),{loading:oe})})}}},I=()=>{l!==void 0&&(n(l),t(!1),c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))},P=h=>{t(h),h?M(null,1):(c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))};return e?L(Ie,{open:e,onOpenChange:P,children:pe(Pe,{className:"p-0 max-w-3xl max-h-full m-auto md:max-h-[80vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[pe(Ge,{className:"pt-5 pb-3 m-0 border-b border-border",children:[L(ke,{className:"px-6 text-base",children:pe("div",{className:"flex w-full items-center justify-between gap-2",children:[pe("span",{className:"w-full text-left",children:["Move Items",pe("p",{className:"text-gray-400 text-xs",children:["Moving ",a.length," file",a.length===1?"":"s"," and"," ",o.length," folder",o.length===1?"":"s","."]})]}),pe(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>P(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[L(ce,{className:"size-5"}),L("span",{className:"hidden",children:"Close"})]})]})}),L(rt,{})]}),L("div",{className:"text-sm my-3 px-6 flex-1 flex flex-col min-h-0",children:L("div",{className:"space-y-4 flex flex-col flex-1 min-h-0",children:pe("div",{className:"flex flex-col flex-1 min-h-0",children:[L("label",{className:"block mb-2 font-medium text-gray-900",children:"Select destination folder:"}),pe("ul",{className:"border rounded-xl p-2 shadow-inner overflow-y-auto flex-1 min-h-0",children:[L("li",{children:pe("div",{className:"flex items-center gap-1.5 py-1",children:[L("div",{className:"w-4"}),pe("button",{onClick:()=>c(null),className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${l===null?"bg-blue-100 text-blue-600 font-semibold":"hover:bg-gray-100"}`,children:[L(qe,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),L("div",{className:"flex flex-col gap-1",children:L("span",{className:"truncate min-w-0",children:"Root Directory"})})]})]})}),F.map(h=>L(Ar,{folder:h,selectedFolderId:l,onSelect:N=>c(N),onLoadChildren:M,disabledFolderIds:D,treeState:s},h.id)),(w||y)&&L("li",{ref:m,className:"py-2 pl-6 flex justify-start",children:L(Er,{className:"h-5 w-5 animate-spin text-blue-500"})}),F.length===0&&!w&&!y&&L("li",{className:"text-gray-500 text-sm text-center py-4",children:"No nested folders available"})]})]})})}),pe(Be,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[L(Ye,{asChild:!0,children:L(C,{type:"button",variant:"outline",radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),L(C,{type:"button",onClick:I,disabled:l===void 0,radius:"full",className:"w-full md:w-auto",children:"Move"})]})]})}):null}import{useState as Va}from"react";import{Loader2 as Ml}from"lucide-react";import{ScrollArea as Yt}from"radix-ui";import{jsx as qt,jsxs as ml}from"react/jsx-runtime";function Lr(i){var l=i,{className:e,viewportClassName:t,children:a,viewportRef:o}=l,n=g(l,["className","viewportClassName","children","viewportRef"]);return ml(Yt.Root,d(r({"data-slot":"scroll-area",className:x("relative overflow-hidden",e)},n),{children:[qt(Yt.Viewport,{ref:o,className:x("h-full w-full rounded-[inherit]",t),children:a}),qt(pl,{}),qt(Yt.Corner,{})]}))}function pl(o){var n=o,{className:e,orientation:t="vertical"}=n,a=g(n,["className","orientation"]);return qt(Yt.ScrollAreaScrollbar,d(r({"data-slot":"scroll-area-scrollbar",orientation:t,className:x("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-[1px]",e)},a),{children:qt(Yt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}))}import{jsx as je,jsxs as Qt}from"react/jsx-runtime";function lt({title:e,open:t,onClose:a,previewSection:o,metadataSection:n,footer:i}){return je(Ie,{open:t,onOpenChange:l=>!l&&a(),children:Qt(Pe,{className:"p-0 max-w-6xl m-auto xl:min-h-fit max-h-[85vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[Qt(Ge,{className:"pt-5 pb-3 m-0 border-b border-border",children:[je(ke,{className:"px-6 text-base",children:Qt("div",{className:"flex w-full justify-between gap-2",children:[je("span",{children:e}),Qt(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>a(),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[je(ce,{className:"size-5"}),je("span",{className:"hidden",children:"Close"})]})]})}),je(rt,{})]}),je(Lr,{className:"flex-1 min-h-0",children:Qt("div",{className:"grid grid-cols-1 lg:grid-cols-2 min-h-full max-h-[65vh] overflow-scroll",children:[je("div",{className:"p-6 border-b lg:border-b-0 lg:border-r",children:o}),je("div",{className:"p-6",children:n})]})}),je(Be,{className:"px-6 py-4 border-t border-border",children:i})]})})}import{Loader2 as Or}from"lucide-react";import{toast as Lt}from"sonner";import{useState as bo}from"react";import{jsx as Vr,jsxs as ul}from"react/jsx-runtime";function xo(e){return ul("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[Vr("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Vr("path",{d:"M5 12l5 5l10 -10"})]}))}import{jsx as Le}from"react/jsx-runtime";function st({file:e}){let{provider:t,setFileDetailsModalFile:a,refreshData:o}=E(),[n,i]=bo(!1);return Le(C,{variant:"outline",size:"icon",radius:"full",title:"Delete",className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50 active:scale-95 transition-transform",onClick:async()=>{i(!0);try{await t.deleteFiles([e.id]),await o(),a(null),Lt.success("File Deleted",{description:`${Ze(e.name,20)} has been deleted`})}catch(c){Lt.error("Delete failed"),i(!1)}},disabled:n,children:n?Le(Or,{className:"size-5 animate-spin"}):Le(He,{className:"size-5"})})}function dt({file:e}){let[t,a]=bo(!1);return Le(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{a(!0);try{let n=document.createElement("a");n.href=e.url,n.download=e.name,n.click(),Lt.success("Download Started",{description:`Downloading ${Ze(e.name,20)}`})}catch(n){Lt.error("Download failed")}finally{a(!1)}},className:"border-gray-200 bg-white hover:text-blue-600 hover:border-blue-200 hover:bg-blue-50 active:scale-95 transition-transform",title:"Download",disabled:t,children:t?Le(Or,{className:"size-5 animate-spin"}):Le(ka,{className:"size-5",strokeWidth:2.5})})}function ct({file:e}){let[t,a]=bo(!1);return Le(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{try{await navigator.clipboard.writeText(e.url),a(!0),Lt.success("Link Copied",{description:"File URL copied to clipboard"}),setTimeout(()=>a(!1),2e3)}catch(n){Lt.error("Failed to copy link")}},className:`border-gray-200 bg-white active:scale-95 transition-all ${t?"text-green-700 border-green-400 bg-green-100 font-bold":"hover:text-orange-600 hover:border-orange-200 hover:bg-orange-50"}`,title:"Copy Link",disabled:t,children:t?Le(xo,{className:"size-5 animate-in zoom-in duration-200",strokeWidth:3}):Le(za,{className:"size-5",strokeWidth:2.5})})}function Gr({file:e,onFullscreen:t}){return Le(C,{variant:"outline",size:"icon",radius:"full",onClick:t,className:"border-gray-200 bg-white hover:text-purple-600 hover:border-purple-200 hover:bg-purple-50 active:scale-95 transition-transform",title:"Fullscreen",children:Le(Ta,{className:"size-5",strokeWidth:1})})}import{cva as fl}from"class-variance-authority";import{jsx as hl}from"react/jsx-runtime";var gl=fl(`
84
+ `,{variants:{variant:{sm:"gap-1.25 [&_svg:not([class*=size-])]:size-3.5",md:"gap-1.5 [&_svg:not([class*=size-])]:size-4",lg:"gap-1.5 [&_svg:not([class*=size-])]:size-4"}},defaultVariants:{variant:"md"}});function jt(n){var i=n,{className:e,type:t,variant:o}=i,a=g(i,["className","type","variant"]);return xl("input",r({"data-slot":"input",type:t,className:x(vl({variant:o}),e)},a))}import{jsx as Fe,jsxs as St}from"react/jsx-runtime";function Kr(){let{isCreateFolderModalOpen:e,setIsCreateFolderModalOpen:t,isRenameFolderModalOpen:o,setIsRenameFolderModalOpen:a,createFolder:n,renameFolder:i,folderToRename:l,setFolderToRename:c}=E(),[d,f]=bl(""),m=o,b=e||o;wl(()=>{o&&l?f(l.name):e||f("")},[o,e,l]);let p=async()=>{if(d.trim()!==""){if(m&&l){let w=l.id;w!==null&&await i(w,d.trim()),a(!1),c(null)}else n(d.trim()),t(!1);f("")}},y=()=>{m?(a(!1),c(null)):t(!1),f("")};return b?Fe(Pe,{open:b,onOpenChange:y,children:St(Se,{className:"p-0 max-w-xl m-auto max-h-[32vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[Fe(He,{className:"pt-5 pb-3 m-0 border-b border-border flex w-full justify-between",children:Fe(ze,{className:"px-6 text-base",children:St("div",{className:"flex w-full items-center justify-between gap-2",children:[St("span",{children:[m?"Rename Folder":"Create New Folder",!m&&Fe("span",{className:"ml-4",children:Fe(Ut,{children:St(Zt,{children:[Fe("span",{className:"text-lg",children:"\u2318"})," + F"]})})})]}),St(C,{variant:"outline",size:"icon",radius:"full",onClick:y,className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[Fe(oe,{className:"size-5"}),Fe("span",{className:"hidden",children:"Close"})]})]})})}),St("div",{className:"p-6",children:[Fe("label",{htmlFor:"folder-name",className:"hidden mb-2",children:"Folder Name:"}),Fe(jt,{id:"folder-name",name:"folder-name",value:d,onChange:w=>f(w.target.value),placeholder:"Enter folder name",autoFocus:!0,onKeyDown:w=>{w.key==="Enter"&&d.trim()!==""&&p()}})]}),St(Ze,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[Fe(Xe,{asChild:!0,children:Fe(C,{type:"button",variant:"outline",onClick:y,radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),Fe(C,{type:"button",disabled:d.trim()==="",onClick:p,radius:"full",className:"w-full md:w-auto",children:m?"Rename":"Create"})]})]})}):null}import{useState as ka,useEffect as Pa}from"react";function je(e,t=30){if(e.length<=t)return e;let o=e.slice(0,Math.ceil(t/2)),a=e.slice(-Math.floor(t/2));return`${o}...${a}`}import{useEffect as Cl,useRef as yl,useState as Yr}from"react";function Na({threshold:e=0,root:t=null,rootMargin:o="0%"}={}){let[a,n]=Yr(),[i,l]=Yr(null),c=yl(null);return Cl(()=>(c.current&&c.current.disconnect(),i&&typeof window!="undefined"&&"IntersectionObserver"in window&&(c.current=new IntersectionObserver(([d])=>{n(d)},{threshold:e,root:t,rootMargin:o}),c.current.observe(i)),()=>{c.current&&c.current.disconnect()}),[i,e,t,o]),{ref:l,entry:a}}import{jsx as _,jsxs as me}from"react/jsx-runtime";function qr({folder:e,selectedFolderId:t,onSelect:o,onLoadChildren:a,disabledFolderIds:n=[],treeState:i}){var h;let[l,c]=ka(!1),d=((h=e.folderCount)!=null?h:0)>0,f=t===e.id,m=n.includes(e.id),b=i.loading.has(e.id),p=i.loaded.has(e.id),y=i.folders.get(e.id)||[],w=i.pagination.get(e.id),{ref:D,entry:F}=Na({threshold:.1,rootMargin:"100px"}),M=w&&w.currentPage<w.totalPages;return Pa(()=>{if(l&&(F!=null&&F.isIntersecting)&&M&&!b){let I=((w==null?void 0:w.currentPage)||1)+1;a(e.id,I)}},[F==null?void 0:F.isIntersecting,M,b,l,w,e.id,a]),me("li",{children:[me("div",{className:"flex items-center gap-1.5 py-1",children:[d?_("button",{onClick:async()=>{if(!d)return;let I=!l;c(I),I&&!p&&!b&&await a(e.id,1)},className:"p-1 -m-1 hover:bg-gray-100 rounded transition-colors","aria-label":l?"Collapse folder":"Expand folder",children:_(lt,{className:`size-4 text-gray-500 transition-transform ${!m&&l?"rotate-90":""}`})}):_("div",{className:"w-4"}),me("button",{onClick:()=>{m||o(e.id)},disabled:m,title:e.name,className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${f?"bg-blue-100 text-blue-600 font-semibold":m?"opacity-50 cursor-not-allowed":"hover:bg-gray-100"}`,children:[_(qe,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),me("div",{className:"flex flex-col gap-1",children:[_("span",{className:"truncate min-w-0",children:je(e.name,15)}),m?_("span",{className:"text-[0.6rem] text-left font-medium text-gray-900",children:"(Already selected)"}):""]})]})]}),!m&&l&&me("ul",{className:"pl-6",children:[y.map(I=>_(qr,{folder:I,selectedFolderId:t,onSelect:o,onLoadChildren:a,disabledFolderIds:n,treeState:i},I.id)),(b||M)&&_("li",{ref:D,className:"py-2 pl-6 flex justify-start",children:_(pe,{className:"h-4 w-4 animate-spin text-blue-500"})}),b&&y.length===0&&_("li",{className:"py-1",children:_("div",{className:"flex items-center gap-1.5 px-2",children:_("span",{className:"text-sm text-gray-500",children:"Loading..."})})})]})]})}function Qr(){let{isMoveFileModalOpen:e,setIsMoveFileModalOpen:t,selectedFiles:o,selectedFolders:a,bulkMove:n,provider:i}=E(),[l,c]=ka(void 0),[d,f]=ka({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}),{ref:m,entry:b}=Na({threshold:.1,rootMargin:"100px"}),p=d.pagination.get(null),y=p&&p.currentPage<p.totalPages,w=d.loading.has(null),D=a.map(h=>h.id),F=d.folders.get(null)||[];Pa(()=>{e&&!d.loaded.has(null)&&!d.loading.has(null)&&M(null,1)},[e]),Pa(()=>{if(e&&(b!=null&&b.isIntersecting)&&y&&!w){let h=((p==null?void 0:p.currentPage)||1)+1;M(null,h)}},[b==null?void 0:b.isIntersecting,y,w,p,e]);let M=async(h,I=1)=>{if(!d.loading.has(h)){f(H=>s(r({},H),{loading:new Set(H.loading).add(h)}));try{let H=await i.getFolders(h,I,20);f(q=>{let re=new Set(q.loading);re.delete(h);let ye=new Set(q.loaded);ye.add(h);let u=new Map(q.folders),S=u.get(h)||[];I>1?u.set(h,[...S,...H.folders]):u.set(h,H.folders);let v=new Map(q.pagination);return v.set(h,H.pagination),{folders:u,loading:re,loaded:ye,pagination:v}})}catch(H){console.error(`Failed to load folders for ${h}:`,H),f(q=>{let re=new Set(q.loading);return re.delete(h),s(r({},q),{loading:re})})}}},N=()=>{l!==void 0&&(n(l),t(!1),c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))},k=h=>{t(h),h?M(null,1):(c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))};return e?_(Pe,{open:e,onOpenChange:k,children:me(Se,{className:"p-0 max-w-3xl max-h-full m-auto md:max-h-[80vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[me(He,{className:"pt-5 pb-3 m-0 border-b border-border",children:[_(ze,{className:"px-6 text-base",children:me("div",{className:"flex w-full items-center justify-between gap-2",children:[me("span",{className:"w-full text-left",children:["Move Items",me("p",{className:"text-gray-400 text-xs",children:["Moving ",o.length," file",o.length===1?"":"s"," and"," ",a.length," folder",a.length===1?"":"s","."]})]}),me(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>k(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[_(oe,{className:"size-5"}),_("span",{className:"hidden",children:"Close"})]})]})}),_(dt,{})]}),_("div",{className:"text-sm my-3 px-6 flex-1 flex flex-col min-h-0",children:_("div",{className:"space-y-4 flex flex-col flex-1 min-h-0",children:me("div",{className:"flex flex-col flex-1 min-h-0",children:[_("label",{className:"block mb-2 font-medium text-gray-900",children:"Select destination folder:"}),me("ul",{className:"border rounded-xl p-2 shadow-inner overflow-y-auto flex-1 min-h-0",children:[_("li",{children:me("div",{className:"flex items-center gap-1.5 py-1",children:[_("div",{className:"w-4"}),me("button",{onClick:()=>c(null),className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${l===null?"bg-blue-100 text-blue-600 font-semibold":"hover:bg-gray-100"}`,children:[_(qe,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),_("div",{className:"flex flex-col gap-1",children:_("span",{className:"truncate min-w-0",children:"Root Directory"})})]})]})}),F.map(h=>_(qr,{folder:h,selectedFolderId:l,onSelect:I=>c(I),onLoadChildren:M,disabledFolderIds:D,treeState:d},h.id)),(w||y)&&_("li",{ref:m,className:"py-2 pl-6 flex justify-start",children:_(pe,{className:"h-5 w-5 animate-spin text-blue-500"})}),F.length===0&&!w&&!y&&_("li",{className:"text-gray-500 text-sm text-center py-4",children:"No nested folders available"})]})]})})}),me(Ze,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[_(Xe,{asChild:!0,children:_(C,{type:"button",variant:"outline",radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),_(C,{type:"button",onClick:N,disabled:l===void 0,radius:"full",className:"w-full md:w-auto",children:"Move"})]})]})}):null}import{useState as qo}from"react";import{ScrollArea as ro}from"radix-ui";import{jsx as no,jsxs as Ml}from"react/jsx-runtime";function Jr(i){var l=i,{className:e,viewportClassName:t,children:o,viewportRef:a}=l,n=g(l,["className","viewportClassName","children","viewportRef"]);return Ml(ro.Root,s(r({"data-slot":"scroll-area",className:x("relative overflow-hidden",e)},n),{children:[no(ro.Viewport,{ref:a,className:x("h-full w-full rounded-[inherit]",t),children:o}),no(Fl,{}),no(ro.Corner,{})]}))}function Fl(a){var n=a,{className:e,orientation:t="vertical"}=n,o=g(n,["className","orientation"]);return no(ro.ScrollAreaScrollbar,s(r({"data-slot":"scroll-area-scrollbar",orientation:t,className:x("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-[1px]",e)},o),{children:no(ro.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}))}import{jsx as We,jsxs as io}from"react/jsx-runtime";function mt({title:e,open:t,onClose:o,previewSection:a,metadataSection:n,footer:i}){return We(Pe,{open:t,onOpenChange:l=>!l&&o(),children:io(Se,{className:"p-0 max-w-6xl w-full mx-auto flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[io(He,{className:"pt-5 pb-3 m-0 border-b border-border",children:[We(ze,{className:"px-6 text-base",children:io("div",{className:"flex w-full justify-between gap-2",children:[We("span",{children:e}),io(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>o(),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[We(oe,{className:"size-5"}),We("span",{className:"hidden",children:"Close"})]})]})}),We(dt,{})]}),We(Jr,{className:"flex-1 h-0",children:io("div",{className:"grid grid-cols-1 lg:grid-cols-2 min-h-full",children:[We("div",{className:"p-6 border-b lg:border-b-0 lg:border-r border-slate-200 ",children:a}),We("div",{className:"p-6 overflow-y-auto",children:n})]})}),We(Ze,{className:"px-6 py-4 border-t border-border",children:i})]})})}import{toast as Wt}from"sonner";import{useState as Sa}from"react";import{jsx as Ve}from"react/jsx-runtime";function ut({file:e}){let{provider:t,setFileDetailsModalFile:o,refreshData:a}=E(),[n,i]=Sa(!1);return Ve(C,{variant:"outline",size:"icon",radius:"full",title:"Delete",className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50 active:scale-95 transition-transform",onClick:async()=>{i(!0);try{await t.deleteFiles([e.id]),await a(),o(null),Wt.success("File Deleted",{description:`${je(e.name,20)} has been deleted`})}catch(c){Wt.error("Delete failed"),i(!1)}},disabled:n,children:n?Ve(pe,{className:"size-5 animate-spin"}):Ve(Be,{className:"size-5"})})}function ft({file:e}){let[t,o]=Sa(!1);return Ve(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{o(!0);try{let n=document.createElement("a");n.href=e.url,n.download=e.name,n.click(),Wt.success("Download Started",{description:`Downloading ${je(e.name,20)}`})}catch(n){Wt.error("Download failed")}finally{o(!1)}},className:"border-gray-200 bg-white hover:text-blue-600 hover:border-blue-200 hover:bg-blue-50 active:scale-95 transition-transform",title:"Download",disabled:t,children:t?Ve(pe,{className:"size-5 animate-spin"}):Ve(Lo,{className:"size-5",strokeWidth:2.5})})}function gt({file:e}){let[t,o]=Sa(!1);return Ve(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{try{await navigator.clipboard.writeText(e.url),o(!0),Wt.success("Link Copied",{description:"File URL copied to clipboard"}),setTimeout(()=>o(!1),2e3)}catch(n){Wt.error("Failed to copy link")}},className:`border-gray-200 bg-white active:scale-95 transition-all ${t?"text-green-700 border-green-400 bg-green-100 font-bold":"hover:text-orange-600 hover:border-orange-200 hover:bg-orange-50"}`,title:"Copy Link",disabled:t,children:t?Ve(Je,{className:"size-5 animate-in zoom-in duration-200",strokeWidth:3}):Ve(_o,{className:"size-5",strokeWidth:2.5})})}function Xr({file:e,onFullscreen:t}){return Ve(C,{variant:"outline",size:"icon",radius:"full",onClick:t,className:"border-gray-200 bg-white hover:text-purple-600 hover:border-purple-200 hover:bg-purple-50 active:scale-95 transition-transform",title:"Fullscreen",children:Ve(Vo,{className:"size-5",strokeWidth:1})})}import{cva as Dl}from"class-variance-authority";import{jsx as Nl}from"react/jsx-runtime";var Il=Dl(`
85
85
  w-full bg-background border border-input bg-background text-foreground shadow-xs shadow-black/5 transition-[color,box-shadow]
86
86
  text-foreground placeholder:text-muted-foreground/80 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
87
87
  focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 [&[readonly]]:opacity-70
88
88
  aria-invalid:border-destructive aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
89
- `,{variants:{variant:{sm:"px-2.5 py-2.5 text-xs rounded-md",md:"px-3 py-3 text-sm rounded-md",lg:"px-4 py-4 text-sm rounded-md"}},defaultVariants:{variant:"md"}});function $e(o){var n=o,{className:e,variant:t}=n,a=g(n,["className","variant"]);return hl("textarea",r({"data-slot":"textarea",className:x(gl({variant:t}),e)},a))}import{cva as vl}from"class-variance-authority";import{Label as xl}from"radix-ui";import{jsx as wl}from"react/jsx-runtime";var bl=vl("text-sm leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{variant:{primary:"font-medium",secondary:"font-normal"}},defaultVariants:{variant:"primary"}});function Ve(o){var n=o,{className:e,variant:t}=n,a=g(n,["className","variant"]);return wl(xl.Root,r({"data-slot":"label",className:x(bl({variant:t}),e)},a))}function pt(e){let t=typeof e=="string"?new Date(e):e,a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),n=t.getFullYear();return`${a}/${o}/${n}`}function _a(e){let t=Math.floor(e/60),a=e%60;return`${t}:${a.toString().padStart(2,"0")}`}import{useMemo as Tu}from"react";import{cva as Cl}from"class-variance-authority";import{Separator as Mu}from"radix-ui";import{jsx as Iu}from"react/jsx-runtime";import{jsx as Br,jsxs as Vu}from"react/jsx-runtime";var yl=Cl("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function mt(o){var n=o,{className:e,orientation:t="vertical"}=n,a=g(n,["className","orientation"]);return Br("div",r({role:"group","data-slot":"field","data-orientation":t,className:x(yl({orientation:t}),e)},a))}function ut(a){var o=a,{className:e}=o,t=g(o,["className"]);return Br(Ve,r({"data-slot":"field-label",className:x("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e)},t))}import{cva as Hr}from"class-variance-authority";import{jsx as La}from"react/jsx-runtime";function ft(a){var o=a,{className:e}=o,t=g(o,["className"]);return La("div",r({"data-slot":"input-group",role:"group",className:x("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e)},t))}var Fl=Hr("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function gt(o){var n=o,{className:e,align:t="inline-start"}=n,a=g(n,["className","align"]);return La("div",r({role:"group","data-slot":"input-group-addon","data-align":t,className:x(Fl({align:t}),e),onClick:i=>{var l,c;i.target.closest("button")||(c=(l=i.currentTarget.parentElement)==null?void 0:l.querySelector("input"))==null||c.focus()}},a))}var $u=Hr("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function ht(a){var o=a,{className:e}=o,t=g(o,["className"]);return La("span",r({className:x("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e)},t))}function vt(a){var o=a,{className:e}=o,t=g(o,["className"]);return La(_t,r({"data-slot":"input-group-control",className:x("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e)},t))}import{jsx as U,jsxs as he}from"react/jsx-runtime";function Ur({file:e,onClose:t,onSave:a,onDelete:o}){var F;let[n,i]=Va(!1),[l,c]=Va(e.name),[s,f]=Va(e.alternativeText||""),[m,b]=Va(e.caption||""),p=async()=>{i(!0);try{await(a==null?void 0:a({name:l,alternativeText:s,caption:m})),t()}finally{i(!1)}},y=he("div",{className:"flex flex-col h-full",children:[he("div",{className:"flex gap-2 mb-4",children:[U(st,{file:e}),U(dt,{file:e}),U(ct,{file:e}),U(Gr,{file:e,onFullscreen:()=>window.open(e.url,"_blank")})]}),U("div",{className:"flex-1 flex items-center justify-center bg-gray-50 dark:bg-gray-900 rounded-lg overflow-hidden",style:{backgroundImage:`
89
+ `,{variants:{variant:{sm:"px-2.5 py-2.5 text-xs rounded-md",md:"px-3 py-3 text-sm rounded-md",lg:"px-4 py-4 text-sm rounded-md"}},defaultVariants:{variant:"md"}});function $e(a){var n=a,{className:e,variant:t}=n,o=g(n,["className","variant"]);return Nl("textarea",r({"data-slot":"textarea",className:x(Il({variant:t}),e)},o))}import{cva as kl}from"class-variance-authority";import{Label as Pl}from"radix-ui";import{jsx as zl}from"react/jsx-runtime";var Sl=kl("text-sm leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{variant:{primary:"font-medium",secondary:"font-normal"}},defaultVariants:{variant:"primary"}});function Ge(a){var n=a,{className:e,variant:t}=n,o=g(n,["className","variant"]);return zl(Pl.Root,r({"data-slot":"label",className:x(Sl({variant:t}),e)},o))}function ht(e){let t=typeof e=="string"?new Date(e):e,o=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=t.getFullYear();return`${o}/${a}/${n}`}function Ko(e){let t=Math.floor(e/60),o=e%60;return`${t}:${o.toString().padStart(2,"0")}`}import{useMemo as h1}from"react";import{cva as Rl}from"class-variance-authority";import{Separator as s1}from"radix-ui";import{jsx as p1}from"react/jsx-runtime";import{jsx as en,jsxs as y1}from"react/jsx-runtime";var Tl=Rl("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function vt(a){var n=a,{className:e,orientation:t="vertical"}=n,o=g(n,["className","orientation"]);return en("div",r({role:"group","data-slot":"field","data-orientation":t,className:x(Tl({orientation:t}),e)},o))}function xt(o){var a=o,{className:e}=a,t=g(a,["className"]);return en(Ge,r({"data-slot":"field-label",className:x("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e)},t))}import{cva as tn}from"class-variance-authority";import{jsx as Yo}from"react/jsx-runtime";function bt(o){var a=o,{className:e}=a,t=g(a,["className"]);return Yo("div",r({"data-slot":"input-group",role:"group",className:x("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e)},t))}var El=tn("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function wt(a){var n=a,{className:e,align:t="inline-start"}=n,o=g(n,["className","align"]);return Yo("div",r({role:"group","data-slot":"input-group-addon","data-align":t,className:x(El({align:t}),e),onClick:i=>{var l,c;i.target.closest("button")||(c=(l=i.currentTarget.parentElement)==null?void 0:l.querySelector("input"))==null||c.focus()}},o))}var S1=tn("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Ct(o){var a=o,{className:e}=a,t=g(a,["className"]);return Yo("span",r({className:x("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e)},t))}function yt(o){var a=o,{className:e}=a,t=g(a,["className"]);return Yo(jt,r({"data-slot":"input-group-control",className:x("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e)},t))}import{jsx as Z,jsxs as ve}from"react/jsx-runtime";function on({file:e,onClose:t,onSave:o,onDelete:a}){var F;let[n,i]=qo(!1),[l,c]=qo(e.name),[d,f]=qo(e.alternativeText||""),[m,b]=qo(e.caption||""),p=async()=>{i(!0);try{await(o==null?void 0:o({name:l,alternativeText:d,caption:m})),t()}finally{i(!1)}},y=ve("div",{className:"flex flex-col h-full",children:[ve("div",{className:"flex gap-2 mb-4",children:[Z(ut,{file:e}),Z(ft,{file:e}),Z(gt,{file:e}),Z(Xr,{file:e,onFullscreen:()=>window.open(e.url,"_blank")})]}),Z("div",{className:"flex-1 flex items-center justify-center bg-gray-50 dark:bg-gray-900 rounded-lg overflow-hidden",style:{backgroundImage:`
90
90
  linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
91
91
  linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
92
92
  linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
93
93
  linear-gradient(-45deg, transparent 75%, #e5e7eb 75%)
94
- `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},children:U("img",{src:e.previewUrl||e.url,alt:e.alternativeText||e.name,className:"max-w-full max-h-full object-contain"})})]}),w=he("div",{className:"space-y-6",children:[he("div",{className:"grid grid-cols-2 gap-4",children:[he("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),U("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),he("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Dimensions"}),U("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),he("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),U("p",{className:"text-xs font-bold text-blue-600",children:pt(e.createdAt)})]}),he("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),U("p",{className:"text-xs font-bold text-blue-600",children:((F=e.ext)==null?void 0:F.replace(".",""))||"N/A"})]})]}),he("div",{className:"space-y-4 pt-4 border-t",children:[U("div",{className:"space-y-2",children:he(mt,{className:"gap-0",children:[U(ut,{htmlFor:"fileName",children:"File name"}),he(ft,{children:[U(vt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:M=>c(M.target.value)}),U(gt,{align:"inline-end",className:"pr-1",children:U(ht,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),he("div",{className:"space-y-2",children:[U(Ve,{htmlFor:"altText",children:"Alternative text"}),U($e,{id:"altText",value:s,onChange:M=>f(M.target.value),placeholder:"Describe the image for accessibility",rows:3}),U("p",{className:"text-xs text-muted-foreground",children:"This text will be displayed if the asset can't be shown."})]}),he("div",{className:"space-y-2",children:[U(Ve,{htmlFor:"caption",children:"Caption"}),U($e,{id:"caption",value:m,onChange:M=>b(M.target.value),placeholder:"Add a caption",rows:3})]})]})]});return U(lt,{title:"Details",open:!0,onClose:t,previewSection:y,metadataSection:w,footer:he("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[U(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:n,children:"Cancel"}),he(C,{className:"w-full md:w-auto",onClick:p,radius:"full",disabled:n,children:[n&&U(Ml,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}import{useState as wo}from"react";import{Loader2 as Dl}from"lucide-react";import{jsx as Z,jsxs as me}from"react/jsx-runtime";function Zr({file:e,onClose:t,onSave:a,onDelete:o}){var w,D,F;let[n,i]=wo(!1),[l,c]=wo(e.name),[s,f]=wo(e.caption||""),m=async()=>{i(!0);try{await(a==null?void 0:a({name:l,caption:s})),t()}finally{i(!1)}},b=me("div",{className:"flex flex-col h-full",children:[me("div",{className:"flex gap-2 mb-4",children:[Z(st,{file:e}),Z(dt,{file:e}),Z(ct,{file:e})]}),Z("div",{className:"flex-1 flex items-center justify-center bg-black rounded-lg overflow-hidden",children:Z("video",{src:e.url,controls:!0,className:"max-w-full max-h-full",style:{maxHeight:"500px"},children:"Your browser does not support the video tag."})})]}),p=me("div",{className:"space-y-6",children:[me("div",{className:"grid grid-cols-2 gap-4",children:[me("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),Z("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),me("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Dimensions"}),Z("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),me("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),Z("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?_a(e.metaData.duration):"N/A"})]}),me("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),Z("p",{className:"text-xs font-bold text-blue-600",children:pt(e.createdAt)})]}),me("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),Z("p",{className:"text-xs font-bold text-blue-600",children:((D=e.ext)==null?void 0:D.replace(".",""))||"N/A"})]}),me("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Video Source"}),Z("p",{className:"text-xs font-bold text-blue-600 capitalize",children:((F=e.metaData)==null?void 0:F.videoSource)||"local"})]})]}),me("div",{className:"space-y-4 pt-4 border-t",children:[Z("div",{className:"space-y-2",children:me(mt,{className:"gap-0",children:[Z(ut,{htmlFor:"fileName",children:"File name"}),me(ft,{children:[Z(vt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:M=>c(M.target.value)}),Z(gt,{align:"inline-end",className:"pr-1",children:Z(ht,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),me("div",{className:"space-y-2",children:[Z(Ve,{htmlFor:"caption",children:"Caption"}),Z($e,{id:"caption",value:s,onChange:M=>f(M.target.value),placeholder:"Add a caption",rows:3})]})]})]});return Z(lt,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:me("div",{className:"flex w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[Z(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:n,children:"Cancel"}),me(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:n,children:[n&&Z(Dl,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}import{useState as Co}from"react";import{Loader2 as Nl}from"lucide-react";import{Music as Il}from"lucide-react";import{jsx as B,jsxs as ue}from"react/jsx-runtime";function jr({file:e,onClose:t,onSave:a,onDelete:o}){var w,D,F;let[n,i]=Co(!1),[l,c]=Co(e.name),[s,f]=Co(e.caption||""),m=async()=>{i(!0);try{await(a==null?void 0:a({name:l,caption:s})),t()}finally{i(!1)}},b=ue("div",{className:"flex flex-col h-full",children:[ue("div",{className:"flex gap-2 mb-4",children:[B(st,{file:e}),B(dt,{file:e}),B(ct,{file:e})]}),ue("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-purple-50 to-blue-50 dark:from-purple-950 dark:to-blue-950 rounded-lg p-8",children:[B("div",{className:"mb-8",children:B("div",{className:"w-32 h-32 rounded-full bg-white dark:bg-gray-800 shadow-lg flex items-center justify-center",children:B(Il,{className:"w-16 h-16 text-purple-600 dark:text-purple-400"})})}),B("div",{className:"w-full max-w-md",children:B("audio",{src:e.url,controls:!0,className:"w-full",children:"Your browser does not support the audio tag."})})]})]}),p=ue("div",{className:"space-y-6",children:[ue("div",{className:"grid grid-cols-2 gap-4",children:[ue("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),B("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),ue("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),B("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?_a(e.metaData.duration):"N/A"})]}),ue("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Bitrate"}),B("p",{className:"text-xs font-bold text-blue-600",children:(D=e.metaData)!=null&&D.bitrate?`${e.metaData.bitrate} kbps`:"N/A"})]}),ue("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),B("p",{className:"text-xs font-bold text-blue-600",children:pt(e.createdAt)})]}),ue("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),B("p",{className:"text-xs font-bold text-blue-600",children:((F=e.ext)==null?void 0:F.replace(".",""))||"N/A"})]})]}),ue("div",{className:"space-y-4 pt-4 border-t",children:[B("div",{className:"space-y-2",children:ue(mt,{className:"gap-0",children:[B(ut,{htmlFor:"fileName",children:"File name"}),ue(ft,{children:[B(vt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:M=>c(M.target.value)}),B(gt,{align:"inline-end",className:"pr-1",children:B(ht,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),ue("div",{className:"space-y-2",children:[B(Ve,{htmlFor:"caption",children:"Caption"}),B($e,{id:"caption",value:s,onChange:M=>f(M.target.value),placeholder:"Add a caption",rows:3})]})]})]});return B(lt,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:ue("div",{className:"flex gap-2 w-full sm:justify-between justify-center items-center flex-col sm:flex-row ",children:[B(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:n,children:"Cancel"}),ue(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:n,children:[n&&B(Nl,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}import{useState as yo}from"react";import{Loader2 as Pl}from"lucide-react";import{jsx as W,jsxs as ne}from"react/jsx-runtime";function $r({file:e,onClose:t,onSave:a}){var D,F,M,I;let[o,n]=yo(!1),[i,l]=yo(e.name),[c,s]=yo(((D=e.metaData)==null?void 0:D.description)||""),f=async()=>{n(!0);try{await(a==null?void 0:a({name:i,metaData:d(r({},e.metaData),{description:c})})),t()}finally{n(!1)}},m=((F=e.ext)==null?void 0:F.replace(".",""))||"file",{component:b}=it(e),p=ne("div",{className:"flex flex-col h-full",children:[ne("div",{className:"flex gap-2 mb-4",children:[W(st,{file:e}),W(dt,{file:e}),W(ct,{file:e})]}),ne("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 rounded-lg p-8",children:[W("div",{className:"mb-4 w-32 h-32 flex items-center justify-center",children:W(b,{file:e,metaData:e.metaData})}),ne("p",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[m," File"]})]})]}),y=ne("div",{className:"space-y-6",children:[ne("div",{className:"grid grid-cols-2 gap-4",children:[ne("div",{children:[W("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),W("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),ne("div",{children:[W("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),W("p",{className:"text-xs font-bold text-blue-600",children:pt(e.createdAt)})]}),ne("div",{children:[W("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),W("p",{className:"text-xs font-bold text-blue-600",children:m})]}),((M=e.metaData)==null?void 0:M.pageCount)&&ne("div",{children:[W("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Page Count"}),W("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.pageCount})]}),((I=e.metaData)==null?void 0:I.author)&&ne("div",{children:[W("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Author"}),W("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.author})]})]}),ne("div",{className:"space-y-4 pt-4 border-t",children:[W("div",{className:"space-y-2",children:ne(mt,{className:"gap-0",children:[W(ut,{htmlFor:"fileName",children:"File name"}),ne(ft,{children:[W(vt,{id:"fileName",placeholder:"Enter file name",value:i.replace(e.ext||"",""),onChange:P=>l(P.target.value)}),W(gt,{align:"inline-end",className:"pr-1",children:W(ht,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),ne("div",{className:"space-y-2",children:[W(Ve,{htmlFor:"description",children:"Description"}),W($e,{id:"description",value:c,onChange:P=>s(P.target.value),placeholder:"Add a description",rows:3})]})]})]});return W(lt,{title:"Details",open:!0,onClose:t,previewSection:p,metadataSection:y,footer:ne("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[W(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:o,children:"Cancel"}),ne(C,{className:"w-full md:w-auto",onClick:f,radius:"full",disabled:o,children:[o&&W(Pl,{className:"mr-2 h-4 w-4 animate-spin"}),"Save"]})]})})}import{jsx as Dt,jsxs as kl}from"react/jsx-runtime";function Wr({className:e}){let{fileDetailsModalFile:t,setFileDetailsModalFile:a,updateFileMetadata:o}=E(),n=()=>{a(null)},i=async c=>{t&&await o(t.id,c)},l=()=>{if(!t)return null;switch(Ue(t.mime,t.ext)){case K.IMAGE:return Dt(Ur,{file:t,onClose:n,onSave:i});case K.VIDEO:return Dt(Zr,{file:t,onClose:n,onSave:i});case K.AUDIO:return Dt(jr,{file:t,onClose:n,onSave:i});case K.FILE:default:return Dt($r,{file:t,onClose:n,onSave:i})}};return kl("div",{className:x("",e),children:[Dt(zr,{}),Dt(Tr,{}),Dt(_r,{}),l()]})}import{jsx as Kr}from"react/jsx-runtime";function Sl(a){var o=a,{children:e}=o,t=g(o,["children"]);return Kr(ca,d(r({mode:J.PAGE,selectionMode:Re.MULTIPLE},t),{children:e}))}function zl(c){var s=c,{children:e,fileSelectionMode:t=Re.SINGLE,acceptedFileTypes:a,viewMode:o="grid",onFilesSelected:n,onClose:i}=s,l=g(s,["children","fileSelectionMode","acceptedFileTypes","viewMode","onFilesSelected","onClose"]);return Kr(ca,d(r({mode:J.MODAL,selectionMode:t,acceptedFileTypesForModal:a||l.allowedFileTypes,viewMode:o,onFilesSelected:n,onClose:i},l),{children:e}))}var Qe={Page:Sl,Modal:zl,Header:Yo,Footer:Ko,Overlays:Wr};import{jsx as be,jsxs as Nt}from"react/jsx-runtime";function Yr(){let{setIsMoveFileModalOpen:e}=E();return Nt(C,{variant:"outline",size:"lg",radius:"full",onClick:()=>e(!0),className:"text-md font-medium bg-white hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 border-gray-200 shadow-sm",children:[be(Wt,{className:"size-5"}),be("span",{className:"hidden sm:inline",children:"Move"})]})}function qr(){let{bulkDelete:e}=E();return Nt(C,{variant:"outline",size:"lg",radius:"full",onClick:e,className:"text-md font-medium bg-white hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 shadow-sm",children:[be(He,{className:"size-5"}),be("span",{className:"hidden",children:"Delete"})]})}function Qr(){let{handleClearSelection:e}=E();return Nt(C,{variant:"outline",size:"lg",onClick:e,className:"rounded-full text-md font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 hover:font-bold hover:border-blue-200 transition-all duration-200",children:[be(ce,{className:"size-5 text-blue-600"}),"Clear"]})}function Jr(){let{selectedFiles:e,selectedFolders:t}=E();return e.length+t.length===0?null:be("div",{className:"w-full",children:Nt("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[Nt("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[be(Yr,{}),be(qr,{})]}),be(Qr,{})]})})}function Xr({className:e}){let{selectedFiles:t,selectedFolders:a}=E();return t.length+a.length===0?null:be("div",{className:`fixed bottom-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-sm border-t border-gray-200 shadow-lg ${e||""}`,children:be("div",{className:"px-4 sm:px-6 py-3 mx-auto",children:Nt("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[Nt("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[be(Yr,{}),be(qr,{})]}),be(Qr,{})]})})})}import{jsx as Tl}from"react/jsx-runtime";function Fo(a){var o=a,{className:e}=o,t=g(o,["className"]);return Tl("div",r({"data-slot":"skeleton",className:x("animate-pulse rounded-md bg-accent",e)},t))}import{useRouter as Rl}from"next/navigation";import{Fragment as El,jsx as Je,jsxs as Mo}from"react/jsx-runtime";function Oa(){let{currentFolder:e,handleFolderClick:t,isLoading:a}=E(),o=Rl(),n=()=>{o.back()};return a?Mo("div",{className:"flex item-center w-full",children:[Je(Fo,{className:"rounded-full size-10 mr-2 shrink-0"}),Je(Fo,{className:"min-w-32 rounded-md h-full"})]}):Je(El,{children:e?Mo("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[Je(C,{variant:"outline",size:"icon",radius:"full",disabled:a,className:"border-gray-200 bg-white mr-2",onClick:n,children:Je(Pt,{className:"size-5",strokeWidth:"1",stroke:"black"})}),Je("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:Ze(e.name,20)})]}):Mo("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[Je(C,{className:"mr-2 shrink-0",radius:"full",variant:"ghost",mode:"icon",size:"icon",onClick:()=>t(null),children:Je(Ia,{className:"size-6"})}),Je("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:"Home"})]})})}import{MoreHorizontal as dn}from"lucide-react";import{Check as $2,ChevronRight as W2,Circle as K2}from"lucide-react";import{DropdownMenu as Vt}from"radix-ui";import{jsx as Ot,jsxs as Q2}from"react/jsx-runtime";function Jt(t){var e=g(t,[]);return Ot(Vt.Root,r({"data-slot":"dropdown-menu"},e))}function Xt(t){var e=g(t,[]);return Ot(Vt.Trigger,r({className:"select-none","data-slot":"dropdown-menu-trigger"},e))}function ea(o){var n=o,{className:e,sideOffset:t=4}=n,a=g(n,["className","sideOffset"]);return Ot(Vt.Portal,{children:Ot(Vt.Content,r({"data-slot":"dropdown-menu-content",sideOffset:t,className:x("space-y-0.5 z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},a))})}function Xe(n){var i=n,{className:e,inset:t,variant:a}=i,o=g(i,["className","inset","variant"]);return Ot(Vt.Item,r({"data-slot":"dropdown-menu-item",className:x("text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0","focus:bg-accent focus:text-foreground","data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",t&&"ps-8",a==="destructive"&&"text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",e)},o))}function en(a){var o=a,{className:e}=o,t=g(o,["className"]);return Ot(Vt.Separator,r({"data-slot":"dropdown-menu-separator",className:x("-mx-2 my-1.5 h-px bg-muted",e)},t))}import{useCallback as Ol,useEffect as Gl,useState as Ha}from"react";import{Command as Gt}from"cmdk";import{Check as rf,Search as Al}from"lucide-react";import{jsx as We,jsxs as rn}from"react/jsx-runtime";function _l(a){var o=a,{className:e}=o,t=g(o,["className"]);return We(Gt,r({className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e)},t))}var tn=n=>{var i=n,{children:e,className:t,shouldFilter:a}=i,o=g(i,["children","className","shouldFilter"]);return We(Ie,d(r({},o),{children:rn(Pe,{className:x("overflow-hidden p-0 shadow-lg",t),children:[We(ke,{className:"hidden"}),We(_l,{shouldFilter:a,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})]})}))};function an(a){var o=a,{className:e}=o,t=g(o,["className"]);return rn("div",{className:"flex items-center border-border border-b px-3","cmdk-input-wrapper":"","data-slot":"command-input",children:[We(Al,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),We(Gt.Input,r({className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e)},t))]})}function on(a){var o=a,{className:e}=o,t=g(o,["className"]);return We(Gt.List,r({"data-slot":"command-list",className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e)},t))}function Ga(t){var e=g(t,[]);return We(Gt.Empty,r({"data-slot":"command-empty",className:"py-6 text-center text-sm"},e))}function Do(a){var o=a,{className:e}=o,t=g(o,["className"]);return We(Gt.Group,r({"data-slot":"command-group",className:x("overflow-hidden p-1.5 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e)},t))}function No(a){var o=a,{className:e}=o,t=g(o,["className"]);return We(Gt.Item,r({"data-slot":"command-item",className:x("relative flex text-foreground cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0","[&_svg:not([role=img]):not([class*=text-])]:opacity-60",e)},t))}import{useEffect as Ll,useState as Vl}from"react";function Ba(e,t=500){let[a,o]=Vl(e);return Ll(()=>{let n=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(n)}},[e,t]),a}import{toast as Bl}from"sonner";import{Fragment as Hl,jsx as Q,jsxs as et}from"react/jsx-runtime";function Io(){let[e,t]=Ha(""),[a,o]=Ha([]),[n,i]=Ha([]),[l,c]=Ha(!1),{provider:s,handleFolderClick:f,handleClearSelection:m,isSearchModalOpen:b,setIsSearchModalOpen:p,setFileDetailsModalFile:y}=E(),w=Ba(e,300),D=Ol(async I=>{c(!0);try{let[P,h]=await Promise.all([s.findFiles(I),s.findFolders(I)]);o(P),i(h)}catch(P){let h=P instanceof Error?P.message:"Search failed";Bl.error("Search Failed",{description:h}),o([]),i([])}finally{c(!1)}},[s]);return Gl(()=>{b&&w.length>0?D(w):(o([]),i([]))},[w,b,D]),et(Hl,{children:[et(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>p(!0),children:[Q(ze,{className:"size-4 text-gray-700"}),Q("span",{className:"hidden",children:"Search"})]}),et(tn,{className:"max-w-4xl w-full",open:b,onOpenChange:I=>{p(I),I||(t(""),o([]),i([]))},shouldFilter:!1,children:[Q(an,{placeholder:"Type to search files or folders...",value:e,onValueChange:I=>{t(I)}}),et(on,{children:[l&&Q(Ga,{children:"Searching..."}),!l&&a.length===0&&n.length===0&&!e&&Q(Ga,{children:et("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[Q(ze,{className:"size-12 text-gray-300 mb-3"}),Q("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"Search your files and folders"}),Q("p",{className:"text-xs text-gray-500",children:"Start typing to find what you're looking for"}),Q("p",{className:"text-xs text-gray-500 mt-2",children:Q(At,{children:et(Et,{children:[Q("span",{className:"text-lg",children:"\u2318"})," + K"]})})})]})}),!l&&a.length===0&&n.length===0&&e&&Q(Ga,{children:et("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[Q(ze,{className:"size-12 text-gray-300 mb-3"}),Q("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"No results found"}),Q("p",{className:"text-xs text-gray-500",children:"Try searching with different keywords"})]})}),n.length>0&&Q(Do,{heading:"Folders",children:n.map(I=>et(No,{onSelect:()=>{m(),p(!1),f(I)},children:[Q(qe,{className:"size-4 mr-2 shrink-0",strokeWidth:1.5}),Q("span",{children:Ze(I.name,60)})]},I.id))}),a.length>0&&Q(Do,{heading:"Files",children:a.map(I=>{let{component:P}=it(I);return et(No,{onSelect:()=>{m(),y(I)},children:[Q("div",{className:"size-6 mr-2 shrink-0 flex items-center justify-center",children:Q(P,{file:I,metaData:I.metaData})}),Q("span",{children:Ze(I.name,60)})]},I.id)})})]})]})]})}import{cva as Ul}from"class-variance-authority";import{Check as Zl,Minus as jl}from"lucide-react";import{Checkbox as nn}from"radix-ui";import{jsx as Po,jsxs as Wl}from"react/jsx-runtime";var $l=Ul(`
94
+ `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},children:Z("img",{src:e.previewUrl||e.url,alt:e.alternativeText||e.name,className:"max-w-full max-h-full object-contain"})})]}),w=ve("div",{className:"space-y-6",children:[ve("div",{className:"grid grid-cols-2 gap-4",children:[ve("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),Z("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),ve("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Dimensions"}),Z("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),ve("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),Z("p",{className:"text-xs font-bold text-blue-600",children:ht(e.createdAt)})]}),ve("div",{children:[Z("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),Z("p",{className:"text-xs font-bold text-blue-600",children:((F=e.ext)==null?void 0:F.replace(".",""))||"N/A"})]})]}),ve("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[Z("div",{className:"space-y-2",children:ve(vt,{className:"gap-0",children:[Z(xt,{htmlFor:"fileName",children:"File name"}),ve(bt,{children:[Z(yt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:M=>c(M.target.value)}),Z(wt,{align:"inline-end",className:"pr-1",children:Z(Ct,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),ve("div",{className:"space-y-2",children:[Z(Ge,{htmlFor:"altText",children:"Alternative text"}),Z($e,{id:"altText",value:d,onChange:M=>f(M.target.value),placeholder:"Describe the image for accessibility",rows:3}),Z("p",{className:"text-xs text-muted-foreground",children:"This text will be displayed if the asset can't be shown."})]}),ve("div",{className:"space-y-2",children:[Z(Ge,{htmlFor:"caption",children:"Caption"}),Z($e,{id:"caption",value:m,onChange:M=>b(M.target.value),placeholder:"Add a caption",rows:3})]})]})]});return Z(mt,{title:"Details",open:!0,onClose:t,previewSection:y,metadataSection:w,footer:ve("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[Z(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:n,children:"Cancel"}),ve(C,{className:"w-full md:w-auto",onClick:p,radius:"full",disabled:n,children:[n&&Z(pe,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}import{useState as za}from"react";import{jsx as U,jsxs as ue}from"react/jsx-runtime";function an({file:e,onClose:t,onSave:o,onDelete:a}){var w,D,F;let[n,i]=za(!1),[l,c]=za(e.name),[d,f]=za(e.caption||""),m=async()=>{i(!0);try{await(o==null?void 0:o({name:l,caption:d})),t()}finally{i(!1)}},b=ue("div",{className:"flex flex-col h-full",children:[ue("div",{className:"flex gap-2 mb-4",children:[U(ut,{file:e}),U(ft,{file:e}),U(gt,{file:e})]}),U("div",{className:"flex-1 flex items-center justify-center bg-black rounded-lg overflow-hidden",children:U("video",{src:e.url,controls:!0,className:"max-w-full max-h-full",style:{maxHeight:"500px"},children:"Your browser does not support the video tag."})})]}),p=ue("div",{className:"space-y-6",children:[ue("div",{className:"grid grid-cols-2 gap-4",children:[ue("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),U("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),ue("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Dimensions"}),U("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),ue("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),U("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?Ko(e.metaData.duration):"N/A"})]}),ue("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),U("p",{className:"text-xs font-bold text-blue-600",children:ht(e.createdAt)})]}),ue("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),U("p",{className:"text-xs font-bold text-blue-600",children:((D=e.ext)==null?void 0:D.replace(".",""))||"N/A"})]}),ue("div",{children:[U("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Video Source"}),U("p",{className:"text-xs font-bold text-blue-600 capitalize",children:((F=e.metaData)==null?void 0:F.videoSource)||"local"})]})]}),ue("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[U("div",{className:"space-y-2",children:ue(vt,{className:"gap-0",children:[U(xt,{htmlFor:"fileName",children:"File name"}),ue(bt,{children:[U(yt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:M=>c(M.target.value)}),U(wt,{align:"inline-end",className:"pr-1",children:U(Ct,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),ue("div",{className:"space-y-2",children:[U(Ge,{htmlFor:"caption",children:"Caption"}),U($e,{id:"caption",value:d,onChange:M=>f(M.target.value),placeholder:"Add a caption",rows:3})]})]})]});return U(mt,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:ue("div",{className:"flex w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[U(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:n,children:"Cancel"}),ue(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:n,children:[n&&U(pe,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}import{useState as Ra}from"react";import{jsx as B,jsxs as fe}from"react/jsx-runtime";function rn({file:e,onClose:t,onSave:o,onDelete:a}){var w,D,F;let[n,i]=Ra(!1),[l,c]=Ra(e.name),[d,f]=Ra(e.caption||""),m=async()=>{i(!0);try{await(o==null?void 0:o({name:l,caption:d})),t()}finally{i(!1)}},b=fe("div",{className:"flex flex-col h-full",children:[fe("div",{className:"flex gap-2 mb-4",children:[B(ut,{file:e}),B(ft,{file:e}),B(gt,{file:e})]}),fe("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-purple-50 to-blue-50 dark:from-purple-950 dark:to-blue-950 rounded-lg p-8",children:[B("div",{className:"mb-8",children:B("div",{className:"w-32 h-32 rounded-full bg-white dark:bg-gray-800 shadow-lg flex items-center justify-center",children:B(Lt,{className:"w-16 h-16 text-purple-600 dark:text-purple-400"})})}),B("div",{className:"w-full max-w-md",children:B("audio",{src:e.url,controls:!0,className:"w-full",children:"Your browser does not support the audio tag."})})]})]}),p=fe("div",{className:"space-y-6",children:[fe("div",{className:"grid grid-cols-2 gap-4",children:[fe("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),B("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),fe("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),B("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?Ko(e.metaData.duration):"N/A"})]}),fe("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Bitrate"}),B("p",{className:"text-xs font-bold text-blue-600",children:(D=e.metaData)!=null&&D.bitrate?`${e.metaData.bitrate} kbps`:"N/A"})]}),fe("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),B("p",{className:"text-xs font-bold text-blue-600",children:ht(e.createdAt)})]}),fe("div",{children:[B("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),B("p",{className:"text-xs font-bold text-blue-600",children:((F=e.ext)==null?void 0:F.replace(".",""))||"N/A"})]})]}),fe("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[B("div",{className:"space-y-2",children:fe(vt,{className:"gap-0",children:[B(xt,{htmlFor:"fileName",children:"File name"}),fe(bt,{children:[B(yt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:M=>c(M.target.value)}),B(wt,{align:"inline-end",className:"pr-1",children:B(Ct,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),fe("div",{className:"space-y-2",children:[B(Ge,{htmlFor:"caption",children:"Caption"}),B($e,{id:"caption",value:d,onChange:M=>f(M.target.value),placeholder:"Add a caption",rows:3})]})]})]});return B(mt,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:fe("div",{className:"flex gap-2 w-full sm:justify-between justify-center items-center flex-col sm:flex-row ",children:[B(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:n,children:"Cancel"}),fe(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:n,children:[n&&B(pe,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}import{useState as Ta}from"react";import{jsx as $,jsxs as ie}from"react/jsx-runtime";function nn({file:e,onClose:t,onSave:o}){var D,F,M,N;let[a,n]=Ta(!1),[i,l]=Ta(e.name),[c,d]=Ta(((D=e.metaData)==null?void 0:D.description)||""),f=async()=>{n(!0);try{await(o==null?void 0:o({name:i,metaData:s(r({},e.metaData),{description:c})})),t()}finally{n(!1)}},m=((F=e.ext)==null?void 0:F.replace(".",""))||"file",{component:b}=pt(e),p=ie("div",{className:"flex flex-col h-full",children:[ie("div",{className:"flex gap-2 mb-4",children:[$(ut,{file:e}),$(ft,{file:e}),$(gt,{file:e})]}),ie("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 rounded-lg p-8",children:[$("div",{className:"mb-4 w-32 h-32 flex items-center justify-center",children:$(b,{file:e,metaData:e.metaData})}),ie("p",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[m," File"]})]})]}),y=ie("div",{className:"space-y-6",children:[ie("div",{className:"grid grid-cols-2 gap-4",children:[ie("div",{children:[$("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),$("p",{className:"text-xs font-bold text-blue-600",children:ae(e.size)})]}),ie("div",{children:[$("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),$("p",{className:"text-xs font-bold text-blue-600",children:ht(e.createdAt)})]}),ie("div",{children:[$("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),$("p",{className:"text-xs font-bold text-blue-600",children:m})]}),((M=e.metaData)==null?void 0:M.pageCount)&&ie("div",{children:[$("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Page Count"}),$("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.pageCount})]}),((N=e.metaData)==null?void 0:N.author)&&ie("div",{children:[$("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Author"}),$("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.author})]})]}),ie("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[$("div",{className:"space-y-2",children:ie(vt,{className:"gap-0",children:[$(xt,{htmlFor:"fileName",children:"File name"}),ie(bt,{children:[$(yt,{id:"fileName",placeholder:"Enter file name",value:i.replace(e.ext||"",""),onChange:k=>l(k.target.value)}),$(wt,{align:"inline-end",className:"pr-1",children:$(Ct,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),ie("div",{className:"space-y-2",children:[$(Ge,{htmlFor:"description",children:"Description"}),$($e,{id:"description",value:c,onChange:k=>d(k.target.value),placeholder:"Add a description",rows:3})]})]})]});return $(mt,{title:"Details",open:!0,onClose:t,previewSection:p,metadataSection:y,footer:ie("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[$(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:a,children:"Cancel"}),ie(C,{className:"w-full md:w-auto",onClick:f,radius:"full",disabled:a,children:[a&&$(pe,{className:"mr-2 h-4 w-4 animate-spin"}),"Save"]})]})})}import{jsx as zt,jsxs as Ll}from"react/jsx-runtime";function ln({className:e}){let{fileDetailsModalFile:t,setFileDetailsModalFile:o,updateFileMetadata:a}=E(),n=()=>{o(null)},i=async c=>{t&&await a(t.id,c)},l=()=>{if(!t)return null;switch(Ue(t.mime,t.ext)){case K.IMAGE:return zt(on,{file:t,onClose:n,onSave:i});case K.VIDEO:return zt(an,{file:t,onClose:n,onSave:i});case K.AUDIO:return zt(rn,{file:t,onClose:n,onSave:i});case K.FILE:default:return zt(nn,{file:t,onClose:n,onSave:i})}};return Ll("div",{className:x("",e),children:[zt($r,{}),zt(Kr,{}),zt(Qr,{}),l()]})}import{jsx as sn}from"react/jsx-runtime";function Al(o){var a=o,{children:e}=a,t=g(a,["children"]);return sn(xo,s(r({mode:J.PAGE,selectionMode:Ee.MULTIPLE},t),{children:e}))}function _l(c){var d=c,{children:e,fileSelectionMode:t=Ee.SINGLE,acceptedFileTypes:o,viewMode:a="grid",onFilesSelected:n,onClose:i}=d,l=g(d,["children","fileSelectionMode","acceptedFileTypes","viewMode","onFilesSelected","onClose"]);return sn(xo,s(r({mode:J.MODAL,selectionMode:t,acceptedFileTypesForModal:o||l.allowedFileTypes,viewMode:a,onFilesSelected:n,onClose:i},l),{children:e}))}var et={Page:Al,Modal:_l,Header:Cr,Footer:wr,Overlays:ln};import{jsx as Ce,jsxs as Rt}from"react/jsx-runtime";function dn(){let{setIsMoveFileModalOpen:e}=E();return Rt(C,{variant:"outline",size:"lg",radius:"full",onClick:()=>e(!0),className:"text-md font-medium bg-white hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 border-gray-200 shadow-sm",children:[Ce(Qe,{className:"size-5"}),Ce("span",{className:"hidden sm:inline",children:"Move"})]})}function cn(){let{bulkDelete:e}=E();return Rt(C,{variant:"outline",size:"lg",radius:"full",onClick:e,className:"text-md font-medium bg-white hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 shadow-sm",children:[Ce(Be,{className:"size-5"}),Ce("span",{className:"hidden",children:"Delete"})]})}function pn(){let{handleClearSelection:e}=E();return Rt(C,{variant:"outline",size:"lg",onClick:e,className:"rounded-full text-md font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 hover:font-bold hover:border-blue-200 transition-all duration-200",children:[Ce(oe,{className:"size-5 text-blue-600"}),"Clear"]})}function mn(){let{selectedFiles:e,selectedFolders:t}=E();return e.length+t.length===0?null:Ce("div",{className:"w-full",children:Rt("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[Rt("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[Ce(dn,{}),Ce(cn,{})]}),Ce(pn,{})]})})}function un({className:e}){let{selectedFiles:t,selectedFolders:o}=E();return t.length+o.length===0?null:Ce("div",{className:`fixed bottom-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-sm border-t border-gray-200 shadow-lg ${e||""}`,children:Ce("div",{className:"px-4 sm:px-6 py-3 mx-auto",children:Rt("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[Rt("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[Ce(dn,{}),Ce(cn,{})]}),Ce(pn,{})]})})})}import{jsx as Vl}from"react/jsx-runtime";function Ea(o){var a=o,{className:e}=a,t=g(a,["className"]);return Vl("div",r({"data-slot":"skeleton",className:x("animate-pulse rounded-md bg-accent",e)},t))}import{useRouter as Gl}from"next/navigation";import{Fragment as Ol,jsx as tt,jsxs as La}from"react/jsx-runtime";function Qo(){let{currentFolder:e,handleFolderClick:t,isLoading:o}=E(),a=Gl(),n=()=>{a.back()};return o?La("div",{className:"flex item-center w-full",children:[tt(Ea,{className:"rounded-full size-10 mr-2 shrink-0"}),tt(Ea,{className:"min-w-32 rounded-md h-full"})]}):tt(Ol,{children:e?La("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[tt(C,{variant:"outline",size:"icon",radius:"full",disabled:o,className:"border-gray-200 bg-white mr-2",onClick:n,children:tt(Vt,{className:"size-5",strokeWidth:"1",stroke:"black"})}),tt("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:je(e.name,20)})]}):La("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[tt(C,{className:"mr-2 shrink-0",radius:"full",variant:"ghost",mode:"icon",size:"icon",onClick:()=>t(null),children:tt(To,{className:"size-6"})}),tt("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:"Home"})]})})}import{Circle as zf}from"lucide-react";import{DropdownMenu as $t}from"radix-ui";import{jsx as Kt,jsxs as Lf}from"react/jsx-runtime";function lo(t){var e=g(t,[]);return Kt($t.Root,r({"data-slot":"dropdown-menu"},e))}function so(t){var e=g(t,[]);return Kt($t.Trigger,r({className:"select-none","data-slot":"dropdown-menu-trigger"},e))}function co(a){var n=a,{className:e,sideOffset:t=4}=n,o=g(n,["className","sideOffset"]);return Kt($t.Portal,{children:Kt($t.Content,r({"data-slot":"dropdown-menu-content",sideOffset:t,className:x("space-y-0.5 z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},o))})}function ot(n){var i=n,{className:e,inset:t,variant:o}=i,a=g(i,["className","inset","variant"]);return Kt($t.Item,r({"data-slot":"dropdown-menu-item",className:x("text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0","focus:bg-accent focus:text-foreground","data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",t&&"ps-8",o==="destructive"&&"text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",e)},a))}function fn(o){var a=o,{className:e}=a,t=g(a,["className"]);return Kt($t.Separator,r({"data-slot":"dropdown-menu-separator",className:x("-mx-2 my-1.5 h-px bg-muted",e)},t))}import{useCallback as Ul,useEffect as jl,useState as ea}from"react";import{Command as Yt}from"cmdk";import{jsx as Ke,jsxs as xn}from"react/jsx-runtime";function Bl(o){var a=o,{className:e}=a,t=g(a,["className"]);return Ke(Yt,r({className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e)},t))}var gn=n=>{var i=n,{children:e,className:t,shouldFilter:o}=i,a=g(i,["children","className","shouldFilter"]);return Ke(Pe,s(r({},a),{children:xn(Se,{className:x("overflow-hidden p-0 shadow-lg",t),children:[Ke(ze,{className:"hidden"}),Ke(Bl,{shouldFilter:o,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})]})}))};function hn(o){var a=o,{className:e}=a,t=g(a,["className"]);return xn("div",{className:"flex items-center border-border border-b px-3","cmdk-input-wrapper":"","data-slot":"command-input",children:[Ke(be,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),Ke(Yt.Input,r({className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e)},t))]})}function vn(o){var a=o,{className:e}=a,t=g(a,["className"]);return Ke(Yt.List,r({"data-slot":"command-list",className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e)},t))}function Jo(t){var e=g(t,[]);return Ke(Yt.Empty,r({"data-slot":"command-empty",className:"py-6 text-center text-sm"},e))}function Aa(o){var a=o,{className:e}=a,t=g(a,["className"]);return Ke(Yt.Group,r({"data-slot":"command-group",className:x("overflow-hidden p-1.5 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e)},t))}function _a(o){var a=o,{className:e}=a,t=g(a,["className"]);return Ke(Yt.Item,r({"data-slot":"command-item",className:x("relative flex text-foreground cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0","[&_svg:not([role=img]):not([class*=text-])]:opacity-60",e)},t))}import{useEffect as Hl,useState as Zl}from"react";function Xo(e,t=500){let[o,a]=Zl(e);return Hl(()=>{let n=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(n)}},[e,t]),o}import{toast as Wl}from"sonner";import{Fragment as $l,jsx as Q,jsxs as at}from"react/jsx-runtime";function Va(){let[e,t]=ea(""),[o,a]=ea([]),[n,i]=ea([]),[l,c]=ea(!1),{provider:d,handleFolderClick:f,handleClearSelection:m,isSearchModalOpen:b,setIsSearchModalOpen:p,setFileDetailsModalFile:y}=E(),w=Xo(e,300),D=Ul(async N=>{c(!0);try{let[k,h]=await Promise.all([d.findFiles(N),d.findFolders(N)]);a(k),i(h)}catch(k){let h=k instanceof Error?k.message:"Search failed";Wl.error("Search Failed",{description:h}),a([]),i([])}finally{c(!1)}},[d]);return jl(()=>{b&&w.length>0?D(w):(a([]),i([]))},[w,b,D]),at($l,{children:[at(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>p(!0),children:[Q(be,{className:"size-4 text-gray-700"}),Q("span",{className:"hidden",children:"Search"})]}),at(gn,{className:"max-w-4xl w-full",open:b,onOpenChange:N=>{p(N),N||(t(""),a([]),i([]))},shouldFilter:!1,children:[Q(hn,{placeholder:"Type to search files or folders...",value:e,onValueChange:N=>{t(N)}}),at(vn,{children:[l&&Q(Jo,{children:"Searching..."}),!l&&o.length===0&&n.length===0&&!e&&Q(Jo,{children:at("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[Q(be,{className:"size-12 text-gray-300 mb-3"}),Q("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"Search your files and folders"}),Q("p",{className:"text-xs text-gray-500",children:"Start typing to find what you're looking for"}),Q("p",{className:"text-xs text-gray-500 mt-2",children:Q(Ut,{children:at(Zt,{children:[Q("span",{className:"text-lg",children:"\u2318"})," + K"]})})})]})}),!l&&o.length===0&&n.length===0&&e&&Q(Jo,{children:at("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[Q(be,{className:"size-12 text-gray-300 mb-3"}),Q("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"No results found"}),Q("p",{className:"text-xs text-gray-500",children:"Try searching with different keywords"})]})}),n.length>0&&Q(Aa,{heading:"Folders",children:n.map(N=>at(_a,{onSelect:()=>{m(),p(!1),f(N)},children:[Q(qe,{className:"size-4 mr-2 shrink-0",strokeWidth:1.5}),Q("span",{children:je(N.name,60)})]},N.id))}),o.length>0&&Q(Aa,{heading:"Files",children:o.map(N=>{let{component:k}=pt(N);return at(_a,{onSelect:()=>{m(),y(N)},children:[Q("div",{className:"size-6 mr-2 shrink-0 flex items-center justify-center",children:Q(k,{file:N,metaData:N.metaData})}),Q("span",{children:je(N.name,60)})]},N.id)})})]})]})]})}import{cva as Kl}from"class-variance-authority";import{Checkbox as bn}from"radix-ui";import{jsx as Ga,jsxs as ql}from"react/jsx-runtime";var Yl=Kl(`
95
95
  group peer bg-background shrink-0 rounded-md border border-input ring-offset-background focus-visible:outline-none
96
96
  focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50
97
97
  aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
98
98
  [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20,
99
99
  data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:text-primary-foreground
100
- `,{variants:{size:{sm:"size-4.5 [&_svg]:size-3",md:"size-5 [&_svg]:size-3.5",lg:"size-5.5 [&_svg]:size-4"}},defaultVariants:{size:"md"}});function ta(o){var n=o,{className:e,size:t}=n,a=g(n,["className","size"]);return Po(nn.Root,d(r({"data-slot":"checkbox",className:x($l({size:t}),e)},a),{children:Wl(nn.Indicator,{className:x("flex items-center justify-center text-current"),children:[Po(Zl,{className:"group-data-[state=indeterminate]:hidden"}),Po(jl,{className:"hidden group-data-[state=indeterminate]:block"})]})}))}import{jsx as aa,jsxs as sn}from"react/jsx-runtime";function ln(){return aa(Io,{})}function ko(){let{setIsUploadModalOpen:e}=E();return sn(C,{variant:"outline",size:"md",radius:"full",className:"border-gray-200 bg-white text-md font-medium",onClick:()=>e(!0),children:[aa(Ft,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),aa("span",{className:"hidden sm:inline",children:"Upload File"})]})}function So(){let{setIsCreateFolderModalOpen:e}=E();return sn(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>e(!0),children:[aa(yt,{className:"size-5 text-gray-900"}),aa("span",{className:"hidden",children:"Create Folder"})]})}import{Fragment as mn,jsx as j,jsxs as ve}from"react/jsx-runtime";function cn(){let{setIsUploadModalOpen:e,setIsCreateFolderModalOpen:t,setIsSearchModalOpen:a}=E();return ve(mn,{children:[ve("div",{className:"hidden md:flex gap-2",children:[j(ko,{}),j(So,{}),j(ln,{})]}),j("div",{className:"flex md:hidden",children:ve(Jt,{children:[j(Xt,{asChild:!0,children:j(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:j(dn,{className:"size-5"})})}),ve(ea,{align:"end",className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:[ve(Xe,{onClick:()=>e(!0),className:"cursor-pointer",children:[j(Ft,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),j("span",{className:"inline",children:"Upload File"})]}),ve(Xe,{onClick:()=>t(!0),className:"cursor-pointer",children:[j(yt,{className:"size-5 text-gray-900"}),j("span",{className:"inline",children:"Create Folder"})]}),ve(Xe,{onClick:()=>a(!0),className:"cursor-pointer",children:[j(ze,{className:"size-5 text-gray-700"}),j("span",{className:"inline",children:"Search"})]})]})]})})]})}function pn({onSearchClick:e}){let{setIsUploadModalOpen:t,setIsCreateFolderModalOpen:a}=E();return ve(mn,{children:[ve("div",{className:"hidden md:flex gap-2",children:[j(ko,{}),j(So,{}),e?ve(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:e,children:[j(ze,{className:"size-5 text-gray-900"}),j("span",{className:"hidden",children:"Search"})]}):null]}),j("div",{className:"flex md:hidden",children:ve(Jt,{children:[j(Xt,{asChild:!0,children:j(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:j(dn,{className:"size-5"})})}),ve(ea,{align:"end",className:"w-48",children:[ve(Xe,{onClick:()=>t(!0),className:"cursor-pointer",children:[j(Ft,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),j("span",{className:"inline",children:"Upload File"})]}),ve(Xe,{onClick:()=>a(!0),className:"cursor-pointer",children:[j(yt,{className:"size-5 text-gray-900"}),j("span",{className:"inline",children:"Create Folder"})]}),e?ve(Xe,{onClick:e,className:"cursor-pointer",children:[j(ze,{className:"size-5 text-gray-700"}),j("span",{className:"inline",children:"Search"})]}):null]})]})})]})}import{Move as ql}from"lucide-react";import Kl from"react";import{MoreVertical as Yl}from"lucide-react";import*as X from"@radix-ui/react-context-menu";import{CheckIcon as Jf,ChevronRightIcon as Xf,CircleIcon as eg}from"lucide-react";import{jsx as Bt,jsxs as og}from"react/jsx-runtime";function un(t){var e=g(t,[]);return Bt(X.Root,r({"data-slot":"context-menu"},e))}function fn(t){var e=g(t,[]);return Bt(X.Trigger,r({"data-slot":"context-menu-trigger"},e))}function gn(a){var o=a,{className:e}=o,t=g(o,["className"]);return Bt(X.Portal,{children:Bt(X.Content,r({"data-slot":"context-menu-content",className:x("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e)},t))})}function hn(n){var i=n,{className:e,inset:t,variant:a="default"}=i,o=g(i,["className","inset","variant"]);return Bt(X.Item,r({"data-slot":"context-menu-item","data-inset":t,"data-variant":a,className:x("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e)},o))}function vn(a){var o=a,{className:e}=o,t=g(o,["className"]);return Bt(X.Separator,r({"data-slot":"context-menu-separator",className:x("bg-border -mx-1 my-1 h-px",e)},t))}import{jsx as xt,jsxs as oa}from"react/jsx-runtime";function Ua({children:e,menuItems:t,isInSelectionMode:a=!1,mode:o}){let n=!a&&o!=="modal",i=(l=!1)=>t.map((c,s)=>{let f=s===t.length-1,m=c.variant==="destructive",b=l?Xe:hn,p=l?en:vn,y=s<t.length-1&&t[s+1].variant==="destructive";return oa(Kl.Fragment,{children:[oa(b,{onClick:c.onClick,className:c.className||`text-sm font-medium ${m?"text-red-600 focus:text-red-700 focus:bg-red-50":""} ${s===0?"rounded-t-xl":""} ${f?"rounded-b-xl":""}`,children:[c.icon,c.label]}),y&&!f&&xt(p,{className:"bg-gray-200"})]},s)});return oa(un,{children:[xt(fn,{children:oa("div",{className:"relative w-full h-full",children:[e,n&&xt("div",{className:"absolute top-0 right-0 z-10 md:hidden",onClick:l=>l.stopPropagation(),children:oa(Jt,{children:[xt(Xt,{asChild:!0,children:xt(C,{variant:"ghost",size:"icon",radius:"full",className:"focus-visible:ring-0 focus-visible:ring-offset-0",children:xt(Yl,{className:"size-4 text-gray-700"})})}),xt(ea,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!0)})]})})]})}),n&&xt(gn,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!1)})]})}import{jsx as xn}from"react/jsx-runtime";function ra(e){return xn("svg",d(r({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 72 72",fill:"currentColor"},e),{children:xn("path",{d:"M38.406 22.234l11.36 11.36L28.784 54.576l-12.876 4.307c-1.725.577-3.367-1.065-2.791-2.79l4.307-12.876L38.406 22.234zM41.234 19.406l5.234-5.234c1.562-1.562 4.095-1.562 5.657 0l5.703 5.703c1.562 1.562 1.562 4.095 0 5.657l-5.234 5.234L41.234 19.406z"})}))}import{jsx as bn}from"react/jsx-runtime";function na(e){return bn("svg",d(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:bn("path",{fill:"currentColor",fillRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-5.97-3.03a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})}))}import{jsx as ye,jsxs as Za}from"react/jsx-runtime";function wn({file:e,isSelected:t,onSelect:a,onDelete:o,onEdit:n,onMove:i,selectionMode:l,showCheckbox:c=!1,mode:s=J.PAGE,isInSelectionMode:f=!1}){let m=h=>{h.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?`)&&o(e.id)},b=h=>{h.stopPropagation(),n(e)},p=h=>{h.stopPropagation(),a(e,void 0,!0)},y=h=>{h.stopPropagation(),i(e)},w=h=>{a(e,h,!1)},D=h=>{a(e,void 0,!0)},F=h=>{h.stopPropagation()},{component:M,metadataComponent:I}=it(e);return ye(Ua,{menuItems:[{label:"Edit",icon:ye(ra,{className:"size-6"}),onClick:b},{label:"Select File",icon:ye(na,{className:"size-6"}),onClick:p},{label:"Move to...",icon:ye(ql,{className:"size-4 mr-2"}),onClick:y},{label:"Delete",icon:ye(He,{className:"size-5 mr-2 text-red-600"}),onClick:m,variant:"destructive"}],isInSelectionMode:f,mode:s,children:Za("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:w,onClick:w,children:[Za("div",{className:`
100
+ `,{variants:{size:{sm:"size-4.5 [&_svg]:size-3",md:"size-5 [&_svg]:size-3.5",lg:"size-5.5 [&_svg]:size-4"}},defaultVariants:{size:"md"}});function po(a){var n=a,{className:e,size:t}=n,o=g(n,["className","size"]);return Ga(bn.Root,s(r({"data-slot":"checkbox",className:x(Yl({size:t}),e)},o),{children:ql(bn.Indicator,{className:x("flex items-center justify-center text-current"),children:[Ga(Je,{className:"group-data-[state=indeterminate]:hidden"}),Ga(Oo,{className:"hidden group-data-[state=indeterminate]:block"})]})}))}import{jsx as mo,jsxs as Cn}from"react/jsx-runtime";function wn(){return mo(Va,{})}function Oa(){let{setIsUploadModalOpen:e}=E();return Cn(C,{variant:"outline",size:"md",radius:"full",className:"border-gray-200 bg-white text-md font-medium",onClick:()=>e(!0),children:[mo(Nt,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),mo("span",{className:"hidden sm:inline",children:"Upload File"})]})}function Ba(){let{setIsCreateFolderModalOpen:e}=E();return Cn(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>e(!0),children:[mo(It,{className:"size-5 text-gray-900"}),mo("span",{className:"hidden",children:"Create Folder"})]})}import{Fragment as Mn,jsx as j,jsxs as xe}from"react/jsx-runtime";function yn(){let{setIsUploadModalOpen:e,setIsCreateFolderModalOpen:t,setIsSearchModalOpen:o}=E();return xe(Mn,{children:[xe("div",{className:"hidden md:flex gap-2",children:[j(Oa,{}),j(Ba,{}),j(wn,{})]}),j("div",{className:"flex md:hidden",children:xe(lo,{children:[j(so,{asChild:!0,children:j(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:j(kt,{className:"size-5"})})}),xe(co,{align:"end",className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:[xe(ot,{onClick:()=>e(!0),className:"cursor-pointer",children:[j(Nt,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),j("span",{className:"inline",children:"Upload File"})]}),xe(ot,{onClick:()=>t(!0),className:"cursor-pointer",children:[j(It,{className:"size-5 text-gray-900"}),j("span",{className:"inline",children:"Create Folder"})]}),xe(ot,{onClick:()=>o(!0),className:"cursor-pointer",children:[j(be,{className:"size-5 text-gray-700"}),j("span",{className:"inline",children:"Search"})]})]})]})})]})}function Fn({onSearchClick:e}){let{setIsUploadModalOpen:t,setIsCreateFolderModalOpen:o}=E();return xe(Mn,{children:[xe("div",{className:"hidden md:flex gap-2",children:[j(Oa,{}),j(Ba,{}),e?xe(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:e,children:[j(be,{className:"size-5 text-gray-900"}),j("span",{className:"hidden",children:"Search"})]}):null]}),j("div",{className:"flex md:hidden",children:xe(lo,{children:[j(so,{asChild:!0,children:j(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:j(kt,{className:"size-5"})})}),xe(co,{align:"end",className:"w-48",children:[xe(ot,{onClick:()=>t(!0),className:"cursor-pointer",children:[j(Nt,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),j("span",{className:"inline",children:"Upload File"})]}),xe(ot,{onClick:()=>o(!0),className:"cursor-pointer",children:[j(It,{className:"size-5 text-gray-900"}),j("span",{className:"inline",children:"Create Folder"})]}),e?xe(ot,{onClick:e,className:"cursor-pointer",children:[j(be,{className:"size-5 text-gray-700"}),j("span",{className:"inline",children:"Search"})]}):null]})]})})]})}import Ql from"react";import*as X from"@radix-ui/react-context-menu";import{CircleIcon as Tg}from"lucide-react";import{jsx as qt,jsxs as _g}from"react/jsx-runtime";function Dn(t){var e=g(t,[]);return qt(X.Root,r({"data-slot":"context-menu"},e))}function In(t){var e=g(t,[]);return qt(X.Trigger,r({"data-slot":"context-menu-trigger"},e))}function Nn(o){var a=o,{className:e}=a,t=g(a,["className"]);return qt(X.Portal,{children:qt(X.Content,r({"data-slot":"context-menu-content",className:x("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e)},t))})}function kn(n){var i=n,{className:e,inset:t,variant:o="default"}=i,a=g(i,["className","inset","variant"]);return qt(X.Item,r({"data-slot":"context-menu-item","data-inset":t,"data-variant":o,className:x("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e)},a))}function Pn(o){var a=o,{className:e}=a,t=g(a,["className"]);return qt(X.Separator,r({"data-slot":"context-menu-separator",className:x("bg-border -mx-1 my-1 h-px",e)},t))}import{jsx as Ft,jsxs as uo}from"react/jsx-runtime";function ta({children:e,menuItems:t,isInSelectionMode:o=!1,mode:a}){let n=!o&&a!=="modal",i=(l=!1)=>t.map((c,d)=>{let f=d===t.length-1,m=c.variant==="destructive",b=l?ot:kn,p=l?fn:Pn,y=d<t.length-1&&t[d+1].variant==="destructive";return uo(Ql.Fragment,{children:[uo(b,{onClick:c.onClick,className:c.className||`text-sm font-medium ${m?"text-red-600 focus:text-red-700 focus:bg-red-50":""} ${d===0?"rounded-t-xl":""} ${f?"rounded-b-xl":""}`,children:[c.icon,c.label]}),y&&!f&&Ft(p,{className:"bg-gray-200"})]},d)});return uo(Dn,{children:[Ft(In,{children:uo("div",{className:"relative w-full h-full",children:[e,n&&Ft("div",{className:"absolute top-0 right-0 z-10 md:hidden",onClick:l=>l.stopPropagation(),children:uo(lo,{children:[Ft(so,{asChild:!0,children:Ft(C,{variant:"ghost",size:"icon",radius:"full",className:"focus-visible:ring-0 focus-visible:ring-offset-0",children:Ft(Go,{className:"size-4 text-gray-700"})})}),Ft(co,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!0)})]})})]})}),n&&Ft(Nn,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!1)})]})}import{jsx as Me,jsxs as oa}from"react/jsx-runtime";function Sn({file:e,isSelected:t,onSelect:o,onDelete:a,onEdit:n,onMove:i,selectionMode:l,showCheckbox:c=!1,mode:d=J.PAGE,isInSelectionMode:f=!1}){let m=h=>{h.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?`)&&a(e.id)},b=h=>{h.stopPropagation(),n(e)},p=h=>{h.stopPropagation(),o(e,void 0,!0)},y=h=>{h.stopPropagation(),i(e)},w=h=>{o(e,h,!1)},D=h=>{o(e,void 0,!0)},F=h=>{h.stopPropagation()},{component:M,metadataComponent:N}=pt(e);return Me(ta,{menuItems:[{label:"Edit",icon:Me(Ot,{className:"size-6"}),onClick:b},{label:"Select File",icon:Me(Gt,{className:"size-6"}),onClick:p},{label:"Move to...",icon:Me(Qe,{className:"size-6"}),onClick:y},{label:"Delete",icon:Me(Be,{className:"size-6 text-red-600"}),onClick:m,variant:"destructive"}],isInSelectionMode:f,mode:d,children:oa("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:w,onClick:w,children:[oa("div",{className:`
101
101
  relative w-full aspect-square flex items-center justify-center mb-1 overflow-hidden rounded-2xl hover:bg-gray-200/60
102
102
  ${t?"bg-gray-200/60":""}
103
- `,children:[ye("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:ye(M,{file:e,metaData:e.metaData})}),(l===Re.MULTIPLE||c)&&ye("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:F,children:ye(ta,{checked:t,onCheckedChange:D,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),Za("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[ye("span",{className:`
104
- text-[13px] font-medium leading-[1.3] tracking-tight line-clamp-2 px-2.5 py-[2px] rounded-[6px] transition-colors duration-100 wrap-break-word max-w-full
103
+ `,children:[Me("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:Me(M,{file:e,metaData:e.metaData})}),(l===Ee.MULTIPLE||c)&&Me("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:F,children:Me(po,{checked:t,onCheckedChange:D,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),oa("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[Me("span",{className:`
104
+ text-[13px] font-semibold leading-[1.3] tracking-tight line-clamp-2 px-2.5 py-[2px] rounded-[6px] transition-colors duration-100 wrap-break-word max-w-full
105
105
  ${t?"bg-[#2563EB] text-white antialiased shadow-sm":"text-[#374151] group-hover:text-black"}
106
- `,children:e.name}),Za("div",{className:`flex flex-col items-center justify-center gap-0.5 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:[ye("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:ae(e.size)}),I?ye("div",{className:"text-[11px] text-gray-400 flex items-center scale-95",children:ye(I,{file:e})}):null]})]})]})})}import{Move as Ql}from"lucide-react";import{jsx as Oe,jsxs as ja}from"react/jsx-runtime";function Cn({folder:e,isSelected:t,onSelect:a,onRightClick:o,onDelete:n,onRename:i,onMove:l,selectionMode:c,showCheckbox:s,mode:f,isInSelectionMode:m}){let b=P=>{P.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?
106
+ `,children:e.name}),oa("div",{className:`flex flex-col items-center justify-center gap-0.5 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:[Me("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:ae(e.size)}),N?Me("div",{className:"text-[11px] text-gray-400 flex items-center scale-95",children:Me(N,{file:e})}):null]})]})]})})}import{jsx as Oe,jsxs as aa}from"react/jsx-runtime";function zn({folder:e,isSelected:t,onSelect:o,onRightClick:a,onDelete:n,onRename:i,onMove:l,selectionMode:c,showCheckbox:d,mode:f,isInSelectionMode:m}){let b=k=>{k.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?
107
107
 
108
- \u26A0\uFE0F Warning: This will also delete all ${e.fileCount} file(s) inside this folder.`)&&n(e.id)},p=P=>{P.stopPropagation(),i(e)},y=P=>{P.stopPropagation(),l(e)},w=P=>{P.stopPropagation(),a(e,void 0,!0)},D=P=>{a(e,P,!1)},F=P=>{a(e,void 0,!0)},M=P=>{P.stopPropagation()};return Oe(Ua,{menuItems:[{label:"Rename",icon:Oe(ra,{className:"size-6"}),onClick:p},{label:"Select Folder",icon:Oe(na,{className:"size-6"}),onClick:w},{label:"Move to...",icon:Oe(Ql,{className:"size-5 mr-1"}),onClick:y},{label:"Delete",icon:Oe(He,{className:"size-5 mr-1 text-red-600"}),onClick:b,variant:"destructive"}],isInSelectionMode:m,mode:f,children:ja("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:D,onClick:D,children:[ja("div",{className:`
108
+ \u26A0\uFE0F Warning: This will also delete all ${e.fileCount} file(s) inside this folder.`)&&n(e.id)},p=k=>{k.stopPropagation(),i(e)},y=k=>{k.stopPropagation(),l(e)},w=k=>{k.stopPropagation(),o(e,void 0,!0)},D=k=>{o(e,k,!1)},F=k=>{o(e,void 0,!0)},M=k=>{k.stopPropagation()};return Oe(ta,{menuItems:[{label:"Rename",icon:Oe(Ot,{className:"size-6"}),onClick:p},{label:"Select Folder",icon:Oe(Gt,{className:"size-6"}),onClick:w},{label:"Move to...",icon:Oe(Qe,{className:"size-5 mr-1"}),onClick:y},{label:"Delete",icon:Oe(Be,{className:"size-5 mr-1 text-red-600"}),onClick:b,variant:"destructive"}],isInSelectionMode:m,mode:f,children:aa("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:D,onClick:D,children:[aa("div",{className:`
109
109
  relative w-full aspect-square flex items-center justify-center mb-1 overflow-hidden rounded-2xl hover:bg-gray-200/60
110
110
 
111
111
  ${t?"bg-gray-200/60 ":""}
112
- `,children:[Oe("div",{className:"w-[75%] h-[75%] flex items-center justify-center transform ",children:Oe(qe,{className:"w-full h-full text-blue-400 fill-blue-400/20 drop-shadow-sm",strokeWidth:1.5})}),(c===Re.MULTIPLE||s)&&Oe("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:M,children:Oe(ta,{checked:t,onCheckedChange:F,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),ja("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[Oe("span",{className:`
113
- text-[13px] font-medium leading-[1.3] tracking-tight line-clamp-2 px-2.5 pb-[2px] rounded-[6px] transition-colors duration-100 break-words max-w-full
112
+ `,children:[Oe("div",{className:"w-[75%] h-[75%] flex items-center justify-center transform ",children:Oe(qe,{className:"w-full h-full text-blue-400 fill-blue-400/20 drop-shadow-sm",strokeWidth:1.5})}),(c===Ee.MULTIPLE||d)&&Oe("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:M,children:Oe(po,{checked:t,onCheckedChange:F,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),aa("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[Oe("span",{className:`
113
+ text-[13px] font-semibold leading-[1.3] tracking-tight line-clamp-2 px-2.5 pb-[2px] rounded-[6px] transition-colors duration-100 break-words max-w-full
114
114
  ${t?"bg-[#2563EB] text-white antialiased shadow-sm":"text-[#374151] group-hover:text-black"}
115
- `,children:e.name}),Oe("div",{className:`flex items-center justify-center gap-1 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:ja("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight px-1.5 rounded-full",children:[e.fileCount," items"]})})]})]})})}import{jsx as Ht,jsxs as zo}from"react/jsx-runtime";function $a(){let{files:e,folders:t,isLoading:a,handleFileClick:o,handleFolderClick:n,bulkDelete:i,mode:l,selectionMode:c,isInSelectionMode:s,selectedFiles:f,selectedFolders:m,currentFolder:b,setSelectedFiles:p,setSelectedFolders:y,setIsRenameFolderModalOpen:w,setIsMoveFileModalOpen:D,setFileDetailsModalFile:F,setFolderToRename:M}=E(),P=(()=>{if(!b)return 18;let h=b.folderCount||0,N=b.fileCount||0,H=h+N;return H>0?H:18})();return a?Ht("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:Array.from({length:P}).map((h,N)=>zo("div",{className:"flex flex-col items-center justify-start w-full gap-2",children:[Ht("div",{className:"w-full aspect-square bg-gray-100 rounded-2xl animate-pulse"}),zo("div",{className:"flex flex-col items-center gap-1 w-full",children:[Ht("div",{className:"h-4 w-20 bg-gray-100 rounded animate-pulse"}),Ht("div",{className:"h-3 w-12 bg-gray-100 rounded animate-pulse"})]})]},N))}):zo("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:[t.map(h=>Ht(Cn,{folder:h,isSelected:m.some(N=>N.id===h.id),onSelect:n,onDelete:()=>i(),onRename:N=>{M(N),w(!0)},onMove:N=>{y([N]),p([]),D(!0)},selectionMode:c,mode:l,isInSelectionMode:s()},h.id)),e.map(h=>Ht(wn,{file:h,isSelected:f.some(N=>N.id===h.id),onSelect:o,onDelete:()=>i(),onEdit:N=>{F(N)},onMove:N=>{p([N]),y([]),D(!0)},selectionMode:c,mode:l,isInSelectionMode:s()},h.id))]})}import{Component as Jl}from"react";import{AlertCircle as Xl,RefreshCw as es}from"lucide-react";import{jsx as tt,jsxs as To}from"react/jsx-runtime";var Wa=class extends Jl{constructor(a){super(a);this.handleReset=()=>{window.location.reload()};this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,o){console.error("FileManager Error Boundary caught an error:",a,o)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:tt("div",{className:"flex items-center justify-center min-h-[400px] p-8 w-full h-full bg-slate-50/50 rounded-lg border border-dashed border-slate-200",children:To("div",{className:"text-center max-w-md flex flex-col items-center",children:[tt("div",{className:"bg-red-100 p-3 rounded-full mb-4",children:tt(Xl,{className:"size-8 text-red-600"})}),tt("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Something went wrong"}),tt("p",{className:"text-sm text-slate-500 mb-6",children:"The file manager encountered an unexpected error. Refreshing the page usually resolves this issue."}),this.state.error&&To("details",{className:"mb-6 text-left w-full border border-slate-200 rounded-lg overflow-hidden flex-col group",children:[tt("summary",{className:"cursor-pointer text-xs font-mono bg-slate-100 p-2 text-slate-600 hover:bg-slate-200 transition-colors",children:"View Technical Details"}),tt("div",{className:"p-3 bg-white",children:tt("pre",{className:"text-[10px] text-slate-600 font-mono whitespace-pre-wrap word-break-all max-h-40 overflow-auto",children:this.state.error.toString()})})]}),To(C,{onClick:this.handleReset,radius:"full",className:"gap-2",children:[tt(es,{className:"size-4"}),"Reload Application"]})]})}):this.props.children}};import{useEffect as ts}from"react";function yn(){let{handleSelectAllGlobal:e,handleClearSelection:t,getSelectionState:a,isCreateFolderModalOpen:o,setIsCreateFolderModalOpen:n,isUploadModalOpen:i,setIsUploadModalOpen:l,isSearchModalOpen:c,setIsSearchModalOpen:s}=E();return ts(()=>{let f=m=>{m.key==="k"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),s(!c)),m.key==="a"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),a()===!0?t():e(!0)),m.key==="f"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),n(!o)),m.key==="u"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),l(!i))};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,a,o,n,i,l,c,s]),null}import{jsx as at,jsxs as Ka}from"react/jsx-runtime";function as(e){return at(Wa,{children:Ka(Qe.Page,d(r({},e),{children:[at(yn,{}),Ka("div",{className:"flex h-full relative pb-12 overflow-hidden",children:[Ka("div",{className:"flex-1 flex w-full flex-col",children:[at(Qe.Header,{children:Ka("div",{className:"flex w-full justify-between gap-2",children:[at(Oa,{}),at(cn,{})]})}),at(Xr,{className:"-mb-1"}),at($a,{}),at(Qe.Footer,{className:"pt-6 pb-10"})]}),at(Qe.Overlays,{})]})]}))})}import{useState as Fn,useRef as os,useEffect as Mn}from"react";import{Fragment as ls,jsx as ee,jsxs as ot}from"react/jsx-runtime";function rs(o){var n=o,{open:e,onClose:t}=n,a=g(n,["open","onClose"]);return ee(Qe.Modal,d(r({},a),{onClose:t,children:ee(Ie,{open:e,onOpenChange:t,children:ee(ns,{onClose:t})})}))}function ns({onClose:e}){let{updateSearchQuery:t}=E(),[a,o]=Fn(!1),[n,i]=Fn(""),l=os(null),c=Ba(n,300);return Mn(()=>{t(c)},[c,t]),Mn(()=>{a&&l.current&&l.current.focus()},[a]),ot(Pe,{className:"p-0",variant:"fullscreen",showCloseButton:!1,children:[ot(Ge,{className:"pt-5 pb-3 m-0 border-b border-border",children:[ee(ke,{className:"px-6 text-base",children:ee("div",{className:"flex w-full justify-between gap-2",children:a?ot("div",{className:"flex items-center gap-4 flex-1",children:[ee(ze,{className:"size-5 text-gray-500 shrink-0"}),ee(_t,{ref:l,type:"text",placeholder:"Search files and folders...",className:"border-none shadow-none focus-visible:ring-0 h-auto p-0 text-base font-semibold",value:n,onChange:s=>i(s.target.value),onKeyDown:s=>{s.key==="Escape"&&(i(""),t(""),o(!1))}}),ot(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>{i(""),t(""),o(!1)},className:"border-gray-200 bg-white shrink-0",children:[ee(ce,{className:"size-5"}),ee("span",{className:"sr-only",children:"Cancel Search"})]})]}):ot(ls,{children:[ee(Oa,{}),ee(pn,{onSearchClick:()=>o(!0)}),ot(C,{variant:"outline",size:"icon",radius:"full",onClick:e,className:"border-gray-200 bg-white",children:[ee(ce,{className:"size-5"}),ee("span",{className:"hidden",children:"Close"})]})]})})}),ee(rt,{className:"sr-only",children:"Browse and select files from your media library"})]}),ot("div",{className:"overflow-y-auto flex-1 pb-4",children:[ee($a,{}),ee(Qe.Footer,{className:"my-4"}),ee(Qe.Overlays,{})]}),ee(is,{onClose:e})]})}function is({onClose:e}){let{selectedFiles:t,onFilesSelected:a,setSelectedFiles:o,setSelectedFolders:n,updateSearchQuery:i,handlePageChange:l}=E();return ot(Be,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2",children:[ee(Jr,{}),ee(Ye,{asChild:!0,children:ee(C,{type:"button",variant:"outline",onClick:e,radius:"full",className:"w-full md:w-auto mr-0",children:"Cancel"})}),ot(C,{type:"button",onClick:()=>{a&&t.length>0&&(a(t),o([]),n([]),i(""),l(1),e())},disabled:t.length===0,radius:"full",className:"w-full md:w-auto",children:["Select ",t.length>0?`(${t.length})`:""]})]})}var Fe=[{id:1,name:"Documents",pathId:1,path:"/1",parentId:null,fileCount:20,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:2,name:"Images",pathId:2,path:"/2",parentId:null,fileCount:10,folderCount:3,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:3,name:"Videos",pathId:3,path:"/3",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:4,name:"Music Some Long Name Streched also so long to fit in the card Music Some Long Name Streched also so long to fit in the card",pathId:4,path:"/4",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:5,name:"Archives",pathId:5,path:"/5",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:6,name:"Album 01",pathId:6,path:"/2/6",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:7,name:"Album 02",pathId:7,path:"/2/7",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:8,name:"Squirrels",pathId:8,path:"/2/8",parentId:2,fileCount:1,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")}],Dn=[{id:1,name:"Important",color:"#ef4444"},{id:2,name:"Work",color:"#3b82f6"},{id:3,name:"Personal",color:"#10b981"},{id:4,name:"Project",color:"#8b5cf6"},{id:5,name:"Archive",color:"#6b7280"}],Me=[{id:101,name:"welcome.pdf",url:"/placeholder.svg?height=400&width=300",size:245e3,createdAt:new Date("2024-05-15T10:00:00Z"),updatedAt:new Date("2024-05-15T10:00:00Z"),folderId:null,tags:["important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:2,author:"Admin"}},{id:102,name:"desktop_wallpaper.jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926",size:42e5,createdAt:new Date("2024-05-14T15:30:00Z"),updatedAt:new Date("2024-05-14T15:30:00Z"),folderId:null,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:5e3,height:3333,formats:{thumbnail:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=156",hash:"thumbnail_desktop_wallpaper_abc123",mime:"image/jpeg",name:"thumbnail_desktop_wallpaper.jpg",path:null,size:5.57,width:156,height:104},small:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=500",hash:"small_desktop_wallpaper_abc123",mime:"image/jpeg",name:"small_desktop_wallpaper.jpg",path:null,size:47.27,width:500,height:333},medium:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=750",hash:"medium_desktop_wallpaper_abc123",mime:"image/jpeg",name:"medium_desktop_wallpaper.jpg",path:null,size:97.89,width:750,height:500},large:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=1000",hash:"large_desktop_wallpaper_abc123",mime:"image/jpeg",name:"large_desktop_wallpaper.jpg",path:null,size:159.48,width:1e3,height:667}},metaData:{}},{id:103,name:"quick_notes.txt",url:"/placeholder.svg?height=400&width=300",size:3500,createdAt:new Date("2024-05-13T09:45:00Z"),updatedAt:new Date("2024-05-13T09:45:00Z"),folderId:null,tags:[],mime:"text/plain",ext:".txt",metaData:{}},{id:104,name:"intro_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:12e6,createdAt:new Date("2024-05-12T14:00:00Z"),updatedAt:new Date("2024-05-12T14:00:00Z"),folderId:null,tags:[],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:90,videoSource:"local"}},{id:105,name:"profile_photo.png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde",size:85e4,createdAt:new Date("2024-05-11T11:20:00Z"),updatedAt:new Date("2024-05-11T11:20:00Z"),folderId:null,tags:["personal"],mime:"image/png",ext:".png",width:2e3,height:2e3,formats:{thumbnail:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=156",hash:"thumbnail_profile_photo_def456",mime:"image/png",name:"thumbnail_profile_photo.png",path:null,size:8.2,width:156,height:156},small:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=500",hash:"small_profile_photo_def456",mime:"image/png",name:"small_profile_photo.png",path:null,size:52.3,width:500,height:500},medium:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=750",hash:"medium_profile_photo_def456",mime:"image/png",name:"medium_profile_photo.png",path:null,size:110.5,width:750,height:750},large:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=1000",hash:"large_profile_photo_def456",mime:"image/png",name:"large_profile_photo.png",path:null,size:185.7,width:1e3,height:1e3}},metaData:{}},{id:106,name:"todo_list.md",url:"/placeholder.svg?height=400&width=300",size:6200,createdAt:new Date("2024-05-10T08:30:00Z"),updatedAt:new Date("2024-05-10T08:30:00Z"),folderId:null,tags:["important"],mime:"text/markdown",ext:".md",metaData:{}},{id:107,name:"app_settings.json",url:"/placeholder.svg?height=400&width=300",size:4800,createdAt:new Date("2024-05-09T16:15:00Z"),updatedAt:new Date("2024-05-09T16:15:00Z"),folderId:null,tags:[],mime:"application/json",ext:".json",metaData:{}},{id:108,name:"mountain_landscape.webp",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:12e5,createdAt:new Date("2024-05-08T13:00:00Z"),updatedAt:new Date("2024-05-08T13:00:00Z"),folderId:null,tags:["personal"],mime:"image/webp",ext:".webp",width:4e3,height:2667,metaData:{}},{id:1,name:"Key-Monastery-img.avif",url:"https://unciatrails.com/wp-content/uploads/2024/07/Key-Monastery-img.avif",size:2621440,createdAt:new Date("2023-10-26T10:30:00Z"),updatedAt:new Date("2023-10-26T10:30:00Z"),folderId:8,tags:["personal","important"],mime:"image/avif",ext:".avif",caption:"A cute squirrel in the park",alternativeText:"Gray squirrel sitting on wooden fence",width:3024,height:4032,metaData:{}},{id:2,name:"project_proposal thoda sa.pdf",url:"/placeholder.svg?height=400&width=300",size:1048576,createdAt:new Date("2024-05-10T14:20:00Z"),updatedAt:new Date("2024-05-10T14:20:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:15,author:"John Doe"}},{id:3,name:"quarterly_report.xlsx",url:"/placeholder.svg?height=400&width=300",size:524288,createdAt:new Date("2024-05-08T09:15:00Z"),updatedAt:new Date("2024-05-08T09:15:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:10}},{id:4,name:"presentation.pptx",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:20}},{id:8,name:"documnet.doc",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/msword",ext:".doc",metaData:{pageCount:20}},{id:5,name:"demo_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:10485760,createdAt:new Date("2024-05-03T11:30:00Z"),updatedAt:new Date("2024-05-03T11:30:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:120,videoSource:"remote"}},{id:6,name:"podcast_episode.mp3",url:"/placeholder.svg?height=400&width=300",size:5242880,createdAt:new Date("2024-05-02T10:00:00Z"),updatedAt:new Date("2024-05-02T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:3600}},{id:7,name:"notes.txt",url:"/placeholder.svg?height=400&width=300",size:1024,createdAt:new Date("2024-05-01T09:00:00Z"),updatedAt:new Date("2024-05-01T09:00:00Z"),folderId:1,tags:["work"],mime:"text/plain",ext:".txt",metaData:{}},{id:9,name:"data.json",url:"/placeholder.svg?height=400&width=300",size:2048,createdAt:new Date("2024-04-30T15:00:00Z"),updatedAt:new Date("2024-04-30T15:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:10,name:"archive.zip",url:"/placeholder.svg?height=400&width=300",size:104857600,createdAt:new Date("2024-04-29T12:00:00Z"),updatedAt:new Date("2024-04-29T12:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Project backup"}},{id:11,name:"setup.exe",url:"/placeholder.svg?height=400&width=300",size:52428800,createdAt:new Date("2024-04-28T11:00:00Z"),updatedAt:new Date("2024-04-28T11:00:00Z"),folderId:5,tags:["software"],mime:"application/x-msdownload",ext:".exe",metaData:{description:"Installer"}},{id:12,name:"old_stuff.rar",url:"/placeholder.svg?height=400&width=300",size:20971520,createdAt:new Date("2024-04-27T10:00:00Z"),updatedAt:new Date("2024-04-27T10:00:00Z"),folderId:5,tags:["archive"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Old files"}},{id:13,name:"meeting_notes_q1.pdf",url:"/placeholder.svg?height=400&width=300",size:856e3,createdAt:new Date("2024-03-15T09:00:00Z"),updatedAt:new Date("2024-03-15T09:00:00Z"),folderId:1,tags:["work"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:8,author:"Sarah Johnson"}},{id:14,name:"budget_2024.xlsx",url:"/placeholder.svg?height=400&width=300",size:425e3,createdAt:new Date("2024-03-10T14:30:00Z"),updatedAt:new Date("2024-03-10T14:30:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:5}},{id:15,name:"team_photo.jpg",url:"https://images.unsplash.com/photo-1522071820081-009f0129c71c",size:32e5,createdAt:new Date("2024-02-28T11:00:00Z"),updatedAt:new Date("2024-02-28T11:00:00Z"),folderId:2,tags:["work"],mime:"image/jpeg",ext:".jpg",width:4e3,height:3e3,metaData:{}},{id:16,name:"logo_design.png",url:"https://images.unsplash.com/photo-1611162617474-5b21e879e113",size:15e5,createdAt:new Date("2024-02-20T10:00:00Z"),updatedAt:new Date("2024-02-20T10:00:00Z"),folderId:2,tags:["project"],mime:"image/png",ext:".png",width:2e3,height:2e3,metaData:{}},{id:17,name:"product_demo.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:15e6,createdAt:new Date("2024-02-15T16:00:00Z"),updatedAt:new Date("2024-02-15T16:00:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:180,videoSource:"local"}},{id:18,name:"training_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:25e6,createdAt:new Date("2024-02-10T09:30:00Z"),updatedAt:new Date("2024-02-10T09:30:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:300,videoSource:"local"}},{id:19,name:"background_music.mp3",url:"/placeholder.svg?height=400&width=300",size:45e5,createdAt:new Date("2024-02-05T14:00:00Z"),updatedAt:new Date("2024-02-05T14:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:240}},{id:20,name:"contract_template.docx",url:"/placeholder.svg?height=400&width=300",size:65e4,createdAt:new Date("2024-01-30T11:00:00Z"),updatedAt:new Date("2024-01-30T11:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:12}},{id:21,name:"invoice_jan.pdf",url:"/placeholder.svg?height=400&width=300",size:32e4,createdAt:new Date("2024-01-25T10:00:00Z"),updatedAt:new Date("2024-01-25T10:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:3}},{id:22,name:"vacation_photo1.jpg",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:28e5,createdAt:new Date("2024-01-20T15:00:00Z"),updatedAt:new Date("2024-01-20T15:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:3500,height:2500,metaData:{}},{id:23,name:"vacation_photo2.jpg",url:"https://images.unsplash.com/photo-1469474968028-56623f02e42e",size:31e5,createdAt:new Date("2024-01-20T15:05:00Z"),updatedAt:new Date("2024-01-20T15:05:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2800,metaData:{}},{id:24,name:"project_backup.zip",url:"/placeholder.svg?height=400&width=300",size:85e6,createdAt:new Date("2024-01-15T12:00:00Z"),updatedAt:new Date("2024-01-15T12:00:00Z"),folderId:5,tags:["archive","project"],mime:"application/zip",ext:".zip",metaData:{description:"Full project backup"}},{id:25,name:"presentation_final.pptx",url:"/placeholder.svg?height=400&width=300",size:35e5,createdAt:new Date("2024-01-10T16:00:00Z"),updatedAt:new Date("2024-01-10T16:00:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:35}},{id:26,name:"screenshot_001.png",url:"https://images.unsplash.com/photo-1517694712202-14dd9538aa97",size:12e5,createdAt:new Date("2024-01-05T09:00:00Z"),updatedAt:new Date("2024-01-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/png",ext:".png",width:1920,height:1080,metaData:{}},{id:27,name:"config.json",url:"/placeholder.svg?height=400&width=300",size:5e3,createdAt:new Date("2023-12-28T14:00:00Z"),updatedAt:new Date("2023-12-28T14:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:28,name:"readme.md",url:"/placeholder.svg?height=400&width=300",size:8500,createdAt:new Date("2023-12-20T10:00:00Z"),updatedAt:new Date("2023-12-20T10:00:00Z"),folderId:1,tags:["project"],mime:"text/markdown",ext:".md",metaData:{}},{id:29,name:"database_backup.sql",url:"/placeholder.svg?height=400&width=300",size:12e6,createdAt:new Date("2023-12-15T11:00:00Z"),updatedAt:new Date("2023-12-15T11:00:00Z"),folderId:5,tags:["archive","important"],mime:"application/sql",ext:".sql",metaData:{description:"Database backup"}},{id:30,name:"tutorial_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:18e6,createdAt:new Date("2023-12-10T13:00:00Z"),updatedAt:new Date("2023-12-10T13:00:00Z"),folderId:3,tags:["personal"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:420,videoSource:"local"}},{id:31,name:"company_logo.svg",url:"/placeholder.svg?height=400&width=300",size:45e3,createdAt:new Date("2023-12-05T09:00:00Z"),updatedAt:new Date("2023-12-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/svg+xml",ext:".svg",metaData:{}},{id:32,name:"report_q4.pdf",url:"/placeholder.svg?height=400&width=300",size:18e5,createdAt:new Date("2023-12-01T15:00:00Z"),updatedAt:new Date("2023-12-01T15:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:25,author:"Finance Team"}},{id:33,name:"nature_photo.webp",url:"https://images.unsplash.com/photo-1441974231531-c6227db76b6e",size:95e4,createdAt:new Date("2023-11-25T12:00:00Z"),updatedAt:new Date("2023-11-25T12:00:00Z"),folderId:2,tags:["personal"],mime:"image/webp",ext:".webp",width:3e3,height:2e3,metaData:{}},{id:34,name:"podcast_intro.mp3",url:"/placeholder.svg?height=400&width=300",size:25e5,createdAt:new Date("2023-11-20T10:00:00Z"),updatedAt:new Date("2023-11-20T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:180}},{id:35,name:"data_export.csv",url:"/placeholder.svg?height=400&width=300",size:85e4,createdAt:new Date("2023-11-15T14:00:00Z"),updatedAt:new Date("2023-11-15T14:00:00Z"),folderId:1,tags:["work"],mime:"text/csv",ext:".csv",metaData:{}},{id:36,name:"wireframes.pdf",url:"/placeholder.svg?height=400&width=300",size:42e5,createdAt:new Date("2023-11-10T11:00:00Z"),updatedAt:new Date("2023-11-10T11:00:00Z"),folderId:1,tags:["project"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:45}},{id:37,name:"cityscape.jpg",url:"https://images.unsplash.com/photo-1449824913935-59a10b8d2000",size:38e5,createdAt:new Date("2023-11-05T16:00:00Z"),updatedAt:new Date("2023-11-05T16:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4500,height:3e3,metaData:{}},{id:38,name:"interview_recording.mp3",url:"/placeholder.svg?height=400&width=300",size:85e5,createdAt:new Date("2023-11-01T09:00:00Z"),updatedAt:new Date("2023-11-01T09:00:00Z"),folderId:4,tags:["work"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:1800}},{id:39,name:"client_files.rar",url:"/placeholder.svg?height=400&width=300",size:45e6,createdAt:new Date("2023-10-25T13:00:00Z"),updatedAt:new Date("2023-10-25T13:00:00Z"),folderId:5,tags:["archive","work"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Client deliverables"}},{id:40,name:"marketing_plan.docx",url:"/placeholder.svg?height=400&width=300",size:12e5,createdAt:new Date("2023-10-20T10:00:00Z"),updatedAt:new Date("2023-10-20T10:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:18}},{id:41,name:"analytics_data.xlsx",url:"/placeholder.svg?height=400&width=300",size:21e5,createdAt:new Date("2023-10-15T15:00:00Z"),updatedAt:new Date("2023-10-15T15:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:8}},{id:42,name:"sunset_beach.jpg",url:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e",size:32e5,createdAt:new Date("2023-10-10T17:00:00Z"),updatedAt:new Date("2023-10-10T17:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2700,metaData:{}},{id:43,name:"webinar_recording.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:35e6,createdAt:new Date("2023-10-05T14:00:00Z"),updatedAt:new Date("2023-10-05T14:00:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:600,videoSource:"local"}},{id:44,name:"sound_effects.wav",url:"/placeholder.svg?height=400&width=300",size:15e6,createdAt:new Date("2023-10-01T11:00:00Z"),updatedAt:new Date("2023-10-01T11:00:00Z"),folderId:4,tags:["project"],mime:"audio/wav",ext:".wav",metaData:{duration:120}},{id:45,name:"legacy_system.zip",url:"/placeholder.svg?height=400&width=300",size:125e6,createdAt:new Date("2023-09-25T09:00:00Z"),updatedAt:new Date("2023-09-25T09:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Old system files"}}];var ia=e=>new Promise(t=>setTimeout(t,e)),Ro=class{getFolder(t){if(t===null)return Promise.resolve(null);let a=Fe.find(i=>i.id===t);if(!a)return Promise.resolve(null);let o=r({},a),n=o;for(;n.parentId!==null;){let i=Fe.find(l=>l.id===n.parentId);if(i)n.parent=r({},i),n=n.parent;else break}return Promise.resolve(o)}async getFolders(t,a=1,o=20,n=""){await ia(300);let i=t!==null?Fe.filter(p=>p.parentId===t):Fe.filter(p=>p.parentId===null),l=i;if(n&&n.trim()){let p=n.toLowerCase().trim();l=i.filter(y=>y.name.toLowerCase().includes(p))}let c=l.sort((p,y)=>new Date(p.createdAt).getTime()-new Date(y.createdAt).getTime()),s=c.length,f=Math.ceil(s/o),m=(a-1)*o;return{folders:c.slice(m,m+o),pagination:{currentPage:a,totalPages:f,totalFiles:s,filesPerPage:o}}}getTags(){return Promise.resolve(Dn.map(t=>t.name))}async getFiles(t,a,o,n,i){await ia(500);let l=[...Me];if(t!==null&&(l=l.filter(w=>w.folderId===t)),a&&a.length>0&&(l=l.filter(w=>{let D=Ue(w.mime,w.ext);return a.includes(D)})),i){let w=i==null?void 0:i.toLowerCase();l=l.filter(D=>D.name.toLowerCase().includes(w))}let c=l.sort((w,D)=>new Date(w.createdAt).getTime()-new Date(D.createdAt).getTime()),s=o!=null?o:1,f=n!=null?n:10,m=c.length,b=Math.ceil(m/f),p=(s-1)*f,y=c.slice(p,p+f);return Promise.resolve({files:y,pagination:{currentPage:s,totalPages:b,totalFiles:m,filesPerPage:f}})}async getItems(t,a,o=1,n=24,i=""){await ia(300);let l=t!==null?Fe.filter(h=>h.parentId===t):Fe.filter(h=>h.parentId===null),c=t!==null?Me.filter(h=>h.folderId===t):Me.filter(h=>h.folderId===null);if(a&&a.length>0&&(c=c.filter(h=>{let N=Ue(h.mime,h.ext);return a.includes(N)})),i&&i.trim()){let h=i.toLowerCase().trim();l=l.filter(N=>N.name.toLowerCase().includes(h)),c=c.filter(N=>{var H,q;return N.name.toLowerCase().includes(h)||((q=(H=N.ext)==null?void 0:H.toLowerCase().includes(h))!=null?q:!1)})}let s=l.sort((h,N)=>new Date(h.createdAt).getTime()-new Date(N.createdAt).getTime()),f=c.sort((h,N)=>new Date(h.createdAt).getTime()-new Date(N.createdAt).getTime()),m=s.length+f.length,b=Math.ceil(m/n)||1,p=(o-1)*n,y=p+n,w=s.slice(Math.max(0,p),Math.min(s.length,y)),D=w.length,F=n-D,M=Math.min(s.length,p),I=Math.max(0,p-s.length),P=f.slice(I,I+F);return{folders:w,files:P,pagination:{currentPage:o,totalPages:b,totalFiles:m,filesPerPage:n}}}async createFolder(t,a){await ia(300);let o={id:Date.now(),name:t,parentId:a!=null?a:null,pathId:typeof a=="number"?a:0,path:"",fileCount:0,folderCount:0,createdAt:new Date,updatedAt:new Date};return Fe.push(o),o}getMetaDataType(t,a){return t.type.startsWith("image/")?{}:t.type.startsWith("video/")?{duration:0,videoSource:a!=null?a:Ya.LOCAL}:t.type.startsWith("audio/")?{duration:0}:{description:""}}getFileType(t){var o;let a="."+((o=t.name.split(".").pop())==null?void 0:o.toLowerCase());return Ue(t.type,a)}async uploadFiles(t,a){var n;await ia(500);let o=[];for(let{file:i,videoSource:l}of t){let c=this.getFileType(i),s="."+((n=i.name.split(".").pop())==null?void 0:n.toLowerCase()),f={id:Date.now()+Math.random(),name:i.name,folderId:a!=null?a:null,size:i.size,url:URL.createObjectURL(i),mime:i.type||"application/octet-stream",ext:s,metaData:this.getMetaDataType(i,l),createdAt:new Date,updatedAt:new Date,tags:[],width:c===K.IMAGE?800:void 0,height:c===K.IMAGE?600:void 0};Me.push(f),o.push(f)}return o}renameFolder(t,a){let o=Fe.find(n=>n.id===t);return o?(o.name=a,o.updatedAt=new Date,Promise.resolve(o)):Promise.reject(new Error("Folder not found"))}updateFileMetaData(t,a){let o=Me.find(c=>c.id===t);if(!o)return Promise.reject(new Error("File not found"));let l=a,{metaData:n}=l,i=g(l,["metaData"]);return Object.assign(o,i),n&&(o.metaData=r(r({},o.metaData),n)),o.updatedAt=new Date,Promise.resolve(o)}deleteFiles(t){for(let a of t){let o=Me.findIndex(n=>n.id===a);o!==-1&&Me.splice(o,1)}return Promise.resolve()}deleteFolders(t){for(let a of t){let o=Fe.findIndex(n=>n.id===a);if(o!==-1){Fe.splice(o,1);for(let n=Me.length-1;n>=0;n--)Me[n].folderId===a&&Me.splice(n,1)}}return Promise.resolve()}findFiles(t){let a=t==null?void 0:t.toLowerCase(),o=Me.filter(n=>{var i;return n.name.toLowerCase().includes(a)||((i=n.tags)==null?void 0:i.some(l=>l.toLowerCase().includes(a)))});return Promise.resolve(o)}findFolders(t){let a=t==null?void 0:t.toLowerCase(),o=Fe.filter(n=>n.name.toLowerCase().includes(a));return Promise.resolve(o)}moveFiles(t,a){let o=[];for(let n of t){let i=Me.find(l=>l.id===n);i&&(i.folderId=a,i.updatedAt=new Date,o.push(i))}return Promise.resolve(o)}moveFolders(t,a){let o=[];for(let n of t){let i=Fe.find(l=>l.id===n);i&&(i.parentId=a,i.updatedAt=new Date,o.push(i))}return Promise.resolve(o)}};export{as as FileManager,rs as FileManagerModal,ca as FileManagerProvider,Ro as MockProvider,E as useFileManager};
115
+ `,children:e.name}),Oe("div",{className:`flex items-center justify-center gap-1 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:aa("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight px-1.5 rounded-full",children:[e.fileCount," items"]})})]})]})})}import{jsx as Qt,jsxs as Ha}from"react/jsx-runtime";function ra(){let{files:e,folders:t,isLoading:o,handleFileClick:a,handleFolderClick:n,bulkDelete:i,mode:l,selectionMode:c,isInSelectionMode:d,selectedFiles:f,selectedFolders:m,currentFolder:b,setSelectedFiles:p,setSelectedFolders:y,setIsRenameFolderModalOpen:w,setIsMoveFileModalOpen:D,setFileDetailsModalFile:F,setFolderToRename:M}=E(),k=(()=>{if(!b)return 18;let h=b.folderCount||0,I=b.fileCount||0,H=h+I;return H>0?H:18})();return o?Qt("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:Array.from({length:k}).map((h,I)=>Ha("div",{className:"flex flex-col items-center justify-start w-full gap-2",children:[Qt("div",{className:"w-full aspect-square bg-gray-100 rounded-2xl animate-pulse"}),Ha("div",{className:"flex flex-col items-center gap-1 w-full",children:[Qt("div",{className:"h-4 w-20 bg-gray-100 rounded animate-pulse"}),Qt("div",{className:"h-3 w-12 bg-gray-100 rounded animate-pulse"})]})]},I))}):Ha("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:[t.map(h=>Qt(zn,{folder:h,isSelected:m.some(I=>I.id===h.id),onSelect:n,onDelete:()=>i(),onRename:I=>{M(I),w(!0)},onMove:I=>{y([I]),p([]),D(!0)},selectionMode:c,mode:l,isInSelectionMode:d()},h.id)),e.map(h=>Qt(Sn,{file:h,isSelected:f.some(I=>I.id===h.id),onSelect:a,onDelete:()=>i(),onEdit:I=>{F(I)},onMove:I=>{p([I]),y([]),D(!0)},selectionMode:c,mode:l,isInSelectionMode:d()},h.id))]})}import{Component as Jl}from"react";import{jsx as rt,jsxs as Za}from"react/jsx-runtime";var na=class extends Jl{constructor(o){super(o);this.handleReset=()=>{window.location.reload()};this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,a){console.error("FileManager Error Boundary caught an error:",o,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:rt("div",{className:"flex items-center justify-center min-h-[400px] p-8 w-full h-full bg-slate-50/50 rounded-lg border border-dashed border-slate-200",children:Za("div",{className:"text-center max-w-md flex flex-col items-center",children:[rt("div",{className:"bg-red-100 p-3 rounded-full mb-4",children:rt(Ho,{className:"size-8 text-red-600"})}),rt("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Something went wrong"}),rt("p",{className:"text-sm text-slate-500 mb-6",children:"The file manager encountered an unexpected error. Refreshing the page usually resolves this issue."}),this.state.error&&Za("details",{className:"mb-6 text-left w-full border border-slate-200 rounded-lg overflow-hidden flex-col group",children:[rt("summary",{className:"cursor-pointer text-xs font-mono bg-slate-100 p-2 text-slate-600 hover:bg-slate-200 transition-colors",children:"View Technical Details"}),rt("div",{className:"p-3 bg-white",children:rt("pre",{className:"text-[10px] text-slate-600 font-mono whitespace-pre-wrap word-break-all max-h-40 overflow-auto",children:this.state.error.toString()})})]}),Za(C,{onClick:this.handleReset,radius:"full",className:"gap-2",children:[rt(Uo,{className:"size-4"}),"Reload Application"]})]})}):this.props.children}};import{useEffect as Xl}from"react";function Rn(){let{handleSelectAllGlobal:e,handleClearSelection:t,getSelectionState:o,isCreateFolderModalOpen:a,setIsCreateFolderModalOpen:n,isUploadModalOpen:i,setIsUploadModalOpen:l,isSearchModalOpen:c,setIsSearchModalOpen:d}=E();return Xl(()=>{let f=m=>{m.key==="k"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),d(!c)),m.key==="a"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),o()===!0?t():e(!0)),m.key==="f"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),n(!a)),m.key==="u"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),l(!i))};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,o,a,n,i,l,c,d]),null}import{jsx as nt,jsxs as ia}from"react/jsx-runtime";function es(e){return nt(na,{children:ia(et.Page,s(r({},e),{children:[nt(Rn,{}),ia("div",{className:"flex h-full relative pb-12 overflow-hidden",children:[ia("div",{className:"flex-1 flex w-full flex-col",children:[nt(et.Header,{children:ia("div",{className:"flex w-full justify-between gap-2",children:[nt(Qo,{}),nt(yn,{})]})}),nt(un,{className:"-mb-1"}),nt(ra,{}),nt(et.Footer,{className:"pt-6 pb-10"})]}),nt(et.Overlays,{})]})]}))})}import{useState as Tn,useRef as ts,useEffect as En}from"react";import{Fragment as ns,jsx as ee,jsxs as it}from"react/jsx-runtime";function os(a){var n=a,{open:e,onClose:t}=n,o=g(n,["open","onClose"]);return ee(et.Modal,s(r({},o),{onClose:t,children:ee(Pe,{open:e,onOpenChange:t,children:ee(as,{onClose:t})})}))}function as({onClose:e}){let{updateSearchQuery:t}=E(),[o,a]=Tn(!1),[n,i]=Tn(""),l=ts(null),c=Xo(n,300);return En(()=>{t(c)},[c,t]),En(()=>{o&&l.current&&l.current.focus()},[o]),it(Se,{className:"p-0",variant:"fullscreen",showCloseButton:!1,children:[it(He,{className:"pt-5 pb-3 m-0 border-b border-border",children:[ee(ze,{className:"px-6 text-base",children:ee("div",{className:"flex w-full justify-between gap-2",children:o?it("div",{className:"flex items-center gap-4 flex-1",children:[ee(be,{className:"size-5 text-gray-500 shrink-0"}),ee(jt,{ref:l,type:"text",placeholder:"Search files and folders...",className:"border-none shadow-none focus-visible:ring-0 h-auto p-0 text-base font-semibold",value:n,onChange:d=>i(d.target.value),onKeyDown:d=>{d.key==="Escape"&&(i(""),t(""),a(!1))}}),it(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>{i(""),t(""),a(!1)},className:"border-gray-200 bg-white shrink-0",children:[ee(oe,{className:"size-5"}),ee("span",{className:"sr-only",children:"Cancel Search"})]})]}):it(ns,{children:[ee(Qo,{}),ee(Fn,{onSearchClick:()=>a(!0)}),it(C,{variant:"outline",size:"icon",radius:"full",onClick:e,className:"border-gray-200 bg-white",children:[ee(oe,{className:"size-5"}),ee("span",{className:"hidden",children:"Close"})]})]})})}),ee(dt,{className:"sr-only",children:"Browse and select files from your media library"})]}),it("div",{className:"overflow-y-auto flex-1 pb-4",children:[ee(ra,{}),ee(et.Footer,{className:"my-4"}),ee(et.Overlays,{})]}),ee(rs,{onClose:e})]})}function rs({onClose:e}){let{selectedFiles:t,onFilesSelected:o,setSelectedFiles:a,setSelectedFolders:n,updateSearchQuery:i,handlePageChange:l}=E();return it(Ze,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2",children:[ee(mn,{}),ee(Xe,{asChild:!0,children:ee(C,{type:"button",variant:"outline",onClick:e,radius:"full",className:"w-full md:w-auto mr-0",children:"Cancel"})}),it(C,{type:"button",onClick:()=>{o&&t.length>0&&(o(t),a([]),n([]),i(""),l(1),e())},disabled:t.length===0,radius:"full",className:"w-full md:w-auto",children:["Select ",t.length>0?`(${t.length})`:""]})]})}var De=[{id:1,name:"Documents",pathId:1,path:"/1",parentId:null,fileCount:20,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:2,name:"Images",pathId:2,path:"/2",parentId:null,fileCount:10,folderCount:3,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:3,name:"Videos",pathId:3,path:"/3",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:4,name:"Music Some Long Name Streched also so long to fit in the card Music Some Long Name Streched also so long to fit in the card",pathId:4,path:"/4",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:5,name:"Archives",pathId:5,path:"/5",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:6,name:"Album 01",pathId:6,path:"/2/6",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:7,name:"Album 02",pathId:7,path:"/2/7",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:8,name:"Squirrels",pathId:8,path:"/2/8",parentId:2,fileCount:1,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")}],Ln=[{id:1,name:"Important",color:"#ef4444"},{id:2,name:"Work",color:"#3b82f6"},{id:3,name:"Personal",color:"#10b981"},{id:4,name:"Project",color:"#8b5cf6"},{id:5,name:"Archive",color:"#6b7280"}],Ie=[{id:101,name:"welcome.pdf",url:"/placeholder.svg?height=400&width=300",size:245e3,createdAt:new Date("2024-05-15T10:00:00Z"),updatedAt:new Date("2024-05-15T10:00:00Z"),folderId:null,tags:["important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:2,author:"Admin"}},{id:102,name:"desktop_wallpaper.jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926",size:42e5,createdAt:new Date("2024-05-14T15:30:00Z"),updatedAt:new Date("2024-05-14T15:30:00Z"),folderId:null,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:5e3,height:3333,formats:{thumbnail:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=156",hash:"thumbnail_desktop_wallpaper_abc123",mime:"image/jpeg",name:"thumbnail_desktop_wallpaper.jpg",path:null,size:5.57,width:156,height:104},small:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=500",hash:"small_desktop_wallpaper_abc123",mime:"image/jpeg",name:"small_desktop_wallpaper.jpg",path:null,size:47.27,width:500,height:333},medium:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=750",hash:"medium_desktop_wallpaper_abc123",mime:"image/jpeg",name:"medium_desktop_wallpaper.jpg",path:null,size:97.89,width:750,height:500},large:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=1000",hash:"large_desktop_wallpaper_abc123",mime:"image/jpeg",name:"large_desktop_wallpaper.jpg",path:null,size:159.48,width:1e3,height:667}},metaData:{}},{id:103,name:"quick_notes.txt",url:"/placeholder.svg?height=400&width=300",size:3500,createdAt:new Date("2024-05-13T09:45:00Z"),updatedAt:new Date("2024-05-13T09:45:00Z"),folderId:null,tags:[],mime:"text/plain",ext:".txt",metaData:{}},{id:104,name:"intro_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:12e6,createdAt:new Date("2024-05-12T14:00:00Z"),updatedAt:new Date("2024-05-12T14:00:00Z"),folderId:null,tags:[],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:90,videoSource:"local"}},{id:105,name:"profile_photo.png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde",size:85e4,createdAt:new Date("2024-05-11T11:20:00Z"),updatedAt:new Date("2024-05-11T11:20:00Z"),folderId:null,tags:["personal"],mime:"image/png",ext:".png",width:2e3,height:2e3,formats:{thumbnail:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=156",hash:"thumbnail_profile_photo_def456",mime:"image/png",name:"thumbnail_profile_photo.png",path:null,size:8.2,width:156,height:156},small:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=500",hash:"small_profile_photo_def456",mime:"image/png",name:"small_profile_photo.png",path:null,size:52.3,width:500,height:500},medium:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=750",hash:"medium_profile_photo_def456",mime:"image/png",name:"medium_profile_photo.png",path:null,size:110.5,width:750,height:750},large:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=1000",hash:"large_profile_photo_def456",mime:"image/png",name:"large_profile_photo.png",path:null,size:185.7,width:1e3,height:1e3}},metaData:{}},{id:106,name:"todo_list.md",url:"/placeholder.svg?height=400&width=300",size:6200,createdAt:new Date("2024-05-10T08:30:00Z"),updatedAt:new Date("2024-05-10T08:30:00Z"),folderId:null,tags:["important"],mime:"text/markdown",ext:".md",metaData:{}},{id:107,name:"app_settings.json",url:"/placeholder.svg?height=400&width=300",size:4800,createdAt:new Date("2024-05-09T16:15:00Z"),updatedAt:new Date("2024-05-09T16:15:00Z"),folderId:null,tags:[],mime:"application/json",ext:".json",metaData:{}},{id:108,name:"mountain_landscape.webp",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:12e5,createdAt:new Date("2024-05-08T13:00:00Z"),updatedAt:new Date("2024-05-08T13:00:00Z"),folderId:null,tags:["personal"],mime:"image/webp",ext:".webp",width:4e3,height:2667,metaData:{}},{id:1,name:"Key-Monastery-img.avif",url:"https://unciatrails.com/wp-content/uploads/2024/07/Key-Monastery-img.avif",size:2621440,createdAt:new Date("2023-10-26T10:30:00Z"),updatedAt:new Date("2023-10-26T10:30:00Z"),folderId:8,tags:["personal","important"],mime:"image/avif",ext:".avif",caption:"A cute squirrel in the park",alternativeText:"Gray squirrel sitting on wooden fence",width:3024,height:4032,metaData:{}},{id:2,name:"project_proposal thoda sa.pdf",url:"/placeholder.svg?height=400&width=300",size:1048576,createdAt:new Date("2024-05-10T14:20:00Z"),updatedAt:new Date("2024-05-10T14:20:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:15,author:"John Doe"}},{id:3,name:"quarterly_report.xlsx",url:"/placeholder.svg?height=400&width=300",size:524288,createdAt:new Date("2024-05-08T09:15:00Z"),updatedAt:new Date("2024-05-08T09:15:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:10}},{id:4,name:"presentation.pptx",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:20}},{id:8,name:"documnet.doc",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/msword",ext:".doc",metaData:{pageCount:20}},{id:5,name:"demo_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:10485760,createdAt:new Date("2024-05-03T11:30:00Z"),updatedAt:new Date("2024-05-03T11:30:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:120,videoSource:"remote"}},{id:6,name:"podcast_episode.mp3",url:"/placeholder.svg?height=400&width=300",size:5242880,createdAt:new Date("2024-05-02T10:00:00Z"),updatedAt:new Date("2024-05-02T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:3600}},{id:7,name:"notes.txt",url:"/placeholder.svg?height=400&width=300",size:1024,createdAt:new Date("2024-05-01T09:00:00Z"),updatedAt:new Date("2024-05-01T09:00:00Z"),folderId:1,tags:["work"],mime:"text/plain",ext:".txt",metaData:{}},{id:9,name:"data.json",url:"/placeholder.svg?height=400&width=300",size:2048,createdAt:new Date("2024-04-30T15:00:00Z"),updatedAt:new Date("2024-04-30T15:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:10,name:"archive.zip",url:"/placeholder.svg?height=400&width=300",size:104857600,createdAt:new Date("2024-04-29T12:00:00Z"),updatedAt:new Date("2024-04-29T12:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Project backup"}},{id:11,name:"setup.exe",url:"/placeholder.svg?height=400&width=300",size:52428800,createdAt:new Date("2024-04-28T11:00:00Z"),updatedAt:new Date("2024-04-28T11:00:00Z"),folderId:5,tags:["software"],mime:"application/x-msdownload",ext:".exe",metaData:{description:"Installer"}},{id:12,name:"old_stuff.rar",url:"/placeholder.svg?height=400&width=300",size:20971520,createdAt:new Date("2024-04-27T10:00:00Z"),updatedAt:new Date("2024-04-27T10:00:00Z"),folderId:5,tags:["archive"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Old files"}},{id:13,name:"meeting_notes_q1.pdf",url:"/placeholder.svg?height=400&width=300",size:856e3,createdAt:new Date("2024-03-15T09:00:00Z"),updatedAt:new Date("2024-03-15T09:00:00Z"),folderId:1,tags:["work"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:8,author:"Sarah Johnson"}},{id:14,name:"budget_2024.xlsx",url:"/placeholder.svg?height=400&width=300",size:425e3,createdAt:new Date("2024-03-10T14:30:00Z"),updatedAt:new Date("2024-03-10T14:30:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:5}},{id:15,name:"team_photo.jpg",url:"https://images.unsplash.com/photo-1522071820081-009f0129c71c",size:32e5,createdAt:new Date("2024-02-28T11:00:00Z"),updatedAt:new Date("2024-02-28T11:00:00Z"),folderId:2,tags:["work"],mime:"image/jpeg",ext:".jpg",width:4e3,height:3e3,metaData:{}},{id:16,name:"logo_design.png",url:"https://images.unsplash.com/photo-1611162617474-5b21e879e113",size:15e5,createdAt:new Date("2024-02-20T10:00:00Z"),updatedAt:new Date("2024-02-20T10:00:00Z"),folderId:2,tags:["project"],mime:"image/png",ext:".png",width:2e3,height:2e3,metaData:{}},{id:17,name:"product_demo.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:15e6,createdAt:new Date("2024-02-15T16:00:00Z"),updatedAt:new Date("2024-02-15T16:00:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:180,videoSource:"local"}},{id:18,name:"training_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:25e6,createdAt:new Date("2024-02-10T09:30:00Z"),updatedAt:new Date("2024-02-10T09:30:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:300,videoSource:"local"}},{id:19,name:"background_music.mp3",url:"/placeholder.svg?height=400&width=300",size:45e5,createdAt:new Date("2024-02-05T14:00:00Z"),updatedAt:new Date("2024-02-05T14:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:240}},{id:20,name:"contract_template.docx",url:"/placeholder.svg?height=400&width=300",size:65e4,createdAt:new Date("2024-01-30T11:00:00Z"),updatedAt:new Date("2024-01-30T11:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:12}},{id:21,name:"invoice_jan.pdf",url:"/placeholder.svg?height=400&width=300",size:32e4,createdAt:new Date("2024-01-25T10:00:00Z"),updatedAt:new Date("2024-01-25T10:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:3}},{id:22,name:"vacation_photo1.jpg",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:28e5,createdAt:new Date("2024-01-20T15:00:00Z"),updatedAt:new Date("2024-01-20T15:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:3500,height:2500,metaData:{}},{id:23,name:"vacation_photo2.jpg",url:"https://images.unsplash.com/photo-1469474968028-56623f02e42e",size:31e5,createdAt:new Date("2024-01-20T15:05:00Z"),updatedAt:new Date("2024-01-20T15:05:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2800,metaData:{}},{id:24,name:"project_backup.zip",url:"/placeholder.svg?height=400&width=300",size:85e6,createdAt:new Date("2024-01-15T12:00:00Z"),updatedAt:new Date("2024-01-15T12:00:00Z"),folderId:5,tags:["archive","project"],mime:"application/zip",ext:".zip",metaData:{description:"Full project backup"}},{id:25,name:"presentation_final.pptx",url:"/placeholder.svg?height=400&width=300",size:35e5,createdAt:new Date("2024-01-10T16:00:00Z"),updatedAt:new Date("2024-01-10T16:00:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:35}},{id:26,name:"screenshot_001.png",url:"https://images.unsplash.com/photo-1517694712202-14dd9538aa97",size:12e5,createdAt:new Date("2024-01-05T09:00:00Z"),updatedAt:new Date("2024-01-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/png",ext:".png",width:1920,height:1080,metaData:{}},{id:27,name:"config.json",url:"/placeholder.svg?height=400&width=300",size:5e3,createdAt:new Date("2023-12-28T14:00:00Z"),updatedAt:new Date("2023-12-28T14:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:28,name:"readme.md",url:"/placeholder.svg?height=400&width=300",size:8500,createdAt:new Date("2023-12-20T10:00:00Z"),updatedAt:new Date("2023-12-20T10:00:00Z"),folderId:1,tags:["project"],mime:"text/markdown",ext:".md",metaData:{}},{id:29,name:"database_backup.sql",url:"/placeholder.svg?height=400&width=300",size:12e6,createdAt:new Date("2023-12-15T11:00:00Z"),updatedAt:new Date("2023-12-15T11:00:00Z"),folderId:5,tags:["archive","important"],mime:"application/sql",ext:".sql",metaData:{description:"Database backup"}},{id:30,name:"tutorial_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:18e6,createdAt:new Date("2023-12-10T13:00:00Z"),updatedAt:new Date("2023-12-10T13:00:00Z"),folderId:3,tags:["personal"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:420,videoSource:"local"}},{id:31,name:"company_logo.svg",url:"/placeholder.svg?height=400&width=300",size:45e3,createdAt:new Date("2023-12-05T09:00:00Z"),updatedAt:new Date("2023-12-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/svg+xml",ext:".svg",metaData:{}},{id:32,name:"report_q4.pdf",url:"/placeholder.svg?height=400&width=300",size:18e5,createdAt:new Date("2023-12-01T15:00:00Z"),updatedAt:new Date("2023-12-01T15:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:25,author:"Finance Team"}},{id:33,name:"nature_photo.webp",url:"https://images.unsplash.com/photo-1441974231531-c6227db76b6e",size:95e4,createdAt:new Date("2023-11-25T12:00:00Z"),updatedAt:new Date("2023-11-25T12:00:00Z"),folderId:2,tags:["personal"],mime:"image/webp",ext:".webp",width:3e3,height:2e3,metaData:{}},{id:34,name:"podcast_intro.mp3",url:"/placeholder.svg?height=400&width=300",size:25e5,createdAt:new Date("2023-11-20T10:00:00Z"),updatedAt:new Date("2023-11-20T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:180}},{id:35,name:"data_export.csv",url:"/placeholder.svg?height=400&width=300",size:85e4,createdAt:new Date("2023-11-15T14:00:00Z"),updatedAt:new Date("2023-11-15T14:00:00Z"),folderId:1,tags:["work"],mime:"text/csv",ext:".csv",metaData:{}},{id:36,name:"wireframes.pdf",url:"/placeholder.svg?height=400&width=300",size:42e5,createdAt:new Date("2023-11-10T11:00:00Z"),updatedAt:new Date("2023-11-10T11:00:00Z"),folderId:1,tags:["project"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:45}},{id:37,name:"cityscape.jpg",url:"https://images.unsplash.com/photo-1449824913935-59a10b8d2000",size:38e5,createdAt:new Date("2023-11-05T16:00:00Z"),updatedAt:new Date("2023-11-05T16:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4500,height:3e3,metaData:{}},{id:38,name:"interview_recording.mp3",url:"/placeholder.svg?height=400&width=300",size:85e5,createdAt:new Date("2023-11-01T09:00:00Z"),updatedAt:new Date("2023-11-01T09:00:00Z"),folderId:4,tags:["work"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:1800}},{id:39,name:"client_files.rar",url:"/placeholder.svg?height=400&width=300",size:45e6,createdAt:new Date("2023-10-25T13:00:00Z"),updatedAt:new Date("2023-10-25T13:00:00Z"),folderId:5,tags:["archive","work"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Client deliverables"}},{id:40,name:"marketing_plan.docx",url:"/placeholder.svg?height=400&width=300",size:12e5,createdAt:new Date("2023-10-20T10:00:00Z"),updatedAt:new Date("2023-10-20T10:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:18}},{id:41,name:"analytics_data.xlsx",url:"/placeholder.svg?height=400&width=300",size:21e5,createdAt:new Date("2023-10-15T15:00:00Z"),updatedAt:new Date("2023-10-15T15:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:8}},{id:42,name:"sunset_beach.jpg",url:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e",size:32e5,createdAt:new Date("2023-10-10T17:00:00Z"),updatedAt:new Date("2023-10-10T17:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2700,metaData:{}},{id:43,name:"webinar_recording.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:35e6,createdAt:new Date("2023-10-05T14:00:00Z"),updatedAt:new Date("2023-10-05T14:00:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:600,videoSource:"local"}},{id:44,name:"sound_effects.wav",url:"/placeholder.svg?height=400&width=300",size:15e6,createdAt:new Date("2023-10-01T11:00:00Z"),updatedAt:new Date("2023-10-01T11:00:00Z"),folderId:4,tags:["project"],mime:"audio/wav",ext:".wav",metaData:{duration:120}},{id:45,name:"legacy_system.zip",url:"/placeholder.svg?height=400&width=300",size:125e6,createdAt:new Date("2023-09-25T09:00:00Z"),updatedAt:new Date("2023-09-25T09:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Old system files"}}];var fo=e=>new Promise(t=>setTimeout(t,e)),Ua=class{getFolder(t){if(t===null)return Promise.resolve(null);let o=De.find(i=>i.id===t);if(!o)return Promise.resolve(null);let a=r({},o),n=a;for(;n.parentId!==null;){let i=De.find(l=>l.id===n.parentId);if(i)n.parent=r({},i),n=n.parent;else break}return Promise.resolve(a)}async getFolders(t,o=1,a=20,n=""){await fo(300);let i=t!==null?De.filter(p=>p.parentId===t):De.filter(p=>p.parentId===null),l=i;if(n&&n.trim()){let p=n.toLowerCase().trim();l=i.filter(y=>y.name.toLowerCase().includes(p))}let c=l.sort((p,y)=>new Date(p.createdAt).getTime()-new Date(y.createdAt).getTime()),d=c.length,f=Math.ceil(d/a),m=(o-1)*a;return{folders:c.slice(m,m+a),pagination:{currentPage:o,totalPages:f,totalFiles:d,filesPerPage:a}}}getTags(){return Promise.resolve(Ln.map(t=>t.name))}async getFiles(t,o,a,n,i){await fo(500);let l=[...Ie];if(t!==null&&(l=l.filter(w=>w.folderId===t)),o&&o.length>0&&(l=l.filter(w=>{let D=Ue(w.mime,w.ext);return o.includes(D)})),i){let w=i==null?void 0:i.toLowerCase();l=l.filter(D=>D.name.toLowerCase().includes(w))}let c=l.sort((w,D)=>new Date(w.createdAt).getTime()-new Date(D.createdAt).getTime()),d=a!=null?a:1,f=n!=null?n:10,m=c.length,b=Math.ceil(m/f),p=(d-1)*f,y=c.slice(p,p+f);return Promise.resolve({files:y,pagination:{currentPage:d,totalPages:b,totalFiles:m,filesPerPage:f}})}async getItems(t,o,a=1,n=24,i=""){await fo(300);let l=t!==null?De.filter(h=>h.parentId===t):De.filter(h=>h.parentId===null),c=t!==null?Ie.filter(h=>h.folderId===t):Ie.filter(h=>h.folderId===null);if(o&&o.length>0&&(c=c.filter(h=>{let I=Ue(h.mime,h.ext);return o.includes(I)})),i&&i.trim()){let h=i.toLowerCase().trim();l=l.filter(I=>I.name.toLowerCase().includes(h)),c=c.filter(I=>{var H,q;return I.name.toLowerCase().includes(h)||((q=(H=I.ext)==null?void 0:H.toLowerCase().includes(h))!=null?q:!1)})}let d=l.sort((h,I)=>new Date(h.createdAt).getTime()-new Date(I.createdAt).getTime()),f=c.sort((h,I)=>new Date(h.createdAt).getTime()-new Date(I.createdAt).getTime()),m=d.length+f.length,b=Math.ceil(m/n)||1,p=(a-1)*n,y=p+n,w=d.slice(Math.max(0,p),Math.min(d.length,y)),D=w.length,F=n-D,M=Math.min(d.length,p),N=Math.max(0,p-d.length),k=f.slice(N,N+F);return{folders:w,files:k,pagination:{currentPage:a,totalPages:b,totalFiles:m,filesPerPage:n}}}async createFolder(t,o){await fo(300);let a={id:Date.now(),name:t,parentId:o!=null?o:null,pathId:typeof o=="number"?o:0,path:"",fileCount:0,folderCount:0,createdAt:new Date,updatedAt:new Date};return De.push(a),a}getMetaDataType(t,o){return t.type.startsWith("image/")?{}:t.type.startsWith("video/")?{duration:0,videoSource:o!=null?o:la.LOCAL}:t.type.startsWith("audio/")?{duration:0}:{description:""}}getFileType(t){var a;let o="."+((a=t.name.split(".").pop())==null?void 0:a.toLowerCase());return Ue(t.type,o)}async uploadFiles(t,o){var n;await fo(500);let a=[];for(let{file:i,videoSource:l}of t){let c=this.getFileType(i),d="."+((n=i.name.split(".").pop())==null?void 0:n.toLowerCase()),f={id:Date.now()+Math.random(),name:i.name,folderId:o!=null?o:null,size:i.size,url:URL.createObjectURL(i),mime:i.type||"application/octet-stream",ext:d,metaData:this.getMetaDataType(i,l),createdAt:new Date,updatedAt:new Date,tags:[],width:c===K.IMAGE?800:void 0,height:c===K.IMAGE?600:void 0};Ie.push(f),a.push(f)}return a}renameFolder(t,o){let a=De.find(n=>n.id===t);return a?(a.name=o,a.updatedAt=new Date,Promise.resolve(a)):Promise.reject(new Error("Folder not found"))}updateFileMetaData(t,o){let a=Ie.find(c=>c.id===t);if(!a)return Promise.reject(new Error("File not found"));let l=o,{metaData:n}=l,i=g(l,["metaData"]);return Object.assign(a,i),n&&(a.metaData=r(r({},a.metaData),n)),a.updatedAt=new Date,Promise.resolve(a)}deleteFiles(t){for(let o of t){let a=Ie.findIndex(n=>n.id===o);a!==-1&&Ie.splice(a,1)}return Promise.resolve()}deleteFolders(t){for(let o of t){let a=De.findIndex(n=>n.id===o);if(a!==-1){De.splice(a,1);for(let n=Ie.length-1;n>=0;n--)Ie[n].folderId===o&&Ie.splice(n,1)}}return Promise.resolve()}findFiles(t){let o=t==null?void 0:t.toLowerCase(),a=Ie.filter(n=>{var i;return n.name.toLowerCase().includes(o)||((i=n.tags)==null?void 0:i.some(l=>l.toLowerCase().includes(o)))});return Promise.resolve(a)}findFolders(t){let o=t==null?void 0:t.toLowerCase(),a=De.filter(n=>n.name.toLowerCase().includes(o));return Promise.resolve(a)}moveFiles(t,o){let a=[];for(let n of t){let i=Ie.find(l=>l.id===n);i&&(i.folderId=o,i.updatedAt=new Date,a.push(i))}return Promise.resolve(a)}moveFolders(t,o){let a=[];for(let n of t){let i=De.find(l=>l.id===n);i&&(i.parentId=o,i.updatedAt=new Date,a.push(i))}return Promise.resolve(a)}};export{es as FileManager,os as FileManagerModal,xo as FileManagerProvider,Ua as MockProvider,E as useFileManager};