module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},31467,e=>{"use strict";var t=e.i(26747),r=e.i(90406),s=e.i(44898),i=e.i(62950),a=e.i(24977);async function n(e,t){let r,s;if(r="TTWQW222rs#@#@!@",s=e.headers.authorization||"",(!r||s!==`Bearer ${r}`)&&(t.status(401).json({success:!1,message:"Unauthorized"}),1))return;let i=Number(e.query.id);if(!Number.isFinite(i))return t.status(400).json({success:!1,message:"Invalid id"});if("GET"!==e.method)return t.status(405).json({success:!1,message:"Method Not Allowed"});try{let e=await a.default.policy.findUnique({where:{id:i}});if(!e)return t.status(404).json({success:!1,message:"Not Found"});return t.status(200).json({success:!0,policy:e})}catch(e){return console.error(e),t.status(500).json({success:!1,message:"Server Error"})}}e.s(["default",()=>n],61723);var o=e.i(61723),l=e.i(7031),u=e.i(81927),d=e.i(46432);let p=(0,i.hoist)(o,"default"),c=(0,i.hoist)(o,"config"),h=new s.PagesAPIRouteModule({definition:{kind:r.RouteKind.PAGES_API,page:"/api/Policy/[id]",pathname:"/api/Policy/[id]",bundlePath:"",filename:""},userland:o,distDir:".next",relativeProjectDir:""});async function m(e,r,s){h.isDev&&(0,d.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let i="/api/Policy/[id]";i=i.replace(/\/index$/,"")||"/";let a=await h.prepare(e,r,{srcPage:i});if(!a){r.statusCode=400,r.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve());return}let{query:n,params:o,prerenderManifest:p,routerServerContext:c}=a;try{let t=e.method||"GET",s=(0,l.getTracer)(),a=s.getActiveScopeSpan(),d=h.instrumentationOnRequestError.bind(h),m=async a=>h.render(e,r,{query:{...n,...o},params:o,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:p.preview,propagateError:!1,dev:h.isDev,page:"/api/Policy/[id]",internalRevalidate:null==c?void 0:c.revalidate,onError:(...t)=>d(e,...t)}).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":r.statusCode,"next.rsc":!1});let e=s.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=e.get("next.route");if(n){let e=`${t} ${n}`;a.setAttributes({"next.route":n,"http.route":n,"next.span_name":e}),a.updateName(e)}else a.updateName(`${t} ${i}`)});a?await m(a):await s.withPropagatedContext(e.headers,()=>s.trace(u.BaseServerSpan.handleRequest,{spanName:`${t} ${i}`,kind:l.SpanKind.SERVER,attributes:{"http.method":t,"http.target":e.url}},m))}catch(e){if(h.isDev)throw e;(0,t.sendError)(r,500,"Internal Server Error")}finally{null==s.waitUntil||s.waitUntil.call(s,Promise.resolve())}}e.s(["config",0,c,"default",0,p,"handler",()=>m],31467)}];

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