@progress/kendo-editor-common 1.7.0-dev.202201070835 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register("@progress/kendo-editor-common",["tslib","prosemirror-commands","prosemirror-gapcursor","prosemirror-dropcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-schema-list","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view"],function(i){var a,s,l,c,u,d,f,p,m,g,h,v,y;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){c=t(e)},function(e){u=t(e)},function(e){d=t(e)},function(e){f=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){h=t(e)},function(e){v=t(e)},function(e){y=t(e)}],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t){e.exports=g},function(e,t){e.exports=a},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var o=t(3),m=t(0),i=t(13);l.changeStylesString=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};t=e.split(/\s*;\s*/).filter(function(e){return Boolean(e)}),e=t.filter(function(e){e=e.split(/\s*:\s*/);return!(e[0].toLowerCase()===n&&r.test(e[1]))});return o&&e.push(n+": "+o),{style:e.join("; ")+(e.length?";":""),changed:Boolean(o)||e.length!==t.length}},l.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1};function a(e){return(e instanceof o.Node?e.type:e).name}l.findNthParentNodeOfType=function(i,t){return void 0===t&&(t=1),function(e){return o=void 0===t?1:t,function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r)===a(i)&&0==--o)return{depth:n,node:r}}}(e);var o}},l.insertNode=function(n,r){return function(e,t){e=e.tr.replaceSelectionWith(n);r&&e.scrollIntoView(),t(e)}},l.hasSameMarkup=function(e,t,n,r){e=o.Fragment.from(i.parseContent(e,n,r)),r=o.Fragment.from(i.parseContent(t,n,r));return e.eq(r)},l.getSelectionText=function(e){e=e.selection;if(e instanceof m.TextSelection||e instanceof m.AllSelection){e=e.content().content;return e.textBetween(0,e.size)}return""},l.getNodeFromSelection=function(e){if(e.selection instanceof m.NodeSelection)return e.selection.node},l.selectedLineTextOnly=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,a=r.$to,s=r.from,r=r.to;return i.sameParent(a)&&(o.nodesBetween(s,r,function(e){n=n||e.isLeaf&&!e.isText}),n||(t=l.getSelectionText(e))),t},l.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},l.shallowEqual=function(t,n){var e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(function(e){return t[e]===n[e]})};var g={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i};l.expandSelection=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r,o=!0===n.applyToWord?g:n.applyToWord,i=e.tr,a=e.selection,s=a.$head.nodeBefore,n=a.$head.nodeAfter;if(s&&"text"===s.type.name&&s.text&&n&&"text"===n.type.name&&n.text){var l=[];a.$head.parent.descendants(function(e,t){return l.push({node:e,pos:t}),!1});for(var c=a.$head.parentOffset,s=l.findIndex(function(e){var t=e.node,e=e.pos;return e<=c&&e+t.nodeSize>=c}),u=l[s].node.text,d=!1,f=s-1;0<=f;f--){var p=l[f];!d&&p&&"text"===p.node.type.name?u=p.node.text+u:(d=!0,c-=p.node.nodeSize)}for(f=s+1;f<l.length&&((p=l[f])&&"text"===p.node.type.name);f++)u+=p.node.text;n=u.substring(0,c),s=u.substring(c),n=o.before.exec(n),s=o.after.exec(s);if(n&&s){n=n[0].length,s=s[0].length;r=a.from;return i.setSelection(m.TextSelection.create(e.doc,r-n,r+s)),{state:{tr:i,selection:i.selection,doc:i.doc,storedMarks:null,schema:i.doc.type.schema},dispatch:function(e){e.setSelection(m.TextSelection.create(e.doc,r)),t(e)}}}}return{state:e,dispatch:t}},l.expandToWordWrap=function(r,o){return function(e,t,n){e=l.expandSelection(e,t,o),t=e.state,e=e.dispatch;return r(o)(t,e)}}},function(e,t){e.exports=p},function(e,t){e.exports=y},function(e,t){e.exports=v},function(e,t){e.exports=s},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var l=t(1),o=t(2),c=t(5),u=t(3),i=t(0);s.changeTextBlock=function(i,a,s,l){if(!s.isTextblock)return!1;i.selection.ranges.forEach(function(e){var o=i.steps.length,t=e.$from.pos,e=e.$to.pos;i.doc.nodesBetween(t,e,function(e,t){if(e.eq(a)&&e.isTextblock&&!e.hasMarkup(s,l)&&function(e,t,n){e=e.resolve(t),t=e.index();return e.parent.canReplaceWith(t,t+1,n)}(i.doc,i.mapping.slice(o).map(t),s)){i.clearIncompatible(i.mapping.slice(o).map(t,1),s);var n=i.mapping.slice(o),r=n.map(t,1),t=n.map(t+e.nodeSize,1),e=new u.Slice(u.Fragment.from(s.create(l,null,e.marks)),0,0);return i.step(new c.ReplaceAroundStep(r,t,r+1,t-1,e,1,!0)),!1}})})},s.blockNodes=function(e,t){var n=e.doc,r=e.selection,o=r.$from,e=r.ranges,a=(t=void 0===t?{blocksInSelection:!1}:t).blocksInSelection,s=[],r=r instanceof i.NodeSelection?r.node:void 0;return r?r.isBlock?(s.push(r),r.nodesBetween(0,r.content.size,function(e){e.isBlock&&s.push(e)})):!a&&o.parent&&o.parent.isBlock&&s.push(o.parent):e.forEach(function(e){var o=e.$from.pos,i=e.$to.pos;n.nodesBetween(o,i,function(e,t,n,r){e.isBlock&&(!a||o<=t&&t+e.content.size+2<=i)&&s.push(e)})}),s},s.formatBlockElements=function(a,r){return function(e,t){var n=s.blockNodes(e),o=e.schema.nodes,i=e.tr;i.setMeta("commandName",r),i.setMeta("args",{value:a}),n.forEach(function(e){var t,n,r;e.type.isTextblock&&("p"===a?(n=(t=e.attrs).level,r=l.__rest(t,["level"]),s.changeTextBlock(i,e,o.paragraph,r)):/^h[1-6]$/i.test(a)?(n=parseInt(a.substr(1),10),s.changeTextBlock(i,e,o.heading,l.__assign({},e.attrs,{level:n}))):"blockquote"===a&&(n=(t=e.attrs).level,r=l.__rest(t,["level"]),s.changeTextBlock(i,e,o.blockquote,r)))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},s.cleanTextBlockFormatting=function(i,e){var t=i.doc,n=i.selection,r=(e=void 0===e?{blocksInSelection:!0}:e).blocksInSelection,a=e.blockNodeType;s.blockNodes({doc:t,selection:n},{blocksInSelection:r}).filter(function(e){return e.isTextblock}).forEach(function(e){var t=e.attrs||{},n=t.style,r=void 0===n?"":n,o=t.class,n=void 0===o?"":o,o=l.__rest(t,["style","class"]),t=a||e.type;(r||n||t!==e.type)&&s.changeTextBlock(i,e,t,o)})},s.getBlockFormats=function(e){var t=s.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&r.push("blockquote")}),r},s.addStyles=function(e,t){var n,r=e.attrs.style;return r&&t.forEach(function(e){n={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStylesString(r,n),r=n.changed?n.style:r}),r=r||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:r||null})},s.hasNode=function(e,t){var n=e.selection,r=n.from,n=n.to,o=!1;return e.doc.nodesBetween(r,n,function(e){return!(o=o||e.type===t)}),o},s.parentBlockFormat=function(e){e=s.getBlockFormats(e);return 1===new Set(e).size?e[0]:null},s.activeNode=function(e){return{tag:s.parentBlockFormat(e)||""}}},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(5),h=t(3);g.markApplies=function(r,o,i){for(var e=0;e<o.length;e++){var t=function(e){var t=o[e],e=t.$from,t=t.$to,n=0===e.depth&&r.type.allowsMarkType(i);if(r.nodesBetween(e.pos,t.pos,function(e){return!n&&void(n=e.inlineContent&&e.type.allowsMarkType(i))}),n)return{v:!0}}(e);if(t)return t.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,o=n.$cursor,i=n.ranges;if(r&&!o||!g.markApplies(e.doc,i,f))return!1;if(t)if(o)f.isInSet(e.storedMarks||o.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var a=!1,s=0;!a&&s<i.length;s++)var l=i[s],c=l.$from,u=l.$to,a=e.doc.rangeHasMark(c.pos,u.pos,f);for(s=0;s<i.length;s++){var d=i[s],c=d.$from,u=d.$to;a?m.removeMark(c.pos,u.pos,f):m.addMark(c.pos,u.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,u,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(u,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof h.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var o=Math.min(t+e.nodeSize,d),i=0;i<r.length;i++){for(var a=r[i],s=void 0,l=0;l<p.length;l++){var c=p[l];c.step===m-1&&a.eq(c.style)&&(s=c)}s?(s.to=o,s.step=m):p.push({style:a,from:Math.max(t,u),to:o,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(r,t,n,o){var e=t.selection,i=e.$cursor,a=e.ranges;if(o=o||t.tr,i)r.forEach(function(e){e.isInSet(t.storedMarks||i.marks())&&n(o.removeStoredMark(e))});else{for(var s=0;s<a.length;s++)!function(e){var e=a[e],t=e.$from,n=e.$to;r.forEach(function(e){g.removeMark(o,t.pos,n.pos,e)})}(s);n(o.scrollIntoView())}return!0},g.removeAllMarks=function(e){var e=(void 0===e?{}:e).except,n=void 0===e?[]:e;return function(e,t){e=e.tr;g.cleanMarks(e,{except:n instanceof Array?n:[n]}),e.docChanged&&t(e)}},g.cleanMarks=function(r,e){var o,t=e.except,n=r.doc,e=r.selection,i=n.type.schema,n=e.empty,e=e.ranges,a=(t||[]).map(function(e){return e.name});n||(o=Object.keys(i.marks).map(function(e){return i.marks[e]}).filter(function(e){return-1===a.indexOf(e.name)}),e.forEach(function(e){var t=e.$from,n=e.$to;o.forEach(function(e){return r.removeMark(t.pos,n.pos,e)})}))},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),i=t.altStyle,a=e.selection,s=a.from,l=a.$from,c=a.to,u=a.empty,a=r[t.mark],d=e.doc,t=!1;return!(t=u?(n=e.storedMarks||l.marks(),a&&a.isInSet(n)||o.some(function(e){return r[e].isInSet(n)})):a&&d.rangeHasMark(s,c,a)||o.some(function(e){return d.rangeHasMark(s,c,r[e])}))&&i&&r.style?g.selectionMarks(e,r.style).some(function(e){return null!==g.styleValue(e,i)}):Boolean(t)},g.styleValue=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter(function(e){return Boolean(e)}),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},g.selectionMarks=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,a=[];return n.empty?a.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,function(e){e.isInline&&a.push(t.isInSet(e.marks))}),a},g.getMark=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return e.length===t.length?e[0]:void 0},g.getActiveMarks=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return{hasNodesWithoutMarks:e.length!==t.length,marks:t}}},function(e,t){e.exports=h},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=n(1),k=n(5),g=n(2),h=n(8),b=function(e,t){e=e.find(function(e){return"style"===e.type.name}),e=e&&e.attrs.style;return g.changeStylesString(e,t)};t.getInlineStyles=function(e,t){var n=e.schema.marks.style;return(n?h.selectionMarks(e,n):[]).map(function(e){return h.styleValue(e,t)}).filter(function(e){return null!==e})};function p(p,m){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,a=r.ranges;if(o&&!i||!h.markApplies(e.doc,a,p))return!1;var s=!1;if(t){var l=n||e.tr;if(i){e=e.storedMarks||i.marks();if(p.isInSet(e)){var i=b(e,m),e=e.find(function(e){return"style"===e.type.name}),c=y.__assign({},e?e.attrs:{},{style:i.style||null});if(g.shallowEqual(e.attrs,c))return!1;t(l.removeStoredMark(p)),Object.keys(c).some(function(e){return null!==c[e]})&&t(l.addStoredMark(p.create(c))),s=!0}}else{for(var u=0;u<a.length;u++)var d=a[u],f=d.$from,d=d.$to,s=function(t,c,u,d,f){var p=f.create({style:d.style}),m=[],g=[],h=null,v=null;return t.doc.nodesBetween(c,u,function(e,t,n){if(e.isInline){var r=e.marks;if(!p.isInSet(r)&&n.type.allowsMarkType(p.type)){var o=Math.max(t,c),i=Math.min(t+e.nodeSize,u),n=b(r,d);if(n.changed||d.newValue){for(var t=n.changed?{style:n.style||null}:{style:[d.style]+": "+d.newValue+";"},e=f.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,a=e?y.__assign({},e.attrs,t):t,n=f.create(a),s=n.addToSet(r),l=0;l<r.length;l++)r[l].isInSet(s)||(h&&h.to===o&&h.mark.eq(r[l])?h.to=i:(h=new k.RemoveMarkStep(o,i,r[l]),m.push(h)));e=v&&v.to===o,t=e&&n.attrs.style===v.mark.attrs.style;e&&t?v.to=i:Object.keys(a).some(function(e){return null!==a[e]})&&(v=new k.AddMarkStep(o,i,n),g.push(v))}}}}),m.forEach(function(e){return t.step(e)}),g.forEach(function(e){return t.step(e)}),0<m.length+g.length}(l,f.pos,d.pos,m,p);s&&(l.scrollIntoView(),t(l))}}return s}}t.toggleInlineFormat=function(u,d,f){return function(t,e){function n(){return c=!0}var r=t.schema.marks,o=u.altStyle,i=u.altMarks,a=void 0===i?[]:i,s=u.mark,l=d||t.tr,i=!1,c=!1;o&&r.style&&(i=p(r.style,{style:o.name,value:o.value})(t,n,l));a=[s].concat(a).filter(function(e){return r[e]}).map(function(e){return h.hasMark(t,{mark:e})&&r[e]}).filter(function(e){return e});return a.length?h.removeMarks(a,t,n,l):i||h.toggleMark(r[s],f,l)(t,n),c&&e(l),c}},t.applyInlineStyle=function(c,u){return function(e,t){var n=e.schema.marks.style,r={style:c.style,value:/^.+$/,newValue:c.value},o=e.tr;u&&o.setMeta("commandName",u),o.setMeta("args",c);var i=e.selection,a=i.empty,s=i.$cursor,i=i.ranges;if(a&&!s||!n||!h.markApplies(e.doc,i,n))return!1;if(s){var a=e.storedMarks||s.marks(),i=n.isInSet(a)?a.find(function(e){return"style"===e.type.name}):null,s={style:null};i&&i.attrs.style?(a=g.changeStylesString(i.attrs.style,r)).changed&&a.style&&(s.style=a.style):r.newValue&&(s.style=[r.style]+": "+r.newValue+";");var l=i?y.__assign({},i.attrs,s):s;return Object.keys(l).some(function(e){return null!==l[e]})?t(o.addStoredMark(n.create(l))):t(o.removeStoredMark(n)),!0}return p(n,r)(e,t,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rowTypeAttr="k-parent-node",t.colgroupAttr="k-colgroup-data"},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});function n(e,t){var n=(e.ownerDocument||document).createElement(t);Array.from(e.rows).filter(function(e){return e.getAttribute(s.rowTypeAttr)===t}).forEach(function(e){e.removeAttribute(s.rowTypeAttr),n.appendChild(e)}),n.children.length&&e.appendChild(n)}function r(e,n){var t=n.toUpperCase();e.filter(function(e){return e.nodeName===t}).forEach(function(t){Array.from(t.children).forEach(function(e){e.setAttribute(s.rowTypeAttr,n),t.parentNode&&t.parentNode.insertBefore(e,t)}),t.remove()})}var o=t(3),a=t(0),s=t(12),l=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"];i.trimWhitespace=function(e,t){t=(t=void 0===t?l:t).join("|");return e.replace(new RegExp("\\s*(<(?:"+t+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+t+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},i.htmlToFragment=function(e){var t=document.createElement("template");if("content"in t)t.innerHTML=e,n=t.content;else for(var e=(new DOMParser).parseFromString(e,"text/html"),n=document.createDocumentFragment(),r=e.body;r&&r.firstChild;)n.appendChild(r.firstChild);return n},i.pmDocToFragment=function(e){e=o.DOMSerializer.fromSchema(e.type.schema).serializeFragment(e.content);return Array.from(e.querySelectorAll("table")).forEach(function(e){n(e,"thead"),n(e,"tbody"),n(e,"tfoot");e=Array.from(e.children).find(function(e){return 0===e.children.length});e&&e.remove()}),e},i.domToPmDoc=function(e,t,n){return o.DOMParser.fromSchema(t).parse(e,n)},i.parseContent=function(e,t,n){e=i.htmlToFragment(e);return Array.from(e.querySelectorAll("table")).forEach(function(e){var t=Array.from(e.children);t.some(function(e){return"THEAD"===e.nodeName||"TFOOT"===e.nodeName})&&(r(t,"thead"),r(t,"tbody"),r(t,"tfoot"));t=t.find(function(e){return"COLGROUP"===e.nodeName});t&&(e.setAttribute(s.colgroupAttr,t.outerHTML),t.remove())}),i.domToPmDoc(e,t,n)},i.getHtml=function(e){var t=i.pmDocToFragment(e.doc),e=document.createElement("div");return e.appendChild(t),e.innerHTML},i.setHtml=function(n,r,o){return void 0===r&&(r="setHTML"),void 0===o&&(o={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new a.AllSelection(e.doc)).replaceSelectionWith(i.parseContent(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function h(e){return/^MsoListParagraph/.test(e.className)}function v(e){return(e=(e=e.innerHTML).replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function y(e,t){return(e=document.createElement(e)).style.listStyleType=t,e}function o(e,n){var r=[];Array.from(e).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&((t=e).getAttribute("datalist")?(r.push(e),n.add(r)):h(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?o(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){o(e.children,n)})))})}function k(e){function t(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")}var n,r=(r=e.innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," ");return/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(n=t(v(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(n)?null:/^o/.test(n)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:(r=t(v(e)),e=null,e=/^\d/.test(r)?e:(/^[a-z]/.test(r)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(r)?"roman":"alpha"))}:void 0}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});e=new Set;return o(t.children,e),e.forEach(function(e){for(var t,n,r,o,i,a,s,l,c=-1,u={},d=0;d<e.length;d++){var f,p,m=(f={datalist:(a=e[d]).getAttribute("datalist"),datalevel:a.getAttribute("datalevel")}).datalist,g=k(a);(s=g&&g.tag)?(p=f.datalevel||parseFloat(a.style.marginLeft||0),(f.datalevel||a.style.marginLeft)&&(f=s+m,u[p]||(u[p]={}),(!n||n<0)&&(n=p,r=m,o=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],l=y(s,g&&g.style),a.parentNode.insertBefore(l,a),u[c=p][f]=l),i=o===a,l=u[p][f],(c<p||!l)&&(l=y(s,g&&g.style),u[p][f]=l,t.appendChild(l)),t=function(e){var t=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),t=1===e.childNodes.length?e.firstChild.nodeType===Node.TEXT_NODE?v(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==t?"<"+t+">"+e.innerHTML+"</"+t+">":e.innerHTML),e.parentNode.removeChild(e);e=document.createElement("li");return e.innerHTML=t,e}(a),l.appendChild(t),i?n=c=-1:c=p)):!t||i&&!h(a)||(a.style.marginLeft&&(a.style.marginLeft=""),a.style.marginLeft&&(a.style.margin=""),t.appendChild(a))}}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t){e.exports=d},function(e,t){e.exports=u},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(1),d=t(3),f=t(0),p=t(5),m=t(6),g=t(10),i=t(20);function u(d){return function(e,t,n){if(!n)return!1;var r,o,i=(e=n.state).schema.nodes[d.listType],a=e.selection,s=a.$from,l=a.$to,c=s.node(-2),u=s.node(-3),l=(a=e.doc,r=i,0===function(e,t,n){for(var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;t.node(t.depth);for(var r,o=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;s=e.resolve(i.after(a));if(s.start(a)>=e.nodeSize-2)break;i=(s=s.depth!==i.depth?e.resolve(s.pos+2):s).depth?e.resolve(s.start(s.depth)):e.resolve(s.end(s.depth))}return r}(a,s,l).filter(function(e){return e.type!==r}).length);return(c&&c.type===i||u&&u.type===i)&&l?h(d)(e,t):(l||(h(d)(e,t),e=n.state),o=i,m.autoJoin(g.wrapInList(o),function(e,t){return e.type===t.type&&e.type===o})(e,t))}}function h(i){return function(n,e){var r=n.tr,t=n.selection,o=t.$from,t=t.$to;return r.doc.nodesBetween(o.pos,t.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){e=new f.NodeSelection(r.doc.resolve(r.mapping.map(t))),t=e.$from.blockRange(e.$to);if(!t||e.$from.parent.type!==n.schema.nodes[i.listItem])return!1;e=t&&p.liftTarget(t);if(null==e)return!1;r.lift(t,e)}}),e&&e(r),!0}}r.toggleList=function(e,t,n,r,o){var i=r.listType,a=e.selection,s=a.$from.node(a.$from.depth-2),l=a.$to.node(a.$to.depth-2);if(s&&s.type.name===i&&l&&l.type.name===i){var i=n.state.schema.nodes,c={bulletList:i[r.bulletList],orderedList:i[r.orderedList],listItem:i[r.listItem]},i=function(e){for(var t,n=c.bulletList,r=c.orderedList,o=c.listItem,i=e.depth-1;0<i;i--){var a=e.node(i);if(a.type!==n&&a.type!==r||(t=i),a.type!==n&&a.type!==r&&a.type!==o)break}return t}(a.$to),i=function(i,a,e,s,l,c){c=c||i.schema.nodes.listItem;var u=!1;return l.doc.nodesBetween(a,e,function(e,t){if(!u&&e.type===c&&a<t){u=!0;for(var n=s+3;s+2<n;){var r=l.doc.resolve(l.mapping.map(t)),n=r.depth,o=l.doc.resolve(l.mapping.map(t+e.textContent.length)),o=new f.TextSelection(r,o);l=function(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,i=t.$to;return!(e=o.blockRange(i,function(e){return e.childCount&&e.firstChild.type===r}))||e.depth<2||o.node(e.depth-1).type!==r?n:(t=e.end,i=i.end(e.depth),t<i&&(n.step(new p.ReplaceAroundStep(t-1,i,t,i,new d.Slice(d.Fragment.from(r.create(void 0,e.parent.copy())),1,0),1,!0)),e=new d.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(i),e.depth)),n.lift(e,p.liftTarget(e)).scrollIntoView())}(i,o,l,c)}}}),l}(e,a.$to.pos,a.$to.end(i),i,n.state.tr,c.listItem);return(i=function(e,t,n){var r=e.selection,o=r.from,i=r.to,r=e.schema.nodes,a=r.paragraph,s=r.heading,l=[];t.doc.nodesBetween(o,i,function(e,t){e.type!==a&&e.type!==s||l.push({node:e,pos:t})});for(var c=l.length-1;0<=c;c--){var u,d=l[c],f=t.doc.resolve(t.mapping.map(d.pos));0<f.depth&&(u=void 0,u=d.node.textContent&&0<d.node.textContent.length?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1)),(u=f.blockRange(u))&&t.lift(u,function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;0<s;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1}(e.schema,f,n)))}return t}(e,i,r)).setMeta("commandName",o),t(i),!0}return u(r)(e,t,n)},r.toggleUnorderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.bulletList.listType},i.bulletList.types))},r.toggleOrderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.orderedList.listType},i.orderedList.types))},r.splitListItemKeepMarks=function(e){return function(n,r){return g.splitListItem(e)(n,function(e){var t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();t&&e.ensureMarks(t),r(e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);t.blockquote=function(e,t){return r.wrapIn(e.schema.nodes.blockquote)(e,t)},t.liftBlockquote=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=e.schema.nodes.blockquote,n=e.doc,a=-1,r=r.blockRange(o);r&&n.nodesBetween(r.start,r.end,function(e,t,n,r){e.type===i&&(a=t)});o=-1!==a;return t&&o&&t(e.tr.lift(r,n.resolve(a).depth)),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=n(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),n=n(20);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(9);t.pmAddRowAfter=o.addRowAfter,t.pmAddRowBefore=o.addRowBefore;var s=n(12);t.createTable=function(e,t,n){for(var r=e.table,o=e.table_row,i=e.table_cell,a=[],s=0;s<t+1;s++){for(var l=[],c=0;c<n+1;c++)l.push(i.createAndFill());a.push(o.createAndFill(void 0,l))}return r.createAndFill(void 0,a)};function l(e,t){for(var n=e.$head,r=n.depth;0<r;r--){var o=n.node(r);if(o.type.name===t)return{pos:n.before(r),node:o}}return null}t.addRowBefore=function(e,a){return o.addRowBefore(e,a&&function(e){var t=l(e.selection,"table_row"),n=l(e.selection,"table");if(t&&n&&t.node.attrs[s.rowTypeAttr]){for(var r=0,o=0;o<n.node.nodeSize;o++)if(n.node.child(o).eq(t.node)){r=o;break}var i=n.node.child(r-1),i=t.pos-i.nodeSize;e.setNodeMarkup(i,void 0,((i={})[s.rowTypeAttr]=t.node.attrs[s.rowTypeAttr],i))}return a(e)})},t.addRowAfter=function(e,r){return o.addRowAfter(e,r&&function(e){var t,n=l(e.selection,"table_row");return n&&n.node.attrs[s.rowTypeAttr]&&(t=n.pos+n.node.nodeSize,e.setNodeMarkup(t,void 0,((t={})[s.rowTypeAttr]=n.node.attrs[s.rowTypeAttr],t))),r(e)})}},function(e,t){e.exports=f},function(e,t){e.exports=l},function(e,t){e.exports=c},function(e,f,t){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=t(1),m=t(0),l=t(4),g=t(2);f.imageResizeKey=new m.PluginKey("image-resize");var h={southeast:{x:1,y:1},east:{x:1,y:0},south:{x:0,y:1},north:{x:0,y:-1},west:{x:-1,y:0},southwest:{x:-1,y:1},northwest:{x:-1,y:-1},northeast:{x:1,y:-1}},c=Object.keys(h),v=function(e,t,n){e.style[t]=n+"px"},y=/[^\-]width:|[^\-]height:/,k=/^.+$/,n=(r.prototype.apply=function(e){e=e.getMeta(f.imageResizeKey);return e?new r(e.activeHandle,e.setDragging,e.rect,e.nodePosition):this},r);function r(e,t,n,r){this.activeHandle=e,this.dragging=t,this.rect=n,this.nodePosition=r}f.imageResizing=function(s){return void 0===s&&(s={node:"image",lockRatio:!0}),new m.Plugin({key:f.imageResizeKey,view:function(e){return{resize:function(){f.imageResizeKey.getState(e.state).rect&&e.dispatch(e.state.tr.setMeta("resize",!0))},get window(){return e.dom.ownerDocument&&e.dom.ownerDocument.defaultView},attachResize:function(){var e=this.window;e&&(e.removeEventListener("resize",this.resize),e.addEventListener("resize",this.resize))},removeResize:function(){var e=this.window;e&&e.removeEventListener("resize",this.resize)},update:function(e,t){var n=e.state,r=n.selection,o=n.schema.nodes[s.node],i=f.imageResizeKey.getState(n),a=i.rect;r instanceof m.NodeSelection&&o===r.node.type?(o={top:(o=e.nodeDOM(r.from)).offsetTop,left:o.offsetLeft,width:o.offsetWidth,height:o.offsetHeight},t.selection.eq(r)&&(!a||a.width===o.width&&a.height===o.height&&a.top===o.top&&a.left===o.left)||((n=n.tr).setMeta(f.imageResizeKey,{rect:o,nodePosition:r.from}),e.dispatch(n),this.attachResize())):a&&(i.rect=null,i.nodePosition=-1)},destroy:function(){this.removeResize()}}},state:{init:function(){return new n("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(e,t){return function(u,e,c){var t=e.target.getAttribute("data-direction");if(!t)return!1;var n=f.imageResizeKey.getState(u.state);e.preventDefault();var r=u.state.tr;function d(e){var t,n,r,o,i,a,s,l;t=u,n=e,r=c,o=f.imageResizeKey.getState(t.state),i=o.rect,a=o.dragging,s=o.nodePosition,l=o.activeHandle,a&&i&&(e=t.nodeDOM(s),o=h[l],t=(n.clientX-a.startX)*o.x,s=(n.clientY-a.startY)*o.y,l=o.x?t+e.width:i.width,t=o.y?s+e.height:i.height,r.lockRatio&&o.x&&o.y?(s=Math.min(l/e.width,t/e.height),r=e.width*s,s=e.height*s,a.startX=n.clientX-(l-r)*o.x,a.startY=n.clientY-(t-s)*o.y,l=r,t=s):(a.startX=o.x?n.clientX:a.startX,a.startY=o.y?n.clientY:a.startY),v(e,"width",l),v(e,"height",t),i.top=e.offsetTop,i.left=e.offsetLeft,i.width=e.offsetWidth,i.height=e.offsetHeight,(e=e.nextElementSibling).style.width=i.width+"px",e.style.height=i.height+"px",e.style.top=i.top+"px",e.style.left=i.left+"px")}return r.setMeta(f.imageResizeKey,{setDragging:{startX:e.clientX,startY:e.clientY},activeHandle:t,rect:n.rect,nodePosition:n.nodePosition}),r.setMeta("addToHistory",!1),u.dispatch(r),e.view.addEventListener("mouseup",function e(t){var n,r,o,i,a,s,l,c;t.view.removeEventListener("mouseup",e),t.view.removeEventListener("mousemove",d),n=u,a=f.imageResizeKey.getState(n.state),s=a.rect,l=a.dragging,c=a.nodePosition,l&&s&&((i=n.state.selection)instanceof m.NodeSelection&&(r=i.node.attrs,o=s.width,t=s.height,a=void 0,a=y.test(r.style||"")?(l=g.changeStylesString(r.style,{style:"width",value:k,newValue:o+"px"}),l=g.changeStylesString(l.style||"",{style:"height",value:k,newValue:t+"px"}).style,p.__assign({},r,{style:l})):p.__assign({},r,{width:o,height:t}),(t=i.node.type.createAndFill(a))&&((i=n.state.tr).replaceWith(c,c+1,t),i.setSelection(m.NodeSelection.create(i.doc,c)),i.setMeta("commandName","image-resize"),i.setMeta("args",a),i.setMeta(f.imageResizeKey,{setDragging:null,activeHandle:null,rect:s,nodePosition:c}),n.dispatch(i))))}),e.view.addEventListener("mousemove",d),!0}(e,t,s)}},decorations:function(e){var t=e.selection,n=e.schema.nodes[s.node],r=f.imageResizeKey.getState(e).rect;if(r&&t instanceof m.NodeSelection&&n===t.node.type){var o=document.createElement("div");o.className="k-editor-resize-handles-wrapper",o.style.width=r.width+"px",o.style.height=r.height+"px",o.style.top=r.top+"px",o.style.left=r.left+"px";for(var i=0;i<c.length;i++){var a=document.createElement("div");a.className="k-editor-resize-handle "+c[i],a.setAttribute("data-direction",c[i]),o.appendChild(a)}return l.DecorationSet.create(e.doc,[l.Decoration.widget(e.selection.from+1,o)])}return l.DecorationSet.empty}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(4);t.textHighlightKey=new r.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new r.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map(function(e){return o.Decoration.inline(e.from,e.to,e.attrs)});return o.DecorationSet.create(e.doc,t)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),l=n(4),c=/\s+/g,u=/text-align/;t.spacesFix=function(){return new r.Plugin({key:new r.PluginKey("spaces-fix"),props:{decorations:function(e){var r,o,i,a,s=[],e=e.doc;return e.nodesBetween(0,e.content.size,function(e,t,n){if(e.type.isText&&u.test(n&&n.attrs&&n.attrs.style||""))for(o=c.exec(e.text||"");null!==o;){if(r=t+o.index,i=o[0].length,o.index+i<o.input.length)for(a=0;a<=i-1;a+=2)s.push(l.Decoration.inline(r+a,r+a+1,{style:"white-space: normal"}));o=c.exec(e.text||"")}}),l.DecorationSet.create(e,s)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(4);t.placeholder=function(e){var r={class:"k-placeholder","data-placeholder":e};return new o.Plugin({key:new o.PluginKey("placeholder"),props:{decorations:function(e){var t=e.doc,e=t.content.firstChild;if(!(0===t.childCount||1===t.childCount&&e.inlineContent&&0===e.childCount))return i.DecorationSet.empty;var n=[];return t.descendants(function(e,t){n.push(i.Decoration.node(t,t+e.nodeSize,r))}),i.DecorationSet.create(t,n)}}})}},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var l=t(1),k=t(0);s.findAt=function(i,e,a,s,l){var c,u,d,f,p,m,g=[],h=[],t=e.matchCase,v=e.matchWord,n=e.useRegExp,e=e.text;if(!(e=n&&(/^\\$/.test(e)||/[^\\]\\$/.test(e))?e.substring(0,e.length-1):e))return g;var t=t?"g":"gi",y=n?new RegExp(e,t):o(e,t);return i.nodesBetween(a,s,function(e,o,t){return!l(g)&&void(e.inlineContent&&o+e.content.size>=a&&(h.length=0,e.nodesBetween(0,e.content.size,function(e,t,n,r){if(l(g))return!1;t=1+o+t;if(e.isText&&t+e.nodeSize>=a){if(p=e.text||"",m=n.childCount-1>=r+1&&n.child(r+1),h.push(a<=t?{text:p,start:t}:{text:p.slice(a-t),start:a}),!m||!m.isText)for(u=h.map(function(e){return e.text}).join(""),c=y.exec(u);null!==c&&(d=h[0].start+c.index,f=d+c[0].length,a<=d&&f<=s&&b(c,v)&&g.push(k.TextSelection.create(i,d,f)),!l(g));)c=y.exec(u)}else h.length=0})))}),g},s.find=function(e,t){var n=t.backward,r=t.matchCyclic,o=l.__rest(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return 0<e.length},a=e.doc,t=e.selection,e=[];return n?!(e=s.findAt(a,o,0,t.from,i)).length&&r&&(e=s.findAt(a,o,t.from,a.content.size,i)):!(e=s.findAt(a,o,t.to,a.content.size,i)).length&&r&&(e=s.findAt(a,o,0,t.to,i)),e.length?e[e.length-1]:null},s.findAll=function(e,t){return s.findAt(e,t,0,e.content.size,function(){return!1})},s.replace=function(e,t,n){var r=e.from,e=e.to;return n.insertText(t,r,e).setSelection(k.TextSelection.create(n.doc,r,r+t.length)),n},s.replaceAll=function(e,t,n){var r=s.findAll(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;0<=i;i--)o.insertText(t,r[i].from,r[i].to);return o};var r=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,b=function(e,t){if(t){if(!0!==t)return t(e);var n=e.input,t=n.charAt(e.index-1),e=n.charAt(e.index+e[0].length);return r.test(t)&&r.test(e)}return!0},o=function(e,t){e=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(e,t)}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(14);a.sanitize=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},a.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},a.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},a.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},a.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&a.removeAttribute(e)};var s=/\s*;\s*/,l=/\s*:\s*/;a.sanitizeStyleAttr=function(e){var t,n,r=e.value.split(s).filter(function(e){return Boolean(e)}),o=e.ownerElement.style,i="";r.forEach(function(e){e=e.split(l);t=e[0],n=e[1],void 0!==o[t]&&(i+=t+": "+n+"; ")}),(i=i.trim())?e.value=i:a.removeAttribute(e)},a.pasteCleanup=function(e,t){var n=e;return t.convertMsLists&&(n=r.convertMsLists(n)),t.stripTags&&(n=a.removeTag(n,t.stripTags)),t.attributes&&((e=document.createElement("div")).innerHTML=n,Array.from(e.querySelectorAll("*")).forEach(function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;0<=n;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)}),n=e.innerHTML),n};var c=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,u=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,d=new RegExp("(?:("+u.source+"))([\\da-fA-F\\s]+)\\}","g"),f=/[^\da-fA-F]/g,p=/file:\/[^'"]+\.(jpg|png|gif)/i,m=/\\(png|jpeg)blip\\/;a.replaceImageSourcesFromRtf=function(e,t){var n=e.match(c);if(!n||-1===t.types.indexOf("text/rtf"))return e;var r=t.getData("text/rtf"),o=[],t=r.match(d);if(!r||!t)return e;for(var i=0,a=t;i<a.length;i++){var s=a[i],l=m.exec(s);l&&(s=s.replace(u,"").replace(f,""),o.push("data:image/"+l[1]+";base64,"+function(e){for(var t=e.length,n=new Array(t/2),r=0;r<t;r+=2)n[r]=String.fromCharCode(parseInt(e.substring(r,r+2),16));return btoa(n.join(""))}(s)))}return n.length!==o.length?e:e.replace(c,function(e){var t=o.shift()||"";return e.replace(p,t)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(6),a=n(17),s=n(16),r=n(18),l=n(15),c=n(11),u=n(2),d="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e,t){var n,r={},t=t&&t.applyToWord||!1;return r["Mod-z"]=a.undo,r["Shift-Mod-z"]=a.redo,r.Backspace=i.chainCommands(s.undoInputRule,i.deleteSelection,i.joinBackward,i.selectNodeBackward),r.Enter=i.chainCommands(i.newlineInCode,i.createParagraphNear,i.liftEmptyBlock,i.splitBlockKeepMarks),d||(r["Mod-y"]=a.redo),e.marks.strong&&(r["Mod-b"]=u.expandToWordWrap(c.toggleInlineFormat,o.__assign({},l.bold,{applyToWord:t}))),e.marks.em&&(r["Mod-i"]=u.expandToWordWrap(c.toggleInlineFormat,o.__assign({},l.italic,{applyToWord:t}))),e.marks.u&&(r["Mod-u"]=u.expandToWordWrap(c.toggleInlineFormat,o.__assign({},l.underline,{applyToWord:t}))),e.nodes.hard_break&&(n=e.nodes.hard_break,e=i.chainCommands(i.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),r["Shift-Enter"]=e),r},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=r.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function i(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n}function r(e){var t={};return e.forEach(function(e){t[e]={default:null}}),t}function o(){return r(["style","class","id"])}function a(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function s(e,t){var n,r={};for(n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r}function l(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var c=n(1),u=n(3),d=n(9),f=n(13),p=n(12),m=["blockquote",0],g=["hr"],h=["pre",["code",0]],v=["ol",0],y=["ul",0],k=["li",0],b=c.__assign({link:{attrs:c.__assign({},o(),{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:i}],toDOM:function(e){return["a",s(e.attrs),0]}}},l("strong"),l("b"),l("em"),l("i"),l("u"),l("del"),l("sub"),l("sup"),l("code"),{style:{attrs:c.__assign({},o()),parseDOM:[{tag:"span",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["span",s(e.attrs),0]:["span",0]}}});t.marks=b;function M(n){var e;return(e={})[n]={default:null,getFromDOM:function(e){return e.getAttribute(n)},setDOMAttr:function(e,t){t[n]=e}},e}var n=c.__assign({},M("style"),M("class"),M("id"),M("headers")),b={doc:{content:"colgroup*"},col:{attrs:r(["id","class","style","span"]),parseDOM:[{getAttrs:i,tag:"col"}],toDOM:function(e){return["col",e.attrs]}},colgroup:{attrs:r(["id","class","style","span"]),content:"col*",parseDOM:[{getAttrs:i,tag:"colgroup"}],toDOM:function(e){return["colgroup",e.attrs,0]}},text:{inline:!0,group:"inline"}},x=new u.Schema({nodes:b,marks:{}}),n=d.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:n});n.table_row.attrs=c.__assign({},n.table_row.attrs,r([p.rowTypeAttr,"style","class","id"])),n.table_row.toDOM=function(e){return["tr",s(e.attrs),0]},n.table_row.parseDOM=[{tag:"tr",getAttrs:i}],n.table.attrs=c.__assign({},n.table.attrs,r(["style","class","id",p.colgroupAttr])),n.table.toDOM=function(r){var e,t,n=a(r.attrs)?s(r.attrs,p.colgroupAttr):{},o=null;return r.attrs[p.colgroupAttr]&&!function(){for(var e=!1,t=r.child(0),n=0;n<t.childCount;n++)if(t.child(n).attrs.colwidth){e=!0;break}return e}()&&(t=f.domToPmDoc(f.htmlToFragment(r.attrs[p.colgroupAttr]),x,{preserveWhitespace:!1}),(e=f.pmDocToFragment(t).firstChild)&&(t=Array.from(e.children).map(function(e){return["col",i(e)]}),o=["colgroup",i(e)].concat(t))),o?["table",n,o,["tbody",0]]:["table",n,["tbody",0]]},n.table.parseDOM=[{tag:"table",getAttrs:function(e){var t=i(e),e=Array.from(e.childNodes).find(function(e){return"COLGROUP"===e.nodeName});return e&&(t[p.colgroupAttr]=e.outerHTML),t}}];n=c.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:c.__assign({},o()),parseDOM:[{tag:"p",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["p",s(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:c.__assign({},o()),parseDOM:[{tag:"div",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["div",s(e.attrs),0]:["div",0]}},blockquote:{attrs:c.__assign({},o()),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["blockquote",s(e.attrs),0]:m}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return g}},heading:{attrs:c.__assign({},o(),{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return c.__assign({},i(e),{level:1})}},{tag:"h2",getAttrs:function(e){return c.__assign({},i(e),{level:2})}},{tag:"h3",getAttrs:function(e){return c.__assign({},i(e),{level:3})}},{tag:"h4",getAttrs:function(e){return c.__assign({},i(e),{level:4})}},{tag:"h5",getAttrs:function(e){return c.__assign({},i(e),{level:5})}},{tag:"h6",getAttrs:function(e){return c.__assign({},i(e),{level:6})}}],toDOM:function(e){return a(e.attrs,"level")?["h"+e.attrs.level,s(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return h}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:c.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},o()),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["img",s(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:c.__assign({},o()),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["br",s(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:c.__assign({},o(),{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return c.__assign({},i(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?a(e.attrs,"order")?["ol",s(e.attrs,"order"),0]:v:["ol",c.__assign({},s(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:c.__assign({},o()),parseDOM:[{tag:"ul",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["ul",s(e.attrs),0]:y}},list_item:{content:"(paragraph | heading) block*",attrs:c.__assign({},o()),parseDOM:[{tag:"li",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["li",s(e.attrs),0]:k},defining:!0}},n);t.nodes=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){return{name:e,value:t}}t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]}]},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=t(10),s=t(21),l=t(7),o=t(2),c=t(19);i.indentBlocks=function(a,r,s){return function(e,t){var n=l.blockNodes(e),i=e.tr;i.setMeta("commandName",r),n.forEach(function(t){var e,n,r,o;t.type.isTextblock&&(e=void 0,(n=a.find(function(e){return e.node===t.type.name}))&&(r={name:o="rtl"===s?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(o=new RegExp(o+":\\s?(\\d+)"+n.unit,"i"),(o=t.attrs.style.match(o))&&(o=(o=parseFloat(o[1])+n.step)<=0?"":o,r.value=""+o+(o?n.unit:""))),e=l.addStyles(t,[r])),e&&l.changeTextBlock(i,t,t.type,e))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},i.isIndented=function(e,r,o){var i=!1;return l.blockNodes(e).forEach(function(t){var e,n;i||!t.type.isTextblock||!t.attrs.style||(n=r.find(function(e){return e.node===t.type.name}))&&(e="rtl"===o?n.rtlStyle:n.style,n=new RegExp(e+":\\s?\\d+"+n.unit,"i"),i=n.test(t.attrs.style))}),i},i.canIndentAsListItem=function(e,t){return a.sinkListItem(t)(e)},i.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],t=e.schema.nodes[t.listsTypes.bulletList],r=!!o.findNthParentNodeOfType(r,2)(e.selection),t=!!o.findNthParentNodeOfType(t,2)(e.selection);return(r||t)&&a.liftListItem(n)(e)},i.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[s.indentRules.listsTypes.listItem];return(i.isIndented(t,e.nodes)||s.indentRules.nodes.some(function(e){return n[e.node]&&l.hasNode(t,n[e.node])}))&&!l.hasNode(t,r)},i.indent=function(e,t){var n=e.schema.nodes[s.indentRules.listsTypes.listItem],r=i.canBeIndented(e,s.indentRules);i.canIndentAsListItem(e,n)?a.sinkListItem(n)(e,t):r&&i.indentBlocks(s.indentRules.nodes)(e,t)},i.outdent=function(e,t){var n=e.schema.nodes,r=n[s.outdentRules.listsTypes.listItem],o=i.canBeIndented(e,s.outdentRules);l.hasNode(e,n.blockquote)?c.liftBlockquote(e,t):i.canOutdentAsListItem(e,s.outdentRules)?a.liftListItem(r)(e,t):o&&i.indentBlocks(s.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=n(8);t.cleanFormatting=function(i){return void 0===i&&(i={blocksInSelection:!0}),function(e,t){var n=e.tr,r=i.blocksInSelection,o=i.blockNodeType,e=(i.exceptMarks||[e.schema.marks.link]).filter(Boolean);s.cleanMarks(n,{except:e}),a.cleanTextBlockFormatting(n,{blocksInSelection:r,blockNodeType:o});o=n.docChanged;return o&&t&&t(n),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7);t.alignBlocks=function(o,i){return function(e,t){var n=a.blockNodes(e),r=e.tr;r.setMeta("commandName",i),n.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=o.find(function(e){return e.node===t.type.name}))&&(e=a.addStyles(t,n.style)),a.changeTextBlock(r,t,t.type,e))});n=r.docChanged;return n&&t(r.scrollIntoView()),n}},t.isAligned=function(e,n){var r=!1;return a.blockNodes(e).forEach(function(t){var e;r||!t.type.isTextblock||!t.attrs.style||(e=n.find(function(e){return e.node===t.type.name}))&&(r=e.style.every(function(e){return!!e.value&&new RegExp(e.name+":\\s?"+e.value,"i").test(t.attrs.style)}))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);o.insertNode(n)(e,function(e){return t(e.setMeta("commandName","insertImage").setMeta("args",r))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(n){return function(e,t){t(e.tr.insertText(n.text,n.from,n.to))}}},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var g=t(11),h=t(8),d=t(0);u.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,o=n.parent,i=n.index(),a=e.schema.marks[f.mark],s=o.child(i).marks.find(function(e){return e.type===a}),l=o.childCount,c=n.pos-n.textOffset,u=o.child(i).nodeSize,d=void 0,d=i-1;0<=d&&s.isInSet(o.child(d).marks);)u+=r=o.child(d).nodeSize,c-=r,--d;for(d=i+1;d<l&&s.isInSet(o.child(d).marks);)u+=o.child(d).nodeSize,d+=1;t(h.removeMark(p||e.tr,c,c+u,s))}else g.toggleInlineFormat(f,p)(e,t)}},u.applyLink=function(e,s){var l=e.mark,c=e.attrs;return void 0===s&&(s="link"),function(t,e){var n=t.schema.marks,r=t.tr;s&&(r.setMeta("commandName",s),r.setMeta("args",c));function o(){return a=!0}var i,p,m,a=!1;return!function(e){e=h.selectionMarks(t,e);return 1===e.length&&e[0]&&e[0]}(n[l])?(h.hasMark(i=t,{mark:l})&&(u.removeLink({mark:l,attrs:c},r)(t,o),i=d.EditorState.create({doc:r.doc,selection:r.selection})),(a?h.toggleMark(n[l],c,r):g.toggleInlineFormat({mark:l},r,c))(i,o)):(p={mark:l,attrs:c},m=r,function(e,n){var t=e.selection,r=t.$cursor,o=t.from,t=t.to,i=e.schema.marks[p.mark];if(r){for(var a,s=r.parent,e=r.index(),l=s.child(e).marks.find(function(e){return e.type===i}),c=s.childCount,u=r.pos-r.textOffset,d=s.child(e).nodeSize,f=void 0,f=e-1;0<=f&&l.isInSet(s.child(f).marks);)d+=a=s.child(f).nodeSize,u-=a,--f;for(f=e+1;f<c&&l.isInSet(s.child(f).marks);)d+=s.child(f).nodeSize,f+=1;m.removeMark(u,u+d,i),m.addMark(u,u+d,i.create(p.attrs)),n(m)}else m.doc.nodesBetween(o,t,function(e,t){e.isInline&&i.isInSet(e.marks)&&(m.removeMark(t,t+e.nodeSize,i),m.addMark(t,t+e.nodeSize,i.create(p.attrs)),n(m))})}(t,o)),a&&e(r),a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(13);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent,t.trimWhitespace=o.trimWhitespace,t.htmlToFragment=o.htmlToFragment,t.domToPmDoc=o.domToPmDoc,t.pmDocToFragment=o.pmDocToFragment;o=n(11);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;o=n(40);t.applyLink=o.applyLink,t.removeLink=o.removeLink;o=n(39);t.insertText=o.insertText;o=n(38);t.insertImage=o.insertImage;o=n(37);t.alignBlocks=o.alignBlocks,t.isAligned=o.isAligned;o=n(36);t.cleanFormatting=o.cleanFormatting;o=n(7);t.hasNode=o.hasNode,t.activeNode=o.activeNode,t.formatBlockElements=o.formatBlockElements,t.getBlockFormats=o.getBlockFormats,t.parentBlockFormat=o.parentBlockFormat,t.changeTextBlock=o.changeTextBlock,t.blockNodes=o.blockNodes,t.cleanTextBlockFormatting=o.cleanTextBlockFormatting;o=n(8);t.hasMark=o.hasMark,t.getMark=o.getMark,t.getActiveMarks=o.getActiveMarks,t.removeAllMarks=o.removeAllMarks,t.cleanMarks=o.cleanMarks,t.selectionMarks=o.selectionMarks;o=n(35);t.indent=o.indent,t.canIndentAsListItem=o.canIndentAsListItem,t.outdent=o.outdent,t.canOutdentAsListItem=o.canOutdentAsListItem,t.isIndented=o.isIndented,t.canBeIndented=o.canBeIndented,t.indentBlocks=o.indentBlocks;o=n(18);t.toggleOrderedList=o.toggleOrderedList,t.toggleUnorderedList=o.toggleUnorderedList,t.toggleList=o.toggleList;o=n(19);t.blockquote=o.blockquote,t.liftBlockquote=o.liftBlockquote;o=n(2);t.hasSameMarkup=o.hasSameMarkup,t.getSelectionText=o.getSelectionText,t.getNodeFromSelection=o.getNodeFromSelection,t.selectedLineTextOnly=o.selectedLineTextOnly,t.expandSelection=o.expandSelection,t.expandToWordWrap=o.expandToWordWrap,t.canInsert=o.canInsert,t.insertNode=o.insertNode,t.indentHtml=o.indentHtml;o=n(34);t.alignLeftRules=o.alignLeftRules,t.alignCenterRules=o.alignCenterRules,t.alignRightRules=o.alignRightRules,t.alignJustifyRules=o.alignJustifyRules,t.alignRemoveRules=o.alignRemoveRules;o=n(21);t.indentRules=o.indentRules,t.outdentRules=o.outdentRules;o=n(33);t.nodes=o.nodes,t.marks=o.marks;o=n(32);t.buildKeymap=o.buildKeymap,t.buildListKeymap=o.buildListKeymap;o=n(15);t.bold=o.bold,t.italic=o.italic,t.underline=o.underline,t.strikethrough=o.strikethrough,t.subscript=o.subscript,t.superscript=o.superscript,t.link=o.link;o=n(31);t.sanitize=o.sanitize,t.removeComments=o.removeComments,t.removeTag=o.removeTag,t.pasteCleanup=o.pasteCleanup,t.sanitizeClassAttr=o.sanitizeClassAttr,t.sanitizeStyleAttr=o.sanitizeStyleAttr,t.removeAttribute=o.removeAttribute,t.replaceImageSourcesFromRtf=o.replaceImageSourcesFromRtf;o=n(14);t.convertMsLists=o.convertMsLists;o=n(30);t.find=o.find,t.findAt=o.findAt,t.findAll=o.findAll,t.replace=o.replace,t.replaceAll=o.replaceAll;o=n(29);t.placeholder=o.placeholder;o=n(28);t.spacesFix=o.spacesFix;o=n(27);t.textHighlight=o.textHighlight,t.textHighlightKey=o.textHighlightKey;o=n(26);t.imageResizing=o.imageResizing,t.imageResizeKey=o.imageResizeKey,r.__exportStar(n(6),t),r.__exportStar(n(25),t),r.__exportStar(n(24),t),r.__exportStar(n(17),t),r.__exportStar(n(16),t),r.__exportStar(n(23),t),r.__exportStar(n(3),t),r.__exportStar(n(10),t),r.__exportStar(n(0),t),r.__exportStar(n(9),t),r.__exportStar(n(5),t),r.__exportStar(n(4),t);n=n(22);t.createTable=n.createTable,t.addRowAfter=n.addRowAfter,t.addRowBefore=n.addRowBefore,t.pmAddRowAfter=n.pmAddRowAfter,t.pmAddRowBefore=n.pmAddRowBefore,function(e){for(var t in e)i(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=41)}}});
1
+ System.register("@progress/kendo-editor-common",["tslib","prosemirror-dropcursor","prosemirror-commands","prosemirror-gapcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-schema-list","prosemirror-model","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view"],function(i){var a,s,l,c,u,d,f,p,m,g,h,v,y;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){c=t(e)},function(e){u=t(e)},function(e){d=t(e)},function(e){f=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){h=t(e)},function(e){v=t(e)},function(e){y=t(e)}],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t){e.exports=g},function(e,t){e.exports=a},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var o=t(3),m=t(0),i=t(13);l.changeStylesString=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};t=e.split(/\s*;\s*/).filter(function(e){return Boolean(e)}),e=t.filter(function(e){e=e.split(/\s*:\s*/);return!(e[0].toLowerCase()===n&&r.test(e[1]))});return o&&e.push(n+": "+o),{style:e.join("; ")+(e.length?";":""),changed:Boolean(o)||e.length!==t.length}},l.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1};function a(e){return(e instanceof o.Node?e.type:e).name}l.findNthParentNodeOfType=function(i,t){return void 0===t&&(t=1),function(e){return o=void 0===t?1:t,function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r)===a(i)&&0==--o)return{depth:n,node:r}}}(e);var o}},l.insertNode=function(n,r){return function(e,t){e=e.tr.replaceSelectionWith(n);r&&e.scrollIntoView(),t(e)}},l.hasSameMarkup=function(e,t,n,r){e=o.Fragment.from(i.parseContent(e,n,r)),r=o.Fragment.from(i.parseContent(t,n,r));return e.eq(r)},l.getSelectionText=function(e){e=e.selection;if(e instanceof m.TextSelection||e instanceof m.AllSelection){e=e.content().content;return e.textBetween(0,e.size)}return""},l.getNodeFromSelection=function(e){if(e.selection instanceof m.NodeSelection)return e.selection.node},l.selectedLineTextOnly=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,a=r.$to,s=r.from,r=r.to;return i.sameParent(a)&&(o.nodesBetween(s,r,function(e){n=n||e.isLeaf&&!e.isText}),n||(t=l.getSelectionText(e))),t},l.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},l.shallowEqual=function(t,n){var e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(function(e){return t[e]===n[e]})};var g={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i};l.expandSelection=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r,o=!0===n.applyToWord?g:n.applyToWord,i=e.tr,a=e.selection,s=a.$head.nodeBefore,n=a.$head.nodeAfter;if(s&&"text"===s.type.name&&s.text&&n&&"text"===n.type.name&&n.text){var l=[];a.$head.parent.descendants(function(e,t){return l.push({node:e,pos:t}),!1});for(var c=a.$head.parentOffset,s=l.findIndex(function(e){var t=e.node,e=e.pos;return e<=c&&e+t.nodeSize>=c}),u=l[s].node.text,d=!1,f=s-1;0<=f;f--){var p=l[f];!d&&p&&"text"===p.node.type.name?u=p.node.text+u:(d=!0,c-=p.node.nodeSize)}for(f=s+1;f<l.length&&((p=l[f])&&"text"===p.node.type.name);f++)u+=p.node.text;n=u.substring(0,c),s=u.substring(c),n=o.before.exec(n),s=o.after.exec(s);if(n&&s){n=n[0].length,s=s[0].length;r=a.from;return i.setSelection(m.TextSelection.create(e.doc,r-n,r+s)),{state:{tr:i,selection:i.selection,doc:i.doc,storedMarks:null,schema:i.doc.type.schema},dispatch:function(e){e.setSelection(m.TextSelection.create(e.doc,r)),t(e)}}}}return{state:e,dispatch:t}},l.expandToWordWrap=function(r,o){return function(e,t,n){e=l.expandSelection(e,t,o),t=e.state,e=e.dispatch;return r(o)(t,e)}}},function(e,t){e.exports=m},function(e,t){e.exports=y},function(e,t){e.exports=v},function(e,t){e.exports=l},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var l=t(1),o=t(2),c=t(5),u=t(3),i=t(0);s.changeTextBlock=function(i,a,s,l){if(!s.isTextblock)return!1;i.selection.ranges.forEach(function(e){var o=i.steps.length,t=e.$from.pos,e=e.$to.pos;i.doc.nodesBetween(t,e,function(e,t){if(e.eq(a)&&e.isTextblock&&!e.hasMarkup(s,l)&&function(e,t,n){e=e.resolve(t),t=e.index();return e.parent.canReplaceWith(t,t+1,n)}(i.doc,i.mapping.slice(o).map(t),s)){i.clearIncompatible(i.mapping.slice(o).map(t,1),s);var n=i.mapping.slice(o),r=n.map(t,1),t=n.map(t+e.nodeSize,1),e=new u.Slice(u.Fragment.from(s.create(l,null,e.marks)),0,0);return i.step(new c.ReplaceAroundStep(r,t,r+1,t-1,e,1,!0)),!1}})})},s.blockNodes=function(e,t){var n=e.doc,r=e.selection,o=r.$from,e=r.ranges,a=(t=void 0===t?{blocksInSelection:!1}:t).blocksInSelection,s=[],r=r instanceof i.NodeSelection?r.node:void 0;return r?r.isBlock?(s.push(r),r.nodesBetween(0,r.content.size,function(e){e.isBlock&&s.push(e)})):!a&&o.parent&&o.parent.isBlock&&s.push(o.parent):e.forEach(function(e){var o=e.$from.pos,i=e.$to.pos;n.nodesBetween(o,i,function(e,t,n,r){e.isBlock&&(!a||o<=t&&t+e.content.size+2<=i)&&s.push(e)})}),s},s.formatBlockElements=function(a,r){return function(e,t){var n=s.blockNodes(e),o=e.schema.nodes,i=e.tr;i.setMeta("commandName",r),i.setMeta("args",{value:a}),n.forEach(function(e){var t,n,r;e.type.isTextblock&&("p"===a?(n=(t=e.attrs).level,r=l.__rest(t,["level"]),s.changeTextBlock(i,e,o.paragraph,r)):/^h[1-6]$/i.test(a)?(n=parseInt(a.substr(1),10),s.changeTextBlock(i,e,o.heading,l.__assign({},e.attrs,{level:n}))):"blockquote"===a&&(n=(t=e.attrs).level,r=l.__rest(t,["level"]),s.changeTextBlock(i,e,o.blockquote,r)))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},s.cleanTextBlockFormatting=function(i,e){var t=i.doc,n=i.selection,r=(e=void 0===e?{blocksInSelection:!0}:e).blocksInSelection,a=e.blockNodeType;s.blockNodes({doc:t,selection:n},{blocksInSelection:r}).filter(function(e){return e.isTextblock}).forEach(function(e){var t=e.attrs||{},n=t.style,r=void 0===n?"":n,o=t.class,n=void 0===o?"":o,o=l.__rest(t,["style","class"]),t=a||e.type;(r||n||t!==e.type)&&s.changeTextBlock(i,e,t,o)})},s.getBlockFormats=function(e){var t=s.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&r.push("blockquote")}),r},s.addStyles=function(e,t){var n,r=e.attrs.style;return r&&t.forEach(function(e){n={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStylesString(r,n),r=n.changed?n.style:r}),r=r||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:r||null})},s.hasNode=function(e,t){var n=e.selection,r=n.from,n=n.to,o=!1;return e.doc.nodesBetween(r,n,function(e){return!(o=o||e.type===t)}),o},s.parentBlockFormat=function(e){e=s.getBlockFormats(e);return 1===new Set(e).size?e[0]:null},s.activeNode=function(e){return{tag:s.parentBlockFormat(e)||""}}},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(5),h=t(3);g.markApplies=function(r,o,i){for(var e=0;e<o.length;e++){var t=function(e){var t=o[e],e=t.$from,t=t.$to,n=0===e.depth&&r.type.allowsMarkType(i);if(r.nodesBetween(e.pos,t.pos,function(e){return!n&&void(n=e.inlineContent&&e.type.allowsMarkType(i))}),n)return{v:!0}}(e);if(t)return t.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,o=n.$cursor,i=n.ranges;if(r&&!o||!g.markApplies(e.doc,i,f))return!1;if(t)if(o)f.isInSet(e.storedMarks||o.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var a=!1,s=0;!a&&s<i.length;s++)var l=i[s],c=l.$from,u=l.$to,a=e.doc.rangeHasMark(c.pos,u.pos,f);for(s=0;s<i.length;s++){var d=i[s],c=d.$from,u=d.$to;a?m.removeMark(c.pos,u.pos,f):m.addMark(c.pos,u.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,u,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(u,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof h.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var o=Math.min(t+e.nodeSize,d),i=0;i<r.length;i++){for(var a=r[i],s=void 0,l=0;l<p.length;l++){var c=p[l];c.step===m-1&&a.eq(c.style)&&(s=c)}s?(s.to=o,s.step=m):p.push({style:a,from:Math.max(t,u),to:o,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(r,t,n,o){var e=t.selection,i=e.$cursor,a=e.ranges;if(o=o||t.tr,i)r.forEach(function(e){e.isInSet(t.storedMarks||i.marks())&&n(o.removeStoredMark(e))});else{for(var s=0;s<a.length;s++)!function(e){var e=a[e],t=e.$from,n=e.$to;r.forEach(function(e){g.removeMark(o,t.pos,n.pos,e)})}(s);n(o.scrollIntoView())}return!0},g.removeAllMarks=function(e){var e=(void 0===e?{}:e).except,n=void 0===e?[]:e;return function(e,t){e=e.tr;g.cleanMarks(e,{except:n instanceof Array?n:[n]}),e.docChanged&&t(e)}},g.cleanMarks=function(r,e){var o,t=e.except,n=r.doc,e=r.selection,i=n.type.schema,n=e.empty,e=e.ranges,a=(t||[]).map(function(e){return e.name});n||(o=Object.keys(i.marks).map(function(e){return i.marks[e]}).filter(function(e){return-1===a.indexOf(e.name)}),e.forEach(function(e){var t=e.$from,n=e.$to;o.forEach(function(e){return r.removeMark(t.pos,n.pos,e)})}))},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),i=t.altStyle,a=e.selection,s=a.from,l=a.$from,c=a.to,u=a.empty,a=r[t.mark],d=e.doc,t=!1;return!(t=u?(n=e.storedMarks||l.marks(),a&&a.isInSet(n)||o.some(function(e){return r[e].isInSet(n)})):a&&d.rangeHasMark(s,c,a)||o.some(function(e){return d.rangeHasMark(s,c,r[e])}))&&i&&r.style?g.selectionMarks(e,r.style).some(function(e){return null!==g.styleValue(e,i)}):Boolean(t)},g.styleValue=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter(function(e){return Boolean(e)}),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},g.selectionMarks=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,a=[];return n.empty?a.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,function(e){e.isInline&&a.push(t.isInSet(e.marks))}),a},g.getMark=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return e.length===t.length?e[0]:void 0},g.getActiveMarks=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return{hasNodesWithoutMarks:e.length!==t.length,marks:t}}},function(e,t){e.exports=h},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=n(1),k=n(5),g=n(2),h=n(8),b=function(e,t){e=e.find(function(e){return"style"===e.type.name}),e=e&&e.attrs.style;return g.changeStylesString(e,t)};t.getInlineStyles=function(e,t){var n=e.schema.marks.style;return(n?h.selectionMarks(e,n):[]).map(function(e){return h.styleValue(e,t)}).filter(function(e){return null!==e})};function p(p,m){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,a=r.ranges;if(o&&!i||!h.markApplies(e.doc,a,p))return!1;var s=!1;if(t){var l=n||e.tr;if(i){e=e.storedMarks||i.marks();if(p.isInSet(e)){var i=b(e,m),e=e.find(function(e){return"style"===e.type.name}),c=y.__assign({},e?e.attrs:{},{style:i.style||null});if(g.shallowEqual(e.attrs,c))return!1;t(l.removeStoredMark(p)),Object.keys(c).some(function(e){return null!==c[e]})&&t(l.addStoredMark(p.create(c))),s=!0}}else{for(var u=0;u<a.length;u++)var d=a[u],f=d.$from,d=d.$to,s=function(t,c,u,d,f){var p=f.create({style:d.style}),m=[],g=[],h=null,v=null;return t.doc.nodesBetween(c,u,function(e,t,n){if(e.isInline){var r=e.marks;if(!p.isInSet(r)&&n.type.allowsMarkType(p.type)){var o=Math.max(t,c),i=Math.min(t+e.nodeSize,u),n=b(r,d);if(n.changed||d.newValue){for(var t=n.changed?{style:n.style||null}:{style:[d.style]+": "+d.newValue+";"},e=f.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,a=e?y.__assign({},e.attrs,t):t,n=f.create(a),s=n.addToSet(r),l=0;l<r.length;l++)r[l].isInSet(s)||(h&&h.to===o&&h.mark.eq(r[l])?h.to=i:(h=new k.RemoveMarkStep(o,i,r[l]),m.push(h)));e=v&&v.to===o,t=e&&n.attrs.style===v.mark.attrs.style;e&&t?v.to=i:Object.keys(a).some(function(e){return null!==a[e]})&&(v=new k.AddMarkStep(o,i,n),g.push(v))}}}}),m.forEach(function(e){return t.step(e)}),g.forEach(function(e){return t.step(e)}),0<m.length+g.length}(l,f.pos,d.pos,m,p);s&&(l.scrollIntoView(),t(l))}}return s}}t.toggleInlineFormat=function(u,d,f){return function(t,e){function n(){return c=!0}var r=t.schema.marks,o=u.altStyle,i=u.altMarks,a=void 0===i?[]:i,s=u.mark,l=d||t.tr,i=!1,c=!1;o&&r.style&&(i=p(r.style,{style:o.name,value:o.value})(t,n,l));a=[s].concat(a).filter(function(e){return r[e]}).map(function(e){return h.hasMark(t,{mark:e})&&r[e]}).filter(function(e){return e});return a.length?h.removeMarks(a,t,n,l):i||h.toggleMark(r[s],f,l)(t,n),c&&e(l),c}},t.applyInlineStyle=function(c,u){return function(e,t){var n=e.schema.marks.style,r={style:c.style,value:/^.+$/,newValue:c.value},o=e.tr;u&&o.setMeta("commandName",u),o.setMeta("args",c);var i=e.selection,a=i.empty,s=i.$cursor,i=i.ranges;if(a&&!s||!n||!h.markApplies(e.doc,i,n))return!1;if(s){var a=e.storedMarks||s.marks(),i=n.isInSet(a)?a.find(function(e){return"style"===e.type.name}):null,s={style:null};i&&i.attrs.style?(a=g.changeStylesString(i.attrs.style,r)).changed&&a.style&&(s.style=a.style):r.newValue&&(s.style=[r.style]+": "+r.newValue+";");var l=i?y.__assign({},i.attrs,s):s;return Object.keys(l).some(function(e){return null!==l[e]})?t(o.addStoredMark(n.create(l))):t(o.removeStoredMark(n)),!0}return p(n,r)(e,t,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rowTypeAttr="k-parent-node",t.colgroupAttr="k-colgroup-data"},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});function n(e,t){var n=(e.ownerDocument||document).createElement(t);Array.from(e.rows).filter(function(e){return e.getAttribute(s.rowTypeAttr)===t}).forEach(function(e){e.removeAttribute(s.rowTypeAttr),n.appendChild(e)}),n.children.length&&e.appendChild(n)}function r(e,n){var t=n.toUpperCase();e.filter(function(e){return e.nodeName===t}).forEach(function(t){Array.from(t.children).forEach(function(e){e.setAttribute(s.rowTypeAttr,n),t.parentNode&&t.parentNode.insertBefore(e,t)}),t.remove()})}var o=t(3),a=t(0),s=t(12),l=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"];i.trimWhitespace=function(e,t){t=(t=void 0===t?l:t).join("|");return e.replace(new RegExp("\\s*(<(?:"+t+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+t+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},i.htmlToFragment=function(e){var t=document.createElement("template");if("content"in t)t.innerHTML=e,n=t.content;else for(var e=(new DOMParser).parseFromString(e,"text/html"),n=document.createDocumentFragment(),r=e.body;r&&r.firstChild;)n.appendChild(r.firstChild);return n},i.pmDocToFragment=function(e){e=o.DOMSerializer.fromSchema(e.type.schema).serializeFragment(e.content);return Array.from(e.querySelectorAll("table")).forEach(function(e){n(e,"thead"),n(e,"tbody"),n(e,"tfoot");e=Array.from(e.children).find(function(e){return 0===e.children.length});e&&e.remove()}),e},i.domToPmDoc=function(e,t,n){return o.DOMParser.fromSchema(t).parse(e,n)},i.parseContent=function(e,t,n){e=i.htmlToFragment(e);return Array.from(e.querySelectorAll("table")).forEach(function(e){var t=Array.from(e.children);t.some(function(e){return"THEAD"===e.nodeName||"TFOOT"===e.nodeName})&&(r(t,"thead"),r(t,"tbody"),r(t,"tfoot"));t=t.find(function(e){return"COLGROUP"===e.nodeName});t&&(e.setAttribute(s.colgroupAttr,t.outerHTML),t.remove())}),i.domToPmDoc(e,t,n)},i.getHtml=function(e){var t=i.pmDocToFragment(e.doc),e=document.createElement("div");return e.appendChild(t),e.innerHTML},i.setHtml=function(n,r,o){return void 0===r&&(r="setHTML"),void 0===o&&(o={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new a.AllSelection(e.doc)).replaceSelectionWith(i.parseContent(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function h(e){return/^MsoListParagraph/.test(e.className)}function v(e){return(e=(e=e.innerHTML).replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function y(e,t){return(e=document.createElement(e)).style.listStyleType=t,e}function o(e,n){var r=[];Array.from(e).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&((t=e).getAttribute("datalist")?(r.push(e),n.add(r)):h(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?o(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){o(e.children,n)})))})}function k(e){function t(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")}var n,r=(r=e.innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," ");return/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(n=t(v(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(n)?null:/^o/.test(n)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:(r=t(v(e)),e=null,e=/^\d/.test(r)?e:(/^[a-z]/.test(r)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(r)?"roman":"alpha"))}:void 0}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});e=new Set;return o(t.children,e),e.forEach(function(e){for(var t,n,r,o,i,a,s,l,c=-1,u={},d=0;d<e.length;d++){var f,p,m=(f={datalist:(a=e[d]).getAttribute("datalist"),datalevel:a.getAttribute("datalevel")}).datalist,g=k(a);(s=g&&g.tag)?(p=f.datalevel||parseFloat(a.style.marginLeft||0),(f.datalevel||a.style.marginLeft)&&(f=s+m,u[p]||(u[p]={}),(!n||n<0)&&(n=p,r=m,o=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],l=y(s,g&&g.style),a.parentNode.insertBefore(l,a),u[c=p][f]=l),i=o===a,l=u[p][f],(c<p||!l)&&(l=y(s,g&&g.style),u[p][f]=l,t.appendChild(l)),t=function(e){var t=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),t=1===e.childNodes.length?e.firstChild.nodeType===Node.TEXT_NODE?v(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==t?"<"+t+">"+e.innerHTML+"</"+t+">":e.innerHTML),e.parentNode.removeChild(e);e=document.createElement("li");return e.innerHTML=t,e}(a),l.appendChild(t),i?n=c=-1:c=p)):!t||i&&!h(a)||(a.style.marginLeft&&(a.style.marginLeft=""),a.style.marginLeft&&(a.style.margin=""),t.appendChild(a))}}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t){e.exports=d},function(e,t){e.exports=u},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(1),d=t(3),f=t(0),p=t(5),m=t(6),g=t(10),i=t(20);function u(d){return function(e,t,n){if(!n)return!1;var r,o,i=(e=n.state).schema.nodes[d.listType],a=e.selection,s=a.$from,l=a.$to,c=s.node(-2),u=s.node(-3),l=(a=e.doc,r=i,0===function(e,t,n){for(var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;t.node(t.depth);for(var r,o=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;s=e.resolve(i.after(a));if(s.start(a)>=e.nodeSize-2)break;i=(s=s.depth!==i.depth?e.resolve(s.pos+2):s).depth?e.resolve(s.start(s.depth)):e.resolve(s.end(s.depth))}return r}(a,s,l).filter(function(e){return e.type!==r}).length);return(c&&c.type===i||u&&u.type===i)&&l?h(d)(e,t):(l||(h(d)(e,t),e=n.state),o=i,m.autoJoin(g.wrapInList(o),function(e,t){return e.type===t.type&&e.type===o})(e,t))}}function h(i){return function(n,e){var r=n.tr,t=n.selection,o=t.$from,t=t.$to;return r.doc.nodesBetween(o.pos,t.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){e=new f.NodeSelection(r.doc.resolve(r.mapping.map(t))),t=e.$from.blockRange(e.$to);if(!t||e.$from.parent.type!==n.schema.nodes[i.listItem])return!1;e=t&&p.liftTarget(t);if(null==e)return!1;r.lift(t,e)}}),e&&e(r),!0}}r.toggleList=function(e,t,n,r,o){var i=r.listType,a=e.selection,s=a.$from.node(a.$from.depth-2),l=a.$to.node(a.$to.depth-2);if(s&&s.type.name===i&&l&&l.type.name===i){var i=n.state.schema.nodes,c={bulletList:i[r.bulletList],orderedList:i[r.orderedList],listItem:i[r.listItem]},i=function(e){for(var t,n=c.bulletList,r=c.orderedList,o=c.listItem,i=e.depth-1;0<i;i--){var a=e.node(i);if(a.type!==n&&a.type!==r||(t=i),a.type!==n&&a.type!==r&&a.type!==o)break}return t}(a.$to),i=function(i,a,e,s,l,c){c=c||i.schema.nodes.listItem;var u=!1;return l.doc.nodesBetween(a,e,function(e,t){if(!u&&e.type===c&&a<t){u=!0;for(var n=s+3;s+2<n;){var r=l.doc.resolve(l.mapping.map(t)),n=r.depth,o=l.doc.resolve(l.mapping.map(t+e.textContent.length)),o=new f.TextSelection(r,o);l=function(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,i=t.$to;return!(e=o.blockRange(i,function(e){return e.childCount&&e.firstChild.type===r}))||e.depth<2||o.node(e.depth-1).type!==r?n:(t=e.end,i=i.end(e.depth),t<i&&(n.step(new p.ReplaceAroundStep(t-1,i,t,i,new d.Slice(d.Fragment.from(r.create(void 0,e.parent.copy())),1,0),1,!0)),e=new d.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(i),e.depth)),n.lift(e,p.liftTarget(e)).scrollIntoView())}(i,o,l,c)}}}),l}(e,a.$to.pos,a.$to.end(i),i,n.state.tr,c.listItem);return(i=function(e,t,n){var r=e.selection,o=r.from,i=r.to,r=e.schema.nodes,a=r.paragraph,s=r.heading,l=[];t.doc.nodesBetween(o,i,function(e,t){e.type!==a&&e.type!==s||l.push({node:e,pos:t})});for(var c=l.length-1;0<=c;c--){var u,d=l[c],f=t.doc.resolve(t.mapping.map(d.pos));0<f.depth&&(u=void 0,u=d.node.textContent&&0<d.node.textContent.length?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1)),(u=f.blockRange(u))&&t.lift(u,function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;0<s;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1}(e.schema,f,n)))}return t}(e,i,r)).setMeta("commandName",o),t(i),!0}return u(r)(e,t,n)},r.toggleUnorderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.bulletList.listType},i.bulletList.types))},r.toggleOrderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.orderedList.listType},i.orderedList.types))},r.splitListItemKeepMarks=function(e){return function(n,r){return g.splitListItem(e)(n,function(e){var t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();t&&e.ensureMarks(t),r(e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);t.blockquote=function(e,t){return r.wrapIn(e.schema.nodes.blockquote)(e,t)},t.liftBlockquote=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=e.schema.nodes.blockquote,n=e.doc,a=-1,r=r.blockRange(o);r&&n.nodesBetween(r.start,r.end,function(e,t,n,r){e.type===i&&(a=t)});o=-1!==a;return t&&o&&t(e.tr.lift(r,n.resolve(a).depth)),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=n(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),n=n(20);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(9);t.pmAddRowAfter=o.addRowAfter,t.pmAddRowBefore=o.addRowBefore;var s=n(12);t.createTable=function(e,t,n){for(var r=e.table,o=e.table_row,i=e.table_cell,a=[],s=0;s<t+1;s++){for(var l=[],c=0;c<n+1;c++)l.push(i.createAndFill());a.push(o.createAndFill(void 0,l))}return r.createAndFill(void 0,a)};function l(e,t){for(var n=e.$head,r=n.depth;0<r;r--){var o=n.node(r);if(o.type.name===t)return{pos:n.before(r),node:o}}return null}t.addRowBefore=function(e,a){return o.addRowBefore(e,a&&function(e){var t=l(e.selection,"table_row"),n=l(e.selection,"table");if(t&&n&&t.node.attrs[s.rowTypeAttr]){for(var r=0,o=0;o<n.node.nodeSize;o++)if(n.node.child(o).eq(t.node)){r=o;break}var i=n.node.child(r-1),i=t.pos-i.nodeSize;e.setNodeMarkup(i,void 0,((i={})[s.rowTypeAttr]=t.node.attrs[s.rowTypeAttr],i))}return a(e)})},t.addRowAfter=function(e,r){return o.addRowAfter(e,r&&function(e){var t,n=l(e.selection,"table_row");return n&&n.node.attrs[s.rowTypeAttr]&&(t=n.pos+n.node.nodeSize,e.setNodeMarkup(t,void 0,((t={})[s.rowTypeAttr]=n.node.attrs[s.rowTypeAttr],t))),r(e)})}},function(e,t){e.exports=f},function(e,t){e.exports=c},function(e,t){e.exports=s},function(e,f,t){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=t(1),m=t(0),l=t(4),g=t(2);f.imageResizeKey=new m.PluginKey("image-resize");var h={southeast:{x:1,y:1},east:{x:1,y:0},south:{x:0,y:1},north:{x:0,y:-1},west:{x:-1,y:0},southwest:{x:-1,y:1},northwest:{x:-1,y:-1},northeast:{x:1,y:-1}},c=Object.keys(h),v=function(e,t,n){e.style[t]=n+"px"},y=/[^\-]width:|[^\-]height:/,k=/^.+$/,n=(r.prototype.apply=function(e){e=e.getMeta(f.imageResizeKey);return e?new r(e.activeHandle,e.setDragging,e.rect,e.nodePosition):this},r);function r(e,t,n,r){this.activeHandle=e,this.dragging=t,this.rect=n,this.nodePosition=r}f.imageResizing=function(s){return void 0===s&&(s={node:"image",lockRatio:!0}),new m.Plugin({key:f.imageResizeKey,view:function(e){return{resize:function(){f.imageResizeKey.getState(e.state).rect&&e.dispatch(e.state.tr.setMeta("resize",!0))},get window(){return e.dom.ownerDocument&&e.dom.ownerDocument.defaultView},attachResize:function(){var e=this.window;e&&(e.removeEventListener("resize",this.resize),e.addEventListener("resize",this.resize))},removeResize:function(){var e=this.window;e&&e.removeEventListener("resize",this.resize)},update:function(e,t){var n=e.state,r=n.selection,o=n.schema.nodes[s.node],i=f.imageResizeKey.getState(n),a=i.rect;r instanceof m.NodeSelection&&o===r.node.type?(o={top:(o=e.nodeDOM(r.from)).offsetTop,left:o.offsetLeft,width:o.offsetWidth,height:o.offsetHeight},t.selection.eq(r)&&(!a||a.width===o.width&&a.height===o.height&&a.top===o.top&&a.left===o.left)||((n=n.tr).setMeta(f.imageResizeKey,{rect:o,nodePosition:r.from}),e.dispatch(n),this.attachResize())):a&&(i.rect=null,i.nodePosition=-1)},destroy:function(){this.removeResize()}}},state:{init:function(){return new n("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(e,t){return function(u,e,c){var t=e.target.getAttribute("data-direction");if(!t)return!1;var n=f.imageResizeKey.getState(u.state);e.preventDefault();var r=u.state.tr;function d(e){var t,n,r,o,i,a,s,l;t=u,n=e,r=c,o=f.imageResizeKey.getState(t.state),i=o.rect,a=o.dragging,s=o.nodePosition,l=o.activeHandle,a&&i&&(e=t.nodeDOM(s),o=h[l],t=(n.clientX-a.startX)*o.x,s=(n.clientY-a.startY)*o.y,l=o.x?t+e.width:i.width,t=o.y?s+e.height:i.height,r.lockRatio&&o.x&&o.y?(s=Math.min(l/e.width,t/e.height),r=e.width*s,s=e.height*s,a.startX=n.clientX-(l-r)*o.x,a.startY=n.clientY-(t-s)*o.y,l=r,t=s):(a.startX=o.x?n.clientX:a.startX,a.startY=o.y?n.clientY:a.startY),v(e,"width",l),v(e,"height",t),i.top=e.offsetTop,i.left=e.offsetLeft,i.width=e.offsetWidth,i.height=e.offsetHeight,(e=e.nextElementSibling).style.width=i.width+"px",e.style.height=i.height+"px",e.style.top=i.top+"px",e.style.left=i.left+"px")}return r.setMeta(f.imageResizeKey,{setDragging:{startX:e.clientX,startY:e.clientY},activeHandle:t,rect:n.rect,nodePosition:n.nodePosition}),r.setMeta("addToHistory",!1),u.dispatch(r),e.view.addEventListener("mouseup",function e(t){var n,r,o,i,a,s,l,c;t.view.removeEventListener("mouseup",e),t.view.removeEventListener("mousemove",d),n=u,a=f.imageResizeKey.getState(n.state),s=a.rect,l=a.dragging,c=a.nodePosition,l&&s&&((i=n.state.selection)instanceof m.NodeSelection&&(r=i.node.attrs,o=s.width,t=s.height,a=void 0,a=y.test(r.style||"")?(l=g.changeStylesString(r.style,{style:"width",value:k,newValue:o+"px"}),l=g.changeStylesString(l.style||"",{style:"height",value:k,newValue:t+"px"}).style,p.__assign({},r,{style:l})):p.__assign({},r,{width:o,height:t}),(t=i.node.type.createAndFill(a))&&((i=n.state.tr).replaceWith(c,c+1,t),i.setSelection(m.NodeSelection.create(i.doc,c)),i.setMeta("commandName","image-resize"),i.setMeta("args",a),i.setMeta(f.imageResizeKey,{setDragging:null,activeHandle:null,rect:s,nodePosition:c}),n.dispatch(i))))}),e.view.addEventListener("mousemove",d),!0}(e,t,s)}},decorations:function(e){var t=e.selection,n=e.schema.nodes[s.node],r=f.imageResizeKey.getState(e).rect;if(r&&t instanceof m.NodeSelection&&n===t.node.type){var o=document.createElement("div");o.className="k-editor-resize-handles-wrapper",o.style.width=r.width+"px",o.style.height=r.height+"px",o.style.top=r.top+"px",o.style.left=r.left+"px";for(var i=0;i<c.length;i++){var a=document.createElement("div");a.className="k-editor-resize-handle "+c[i],a.setAttribute("data-direction",c[i]),o.appendChild(a)}return l.DecorationSet.create(e.doc,[l.Decoration.widget(e.selection.from+1,o)])}return l.DecorationSet.empty}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(4);t.textHighlightKey=new r.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new r.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map(function(e){return o.Decoration.inline(e.from,e.to,e.attrs)});return o.DecorationSet.create(e.doc,t)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),l=n(4),c=/\s+/g,u=/text-align/;t.spacesFix=function(){return new r.Plugin({key:new r.PluginKey("spaces-fix"),props:{decorations:function(e){var r,o,i,a,s=[],e=e.doc;return e.nodesBetween(0,e.content.size,function(e,t,n){if(e.type.isText&&u.test(n&&n.attrs&&n.attrs.style||""))for(o=c.exec(e.text||"");null!==o;){if(r=t+o.index,i=o[0].length,o.index+i<o.input.length)for(a=0;a<=i-1;a+=2)s.push(l.Decoration.inline(r+a,r+a+1,{style:"white-space: normal"}));o=c.exec(e.text||"")}}),l.DecorationSet.create(e,s)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(4);t.placeholder=function(e){var r={class:"k-placeholder","data-placeholder":e};return new o.Plugin({key:new o.PluginKey("placeholder"),props:{decorations:function(e){var t=e.doc,e=t.content.firstChild;if(!(0===t.childCount||1===t.childCount&&e.inlineContent&&0===e.childCount))return i.DecorationSet.empty;var n=[];return t.descendants(function(e,t){n.push(i.Decoration.node(t,t+e.nodeSize,r))}),i.DecorationSet.create(t,n)}}})}},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var l=t(1),k=t(0);s.findAt=function(i,e,a,s,l){var c,u,d,f,p,m,g=[],h=[],t=e.matchCase,v=e.matchWord,n=e.useRegExp,e=e.text;if(!(e=n&&(/^\\$/.test(e)||/[^\\]\\$/.test(e))?e.substring(0,e.length-1):e))return g;var t=t?"g":"gi",y=n?new RegExp(e,t):o(e,t);return i.nodesBetween(a,s,function(e,o,t){return!l(g)&&void(e.inlineContent&&o+e.content.size>=a&&(h.length=0,e.nodesBetween(0,e.content.size,function(e,t,n,r){if(l(g))return!1;t=1+o+t;if(e.isText&&t+e.nodeSize>=a){if(p=e.text||"",m=n.childCount-1>=r+1&&n.child(r+1),h.push(a<=t?{text:p,start:t}:{text:p.slice(a-t),start:a}),!m||!m.isText)for(u=h.map(function(e){return e.text}).join(""),c=y.exec(u);null!==c&&(d=h[0].start+c.index,f=d+c[0].length,a<=d&&f<=s&&b(c,v)&&g.push(k.TextSelection.create(i,d,f)),!l(g));)c=y.exec(u)}else h.length=0})))}),g},s.find=function(e,t){var n=t.backward,r=t.matchCyclic,o=l.__rest(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return 0<e.length},a=e.doc,t=e.selection,e=[];return n?!(e=s.findAt(a,o,0,t.from,i)).length&&r&&(e=s.findAt(a,o,t.from,a.content.size,i)):!(e=s.findAt(a,o,t.to,a.content.size,i)).length&&r&&(e=s.findAt(a,o,0,t.to,i)),e.length?e[e.length-1]:null},s.findAll=function(e,t){return s.findAt(e,t,0,e.content.size,function(){return!1})},s.replace=function(e,t,n){var r=e.from,e=e.to;return n.insertText(t,r,e).setSelection(k.TextSelection.create(n.doc,r,r+t.length)),n},s.replaceAll=function(e,t,n){var r=s.findAll(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;0<=i;i--)o.insertText(t,r[i].from,r[i].to);return o};var r=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,b=function(e,t){if(t){if(!0!==t)return t(e);var n=e.input,t=n.charAt(e.index-1),e=n.charAt(e.index+e[0].length);return r.test(t)&&r.test(e)}return!0},o=function(e,t){e=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(e,t)}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(14);a.sanitize=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},a.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},a.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},a.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},a.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&a.removeAttribute(e)};var s=/\s*;\s*/,l=/\s*:\s*/;a.sanitizeStyleAttr=function(e){var t,n,r=e.value.split(s).filter(function(e){return Boolean(e)}),o=e.ownerElement.style,i="";r.forEach(function(e){e=e.split(l);t=e[0],n=e[1],void 0!==o[t]&&(i+=t+": "+n+"; ")}),(i=i.trim())?e.value=i:a.removeAttribute(e)},a.pasteCleanup=function(e,t){var n=e;return t.convertMsLists&&(n=r.convertMsLists(n)),t.stripTags&&(n=a.removeTag(n,t.stripTags)),t.attributes&&((e=document.createElement("div")).innerHTML=n,Array.from(e.querySelectorAll("*")).forEach(function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;0<=n;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)}),n=e.innerHTML),n};var c=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,u=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,d=new RegExp("(?:("+u.source+"))([\\da-fA-F\\s]+)\\}","g"),f=/[^\da-fA-F]/g,p=/file:\/[^'"]+\.(jpg|png|gif)/i,m=/\\(png|jpeg)blip\\/;a.replaceImageSourcesFromRtf=function(e,t){var n=e.match(c);if(!n||-1===t.types.indexOf("text/rtf"))return e;var r=t.getData("text/rtf"),o=[],t=r.match(d);if(!r||!t)return e;for(var i=0,a=t;i<a.length;i++){var s=a[i],l=m.exec(s);l&&(s=s.replace(u,"").replace(f,""),o.push("data:image/"+l[1]+";base64,"+function(e){for(var t=e.length,n=new Array(t/2),r=0;r<t;r+=2)n[r]=String.fromCharCode(parseInt(e.substring(r,r+2),16));return btoa(n.join(""))}(s)))}return n.length!==o.length?e:e.replace(c,function(e){var t=o.shift()||"";return e.replace(p,t)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(6),a=n(17),s=n(16),r=n(18),l=n(15),c=n(11),u=n(2),d="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e,t){var n,r={},t=t&&t.applyToWord||!1;return r["Mod-z"]=a.undo,r["Shift-Mod-z"]=a.redo,r.Backspace=i.chainCommands(s.undoInputRule,i.deleteSelection,i.joinBackward,i.selectNodeBackward),r.Enter=i.chainCommands(i.newlineInCode,i.createParagraphNear,i.liftEmptyBlock,i.splitBlockKeepMarks),d||(r["Mod-y"]=a.redo),e.marks.strong&&(r["Mod-b"]=u.expandToWordWrap(c.toggleInlineFormat,o.__assign({},l.bold,{applyToWord:t}))),e.marks.em&&(r["Mod-i"]=u.expandToWordWrap(c.toggleInlineFormat,o.__assign({},l.italic,{applyToWord:t}))),e.marks.u&&(r["Mod-u"]=u.expandToWordWrap(c.toggleInlineFormat,o.__assign({},l.underline,{applyToWord:t}))),e.nodes.hard_break&&(n=e.nodes.hard_break,e=i.chainCommands(i.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),r["Shift-Enter"]=e),r},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=r.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function i(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n}function r(e){var t={};return e.forEach(function(e){t[e]={default:null}}),t}function o(){return r(["style","class","id"])}function a(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function s(e,t){var n,r={};for(n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r}function l(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var c=n(1),u=n(3),d=n(9),f=n(13),p=n(12),m=["blockquote",0],g=["hr"],h=["pre",["code",0]],v=["ol",0],y=["ul",0],k=["li",0],b=c.__assign({link:{attrs:c.__assign({},o(),{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:i}],toDOM:function(e){return["a",s(e.attrs),0]}}},l("strong"),l("b"),l("em"),l("i"),l("u"),l("del"),l("sub"),l("sup"),l("code"),{style:{attrs:c.__assign({},o()),parseDOM:[{tag:"span",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["span",s(e.attrs),0]:["span",0]}}});t.marks=b;function M(n){var e;return(e={})[n]={default:null,getFromDOM:function(e){return e.getAttribute(n)},setDOMAttr:function(e,t){t[n]=e}},e}var n=c.__assign({},M("style"),M("class"),M("id"),M("headers")),b={doc:{content:"colgroup*"},col:{attrs:r(["id","class","style","span"]),parseDOM:[{getAttrs:i,tag:"col"}],toDOM:function(e){return["col",e.attrs]}},colgroup:{attrs:r(["id","class","style","span"]),content:"col*",parseDOM:[{getAttrs:i,tag:"colgroup"}],toDOM:function(e){return["colgroup",e.attrs,0]}},text:{inline:!0,group:"inline"}},x=new u.Schema({nodes:b,marks:{}}),n=d.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:n});n.table_row.attrs=c.__assign({},n.table_row.attrs,r([p.rowTypeAttr,"style","class","id"])),n.table_row.toDOM=function(e){return["tr",s(e.attrs),0]},n.table_row.parseDOM=[{tag:"tr",getAttrs:i}],n.table.attrs=c.__assign({},n.table.attrs,r(["style","class","id",p.colgroupAttr])),n.table.toDOM=function(r){var e,t,n=a(r.attrs)?s(r.attrs,p.colgroupAttr):{},o=null;return r.attrs[p.colgroupAttr]&&!function(){for(var e=!1,t=r.child(0),n=0;n<t.childCount;n++)if(t.child(n).attrs.colwidth){e=!0;break}return e}()&&(t=f.domToPmDoc(f.htmlToFragment(r.attrs[p.colgroupAttr]),x,{preserveWhitespace:!1}),(e=f.pmDocToFragment(t).firstChild)&&(t=Array.from(e.children).map(function(e){return["col",i(e)]}),o=["colgroup",i(e)].concat(t))),o?["table",n,o,["tbody",0]]:["table",n,["tbody",0]]},n.table.parseDOM=[{tag:"table",getAttrs:function(e){var t=i(e),e=Array.from(e.childNodes).find(function(e){return"COLGROUP"===e.nodeName});return e&&(t[p.colgroupAttr]=e.outerHTML),t}}];n=c.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:c.__assign({},o()),parseDOM:[{tag:"p",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["p",s(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:c.__assign({},o()),parseDOM:[{tag:"div",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["div",s(e.attrs),0]:["div",0]}},blockquote:{attrs:c.__assign({},o()),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["blockquote",s(e.attrs),0]:m}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return g}},heading:{attrs:c.__assign({},o(),{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return c.__assign({},i(e),{level:1})}},{tag:"h2",getAttrs:function(e){return c.__assign({},i(e),{level:2})}},{tag:"h3",getAttrs:function(e){return c.__assign({},i(e),{level:3})}},{tag:"h4",getAttrs:function(e){return c.__assign({},i(e),{level:4})}},{tag:"h5",getAttrs:function(e){return c.__assign({},i(e),{level:5})}},{tag:"h6",getAttrs:function(e){return c.__assign({},i(e),{level:6})}}],toDOM:function(e){return a(e.attrs,"level")?["h"+e.attrs.level,s(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return h}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:c.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},o()),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["img",s(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:c.__assign({},o()),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["br",s(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:c.__assign({},o(),{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return c.__assign({},i(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?a(e.attrs,"order")?["ol",s(e.attrs,"order"),0]:v:["ol",c.__assign({},s(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:c.__assign({},o()),parseDOM:[{tag:"ul",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["ul",s(e.attrs),0]:y}},list_item:{content:"(paragraph | heading) block*",attrs:c.__assign({},o()),parseDOM:[{tag:"li",getAttrs:i}],toDOM:function(e){return a(e.attrs)?["li",s(e.attrs),0]:k},defining:!0}},n);t.nodes=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){return{name:e,value:t}}t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]}]},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=t(10),s=t(21),l=t(7),o=t(2),c=t(19);i.indentBlocks=function(a,r,s){return function(e,t){var n=l.blockNodes(e),i=e.tr;i.setMeta("commandName",r),n.forEach(function(t){var e,n,r,o;t.type.isTextblock&&(e=void 0,(n=a.find(function(e){return e.node===t.type.name}))&&(r={name:o="rtl"===s?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(o=new RegExp(o+":\\s?(\\d+)"+n.unit,"i"),(o=t.attrs.style.match(o))&&(o=(o=parseFloat(o[1])+n.step)<=0?"":o,r.value=""+o+(o?n.unit:""))),e=l.addStyles(t,[r])),e&&l.changeTextBlock(i,t,t.type,e))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},i.isIndented=function(e,r,o){var i=!1;return l.blockNodes(e).forEach(function(t){var e,n;i||!t.type.isTextblock||!t.attrs.style||(n=r.find(function(e){return e.node===t.type.name}))&&(e="rtl"===o?n.rtlStyle:n.style,n=new RegExp(e+":\\s?\\d+"+n.unit,"i"),i=n.test(t.attrs.style))}),i},i.canIndentAsListItem=function(e,t){return a.sinkListItem(t)(e)},i.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],t=e.schema.nodes[t.listsTypes.bulletList],r=!!o.findNthParentNodeOfType(r,2)(e.selection),t=!!o.findNthParentNodeOfType(t,2)(e.selection);return(r||t)&&a.liftListItem(n)(e)},i.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[s.indentRules.listsTypes.listItem];return(i.isIndented(t,e.nodes)||s.indentRules.nodes.some(function(e){return n[e.node]&&l.hasNode(t,n[e.node])}))&&!l.hasNode(t,r)},i.indent=function(e,t){var n=e.schema.nodes[s.indentRules.listsTypes.listItem],r=i.canBeIndented(e,s.indentRules);i.canIndentAsListItem(e,n)?a.sinkListItem(n)(e,t):r&&i.indentBlocks(s.indentRules.nodes)(e,t)},i.outdent=function(e,t){var n=e.schema.nodes,r=n[s.outdentRules.listsTypes.listItem],o=i.canBeIndented(e,s.outdentRules);l.hasNode(e,n.blockquote)?c.liftBlockquote(e,t):i.canOutdentAsListItem(e,s.outdentRules)?a.liftListItem(r)(e,t):o&&i.indentBlocks(s.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=n(8);t.cleanFormatting=function(i){return void 0===i&&(i={blocksInSelection:!0}),function(e,t){var n=e.tr,r=i.blocksInSelection,o=i.blockNodeType,e=(i.exceptMarks||[e.schema.marks.link]).filter(Boolean);s.cleanMarks(n,{except:e}),a.cleanTextBlockFormatting(n,{blocksInSelection:r,blockNodeType:o});o=n.docChanged;return o&&t&&t(n),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7);t.alignBlocks=function(o,i){return function(e,t){var n=a.blockNodes(e),r=e.tr;r.setMeta("commandName",i),n.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=o.find(function(e){return e.node===t.type.name}))&&(e=a.addStyles(t,n.style)),a.changeTextBlock(r,t,t.type,e))});n=r.docChanged;return n&&t(r.scrollIntoView()),n}},t.isAligned=function(e,n){var r=!1;return a.blockNodes(e).forEach(function(t){var e;r||!t.type.isTextblock||!t.attrs.style||(e=n.find(function(e){return e.node===t.type.name}))&&(r=e.style.every(function(e){return!!e.value&&new RegExp(e.name+":\\s?"+e.value,"i").test(t.attrs.style)}))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);o.insertNode(n)(e,function(e){return t(e.setMeta("commandName","insertImage").setMeta("args",r))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(n){return function(e,t){t(e.tr.insertText(n.text,n.from,n.to))}}},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var g=t(11),h=t(8),d=t(0);u.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,o=n.parent,i=n.index(),a=e.schema.marks[f.mark],s=o.child(i).marks.find(function(e){return e.type===a}),l=o.childCount,c=n.pos-n.textOffset,u=o.child(i).nodeSize,d=void 0,d=i-1;0<=d&&s.isInSet(o.child(d).marks);)u+=r=o.child(d).nodeSize,c-=r,--d;for(d=i+1;d<l&&s.isInSet(o.child(d).marks);)u+=o.child(d).nodeSize,d+=1;t(h.removeMark(p||e.tr,c,c+u,s))}else g.toggleInlineFormat(f,p)(e,t)}},u.applyLink=function(e,s){var l=e.mark,c=e.attrs;return void 0===s&&(s="link"),function(t,e){var n=t.schema.marks,r=t.tr;s&&(r.setMeta("commandName",s),r.setMeta("args",c));function o(){return a=!0}var i,p,m,a=!1;return!function(e){e=h.selectionMarks(t,e);return 1===e.length&&e[0]&&e[0]}(n[l])?(h.hasMark(i=t,{mark:l})&&(u.removeLink({mark:l,attrs:c},r)(t,o),i=d.EditorState.create({doc:r.doc,selection:r.selection})),(a?h.toggleMark(n[l],c,r):g.toggleInlineFormat({mark:l},r,c))(i,o)):(p={mark:l,attrs:c},m=r,function(e,n){var t=e.selection,r=t.$cursor,o=t.from,t=t.to,i=e.schema.marks[p.mark];if(r){for(var a,s=r.parent,e=r.index(),l=s.child(e).marks.find(function(e){return e.type===i}),c=s.childCount,u=r.pos-r.textOffset,d=s.child(e).nodeSize,f=void 0,f=e-1;0<=f&&l.isInSet(s.child(f).marks);)d+=a=s.child(f).nodeSize,u-=a,--f;for(f=e+1;f<c&&l.isInSet(s.child(f).marks);)d+=s.child(f).nodeSize,f+=1;m.removeMark(u,u+d,i),m.addMark(u,u+d,i.create(p.attrs)),n(m)}else m.doc.nodesBetween(o,t,function(e,t){e.isInline&&i.isInSet(e.marks)&&(m.removeMark(t,t+e.nodeSize,i),m.addMark(t,t+e.nodeSize,i.create(p.attrs)),n(m))})}(t,o)),a&&e(r),a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(13);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent,t.trimWhitespace=o.trimWhitespace,t.htmlToFragment=o.htmlToFragment,t.domToPmDoc=o.domToPmDoc,t.pmDocToFragment=o.pmDocToFragment;o=n(11);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;o=n(40);t.applyLink=o.applyLink,t.removeLink=o.removeLink;o=n(39);t.insertText=o.insertText;o=n(38);t.insertImage=o.insertImage;o=n(37);t.alignBlocks=o.alignBlocks,t.isAligned=o.isAligned;o=n(36);t.cleanFormatting=o.cleanFormatting;o=n(7);t.hasNode=o.hasNode,t.activeNode=o.activeNode,t.formatBlockElements=o.formatBlockElements,t.getBlockFormats=o.getBlockFormats,t.parentBlockFormat=o.parentBlockFormat,t.changeTextBlock=o.changeTextBlock,t.blockNodes=o.blockNodes,t.cleanTextBlockFormatting=o.cleanTextBlockFormatting;o=n(8);t.hasMark=o.hasMark,t.getMark=o.getMark,t.getActiveMarks=o.getActiveMarks,t.removeAllMarks=o.removeAllMarks,t.cleanMarks=o.cleanMarks,t.selectionMarks=o.selectionMarks;o=n(35);t.indent=o.indent,t.canIndentAsListItem=o.canIndentAsListItem,t.outdent=o.outdent,t.canOutdentAsListItem=o.canOutdentAsListItem,t.isIndented=o.isIndented,t.canBeIndented=o.canBeIndented,t.indentBlocks=o.indentBlocks;o=n(18);t.toggleOrderedList=o.toggleOrderedList,t.toggleUnorderedList=o.toggleUnorderedList,t.toggleList=o.toggleList;o=n(19);t.blockquote=o.blockquote,t.liftBlockquote=o.liftBlockquote;o=n(2);t.hasSameMarkup=o.hasSameMarkup,t.getSelectionText=o.getSelectionText,t.getNodeFromSelection=o.getNodeFromSelection,t.selectedLineTextOnly=o.selectedLineTextOnly,t.expandSelection=o.expandSelection,t.expandToWordWrap=o.expandToWordWrap,t.canInsert=o.canInsert,t.insertNode=o.insertNode,t.indentHtml=o.indentHtml;o=n(34);t.alignLeftRules=o.alignLeftRules,t.alignCenterRules=o.alignCenterRules,t.alignRightRules=o.alignRightRules,t.alignJustifyRules=o.alignJustifyRules,t.alignRemoveRules=o.alignRemoveRules;o=n(21);t.indentRules=o.indentRules,t.outdentRules=o.outdentRules;o=n(33);t.nodes=o.nodes,t.marks=o.marks;o=n(32);t.buildKeymap=o.buildKeymap,t.buildListKeymap=o.buildListKeymap;o=n(15);t.bold=o.bold,t.italic=o.italic,t.underline=o.underline,t.strikethrough=o.strikethrough,t.subscript=o.subscript,t.superscript=o.superscript,t.link=o.link;o=n(31);t.sanitize=o.sanitize,t.removeComments=o.removeComments,t.removeTag=o.removeTag,t.pasteCleanup=o.pasteCleanup,t.sanitizeClassAttr=o.sanitizeClassAttr,t.sanitizeStyleAttr=o.sanitizeStyleAttr,t.removeAttribute=o.removeAttribute,t.replaceImageSourcesFromRtf=o.replaceImageSourcesFromRtf;o=n(14);t.convertMsLists=o.convertMsLists;o=n(30);t.find=o.find,t.findAt=o.findAt,t.findAll=o.findAll,t.replace=o.replace,t.replaceAll=o.replaceAll;o=n(29);t.placeholder=o.placeholder;o=n(28);t.spacesFix=o.spacesFix;o=n(27);t.textHighlight=o.textHighlight,t.textHighlightKey=o.textHighlightKey;o=n(26);t.imageResizing=o.imageResizing,t.imageResizeKey=o.imageResizeKey,r.__exportStar(n(6),t),r.__exportStar(n(25),t),r.__exportStar(n(24),t),r.__exportStar(n(17),t),r.__exportStar(n(16),t),r.__exportStar(n(23),t),r.__exportStar(n(3),t),r.__exportStar(n(10),t),r.__exportStar(n(0),t),r.__exportStar(n(9),t),r.__exportStar(n(5),t),r.__exportStar(n(4),t);n=n(22);t.createTable=n.createTable,t.addRowAfter=n.addRowAfter,t.addRowBefore=n.addRowBefore,t.pmAddRowAfter=n.pmAddRowAfter,t.pmAddRowBefore=n.pmAddRowBefore,function(e){for(var t in e)i(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=41)}}});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-editor-common",
3
3
  "description": "Kendo UI TypeScript package exporting functions for Editor component",
4
- "version": "1.7.0-dev.202201070835",
4
+ "version": "1.7.0",
5
5
  "keywords": [
6
6
  "Kendo UI"
7
7
  ],