@progress/kendo-editor-common
Advanced tools
Comparing version 0.6.1-dev.202007090948 to 0.6.1-dev.202007100644
@@ -16,2 +16,2 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap"),require("prosemirror-view")):"function"==typeof define&&define.amd?define(["prosemirror-state","prosemirror-model","prosemirror-transform","prosemirror-schema-list","prosemirror-commands","prosemirror-tables","prosemirror-history","prosemirror-inputrules","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-keymap","prosemirror-view"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap"),require("prosemirror-view")):e.KendoEditorCommon=t(e["prosemirror-state"],e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-tables"],e["prosemirror-history"],e["prosemirror-inputrules"],e["prosemirror-dropcursor"],e["prosemirror-gapcursor"],e["prosemirror-keymap"],e["prosemirror-view"])}(window,(function(e,t,r,n,o,i,a,s,l,u,c,f){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=18)}([function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return l})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return c})),r.d(t,"__generator",(function(){return f})),r.d(t,"__createBinding",(function(){return d})),r.d(t,"__exportStar",(function(){return p})),r.d(t,"__values",(function(){return m})),r.d(t,"__read",(function(){return g})),r.d(t,"__spread",(function(){return v})),r.d(t,"__spreadArrays",(function(){return y})),r.d(t,"__await",(function(){return h})),r.d(t,"__asyncGenerator",(function(){return k})),r.d(t,"__asyncDelegator",(function(){return b})),r.d(t,"__asyncValues",(function(){return _})),r.d(t,"__makeTemplateObject",(function(){return M})),r.d(t,"__importStar",(function(){return S})),r.d(t,"__importDefault",(function(){return w})),r.d(t,"__classPrivateFieldGet",(function(){return I})),r.d(t,"__classPrivateFieldSet",(function(){return x})); | ||
***************************************************************************** */ | ||
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(l,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:h(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function w(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(5),a=r(6),s=r(10);t.changeStyles=function(e,t){var r=t.style,n=t.value,o=t.newValue,i=[];if(e){var a=e.split(/\s*;\s*/).filter((function(e){return e})),s=a.filter((function(e){if(!e.toLowerCase().trim().startsWith(r))return!0;var t=e.split(":")[1].trim();return!n.test(t)||(i.push(t),!1)}));return o&&s.push(r+": "+o),{style:s.join("; ")+(s.length?";":""),changed:!!o||s.length!==a.length,styleMatches:i}}return{changed:!1,styleMatches:i,style:null}},t.changeStyle=function(e,t){return function(r,n,o){var s=r.selection,l=s.empty,u=s.$cursor,c=s.ranges;if(l&&!u||!i.markApplies(r.doc,c,e))return!1;var f=!1;if(n)if(o=o||r.tr,u){var d=r.storedMarks||u.marks();if(e.isInSet(d)){var p=a.changeStyleFromMark(d,t);n(o.removeStoredMark(e)),n(o.addStoredMark(e.create({style:p.style}))),f=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,y=g.$to;f=a.changeStyleMark(o,v.pos,y.pos,t,e)}f&&(o.scrollIntoView(),n(o))}return f}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1},t.getTypeName=function(e){return e instanceof n.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var r=t.$from,n=r.depth;n>0;n--){var o=r.node(n);if(e(o))return{depth:n,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}},t.findNthParentNodeOfType=function(e,r){return void 0===r&&(r=1),function(n){return t.findNthParentNode((function(r){return t.getTypeName(r)===t.getTypeName(e)}),r)(n)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.hasSameMarkup=function(e,t,r,o){var i=n.Fragment.from(s.parseContent(e,r,o)),a=n.Fragment.from(s.parseContent(t,r,o));return i.eq(a)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,r){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(r)}))).map((function(e){return 0!==e.length?e:[r+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return n.indexOf("INVALID")>-1||1!==n.length?"":n[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.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$/,"")}},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(2),i=r(1),a=r(6);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(r)})),s)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var a=o.selection,s=a.empty,l=a.$cursor,u=a.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,f=0;!c&&f<u.length;f++){var d=u[f],p=d.$from,m=d.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(f=0;f<u.length;f++){var g=u[f];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var a=[],s=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){s++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),f=0;f<l.length;f++){for(var d=l[f],p=void 0,m=0;m<a.length;m++){var g=a[m];g.step===s-1&&d.eq(g.style)&&(p=g)}p?(p.to=c,p.step=s):a.push({style:d,from:Math.max(n,t),to:c,step:s})}}})),a.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,a=i.$cursor,s=i.ranges;if(o=o||r.tr,a)e.forEach((function(e){e.isInSet(r.storedMarks||a.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=s[r],i=n.$from,a=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,a.pos,e)}))},u=0;u<s.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,r=void 0===t?[]:t;return function(e,t){var n,o=e.schema,i=e.selection,a=i.$cursor,s=i.from,l=i.to,u=e.tr,c=(n=r,n instanceof Array?n:[n]).map((function(e){return e.name}));a||(Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===c.indexOf(e.name)})).forEach((function(e){return u.removeMark(s,l,e)})),t(u))}},t.getParentMark=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,a=r.empty,s=e.doc;if(a)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return s.nodesBetween(n,i,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var r,n=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return n[e]})),i=t.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,f=s.empty,d=n[t.mark],p=e.doc,m=!1;return f?(r=e.storedMarks||u.marks(),m=d&&d.isInSet(r)||o.some((function(e){return n[e].isInSet(r)}))):m=d&&p.rangeHasMark(l,c,d)||o.some((function(e){return p.rangeHasMark(l,c,n[e])})),!m&&i?a.hasStyle(e,i):Boolean(m)},t.getMark=function(e,t){var r,n=e.selection,o=n.from,i=n.$from,a=n.to,s=n.empty,l=e.doc;if(s)r=t.isInSet(e.storedMarks||i.marks());else{var u=[];l.nodesBetween(o,a,(function(e){e.isInline&&u.push(t.isInSet(e.marks))})),u.some((function(e){return!e}))||(r=u[u.length-1])}return r};t.getActiveMarks=function(e,t){var r=e.selection,n=!1;if(r instanceof i.TextSelection&&r.$cursor)return{hasNodesWithoutMarks:n,marks:r.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return r.content().content.descendants((function(e){if("text"===e.type.name){var r=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&r.length>0?o.push.apply(o,r):n=!0}})),{hasNodesWithoutMarks:n,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(4),i=r(3),a=r(5);t.changeStyleFromMark=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStyles(n,t)},t.changeStyleMark=function(e,r,i,a,s){var l=s.create({style:a.style}),u=[],c=[],f=null,d=null;return e.doc.nodesBetween(r,i,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,r),y=Math.min(p+e.nodeSize,i),h=t.changeStyleFromMark(g,a);if(h.changed||a.newValue){for(var k=h.changed?{style:h.style||null}:{style:[a.style]+": "+a.newValue+";"},b=s.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,_=b?n.__assign({},b.attrs,k):k,M=s.create(_),S=M.addToSet(g),w=0;w<g.length;w++)g[w].isInSet(S)||(f&&f.to===v&&f.mark.eq(g[w])?f.to=y:(f=new o.RemoveMarkStep(v,y,g[w]),u.push(f)));var I=d&&d.to===v,x=I&&M.attrs.style===d.mark.attrs.style;I&&x?d.to=y:Object.keys(_).some((function(e){return null!==_[e]}))&&(d=new o.AddMarkStep(v,y,M),c.push(d))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,r){var n=e.selection,o=n.from,i=n.$from,a=n.to,s=n.empty,l=!1,u={style:r.name,value:r.value};return s?l=t.changeStyleFromMark(e.storedMarks||i.marks(),u).changed:e.doc.nodesBetween(o,a,(function(e,r,n){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,r){var n,o=e.selection,i=o.from,a=o.$from,s=o.to,l=o.empty,u=[],c={style:r.name,value:r.value};return l?(n=t.changeStyleFromMark(e.storedMarks||a.marks(),c)).changed&&(u=n.styleMatches):e.doc.nodesBetween(i,s,(function(e,r,o){e.isInline&&((n=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,n.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,r){return function(o,i,s){var l=o.selection,u=l.empty,c=l.$cursor,f=l.ranges;if(u&&!c||!a.markApplies(o.doc,f,e))return!1;var d=!1;if(i)if(s=s||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,r),g=p.find((function(e){return"style"===e.type.name})),v=n.__assign({},g?g.attrs:{},{style:m.style||null});i(s.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&i(s.addStoredMark(e.create(v))),d=!0}}else{for(var y=0;y<f.length;y++){var h=f[y],k=h.$from,b=h.$to;d=t.changeStyleMark(s,k.pos,b.pos,r,e)}d&&(s.scrollIntoView(),i(s))}return d}},t.toggleInlineFormat=function(e,r,n){return function(o,i){var s=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,f=e.mark;r=r||o.tr;var d=!1,p=!1,m=function(){return p=!0};if(l&&s.style){var g=s.style;d=t.changeStyle(g,{style:l.name,value:l.value})(o,m,r)}var v=[f].concat(c).filter((function(e){return s[e]})).map((function(e){return a.hasMark(o,{mark:e})&&s[e]})).filter((function(e){return e}));return v.length?a.removeMarks(v,o,m,r):d||a.toggleMark(s[f],n,r)(o,m),p&&i(r),p}},t.applyInlineStyle=function(e,r){return function(o,s){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;r&&c.setMeta("commandName",r),c.setMeta("args",e);var f=o.selection,d=f.empty,p=f.$cursor,m=f.ranges;if(d&&!p||!a.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,y={style:null};if(v&&v.attrs.style){var h=i.changeStyles(v.attrs.style,u);h.changed&&h.style&&(y.style=h.style)}else u.newValue&&(y.style=[u.style]+": "+u.newValue+";");var k=v?n.__assign({},v.attrs,y):y;return Object.keys(k).some((function(e){return null!==k[e]}))?s(c.addStoredMark(l.create(k))):s(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,s,c)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),a=r(2),s=r(1);t.changeBlockNode=function(e,t,r,n,o,s){var l=e.selection,u=l.from,c=l.to,f=!1;if(e.doc.nodesBetween(u,c,(function(t,r){if(f)return!1;if(t.isTextblock&&!t.hasMarkup(o,s))if(t.type===o)f=!0;else{var n=e.doc.resolve(r),i=n.index();f=n.parent.canReplaceWith(i,i+1,o)}})),!f)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var d=r.steps.length;r.doc.nodesBetween(u,c,(function(e,t){if(e.eq(n)&&e.isTextblock&&!e.hasMarkup(o,s)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(r.doc,r.mapping.slice(d).map(t),o)){r.clearIncompatible(r.mapping.slice(d).map(t,1),o);var l=r.mapping.slice(d),u=l.map(t,1),c=l.map(t+e.nodeSize,1),f=new a.Slice(a.Fragment.from(o.create(s,null,e.marks)),0,0);return r.step(new i.ReplaceAroundStep(u,c,u+1,c-1,f,1,!0)),!1}}))}return!0},t.blockNodes=function(e){var t=e.selection,r=t.from,n=t.to,o=t.$from,i=[];return t.node?t.node.isBlock?i.push(t.node):o.parent&&o.parent.isBlock&&i.push(o.parent):e.doc.nodesBetween(r,n,(function(e){e.isBlock&&i.push(e)})),i},t.formatBlockElements=function(e,r){return function(o,i){var a=t.blockNodes(o),s=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",r),u.setMeta("args",{value:e}),a.forEach((function(r){if(r.type.isTextblock)if("p"===e){var a=r.attrs,c=a.level,f=n.__rest(a,["level"]);l=t.changeBlockNode(o,i,u,r,s.paragraph,f)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,i,u,r,s.heading,n.__assign({},r.attrs,{level:c}))||l}else if("blockquote"===e){var d=r.attrs;c=d.level,f=n.__rest(d,["level"]);l=t.changeBlockNode(o,i,u,r,s.blockquote,f)||l}})),l&&i(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){if(e.type===n.paragraph)o.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var r=e.attrs.style,n=null,i=null;r&&t.forEach((function(e){i={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStyles(r,i),r=n.changed?n.style:r}));return 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})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,r){var n;return Object.assign(t,((n={})[r]=e[r],n))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var r,n=e.type.spec.parseDOM||[],o=e.attrs;return(r=1===n.length?n[0]:n.find((function(r){var n=a.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(r.getAttrs(n))===JSON.stringify(l(o))})))?r.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var r,n=e.schema.nodes.doc;if(e.selection instanceof s.AllSelection)r=e.doc;else if(e.selection instanceof s.TextSelection){var i=e.selection.$anchor,a=i.node(i.blockRange().depth);r=o.getTypeName(a)===o.getTypeName(n)?i.node():a}else e.selection instanceof s.NodeSelection&&(r=e.selection.node);return{name:o.getTypeName(r),tag:t.getNodeTagName(r,e.schema)}}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(3);t.parseContent=function(e,t,r){var o=document.createElement("div");return o.innerHTML=i.safeString(e),n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,a){return a(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(12);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:n.__assign({},o.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:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(2),i=r(1),a=r(4),s=r(9),l=r(8),u=r(12);function c(e,r,n){var o=e.selection,i=o.from,a=o.to,s=e.schema.nodes,l=s.paragraph,u=s.heading,c=[];r.doc.nodesBetween(i,a,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var f=c.length-1;f>=0;f--){var d=c[f],p=r.doc.resolve(r.mapping.map(d.pos));if(p.depth>0){var m=void 0;m=d.node.textContent&&d.node.textContent.length>0?r.doc.resolve(r.mapping.map(d.pos+d.node.textContent.length)):r.doc.resolve(r.mapping.map(d.pos+1));var g=p.blockRange(m);g&&r.lift(g,t.getListLiftTarget(e.schema,p,n))}}return r}function f(e){return function(t,r,n){if(!n)return!1;var o=(t=n.state).schema.nodes[e.listType],i=t.selection,a=i.$from,s=i.$to,l=a.node(-2),u=a.node(-3),c=m(t.doc,a,s,o);return(l&&l.type===o||u&&u.type===o)&&c?y(e)(t,r):(c||(y(e)(t,r),t=n.state),h(o)(t,r))}}function d(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,s=t.$to,l=i.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=s.end(l.depth);return u<c&&(r.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,a.liftTarget(l)).scrollIntoView()}function p(e,t,r,n,o,a){a||(a=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!s&&r.type===a&&l>t){s=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var f=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,f);o=d(e,p,o,a)}}})),o}function m(e,t,r,n){return 0===g(e,t,r).filter((function(e){return e.type!==n})).length}function g(e,t,r){for(var n=Array(),o=v(e,t).depth,i=e.resolve(t.start(o));i.pos<=r.start(r.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&n.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}function v(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var n=t.node(t.depth),o=t;t.depth>=1;)(n=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}function y(e){return function(t,r){var n=t.tr,o=t.selection,s=o.$from,l=o.$to;return n.doc.nodesBetween(s.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var s=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}function h(e){return s.autoJoin(l.wrapInList(e),(function(t,r){return t.type===r.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==n&&s.type!==o||(r=a),s.type!==n&&s.type!==o&&s.type!==i)break}return r},t.getListLiftTarget=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],a=e.nodes[r.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(n=s),l.type!==o&&l.type!==i&&l.type!==a)break}return n-1},t.liftSelectionList=c,t.toggleList=function(e,r,n,o,i){var a=o.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var d=n.state.schema.nodes,m={bulletList:d[o.bulletList],orderedList:d[o.orderedList],listItem:d[o.listItem]},g=t.rootListDepth(s.$to,m),v=p(e,s.$to.pos,s.$to.end(g),g,n.state.tr,m.listItem);return(v=c(e,v,o)).setMeta("commandName",i),r(v),!0}return f(o)(e,r,n)},t.toggleListCommand=f,t.liftFollowingList=p,t.isRangeOfType=m,t.getAncestorNodesBetween=g,t.findAncestorPosition=v,t.liftListItems=y,t.wrapInList=h,t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},a=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:s(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,s,l,f,d,p,m,g,v,y,h=-1,k={};for(d=0;d<e.length;d++){var b=(y={datalist:(p=e[d]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,_=u(p);if(m=_&&_.tag){if(g=y.datalevel||parseFloat(p.style.marginLeft||0),y.datalevel||p.style.marginLeft){var M=m+b;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=b,i=(f=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[f.length-1],l=a(m,_&&_.style),p.parentNode.insertBefore(l,p),h=g,k[g][M]=l),s=i===p,v=k[g][M],(g>h||!v)&&(v=a(m,_&&_.style),k[g][M]=v,t.appendChild(v)),t=c(p),v.appendChild(t),s?r=h=-1:h=g}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(10);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(6);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var a=r(19);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(20);t.insertText=s.insertText;var l=r(21);t.insertImage=l.insertImage;var u=r(22);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(7);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats;var f=r(5);t.hasMark=f.hasMark,t.getMark=f.getMark,t.getActiveMarks=f.getActiveMarks,t.removeAllMarks=f.removeAllMarks;var d=r(23);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented,t.indentBlocks=d.indentBlocks;var p=r(13);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=r(3);t.hasSameMarkup=m.hasSameMarkup,t.getUniqueStyleValues=m.getUniqueStyleValues,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=r(24);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=r(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=r(25);t.nodes=y.nodes,t.marks=y.marks;var h=r(26);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=r(27);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var b=r(28);t.sanitize=b.sanitize,t.removeComments=b.removeComments,t.removeTag=b.removeTag,t.pasteCleanup=b.pasteCleanup,t.sanitizeClassAttr=b.sanitizeClassAttr,t.sanitizeStyleAttr=b.sanitizeStyleAttr,t.removeAttribute=b.removeAttribute;var _=r(17);t.convertMsLists=_.convertMsLists;var M=r(29);t.createTable=M.createTable,n.__exportStar(r(9),t),n.__exportStar(r(30),t),n.__exportStar(r(31),t),n.__exportStar(r(15),t),n.__exportStar(r(16),t),n.__exportStar(r(32),t),n.__exportStar(r(2),t),n.__exportStar(r(8),t),n.__exportStar(r(1),t),n.__exportStar(r(14),t),n.__exportStar(r(4),t),n.__exportStar(r(33),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5),i=r(1);t.removeLink=function(e,t){return function(r,i){var a=r.selection.$cursor;if(a){var s=a.parent,l=a.index(),u=r.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),f=s.childCount,d=a.pos-a.textOffset,p=s.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=g=s.child(m).nodeSize,d-=g,m-=1;for(m=l+1;m<f&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,d,d+p,c))}else n.toggleInlineFormat(e,t)(r,i)}},t.applyLink=function(e,r){var a=e.mark,s=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",s));var f=!1,d=function(){return f=!0};if(o.getParentMark(e,u[a]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,a=o.from,s=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),f=u.child(c).marks.find((function(e){return e.type===l})),d=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&f.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<d&&f.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(a,s,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:a,attrs:s},c)(e,d);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:s},c)(e,d),p=i.EditorState.create({doc:c.doc,selection:c.selection})),f?o.toggleMark(u[a],s,c)(p,d):n.toggleInlineFormat({mark:a},c,s)(p,d)}return f&&l(c),f}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),a=r.tr;a.setMeta("commandName",t);var s=!1;return i.forEach((function(t){if(t.type.isTextblock){var i={},l=e.find((function(e){return e.node===t.type.name}));l&&(i=n.addStyles(t,l.style)),s=n.changeBlockNode(r,o,a,t,t.type,i)||s}})),s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(11),i=r(7),a=r(3);t.indentBlocks=function(e,t,r){return function(n,o){var a=i.blockNodes(n),s=n.tr,l=!1;return s.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var a=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===r?u.rtlStyle:u.style,f={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var d=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(d);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,f.value=""+m+(m?u.unit:"")}}a=i.addStyles(t,[f])}a&&(l=i.changeBlockNode(n,o,s,t,t.type,a)||l)}})),l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,a=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],s=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(i,2)(e.selection);return(s||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,a=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,a)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):a&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):a&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]},{node:"listItem",style:[n("text-align","left"),n("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]},{node:"listItem",style:[n("text-align","right"),n("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]},{node:"listItem",style:[n("text-align","center"),n("list-style-position","inside")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]},{node:"listItem",style:[n("text-align","justify"),n("list-style-position","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]},{node:"listItem",style:[n("text-align",""),n("list-style-position","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(14),i=["blockquote",0],a=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],f=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},d=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:f}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},f(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},f(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},f(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},f(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},f(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},f(e),{level:6})}}],toDOM:function(e){return d(e.attrs,"level")?["h"+e.attrs.level,p(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 s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},f(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?d(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(15),i=r(16),a=r(13),s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),s||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=n.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=n.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=n.toggleMark(e.marks.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,a=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=a}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=a.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17);t.sanitize=function(e){return e=(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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,a=e.value.split(o).filter((function(e){return Boolean(e)})),s=e.ownerElement.style,l="";a.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==s[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"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,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(a.createAndFill());s.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,s)}},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=f}])})); | ||
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(l,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:h(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function w(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(5),a=r(6),s=r(10);t.changeStyles=function(e,t){var r=t.style,n=t.value,o=t.newValue,i=[];if(e){var a=e.split(/\s*;\s*/).filter((function(e){return e})),s=a.filter((function(e){if(!e.toLowerCase().trim().startsWith(r))return!0;var t=e.split(":")[1].trim();return!n.test(t)||(i.push(t),!1)}));return o&&s.push(r+": "+o),{style:s.join("; ")+(s.length?";":""),changed:!!o||s.length!==a.length,styleMatches:i}}return{changed:!1,styleMatches:i,style:null}},t.changeStyle=function(e,t){return function(r,n,o){var s=r.selection,l=s.empty,u=s.$cursor,c=s.ranges;if(l&&!u||!i.markApplies(r.doc,c,e))return!1;var f=!1;if(n)if(o=o||r.tr,u){var d=r.storedMarks||u.marks();if(e.isInSet(d)){var p=a.changeStyleFromMark(d,t);n(o.removeStoredMark(e)),n(o.addStoredMark(e.create({style:p.style}))),f=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,y=g.$to;f=a.changeStyleMark(o,v.pos,y.pos,t,e)}f&&(o.scrollIntoView(),n(o))}return f}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1},t.getTypeName=function(e){return e instanceof n.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var r=t.$from,n=r.depth;n>0;n--){var o=r.node(n);if(e(o))return{depth:n,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}},t.findNthParentNodeOfType=function(e,r){return void 0===r&&(r=1),function(n){return t.findNthParentNode((function(r){return t.getTypeName(r)===t.getTypeName(e)}),r)(n)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.hasSameMarkup=function(e,t,r,o){var i=n.Fragment.from(s.parseContent(e,r,o)),a=n.Fragment.from(s.parseContent(t,r,o));return i.eq(a)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,r){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(r)}))).map((function(e){return 0!==e.length?e:[r+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return n.indexOf("INVALID")>-1||1!==n.length?"":n[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.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$/,"")}},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(2),i=r(1),a=r(6);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(r)})),s)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var a=o.selection,s=a.empty,l=a.$cursor,u=a.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,f=0;!c&&f<u.length;f++){var d=u[f],p=d.$from,m=d.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(f=0;f<u.length;f++){var g=u[f];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var a=[],s=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){s++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),f=0;f<l.length;f++){for(var d=l[f],p=void 0,m=0;m<a.length;m++){var g=a[m];g.step===s-1&&d.eq(g.style)&&(p=g)}p?(p.to=c,p.step=s):a.push({style:d,from:Math.max(n,t),to:c,step:s})}}})),a.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,a=i.$cursor,s=i.ranges;if(o=o||r.tr,a)e.forEach((function(e){e.isInSet(r.storedMarks||a.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=s[r],i=n.$from,a=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,a.pos,e)}))},u=0;u<s.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,r=void 0===t?[]:t;return function(e,t){var n,o=e.schema,i=e.selection,a=i.empty,s=i.ranges,l=e.tr,u=(n=r,n instanceof Array?n:[n]).map((function(e){return e.name}));if(!a){var c=Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===u.indexOf(e.name)}));s.forEach((function(e){var t=e.$from,r=e.$to;c.forEach((function(e){return l.removeMark(t.pos,r.pos,e)}))})),t(l)}}},t.getParentMark=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,a=r.empty,s=e.doc;if(a)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return s.nodesBetween(n,i,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var r,n=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return n[e]})),i=t.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,f=s.empty,d=n[t.mark],p=e.doc,m=!1;return f?(r=e.storedMarks||u.marks(),m=d&&d.isInSet(r)||o.some((function(e){return n[e].isInSet(r)}))):m=d&&p.rangeHasMark(l,c,d)||o.some((function(e){return p.rangeHasMark(l,c,n[e])})),!m&&i?a.hasStyle(e,i):Boolean(m)},t.getMark=function(e,t){var r,n=e.selection,o=n.from,i=n.$from,a=n.to,s=n.empty,l=e.doc;if(s)r=t.isInSet(e.storedMarks||i.marks());else{var u=[];l.nodesBetween(o,a,(function(e){e.isInline&&u.push(t.isInSet(e.marks))})),u.some((function(e){return!e}))||(r=u[u.length-1])}return r};t.getActiveMarks=function(e,t){var r=e.selection,n=!1;if(r instanceof i.TextSelection&&r.$cursor)return{hasNodesWithoutMarks:n,marks:r.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return r.content().content.descendants((function(e){if("text"===e.type.name){var r=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&r.length>0?o.push.apply(o,r):n=!0}})),{hasNodesWithoutMarks:n,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(4),i=r(3),a=r(5);t.changeStyleFromMark=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStyles(n,t)},t.changeStyleMark=function(e,r,i,a,s){var l=s.create({style:a.style}),u=[],c=[],f=null,d=null;return e.doc.nodesBetween(r,i,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,r),y=Math.min(p+e.nodeSize,i),h=t.changeStyleFromMark(g,a);if(h.changed||a.newValue){for(var k=h.changed?{style:h.style||null}:{style:[a.style]+": "+a.newValue+";"},b=s.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,_=b?n.__assign({},b.attrs,k):k,M=s.create(_),S=M.addToSet(g),w=0;w<g.length;w++)g[w].isInSet(S)||(f&&f.to===v&&f.mark.eq(g[w])?f.to=y:(f=new o.RemoveMarkStep(v,y,g[w]),u.push(f)));var I=d&&d.to===v,x=I&&M.attrs.style===d.mark.attrs.style;I&&x?d.to=y:Object.keys(_).some((function(e){return null!==_[e]}))&&(d=new o.AddMarkStep(v,y,M),c.push(d))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,r){var n=e.selection,o=n.from,i=n.$from,a=n.to,s=n.empty,l=!1,u={style:r.name,value:r.value};return s?l=t.changeStyleFromMark(e.storedMarks||i.marks(),u).changed:e.doc.nodesBetween(o,a,(function(e,r,n){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,r){var n,o=e.selection,i=o.from,a=o.$from,s=o.to,l=o.empty,u=[],c={style:r.name,value:r.value};return l?(n=t.changeStyleFromMark(e.storedMarks||a.marks(),c)).changed&&(u=n.styleMatches):e.doc.nodesBetween(i,s,(function(e,r,o){e.isInline&&((n=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,n.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,r){return function(o,i,s){var l=o.selection,u=l.empty,c=l.$cursor,f=l.ranges;if(u&&!c||!a.markApplies(o.doc,f,e))return!1;var d=!1;if(i)if(s=s||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,r),g=p.find((function(e){return"style"===e.type.name})),v=n.__assign({},g?g.attrs:{},{style:m.style||null});i(s.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&i(s.addStoredMark(e.create(v))),d=!0}}else{for(var y=0;y<f.length;y++){var h=f[y],k=h.$from,b=h.$to;d=t.changeStyleMark(s,k.pos,b.pos,r,e)}d&&(s.scrollIntoView(),i(s))}return d}},t.toggleInlineFormat=function(e,r,n){return function(o,i){var s=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,f=e.mark;r=r||o.tr;var d=!1,p=!1,m=function(){return p=!0};if(l&&s.style){var g=s.style;d=t.changeStyle(g,{style:l.name,value:l.value})(o,m,r)}var v=[f].concat(c).filter((function(e){return s[e]})).map((function(e){return a.hasMark(o,{mark:e})&&s[e]})).filter((function(e){return e}));return v.length?a.removeMarks(v,o,m,r):d||a.toggleMark(s[f],n,r)(o,m),p&&i(r),p}},t.applyInlineStyle=function(e,r){return function(o,s){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;r&&c.setMeta("commandName",r),c.setMeta("args",e);var f=o.selection,d=f.empty,p=f.$cursor,m=f.ranges;if(d&&!p||!a.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,y={style:null};if(v&&v.attrs.style){var h=i.changeStyles(v.attrs.style,u);h.changed&&h.style&&(y.style=h.style)}else u.newValue&&(y.style=[u.style]+": "+u.newValue+";");var k=v?n.__assign({},v.attrs,y):y;return Object.keys(k).some((function(e){return null!==k[e]}))?s(c.addStoredMark(l.create(k))):s(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,s,c)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),a=r(2),s=r(1);t.changeBlockNode=function(e,t,r,n,o,s){var l=e.selection,u=l.from,c=l.to,f=!1;if(e.doc.nodesBetween(u,c,(function(t,r){if(f)return!1;if(t.isTextblock&&!t.hasMarkup(o,s))if(t.type===o)f=!0;else{var n=e.doc.resolve(r),i=n.index();f=n.parent.canReplaceWith(i,i+1,o)}})),!f)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var d=r.steps.length;r.doc.nodesBetween(u,c,(function(e,t){if(e.eq(n)&&e.isTextblock&&!e.hasMarkup(o,s)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(r.doc,r.mapping.slice(d).map(t),o)){r.clearIncompatible(r.mapping.slice(d).map(t,1),o);var l=r.mapping.slice(d),u=l.map(t,1),c=l.map(t+e.nodeSize,1),f=new a.Slice(a.Fragment.from(o.create(s,null,e.marks)),0,0);return r.step(new i.ReplaceAroundStep(u,c,u+1,c-1,f,1,!0)),!1}}))}return!0},t.blockNodes=function(e){var t=e.selection,r=t.from,n=t.to,o=t.$from,i=[];return t.node?t.node.isBlock?i.push(t.node):o.parent&&o.parent.isBlock&&i.push(o.parent):e.doc.nodesBetween(r,n,(function(e){e.isBlock&&i.push(e)})),i},t.formatBlockElements=function(e,r){return function(o,i){var a=t.blockNodes(o),s=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",r),u.setMeta("args",{value:e}),a.forEach((function(r){if(r.type.isTextblock)if("p"===e){var a=r.attrs,c=a.level,f=n.__rest(a,["level"]);l=t.changeBlockNode(o,i,u,r,s.paragraph,f)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,i,u,r,s.heading,n.__assign({},r.attrs,{level:c}))||l}else if("blockquote"===e){var d=r.attrs;c=d.level,f=n.__rest(d,["level"]);l=t.changeBlockNode(o,i,u,r,s.blockquote,f)||l}})),l&&i(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){if(e.type===n.paragraph)o.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var r=e.attrs.style,n=null,i=null;r&&t.forEach((function(e){i={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStyles(r,i),r=n.changed?n.style:r}));return 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})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,r){var n;return Object.assign(t,((n={})[r]=e[r],n))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var r,n=e.type.spec.parseDOM||[],o=e.attrs;return(r=1===n.length?n[0]:n.find((function(r){var n=a.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(r.getAttrs(n))===JSON.stringify(l(o))})))?r.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var r,n=e.schema.nodes.doc;if(e.selection instanceof s.AllSelection)r=e.doc;else if(e.selection instanceof s.TextSelection){var i=e.selection.$anchor,a=i.node(i.blockRange().depth);r=o.getTypeName(a)===o.getTypeName(n)?i.node():a}else e.selection instanceof s.NodeSelection&&(r=e.selection.node);return{name:o.getTypeName(r),tag:t.getNodeTagName(r,e.schema)}}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(3);t.parseContent=function(e,t,r){var o=document.createElement("div");return o.innerHTML=i.safeString(e),n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,a){return a(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(12);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:n.__assign({},o.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:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(2),i=r(1),a=r(4),s=r(9),l=r(8),u=r(12);function c(e,r,n){var o=e.selection,i=o.from,a=o.to,s=e.schema.nodes,l=s.paragraph,u=s.heading,c=[];r.doc.nodesBetween(i,a,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var f=c.length-1;f>=0;f--){var d=c[f],p=r.doc.resolve(r.mapping.map(d.pos));if(p.depth>0){var m=void 0;m=d.node.textContent&&d.node.textContent.length>0?r.doc.resolve(r.mapping.map(d.pos+d.node.textContent.length)):r.doc.resolve(r.mapping.map(d.pos+1));var g=p.blockRange(m);g&&r.lift(g,t.getListLiftTarget(e.schema,p,n))}}return r}function f(e){return function(t,r,n){if(!n)return!1;var o=(t=n.state).schema.nodes[e.listType],i=t.selection,a=i.$from,s=i.$to,l=a.node(-2),u=a.node(-3),c=m(t.doc,a,s,o);return(l&&l.type===o||u&&u.type===o)&&c?y(e)(t,r):(c||(y(e)(t,r),t=n.state),h(o)(t,r))}}function d(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,s=t.$to,l=i.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=s.end(l.depth);return u<c&&(r.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,a.liftTarget(l)).scrollIntoView()}function p(e,t,r,n,o,a){a||(a=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!s&&r.type===a&&l>t){s=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var f=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,f);o=d(e,p,o,a)}}})),o}function m(e,t,r,n){return 0===g(e,t,r).filter((function(e){return e.type!==n})).length}function g(e,t,r){for(var n=Array(),o=v(e,t).depth,i=e.resolve(t.start(o));i.pos<=r.start(r.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&n.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}function v(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var n=t.node(t.depth),o=t;t.depth>=1;)(n=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}function y(e){return function(t,r){var n=t.tr,o=t.selection,s=o.$from,l=o.$to;return n.doc.nodesBetween(s.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var s=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}function h(e){return s.autoJoin(l.wrapInList(e),(function(t,r){return t.type===r.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==n&&s.type!==o||(r=a),s.type!==n&&s.type!==o&&s.type!==i)break}return r},t.getListLiftTarget=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],a=e.nodes[r.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(n=s),l.type!==o&&l.type!==i&&l.type!==a)break}return n-1},t.liftSelectionList=c,t.toggleList=function(e,r,n,o,i){var a=o.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var d=n.state.schema.nodes,m={bulletList:d[o.bulletList],orderedList:d[o.orderedList],listItem:d[o.listItem]},g=t.rootListDepth(s.$to,m),v=p(e,s.$to.pos,s.$to.end(g),g,n.state.tr,m.listItem);return(v=c(e,v,o)).setMeta("commandName",i),r(v),!0}return f(o)(e,r,n)},t.toggleListCommand=f,t.liftFollowingList=p,t.isRangeOfType=m,t.getAncestorNodesBetween=g,t.findAncestorPosition=v,t.liftListItems=y,t.wrapInList=h,t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},a=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:s(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,s,l,f,d,p,m,g,v,y,h=-1,k={};for(d=0;d<e.length;d++){var b=(y={datalist:(p=e[d]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,_=u(p);if(m=_&&_.tag){if(g=y.datalevel||parseFloat(p.style.marginLeft||0),y.datalevel||p.style.marginLeft){var M=m+b;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=b,i=(f=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[f.length-1],l=a(m,_&&_.style),p.parentNode.insertBefore(l,p),h=g,k[g][M]=l),s=i===p,v=k[g][M],(g>h||!v)&&(v=a(m,_&&_.style),k[g][M]=v,t.appendChild(v)),t=c(p),v.appendChild(t),s?r=h=-1:h=g}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(10);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(6);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var a=r(19);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(20);t.insertText=s.insertText;var l=r(21);t.insertImage=l.insertImage;var u=r(22);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(7);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats;var f=r(5);t.hasMark=f.hasMark,t.getMark=f.getMark,t.getActiveMarks=f.getActiveMarks,t.removeAllMarks=f.removeAllMarks;var d=r(23);t.indent=d.indent,t.canIndentAsListItem=d.canIndentAsListItem,t.outdent=d.outdent,t.canOutdentAsListItem=d.canOutdentAsListItem,t.isIndented=d.isIndented,t.canBeIndented=d.canBeIndented,t.indentBlocks=d.indentBlocks;var p=r(13);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=r(3);t.hasSameMarkup=m.hasSameMarkup,t.getUniqueStyleValues=m.getUniqueStyleValues,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=r(24);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=r(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=r(25);t.nodes=y.nodes,t.marks=y.marks;var h=r(26);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=r(27);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var b=r(28);t.sanitize=b.sanitize,t.removeComments=b.removeComments,t.removeTag=b.removeTag,t.pasteCleanup=b.pasteCleanup,t.sanitizeClassAttr=b.sanitizeClassAttr,t.sanitizeStyleAttr=b.sanitizeStyleAttr,t.removeAttribute=b.removeAttribute;var _=r(17);t.convertMsLists=_.convertMsLists;var M=r(29);t.createTable=M.createTable,n.__exportStar(r(9),t),n.__exportStar(r(30),t),n.__exportStar(r(31),t),n.__exportStar(r(15),t),n.__exportStar(r(16),t),n.__exportStar(r(32),t),n.__exportStar(r(2),t),n.__exportStar(r(8),t),n.__exportStar(r(1),t),n.__exportStar(r(14),t),n.__exportStar(r(4),t),n.__exportStar(r(33),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5),i=r(1);t.removeLink=function(e,t){return function(r,i){var a=r.selection.$cursor;if(a){var s=a.parent,l=a.index(),u=r.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),f=s.childCount,d=a.pos-a.textOffset,p=s.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=g=s.child(m).nodeSize,d-=g,m-=1;for(m=l+1;m<f&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,d,d+p,c))}else n.toggleInlineFormat(e,t)(r,i)}},t.applyLink=function(e,r){var a=e.mark,s=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",s));var f=!1,d=function(){return f=!0};if(o.getParentMark(e,u[a]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,a=o.from,s=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),f=u.child(c).marks.find((function(e){return e.type===l})),d=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&f.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<d&&f.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(a,s,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:a,attrs:s},c)(e,d);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:s},c)(e,d),p=i.EditorState.create({doc:c.doc,selection:c.selection})),f?o.toggleMark(u[a],s,c)(p,d):n.toggleInlineFormat({mark:a},c,s)(p,d)}return f&&l(c),f}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),a=r.tr;a.setMeta("commandName",t);var s=!1;return i.forEach((function(t){if(t.type.isTextblock){var i={},l=e.find((function(e){return e.node===t.type.name}));l&&(i=n.addStyles(t,l.style)),s=n.changeBlockNode(r,o,a,t,t.type,i)||s}})),s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(11),i=r(7),a=r(3);t.indentBlocks=function(e,t,r){return function(n,o){var a=i.blockNodes(n),s=n.tr,l=!1;return s.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var a=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===r?u.rtlStyle:u.style,f={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var d=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(d);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,f.value=""+m+(m?u.unit:"")}}a=i.addStyles(t,[f])}a&&(l=i.changeBlockNode(n,o,s,t,t.type,a)||l)}})),l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,a=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],s=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(i,2)(e.selection);return(s||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,a=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,a)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):a&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):a&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]},{node:"listItem",style:[n("text-align","left"),n("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]},{node:"listItem",style:[n("text-align","right"),n("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]},{node:"listItem",style:[n("text-align","center"),n("list-style-position","inside")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]},{node:"listItem",style:[n("text-align","justify"),n("list-style-position","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]},{node:"listItem",style:[n("text-align",""),n("list-style-position","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(14),i=["blockquote",0],a=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],f=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},d=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:f}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},f(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},f(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},f(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},f(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},f(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},f(e),{level:6})}}],toDOM:function(e){return d(e.attrs,"level")?["h"+e.attrs.level,p(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 s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},f(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?d(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:f}],toDOM:function(e){return d(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(15),i=r(16),a=r(13),s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),s||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=n.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=n.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=n.toggleMark(e.marks.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,a=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=a}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=a.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17);t.sanitize=function(e){return e=(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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,a=e.value.split(o).filter((function(e){return Boolean(e)})),s=e.ownerElement.style,l="";a.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==s[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"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,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(a.createAndFill());s.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,s)}},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=f}])})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap"),require("prosemirror-view")):"function"==typeof define&&define.amd?define(["tslib","prosemirror-state","prosemirror-model","prosemirror-transform","prosemirror-schema-list","prosemirror-commands","prosemirror-tables","prosemirror-history","prosemirror-inputrules","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-keymap","prosemirror-view"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("tslib"),require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap"),require("prosemirror-view")):e.KendoEditorCommon=t(e.tslib,e["prosemirror-state"],e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-tables"],e["prosemirror-history"],e["prosemirror-inputrules"],e["prosemirror-dropcursor"],e["prosemirror-gapcursor"],e["prosemirror-keymap"],e["prosemirror-view"])}(window,(function(e,t,r,n,o,i,s,a,l,u,c,d,f){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=18)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(5),s=r(6),a=r(10);t.changeStyles=function(e,t){var r=t.style,n=t.value,o=t.newValue,i=[];if(e){var s=e.split(/\s*;\s*/).filter((function(e){return e})),a=s.filter((function(e){if(!e.toLowerCase().trim().startsWith(r))return!0;var t=e.split(":")[1].trim();return!n.test(t)||(i.push(t),!1)}));return o&&a.push(r+": "+o),{style:a.join("; ")+(a.length?";":""),changed:!!o||a.length!==s.length,styleMatches:i}}return{changed:!1,styleMatches:i,style:null}},t.changeStyle=function(e,t){return function(r,n,o){var a=r.selection,l=a.empty,u=a.$cursor,c=a.ranges;if(l&&!u||!i.markApplies(r.doc,c,e))return!1;var d=!1;if(n)if(o=o||r.tr,u){var f=r.storedMarks||u.marks();if(e.isInSet(f)){var p=s.changeStyleFromMark(f,t);n(o.removeStoredMark(e)),n(o.addStoredMark(e.create({style:p.style}))),d=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,y=g.$to;d=s.changeStyleMark(o,v.pos,y.pos,t,e)}d&&(o.scrollIntoView(),n(o))}return d}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1},t.getTypeName=function(e){return e instanceof n.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var r=t.$from,n=r.depth;n>0;n--){var o=r.node(n);if(e(o))return{depth:n,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}},t.findNthParentNodeOfType=function(e,r){return void 0===r&&(r=1),function(n){return t.findNthParentNode((function(r){return t.getTypeName(r)===t.getTypeName(e)}),r)(n)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.hasSameMarkup=function(e,t,r,o){var i=n.Fragment.from(a.parseContent(e,r,o)),s=n.Fragment.from(a.parseContent(t,r,o));return i.eq(s)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,r){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(r)}))).map((function(e){return 0!==e.length?e:[r+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return n.indexOf("INVALID")>-1||1!==n.length?"":n[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.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$/,"")}},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(2),i=r(1),s=r(6);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,s=o.$to,a=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,s.pos,(function(e){if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(r)})),a)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var s=o.selection,a=s.empty,l=s.$cursor,u=s.ranges;if(a&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var s=[],a=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){a++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<s.length;m++){var g=s[m];g.step===a-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=a):s.push({style:f,from:Math.max(n,t),to:c,step:a})}}})),s.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,s=i.$cursor,a=i.ranges;if(o=o||r.tr,s)e.forEach((function(e){e.isInSet(r.storedMarks||s.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=a[r],i=n.$from,s=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,s.pos,e)}))},u=0;u<a.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,r=void 0===t?[]:t;return function(e,t){var n,o=e.schema,i=e.selection,s=i.$cursor,a=i.from,l=i.to,u=e.tr,c=(n=r,n instanceof Array?n:[n]).map((function(e){return e.name}));s||(Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===c.indexOf(e.name)})).forEach((function(e){return u.removeMark(a,l,e)})),t(u))}},t.getParentMark=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,s=r.empty,a=e.doc;if(s)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return a.nodesBetween(n,i,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var r,n=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return n[e]})),i=t.altStyle,a=e.selection,l=a.from,u=a.$from,c=a.to,d=a.empty,f=n[t.mark],p=e.doc,m=!1;return d?(r=e.storedMarks||u.marks(),m=f&&f.isInSet(r)||o.some((function(e){return n[e].isInSet(r)}))):m=f&&p.rangeHasMark(l,c,f)||o.some((function(e){return p.rangeHasMark(l,c,n[e])})),!m&&i?s.hasStyle(e,i):Boolean(m)},t.getMark=function(e,t){var r,n=e.selection,o=n.from,i=n.$from,s=n.to,a=n.empty,l=e.doc;if(a)r=t.isInSet(e.storedMarks||i.marks());else{var u=[];l.nodesBetween(o,s,(function(e){e.isInline&&u.push(t.isInSet(e.marks))})),u.some((function(e){return!e}))||(r=u[u.length-1])}return r};t.getActiveMarks=function(e,t){var r=e.selection,n=!1;if(r instanceof i.TextSelection&&r.$cursor)return{hasNodesWithoutMarks:n,marks:r.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return r.content().content.descendants((function(e){if("text"===e.type.name){var r=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&r.length>0?o.push.apply(o,r):n=!0}})),{hasNodesWithoutMarks:n,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(4),i=r(3),s=r(5);t.changeStyleFromMark=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStyles(n,t)},t.changeStyleMark=function(e,r,i,s,a){var l=a.create({style:s.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(r,i,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,r),y=Math.min(p+e.nodeSize,i),h=t.changeStyleFromMark(g,s);if(h.changed||s.newValue){for(var k=h.changed?{style:h.style||null}:{style:[s.style]+": "+s.newValue+";"},M=a.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,b=M?n.__assign({},M.attrs,k):k,S=a.create(b),_=S.addToSet(g),I=0;I<g.length;I++)g[I].isInSet(_)||(d&&d.to===v&&d.mark.eq(g[I])?d.to=y:(d=new o.RemoveMarkStep(v,y,g[I]),u.push(d)));var x=f&&f.to===v,L=x&&S.attrs.style===f.mark.attrs.style;x&&L?f.to=y:Object.keys(b).some((function(e){return null!==b[e]}))&&(f=new o.AddMarkStep(v,y,S),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,r){var n=e.selection,o=n.from,i=n.$from,s=n.to,a=n.empty,l=!1,u={style:r.name,value:r.value};return a?l=t.changeStyleFromMark(e.storedMarks||i.marks(),u).changed:e.doc.nodesBetween(o,s,(function(e,r,n){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,r){var n,o=e.selection,i=o.from,s=o.$from,a=o.to,l=o.empty,u=[],c={style:r.name,value:r.value};return l?(n=t.changeStyleFromMark(e.storedMarks||s.marks(),c)).changed&&(u=n.styleMatches):e.doc.nodesBetween(i,a,(function(e,r,o){e.isInline&&((n=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,n.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,r){return function(o,i,a){var l=o.selection,u=l.empty,c=l.$cursor,d=l.ranges;if(u&&!c||!s.markApplies(o.doc,d,e))return!1;var f=!1;if(i)if(a=a||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,r),g=p.find((function(e){return"style"===e.type.name})),v=n.__assign({},g?g.attrs:{},{style:m.style||null});i(a.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&i(a.addStoredMark(e.create(v))),f=!0}}else{for(var y=0;y<d.length;y++){var h=d[y],k=h.$from,M=h.$to;f=t.changeStyleMark(a,k.pos,M.pos,r,e)}f&&(a.scrollIntoView(),i(a))}return f}},t.toggleInlineFormat=function(e,r,n){return function(o,i){var a=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,d=e.mark;r=r||o.tr;var f=!1,p=!1,m=function(){return p=!0};if(l&&a.style){var g=a.style;f=t.changeStyle(g,{style:l.name,value:l.value})(o,m,r)}var v=[d].concat(c).filter((function(e){return a[e]})).map((function(e){return s.hasMark(o,{mark:e})&&a[e]})).filter((function(e){return e}));return v.length?s.removeMarks(v,o,m,r):f||s.toggleMark(a[d],n,r)(o,m),p&&i(r),p}},t.applyInlineStyle=function(e,r){return function(o,a){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;r&&c.setMeta("commandName",r),c.setMeta("args",e);var d=o.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,y={style:null};if(v&&v.attrs.style){var h=i.changeStyles(v.attrs.style,u);h.changed&&h.style&&(y.style=h.style)}else u.newValue&&(y.style=[u.style]+": "+u.newValue+";");var k=v?n.__assign({},v.attrs,y):y;return Object.keys(k).some((function(e){return null!==k[e]}))?a(c.addStoredMark(l.create(k))):a(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,a,c)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),s=r(2),a=r(1);t.changeBlockNode=function(e,t,r,n,o,a){var l=e.selection,u=l.from,c=l.to,d=!1;if(e.doc.nodesBetween(u,c,(function(t,r){if(d)return!1;if(t.isTextblock&&!t.hasMarkup(o,a))if(t.type===o)d=!0;else{var n=e.doc.resolve(r),i=n.index();d=n.parent.canReplaceWith(i,i+1,o)}})),!d)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var f=r.steps.length;r.doc.nodesBetween(u,c,(function(e,t){if(e.eq(n)&&e.isTextblock&&!e.hasMarkup(o,a)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(r.doc,r.mapping.slice(f).map(t),o)){r.clearIncompatible(r.mapping.slice(f).map(t,1),o);var l=r.mapping.slice(f),u=l.map(t,1),c=l.map(t+e.nodeSize,1),d=new s.Slice(s.Fragment.from(o.create(a,null,e.marks)),0,0);return r.step(new i.ReplaceAroundStep(u,c,u+1,c-1,d,1,!0)),!1}}))}return!0},t.blockNodes=function(e){var t=e.selection,r=t.from,n=t.to,o=t.$from,i=[];return t.node?t.node.isBlock?i.push(t.node):o.parent&&o.parent.isBlock&&i.push(o.parent):e.doc.nodesBetween(r,n,(function(e){e.isBlock&&i.push(e)})),i},t.formatBlockElements=function(e,r){return function(o,i){var s=t.blockNodes(o),a=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",r),u.setMeta("args",{value:e}),s.forEach((function(r){if(r.type.isTextblock)if("p"===e){var s=r.attrs,c=s.level,d=n.__rest(s,["level"]);l=t.changeBlockNode(o,i,u,r,a.paragraph,d)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,i,u,r,a.heading,n.__assign({},r.attrs,{level:c}))||l}else if("blockquote"===e){var f=r.attrs;c=f.level,d=n.__rest(f,["level"]);l=t.changeBlockNode(o,i,u,r,a.blockquote,d)||l}})),l&&i(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){if(e.type===n.paragraph)o.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var r=e.attrs.style,n=null,i=null;r&&t.forEach((function(e){i={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStyles(r,i),r=n.changed?n.style:r}));return 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})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,r){var n;return Object.assign(t,((n={})[r]=e[r],n))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var r,n=e.type.spec.parseDOM||[],o=e.attrs;return(r=1===n.length?n[0]:n.find((function(r){var n=s.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(r.getAttrs(n))===JSON.stringify(l(o))})))?r.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var r,n=e.schema.nodes.doc;if(e.selection instanceof a.AllSelection)r=e.doc;else if(e.selection instanceof a.TextSelection){var i=e.selection.$anchor,s=i.node(i.blockRange().depth);r=o.getTypeName(s)===o.getTypeName(n)?i.node():s}else e.selection instanceof a.NodeSelection&&(r=e.selection.node);return{name:o.getTypeName(r),tag:t.getNodeTagName(r,e.schema)}}},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(3);t.parseContent=function(e,t,r){var o=document.createElement("div");return o.innerHTML=i.safeString(e),n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,s){return s(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(12);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:n.__assign({},o.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:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(2),i=r(1),s=r(4),a=r(9),l=r(8),u=r(12);function c(e,r,n){var o=e.selection,i=o.from,s=o.to,a=e.schema.nodes,l=a.paragraph,u=a.heading,c=[];r.doc.nodesBetween(i,s,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var d=c.length-1;d>=0;d--){var f=c[d],p=r.doc.resolve(r.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?r.doc.resolve(r.mapping.map(f.pos+f.node.textContent.length)):r.doc.resolve(r.mapping.map(f.pos+1));var g=p.blockRange(m);g&&r.lift(g,t.getListLiftTarget(e.schema,p,n))}}return r}function d(e){return function(t,r,n){if(!n)return!1;var o=(t=n.state).schema.nodes[e.listType],i=t.selection,s=i.$from,a=i.$to,l=s.node(-2),u=s.node(-3),c=m(t.doc,s,a,o);return(l&&l.type===o||u&&u.type===o)&&c?y(e)(t,r):(c||(y(e)(t,r),t=n.state),h(o)(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,a=t.$to,l=i.blockRange(a,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=a.end(l.depth);return u<c&&(r.step(new s.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,s.liftTarget(l)).scrollIntoView()}function p(e,t,r,n,o,s){s||(s=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!a&&r.type===s&&l>t){a=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,d);o=f(e,p,o,s)}}})),o}function m(e,t,r,n){return 0===g(e,t,r).filter((function(e){return e.type!==n})).length}function g(e,t,r){for(var n=Array(),o=v(e,t).depth,i=e.resolve(t.start(o));i.pos<=r.start(r.depth);){var s=Math.min(i.depth,o),a=i.node(s);if(a&&n.push(a),0===s)break;var l=e.resolve(i.after(s));if(l.start(s)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}function v(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var n=t.node(t.depth),o=t;t.depth>=1;)(n=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}function y(e){return function(t,r){var n=t.tr,o=t.selection,a=o.$from,l=o.$to;return n.doc.nodesBetween(a.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var a=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=a.$from.blockRange(a.$to);if(!l||a.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&s.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}function h(e){return a.autoJoin(l.wrapInList(e),(function(t,r){return t.type===r.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,s=e.depth-1;s>0;s--){var a=e.node(s);if(a.type!==n&&a.type!==o||(r=s),a.type!==n&&a.type!==o&&a.type!==i)break}return r},t.getListLiftTarget=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],s=e.nodes[r.listItem],a=t.depth;a>0;a--){var l=t.node(a);if(l.type!==o&&l.type!==i||(n=a),l.type!==o&&l.type!==i&&l.type!==s)break}return n-1},t.liftSelectionList=c,t.toggleList=function(e,r,n,o,i){var s=o.listType,a=e.selection,l=a.$from.node(a.$from.depth-2),u=a.$to.node(a.$to.depth-2);if(l&&l.type.name===s&&u&&u.type.name===s){var f=n.state.schema.nodes,m={bulletList:f[o.bulletList],orderedList:f[o.orderedList],listItem:f[o.listItem]},g=t.rootListDepth(a.$to,m),v=p(e,a.$to.pos,a.$to.end(g),g,n.state.tr,m.listItem);return(v=c(e,v,o)).setMeta("commandName",i),r(v),!0}return d(o)(e,r,n)},t.toggleListCommand=d,t.liftFollowingList=p,t.isRangeOfType=m,t.getAncestorNodesBetween=g,t.findAncestorPosition=v,t.liftListItems=y,t.wrapInList=h,t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=s},function(e,t){e.exports=a},function(e,t){e.exports=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},s=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},a=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:a(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,a,l,d,f,p,m,g,v,y,h=-1,k={};for(f=0;f<e.length;f++){var M=(y={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,b=u(p);if(m=b&&b.tag){if(g=y.datalevel||parseFloat(p.style.marginLeft||0),y.datalevel||p.style.marginLeft){var S=m+M;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=M,i=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=s(m,b&&b.style),p.parentNode.insertBefore(l,p),h=g,k[g][S]=l),a=i===p,v=k[g][S],(g>h||!v)&&(v=s(m,b&&b.style),k[g][S]=v,t.appendChild(v)),t=c(p),v.appendChild(t),a?r=h=-1:h=g}}else!t||a&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(10);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(6);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var s=r(19);t.applyLink=s.applyLink,t.removeLink=s.removeLink;var a=r(20);t.insertText=a.insertText;var l=r(21);t.insertImage=l.insertImage;var u=r(22);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(7);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats;var d=r(5);t.hasMark=d.hasMark,t.getMark=d.getMark,t.getActiveMarks=d.getActiveMarks,t.removeAllMarks=d.removeAllMarks;var f=r(23);t.indent=f.indent,t.canIndentAsListItem=f.canIndentAsListItem,t.outdent=f.outdent,t.canOutdentAsListItem=f.canOutdentAsListItem,t.isIndented=f.isIndented,t.canBeIndented=f.canBeIndented,t.indentBlocks=f.indentBlocks;var p=r(13);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=r(3);t.hasSameMarkup=m.hasSameMarkup,t.getUniqueStyleValues=m.getUniqueStyleValues,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=r(24);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=r(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=r(25);t.nodes=y.nodes,t.marks=y.marks;var h=r(26);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=r(27);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var M=r(28);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var b=r(17);t.convertMsLists=b.convertMsLists;var S=r(29);t.createTable=S.createTable,n.__exportStar(r(9),t),n.__exportStar(r(30),t),n.__exportStar(r(31),t),n.__exportStar(r(15),t),n.__exportStar(r(16),t),n.__exportStar(r(32),t),n.__exportStar(r(2),t),n.__exportStar(r(8),t),n.__exportStar(r(1),t),n.__exportStar(r(14),t),n.__exportStar(r(4),t),n.__exportStar(r(33),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5),i=r(1);t.removeLink=function(e,t){return function(r,i){var s=r.selection.$cursor;if(s){var a=s.parent,l=s.index(),u=r.schema.marks[e.mark],c=a.child(l).marks.find((function(e){return e.type===u})),d=a.childCount,f=s.pos-s.textOffset,p=a.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(a.child(m).marks);)p+=g=a.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(a.child(m).marks);)p+=a.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,i)}},t.applyLink=function(e,r){var s=e.mark,a=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",a));var d=!1,f=function(){return d=!0};if(o.getParentMark(e,u[s]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,s=o.from,a=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(s,a,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:s,attrs:a},c)(e,f);else{var p=e;o.hasMark(e,{mark:s})&&(t.removeLink({mark:s,attrs:a},c)(e,f),p=i.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[s],a,c)(p,f):n.toggleInlineFormat({mark:s},c,a)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),s=r.tr;s.setMeta("commandName",t);var a=!1;return i.forEach((function(t){if(t.type.isTextblock){var i={},l=e.find((function(e){return e.node===t.type.name}));l&&(i=n.addStyles(t,l.style)),a=n.changeBlockNode(r,o,s,t,t.type,i)||a}})),a&&o(s.scrollIntoView()),a}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(11),i=r(7),s=r(3);t.indentBlocks=function(e,t,r){return function(n,o){var s=i.blockNodes(n),a=n.tr,l=!1;return a.setMeta("commandName",t),s.forEach((function(t){if(t.type.isTextblock){var s=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===r?u.rtlStyle:u.style,d={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var f=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(f);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,d.value=""+m+(m?u.unit:"")}}s=i.addStyles(t,[d])}s&&(l=i.changeBlockNode(n,o,a,t,t.type,s)||l)}})),l&&o(a.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,s=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=s.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],a=!!s.findNthParentNodeOfType(o,2)(e.selection),l=!!s.findNthParentNodeOfType(i,2)(e.selection);return(a||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,s=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,s)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],s=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):s&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],s=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):s&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]},{node:"listItem",style:[n("text-align","left"),n("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]},{node:"listItem",style:[n("text-align","right"),n("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]},{node:"listItem",style:[n("text-align","center"),n("list-style-position","inside")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]},{node:"listItem",style:[n("text-align","justify"),n("list-style-position","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]},{node:"listItem",style:[n("text-align",""),n("list-style-position","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(14),i=["blockquote",0],s=["hr"],a=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return s}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(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 a}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(15),i=r(16),s=r(13),a="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),a||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=n.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=n.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=n.toggleMark(e.marks.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,s=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=s}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=s.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17);t.sanitize=function(e){return e=(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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,s=e.value.split(o).filter((function(e){return Boolean(e)})),a=e.ownerElement.style,l="";s.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==a[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"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,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,s=e.table_cell,a=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(s.createAndFill());a.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,a)}},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t){e.exports=f}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap"),require("prosemirror-view")):"function"==typeof define&&define.amd?define(["tslib","prosemirror-state","prosemirror-model","prosemirror-transform","prosemirror-schema-list","prosemirror-commands","prosemirror-tables","prosemirror-history","prosemirror-inputrules","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-keymap","prosemirror-view"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("tslib"),require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap"),require("prosemirror-view")):e.KendoEditorCommon=t(e.tslib,e["prosemirror-state"],e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-tables"],e["prosemirror-history"],e["prosemirror-inputrules"],e["prosemirror-dropcursor"],e["prosemirror-gapcursor"],e["prosemirror-keymap"],e["prosemirror-view"])}(window,(function(e,t,r,n,o,i,s,a,l,u,c,d,f){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=18)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(5),s=r(6),a=r(10);t.changeStyles=function(e,t){var r=t.style,n=t.value,o=t.newValue,i=[];if(e){var s=e.split(/\s*;\s*/).filter((function(e){return e})),a=s.filter((function(e){if(!e.toLowerCase().trim().startsWith(r))return!0;var t=e.split(":")[1].trim();return!n.test(t)||(i.push(t),!1)}));return o&&a.push(r+": "+o),{style:a.join("; ")+(a.length?";":""),changed:!!o||a.length!==s.length,styleMatches:i}}return{changed:!1,styleMatches:i,style:null}},t.changeStyle=function(e,t){return function(r,n,o){var a=r.selection,l=a.empty,u=a.$cursor,c=a.ranges;if(l&&!u||!i.markApplies(r.doc,c,e))return!1;var d=!1;if(n)if(o=o||r.tr,u){var f=r.storedMarks||u.marks();if(e.isInSet(f)){var p=s.changeStyleFromMark(f,t);n(o.removeStoredMark(e)),n(o.addStoredMark(e.create({style:p.style}))),d=!0}}else{for(var m=0;m<c.length;m++){var g=c[m],v=g.$from,y=g.$to;d=s.changeStyleMark(o,v.pos,y.pos,t,e)}d&&(o.scrollIntoView(),n(o))}return d}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1},t.getTypeName=function(e){return e instanceof n.Node?e.type.name:e.name},t.findParentNode=function(e){return function(t){for(var r=t.$from,n=r.depth;n>0;n--){var o=r.node(n);if(e(o))return{depth:n,node:o}}}},t.findNthParentNode=function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}},t.findNthParentNodeOfType=function(e,r){return void 0===r&&(r=1),function(n){return t.findNthParentNode((function(r){return t.getTypeName(r)===t.getTypeName(e)}),r)(n)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.isNullOrUndefined=function(e){return null==e},t.safeString=function(e){return t.isNullOrUndefined(e)?"":e.toString()},t.hasSameMarkup=function(e,t,r,o){var i=n.Fragment.from(a.parseContent(e,r,o)),s=n.Fragment.from(a.parseContent(t,r,o));return i.eq(s)},t.first=function(e){return e[0]},t.last=function(e){return e[e.length-1]},t.split=function(e){return function(t){return t.split(e)}},t.trim=function(e){return e.trim()},t.filter=function(e){return function(t){return t.filter(e)}},t.getUniqueStyleValues=function(e,r){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter((function(e){return"style"===e.type.name})).map((function(e){return e.attrs.style})).map(t.split(";")).map(t.filter((function(e){return e.includes(r)}))).map((function(e){return 0!==e.length?e:[r+": INVALID"]})).map(t.first).map(t.split(":")).map(t.last).map(t.trim).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat([t])}),[]);return n.indexOf("INVALID")>-1||1!==n.length?"":n[0]},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.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$/,"")}},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(2),i=r(1),s=r(6);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,s=o.$to,a=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,s.pos,(function(e){if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(r)})),a)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var s=o.selection,a=s.empty,l=s.$cursor,u=s.ranges;if(a&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var s=[],a=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){a++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<s.length;m++){var g=s[m];g.step===a-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=a):s.push({style:f,from:Math.max(n,t),to:c,step:a})}}})),s.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,s=i.$cursor,a=i.ranges;if(o=o||r.tr,s)e.forEach((function(e){e.isInSet(r.storedMarks||s.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=a[r],i=n.$from,s=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,s.pos,e)}))},u=0;u<a.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,r=void 0===t?[]:t;return function(e,t){var n,o=e.schema,i=e.selection,s=i.empty,a=i.ranges,l=e.tr,u=(n=r,n instanceof Array?n:[n]).map((function(e){return e.name}));if(!s){var c=Object.keys(o.marks).map((function(e){return o.marks[e]})).filter((function(e){return-1===u.indexOf(e.name)}));a.forEach((function(e){var t=e.$from,r=e.$to;c.forEach((function(e){return l.removeMark(t.pos,r.pos,e)}))})),t(l)}}},t.getParentMark=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,s=r.empty,a=e.doc;if(s)return t.isInSet(e.storedMarks||o.marks())||null;var l=[];return a.nodesBetween(n,i,(function(e){e.isInline&&l.push(t.isInSet(e.marks))})),1===l.length&&l[0]?l[0]:null},t.hasMark=function(e,t){var r,n=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return n[e]})),i=t.altStyle,a=e.selection,l=a.from,u=a.$from,c=a.to,d=a.empty,f=n[t.mark],p=e.doc,m=!1;return d?(r=e.storedMarks||u.marks(),m=f&&f.isInSet(r)||o.some((function(e){return n[e].isInSet(r)}))):m=f&&p.rangeHasMark(l,c,f)||o.some((function(e){return p.rangeHasMark(l,c,n[e])})),!m&&i?s.hasStyle(e,i):Boolean(m)},t.getMark=function(e,t){var r,n=e.selection,o=n.from,i=n.$from,s=n.to,a=n.empty,l=e.doc;if(a)r=t.isInSet(e.storedMarks||i.marks());else{var u=[];l.nodesBetween(o,s,(function(e){e.isInline&&u.push(t.isInSet(e.marks))})),u.some((function(e){return!e}))||(r=u[u.length-1])}return r};t.getActiveMarks=function(e,t){var r=e.selection,n=!1;if(r instanceof i.TextSelection&&r.$cursor)return{hasNodesWithoutMarks:n,marks:r.$cursor.marks().filter((function(e){return!t||e.type.name===t.name}))};var o=[];return r.content().content.descendants((function(e){if("text"===e.type.name){var r=t?function(e,t){return t.marks.filter((function(t){return t.type.name===e.name}))}(t,e):e.marks;e.marks.length>0&&r.length>0?o.push.apply(o,r):n=!0}})),{hasNodesWithoutMarks:n,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(4),i=r(3),s=r(5);t.changeStyleFromMark=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStyles(n,t)},t.changeStyleMark=function(e,r,i,s,a){var l=a.create({style:s.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(r,i,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,r),y=Math.min(p+e.nodeSize,i),h=t.changeStyleFromMark(g,s);if(h.changed||s.newValue){for(var k=h.changed?{style:h.style||null}:{style:[s.style]+": "+s.newValue+";"},M=a.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,b=M?n.__assign({},M.attrs,k):k,S=a.create(b),_=S.addToSet(g),I=0;I<g.length;I++)g[I].isInSet(_)||(d&&d.to===v&&d.mark.eq(g[I])?d.to=y:(d=new o.RemoveMarkStep(v,y,g[I]),u.push(d)));var x=f&&f.to===v,L=x&&S.attrs.style===f.mark.attrs.style;x&&L?f.to=y:Object.keys(b).some((function(e){return null!==b[e]}))&&(f=new o.AddMarkStep(v,y,S),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0},t.hasStyle=function(e,r){var n=e.selection,o=n.from,i=n.$from,s=n.to,a=n.empty,l=!1,u={style:r.name,value:r.value};return a?l=t.changeStyleFromMark(e.storedMarks||i.marks(),u).changed:e.doc.nodesBetween(o,s,(function(e,r,n){!l&&e.isInline&&(l=t.changeStyleFromMark(e.marks,u).changed)})),l},t.getInlineStyles=function(e,r){var n,o=e.selection,i=o.from,s=o.$from,a=o.to,l=o.empty,u=[],c={style:r.name,value:r.value};return l?(n=t.changeStyleFromMark(e.storedMarks||s.marks(),c)).changed&&(u=n.styleMatches):e.doc.nodesBetween(i,a,(function(e,r,o){e.isInline&&((n=t.changeStyleFromMark(e.marks,c)).changed?u.push.apply(u,n.styleMatches):u.push(null))})),u.filter((function(e){return null!==e}))},t.changeStyle=function(e,r){return function(o,i,a){var l=o.selection,u=l.empty,c=l.$cursor,d=l.ranges;if(u&&!c||!s.markApplies(o.doc,d,e))return!1;var f=!1;if(i)if(a=a||o.tr,c){var p=o.storedMarks||c.marks();if(e.isInSet(p)){var m=t.changeStyleFromMark(p,r),g=p.find((function(e){return"style"===e.type.name})),v=n.__assign({},g?g.attrs:{},{style:m.style||null});i(a.removeStoredMark(e)),Object.keys(v).some((function(e){return null!==v[e]}))&&i(a.addStoredMark(e.create(v))),f=!0}}else{for(var y=0;y<d.length;y++){var h=d[y],k=h.$from,M=h.$to;f=t.changeStyleMark(a,k.pos,M.pos,r,e)}f&&(a.scrollIntoView(),i(a))}return f}},t.toggleInlineFormat=function(e,r,n){return function(o,i){var a=o.schema.marks,l=e.altStyle,u=e.altMarks,c=void 0===u?[]:u,d=e.mark;r=r||o.tr;var f=!1,p=!1,m=function(){return p=!0};if(l&&a.style){var g=a.style;f=t.changeStyle(g,{style:l.name,value:l.value})(o,m,r)}var v=[d].concat(c).filter((function(e){return a[e]})).map((function(e){return s.hasMark(o,{mark:e})&&a[e]})).filter((function(e){return e}));return v.length?s.removeMarks(v,o,m,r):f||s.toggleMark(a[d],n,r)(o,m),p&&i(r),p}},t.applyInlineStyle=function(e,r){return function(o,a){var l=o.schema.marks.style,u={style:e.style,value:/^.+$/,newValue:e.value},c=o.tr;r&&c.setMeta("commandName",r),c.setMeta("args",e);var d=o.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s.markApplies(o.doc,m,l))return!1;if(p){var g=o.storedMarks||p.marks(),v=l.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,y={style:null};if(v&&v.attrs.style){var h=i.changeStyles(v.attrs.style,u);h.changed&&h.style&&(y.style=h.style)}else u.newValue&&(y.style=[u.style]+": "+u.newValue+";");var k=v?n.__assign({},v.attrs,y):y;return Object.keys(k).some((function(e){return null!==k[e]}))?a(c.addStoredMark(l.create(k))):a(c.removeStoredMark(l)),!0}return t.changeStyle(l,u)(o,a,c)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),s=r(2),a=r(1);t.changeBlockNode=function(e,t,r,n,o,a){var l=e.selection,u=l.from,c=l.to,d=!1;if(e.doc.nodesBetween(u,c,(function(t,r){if(d)return!1;if(t.isTextblock&&!t.hasMarkup(o,a))if(t.type===o)d=!0;else{var n=e.doc.resolve(r),i=n.index();d=n.parent.canReplaceWith(i,i+1,o)}})),!d)return!1;if(t){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var f=r.steps.length;r.doc.nodesBetween(u,c,(function(e,t){if(e.eq(n)&&e.isTextblock&&!e.hasMarkup(o,a)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(r.doc,r.mapping.slice(f).map(t),o)){r.clearIncompatible(r.mapping.slice(f).map(t,1),o);var l=r.mapping.slice(f),u=l.map(t,1),c=l.map(t+e.nodeSize,1),d=new s.Slice(s.Fragment.from(o.create(a,null,e.marks)),0,0);return r.step(new i.ReplaceAroundStep(u,c,u+1,c-1,d,1,!0)),!1}}))}return!0},t.blockNodes=function(e){var t=e.selection,r=t.from,n=t.to,o=t.$from,i=[];return t.node?t.node.isBlock?i.push(t.node):o.parent&&o.parent.isBlock&&i.push(o.parent):e.doc.nodesBetween(r,n,(function(e){e.isBlock&&i.push(e)})),i},t.formatBlockElements=function(e,r){return function(o,i){var s=t.blockNodes(o),a=o.schema.nodes,l=!1,u=o.tr;return u.setMeta("commandName",r),u.setMeta("args",{value:e}),s.forEach((function(r){if(r.type.isTextblock)if("p"===e){var s=r.attrs,c=s.level,d=n.__rest(s,["level"]);l=t.changeBlockNode(o,i,u,r,a.paragraph,d)||l}else if(/^h[1-6]$/i.test(e)){c=parseInt(e.substr(1),10);l=t.changeBlockNode(o,i,u,r,a.heading,n.__assign({},r.attrs,{level:c}))||l}else if("blockquote"===e){var f=r.attrs;c=f.level,d=n.__rest(f,["level"]);l=t.changeBlockNode(o,i,u,r,a.blockquote,d)||l}})),l&&i(u.scrollIntoView()),l}},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){if(e.type===n.paragraph)o.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){o.push("h"+t);break}})),o},t.addStyles=function(e,t){var r=e.attrs.style,n=null,i=null;r&&t.forEach((function(e){i={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStyles(r,i),r=n.changed?n.style:r}));return 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})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i};var l=function(e){return function(e,t){return Object.keys(e).filter((function(e){return t(e)})).reduce((function(t,r){var n;return Object.assign(t,((n={})[r]=e[r],n))}),{})}(e,(function(t){return null!==e[t]&&void 0!==e[t]&&""!==e[t]}))};t.getNodeTagName=function(e,t){var r,n=e.type.spec.parseDOM||[],o=e.attrs;return(r=1===n.length?n[0]:n.find((function(r){var n=s.DOMSerializer.fromSchema(t).serializeNode(e);return JSON.stringify(r.getAttrs(n))===JSON.stringify(l(o))})))?r.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},t.activeNode=function(e){var r,n=e.schema.nodes.doc;if(e.selection instanceof a.AllSelection)r=e.doc;else if(e.selection instanceof a.TextSelection){var i=e.selection.$anchor,s=i.node(i.blockRange().depth);r=o.getTypeName(s)===o.getTypeName(n)?i.node():s}else e.selection instanceof a.NodeSelection&&(r=e.selection.node);return{name:o.getTypeName(r),tag:t.getNodeTagName(r,e.schema)}}},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1),i=r(3);t.parseContent=function(e,t,r){var o=document.createElement("div");return o.innerHTML=i.safeString(e),n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,s){return s(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(12);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:n.__assign({},o.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:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(2),i=r(1),s=r(4),a=r(9),l=r(8),u=r(12);function c(e,r,n){var o=e.selection,i=o.from,s=o.to,a=e.schema.nodes,l=a.paragraph,u=a.heading,c=[];r.doc.nodesBetween(i,s,(function(e,t){e.type!==l&&e.type!==u||c.push({node:e,pos:t})}));for(var d=c.length-1;d>=0;d--){var f=c[d],p=r.doc.resolve(r.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?r.doc.resolve(r.mapping.map(f.pos+f.node.textContent.length)):r.doc.resolve(r.mapping.map(f.pos+1));var g=p.blockRange(m);g&&r.lift(g,t.getListLiftTarget(e.schema,p,n))}}return r}function d(e){return function(t,r,n){if(!n)return!1;var o=(t=n.state).schema.nodes[e.listType],i=t.selection,s=i.$from,a=i.$to,l=s.node(-2),u=s.node(-3),c=m(t.doc,s,a,o);return(l&&l.type===o||u&&u.type===o)&&c?y(e)(t,r):(c||(y(e)(t,r),t=n.state),h(o)(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,a=t.$to,l=i.blockRange(a,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=a.end(l.depth);return u<c&&(r.step(new s.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,s.liftTarget(l)).scrollIntoView()}function p(e,t,r,n,o,s){s||(s=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!a&&r.type===s&&l>t){a=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,d);o=f(e,p,o,s)}}})),o}function m(e,t,r,n){return 0===g(e,t,r).filter((function(e){return e.type!==n})).length}function g(e,t,r){for(var n=Array(),o=v(e,t).depth,i=e.resolve(t.start(o));i.pos<=r.start(r.depth);){var s=Math.min(i.depth,o),a=i.node(s);if(a&&n.push(a),0===s)break;var l=e.resolve(i.after(s));if(l.start(s)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}function v(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var n=t.node(t.depth),o=t;t.depth>=1;)(n=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}function y(e){return function(t,r){var n=t.tr,o=t.selection,a=o.$from,l=o.$to;return n.doc.nodesBetween(a.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var a=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=a.$from.blockRange(a.$to);if(!l||a.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&s.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}function h(e){return a.autoJoin(l.wrapInList(e),(function(t,r){return t.type===r.type&&t.type===e}))}t.rootListDepth=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,s=e.depth-1;s>0;s--){var a=e.node(s);if(a.type!==n&&a.type!==o||(r=s),a.type!==n&&a.type!==o&&a.type!==i)break}return r},t.getListLiftTarget=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],s=e.nodes[r.listItem],a=t.depth;a>0;a--){var l=t.node(a);if(l.type!==o&&l.type!==i||(n=a),l.type!==o&&l.type!==i&&l.type!==s)break}return n-1},t.liftSelectionList=c,t.toggleList=function(e,r,n,o,i){var s=o.listType,a=e.selection,l=a.$from.node(a.$from.depth-2),u=a.$to.node(a.$to.depth-2);if(l&&l.type.name===s&&u&&u.type.name===s){var f=n.state.schema.nodes,m={bulletList:f[o.bulletList],orderedList:f[o.orderedList],listItem:f[o.listItem]},g=t.rootListDepth(a.$to,m),v=p(e,a.$to.pos,a.$to.end(g),g,n.state.tr,m.listItem);return(v=c(e,v,o)).setMeta("commandName",i),r(v),!0}return d(o)(e,r,n)},t.toggleListCommand=d,t.liftFollowingList=p,t.isRangeOfType=m,t.getAncestorNodesBetween=g,t.findAncestorPosition=v,t.liftListItems=y,t.wrapInList=h,t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=s},function(e,t){e.exports=a},function(e,t){e.exports=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},s=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},a=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:a(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,a,l,d,f,p,m,g,v,y,h=-1,k={};for(f=0;f<e.length;f++){var M=(y={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,b=u(p);if(m=b&&b.tag){if(g=y.datalevel||parseFloat(p.style.marginLeft||0),y.datalevel||p.style.marginLeft){var S=m+M;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=M,i=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=s(m,b&&b.style),p.parentNode.insertBefore(l,p),h=g,k[g][S]=l),a=i===p,v=k[g][S],(g>h||!v)&&(v=s(m,b&&b.style),k[g][S]=v,t.appendChild(v)),t=c(p),v.appendChild(t),a?r=h=-1:h=g}}else!t||a&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(10);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(6);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var s=r(19);t.applyLink=s.applyLink,t.removeLink=s.removeLink;var a=r(20);t.insertText=a.insertText;var l=r(21);t.insertImage=l.insertImage;var u=r(22);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(7);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats;var d=r(5);t.hasMark=d.hasMark,t.getMark=d.getMark,t.getActiveMarks=d.getActiveMarks,t.removeAllMarks=d.removeAllMarks;var f=r(23);t.indent=f.indent,t.canIndentAsListItem=f.canIndentAsListItem,t.outdent=f.outdent,t.canOutdentAsListItem=f.canOutdentAsListItem,t.isIndented=f.isIndented,t.canBeIndented=f.canBeIndented,t.indentBlocks=f.indentBlocks;var p=r(13);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=r(3);t.hasSameMarkup=m.hasSameMarkup,t.getUniqueStyleValues=m.getUniqueStyleValues,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=r(24);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=r(11);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=r(25);t.nodes=y.nodes,t.marks=y.marks;var h=r(26);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=r(27);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var M=r(28);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var b=r(17);t.convertMsLists=b.convertMsLists;var S=r(29);t.createTable=S.createTable,n.__exportStar(r(9),t),n.__exportStar(r(30),t),n.__exportStar(r(31),t),n.__exportStar(r(15),t),n.__exportStar(r(16),t),n.__exportStar(r(32),t),n.__exportStar(r(2),t),n.__exportStar(r(8),t),n.__exportStar(r(1),t),n.__exportStar(r(14),t),n.__exportStar(r(4),t),n.__exportStar(r(33),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5),i=r(1);t.removeLink=function(e,t){return function(r,i){var s=r.selection.$cursor;if(s){var a=s.parent,l=s.index(),u=r.schema.marks[e.mark],c=a.child(l).marks.find((function(e){return e.type===u})),d=a.childCount,f=s.pos-s.textOffset,p=a.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(a.child(m).marks);)p+=g=a.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(a.child(m).marks);)p+=a.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,i)}},t.applyLink=function(e,r){var s=e.mark,a=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",a));var d=!1,f=function(){return d=!0};if(o.getParentMark(e,u[s]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,s=o.from,a=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(s,a,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:s,attrs:a},c)(e,f);else{var p=e;o.hasMark(e,{mark:s})&&(t.removeLink({mark:s,attrs:a},c)(e,f),p=i.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[s],a,c)(p,f):n.toggleInlineFormat({mark:s},c,a)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),s=r.tr;s.setMeta("commandName",t);var a=!1;return i.forEach((function(t){if(t.type.isTextblock){var i={},l=e.find((function(e){return e.node===t.type.name}));l&&(i=n.addStyles(t,l.style)),a=n.changeBlockNode(r,o,s,t,t.type,i)||a}})),a&&o(s.scrollIntoView()),a}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(11),i=r(7),s=r(3);t.indentBlocks=function(e,t,r){return function(n,o){var s=i.blockNodes(n),a=n.tr,l=!1;return a.setMeta("commandName",t),s.forEach((function(t){if(t.type.isTextblock){var s=void 0,u=e.find((function(e){return e.node===t.type.name}));if(u){var c="rtl"===r?u.rtlStyle:u.style,d={name:c,value:u.step>0?""+u.step+u.unit:""};if(t.attrs.style){var f=new RegExp(c+":\\s?(\\d+)"+u.unit,"i"),p=t.attrs.style.match(f);if(p){var m=parseFloat(p[1])+u.step;m=m<=0?"":m,d.value=""+m+(m?u.unit:"")}}s=i.addStyles(t,[d])}s&&(l=i.changeBlockNode(n,o,a,t,t.type,s)||l)}})),l&&o(a.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,s=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=s.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],a=!!s.findNthParentNodeOfType(o,2)(e.selection),l=!!s.findNthParentNodeOfType(i,2)(e.selection);return(a||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,s=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,s)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],s=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):s&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],s=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):s&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]},{node:"listItem",style:[n("text-align","left"),n("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]},{node:"listItem",style:[n("text-align","right"),n("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]},{node:"listItem",style:[n("text-align","center"),n("list-style-position","inside")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]},{node:"listItem",style:[n("text-align","justify"),n("list-style-position","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]},{node:"listItem",style:[n("text-align",""),n("list-style-position","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(14),i=["blockquote",0],s=["hr"],a=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return s}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(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 a}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(15),i=r(16),s=r(13),a="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),a||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=n.toggleMark(e.marks.strong)),e.marks.em&&(t["Mod-i"]=n.toggleMark(e.marks.em)),e.marks.underline&&(t["Mod-u"]=n.toggleMark(e.marks.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,s=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=s}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=s.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17);t.sanitize=function(e){return e=(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,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,s=e.value.split(o).filter((function(e){return Boolean(e)})),a=e.ownerElement.style,l="";s.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==a[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"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,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,s=e.table_cell,a=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(s.createAndFill());a.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,a)}},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t){e.exports=f}])})); |
@@ -148,3 +148,2 @@ import { RemoveMarkStep } from 'prosemirror-transform'; | ||
var toArray = function (x) { return x instanceof Array ? x : [x]; }; | ||
//angular | ||
/** | ||
@@ -157,10 +156,13 @@ * @hidden | ||
var schema = state.schema; | ||
var _a = state.selection, $cursor = _a.$cursor, from = _a.from, to = _a.to; | ||
var _a = state.selection, empty = _a.empty, ranges = _a.ranges; | ||
var tr = state.tr; | ||
var excludedMarkTypes = toArray(except).map(function (mt) { return mt.name; }); | ||
if (!$cursor) { | ||
Object.keys(schema.marks) | ||
if (!empty) { | ||
var marks_1 = Object.keys(schema.marks) | ||
.map(function (m) { return schema.marks[m]; }) | ||
.filter(function (mt) { return excludedMarkTypes.indexOf(mt.name) === -1; }) | ||
.forEach(function (mt) { return tr.removeMark(from, to, mt); }); | ||
.filter(function (mt) { return excludedMarkTypes.indexOf(mt.name) === -1; }); | ||
ranges.forEach(function (range) { | ||
var $from = range.$from, $to = range.$to; | ||
marks_1.forEach(function (mark) { return tr.removeMark($from.pos, $to.pos, mark); }); | ||
}); | ||
dispatch(tr); | ||
@@ -195,9 +197,9 @@ } | ||
else { | ||
var marks_1 = []; | ||
var marks_2 = []; | ||
stateDoc.nodesBetween(from, to, function (node) { | ||
if (node.isInline) { | ||
marks_1.push(markType.isInSet(node.marks)); | ||
marks_2.push(markType.isInSet(node.marks)); | ||
} | ||
}); | ||
return marks_1.length === 1 && marks_1[0] ? marks_1[0] : null; | ||
return marks_2.length === 1 && marks_2[0] ? marks_2[0] : null; | ||
} | ||
@@ -240,10 +242,10 @@ }; | ||
else { | ||
var marks_2 = []; | ||
var marks_3 = []; | ||
stateDoc.nodesBetween(from, to, function (node) { | ||
if (node.isInline) { | ||
marks_2.push(markType.isInSet(node.marks)); | ||
marks_3.push(markType.isInSet(node.marks)); | ||
} | ||
}); | ||
if (!marks_2.some(function (m) { return !m; })) { | ||
mark = marks_2[marks_2.length - 1]; | ||
if (!marks_3.some(function (m) { return !m; })) { | ||
mark = marks_3[marks_3.length - 1]; | ||
} | ||
@@ -250,0 +252,0 @@ } |
@@ -145,3 +145,2 @@ import { RemoveMarkStep } from 'prosemirror-transform'; | ||
const toArray = (x) => x instanceof Array ? x : [x]; | ||
//angular | ||
/** | ||
@@ -152,10 +151,13 @@ * @hidden | ||
const schema = state.schema; | ||
const { $cursor, from, to } = state.selection; | ||
const { empty, ranges } = state.selection; | ||
const tr = state.tr; | ||
const excludedMarkTypes = toArray(except).map(mt => mt.name); | ||
if (!$cursor) { | ||
Object.keys(schema.marks) | ||
if (!empty) { | ||
const marks = Object.keys(schema.marks) | ||
.map(m => schema.marks[m]) | ||
.filter(mt => excludedMarkTypes.indexOf(mt.name) === -1) | ||
.forEach(mt => tr.removeMark(from, to, mt)); | ||
.filter(mt => excludedMarkTypes.indexOf(mt.name) === -1); | ||
ranges.forEach(range => { | ||
let { $from, $to } = range; | ||
marks.forEach(mark => tr.removeMark($from.pos, $to.pos, mark)); | ||
}); | ||
dispatch(tr); | ||
@@ -162,0 +164,0 @@ } |
@@ -150,3 +150,2 @@ "use strict"; | ||
var toArray = function (x) { return x instanceof Array ? x : [x]; }; | ||
//angular | ||
/** | ||
@@ -159,10 +158,13 @@ * @hidden | ||
var schema = state.schema; | ||
var _a = state.selection, $cursor = _a.$cursor, from = _a.from, to = _a.to; | ||
var _a = state.selection, empty = _a.empty, ranges = _a.ranges; | ||
var tr = state.tr; | ||
var excludedMarkTypes = toArray(except).map(function (mt) { return mt.name; }); | ||
if (!$cursor) { | ||
Object.keys(schema.marks) | ||
if (!empty) { | ||
var marks_1 = Object.keys(schema.marks) | ||
.map(function (m) { return schema.marks[m]; }) | ||
.filter(function (mt) { return excludedMarkTypes.indexOf(mt.name) === -1; }) | ||
.forEach(function (mt) { return tr.removeMark(from, to, mt); }); | ||
.filter(function (mt) { return excludedMarkTypes.indexOf(mt.name) === -1; }); | ||
ranges.forEach(function (range) { | ||
var $from = range.$from, $to = range.$to; | ||
marks_1.forEach(function (mark) { return tr.removeMark($from.pos, $to.pos, mark); }); | ||
}); | ||
dispatch(tr); | ||
@@ -197,9 +199,9 @@ } | ||
else { | ||
var marks_1 = []; | ||
var marks_2 = []; | ||
stateDoc.nodesBetween(from, to, function (node) { | ||
if (node.isInline) { | ||
marks_1.push(markType.isInSet(node.marks)); | ||
marks_2.push(markType.isInSet(node.marks)); | ||
} | ||
}); | ||
return marks_1.length === 1 && marks_1[0] ? marks_1[0] : null; | ||
return marks_2.length === 1 && marks_2[0] ? marks_2[0] : null; | ||
} | ||
@@ -242,10 +244,10 @@ }; | ||
else { | ||
var marks_2 = []; | ||
var marks_3 = []; | ||
stateDoc.nodesBetween(from, to, function (node) { | ||
if (node.isInline) { | ||
marks_2.push(markType.isInSet(node.marks)); | ||
marks_3.push(markType.isInSet(node.marks)); | ||
} | ||
}); | ||
if (!marks_2.some(function (m) { return !m; })) { | ||
mark = marks_2[marks_2.length - 1]; | ||
if (!marks_3.some(function (m) { return !m; })) { | ||
mark = marks_3[marks_3.length - 1]; | ||
} | ||
@@ -252,0 +254,0 @@ } |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-editor-common",["tslib","prosemirror-commands","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-schema-list","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view"],function(_){var s,o,i,l,u,c,d,f,p,m,g,v,y;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){o=t(e)},function(e){i=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){c=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){v=t(e)},function(e){y=t(e)}],execute:function(){function r(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,a;a={},r.m=n=[function(e,t){e.exports=m},function(e,t){e.exports=s},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(3),a=t(0),v=t(6),y=t(5),i=t(17);r.changeStyles=function(e,t){var n=t.style,r=t.value,a=t.newValue,s=[];if(e){var o=e.split(/\s*;\s*/).filter(function(e){return e}),i=o.filter(function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(s.push(t),!1)});return a&&i.push(n+": "+a),{style:i.join("; ")+(i.length?";":""),changed:!!a||i.length!==o.length,styleMatches:s}}return{changed:!1,styleMatches:s,style:null}},r.changeStyle=function(m,g){return function(e,t,n){var r=e.selection,a=r.empty,s=r.$cursor,o=r.ranges;if(a&&!s||!v.markApplies(e.doc,o,m))return!1;var i=!1;if(t)if(n=n||e.tr,s){var l,u=e.storedMarks||s.marks();m.isInSet(u)&&(l=y.changeStyleFromMark(u,g),t(n.removeStoredMark(m)),t(n.addStoredMark(m.create({style:l.style}))),i=!0)}else{for(var c=0;c<o.length;c++)var d=o[c],f=d.$from,p=d.$to,i=y.changeStyleMark(n,f.pos,p.pos,g,m);i&&(n.scrollIntoView(),t(n))}return i}},r.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var a=n.index(r);if(n.node(r).canReplaceWith(a,a,t))return!0}return!1},r.getTypeName=function(e){return e instanceof o.Node?e.type.name:e.name},r.findParentNode=function(a){return function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r))return{depth:n,node:r}}}},r.findNthParentNode=function(a,s){return void 0===s&&(s=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r)&&0==--s)return{depth:n,node:r}}}},r.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return r.findNthParentNode(function(e){return r.getTypeName(e)===r.getTypeName(t)},n)(e)}},r.insertNode=function(r,a){return function(e,t){var n=e.tr.replaceSelectionWith(r);a&&n.scrollIntoView(),t(n)}},r.isNullOrUndefined=function(e){return null==e},r.safeString=function(e){return r.isNullOrUndefined(e)?"":e.toString()},r.hasSameMarkup=function(e,t,n,r){var a=o.Fragment.from(i.parseContent(e,n,r)),s=o.Fragment.from(i.parseContent(t,n,r));return a.eq(s)},r.first=function(e){return e[0]},r.last=function(e){return e[e.length-1]},r.split=function(t){return function(e){return e.split(t)}},r.trim=function(e){return e.trim()},r.filter=function(t){return function(e){return e.filter(t)}},r.getUniqueStyleValues=function(e,t){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter(function(e){return"style"===e.type.name}).map(function(e){return e.attrs.style}).map(r.split(";")).map(r.filter(function(e){return e.includes(t)})).map(function(e){return 0!==e.length?e:[t+": INVALID"]}).map(r.first).map(r.split(":")).map(r.last).map(r.trim).reduce(function(e,t){return-1<e.indexOf(t)?e:e.concat([t])},[]);return-1<n.indexOf("INVALID")||1!==n.length?"":n[0]},r.getSelectionText=function(e){var t=e.selection;if(t instanceof a.TextSelection||t instanceof a.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},r.getNodeFromSelection=function(e){if(e.selection instanceof a.NodeSelection)return e.selection.node},r.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$/,"")}},function(e,t){e.exports=f},function(e,t){e.exports=v},function(e,I,t){"use strict";Object.defineProperty(I,"__esModule",{value:!0});var L=t(1),x=t(4),v=t(2),h=t(6);I.changeStyleFromMark=function(e,t){var n=e.find(function(e){return"style"===e.type.name}),r=n&&n.attrs.style;return v.changeStyles(r,t)},I.changeStyleMark=function(t,g,v,y,h){var k=h.create({style:y.style}),M=[],b=[],S=null,_=null;return t.doc.nodesBetween(g,v,function(e,t,n){if(e.isInline){var r=e.marks;if(!k.isInSet(r)&&n.type.allowsMarkType(k.type)){var a=Math.max(t,g),s=Math.min(t+e.nodeSize,v),o=I.changeStyleFromMark(r,y);if(o.changed||y.newValue){for(var i=o.changed?{style:o.style||null}:{style:[y.style]+": "+y.newValue+";"},l=h.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,u=l?L.__assign({},l.attrs,i):i,c=h.create(u),d=c.addToSet(r),f=0;f<r.length;f++)r[f].isInSet(d)||(S&&S.to===a&&S.mark.eq(r[f])?S.to=s:(S=new x.RemoveMarkStep(a,s,r[f]),M.push(S)));var p=_&&_.to===a,m=p&&c.attrs.style===_.mark.attrs.style;p&&m?_.to=s:Object.keys(u).some(function(e){return null!==u[e]})&&(_=new x.AddMarkStep(a,s,c),b.push(_))}}}}),M.forEach(function(e){return t.step(e)}),b.forEach(function(e){return t.step(e)}),0<M.length+b.length},I.hasStyle=function(e,t){var n=e.selection,r=n.from,a=n.$from,s=n.to,o=n.empty,i=!1,l={style:t.name,value:t.value};return o?i=I.changeStyleFromMark(e.storedMarks||a.marks(),l).changed:e.doc.nodesBetween(r,s,function(e,t,n){!i&&e.isInline&&(i=I.changeStyleFromMark(e.marks,l).changed)}),i},I.getInlineStyles=function(e,t){var r,n=e.selection,a=n.from,s=n.$from,o=n.to,i=n.empty,l=[],u={style:t.name,value:t.value};return i?(r=I.changeStyleFromMark(e.storedMarks||s.marks(),u)).changed&&(l=r.styleMatches):e.doc.nodesBetween(a,o,function(e,t,n){e.isInline&&((r=I.changeStyleFromMark(e.marks,u)).changed?l.push.apply(l,r.styleMatches):l.push(null))}),l.filter(function(e){return null!==e})},I.changeStyle=function(v,y){return function(e,t,n){var r=e.selection,a=r.empty,s=r.$cursor,o=r.ranges;if(a&&!s||!h.markApplies(e.doc,o,v))return!1;var i=!1;if(t)if(n=n||e.tr,s){var l,u,c,d=e.storedMarks||s.marks();v.isInSet(d)&&(l=I.changeStyleFromMark(d,y),u=d.find(function(e){return"style"===e.type.name}),c=L.__assign({},u?u.attrs:{},{style:l.style||null}),t(n.removeStoredMark(v)),Object.keys(c).some(function(e){return null!==c[e]})&&t(n.addStoredMark(v.create(c))),i=!0)}else{for(var f=0;f<o.length;f++)var p=o[f],m=p.$from,g=p.$to,i=I.changeStyleMark(n,m.pos,g.pos,y,v);i&&(n.scrollIntoView(),t(n))}return i}},I.toggleInlineFormat=function(f,p,m){return function(t,e){var n=t.schema.marks,r=f.altStyle,a=f.altMarks,s=void 0===a?[]:a,o=f.mark;p=p||t.tr;function i(){return c=!0}var l,u=!1,c=!1;r&&n.style&&(l=n.style,u=I.changeStyle(l,{style:r.name,value:r.value})(t,i,p));var d=[o].concat(s).filter(function(e){return n[e]}).map(function(e){return h.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return d.length?h.removeMarks(d,t,i,p):u||h.toggleMark(n[o],m,p)(t,i),c&&e(p),c}},I.applyInlineStyle=function(m,g){return function(e,t){var n=e.schema.marks.style,r={style:m.style,value:/^.+$/,newValue:m.value},a=e.tr;g&&a.setMeta("commandName",g),a.setMeta("args",m);var s=e.selection,o=s.empty,i=s.$cursor,l=s.ranges;if(o&&!i||!h.markApplies(e.doc,l,n))return!1;if(i){var u,c=e.storedMarks||i.marks(),d=n.isInSet(c)?c.find(function(e){return"style"===e.type.name}):null,f={style:null};d&&d.attrs.style?(u=v.changeStyles(d.attrs.style,r)).changed&&u.style&&(f.style=u.style):r.newValue&&(f.style=[r.style]+": "+r.newValue+";");var p=d?L.__assign({},d.attrs,f):f;return Object.keys(p).some(function(e){return null!==p[e]})?t(a.addStoredMark(n.create(p))):t(a.removeStoredMark(n)),!0}return I.changeStyle(n,r)(e,t,a)}}},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(4),v=t(3),o=t(0),m=t(5);g.markApplies=function(s,o,i){for(var e=0;e<o.length;e++){var t=function(e){var t=o[e],n=t.$from,r=t.$to,a=0===n.depth&&s.type.allowsMarkType(i);if(s.nodesBetween(n.pos,r.pos,function(e){return!a&&void(a=e.inlineContent&&e.type.allowsMarkType(i))}),a)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,a=n.$cursor,s=n.ranges;if(r&&!a||!g.markApplies(e.doc,s,f))return!1;if(t)if(a)f.isInSet(e.storedMarks||a.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var o=!1,i=0;!o&&i<s.length;i++)var l=s[i],u=l.$from,c=l.$to,o=e.doc.rangeHasMark(u.pos,c.pos,f);for(i=0;i<s.length;i++){var d=s[i],u=d.$from,c=d.$to;o?m.removeMark(u.pos,c.pos,f):m.addMark(u.pos,c.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,c,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(c,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof v.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var a=Math.min(t+e.nodeSize,d),s=0;s<r.length;s++){for(var o=r[s],i=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&o.eq(u.style)&&(i=u)}i?(i.to=a,i.step=m):p.push({style:o,from:Math.max(t,c),to:a,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(a,t,n,s){var e=t.selection,r=e.$cursor,o=e.ranges;if(s=s||t.tr,r)a.forEach(function(e){e.isInSet(t.storedMarks||r.marks())&&n(s.removeStoredMark(e))});else{for(var i=0;i<o.length;i++)!function(e){var t=o[e],n=t.$from,r=t.$to;a.forEach(function(e){g.removeMark(s,n.pos,r.pos,e)})}(i);n(s.scrollIntoView())}return!0},g.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,u=void 0===t?[]:t;return function(e,t){var n=e.schema,r=e.selection,a=r.$cursor,s=r.from,o=r.to,i=e.tr,l=(u instanceof Array?u:[u]).map(function(e){return e.name});a||(Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===l.indexOf(e.name)}).forEach(function(e){return i.removeMark(s,o,e)}),t(i))}},g.getParentMark=function(e,t){var n=e.selection,r=n.from,a=n.$from,s=n.to,o=n.empty,i=e.doc;if(o)return t.isInSet(e.storedMarks||a.marks())||null;var l=[];return i.nodesBetween(r,s,function(e){e.isInline&&l.push(t.isInSet(e.marks))}),1===l.length&&l[0]?l[0]:null},g.hasMark=function(e,t){var n,r=e.schema.marks,a=(t.altMarks||[]).filter(function(e){return r[e]}),s=t.altStyle,o=e.selection,i=o.from,l=o.$from,u=o.to,c=o.empty,d=r[t.mark],f=e.doc,p=!1;return!(p=c?(n=e.storedMarks||l.marks(),d&&d.isInSet(n)||a.some(function(e){return r[e].isInSet(n)})):d&&f.rangeHasMark(i,u,d)||a.some(function(e){return f.rangeHasMark(i,u,r[e])}))&&s?m.hasStyle(e,s):Boolean(p)},g.getMark=function(e,t){var n,r,a=e.selection,s=a.from,o=a.$from,i=a.to,l=a.empty,u=e.doc;return l?n=t.isInSet(e.storedMarks||o.marks()):(r=[],u.nodesBetween(s,i,function(e){e.isInline&&r.push(t.isInSet(e.marks))}),r.some(function(e){return!e})||(n=r[r.length-1])),n},g.getActiveMarks=function(e,r){var t=e.selection,a=!1;if(t instanceof o.TextSelection&&t.$cursor)return{hasNodesWithoutMarks:a,marks:t.$cursor.marks().filter(function(e){return!r||e.type.name===r.name})};var s=[];return t.content().content.descendants(function(e){var t,n;"text"===e.type.name&&(t=r?(n=r,e.marks.filter(function(e){return e.type.name===n.name})):e.marks,0<e.marks.length&&0<t.length?s.push.apply(s,t):a=!0)}),{hasNodesWithoutMarks:a,marks:s}}},function(e,t){e.exports=o},function(e,t){e.exports=p},function(e,d,t){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var f=t(1),s=t(2),v=t(4),y=t(3),o=t(0);d.changeBlockNode=function(a,e,d,f,p,m){var t=a.selection,n=t.from,r=t.to,s=!1;if(a.doc.nodesBetween(n,r,function(e,t){return!s&&void(e.isTextblock&&!e.hasMarkup(p,m)&&(s=e.type===p||(r=(n=a.doc.resolve(t)).index(),n.parent.canReplaceWith(r,r+1,p))));var n,r}),!s)return!1;if(e){if(!p.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var g=d.steps.length;d.doc.nodesBetween(n,r,function(e,t){if(e.eq(f)&&e.isTextblock&&!e.hasMarkup(p,m)&&(o=d.doc,i=d.mapping.slice(g).map(t),l=p,u=o.resolve(i),c=u.index(),u.parent.canReplaceWith(c,c+1,l))){d.clearIncompatible(d.mapping.slice(g).map(t,1),p);var n=d.mapping.slice(g),r=n.map(t,1),a=n.map(t+e.nodeSize,1),s=new y.Slice(y.Fragment.from(p.create(m,null,e.marks)),0,0);return d.step(new v.ReplaceAroundStep(r,a,r+1,a-1,s,1,!0)),!1}var o,i,l,u,c})}return!0},d.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,a=t.$from,s=[];return t.node?t.node.isBlock?s.push(t.node):a.parent&&a.parent.isBlock&&s.push(a.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&s.push(e)}),s},d.formatBlockElements=function(c,t){return function(s,o){var e=d.blockNodes(s),i=s.schema.nodes,l=!1,u=s.tr;return u.setMeta("commandName",t),u.setMeta("args",{value:c}),e.forEach(function(e){var t,n,r,a;e.type.isTextblock&&("p"===c?(r=(t=e.attrs).level,a=f.__rest(t,["level"]),l=d.changeBlockNode(s,o,u,e,i.paragraph,a)||l):/^h[1-6]$/i.test(c)?(r=parseInt(c.substr(1),10),l=d.changeBlockNode(s,o,u,e,i.heading,f.__assign({},e.attrs,{level:r}))||l):"blockquote"===c&&(r=(n=e.attrs).level,a=f.__rest(n,["level"]),l=d.changeBlockNode(s,o,u,e,i.blockquote,a)||l))}),l&&o(u.scrollIntoView()),l}},d.getBlockFormats=function(e){var t=d.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){if(e.type===n.paragraph)r.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){r.push("h"+t);break}}),r},d.addStyles=function(e,t){var n,r,a=e.attrs.style;return a&&t.forEach(function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=s.changeStyles(a,r),a=n.changed?n.style:a}),a=a||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:a||null})},d.hasNode=function(e,t){var n=e.selection,r=n.from,a=n.to,s=!1;return e.doc.nodesBetween(r,a,function(e){return!(s=s||e.type===t)}),s};function i(n){return r=n,Object.keys(r).filter(function(e){return null!==n[t=e]&&void 0!==n[t]&&""!==n[t];var t}).reduce(function(e,t){var n;return Object.assign(e,((n={})[t]=r[t],n))},{});var r}d.getNodeTagName=function(n,r){var e,t=n.type.spec.parseDOM||[],a=n.attrs;return(e=1===t.length?t[0]:t.find(function(e){var t=y.DOMSerializer.fromSchema(r).serializeNode(n);return JSON.stringify(e.getAttrs(t))===JSON.stringify(i(a))}))?e.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},d.activeNode=function(e){var t,n,r,a=e.schema.nodes.doc;return e.selection instanceof o.AllSelection?r=e.doc:e.selection instanceof o.TextSelection?(n=(t=e.selection.$anchor).node(t.blockRange().depth),r=s.getTypeName(n)===s.getTypeName(a)?t.node():n):e.selection instanceof o.NodeSelection&&(r=e.selection.node),{name:s.getTypeName(r),tag:d.getNodeTagName(r,e.schema)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function k(e){return/^MsoListParagraph/.test(e.className)}function M(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function b(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n}function S(e){function t(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")}var n,r,a,s=(s=e.innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," ");return/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(s)?{tag:"ul",style:(a=t(M(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(a)?null:/^o/.test(a)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(s)?{tag:"ol",style:(n=t(M(e)),r=null,/^\d/.test(n)||(r=(/^[a-z]/.test(n)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(n)?"roman":"alpha")),r)}:void 0}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,a=function(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)):k(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?a(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){a(e.children,n)})))})};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});var n=new Set;return a(t.children,n),n.forEach(function(e){for(var t,n,r,a,s,o,i,l,u,c,d,f=-1,p={},m=0;m<e.length;m++){var g,v,y=(d={datalist:(l=e[m]).getAttribute("datalist"),datalevel:l.getAttribute("datalevel")}).datalist,h=S(l);(u=h&&h.tag)?(v=d.datalevel||parseFloat(l.style.marginLeft||0),(d.datalevel||l.style.marginLeft)&&(g=u+y,p[v]||(p[v]={}),(!n||n<0)&&(n=v,r=y,a=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],o=b(u,h&&h.style),l.parentNode.insertBefore(o,l),p[f=v][g]=o),s=a===l,c=p[v][g],(f<v||!c)&&(c=b(u,h&&h.style),p[v][g]=c,t.appendChild(c)),t=function(e){var t,n=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?M(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r}(l),c.appendChild(t),s?n=f=-1:f=v)):!t||s&&!k(l)||(l.style.marginLeft&&(l.style.marginLeft=""),l.style.marginLeft&&(l.style.margin=""),t.appendChild(l))}}),t.innerHTML}},function(e,t){e.exports=c},function(e,t){e.exports=u},function(e,t){e.exports=g},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var r=t(1),f=t(3),p=t(0),m=t(4),a=t(7),s=t(8),o=t(15);function v(e,t,n){var r=e.selection,a=r.from,s=r.to,o=e.schema.nodes,i=o.paragraph,l=o.heading,u=[];t.doc.nodesBetween(a,s,function(e,t){e.type!==i&&e.type!==l||u.push({node:e,pos:t})});for(var c=u.length-1;0<=c;c--){var d,f,p=u[c],m=t.doc.resolve(t.mapping.map(p.pos));0<m.depth&&(d=void 0,d=p.node.textContent&&0<p.node.textContent.length?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1)),(f=m.blockRange(d))&&t.lift(f,g.getListLiftTarget(e.schema,m,n)))}return t}function y(c){return function(e,t,n){if(!n)return!1;var r=(e=n.state).schema.nodes[c.listType],a=e.selection,s=a.$from,o=a.$to,i=s.node(-2),l=s.node(-3),u=d(e.doc,s,o,r);return(i&&i.type===r||l&&l.type===r)&&u?k(c)(e,t):(u||(k(c)(e,t),e=n.state),M(r)(e,t))}}function h(o,i,e,l,u,c){c=c||o.schema.nodes.listItem;var d=!1;return u.doc.nodesBetween(i,e,function(e,t){if(!d&&e.type===c&&i<t){d=!0;for(var n=l+3;l+2<n;){var r=u.doc.resolve(u.mapping.map(t)),n=r.depth,a=u.doc.resolve(u.mapping.map(t+e.textContent.length)),s=new p.TextSelection(r,a);u=function(e,t,n,r){r=r||e.schema.nodes.listItem;var a=t.$from,s=t.$to,o=a.blockRange(s,function(e){return e.childCount&&e.firstChild.type===r});if(!o||o.depth<2||a.node(o.depth-1).type!==r)return n;var i=o.end,l=s.end(o.depth);return i<l&&(n.step(new m.ReplaceAroundStep(i-1,l,i,l,new f.Slice(f.Fragment.from(r.create(void 0,o.parent.copy())),1,0),1,!0)),o=new f.NodeRange(n.doc.resolve(a.pos),n.doc.resolve(l),o.depth)),n.lift(o,m.liftTarget(o)).scrollIntoView()}(o,s,u,c)}}}),u}function d(e,t,n,r){return 0===i(e,t,n).filter(function(e){return e.type!==r}).length}function i(e,t,n){for(var r=Array(),a=u(e,t).depth,s=e.resolve(t.start(a));s.pos<=n.start(n.depth);){var o=Math.min(s.depth,a),i=s.node(o);if(i&&r.push(i),0===o)break;var l=e.resolve(s.after(o));if(l.start(o)>=e.nodeSize-2)break;l.depth!==s.depth&&(l=e.resolve(l.pos+2)),s=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}function u(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),a=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(a=t);return a}function k(i){return function(s,e){var o=s.tr,t=s.selection,n=t.$from,r=t.$to;return o.doc.nodesBetween(n.pos,r.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){var n=new p.NodeSelection(o.doc.resolve(o.mapping.map(t))),r=n.$from.blockRange(n.$to);if(!r||n.$from.parent.type!==s.schema.nodes[i.listItem])return!1;var a=r&&m.liftTarget(r);if(null==a)return!1;o.lift(r,a)}}),e&&e(o),!0}}function M(n){return a.autoJoin(s.wrapInList(n),function(e,t){return e.type===t.type&&e.type===n})}g.rootListDepth=function(e,t){for(var n,r=t.bulletList,a=t.orderedList,s=t.listItem,o=e.depth-1;0<o;o--){var i=e.node(o);if(i.type!==r&&i.type!==a||(n=o),i.type!==r&&i.type!==a&&i.type!==s)break}return n},g.getListLiftTarget=function(e,t,n){for(var r=t.depth,a=e.nodes[n.bulletList],s=e.nodes[n.orderedList],o=e.nodes[n.listItem],i=t.depth;0<i;i--){var l=t.node(i);if(l.type!==a&&l.type!==s||(r=i),l.type!==a&&l.type!==s&&l.type!==o)break}return r-1},g.liftSelectionList=v,g.toggleList=function(e,t,n,r,a){var s=r.listType,o=e.selection,i=o.$from.node(o.$from.depth-2),l=o.$to.node(o.$to.depth-2);if(i&&i.type.name===s&&l&&l.type.name===s){var u=n.state.schema.nodes,c={bulletList:u[r.bulletList],orderedList:u[r.orderedList],listItem:u[r.listItem]},d=g.rootListDepth(o.$to,c),f=h(e,o.$to.pos,o.$to.end(d),d,n.state.tr,c.listItem);return(f=v(e,f,r)).setMeta("commandName",a),t(f),!0}return y(r)(e,t,n)},g.toggleListCommand=y,g.liftFollowingList=h,g.isRangeOfType=d,g.getAncestorNodesBetween=i,g.findAncestorPosition=u,g.liftListItems=k,g.wrapInList=M,g.toggleUnorderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:o.bulletList.listType},o.bulletList.types))},g.toggleOrderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:o.orderedList.listType},o.orderedList.types))},g.splitListItemKeepMarks=function(e){return function(n,r){return s.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(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:r.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:r.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(15);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({},a.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({},a.listsTypes)}},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=t(3),o=t(0),i=t(2);s.parseContent=function(e,t,n){var r=document.createElement("div");return r.innerHTML=i.safeString(e),a.DOMParser.fromSchema(t).parse(r,n)},s.getHtml=function(e){var t=a.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},s.setHtml=function(n,r,a){return void 0===r&&(r="setHTML"),void 0===a&&(a={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new o.AllSelection(e.doc)).replaceSelectionWith(s.parseContent(n,e.schema,a)).setMeta("commandName",r))}}},function(e,t){e.exports=y},function(e,t){e.exports=d},function(e,t){e.exports=l},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r,a=e.table,s=e.table_row,o=e.table_cell,i=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(o.createAndFill());i.push(s.createAndFill(void 0,r))}return a.createAndFill(void 0,i)}},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=t(10);o.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,"")},o.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},o.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},o.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},o.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&o.removeAttribute(e)};var i=/\s*;\s*/,l=/\s*:\s*/;o.sanitizeStyleAttr=function(e){var n,r,t=e.value.split(i).filter(function(e){return Boolean(e)}),a=e.ownerElement.style,s="";t.forEach(function(e){var t=e.split(l);n=t[0],r=t[1],void 0!==a[n]&&(s+=n+": "+r+"; ")}),(s=s.trim())?e.value=s:o.removeAttribute(e)},o.pasteCleanup=function(e,t){var n,r=e;return t.convertMsLists&&(r=a.convertMsLists(r)),t.stripTags&&(r=o.removeTag(r,t.stripTags)),t.attributes&&((n=document.createElement("div")).innerHTML=r,Array.from(n.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)}),r=n.innerHTML),r}},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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=n(12),o=n(11),r=n(14),i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var n,t,r={};return r["Mod-z"]=s.undo,r["Shift-Mod-z"]=s.redo,r.Backspace=a.chainCommands(o.undoInputRule,a.deleteSelection,a.joinBackward,a.selectNodeBackward),r.Enter=a.chainCommands(a.newlineInCode,a.createParagraphNear,a.liftEmptyBlock,a.splitBlockKeepMarks),i||(r["Mod-y"]=s.redo),e.marks.strong&&(r["Mod-b"]=a.toggleMark(e.marks.strong)),e.marks.em&&(r["Mod-i"]=a.toggleMark(e.marks.em)),e.marks.underline&&(r["Mod-u"]=a.toggleMark(e.marks.underline)),e.nodes.hard_break&&(n=e.nodes.hard_break,t=a.chainCommands(a.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),r["Shift-Enter"]=t),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 r(e){for(var t,n={},r=e.attributes,a=0;a<r.length;a++)n[(t=r[a]).name]=t.value;return n}function a(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function s(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n}function o(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var i=n(1),l=n(13),u=["blockquote",0],c=["hr"],d=["pre",["code",0]],f=["ol",0],p=["ul",0],m=["li",0],g=i.__assign({link:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:r}],toDOM:function(e){return["a",s(e.attrs),0]}}},o("strong"),o("b"),o("em"),o("i"),o("u"),o("del"),o("sub"),o("sup"),o("code"),{style:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["span",s(e.attrs),0]:["span",0]}}});t.marks=g;var v=i.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["p",s(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["div",s(e.attrs),0]:["div",0]}},blockquote:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return u}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return c}},heading:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return i.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return i.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return i.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return i.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return i.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return i.__assign({},r(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 d}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:i.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["img",s(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["br",s(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return i.__assign({},r(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]:f:["ol",i.__assign({},s(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["ul",s(e.attrs),0]:p}},list_item:{content:"block*",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["li",s(e.attrs),0]:m},defining:!0}},l.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},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")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]},{node:"listItem",style:[r("text-align","justify"),r("list-style-position","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=t(8),s=t(16),m=t(9),l=t(2);a.indentBlocks=function(f,t,p){return function(l,u){var e=m.blockNodes(l),c=l.tr,d=!1;return c.setMeta("commandName",t),e.forEach(function(t){var e,n,r,a,s,o,i;t.type.isTextblock&&(e=void 0,(n=f.find(function(e){return e.node===t.type.name}))&&(a={name:r="rtl"===p?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(s=new RegExp(r+":\\s?(\\d+)"+n.unit,"i"),(o=t.attrs.style.match(s))&&(i=(i=parseFloat(o[1])+n.step)<=0?"":i,a.value=""+i+(i?n.unit:""))),e=m.addStyles(t,[a])),e&&(d=m.changeBlockNode(l,u,c,t,t.type,e)||d))}),d&&u(c.scrollIntoView()),d}},a.isIndented=function(e,a,s){var o=!1;return m.blockNodes(e).forEach(function(t){var e,n,r;o||!t.type.isTextblock||!t.attrs.style||(e=a.find(function(e){return e.node===t.type.name}))&&(n="rtl"===s?e.rtlStyle:e.style,r=new RegExp(n+":\\s?\\d+"+e.unit,"i"),o=r.test(t.attrs.style))}),o},a.canIndentAsListItem=function(e,t){return i.sinkListItem(t)(e)},a.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],a=e.schema.nodes[t.listsTypes.bulletList],s=!!l.findNthParentNodeOfType(r,2)(e.selection),o=!!l.findNthParentNodeOfType(a,2)(e.selection);return(s||o)&&i.liftListItem(n)(e)},a.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[s.indentRules.listsTypes.listItem];return(a.isIndented(t,e.nodes)||s.indentRules.nodes.some(function(e){return n[e.node]&&m.hasNode(t,n[e.node])}))&&!m.hasNode(t,r)},a.indent=function(e,t){var n=e.schema.nodes[s.indentRules.listsTypes.listItem],r=a.canBeIndented(e,s.indentRules);a.canIndentAsListItem(e,n)?i.sinkListItem(n)(e,t):r&&a.indentBlocks(s.indentRules.nodes)(e,t)},a.outdent=function(e,t){var n=e.schema.nodes[s.outdentRules.listsTypes.listItem],r=a.canBeIndented(e,s.outdentRules);a.canOutdentAsListItem(e,s.outdentRules)?i.liftListItem(n)(e,t):r&&a.indentBlocks(s.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n(9);t.alignBlocks=function(i,t){return function(r,a){var e=l.blockNodes(r),s=r.tr;s.setMeta("commandName",t);var o=!1;return e.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=i.find(function(e){return e.node===t.type.name}))&&(e=l.addStyles(t,n.style)),o=l.changeBlockNode(r,a,s,t,t.type,e)||o)}),o&&a(s.scrollIntoView()),o}},t.isAligned=function(e,n){var r=!1;return l.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 a=n(2);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);a.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,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var m=t(5),y=t(6),d=t(0);c.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,a=n.parent,s=n.index(),o=e.schema.marks[f.mark],i=a.child(s).marks.find(function(e){return e.type===o}),l=a.childCount,u=n.pos-n.textOffset,c=a.child(s).nodeSize,d=void 0,d=s-1;0<=d&&i.isInSet(a.child(d).marks);)c+=r=a.child(d).nodeSize,u-=r,--d;for(d=s+1;d<l&&i.isInSet(a.child(d).marks);)c+=a.child(d).nodeSize,d+=1;t(y.removeMark(p||e.tr,u,u+c,i))}else m.toggleInlineFormat(f,p)(e,t)}},c.applyLink=function(e,i){var l=e.mark,u=e.attrs;return void 0===i&&(i="link"),function(e,t){var n=e.schema.marks,r=e.tr;i&&(r.setMeta("commandName",i),r.setMeta("args",u));function a(){return o=!0}var s,g,v,o=!1;return y.getParentMark(e,n[l])?(g={mark:l,attrs:u},v=r,function(e,n){var t=e.selection,r=t.$cursor,a=t.from,s=t.to,o=e.schema.marks[g.mark];if(r){for(var i,l=r.parent,u=r.index(),c=l.child(u).marks.find(function(e){return e.type===o}),d=l.childCount,f=r.pos-r.textOffset,p=l.child(u).nodeSize,m=void 0,m=u-1;0<=m&&c.isInSet(l.child(m).marks);)p+=i=l.child(m).nodeSize,f-=i,--m;for(m=u+1;m<d&&c.isInSet(l.child(m).marks);)p+=l.child(m).nodeSize,m+=1;v.removeMark(f,f+p,o),v.addMark(f,f+p,o.create(g.attrs)),n(v)}else v.doc.nodesBetween(a,s,function(e,t){e.isInline&&o.isInSet(e.marks)&&(v.removeMark(t,t+e.nodeSize,o),v.addMark(t,t+e.nodeSize,o.create(g.attrs)),n(v))})}(e,a)):(s=e,y.hasMark(e,{mark:l})&&(c.removeLink({mark:l,attrs:u},r)(e,a),s=d.EditorState.create({doc:r.doc,selection:r.selection})),(o?y.toggleMark(n[l],u,r):m.toggleInlineFormat({mark:l},r,u))(s,a)),o&&t(r),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(17);t.getHtml=a.getHtml,t.setHtml=a.setHtml,t.parseContent=a.parseContent;var s=n(5);t.applyInlineStyle=s.applyInlineStyle,t.getInlineStyles=s.getInlineStyles,t.toggleInlineFormat=s.toggleInlineFormat;var o=n(32);t.applyLink=o.applyLink,t.removeLink=o.removeLink;var i=n(31);t.insertText=i.insertText;var l=n(30);t.insertImage=l.insertImage;var u=n(29);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=n(9);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats;var d=n(6);t.hasMark=d.hasMark,t.getMark=d.getMark,t.getActiveMarks=d.getActiveMarks,t.removeAllMarks=d.removeAllMarks;var f=n(28);t.indent=f.indent,t.canIndentAsListItem=f.canIndentAsListItem,t.outdent=f.outdent,t.canOutdentAsListItem=f.canOutdentAsListItem,t.isIndented=f.isIndented,t.canBeIndented=f.canBeIndented,t.indentBlocks=f.indentBlocks;var p=n(14);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=n(2);t.hasSameMarkup=m.hasSameMarkup,t.getUniqueStyleValues=m.getUniqueStyleValues,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=n(27);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(16);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=n(26);t.nodes=y.nodes,t.marks=y.marks;var h=n(25);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=n(24);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var M=n(23);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var b=n(10);t.convertMsLists=b.convertMsLists;var S=n(22);t.createTable=S.createTable,r.__exportStar(n(7),t),r.__exportStar(n(21),t),r.__exportStar(n(20),t),r.__exportStar(n(12),t),r.__exportStar(n(11),t),r.__exportStar(n(19),t),r.__exportStar(n(3),t),r.__exportStar(n(8),t),r.__exportStar(n(0),t),r.__exportStar(n(13),t),r.__exportStar(n(4),t),r.__exportStar(n(18),t),function(e){for(var t in e)_(t,e[t])}(t)}],r.c=a,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=33)}}}); | ||
System.register("@progress/kendo-editor-common",["tslib","prosemirror-commands","prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-schema-list","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-history"],function(_){var s,o,i,l,u,c,d,f,p,m,g,v,y;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){o=t(e)},function(e){i=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){c=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){v=t(e)},function(e){y=t(e)}],execute:function(){function r(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,a;a={},r.m=n=[function(e,t){e.exports=d},function(e,t){e.exports=s},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(3),a=t(0),v=t(6),y=t(5),i=t(17);r.changeStyles=function(e,t){var n=t.style,r=t.value,a=t.newValue,s=[];if(e){var o=e.split(/\s*;\s*/).filter(function(e){return e}),i=o.filter(function(e){if(!e.toLowerCase().trim().startsWith(n))return!0;var t=e.split(":")[1].trim();return!r.test(t)||(s.push(t),!1)});return a&&i.push(n+": "+a),{style:i.join("; ")+(i.length?";":""),changed:!!a||i.length!==o.length,styleMatches:s}}return{changed:!1,styleMatches:s,style:null}},r.changeStyle=function(m,g){return function(e,t,n){var r=e.selection,a=r.empty,s=r.$cursor,o=r.ranges;if(a&&!s||!v.markApplies(e.doc,o,m))return!1;var i=!1;if(t)if(n=n||e.tr,s){var l,u=e.storedMarks||s.marks();m.isInSet(u)&&(l=y.changeStyleFromMark(u,g),t(n.removeStoredMark(m)),t(n.addStoredMark(m.create({style:l.style}))),i=!0)}else{for(var c=0;c<o.length;c++)var d=o[c],f=d.$from,p=d.$to,i=y.changeStyleMark(n,f.pos,p.pos,g,m);i&&(n.scrollIntoView(),t(n))}return i}},r.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var a=n.index(r);if(n.node(r).canReplaceWith(a,a,t))return!0}return!1},r.getTypeName=function(e){return e instanceof o.Node?e.type.name:e.name},r.findParentNode=function(a){return function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r))return{depth:n,node:r}}}},r.findNthParentNode=function(a,s){return void 0===s&&(s=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(a(r)&&0==--s)return{depth:n,node:r}}}},r.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return r.findNthParentNode(function(e){return r.getTypeName(e)===r.getTypeName(t)},n)(e)}},r.insertNode=function(r,a){return function(e,t){var n=e.tr.replaceSelectionWith(r);a&&n.scrollIntoView(),t(n)}},r.isNullOrUndefined=function(e){return null==e},r.safeString=function(e){return r.isNullOrUndefined(e)?"":e.toString()},r.hasSameMarkup=function(e,t,n,r){var a=o.Fragment.from(i.parseContent(e,n,r)),s=o.Fragment.from(i.parseContent(t,n,r));return a.eq(s)},r.first=function(e){return e[0]},r.last=function(e){return e[e.length-1]},r.split=function(t){return function(e){return e.split(t)}},r.trim=function(e){return e.trim()},r.filter=function(t){return function(e){return e.filter(t)}},r.getUniqueStyleValues=function(e,t){if(e.hasNodesWithoutMarks)return"";var n=e.marks.filter(function(e){return"style"===e.type.name}).map(function(e){return e.attrs.style}).map(r.split(";")).map(r.filter(function(e){return e.includes(t)})).map(function(e){return 0!==e.length?e:[t+": INVALID"]}).map(r.first).map(r.split(":")).map(r.last).map(r.trim).reduce(function(e,t){return-1<e.indexOf(t)?e:e.concat([t])},[]);return-1<n.indexOf("INVALID")||1!==n.length?"":n[0]},r.getSelectionText=function(e){var t=e.selection;if(t instanceof a.TextSelection||t instanceof a.AllSelection){var n=t.content().content;return n.textBetween(0,n.size)}return""},r.getNodeFromSelection=function(e){if(e.selection instanceof a.NodeSelection)return e.selection.node},r.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$/,"")}},function(e,t){e.exports=u},function(e,t){e.exports=p},function(e,I,t){"use strict";Object.defineProperty(I,"__esModule",{value:!0});var L=t(1),x=t(4),v=t(2),h=t(6);I.changeStyleFromMark=function(e,t){var n=e.find(function(e){return"style"===e.type.name}),r=n&&n.attrs.style;return v.changeStyles(r,t)},I.changeStyleMark=function(t,g,v,y,h){var k=h.create({style:y.style}),M=[],b=[],S=null,_=null;return t.doc.nodesBetween(g,v,function(e,t,n){if(e.isInline){var r=e.marks;if(!k.isInSet(r)&&n.type.allowsMarkType(k.type)){var a=Math.max(t,g),s=Math.min(t+e.nodeSize,v),o=I.changeStyleFromMark(r,y);if(o.changed||y.newValue){for(var i=o.changed?{style:o.style||null}:{style:[y.style]+": "+y.newValue+";"},l=h.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,u=l?L.__assign({},l.attrs,i):i,c=h.create(u),d=c.addToSet(r),f=0;f<r.length;f++)r[f].isInSet(d)||(S&&S.to===a&&S.mark.eq(r[f])?S.to=s:(S=new x.RemoveMarkStep(a,s,r[f]),M.push(S)));var p=_&&_.to===a,m=p&&c.attrs.style===_.mark.attrs.style;p&&m?_.to=s:Object.keys(u).some(function(e){return null!==u[e]})&&(_=new x.AddMarkStep(a,s,c),b.push(_))}}}}),M.forEach(function(e){return t.step(e)}),b.forEach(function(e){return t.step(e)}),0<M.length+b.length},I.hasStyle=function(e,t){var n=e.selection,r=n.from,a=n.$from,s=n.to,o=n.empty,i=!1,l={style:t.name,value:t.value};return o?i=I.changeStyleFromMark(e.storedMarks||a.marks(),l).changed:e.doc.nodesBetween(r,s,function(e,t,n){!i&&e.isInline&&(i=I.changeStyleFromMark(e.marks,l).changed)}),i},I.getInlineStyles=function(e,t){var r,n=e.selection,a=n.from,s=n.$from,o=n.to,i=n.empty,l=[],u={style:t.name,value:t.value};return i?(r=I.changeStyleFromMark(e.storedMarks||s.marks(),u)).changed&&(l=r.styleMatches):e.doc.nodesBetween(a,o,function(e,t,n){e.isInline&&((r=I.changeStyleFromMark(e.marks,u)).changed?l.push.apply(l,r.styleMatches):l.push(null))}),l.filter(function(e){return null!==e})},I.changeStyle=function(v,y){return function(e,t,n){var r=e.selection,a=r.empty,s=r.$cursor,o=r.ranges;if(a&&!s||!h.markApplies(e.doc,o,v))return!1;var i=!1;if(t)if(n=n||e.tr,s){var l,u,c,d=e.storedMarks||s.marks();v.isInSet(d)&&(l=I.changeStyleFromMark(d,y),u=d.find(function(e){return"style"===e.type.name}),c=L.__assign({},u?u.attrs:{},{style:l.style||null}),t(n.removeStoredMark(v)),Object.keys(c).some(function(e){return null!==c[e]})&&t(n.addStoredMark(v.create(c))),i=!0)}else{for(var f=0;f<o.length;f++)var p=o[f],m=p.$from,g=p.$to,i=I.changeStyleMark(n,m.pos,g.pos,y,v);i&&(n.scrollIntoView(),t(n))}return i}},I.toggleInlineFormat=function(f,p,m){return function(t,e){var n=t.schema.marks,r=f.altStyle,a=f.altMarks,s=void 0===a?[]:a,o=f.mark;p=p||t.tr;function i(){return c=!0}var l,u=!1,c=!1;r&&n.style&&(l=n.style,u=I.changeStyle(l,{style:r.name,value:r.value})(t,i,p));var d=[o].concat(s).filter(function(e){return n[e]}).map(function(e){return h.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return d.length?h.removeMarks(d,t,i,p):u||h.toggleMark(n[o],m,p)(t,i),c&&e(p),c}},I.applyInlineStyle=function(m,g){return function(e,t){var n=e.schema.marks.style,r={style:m.style,value:/^.+$/,newValue:m.value},a=e.tr;g&&a.setMeta("commandName",g),a.setMeta("args",m);var s=e.selection,o=s.empty,i=s.$cursor,l=s.ranges;if(o&&!i||!h.markApplies(e.doc,l,n))return!1;if(i){var u,c=e.storedMarks||i.marks(),d=n.isInSet(c)?c.find(function(e){return"style"===e.type.name}):null,f={style:null};d&&d.attrs.style?(u=v.changeStyles(d.attrs.style,r)).changed&&u.style&&(f.style=u.style):r.newValue&&(f.style=[r.style]+": "+r.newValue+";");var p=d?L.__assign({},d.attrs,f):f;return Object.keys(p).some(function(e){return null!==p[e]})?t(a.addStoredMark(n.create(p))):t(a.removeStoredMark(n)),!0}return I.changeStyle(n,r)(e,t,a)}}},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(4),v=t(3),o=t(0),m=t(5);g.markApplies=function(s,o,i){for(var e=0;e<o.length;e++){var t=function(e){var t=o[e],n=t.$from,r=t.$to,a=0===n.depth&&s.type.allowsMarkType(i);if(s.nodesBetween(n.pos,r.pos,function(e){return!a&&void(a=e.inlineContent&&e.type.allowsMarkType(i))}),a)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,a=n.$cursor,s=n.ranges;if(r&&!a||!g.markApplies(e.doc,s,f))return!1;if(t)if(a)f.isInSet(e.storedMarks||a.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var o=!1,i=0;!o&&i<s.length;i++)var l=s[i],u=l.$from,c=l.$to,o=e.doc.rangeHasMark(u.pos,c.pos,f);for(i=0;i<s.length;i++){var d=s[i],u=d.$from,c=d.$to;o?m.removeMark(u.pos,c.pos,f):m.addMark(u.pos,c.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,c,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(c,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof v.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var a=Math.min(t+e.nodeSize,d),s=0;s<r.length;s++){for(var o=r[s],i=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&o.eq(u.style)&&(i=u)}i?(i.to=a,i.step=m):p.push({style:o,from:Math.max(t,c),to:a,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(a,t,n,s){var e=t.selection,r=e.$cursor,o=e.ranges;if(s=s||t.tr,r)a.forEach(function(e){e.isInSet(t.storedMarks||r.marks())&&n(s.removeStoredMark(e))});else{for(var i=0;i<o.length;i++)!function(e){var t=o[e],n=t.$from,r=t.$to;a.forEach(function(e){g.removeMark(s,n.pos,r.pos,e)})}(i);n(s.scrollIntoView())}return!0},g.removeAllMarks=function(e){var t=(void 0===e?{}:e).except,u=void 0===t?[]:t;return function(e,t){var r,n=e.schema,a=e.selection,s=a.empty,o=a.ranges,i=e.tr,l=(u instanceof Array?u:[u]).map(function(e){return e.name});s||(r=Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===l.indexOf(e.name)}),o.forEach(function(e){var t=e.$from,n=e.$to;r.forEach(function(e){return i.removeMark(t.pos,n.pos,e)})}),t(i))}},g.getParentMark=function(e,t){var n=e.selection,r=n.from,a=n.$from,s=n.to,o=n.empty,i=e.doc;if(o)return t.isInSet(e.storedMarks||a.marks())||null;var l=[];return i.nodesBetween(r,s,function(e){e.isInline&&l.push(t.isInSet(e.marks))}),1===l.length&&l[0]?l[0]:null},g.hasMark=function(e,t){var n,r=e.schema.marks,a=(t.altMarks||[]).filter(function(e){return r[e]}),s=t.altStyle,o=e.selection,i=o.from,l=o.$from,u=o.to,c=o.empty,d=r[t.mark],f=e.doc,p=!1;return!(p=c?(n=e.storedMarks||l.marks(),d&&d.isInSet(n)||a.some(function(e){return r[e].isInSet(n)})):d&&f.rangeHasMark(i,u,d)||a.some(function(e){return f.rangeHasMark(i,u,r[e])}))&&s?m.hasStyle(e,s):Boolean(p)},g.getMark=function(e,t){var n,r,a=e.selection,s=a.from,o=a.$from,i=a.to,l=a.empty,u=e.doc;return l?n=t.isInSet(e.storedMarks||o.marks()):(r=[],u.nodesBetween(s,i,function(e){e.isInline&&r.push(t.isInSet(e.marks))}),r.some(function(e){return!e})||(n=r[r.length-1])),n},g.getActiveMarks=function(e,r){var t=e.selection,a=!1;if(t instanceof o.TextSelection&&t.$cursor)return{hasNodesWithoutMarks:a,marks:t.$cursor.marks().filter(function(e){return!r||e.type.name===r.name})};var s=[];return t.content().content.descendants(function(e){var t,n;"text"===e.type.name&&(t=r?(n=r,e.marks.filter(function(e){return e.type.name===n.name})):e.marks,0<e.marks.length&&0<t.length?s.push.apply(s,t):a=!0)}),{hasNodesWithoutMarks:a,marks:s}}},function(e,t){e.exports=o},function(e,t){e.exports=c},function(e,d,t){"use strict";Object.defineProperty(d,"__esModule",{value:!0});var f=t(1),s=t(2),v=t(4),y=t(3),o=t(0);d.changeBlockNode=function(a,e,d,f,p,m){var t=a.selection,n=t.from,r=t.to,s=!1;if(a.doc.nodesBetween(n,r,function(e,t){return!s&&void(e.isTextblock&&!e.hasMarkup(p,m)&&(s=e.type===p||(r=(n=a.doc.resolve(t)).index(),n.parent.canReplaceWith(r,r+1,p))));var n,r}),!s)return!1;if(e){if(!p.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var g=d.steps.length;d.doc.nodesBetween(n,r,function(e,t){if(e.eq(f)&&e.isTextblock&&!e.hasMarkup(p,m)&&(o=d.doc,i=d.mapping.slice(g).map(t),l=p,u=o.resolve(i),c=u.index(),u.parent.canReplaceWith(c,c+1,l))){d.clearIncompatible(d.mapping.slice(g).map(t,1),p);var n=d.mapping.slice(g),r=n.map(t,1),a=n.map(t+e.nodeSize,1),s=new y.Slice(y.Fragment.from(p.create(m,null,e.marks)),0,0);return d.step(new v.ReplaceAroundStep(r,a,r+1,a-1,s,1,!0)),!1}var o,i,l,u,c})}return!0},d.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,a=t.$from,s=[];return t.node?t.node.isBlock?s.push(t.node):a.parent&&a.parent.isBlock&&s.push(a.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&s.push(e)}),s},d.formatBlockElements=function(c,t){return function(s,o){var e=d.blockNodes(s),i=s.schema.nodes,l=!1,u=s.tr;return u.setMeta("commandName",t),u.setMeta("args",{value:c}),e.forEach(function(e){var t,n,r,a;e.type.isTextblock&&("p"===c?(r=(t=e.attrs).level,a=f.__rest(t,["level"]),l=d.changeBlockNode(s,o,u,e,i.paragraph,a)||l):/^h[1-6]$/i.test(c)?(r=parseInt(c.substr(1),10),l=d.changeBlockNode(s,o,u,e,i.heading,f.__assign({},e.attrs,{level:r}))||l):"blockquote"===c&&(r=(n=e.attrs).level,a=f.__rest(n,["level"]),l=d.changeBlockNode(s,o,u,e,i.blockquote,a)||l))}),l&&o(u.scrollIntoView()),l}},d.getBlockFormats=function(e){var t=d.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){if(e.type===n.paragraph)r.push("p");else if(e.type===n.heading)for(var t=1;t<=6;t++)if(e.attrs.level===t){r.push("h"+t);break}}),r},d.addStyles=function(e,t){var n,r,a=e.attrs.style;return a&&t.forEach(function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=s.changeStyles(a,r),a=n.changed?n.style:a}),a=a||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:a||null})},d.hasNode=function(e,t){var n=e.selection,r=n.from,a=n.to,s=!1;return e.doc.nodesBetween(r,a,function(e){return!(s=s||e.type===t)}),s};function i(n){return r=n,Object.keys(r).filter(function(e){return null!==n[t=e]&&void 0!==n[t]&&""!==n[t];var t}).reduce(function(e,t){var n;return Object.assign(e,((n={})[t]=r[t],n))},{});var r}d.getNodeTagName=function(n,r){var e,t=n.type.spec.parseDOM||[],a=n.attrs;return(e=1===t.length?t[0]:t.find(function(e){var t=y.DOMSerializer.fromSchema(r).serializeNode(n);return JSON.stringify(e.getAttrs(t))===JSON.stringify(i(a))}))?e.tag.toLowerCase().replace(/ *\[[^\]]*]/,""):""},d.activeNode=function(e){var t,n,r,a=e.schema.nodes.doc;return e.selection instanceof o.AllSelection?r=e.doc:e.selection instanceof o.TextSelection?(n=(t=e.selection.$anchor).node(t.blockRange().depth),r=s.getTypeName(n)===s.getTypeName(a)?t.node():n):e.selection instanceof o.NodeSelection&&(r=e.selection.node),{name:s.getTypeName(r),tag:d.getNodeTagName(r,e.schema)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function k(e){return/^MsoListParagraph/.test(e.className)}function M(e){var t=e.innerHTML;return(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function b(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n}function S(e){function t(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")}var n,r,a,s=(s=e.innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," ");return/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(s)?{tag:"ul",style:(a=t(M(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(a)?null:/^o/.test(a)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(s)?{tag:"ol",style:(n=t(M(e)),r=null,/^\d/.test(n)||(r=(/^[a-z]/.test(n)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(n)?"roman":"alpha")),r)}:void 0}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,a=function(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)):k(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?a(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){a(e.children,n)})))})};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});var n=new Set;return a(t.children,n),n.forEach(function(e){for(var t,n,r,a,s,o,i,l,u,c,d,f=-1,p={},m=0;m<e.length;m++){var g,v,y=(d={datalist:(l=e[m]).getAttribute("datalist"),datalevel:l.getAttribute("datalevel")}).datalist,h=S(l);(u=h&&h.tag)?(v=d.datalevel||parseFloat(l.style.marginLeft||0),(d.datalevel||l.style.marginLeft)&&(g=u+y,p[v]||(p[v]={}),(!n||n<0)&&(n=v,r=y,a=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],o=b(u,h&&h.style),l.parentNode.insertBefore(o,l),p[f=v][g]=o),s=a===l,c=p[v][g],(f<v||!c)&&(c=b(u,h&&h.style),p[v][g]=c,t.appendChild(c)),t=function(e){var t,n=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?M(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r}(l),c.appendChild(t),s?n=f=-1:f=v)):!t||s&&!k(l)||(l.style.marginLeft&&(l.style.marginLeft=""),l.style.marginLeft&&(l.style.margin=""),t.appendChild(l))}}),t.innerHTML}},function(e,t){e.exports=i},function(e,t){e.exports=y},function(e,t){e.exports=f},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var r=t(1),f=t(3),p=t(0),m=t(4),a=t(7),s=t(8),o=t(15);function v(e,t,n){var r=e.selection,a=r.from,s=r.to,o=e.schema.nodes,i=o.paragraph,l=o.heading,u=[];t.doc.nodesBetween(a,s,function(e,t){e.type!==i&&e.type!==l||u.push({node:e,pos:t})});for(var c=u.length-1;0<=c;c--){var d,f,p=u[c],m=t.doc.resolve(t.mapping.map(p.pos));0<m.depth&&(d=void 0,d=p.node.textContent&&0<p.node.textContent.length?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1)),(f=m.blockRange(d))&&t.lift(f,g.getListLiftTarget(e.schema,m,n)))}return t}function y(c){return function(e,t,n){if(!n)return!1;var r=(e=n.state).schema.nodes[c.listType],a=e.selection,s=a.$from,o=a.$to,i=s.node(-2),l=s.node(-3),u=d(e.doc,s,o,r);return(i&&i.type===r||l&&l.type===r)&&u?k(c)(e,t):(u||(k(c)(e,t),e=n.state),M(r)(e,t))}}function h(o,i,e,l,u,c){c=c||o.schema.nodes.listItem;var d=!1;return u.doc.nodesBetween(i,e,function(e,t){if(!d&&e.type===c&&i<t){d=!0;for(var n=l+3;l+2<n;){var r=u.doc.resolve(u.mapping.map(t)),n=r.depth,a=u.doc.resolve(u.mapping.map(t+e.textContent.length)),s=new p.TextSelection(r,a);u=function(e,t,n,r){r=r||e.schema.nodes.listItem;var a=t.$from,s=t.$to,o=a.blockRange(s,function(e){return e.childCount&&e.firstChild.type===r});if(!o||o.depth<2||a.node(o.depth-1).type!==r)return n;var i=o.end,l=s.end(o.depth);return i<l&&(n.step(new m.ReplaceAroundStep(i-1,l,i,l,new f.Slice(f.Fragment.from(r.create(void 0,o.parent.copy())),1,0),1,!0)),o=new f.NodeRange(n.doc.resolve(a.pos),n.doc.resolve(l),o.depth)),n.lift(o,m.liftTarget(o)).scrollIntoView()}(o,s,u,c)}}}),u}function d(e,t,n,r){return 0===i(e,t,n).filter(function(e){return e.type!==r}).length}function i(e,t,n){for(var r=Array(),a=u(e,t).depth,s=e.resolve(t.start(a));s.pos<=n.start(n.depth);){var o=Math.min(s.depth,a),i=s.node(o);if(i&&r.push(i),0===o)break;var l=e.resolve(s.after(o));if(l.start(o)>=e.nodeSize-2)break;l.depth!==s.depth&&(l=e.resolve(l.pos+2)),s=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}function u(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),a=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(a=t);return a}function k(i){return function(s,e){var o=s.tr,t=s.selection,n=t.$from,r=t.$to;return o.doc.nodesBetween(n.pos,r.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){var n=new p.NodeSelection(o.doc.resolve(o.mapping.map(t))),r=n.$from.blockRange(n.$to);if(!r||n.$from.parent.type!==s.schema.nodes[i.listItem])return!1;var a=r&&m.liftTarget(r);if(null==a)return!1;o.lift(r,a)}}),e&&e(o),!0}}function M(n){return a.autoJoin(s.wrapInList(n),function(e,t){return e.type===t.type&&e.type===n})}g.rootListDepth=function(e,t){for(var n,r=t.bulletList,a=t.orderedList,s=t.listItem,o=e.depth-1;0<o;o--){var i=e.node(o);if(i.type!==r&&i.type!==a||(n=o),i.type!==r&&i.type!==a&&i.type!==s)break}return n},g.getListLiftTarget=function(e,t,n){for(var r=t.depth,a=e.nodes[n.bulletList],s=e.nodes[n.orderedList],o=e.nodes[n.listItem],i=t.depth;0<i;i--){var l=t.node(i);if(l.type!==a&&l.type!==s||(r=i),l.type!==a&&l.type!==s&&l.type!==o)break}return r-1},g.liftSelectionList=v,g.toggleList=function(e,t,n,r,a){var s=r.listType,o=e.selection,i=o.$from.node(o.$from.depth-2),l=o.$to.node(o.$to.depth-2);if(i&&i.type.name===s&&l&&l.type.name===s){var u=n.state.schema.nodes,c={bulletList:u[r.bulletList],orderedList:u[r.orderedList],listItem:u[r.listItem]},d=g.rootListDepth(o.$to,c),f=h(e,o.$to.pos,o.$to.end(d),d,n.state.tr,c.listItem);return(f=v(e,f,r)).setMeta("commandName",a),t(f),!0}return y(r)(e,t,n)},g.toggleListCommand=y,g.liftFollowingList=h,g.isRangeOfType=d,g.getAncestorNodesBetween=i,g.findAncestorPosition=u,g.liftListItems=k,g.wrapInList=M,g.toggleUnorderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:o.bulletList.listType},o.bulletList.types))},g.toggleOrderedList=function(e,t,n){return g.toggleList(e,t,n,r.__assign({listType:o.orderedList.listType},o.orderedList.types))},g.splitListItemKeepMarks=function(e){return function(n,r){return s.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(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:r.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:r.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(15);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({},a.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({},a.listsTypes)}},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=t(3),o=t(0),i=t(2);s.parseContent=function(e,t,n){var r=document.createElement("div");return r.innerHTML=i.safeString(e),a.DOMParser.fromSchema(t).parse(r,n)},s.getHtml=function(e){var t=a.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},s.setHtml=function(n,r,a){return void 0===r&&(r="setHTML"),void 0===a&&(a={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new o.AllSelection(e.doc)).replaceSelectionWith(s.parseContent(n,e.schema,a)).setMeta("commandName",r))}}},function(e,t){e.exports=m},function(e,t){e.exports=l},function(e,t){e.exports=v},function(e,t){e.exports=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r,a=e.table,s=e.table_row,o=e.table_cell,i=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(o.createAndFill());i.push(s.createAndFill(void 0,r))}return a.createAndFill(void 0,i)}},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=t(10);o.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,"")},o.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},o.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},o.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},o.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&o.removeAttribute(e)};var i=/\s*;\s*/,l=/\s*:\s*/;o.sanitizeStyleAttr=function(e){var n,r,t=e.value.split(i).filter(function(e){return Boolean(e)}),a=e.ownerElement.style,s="";t.forEach(function(e){var t=e.split(l);n=t[0],r=t[1],void 0!==a[n]&&(s+=n+": "+r+"; ")}),(s=s.trim())?e.value=s:o.removeAttribute(e)},o.pasteCleanup=function(e,t){var n,r=e;return t.convertMsLists&&(r=a.convertMsLists(r)),t.stripTags&&(r=o.removeTag(r,t.stripTags)),t.attributes&&((n=document.createElement("div")).innerHTML=r,Array.from(n.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)}),r=n.innerHTML),r}},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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=n(12),o=n(11),r=n(14),i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var n,t,r={};return r["Mod-z"]=s.undo,r["Shift-Mod-z"]=s.redo,r.Backspace=a.chainCommands(o.undoInputRule,a.deleteSelection,a.joinBackward,a.selectNodeBackward),r.Enter=a.chainCommands(a.newlineInCode,a.createParagraphNear,a.liftEmptyBlock,a.splitBlockKeepMarks),i||(r["Mod-y"]=s.redo),e.marks.strong&&(r["Mod-b"]=a.toggleMark(e.marks.strong)),e.marks.em&&(r["Mod-i"]=a.toggleMark(e.marks.em)),e.marks.underline&&(r["Mod-u"]=a.toggleMark(e.marks.underline)),e.nodes.hard_break&&(n=e.nodes.hard_break,t=a.chainCommands(a.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),r["Shift-Enter"]=t),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 r(e){for(var t,n={},r=e.attributes,a=0;a<r.length;a++)n[(t=r[a]).name]=t.value;return n}function a(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function s(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n}function o(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t}var i=n(1),l=n(13),u=["blockquote",0],c=["hr"],d=["pre",["code",0]],f=["ol",0],p=["ul",0],m=["li",0],g=i.__assign({link:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:r}],toDOM:function(e){return["a",s(e.attrs),0]}}},o("strong"),o("b"),o("em"),o("i"),o("u"),o("del"),o("sub"),o("sup"),o("code"),{style:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["span",s(e.attrs),0]:["span",0]}}});t.marks=g;var v=i.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["p",s(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["div",s(e.attrs),0]:["div",0]}},blockquote:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return u}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return c}},heading:{attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return i.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return i.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return i.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return i.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return i.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return i.__assign({},r(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 d}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:i.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["img",s(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["br",s(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return i.__assign({},r(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]:f:["ol",i.__assign({},s(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["ul",s(e.attrs),0]:p}},list_item:{content:"block*",attrs:i.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return a(e.attrs)?["li",s(e.attrs),0]:m},defining:!0}},l.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},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")]},{node:"listItem",style:[r("text-align","left"),r("list-style-position","inside")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]},{node:"listItem",style:[r("text-align","right"),r("list-style-position","inside")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]},{node:"listItem",style:[r("text-align","center"),r("list-style-position","inside")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]},{node:"listItem",style:[r("text-align","justify"),r("list-style-position","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]},{node:"listItem",style:[r("text-align",""),r("list-style-position","")]}]},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=t(8),s=t(16),m=t(9),l=t(2);a.indentBlocks=function(f,t,p){return function(l,u){var e=m.blockNodes(l),c=l.tr,d=!1;return c.setMeta("commandName",t),e.forEach(function(t){var e,n,r,a,s,o,i;t.type.isTextblock&&(e=void 0,(n=f.find(function(e){return e.node===t.type.name}))&&(a={name:r="rtl"===p?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(s=new RegExp(r+":\\s?(\\d+)"+n.unit,"i"),(o=t.attrs.style.match(s))&&(i=(i=parseFloat(o[1])+n.step)<=0?"":i,a.value=""+i+(i?n.unit:""))),e=m.addStyles(t,[a])),e&&(d=m.changeBlockNode(l,u,c,t,t.type,e)||d))}),d&&u(c.scrollIntoView()),d}},a.isIndented=function(e,a,s){var o=!1;return m.blockNodes(e).forEach(function(t){var e,n,r;o||!t.type.isTextblock||!t.attrs.style||(e=a.find(function(e){return e.node===t.type.name}))&&(n="rtl"===s?e.rtlStyle:e.style,r=new RegExp(n+":\\s?\\d+"+e.unit,"i"),o=r.test(t.attrs.style))}),o},a.canIndentAsListItem=function(e,t){return i.sinkListItem(t)(e)},a.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],a=e.schema.nodes[t.listsTypes.bulletList],s=!!l.findNthParentNodeOfType(r,2)(e.selection),o=!!l.findNthParentNodeOfType(a,2)(e.selection);return(s||o)&&i.liftListItem(n)(e)},a.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[s.indentRules.listsTypes.listItem];return(a.isIndented(t,e.nodes)||s.indentRules.nodes.some(function(e){return n[e.node]&&m.hasNode(t,n[e.node])}))&&!m.hasNode(t,r)},a.indent=function(e,t){var n=e.schema.nodes[s.indentRules.listsTypes.listItem],r=a.canBeIndented(e,s.indentRules);a.canIndentAsListItem(e,n)?i.sinkListItem(n)(e,t):r&&a.indentBlocks(s.indentRules.nodes)(e,t)},a.outdent=function(e,t){var n=e.schema.nodes[s.outdentRules.listsTypes.listItem],r=a.canBeIndented(e,s.outdentRules);a.canOutdentAsListItem(e,s.outdentRules)?i.liftListItem(n)(e,t):r&&a.indentBlocks(s.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n(9);t.alignBlocks=function(i,t){return function(r,a){var e=l.blockNodes(r),s=r.tr;s.setMeta("commandName",t);var o=!1;return e.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=i.find(function(e){return e.node===t.type.name}))&&(e=l.addStyles(t,n.style)),o=l.changeBlockNode(r,a,s,t,t.type,e)||o)}),o&&a(s.scrollIntoView()),o}},t.isAligned=function(e,n){var r=!1;return l.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 a=n(2);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);a.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,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var m=t(5),y=t(6),d=t(0);c.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,a=n.parent,s=n.index(),o=e.schema.marks[f.mark],i=a.child(s).marks.find(function(e){return e.type===o}),l=a.childCount,u=n.pos-n.textOffset,c=a.child(s).nodeSize,d=void 0,d=s-1;0<=d&&i.isInSet(a.child(d).marks);)c+=r=a.child(d).nodeSize,u-=r,--d;for(d=s+1;d<l&&i.isInSet(a.child(d).marks);)c+=a.child(d).nodeSize,d+=1;t(y.removeMark(p||e.tr,u,u+c,i))}else m.toggleInlineFormat(f,p)(e,t)}},c.applyLink=function(e,i){var l=e.mark,u=e.attrs;return void 0===i&&(i="link"),function(e,t){var n=e.schema.marks,r=e.tr;i&&(r.setMeta("commandName",i),r.setMeta("args",u));function a(){return o=!0}var s,g,v,o=!1;return y.getParentMark(e,n[l])?(g={mark:l,attrs:u},v=r,function(e,n){var t=e.selection,r=t.$cursor,a=t.from,s=t.to,o=e.schema.marks[g.mark];if(r){for(var i,l=r.parent,u=r.index(),c=l.child(u).marks.find(function(e){return e.type===o}),d=l.childCount,f=r.pos-r.textOffset,p=l.child(u).nodeSize,m=void 0,m=u-1;0<=m&&c.isInSet(l.child(m).marks);)p+=i=l.child(m).nodeSize,f-=i,--m;for(m=u+1;m<d&&c.isInSet(l.child(m).marks);)p+=l.child(m).nodeSize,m+=1;v.removeMark(f,f+p,o),v.addMark(f,f+p,o.create(g.attrs)),n(v)}else v.doc.nodesBetween(a,s,function(e,t){e.isInline&&o.isInSet(e.marks)&&(v.removeMark(t,t+e.nodeSize,o),v.addMark(t,t+e.nodeSize,o.create(g.attrs)),n(v))})}(e,a)):(s=e,y.hasMark(e,{mark:l})&&(c.removeLink({mark:l,attrs:u},r)(e,a),s=d.EditorState.create({doc:r.doc,selection:r.selection})),(o?y.toggleMark(n[l],u,r):m.toggleInlineFormat({mark:l},r,u))(s,a)),o&&t(r),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(17);t.getHtml=a.getHtml,t.setHtml=a.setHtml,t.parseContent=a.parseContent;var s=n(5);t.applyInlineStyle=s.applyInlineStyle,t.getInlineStyles=s.getInlineStyles,t.toggleInlineFormat=s.toggleInlineFormat;var o=n(32);t.applyLink=o.applyLink,t.removeLink=o.removeLink;var i=n(31);t.insertText=i.insertText;var l=n(30);t.insertImage=l.insertImage;var u=n(29);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=n(9);t.hasNode=c.hasNode,t.activeNode=c.activeNode,t.formatBlockElements=c.formatBlockElements,t.getBlockFormats=c.getBlockFormats;var d=n(6);t.hasMark=d.hasMark,t.getMark=d.getMark,t.getActiveMarks=d.getActiveMarks,t.removeAllMarks=d.removeAllMarks;var f=n(28);t.indent=f.indent,t.canIndentAsListItem=f.canIndentAsListItem,t.outdent=f.outdent,t.canOutdentAsListItem=f.canOutdentAsListItem,t.isIndented=f.isIndented,t.canBeIndented=f.canBeIndented,t.indentBlocks=f.indentBlocks;var p=n(14);t.toggleOrderedList=p.toggleOrderedList,t.toggleUnorderedList=p.toggleUnorderedList,t.toggleList=p.toggleList;var m=n(2);t.hasSameMarkup=m.hasSameMarkup,t.getUniqueStyleValues=m.getUniqueStyleValues,t.getSelectionText=m.getSelectionText,t.getNodeFromSelection=m.getNodeFromSelection,t.canInsert=m.canInsert,t.insertNode=m.insertNode,t.indentHtml=m.indentHtml;var g=n(27);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var v=n(16);t.indentRules=v.indentRules,t.outdentRules=v.outdentRules;var y=n(26);t.nodes=y.nodes,t.marks=y.marks;var h=n(25);t.buildKeymap=h.buildKeymap,t.buildListKeymap=h.buildListKeymap;var k=n(24);t.bold=k.bold,t.italic=k.italic,t.underline=k.underline,t.strikethrough=k.strikethrough,t.subscript=k.subscript,t.superscript=k.superscript,t.link=k.link;var M=n(23);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var b=n(10);t.convertMsLists=b.convertMsLists;var S=n(22);t.createTable=S.createTable,r.__exportStar(n(7),t),r.__exportStar(n(21),t),r.__exportStar(n(20),t),r.__exportStar(n(12),t),r.__exportStar(n(11),t),r.__exportStar(n(19),t),r.__exportStar(n(3),t),r.__exportStar(n(8),t),r.__exportStar(n(0),t),r.__exportStar(n(13),t),r.__exportStar(n(4),t),r.__exportStar(n(18),t),function(e){for(var t in e)_(t,e[t])}(t)}],r.c=a,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=33)}}}); |
{ | ||
"name": "@progress/kendo-editor-common", | ||
"description": "Kendo UI TypeScript package exporting functions for Editor component", | ||
"version": "0.6.1-dev.202007090948", | ||
"version": "0.6.1-dev.202007100644", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "Kendo UI" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
448075
8329