"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:()=>d});var a=n(50727),o=n.n(a),l=n(60215),c=n.n(l),s=n(33583),i=n(58756);const d=(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 l=o.toDataURL("image/png",1),s=new(c())("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(l,"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,s.fn.error((0,i.Z)("__new.content.answerResults.errorDownload"))}))}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/downloadSummaryPdf.9512bb68.chunk.js.map