Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-html-support

Package Overview
Dependencies
Maintainers
1
Versions
669
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-html-support - npm Package Compare versions

Comparing version 29.1.0 to 29.2.0

build/translations/de.js

2

build/html-support.js

@@ -5,2 +5,2 @@ /*!

*/
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.htmlSupport=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}([function(e,t,r){"use strict";var o=r(6),n="object"==typeof self&&self&&self.Object===Object&&self,i=o.a||n||Function("return this")();t.a=i},function(e,t,r){e.exports=r(4)("./src/core.js")},function(e,t,r){e.exports=r(4)("./src/utils.js")},function(e,t,r){"use strict";(function(e){var o=r(6),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===n&&o.a.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||l&&l.binding&&l.binding("util")}catch(e){}}();t.a=a}).call(this,r(8)(e))},function(e,t){e.exports=CKEditor5.dll},function(e,t,r){e.exports=r(4)("./src/widget.js")},function(e,t,r){"use strict";(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.a=r}).call(this,r(13))},function(e,t,r){"use strict";(function(e){var o=r(0),n=r(10),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=l&&l.exports===i?o.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||n.a;t.a=c}).call(this,r(8)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){e.exports=r(4)("./src/engine.js")},function(e,t,r){"use strict";t.a=function(){return!1}},function(e,t,r){"use strict";(function(e){var o=r(0),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===n?o.a.Buffer:void 0,a=l?l.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var r=e.length,o=a?a(r):new e.constructor(r);return e.copy(o),o}}).call(this,r(8)(e))},,function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var o=r(15),n=r(16);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.i,n,""]]);var i={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o(n,i);e.exports=n.locals||{}},function(e,t,r){"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),l=[];function a(e){for(var t=-1,r=0;r<l.length;r++)if(l[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},o=[],n=0;n<e.length;n++){var i=e[n],c=t.base?i[0]+t.base:i[0],s=r[c]||0,m="".concat(c," ").concat(s);r[c]=s+1;var u=a(m),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(l[u].references++,l[u].updater(d)):l.push({identifier:m,updater:p(d,t),references:1}),o.push(m)}return o}function s(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var n=r.nc;n&&(o.nonce=n)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var l=i(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var m,u=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function d(e,t,r,o){var n=r?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,n);else{var i=document.createTextNode(n),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function h(e,t,r){var o=r.css,n=r.media,i=r.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var f=null,b=0;function p(e,t){var r,o,n;if(t.singleton){var i=b++;r=f||(f=s(t)),o=d.bind(null,r,i,!1),n=d.bind(null,r,i,!0)}else r=s(t),o=h.bind(null,r,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<r.length;o++){var n=a(r[o]);l[n].references--}for(var i=c(e,t),s=0;s<r.length;s++){var m=a(r[s]);0===l[m].references&&(l[m].updater(),l.splice(m,1))}r=i}}}},function(e,t){e.exports=":root{--ck-html-object-embed-unfocused-outline-width:1px}.ck-widget.html-object-embed{font-size:var(--ck-font-size-base);background-color:var(--ck-color-base-foreground);padding:var(--ck-spacing-small);padding-top:calc(var(--ck-font-size-tiny) + var(--ck-spacing-large));min-width:calc(76px + var(--ck-spacing-standard))}.ck-widget.html-object-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-object-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.html-object-embed:before{font-weight:400;font-style:normal;position:absolute;content:attr(data-html-object-embed-label);top:0;left:var(--ck-spacing-standard);background:#999;transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-object-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);font-size:var(--ck-font-size-tiny);font-family:var(--ck-font-face)}.ck-widget.html-object-embed .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck-widget.html-object-embed .html-object-embed__content{pointer-events:none}div.ck-widget.html-object-embed{margin:1em auto}span.ck-widget.html-object-embed{display:inline-block}"},function(e,t,r){"use strict";r.r(t),r.d(t,"GeneralHtmlSupport",(function(){return qr})),r.d(t,"DataFilter",(function(){return Mr})),r.d(t,"DataSchema",(function(){return a})),r.d(t,"HtmlComment",(function(){return Wr}));var o=r(1),n=r(2),i=[{model:"heading1",view:"h2"},{model:"heading2",view:"h3"},{model:"heading3",view:"h4"},{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"$htmlSection",modelSchema:{allowChildren:"$block",allowIn:["$root","$htmlSection"],isBlock:!0}},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlTable",view:"table",modelSchema:{allowIn:["$htmlSection","$root"],isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!0}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isBlock:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowChildren:["$block","$htmlSection"],isBlock:!0}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowChildren:["$block","$htmlSection"],isBlock:!0}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$htmlSection",isBlock:!0}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!0}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlSumary",view:"summary",modelSchema:{allowChildren:"$text",allowIn:"htmlDetails",isBlock:!0}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowChildren:["htmlHeading1","htmlHeading2","htmlHeading3","htmlHeading4","htmlHeading5","htmlHeading6","heading1","heading2","heading3"],isBlock:!0}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$htmlSection",allowChildren:["$htmlList","htmlLi"],isBlock:!0}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!0}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlDl",view:"dl",modelSchema:{allowIn:["$htmlSection","$root"],allowChildren:["htmlDt","htmlDd"],isBlock:!0}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!0}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!0}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"$htmlObjectBlock",isObject:!0,modelSchema:{isObject:!0,isBlock:!0,allowWhere:"$block"}}],l=[{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0}},{model:"htmlA",view:"a",priority:5,attributeProperties:{copyOnEnter:!0}},{model:"htmlStrong",view:"strong",attributeProperties:{copyOnEnter:!0}},{model:"htmlB",view:"b",attributeProperties:{copyOnEnter:!0}},{model:"htmlI",view:"i",attributeProperties:{copyOnEnter:!0}},{model:"htmlEm",view:"em",attributeProperties:{copyOnEnter:!0}},{model:"htmlS",view:"s",attributeProperties:{copyOnEnter:!0}},{model:"htmlDel",view:"del",attributeProperties:{copyOnEnter:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0}},{model:"htmlU",view:"u",attributeProperties:{copyOnEnter:!0}},{model:"htmlSub",view:"sub",attributeProperties:{copyOnEnter:!0}},{model:"htmlSup",view:"sup",attributeProperties:{copyOnEnter:!0}},{model:"htmlCode",view:"code",attributeProperties:{copyOnEnter:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0}},{model:"$htmlObjectInline",isObject:!0,modelSchema:{isObject:!0,isInline:!0,allowWhere:"$text",allowAttributesOf:"$text"}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}}];class a extends o.Plugin{constructor(e){super(e),this._definitions=new Map}static get pluginName(){return"DataSchema"}init(){for(const e of i)this.registerBlockElement(e);for(const e of l)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.set(e.model,{...e,isBlock:!0})}registerInlineElement(e){this._definitions.set(e.model,{...e,isInline:!0})}getDefinitionsForView(e,t){const r=new Set;for(const o of this._getMatchingViewDefinitions(e)){if(t)for(const e of this._getReferences(o.model))r.add(e);r.add(o)}return r}_getMatchingViewDefinitions(e){return Array.from(this._definitions.values()).filter(t=>t.view&&function(e,t){if("string"==typeof e)return e===t;if(e instanceof RegExp)return e.test(t);return!1}(e,t.view))}*_getReferences(e){const{modelSchema:t}=this._definitions.get(e);if(!t)return;const r=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"];for(const o of r)for(const r of Object(n.toArray)(t[o]||[])){const t=this._definitions.get(r);r!==e&&t&&(yield*this._getReferences(t.model),yield t)}}}var c=r(9),s=r(5);var m=function(){this.__data__=[],this.size=0};var u=function(e,t){return e===t||e!=e&&t!=t};var d=function(e,t){for(var r=e.length;r--;)if(u(e[r][0],t))return r;return-1},h=Array.prototype.splice;var f=function(e){var t=this.__data__,r=d(t,e);return!(r<0)&&(r==t.length-1?t.pop():h.call(t,r,1),--this.size,!0)};var b=function(e){var t=this.__data__,r=d(t,e);return r<0?void 0:t[r][1]};var p=function(e){return d(this.__data__,e)>-1};var v=function(e,t){var r=this.__data__,o=d(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this};function w(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}w.prototype.clear=m,w.prototype.delete=f,w.prototype.get=b,w.prototype.has=p,w.prototype.set=v;var g=w;var y=function(){this.__data__=new g,this.size=0};var j=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var A=function(e){return this.__data__.get(e)};var _=function(e){return this.__data__.has(e)},O=r(0),S=O.a.Symbol,k=Object.prototype,E=k.hasOwnProperty,$=k.toString,C=S?S.toStringTag:void 0;var P=function(e){var t=E.call(e,C),r=e[C];try{e[C]=void 0;var o=!0}catch(e){}var n=$.call(e);return o&&(t?e[C]=r:delete e[C]),n},F=Object.prototype.toString;var I=function(e){return F.call(e)},x=S?S.toStringTag:void 0;var T=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?P(e):I(e)};var B=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var M,D=function(e){if(!B(e))return!1;var t=T(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},R=O.a["__core-js_shared__"],H=(M=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var z=function(e){return!!H&&H in e},L=Function.prototype.toString;var N=function(e){if(null!=e){try{return L.call(e)}catch(e){}try{return e+""}catch(e){}}return""},U=/^\[object .+?Constructor\]$/,V=Function.prototype,q=Object.prototype,W=V.toString,G=q.hasOwnProperty,K=RegExp("^"+W.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(e){return!(!B(e)||z(e))&&(D(e)?K:U).test(N(e))};var J=function(e,t){return null==e?void 0:e[t]};var X=function(e,t){var r=J(e,t);return Q(r)?r:void 0},Y=X(O.a,"Map"),Z=X(Object,"create");var ee=function(){this.__data__=Z?Z(null):{},this.size=0};var te=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re=Object.prototype.hasOwnProperty;var oe=function(e){var t=this.__data__;if(Z){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return re.call(t,e)?t[e]:void 0},ne=Object.prototype.hasOwnProperty;var ie=function(e){var t=this.__data__;return Z?void 0!==t[e]:ne.call(t,e)};var le=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?"__lodash_hash_undefined__":t,this};function ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}ae.prototype.clear=ee,ae.prototype.delete=te,ae.prototype.get=oe,ae.prototype.has=ie,ae.prototype.set=le;var ce=ae;var se=function(){this.size=0,this.__data__={hash:new ce,map:new(Y||g),string:new ce}};var me=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var ue=function(e,t){var r=e.__data__;return me(t)?r["string"==typeof t?"string":"hash"]:r.map};var de=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t};var he=function(e){return ue(this,e).get(e)};var fe=function(e){return ue(this,e).has(e)};var be=function(e,t){var r=ue(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this};function pe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}pe.prototype.clear=se,pe.prototype.delete=de,pe.prototype.get=he,pe.prototype.has=fe,pe.prototype.set=be;var ve=pe;var we=function(e,t){var r=this.__data__;if(r instanceof g){var o=r.__data__;if(!Y||o.length<199)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new ve(o)}return r.set(e,t),this.size=r.size,this};function ge(e){var t=this.__data__=new g(e);this.size=t.size}ge.prototype.clear=y,ge.prototype.delete=j,ge.prototype.get=A,ge.prototype.has=_,ge.prototype.set=we;var ye=ge;var je=function(e,t){for(var r=-1,o=null==e?0:e.length;++r<o&&!1!==t(e[r],r,e););return e},Ae=function(){try{var e=X(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var _e=function(e,t,r){"__proto__"==t&&Ae?Ae(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Oe=Object.prototype.hasOwnProperty;var Se=function(e,t,r){var o=e[t];Oe.call(e,t)&&u(o,r)&&(void 0!==r||t in e)||_e(e,t,r)};var ke=function(e,t,r,o){var n=!r;r||(r={});for(var i=-1,l=t.length;++i<l;){var a=t[i],c=o?o(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),n?_e(r,a,c):Se(r,a,c)}return r};var Ee=function(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o};var $e=function(e){return null!=e&&"object"==typeof e};var Ce=function(e){return $e(e)&&"[object Arguments]"==T(e)},Pe=Object.prototype,Fe=Pe.hasOwnProperty,Ie=Pe.propertyIsEnumerable,xe=Ce(function(){return arguments}())?Ce:function(e){return $e(e)&&Fe.call(e,"callee")&&!Ie.call(e,"callee")},Te=Array.isArray,Be=r(7),Me=/^(?:0|[1-9]\d*)$/;var De=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Me.test(e))&&e>-1&&e%1==0&&e<t};var Re=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},He={};He["[object Float32Array]"]=He["[object Float64Array]"]=He["[object Int8Array]"]=He["[object Int16Array]"]=He["[object Int32Array]"]=He["[object Uint8Array]"]=He["[object Uint8ClampedArray]"]=He["[object Uint16Array]"]=He["[object Uint32Array]"]=!0,He["[object Arguments]"]=He["[object Array]"]=He["[object ArrayBuffer]"]=He["[object Boolean]"]=He["[object DataView]"]=He["[object Date]"]=He["[object Error]"]=He["[object Function]"]=He["[object Map]"]=He["[object Number]"]=He["[object Object]"]=He["[object RegExp]"]=He["[object Set]"]=He["[object String]"]=He["[object WeakMap]"]=!1;var ze=function(e){return $e(e)&&Re(e.length)&&!!He[T(e)]};var Le=function(e){return function(t){return e(t)}},Ne=r(3),Ue=Ne.a&&Ne.a.isTypedArray,Ve=Ue?Le(Ue):ze,qe=Object.prototype.hasOwnProperty;var We=function(e,t){var r=Te(e),o=!r&&xe(e),n=!r&&!o&&Object(Be.a)(e),i=!r&&!o&&!n&&Ve(e),l=r||o||n||i,a=l?Ee(e.length,String):[],c=a.length;for(var s in e)!t&&!qe.call(e,s)||l&&("length"==s||n&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||De(s,c))||a.push(s);return a},Ge=Object.prototype;var Ke=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ge)};var Qe=function(e,t){return function(r){return e(t(r))}},Je=Qe(Object.keys,Object),Xe=Object.prototype.hasOwnProperty;var Ye=function(e){if(!Ke(e))return Je(e);var t=[];for(var r in Object(e))Xe.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Ze=function(e){return null!=e&&Re(e.length)&&!D(e)};var et=function(e){return Ze(e)?We(e):Ye(e)};var tt=function(e,t){return e&&ke(t,et(t),e)};var rt=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},ot=Object.prototype.hasOwnProperty;var nt=function(e){if(!B(e))return rt(e);var t=Ke(e),r=[];for(var o in e)("constructor"!=o||!t&&ot.call(e,o))&&r.push(o);return r};var it=function(e){return Ze(e)?We(e,!0):nt(e)};var lt=function(e,t){return e&&ke(t,it(t),e)},at=r(11);var ct=function(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t};var st=function(e,t){for(var r=-1,o=null==e?0:e.length,n=0,i=[];++r<o;){var l=e[r];t(l,r,e)&&(i[n++]=l)}return i};var mt=function(){return[]},ut=Object.prototype.propertyIsEnumerable,dt=Object.getOwnPropertySymbols,ht=dt?function(e){return null==e?[]:(e=Object(e),st(dt(e),(function(t){return ut.call(e,t)})))}:mt;var ft=function(e,t){return ke(e,ht(e),t)};var bt=function(e,t){for(var r=-1,o=t.length,n=e.length;++r<o;)e[n+r]=t[r];return e},pt=Qe(Object.getPrototypeOf,Object),vt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)bt(t,ht(e)),e=pt(e);return t}:mt;var wt=function(e,t){return ke(e,vt(e),t)};var gt=function(e,t,r){var o=t(e);return Te(e)?o:bt(o,r(e))};var yt=function(e){return gt(e,et,ht)};var jt=function(e){return gt(e,it,vt)},At=X(O.a,"DataView"),_t=X(O.a,"Promise"),Ot=X(O.a,"Set"),St=X(O.a,"WeakMap"),kt=N(At),Et=N(Y),$t=N(_t),Ct=N(Ot),Pt=N(St),Ft=T;(At&&"[object DataView]"!=Ft(new At(new ArrayBuffer(1)))||Y&&"[object Map]"!=Ft(new Y)||_t&&"[object Promise]"!=Ft(_t.resolve())||Ot&&"[object Set]"!=Ft(new Ot)||St&&"[object WeakMap]"!=Ft(new St))&&(Ft=function(e){var t=T(e),r="[object Object]"==t?e.constructor:void 0,o=r?N(r):"";if(o)switch(o){case kt:return"[object DataView]";case Et:return"[object Map]";case $t:return"[object Promise]";case Ct:return"[object Set]";case Pt:return"[object WeakMap]"}return t});var It=Ft,xt=Object.prototype.hasOwnProperty;var Tt=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&xt.call(e,"index")&&(r.index=e.index,r.input=e.input),r},Bt=O.a.Uint8Array;var Mt=function(e){var t=new e.constructor(e.byteLength);return new Bt(t).set(new Bt(e)),t};var Dt=function(e,t){var r=t?Mt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Rt=/\w*$/;var Ht=function(e){var t=new e.constructor(e.source,Rt.exec(e));return t.lastIndex=e.lastIndex,t},zt=S?S.prototype:void 0,Lt=zt?zt.valueOf:void 0;var Nt=function(e){return Lt?Object(Lt.call(e)):{}};var Ut=function(e,t){var r=t?Mt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};var Vt=function(e,t,r){var o=e.constructor;switch(t){case"[object ArrayBuffer]":return Mt(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return Dt(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ut(e,r);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return Ht(e);case"[object Set]":return new o;case"[object Symbol]":return Nt(e)}},qt=Object.create,Wt=function(){function e(){}return function(t){if(!B(t))return{};if(qt)return qt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var Gt=function(e){return"function"!=typeof e.constructor||Ke(e)?{}:Wt(pt(e))};var Kt=function(e){return $e(e)&&"[object Map]"==It(e)},Qt=Ne.a&&Ne.a.isMap,Jt=Qt?Le(Qt):Kt;var Xt=function(e){return $e(e)&&"[object Set]"==It(e)},Yt=Ne.a&&Ne.a.isSet,Zt=Yt?Le(Yt):Xt,er={};er["[object Arguments]"]=er["[object Array]"]=er["[object ArrayBuffer]"]=er["[object DataView]"]=er["[object Boolean]"]=er["[object Date]"]=er["[object Float32Array]"]=er["[object Float64Array]"]=er["[object Int8Array]"]=er["[object Int16Array]"]=er["[object Int32Array]"]=er["[object Map]"]=er["[object Number]"]=er["[object Object]"]=er["[object RegExp]"]=er["[object Set]"]=er["[object String]"]=er["[object Symbol]"]=er["[object Uint8Array]"]=er["[object Uint8ClampedArray]"]=er["[object Uint16Array]"]=er["[object Uint32Array]"]=!0,er["[object Error]"]=er["[object Function]"]=er["[object WeakMap]"]=!1;var tr=function e(t,r,o,n,i,l){var a,c=1&r,s=2&r,m=4&r;if(o&&(a=i?o(t,n,i,l):o(t)),void 0!==a)return a;if(!B(t))return t;var u=Te(t);if(u){if(a=Tt(t),!c)return ct(t,a)}else{var d=It(t),h="[object Function]"==d||"[object GeneratorFunction]"==d;if(Object(Be.a)(t))return Object(at.a)(t,c);if("[object Object]"==d||"[object Arguments]"==d||h&&!i){if(a=s||h?{}:Gt(t),!c)return s?wt(t,lt(a,t)):ft(t,tt(a,t))}else{if(!er[d])return i?t:{};a=Vt(t,d,c)}}l||(l=new ye);var f=l.get(t);if(f)return f;l.set(t,a),Zt(t)?t.forEach((function(n){a.add(e(n,r,o,n,t,l))})):Jt(t)&&t.forEach((function(n,i){a.set(i,e(n,r,o,i,t,l))}));var b=u?void 0:(m?s?jt:yt:s?it:et)(t);return je(b||t,(function(n,i){b&&(n=t[i=n]),Se(a,i,e(n,r,o,i,t,l))})),a};var rr=function(e){return tr(e,5)};function or(e,t,r){if(t.attributes)for(const[o,n]of Object.entries(t.attributes))e.setAttribute(o,n,r);t.styles&&e.setStyle(t.styles,r),t.classes&&e.addClass(t.classes,r)}function nr(e,t){const r=rr(e);for(const o in t)Array.isArray(t[o])?r[o]=Array.from(new Set([...e[o],...t[o]])):r[o]={...e[o],...t[o]};return r}function ir({view:e},t){return r=>{r.on("element:"+e,(e,r,o)=>{t._consumeDisallowedAttributes(r.viewItem,o)},{priority:"high"})}}function lr({model:e}){return(t,r)=>r.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function ar(e,{view:t,isInline:r}){const o=e.t;return(e,{writer:n,consumable:i})=>{const l=o("HTML object"),a=n.createContainerElement(r?"span":"div",{class:"html-object-embed","data-html-object-embed-label":l},{isAllowedInsideAttributeElement:r}),c=cr(t,e,n);n.addClass("html-object-embed__content",c);const m=e.getAttribute("htmlAttributes");return m&&i.consume(e,"attribute:htmlAttributes:"+e.name)&&or(n,m,c),n.insert(n.createPositionAt(a,0),c),Object(s.toWidget)(a,n,{widgetLabel:l})}}function cr(e,t,r){return r.createRawElement(e,null,(function(e){e.innerHTML=t.getAttribute("htmlContent")}))}function sr({priority:e,view:t}){return(r,o)=>{if(!r)return;const{writer:n}=o,i=n.createAttributeElement(t,null,{priority:e});return or(n,r,i),i}}function mr({view:e},t){return r=>{r.on("element:"+e,(e,r,o)=>{if(!r.modelRange)return;const n=t._consumeAllowedAttributes(r.viewItem,o);n&&o.writer.setAttribute("htmlAttributes",n,r.modelRange)},{priority:"low"})}}function ur({model:e}){return t=>{t.on("attribute:htmlAttributes:"+e,(e,t,r)=>{const o=t.attributeNewValue;if(!r.consumable.consume(t.item,e.name))return;or(r.writer,o,r.mapper.toViewElement(t.item))})}}var dr=function(e){return e};var hr=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},fr=Math.max;var br=function(e,t,r){return t=fr(void 0===t?e.length-1:t,0),function(){for(var o=arguments,n=-1,i=fr(o.length-t,0),l=Array(i);++n<i;)l[n]=o[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=o[n];return a[t]=r(l),hr(e,this,a)}};var pr=function(e){return function(){return e}},vr=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:pr(t),writable:!0})}:dr,wr=Date.now;var gr=function(e){var t=0,r=0;return function(){var o=wr(),n=16-(o-r);if(r=o,n>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(vr);var yr=function(e,t){return gr(br(e,t,dr),e+"")};var jr=function(e,t){for(var r=-1,o=null==e?0:e.length,n=Array(o);++r<o;)n[r]=t(e[r],r,e);return n};var Ar=function(e,t,r,o){for(var n=e.length,i=r+(o?1:-1);o?i--:++i<n;)if(t(e[i],i,e))return i;return-1};var _r=function(e){return e!=e};var Or=function(e,t,r){for(var o=r-1,n=e.length;++o<n;)if(e[o]===t)return o;return-1};var Sr=function(e,t,r){return t==t?Or(e,t,r):Ar(e,_r,r)};var kr=function(e,t,r,o){for(var n=r-1,i=e.length;++n<i;)if(o(e[n],t))return n;return-1},Er=Array.prototype.splice;var $r=function(e,t,r,o){var n=o?kr:Sr,i=-1,l=t.length,a=e;for(e===t&&(t=ct(t)),r&&(a=jr(e,Le(r)));++i<l;)for(var c=0,s=t[i],m=r?r(s):s;(c=n(a,m,c,o))>-1;)a!==e&&Er.call(a,c,1),Er.call(e,c,1);return e};var Cr=yr((function(e,t){return e&&e.length&&t&&t.length?$r(e,t):e})),Pr=Function.prototype,Fr=Object.prototype,Ir=Pr.toString,xr=Fr.hasOwnProperty,Tr=Ir.call(Object);var Br=function(e){if(!$e(e)||"[object Object]"!=T(e))return!1;var t=pt(e);if(null===t)return!0;var r=xr.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ir.call(r)==Tr};r(14);class Mr extends o.Plugin{constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new c.Matcher,this._disallowedAttributes=new c.Matcher,this._allowedElements=new Set,this._dataInitialized=!1,this._registerElementsAfterInit(),this._registerElementHandlers()}static get pluginName(){return"DataFilter"}static get requires(){return[a,s.Widget]}loadAllowedConfig(e){this._loadConfig(e,e=>this.allowAttributes(e))}loadDisallowedConfig(e){this._loadConfig(e,e=>this.disallowAttributes(e))}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._allowedElements.has(t)||(this._allowedElements.add(t),this._dataInitialized&&this._fireRegisterEvent(t))}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}_loadConfig(e,t){for(const r of e){const e=r.name||/[\s\S]+/;this.allowElement(e),Lr(r).forEach(t)}}_consumeAllowedAttributes(e,t){return Dr(e,t,this._allowedAttributes)}_consumeDisallowedAttributes(e,t){return Dr(e,t,this._disallowedAttributes)}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:n.priorities.get("high")+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const r=this.editor.model.schema;if(t.isObject&&!r.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else{if(!t.isInline)throw new n.CKEditorError("data-filter-invalid-definition",null,t);this._registerInlineElement(t)}e.stop()},{priority:"lowest"})}_fireRegisterEvent(e){this.fire(e.view?"register:"+e.view:"register",e)}_registerObjectElement(e){const t=this.editor,r=t.model.schema,o=t.conversion,{view:i,model:l}=e;r.register(l,e.modelSchema),i&&(r.extend(e.model,{allowAttributes:["htmlAttributes","htmlContent"]}),t.data.registerRawContentMatcher({name:i}),o.for("upcast").add(ir(e,this)),o.for("upcast").elementToElement({view:i,model:lr(e),converterPriority:n.priorities.get("low")+1}),o.for("upcast").add(mr(e,this)),o.for("editingDowncast").elementToElement({model:l,view:ar(t,e)}),o.for("dataDowncast").elementToElement({model:l,view:(e,{writer:t})=>cr(i,e,t)}),o.for("dataDowncast").add(ur(e)))}_registerBlockElement(e){const t=this.editor,r=t.model.schema,o=t.conversion,{view:i,model:l}=e;if(!r.isRegistered(e.model)){if(r.register(e.model,e.modelSchema),!i)return;o.for("upcast").elementToElement({model:l,view:i,converterPriority:n.priorities.get("low")+1}),o.for("downcast").elementToElement({model:l,view:i})}i&&(r.extend(e.model,{allowAttributes:"htmlAttributes"}),o.for("upcast").add(ir(e,this)),o.for("upcast").add(mr(e,this)),o.for("downcast").add(ur(e)))}_registerInlineElement(e){const t=this.editor,r=t.model.schema,o=t.conversion,n=e.model;r.extend("$text",{allowAttributes:n}),e.attributeProperties&&r.setAttributeProperties(n,e.attributeProperties),o.for("upcast").add(ir(e,this)),o.for("upcast").add(function({view:e,model:t},r){return o=>{o.on("element:"+e,(e,o,n)=>{const i=r._consumeAllowedAttributes(o.viewItem,n);o.modelRange||(o=Object.assign(o,n.convertChildren(o.viewItem,o.modelCursor)));for(const e of o.modelRange.getItems())if(n.schema.checkAttribute(e,t)){const r=nr(i||{},e.getAttribute(t)||{});n.writer.setAttribute(t,r,e)}},{priority:"low"})}}(e,this)),o.for("downcast").attributeToElement({model:n,view:sr(e)})}}function Dr(e,t,r){const o=function(e,{consumable:t},r){const o=r.matchAll(e)||[],n=[];for(const r of o)Rr(t,e,r),delete r.match.name,t.consume(e,r.match)&&n.push(r);return n}(e,t,r),{attributes:n,styles:i,classes:l}=function(e){const t={attributes:new Set,classes:new Set,styles:new Set};for(const r of e)for(const e in t){(r.match[e]||[]).forEach(r=>t[e].add(r))}return t}(o),a={};return n.size&&(a.attributes=Hr(n,t=>e.getAttribute(t))),i.size&&(a.styles=Hr(i,t=>e.getStyle(t))),l.size&&(a.classes=Array.from(l)),Object.keys(a).length?a:null}function Rr(e,t,r){for(const o of["attributes","classes","styles"]){const n=r.match[o];if(n)for(const r of n)e.test(t,{[o]:[r]})||Cr(n,r)}}function Hr(e,t){const r={};for(const o of e){void 0!==t(o)&&(r[o]=t(o))}return r}function zr(e,t){const{name:r}=e;return Br(e[t])?Object.entries(e[t]).map(([e,o])=>({name:r,[t]:{[e]:o}})):Array.isArray(e[t])?e[t].map(e=>({name:r,[t]:[e]})):[e]}function Lr(e){const{name:t,attributes:r,classes:o,styles:n}=e,i=[];return r&&i.push(...zr({name:t,attributes:r},"attributes")),o&&i.push(...zr({name:t,classes:o},"classes")),n&&i.push(...zr({name:t,styles:n},"styles")),i}class Nr extends o.Plugin{static get requires(){return[Mr]}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,r=e.conversion,o=e.plugins.get(Mr);o.on("register:table",(e,n)=>{"table"===n.model&&(t.extend("table",{allowAttributes:["htmlAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),r.for("upcast").add(ir(n,o)),r.for("upcast").add(function(e){return t=>{t.on("element:table",(t,r,o)=>{const n=r.viewItem;l(n,"htmlAttributes");const i=n.parent;i.is("element","figure")&&l(i,"htmlFigureAttributes");for(const e of n.getChildren())e.is("element","thead")&&l(e,"htmlTheadAttributes"),e.is("element","tbody")&&l(e,"htmlTbodyAttributes");function l(t,n){const i=e._consumeAllowedAttributes(t,o);i&&o.writer.setAttribute(n,i,r.modelRange)}},{priority:"low"})}}(o)),r.for("downcast").add(e=>{function t(t,r){e.on(`attribute:${r}:table`,(e,r,o)=>{if(!o.consumable.consume(r.item,e.name))return;const n=o.mapper.toViewElement(r.item),i=function(e,t,r){const o=e.writer.createRangeOn(t);for(const{item:e}of o.getWalker())if(e.is("element",r))return e}(o,n,t);or(o.writer,r.attributeNewValue,i)})}t("table","htmlAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")}),e.stop())}),o.on("register:figure",()=>{r.for("upcast").add(e=>{e.on("element:figure",(e,t,r)=>{for(const e of t.viewItem.getChildren())if(e.is("element","table"))return void r.consumable.consume(t.viewItem,{name:!0})})})})}}class Ur extends o.Plugin{static get requires(){return[Mr]}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(Mr);e.on("register:pre",(t,r)=>{if("codeBlock"!==r.model)return;const o=this.editor,n=o.model.schema,i=o.conversion;n.extend("codeBlock",{allowAttributes:["htmlAttributes","htmlContentAttributes"]}),i.for("upcast").add(ir(r,e)),i.for("upcast").add(function(e){return t=>{t.on("element:code",(t,r,o)=>{const n=r.viewItem,i=n.parent;function l(t,n){const i=e._consumeAllowedAttributes(t,o);i&&o.writer.setAttribute(n,i,r.modelRange)}i&&i.is("element","pre")&&(l(i,"htmlAttributes"),l(n,"htmlContentAttributes"))},{priority:"low"})}}(e)),i.for("downcast").add(e=>{e.on("attribute:htmlAttributes:codeBlock",(e,t,r)=>{if(!r.consumable.consume(t.item,e.name))return;const o=r.mapper.toViewElement(t.item).parent;or(r.writer,t.attributeNewValue,o)}),e.on("attribute:htmlContentAttributes:codeBlock",(e,t,r)=>{if(!r.consumable.consume(t.item,e.name))return;const o=r.mapper.toViewElement(t.item);or(r.writer,t.attributeNewValue,o)})}),t.stop()})}}class Vr extends o.Plugin{static get requires(){return[Mr]}init(){this.editor.plugins.get(Mr).on("register",(e,t)=>{const r=this.editor,o=r.model.schema,i=r.conversion;if(!t.paragraphLikeModel)return;if(o.isRegistered(t.model)||o.isRegistered(t.paragraphLikeModel))return;const l={model:t.paragraphLikeModel,view:t.view};o.register(t.model,t.modelSchema),o.register(l.model,{inheritAllFrom:"$block"}),i.for("upcast").elementToElement({view:t.view,model:(e,{writer:r})=>this._hasBlockContent(e)?r.createElement(t.model):r.createElement(l.model),converterPriority:n.priorities.get("low")+1}),i.for("downcast").elementToElement({view:t.view,model:t.model}),this._addAttributeConversion(t),i.for("downcast").elementToElement({view:l.view,model:l.model}),this._addAttributeConversion(l),e.stop()})}_hasBlockContent(e){const t=this.editor.editing.view.domConverter.blockElements;return Array.from(e.getChildren()).some(e=>t.includes(e.name))}_addAttributeConversion(e){const t=this.editor,r=t.conversion,o=t.plugins.get(Mr);t.model.schema.extend(e.model,{allowAttributes:"htmlAttributes"}),r.for("upcast").add(ir(e,o)),r.for("upcast").add(mr(e,o)),r.for("downcast").add(ur(e))}}class qr extends o.Plugin{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[Mr,Nr,Ur,Vr]}init(){const e=this.editor,t=e.plugins.get(Mr);t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}}class Wr extends o.Plugin{static get pluginName(){return"HtmlComment"}init(){const e=this.editor;e.conversion.for("upcast").elementToMarker({view:"$comment",model:(e,{writer:t})=>{const r=this.editor.model.document.getRoot(),o=e.getCustomProperty("$rawContent"),i="$comment:"+Object(n.uid)();return t.setAttribute(i,o,r),i}}),e.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(e,{writer:t})=>{const r=this.editor.model.document.getRoot(),o=e.markerName,n=r.getAttribute(o),i=t.createUIElement("$comment");return t.setCustomProperty("$rawContent",n,i),i}}),e.model.document.registerPostFixer(t=>{const r=e.model.document.getRoot(),o=e.model.document.differ.getChangedMarkers().filter(e=>e.name.startsWith("$comment")).filter(e=>{const t=e.data.newRange;return t&&"$graveyard"===t.root.rootName});if(0===o.length)return!1;for(const e of o)t.removeMarker(e.name),t.removeAttribute(e.name,r);return!0}),e.data.on("set",()=>{for(const t of e.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),e.model.on("deleteContent",(t,[r])=>{for(const t of r.getRanges()){const r=e.model.schema.getLimitElement(t),o=e.model.createPositionAt(r,0),n=e.model.createPositionAt(r,"end");let i;i=o.isTouching(t.start)&&n.isTouching(t.end)?this.getHtmlCommentsInRange(e.model.createRange(o,n)):this.getHtmlCommentsInRange(t,{skipBoundaries:!0});for(const e of i)this.removeHtmlComment(e)}},{priority:"high"})}createHtmlComment(e,t){const r=Object(n.uid)(),o=this.editor.model,i=o.document.getRoot(),l="$comment:"+r;return o.change(r=>{const o=r.createRange(e);return r.addMarker(l,{usingOperation:!0,affectsData:!0,range:o}),r.setAttribute(l,t,i),l})}removeHtmlComment(e){const t=this.editor,r=t.model.document.getRoot(),o=t.model.markers.get(e);return!!o&&(t.model.change(t=>{t.removeMarker(o),t.removeAttribute(e,r)}),!0)}getHtmlCommentData(e){const t=this.editor,r=t.model.markers.get(e),o=t.model.document.getRoot();return r?{content:o.getAttribute(e),position:r.getStart()}:null}getHtmlCommentsInRange(e,{skipBoundaries:t=!1}={}){const r=!t;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(t=>function(e,t){const o=e.getRange().start;return(o.isAfter(t.start)||r&&o.isEqual(t.start))&&(o.isBefore(t.end)||r&&o.isEqual(t.end))}(t,e)).map(e=>e.name)}}}]);
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"HTML object":"HTML object"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),window.CKEditor5=window.CKEditor5||{},window.CKEditor5.htmlSupport=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}([function(e,t,r){"use strict";var o=r(6),n="object"==typeof self&&self&&self.Object===Object&&self,i=o.a||n||Function("return this")();t.a=i},function(e,t,r){e.exports=r(4)("./src/core.js")},function(e,t,r){e.exports=r(4)("./src/utils.js")},function(e,t,r){"use strict";(function(e){var o=r(6),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===n&&o.a.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||l&&l.binding&&l.binding("util")}catch(e){}}();t.a=a}).call(this,r(8)(e))},function(e,t){e.exports=CKEditor5.dll},function(e,t,r){e.exports=r(4)("./src/widget.js")},function(e,t,r){"use strict";(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.a=r}).call(this,r(13))},function(e,t,r){"use strict";(function(e){var o=r(0),n=r(10),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=l&&l.exports===i?o.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||n.a;t.a=c}).call(this,r(8)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){e.exports=r(4)("./src/engine.js")},function(e,t,r){"use strict";t.a=function(){return!1}},function(e,t,r){"use strict";(function(e){var o=r(0),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===n?o.a.Buffer:void 0,a=l?l.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var r=e.length,o=a?a(r):new e.constructor(r);return e.copy(o),o}}).call(this,r(8)(e))},,function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var o=r(15),n=r(16);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.i,n,""]]);var i={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o(n,i);e.exports=n.locals||{}},function(e,t,r){"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),l=[];function a(e){for(var t=-1,r=0;r<l.length;r++)if(l[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},o=[],n=0;n<e.length;n++){var i=e[n],c=t.base?i[0]+t.base:i[0],s=r[c]||0,m="".concat(c," ").concat(s);r[c]=s+1;var u=a(m),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(l[u].references++,l[u].updater(d)):l.push({identifier:m,updater:p(d,t),references:1}),o.push(m)}return o}function s(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var n=r.nc;n&&(o.nonce=n)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var l=i(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var m,u=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function d(e,t,r,o){var n=r?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,n);else{var i=document.createTextNode(n),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function h(e,t,r){var o=r.css,n=r.media,i=r.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var f=null,b=0;function p(e,t){var r,o,n;if(t.singleton){var i=b++;r=f||(f=s(t)),o=d.bind(null,r,i,!1),n=d.bind(null,r,i,!0)}else r=s(t),o=h.bind(null,r,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<r.length;o++){var n=a(r[o]);l[n].references--}for(var i=c(e,t),s=0;s<r.length;s++){var m=a(r[s]);0===l[m].references&&(l[m].updater(),l.splice(m,1))}r=i}}}},function(e,t){e.exports=":root{--ck-html-object-embed-unfocused-outline-width:1px}.ck-widget.html-object-embed{font-size:var(--ck-font-size-base);background-color:var(--ck-color-base-foreground);padding:var(--ck-spacing-small);padding-top:calc(var(--ck-font-size-tiny) + var(--ck-spacing-large));min-width:calc(76px + var(--ck-spacing-standard))}.ck-widget.html-object-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-object-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.html-object-embed:before{font-weight:400;font-style:normal;position:absolute;content:attr(data-html-object-embed-label);top:0;left:var(--ck-spacing-standard);background:#999;transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-object-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);font-size:var(--ck-font-size-tiny);font-family:var(--ck-font-face)}.ck-widget.html-object-embed .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck-widget.html-object-embed .html-object-embed__content{pointer-events:none}div.ck-widget.html-object-embed{margin:1em auto}span.ck-widget.html-object-embed{display:inline-block}"},function(e,t,r){"use strict";r.r(t),r.d(t,"GeneralHtmlSupport",(function(){return qr})),r.d(t,"DataFilter",(function(){return Mr})),r.d(t,"DataSchema",(function(){return a})),r.d(t,"HtmlComment",(function(){return Kr}));var o=r(1),n=r(2),i=[{model:"heading1",view:"h2"},{model:"heading2",view:"h3"},{model:"heading3",view:"h4"},{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"$htmlSection",modelSchema:{allowChildren:"$block",allowIn:["$root","$htmlSection"],isBlock:!0}},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlTable",view:"table",modelSchema:{allowIn:["$htmlSection","$root"],isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!0}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isBlock:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowChildren:["$block","$htmlSection"],isBlock:!0}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowChildren:["$block","$htmlSection"],isBlock:!0}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$htmlSection",isBlock:!0}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!0}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlSumary",view:"summary",modelSchema:{allowChildren:"$text",allowIn:"htmlDetails",isBlock:!0}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowChildren:["htmlHeading1","htmlHeading2","htmlHeading3","htmlHeading4","htmlHeading5","htmlHeading6","heading1","heading2","heading3"],isBlock:!0}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$htmlSection",allowChildren:["$htmlList","htmlLi"],isBlock:!0}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!0}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"htmlDl",view:"dl",modelSchema:{allowIn:["$htmlSection","$root"],allowChildren:["htmlDt","htmlDd"],isBlock:!0}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!0}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!0}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$htmlSection"}},{model:"$htmlObjectBlock",isObject:!0,modelSchema:{isObject:!0,isBlock:!0,allowWhere:"$block"}}],l=[{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0}},{model:"htmlA",view:"a",priority:5,attributeProperties:{copyOnEnter:!0}},{model:"htmlStrong",view:"strong",attributeProperties:{copyOnEnter:!0}},{model:"htmlB",view:"b",attributeProperties:{copyOnEnter:!0}},{model:"htmlI",view:"i",attributeProperties:{copyOnEnter:!0}},{model:"htmlEm",view:"em",attributeProperties:{copyOnEnter:!0}},{model:"htmlS",view:"s",attributeProperties:{copyOnEnter:!0}},{model:"htmlDel",view:"del",attributeProperties:{copyOnEnter:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0}},{model:"htmlU",view:"u",attributeProperties:{copyOnEnter:!0}},{model:"htmlSub",view:"sub",attributeProperties:{copyOnEnter:!0}},{model:"htmlSup",view:"sup",attributeProperties:{copyOnEnter:!0}},{model:"htmlCode",view:"code",attributeProperties:{copyOnEnter:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0}},{model:"$htmlObjectInline",isObject:!0,modelSchema:{isObject:!0,isInline:!0,allowWhere:"$text",allowAttributesOf:"$text"}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$htmlObjectInline"}}];class a extends o.Plugin{constructor(e){super(e),this._definitions=new Map}static get pluginName(){return"DataSchema"}init(){for(const e of i)this.registerBlockElement(e);for(const e of l)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.set(e.model,{...e,isBlock:!0})}registerInlineElement(e){this._definitions.set(e.model,{...e,isInline:!0})}getDefinitionsForView(e,t){const r=new Set;for(const o of this._getMatchingViewDefinitions(e)){if(t)for(const e of this._getReferences(o.model))r.add(e);r.add(o)}return r}_getMatchingViewDefinitions(e){return Array.from(this._definitions.values()).filter(t=>t.view&&function(e,t){if("string"==typeof e)return e===t;if(e instanceof RegExp)return e.test(t);return!1}(e,t.view))}*_getReferences(e){const{modelSchema:t}=this._definitions.get(e);if(!t)return;const r=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"];for(const o of r)for(const r of Object(n.toArray)(t[o]||[])){const t=this._definitions.get(r);r!==e&&t&&(yield*this._getReferences(t.model),yield t)}}}var c=r(9),s=r(5);var m=function(){this.__data__=[],this.size=0};var u=function(e,t){return e===t||e!=e&&t!=t};var d=function(e,t){for(var r=e.length;r--;)if(u(e[r][0],t))return r;return-1},h=Array.prototype.splice;var f=function(e){var t=this.__data__,r=d(t,e);return!(r<0)&&(r==t.length-1?t.pop():h.call(t,r,1),--this.size,!0)};var b=function(e){var t=this.__data__,r=d(t,e);return r<0?void 0:t[r][1]};var p=function(e){return d(this.__data__,e)>-1};var v=function(e,t){var r=this.__data__,o=d(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this};function w(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}w.prototype.clear=m,w.prototype.delete=f,w.prototype.get=b,w.prototype.has=p,w.prototype.set=v;var g=w;var y=function(){this.__data__=new g,this.size=0};var j=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var A=function(e){return this.__data__.get(e)};var _=function(e){return this.__data__.has(e)},O=r(0),S=O.a.Symbol,k=Object.prototype,E=k.hasOwnProperty,$=k.toString,C=S?S.toStringTag:void 0;var I=function(e){var t=E.call(e,C),r=e[C];try{e[C]=void 0;var o=!0}catch(e){}var n=$.call(e);return o&&(t?e[C]=r:delete e[C]),n},P=Object.prototype.toString;var F=function(e){return P.call(e)},x=S?S.toStringTag:void 0;var T=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?I(e):F(e)};var B=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var M,R=function(e){if(!B(e))return!1;var t=T(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},D=O.a["__core-js_shared__"],H=(M=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var z=function(e){return!!H&&H in e},L=Function.prototype.toString;var N=function(e){if(null!=e){try{return L.call(e)}catch(e){}try{return e+""}catch(e){}}return""},V=/^\[object .+?Constructor\]$/,U=Function.prototype,W=Object.prototype,q=U.toString,K=W.hasOwnProperty,G=RegExp("^"+q.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(e){return!(!B(e)||z(e))&&(R(e)?G:V).test(N(e))};var J=function(e,t){return null==e?void 0:e[t]};var X=function(e,t){var r=J(e,t);return Q(r)?r:void 0},Y=X(O.a,"Map"),Z=X(Object,"create");var ee=function(){this.__data__=Z?Z(null):{},this.size=0};var te=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re=Object.prototype.hasOwnProperty;var oe=function(e){var t=this.__data__;if(Z){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return re.call(t,e)?t[e]:void 0},ne=Object.prototype.hasOwnProperty;var ie=function(e){var t=this.__data__;return Z?void 0!==t[e]:ne.call(t,e)};var le=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?"__lodash_hash_undefined__":t,this};function ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}ae.prototype.clear=ee,ae.prototype.delete=te,ae.prototype.get=oe,ae.prototype.has=ie,ae.prototype.set=le;var ce=ae;var se=function(){this.size=0,this.__data__={hash:new ce,map:new(Y||g),string:new ce}};var me=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var ue=function(e,t){var r=e.__data__;return me(t)?r["string"==typeof t?"string":"hash"]:r.map};var de=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t};var he=function(e){return ue(this,e).get(e)};var fe=function(e){return ue(this,e).has(e)};var be=function(e,t){var r=ue(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this};function pe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}pe.prototype.clear=se,pe.prototype.delete=de,pe.prototype.get=he,pe.prototype.has=fe,pe.prototype.set=be;var ve=pe;var we=function(e,t){var r=this.__data__;if(r instanceof g){var o=r.__data__;if(!Y||o.length<199)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new ve(o)}return r.set(e,t),this.size=r.size,this};function ge(e){var t=this.__data__=new g(e);this.size=t.size}ge.prototype.clear=y,ge.prototype.delete=j,ge.prototype.get=A,ge.prototype.has=_,ge.prototype.set=we;var ye=ge;var je=function(e,t){for(var r=-1,o=null==e?0:e.length;++r<o&&!1!==t(e[r],r,e););return e},Ae=function(){try{var e=X(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var _e=function(e,t,r){"__proto__"==t&&Ae?Ae(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Oe=Object.prototype.hasOwnProperty;var Se=function(e,t,r){var o=e[t];Oe.call(e,t)&&u(o,r)&&(void 0!==r||t in e)||_e(e,t,r)};var ke=function(e,t,r,o){var n=!r;r||(r={});for(var i=-1,l=t.length;++i<l;){var a=t[i],c=o?o(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),n?_e(r,a,c):Se(r,a,c)}return r};var Ee=function(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o};var $e=function(e){return null!=e&&"object"==typeof e};var Ce=function(e){return $e(e)&&"[object Arguments]"==T(e)},Ie=Object.prototype,Pe=Ie.hasOwnProperty,Fe=Ie.propertyIsEnumerable,xe=Ce(function(){return arguments}())?Ce:function(e){return $e(e)&&Pe.call(e,"callee")&&!Fe.call(e,"callee")},Te=Array.isArray,Be=r(7),Me=/^(?:0|[1-9]\d*)$/;var Re=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Me.test(e))&&e>-1&&e%1==0&&e<t};var De=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},He={};He["[object Float32Array]"]=He["[object Float64Array]"]=He["[object Int8Array]"]=He["[object Int16Array]"]=He["[object Int32Array]"]=He["[object Uint8Array]"]=He["[object Uint8ClampedArray]"]=He["[object Uint16Array]"]=He["[object Uint32Array]"]=!0,He["[object Arguments]"]=He["[object Array]"]=He["[object ArrayBuffer]"]=He["[object Boolean]"]=He["[object DataView]"]=He["[object Date]"]=He["[object Error]"]=He["[object Function]"]=He["[object Map]"]=He["[object Number]"]=He["[object Object]"]=He["[object RegExp]"]=He["[object Set]"]=He["[object String]"]=He["[object WeakMap]"]=!1;var ze=function(e){return $e(e)&&De(e.length)&&!!He[T(e)]};var Le=function(e){return function(t){return e(t)}},Ne=r(3),Ve=Ne.a&&Ne.a.isTypedArray,Ue=Ve?Le(Ve):ze,We=Object.prototype.hasOwnProperty;var qe=function(e,t){var r=Te(e),o=!r&&xe(e),n=!r&&!o&&Object(Be.a)(e),i=!r&&!o&&!n&&Ue(e),l=r||o||n||i,a=l?Ee(e.length,String):[],c=a.length;for(var s in e)!t&&!We.call(e,s)||l&&("length"==s||n&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Re(s,c))||a.push(s);return a},Ke=Object.prototype;var Ge=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ke)};var Qe=function(e,t){return function(r){return e(t(r))}},Je=Qe(Object.keys,Object),Xe=Object.prototype.hasOwnProperty;var Ye=function(e){if(!Ge(e))return Je(e);var t=[];for(var r in Object(e))Xe.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Ze=function(e){return null!=e&&De(e.length)&&!R(e)};var et=function(e){return Ze(e)?qe(e):Ye(e)};var tt=function(e,t){return e&&ke(t,et(t),e)};var rt=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},ot=Object.prototype.hasOwnProperty;var nt=function(e){if(!B(e))return rt(e);var t=Ge(e),r=[];for(var o in e)("constructor"!=o||!t&&ot.call(e,o))&&r.push(o);return r};var it=function(e){return Ze(e)?qe(e,!0):nt(e)};var lt=function(e,t){return e&&ke(t,it(t),e)},at=r(11);var ct=function(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t};var st=function(e,t){for(var r=-1,o=null==e?0:e.length,n=0,i=[];++r<o;){var l=e[r];t(l,r,e)&&(i[n++]=l)}return i};var mt=function(){return[]},ut=Object.prototype.propertyIsEnumerable,dt=Object.getOwnPropertySymbols,ht=dt?function(e){return null==e?[]:(e=Object(e),st(dt(e),(function(t){return ut.call(e,t)})))}:mt;var ft=function(e,t){return ke(e,ht(e),t)};var bt=function(e,t){for(var r=-1,o=t.length,n=e.length;++r<o;)e[n+r]=t[r];return e},pt=Qe(Object.getPrototypeOf,Object),vt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)bt(t,ht(e)),e=pt(e);return t}:mt;var wt=function(e,t){return ke(e,vt(e),t)};var gt=function(e,t,r){var o=t(e);return Te(e)?o:bt(o,r(e))};var yt=function(e){return gt(e,et,ht)};var jt=function(e){return gt(e,it,vt)},At=X(O.a,"DataView"),_t=X(O.a,"Promise"),Ot=X(O.a,"Set"),St=X(O.a,"WeakMap"),kt=N(At),Et=N(Y),$t=N(_t),Ct=N(Ot),It=N(St),Pt=T;(At&&"[object DataView]"!=Pt(new At(new ArrayBuffer(1)))||Y&&"[object Map]"!=Pt(new Y)||_t&&"[object Promise]"!=Pt(_t.resolve())||Ot&&"[object Set]"!=Pt(new Ot)||St&&"[object WeakMap]"!=Pt(new St))&&(Pt=function(e){var t=T(e),r="[object Object]"==t?e.constructor:void 0,o=r?N(r):"";if(o)switch(o){case kt:return"[object DataView]";case Et:return"[object Map]";case $t:return"[object Promise]";case Ct:return"[object Set]";case It:return"[object WeakMap]"}return t});var Ft=Pt,xt=Object.prototype.hasOwnProperty;var Tt=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&xt.call(e,"index")&&(r.index=e.index,r.input=e.input),r},Bt=O.a.Uint8Array;var Mt=function(e){var t=new e.constructor(e.byteLength);return new Bt(t).set(new Bt(e)),t};var Rt=function(e,t){var r=t?Mt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Dt=/\w*$/;var Ht=function(e){var t=new e.constructor(e.source,Dt.exec(e));return t.lastIndex=e.lastIndex,t},zt=S?S.prototype:void 0,Lt=zt?zt.valueOf:void 0;var Nt=function(e){return Lt?Object(Lt.call(e)):{}};var Vt=function(e,t){var r=t?Mt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};var Ut=function(e,t,r){var o=e.constructor;switch(t){case"[object ArrayBuffer]":return Mt(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return Rt(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Vt(e,r);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return Ht(e);case"[object Set]":return new o;case"[object Symbol]":return Nt(e)}},Wt=Object.create,qt=function(){function e(){}return function(t){if(!B(t))return{};if(Wt)return Wt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var Kt=function(e){return"function"!=typeof e.constructor||Ge(e)?{}:qt(pt(e))};var Gt=function(e){return $e(e)&&"[object Map]"==Ft(e)},Qt=Ne.a&&Ne.a.isMap,Jt=Qt?Le(Qt):Gt;var Xt=function(e){return $e(e)&&"[object Set]"==Ft(e)},Yt=Ne.a&&Ne.a.isSet,Zt=Yt?Le(Yt):Xt,er={};er["[object Arguments]"]=er["[object Array]"]=er["[object ArrayBuffer]"]=er["[object DataView]"]=er["[object Boolean]"]=er["[object Date]"]=er["[object Float32Array]"]=er["[object Float64Array]"]=er["[object Int8Array]"]=er["[object Int16Array]"]=er["[object Int32Array]"]=er["[object Map]"]=er["[object Number]"]=er["[object Object]"]=er["[object RegExp]"]=er["[object Set]"]=er["[object String]"]=er["[object Symbol]"]=er["[object Uint8Array]"]=er["[object Uint8ClampedArray]"]=er["[object Uint16Array]"]=er["[object Uint32Array]"]=!0,er["[object Error]"]=er["[object Function]"]=er["[object WeakMap]"]=!1;var tr=function e(t,r,o,n,i,l){var a,c=1&r,s=2&r,m=4&r;if(o&&(a=i?o(t,n,i,l):o(t)),void 0!==a)return a;if(!B(t))return t;var u=Te(t);if(u){if(a=Tt(t),!c)return ct(t,a)}else{var d=Ft(t),h="[object Function]"==d||"[object GeneratorFunction]"==d;if(Object(Be.a)(t))return Object(at.a)(t,c);if("[object Object]"==d||"[object Arguments]"==d||h&&!i){if(a=s||h?{}:Kt(t),!c)return s?wt(t,lt(a,t)):ft(t,tt(a,t))}else{if(!er[d])return i?t:{};a=Ut(t,d,c)}}l||(l=new ye);var f=l.get(t);if(f)return f;l.set(t,a),Zt(t)?t.forEach((function(n){a.add(e(n,r,o,n,t,l))})):Jt(t)&&t.forEach((function(n,i){a.set(i,e(n,r,o,i,t,l))}));var b=u?void 0:(m?s?jt:yt:s?it:et)(t);return je(b||t,(function(n,i){b&&(n=t[i=n]),Se(a,i,e(n,r,o,i,t,l))})),a};var rr=function(e){return tr(e,5)};function or(e,t,r){if(t.attributes)for(const[o,n]of Object.entries(t.attributes))e.setAttribute(o,n,r);t.styles&&e.setStyle(t.styles,r),t.classes&&e.addClass(t.classes,r)}function nr(e,t){const r=rr(e);for(const o in t)Array.isArray(t[o])?r[o]=Array.from(new Set([...e[o],...t[o]])):r[o]={...e[o],...t[o]};return r}function ir({view:e},t){return r=>{r.on("element:"+e,(e,r,o)=>{t._consumeDisallowedAttributes(r.viewItem,o)},{priority:"high"})}}function lr({model:e}){return(t,r)=>r.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function ar(e,{view:t,isInline:r}){const o=e.t;return(e,{writer:n,consumable:i})=>{const l=o("HTML object"),a=n.createContainerElement(r?"span":"div",{class:"html-object-embed","data-html-object-embed-label":l},{isAllowedInsideAttributeElement:r}),c=cr(t,e,n);n.addClass("html-object-embed__content",c);const m=e.getAttribute("htmlAttributes");return m&&i.consume(e,"attribute:htmlAttributes:"+e.name)&&or(n,m,c),n.insert(n.createPositionAt(a,0),c),Object(s.toWidget)(a,n,{widgetLabel:l})}}function cr(e,t,r){return r.createRawElement(e,null,(function(e){e.innerHTML=t.getAttribute("htmlContent")}))}function sr({priority:e,view:t}){return(r,o)=>{if(!r)return;const{writer:n}=o,i=n.createAttributeElement(t,null,{priority:e});return or(n,r,i),i}}function mr({view:e},t){return r=>{r.on("element:"+e,(e,r,o)=>{if(!r.modelRange)return;const n=t._consumeAllowedAttributes(r.viewItem,o);n&&o.writer.setAttribute("htmlAttributes",n,r.modelRange)},{priority:"low"})}}function ur({model:e}){return t=>{t.on("attribute:htmlAttributes:"+e,(e,t,r)=>{const o=t.attributeNewValue;if(!r.consumable.consume(t.item,e.name))return;or(r.writer,o,r.mapper.toViewElement(t.item))})}}var dr=function(e){return e};var hr=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},fr=Math.max;var br=function(e,t,r){return t=fr(void 0===t?e.length-1:t,0),function(){for(var o=arguments,n=-1,i=fr(o.length-t,0),l=Array(i);++n<i;)l[n]=o[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=o[n];return a[t]=r(l),hr(e,this,a)}};var pr=function(e){return function(){return e}},vr=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:pr(t),writable:!0})}:dr,wr=Date.now;var gr=function(e){var t=0,r=0;return function(){var o=wr(),n=16-(o-r);if(r=o,n>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(vr);var yr=function(e,t){return gr(br(e,t,dr),e+"")};var jr=function(e,t){for(var r=-1,o=null==e?0:e.length,n=Array(o);++r<o;)n[r]=t(e[r],r,e);return n};var Ar=function(e,t,r,o){for(var n=e.length,i=r+(o?1:-1);o?i--:++i<n;)if(t(e[i],i,e))return i;return-1};var _r=function(e){return e!=e};var Or=function(e,t,r){for(var o=r-1,n=e.length;++o<n;)if(e[o]===t)return o;return-1};var Sr=function(e,t,r){return t==t?Or(e,t,r):Ar(e,_r,r)};var kr=function(e,t,r,o){for(var n=r-1,i=e.length;++n<i;)if(o(e[n],t))return n;return-1},Er=Array.prototype.splice;var $r=function(e,t,r,o){var n=o?kr:Sr,i=-1,l=t.length,a=e;for(e===t&&(t=ct(t)),r&&(a=jr(e,Le(r)));++i<l;)for(var c=0,s=t[i],m=r?r(s):s;(c=n(a,m,c,o))>-1;)a!==e&&Er.call(a,c,1),Er.call(e,c,1);return e};var Cr=yr((function(e,t){return e&&e.length&&t&&t.length?$r(e,t):e})),Ir=Function.prototype,Pr=Object.prototype,Fr=Ir.toString,xr=Pr.hasOwnProperty,Tr=Fr.call(Object);var Br=function(e){if(!$e(e)||"[object Object]"!=T(e))return!1;var t=pt(e);if(null===t)return!0;var r=xr.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Fr.call(r)==Tr};r(14);class Mr extends o.Plugin{constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new c.Matcher,this._disallowedAttributes=new c.Matcher,this._allowedElements=new Set,this._dataInitialized=!1,this._registerElementsAfterInit(),this._registerElementHandlers()}static get pluginName(){return"DataFilter"}static get requires(){return[a,s.Widget]}loadAllowedConfig(e){this._loadConfig(e,e=>this.allowAttributes(e))}loadDisallowedConfig(e){this._loadConfig(e,e=>this.disallowAttributes(e))}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._allowedElements.has(t)||(this._allowedElements.add(t),this._dataInitialized&&this._fireRegisterEvent(t))}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}_loadConfig(e,t){for(const r of e){const e=r.name||/[\s\S]+/;this.allowElement(e),Lr(r).forEach(t)}}_consumeAllowedAttributes(e,t){return Rr(e,t,this._allowedAttributes)}_consumeDisallowedAttributes(e,t){return Rr(e,t,this._disallowedAttributes)}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:n.priorities.get("high")+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const r=this.editor.model.schema;if(t.isObject&&!r.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else{if(!t.isInline)throw new n.CKEditorError("data-filter-invalid-definition",null,t);this._registerInlineElement(t)}e.stop()},{priority:"lowest"})}_fireRegisterEvent(e){this.fire(e.view?"register:"+e.view:"register",e)}_registerObjectElement(e){const t=this.editor,r=t.model.schema,o=t.conversion,{view:i,model:l}=e;r.register(l,e.modelSchema),i&&(r.extend(e.model,{allowAttributes:["htmlAttributes","htmlContent"]}),t.data.registerRawContentMatcher({name:i}),o.for("upcast").add(ir(e,this)),o.for("upcast").elementToElement({view:i,model:lr(e),converterPriority:n.priorities.get("low")+1}),o.for("upcast").add(mr(e,this)),o.for("editingDowncast").elementToElement({model:l,view:ar(t,e)}),o.for("dataDowncast").elementToElement({model:l,view:(e,{writer:t})=>cr(i,e,t)}),o.for("dataDowncast").add(ur(e)))}_registerBlockElement(e){const t=this.editor,r=t.model.schema,o=t.conversion,{view:i,model:l}=e;if(!r.isRegistered(e.model)){if(r.register(e.model,e.modelSchema),!i)return;o.for("upcast").elementToElement({model:l,view:i,converterPriority:n.priorities.get("low")+1}),o.for("downcast").elementToElement({model:l,view:i})}i&&(r.extend(e.model,{allowAttributes:"htmlAttributes"}),o.for("upcast").add(ir(e,this)),o.for("upcast").add(mr(e,this)),o.for("downcast").add(ur(e)))}_registerInlineElement(e){const t=this.editor,r=t.model.schema,o=t.conversion,n=e.model;r.extend("$text",{allowAttributes:n}),e.attributeProperties&&r.setAttributeProperties(n,e.attributeProperties),o.for("upcast").add(ir(e,this)),o.for("upcast").add(function({view:e,model:t},r){return o=>{o.on("element:"+e,(e,o,n)=>{const i=r._consumeAllowedAttributes(o.viewItem,n);o.modelRange||(o=Object.assign(o,n.convertChildren(o.viewItem,o.modelCursor)));for(const e of o.modelRange.getItems())if(n.schema.checkAttribute(e,t)){const r=nr(i||{},e.getAttribute(t)||{});n.writer.setAttribute(t,r,e)}},{priority:"low"})}}(e,this)),o.for("downcast").attributeToElement({model:n,view:sr(e)})}}function Rr(e,t,r){const o=function(e,{consumable:t},r){const o=r.matchAll(e)||[],n=[];for(const r of o)Dr(t,e,r),delete r.match.name,t.consume(e,r.match)&&n.push(r);return n}(e,t,r),{attributes:n,styles:i,classes:l}=function(e){const t={attributes:new Set,classes:new Set,styles:new Set};for(const r of e)for(const e in t){(r.match[e]||[]).forEach(r=>t[e].add(r))}return t}(o),a={};return n.size&&(a.attributes=Hr(n,t=>e.getAttribute(t))),i.size&&(a.styles=Hr(i,t=>e.getStyle(t))),l.size&&(a.classes=Array.from(l)),Object.keys(a).length?a:null}function Dr(e,t,r){for(const o of["attributes","classes","styles"]){const n=r.match[o];if(n)for(const r of n)e.test(t,{[o]:[r]})||Cr(n,r)}}function Hr(e,t){const r={};for(const o of e){void 0!==t(o)&&(r[o]=t(o))}return r}function zr(e,t){const{name:r}=e;return Br(e[t])?Object.entries(e[t]).map(([e,o])=>({name:r,[t]:{[e]:o}})):Array.isArray(e[t])?e[t].map(e=>({name:r,[t]:[e]})):[e]}function Lr(e){const{name:t,attributes:r,classes:o,styles:n}=e,i=[];return r&&i.push(...zr({name:t,attributes:r},"attributes")),o&&i.push(...zr({name:t,classes:o},"classes")),n&&i.push(...zr({name:t,styles:n},"styles")),i}class Nr extends o.Plugin{static get requires(){return[Mr]}init(){const e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;const t=e.model.schema,r=e.conversion,o=this.editor.plugins.get(Mr),n=this.editor.plugins.get(a),i=e.config.get("mediaEmbed.elementName");n.registerBlockElement({model:"media",view:i}),o.on("register:"+i,(e,n)=>{"media"===n.model&&(t.extend("media",{allowAttributes:["htmlAttributes","htmlFigureAttributes"]}),r.for("upcast").add(ir(n,o)),r.for("upcast").add(function(e,t){return e=>{e.on("element:figure",r,{priority:"high"}),e.on("element:"+t,o)};function r(r,o,n){const i=o.viewItem;if(!n.consumable.test(i,{name:!0,classes:"media"}))return;const l=Array.from(i.getChildren()).find(e=>e.is("element",t));function a(t,r){const i=e._consumeAllowedAttributes(t,n);i&&n.writer.setAttribute(r,i,o.modelRange)}l&&(Object.assign(o,n.convertItem(l,o.modelCursor)),a(l,"htmlAttributes"),a(i,"htmlFigureAttributes"),n.consumable.consume(i,{name:!0}))}function o(t,r,o){const n=r.viewItem,i=e._consumeAllowedAttributes(n,o);i&&o.writer.setAttribute("htmlAttributes",i,r.modelRange)}}(o,i)),r.for("dataDowncast").add(function(e){return t=>{function r(e,r){t.on(`attribute:${r}:media`,(t,r,o)=>{if(!o.consumable.consume(r.item,t.name))return;const n=o.mapper.toViewElement(r.item),i=function(e,t,r){const o=e.writer.createRangeOn(t);for(const{item:e}of o.getWalker())if(e.is("element",r))return e}(o,n,e);or(o.writer,r.attributeNewValue,i)})}r(e,"htmlAttributes"),r("figure","htmlFigureAttributes")}}(i)),e.stop())})}}class Vr extends o.Plugin{static get requires(){return[Mr]}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,r=e.conversion,o=e.plugins.get(Mr);o.on("register:table",(e,n)=>{"table"===n.model&&(t.extend("table",{allowAttributes:["htmlAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),r.for("upcast").add(ir(n,o)),r.for("upcast").add(function(e){return t=>{t.on("element:table",(t,r,o)=>{const n=r.viewItem;l(n,"htmlAttributes");const i=n.parent;i.is("element","figure")&&l(i,"htmlFigureAttributes");for(const e of n.getChildren())e.is("element","thead")&&l(e,"htmlTheadAttributes"),e.is("element","tbody")&&l(e,"htmlTbodyAttributes");function l(t,n){const i=e._consumeAllowedAttributes(t,o);i&&o.writer.setAttribute(n,i,r.modelRange)}},{priority:"low"})}}(o)),r.for("downcast").add(e=>{function t(t,r){e.on(`attribute:${r}:table`,(e,r,o)=>{if(!o.consumable.consume(r.item,e.name))return;const n=o.mapper.toViewElement(r.item),i=function(e,t,r){const o=e.writer.createRangeOn(t);for(const{item:e}of o.getWalker())if(e.is("element",r))return e}(o,n,t);or(o.writer,r.attributeNewValue,i)})}t("table","htmlAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")}),e.stop())}),o.on("register:figure",()=>{r.for("upcast").add(e=>{e.on("element:figure",(e,t,r)=>{for(const e of t.viewItem.getChildren())if(e.is("element","table"))return void r.consumable.consume(t.viewItem,{name:!0})})})})}}class Ur extends o.Plugin{static get requires(){return[Mr]}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(Mr);e.on("register:pre",(t,r)=>{if("codeBlock"!==r.model)return;const o=this.editor,n=o.model.schema,i=o.conversion;n.extend("codeBlock",{allowAttributes:["htmlAttributes","htmlContentAttributes"]}),i.for("upcast").add(ir(r,e)),i.for("upcast").add(function(e){return t=>{t.on("element:code",(t,r,o)=>{const n=r.viewItem,i=n.parent;function l(t,n){const i=e._consumeAllowedAttributes(t,o);i&&o.writer.setAttribute(n,i,r.modelRange)}i&&i.is("element","pre")&&(l(i,"htmlAttributes"),l(n,"htmlContentAttributes"))},{priority:"low"})}}(e)),i.for("downcast").add(e=>{e.on("attribute:htmlAttributes:codeBlock",(e,t,r)=>{if(!r.consumable.consume(t.item,e.name))return;const o=r.mapper.toViewElement(t.item).parent;or(r.writer,t.attributeNewValue,o)}),e.on("attribute:htmlContentAttributes:codeBlock",(e,t,r)=>{if(!r.consumable.consume(t.item,e.name))return;const o=r.mapper.toViewElement(t.item);or(r.writer,t.attributeNewValue,o)})}),t.stop()})}}class Wr extends o.Plugin{static get requires(){return[Mr]}init(){this.editor.plugins.get(Mr).on("register",(e,t)=>{const r=this.editor,o=r.model.schema,i=r.conversion;if(!t.paragraphLikeModel)return;if(o.isRegistered(t.model)||o.isRegistered(t.paragraphLikeModel))return;const l={model:t.paragraphLikeModel,view:t.view};o.register(t.model,t.modelSchema),o.register(l.model,{inheritAllFrom:"$block"}),i.for("upcast").elementToElement({view:t.view,model:(e,{writer:r})=>this._hasBlockContent(e)?r.createElement(t.model):r.createElement(l.model),converterPriority:n.priorities.get("low")+1}),i.for("downcast").elementToElement({view:t.view,model:t.model}),this._addAttributeConversion(t),i.for("downcast").elementToElement({view:l.view,model:l.model}),this._addAttributeConversion(l),e.stop()})}_hasBlockContent(e){const t=this.editor.editing.view.domConverter.blockElements;return Array.from(e.getChildren()).some(e=>t.includes(e.name))}_addAttributeConversion(e){const t=this.editor,r=t.conversion,o=t.plugins.get(Mr);t.model.schema.extend(e.model,{allowAttributes:"htmlAttributes"}),r.for("upcast").add(ir(e,o)),r.for("upcast").add(mr(e,o)),r.for("downcast").add(ur(e))}}class qr extends o.Plugin{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[Mr,Vr,Ur,Wr,Nr]}init(){const e=this.editor,t=e.plugins.get(Mr);t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}}class Kr extends o.Plugin{static get pluginName(){return"HtmlComment"}init(){const e=this.editor;e.model.schema.addAttributeCheck((e,t)=>{if(e.endsWith("$root")&&t.startsWith("$comment"))return!0}),e.conversion.for("upcast").elementToMarker({view:"$comment",model:(e,{writer:t})=>{const r=this.editor.model.document.getRoot(),o=e.getCustomProperty("$rawContent"),i="$comment:"+Object(n.uid)();return t.setAttribute(i,o,r),i}}),e.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(e,{writer:t})=>{const r=this.editor.model.document.getRoot(),o=e.markerName,n=r.getAttribute(o),i=t.createUIElement("$comment");return t.setCustomProperty("$rawContent",n,i),i}}),e.model.document.registerPostFixer(t=>{const r=e.model.document.getRoot(),o=e.model.document.differ.getChangedMarkers().filter(e=>e.name.startsWith("$comment")).filter(e=>{const t=e.data.newRange;return t&&"$graveyard"===t.root.rootName});if(0===o.length)return!1;for(const e of o)t.removeMarker(e.name),t.removeAttribute(e.name,r);return!0}),e.data.on("set",()=>{for(const t of e.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),e.model.on("deleteContent",(t,[r])=>{for(const t of r.getRanges()){const r=e.model.schema.getLimitElement(t),o=e.model.createPositionAt(r,0),n=e.model.createPositionAt(r,"end");let i;i=o.isTouching(t.start)&&n.isTouching(t.end)?this.getHtmlCommentsInRange(e.model.createRange(o,n)):this.getHtmlCommentsInRange(t,{skipBoundaries:!0});for(const e of i)this.removeHtmlComment(e)}},{priority:"high"})}createHtmlComment(e,t){const r=Object(n.uid)(),o=this.editor.model,i=o.document.getRoot(),l="$comment:"+r;return o.change(r=>{const o=r.createRange(e);return r.addMarker(l,{usingOperation:!0,affectsData:!0,range:o}),r.setAttribute(l,t,i),l})}removeHtmlComment(e){const t=this.editor,r=t.model.document.getRoot(),o=t.model.markers.get(e);return!!o&&(t.model.change(t=>{t.removeMarker(o),t.removeAttribute(e,r)}),!0)}getHtmlCommentData(e){const t=this.editor,r=t.model.markers.get(e),o=t.model.document.getRoot();return r?{content:o.getAttribute(e),position:r.getStart()}:null}getHtmlCommentsInRange(e,{skipBoundaries:t=!1}={}){const r=!t;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(t=>function(e,t){const o=e.getRange().start;return(o.isAfter(t.start)||r&&o.isEqual(t.start))&&(o.isBefore(t.end)||r&&o.isEqual(t.end))}(t,e)).map(e=>e.name)}}}]);
{
"name": "@ckeditor/ckeditor5-html-support",
"version": "29.1.0",
"version": "29.2.0",
"description": "HTML Support feature for CKEditor 5.",

@@ -19,35 +19,35 @@ "keywords": [

"dependencies": {
"ckeditor5": "^29.1.0",
"ckeditor5": "^29.2.0",
"lodash-es": "^4.17.15"
},
"devDependencies": {
"@ckeditor/ckeditor5-alignment": "^29.1.0",
"@ckeditor/ckeditor5-basic-styles": "^29.1.0",
"@ckeditor/ckeditor5-block-quote": "^29.1.0",
"@ckeditor/ckeditor5-cloud-services": "^29.1.0",
"@ckeditor/ckeditor5-code-block": "^29.1.0",
"@ckeditor/ckeditor5-core": "^29.1.0",
"@ckeditor/ckeditor5-dev-utils": "^25.3.0",
"@ckeditor/ckeditor5-easy-image": "^29.1.0",
"@ckeditor/ckeditor5-editor-classic": "^29.1.0",
"@ckeditor/ckeditor5-engine": "^29.1.0",
"@ckeditor/ckeditor5-enter": "^29.1.0",
"@ckeditor/ckeditor5-essentials": "^29.1.0",
"@ckeditor/ckeditor5-font": "^29.1.0",
"@ckeditor/ckeditor5-heading": "^29.1.0",
"@ckeditor/ckeditor5-highlight": "^29.1.0",
"@ckeditor/ckeditor5-horizontal-line": "^29.1.0",
"@ckeditor/ckeditor5-html-embed": "^29.1.0",
"@ckeditor/ckeditor5-image": "^29.1.0",
"@ckeditor/ckeditor5-indent": "^29.1.0",
"@ckeditor/ckeditor5-link": "^29.1.0",
"@ckeditor/ckeditor5-list": "^29.1.0",
"@ckeditor/ckeditor5-media-embed": "^29.1.0",
"@ckeditor/ckeditor5-page-break": "^29.1.0",
"@ckeditor/ckeditor5-paragraph": "^29.1.0",
"@ckeditor/ckeditor5-paste-from-office": "^29.1.0",
"@ckeditor/ckeditor5-source-editing": "^29.1.0",
"@ckeditor/ckeditor5-table": "^29.1.0",
"@ckeditor/ckeditor5-theme-lark": "^29.1.0",
"@ckeditor/ckeditor5-utils": "^29.1.0",
"@ckeditor/ckeditor5-alignment": "^29.2.0",
"@ckeditor/ckeditor5-basic-styles": "^29.2.0",
"@ckeditor/ckeditor5-block-quote": "^29.2.0",
"@ckeditor/ckeditor5-cloud-services": "^29.2.0",
"@ckeditor/ckeditor5-code-block": "^29.2.0",
"@ckeditor/ckeditor5-core": "^29.2.0",
"@ckeditor/ckeditor5-dev-utils": "^25.4.0",
"@ckeditor/ckeditor5-easy-image": "^29.2.0",
"@ckeditor/ckeditor5-editor-classic": "^29.2.0",
"@ckeditor/ckeditor5-engine": "^29.2.0",
"@ckeditor/ckeditor5-enter": "^29.2.0",
"@ckeditor/ckeditor5-essentials": "^29.2.0",
"@ckeditor/ckeditor5-font": "^29.2.0",
"@ckeditor/ckeditor5-heading": "^29.2.0",
"@ckeditor/ckeditor5-highlight": "^29.2.0",
"@ckeditor/ckeditor5-horizontal-line": "^29.2.0",
"@ckeditor/ckeditor5-html-embed": "^29.2.0",
"@ckeditor/ckeditor5-image": "^29.2.0",
"@ckeditor/ckeditor5-indent": "^29.2.0",
"@ckeditor/ckeditor5-link": "^29.2.0",
"@ckeditor/ckeditor5-list": "^29.2.0",
"@ckeditor/ckeditor5-media-embed": "^29.2.0",
"@ckeditor/ckeditor5-page-break": "^29.2.0",
"@ckeditor/ckeditor5-paragraph": "^29.2.0",
"@ckeditor/ckeditor5-paste-from-office": "^29.2.0",
"@ckeditor/ckeditor5-source-editing": "^29.2.0",
"@ckeditor/ckeditor5-table": "^29.2.0",
"@ckeditor/ckeditor5-theme-lark": "^29.2.0",
"@ckeditor/ckeditor5-utils": "^29.2.0",
"webpack": "^4.43.0",

@@ -54,0 +54,0 @@ "webpack-cli": "^3.3.11"

@@ -13,2 +13,3 @@ /**

import DataFilter from './datafilter';
import MediaEmbedElementSupport from './integrations/mediaembed';
import TableElementSupport from './integrations/table';

@@ -42,3 +43,4 @@ import CodeBlockElementSupport from './integrations/codeblock';

CodeBlockElementSupport,
DualContentModelElementSupport
DualContentModelElementSupport,
MediaEmbedElementSupport
];

@@ -45,0 +47,0 @@ }

@@ -34,2 +34,9 @@ /**

// Allow storing comment's content as the $root attribute with the name `$comment:<unique id>`.
editor.model.schema.addAttributeCheck( ( context, attributeName ) => {
if ( context.endsWith( '$root' ) && attributeName.startsWith( '$comment' ) ) {
return true;
}
} );
// Convert the `$comment` view element to `$comment:<unique id>` marker and store its content (the comment itself) as a $root

@@ -36,0 +43,0 @@ // attribute. The comment content is needed in the `dataDowncast` pipeline to re-create the comment node.

@@ -792,2 +792,10 @@ /**

{
model: 'htmlOembed',
view: 'oembed',
isObject: true,
modelSchema: {
inheritAllFrom: '$htmlObjectInline'
}
},
{
model: 'htmlAudio',

@@ -794,0 +802,0 @@ view: 'audio',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc