"use strict";var n=Object.defineProperty;var o=(i,t,e)=>t in i?n(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var r=(i,t,e)=>(o(i,typeof t!="symbol"?t+"":t,e),e);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("../../../../parchment@3.0.0/node_modules/parchment/dist/parchment.js"),d=require("./link.js"),c=["alt","height","width"];class a extends u.EmbedBlot{static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return c.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return d.sanitize(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){c.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}r(a,"blotName","image"),r(a,"tagName","IMG");exports.default=a;
