"use strict";(()=>{var e={};e.id=7658,e.ids=[7658],e.modules={53524:e=>{e.exports=require("@prisma/client")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},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")},92048:e=>{e.exports=require("fs")},32615:e=>{e.exports=require("http")},35240:e=>{e.exports=require("https")},55315:e=>{e.exports=require("path")},68621:e=>{e.exports=require("punycode")},76162:e=>{e.exports=require("stream")},17360:e=>{e.exports=require("url")},21764:e=>{e.exports=require("util")},6162:e=>{e.exports=require("worker_threads")},71568:e=>{e.exports=require("zlib")},72254:e=>{e.exports=require("node:buffer")},6005:e=>{e.exports=require("node:crypto")},87561:e=>{e.exports=require("node:fs")},84492:e=>{e.exports=require("node:stream")},72477:e=>{e.exports=require("node:stream/web")},47261:e=>{e.exports=require("node:util")},466:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>h,patchFetch:()=>g,requestAsyncStorage:()=>c,routeModule:()=>d,serverHooks:()=>q,staticGenerationAsyncStorage:()=>l});var s={};t.r(s),t.d(s,{POST:()=>x});var o=t(49303),i=t(88716),n=t(60670),a=t(87070),u=t(95456),p=t(47611);async function x(e){try{let r=e.cookies.get("session-token")?.value;if(!r)return a.NextResponse.json({error:"Unauthorized"},{status:401});let t=await (0,u.WX)(r);if(!t)return a.NextResponse.json({error:"Invalid session"},{status:401});let{page:s,context:o}=await e.json(),i=await (0,p.x1)({queryType:"insight",query:`Provide contextual insight for the ${s||"dashboard"} page`,context:{...o,page:s},userId:t.userId});return a.NextResponse.json(i)}catch(e){return console.error("[ORIS Insight] Error:",e),a.NextResponse.json({error:"Internal server error"},{status:500})}}let d=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/oris/insight/route",pathname:"/api/oris/insight",filename:"route",bundlePath:"app/api/oris/insight/route"},resolvedPagePath:"C:\\Users\\Sage\\.gemini\\antigravity\\playground\\Wasiyyah 09032026\\Wasiyyah\\src\\app\\api\\oris\\insight\\route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:c,staticGenerationAsyncStorage:l,serverHooks:q}=d,h="/api/oris/insight/route";function g(){return(0,n.patchFetch)({serverHooks:q,staticGenerationAsyncStorage:l})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8948,8840,5972,672,6433],()=>t(466));module.exports=s})();