"use strict";(()=>{var e={};e.id=2542,e.ids=[2542],e.modules={20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},50388:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>h,patchFetch:()=>v,requestAsyncStorage:()=>c,routeModule:()=>l,serverHooks:()=>m,staticGenerationAsyncStorage:()=>d});var a={};t.r(a),t.d(a,{GET:()=>u});var s=t(49303),n=t(88716),i=t(60670),p=t(87070),o=t(8194);async function u(){try{let e=(await o._.plan.findMany({where:{isActive:!0},orderBy:{sortOrder:"asc"}})).map(e=>{let r=[];try{r=JSON.parse(e.features)}catch{r=[]}return{...e,price:Number(e.price),yearlyPrice:Number(e.yearlyPrice),features:r}});return p.NextResponse.json({plans:e})}catch{return p.NextResponse.json({error:"Terjadi kesalahan server"},{status:500})}}let l=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/plans/route",pathname:"/api/plans",filename:"route",bundlePath:"app/api/plans/route"},resolvedPagePath:"D:\\PROJECT\\resto-saas\\src\\app\\api\\plans\\route.ts",nextConfigOutput:"",userland:a}),{requestAsyncStorage:c,staticGenerationAsyncStorage:d,serverHooks:m}=l,h="/api/plans/route";function v(){return(0,i.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:d})}},8194:(e,r,t)=>{t.d(r,{_:()=>s});let a=require("@prisma/client"),s=globalThis.prisma??new a.PrismaClient}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[8948,5972],()=>t(50388));module.exports=a})();