")):download(e,"img.ftqq.com.gif","img/gif")})}),e.render()}function update_text(){var t=$("#thetext").val();t.length>0&&(canvas.getActiveObject().set("text",t),canvas.renderAll(),$("#thetext").val(""),$("#thetext").prop("disabled",!0))}function blobToDataURL(t,e){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.readAsDataURL(t)}function control_init(){var t=canvas.getObjects();$(t).each((t,e)=>{e.set({cornerSize:15,padding:5,transparentCorners:!0,cornerStyle:"circle",cornerColor:"red",borderColor:"red"})})}function clipboard_init(){console.log("IN"),document.addEventListener("paste",function(t){if(t.clipboardData){console.log("DATA");var e=null,n=t.clipboardData.items;if(n)for(var a=0;aedit_text(t)),canvas.on("selection:created",t=>edit_text(t))}function edit_text(t){var e=t.target;e&&(console.log(e.type),"text"==e.type?($("#thetext").val(e.text),$("#thetext").prop("disabled",!1)):($("#thetext").val(""),$("#thetext").prop("disabled",!0)))}canvas.add(text4),$(function(){$(".bg-list>li img").on("dblclick",function(){console.log("in bg"+this.src),fabric.Image.fromURL(this.src,function(t){canvas.add(t),eventit(),control_init()})}),$("#sidebar").sticky({topSpacing:0}),clipboard_init(),key_init()});