"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9965],{44195:(e,t,a)=>{e.exports=a.p+"static/media/pdf.worker.min.5124e539.mjs"},59965:(e,t,a)=>{a.d(t,{renderMailPdfThumb:()=>n});let i=!1;async function r(){let e=await a.e(2859).then(a.bind(a,98359));return i||(e.GlobalWorkerOptions.workerSrc=new a.U(a(44195)).toString(),i=!0),e}async function n(e,t=360){let{getDocument:a}=await r(),i=a({data:await e.arrayBuffer()}),o=await i.promise;try{let e=await o.getPage(1),a=e.getViewport({scale:1}),i=Math.min(2,Math.max(.2,t/a.width)),r=e.getViewport({scale:i}),n=document.createElement("canvas");n.width=Math.ceil(r.width),n.height=Math.ceil(r.height);let l=n.getContext("2d");if(!l)throw Error("canvas unavailable");await e.render({canvasContext:l,viewport:r,canvas:n}).promise;let c=await new Promise((e,t)=>{n.toBlob(a=>a?e(a):t(Error("pdf thumb encode failed")),"image/jpeg",.86)});return URL.createObjectURL(c)}finally{await o.cleanup()}}}}]);