"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[413],{25442:(e,t,n)=>{n.d(t,{downloadPdf:()=>i});var a=n(30296),o=n.n(a),l=n(59067),c=n(59382),s=n(53618);const i=(e,t)=>{const n=e.style.display,a=document.body.style.overflowY;Object.assign(e.style,{display:"flex"}),document.body.style.overflowY="hidden",o()(e,{scale:1,useCORS:!0,allowTaint:!0,scrollY:-window.scrollY}).then((o=>{document.body.style.overflowY=a;const c=o.toDataURL("image/png",1),s=new l.Ay("p","px","a4"),i=s.internal.pageSize.getWidth(),d=s.internal.pageSize.getHeight(),r=i/o.width,g=d/o.height,w=r>g?g:r,y=o.width*w,h=o.height*w,p=(i-y)/2;s.addImage(c,"PNG",p,0,y,h),s.save("".concat((e=>{const t=new Date,n=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getFullYear()),l="".concat(n,"-").concat(a,"-").concat(o);return"".concat(null===e||void 0===e?void 0:e.replace(/\s+/g,"_"),"_").concat(l)})(t),".pdf")),Object.assign(e.style,{display:n})})).catch((()=>{document.body.style.overflowY=a,c.hm.error((0,s.A)("__new.content.answerResults.errorDownload"))}))}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/downloadSummaryPdf.4186be59.chunk.js.map