module.exports=[522734,(e,t,a)=>{t.exports=e.x("fs",()=>require("fs"))},446786,(e,t,a)=>{t.exports=e.x("os",()=>require("os"))},193695,(e,t,a)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,t,a)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,a)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,a)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,a)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,a)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},814747,(e,t,a)=>{t.exports=e.x("path",()=>require("path"))},924868,(e,t,a)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},780204,(e,t,a)=>{t.exports=e.x("puppeteer-582bc9288a971b4a",()=>require("puppeteer-582bc9288a971b4a"))},35355,e=>{"use strict";var t=e.i(814747),a=e.i(446786);async function r(){if("darwin"===a.default.platform()){let t=e.r(780204);return await t.launch({headless:!0,args:["--no-sandbox","--disable-setuid-sandbox"]})}}e.i(522734),t.default.join(process.cwd(),".chromium","chromium"),e.s(["launchBrowser",0,r])},844306,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),n=e.i(759756),i=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),d=e.i(487718),p=e.i(995169),c=e.i(47587),u=e.i(666012),f=e.i(570101),h=e.i(626937),m=e.i(10372),g=e.i(193695);e.i(52474);var x=e.i(600220),v=e.i(89171),w=e.i(35355),b=e.i(924868),R=e.i(814747),y=e.i(522734);let C=(0,R.join)(process.cwd(),"temp","declaration-letters");async function E(){(0,y.existsSync)(C)||await (0,b.mkdir)(C,{recursive:!0})}async function A(t,a,r){await E();let n=await t.newPage(),i=(0,R.join)(C,`${r}.pdf`);try{await n.setContent(a,{waitUntil:"networkidle0"}),await n.pdf({path:i,format:"A4",printBackground:!0,margin:{top:"0",right:"0",bottom:"0",left:"0"}});let t=e.r(522734),r=t.readFileSync(i);return t.unlinkSync(i),r}finally{await n.close()}}var k=e.i(322632);let j=k.z.object({officeName:k.z.string().min(1,"অফিসের নাম প্রয়োজন"),officeLocation:k.z.string().min(1,"অফিসের অবস্থান প্রয়োজন")});async function q(e){try{let t=await e.json(),a=j.safeParse(t);if(!a.success)return v.NextResponse.json({success:!1,statusCode:400,message:a.error.errors[0].message},{status:400});let{officeName:r,officeLocation:n}=a.data,i=function(e){let{officeName:t,officeLocation:a}=e;return`<!DOCTYPE html>
<html lang="bn">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>প্রত্যয়ন পত্র - ${t}</title>
  <style>
    @import url('https://banglawebfonts.pages.dev/css/kalpurush.css');

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Kalpurush', serif;
      background: #fff;
      color: #000;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }

    .page {
      width: 210mm;
      min-height: 297mm;
      margin: 0 auto;
      padding: 0;
      position: relative;
      background: #fff;
    }

    .top-spacer {
      height: 70mm;
    }

    .content-area {
      padding: 0 25mm;
    }

    .title {
      text-align: center;
      font-size: 15pt;
      font-weight: 700;
      margin-bottom: 12mm;
      text-decoration: underline;
    }

    .subject {
      font-size: 11pt;
      font-weight: 600;
      margin-bottom: 8mm;
    }

    .body-text {
      font-size: 11pt;
      line-height: 1.8;
      text-align: justify;
    }

    .office-name {
      font-weight: 700;
    }

    .bottom-spacer {
      height: 80mm;
    }

    @media print {
      body {
        margin: 0;
        padding: 0;
      }
      .page {
        margin: 0;
      }
    }

    @page {
      size: A4;
      margin: 0;
    }
  </style>
</head>
<body>
  <div class="page">
    <div class="top-spacer"></div>

    <div class="content-area">
      <div class="title">প্রত্যয়ন পত্র</div>

      <div class="subject">বিষয়: ekappbd.com প্ল্যাটফর্মে অফিসের অ্যাকাউন্ট অনুমোদন প্রসঙ্গে।</div>

      <div class="body-text">
        এই মর্মে প্রত্যয়ন করা হলো যে, <span class="office-name">${t}</span>, ${a} এর অধীন প্রদানকৃত বিভিন্ন সনদসমূহের সুষ্ঠু ব্যবস্থাপনা, সংরক্ষণ, যাচাইকরণ এবং ডিজিটাল প্রক্রিয়াকরণের লক্ষ্যে ekappbd.com প্ল্যাটফর্ম ব্যবহারের ইচ্ছা পোষণ করছি।
        <br><br>
        উক্ত প্ল্যাটফর্ম ব্যবহারের মাধ্যমে সেবা প্রদান কার্যক্রমকে অধিকতর স্বচ্ছ, দ্রুত, নির্ভরযোগ্য ও জবাবদিহিমূলক করা সম্ভব হবে বলে আমরা বিশ্বাস করি। এছাড়াও, তথ্য সংরক্ষণ ও ব্যবস্থাপনার ক্ষেত্রে আধুনিক প্রযুক্তিনির্ভর এই প্ল্যাটফর্ম আমাদের দাপ্তরিক কার্যক্রমকে আরও গতিশীল ও কার্যকর করবে।
        <br><br>
        অতএব, উপরোক্ত বিষয় বিবেচনা করে উক্ত প্ল্যাটফর্মে আমাদের অফিসের নামে একটি অ্যাকাউন্ট অনুমোদন ও সক্রিয়করণের জন্য প্রয়োজনীয় ব্যবস্থা গ্রহণের জন্য বিশেষভাবে অনুরোধ করা হলো।
      </div>
    </div>

    <div class="bottom-spacer"></div>
  </div>
</body>
</html>`}({officeName:r,officeLocation:n}),s=await (0,w.launchBrowser)();try{let e=await A(s,i,`declaration-${Date.now()}`),t=`office-declaration-${Date.now()}.pdf`;return new v.NextResponse(e,{status:200,headers:{"Content-Type":"application/pdf","Content-Disposition":`attachment; filename="${t}"`,"Content-Length":e.length.toString()}})}finally{await s.close()}}catch(e){return console.error("Error generating declaration PDF:",e),v.NextResponse.json({success:!1,statusCode:500,message:"পিডিএফ তৈরি করতে ব্যর্থ হয়েছে। আবার চেষ্টা করুন।"},{status:500})}}e.s(["POST",0,q],116951);var N=e.i(116951);let P=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/office-declaration/pdf/route",pathname:"/api/office-declaration/pdf",filename:"route",bundlePath:""},distDir:"_next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/office-declaration/pdf/route.ts",nextConfigOutput:"standalone",userland:N,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:S,serverHooks:O}=P;async function _(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),P.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/office-declaration/pdf/route";v=v.replace(/\/index$/,"")||"/";let w=await P.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,params:R,nextConfig:y,parsedUrl:C,isDraftMode:E,prerenderManifest:A,routerServerContext:k,isOnDemandRevalidate:j,revalidateOnlyGenerated:q,resolvedPathname:N,clientReferenceManifest:T,serverActionsManifest:S}=w,O=(0,o.normalizeAppPath)(v),_=!!(A.dynamicRoutes[O]||A.routes[N]),D=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,C,!1):t.end("This page could not be found"),null);if(_&&!E){let e=!!A.routes[N],t=A.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await D();throw new g.NoFallbackError}}let U=null;!_||P.isDev||E||(U="/index"===(U=N)?"/":U);let H=!0===P.isDev||!_,I=_&&!H;S&&T&&(0,s.setManifestsSingleton)({page:v,clientReferenceManifest:T,serverActionsManifest:S});let $=e.method||"GET",M=(0,i.getTracer)(),F=M.getActiveScopeSpan(),z=!!(null==k?void 0:k.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await P.getIncrementalCache(e,y,A,B);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let L={params:R,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:H,incrementalCache:K,cacheLifeProfiles:y.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>P.onRequestError(e,t,r,n,k)},sharedContext:{buildId:b}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>P.handle(W,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=M.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${$} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",r),n.updateName(t))}else e.updateName(`${$} ${v}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:a})=>{try{if(!B&&j&&q&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!_)return await (0,u.sendResponse)(G,V,i,L.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,r=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await P.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:j})},!1,k),t}},d=await P.handleResponse({req:e,nextConfig:y,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:q,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:B});if(!_)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",j?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return B&&_||p.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,u.sendResponse)(G,V,new Response(d.value.body,{headers:p,status:d.value.status||200})),null};z&&F?await o(F):(n=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(p.BaseServerSpan.handleRequest,{spanName:`${$} ${v}`,kind:i.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!z))}catch(t){if(t instanceof g.NoFallbackError||await P.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:j})},!1,k),_)throw t;return await (0,u.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,_,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:S})},"routeModule",0,P,"serverHooks",0,O,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,S],844306)}];

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