(()=>{var e={};e.id=1477,e.ids=[1477],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12909:(e,r,t)=>{"use strict";function s(){let e=process.env.JWT_SECRET;if(!e)throw Error("JWT_SECRET is not set");return e}function a(e){let r=e.headers.get("authorization");if(r&&r.startsWith("Bearer "))return r.slice(7);let t=e.cookies.get("admin_token")?.value;if(t)return t;let s=e.cookies.get("token")?.value;return s||null}t.d(r,{V:()=>a,u:()=>s})},27910:e=>{"use strict";e.exports=require("stream")},28354:e=>{"use strict";e.exports=require("util")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29949:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>y,routeModule:()=>g,serverHooks:()=>h,workAsyncStorage:()=>k,workUnitAsyncStorage:()=>v});var s={};t.r(s),t.d(s,{GET:()=>m});var a=t(96559),n=t(48088),i=t(37719),o=t(32190),u=t(43205),p=t.n(u),c=t(96330),l=t(12909);let d=new c.PrismaClient,x=(0,l.u)();async function f(e){let r=(0,l.V)(e);if(!r)return null;try{let e=p().verify(r,x);if(e.isGlobalAdmin&&e.globalAdminId)return e}catch{}return null}async function m(e){try{if(!await f(e))return o.NextResponse.json({error:"Unauthorized"},{status:401});let r=await d.package.findMany({orderBy:{price:"asc"}});return o.NextResponse.json({packages:r})}catch(e){return console.error("Packages list error:",e),o.NextResponse.json({error:"Server error"},{status:500})}}let g=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/admin/packages/route",pathname:"/api/admin/packages",filename:"route",bundlePath:"app/api/admin/packages/route"},resolvedPagePath:"/Users/mustafaseyhan/Project/PazarAnalist/src/app/api/admin/packages/route.ts",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:k,workUnitAsyncStorage:v,serverHooks:h}=g;function y(){return(0,i.patchFetch)({workAsyncStorage:k,workUnitAsyncStorage:v})}},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:e=>{"use strict";e.exports=require("crypto")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79428:e=>{"use strict";e.exports=require("buffer")},96330:e=>{"use strict";e.exports=require("@prisma/client")},96487:()=>{}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4447,580,3205],()=>t(29949));module.exports=s})();