imageFunction-legacy-d7910d2a.js 1.0 KB

1
  1. !function(){function t(t,e,n,r,o,c,i){try{var a=t[c](i),u=a.value}catch(s){return void n(s)}a.done?e(u):Promise.resolve(u).then(r,o)}System.register([],(function(e,n){"use strict";return{execute:function(){const r=""+new URL("logoWatermark-270788fc.png",n.meta.url).href;e("a",function(){var e,n=(e=function*(t){try{const e=t.getContext("2d"),n=document.createElement("img");n.setAttribute("crossOrigin","anonymous"),r&&"string"==typeof r&&r.includes("data:image"),n.src=r,yield new Promise((t=>n.onload=t));const o=document.createElement("canvas");o.width=280,o.height=220;const c=o.getContext("2d");c.clearRect(0,0,o.width,o.height),c.drawImage(n,80,80);const i=e.createPattern(o,"repeat");return e.fillStyle=i,e.fillRect(0,0,t.width,t.height),t}catch(e){console.log(e)}},function(){var n=this,r=arguments;return new Promise((function(o,c){var i=e.apply(n,r);function a(e){t(i,o,c,a,u,"next",e)}function u(e){t(i,o,c,a,u,"throw",e)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}()),e("c",((t,e=1)=>t.toDataURL("image/png",e)))}}}))}();