"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[734],{62711:(e,t,n)=>{n.r(t),n.d(t,{downloadPdf:()=>i});var a=n(50727),o=n.n(a),l=n(75197),c=n(64135),s=n(58756);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.ZP("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.fn.error((0,s.Z)("__new.content.answerResults.errorDownload"))}))}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/downloadSummaryPdf.f152bc1c.chunk.js.map