module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},650645,a=>{a.n(a.i(827572))},923576,a=>{a.n(a.i(104858))},517537,a=>{a.n(a.i(903363))},13718,a=>{a.n(a.i(685523))},118198,a=>{a.n(a.i(545518))},262212,a=>{a.n(a.i(866114))},318173,a=>{a.n(a.i(454309))},140625,a=>{a.n(a.i(119285))},479e3,a=>{a.n(a.i(581901))},733878,a=>a.a(async(b,c)=>{try{var d=a.i(766518),e=b([d]);async function f(a,b){return d.prisma.mediaAsset.findMany({where:{...a&&"all"!==a?{folder:a}:{},...b?{filename:{contains:b,mode:"insensitive"}}:{}},orderBy:{createdAt:"desc"}})}async function g(){return(await d.prisma.mediaAsset.groupBy({by:["folder"],_count:{id:!0},orderBy:{folder:"asc"}})).map(a=>({folder:a.folder,count:a._count.id}))}[d]=e.then?(await e)():e,a.s(["getMediaAssets",()=>f,"getMediaFolders",()=>g]),c()}catch(a){c(a)}},!1),248418,a=>{"use strict";a.s(["MediaPageClient",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call MediaPageClient() from the server but MediaPageClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(admin)/admin/media/_components/MediaPageClient.tsx <module evaluation>","MediaPageClient")},27309,a=>{"use strict";a.s(["MediaPageClient",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call MediaPageClient() from the server but MediaPageClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(admin)/admin/media/_components/MediaPageClient.tsx","MediaPageClient")},55397,a=>{"use strict";a.i(248418);var b=a.i(27309);a.n(b)},171288,a=>a.a(async(b,c)=>{try{var d=a.i(907997);a.i(570396);var e=a.i(673727),f=a.i(109307),g=a.i(451569),h=a.i(733878),i=a.i(55397),j=b([f,h]);async function k(){let a=await (0,f.auth)();a?.user||(0,e.redirect)("/admin/login");let b=a.user.role;(0,g.hasPermission)(b,"media.view")||(0,e.redirect)("/admin");let c=(0,g.hasPermission)(b,"media.upload"),j=(0,g.hasPermission)(b,"media.delete"),[k,l]=await Promise.all([(0,h.getMediaAssets)(),(0,h.getMediaFolders)()]);return(0,d.jsx)(i.MediaPageClient,{initialAssets:k,folders:l,canUpload:c,canDelete:j,userEmail:a.user.email??"admin"})}[f,h]=j.then?(await j)():j,a.s(["default",()=>k]),c()}catch(a){c(a)}},!1)];

//# sourceMappingURL=%5Broot-of-the-server%5D__987642b4._.js.map