"use strict";(()=>{var e={};e.id=141,e.ids=[141],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7561:e=>{e.exports=require("node:fs")},9411:e=>{e.exports=require("node:path")},3191:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>w,requestAsyncStorage:()=>y,routeModule:()=>h,serverHooks:()=>j,staticGenerationAsyncStorage:()=>x});var n={};r.r(n),r.d(n,{GET:()=>f});var o=r(3277),i=r(5265),s=r(5356),u=r(7076),a=r(7561),c=r.n(a),l=r(9411),p=r.n(l),d=r(1760);async function f(){let e=(0,d.ZN)();try{let t=c().readdirSync(p().join(e,"diagrams")),r=[];for(let e of t)if(/^flow-[\w-]+\.mmd$/.test(e)){let t=e.replace(/^flow-/,"").replace(/\.mmd$/,"").replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase());r.push({name:t,filename:e})}return u.NextResponse.json({flows:r})}catch{return u.NextResponse.json({flows:[]})}}let h=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/flows/route",pathname:"/api/flows",filename:"route",bundlePath:"app/api/flows/route"},resolvedPagePath:"/home/dx/Work/hex/dashboard/app/api/flows/route.ts",nextConfigOutput:"",userland:n}),{requestAsyncStorage:y,staticGenerationAsyncStorage:x,serverHooks:j}=h,m="/api/flows/route";function w(){return(0,s.patchFetch)({serverHooks:j,staticGenerationAsyncStorage:x})}},1760:(e,t,r)=>{r.d(t,{J1:()=>f,V9:()=>h,ZN:()=>d,au:()=>l,gn:()=>a,ki:()=>p,ws:()=>c});var n=r(7561),o=r.n(n),i=r(9411),s=r.n(i);function u(){let e=process.env.HEX_PROJECT_DIR??process.env.SOLAUDIT_PROJECT_DIR??process.cwd();try{let t=s().join(e,".hex","config.json");if(o().existsSync(t))return s().join(e,".hex");let r=s().join(e,".solaudit","config.json");if(o().existsSync(r))return s().join(e,".solaudit")}catch{}return s().join(e,".hex")}function a(e){try{let t=s().join(u(),e),r=o().readFileSync(t,"utf-8");return JSON.parse(r)}catch{return null}}function c(e){try{let t=s().join(u(),e);return o().readFileSync(t,"utf-8")}catch{return null}}function l(e,t){let r=s().join(u(),e);o().writeFileSync(r,JSON.stringify(t,null,2),"utf-8")}function p(e){try{let t=s().join(u(),e);return o().existsSync(t)}catch{return!1}}function d(){return u()}function f(e){try{let t=s().join(u(),e);if(!o().existsSync(t))return[];return o().readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name)}catch{return[]}}function h(e){try{let t=s().join(u(),e),r=o().readFileSync(t,"utf-8");return JSON.parse(r)}catch{return null}}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[916,786],()=>r(3191));module.exports=n})();