"use strict";var c=Object.defineProperty;var o=(r,t,e)=>t in r?c(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>(o(r,typeof t!="symbol"?t+"":t,e),e);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../blots/block.js"),n=require("./link.js"),a=["height","width"];class i extends l.BlockEmbed{static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return a.reduce((e,u)=>(t.hasAttribute(u)&&(e[u]=t.getAttribute(u)),e),{})}static sanitize(t){return n.default.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){a.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}s(i,"blotName","video"),s(i,"className","ql-video"),s(i,"tagName","IFRAME");exports.default=i;
