"use strict";(self.webpackChunk_aidoop_aidoop_r=self.webpackChunk_aidoop_aidoop_r||[]).push([[3677],{84081:(e,t,a)=>{a.r(t),a.d(t,{PrintableBoardViewerPage:()=>r});var n=a(41628);class r extends n.BoardViewerPage{get context(){return Object.assign(Object.assign({},super.context),{printable:{accept:["preview"],content:async()=>{const e=await this.fetchImage();return await this.printTrick(e),this}}})}async fetchImage(){const e=this._boardId,t=function(e){var t=[];for(var a in e)e.hasOwnProperty(a)&&t.push(encodeURIComponent(a)+"="+encodeURIComponent(e[a]));return t.join("&")}({title:this.context.title}),a=`${location.origin}/screenshot/${e}${t?"?"+t:""}`,n=await fetch(a);return await(r=await n.blob(),new Promise(((e,t)=>{let a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=t,a.readAsDataURL(r)})));var r}}customElements.define("printable-board-viewer-page",r)}}]);