diff options
Diffstat (limited to 'js/vendors~editor.js')
-rw-r--r-- | js/vendors~editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/vendors~editor.js b/js/vendors~editor.js index b7480d326..26e3f9e7a 100644 --- a/js/vendors~editor.js +++ b/js/vendors~editor.js @@ -10,7 +10,7 @@ * @license MIT */Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=D,t.install=g,t.mapState=t.mapMutations=t.mapGetters=t.mapActions=t.createNamespacedHelpers=t.Store=t.default=void 0;var r=("undefined"!=typeof window?window:void 0!==e?e:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(e,t){if(void 0===t&&(t=[]),null===e||"object"!==n(e))return e;var r,i=(r=function(t){return t.original===e},t.filter(r)[0]);if(i)return i.copy;var a=Array.isArray(e)?[]:{};return t.push({original:e,copy:a}),Object.keys(e).forEach((function(n){a[n]=o(e[n],t)})),a}function i(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function a(e){return null!==e&&"object"===n(e)}var s=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},u={namespaced:{configurable:!0}};u.namespaced.get=function(){return!!this._rawModule.namespaced},s.prototype.addChild=function(e,t){this._children[e]=t},s.prototype.removeChild=function(e){delete this._children[e]},s.prototype.getChild=function(e){return this._children[e]},s.prototype.hasChild=function(e){return e in this._children},s.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},s.prototype.forEachChild=function(e){i(this._children,e)},s.prototype.forEachGetter=function(e){this._rawModule.getters&&i(this._rawModule.getters,e)},s.prototype.forEachAction=function(e){this._rawModule.actions&&i(this._rawModule.actions,e)},s.prototype.forEachMutation=function(e){this._rawModule.mutations&&i(this._rawModule.mutations,e)},Object.defineProperties(s.prototype,u);var c=function(e){this.register([],e,!1)};c.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},c.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},c.prototype.update=function(e){!function e(t,n,r){0;if(n.update(r),r.modules)for(var o in r.modules){if(!n.getChild(o))return void 0;e(t.concat(o),n.getChild(o),r.modules[o])}}([],this.root,e)},c.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var o=new s(t,n);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&i(t.modules,(function(t,o){r.register(e.concat(o),t,n)}))},c.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},c.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var l;var d=function(e){var t=this;void 0===e&&(e={}),!l&&"undefined"!=typeof window&&window.Vue&&g(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new c(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new l,this._makeLocalGettersCache=Object.create(null);var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,n){return s.call(i,e,t,n)},this.strict=o;var u=this._modules.root.state;y(this,u,[],this._modules.root),m(this,u),n.forEach((function(e){return e(t)})),(void 0!==e.devtools?e.devtools:l.config.devtools)&&function(e){r&&(e._devtoolHook=r,r.emit("vuex:init",e),r.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){r.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){r.emit("vuex:action",e,t)}),{prepend:!0}))}(this)};t.Store=d;var f={state:{configurable:!0}};function p(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function h(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;y(e,n,[],e._modules.root,!0),m(e,n,t)}function m(e,t,n){var r=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,a={};i(o,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=l.config.silent;l.config.silent=!0,e._vm=new l({data:{$$state:t},computed:a}),l.config.silent=s,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(e),r&&(n&&e._withCommit((function(){r._data.$$state=null})),l.nextTick((function(){return r.$destroy()})))}function y(e,t,n,r,o){var i=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=r),!i&&!o){var s=_(t,n.slice(0,-1)),u=n[n.length-1];e._withCommit((function(){l.set(s,u,r.state)}))}var c=r.context=function(e,t,n){var r=""===t,o={dispatch:r?e.dispatch:function(n,r,o){var i=v(n,r,o),a=i.payload,s=i.options,u=i.type;return s&&s.root||(u=t+u),e.dispatch(u,a)},commit:r?e.commit:function(n,r,o){var i=v(n,r,o),a=i.payload,s=i.options,u=i.type;s&&s.root||(u=t+u),e.commit(u,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return e.getters}:function(){return function(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,r)===t){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}(e,t)}},state:{get:function(){return _(e.state,n)}}}),o}(e,a,n);r.forEachMutation((function(t,n){!function(e,t,n,r){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,r.state,t)}))}(e,a+n,t,c)})),r.forEachAction((function(t,n){var r=t.root?n:a+n,o=t.handler||t;!function(e,t,n,r){(e._actions[t]||(e._actions[t]=[])).push((function(t){var o,i=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,r,o,c)})),r.forEachGetter((function(t,n){!function(e,t,n,r){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)}}(e,a+n,t,c)})),r.forEachChild((function(r,i){y(e,t,n.concat(i),r,o)}))}function _(e,t){return t.reduce((function(e,t){return e[t]}),e)}function v(e,t,n){return a(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function g(e){l&&e===l||function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:n});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[n].concat(e.init):n,t.call(this,e)}}function n(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(l=e)}f.state.get=function(){return this._vm._data.$$state},f.state.set=function(e){0},d.prototype.commit=function(e,t,n){var r=this,o=v(e,t,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),u=this._mutations[i];u&&(this._withCommit((function(){u.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},d.prototype.dispatch=function(e,t){var n=this,r=v(e,t),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(e){0}var u=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);return new Promise((function(e,t){u.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(e){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(e){0}t(e)}))}))}},d.prototype.subscribe=function(e,t){return p(e,this._subscribers,t)},d.prototype.subscribeAction=function(e,t){return p("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},d.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},d.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},d.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),y(this,this.state,e,this._modules.get(e),n.preserveState),m(this,this.state)},d.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=_(t.state,e.slice(0,-1));l.delete(n,e[e.length-1])})),h(this)},d.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},d.prototype.hotUpdate=function(e){this._modules.update(e),h(this,!0)},d.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(d.prototype,f);var b=x((function(e,t){var n={};return L(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=T(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,t,n):t[o]},n[r].vuex=!0})),n}));t.mapState=b;var M=x((function(e,t){var n={};return L(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=this.$store.commit;if(e){var i=T(this.$store,"mapMutations",e);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(t)):r.apply(this.$store,[o].concat(t))}})),n}));t.mapMutations=M;var k=x((function(e,t){var n={};return L(t).forEach((function(t){var r=t.key,o=t.val;o=e+o,n[r]=function(){if(!e||T(this.$store,"mapGetters",e))return this.$store.getters[o]},n[r].vuex=!0})),n}));t.mapGetters=k;var w=x((function(e,t){var n={};return L(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var i=T(this.$store,"mapActions",e);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(t)):r.apply(this.$store,[o].concat(t))}})),n}));t.mapActions=w;var S=function(e){return{mapState:b.bind(null,e),mapGetters:k.bind(null,e),mapMutations:M.bind(null,e),mapActions:w.bind(null,e)}};function L(e){return function(e){return Array.isArray(e)||a(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function x(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function T(e,t,n){return e._modulesNamespaceMap[n]}function D(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var r=e.transformer;void 0===r&&(r=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var a=e.actionFilter;void 0===a&&(a=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var u=e.logMutations;void 0===u&&(u=!0);var c=e.logActions;void 0===c&&(c=!0);var l=e.logger;return void 0===l&&(l=console),function(e){var d=o(e.state);void 0!==l&&(u&&e.subscribe((function(e,a){var s=o(a);if(n(e,d,s)){var u=A(),c=i(e),f="mutation "+e.type+u;Y(l,f,t),l.log("%c prev state","color: #9E9E9E; font-weight: bold",r(d)),l.log("%c mutation","color: #03A9F4; font-weight: bold",c),l.log("%c next state","color: #4CAF50; font-weight: bold",r(s)),C(l)}d=s})),c&&e.subscribeAction((function(e,n){if(a(e,n)){var r=A(),o=s(e),i="action "+e.type+r;Y(l,i,t),l.log("%c action","color: #03A9F4; font-weight: bold",o),C(l)}})))}}function Y(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch(n){e.log(t)}}function C(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function A(){var e=new Date;return" @ "+O(e.getHours(),2)+":"+O(e.getMinutes(),2)+":"+O(e.getSeconds(),2)+"."+O(e.getMilliseconds(),3)}function O(e,t){return n="0",r=t-e.toString().length,new Array(r+1).join(n)+e;var n,r}t.createNamespacedHelpers=S;var E={Store:d,install:g,version:"3.6.2",mapState:b,mapMutations:M,mapGetters:k,mapActions:w,createNamespacedHelpers:S,createLogger:D};t.default=E}).call(this,n(14))},function(e,t,n){"use strict";var r=n(1),o=n(53),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){"use strict";var r=n(87);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var r=n(2)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(59))&&r.__esModule?r:{default:r};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"appId",void 0),a(this,"persisted",!1),a(this,"clearedOnLogout",!1),this.appId=t}var t,n,r;return t=e,(n=[{key:"persist",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.persisted=e,this}},{key:"clearOnLogout",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clearedOnLogout=e,this}},{key:"build",value:function(){return new o.default(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}])&&i(t.prototype,n),r&&i(t,r),e}();t.default=s},function(e,t,n){"use strict";n(97),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(150))&&r.__esModule?r:{default:r},i=n(131);var a=o.default.create({headers:{requesttoken:(0,i.getRequestToken)()}}),s=Object.assign(a,{CancelToken:o.default.CancelToken,isCancel:o.default.isCancel});(0,i.onRequestTokenUpdate)((function(e){return a.defaults.headers.requesttoken=e}));var u=s;t.default=u},,,,,function(e,t,n){"use strict";var r=n(84).charAt,o=n(25),i=n(69),a=o.set,s=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(13),o=n(7),i=n(0),a=n(92),s=RegExp.prototype,u=s.toString,c=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),l="toString"!=u.name;(c||l)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(137),o=n(7),i=n(12),a=n(22),s=n(16),u=n(138),c=n(185),l=n(139),d=Math.max,f=Math.min;r("replace",2,(function(e,t,n,r){var p=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,h=r.REPLACE_KEEPS_$0,m=p?"$":"$0";return[function(n,r){var o=s(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!p&&h||"string"==typeof r&&-1===r.indexOf(m)){var s=n(t,e,this,r);if(s.done)return s.value}var y=o(e),_=String(this),v="function"==typeof r;v||(r=String(r));var g=y.global;if(g){var b=y.unicode;y.lastIndex=0}for(var M=[];;){var k=l(y,_);if(null===k)break;if(M.push(k),!g)break;""===String(k[0])&&(y.lastIndex=u(_,i(y.lastIndex),b))}for(var w,S="",L=0,x=0;x<M.length;x++){k=M[x];for(var T=String(k[0]),D=d(f(a(k.index),_.length),0),Y=[],C=1;C<k.length;C++)Y.push(void 0===(w=k[C])?w:String(w));var A=k.groups;if(v){var O=[T].concat(Y,D,_);void 0!==A&&O.push(A);var E=String(r.apply(void 0,O))}else E=c(T,_,D,Y,A,r);D>=L&&(S+=_.slice(L,D)+E,L=D+T.length)}return S+_.slice(L)}]}))},function(e,t,n){"use strict";var r=n(1),o=n(112),i=n(77),a=n(8),s=n(2),u=s("iterator"),c=s("toStringTag"),l=i.values;for(var d in o){var f=r[d],p=f&&f.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,d),o[d])for(var h in i)if(p[h]!==i[h])try{a(p,h,i[h])}catch(e){p[h]=i[h]}}}},function(e,t,n){"use strict";var r=n(90),o=n(28),i=n(2)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r=n(3),o=n(88);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRequestToken",{enumerable:!0,get:function(){return r.getRequestToken}}),Object.defineProperty(t,"onRequestTokenUpdate",{enumerable:!0,get:function(){return r.onRequestTokenUpdate}}),Object.defineProperty(t,"getCurrentUser",{enumerable:!0,get:function(){return o.getCurrentUser}});var r=n(168),o=n(183)},function(e,t,n){"use strict";var r=n(2)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){"use strict";var r=n(21),o=n(9),i=n(2),a=n(10),s=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(1),o=n(112),i=n(182),a=n(8);for(var s in o){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==i)try{a(c,"forEach",i)}catch(e){c.forEach=i}}},function(e,t,n){"use strict";var r=n(0);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";n(78);var r=n(13),o=n(63),i=n(0),a=n(2),s=n(8),u=a("species"),c=RegExp.prototype,l=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d="$0"==="a".replace(/./,"$0"),f=a("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),h=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var m=a(e),y=!i((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),_=y&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!y||!_||"replace"===e&&(!l||!d||p)||"split"===e&&!h){var v=/./[m],g=n(m,""[e],(function(e,t,n,r,i){var a=t.exec;return a===o||a===c.exec?y&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=g[0],M=g[1];r(String.prototype,e,b),r(c,m,2==t?function(e,t){return M.call(e,this,t)}:function(e){return M.call(e,this)})}f&&s(c[m],"sham",!0)}},function(e,t,n){"use strict";var r=n(84).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(15),i=n(63);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!==r(a))throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},,,function(e,t,n){"use strict";var r=n(10),o=n(0),i=n(43),a=n(67),s=n(64),u=n(11),c=n(34),l=Object.assign,d=Object.defineProperty;e.exports=!l||o((function(){if(r&&1!==l({b:1},l(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||"abcdefghijklmnopqrst"!=i(l({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,l=1,d=a.f,f=s.f;o>l;)for(var p,h=c(arguments[l++]),m=d?i(h).concat(d(h)):i(h),y=m.length,_=0;y>_;)p=m[_++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:l},function(e,t,n){"use strict";var r=n(2),o=n(60),i=n(9),a=r("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){"use strict";var r=n(10),o=n(9),i=n(7),a=n(43);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),s=r.length,u=0;s>u;)o.f(e,n=r[u++],t[n]);return e}},function(e,t,n){"use strict";var r=n(21);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(109).IteratorPrototype,o=n(60),i=n(18),a=n(61),s=n(28),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,c,!1,!0),s[c]=u,e}},function(e,t,n){"use strict";var r=n(2),o=n(28),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},,function(e,t,n){"use strict";e.exports=n(151)},function(e,t,n){"use strict";var r=n(6),o=n(98),i=n(152),a=n(104);function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=s(n(101));u.Axios=i,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=n(105),u.CancelToken=n(165),u.isCancel=n(100),u.all=function(e){return Promise.all(e)},u.spread=n(166),u.isAxiosError=n(167),e.exports=u,e.exports.default=u},function(e,t,n){"use strict";var r=n(6),o=n(99),i=n(153),a=n(154),s=n(104);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(6);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(6),o=n(155),i=n(100),a=n(101);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(103);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(6);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(161),o=n(162);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(6),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(6);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(105);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return"object"===r(e)&&!0===e.isAxiosError}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestToken=function(){return i},t.onRequestTokenUpdate=function(e){a.push(e)};var r=n(74),o=document.getElementsByTagName("head")[0],i=o?o.getAttribute("data-requesttoken"):null,a=[];(0,r.subscribe)("csrf-token-update",(function(e){i=e.token,a.forEach((function(t){try{t(e.token)}catch(e){console.error("error updating CSRF token observer",e)}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyBus=void 0;var r=i(n(170)),o=i(n(173));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s="1.2.0",u=function(){function e(t){var n,i,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a=void 0,(i="bus")in(n=this)?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,"function"==typeof t.getVersion&&(0,r.default)(t.getVersion())?(0,o.default)(t.getVersion())!==(0,o.default)(this.getVersion())&&console.warn("Proxying an event bus of version "+t.getVersion()+" with "+this.getVersion()):console.warn("Proxying an event bus with an unknown or invalid version"),this.bus=t}var t,n,i;return t=e,(n=[{key:"getVersion",value:function(){return s}},{key:"subscribe",value:function(e,t){this.bus.subscribe(e,t)}},{key:"unsubscribe",value:function(e,t){this.bus.unsubscribe(e,t)}},{key:"emit",value:function(e,t){this.bus.emit(e,t)}}])&&a(t.prototype,n),i&&a(t,i),e}();t.ProxyBus=u},function(e,t,n){"use strict";var r=n(171);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(68).MAX_LENGTH,i=n(106),a=i.re,s=i.t,u=n(108);e.exports=function(e,t){if(t&&"object"===r(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof u)return e;if("string"!=typeof e)return null;if(e.length>o)return null;if(!(t.loose?a[s.LOOSE]:a[s.FULL]).test(e))return null;try{return new u(e,t)}catch(e){return null}}},function(e,t,n){"use strict";var r=/^[0-9]+$/,o=function(e,t){var n=r.test(e),o=r.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:e<t?-1:1};e.exports={compareIdentifiers:o,rcompareIdentifiers:function(e,t){return o(t,e)}}},function(e,t,n){"use strict";var r=n(108);e.exports=function(e,t){return new r(e,t).major}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(40),n(33),n(77),n(177),n(76),n(125),n(135),n(128),Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleBus=void 0;var o="1.2.0",i=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n="handlers",r=new Map,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}var t,n,i;return t=e,(n=[{key:"getVersion",value:function(){return o}},{key:"subscribe",value:function(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).concat(t))}},{key:"unsubscribe",value:function(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).filter((function(e){return e!=t})))}},{key:"emit",value:function(e,t){(this.handlers.get(e)||[]).forEach((function(e){try{e(t)}catch(e){console.error("could not invoke event listener",e)}}))}}])&&r(t.prototype,n),i&&r(t,i),e}();t.SimpleBus=i},function(e,t,n){"use strict";var r=n(0);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(3);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(178),o=n(180);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(62),a=n(13),s=n(111),u=n(89),c=n(82),l=n(3),d=n(0),f=n(132),p=n(61),h=n(130);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),_=m?"set":"add",v=o[e],g=v&&v.prototype,b=v,M={},k=function(e){var t=g[e];a(g,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof v||!(y||g.forEach&&!d((function(){(new v).entries().next()})))))b=n.getConstructor(t,e,m,_),s.REQUIRED=!0;else if(i(e,!0)){var w=new b,S=w[_](y?{}:-0,1)!=w,L=d((function(){w.has(1)})),x=f((function(e){new v(e)})),T=!y&&d((function(){for(var e=new v,t=5;t--;)e[_](t,t);return!e.has(-0)}));x||((b=t((function(t,n){c(t,b,e);var r=h(new v,t,b);return null!=n&&u(n,r[_],{that:r,AS_ENTRIES:m}),r}))).prototype=g,g.constructor=b),(L||T)&&(k("delete"),k("has"),m&&k("get")),(T||S)&&k(_),y&&g.clear&&delete g.clear}return M[e]=b,r({global:!0,forced:b!=v},M),p(b,e),y||n.setStrong(b,e,m),b}},function(e,t,n){"use strict";var r=n(0);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(9).f,o=n(60),i=n(133),a=n(39),s=n(82),u=n(89),c=n(69),l=n(134),d=n(10),f=n(111).fastKey,p=n(25),h=p.set,m=p.getterFor;e.exports={getConstructor:function(e,t,n,c){var l=e((function(e,r){s(e,l,t),h(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=r&&u(r,e[c],{that:e,AS_ENTRIES:n})})),p=m(t),y=function(e,t,n){var r,o,i=p(e),a=_(e,t);return a?a.value=n:(i.last=a={index:o=f(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),d?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},_=function(e,t){var n,r=p(e),o=f(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(l.prototype,{clear:function(){for(var e=p(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=p(this),n=_(this,e);if(n){var r=n.next,o=n.previous;delete t.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),t.first==n&&(t.first=r),t.last==n&&(t.last=o),d?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=p(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!_(this,e)}}),i(l.prototype,n?{get:function(e){var t=_(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),d&&r(l.prototype,"size",{get:function(){return p(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",o=m(t),i=m(r);c(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){"use strict";var r=n(70),o=n(90);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){"use strict";var r=n(37).forEach,o=n(91)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentUser=function(){if(null===o)return null;return{uid:o,displayName:a,isAdmin:s}};var r=document.getElementsByTagName("head")[0],o=r?r.getAttribute("data-user"):null,i=document.getElementsByTagName("head")[0],a=i?i.getAttribute("data-user-displayname"):null,s="undefined"!=typeof OC&&OC.isUserAdmin()},function(e,t,n){"use strict";var r=n(5),o=n(66).indexOf,i=n(91),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=i("indexOf");r({target:"Array",proto:!0,forced:s||!u},{indexOf:function(e){return s?a.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(11),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,u,c,l){var d=n+e.length,f=u.length,p=s;return void 0!==c&&(c=r(c),p=a),i.call(l,p,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(d);case"<":a=c[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>f){var l=o(s/10);return 0===l?r:l<=f?void 0===u[l-1]?i.charAt(1):u[l-1]+i.charAt(1):r}a=u[s-1]}return void 0===a?"":a}))}},,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){var r,o,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)} //! moment.js -i=function(){var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Lt(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function _(e){var t=h(NaN);return null!=e?p(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=o.momentProperties=[];function g(e,t){var n,r,o;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)u(o=t[r=v[n]])||(e[r]=o);return e}var b=!1;function M(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function k(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function L(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&a++;return a+i}function x(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return p((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],s=0;s<arguments.length;s++){if(r="","object"===a(arguments[s])){for(var u in r+="\n["+s+"] ",arguments[0])r+=u+": "+arguments[0][u]+", ";r=r.slice(0,-2)}else r=arguments[s];i.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var D,Y={};function C(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),Y[e]||(x(t),Y[e]=!0)}function A(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var n,r=p({},e);for(n in t)f(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&s(e[n])&&(r[n]=p({},r[n]));return r}function E(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var j={};function P(e,t){var n=e.toLowerCase();j[n]=j[n+"s"]=j[t]=e}function N(e){return"string"==typeof e?j[e]||j[e.toLowerCase()]:void 0}function H(e){var t,n,r={};for(n in e)f(e,n)&&(t=N(n))&&(r[t]=e[n]);return r}var R={};function I(e,t){R[e]=t}function F(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,$=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},W={};function U(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=V(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,o=e.match(z);for(t=0,n=o.length;t<n;t++)W[o[t]]?o[t]=W[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=A(o[r])?o[r].call(t,e):o[r];return i}}(t),B[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for($.lastIndex=0;n>=0&&$.test(e);)e=e.replace($,r),$.lastIndex=0,n-=1;return e}var J=/\d/,G=/\d\d/,K=/\d{3}/,Z=/\d{4}/,X=/[+-]?\d{6}/,Q=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,oe=/[+-]?\d{1,6}/,ie=/\d+/,ae=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,ue=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function de(e,t,n){le[e]=A(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return f(le,e)?le[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function me(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=S(e)}),n=0;n<e.length;n++)he[e[n]]=r}function ye(e,t){me(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function _e(e,t,n){null!=t&&f(he,e)&&he[e](t,n._a,n,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),P("year","y"),I("year",1),de("Y",ae),de("YY",Q,G),de("YYYY",re,Z),de("YYYYY",oe,X),de("YYYYYY",oe,X),me(["YYYYY","YYYYYY"],0),me("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):S(e)})),me("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),me("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)};var be,Me=ke("FullYear",!0);function ke(e,t){return function(n){return null!=n?(Se(this,e,n),o.updateOffset(this,t),this):we(this,e)}}function we(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Se(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Le(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Le(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ge(e)?29:28:31-r%7%2}be=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),P("month","M"),I("month",8),de("M",Q),de("MM",Q,G),de("MMM",(function(e,t){return t.monthsShortRegex(e)})),de("MMMM",(function(e,t){return t.monthsRegex(e)})),me(["M","MM"],(function(e,t){t[1]=S(e)-1})),me(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:m(n).invalidMonth=e}));var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ye(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=be.call(this._shortMonthsParse,a))?o:null:-1!==(o=be.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=be.call(this._shortMonthsParse,a))||-1!==(o=be.call(this._longMonthsParse,a))?o:null:-1!==(o=be.call(this._longMonthsParse,a))||-1!==(o=be.call(this._shortMonthsParse,a))?o:null}function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Le(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ae(e){return null!=e?(Ce(this,e),o.updateOffset(this,!0),this):we(this,"Month")}var Oe=ce,Ee=ce;function je(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=h([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),o[t]=pe(o[t]);for(t=0;t<24;t++)i[t]=pe(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Pe(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function Ne(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function He(e,t,n){var r=7+t-n;return-(7+Ne(e,0,r).getUTCDay()-t)%7+r-1}function Re(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+He(e,r,o);return s<=0?a=ve(i=e-1)+s:s>ve(e)?(i=e+1,a=s-ve(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Ie(e,t,n){var r,o,i=He(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+Fe(o=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Fe(e,t,n){var r=He(e,t,n),o=He(e+1,t,n);return(ve(e)-r+o)/7}function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),I("week",5),I("isoWeek",5),de("w",Q),de("ww",Q,G),de("W",Q),de("WW",Q,G),ye(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=S(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),de("d",Q),de("e",Q),de("E",Q),de("dd",(function(e,t){return t.weekdaysMinRegex(e)})),de("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),de("dddd",(function(e,t){return t.weekdaysRegex(e)})),ye(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:m(n).invalidWeekday=e})),ye(["d","e","E"],(function(e,t,n,r){t[r]=S(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ue(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=be.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=be.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=be.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=be.call(this._weekdaysParse,a))||-1!==(o=be.call(this._shortWeekdaysParse,a))||-1!==(o=be.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=be.call(this._shortWeekdaysParse,a))||-1!==(o=be.call(this._weekdaysParse,a))||-1!==(o=be.call(this._minWeekdaysParse,a))?o:null:-1!==(o=be.call(this._minWeekdaysParse,a))||-1!==(o=be.call(this._weekdaysParse,a))||-1!==(o=be.call(this._shortWeekdaysParse,a))?o:null}var qe=ce,Ve=ce,Je=ce;function Ge(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],u=[],c=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),u.push(i),c.push(r),c.push(o),c.push(i);for(a.sort(e),s.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),u[t]=pe(u[t]),c[t]=pe(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Ze(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ke),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Ze("a",!0),Ze("A",!1),P("hour","h"),I("hour",13),de("a",Xe),de("A",Xe),de("H",Q),de("h",Q),de("k",Q),de("HH",Q,G),de("hh",Q,G),de("kk",Q,G),de("hmm",ee),de("hmmss",te),de("Hmm",ee),de("Hmmss",te),me(["H","HH"],3),me(["k","kk"],(function(e,t,n){var r=S(e);t[3]=24===r?0:r})),me(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),me(["h","hh"],(function(e,t,n){t[3]=S(e),m(n).bigHour=!0})),me("hmm",(function(e,t,n){var r=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r)),m(n).bigHour=!0})),me("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r,2)),t[5]=S(e.substr(o)),m(n).bigHour=!0})),me("Hmm",(function(e,t,n){var r=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r))})),me("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r,2)),t[5]=S(e.substr(o))}));var Qe,et=ke("Hours",!0),tt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:De,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:We,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},nt={},rt={};function ot(e){return e?e.toLowerCase().replace("_","-"):e}function it(t){var r=null;if(!nt[t]&&void 0!==e&&e&&e.exports)try{r=Qe._abbr,n(647)("./"+t),at(r)}catch(e){}return nt[t]}function at(e,t){var n;return e&&((n=u(t)?ut(e):st(e,t))?Qe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qe._abbr}function st(e,t){if(null!==t){var n,r=tt;if(t.abbr=e,null!=nt[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=nt[e]._config;else if(null!=t.parentLocale)if(null!=nt[t.parentLocale])r=nt[t.parentLocale]._config;else{if(null==(n=it(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return nt[e]=new E(O(r,t)),rt[e]&&rt[e].forEach((function(e){st(e.name,e.config)})),at(e),nt[e]}return delete nt[e],null}function ut(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qe;if(!i(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=ot(e[i]).split("-")).length,n=(n=ot(e[i+1]))?n.split("-"):null;t>0;){if(r=it(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(o,n,!0)>=t-1)break;t--}i++}return Qe}(e)}function ct(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Le(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function dt(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,i,a,s,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=lt(t.GG,e._a[0],Ie(xt(),1,4).year),r=lt(t.W,1),((o=lt(t.E,1))<1||o>7)&&(u=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var c=Ie(xt(),i,a);n=lt(t.gg,e._a[0],c.year),r=lt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i}r<1||r>Fe(n,i,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(s=Re(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],r[0]),(e._dayOfYear>ve(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Ne(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ne:Pe).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],yt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,r,o,i,a,s=e._i,u=ft.exec(s)||pt.exec(s);if(u){for(m(e).iso=!0,t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(u[1])){o=mt[t][0],r=!1!==mt[t][2];break}if(null==o)return void(e._isValid=!1);if(u[3]){for(t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[3])){i=(u[2]||" ")+yt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(u[4]){if(!ht.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),wt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var Mt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,r,o,i,a,s,u=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){var c=(t=u[4],n=u[3],r=u[2],o=u[5],i=u[6],a=u[7],s=[bt(t),De.indexOf(n),parseInt(r,10),parseInt(o,10),parseInt(i,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],c,e))return;e._a=c,e._tzm=function(e,t,n){if(e)return Mt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(u[8],u[9],u[10]),e._d=Ne.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function wt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,i,a,s=""+e._i,u=s.length,c=0;for(r=V(e._f,e._locale).match(z)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(fe(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&m(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),c+=n.length),W[i]?(n?m(e).empty=!1:m(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&m(e).unusedTokens.push(i);m(e).charsLeftOver=u-c,s.length>0&&m(e).unusedInput.push(s),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),dt(e),ct(e)}else kt(e);else vt(e)}function St(e){var t=e._i,n=e._f;return e._locale=e._locale||ut(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new M(ct(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],wt(t),y(t)&&(i+=m(t).charsLeftOver,i+=10*m(t).unusedTokens.length,m(t).score=i,(null==r||i<r)&&(r=i,n=t));p(e,n||t)}(e):n?wt(e):function(e){var t=e._i;u(t)?e._d=new Date(o.now()):l(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,kt(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),dt(e)):s(t)?function(e){if(!e._d){var t=H(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),dt(e)}}(e):c(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),y(e)||(e._d=null),e))}function Lt(e,t,n,r,o){var a,u={};return!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=n,u._i=e,u._f=t,u._strict=r,(a=new M(ct(St(u))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function xt(e,t,n,r){return Lt(e,t,n,r,!1)}o.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Tt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Dt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Yt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return xt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function At(e){var t=H(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===be.call(Ct,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Ct.length;++r)if(e[Ct[r]]){if(n)return!1;parseFloat(e[Ct[r]])!==S(e[Ct[r]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=ut(),this._bubble()}function Ot(e){return e instanceof At}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function jt(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}jt("Z",":"),jt("ZZ",""),de("Z",ue),de("ZZ",ue),me(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Nt(ue,e)}));var Pt=/([\+\-]|\d\d)/gi;function Nt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Pt)||["-",0,0],o=60*r[1]+S(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Ht(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||l(e)?e.valueOf():xt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):xt(e).local()}function Rt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function It(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,o,i,s,u,l=e,d=null;return Ot(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(l={},t?l[t]=e:l.milliseconds=e):(d=Ft.exec(e))?(n="-"===d[1]?-1:1,l={y:0,d:S(d[2])*n,h:S(d[3])*n,m:S(d[4])*n,s:S(d[5])*n,ms:S(Et(1e3*d[6]))*n}):(d=zt.exec(e))?(n="-"===d[1]?-1:1,l={y:Bt(d[2],n),M:Bt(d[3],n),w:Bt(d[4],n),d:Bt(d[5],n),h:Bt(d[6],n),m:Bt(d[7],n),s:Bt(d[8],n)}):null==l?l={}:"object"===a(l)&&("from"in l||"to"in l)&&(i=xt(l.from),s=xt(l.to),o=i.isValid()&&s.isValid()?(s=Ht(s,i),i.isBefore(s)?u=Wt(i,s):((u=Wt(s,i)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(l={}).ms=o.milliseconds,l.M=o.months),r=new At(l),Ot(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),qt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,n,r){var i=t._milliseconds,a=Et(t._days),s=Et(t._months);e.isValid()&&(r=null==r||r,s&&Ce(e,we(e,"Month")+s*n),a&&Se(e,"Date",we(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}$t.fn=At.prototype,$t.invalid=function(){return $t(NaN)};var Vt=Ut(1,"add"),Jt=Ut(-1,"subtract");function Gt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Kt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ut(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Zt=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Xt(){return this._locale}function Qt(e,t){return(e%t+t)%t}function en(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function tn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function nn(e,t){U(0,[e,e.length],0,t)}function rn(e,t,n,r,o){var i;return null==e?Ie(this,r,o).year:(t>(i=Fe(e,r,o))&&(t=i),on.call(this,e,t,n,r,o))}function on(e,t,n,r,o){var i=Re(e,t,n,r,o),a=Ne(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),nn("gggg","weekYear"),nn("ggggg","weekYear"),nn("GGGG","isoWeekYear"),nn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),de("G",ae),de("g",ae),de("GG",Q,G),de("gg",Q,G),de("GGGG",re,Z),de("gggg",re,Z),de("GGGGG",oe,X),de("ggggg",oe,X),ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=S(e)})),ye(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),P("quarter","Q"),I("quarter",7),de("Q",J),me("Q",(function(e,t){t[1]=3*(S(e)-1)})),U("D",["DD",2],"Do","date"),P("date","D"),I("date",9),de("D",Q),de("DD",Q,G),de("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),me(["D","DD"],2),me("Do",(function(e,t){t[2]=S(e.match(Q)[0])}));var an=ke("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),I("dayOfYear",4),de("DDD",ne),de("DDDD",K),me(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=S(e)})),U("m",["mm",2],0,"minute"),P("minute","m"),I("minute",14),de("m",Q),de("mm",Q,G),me(["m","mm"],4);var sn=ke("Minutes",!1);U("s",["ss",2],0,"second"),P("second","s"),I("second",15),de("s",Q),de("ss",Q,G),me(["s","ss"],5);var un,cn=ke("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),P("millisecond","ms"),I("millisecond",16),de("S",ne,J),de("SS",ne,G),de("SSS",ne,K),un="SSSS";un.length<=9;un+="S")de(un,ie);function ln(e,t){t[6]=S(1e3*("0."+e))}for(un="S";un.length<=9;un+="S")me(un,ln);var dn=ke("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var fn=M.prototype;function pn(e){return e}fn.add=Vt,fn.calendar=function(e,t){var n=e||xt(),r=Ht(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(A(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,xt(n)))},fn.clone=function(){return new M(this)},fn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":i=Gt(this,r)/12;break;case"month":i=Gt(this,r);break;case"quarter":i=Gt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:w(i)},fn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?tn:en;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Qt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Qt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||xt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(xt(),e)},fn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||xt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(xt(),e)},fn.get=function(e){return A(this[e=N(e)])?this[e]():this},fn.invalidAt=function(){return m(this).overflow},fn.isAfter=function(e,t){var n=k(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=k(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){var o=k(e)?e:xt(e),i=k(t)?t:xt(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},fn.isSame=function(e,t){var n,r=k(e)?e:xt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return y(this)},fn.lang=Zt,fn.locale=Kt,fn.localeData=Xt,fn.max=Dt,fn.min=Tt,fn.parsingFlags=function(){return p({},m(this))},fn.set=function(e,t){if("object"===a(e))for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:R[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=H(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(A(this[e=N(e)]))return this[e](t);return this},fn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?tn:en;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Qt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Qt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.subtract=Jt,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Me,fn.isLeapYear=function(){return ge(this.year())},fn.weekYear=function(e){return rn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return rn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Ae,fn.daysInMonth=function(){return Le(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},fn.date=an,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=et,fn.minute=fn.minutes=sn,fn.second=fn.seconds=cn,fn.millisecond=fn.milliseconds=dn,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(ue,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Rt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?qt(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Rt(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Rt(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=It,fn.isUTC=It,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=T("dates accessor is deprecated. Use date instead.",an),fn.months=T("months accessor is deprecated. Use month instead",Ae),fn.years=T("years accessor is deprecated. Use year instead",Me),fn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=St(e))._a){var t=e._isUTC?h(e._a):xt(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hn=E.prototype;function mn(e,t,n,r){var o=ut(),i=h().set(r,t);return o[n](i,e)}function yn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return mn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=mn(e,r,n,"month");return o}function _n(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var o,i=ut(),a=e?i._week.dow:0;if(null!=n)return mn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=mn(t,(o+a)%7,r,"day");return s}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return A(r)?r.call(t,n):r},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=pn,hn.postformat=pn,hn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return A(o)?o(e,t,n,r):o.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)A(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ye.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},hn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(n,this._week.dow):e?n[e.day()]:n},hn.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ue.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ve),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=T("moment.lang is deprecated. Use moment.locale instead.",at),o.langData=T("moment.langData is deprecated. Use moment.localeData instead.",ut);var vn=Math.abs;function gn(e,t,n,r){var o=$t(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function Mn(e){return 4800*e/146097}function kn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Sn=wn("ms"),Ln=wn("s"),xn=wn("m"),Tn=wn("h"),Dn=wn("d"),Yn=wn("w"),Cn=wn("M"),An=wn("Q"),On=wn("y");function En(e){return function(){return this.isValid()?this._data[e]:NaN}}var jn=En("milliseconds"),Pn=En("seconds"),Nn=En("minutes"),Hn=En("hours"),Rn=En("days"),In=En("months"),Fn=En("years"),zn=Math.round,$n={ss:44,s:45,m:45,h:22,d:26,M:11};function Bn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Wn=Math.abs;function Un(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),o=Wn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(o/12),a=o%=12,s=r,u=t,c=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Un(this._months)!==Un(d)?"-":"",h=Un(this._days)!==Un(d)?"-":"",m=Un(this._milliseconds)!==Un(d)?"-":"";return f+"P"+(i?p+i+"Y":"")+(a?p+a+"M":"")+(s?h+s+"D":"")+(u||c||l?"T":"")+(u?m+u+"H":"")+(c?m+c+"M":"")+(l?m+l+"S":"")}var Vn=At.prototype;return Vn.isValid=function(){return this._isValid},Vn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},Vn.add=function(e,t){return gn(this,e,t,1)},Vn.subtract=function(e,t){return gn(this,e,t,-1)},Vn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Mn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(kn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Vn.asMilliseconds=Sn,Vn.asSeconds=Ln,Vn.asMinutes=xn,Vn.asHours=Tn,Vn.asDays=Dn,Vn.asWeeks=Yn,Vn.asMonths=Cn,Vn.asQuarters=An,Vn.asYears=On,Vn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},Vn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,u=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*bn(kn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=w(i/1e3),u.seconds=e%60,t=w(e/60),u.minutes=t%60,n=w(t/60),u.hours=n%24,a+=w(n/24),s+=o=w(Mn(a)),a-=bn(kn(o)),r=w(s/12),s%=12,u.days=a,u.months=s,u.years=r,this},Vn.clone=function(){return $t(this)},Vn.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},Vn.milliseconds=jn,Vn.seconds=Pn,Vn.minutes=Nn,Vn.hours=Hn,Vn.days=Rn,Vn.weeks=function(){return w(this.days()/7)},Vn.months=In,Vn.years=Fn,Vn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),o=zn(r.as("s")),i=zn(r.as("m")),a=zn(r.as("h")),s=zn(r.as("d")),u=zn(r.as("M")),c=zn(r.as("y")),l=o<=$n.ss&&["s",o]||o<$n.s&&["ss",o]||i<=1&&["m"]||i<$n.m&&["mm",i]||a<=1&&["h"]||a<$n.h&&["hh",a]||s<=1&&["d"]||s<$n.d&&["dd",s]||u<=1&&["M"]||u<$n.M&&["MM",u]||c<=1&&["y"]||["yy",c];return l[2]=t,l[3]=+e>0,l[4]=n,Bn.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Vn.toISOString=qn,Vn.toString=qn,Vn.toJSON=qn,Vn.locale=Kt,Vn.localeData=Xt,Vn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Vn.lang=Zt,U("X",0,0,"unix"),U("x",0,0,"valueOf"),de("x",ae),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),me("x",(function(e,t,n){n._d=new Date(S(e))})),o.version="2.24.0",t=xt,o.fn=fn,o.min=function(){var e=[].slice.call(arguments,0);return Yt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Yt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=h,o.unix=function(e){return xt(1e3*e)},o.months=function(e,t){return yn(e,t,"months")},o.isDate=l,o.locale=at,o.invalid=_,o.duration=$t,o.isMoment=k,o.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},o.parseZone=function(){return xt.apply(null,arguments).parseZone()},o.localeData=ut,o.isDuration=Ot,o.monthsShort=function(e,t){return yn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var n,r,o=tt;null!=(r=it(e))&&(o=r._config),(n=new E(t=O(o,t))).parentLocale=nt[e],nt[e]=n,at(e)}else null!=nt[e]&&(null!=nt[e].parentLocale?nt[e]=nt[e].parentLocale:null!=nt[e]&&delete nt[e]);return nt[e]},o.locales=function(){return D(nt)},o.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},o.normalizeUnits=N,o.relativeTimeRounding=function(e){return void 0===e?zn:"function"==typeof e&&(zn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==$n[e]&&(void 0===t?$n[e]:($n[e]=t,"s"===e&&($n.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=fn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o},"object"===a(t)&&void 0!==e?e.exports=i():void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o)}).call(this,n(203)(e))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=Object.prototype.hasOwnProperty;function i(e,t){return o.call(e,t)}function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var u=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(u.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,d=n(415);var f=/[&<>"]/,p=/[&<>"]/g,h={"&":"&","<":"<",">":">",'"':"""};function m(e){return h[e]}var y=/[.?*+^$[\]\\(){}|-]/g;var _=n(243);t.lib={},t.lib.mdurl=n(416),t.lib.ucmicro=n(682),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==r(t))throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(u,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(c,(function(e,t,n){return t||function(e,t){var n=0;return i(d,t)?d[t]:35===t.charCodeAt(0)&&l.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(n):e}(e,n)}))},t.isValidEntityCode=a,t.fromCodePoint=s,t.escapeHtml=function(e){return f.test(e)?e.replace(p,m):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return _.test(e)},t.escapeRE=function(e){return e.replace(y,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.TextSelection=t.SelectionRange=t.Selection=t.PluginKey=t.Plugin=t.NodeSelection=t.EditorState=t.AllSelection=void 0;var r=n(205),o=n(207);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=Object.create(null),s=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t};t.Selection=s;var u={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};u.anchor.get=function(){return this.$anchor.pos},u.head.get=function(){return this.$head.pos},u.from.get=function(){return this.$from.pos},u.to.get=function(){return this.$to.pos},u.$from.get=function(){return this.ranges[0].$from},u.$to.get=function(){return this.ranges[0].$to},u.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},s.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},s.prototype.replace=function(e,t){void 0===t&&(t=r.Slice.empty);for(var n=t.content.lastChild,o=null,i=0;i<t.openEnd;i++)o=n,n=n.lastChild;for(var a=e.steps.length,s=this.ranges,u=0;u<s.length;u++){var c=s[u],l=c.$from,d=c.$to,f=e.mapping.slice(a);e.replaceRange(f.map(l.pos),f.map(d.pos),u?r.Slice.empty:t),0==u&&_(e,a,(n?n.isInline:o&&o.isTextblock)?-1:1)}},s.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,u=e.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);o?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),_(e,n,t.isInline?-1:1))}},s.findFrom=function(e,t,n){var r=e.parent.inlineContent?new l(e):y(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?y(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):y(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},s.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))},s.atStart=function(e){return y(e,e,0,0,1)||new h(e)},s.atEnd=function(e){return y(e,e,e.content.size,e.childCount,-1)||new h(e)},s.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=a[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},s.jsonID=function(e,t){if(e in a)throw new RangeError("Duplicate use of selection JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t},s.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(s.prototype,u),s.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t};t.SelectionRange=c;var l=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new d(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0)&&(n=r),new t(n,r)},Object.defineProperties(t.prototype,n),t}(s);t.TextSelection=l,s.jsonID("text",l);var d=function(e,t){this.anchor=e,this.head=t};d.prototype.map=function(e){return new d(e.map(this.anchor),e.map(this.head))},d.prototype.resolve=function(e){return l.between(e.resolve(this.anchor),e.resolve(this.head))};var f=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos,s=n.resolve(a);return i?e.near(s):new t(s)},t.prototype.content=function(){return new r.Slice(r.Fragment.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new p(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(s);t.NodeSelection=f,f.prototype.visible=!1,s.jsonID("node",f);var p=function(e){this.anchor=e};p.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new d(r,r):new p(r)},p.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&f.isSelectable(n)?new f(t):s.near(t)};var h=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),n==r.Slice.empty){t.delete(0,t.doc.content.size);var o=e.atStart(t.doc);o.eq(t.selection)||t.setSelection(o)}else e.prototype.replace.call(this,t,n)},t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return m},t}(s);t.AllSelection=h,s.jsonID("all",h);var m={map:function(){return this},resolve:function(e){return new h(e)}};function y(e,t,n,r,o,i){if(t.inlineContent)return l.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&f.isSelectable(s))return f.create(e,n-(o<0?s.nodeSize:0))}else{var u=y(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}}function _(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,a=e.steps[r];if(a instanceof o.ReplaceStep||a instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n))}}var v=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function g(e,t){return t&&e?e.bind(t):e}t.Transaction=v;var b=function(e,t,n){this.name=e,this.init=g(t.init,n),this.apply=g(t.apply,n)},M=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||s.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],k=function(e,t){var n=this;this.schema=e,this.fields=M.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},w=function(e){this.config=e};t.EditorState=w;var S={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};S.schema.get=function(){return this.config.schema},S.plugins.get=function(){return this.config.plugins},w.prototype.apply=function(e){return this.applyTransaction(e).state},w.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},w.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,u=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,u,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},w.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new w(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<L.length;i++)L[i](this,e,t);return t},S.tr.get=function(){return new v(this)},w.create=function(e){for(var t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new w(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},w.prototype.reconfigure=function(e){for(var t=new k(this.schema,e.plugins),n=t.fields,r=new w(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},w.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==i(e))for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},w.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var o=new k(e.schema,e.plugins),i=new w(o);return o.fields.forEach((function(o){if("doc"==o.name)i.doc=r.Node.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var a in n){var u=n[a],c=u.spec.state;if(u.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(i[o.name]=c.fromJSON.call(u,e,t[a],i))}i[o.name]=o.init(e,i)}})),i},w.addApplyListener=function(e){L.push(e)},w.removeApplyListener=function(e){var t=L.indexOf(e);t>-1&&L.splice(t,1)},Object.defineProperties(w.prototype,S);var L=[];var x=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:D("plugin")};t.Plugin=x,x.prototype.getState=function(e){return e[this.key]};var T=Object.create(null);function D(e){return e in T?e+"$"+ ++T[e]:(T[e]=0,e+"$")}var Y=function(e){void 0===e&&(e="key"),this.key=D(e)};t.PluginKey=Y,Y.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Y.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceError=f,t.Slice=t.Schema=t.ResolvedPos=t.NodeType=t.NodeRange=t.Node=t.MarkType=t.Mark=t.Fragment=t.DOMSerializer=t.DOMParser=t.ContentMatch=void 0;var r,o=(r=n(651))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize};t.Fragment=a;var s={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};a.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,a=0;a<t;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&!1!==n(s,r+a,o,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=u}},a.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},a.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},a.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new a(r,this.size+e.size)},a.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,i=0;i<t;o++){var s=this.content[o],u=i+s.nodeSize;u>e&&((i<e||u>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=u}return new a(n,r)},a.prototype.cutByIndex=function(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))},a.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,o)},a.prototype.addToStart=function(e){return new a([e].concat(this.content),this.size+e.nodeSize)},a.prototype.addToEnd=function(e){return new a(this.content.concat(e),this.size+e.nodeSize)},a.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},s.firstChild.get=function(){return this.content.length?this.content[0]:null},s.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},s.childCount.get=function(){return this.content.length},a.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},a.prototype.maybeChild=function(e){return this.content[e]},a.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},a.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),a=n.child(o);if(i!=a){if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)r++;return r}if(i.content.size||a.content.size){var u=e(i.content,a.content,r+1);if(null!=u)return u}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},a.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,a=n.childCount;;){if(0==i||0==a)return i==a?null:{a:r,b:o};var s=t.child(--i),u=n.child(--a),c=s.nodeSize;if(s!=u){if(!s.sameMarkup(u))return{a:r,b:o};if(s.isText&&s.text!=u.text){for(var l=0,d=Math.min(s.text.length,u.text.length);l<d&&s.text[s.text.length-l-1]==u.text[u.text.length-l-1];)l++,r--,o--;return{a:r,b:o}}if(s.content.size||u.content.size){var f=e(s.content,u.content,r-1,o-1);if(f)return f}r-=c,o-=c}else r-=c,o-=c}}(this,e,t,n)},a.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}},a.prototype.toString=function(){return"<"+this.toStringInner()+">"},a.prototype.toStringInner=function(){return this.content.join(", ")},a.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},a.fromJSON=function(e,t){if(!t)return a.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))},a.fromArray=function(e){if(!e.length)return a.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new a(t||e,n)},a.from=function(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(a.prototype,s);var u={index:0,offset:0};function c(e,t){return u.index=e,u.offset=t,u}function l(e,t){if(e===t)return!0;if(!e||"object"!=i(e)||!t||"object"!=i(t))return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!l(e[o],t[o]))return!1;for(var a in t)if(!(a in e))return!1}return!0}a.empty=new a([],0);var d=function(e,t){this.type=e,this.attrs=t};function f(e){var t=Error.call(this,e);return t.__proto__=f.prototype,t}t.Mark=d,d.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},d.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},d.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},d.prototype.eq=function(e){return this==e||this.type==e.type&&l(this.attrs,e.attrs)},d.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},d.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},d.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},d.setFrom=function(e){if(!e||0==e.length)return d.none;if(e instanceof d)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},d.none=[],f.prototype=Object.create(Error.prototype),f.prototype.constructor=f,f.prototype.name="ReplaceError";var p=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n};t.Slice=p;var h={size:{configurable:!0}};function m(e,t,n){if(n.openStart>e.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return function e(t,n,r,o){var i=t.index(o),s=t.node(o);if(i==n.index(o)&&o<t.depth-r.openStart){var u=e(t,n,r,o+1);return s.copy(s.content.replaceChild(i,u))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var c=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),l=c.start,d=c.end;return b(s,function e(t,n,r,o,i){var s=t.depth>i&&_(t,n,i+1),u=o.depth>i&&_(r,o,i+1),c=[];g(null,t,i,c),s&&u&&n.index(i)==r.index(i)?(y(s,u),v(b(s,e(t,n,r,o,i+1)),c)):(s&&v(b(s,M(t,n,i+1)),c),g(n,r,i,c),u&&v(b(u,M(r,o,i+1)),c));return g(o,null,i,c),new a(c)}(t,l,d,n,o))}var f=t.parent,p=f.content;return b(f,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return b(s,M(t,n,o))}(e,t,n,0)}function y(e,t){if(!t.type.compatibleContent(e.type))throw new f("Cannot join "+t.type.name+" onto "+e.type.name)}function _(e,t,n){var r=e.node(n);return y(r,t.node(n)),r}function v(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function g(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(v(e.nodeAfter,r),i++));for(var s=i;s<a;s++)v(o.child(s),r);t&&t.depth==n&&t.textOffset&&v(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new f("Invalid content for node "+e.type.name);return e.copy(t)}function M(e,t,n){var r=[];(g(null,e,n,r),e.depth>n)&&v(b(_(e,t,n+1),M(e,t,n+1)),r);return g(t,null,n,r),new a(r)}h.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,u=t.maybeChild(a);if(s==n||u.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var c=e(u.content,n-s-1,r);return c&&t.replaceChild(a,u.copy(c))}(this.content,e+this.openStart,t,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(e,t){return new p(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),u=t.findIndex(r),c=u.index,l=u.offset;if(a==n||s.isText){if(l!=r&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},p.fromJSON=function(e,t){if(!t)return p.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(a.fromJSON(e,t.content),n,r)},p.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new p(e,n,r)},Object.defineProperties(p.prototype,h),p.empty=new p(a.empty,0,0);var k=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n};t.ResolvedPos=k;var w={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};k.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},w.parent.get=function(){return this.node(this.depth)},w.doc.get=function(){return this.node(0)},k.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},k.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},k.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},k.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},k.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},k.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},k.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},w.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},w.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},w.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},k.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r},k.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return d.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i},k.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},k.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},k.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new T(this,e,n)},k.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},k.prototype.max=function(e){return e.pos>this.pos?e:this},k.prototype.min=function(e){return e.pos<this.pos?e:this},k.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},k.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,u=a.offset,c=o-u;if(n.push(i,s,r+u),!c)break;if((i=i.child(s)).isText)break;o=c-1,r+=u+1}return new k(t,n,o)},k.resolveCached=function(e,t){for(var n=0;n<S.length;n++){var r=S[n];if(r.pos==t&&r.doc==e)return r}var o=S[L]=k.resolve(e,t);return L=(L+1)%x,o},Object.defineProperties(k.prototype,w);var S=[],L=0,x=12,T=function(e,t,n){this.$from=e,this.$to=t,this.depth=n};t.NodeRange=T;var D={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};D.start.get=function(){return this.$from.before(this.depth+1)},D.end.get=function(){return this.$to.after(this.depth+1)},D.parent.get=function(){return this.$from.node(this.depth)},D.startIndex.get=function(){return this.$from.index(this.depth)},D.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(T.prototype,D);var Y=Object.create(null),C=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||a.empty,this.marks=r||d.none};t.Node=C;var A={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};A.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},A.childCount.get=function(){return this.content.childCount},C.prototype.child=function(e){return this.content.child(e)},C.prototype.maybeChild=function(e){return this.content.maybeChild(e)},C.prototype.forEach=function(e){this.content.forEach(e)},C.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},C.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},A.textContent.get=function(){return this.textBetween(0,this.content.size,"")},C.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},A.firstChild.get=function(){return this.content.firstChild},A.lastChild.get=function(){return this.content.lastChild},C.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},C.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},C.prototype.hasMarkup=function(e,t,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||Y)&&d.sameSet(this.marks,n||d.none)},C.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},C.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},C.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},C.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return p.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new p(s,r.depth-i,o.depth-i)},C.prototype.replace=function(e,t,n){return m(this.resolve(e),this.resolve(t),n)},C.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},C.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},C.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},C.prototype.resolve=function(e){return k.resolveCached(this,e)},C.prototype.resolveNoCache=function(e){return k.resolve(this,e)},C.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},A.isBlock.get=function(){return this.type.isBlock},A.isTextblock.get=function(){return this.type.isTextblock},A.inlineContent.get=function(){return this.type.inlineContent},A.isInline.get=function(){return this.type.isInline},A.isText.get=function(){return this.type.isText},A.isLeaf.get=function(){return this.type.isLeaf},A.isAtom.get=function(){return this.type.isAtom},C.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(this.marks,e)},C.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},C.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=a.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var u=r;u<o;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0},C.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},C.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},C.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var e=d.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!d.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map((function(e){return e.type.name})));this.content.forEach((function(e){return e.check()}))},C.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e},C.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=a.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(C.prototype,A);var O=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(C);function E(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var j=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]};t.ContentMatch=j;var P={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};j.parse=function(e,t){var n=new N(e,t);if(null==n.next)return j.empty;var r=R(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];W(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new j(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort(B);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(W(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(e(n,i))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=e(t.exprs[a],i);if(a==t.exprs.length-1)return s;o(s,i=n())}else{if("star"==t.type){var u=n();return r(i,u),o(e(t.expr,u),u),[r(u)]}if("plus"==t.type){var c=n();return o(e(t.expr,i),c),o(e(t.expr,c),c),[r(c)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var l=i,d=0;d<t.min;d++){var f=n();o(e(t.expr,l),f),l=f}if(-1==t.max)o(e(t.expr,l),l);else for(var p=t.min;p<t.max;p++){var h=n();r(l,h),o(e(t.expr,l),h),l=h}return[r(l)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s+=2){var u=o.next[s],c=o.next[s+1];a.push(u.name),!i||u.isText||u.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},j.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},j.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},P.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},P.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},j.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},j.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(i,s){var u=i.matchFragment(e,n);if(u&&(!t||u.validEnd))return a.from(s.map((function(e){return e.createAndFill()})));for(var c=0;c<i.next.length;c+=2){var l=i.next[c],d=i.next[c+1];if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var f=o(d,s.concat(l));if(f)return f}}}(this,[])},j.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},j.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s+=2){var u=o.next[s];u.isLeaf||u.hasRequiredAttrs()||u.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:u.contentMatch,type:u,via:r}),t[u.name]=!0)}}},P.edgeCount.get=function(){return this.next.length>>1},j.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},j.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(j.prototype,P),j.empty=new j(!0);var N=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},H={next:{configurable:!0}};function R(e){var t=[];do{t.push(I(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function I(e){var t=[];do{t.push(F(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function F(e){for(var t=function(e){if(e.eat("(")){var t=R(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=$(e,t)}return t}function z(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function $(e,t){var n=z(e),r=n;return e.eat(",")&&(r="}"!=e.next?z(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function B(e,t){return t-e}function W(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,u=a.to;s||-1!=n.indexOf(u)||t(u)}}(t),n.sort(B)}function U(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function q(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function V(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new K(e[n]);return t}H.next.get=function(){return this.tokens[this.pos]},N.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},N.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(N.prototype,H);var J=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=V(n.attrs),this.defaultAttrs=U(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e};t.NodeType=J;var G={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==j.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},J.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},J.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},J.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:q(this.attrs,e)},J.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new C(this,this.computeAttrs(e),a.from(t),d.setFrom(n))},J.prototype.createChecked=function(e,t,n){if(t=a.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new C(this,this.computeAttrs(e),t,d.setFrom(n))},J.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=a.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(a.empty,!0);return o?new C(this,e,t.append(o),d.setFrom(n)):null},J.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},J.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},J.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},J.prototype.allowedMarks=function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:d.empty:e},J.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new J(e,t,r)}));var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(J.prototype,G);var K=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},Z={isRequired:{configurable:!0}};Z.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(K.prototype,Z);var X=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=V(r.attrs),this.rank=t,this.excluded=null;var o=U(this.attrs);this.instance=o&&new d(this,o)};t.MarkType=X,X.prototype.create=function(e){return!e&&this.instance?this.instance:new d(this,q(this.attrs,e))},X.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new X(e,r++,t,o)})),n},X.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e},X.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},X.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var Q=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.default.from(e.nodes),this.spec.marks=o.default.from(e.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=j.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?ee(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var u in this.marks){var c=this.marks[u],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:ee(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function ee(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var u=e.marks[s];("_"==o||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}t.Schema=Q,Q.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof J))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Q.prototype.text=function(e,t){var n=this.nodes.text;return new O(n,n.defaultAttrs,e,d.setFrom(t))},Q.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Q.prototype.nodeFromJSON=function(e){return C.fromJSON(this,e)},Q.prototype.markFromJSON=function(e){return d.fromJSON(this,e)},Q.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var te=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};t.DOMParser=te,te.prototype.parse=function(e,t){void 0===t&&(t={});var n=new se(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},te.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new se(this,t,!0);return n.addAll(e,null,t.from,t.to),p.maxOpen(n.finish())},te.prototype.matchTag=function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(ce(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},te.prototype.matchStyle=function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(e)||i.context&&!n.matchesContext(i.context)||i.style.length>e.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var a=i.getAttrs(t);if(!1===a)continue;i.attrs=a}return i}}},te.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=le(e)),e.mark=t}))};for(var o in e.marks)r(o);var i;for(var a in e.nodes)i=void 0,(i=e.nodes[a].spec.parseDOM)&&i.forEach((function(e){n(e=le(e)),e.node=a}));return t},te.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new te(e,te.schemaRules(e)))};var ne={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},re={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},oe={ol:!0,ul:!0};function ie(e){return(e?1:0)|("full"===e?2:0)}var ae=function(e,t,n,r,o,i,a){this.type=e,this.attrs=t,this.solid=o,this.match=i||(4&a?null:e.contentMatch),this.options=a,this.content=[],this.marks=n,this.activeMarks=d.none,this.pendingMarks=r,this.stashMarks=[]};ae.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(a.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ae.prototype.finish=function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length)))}var r=a.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ae.prototype.popFromStashMark=function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},ae.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):de(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}},ae.prototype.inlineContext=function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ne.hasOwnProperty(e.parentNode.nodeName.toLowerCase())};var se=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=ie(t.preserveWhitespace)|(n?4:0);r=o?new ae(o.type,o.attrs,d.none,d.none,!0,t.topMatch||o.type.contentMatch,i):new ae(n?null:e.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},ue={top:{configurable:!0},currentPos:{configurable:!0}};function ce(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function le(e){var t={};for(var n in e)t[n]=e[n];return t}function de(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}ue.top.get=function(){return this.nodes[this.open]},se.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}},se.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},se.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();oe.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&oe.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:re.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(ne.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:null)},se.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},se.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},se.prototype.readStyles=function(e){var t=d.none;e:for(var n=0;n<e.length;n+=2)for(var r=null;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t},se.prototype.addElementByRule=function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var u=t.contentElement;"string"==typeof u?u=e.querySelector(u):"function"==typeof u&&(u=u(e)),u||(u=e),this.findAround(e,u,!0),this.addAll(u,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},se.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,a=null==r?null:e.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&ne.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},se.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0},se.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1},se.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},se.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e,t);var i=null==r?-5&o.options:ie(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ae(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},se.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},se.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},se.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},ue.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},se.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},se.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},se.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},se.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},se.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)},se.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},se.prototype.addPendingMark=function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},se.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(se.prototype,ue);var fe=function(e,t){this.nodes=e||{},this.marks=t||{}};function pe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function he(e){return e.document||window.document}t.DOMSerializer=fe,fe.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=he(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n<i.length&&a<e.marks.length;){var s=e.marks[a];if(r.marks[s.type.name]){if(!s.eq(i[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<i.length;)o=i.pop(),i.pop();for(;a<e.marks.length;){var u=e.marks[a++],c=r.serializeMark(u,e.isInline,t);c&&(i.push(u,o),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(r.serializeNodeInner(e,t))})),n},fe.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=fe.renderSpec(he(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},fe.prototype.serializeNode=function(e,t){void 0===t&&(t={});for(var n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},fe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&fe.renderSpec(he(n),r(e,t))},fe.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var a=null,s=n?e.createElementNS(n,r):e.createElement(r),u=t[1],c=1;if(u&&"object"==i(u)&&null==u.nodeType&&!Array.isArray(u))for(var l in c=2,u)if(null!=u[l]){var d=l.indexOf(" ");d>0?s.setAttributeNS(l.slice(0,d),l.slice(d+1),u[l]):s.setAttribute(l,u[l])}for(var f=c;f<t.length;f++){var p=t[f];if(0===p){if(f<t.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=fe.renderSpec(e,p,n),m=h.dom,y=h.contentDOM;if(s.appendChild(m),y){if(a)throw new RangeError("Multiple content holes");a=y}}return{dom:s,contentDOM:a}},fe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new fe(this.nodesFromSchema(e),this.marksFromSchema(e)))},fe.nodesFromSchema=function(e){var t=pe(e.nodes);return t.text||(t.text=function(e){return e.text}),t},fe.marksFromSchema=function(e){return pe(e.marks)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NodeSelection",{enumerable:!0,get:function(){return o.NodeSelection}}),Object.defineProperty(t,"Plugin",{enumerable:!0,get:function(){return o.Plugin}}),Object.defineProperty(t,"PluginKey",{enumerable:!0,get:function(){return o.PluginKey}}),Object.defineProperty(t,"TextSelection",{enumerable:!0,get:function(){return o.TextSelection}}),t.Text=t.Paragraph=t.Node=t.Mark=t.Extension=t.EditorMenuBubble=t.EditorMenuBar=t.EditorFloatingMenu=t.EditorContent=t.Editor=t.Doc=void 0;var r,o=n(204),i=n(213),a=n(205),s=n(653),u=n(654),c=n(239),l=n(412),d=n(240),f=n(220),p=(r=n(19))&&r.__esModule?r:{default:r},h=n(221);function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function A(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"")}var O=function(){function e(t,n){var r=n.editor,o=n.extension,i=n.parent,a=n.node,s=n.view,u=n.decorations,c=n.getPos;D(this,e),this.component=t,this.editor=r,this.extension=o,this.parent=i,this.node=a,this.view=s,this.decorations=u,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:c,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return C(e,[{key:"createDOM",value:function(){var e=this,t=p.default.extend(this.component),n={editor:this.editor,node:this.node,view:this.view,getPos:function(){return e.getPos()},decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:function(t){return e.updateAttrs(t)}};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"==typeof this.extension.update&&(this.update=this.extension.update),this.vm=new t({parent:this.parent,propsData:n}).$mount(),this.vm.$el}},{key:"update",value:function(e,t){return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.updateComponentProps({node:e,decorations:t})),!0)}},{key:"updateComponentProps",value:function(e){var t=this;if(this.vm._props){var n=p.default.config.silent;p.default.config.silent=!0,Object.entries(e).forEach((function(e){var n=L(e,2),r=n[0],o=n[1];t.vm._props[r]=o})),p.default.config.silent=n}}},{key:"updateAttrs",value:function(e){if(this.view.editable){var t=this.view.state,n=this.node.type,r=this.getPos(),o=w(w({},this.node.attrs),e),i=this.isMark?t.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(o)):t.tr.setNodeMarkup(r,null,o);this.view.dispatch(i)}}},{key:"ignoreMutation",value:function(e){return"selection"!==e.type&&(!this.contentDOM||!this.contentDOM.contains(e.target))}},{key:"stopEvent",value:function(e){var t=this;if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);var n=!!this.extension.schema.draggable;if(n&&"mousedown"===e.type){var r=e.target.closest&&e.target.closest("[data-drag-handle]");r&&(this.dom===r||this.dom.contains(r))&&(this.captureEvents=!1,document.addEventListener("dragend",(function(){t.captureEvents=!0}),{once:!0}))}var o="copy"===e.type,i="paste"===e.type,a="cut"===e.type,s=e.type.startsWith("drag")||"drop"===e.type;return!(n&&s||o||i||a)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){var e=this.view.posAtDOM(this.dom),t=this.view.state.doc.resolve(e);return(0,f.getMarkRange)(t,this.node.type)}},{key:"destroy",value:function(){this.vm.$destroy()}}]),e}(),E=function(){function e(){D(this,e)}return C(e,[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._callbacks=this._callbacks||{};var i=this._callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){if(arguments.length){var n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter((function(e){return e!==t})):delete this._callbacks[e])}else this._callbacks={};return this}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e),this.options=w(w({},this.defaultOptions),t)}return C(e,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.editor=e}},{key:"name",get:function(){return null}},{key:"type",get:function(){return"extension"}},{key:"defaultOptions",get:function(){return{}}},{key:"plugins",get:function(){return[]}},{key:"inputRules",value:function(){return[]}},{key:"pasteRules",value:function(){return[]}},{key:"keys",value:function(){return{}}}]),e}();t.Extension=j;var P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;D(this,e),t.forEach((function(e){e.bindEditor(n),e.init()})),this.extensions=t}return C(e,[{key:"nodes",get:function(){return this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return w(w({},e),{},S({},n,r))}),{})}},{key:"options",get:function(){var e=this.view;return this.extensions.reduce((function(t,n){return w(w({},t),{},S({},n.name,new Proxy(n.options,{set:function(t,n,r){var o=t[n]!==r;return Object.assign(t,S({},n,r)),o&&e.updateState(e.state),!0}})))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return w(w({},e),{},S({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(e){return e.plugins})).reduce((function(e,t){var n=t.plugins;return[].concat(M(e),M(n))}),[])}},{key:"keymaps",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(M(n),M(r)).map((function(e){return(0,c.keymap)(e)}))}},{key:"inputRules",value:function(e){var t=e.schema,n=e.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(e){return!n.includes(e.name)})):this.extensions,o=r.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({schema:t})})),i=r.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(M(o),M(i)).reduce((function(e,t){return[].concat(M(e),M(t))}),[])}},{key:"pasteRules",value:function(e){var t=e.schema,n=e.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(e){return!n.includes(e.name)})):this.extensions,o=r.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.pasteRules})).map((function(e){return e.pasteRules({schema:t})})),i=r.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.pasteRules})).map((function(e){return e.pasteRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(M(o),M(i)).reduce((function(e,t){return[].concat(M(e),M(t))}),[])}},{key:"commands",value:function(e){var t=e.schema,n=e.view;return this.extensions.filter((function(e){return e.commands})).reduce((function(e,r){var o=r.name,i=r.type,a={},s=r.commands(w({schema:t},["node","mark"].includes(i)?{type:t["".concat(i,"s")][o]}:{})),u=function(e,t){return!!n.editable&&(n.focus(),e(t)(n.state,n.dispatch,n))},c=function(e,t){Array.isArray(t)?a[e]=function(e){return t.forEach((function(t){return u(t,e)}))}:"function"==typeof t&&(a[e]=function(e){return u(t,e)})};return"object"===b(s)?Object.entries(s).forEach((function(e){var t=L(e,2),n=t[0],r=t[1];c(n,r)})):c(o,s),w(w({},e),a)}),{})}}]),e}();function N(e){var t=document.createElement("style");t.type="text/css",t.textContent=e;var n=document.head,r=n.firstChild;r?n.insertBefore(t,r):n.appendChild(t)}var H=function(e){m(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,n),t.call(this,e)}return C(n,[{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return function(){}}}]),n}(j);function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(parseInt(e,10),t),n)}t.Mark=H;var I=function(e){m(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,n),t.call(this,e)}return C(n,[{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return function(){}}}]),n}(j);t.Node=I;var F=function(e){m(n,e);var t=_(n);function n(){return D(this,n),t.apply(this,arguments)}return C(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(I);t.Doc=F;var z=function(e){m(n,e);var t=_(n);function n(){return D(this,n),t.apply(this,arguments)}return C(n,[{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,h.setBlockType)(t)}}}]),n}(I);t.Paragraph=z;var $=function(e){m(n,e);var t=_(n);function n(){return D(this,n),t.apply(this,arguments)}return C(n,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(I);t.Text=$;var B='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n',W=function(e){m(n,e);var t=_(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,n),(e=t.call(this)).defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},enableDropCursor:!0,enableGapCursor:!0,parseOptions:{},injectCSS:!0,onInit:function(){},onTransaction:function(){},onUpdate:function(){},onFocus:function(){},onBlur:function(){},onPaste:function(){},onDrop:function(){}},e.events=["init","transaction","update","focus","blur","paste","drop"],e.init(r),e}return C(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions(w(w({},this.defaultOptions),t)),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&N(B),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((function(t){e.on(t,e.options[A("on ".concat(t))]||function(){})})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(e){this.options=w(w({},this.options),e),this.view&&this.state&&this.view.updateState(this.state)}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new F,new $,new z]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"createExtensions",value:function(){return new P([].concat(M(this.builtInExtensions),M(this.options.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}},{key:"createPasteRules",value:function(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new a.Schema({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}},{key:"createState",value:function(){var e=this;return o.EditorState.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[].concat(M(this.plugins),[(0,d.inputRules)({rules:this.inputRules})],M(this.pasteRules),M(this.keymaps),[(0,c.keymap)({Backspace:d.undoInputRule}),(0,c.keymap)(l.baseKeymap)],M(this.options.enableDropCursor?[(0,s.dropCursor)(this.options.dropCursor)]:[]),M(this.options.enableGapCursor?[(0,u.gapCursor)()]:[]),[new o.Plugin({key:new o.PluginKey("editable"),props:{editable:function(){return e.options.editable}}}),new o.Plugin({props:{attributes:{tabindex:0},handleDOMEvents:{focus:function(t,n){e.focused=!0,e.emit("focus",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!0);e.view.dispatch(r)},blur:function(t,n){e.focused=!1,e.emit("blur",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!1);e.view.dispatch(r)}}}}),new o.Plugin({props:this.options.editorProps})])})}},{key:"createDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.parseOptions;if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===b(e))try{return this.schema.nodeFromJSON(e)}catch(t){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",t),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof e){var n="<div>".concat(e,"</div>"),r=new window.DOMParser,o=r.parseFromString(n,"text/html").body.firstElementChild;return a.DOMParser.fromSchema(this.schema).parse(o,t)}return!1}},{key:"createView",value:function(){var e=this;return new i.EditorView(this.element,{state:this.createState(),handlePaste:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.emit.apply(e,["paste"].concat(n))},handleDrop:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.emit.apply(e,["drop"].concat(n))},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[].concat(M(this.builtInExtensions),M(this.options.extensions))})})}},{key:"initNodeViews",value:function(e){var t=this,n=e.parent;return e.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.view})).reduce((function(e,r){return w(w({},e),{},S({},r.name,(function(e,o,i,a){var s=r.view;return new O(s,{editor:t,extension:r,parent:n,node:e,view:o,getPos:i,decorations:a})})))}),{})}},{key:"dispatchTransaction",value:function(e){var t=this.state.apply(e);this.view.updateState(t),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emitUpdate(e)}},{key:"emitUpdate",value:function(e){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e})}},{key:"resolveSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){var t=this.state.doc;return{from:t.content.size,to:t.content.size}}return{from:e,to:e}}},{key:"focus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.view.focused&&null===t||!1===t)){var n=this.resolveSelection(t),r=n.from,o=n.to;this.setSelection(r,o),setTimeout((function(){return e.view.focus()}),10)}}},{key:"setSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.state,r=n.doc,i=n.tr,a=R(e,0,r.content.size),s=R(t,0,r.content.size),u=o.TextSelection.create(r,a,s),c=i.setSelection(u);this.view.dispatch(c)}},{key:"blur",value:function(){this.view.dom.blur()}},{key:"getSchemaJSON",value:function(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}},{key:"getHTML",value:function(){var e=document.createElement("div"),t=a.DOMSerializer.fromSchema(this.schema).serializeFragment(this.state.doc.content);return e.appendChild(t),e.innerHTML}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"setContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this.state,i=r.doc,a=r.tr,s=this.createDocument(e,n),u=o.TextSelection.create(i,0,i.content.size),c=a.setSelection(u).replaceSelectionWith(s,!1).setMeta("preventUpdate",!t);this.view.dispatch(c)}},{key:"clearContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setContent(this.options.emptyDocument,e)}},{key:"setActiveNodesAndMarks",value:function(){var e=this;this.activeMarks=Object.entries(this.schema.marks).reduce((function(t,n){var r=L(n,2),o=r[0],i=r[1];return w(w({},t),{},S({},o,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,f.markIsActive)(e.state,i,t)})))}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((function(t,n){var r=L(n,2),o=r[0],i=r[1];return w(w({},t),{},S({},o,(0,f.getMarkAttrs)(e.state,i)))}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((function(t,n){var r=L(n,2),o=r[0],i=r[1];return w(w({},t),{},S({},o,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,f.nodeIsActive)(e.state,i,t)})))}),{})}},{key:"getMarkAttrs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.activeMarkAttrs[e]}},{key:"getNodeAttrs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return w({},(0,f.getNodeAttrs)(this.state,this.schema.nodes[e]))}},{key:"isActive",get:function(){return Object.entries(w(w({},this.activeMarks),this.activeNodes)).reduce((function(e,t){var n=L(t,2),r=n[0],o=n[1];return w(w({},e),{},S({},r,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)})))}),{})}},{key:"registerPlugin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n="function"==typeof t?t(e,this.state.plugins):[e].concat(M(this.state.plugins)),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e&&this.view.docView){var t=this.state.reconfigure({plugins:this.state.plugins.filter((function(t){return!t.key.startsWith("".concat(e,"$"))}))});this.view.updateState(t)}}},{key:"destroy",value:function(){this.view&&this.view.destroy()}}]),n}(E);t.Editor=W;var U={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&e.element&&this.$nextTick((function(){t.$el.appendChild(e.element.firstChild),e.setParentComponent(t)}))}}},render:function(e){return e("div")},beforeDestroy:function(){this.editor.element=this.$el}};t.EditorContent=U;var q=function(){function e(t){var n=this,r=t.options;D(this,e),this.options=r,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.blurHandler=function(){n.preventHide?n.preventHide=!1:n.options.editor.emit("menubar:focusUpdate",!1)},this.options.editor.on("blur",this.blurHandler)}return C(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("blur",this.blurHandler)}}]),e}();var V={props:{editor:{default:null,type:Object}},data:function(){return{focused:!1}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el},new o.Plugin({key:new o.PluginKey("menu_bar"),view:function(e){return new q({editorView:e,options:n})}}))),t.focused=e.focused,e.on("focus",(function(){t.focused=!0})),e.on("menubar:focusUpdate",(function(e){t.focused=e}))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor)}):null}};function J(e,t,n){var r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,Math.max(t,0)),r}function G(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function K(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.docView.domFromPos(t),a=i.node,s=i.offset;if(3===a.nodeType)o&&s<a.nodeValue.length?(r=G(J(a,s-1,s),-1),n="right"):s<a.nodeValue.length&&(r=G(J(a,s,s+1),-1),n="left");else if(a.firstChild){if(s<a.childNodes.length){var u=a.childNodes[s];r=G(3===u.nodeType?J(u):u,-1),n="left"}if((!r||r.top===r.bottom)&&s){var c=a.childNodes[s-1];r=G(3===c.nodeType?J(c):c,1),n="right"}}else r=a.getBoundingClientRect(),n="left";var l=r[n];return{top:r.top,bottom:r.bottom,left:l,right:l}}t.EditorMenuBar=V;var Z=function(){function e(t){var n=this,r=t.options,o=t.editorView;D(this,e),this.options=w(w({},{element:null,keepInBounds:!0,onUpdate:function(){return!1}}),r),this.editorView=o,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=function(e){var t=e.view;n.update(t)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=function(e){var t=e.event;n.preventHide?n.preventHide=!1:n.hide(t)},this.options.editor.on("blur",this.blurHandler)}return C(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){var n=e.state;if(!(e.composing||t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection)))if(n.selection.empty)this.hide();else{var r=n.selection,o=r.from,i=r.to,a=K(e,o),s=K(e,i,!0),u=this.options.element.offsetParent;if(u){var c=u.getBoundingClientRect(),l=this.options.element.getBoundingClientRect(),d=(a.left+s.left)/2-c.left;this.left=Math.round(this.options.keepInBounds?Math.min(c.width-l.width/2,Math.max(d,l.width/2)):d),this.bottom=Math.round(c.bottom-a.top),this.top=Math.round(s.bottom-c.top),this.isActive=!0,this.sendUpdate()}else this.hide()}}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}},{key:"hide",value:function(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}]),e}();var X={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:function(){return{menu:{isActive:!1,left:0,bottom:0}}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el,keepInBounds:t.keepInBounds,onUpdate:function(e){e.isActive&&!1===t.menu.isActive?t.$emit("show",e):e.isActive||!0!==t.menu.isActive||t.$emit("hide",e),t.menu=e}},new o.Plugin({key:new o.PluginKey("menu_bubble"),view:function(e){return new Z({editorView:e,options:n})}})))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy:function(){this.editor.unregisterPlugin("menu_bubble")}};t.EditorMenuBubble=X;var Q=function(){function e(t){var n=this,r=t.options,o=t.editorView;D(this,e),this.options=w(w({},{resizeObserver:!0,element:null,onUpdate:function(){return!1}}),r),this.preventHide=!1,this.editorView=o,this.isActive=!1,this.top=0,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=function(e){var t=e.view;n.update(t)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=function(e){var t=e.event;n.preventHide?n.preventHide=!1:n.hide(t)},this.options.editor.on("blur",this.blurHandler),this.options.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(){n.isActive&&n.update(n.editorView)})),this.resizeObserver.observe(this.editorView.dom))}return C(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){var n=e.state;if(!(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection)))if(n.selection.empty){var r=e.domAtPos(n.selection.anchor);if("<br>"===r.node.innerHTML&&"P"===r.node.tagName&&r.node.parentNode===e.dom){var o=this.options.element.offsetParent;if(o){var i=o.getBoundingClientRect(),a=e.coordsAtPos(n.selection.anchor).top-i.top;this.isActive=!0,this.top=a,this.sendUpdate()}else this.hide()}else this.hide()}else this.hide()}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,top:this.top})}},{key:"hide",value:function(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.resizeObserver&&this.resizeObserver.unobserve(this.editorView.dom),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}]),e}();var ee={props:{editor:{default:null,type:Object}},data:function(){return{menu:{isActive:!1,left:0,bottom:0}}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el,onUpdate:function(e){e.isActive&&!1===t.menu.isActive?t.$emit("show",e):e.isActive||!0!==t.menu.isActive||t.$emit("hide",e),t.menu=e}},new o.Plugin({key:new o.PluginKey("floating_menu"),view:function(e){return new Q({editorView:e,options:n})}})))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy:function(){this.editor.unregisterPlugin("floating_menu")}};t.EditorFloatingMenu=ee},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformError=c,t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return M(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},t.canSplit=function(e,t,n,r){void 0===n&&(n=1);var o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,u=n-2;s>i;s--,u--){var c=o.node(s),l=o.index(s);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(l,c.childCount),f=r&&r[u]||c;if(f!=c&&(d=d.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(l+1,c.childCount)||!f.type.validContent(d))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)},t.dropPoint=function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),d=!1;if(1==a)d=l.canReplace(c,c,o);else{var f=l.contentMatchAt(c).findWrapping(o.firstChild.type);d=f&&l.canReplaceWith(c,c,f[0])}if(d)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null},t.findWrapping=function(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=r;s&&u<o;u++)s=s.matchType(n.child(u).type);if(!s||!s.validEnd)return null;return a}(r,t);if(!i)return null;return o.map(b).concat({type:t,attrs:n}).concat(i.map(b))},t.insertPoint=k,t.joinPoint=function(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&M(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}},t.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!g(r,o,i))break}},t.replaceStep=x,t.Transform=t.StepResult=t.StepMap=t.Step=t.ReplaceStep=t.ReplaceAroundStep=t.RemoveMarkStep=t.Mapping=t.MapResult=t.AddMarkStep=void 0;var r=n(205),o=Math.pow(2,16);function i(e){return 65535&e}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n};t.MapResult=a;var s=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};t.StepMap=s,s.prototype.recover=function(e){var t=0,n=i(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/o}(e)},s.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},s.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},s.prototype._map=function(e,t,n){for(var r=0,i=this.inverted?2:1,s=this.inverted?1:2,u=0;u<this.ranges.length;u+=3){var c=this.ranges[u]-(this.inverted?r:0);if(c>e)break;var l=this.ranges[u+i],d=this.ranges[u+s],f=c+l;if(e<=f){var p=c+r+((l?e==c?-1:e==f?1:t:t)<0?0:d);if(n)return p;var h=e==(t<0?c:f)?null:u/3+(e-c)*o;return new a(p,t<0?e!=c:e!=f,h)}r+=d-l}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var u=this.ranges[s]-(this.inverted?n:0);if(u>e)break;var c=this.ranges[s+o];if(e<=u+c&&s==3*r)return!0;n+=this.ranges[s+a]-c}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),u=this.ranges[r+t],c=this.ranges[r+n];e(a,a+u,s,s+c),o+=c-u}},s.prototype.invert=function(){return new s(this.ranges,!this.inverted)},s.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},s.offset=function(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])},s.empty=new s([]);var u=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function c(e){var t=Error.call(this,e);return t.__proto__=c.prototype,t}t.Mapping=u,u.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new u(this.maps,this.mirror,e,t)},u.prototype.copy=function(){return new u(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},u.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},u.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},u.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},u.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},u.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},u.prototype.invert=function(){var e=new u;return e.appendMappingInverted(this),e},u.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},u.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},u.prototype._map=function(e,t,n){for(var r=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var s=this.getMirror(o);if(null!=s&&s>o&&s<this.to){o=s,e=this.maps[s].recover(i.recover);continue}}i.deleted&&(r=!0),e=i.pos}return n?e:new a(e,r)},c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.prototype.name="TransformError";var l=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new u};t.Transform=l;var d={before:{configurable:!0},docChanged:{configurable:!0}};function f(){throw new Error("Override me")}d.before.get=function(){return this.docs.length?this.docs[0]:this.doc},l.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new c(t.failed);return this},l.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},d.docChanged.get=function(){return this.steps.length>0},l.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(l.prototype,d);var p=Object.create(null),h=function(){};t.Step=h,h.prototype.apply=function(e){return f()},h.prototype.getMap=function(){return s.empty},h.prototype.invert=function(e){return f()},h.prototype.map=function(e){return f()},h.prototype.merge=function(e){return null},h.prototype.toJSON=function(){return f()},h.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=p[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},h.jsonID=function(e,t){if(e in p)throw new RangeError("Duplicate use of step JSON ID "+e);return p[e]=t,t.prototype.jsonID=e,t};var m=function(e,t){this.doc=e,this.failed=t};t.StepResult=m,m.ok=function(e){return new m(e,null)},m.fail=function(e){return new m(null,e)},m.fromReplace=function(e,t,n,o){try{return m.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.ReplaceError)return m.fail(e.message);throw e}};var y=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&v(e,this.from,this.to)?m.fail("Structure replace would overwrite content"):m.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(h);t.ReplaceStep=y,h.jsonID("replace",y);var _=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(v(e,this.from,this.gapFrom)||v(e,this.gapTo,this.to)))return m.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return m.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?m.fromReplace(e,this.from,this.to,n):m.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(h);function v(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function g(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function b(e){return{type:e,attrs:null}}function M(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function k(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}}function w(e,t,n){for(var o=[],i=0;i<e.childCount;i++){var a=e.child(i);a.content.size&&(a=a.copy(w(a.content,t,a))),a.isInline&&(a=t(a,n,i)),o.push(a)}return r.Fragment.fromArray(o)}t.ReplaceAroundStep=_,h.jsonID("replaceAround",_),l.prototype.lift=function(e,t){for(var n=e.$from,o=e.$to,i=e.depth,a=n.before(i+1),s=o.after(i+1),u=a,c=s,l=r.Fragment.empty,d=0,f=i,p=!1;f>t;f--)p||n.index(f)>0?(p=!0,l=r.Fragment.from(n.node(f).copy(l)),d++):u--;for(var h=r.Fragment.empty,m=0,y=i,v=!1;y>t;y--)v||o.after(y+1)<o.end(y)?(v=!0,h=r.Fragment.from(o.node(y).copy(h)),m++):c++;return this.step(new _(u,c,a,s,new r.Slice(l.append(h),d,m),l.size-d,!0))},l.prototype.wrap=function(e,t){for(var n=r.Fragment.empty,o=t.length-1;o>=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,a=e.end;return this.step(new _(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},l.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(a).map(t),n)){i.clearIncompatible(i.mapping.slice(a).map(t,1),n);var s=i.mapping.slice(a),u=s.map(t,1),c=s.map(t+e.nodeSize,1);return i.step(new _(u,c,u+1,c-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},l.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var a=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new _(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},l.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,a=r.Fragment.empty,s=o.depth,u=o.depth-t,c=t-1;s>u;s--,c--){i=r.Fragment.from(o.node(s).copy(i));var l=n&&n[c];a=r.Fragment.from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}return this.step(new y(e,e,new r.Slice(i.append(a),t,t),!0))},l.prototype.join=function(e,t){void 0===t&&(t=1);var n=new y(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var S=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r.Slice(w(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new L(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);t.AddMarkStep=S,h.jsonID("addMark",S);var L=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(w(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new S(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);function x(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),a=e.resolve(n);return T(i,a,o)?new y(t,n,o):new D(i,a,o).fit()}function T(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}t.RemoveMarkStep=L,h.jsonID("removeMark",L),l.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,u,c){if(r.isInline){var l=r.marks;if(!n.isInSet(l)&&c.type.allowsMarkType(n.type)){for(var d=Math.max(u,e),f=Math.min(u+r.nodeSize,t),p=n.addToSet(l),h=0;h<l.length;h++)l[h].isInSet(p)||(a&&a.to==d&&a.mark.eq(l[h])?a.to=f:o.push(a=new L(d,f,l[h])));s&&s.to==d?s.to=f:i.push(s=new S(d,f,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},l.prototype.removeMark=function(e,t,n){var o=this;void 0===n&&(n=null);var i=[],a=0;return this.doc.nodesBetween(e,t,(function(o,s){if(o.isInline){a++;var u=null;if(n instanceof r.MarkType)for(var c,l=o.marks;c=n.isInSet(l);)(u||(u=[])).push(c),l=c.removeFromSet(l);else n?n.isInSet(o.marks)&&(u=[n]):u=o.marks;if(u&&u.length)for(var d=Math.min(s+o.nodeSize,t),f=0;f<u.length;f++){for(var p=u[f],h=void 0,m=0;m<i.length;m++){var y=i[m];y.step==a-1&&p.eq(i[m].style)&&(h=y)}h?(h.to=d,h.step=a):i.push({style:p,from:Math.max(s,e),to:d,step:a})}}})),i.forEach((function(e){return o.step(new L(e.from,e.to,e.style))})),this},l.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var o=this.doc.nodeAt(e),i=[],a=e+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,l=n.matchType(u.type,u.attrs);if(l){n=l;for(var d=0;d<u.marks.length;d++)t.allowsMarkType(u.marks[d].type)||this.step(new L(a,c,u.marks[d]))}else i.push(new y(a,c,r.Slice.empty));a=c}if(!n.validEnd){var f=n.fillBefore(r.Fragment.empty,!0);this.replace(a,a,new r.Slice(f,0,0))}for(var p=i.length-1;p>=0;p--)this.step(i[p]);return this},l.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=x(this.doc,e,t,n);return o&&this.step(o),this},l.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},l.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},l.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var D=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var o=0;o<=e.depth;o++){var i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},Y={depth:{configurable:!0}};function C(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(C(e.firstChild.content,t-1,n)))}function A(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(A(e.lastChild.content,t-1,n)))}function O(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function E(e,t,n){if(t<=0)return e;var o=e.content;return t>1&&(o=o.replaceChild(0,E(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.Fragment.empty,!0)))),e.copy(o)}function j(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function P(e,t,n,o,i){if(t<n){var a=e.firstChild;e=e.replaceChild(0,a.copy(P(a.content,t+1,n,o,a)))}if(t>o){var s=i.contentMatchAt(0),u=s.fillBefore(e).append(e);e=u.append(s.matchFragment(u).fillBefore(r.Fragment.empty,!0))}return e}function N(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;o==t.start(r)&&n.push(r)}return n}Y.depth.get=function(){return this.frontier.length-1},D.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=this.close(t<0?this.$to:o.doc.resolve(t));if(!i)return null;for(var a=this.placed,s=o.depth,u=i.depth;s&&u&&1==a.childCount;)a=a.firstChild.content,s--,u--;var c=new r.Slice(a,s,u);return t>-1?new _(o.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||o.pos!=this.$to.pos?new y(o.pos,i.pos,c):void 0},D.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,o=(t?(n=O(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var a=this.frontier[i],s=a.type,u=a.match,c=void 0,l=void 0;if(1==e&&(o?u.matchType(o.type)||(l=u.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:l};if(2==e&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:c};if(n&&u.matchType(n.type))break}},D.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=O(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(o,i.size+n>=t.size-o?n+1:0)),!0)},D.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=O(t,n);if(i.childCount<=1&&n>0){var a=t.size-n<=n+i.size;this.unplaced=new r.Slice(C(t,n-1,1),n-1,a?n-1:o)}else this.unplaced=new r.Slice(C(t,n,1),n,o)},D.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,o=e.parent,i=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s<a.length;s++)this.openFrontierNode(a[s]);var u=this.unplaced,c=o?o.content:u.content,l=u.openStart-t,d=0,f=[],p=this.frontier[n],h=p.match,m=p.type;if(i){for(var y=0;y<i.childCount;y++)f.push(i.child(y));h=h.matchFragment(i)}for(var _=c.size+t-(u.content.size-u.openEnd);d<c.childCount;){var v=c.child(d),g=h.matchType(v.type);if(!g)break;(++d>1||0==l||v.content.size)&&(h=g,f.push(E(v.mark(m.allowedMarks(v.marks)),1==d?l:0,d==c.childCount?_:-1)))}var b=d==c.childCount;b||(_=-1),this.placed=A(this.placed,n,r.Fragment.from(f)),this.frontier[n].match=h,b&&_<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var M=0,k=c;M<_;M++){var w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=b?0==t?r.Slice.empty:new r.Slice(C(u.content,t-1,1),t-1,_<0?u.openEnd:t-1):new r.Slice(C(u.content,t,d),u.openStart,u.openEnd)},D.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!j(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r},D.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=j(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=j(e,s,u.type,c,!0);if(!l||l.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}},D.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=A(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e},D.prototype.openFrontierNode=function(e,t,n){var o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=A(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},D.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=A(this.placed,this.frontier.length,e))},Object.defineProperties(D.prototype,Y),l.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(T(o,i,n))return this.step(new y(e,t,n));var a=N(o,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var l=o.node(u).type.spec;if(l.defining||l.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var d=a.indexOf(s),f=[],p=n.openStart,h=n.content,m=0;;m++){var _=h.firstChild;if(f.push(_),m==n.openStart)break;h=_.content}p>0&&f[p-1].type.spec.defining&&o.node(d).type!=f[p-1].type?p-=1:p>=2&&f[p-1].isTextblock&&f[p-2].type.spec.defining&&o.node(d).type!=f[p-2].type&&(p-=2);for(var v=n.openStart;v>=0;v--){var g=(v+p+1)%(n.openStart+1),b=f[g];if(b)for(var M=0;M<a.length;M++){var k=a[(M+d)%a.length],w=!0;k<0&&(w=!1,k=-k);var S=o.node(k-1),L=o.index(k-1);if(S.canReplaceWith(L,L,b.type,b.marks))return this.replace(o.before(k),w?i.after(k):t,new r.Slice(P(n.content,0,n.openStart,g),g,n.openEnd))}}for(var x=this.steps.length,D=a.length-1;D>=0&&(this.replace(e,t,n),!(this.steps.length>x));D--){var Y=a[D];Y<0||(e=o.before(Y),t=i.after(Y))}return this},l.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=k(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},l.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=N(n,r),i=0;i<o.length;i++){var a=o[i],s=i==o.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var u=1;u<=n.depth&&u<=r.depth;u++)if(e-n.start(u)==n.depth-u&&t>n.end(u)&&r.end(u)-t!=r.depth-u)return this.delete(n.before(u),t);return this.delete(e,t)}},,,,function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Highlight=N,t.Suggestions=U,t.Underline=t.TrailingNode=t.TodoList=t.TodoItem=t.TableRow=t.TableHeader=t.TableCell=t.Table=t.Strike=t.Search=t.Placeholder=t.OrderedList=t.Mention=t.ListItem=t.Link=t.Italic=t.Image=t.HorizontalRule=t.History=t.Heading=t.HardBreak=t.Focus=t.Collaboration=t.CodeBlockHighlight=t.CodeBlock=t.Code=t.BulletList=t.Bold=t.Blockquote=void 0;var o,i=n(206),a=n(221),s=(o=n(657))&&o.__esModule?o:{default:o},u=n(213),c=n(220),l=n(205),d=n(204),f=n(413),p=n(207),h=n(219),m=n(661);function y(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block*",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleWrap)(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Ctrl->":(0,a.toggleWrap)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^\s*>\s$/,t)]}}]),n}(i.Node);t.Blockquote=O;var E=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-8":(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^\s*([-+*])\s$/,t)]}}]),n}(i.Node);t.BulletList=E;var j=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"code_block"}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleBlockType)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":(0,a.setBlockType)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.textblockTypeInputRule)(/^```$/,t)]}}]),n}(i.Node);function P(e){var t=e.doc,n=e.name,r=[],o=(0,c.findBlockNodes)(t).filter((function(e){return e.node.type.name===n}));return o.forEach((function(e){var t=e.pos+1;(function e(t){return t.reduce((function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])})(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.map((function(t){var r=[].concat(M(n),M(t.properties?t.properties.className:[]));return t.children?e(t.children,r):{text:t.value,classes:r}}))}(s.default.highlightAuto(e.node.textContent).value)).map((function(e){var n=t,r=n+e.text.length;return t=r,g(g({},e),{},{from:n,to:r})})).forEach((function(e){var t=u.Decoration.inline(e.from,e.to,{class:e.classes.join(" ")});r.push(t)}))})),u.DecorationSet.create(t,r)}function N(e){var t=e.name;return new i.Plugin({name:new i.PluginKey("highlight"),state:{init:function(e,n){return P({doc:n.doc,name:t})},apply:function(e,n,r,o){var i=r.selection.$head.parent.type.name,a=o.selection.$head.parent.type.name,s=(0,c.findBlockNodes)(r.doc).filter((function(e){return e.node.type.name===t})),u=(0,c.findBlockNodes)(o.doc).filter((function(e){return e.node.type.name===t}));return e.docChanged&&([i,a].includes(t)||u.length!==s.length)?P({doc:e.doc,name:t}):n.map(e.mapping,e.doc)}},props:{decorations:function(e){return this.getState(e)}}})}t.CodeBlock=j;var H=function(e){T(n,e);var t=Y(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};S(this,n),e=t.call(this,r);try{Object.entries(e.options.languages).forEach((function(e){var t=_(e,2),n=t[0],r=t[1];s.default.registerLanguage(n,r)}))}catch(e){throw new Error("Invalid syntax highlight definitions: define at least one highlight.js language mapping")}return e}return x(n,[{key:"name",get:function(){return"code_block"}},{key:"defaultOptions",get:function(){return{languages:{}}}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleBlockType)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":(0,a.setBlockType)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.textblockTypeInputRule)(/^```$/,t)]}},{key:"plugins",get:function(){return[N({name:this.name})]}}]),n}(i.Node);t.CodeBlockHighlight=H;var R=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"hard_break"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.chainCommands)(a.exitCode,(function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}))}}},{key:"keys",value:function(e){var t=e.type,n=(0,a.chainCommands)(a.exitCode,(function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}));return{"Mod-Enter":n,"Shift-Enter":n}}}]),n}(i.Node);t.HardBreak=R;var I=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4,5,6]}}},{key:"schema",get:function(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e}}})),toDOM:function(e){return["h".concat(e.attrs.level),0]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(e){return(0,a.toggleBlockType)(t,n.nodes.paragraph,e)}}},{key:"keys",value:function(e){var t=e.type;return this.options.levels.reduce((function(e,n){return g(g({},e),b({},"Shift-Ctrl-".concat(n),(0,a.setBlockType)(t,{level:n})))}),{})}},{key:"inputRules",value:function(e){var t=e.type;return this.options.levels.map((function(e){return(0,a.textblockTypeInputRule)(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))}}]),n}(i.Node);t.Heading=I;var F=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"horizontal_rule"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["hr"]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()))}}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.nodeInputRule)(/^(?:---|___\s|\*\*\*\s)$/,t)]}}]),n}(i.Node);t.HorizontalRule=F;var z=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,$=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM:function(e){return["img",e.attrs]}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){var o=n.selection,i=o.$cursor?o.$cursor.pos:o.$to.pos,a=t.create(e);r(n.tr.insert(i,a))}}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.nodeInputRule)(z,t,(function(e){var t=_(e,4),n=t[1];return{src:t[2],alt:n,title:t[3]}}))]}},{key:"plugins",get:function(){return[new i.Plugin({props:{handleDOMEvents:{drop:function(e,t){if(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length){var n=Array.from(t.dataTransfer.files).filter((function(e){return/image/i.test(e.type)}));if(0!==n.length){t.preventDefault();var r=e.state.schema,o=e.posAtCoords({left:t.clientX,top:t.clientY});n.forEach((function(t){var n=new FileReader;n.onload=function(t){var n=r.nodes.image.create({src:t.target.result}),i=e.state.tr.insert(o.pos,n);e.dispatch(i)},n.readAsDataURL(t)}))}}}}}})]}}]),n}(i.Node);t.Image=$;var B=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}},{key:"keys",value:function(e){var t=e.type;return{Enter:(0,a.splitListItem)(t),Tab:(0,a.sinkListItem)(t),"Shift-Tab":(0,a.liftListItem)(t)}}}]),n}(i.Node);function W(e){var t=e.char,n=void 0===t?"@":t,r=e.allowSpaces,o=void 0!==r&&r,i=e.startOfLine,a=void 0!==i&&i;return function(e){if(e.depth<=0)return!1;for(var t,r="\\".concat(n),i=new RegExp("\\s".concat(r,"$")),s=a?"^":"",u=o?new RegExp("".concat(s).concat(r,".*?(?=\\s").concat(r,"|$)"),"gm"):new RegExp("".concat(s,"(?:^)?").concat(r,"[^\\s").concat(r,"]*"),"gm"),c=e.before(),l=e.end(),d=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"\0",a="",s=!0,u=null;return e.content.nodesBetween(t,n,(function(e,c){if(e.isText){if(u)return void(u=null);a+=e.text.slice(Math.max(t,c)-c,n-c),s=!r}else e.isLeaf&&i?(a+=i,s=!r):e.isInline&&!e.isLeaf?(a+=o,e.textContent&&(a+=e.textContent,u=e),a+=o,s=!s):!s&&e.isBlock&&(a+=r,s=!0)}),0),a}(e.doc,c,l,"\0","\0"),f=u.exec(d);null!==f;){var p=f.input.slice(Math.max(0,f.index-1),f.index);if(/^[\s\0]?$/.test(p)){var h=f.index+e.start(),m=h+f[0].length;o&&i.test(d.slice(m-1,m+1))&&(f[0]+=" ",m+=1),h<e.pos&&m>=e.pos&&(t={range:{from:h,to:m},query:f[0].slice(n.length),text:f[0]})}f=u.exec(d)}return t}}function U(e){var t=e.matcher,n=void 0===t?{char:"@",allowSpaces:!1,startOfLine:!1}:t,r=e.appendText,o=void 0===r?null:r,i=e.suggestionClass,s=void 0===i?"suggestion":i,c=e.command,l=void 0===c?function(){return!1}:c,f=e.items,p=void 0===f?[]:f,h=e.onEnter,m=void 0===h?function(){return!1}:h,_=e.onChange,v=void 0===_?function(){return!1}:_,b=e.onExit,M=void 0===b?function(){return!1}:b,k=e.onKeyDown,w=void 0===k?function(){return!1}:k,S=e.onFilter,L=void 0===S?function(e,t){return t?e.filter((function(e){return JSON.stringify(e).toLowerCase().includes(t.toLowerCase())})):e}:S;return new d.Plugin({key:new d.PluginKey("suggestions"),view:function(){var e,t,n=this;return{update:(e=regeneratorRuntime.mark((function e(t,r){var i,s,u,c,d,f,h,y,_,g,b,k,w;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.key.getState(r),s=n.key.getState(t.state),u=i.active&&s.active&&i.range.from!==s.range.from,c=!i.active&&s.active,d=i.active&&!s.active,f=!c&&!d&&i.query!==s.query,y=f&&!u,_=d||u,(h=c||u)||y||_){e.next=11;break}return e.abrupt("return");case 11:if(g=_?i:s,b=document.querySelector('[data-decoration-id="'.concat(g.decorationId,'"]')),k=b?{getBoundingClientRect:function(){return b.getBoundingClientRect()},clientWidth:b.clientWidth,clientHeight:b.clientHeight}:null,e.t0=t,e.t1=g.range,e.t2=g.query,e.t3=g.text,e.t4=b,e.t5=k,!y&&!h){e.next=36;break}if(e.t7=L,!Array.isArray(p)){e.next=26;break}e.t8=p,e.next=29;break;case 26:return e.next=28,p();case 28:e.t8=e.sent;case 29:return e.t9=e.t8,e.t10=g.query,e.next=33,(0,e.t7)(e.t9,e.t10);case 33:e.t6=e.sent,e.next=37;break;case 36:e.t6=[];case 37:e.t11=e.t6,e.t12=function(e){var n=e.range,r=e.attrs;l({range:n,attrs:r,schema:t.state.schema})(t.state,t.dispatch,t),o&&(0,a.insertText)(o)(t.state,t.dispatch,t)},w={view:e.t0,range:e.t1,query:e.t2,text:e.t3,decorationNode:e.t4,virtualNode:e.t5,items:e.t11,command:e.t12},_&&M(w),y&&v(w),h&&m(w);case 43:case"end":return e.stop()}}),e)})),t=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))},function(e,n){return t.apply(this,arguments)})}},state:{init:function(){return{active:!1,range:{},query:null,text:null}},apply:function(e,t){var r=e.selection,o=g({},t);if(r.from===r.to){(r.from<t.range.from||r.from>t.range.to)&&(o.active=!1);var i=r.$from,a=W(n)(i),s=(Math.random()+1).toString(36).substr(2,5);a?(o.active=!0,o.decorationId=t.decorationId?t.decorationId:s,o.range=a.range,o.query=a.query,o.text=a.text):o.active=!1}else o.active=!1;return o.active||(o.decorationId=null,o.range={},o.query=null,o.text=null),o}},props:{handleKeyDown:function(e,t){var n=this.getState(e.state),r=n.active,o=n.range;return!!r&&w({view:e,event:t,range:o})},decorations:function(e){var t=this.getState(e),n=t.active,r=t.range,o=t.decorationId;return n?u.DecorationSet.create(e.doc,[u.Decoration.inline(r.from,r.to,{nodeName:"span",class:s,"data-decoration-id":o})]):null}}})}t.ListItem=B;var q=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"mention"}},{key:"defaultOptions",get:function(){return{matcher:{char:"@",allowSpaces:!1,startOfLine:!1},mentionClass:"mention",suggestionClass:"mention-suggestion"}}},{key:"getLabel",value:function(e){return e.innerText.split(this.options.matcher.char).join("")}},{key:"createFragment",value:function(e,t){return l.Fragment.fromJSON(e,[{type:"text",text:"".concat(this.options.matcher.char).concat(t)}])}},{key:"insertMention",value:function(e,t,n){var r=n.nodes[this.name],o=this.createFragment(n,t.label);return(0,a.replaceText)(e,r,t,o)}},{key:"schema",get:function(){var e=this;return{attrs:{id:{},label:{}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(t){return["span",{class:e.options.mentionClass,"data-mention-id":t.attrs.id},"".concat(e.options.matcher.char).concat(t.attrs.label)]},parseDOM:[{tag:"span[data-mention-id]",getAttrs:function(t){return{id:t.getAttribute("data-mention-id"),label:e.getLabel(t)}},getContent:function(t,n){var r=e.getLabel(t);return e.createFragment(n,r)}}]}}},{key:"commands",value:function(e){var t=this,n=e.schema;return function(e){return t.insertMention(null,e,n)}}},{key:"plugins",get:function(){var e=this;return[U({command:function(t){var n=t.range,r=t.attrs,o=t.schema;return e.insertMention(n,r,o)},appendText:" ",matcher:this.options.matcher,items:this.options.items,onEnter:this.options.onEnter,onChange:this.options.onChange,onExit:this.options.onExit,onKeyDown:this.options.onKeyDown,onFilter:this.options.onFilter,suggestionClass:this.options.suggestionClass})]}}]),n}(i.Node);t.Mention=q;var V=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-9":(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^(\d+)\.\s$/,t,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))]}}]),n}(i.Node);t.OrderedList=V;var J=(0,f.tableNodes)({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:function(e){return e.style.backgroundColor||null},setDOMAttr:function(e,t){if(e){var n={style:"".concat(t.style||"","background-color: ").concat(e,";")};Object.assign(t,n)}}}}}),G=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table"}},{key:"defaultOptions",get:function(){return{resizable:!1}}},{key:"schema",get:function(){return J.table}},{key:"commands",value:function(e){var t=e.schema;return{createTable:function(e){var n=e.rowsCount,r=e.colsCount,o=e.withHeaderRow;return function(e,i){var a=e.tr.selection.anchor+1,s=(0,c.createTable)(t,n,r,o),u=e.tr.replaceSelectionWith(s).scrollIntoView(),l=u.doc.resolve(a);u.setSelection(d.TextSelection.near(l)),i(u)}},addColumnBefore:function(){return f.addColumnBefore},addColumnAfter:function(){return f.addColumnAfter},deleteColumn:function(){return f.deleteColumn},addRowBefore:function(){return f.addRowBefore},addRowAfter:function(){return f.addRowAfter},deleteRow:function(){return f.deleteRow},deleteTable:function(){return f.deleteTable},toggleCellMerge:function(){return function(e,t){(0,f.mergeCells)(e,t)||(0,f.splitCell)(e,t)}},mergeCells:function(){return f.mergeCells},splitCell:function(){return f.splitCell},toggleHeaderColumn:function(){return f.toggleHeaderColumn},toggleHeaderRow:function(){return f.toggleHeaderRow},toggleHeaderCell:function(){return f.toggleHeaderCell},setCellAttr:function(e){var t=e.name,n=e.value;return(0,f.setCellAttr)(t,n)},fixTables:function(){return f.fixTables}}}},{key:"keys",value:function(){return{Tab:(0,f.goToNextCell)(1),"Shift-Tab":(0,f.goToNextCell)(-1)}}},{key:"plugins",get:function(){return[].concat(M(this.options.resizable?[(0,f.columnResizing)()]:[]),[(0,f.tableEditing)()])}}]),n}(i.Node);t.Table=G;var K=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table_header"}},{key:"schema",get:function(){return J.table_header}}]),n}(i.Node);t.TableHeader=K;var Z=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table_cell"}},{key:"schema",get:function(){return J.table_cell}}]),n}(i.Node);t.TableCell=Z;var X=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table_row"}},{key:"schema",get:function(){return J.table_row}}]),n}(i.Node);t.TableRow=X;var Q=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"todo_item"}},{key:"defaultOptions",get:function(){return{nested:!1}}},{key:"view",get:function(){return{props:["node","updateAttrs","view"],methods:{onChange:function(){this.updateAttrs({done:!this.node.attrs.done})}},template:'\n <li :data-type="node.type.name" :data-done="node.attrs.done.toString()" data-drag-handle>\n <span class="todo-checkbox" contenteditable="false" @click="onChange"></span>\n <div class="todo-content" ref="content" :contenteditable="view.editable.toString()"></div>\n </li>\n '}}},{key:"schema",get:function(){var e=this;return{attrs:{done:{default:!1}},draggable:!0,content:this.options.nested?"(paragraph|todo_list)+":"paragraph+",toDOM:function(t){var n=t.attrs.done;return["li",{"data-type":e.name,"data-done":n.toString()},["span",{class:"todo-checkbox",contenteditable:"false"}],["div",{class:"todo-content"},0]]},parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]'),getAttrs:function(e){return{done:"true"===e.getAttribute("data-done")}}}]}}},{key:"keys",value:function(e){var t=e.type;return{Enter:(0,a.splitToDefaultListItem)(t),Tab:this.options.nested?(0,a.sinkListItem)(t):function(){},"Shift-Tab":(0,a.liftListItem)(t)}}}]),n}(i.Node);t.TodoItem=Q;var ee=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"todo_list"}},{key:"schema",get:function(){var e=this;return{group:"block",content:"todo_item+",toDOM:function(){return["ul",{"data-type":e.name},0]},parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]')}]}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleList)(t,n.nodes.todo_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^\s*(\[ \])\s$/,t)]}}]),n}(i.Node);t.TodoList=ee;var te=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"bold"}},{key:"schema",get:function(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:function(e){return"normal"!==e.style.fontWeight&&null}},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}],toDOM:function(){return["strong",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-b":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}}]),n}(i.Mark);t.Bold=te;var ne=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"code"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:function(){return["code",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-`":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/(?:`)([^`]+)(?:`)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/(?:`)([^`]+)(?:`)/g,t)]}}]),n}(i.Mark);t.Code=ne;var re=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"italic"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:function(){return["em",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-i":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/(?:^|[^_])(_([^_]+)_)$/,t),(0,a.markInputRule)(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/_([^_]+)_/g,t),(0,a.markPasteRule)(/\*([^*]+)\*/g,t)]}}]),n}(i.Mark);t.Italic=re;var oe=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"link"}},{key:"defaultOptions",get:function(){return{openOnClick:!0,target:null}}},{key:"schema",get:function(){var e=this;return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href"),target:e.getAttribute("target")}}}],toDOM:function(t){return["a",g(g({},t.attrs),{},{rel:"noopener noreferrer nofollow",target:t.attrs.target||e.options.target}),0]}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return e.href?(0,a.updateMark)(t,e):(0,a.removeMark)(t)}}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.pasteRule)(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,t,(function(e){return{href:e}}))]}},{key:"plugins",get:function(){return this.options.openOnClick?[new i.Plugin({props:{handleClick:function(e,t,n){var r=e.state.schema,o=(0,c.getMarkAttrs)(e.state,r.marks.link);o.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(o.href,o.target))}}})]:[]}}]),n}(i.Mark);t.Link=oe;var ie=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"strike"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:function(e){return"line-through"===e}}],toDOM:function(){return["s",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-d":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/~([^~]+)~$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/~([^~]+)~/g,t)]}}]),n}(i.Mark);t.Strike=ie;var ae=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"underline"}},{key:"schema",get:function(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:function(e){return"underline"===e}}],toDOM:function(){return["u",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-u":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}}]),n}(i.Mark);t.Underline=ae;var se=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"collaboration"}},{key:"init",value:function(){var e=this;this.getSendableSteps=this.debounce((function(t){var n=(0,h.sendableSteps)(t);n&&e.options.onSendable({editor:e.editor,sendable:{version:n.version,steps:n.steps.map((function(e){return e.toJSON()})),clientID:n.clientID}})}),this.options.debounce),this.editor.on("transaction",(function(t){var n=t.state;e.getSendableSteps(n)}))}},{key:"defaultOptions",get:function(){var e=this;return{version:0,clientID:Math.floor(4294967295*Math.random()),debounce:250,onSendable:function(){},update:function(t){var n=t.steps,r=t.version,o=e.editor,i=o.state,a=o.view,s=o.schema;(0,h.getVersion)(i)>r||a.dispatch((0,h.receiveTransaction)(i,n.map((function(e){return p.Step.fromJSON(s,e.step)})),n.map((function(e){return e.clientID}))))}}}},{key:"plugins",get:function(){return[(0,h.collab)({version:this.options.version,clientID:this.options.clientID})]}},{key:"debounce",value:function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}}]),n}(i.Extension);t.Collaboration=se;var ue=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"focus"}},{key:"defaultOptions",get:function(){return{className:"has-focus",nested:!1}}},{key:"plugins",get:function(){var e=this;return[new i.Plugin({props:{decorations:function(t){var n=t.doc,r=t.plugins,o=t.selection,i=r.find((function(e){return e.key.startsWith("editable$")})).props.editable()&&e.options.className,a=e.editor.focused,s=o.anchor,c=[];return!(!i||!a)&&(n.descendants((function(t,n){if(s>=n&&s<=n+t.nodeSize&&!t.isText){var r=u.Decoration.node(n,n+t.nodeSize,{class:e.options.className});c.push(r)}return e.options.nested})),u.DecorationSet.create(n,c))}}})]}}]),n}(i.Extension);t.Focus=ue;var ce=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"history"}},{key:"defaultOptions",get:function(){return{depth:"",newGroupDelay:""}}},{key:"keys",value:function(){return{"Mod-z":m.undo,"Mod-y":m.redo,"Shift-Mod-z":m.redo,"Mod-я":m.undo,"Shift-Mod-я":m.redo}}},{key:"plugins",get:function(){return[(0,m.history)({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}},{key:"commands",value:function(){return{undo:function(){return m.undo},redo:function(){return m.redo},undoDepth:function(){return m.undoDepth},redoDepth:function(){return m.redoDepth}}}}]),n}(i.Extension);t.History=ce;var le=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"placeholder"}},{key:"defaultOptions",get:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",emptyNodeText:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0}}},{key:"plugins",get:function(){var e=this;return[new i.Plugin({props:{decorations:function(t){var n=t.doc,r=t.plugins,o=t.selection,i=r.find((function(e){return e.key.startsWith("editable$")})).props.editable()||!e.options.showOnlyWhenEditable,a=o.anchor,s=[],c=0===n.textContent.length;return!!i&&(n.descendants((function(t,n){var r=a>=n&&a<=n+t.nodeSize,o=0===t.content.size;if((r||!e.options.showOnlyCurrent)&&o){var i=[e.options.emptyNodeClass];c&&i.push(e.options.emptyEditorClass);var l=u.Decoration.node(n,n+t.nodeSize,{class:i.join(" "),"data-empty-text":"function"==typeof e.options.emptyNodeText?e.options.emptyNodeText(t):e.options.emptyNodeText});s.push(l)}return!1})),u.DecorationSet.create(n,s))}}})]}}]),n}(i.Extension);t.Placeholder=le;var de=function(e){T(n,e);var t=Y(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return S(this,n),(e=t.call(this,r)).results=[],e.searchTerm=null,e._updating=!1,e}return x(n,[{key:"name",get:function(){return"search"}},{key:"defaultOptions",get:function(){return{autoSelectNext:!0,findClass:"find",searching:!1,caseSensitive:!1,disableRegex:!0,alwaysSearch:!1}}},{key:"commands",value:function(){var e=this;return{find:function(t){return e.find(t)},replace:function(t){return e.replace(t)},replaceAll:function(t){return e.replaceAll(t)},clearSearch:function(){return e.clear()}}}},{key:"findRegExp",get:function(){return RegExp(this.searchTerm,this.options.caseSensitive?"gu":"gui")}},{key:"decorations",get:function(){var e=this;return this.results.map((function(t){return u.Decoration.inline(t.from,t.to,{class:e.options.findClass})}))}},{key:"_search",value:function(e){var t=this;this.results=[];var n=[],r=0;this.searchTerm&&(e.descendants((function(e,t){e.isText?n[r]?n[r]={text:n[r].text+e.text,pos:n[r].pos}:n[r]={text:e.text,pos:t}:r+=1})),n.forEach((function(e){for(var n,r=e.text,o=e.pos,i=t.findRegExp;(n=i.exec(r))&&""!==n[0];)t.results.push({from:o+n.index,to:o+n.index+n[0].length})})))}},{key:"replace",value:function(e){var t=this;return function(n,r){if(t.results[0]){var o=t.results[0],i=o.from,a=o.to;r(n.tr.insertText(e,i,a)),t.editor.commands.find(t.searchTerm)}}}},{key:"rebaseNextResult",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t+1;if(!this.results[r])return null;var o=this.results[t],i=o.from,a=o.to,s=a-i-e.length+n,u=this.results[r],c=u.from,l=u.to;return this.results[r]={to:l-s,from:c-s},s}},{key:"replaceAll",value:function(e){var t=this;return function(n,r){var o,i=n.tr;t.results.length&&(t.results.forEach((function(n,r){var a=n.from,s=n.to;i.insertText(e,a,s),o=t.rebaseNextResult(e,r,o)})),r(i),t.editor.commands.find(t.searchTerm))}}},{key:"find",value:function(e){var t=this;return function(n,r){t.searchTerm=t.options.disableRegex?e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"):e,t.updateView(n,r)}}},{key:"clear",value:function(){var e=this;return function(t,n){e.searchTerm=null,e.updateView(t,n)}}},{key:"updateView",value:function(e,t){var n=e.tr;this._updating=!0,t(n),this._updating=!1}},{key:"createDeco",value:function(e){return this._search(e),this.decorations?u.DecorationSet.create(e,this.decorations):[]}},{key:"plugins",get:function(){var e=this;return[new i.Plugin({state:{init:function(){return u.DecorationSet.empty},apply:function(t,n){return e._updating||e.options.searching||t.docChanged&&e.options.alwaysSearch?e.createDeco(t.doc):t.docChanged?n.map(t.mapping,t.doc):n}},props:{decorations:function(e){return this.getState(e)}}})]}}]),n}(i.Extension);t.Search=de;var fe=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"trailing_node"}},{key:"defaultOptions",get:function(){return{node:"paragraph",notAfter:["paragraph"]}}},{key:"plugins",get:function(){var e=this,t=new i.PluginKey(this.name),n=Object.entries(this.editor.schema.nodes).map((function(e){return _(e,2)[1]})).filter((function(t){return e.options.notAfter.includes(t.name)}));return[new i.Plugin({key:t,view:function(){return{update:function(n){var r=n.state;if(t.getState(r)){var o=r.doc,i=r.schema,a=r.tr,s=i.nodes[e.options.node],u=a.insert(o.content.size,s.create());n.dispatch(u)}}}},state:{init:function(e,t){var r=t.tr.doc.lastChild;return!(0,c.nodeEqualsType)({node:r,types:n})},apply:function(e,t){if(!e.docChanged)return t;var r=e.doc.lastChild;return!(0,c.nodeEqualsType)({node:r,types:n})}}})]}}]),n}(i.Extension);t.TrailingNode=fe},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__endComposition=yt,t.__parseFromClipboard=ze,t.__serializeForClipboard=Fe,t.EditorView=t.DecorationSet=t.Decoration=void 0;var r=n(204),o=n(205),i=n(207),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),u=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var l=a.ie=!!(u||c||s);a.ie_version=u?document.documentMode||6:c?+c[1]:s?+s[1]:null,a.gecko=!l&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!l&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!d,a.chrome_version=d&&+d[1],a.safari=!l&&/Apple Computer/.test(navigator.vendor),a.ios=a.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),a.android=/Android \d/.test(navigator.userAgent),a.webkit="webkitFontSmoothing"in document.documentElement.style,a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var f=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},p=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},h=null,m=function(e,t,n){var r=h||(h=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},y=function(e,t,n,r){return n&&(v(e,t,n,r,-1)||v(e,t,n,r,1))},_=/^(img|br|input|textarea|hr)$/i;function v(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:g(e))){var i=e.parentNode;if(1!=i.nodeType||b(e)||_.test(e.nodeName)||"false"==e.contentEditable)return!1;t=f(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?g(e):0}}}function g(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function b(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var M=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function k(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function w(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function S(e,t){return"number"==typeof e?e:e[t]}function L(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function x(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=p(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,u=s?w(i):L(a),c=0,l=0;if(t.top<u.top+S(r,"top")?l=-(u.top-t.top+S(o,"top")):t.bottom>u.bottom-S(r,"bottom")&&(l=t.bottom-u.bottom+S(o,"bottom")),t.left<u.left+S(r,"left")?c=-(u.left-t.left+S(o,"left")):t.right>u.right-S(r,"right")&&(c=t.right-u.right+S(o,"right")),c||l)if(s)i.defaultView.scrollBy(c,l);else{var d=a.scrollLeft,f=a.scrollTop;l&&(a.scrollTop+=l),c&&(a.scrollLeft+=c);var h=a.scrollLeft-d,m=a.scrollTop-f;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(s)break}}function T(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=p(e));return t}function D(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var Y=null;function C(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,u=e.firstChild,c=0;u;u=u.nextSibling,c++){var l=void 0;if(1==u.nodeType)l=u.getClientRects();else{if(3!=u.nodeType)continue;l=m(u).getClientRects()}for(var d=0;d<l.length;d++){var f=l[d];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=u,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==u.nodeType&&p&&(i=c+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=E(r,1);if(i.top!=i.bottom&&A(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:C(n,r)}function A(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function O(e,t){var n,r,o,i,s=e.root;if(s.caretPositionFromPoint)try{var u=s.caretPositionFromPoint(t.left,t.top);u&&(o=(n=u).offsetNode,i=n.offset)}catch(e){}if(!o&&s.caretRangeFromPoint){var c=s.caretRangeFromPoint(t.left,t.top);c&&(o=(r=c).startContainer,i=r.startOffset)}var l,d=s.elementFromPoint(t.left,t.top+1);if(!d||!e.dom.contains(1!=d.nodeType?d.parentNode:d)){var f=e.dom.getBoundingClientRect();if(!A(t,f))return null;if(!(d=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),a=i;;){var s=t.childNodes[a];if(1==s.nodeType)for(var u=s.getClientRects(),c=0;c<u.length;c++){var l=u[c];if(A(n,l))return e(s,n,l)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,f)))return null}if(a.safari)for(var h=d;o&&h;h=p(h))h.draggable&&(o=i=null);if(d=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(d,t),o){if(a.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var m,y=o.childNodes[i];"IMG"==y.nodeName&&(m=y.getBoundingClientRect()).right<=t.left&&m.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==l&&(l=function(e,t,n){var r=C(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,d,t));var _=e.docView.nearestDesc(d,!0);return{pos:l,inside:_?_.posAtStart-_.border:-1}}function E(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var j=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function P(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,s=a.webkit||a.gecko;if(3==o.nodeType){if(!s||!j.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var u=i,c=i,l=n<0?1:-1;return n<0&&!i?(c++,l=-1):n>=0&&i==o.nodeValue.length?(u--,l=1):n<0?u--:c++,N(E(m(o,u,c),l),l<0)}var d=E(m(o,i,i),n);if(a.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=E(m(o,i-1,i-1),-1);if(f.top==d.top){var p=E(m(o,i,i+1),-1);if(p.top!=d.top)return N(p,p.left<f.left)}}return d}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==g(o))){var h=o.childNodes[i-1];if(1==h.nodeType)return H(h.getBoundingClientRect(),!1)}if(i<g(o)){var y=o.childNodes[i];if(1==y.nodeType)return H(y.getBoundingClientRect(),!0)}return H(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==g(o))){var _=o.childNodes[i-1],v=3==_.nodeType?m(_,g(_)-(s?0:1)):1!=_.nodeType||"BR"==_.nodeName&&_.nextSibling?null:_;if(v)return N(E(v,1),!1)}if(i<g(o)){var b=o.childNodes[i],M=3==b.nodeType?m(b,0,s?0:1):1==b.nodeType?b:null;if(M)return N(E(M,-1),!0)}return N(E(3==o.nodeType?m(o):o,-n),n>=0)}function N(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function H(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function R(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var I=/[\u0590-\u08ac]/;var F=null,z=null,$=!1;function B(e,t,n){return F==t&&z==n?$:(F=t,z=n,$="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return R(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=P(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=m(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top&&("up"==n?c.bottom<i.top+1:c.top>i.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=getSelection();return I.test(r.parent.textContent)&&s.modify?R(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var W=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},U={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0}};W.prototype.matchesWidget=function(){return!1},W.prototype.matchesMark=function(){return!1},W.prototype.matchesNode=function(){return!1},W.prototype.matchesHack=function(e){return!1},U.beforePosition.get=function(){return!1},W.prototype.parseRule=function(){return null},W.prototype.stopEvent=function(){return!1},U.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},U.border.get=function(){return 0},W.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},W.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},U.posBefore.get=function(){return this.parent.posBeforeChild(this)},U.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},U.posAfter.get=function(){return this.posBefore+this.size},U.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},W.prototype.localPosFromDOM=function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>f(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.parentNode.firstChild!=u)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},W.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},W.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},W.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1},W.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},W.prototype.domFromPos=function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,o=!0;;r++,o=!1){for(;r<this.children.length&&(this.children[r].beforePosition||this.children[r].dom.parentNode!=this.contentDOM);)n+=this.children[r++].size;var i=r==this.children.length?null:this.children[r];if(n==e&&(0==t||!i||!i.size||i.border||t<0&&o)||i&&i.domAtom&&e<n+i.size)return{node:this.contentDOM,offset:i?f(i.dom):this.contentDOM.childNodes.length};if(!i)throw new Error("Invalid position "+e);var a=n+i.size;if(!i.domAtom&&(t<0&&!i.border?a>=e:a>e)&&(a>e||r+1>=this.children.length||!this.children[r+1].beforePosition))return i.domFromPos(e-n-i.border,t);n=a}},W.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],u=i+s.size;if(-1==r&&e<=u){var c=i+s.border;if(e>=c&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var l=a;l>0;l--){var d=this.children[l-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=f(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var p=a+1;p<this.children.length;p++){var h=this.children[p];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=f(h.dom);break}t+=h.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},W.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},W.prototype.domAfterPos=function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},W.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),s=0,u=0;s<this.children.length;s++){var c=this.children[s],l=u+c.size;if(o>u&&i<l)return c.setSelection(e-u-c.border,t-u-c.border,n,r);u=l}var d=this.domFromPos(e,e?-1:1),p=t==e?d:this.domFromPos(t,t?-1:1),h=n.getSelection(),m=!1;if((a.gecko||a.safari)&&e==t){var _=d.node,v=d.offset;if(3==_.nodeType){if((m=v&&"\n"==_.nodeValue[v-1])&&v==_.nodeValue.length)for(var g=_,b=void 0;g;g=g.parentNode){if(b=g.nextSibling){"BR"==b.nodeName&&(d=p={node:b.parentNode,offset:f(b)+1});break}var M=g.pmViewDesc;if(M&&M.node&&M.node.isBlock)break}}else{var k=_.childNodes[v-1];m=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(a.gecko&&h.focusNode&&h.focusNode!=p.node&&1==h.focusNode.nodeType){var w=h.focusNode.childNodes[h.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||m&&a.safari||!y(d.node,d.offset,h.anchorNode,h.anchorOffset)||!y(p.node,p.offset,h.focusNode,h.focusOffset)){var S=!1;if((h.extend||e==t)&&!m){h.collapse(d.node,d.offset);try{e!=t&&h.extend(p.node,p.offset),S=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!S){if(e>t){var L=d;d=p,p=L}var x=document.createRange();x.setEnd(p.node,p.offset),x.setStart(d.node,d.offset),h.removeAllRanges(),h.addRange(x)}}},W.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},U.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},W.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM?2:3}n=i}this.dirty=2},W.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}},U.domAtom.get=function(){return!1},Object.defineProperties(W.prototype,U);var q=[],V=function(e){function t(t,n,r,o){var i,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}e.call(this,t,q,a,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={beforePosition:{configurable:!0},domAtom:{configurable:!0}};return n.beforePosition.get=function(){return this.widget.type.side<0},t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},t.prototype.ignoreMutation=function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(W),J=function(e){function t(t,n,r,o){e.call(this,t,q,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},t.prototype.localPosFromDOM=function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t},t.prototype.domFromPos=function(e){return{node:this.textDOM,offset:e}},t.prototype.ignoreMutation=function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue},Object.defineProperties(t.prototype,n),t}(W),G=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,r,i){var a=i.nodeViews[n.type.name],s=a&&a(n,i,r);return s&&s.dom||(s=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,s.dom,s.contentDOM||s.dom)},t.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=de(i,n,a,r)),e>0&&(i=de(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(W),K=function(e){function t(t,n,r,o,i,a,s,u,c){e.call(this,t,n.isLeaf?q:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(u,c)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return t.create=function(e,n,r,i,a,s){var u,c,l=a.nodeViews[n.type.name],d=l&&l(n,a,(function(){return c?c.parent?c.parent.posBeforeChild(c):void 0:s}),r,i),f=d&&d.dom,p=d&&d.contentDOM;if(n.isText)if(f){if(3!=f.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else f=document.createTextNode(n.text);else f||(f=(u=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=u.contentDOM);p||n.isText||"BR"==f.nodeName||(f.hasAttribute("contenteditable")||(f.contentEditable=!1),n.type.spec.draggable&&(f.draggable=!0));var h=f;return f=ae(f,r,n),d?c=new ee(e,n,r,i,f,p,h,d,a,s+1):n.isText?new X(e,n,r,i,f,h,a):new t(e,n,r,i,f,p,h,a,s+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?o.Fragment.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&se(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,r=this.node.inlineContent,i=t,s=e.composing&&this.localCompositionInfo(e,t),u=s&&s.pos>-1?s:null,c=s&&s.pos<0,l=new ce(this,u&&u.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var u=0,c=[],l=null,d=0;;){if(u<o.length&&o[u].to==i){for(var f=o[u++],p=void 0;u<o.length&&o[u].to==i;)(p||(p=[f])).push(o[u++]);if(p){p.sort(le);for(var h=0;h<p.length;h++)n(p[h],d,!!l)}else n(f,d,!!l)}var m=void 0,y=void 0;if(l)y=-1,m=l,l=null;else{if(!(d<e.childCount))break;y=d,m=e.child(d++)}for(var _=0;_<c.length;_++)c[_].to<=i&&c.splice(_--,1);for(;u<o.length&&o[u].from<=i&&o[u].to>i;)c.push(o[u++]);var v=i+m.nodeSize;if(m.isText){var g=v;u<o.length&&o[u].from<g&&(g=o[u].from);for(var b=0;b<c.length;b++)c[b].to<g&&(g=c[b].to);g<v&&(l=m.cut(g-i),m=m.cut(0,g-i),v=g,y=-1)}var M=c.length?m.isInline&&!m.isLeaf?c.filter((function(e){return!e.inline})):c.slice():q;r(m,M,t.forChild(i,m),y),i=v}}(this.node,this.innerDeco,(function(t,a,s){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!s&&l.syncToMarks(a==n.node.childCount?o.Mark.none:n.node.child(a).marks,r,e),l.placeWidget(t,e,i)}),(function(t,n,o,a){var u;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,o,a)||c&&e.state.selection.from>i&&e.state.selection.to<i+t.nodeSize&&(u=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(t,n,o,u,e)||l.updateNextNode(t,n,o,e,a)||l.addNode(t,n,o,e,i),i+=t.nodeSize})),l.syncToMarks(q,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(u&&this.protectLocalComposition(e,u),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;a<n.length;a++){var s=n[a],u=s.dom;if(u.parentNode==t){for(;u!=o;)o=ue(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(u,o);if(s instanceof G){var c=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=c?c.nextSibling:t.firstChild}}for(;o;)o=ue(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),a.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))},t.prototype.localCompositionInfo=function(e,t){var n=e.state.selection,o=n.from,i=n.to;if(!(!(e.state.selection instanceof r.TextSelection)||o<t||i>t+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=g(e)}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(a.focusNode,a.focusOffset);if(s&&this.dom.contains(s.parentNode)){if(this.node.inlineContent){var u=s.nodeValue,c=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var u=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;u+=c.text}if(i>=n){var l=u.lastIndexOf(t,r-s);if(l>=0&&l+t.length+s>=n)return s+l}}}return-1}(this.node.content,u,o-t,i-t);return c<0?null:{node:s,pos:c,text:u}}return{node:s,pos:-1}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new J(this,i,n,o);e.compositionNodes.push(a),this.children=de(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!se(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=oe(this.dom,this.nodeDOM,re(this.outerDeco,this.node,t),re(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,n),t}(W);function Z(e,t,n,r,o){return ae(r,t,e),new K(null,e,t,n,r,r,r,o,0)}var X=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t.prototype.markDirty=function(t,n){e.prototype.markDirty.call(this,t,n),this.dom==this.nodeDOM||0!=t&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,n),t}(K),Q=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(e){return 0==this.dirty&&this.dom.nodeName==e},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(W),ee=function(e){function t(t,n,r,o,i,a,s,u,c,l){e.call(this,t,n,r,o,i,a,s,c,l),this.spec=u}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(K);function te(e){e&&(this.nodeName=e)}te.prototype=Object.create(null);var ne=[new te];function re(e,t,n){if(0==e.length)return ne;for(var r=n?ne[0]:new te,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new te(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==o.length&&o.push(r=new te(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+u:"style"==s?r.style=(r.style?r.style+";":"")+u:"nodeName"!=s&&(r[s]=u))}}return o}function oe(e,t,n,r){if(n==ne&&r==ne)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var u=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.tagName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(o),s=ne[0]),o=u}ie(o,s||ne[0],a)}return o}function ie(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):q,a=n.class?n.class.split(" ").filter(Boolean):q,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var u=0;u<a.length;u++)-1==i.indexOf(a[u])&&e.classList.add(a[u])}if(t.style!=n.style){if(t.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function ae(e,t,n){return oe(e,e,ne,re(t,n,1!=e.nodeType))}function se(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ue(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var ce=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){for(var n=e.childCount,r=t.length,o=new Map;n>0&&r>0;r--){var i=t[r-1],a=i.node;if(a){if(a!=e.child(n-1))break;--n,o.set(i,n)}}return{index:n,matched:o}}(e.node.content,e.children)};function le(e,t){return e.type.side-t.type.side}function de(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var u=e[a],c=s,l=s+=u.size;c>=n||l<=t?i.push(u):(c<t&&i.push(u.slice(0,t-c,r)),o&&(i.push(o),o=null),l>n&&i.push(u.slice(n-c,u.size,r)))}return i}function fe(e,t){var n=e.root.getSelection(),o=e.state.doc;if(!n.focusNode)return null;var i=e.docView.nearestDesc(n.focusNode),a=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var u,c,l=o.resolve(s);if(M(n)){for(u=l;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&r.NodeSelection.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function(e,t,n){for(var r=0==t,o=t==g(e);r||o;){if(e==n)return!0;var i=f(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==g(e)}}(n.focusNode,n.focusOffset,i.dom))){var d=i.posBefore;c=new r.NodeSelection(s==d?l:o.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;u=o.resolve(p)}c||(c=Me(e,u,l,"pointer"==t||e.state.selection.head<l.pos&&!a?1:-1));return c}function pe(e){return e.editable?e.hasFocus():ke(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function he(e,t){var n=e.state.selection;if(ge(e,n),pe(e)){if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,f(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&a.ie&&a.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var o,i,s=n.anchor,u=n.head;!me||n instanceof r.TextSelection||(n.$from.parent.inlineContent||(o=ye(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=ye(e,n.to))),e.docView.setSelection(s,u,e.root,t),me&&(o&&ve(o),i&&ve(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),setTimeout((function(){pe(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}ce.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},ce.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ce.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}},ce.prototype.findNodeMatch=function(e,t,n,r){var o=this.top.children,i=-1;if(r>=this.preMatch.index){for(var a=this.index;a<o.length;a++)if(o[a].matchesNode(e,t,n)){i=a;break}}else for(var s=this.index,u=Math.min(o.length,s+1);s<u;s++){var c=o[s];if(c.matchesNode(e,t,n)&&!this.preMatch.matched.has(c)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},ce.prototype.updateNodeAt=function(e,t,n,r,o){return!!this.top.children[r].update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)},ce.prototype.findIndexWithChild=function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}},ce.prototype.updateNextNode=function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof K){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&se(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1},ce.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,K.create(this.top,e,t,n,r,o)),this.changed=!0},ce.prototype.placeWidget=function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new V(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},ce.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof G;)e=e.children[e.children.length-1];e&&e instanceof X&&!/\n$/.test(e.node.text)||(a.safari&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},ce.prototype.addHackNode=function(e){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(e))this.index++;else{var t=document.createElement(e);this.top.children.splice(this.index++,0,new Q(this.top,q,t,null)),this.changed=!0}};var me=a.safari||a.chrome&&a.chrome_version<63;function ye(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,s=o?r.childNodes[o-1]:null;if(a.safari&&i&&"false"==i.contentEditable)return _e(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return _e(i);if(s)return _e(s)}}function _e(e){return e.contentEditable="true",a.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function ve(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function ge(e,t){if(t instanceof r.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(be(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else be(e)}function be(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function Me(e,t,n,o){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||r.TextSelection.between(t,n,o)}function ke(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function we(e,t){var n=e.selection,o=n.$anchor,i=n.$head,a=t>0?o.max(i):o.min(i),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&r.Selection.findFrom(s,t)}function Se(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Le(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return Se(e,new r.TextSelection(t>0?o.$to:o.$from));var i=we(e.state,t);return!!i&&Se(e,i)}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var s=we(e.state,t);return!!(s&&s instanceof r.NodeSelection)&&Se(e,s)}if(!(a.mac&&n.indexOf("m")>-1)){var u,c=o.$head,l=c.textOffset?null:t<0?c.nodeBefore:c.nodeAfter;if(!l||l.isText)return!1;var d=t<0?c.pos-l.nodeSize:c.pos;return!!(l.isAtom||(u=e.docView.descAt(d))&&!u.contentDOM)&&(r.NodeSelection.isSelectable(l)?Se(e,new r.NodeSelection(t<0?e.state.doc.resolve(c.pos-l.nodeSize):c)):!!a.webkit&&Se(e,new r.TextSelection(e.state.doc.resolve(t<0?d:d+l.nodeSize))))}}function xe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Te(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function De(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r<xe(n)&&Te(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;var u=n.childNodes[r-1];if(Te(u))o=n,i=--r;else{if(3!=u.nodeType)break;r=(n=u).nodeValue.length}}else{if(Ce(n))break;for(var c=n.previousSibling;c&&Te(c);)o=n.parentNode,i=f(c),c=c.previousSibling;if(c)r=xe(n=c);else{if((n=n.parentNode)==e.dom)break;r=0}}s?Ae(e,t,n,r):o&&Ae(e,t,o,i)}}function Ye(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=xe(n);;)if(r<a){if(1!=n.nodeType)break;if(!Te(n.childNodes[r]))break;o=n,i=++r}else{if(Ce(n))break;for(var s=n.nextSibling;s&&Te(s);)o=s.parentNode,i=f(s)+1,s=s.nextSibling;if(s)r=0,a=xe(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Ae(e,t,o,i)}}function Ce(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ae(e,t,n,r){if(M(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&he(e)}),50)}function Oe(e,t,n){var o=e.state.selection;if(o instanceof r.TextSelection&&!o.empty||n.indexOf("s")>-1)return!1;if(a.mac&&n.indexOf("m")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var u=we(e.state,t);if(u&&u instanceof r.NodeSelection)return Se(e,u)}if(!i.parent.inlineContent){var c=t<0?i:s,l=o instanceof r.AllSelection?r.Selection.near(c,t):r.Selection.findFrom(c,t);return!!l&&Se(e,l)}return!1}function Ee(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,a=n.empty;if(!o.sameParent(i))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(s&&!s.isText){var u=e.state.tr;return t<0?u.delete(o.pos-s.nodeSize,o.pos):u.delete(o.pos,o.pos+s.nodeSize),e.dispatch(u),!0}return!1}function je(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Pe(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?Ee(e,-1)||De(e):46==n||a.mac&&68==n&&"c"==r?Ee(e,1)||Ye(e):13==n||27==n||(37==n?Le(e,-1,r)||De(e):39==n?Le(e,1,r)||Ye(e):38==n?Oe(e,-1,r)||De(e):40==n?function(e){if(a.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;je(e,o,!0),setTimeout((function(){return je(e,o,!1)}),20)}}}(e)||Oe(e,1,r)||Ye(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ne(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(a.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||a.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function He(e,t,n,i,s){if(t<0){var u=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,c=fe(e,u);if(c&&!e.state.selection.eq(c)){var l=e.state.tr.setSelection(c);"pointer"==u?l.setMeta("pointer",!0):"key"==u&&l.scrollIntoView(),e.dispatch(l)}}else{var d=e.state.doc.resolve(t),f=d.sharedDepth(n);t=d.before(f+1),n=e.state.doc.resolve(n).after(f+1);var p=e.state.selection,h=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,u=r.toOffset,c=r.from,l=r.to,d=e.root.getSelection(),f=null,p=d.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(f=[{node:p,offset:d.anchorOffset}],M(d)||f.push({node:d.focusNode,offset:d.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var h=u;h>s;h--){var m=i.childNodes[h-1],y=m.pmViewDesc;if("BR"==m.nodeName&&!y){u=h;break}if(!y||y.size)break}var _=e.state.doc,v=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),g=_.resolve(c),b=null,k=v.parse(i,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:s,to:u,preserveWhitespace:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:f,ruleFromNode:Ne,context:g});if(f&&null!=f[0].pos){var w=f[0].pos,S=f[1]&&f[1].pos;null==S&&(S=w),b={anchor:w+c,head:S+c}}return{doc:k,sel:b,from:c,to:l}}(e,t,n);if(a.chrome&&e.cursorWrapper&&h.sel&&h.sel.anchor==e.cursorWrapper.deco.from){var m=e.cursorWrapper.deco.type.toDOM.nextSibling,y=m&&m.nodeValue?m.nodeValue.length:1;h.sel={anchor:h.sel.anchor+y,head:h.sel.anchor+y}}var _,v,g=e.state.doc,b=g.slice(h.from,h.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(_=e.state.selection.to,v="end"):(_=e.state.selection.from,v="start"),e.lastKeyCode=null;var w=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,u=a.b;if("end"==o){var c=Math.max(0,i-Math.min(s,u));r-=s+c-i}if(s<i&&e.size<t.size){u=(i-=r<=i&&r>=s?i-r:0)+(u-s),s=i}else if(u<i){s=(i-=r<=i&&r>=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(b.content,h.doc.content,h.from,_,v);if(!w){if(!(i&&p instanceof r.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||h.sel&&h.sel.anchor!=h.sel.head){if((a.ios&&e.lastIOSEnter>Date.now()-225||a.android)&&s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})))return void(e.lastIOSEnter=0);if(h.sel){var S=Re(e,e.state.doc,h.sel);S&&!S.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(S))}return}w={start:p.from,endA:p.to,endB:p.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof r.TextSelection&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),a.ie&&a.ie_version<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>h.from&&" "==h.doc.textBetween(w.start-h.from-1,w.start-h.from+1)&&(w.start--,w.endA--,w.endB--);var L,x=h.doc.resolveNoCache(w.start-h.from),T=h.doc.resolveNoCache(w.endB-h.from),D=x.sameParent(T)&&x.parent.inlineContent;if((a.ios&&e.lastIOSEnter>Date.now()-225&&(!D||s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!D&&x.pos<h.doc.content.size&&(L=r.Selection.findFrom(h.doc.resolve(x.pos+1),1,!0))&&L.head==T.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})))e.lastIOSEnter=0;else if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Ie(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Ie(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Ie(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(g,w.start,w.endA,x,T)&&e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))a.android&&a.chrome&&e.domObserver.suppressSelectionUpdates();else{a.chrome&&a.android&&w.toB==w.from&&(e.lastAndroidDelete=Date.now()),a.android&&!D&&x.start()!=T.start()&&0==T.parentOffset&&x.depth==T.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==w.endA&&(w.endB-=2,T=h.doc.resolveNoCache(w.endB-h.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))}))}),20));var Y,C,A,O,E=w.start,j=w.endA;if(D)if(x.pos==T.pos)a.ie&&a.ie_version<=11&&0==x.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return he(e)}),20)),Y=e.state.tr.delete(E,j),C=g.resolve(w.start).marksAcross(g.resolve(w.endA));else if(w.endA==w.endB&&(O=g.resolve(w.start))&&(A=function(e,t){for(var n,r,i,a=e.firstChild.marks,s=t.firstChild.marks,u=a,c=s,l=0;l<s.length;l++)u=s[l].removeFromSet(u);for(var d=0;d<a.length;d++)c=a[d].removeFromSet(c);if(1==u.length&&0==c.length)r=u[0],n="add",i=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=u.length||1!=c.length)return null;r=c[0],n="remove",i=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],p=0;p<t.childCount;p++)f.push(i(t.child(p)));if(o.Fragment.from(f).eq(e))return{mark:r,type:n}}(x.parent.content.cut(x.parentOffset,T.parentOffset),O.parent.content.cut(O.parentOffset,w.endA-O.start()))))Y=e.state.tr,"add"==A.type?Y.addMark(E,j,A.mark):Y.removeMark(E,j,A.mark);else if(x.parent.child(x.index()).isText&&x.index()==T.index()-(T.textOffset?0:1)){var P=x.parent.textBetween(x.parentOffset,T.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,E,j,P)})))return;Y=e.state.tr.insertText(P,E,j)}if(Y||(Y=e.state.tr.replace(E,j,h.doc.slice(w.start-h.from,w.endB-h.from))),h.sel){var N=Re(e,Y.doc,h.sel);N&&!(a.chrome&&a.android&&e.composing&&N.empty&&(w.start!=w.endB||e.lastAndroidDelete<Date.now()-100)&&(N.head==E||N.head==Y.mapping.map(j)-1)||a.ie&&N.empty&&N.head==E)&&Y.setSelection(N)}C&&Y.ensureMarks(C),e.dispatch(Y.scrollIntoView())}}}function Re(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Me(e,t.resolve(n.anchor),t.resolve(n.head))}function Ie(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Fe(e,t){for(var n=[],r=t.content,i=t.openStart,a=t.openEnd;i>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,a--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var u=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),c=qe(),l=c.createElement("div");l.appendChild(u.serializeFragment(r,{document:c}));for(var d,f=l.firstChild;f&&1==f.nodeType&&(d=We[f.nodeName.toLowerCase()]);){for(var p=d.length-1;p>=0;p--){for(var h=c.createElement(d[p]);l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:l,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function ze(e,t,n,r,i){var s,u,c=i.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||c||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,c||r)})),c)return new o.Slice(o.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0);var d=e.someProp("clipboardTextParser",(function(e){return e(t,i,r)}));if(d)u=d;else{var f=i.marks(),p=e.state.schema,h=o.DOMSerializer.fromSchema(p);s=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){s.appendChild(document.createElement("p")).appendChild(h.serializeNode(p.text(e,f)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),s=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=qe().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&We[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),a.webkit&&function(e){for(var t=e.querySelectorAll(a.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(s);var m=s&&s.querySelector("[data-pm-slice]"),y=m&&/^(\d+) (\d+) (.*)/.exec(m.getAttribute("data-pm-slice"));if(!u){var _=e.someProp("clipboardParser")||e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema);u=_.parseSlice(s,{preserveWhitespace:!(!l&&!y),context:i})}return u=y?function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var i=e.content,a=e.openStart,s=e.openEnd,u=n.length-2;u>=0;u-=2){var c=r.nodes[n[u]];if(!c||c.hasRequiredAttrs())break;i=o.Fragment.from(c.create(n[u+1],i)),a++,s++}return new o.Slice(i,a,s)}(function(e,t,n){t<e.openStart&&(e=new o.Slice(Be(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd));n<e.openEnd&&(e=new o.Slice(Be(e.content,1,n,e.openEnd,0,0),e.openStart,n));return e}(u,+y[1],+y[2]),y[3]):o.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),i=void 0,a=[];if(e.forEach((function(e){if(a){var t,n=r.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&i.length&&function e(t,n,r,i,a){if(a<t.length&&a<n.length&&t[a]==n[a]){var s=e(t,n,r,i.lastChild,a+1);if(s)return i.copy(i.content.replaceChild(i.childCount-1,s));if(i.contentMatchAt(i.childCount).matchType(a==t.length-1?r.type:t[a+1]))return i.copy(i.content.append(o.Fragment.from($e(r,t,a+1))))}}(n,i,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;var r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),i=t.contentMatchAt(t.childCount).fillBefore(o.Fragment.empty,!0);return t.copy(r.append(i))}(a[a.length-1],i.length));var s=$e(e,n);a.push(s),r=r.matchType(s.type,s.attrs),i=n}}})),a)return{v:o.Fragment.from(a)}},r=t.depth;r>=0;r--){var i=n(r);if(i)return i.v}return e}(u.content,i),!1),e.someProp("transformPasted",(function(e){u=e(u)})),u}function $e(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function Be(e,t,n,r,i,a){var s=t<0?e.firstChild:e.lastChild,u=s.content;return i<r-1&&(u=Be(u,t,n,r,i+1,a)),i>=n&&(u=t<0?s.contentMatchAt(0).fillBefore(u,e.childCount>1||a<=i).append(u):u.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(u))}var We={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Ue=null;function qe(){return Ue||(Ue=document.implementation.createHTMLDocument("title"))}var Ve={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Je=a.ie&&a.ie_version<=11,Ge=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Ge.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Ge.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Ke=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)n.queue.push(e[t]);a.ie&&a.ie_version<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Ge,Je&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Ke.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Ke.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ke.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ve),Je&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ke.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}Je&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Ke.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Ke.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Ke.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},Ke.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&ke(e)){var e;if(this.suppressingSelectionUpdates)return he(this.view);if(a.ie&&a.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&y(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Ke.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Ke.prototype.ignoreSelectionChange=function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0},Ke.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&ke(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var u=0;u<e.length;u++){var c=this.registerMutation(e[u],s);c&&(r=r<0?c.from:Math.min(c.from,r),o=o<0?c.to:Math.max(c.to,o),c.typeOver&&(i=!0))}if(a.gecko&&s.length>1){var l=s.filter((function(e){return"BR"==e.nodeName}));if(2==l.length){var d=l[0],f=l[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Ze)return;Ze=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||he(this.view),this.currentSelection.set(t))}},Ke.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(a.ie&&a.ie_version<=11&&e.addedNodes.length)for(var s=0;s<e.addedNodes.length;s++){var u=e.addedNodes[s],c=u.previousSibling,l=u.nextSibling;(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(o=c),(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(i=l)}var d=o&&o.parentNode==e.target?f(o)+1:0,p=n.localPosFromDOM(e.target,d,-1),h=i&&i.parentNode==e.target?f(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,h,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var Ze=!1;var Xe={},Qe={};function et(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function tt(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return nt(e,t)})}))}function nt(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function rt(e){return{left:e.clientX,top:e.clientY}}function ot(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if(u)return u.v}return!1}function it(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function at(e,t,n,o,i){return ot(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var u=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(u)){o=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=o&&(it(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(it(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function st(e,t,n,r){return ot(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ut(e,t,n,o){return ot(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t,n){if(0!=n.button)return!1;var o=e.state.doc;if(-1==t)return!!o.inlineContent&&(it(e,r.TextSelection.create(o,0,o.content.size),"pointer"),!0);for(var i=o.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a),u=i.before(a);if(s.inlineContent)it(e,r.TextSelection.create(o,u+1,u+1+s.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(s))continue;it(e,r.NodeSelection.create(o,u),"pointer")}return!0}}(e,n,o)}function ct(e){return yt(e)}Qe.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!ft(e,t))if(229!=t.keyCode&&e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!a.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Pe(e,t)?t.preventDefault():et(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Qe.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Qe.keypress=function(e,t){if(!(ft(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection&&n.$from.sameParent(n.$to))){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var lt=a.mac?"metaKey":"ctrlKey";Xe.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ct(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[lt]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(rt(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new dt(e,i,t,n)):("doubleClick"==o?st:ut)(e,i.pos,i.inside,t)?t.preventDefault():et(e,"pointer"))};var dt=function(e,t,n,o){var i,s,u=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[lt],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var c=e.state.doc.resolve(t.pos);i=c.parent,s=c.depth?c.before():0}this.mightDrag=null;var l=o?null:n.target,d=l?e.docView.nearestDesc(l,!0):null;this.target=d?d.dom:null;var f=e.state.selection;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof r.NodeSelection&&f.from<=s&&f.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){u.view.mouseDown==u&&u.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),et(e,"pointer")};function ft(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}dt.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},dt.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(rt(e))),this.allowDefault||!t?et(this.view,"pointer"):at(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(it(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):et(this.view,"pointer")}},dt.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),et(this.view,"pointer"),0==e.buttons&&this.done()},Xe.touchdown=function(e){ct(e),et(e,"pointer")},Xe.contextmenu=function(e){return ct(e)};var pt=a.android?5e3:-1;function ht(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return yt(e)}),t))}function mt(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function yt(e,t){if(e.domObserver.forceFlush(),mt(e),t||e.docView.dirty){var n=fe(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}Qe.compositionstart=Qe.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),yt(e,!0),e.markCursor=null;else if(yt(e),a.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}o=s,i=-1}e.composing=!0}ht(e,pt)},Qe.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ht(e,20))};var _t=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function vt(e,t,n,r){var i=ze(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,i||o.Slice.empty)})))return!0;if(!i)return!1;var a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=a?e.state.tr.replaceSelectionWith(a,e.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Xe.copy=Qe.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=_t?null:t.clipboardData,i=Fe(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Qe.paste=function(e,t){var n=_t?null:t.clipboardData;n&&vt(e,n.getData("text/plain"),n.getData("text/html"),t)?t.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?vt(e,r.value,null,t):vt(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var gt=function(e,t){this.slice=e,this.move=t},bt=a.mac?"altKey":"ctrlKey";for(var Mt in Xe.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(rt(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var a=e.docView.nearestDesc(t.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=Fe(e,s),c=u.dom,l=u.text;t.dataTransfer.clearData(),t.dataTransfer.setData(_t?"Text":"text/html",c.innerHTML),t.dataTransfer.effectAllowed="copyMove",_t||t.dataTransfer.setData("text/plain",l),e.dragging=new gt(s,!t[bt])}},Xe.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Qe.dragover=Qe.dragenter=function(e,t){return t.preventDefault()},Qe.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var a=e.posAtCoords(rt(t));if(a){var s=e.state.doc.resolve(a.pos);if(s){var u=n&&n.slice;u?e.someProp("transformPasted",(function(e){u=e(u)})):u=ze(e,t.dataTransfer.getData(_t?"Text":"text/plain"),_t?null:t.dataTransfer.getData("text/html"),!1,s);var c=n&&!t[bt];if(e.someProp("handleDrop",(function(n){return n(e,t,u||o.Slice.empty,c)})))t.preventDefault();else if(u){t.preventDefault();var l=u?(0,i.dropPoint)(e.state.doc,s.pos,u):s.pos;null==l&&(l=s.pos);var d=e.state.tr;c&&d.deleteSelection();var f=d.mapping.map(l),p=0==u.openStart&&0==u.openEnd&&1==u.content.childCount,h=d.doc;if(p?d.replaceRangeWith(f,f,u.content.firstChild):d.replaceRange(f,f,u),!d.doc.eq(h)){var m=d.doc.resolve(f);if(p&&r.NodeSelection.isSelectable(u.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(u.content.firstChild))d.setSelection(new r.NodeSelection(m));else{var y=d.mapping.map(l);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,r){return y=r})),d.setSelection(Me(e,m,d.doc.resolve(y)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}}}}}},Xe.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&he(e)}),20))},Xe.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},Xe.beforeinput=function(e,t){if(a.chrome&&a.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Qe)Xe[Mt]=Qe[Mt];function kt(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var wt=function(e,t){this.spec=t||Yt,this.side=this.spec.side||0,this.toDOM=e};wt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new xt(i-n,i-n,this)},wt.prototype.valid=function(){return!0},wt.prototype.eq=function(e){return this==e||e instanceof wt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&kt(this.spec,e.spec))};var St=function(e,t){this.spec=t||Yt,this.attrs=e};St.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new xt(o,i,this)},St.prototype.valid=function(e,t){return t.from<t.to},St.prototype.eq=function(e){return this==e||e instanceof St&&kt(this.attrs,e.attrs)&&kt(this.spec,e.spec)},St.is=function(e){return e.type instanceof St};var Lt=function(e,t){this.spec=t||Yt,this.attrs=e};Lt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new xt(o.pos-n,i.pos-n,this)},Lt.prototype.valid=function(e,t){var n=e.content.findIndex(t.from),r=n.index,o=n.offset;return o==t.from&&o+e.child(r).nodeSize==t.to},Lt.prototype.eq=function(e){return this==e||e instanceof Lt&&kt(this.attrs,e.attrs)&&kt(this.spec,e.spec)};var xt=function(e,t,n){this.from=e,this.to=t,this.type=n};t.Decoration=xt;var Tt={spec:{configurable:!0},inline:{configurable:!0}};xt.prototype.copy=function(e,t){return new xt(e,t,this.type)},xt.prototype.eq=function(e,t){return void 0===t&&(t=0),this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to},xt.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},xt.widget=function(e,t,n){return new xt(e,e,new wt(t,n))},xt.inline=function(e,t,n,r){return new xt(e,t,new St(n,r))},xt.node=function(e,t,n,r){return new xt(e,t,new Lt(n,r))},Tt.spec.get=function(){return this.type.spec},Tt.inline.get=function(){return this.type instanceof St},Object.defineProperties(xt.prototype,Tt);var Dt=[],Yt={},Ct=function(e,t){this.local=e&&e.length?e:Dt,this.children=t&&t.length?t:Dt};t.DecorationSet=Ct,Ct.create=function(e,t){return t.length?Nt(t,e,0,Yt):At},Ct.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Ct.prototype.findInner=function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}},Ct.prototype.map=function(e,t,n){return this==At||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Yt)},Ct.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;a<this.local.length;a++){var s=this.local[a].map(e,n,r);s&&s.type.valid(t,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),u=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;-1==u||e>u+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c))}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,d=0;d<s.length;d+=3)if(-1==s[d+1]){var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){l=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),y=m.index,_=m.offset,v=r.maybeChild(y);if(v&&_==p&&_+v.nodeSize==h){var g=s[d+2].mapInner(n,v,f+1,e[d]+i+1,a);g!=At?(s[d]=p,s[d+1]=h,s[d+2]=g):(s[d+1]=-2,l=!0)}else l=!0}if(l){var b=Nt(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var u=e.local[i].map(r,o,t);u?n.push(u):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var u=0;u<e.length;u+=3)-1==e[u+1]&&s(e[u+2],t[u]+i+1);return n}(s,e,t||[],n,o,i,a),r,0,a);t=b.local;for(var M=0;M<s.length;M+=3)s[M+1]<0&&(s.splice(M,3),M-=3);for(var k=0,w=0;k<b.children.length;k+=3){for(var S=b.children[k];w<s.length&&s[w]<S;)w+=3;s.splice(w,0,b.children[k],b.children[k+1],b.children[k+2])}}return new Ct(t&&t.sort(Ht),s)}(this.children,i,e,t,n,r,o):i?new Ct(i.sort(Ht)):At},Ct.prototype.add=function(e,t){return t.length?this==At?Ct.create(e,t):this.addInner(e,t,0):this},Ct.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,a){var s,u=a+n;if(s=jt(t,e,u)){for(r||(r=o.children.slice());i<r.length&&r[i]<a;)i+=3;r[i]==a?r[i+2]=r[i+2].addInner(e,s,u+1):r.splice(i,0,a,a+e.nodeSize,Nt(s,e,u+1,Yt)),i+=3}}));for(var a=Et(i?Pt(t):t,-n),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Ct(a.length?this.local.concat(a).sort(Ht):this.local,r||this.children)},Ct.prototype.remove=function(e){return 0==e.length||this==At?this:this.removeInner(e,0)},Ct.prototype.removeInner=function(e,t){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,a=n[o]+t,s=n[o+1]+t,u=0,c=void 0;u<e.length;u++)(c=e[u])&&c.from>a&&c.to<s&&(e[u]=null,(i||(i=[])).push(c));if(i){n==this.children&&(n=this.children.slice());var l=n[o+2].removeInner(i,a+1);l!=At?n[o+2]=l:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,f=void 0;d<e.length;d++)if(f=e[d])for(var p=0;p<r.length;p++)r[p].eq(f,t)&&(r==this.local&&(r=this.local.slice()),r.splice(p--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Ct(r,n):At},Ct.prototype.forChild=function(e,t){if(this==At)return this;if(t.isLeaf)return Ct.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;s<this.local.length;s++){var u=this.local[s];if(u.from<a&&u.to>i&&u.type instanceof St){var c=Math.max(i,u.from)-i,l=Math.min(a,u.to)-i;c<l&&(r||(r=[])).push(u.copy(c,l))}}if(r){var d=new Ct(r.sort(Ht));return n?new Ot([d,n]):d}return n||At},Ct.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Ct)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(var t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0},Ct.prototype.locals=function(e){return Rt(this.localsInner(e))},Ct.prototype.localsInner=function(e){if(this==At)return Dt;if(e.inlineContent||!this.local.some(St.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof St||t.push(this.local[n]);return t};var At=new Ct;Ct.empty=At,Ct.removeOverlap=Rt;var Ot=function(e){this.members=e};function Et(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new xt(o.from+t,o.to+t,o.type))}return n}function jt(e,t,n){if(t.isLeaf)return null;for(var r=n+t.nodeSize,o=null,i=0,a=void 0;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function Pt(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Nt(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=jt(e,t,a+n);if(s){i=!0;var u=Nt(s,t,n+a+1,r);u!=At&&o.push(a,a+t.nodeSize,u)}}));for(var a=Et(i?Pt(e):e,-n).sort(Ht),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Ct(a,o):At}function Ht(e,t){return e.from-t.from||e.to-t.to}function Rt(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),It(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),It(t,o+1,i.copy(r.to,i.to)))}}return t}function It(e,t,n){for(;t<e.length&&Ht(n,e[t])>0;)t++;e.splice(t,0,n)}function Ft(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=At&&t.push(r)})),e.cursorWrapper&&t.push(Ct.create(e.state.doc,[e.cursorWrapper.deco])),Ot.from(t)}Ot.prototype.forChild=function(e,t){if(t.isLeaf)return Ct.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=At&&(o instanceof Ot?n=n.concat(o.members):n.push(o))}return Ot.from(n)},Ot.prototype.eq=function(e){if(!(e instanceof Ot)||e.members.length!=this.members.length)return!1;for(var t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0},Ot.prototype.locals=function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Rt(n?t:t.sort(Ht)):Dt},Ot.from=function(e){switch(e.length){case 0:return At;case 1:return e[0];default:return new Ot(e)}};var zt=function(e,t){this._props=t,this.state=t.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):e.apply?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ut(this),this.markCursor=null,this.cursorWrapper=null,Wt(this),this.nodeViews=qt(this),this.docView=Z(this.state.doc,Bt(this),Ft(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(e){e.shiftKey=!1,e.mouseDown=null,e.lastKeyCode=null,e.lastKeyCodeTime=0,e.lastClick={time:0,x:0,y:0,type:""},e.lastSelectionOrigin=null,e.lastSelectionTime=0,e.lastIOSEnter=0,e.lastIOSEnterFallbackTimeout=null,e.lastAndroidDelete=0,e.composing=!1,e.composingTimeout=null,e.compositionNodes=[],e.compositionEndedAt=-2e8,e.domObserver=new Ke(e,(function(t,n,r,o){return He(e,t,n,r,o)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=Xe[t];e.dom.addEventListener(t,e.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||nt(e,t)||!e.editable&&t.type in Qe||n(e,t)})};for(var n in Xe)t(n);a.safari&&e.dom.addEventListener("input",(function(){return null})),tt(e)}(this),this.pluginViews=[],this.updatePluginViews()};t.EditorView=zt;var $t={props:{configurable:!0},root:{configurable:!0}};function Bt(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r?t.class+=" "+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[xt.node(0,e.state.doc.content.size,t)]}function Wt(e){if(e.markCursor){var t=document.createElement("img");t.setAttribute("mark-placeholder","true"),e.cursorWrapper={dom:t,deco:xt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ut(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function qt(e){var t={};return e.someProp("nodeViews",(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])})),t}$t.props.get=function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props},zt.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&tt(this),this._props=e,this.updateStateInner(e.state,!0)},zt.prototype.setProps=function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)},zt.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},zt.prototype.updateStateInner=function(e,t){var n=this,o=this.state,i=!1,s=!1;if(e.storedMarks&&this.composing&&(mt(this),s=!0),this.state=e,t){var u=qt(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(u,this.nodeViews)&&(this.nodeViews=u,i=!0),tt(this)}this.editable=Ut(this),Wt(this);var c=Ft(this),l=Bt(this),d=t?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,l,c);!f&&e.selection.eq(o.selection)||(s=!0);var p,h,m,_,v,g,b,M,k,w,S,L="preserve"==d&&s&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s!=e.dom&&e.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:T(e.dom)}}(this);if(s){this.domObserver.stop();var Y=f&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(_=o.selection,v=e.selection,g=Math.min(_.$anchor.sharedDepth(_.head),v.$anchor.sharedDepth(v.head)),_.$anchor.start(g)!=v.$anchor.start(g));if(f){var C=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,l,c,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Z(e.doc,l,c,this.dom,this)),C&&!this.trackWrites&&(Y=!0)}Y||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,h=p.docView.domFromPos(p.state.selection.anchor,0),m=p.root.getSelection(),y(h.node,h.offset,m.anchorNode,m.anchorOffset)))?he(this,Y):(ge(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var A=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof r.NodeSelection?x(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),A):x(this,this.coordsAtPos(e.selection.head,1),A))}else L&&(M=(b=L).refDOM,k=b.refTop,w=b.stack,S=M?M.getBoundingClientRect().top:0,D(w,0==S?0:S-k))},zt.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},zt.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.destroyPluginViews();for(var r=0;r<this.state.plugins.length;r++){var o=this.state.plugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}},zt.prototype.someProp=function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;var o=this.state.plugins;if(o)for(var i=0;i<o.length;i++){var a=o[i].props[e];if(null!=a&&(n=t?t(a):a))return n}},zt.prototype.hasFocus=function(){return this.root.activeElement==this.dom},zt.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Y)return e.focus(Y);var t=T(e);e.focus(null==Y?{get preventScroll(){return Y={preventScroll:!0},!0}}:void 0),Y||(Y=!1,D(t,0))}(this.dom),he(this),this.domObserver.start()},$t.root.get=function(){var e=this._root;if(null==e)for(var t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return document.getSelection()}),this._root=t;return e||document},zt.prototype.posAtCoords=function(e){return O(this,e)},zt.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),P(this,e,t)},zt.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},zt.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},zt.prototype.posAtDOM=function(e,t,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},zt.prototype.endOfTextblock=function(e,t){return B(this,t||this.state,e)},zt.prototype.destroy=function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.eventHandlers)e.dom.removeEventListener(t,e.eventHandlers[t]);clearTimeout(e.composingTimeout),clearTimeout(e.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ft(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},zt.prototype.dispatchEvent=function(e){return function(e,t){nt(e,t)||!Xe[t.type]||!e.editable&&t.type in Qe||Xe[t.type](e,t)}(this,e)},zt.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(zt.prototype,$t)},function(e,t,n){"use strict";(function(e){var r,o,i,a;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}window,a=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==s(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=21)}({0:function(e,t,n){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var t=r(e,4),n=t[1],o=t[3];if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(a," */"),u=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[n].concat(u).concat([s]).join("\n")}return[n].join("\n")}},1:function(e,t,n){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},2:function(e,t,n){var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],o=0;o<e.length;o++){var s=e[o],u=t.base?s[0]+t.base:s[0],c=n[u]||0,l="".concat(u," ").concat(c);n[u]=c+1;var d=a(l),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(i[d].references++,i[d].updater(f)):i.push({identifier:l,updater:m(f,t),references:1}),r.push(l)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,l=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,h=0;function m(e,t){var n,r,o;if(t.singleton){var i=h++;n=p||(p=u(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=u(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=a(n[r]);i[o].references--}for(var u=s(e,t),c=0;c<n.length;c++){var l=a(n[c]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}n=u}}}},21:function(e,t,n){n.r(t);var r=n(7),o=n(2),i=n.n(o),a=n(22);i()(a.a,{insert:"head",singleton:!1}),a.a.locals, +i=function(){var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Lt(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function _(e){var t=h(NaN);return null!=e?p(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=o.momentProperties=[];function g(e,t){var n,r,o;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)u(o=t[r=v[n]])||(e[r]=o);return e}var b=!1;function M(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function k(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function L(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&a++;return a+i}function x(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return p((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],s=0;s<arguments.length;s++){if(r="","object"===a(arguments[s])){for(var u in r+="\n["+s+"] ",arguments[0])r+=u+": "+arguments[0][u]+", ";r=r.slice(0,-2)}else r=arguments[s];i.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var D,Y={};function C(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),Y[e]||(x(t),Y[e]=!0)}function A(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var n,r=p({},e);for(n in t)f(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&s(e[n])&&(r[n]=p({},r[n]));return r}function E(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var j={};function P(e,t){var n=e.toLowerCase();j[n]=j[n+"s"]=j[t]=e}function N(e){return"string"==typeof e?j[e]||j[e.toLowerCase()]:void 0}function H(e){var t,n,r={};for(n in e)f(e,n)&&(t=N(n))&&(r[t]=e[n]);return r}var R={};function I(e,t){R[e]=t}function F(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,$=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},W={};function U(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=V(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,o=e.match(z);for(t=0,n=o.length;t<n;t++)W[o[t]]?o[t]=W[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=A(o[r])?o[r].call(t,e):o[r];return i}}(t),B[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for($.lastIndex=0;n>=0&&$.test(e);)e=e.replace($,r),$.lastIndex=0,n-=1;return e}var J=/\d/,G=/\d\d/,K=/\d{3}/,Z=/\d{4}/,X=/[+-]?\d{6}/,Q=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,oe=/[+-]?\d{1,6}/,ie=/\d+/,ae=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,ue=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function de(e,t,n){le[e]=A(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return f(le,e)?le[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function me(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=S(e)}),n=0;n<e.length;n++)he[e[n]]=r}function ye(e,t){me(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function _e(e,t,n){null!=t&&f(he,e)&&he[e](t,n._a,n,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),P("year","y"),I("year",1),de("Y",ae),de("YY",Q,G),de("YYYY",re,Z),de("YYYYY",oe,X),de("YYYYYY",oe,X),me(["YYYYY","YYYYYY"],0),me("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):S(e)})),me("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),me("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)};var be,Me=ke("FullYear",!0);function ke(e,t){return function(n){return null!=n?(Se(this,e,n),o.updateOffset(this,t),this):we(this,e)}}function we(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Se(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Le(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Le(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ge(e)?29:28:31-r%7%2}be=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),P("month","M"),I("month",8),de("M",Q),de("MM",Q,G),de("MMM",(function(e,t){return t.monthsShortRegex(e)})),de("MMMM",(function(e,t){return t.monthsRegex(e)})),me(["M","MM"],(function(e,t){t[1]=S(e)-1})),me(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:m(n).invalidMonth=e}));var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ye(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=be.call(this._shortMonthsParse,a))?o:null:-1!==(o=be.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=be.call(this._shortMonthsParse,a))||-1!==(o=be.call(this._longMonthsParse,a))?o:null:-1!==(o=be.call(this._longMonthsParse,a))||-1!==(o=be.call(this._shortMonthsParse,a))?o:null}function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Le(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ae(e){return null!=e?(Ce(this,e),o.updateOffset(this,!0),this):we(this,"Month")}var Oe=ce,Ee=ce;function je(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=h([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),o[t]=pe(o[t]);for(t=0;t<24;t++)i[t]=pe(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Pe(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function Ne(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function He(e,t,n){var r=7+t-n;return-(7+Ne(e,0,r).getUTCDay()-t)%7+r-1}function Re(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+He(e,r,o);return s<=0?a=ve(i=e-1)+s:s>ve(e)?(i=e+1,a=s-ve(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Ie(e,t,n){var r,o,i=He(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+Fe(o=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Fe(e,t,n){var r=He(e,t,n),o=He(e+1,t,n);return(ve(e)-r+o)/7}function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),I("week",5),I("isoWeek",5),de("w",Q),de("ww",Q,G),de("W",Q),de("WW",Q,G),ye(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=S(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),de("d",Q),de("e",Q),de("E",Q),de("dd",(function(e,t){return t.weekdaysMinRegex(e)})),de("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),de("dddd",(function(e,t){return t.weekdaysRegex(e)})),ye(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:m(n).invalidWeekday=e})),ye(["d","e","E"],(function(e,t,n,r){t[r]=S(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ue(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=be.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=be.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=be.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=be.call(this._weekdaysParse,a))||-1!==(o=be.call(this._shortWeekdaysParse,a))||-1!==(o=be.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=be.call(this._shortWeekdaysParse,a))||-1!==(o=be.call(this._weekdaysParse,a))||-1!==(o=be.call(this._minWeekdaysParse,a))?o:null:-1!==(o=be.call(this._minWeekdaysParse,a))||-1!==(o=be.call(this._weekdaysParse,a))||-1!==(o=be.call(this._shortWeekdaysParse,a))?o:null}var qe=ce,Ve=ce,Je=ce;function Ge(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],u=[],c=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),u.push(i),c.push(r),c.push(o),c.push(i);for(a.sort(e),s.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),u[t]=pe(u[t]),c[t]=pe(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Ze(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ke),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Ze("a",!0),Ze("A",!1),P("hour","h"),I("hour",13),de("a",Xe),de("A",Xe),de("H",Q),de("h",Q),de("k",Q),de("HH",Q,G),de("hh",Q,G),de("kk",Q,G),de("hmm",ee),de("hmmss",te),de("Hmm",ee),de("Hmmss",te),me(["H","HH"],3),me(["k","kk"],(function(e,t,n){var r=S(e);t[3]=24===r?0:r})),me(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),me(["h","hh"],(function(e,t,n){t[3]=S(e),m(n).bigHour=!0})),me("hmm",(function(e,t,n){var r=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r)),m(n).bigHour=!0})),me("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r,2)),t[5]=S(e.substr(o)),m(n).bigHour=!0})),me("Hmm",(function(e,t,n){var r=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r))})),me("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=S(e.substr(0,r)),t[4]=S(e.substr(r,2)),t[5]=S(e.substr(o))}));var Qe,et=ke("Hours",!0),tt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:De,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:We,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},nt={},rt={};function ot(e){return e?e.toLowerCase().replace("_","-"):e}function it(t){var r=null;if(!nt[t]&&void 0!==e&&e&&e.exports)try{r=Qe._abbr,n(647)("./"+t),at(r)}catch(e){}return nt[t]}function at(e,t){var n;return e&&((n=u(t)?ut(e):st(e,t))?Qe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qe._abbr}function st(e,t){if(null!==t){var n,r=tt;if(t.abbr=e,null!=nt[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=nt[e]._config;else if(null!=t.parentLocale)if(null!=nt[t.parentLocale])r=nt[t.parentLocale]._config;else{if(null==(n=it(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return nt[e]=new E(O(r,t)),rt[e]&&rt[e].forEach((function(e){st(e.name,e.config)})),at(e),nt[e]}return delete nt[e],null}function ut(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qe;if(!i(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=ot(e[i]).split("-")).length,n=(n=ot(e[i+1]))?n.split("-"):null;t>0;){if(r=it(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(o,n,!0)>=t-1)break;t--}i++}return Qe}(e)}function ct(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Le(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function dt(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,i,a,s,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=lt(t.GG,e._a[0],Ie(xt(),1,4).year),r=lt(t.W,1),((o=lt(t.E,1))<1||o>7)&&(u=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var c=Ie(xt(),i,a);n=lt(t.gg,e._a[0],c.year),r=lt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i}r<1||r>Fe(n,i,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(s=Re(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],r[0]),(e._dayOfYear>ve(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Ne(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ne:Pe).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],yt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,r,o,i,a,s=e._i,u=ft.exec(s)||pt.exec(s);if(u){for(m(e).iso=!0,t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(u[1])){o=mt[t][0],r=!1!==mt[t][2];break}if(null==o)return void(e._isValid=!1);if(u[3]){for(t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[3])){i=(u[2]||" ")+yt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(u[4]){if(!ht.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),wt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var Mt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,r,o,i,a,s,u=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){var c=(t=u[4],n=u[3],r=u[2],o=u[5],i=u[6],a=u[7],s=[bt(t),De.indexOf(n),parseInt(r,10),parseInt(o,10),parseInt(i,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],c,e))return;e._a=c,e._tzm=function(e,t,n){if(e)return Mt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(u[8],u[9],u[10]),e._d=Ne.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function wt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,i,a,s=""+e._i,u=s.length,c=0;for(r=V(e._f,e._locale).match(z)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(fe(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&m(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),c+=n.length),W[i]?(n?m(e).empty=!1:m(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&m(e).unusedTokens.push(i);m(e).charsLeftOver=u-c,s.length>0&&m(e).unusedInput.push(s),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),dt(e),ct(e)}else kt(e);else vt(e)}function St(e){var t=e._i,n=e._f;return e._locale=e._locale||ut(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new M(ct(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],wt(t),y(t)&&(i+=m(t).charsLeftOver,i+=10*m(t).unusedTokens.length,m(t).score=i,(null==r||i<r)&&(r=i,n=t));p(e,n||t)}(e):n?wt(e):function(e){var t=e._i;u(t)?e._d=new Date(o.now()):l(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,kt(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),dt(e)):s(t)?function(e){if(!e._d){var t=H(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),dt(e)}}(e):c(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),y(e)||(e._d=null),e))}function Lt(e,t,n,r,o){var a,u={};return!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=n,u._i=e,u._f=t,u._strict=r,(a=new M(ct(St(u))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function xt(e,t,n,r){return Lt(e,t,n,r,!1)}o.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Tt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Dt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Yt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return xt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function At(e){var t=H(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===be.call(Ct,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Ct.length;++r)if(e[Ct[r]]){if(n)return!1;parseFloat(e[Ct[r]])!==S(e[Ct[r]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=ut(),this._bubble()}function Ot(e){return e instanceof At}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function jt(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}jt("Z",":"),jt("ZZ",""),de("Z",ue),de("ZZ",ue),me(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Nt(ue,e)}));var Pt=/([\+\-]|\d\d)/gi;function Nt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Pt)||["-",0,0],o=60*r[1]+S(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Ht(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||l(e)?e.valueOf():xt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):xt(e).local()}function Rt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function It(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,o,i,s,u,l=e,d=null;return Ot(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(l={},t?l[t]=e:l.milliseconds=e):(d=Ft.exec(e))?(n="-"===d[1]?-1:1,l={y:0,d:S(d[2])*n,h:S(d[3])*n,m:S(d[4])*n,s:S(d[5])*n,ms:S(Et(1e3*d[6]))*n}):(d=zt.exec(e))?(n="-"===d[1]?-1:1,l={y:Bt(d[2],n),M:Bt(d[3],n),w:Bt(d[4],n),d:Bt(d[5],n),h:Bt(d[6],n),m:Bt(d[7],n),s:Bt(d[8],n)}):null==l?l={}:"object"===a(l)&&("from"in l||"to"in l)&&(i=xt(l.from),s=xt(l.to),o=i.isValid()&&s.isValid()?(s=Ht(s,i),i.isBefore(s)?u=Wt(i,s):((u=Wt(s,i)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(l={}).ms=o.milliseconds,l.M=o.months),r=new At(l),Ot(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),qt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,n,r){var i=t._milliseconds,a=Et(t._days),s=Et(t._months);e.isValid()&&(r=null==r||r,s&&Ce(e,we(e,"Month")+s*n),a&&Se(e,"Date",we(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}$t.fn=At.prototype,$t.invalid=function(){return $t(NaN)};var Vt=Ut(1,"add"),Jt=Ut(-1,"subtract");function Gt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Kt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ut(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Zt=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Xt(){return this._locale}function Qt(e,t){return(e%t+t)%t}function en(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function tn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function nn(e,t){U(0,[e,e.length],0,t)}function rn(e,t,n,r,o){var i;return null==e?Ie(this,r,o).year:(t>(i=Fe(e,r,o))&&(t=i),on.call(this,e,t,n,r,o))}function on(e,t,n,r,o){var i=Re(e,t,n,r,o),a=Ne(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),nn("gggg","weekYear"),nn("ggggg","weekYear"),nn("GGGG","isoWeekYear"),nn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),de("G",ae),de("g",ae),de("GG",Q,G),de("gg",Q,G),de("GGGG",re,Z),de("gggg",re,Z),de("GGGGG",oe,X),de("ggggg",oe,X),ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=S(e)})),ye(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),P("quarter","Q"),I("quarter",7),de("Q",J),me("Q",(function(e,t){t[1]=3*(S(e)-1)})),U("D",["DD",2],"Do","date"),P("date","D"),I("date",9),de("D",Q),de("DD",Q,G),de("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),me(["D","DD"],2),me("Do",(function(e,t){t[2]=S(e.match(Q)[0])}));var an=ke("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),I("dayOfYear",4),de("DDD",ne),de("DDDD",K),me(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=S(e)})),U("m",["mm",2],0,"minute"),P("minute","m"),I("minute",14),de("m",Q),de("mm",Q,G),me(["m","mm"],4);var sn=ke("Minutes",!1);U("s",["ss",2],0,"second"),P("second","s"),I("second",15),de("s",Q),de("ss",Q,G),me(["s","ss"],5);var un,cn=ke("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),P("millisecond","ms"),I("millisecond",16),de("S",ne,J),de("SS",ne,G),de("SSS",ne,K),un="SSSS";un.length<=9;un+="S")de(un,ie);function ln(e,t){t[6]=S(1e3*("0."+e))}for(un="S";un.length<=9;un+="S")me(un,ln);var dn=ke("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var fn=M.prototype;function pn(e){return e}fn.add=Vt,fn.calendar=function(e,t){var n=e||xt(),r=Ht(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(A(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,xt(n)))},fn.clone=function(){return new M(this)},fn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":i=Gt(this,r)/12;break;case"month":i=Gt(this,r);break;case"quarter":i=Gt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:w(i)},fn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?tn:en;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Qt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Qt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||xt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(xt(),e)},fn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||xt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(xt(),e)},fn.get=function(e){return A(this[e=N(e)])?this[e]():this},fn.invalidAt=function(){return m(this).overflow},fn.isAfter=function(e,t){var n=k(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=k(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){var o=k(e)?e:xt(e),i=k(t)?t:xt(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},fn.isSame=function(e,t){var n,r=k(e)?e:xt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return y(this)},fn.lang=Zt,fn.locale=Kt,fn.localeData=Xt,fn.max=Dt,fn.min=Tt,fn.parsingFlags=function(){return p({},m(this))},fn.set=function(e,t){if("object"===a(e))for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:R[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=H(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(A(this[e=N(e)]))return this[e](t);return this},fn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?tn:en;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Qt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Qt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.subtract=Jt,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Me,fn.isLeapYear=function(){return ge(this.year())},fn.weekYear=function(e){return rn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return rn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Ae,fn.daysInMonth=function(){return Le(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},fn.date=an,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=et,fn.minute=fn.minutes=sn,fn.second=fn.seconds=cn,fn.millisecond=fn.milliseconds=dn,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(ue,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Rt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?qt(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Rt(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Rt(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=It,fn.isUTC=It,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=T("dates accessor is deprecated. Use date instead.",an),fn.months=T("months accessor is deprecated. Use month instead",Ae),fn.years=T("years accessor is deprecated. Use year instead",Me),fn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=St(e))._a){var t=e._isUTC?h(e._a):xt(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hn=E.prototype;function mn(e,t,n,r){var o=ut(),i=h().set(r,t);return o[n](i,e)}function yn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return mn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=mn(e,r,n,"month");return o}function _n(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var o,i=ut(),a=e?i._week.dow:0;if(null!=n)return mn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=mn(t,(o+a)%7,r,"day");return s}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return A(r)?r.call(t,n):r},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=pn,hn.postformat=pn,hn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return A(o)?o(e,t,n,r):o.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)A(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ye.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},hn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(n,this._week.dow):e?n[e.day()]:n},hn.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ue.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ve),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=T("moment.lang is deprecated. Use moment.locale instead.",at),o.langData=T("moment.langData is deprecated. Use moment.localeData instead.",ut);var vn=Math.abs;function gn(e,t,n,r){var o=$t(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function Mn(e){return 4800*e/146097}function kn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Sn=wn("ms"),Ln=wn("s"),xn=wn("m"),Tn=wn("h"),Dn=wn("d"),Yn=wn("w"),Cn=wn("M"),An=wn("Q"),On=wn("y");function En(e){return function(){return this.isValid()?this._data[e]:NaN}}var jn=En("milliseconds"),Pn=En("seconds"),Nn=En("minutes"),Hn=En("hours"),Rn=En("days"),In=En("months"),Fn=En("years"),zn=Math.round,$n={ss:44,s:45,m:45,h:22,d:26,M:11};function Bn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Wn=Math.abs;function Un(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),o=Wn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(o/12),a=o%=12,s=r,u=t,c=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Un(this._months)!==Un(d)?"-":"",h=Un(this._days)!==Un(d)?"-":"",m=Un(this._milliseconds)!==Un(d)?"-":"";return f+"P"+(i?p+i+"Y":"")+(a?p+a+"M":"")+(s?h+s+"D":"")+(u||c||l?"T":"")+(u?m+u+"H":"")+(c?m+c+"M":"")+(l?m+l+"S":"")}var Vn=At.prototype;return Vn.isValid=function(){return this._isValid},Vn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},Vn.add=function(e,t){return gn(this,e,t,1)},Vn.subtract=function(e,t){return gn(this,e,t,-1)},Vn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Mn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(kn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Vn.asMilliseconds=Sn,Vn.asSeconds=Ln,Vn.asMinutes=xn,Vn.asHours=Tn,Vn.asDays=Dn,Vn.asWeeks=Yn,Vn.asMonths=Cn,Vn.asQuarters=An,Vn.asYears=On,Vn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},Vn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,u=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*bn(kn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=w(i/1e3),u.seconds=e%60,t=w(e/60),u.minutes=t%60,n=w(t/60),u.hours=n%24,a+=w(n/24),s+=o=w(Mn(a)),a-=bn(kn(o)),r=w(s/12),s%=12,u.days=a,u.months=s,u.years=r,this},Vn.clone=function(){return $t(this)},Vn.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},Vn.milliseconds=jn,Vn.seconds=Pn,Vn.minutes=Nn,Vn.hours=Hn,Vn.days=Rn,Vn.weeks=function(){return w(this.days()/7)},Vn.months=In,Vn.years=Fn,Vn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),o=zn(r.as("s")),i=zn(r.as("m")),a=zn(r.as("h")),s=zn(r.as("d")),u=zn(r.as("M")),c=zn(r.as("y")),l=o<=$n.ss&&["s",o]||o<$n.s&&["ss",o]||i<=1&&["m"]||i<$n.m&&["mm",i]||a<=1&&["h"]||a<$n.h&&["hh",a]||s<=1&&["d"]||s<$n.d&&["dd",s]||u<=1&&["M"]||u<$n.M&&["MM",u]||c<=1&&["y"]||["yy",c];return l[2]=t,l[3]=+e>0,l[4]=n,Bn.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Vn.toISOString=qn,Vn.toString=qn,Vn.toJSON=qn,Vn.locale=Kt,Vn.localeData=Xt,Vn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Vn.lang=Zt,U("X",0,0,"unix"),U("x",0,0,"valueOf"),de("x",ae),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),me("x",(function(e,t,n){n._d=new Date(S(e))})),o.version="2.24.0",t=xt,o.fn=fn,o.min=function(){var e=[].slice.call(arguments,0);return Yt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Yt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=h,o.unix=function(e){return xt(1e3*e)},o.months=function(e,t){return yn(e,t,"months")},o.isDate=l,o.locale=at,o.invalid=_,o.duration=$t,o.isMoment=k,o.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},o.parseZone=function(){return xt.apply(null,arguments).parseZone()},o.localeData=ut,o.isDuration=Ot,o.monthsShort=function(e,t){return yn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var n,r,o=tt;null!=(r=it(e))&&(o=r._config),(n=new E(t=O(o,t))).parentLocale=nt[e],nt[e]=n,at(e)}else null!=nt[e]&&(null!=nt[e].parentLocale?nt[e]=nt[e].parentLocale:null!=nt[e]&&delete nt[e]);return nt[e]},o.locales=function(){return D(nt)},o.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},o.normalizeUnits=N,o.relativeTimeRounding=function(e){return void 0===e?zn:"function"==typeof e&&(zn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==$n[e]&&(void 0===t?$n[e]:($n[e]=t,"s"===e&&($n.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=fn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o},"object"===a(t)&&void 0!==e?e.exports=i():void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o)}).call(this,n(203)(e))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=Object.prototype.hasOwnProperty;function i(e,t){return o.call(e,t)}function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var u=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(u.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,d=n(415);var f=/[&<>"]/,p=/[&<>"]/g,h={"&":"&","<":"<",">":">",'"':"""};function m(e){return h[e]}var y=/[.?*+^$[\]\\(){}|-]/g;var _=n(243);t.lib={},t.lib.mdurl=n(416),t.lib.ucmicro=n(682),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==r(t))throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(u,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(c,(function(e,t,n){return t||function(e,t){var n=0;return i(d,t)?d[t]:35===t.charCodeAt(0)&&l.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(n):e}(e,n)}))},t.isValidEntityCode=a,t.fromCodePoint=s,t.escapeHtml=function(e){return f.test(e)?e.replace(p,m):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return _.test(e)},t.escapeRE=function(e){return e.replace(y,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.TextSelection=t.SelectionRange=t.Selection=t.PluginKey=t.Plugin=t.NodeSelection=t.EditorState=t.AllSelection=void 0;var r=n(205),o=n(207);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=Object.create(null),s=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t};t.Selection=s;var u={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};u.anchor.get=function(){return this.$anchor.pos},u.head.get=function(){return this.$head.pos},u.from.get=function(){return this.$from.pos},u.to.get=function(){return this.$to.pos},u.$from.get=function(){return this.ranges[0].$from},u.$to.get=function(){return this.ranges[0].$to},u.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},s.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},s.prototype.replace=function(e,t){void 0===t&&(t=r.Slice.empty);for(var n=t.content.lastChild,o=null,i=0;i<t.openEnd;i++)o=n,n=n.lastChild;for(var a=e.steps.length,s=this.ranges,u=0;u<s.length;u++){var c=s[u],l=c.$from,d=c.$to,f=e.mapping.slice(a);e.replaceRange(f.map(l.pos),f.map(d.pos),u?r.Slice.empty:t),0==u&&_(e,a,(n?n.isInline:o&&o.isTextblock)?-1:1)}},s.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,u=e.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);o?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),_(e,n,t.isInline?-1:1))}},s.findFrom=function(e,t,n){var r=e.parent.inlineContent?new l(e):y(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?y(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):y(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},s.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))},s.atStart=function(e){return y(e,e,0,0,1)||new h(e)},s.atEnd=function(e){return y(e,e,e.content.size,e.childCount,-1)||new h(e)},s.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=a[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},s.jsonID=function(e,t){if(e in a)throw new RangeError("Duplicate use of selection JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t},s.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(s.prototype,u),s.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t};t.SelectionRange=c;var l=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new d(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0)&&(n=r),new t(n,r)},Object.defineProperties(t.prototype,n),t}(s);t.TextSelection=l,s.jsonID("text",l);var d=function(e,t){this.anchor=e,this.head=t};d.prototype.map=function(e){return new d(e.map(this.anchor),e.map(this.head))},d.prototype.resolve=function(e){return l.between(e.resolve(this.anchor),e.resolve(this.head))};var f=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos,s=n.resolve(a);return i?e.near(s):new t(s)},t.prototype.content=function(){return new r.Slice(r.Fragment.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new p(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(s);t.NodeSelection=f,f.prototype.visible=!1,s.jsonID("node",f);var p=function(e){this.anchor=e};p.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new d(r,r):new p(r)},p.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&f.isSelectable(n)?new f(t):s.near(t)};var h=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),n==r.Slice.empty){t.delete(0,t.doc.content.size);var o=e.atStart(t.doc);o.eq(t.selection)||t.setSelection(o)}else e.prototype.replace.call(this,t,n)},t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return m},t}(s);t.AllSelection=h,s.jsonID("all",h);var m={map:function(){return this},resolve:function(e){return new h(e)}};function y(e,t,n,r,o,i){if(t.inlineContent)return l.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&f.isSelectable(s))return f.create(e,n-(o<0?s.nodeSize:0))}else{var u=y(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}}function _(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,a=e.steps[r];if(a instanceof o.ReplaceStep||a instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n))}}var v=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function g(e,t){return t&&e?e.bind(t):e}t.Transaction=v;var b=function(e,t,n){this.name=e,this.init=g(t.init,n),this.apply=g(t.apply,n)},M=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||s.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],k=function(e,t){var n=this;this.schema=e,this.fields=M.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},w=function(e){this.config=e};t.EditorState=w;var S={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};S.schema.get=function(){return this.config.schema},S.plugins.get=function(){return this.config.plugins},w.prototype.apply=function(e){return this.applyTransaction(e).state},w.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},w.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,u=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,u,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},w.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new w(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<L.length;i++)L[i](this,e,t);return t},S.tr.get=function(){return new v(this)},w.create=function(e){for(var t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new w(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},w.prototype.reconfigure=function(e){for(var t=new k(this.schema,e.plugins),n=t.fields,r=new w(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},w.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==i(e))for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},w.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var o=new k(e.schema,e.plugins),i=new w(o);return o.fields.forEach((function(o){if("doc"==o.name)i.doc=r.Node.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var a in n){var u=n[a],c=u.spec.state;if(u.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(i[o.name]=c.fromJSON.call(u,e,t[a],i))}i[o.name]=o.init(e,i)}})),i},w.addApplyListener=function(e){L.push(e)},w.removeApplyListener=function(e){var t=L.indexOf(e);t>-1&&L.splice(t,1)},Object.defineProperties(w.prototype,S);var L=[];var x=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:D("plugin")};t.Plugin=x,x.prototype.getState=function(e){return e[this.key]};var T=Object.create(null);function D(e){return e in T?e+"$"+ ++T[e]:(T[e]=0,e+"$")}var Y=function(e){void 0===e&&(e="key"),this.key=D(e)};t.PluginKey=Y,Y.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Y.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceError=f,t.Slice=t.Schema=t.ResolvedPos=t.NodeType=t.NodeRange=t.Node=t.MarkType=t.Mark=t.Fragment=t.DOMSerializer=t.DOMParser=t.ContentMatch=void 0;var r,o=(r=n(651))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize};t.Fragment=a;var s={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};a.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,a=0;a<t;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&!1!==n(s,r+a,o,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=u}},a.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},a.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},a.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new a(r,this.size+e.size)},a.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,i=0;i<t;o++){var s=this.content[o],u=i+s.nodeSize;u>e&&((i<e||u>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=u}return new a(n,r)},a.prototype.cutByIndex=function(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))},a.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,o)},a.prototype.addToStart=function(e){return new a([e].concat(this.content),this.size+e.nodeSize)},a.prototype.addToEnd=function(e){return new a(this.content.concat(e),this.size+e.nodeSize)},a.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},s.firstChild.get=function(){return this.content.length?this.content[0]:null},s.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},s.childCount.get=function(){return this.content.length},a.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},a.prototype.maybeChild=function(e){return this.content[e]},a.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},a.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),a=n.child(o);if(i!=a){if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)r++;return r}if(i.content.size||a.content.size){var u=e(i.content,a.content,r+1);if(null!=u)return u}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},a.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,a=n.childCount;;){if(0==i||0==a)return i==a?null:{a:r,b:o};var s=t.child(--i),u=n.child(--a),c=s.nodeSize;if(s!=u){if(!s.sameMarkup(u))return{a:r,b:o};if(s.isText&&s.text!=u.text){for(var l=0,d=Math.min(s.text.length,u.text.length);l<d&&s.text[s.text.length-l-1]==u.text[u.text.length-l-1];)l++,r--,o--;return{a:r,b:o}}if(s.content.size||u.content.size){var f=e(s.content,u.content,r-1,o-1);if(f)return f}r-=c,o-=c}else r-=c,o-=c}}(this,e,t,n)},a.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}},a.prototype.toString=function(){return"<"+this.toStringInner()+">"},a.prototype.toStringInner=function(){return this.content.join(", ")},a.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},a.fromJSON=function(e,t){if(!t)return a.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))},a.fromArray=function(e){if(!e.length)return a.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new a(t||e,n)},a.from=function(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(a.prototype,s);var u={index:0,offset:0};function c(e,t){return u.index=e,u.offset=t,u}function l(e,t){if(e===t)return!0;if(!e||"object"!=i(e)||!t||"object"!=i(t))return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!l(e[o],t[o]))return!1;for(var a in t)if(!(a in e))return!1}return!0}a.empty=new a([],0);var d=function(e,t){this.type=e,this.attrs=t};function f(e){var t=Error.call(this,e);return t.__proto__=f.prototype,t}t.Mark=d,d.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},d.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},d.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},d.prototype.eq=function(e){return this==e||this.type==e.type&&l(this.attrs,e.attrs)},d.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},d.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},d.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},d.setFrom=function(e){if(!e||0==e.length)return d.none;if(e instanceof d)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},d.none=[],f.prototype=Object.create(Error.prototype),f.prototype.constructor=f,f.prototype.name="ReplaceError";var p=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n};t.Slice=p;var h={size:{configurable:!0}};function m(e,t,n){if(n.openStart>e.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return function e(t,n,r,o){var i=t.index(o),s=t.node(o);if(i==n.index(o)&&o<t.depth-r.openStart){var u=e(t,n,r,o+1);return s.copy(s.content.replaceChild(i,u))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var c=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),l=c.start,d=c.end;return b(s,function e(t,n,r,o,i){var s=t.depth>i&&_(t,n,i+1),u=o.depth>i&&_(r,o,i+1),c=[];g(null,t,i,c),s&&u&&n.index(i)==r.index(i)?(y(s,u),v(b(s,e(t,n,r,o,i+1)),c)):(s&&v(b(s,M(t,n,i+1)),c),g(n,r,i,c),u&&v(b(u,M(r,o,i+1)),c));return g(o,null,i,c),new a(c)}(t,l,d,n,o))}var f=t.parent,p=f.content;return b(f,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return b(s,M(t,n,o))}(e,t,n,0)}function y(e,t){if(!t.type.compatibleContent(e.type))throw new f("Cannot join "+t.type.name+" onto "+e.type.name)}function _(e,t,n){var r=e.node(n);return y(r,t.node(n)),r}function v(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function g(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(v(e.nodeAfter,r),i++));for(var s=i;s<a;s++)v(o.child(s),r);t&&t.depth==n&&t.textOffset&&v(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new f("Invalid content for node "+e.type.name);return e.copy(t)}function M(e,t,n){var r=[];(g(null,e,n,r),e.depth>n)&&v(b(_(e,t,n+1),M(e,t,n+1)),r);return g(t,null,n,r),new a(r)}h.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,u=t.maybeChild(a);if(s==n||u.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var c=e(u.content,n-s-1,r);return c&&t.replaceChild(a,u.copy(c))}(this.content,e+this.openStart,t,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(e,t){return new p(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),u=t.findIndex(r),c=u.index,l=u.offset;if(a==n||s.isText){if(l!=r&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},p.fromJSON=function(e,t){if(!t)return p.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(a.fromJSON(e,t.content),n,r)},p.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new p(e,n,r)},Object.defineProperties(p.prototype,h),p.empty=new p(a.empty,0,0);var k=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n};t.ResolvedPos=k;var w={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};k.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},w.parent.get=function(){return this.node(this.depth)},w.doc.get=function(){return this.node(0)},k.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},k.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},k.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},k.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},k.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},k.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},k.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},w.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},w.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},w.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},k.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r},k.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return d.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i},k.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},k.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},k.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new T(this,e,n)},k.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},k.prototype.max=function(e){return e.pos>this.pos?e:this},k.prototype.min=function(e){return e.pos<this.pos?e:this},k.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},k.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,u=a.offset,c=o-u;if(n.push(i,s,r+u),!c)break;if((i=i.child(s)).isText)break;o=c-1,r+=u+1}return new k(t,n,o)},k.resolveCached=function(e,t){for(var n=0;n<S.length;n++){var r=S[n];if(r.pos==t&&r.doc==e)return r}var o=S[L]=k.resolve(e,t);return L=(L+1)%x,o},Object.defineProperties(k.prototype,w);var S=[],L=0,x=12,T=function(e,t,n){this.$from=e,this.$to=t,this.depth=n};t.NodeRange=T;var D={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};D.start.get=function(){return this.$from.before(this.depth+1)},D.end.get=function(){return this.$to.after(this.depth+1)},D.parent.get=function(){return this.$from.node(this.depth)},D.startIndex.get=function(){return this.$from.index(this.depth)},D.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(T.prototype,D);var Y=Object.create(null),C=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||a.empty,this.marks=r||d.none};t.Node=C;var A={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};A.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},A.childCount.get=function(){return this.content.childCount},C.prototype.child=function(e){return this.content.child(e)},C.prototype.maybeChild=function(e){return this.content.maybeChild(e)},C.prototype.forEach=function(e){this.content.forEach(e)},C.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},C.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},A.textContent.get=function(){return this.textBetween(0,this.content.size,"")},C.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},A.firstChild.get=function(){return this.content.firstChild},A.lastChild.get=function(){return this.content.lastChild},C.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},C.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},C.prototype.hasMarkup=function(e,t,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||Y)&&d.sameSet(this.marks,n||d.none)},C.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},C.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},C.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},C.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return p.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new p(s,r.depth-i,o.depth-i)},C.prototype.replace=function(e,t,n){return m(this.resolve(e),this.resolve(t),n)},C.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},C.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},C.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},C.prototype.resolve=function(e){return k.resolveCached(this,e)},C.prototype.resolveNoCache=function(e){return k.resolve(this,e)},C.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},A.isBlock.get=function(){return this.type.isBlock},A.isTextblock.get=function(){return this.type.isTextblock},A.inlineContent.get=function(){return this.type.inlineContent},A.isInline.get=function(){return this.type.isInline},A.isText.get=function(){return this.type.isText},A.isLeaf.get=function(){return this.type.isLeaf},A.isAtom.get=function(){return this.type.isAtom},C.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(this.marks,e)},C.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},C.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=a.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var u=r;u<o;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0},C.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},C.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},C.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var e=d.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!d.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map((function(e){return e.type.name})));this.content.forEach((function(e){return e.check()}))},C.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e},C.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=a.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(C.prototype,A);var O=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(C);function E(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var j=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]};t.ContentMatch=j;var P={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};j.parse=function(e,t){var n=new N(e,t);if(null==n.next)return j.empty;var r=R(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];W(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new j(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort(B);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(W(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(e(n,i))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=e(t.exprs[a],i);if(a==t.exprs.length-1)return s;o(s,i=n())}else{if("star"==t.type){var u=n();return r(i,u),o(e(t.expr,u),u),[r(u)]}if("plus"==t.type){var c=n();return o(e(t.expr,i),c),o(e(t.expr,c),c),[r(c)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var l=i,d=0;d<t.min;d++){var f=n();o(e(t.expr,l),f),l=f}if(-1==t.max)o(e(t.expr,l),l);else for(var p=t.min;p<t.max;p++){var h=n();r(l,h),o(e(t.expr,l),h),l=h}return[r(l)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s+=2){var u=o.next[s],c=o.next[s+1];a.push(u.name),!i||u.isText||u.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},j.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},j.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},P.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},P.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},j.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},j.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(i,s){var u=i.matchFragment(e,n);if(u&&(!t||u.validEnd))return a.from(s.map((function(e){return e.createAndFill()})));for(var c=0;c<i.next.length;c+=2){var l=i.next[c],d=i.next[c+1];if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var f=o(d,s.concat(l));if(f)return f}}}(this,[])},j.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},j.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s+=2){var u=o.next[s];u.isLeaf||u.hasRequiredAttrs()||u.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:u.contentMatch,type:u,via:r}),t[u.name]=!0)}}},P.edgeCount.get=function(){return this.next.length>>1},j.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},j.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(j.prototype,P),j.empty=new j(!0);var N=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},H={next:{configurable:!0}};function R(e){var t=[];do{t.push(I(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function I(e){var t=[];do{t.push(F(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function F(e){for(var t=function(e){if(e.eat("(")){var t=R(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=$(e,t)}return t}function z(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function $(e,t){var n=z(e),r=n;return e.eat(",")&&(r="}"!=e.next?z(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function B(e,t){return t-e}function W(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,u=a.to;s||-1!=n.indexOf(u)||t(u)}}(t),n.sort(B)}function U(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function q(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function V(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new K(e[n]);return t}H.next.get=function(){return this.tokens[this.pos]},N.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},N.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(N.prototype,H);var J=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=V(n.attrs),this.defaultAttrs=U(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e};t.NodeType=J;var G={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==j.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},J.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},J.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},J.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:q(this.attrs,e)},J.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new C(this,this.computeAttrs(e),a.from(t),d.setFrom(n))},J.prototype.createChecked=function(e,t,n){if(t=a.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new C(this,this.computeAttrs(e),t,d.setFrom(n))},J.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=a.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(a.empty,!0);return o?new C(this,e,t.append(o),d.setFrom(n)):null},J.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},J.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},J.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},J.prototype.allowedMarks=function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:d.empty:e},J.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new J(e,t,r)}));var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(J.prototype,G);var K=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},Z={isRequired:{configurable:!0}};Z.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(K.prototype,Z);var X=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=V(r.attrs),this.rank=t,this.excluded=null;var o=U(this.attrs);this.instance=o&&new d(this,o)};t.MarkType=X,X.prototype.create=function(e){return!e&&this.instance?this.instance:new d(this,q(this.attrs,e))},X.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new X(e,r++,t,o)})),n},X.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e},X.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},X.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var Q=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.default.from(e.nodes),this.spec.marks=o.default.from(e.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=j.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?ee(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var u in this.marks){var c=this.marks[u],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:ee(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function ee(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var u=e.marks[s];("_"==o||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}t.Schema=Q,Q.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof J))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Q.prototype.text=function(e,t){var n=this.nodes.text;return new O(n,n.defaultAttrs,e,d.setFrom(t))},Q.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Q.prototype.nodeFromJSON=function(e){return C.fromJSON(this,e)},Q.prototype.markFromJSON=function(e){return d.fromJSON(this,e)},Q.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var te=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};t.DOMParser=te,te.prototype.parse=function(e,t){void 0===t&&(t={});var n=new se(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},te.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new se(this,t,!0);return n.addAll(e,null,t.from,t.to),p.maxOpen(n.finish())},te.prototype.matchTag=function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(ce(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},te.prototype.matchStyle=function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(e)||i.context&&!n.matchesContext(i.context)||i.style.length>e.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var a=i.getAttrs(t);if(!1===a)continue;i.attrs=a}return i}}},te.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=le(e)),e.mark=t}))};for(var o in e.marks)r(o);var i;for(var a in e.nodes)i=void 0,(i=e.nodes[a].spec.parseDOM)&&i.forEach((function(e){n(e=le(e)),e.node=a}));return t},te.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new te(e,te.schemaRules(e)))};var ne={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},re={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},oe={ol:!0,ul:!0};function ie(e){return(e?1:0)|("full"===e?2:0)}var ae=function(e,t,n,r,o,i,a){this.type=e,this.attrs=t,this.solid=o,this.match=i||(4&a?null:e.contentMatch),this.options=a,this.content=[],this.marks=n,this.activeMarks=d.none,this.pendingMarks=r,this.stashMarks=[]};ae.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(a.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ae.prototype.finish=function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length)))}var r=a.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ae.prototype.popFromStashMark=function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},ae.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):de(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}},ae.prototype.inlineContext=function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ne.hasOwnProperty(e.parentNode.nodeName.toLowerCase())};var se=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=ie(t.preserveWhitespace)|(n?4:0);r=o?new ae(o.type,o.attrs,d.none,d.none,!0,t.topMatch||o.type.contentMatch,i):new ae(n?null:e.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},ue={top:{configurable:!0},currentPos:{configurable:!0}};function ce(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function le(e){var t={};for(var n in e)t[n]=e[n];return t}function de(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}ue.top.get=function(){return this.nodes[this.open]},se.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}},se.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},se.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();oe.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&oe.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:re.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(ne.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:null)},se.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},se.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},se.prototype.readStyles=function(e){var t=d.none;e:for(var n=0;n<e.length;n+=2)for(var r=null;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t},se.prototype.addElementByRule=function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var u=t.contentElement;"string"==typeof u?u=e.querySelector(u):"function"==typeof u&&(u=u(e)),u||(u=e),this.findAround(e,u,!0),this.addAll(u,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},se.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,a=null==r?null:e.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&ne.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},se.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0},se.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1},se.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},se.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e,t);var i=null==r?-5&o.options:ie(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ae(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},se.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},se.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},se.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},ue.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},se.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},se.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},se.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},se.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},se.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)},se.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},se.prototype.addPendingMark=function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},se.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(se.prototype,ue);var fe=function(e,t){this.nodes=e||{},this.marks=t||{}};function pe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function he(e){return e.document||window.document}t.DOMSerializer=fe,fe.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=he(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n<i.length&&a<e.marks.length;){var s=e.marks[a];if(r.marks[s.type.name]){if(!s.eq(i[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<i.length;)o=i.pop(),i.pop();for(;a<e.marks.length;){var u=e.marks[a++],c=r.serializeMark(u,e.isInline,t);c&&(i.push(u,o),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(r.serializeNodeInner(e,t))})),n},fe.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=fe.renderSpec(he(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},fe.prototype.serializeNode=function(e,t){void 0===t&&(t={});for(var n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},fe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&fe.renderSpec(he(n),r(e,t))},fe.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var a=null,s=n?e.createElementNS(n,r):e.createElement(r),u=t[1],c=1;if(u&&"object"==i(u)&&null==u.nodeType&&!Array.isArray(u))for(var l in c=2,u)if(null!=u[l]){var d=l.indexOf(" ");d>0?s.setAttributeNS(l.slice(0,d),l.slice(d+1),u[l]):s.setAttribute(l,u[l])}for(var f=c;f<t.length;f++){var p=t[f];if(0===p){if(f<t.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=fe.renderSpec(e,p,n),m=h.dom,y=h.contentDOM;if(s.appendChild(m),y){if(a)throw new RangeError("Multiple content holes");a=y}}return{dom:s,contentDOM:a}},fe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new fe(this.nodesFromSchema(e),this.marksFromSchema(e)))},fe.nodesFromSchema=function(e){var t=pe(e.nodes);return t.text||(t.text=function(e){return e.text}),t},fe.marksFromSchema=function(e){return pe(e.marks)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NodeSelection",{enumerable:!0,get:function(){return o.NodeSelection}}),Object.defineProperty(t,"Plugin",{enumerable:!0,get:function(){return o.Plugin}}),Object.defineProperty(t,"PluginKey",{enumerable:!0,get:function(){return o.PluginKey}}),Object.defineProperty(t,"TextSelection",{enumerable:!0,get:function(){return o.TextSelection}}),t.Text=t.Paragraph=t.Node=t.Mark=t.Extension=t.EditorMenuBubble=t.EditorMenuBar=t.EditorFloatingMenu=t.EditorContent=t.Editor=t.Doc=void 0;var r,o=n(204),i=n(213),a=n(205),s=n(653),u=n(654),c=n(239),l=n(412),d=n(240),f=n(220),p=(r=n(19))&&r.__esModule?r:{default:r},h=n(221);function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function A(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"")}var O=function(){function e(t,n){var r=n.editor,o=n.extension,i=n.parent,a=n.node,s=n.view,u=n.decorations,c=n.getPos;D(this,e),this.component=t,this.editor=r,this.extension=o,this.parent=i,this.node=a,this.view=s,this.decorations=u,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:c,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return C(e,[{key:"createDOM",value:function(){var e=this,t=p.default.extend(this.component),n={editor:this.editor,node:this.node,view:this.view,getPos:function(){return e.getPos()},decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:function(t){return e.updateAttrs(t)}};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"==typeof this.extension.update&&(this.update=this.extension.update),this.vm=new t({parent:this.parent,propsData:n}).$mount(),this.vm.$el}},{key:"update",value:function(e,t){return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.updateComponentProps({node:e,decorations:t})),!0)}},{key:"updateComponentProps",value:function(e){var t=this;if(this.vm._props){var n=p.default.config.silent;p.default.config.silent=!0,Object.entries(e).forEach((function(e){var n=L(e,2),r=n[0],o=n[1];t.vm._props[r]=o})),p.default.config.silent=n}}},{key:"updateAttrs",value:function(e){if(this.view.editable){var t=this.view.state,n=this.node.type,r=this.getPos(),o=w(w({},this.node.attrs),e),i=this.isMark?t.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(o)):t.tr.setNodeMarkup(r,null,o);this.view.dispatch(i)}}},{key:"ignoreMutation",value:function(e){return"selection"!==e.type&&(!this.contentDOM||!this.contentDOM.contains(e.target))}},{key:"stopEvent",value:function(e){var t=this;if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);var n=!!this.extension.schema.draggable;if(n&&"mousedown"===e.type){var r=e.target.closest&&e.target.closest("[data-drag-handle]");r&&(this.dom===r||this.dom.contains(r))&&(this.captureEvents=!1,document.addEventListener("dragend",(function(){t.captureEvents=!0}),{once:!0}))}var o="copy"===e.type,i="paste"===e.type,a="cut"===e.type,s=e.type.startsWith("drag")||"drop"===e.type;return!(n&&s||o||i||a)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){var e=this.view.posAtDOM(this.dom),t=this.view.state.doc.resolve(e);return(0,f.getMarkRange)(t,this.node.type)}},{key:"destroy",value:function(){this.vm.$destroy()}}]),e}(),E=function(){function e(){D(this,e)}return C(e,[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._callbacks=this._callbacks||{};var i=this._callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){if(arguments.length){var n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter((function(e){return e!==t})):delete this._callbacks[e])}else this._callbacks={};return this}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e),this.options=w(w({},this.defaultOptions),t)}return C(e,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.editor=e}},{key:"name",get:function(){return null}},{key:"type",get:function(){return"extension"}},{key:"defaultOptions",get:function(){return{}}},{key:"plugins",get:function(){return[]}},{key:"inputRules",value:function(){return[]}},{key:"pasteRules",value:function(){return[]}},{key:"keys",value:function(){return{}}}]),e}();t.Extension=j;var P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;D(this,e),t.forEach((function(e){e.bindEditor(n),e.init()})),this.extensions=t}return C(e,[{key:"nodes",get:function(){return this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return w(w({},e),{},S({},n,r))}),{})}},{key:"options",get:function(){var e=this.view;return this.extensions.reduce((function(t,n){return w(w({},t),{},S({},n.name,new Proxy(n.options,{set:function(t,n,r){var o=t[n]!==r;return Object.assign(t,S({},n,r)),o&&e.updateState(e.state),!0}})))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return w(w({},e),{},S({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(e){return e.plugins})).reduce((function(e,t){var n=t.plugins;return[].concat(M(e),M(n))}),[])}},{key:"keymaps",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(M(n),M(r)).map((function(e){return(0,c.keymap)(e)}))}},{key:"inputRules",value:function(e){var t=e.schema,n=e.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(e){return!n.includes(e.name)})):this.extensions,o=r.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({schema:t})})),i=r.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(M(o),M(i)).reduce((function(e,t){return[].concat(M(e),M(t))}),[])}},{key:"pasteRules",value:function(e){var t=e.schema,n=e.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(e){return!n.includes(e.name)})):this.extensions,o=r.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.pasteRules})).map((function(e){return e.pasteRules({schema:t})})),i=r.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.pasteRules})).map((function(e){return e.pasteRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(M(o),M(i)).reduce((function(e,t){return[].concat(M(e),M(t))}),[])}},{key:"commands",value:function(e){var t=e.schema,n=e.view;return this.extensions.filter((function(e){return e.commands})).reduce((function(e,r){var o=r.name,i=r.type,a={},s=r.commands(w({schema:t},["node","mark"].includes(i)?{type:t["".concat(i,"s")][o]}:{})),u=function(e,t){return!!n.editable&&(n.focus(),e(t)(n.state,n.dispatch,n))},c=function(e,t){Array.isArray(t)?a[e]=function(e){return t.forEach((function(t){return u(t,e)}))}:"function"==typeof t&&(a[e]=function(e){return u(t,e)})};return"object"===b(s)?Object.entries(s).forEach((function(e){var t=L(e,2),n=t[0],r=t[1];c(n,r)})):c(o,s),w(w({},e),a)}),{})}}]),e}();function N(e){var t=document.createElement("style");t.type="text/css",t.textContent=e;var n=document.head,r=n.firstChild;r?n.insertBefore(t,r):n.appendChild(t)}var H=function(e){m(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,n),t.call(this,e)}return C(n,[{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return function(){}}}]),n}(j);function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(parseInt(e,10),t),n)}t.Mark=H;var I=function(e){m(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,n),t.call(this,e)}return C(n,[{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return function(){}}}]),n}(j);t.Node=I;var F=function(e){m(n,e);var t=_(n);function n(){return D(this,n),t.apply(this,arguments)}return C(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(I);t.Doc=F;var z=function(e){m(n,e);var t=_(n);function n(){return D(this,n),t.apply(this,arguments)}return C(n,[{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,h.setBlockType)(t)}}}]),n}(I);t.Paragraph=z;var $=function(e){m(n,e);var t=_(n);function n(){return D(this,n),t.apply(this,arguments)}return C(n,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(I);t.Text=$;var B='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n',W=function(e){m(n,e);var t=_(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,n),(e=t.call(this)).defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},enableDropCursor:!0,enableGapCursor:!0,parseOptions:{},injectCSS:!0,onInit:function(){},onTransaction:function(){},onUpdate:function(){},onFocus:function(){},onBlur:function(){},onPaste:function(){},onDrop:function(){}},e.events=["init","transaction","update","focus","blur","paste","drop"],e.init(r),e}return C(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions(w(w({},this.defaultOptions),t)),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&N(B),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((function(t){e.on(t,e.options[A("on ".concat(t))]||function(){})})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(e){this.options=w(w({},this.options),e),this.view&&this.state&&this.view.updateState(this.state)}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new F,new $,new z]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"createExtensions",value:function(){return new P([].concat(M(this.builtInExtensions),M(this.options.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}},{key:"createPasteRules",value:function(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new a.Schema({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}},{key:"createState",value:function(){var e=this;return o.EditorState.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[].concat(M(this.plugins),[(0,d.inputRules)({rules:this.inputRules})],M(this.pasteRules),M(this.keymaps),[(0,c.keymap)({Backspace:d.undoInputRule}),(0,c.keymap)(l.baseKeymap)],M(this.options.enableDropCursor?[(0,s.dropCursor)(this.options.dropCursor)]:[]),M(this.options.enableGapCursor?[(0,u.gapCursor)()]:[]),[new o.Plugin({key:new o.PluginKey("editable"),props:{editable:function(){return e.options.editable}}}),new o.Plugin({props:{attributes:{tabindex:0},handleDOMEvents:{focus:function(t,n){e.focused=!0,e.emit("focus",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!0);e.view.dispatch(r)},blur:function(t,n){e.focused=!1,e.emit("blur",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!1);e.view.dispatch(r)}}}}),new o.Plugin({props:this.options.editorProps})])})}},{key:"createDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.parseOptions;if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===b(e))try{return this.schema.nodeFromJSON(e)}catch(t){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",t),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof e){var n="<div>".concat(e,"</div>"),r=new window.DOMParser,o=r.parseFromString(n,"text/html").body.firstElementChild;return a.DOMParser.fromSchema(this.schema).parse(o,t)}return!1}},{key:"createView",value:function(){var e=this;return new i.EditorView(this.element,{state:this.createState(),handlePaste:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.emit.apply(e,["paste"].concat(n))},handleDrop:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.emit.apply(e,["drop"].concat(n))},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[].concat(M(this.builtInExtensions),M(this.options.extensions))})})}},{key:"initNodeViews",value:function(e){var t=this,n=e.parent;return e.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.view})).reduce((function(e,r){return w(w({},e),{},S({},r.name,(function(e,o,i,a){var s=r.view;return new O(s,{editor:t,extension:r,parent:n,node:e,view:o,getPos:i,decorations:a})})))}),{})}},{key:"dispatchTransaction",value:function(e){var t=this.state.apply(e);this.view.updateState(t),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emitUpdate(e)}},{key:"emitUpdate",value:function(e){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e})}},{key:"resolveSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){var t=this.state.doc;return{from:t.content.size,to:t.content.size}}return{from:e,to:e}}},{key:"focus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.view.focused&&null===t||!1===t)){var n=this.resolveSelection(t),r=n.from,o=n.to;this.setSelection(r,o),setTimeout((function(){return e.view.focus()}),10)}}},{key:"setSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.state,r=n.doc,i=n.tr,a=R(e,0,r.content.size),s=R(t,0,r.content.size),u=o.TextSelection.create(r,a,s),c=i.setSelection(u);this.view.dispatch(c)}},{key:"blur",value:function(){this.view.dom.blur()}},{key:"getSchemaJSON",value:function(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}},{key:"getHTML",value:function(){var e=document.createElement("div"),t=a.DOMSerializer.fromSchema(this.schema).serializeFragment(this.state.doc.content);return e.appendChild(t),e.innerHTML}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"setContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this.state,i=r.doc,a=r.tr,s=this.createDocument(e,n),u=o.TextSelection.create(i,0,i.content.size),c=a.setSelection(u).replaceSelectionWith(s,!1).setMeta("preventUpdate",!t);this.view.dispatch(c)}},{key:"clearContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setContent(this.options.emptyDocument,e)}},{key:"setActiveNodesAndMarks",value:function(){var e=this;this.activeMarks=Object.entries(this.schema.marks).reduce((function(t,n){var r=L(n,2),o=r[0],i=r[1];return w(w({},t),{},S({},o,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,f.markIsActive)(e.state,i,t)})))}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((function(t,n){var r=L(n,2),o=r[0],i=r[1];return w(w({},t),{},S({},o,(0,f.getMarkAttrs)(e.state,i)))}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((function(t,n){var r=L(n,2),o=r[0],i=r[1];return w(w({},t),{},S({},o,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,f.nodeIsActive)(e.state,i,t)})))}),{})}},{key:"getMarkAttrs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.activeMarkAttrs[e]}},{key:"getNodeAttrs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return w({},(0,f.getNodeAttrs)(this.state,this.schema.nodes[e]))}},{key:"isActive",get:function(){return Object.entries(w(w({},this.activeMarks),this.activeNodes)).reduce((function(e,t){var n=L(t,2),r=n[0],o=n[1];return w(w({},e),{},S({},r,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)})))}),{})}},{key:"registerPlugin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n="function"==typeof t?t(e,this.state.plugins):[e].concat(M(this.state.plugins)),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e&&this.view.docView){var t=this.state.reconfigure({plugins:this.state.plugins.filter((function(t){return!t.key.startsWith("".concat(e,"$"))}))});this.view.updateState(t)}}},{key:"destroy",value:function(){this.view&&this.view.destroy()}}]),n}(E);t.Editor=W;var U={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&e.element&&this.$nextTick((function(){t.$el.appendChild(e.element.firstChild),e.setParentComponent(t)}))}}},render:function(e){return e("div")},beforeDestroy:function(){this.editor.element=this.$el}};t.EditorContent=U;var q=function(){function e(t){var n=this,r=t.options;D(this,e),this.options=r,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.blurHandler=function(){n.preventHide?n.preventHide=!1:n.options.editor.emit("menubar:focusUpdate",!1)},this.options.editor.on("blur",this.blurHandler)}return C(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("blur",this.blurHandler)}}]),e}();var V={props:{editor:{default:null,type:Object}},data:function(){return{focused:!1}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el},new o.Plugin({key:new o.PluginKey("menu_bar"),view:function(e){return new q({editorView:e,options:n})}}))),t.focused=e.focused,e.on("focus",(function(){t.focused=!0})),e.on("menubar:focusUpdate",(function(e){t.focused=e}))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor)}):null}};function J(e,t,n){var r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,Math.max(t,0)),r}function G(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function K(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.docView.domFromPos(t),a=i.node,s=i.offset;if(3===a.nodeType)o&&s<a.nodeValue.length?(r=G(J(a,s-1,s),-1),n="right"):s<a.nodeValue.length&&(r=G(J(a,s,s+1),-1),n="left");else if(a.firstChild){if(s<a.childNodes.length){var u=a.childNodes[s];r=G(3===u.nodeType?J(u):u,-1),n="left"}if((!r||r.top===r.bottom)&&s){var c=a.childNodes[s-1];r=G(3===c.nodeType?J(c):c,1),n="right"}}else r=a.getBoundingClientRect(),n="left";var l=r[n];return{top:r.top,bottom:r.bottom,left:l,right:l}}t.EditorMenuBar=V;var Z=function(){function e(t){var n=this,r=t.options,o=t.editorView;D(this,e),this.options=w(w({},{element:null,keepInBounds:!0,onUpdate:function(){return!1}}),r),this.editorView=o,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=function(e){var t=e.view;n.update(t)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=function(e){var t=e.event;n.preventHide?n.preventHide=!1:n.hide(t)},this.options.editor.on("blur",this.blurHandler)}return C(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){var n=e.state;if(!(e.composing||t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection)))if(n.selection.empty)this.hide();else{var r=n.selection,o=r.from,i=r.to,a=K(e,o),s=K(e,i,!0),u=this.options.element.offsetParent;if(u){var c=u.getBoundingClientRect(),l=this.options.element.getBoundingClientRect(),d=(a.left+s.left)/2-c.left;this.left=Math.round(this.options.keepInBounds?Math.min(c.width-l.width/2,Math.max(d,l.width/2)):d),this.bottom=Math.round(c.bottom-a.top),this.top=Math.round(s.bottom-c.top),this.isActive=!0,this.sendUpdate()}else this.hide()}}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}},{key:"hide",value:function(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}]),e}();var X={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:function(){return{menu:{isActive:!1,left:0,bottom:0}}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el,keepInBounds:t.keepInBounds,onUpdate:function(e){e.isActive&&!1===t.menu.isActive?t.$emit("show",e):e.isActive||!0!==t.menu.isActive||t.$emit("hide",e),t.menu=e}},new o.Plugin({key:new o.PluginKey("menu_bubble"),view:function(e){return new Z({editorView:e,options:n})}})))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy:function(){this.editor.unregisterPlugin("menu_bubble")}};t.EditorMenuBubble=X;var Q=function(){function e(t){var n=this,r=t.options,o=t.editorView;D(this,e),this.options=w(w({},{resizeObserver:!0,element:null,onUpdate:function(){return!1}}),r),this.preventHide=!1,this.editorView=o,this.isActive=!1,this.top=0,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=function(e){var t=e.view;n.update(t)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=function(e){var t=e.event;n.preventHide?n.preventHide=!1:n.hide(t)},this.options.editor.on("blur",this.blurHandler),this.options.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(){n.isActive&&n.update(n.editorView)})),this.resizeObserver.observe(this.editorView.dom))}return C(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){var n=e.state;if(!(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection)))if(n.selection.empty){var r=e.domAtPos(n.selection.anchor);if("<br>"===r.node.innerHTML&&"P"===r.node.tagName&&r.node.parentNode===e.dom){var o=this.options.element.offsetParent;if(o){var i=o.getBoundingClientRect(),a=e.coordsAtPos(n.selection.anchor).top-i.top;this.isActive=!0,this.top=a,this.sendUpdate()}else this.hide()}else this.hide()}else this.hide()}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,top:this.top})}},{key:"hide",value:function(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.resizeObserver&&this.resizeObserver.unobserve(this.editorView.dom),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}]),e}();var ee={props:{editor:{default:null,type:Object}},data:function(){return{menu:{isActive:!1,left:0,bottom:0}}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el,onUpdate:function(e){e.isActive&&!1===t.menu.isActive?t.$emit("show",e):e.isActive||!0!==t.menu.isActive||t.$emit("hide",e),t.menu=e}},new o.Plugin({key:new o.PluginKey("floating_menu"),view:function(e){return new Q({editorView:e,options:n})}})))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy:function(){this.editor.unregisterPlugin("floating_menu")}};t.EditorFloatingMenu=ee},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformError=c,t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return M(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},t.canSplit=function(e,t,n,r){void 0===n&&(n=1);var o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,u=n-2;s>i;s--,u--){var c=o.node(s),l=o.index(s);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(l,c.childCount),f=r&&r[u]||c;if(f!=c&&(d=d.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(l+1,c.childCount)||!f.type.validContent(d))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)},t.dropPoint=function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),d=!1;if(1==a)d=l.canReplace(c,c,o);else{var f=l.contentMatchAt(c).findWrapping(o.firstChild.type);d=f&&l.canReplaceWith(c,c,f[0])}if(d)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null},t.findWrapping=function(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=r;s&&u<o;u++)s=s.matchType(n.child(u).type);if(!s||!s.validEnd)return null;return a}(r,t);if(!i)return null;return o.map(b).concat({type:t,attrs:n}).concat(i.map(b))},t.insertPoint=k,t.joinPoint=function(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&M(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}},t.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!g(r,o,i))break}},t.replaceStep=x,t.Transform=t.StepResult=t.StepMap=t.Step=t.ReplaceStep=t.ReplaceAroundStep=t.RemoveMarkStep=t.Mapping=t.MapResult=t.AddMarkStep=void 0;var r=n(205),o=Math.pow(2,16);function i(e){return 65535&e}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n};t.MapResult=a;var s=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};t.StepMap=s,s.prototype.recover=function(e){var t=0,n=i(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/o}(e)},s.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},s.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},s.prototype._map=function(e,t,n){for(var r=0,i=this.inverted?2:1,s=this.inverted?1:2,u=0;u<this.ranges.length;u+=3){var c=this.ranges[u]-(this.inverted?r:0);if(c>e)break;var l=this.ranges[u+i],d=this.ranges[u+s],f=c+l;if(e<=f){var p=c+r+((l?e==c?-1:e==f?1:t:t)<0?0:d);if(n)return p;var h=e==(t<0?c:f)?null:u/3+(e-c)*o;return new a(p,t<0?e!=c:e!=f,h)}r+=d-l}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var u=this.ranges[s]-(this.inverted?n:0);if(u>e)break;var c=this.ranges[s+o];if(e<=u+c&&s==3*r)return!0;n+=this.ranges[s+a]-c}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),u=this.ranges[r+t],c=this.ranges[r+n];e(a,a+u,s,s+c),o+=c-u}},s.prototype.invert=function(){return new s(this.ranges,!this.inverted)},s.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},s.offset=function(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])},s.empty=new s([]);var u=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function c(e){var t=Error.call(this,e);return t.__proto__=c.prototype,t}t.Mapping=u,u.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new u(this.maps,this.mirror,e,t)},u.prototype.copy=function(){return new u(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},u.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},u.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},u.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},u.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},u.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},u.prototype.invert=function(){var e=new u;return e.appendMappingInverted(this),e},u.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},u.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},u.prototype._map=function(e,t,n){for(var r=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var s=this.getMirror(o);if(null!=s&&s>o&&s<this.to){o=s,e=this.maps[s].recover(i.recover);continue}}i.deleted&&(r=!0),e=i.pos}return n?e:new a(e,r)},c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.prototype.name="TransformError";var l=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new u};t.Transform=l;var d={before:{configurable:!0},docChanged:{configurable:!0}};function f(){throw new Error("Override me")}d.before.get=function(){return this.docs.length?this.docs[0]:this.doc},l.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new c(t.failed);return this},l.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},d.docChanged.get=function(){return this.steps.length>0},l.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(l.prototype,d);var p=Object.create(null),h=function(){};t.Step=h,h.prototype.apply=function(e){return f()},h.prototype.getMap=function(){return s.empty},h.prototype.invert=function(e){return f()},h.prototype.map=function(e){return f()},h.prototype.merge=function(e){return null},h.prototype.toJSON=function(){return f()},h.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=p[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},h.jsonID=function(e,t){if(e in p)throw new RangeError("Duplicate use of step JSON ID "+e);return p[e]=t,t.prototype.jsonID=e,t};var m=function(e,t){this.doc=e,this.failed=t};t.StepResult=m,m.ok=function(e){return new m(e,null)},m.fail=function(e){return new m(null,e)},m.fromReplace=function(e,t,n,o){try{return m.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.ReplaceError)return m.fail(e.message);throw e}};var y=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&v(e,this.from,this.to)?m.fail("Structure replace would overwrite content"):m.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(h);t.ReplaceStep=y,h.jsonID("replace",y);var _=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(v(e,this.from,this.gapFrom)||v(e,this.gapTo,this.to)))return m.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return m.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?m.fromReplace(e,this.from,this.to,n):m.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(h);function v(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function g(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function b(e){return{type:e,attrs:null}}function M(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function k(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}}function w(e,t,n){for(var o=[],i=0;i<e.childCount;i++){var a=e.child(i);a.content.size&&(a=a.copy(w(a.content,t,a))),a.isInline&&(a=t(a,n,i)),o.push(a)}return r.Fragment.fromArray(o)}t.ReplaceAroundStep=_,h.jsonID("replaceAround",_),l.prototype.lift=function(e,t){for(var n=e.$from,o=e.$to,i=e.depth,a=n.before(i+1),s=o.after(i+1),u=a,c=s,l=r.Fragment.empty,d=0,f=i,p=!1;f>t;f--)p||n.index(f)>0?(p=!0,l=r.Fragment.from(n.node(f).copy(l)),d++):u--;for(var h=r.Fragment.empty,m=0,y=i,v=!1;y>t;y--)v||o.after(y+1)<o.end(y)?(v=!0,h=r.Fragment.from(o.node(y).copy(h)),m++):c++;return this.step(new _(u,c,a,s,new r.Slice(l.append(h),d,m),l.size-d,!0))},l.prototype.wrap=function(e,t){for(var n=r.Fragment.empty,o=t.length-1;o>=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,a=e.end;return this.step(new _(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},l.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(a).map(t),n)){i.clearIncompatible(i.mapping.slice(a).map(t,1),n);var s=i.mapping.slice(a),u=s.map(t,1),c=s.map(t+e.nodeSize,1);return i.step(new _(u,c,u+1,c-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},l.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var a=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new _(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},l.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,a=r.Fragment.empty,s=o.depth,u=o.depth-t,c=t-1;s>u;s--,c--){i=r.Fragment.from(o.node(s).copy(i));var l=n&&n[c];a=r.Fragment.from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}return this.step(new y(e,e,new r.Slice(i.append(a),t,t),!0))},l.prototype.join=function(e,t){void 0===t&&(t=1);var n=new y(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var S=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r.Slice(w(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new L(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);t.AddMarkStep=S,h.jsonID("addMark",S);var L=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(w(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new S(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);function x(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),a=e.resolve(n);return T(i,a,o)?new y(t,n,o):new D(i,a,o).fit()}function T(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}t.RemoveMarkStep=L,h.jsonID("removeMark",L),l.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,u,c){if(r.isInline){var l=r.marks;if(!n.isInSet(l)&&c.type.allowsMarkType(n.type)){for(var d=Math.max(u,e),f=Math.min(u+r.nodeSize,t),p=n.addToSet(l),h=0;h<l.length;h++)l[h].isInSet(p)||(a&&a.to==d&&a.mark.eq(l[h])?a.to=f:o.push(a=new L(d,f,l[h])));s&&s.to==d?s.to=f:i.push(s=new S(d,f,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},l.prototype.removeMark=function(e,t,n){var o=this;void 0===n&&(n=null);var i=[],a=0;return this.doc.nodesBetween(e,t,(function(o,s){if(o.isInline){a++;var u=null;if(n instanceof r.MarkType)for(var c,l=o.marks;c=n.isInSet(l);)(u||(u=[])).push(c),l=c.removeFromSet(l);else n?n.isInSet(o.marks)&&(u=[n]):u=o.marks;if(u&&u.length)for(var d=Math.min(s+o.nodeSize,t),f=0;f<u.length;f++){for(var p=u[f],h=void 0,m=0;m<i.length;m++){var y=i[m];y.step==a-1&&p.eq(i[m].style)&&(h=y)}h?(h.to=d,h.step=a):i.push({style:p,from:Math.max(s,e),to:d,step:a})}}})),i.forEach((function(e){return o.step(new L(e.from,e.to,e.style))})),this},l.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var o=this.doc.nodeAt(e),i=[],a=e+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,l=n.matchType(u.type,u.attrs);if(l){n=l;for(var d=0;d<u.marks.length;d++)t.allowsMarkType(u.marks[d].type)||this.step(new L(a,c,u.marks[d]))}else i.push(new y(a,c,r.Slice.empty));a=c}if(!n.validEnd){var f=n.fillBefore(r.Fragment.empty,!0);this.replace(a,a,new r.Slice(f,0,0))}for(var p=i.length-1;p>=0;p--)this.step(i[p]);return this},l.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=x(this.doc,e,t,n);return o&&this.step(o),this},l.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},l.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},l.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var D=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var o=0;o<=e.depth;o++){var i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},Y={depth:{configurable:!0}};function C(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(C(e.firstChild.content,t-1,n)))}function A(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(A(e.lastChild.content,t-1,n)))}function O(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function E(e,t,n){if(t<=0)return e;var o=e.content;return t>1&&(o=o.replaceChild(0,E(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.Fragment.empty,!0)))),e.copy(o)}function j(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function P(e,t,n,o,i){if(t<n){var a=e.firstChild;e=e.replaceChild(0,a.copy(P(a.content,t+1,n,o,a)))}if(t>o){var s=i.contentMatchAt(0),u=s.fillBefore(e).append(e);e=u.append(s.matchFragment(u).fillBefore(r.Fragment.empty,!0))}return e}function N(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}Y.depth.get=function(){return this.frontier.length-1},D.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=this.close(t<0?this.$to:o.doc.resolve(t));if(!i)return null;for(var a=this.placed,s=o.depth,u=i.depth;s&&u&&1==a.childCount;)a=a.firstChild.content,s--,u--;var c=new r.Slice(a,s,u);return t>-1?new _(o.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||o.pos!=this.$to.pos?new y(o.pos,i.pos,c):void 0},D.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,o=(t?(n=O(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var a=this.frontier[i],s=a.type,u=a.match,c=void 0,l=void 0;if(1==e&&(o?u.matchType(o.type)||(l=u.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:l};if(2==e&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:c};if(n&&u.matchType(n.type))break}},D.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=O(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(o,i.size+n>=t.size-o?n+1:0)),!0)},D.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=O(t,n);if(i.childCount<=1&&n>0){var a=t.size-n<=n+i.size;this.unplaced=new r.Slice(C(t,n-1,1),n-1,a?n-1:o)}else this.unplaced=new r.Slice(C(t,n,1),n,o)},D.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,o=e.parent,i=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s<a.length;s++)this.openFrontierNode(a[s]);var u=this.unplaced,c=o?o.content:u.content,l=u.openStart-t,d=0,f=[],p=this.frontier[n],h=p.match,m=p.type;if(i){for(var y=0;y<i.childCount;y++)f.push(i.child(y));h=h.matchFragment(i)}for(var _=c.size+t-(u.content.size-u.openEnd);d<c.childCount;){var v=c.child(d),g=h.matchType(v.type);if(!g)break;(++d>1||0==l||v.content.size)&&(h=g,f.push(E(v.mark(m.allowedMarks(v.marks)),1==d?l:0,d==c.childCount?_:-1)))}var b=d==c.childCount;b||(_=-1),this.placed=A(this.placed,n,r.Fragment.from(f)),this.frontier[n].match=h,b&&_<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var M=0,k=c;M<_;M++){var w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=b?0==t?r.Slice.empty:new r.Slice(C(u.content,t-1,1),t-1,_<0?u.openEnd:t-1):new r.Slice(C(u.content,t,d),u.openStart,u.openEnd)},D.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!j(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r},D.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=j(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=j(e,s,u.type,c,!0);if(!l||l.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}},D.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=A(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e},D.prototype.openFrontierNode=function(e,t,n){var o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=A(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},D.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=A(this.placed,this.frontier.length,e))},Object.defineProperties(D.prototype,Y),l.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(T(o,i,n))return this.step(new y(e,t,n));var a=N(o,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var l=o.node(u).type.spec;if(l.defining||l.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var d=a.indexOf(s),f=[],p=n.openStart,h=n.content,m=0;;m++){var _=h.firstChild;if(f.push(_),m==n.openStart)break;h=_.content}p>0&&f[p-1].type.spec.defining&&o.node(d).type!=f[p-1].type?p-=1:p>=2&&f[p-1].isTextblock&&f[p-2].type.spec.defining&&o.node(d).type!=f[p-2].type&&(p-=2);for(var v=n.openStart;v>=0;v--){var g=(v+p+1)%(n.openStart+1),b=f[g];if(b)for(var M=0;M<a.length;M++){var k=a[(M+d)%a.length],w=!0;k<0&&(w=!1,k=-k);var S=o.node(k-1),L=o.index(k-1);if(S.canReplaceWith(L,L,b.type,b.marks))return this.replace(o.before(k),w?i.after(k):t,new r.Slice(P(n.content,0,n.openStart,g),g,n.openEnd))}}for(var x=this.steps.length,D=a.length-1;D>=0&&(this.replace(e,t,n),!(this.steps.length>x));D--){var Y=a[D];Y<0||(e=o.before(Y),t=i.after(Y))}return this},l.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=k(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},l.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=N(n,r),i=0;i<o.length;i++){var a=o[i],s=i==o.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var u=1;u<=n.depth&&u<=r.depth;u++)if(e-n.start(u)==n.depth-u&&t>n.end(u)&&r.end(u)-t!=r.depth-u)return this.delete(n.before(u),t);return this.delete(e,t)}},,,,function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Highlight=N,t.Suggestions=U,t.Underline=t.TrailingNode=t.TodoList=t.TodoItem=t.TableRow=t.TableHeader=t.TableCell=t.Table=t.Strike=t.Search=t.Placeholder=t.OrderedList=t.Mention=t.ListItem=t.Link=t.Italic=t.Image=t.HorizontalRule=t.History=t.Heading=t.HardBreak=t.Focus=t.Collaboration=t.CodeBlockHighlight=t.CodeBlock=t.Code=t.BulletList=t.Bold=t.Blockquote=void 0;var o,i=n(206),a=n(221),s=(o=n(657))&&o.__esModule?o:{default:o},u=n(213),c=n(220),l=n(205),d=n(204),f=n(413),p=n(207),h=n(219),m=n(661);function y(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block*",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleWrap)(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Ctrl->":(0,a.toggleWrap)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^\s*>\s$/,t)]}}]),n}(i.Node);t.Blockquote=O;var E=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-8":(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^\s*([-+*])\s$/,t)]}}]),n}(i.Node);t.BulletList=E;var j=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"code_block"}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleBlockType)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":(0,a.setBlockType)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.textblockTypeInputRule)(/^```$/,t)]}}]),n}(i.Node);function P(e){var t=e.doc,n=e.name,r=[],o=(0,c.findBlockNodes)(t).filter((function(e){return e.node.type.name===n}));return o.forEach((function(e){var t=e.pos+1;(function e(t){return t.reduce((function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])})(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.map((function(t){var r=[].concat(M(n),M(t.properties?t.properties.className:[]));return t.children?e(t.children,r):{text:t.value,classes:r}}))}(s.default.highlightAuto(e.node.textContent).value)).map((function(e){var n=t,r=n+e.text.length;return t=r,g(g({},e),{},{from:n,to:r})})).forEach((function(e){var t=u.Decoration.inline(e.from,e.to,{class:e.classes.join(" ")});r.push(t)}))})),u.DecorationSet.create(t,r)}function N(e){var t=e.name;return new i.Plugin({name:new i.PluginKey("highlight"),state:{init:function(e,n){return P({doc:n.doc,name:t})},apply:function(e,n,r,o){var i=r.selection.$head.parent.type.name,a=o.selection.$head.parent.type.name,s=(0,c.findBlockNodes)(r.doc).filter((function(e){return e.node.type.name===t})),u=(0,c.findBlockNodes)(o.doc).filter((function(e){return e.node.type.name===t}));return e.docChanged&&([i,a].includes(t)||u.length!==s.length)?P({doc:e.doc,name:t}):n.map(e.mapping,e.doc)}},props:{decorations:function(e){return this.getState(e)}}})}t.CodeBlock=j;var H=function(e){T(n,e);var t=Y(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};S(this,n),e=t.call(this,r);try{Object.entries(e.options.languages).forEach((function(e){var t=_(e,2),n=t[0],r=t[1];s.default.registerLanguage(n,r)}))}catch(e){throw new Error("Invalid syntax highlight definitions: define at least one highlight.js language mapping")}return e}return x(n,[{key:"name",get:function(){return"code_block"}},{key:"defaultOptions",get:function(){return{languages:{}}}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleBlockType)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":(0,a.setBlockType)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.textblockTypeInputRule)(/^```$/,t)]}},{key:"plugins",get:function(){return[N({name:this.name})]}}]),n}(i.Node);t.CodeBlockHighlight=H;var R=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"hard_break"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.chainCommands)(a.exitCode,(function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}))}}},{key:"keys",value:function(e){var t=e.type,n=(0,a.chainCommands)(a.exitCode,(function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}));return{"Mod-Enter":n,"Shift-Enter":n}}}]),n}(i.Node);t.HardBreak=R;var I=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4,5,6]}}},{key:"schema",get:function(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e}}})),toDOM:function(e){return["h".concat(e.attrs.level),0]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(e){return(0,a.toggleBlockType)(t,n.nodes.paragraph,e)}}},{key:"keys",value:function(e){var t=e.type;return this.options.levels.reduce((function(e,n){return g(g({},e),b({},"Shift-Ctrl-".concat(n),(0,a.setBlockType)(t,{level:n})))}),{})}},{key:"inputRules",value:function(e){var t=e.type;return this.options.levels.map((function(e){return(0,a.textblockTypeInputRule)(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))}}]),n}(i.Node);t.Heading=I;var F=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"horizontal_rule"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["hr"]}}}},{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()))}}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.nodeInputRule)(/^(?:---|___\s|\*\*\*\s)$/,t)]}}]),n}(i.Node);t.HorizontalRule=F;var z=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,$=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM:function(e){return["img",e.attrs]}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){var o=n.selection,i=o.$cursor?o.$cursor.pos:o.$to.pos,a=t.create(e);r(n.tr.insert(i,a))}}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.nodeInputRule)(z,t,(function(e){var t=_(e,4),n=t[1];return{src:t[2],alt:n,title:t[3]}}))]}},{key:"plugins",get:function(){return[new i.Plugin({props:{handleDOMEvents:{drop:function(e,t){if(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length){var n=Array.from(t.dataTransfer.files).filter((function(e){return/image/i.test(e.type)}));if(0!==n.length){t.preventDefault();var r=e.state.schema,o=e.posAtCoords({left:t.clientX,top:t.clientY});n.forEach((function(t){var n=new FileReader;n.onload=function(t){var n=r.nodes.image.create({src:t.target.result}),i=e.state.tr.insert(o.pos,n);e.dispatch(i)},n.readAsDataURL(t)}))}}}}}})]}}]),n}(i.Node);t.Image=$;var B=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}},{key:"keys",value:function(e){var t=e.type;return{Enter:(0,a.splitListItem)(t),Tab:(0,a.sinkListItem)(t),"Shift-Tab":(0,a.liftListItem)(t)}}}]),n}(i.Node);function W(e){var t=e.char,n=void 0===t?"@":t,r=e.allowSpaces,o=void 0!==r&&r,i=e.startOfLine,a=void 0!==i&&i;return function(e){if(e.depth<=0)return!1;for(var t,r="\\".concat(n),i=new RegExp("\\s".concat(r,"$")),s=a?"^":"",u=o?new RegExp("".concat(s).concat(r,".*?(?=\\s").concat(r,"|$)"),"gm"):new RegExp("".concat(s,"(?:^)?").concat(r,"[^\\s").concat(r,"]*"),"gm"),c=e.before(),l=e.end(),d=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"\0",a="",s=!0,u=null;return e.content.nodesBetween(t,n,(function(e,c){if(e.isText){if(u)return void(u=null);a+=e.text.slice(Math.max(t,c)-c,n-c),s=!r}else e.isLeaf&&i?(a+=i,s=!r):e.isInline&&!e.isLeaf?(a+=o,e.textContent&&(a+=e.textContent,u=e),a+=o,s=!s):!s&&e.isBlock&&(a+=r,s=!0)}),0),a}(e.doc,c,l,"\0","\0"),f=u.exec(d);null!==f;){var p=f.input.slice(Math.max(0,f.index-1),f.index);if(/^[\s\0]?$/.test(p)){var h=f.index+e.start(),m=h+f[0].length;o&&i.test(d.slice(m-1,m+1))&&(f[0]+=" ",m+=1),h<e.pos&&m>=e.pos&&(t={range:{from:h,to:m},query:f[0].slice(n.length),text:f[0]})}f=u.exec(d)}return t}}function U(e){var t=e.matcher,n=void 0===t?{char:"@",allowSpaces:!1,startOfLine:!1}:t,r=e.appendText,o=void 0===r?null:r,i=e.suggestionClass,s=void 0===i?"suggestion":i,c=e.command,l=void 0===c?function(){return!1}:c,f=e.items,p=void 0===f?[]:f,h=e.onEnter,m=void 0===h?function(){return!1}:h,_=e.onChange,v=void 0===_?function(){return!1}:_,b=e.onExit,M=void 0===b?function(){return!1}:b,k=e.onKeyDown,w=void 0===k?function(){return!1}:k,S=e.onFilter,L=void 0===S?function(e,t){return t?e.filter((function(e){return JSON.stringify(e).toLowerCase().includes(t.toLowerCase())})):e}:S;return new d.Plugin({key:new d.PluginKey("suggestions"),view:function(){var e,t,n=this;return{update:(e=regeneratorRuntime.mark((function e(t,r){var i,s,u,c,d,f,h,y,_,g,b,k,w;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.key.getState(r),s=n.key.getState(t.state),u=i.active&&s.active&&i.range.from!==s.range.from,c=!i.active&&s.active,d=i.active&&!s.active,f=!c&&!d&&i.query!==s.query,y=f&&!u,_=d||u,(h=c||u)||y||_){e.next=11;break}return e.abrupt("return");case 11:if(g=_?i:s,b=document.querySelector('[data-decoration-id="'.concat(g.decorationId,'"]')),k=b?{getBoundingClientRect:function(){return b.getBoundingClientRect()},clientWidth:b.clientWidth,clientHeight:b.clientHeight}:null,e.t0=t,e.t1=g.range,e.t2=g.query,e.t3=g.text,e.t4=b,e.t5=k,!y&&!h){e.next=36;break}if(e.t7=L,!Array.isArray(p)){e.next=26;break}e.t8=p,e.next=29;break;case 26:return e.next=28,p();case 28:e.t8=e.sent;case 29:return e.t9=e.t8,e.t10=g.query,e.next=33,(0,e.t7)(e.t9,e.t10);case 33:e.t6=e.sent,e.next=37;break;case 36:e.t6=[];case 37:e.t11=e.t6,e.t12=function(e){var n=e.range,r=e.attrs;l({range:n,attrs:r,schema:t.state.schema})(t.state,t.dispatch,t),o&&(0,a.insertText)(o)(t.state,t.dispatch,t)},w={view:e.t0,range:e.t1,query:e.t2,text:e.t3,decorationNode:e.t4,virtualNode:e.t5,items:e.t11,command:e.t12},_&&M(w),y&&v(w),h&&m(w);case 43:case"end":return e.stop()}}),e)})),t=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))},function(e,n){return t.apply(this,arguments)})}},state:{init:function(){return{active:!1,range:{},query:null,text:null}},apply:function(e,t){var r=e.selection,o=g({},t);if(r.from===r.to){(r.from<t.range.from||r.from>t.range.to)&&(o.active=!1);var i=r.$from,a=W(n)(i),s=(Math.random()+1).toString(36).substr(2,5);a?(o.active=!0,o.decorationId=t.decorationId?t.decorationId:s,o.range=a.range,o.query=a.query,o.text=a.text):o.active=!1}else o.active=!1;return o.active||(o.decorationId=null,o.range={},o.query=null,o.text=null),o}},props:{handleKeyDown:function(e,t){var n=this.getState(e.state),r=n.active,o=n.range;return!!r&&w({view:e,event:t,range:o})},decorations:function(e){var t=this.getState(e),n=t.active,r=t.range,o=t.decorationId;return n?u.DecorationSet.create(e.doc,[u.Decoration.inline(r.from,r.to,{nodeName:"span",class:s,"data-decoration-id":o})]):null}}})}t.ListItem=B;var q=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"mention"}},{key:"defaultOptions",get:function(){return{matcher:{char:"@",allowSpaces:!1,startOfLine:!1},mentionClass:"mention",suggestionClass:"mention-suggestion"}}},{key:"getLabel",value:function(e){return e.innerText.split(this.options.matcher.char).join("")}},{key:"createFragment",value:function(e,t){return l.Fragment.fromJSON(e,[{type:"text",text:"".concat(this.options.matcher.char).concat(t)}])}},{key:"insertMention",value:function(e,t,n){var r=n.nodes[this.name],o=this.createFragment(n,t.label);return(0,a.replaceText)(e,r,t,o)}},{key:"schema",get:function(){var e=this;return{attrs:{id:{},label:{}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(t){return["span",{class:e.options.mentionClass,"data-mention-id":t.attrs.id},"".concat(e.options.matcher.char).concat(t.attrs.label)]},parseDOM:[{tag:"span[data-mention-id]",getAttrs:function(t){return{id:t.getAttribute("data-mention-id"),label:e.getLabel(t)}},getContent:function(t,n){var r=e.getLabel(t);return e.createFragment(n,r)}}]}}},{key:"commands",value:function(e){var t=this,n=e.schema;return function(e){return t.insertMention(null,e,n)}}},{key:"plugins",get:function(){var e=this;return[U({command:function(t){var n=t.range,r=t.attrs,o=t.schema;return e.insertMention(n,r,o)},appendText:" ",matcher:this.options.matcher,items:this.options.items,onEnter:this.options.onEnter,onChange:this.options.onChange,onExit:this.options.onExit,onKeyDown:this.options.onKeyDown,onFilter:this.options.onFilter,suggestionClass:this.options.suggestionClass})]}}]),n}(i.Node);t.Mention=q;var V=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-9":(0,a.toggleList)(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^(\d+)\.\s$/,t,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))]}}]),n}(i.Node);t.OrderedList=V;var J=(0,f.tableNodes)({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:function(e){return e.style.backgroundColor||null},setDOMAttr:function(e,t){if(e){var n={style:"".concat(t.style||"","background-color: ").concat(e,";")};Object.assign(t,n)}}}}}),G=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table"}},{key:"defaultOptions",get:function(){return{resizable:!1}}},{key:"schema",get:function(){return J.table}},{key:"commands",value:function(e){var t=e.schema;return{createTable:function(e){var n=e.rowsCount,r=e.colsCount,o=e.withHeaderRow;return function(e,i){var a=e.tr.selection.anchor+1,s=(0,c.createTable)(t,n,r,o),u=e.tr.replaceSelectionWith(s).scrollIntoView(),l=u.doc.resolve(a);u.setSelection(d.TextSelection.near(l)),i(u)}},addColumnBefore:function(){return f.addColumnBefore},addColumnAfter:function(){return f.addColumnAfter},deleteColumn:function(){return f.deleteColumn},addRowBefore:function(){return f.addRowBefore},addRowAfter:function(){return f.addRowAfter},deleteRow:function(){return f.deleteRow},deleteTable:function(){return f.deleteTable},toggleCellMerge:function(){return function(e,t){(0,f.mergeCells)(e,t)||(0,f.splitCell)(e,t)}},mergeCells:function(){return f.mergeCells},splitCell:function(){return f.splitCell},toggleHeaderColumn:function(){return f.toggleHeaderColumn},toggleHeaderRow:function(){return f.toggleHeaderRow},toggleHeaderCell:function(){return f.toggleHeaderCell},setCellAttr:function(e){var t=e.name,n=e.value;return(0,f.setCellAttr)(t,n)},fixTables:function(){return f.fixTables}}}},{key:"keys",value:function(){return{Tab:(0,f.goToNextCell)(1),"Shift-Tab":(0,f.goToNextCell)(-1)}}},{key:"plugins",get:function(){return[].concat(M(this.options.resizable?[(0,f.columnResizing)()]:[]),[(0,f.tableEditing)()])}}]),n}(i.Node);t.Table=G;var K=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table_header"}},{key:"schema",get:function(){return J.table_header}}]),n}(i.Node);t.TableHeader=K;var Z=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table_cell"}},{key:"schema",get:function(){return J.table_cell}}]),n}(i.Node);t.TableCell=Z;var X=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"table_row"}},{key:"schema",get:function(){return J.table_row}}]),n}(i.Node);t.TableRow=X;var Q=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"todo_item"}},{key:"defaultOptions",get:function(){return{nested:!1}}},{key:"view",get:function(){return{props:["node","updateAttrs","view"],methods:{onChange:function(){this.updateAttrs({done:!this.node.attrs.done})}},template:'\n <li :data-type="node.type.name" :data-done="node.attrs.done.toString()" data-drag-handle>\n <span class="todo-checkbox" contenteditable="false" @click="onChange"></span>\n <div class="todo-content" ref="content" :contenteditable="view.editable.toString()"></div>\n </li>\n '}}},{key:"schema",get:function(){var e=this;return{attrs:{done:{default:!1}},draggable:!0,content:this.options.nested?"(paragraph|todo_list)+":"paragraph+",toDOM:function(t){var n=t.attrs.done;return["li",{"data-type":e.name,"data-done":n.toString()},["span",{class:"todo-checkbox",contenteditable:"false"}],["div",{class:"todo-content"},0]]},parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]'),getAttrs:function(e){return{done:"true"===e.getAttribute("data-done")}}}]}}},{key:"keys",value:function(e){var t=e.type;return{Enter:(0,a.splitToDefaultListItem)(t),Tab:this.options.nested?(0,a.sinkListItem)(t):function(){},"Shift-Tab":(0,a.liftListItem)(t)}}}]),n}(i.Node);t.TodoItem=Q;var ee=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"todo_list"}},{key:"schema",get:function(){var e=this;return{group:"block",content:"todo_item+",toDOM:function(){return["ul",{"data-type":e.name},0]},parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]')}]}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return(0,a.toggleList)(t,n.nodes.todo_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.wrappingInputRule)(/^\s*(\[ \])\s$/,t)]}}]),n}(i.Node);t.TodoList=ee;var te=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"bold"}},{key:"schema",get:function(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:function(e){return"normal"!==e.style.fontWeight&&null}},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}],toDOM:function(){return["strong",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-b":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}}]),n}(i.Mark);t.Bold=te;var ne=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"code"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:function(){return["code",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-`":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/(?:`)([^`]+)(?:`)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/(?:`)([^`]+)(?:`)/g,t)]}}]),n}(i.Mark);t.Code=ne;var re=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"italic"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:function(){return["em",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-i":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/(?:^|[^_])(_([^_]+)_)$/,t),(0,a.markInputRule)(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/_([^_]+)_/g,t),(0,a.markPasteRule)(/\*([^*]+)\*/g,t)]}}]),n}(i.Mark);t.Italic=re;var oe=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"link"}},{key:"defaultOptions",get:function(){return{openOnClick:!0,target:null}}},{key:"schema",get:function(){var e=this;return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href"),target:e.getAttribute("target")}}}],toDOM:function(t){return["a",g(g({},t.attrs),{},{rel:"noopener noreferrer nofollow",target:t.attrs.target||e.options.target}),0]}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return e.href?(0,a.updateMark)(t,e):(0,a.removeMark)(t)}}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.pasteRule)(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,t,(function(e){return{href:e}}))]}},{key:"plugins",get:function(){return this.options.openOnClick?[new i.Plugin({props:{handleClick:function(e,t,n){var r=e.state.schema,o=(0,c.getMarkAttrs)(e.state,r.marks.link);o.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(o.href,o.target))}}})]:[]}}]),n}(i.Mark);t.Link=oe;var ie=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"strike"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:function(e){return"line-through"===e}}],toDOM:function(){return["s",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-d":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[(0,a.markInputRule)(/~([^~]+)~$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[(0,a.markPasteRule)(/~([^~]+)~/g,t)]}}]),n}(i.Mark);t.Strike=ie;var ae=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"underline"}},{key:"schema",get:function(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:function(e){return"underline"===e}}],toDOM:function(){return["u",0]}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-u":(0,a.toggleMark)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return(0,a.toggleMark)(t)}}}]),n}(i.Mark);t.Underline=ae;var se=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"collaboration"}},{key:"init",value:function(){var e=this;this.getSendableSteps=this.debounce((function(t){var n=(0,h.sendableSteps)(t);n&&e.options.onSendable({editor:e.editor,sendable:{version:n.version,steps:n.steps.map((function(e){return e.toJSON()})),clientID:n.clientID}})}),this.options.debounce),this.editor.on("transaction",(function(t){var n=t.state;e.getSendableSteps(n)}))}},{key:"defaultOptions",get:function(){var e=this;return{version:0,clientID:Math.floor(4294967295*Math.random()),debounce:250,onSendable:function(){},update:function(t){var n=t.steps,r=t.version,o=e.editor,i=o.state,a=o.view,s=o.schema;(0,h.getVersion)(i)>r||a.dispatch((0,h.receiveTransaction)(i,n.map((function(e){return p.Step.fromJSON(s,e.step)})),n.map((function(e){return e.clientID}))))}}}},{key:"plugins",get:function(){return[(0,h.collab)({version:this.options.version,clientID:this.options.clientID})]}},{key:"debounce",value:function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}}]),n}(i.Extension);t.Collaboration=se;var ue=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"focus"}},{key:"defaultOptions",get:function(){return{className:"has-focus",nested:!1}}},{key:"plugins",get:function(){var e=this;return[new i.Plugin({props:{decorations:function(t){var n=t.doc,r=t.plugins,o=t.selection,i=r.find((function(e){return e.key.startsWith("editable$")})).props.editable()&&e.options.className,a=e.editor.focused,s=o.anchor,c=[];return!(!i||!a)&&(n.descendants((function(t,n){if(s>=n&&s<=n+t.nodeSize&&!t.isText){var r=u.Decoration.node(n,n+t.nodeSize,{class:e.options.className});c.push(r)}return e.options.nested})),u.DecorationSet.create(n,c))}}})]}}]),n}(i.Extension);t.Focus=ue;var ce=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"history"}},{key:"defaultOptions",get:function(){return{depth:"",newGroupDelay:""}}},{key:"keys",value:function(){return{"Mod-z":m.undo,"Mod-y":m.redo,"Shift-Mod-z":m.redo,"Mod-я":m.undo,"Shift-Mod-я":m.redo}}},{key:"plugins",get:function(){return[(0,m.history)({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}},{key:"commands",value:function(){return{undo:function(){return m.undo},redo:function(){return m.redo},undoDepth:function(){return m.undoDepth},redoDepth:function(){return m.redoDepth}}}}]),n}(i.Extension);t.History=ce;var le=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"placeholder"}},{key:"defaultOptions",get:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",emptyNodeText:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0}}},{key:"plugins",get:function(){var e=this;return[new i.Plugin({props:{decorations:function(t){var n=t.doc,r=t.plugins,o=t.selection,i=r.find((function(e){return e.key.startsWith("editable$")})).props.editable()||!e.options.showOnlyWhenEditable,a=o.anchor,s=[],c=0===n.textContent.length;return!!i&&(n.descendants((function(t,n){var r=a>=n&&a<=n+t.nodeSize,o=0===t.content.size;if((r||!e.options.showOnlyCurrent)&&o){var i=[e.options.emptyNodeClass];c&&i.push(e.options.emptyEditorClass);var l=u.Decoration.node(n,n+t.nodeSize,{class:i.join(" "),"data-empty-text":"function"==typeof e.options.emptyNodeText?e.options.emptyNodeText(t):e.options.emptyNodeText});s.push(l)}return!1})),u.DecorationSet.create(n,s))}}})]}}]),n}(i.Extension);t.Placeholder=le;var de=function(e){T(n,e);var t=Y(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return S(this,n),(e=t.call(this,r)).results=[],e.searchTerm=null,e._updating=!1,e}return x(n,[{key:"name",get:function(){return"search"}},{key:"defaultOptions",get:function(){return{autoSelectNext:!0,findClass:"find",searching:!1,caseSensitive:!1,disableRegex:!0,alwaysSearch:!1}}},{key:"commands",value:function(){var e=this;return{find:function(t){return e.find(t)},replace:function(t){return e.replace(t)},replaceAll:function(t){return e.replaceAll(t)},clearSearch:function(){return e.clear()}}}},{key:"findRegExp",get:function(){return RegExp(this.searchTerm,this.options.caseSensitive?"gu":"gui")}},{key:"decorations",get:function(){var e=this;return this.results.map((function(t){return u.Decoration.inline(t.from,t.to,{class:e.options.findClass})}))}},{key:"_search",value:function(e){var t=this;this.results=[];var n=[],r=0;this.searchTerm&&(e.descendants((function(e,t){e.isText?n[r]?n[r]={text:n[r].text+e.text,pos:n[r].pos}:n[r]={text:e.text,pos:t}:r+=1})),n.forEach((function(e){for(var n,r=e.text,o=e.pos,i=t.findRegExp;(n=i.exec(r))&&""!==n[0];)t.results.push({from:o+n.index,to:o+n.index+n[0].length})})))}},{key:"replace",value:function(e){var t=this;return function(n,r){if(t.results[0]){var o=t.results[0],i=o.from,a=o.to;r(n.tr.insertText(e,i,a)),t.editor.commands.find(t.searchTerm)}}}},{key:"rebaseNextResult",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t+1;if(!this.results[r])return null;var o=this.results[t],i=o.from,a=o.to,s=a-i-e.length+n,u=this.results[r],c=u.from,l=u.to;return this.results[r]={to:l-s,from:c-s},s}},{key:"replaceAll",value:function(e){var t=this;return function(n,r){var o,i=n.tr;t.results.length&&(t.results.forEach((function(n,r){var a=n.from,s=n.to;i.insertText(e,a,s),o=t.rebaseNextResult(e,r,o)})),r(i),t.editor.commands.find(t.searchTerm))}}},{key:"find",value:function(e){var t=this;return function(n,r){t.searchTerm=t.options.disableRegex?e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"):e,t.updateView(n,r)}}},{key:"clear",value:function(){var e=this;return function(t,n){e.searchTerm=null,e.updateView(t,n)}}},{key:"updateView",value:function(e,t){var n=e.tr;this._updating=!0,t(n),this._updating=!1}},{key:"createDeco",value:function(e){return this._search(e),this.decorations?u.DecorationSet.create(e,this.decorations):[]}},{key:"plugins",get:function(){var e=this;return[new i.Plugin({state:{init:function(){return u.DecorationSet.empty},apply:function(t,n){return e._updating||e.options.searching||t.docChanged&&e.options.alwaysSearch?e.createDeco(t.doc):t.docChanged?n.map(t.mapping,t.doc):n}},props:{decorations:function(e){return this.getState(e)}}})]}}]),n}(i.Extension);t.Search=de;var fe=function(e){T(n,e);var t=Y(n);function n(){return S(this,n),t.apply(this,arguments)}return x(n,[{key:"name",get:function(){return"trailing_node"}},{key:"defaultOptions",get:function(){return{node:"paragraph",notAfter:["paragraph"]}}},{key:"plugins",get:function(){var e=this,t=new i.PluginKey(this.name),n=Object.entries(this.editor.schema.nodes).map((function(e){return _(e,2)[1]})).filter((function(t){return e.options.notAfter.includes(t.name)}));return[new i.Plugin({key:t,view:function(){return{update:function(n){var r=n.state;if(t.getState(r)){var o=r.doc,i=r.schema,a=r.tr,s=i.nodes[e.options.node],u=a.insert(o.content.size,s.create());n.dispatch(u)}}}},state:{init:function(e,t){var r=t.tr.doc.lastChild;return!(0,c.nodeEqualsType)({node:r,types:n})},apply:function(e,t){if(!e.docChanged)return t;var r=e.doc.lastChild;return!(0,c.nodeEqualsType)({node:r,types:n})}}})]}}]),n}(i.Extension);t.TrailingNode=fe},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__endComposition=yt,t.__parseFromClipboard=ze,t.__serializeForClipboard=Fe,t.EditorView=t.DecorationSet=t.Decoration=void 0;var r=n(204),o=n(205),i=n(207),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),u=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var l=a.ie=!!(u||c||s);a.ie_version=u?document.documentMode||6:c?+c[1]:s?+s[1]:null,a.gecko=!l&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!l&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!d,a.chrome_version=d&&+d[1],a.safari=!l&&/Apple Computer/.test(navigator.vendor),a.ios=a.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),a.android=/Android \d/.test(navigator.userAgent),a.webkit="webkitFontSmoothing"in document.documentElement.style,a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var f=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},p=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},h=null,m=function(e,t,n){var r=h||(h=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},y=function(e,t,n,r){return n&&(v(e,t,n,r,-1)||v(e,t,n,r,1))},_=/^(img|br|input|textarea|hr)$/i;function v(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:g(e))){var i=e.parentNode;if(1!=i.nodeType||b(e)||_.test(e.nodeName)||"false"==e.contentEditable)return!1;t=f(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?g(e):0}}}function g(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function b(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var M=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function k(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function w(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function S(e,t){return"number"==typeof e?e:e[t]}function L(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function x(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=p(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,u=s?w(i):L(a),c=0,l=0;if(t.top<u.top+S(r,"top")?l=-(u.top-t.top+S(o,"top")):t.bottom>u.bottom-S(r,"bottom")&&(l=t.bottom-u.bottom+S(o,"bottom")),t.left<u.left+S(r,"left")?c=-(u.left-t.left+S(o,"left")):t.right>u.right-S(r,"right")&&(c=t.right-u.right+S(o,"right")),c||l)if(s)i.defaultView.scrollBy(c,l);else{var d=a.scrollLeft,f=a.scrollTop;l&&(a.scrollTop+=l),c&&(a.scrollLeft+=c);var h=a.scrollLeft-d,m=a.scrollTop-f;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(s)break}}function T(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=p(e));return t}function D(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var Y=null;function C(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,u=e.firstChild,c=0;u;u=u.nextSibling,c++){var l=void 0;if(1==u.nodeType)l=u.getClientRects();else{if(3!=u.nodeType)continue;l=m(u).getClientRects()}for(var d=0;d<l.length;d++){var f=l[d];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=u,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==u.nodeType&&p&&(i=c+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=E(r,1);if(i.top!=i.bottom&&A(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:C(n,r)}function A(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function O(e,t){var n,r,o,i,s=e.root;if(s.caretPositionFromPoint)try{var u=s.caretPositionFromPoint(t.left,t.top);u&&(o=(n=u).offsetNode,i=n.offset)}catch(e){}if(!o&&s.caretRangeFromPoint){var c=s.caretRangeFromPoint(t.left,t.top);c&&(o=(r=c).startContainer,i=r.startOffset)}var l,d=s.elementFromPoint(t.left,t.top+1);if(!d||!e.dom.contains(1!=d.nodeType?d.parentNode:d)){var f=e.dom.getBoundingClientRect();if(!A(t,f))return null;if(!(d=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),a=i;;){var s=t.childNodes[a];if(1==s.nodeType)for(var u=s.getClientRects(),c=0;c<u.length;c++){var l=u[c];if(A(n,l))return e(s,n,l)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,f)))return null}if(a.safari)for(var h=d;o&&h;h=p(h))h.draggable&&(o=i=null);if(d=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(d,t),o){if(a.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var m,y=o.childNodes[i];"IMG"==y.nodeName&&(m=y.getBoundingClientRect()).right<=t.left&&m.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==l&&(l=function(e,t,n){var r=C(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,d,t));var _=e.docView.nearestDesc(d,!0);return{pos:l,inside:_?_.posAtStart-_.border:-1}}function E(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var j=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function P(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,s=a.webkit||a.gecko;if(3==o.nodeType){if(!s||!j.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var u=i,c=i,l=n<0?1:-1;return n<0&&!i?(c++,l=-1):n>=0&&i==o.nodeValue.length?(u--,l=1):n<0?u--:c++,N(E(m(o,u,c),l),l<0)}var d=E(m(o,i,i),n);if(a.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=E(m(o,i-1,i-1),-1);if(f.top==d.top){var p=E(m(o,i,i+1),-1);if(p.top!=d.top)return N(p,p.left<f.left)}}return d}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==g(o))){var h=o.childNodes[i-1];if(1==h.nodeType)return H(h.getBoundingClientRect(),!1)}if(i<g(o)){var y=o.childNodes[i];if(1==y.nodeType)return H(y.getBoundingClientRect(),!0)}return H(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==g(o))){var _=o.childNodes[i-1],v=3==_.nodeType?m(_,g(_)-(s?0:1)):1!=_.nodeType||"BR"==_.nodeName&&_.nextSibling?null:_;if(v)return N(E(v,1),!1)}if(i<g(o)){var b=o.childNodes[i],M=3==b.nodeType?m(b,0,s?0:1):1==b.nodeType?b:null;if(M)return N(E(M,-1),!0)}return N(E(3==o.nodeType?m(o):o,-n),n>=0)}function N(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function H(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function R(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var I=/[\u0590-\u08ac]/;var F=null,z=null,$=!1;function B(e,t,n){return F==t&&z==n?$:(F=t,z=n,$="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return R(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=P(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=m(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top&&("up"==n?c.bottom<i.top+1:c.top>i.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=getSelection();return I.test(r.parent.textContent)&&s.modify?R(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var W=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},U={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0}};W.prototype.matchesWidget=function(){return!1},W.prototype.matchesMark=function(){return!1},W.prototype.matchesNode=function(){return!1},W.prototype.matchesHack=function(e){return!1},U.beforePosition.get=function(){return!1},W.prototype.parseRule=function(){return null},W.prototype.stopEvent=function(){return!1},U.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},U.border.get=function(){return 0},W.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},W.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},U.posBefore.get=function(){return this.parent.posBeforeChild(this)},U.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},U.posAfter.get=function(){return this.posBefore+this.size},U.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},W.prototype.localPosFromDOM=function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>f(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.parentNode.firstChild!=u)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},W.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},W.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},W.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1},W.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},W.prototype.domFromPos=function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,o=!0;;r++,o=!1){for(;r<this.children.length&&(this.children[r].beforePosition||this.children[r].dom.parentNode!=this.contentDOM);)n+=this.children[r++].size;var i=r==this.children.length?null:this.children[r];if(n==e&&(0==t||!i||!i.size||i.border||t<0&&o)||i&&i.domAtom&&e<n+i.size)return{node:this.contentDOM,offset:i?f(i.dom):this.contentDOM.childNodes.length};if(!i)throw new Error("Invalid position "+e);var a=n+i.size;if(!i.domAtom&&(t<0&&!i.border?a>=e:a>e)&&(a>e||r+1>=this.children.length||!this.children[r+1].beforePosition))return i.domFromPos(e-n-i.border,t);n=a}},W.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],u=i+s.size;if(-1==r&&e<=u){var c=i+s.border;if(e>=c&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var l=a;l>0;l--){var d=this.children[l-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=f(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var p=a+1;p<this.children.length;p++){var h=this.children[p];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=f(h.dom);break}t+=h.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},W.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},W.prototype.domAfterPos=function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},W.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),s=0,u=0;s<this.children.length;s++){var c=this.children[s],l=u+c.size;if(o>u&&i<l)return c.setSelection(e-u-c.border,t-u-c.border,n,r);u=l}var d=this.domFromPos(e,e?-1:1),p=t==e?d:this.domFromPos(t,t?-1:1),h=n.getSelection(),m=!1;if((a.gecko||a.safari)&&e==t){var _=d.node,v=d.offset;if(3==_.nodeType){if((m=v&&"\n"==_.nodeValue[v-1])&&v==_.nodeValue.length)for(var g=_,b=void 0;g;g=g.parentNode){if(b=g.nextSibling){"BR"==b.nodeName&&(d=p={node:b.parentNode,offset:f(b)+1});break}var M=g.pmViewDesc;if(M&&M.node&&M.node.isBlock)break}}else{var k=_.childNodes[v-1];m=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(a.gecko&&h.focusNode&&h.focusNode!=p.node&&1==h.focusNode.nodeType){var w=h.focusNode.childNodes[h.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||m&&a.safari||!y(d.node,d.offset,h.anchorNode,h.anchorOffset)||!y(p.node,p.offset,h.focusNode,h.focusOffset)){var S=!1;if((h.extend||e==t)&&!m){h.collapse(d.node,d.offset);try{e!=t&&h.extend(p.node,p.offset),S=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!S){if(e>t){var L=d;d=p,p=L}var x=document.createRange();x.setEnd(p.node,p.offset),x.setStart(d.node,d.offset),h.removeAllRanges(),h.addRange(x)}}},W.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},U.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},W.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM?2:3}n=i}this.dirty=2},W.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}},U.domAtom.get=function(){return!1},Object.defineProperties(W.prototype,U);var q=[],V=function(e){function t(t,n,r,o){var i,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}e.call(this,t,q,a,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={beforePosition:{configurable:!0},domAtom:{configurable:!0}};return n.beforePosition.get=function(){return this.widget.type.side<0},t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},t.prototype.ignoreMutation=function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(W),J=function(e){function t(t,n,r,o){e.call(this,t,q,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},t.prototype.localPosFromDOM=function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t},t.prototype.domFromPos=function(e){return{node:this.textDOM,offset:e}},t.prototype.ignoreMutation=function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue},Object.defineProperties(t.prototype,n),t}(W),G=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,r,i){var a=i.nodeViews[n.type.name],s=a&&a(n,i,r);return s&&s.dom||(s=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,s.dom,s.contentDOM||s.dom)},t.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=de(i,n,a,r)),e>0&&(i=de(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(W),K=function(e){function t(t,n,r,o,i,a,s,u,c){e.call(this,t,n.isLeaf?q:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(u,c)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return t.create=function(e,n,r,i,a,s){var u,c,l=a.nodeViews[n.type.name],d=l&&l(n,a,(function(){return c?c.parent?c.parent.posBeforeChild(c):void 0:s}),r,i),f=d&&d.dom,p=d&&d.contentDOM;if(n.isText)if(f){if(3!=f.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else f=document.createTextNode(n.text);else f||(f=(u=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=u.contentDOM);p||n.isText||"BR"==f.nodeName||(f.hasAttribute("contenteditable")||(f.contentEditable=!1),n.type.spec.draggable&&(f.draggable=!0));var h=f;return f=ae(f,r,n),d?c=new ee(e,n,r,i,f,p,h,d,a,s+1):n.isText?new X(e,n,r,i,f,h,a):new t(e,n,r,i,f,p,h,a,s+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?o.Fragment.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&se(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,r=this.node.inlineContent,i=t,s=e.composing&&this.localCompositionInfo(e,t),u=s&&s.pos>-1?s:null,c=s&&s.pos<0,l=new ce(this,u&&u.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var u=0,c=[],l=null,d=0;;){if(u<o.length&&o[u].to==i){for(var f=o[u++],p=void 0;u<o.length&&o[u].to==i;)(p||(p=[f])).push(o[u++]);if(p){p.sort(le);for(var h=0;h<p.length;h++)n(p[h],d,!!l)}else n(f,d,!!l)}var m=void 0,y=void 0;if(l)y=-1,m=l,l=null;else{if(!(d<e.childCount))break;y=d,m=e.child(d++)}for(var _=0;_<c.length;_++)c[_].to<=i&&c.splice(_--,1);for(;u<o.length&&o[u].from<=i&&o[u].to>i;)c.push(o[u++]);var v=i+m.nodeSize;if(m.isText){var g=v;u<o.length&&o[u].from<g&&(g=o[u].from);for(var b=0;b<c.length;b++)c[b].to<g&&(g=c[b].to);g<v&&(l=m.cut(g-i),m=m.cut(0,g-i),v=g,y=-1)}var M=c.length?m.isInline&&!m.isLeaf?c.filter((function(e){return!e.inline})):c.slice():q;r(m,M,t.forChild(i,m),y),i=v}}(this.node,this.innerDeco,(function(t,a,s){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!s&&l.syncToMarks(a==n.node.childCount?o.Mark.none:n.node.child(a).marks,r,e),l.placeWidget(t,e,i)}),(function(t,n,o,a){var u;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,o,a)||c&&e.state.selection.from>i&&e.state.selection.to<i+t.nodeSize&&(u=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(t,n,o,u,e)||l.updateNextNode(t,n,o,e,a)||l.addNode(t,n,o,e,i),i+=t.nodeSize})),l.syncToMarks(q,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(u&&this.protectLocalComposition(e,u),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;a<n.length;a++){var s=n[a],u=s.dom;if(u.parentNode==t){for(;u!=o;)o=ue(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(u,o);if(s instanceof G){var c=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=c?c.nextSibling:t.firstChild}}for(;o;)o=ue(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),a.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))},t.prototype.localCompositionInfo=function(e,t){var n=e.state.selection,o=n.from,i=n.to;if(!(!(e.state.selection instanceof r.TextSelection)||o<t||i>t+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=g(e)}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(a.focusNode,a.focusOffset);if(s&&this.dom.contains(s.parentNode)){if(this.node.inlineContent){var u=s.nodeValue,c=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var u=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;u+=c.text}if(i>=n){var l=u.lastIndexOf(t,r-s);if(l>=0&&l+t.length+s>=n)return s+l}}}return-1}(this.node.content,u,o-t,i-t);return c<0?null:{node:s,pos:c,text:u}}return{node:s,pos:-1}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new J(this,i,n,o);e.compositionNodes.push(a),this.children=de(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!se(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=oe(this.dom,this.nodeDOM,re(this.outerDeco,this.node,t),re(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,n),t}(W);function Z(e,t,n,r,o){return ae(r,t,e),new K(null,e,t,n,r,r,r,o,0)}var X=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t.prototype.markDirty=function(t,n){e.prototype.markDirty.call(this,t,n),this.dom==this.nodeDOM||0!=t&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,n),t}(K),Q=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(e){return 0==this.dirty&&this.dom.nodeName==e},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(W),ee=function(e){function t(t,n,r,o,i,a,s,u,c,l){e.call(this,t,n,r,o,i,a,s,c,l),this.spec=u}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(K);function te(e){e&&(this.nodeName=e)}te.prototype=Object.create(null);var ne=[new te];function re(e,t,n){if(0==e.length)return ne;for(var r=n?ne[0]:new te,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new te(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==o.length&&o.push(r=new te(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+u:"style"==s?r.style=(r.style?r.style+";":"")+u:"nodeName"!=s&&(r[s]=u))}}return o}function oe(e,t,n,r){if(n==ne&&r==ne)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var u=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.tagName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(o),s=ne[0]),o=u}ie(o,s||ne[0],a)}return o}function ie(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):q,a=n.class?n.class.split(" ").filter(Boolean):q,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var u=0;u<a.length;u++)-1==i.indexOf(a[u])&&e.classList.add(a[u])}if(t.style!=n.style){if(t.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function ae(e,t,n){return oe(e,e,ne,re(t,n,1!=e.nodeType))}function se(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ue(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var ce=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){for(var n=e.childCount,r=t.length,o=new Map;n>0&&r>0;r--){var i=t[r-1],a=i.node;if(a){if(a!=e.child(n-1))break;--n,o.set(i,n)}}return{index:n,matched:o}}(e.node.content,e.children)};function le(e,t){return e.type.side-t.type.side}function de(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var u=e[a],c=s,l=s+=u.size;c>=n||l<=t?i.push(u):(c<t&&i.push(u.slice(0,t-c,r)),o&&(i.push(o),o=null),l>n&&i.push(u.slice(n-c,u.size,r)))}return i}function fe(e,t){var n=e.root.getSelection(),o=e.state.doc;if(!n.focusNode)return null;var i=e.docView.nearestDesc(n.focusNode),a=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var u,c,l=o.resolve(s);if(M(n)){for(u=l;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&r.NodeSelection.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function(e,t,n){for(var r=0==t,o=t==g(e);r||o;){if(e==n)return!0;var i=f(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==g(e)}}(n.focusNode,n.focusOffset,i.dom))){var d=i.posBefore;c=new r.NodeSelection(s==d?l:o.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;u=o.resolve(p)}c||(c=Me(e,u,l,"pointer"==t||e.state.selection.head<l.pos&&!a?1:-1));return c}function pe(e){return e.editable?e.hasFocus():ke(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function he(e,t){var n=e.state.selection;if(ge(e,n),pe(e)){if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,f(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&a.ie&&a.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var o,i,s=n.anchor,u=n.head;!me||n instanceof r.TextSelection||(n.$from.parent.inlineContent||(o=ye(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=ye(e,n.to))),e.docView.setSelection(s,u,e.root,t),me&&(o&&ve(o),i&&ve(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),setTimeout((function(){pe(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}ce.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},ce.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ce.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}},ce.prototype.findNodeMatch=function(e,t,n,r){var o=this.top.children,i=-1;if(r>=this.preMatch.index){for(var a=this.index;a<o.length;a++)if(o[a].matchesNode(e,t,n)){i=a;break}}else for(var s=this.index,u=Math.min(o.length,s+1);s<u;s++){var c=o[s];if(c.matchesNode(e,t,n)&&!this.preMatch.matched.has(c)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},ce.prototype.updateNodeAt=function(e,t,n,r,o){return!!this.top.children[r].update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)},ce.prototype.findIndexWithChild=function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}},ce.prototype.updateNextNode=function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof K){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&se(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1},ce.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,K.create(this.top,e,t,n,r,o)),this.changed=!0},ce.prototype.placeWidget=function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new V(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},ce.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof G;)e=e.children[e.children.length-1];e&&e instanceof X&&!/\n$/.test(e.node.text)||(a.safari&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},ce.prototype.addHackNode=function(e){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(e))this.index++;else{var t=document.createElement(e);this.top.children.splice(this.index++,0,new Q(this.top,q,t,null)),this.changed=!0}};var me=a.safari||a.chrome&&a.chrome_version<63;function ye(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,s=o?r.childNodes[o-1]:null;if(a.safari&&i&&"false"==i.contentEditable)return _e(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return _e(i);if(s)return _e(s)}}function _e(e){return e.contentEditable="true",a.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function ve(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function ge(e,t){if(t instanceof r.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(be(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else be(e)}function be(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function Me(e,t,n,o){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||r.TextSelection.between(t,n,o)}function ke(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function we(e,t){var n=e.selection,o=n.$anchor,i=n.$head,a=t>0?o.max(i):o.min(i),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&r.Selection.findFrom(s,t)}function Se(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Le(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return Se(e,new r.TextSelection(t>0?o.$to:o.$from));var i=we(e.state,t);return!!i&&Se(e,i)}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var s=we(e.state,t);return!!(s&&s instanceof r.NodeSelection)&&Se(e,s)}if(!(a.mac&&n.indexOf("m")>-1)){var u,c=o.$head,l=c.textOffset?null:t<0?c.nodeBefore:c.nodeAfter;if(!l||l.isText)return!1;var d=t<0?c.pos-l.nodeSize:c.pos;return!!(l.isAtom||(u=e.docView.descAt(d))&&!u.contentDOM)&&(r.NodeSelection.isSelectable(l)?Se(e,new r.NodeSelection(t<0?e.state.doc.resolve(c.pos-l.nodeSize):c)):!!a.webkit&&Se(e,new r.TextSelection(e.state.doc.resolve(t<0?d:d+l.nodeSize))))}}function xe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Te(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function De(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r<xe(n)&&Te(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;var u=n.childNodes[r-1];if(Te(u))o=n,i=--r;else{if(3!=u.nodeType)break;r=(n=u).nodeValue.length}}else{if(Ce(n))break;for(var c=n.previousSibling;c&&Te(c);)o=n.parentNode,i=f(c),c=c.previousSibling;if(c)r=xe(n=c);else{if((n=n.parentNode)==e.dom)break;r=0}}s?Ae(e,t,n,r):o&&Ae(e,t,o,i)}}function Ye(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=xe(n);;)if(r<a){if(1!=n.nodeType)break;if(!Te(n.childNodes[r]))break;o=n,i=++r}else{if(Ce(n))break;for(var s=n.nextSibling;s&&Te(s);)o=s.parentNode,i=f(s)+1,s=s.nextSibling;if(s)r=0,a=xe(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Ae(e,t,o,i)}}function Ce(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ae(e,t,n,r){if(M(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&he(e)}),50)}function Oe(e,t,n){var o=e.state.selection;if(o instanceof r.TextSelection&&!o.empty||n.indexOf("s")>-1)return!1;if(a.mac&&n.indexOf("m")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var u=we(e.state,t);if(u&&u instanceof r.NodeSelection)return Se(e,u)}if(!i.parent.inlineContent){var c=t<0?i:s,l=o instanceof r.AllSelection?r.Selection.near(c,t):r.Selection.findFrom(c,t);return!!l&&Se(e,l)}return!1}function Ee(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,a=n.empty;if(!o.sameParent(i))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(s&&!s.isText){var u=e.state.tr;return t<0?u.delete(o.pos-s.nodeSize,o.pos):u.delete(o.pos,o.pos+s.nodeSize),e.dispatch(u),!0}return!1}function je(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Pe(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?Ee(e,-1)||De(e):46==n||a.mac&&68==n&&"c"==r?Ee(e,1)||Ye(e):13==n||27==n||(37==n?Le(e,-1,r)||De(e):39==n?Le(e,1,r)||Ye(e):38==n?Oe(e,-1,r)||De(e):40==n?function(e){if(a.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;je(e,o,!0),setTimeout((function(){return je(e,o,!1)}),20)}}}(e)||Oe(e,1,r)||Ye(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ne(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(a.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||a.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function He(e,t,n,i,s){if(t<0){var u=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,c=fe(e,u);if(c&&!e.state.selection.eq(c)){var l=e.state.tr.setSelection(c);"pointer"==u?l.setMeta("pointer",!0):"key"==u&&l.scrollIntoView(),e.dispatch(l)}}else{var d=e.state.doc.resolve(t),f=d.sharedDepth(n);t=d.before(f+1),n=e.state.doc.resolve(n).after(f+1);var p=e.state.selection,h=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,u=r.toOffset,c=r.from,l=r.to,d=e.root.getSelection(),f=null,p=d.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(f=[{node:p,offset:d.anchorOffset}],M(d)||f.push({node:d.focusNode,offset:d.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var h=u;h>s;h--){var m=i.childNodes[h-1],y=m.pmViewDesc;if("BR"==m.nodeName&&!y){u=h;break}if(!y||y.size)break}var _=e.state.doc,v=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),g=_.resolve(c),b=null,k=v.parse(i,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:s,to:u,preserveWhitespace:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:f,ruleFromNode:Ne,context:g});if(f&&null!=f[0].pos){var w=f[0].pos,S=f[1]&&f[1].pos;null==S&&(S=w),b={anchor:w+c,head:S+c}}return{doc:k,sel:b,from:c,to:l}}(e,t,n);if(a.chrome&&e.cursorWrapper&&h.sel&&h.sel.anchor==e.cursorWrapper.deco.from){var m=e.cursorWrapper.deco.type.toDOM.nextSibling,y=m&&m.nodeValue?m.nodeValue.length:1;h.sel={anchor:h.sel.anchor+y,head:h.sel.anchor+y}}var _,v,g=e.state.doc,b=g.slice(h.from,h.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(_=e.state.selection.to,v="end"):(_=e.state.selection.from,v="start"),e.lastKeyCode=null;var w=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,u=a.b;if("end"==o){var c=Math.max(0,i-Math.min(s,u));r-=s+c-i}if(s<i&&e.size<t.size){u=(i-=r<=i&&r>=s?i-r:0)+(u-s),s=i}else if(u<i){s=(i-=r<=i&&r>=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(b.content,h.doc.content,h.from,_,v);if(!w){if(!(i&&p instanceof r.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||h.sel&&h.sel.anchor!=h.sel.head){if((a.ios&&e.lastIOSEnter>Date.now()-225||a.android)&&s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})))return void(e.lastIOSEnter=0);if(h.sel){var S=Re(e,e.state.doc,h.sel);S&&!S.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(S))}return}w={start:p.from,endA:p.to,endB:p.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof r.TextSelection&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),a.ie&&a.ie_version<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>h.from&&" "==h.doc.textBetween(w.start-h.from-1,w.start-h.from+1)&&(w.start--,w.endA--,w.endB--);var L,x=h.doc.resolveNoCache(w.start-h.from),T=h.doc.resolveNoCache(w.endB-h.from),D=x.sameParent(T)&&x.parent.inlineContent;if((a.ios&&e.lastIOSEnter>Date.now()-225&&(!D||s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!D&&x.pos<h.doc.content.size&&(L=r.Selection.findFrom(h.doc.resolve(x.pos+1),1,!0))&&L.head==T.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})))e.lastIOSEnter=0;else if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Ie(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Ie(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Ie(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(g,w.start,w.endA,x,T)&&e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))a.android&&a.chrome&&e.domObserver.suppressSelectionUpdates();else{a.chrome&&a.android&&w.toB==w.from&&(e.lastAndroidDelete=Date.now()),a.android&&!D&&x.start()!=T.start()&&0==T.parentOffset&&x.depth==T.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==w.endA&&(w.endB-=2,T=h.doc.resolveNoCache(w.endB-h.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))}))}),20));var Y,C,A,O,E=w.start,j=w.endA;if(D)if(x.pos==T.pos)a.ie&&a.ie_version<=11&&0==x.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return he(e)}),20)),Y=e.state.tr.delete(E,j),C=g.resolve(w.start).marksAcross(g.resolve(w.endA));else if(w.endA==w.endB&&(O=g.resolve(w.start))&&(A=function(e,t){for(var n,r,i,a=e.firstChild.marks,s=t.firstChild.marks,u=a,c=s,l=0;l<s.length;l++)u=s[l].removeFromSet(u);for(var d=0;d<a.length;d++)c=a[d].removeFromSet(c);if(1==u.length&&0==c.length)r=u[0],n="add",i=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=u.length||1!=c.length)return null;r=c[0],n="remove",i=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],p=0;p<t.childCount;p++)f.push(i(t.child(p)));if(o.Fragment.from(f).eq(e))return{mark:r,type:n}}(x.parent.content.cut(x.parentOffset,T.parentOffset),O.parent.content.cut(O.parentOffset,w.endA-O.start()))))Y=e.state.tr,"add"==A.type?Y.addMark(E,j,A.mark):Y.removeMark(E,j,A.mark);else if(x.parent.child(x.index()).isText&&x.index()==T.index()-(T.textOffset?0:1)){var P=x.parent.textBetween(x.parentOffset,T.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,E,j,P)})))return;Y=e.state.tr.insertText(P,E,j)}if(Y||(Y=e.state.tr.replace(E,j,h.doc.slice(w.start-h.from,w.endB-h.from))),h.sel){var N=Re(e,Y.doc,h.sel);N&&!(a.chrome&&a.android&&e.composing&&N.empty&&(w.start!=w.endB||e.lastAndroidDelete<Date.now()-100)&&(N.head==E||N.head==Y.mapping.map(j)-1)||a.ie&&N.empty&&N.head==E)&&Y.setSelection(N)}C&&Y.ensureMarks(C),e.dispatch(Y.scrollIntoView())}}}function Re(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Me(e,t.resolve(n.anchor),t.resolve(n.head))}function Ie(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Fe(e,t){for(var n=[],r=t.content,i=t.openStart,a=t.openEnd;i>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,a--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var u=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),c=qe(),l=c.createElement("div");l.appendChild(u.serializeFragment(r,{document:c}));for(var d,f=l.firstChild;f&&1==f.nodeType&&(d=We[f.nodeName.toLowerCase()]);){for(var p=d.length-1;p>=0;p--){for(var h=c.createElement(d[p]);l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:l,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function ze(e,t,n,r,i){var s,u,c=i.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||c||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,c||r)})),c)return new o.Slice(o.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0);var d=e.someProp("clipboardTextParser",(function(e){return e(t,i,r)}));if(d)u=d;else{var f=i.marks(),p=e.state.schema,h=o.DOMSerializer.fromSchema(p);s=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){s.appendChild(document.createElement("p")).appendChild(h.serializeNode(p.text(e,f)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),s=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=qe().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&We[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),a.webkit&&function(e){for(var t=e.querySelectorAll(a.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(s);var m=s&&s.querySelector("[data-pm-slice]"),y=m&&/^(\d+) (\d+) (.*)/.exec(m.getAttribute("data-pm-slice"));if(!u){var _=e.someProp("clipboardParser")||e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema);u=_.parseSlice(s,{preserveWhitespace:!(!l&&!y),context:i})}return u=y?function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var i=e.content,a=e.openStart,s=e.openEnd,u=n.length-2;u>=0;u-=2){var c=r.nodes[n[u]];if(!c||c.hasRequiredAttrs())break;i=o.Fragment.from(c.create(n[u+1],i)),a++,s++}return new o.Slice(i,a,s)}(function(e,t,n){t<e.openStart&&(e=new o.Slice(Be(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd));n<e.openEnd&&(e=new o.Slice(Be(e.content,1,n,e.openEnd,0,0),e.openStart,n));return e}(u,+y[1],+y[2]),y[3]):o.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),i=void 0,a=[];if(e.forEach((function(e){if(a){var t,n=r.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&i.length&&function e(t,n,r,i,a){if(a<t.length&&a<n.length&&t[a]==n[a]){var s=e(t,n,r,i.lastChild,a+1);if(s)return i.copy(i.content.replaceChild(i.childCount-1,s));if(i.contentMatchAt(i.childCount).matchType(a==t.length-1?r.type:t[a+1]))return i.copy(i.content.append(o.Fragment.from($e(r,t,a+1))))}}(n,i,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;var r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),i=t.contentMatchAt(t.childCount).fillBefore(o.Fragment.empty,!0);return t.copy(r.append(i))}(a[a.length-1],i.length));var s=$e(e,n);a.push(s),r=r.matchType(s.type,s.attrs),i=n}}})),a)return{v:o.Fragment.from(a)}},r=t.depth;r>=0;r--){var i=n(r);if(i)return i.v}return e}(u.content,i),!1),e.someProp("transformPasted",(function(e){u=e(u)})),u}function $e(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function Be(e,t,n,r,i,a){var s=t<0?e.firstChild:e.lastChild,u=s.content;return i<r-1&&(u=Be(u,t,n,r,i+1,a)),i>=n&&(u=t<0?s.contentMatchAt(0).fillBefore(u,e.childCount>1||a<=i).append(u):u.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(u))}var We={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Ue=null;function qe(){return Ue||(Ue=document.implementation.createHTMLDocument("title"))}var Ve={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Je=a.ie&&a.ie_version<=11,Ge=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Ge.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Ge.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Ke=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)n.queue.push(e[t]);a.ie&&a.ie_version<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Ge,Je&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Ke.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Ke.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ke.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ve),Je&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ke.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}Je&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Ke.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Ke.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Ke.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},Ke.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&ke(e)){var e;if(this.suppressingSelectionUpdates)return he(this.view);if(a.ie&&a.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&y(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Ke.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Ke.prototype.ignoreSelectionChange=function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0},Ke.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&ke(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var u=0;u<e.length;u++){var c=this.registerMutation(e[u],s);c&&(r=r<0?c.from:Math.min(c.from,r),o=o<0?c.to:Math.max(c.to,o),c.typeOver&&(i=!0))}if(a.gecko&&s.length>1){var l=s.filter((function(e){return"BR"==e.nodeName}));if(2==l.length){var d=l[0],f=l[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Ze)return;Ze=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||he(this.view),this.currentSelection.set(t))}},Ke.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(a.ie&&a.ie_version<=11&&e.addedNodes.length)for(var s=0;s<e.addedNodes.length;s++){var u=e.addedNodes[s],c=u.previousSibling,l=u.nextSibling;(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(o=c),(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(i=l)}var d=o&&o.parentNode==e.target?f(o)+1:0,p=n.localPosFromDOM(e.target,d,-1),h=i&&i.parentNode==e.target?f(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,h,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var Ze=!1;var Xe={},Qe={};function et(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function tt(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return nt(e,t)})}))}function nt(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function rt(e){return{left:e.clientX,top:e.clientY}}function ot(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if(u)return u.v}return!1}function it(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function at(e,t,n,o,i){return ot(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var u=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(u)){o=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=o&&(it(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(it(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function st(e,t,n,r){return ot(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ut(e,t,n,o){return ot(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t,n){if(0!=n.button)return!1;var o=e.state.doc;if(-1==t)return!!o.inlineContent&&(it(e,r.TextSelection.create(o,0,o.content.size),"pointer"),!0);for(var i=o.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a),u=i.before(a);if(s.inlineContent)it(e,r.TextSelection.create(o,u+1,u+1+s.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(s))continue;it(e,r.NodeSelection.create(o,u),"pointer")}return!0}}(e,n,o)}function ct(e){return yt(e)}Qe.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!ft(e,t))if(229!=t.keyCode&&e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!a.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Pe(e,t)?t.preventDefault():et(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Qe.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Qe.keypress=function(e,t){if(!(ft(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection&&n.$from.sameParent(n.$to))){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var lt=a.mac?"metaKey":"ctrlKey";Xe.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ct(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[lt]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(rt(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new dt(e,i,t,n)):("doubleClick"==o?st:ut)(e,i.pos,i.inside,t)?t.preventDefault():et(e,"pointer"))};var dt=function(e,t,n,o){var i,s,u=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[lt],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var c=e.state.doc.resolve(t.pos);i=c.parent,s=c.depth?c.before():0}this.mightDrag=null;var l=o?null:n.target,d=l?e.docView.nearestDesc(l,!0):null;this.target=d?d.dom:null;var f=e.state.selection;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof r.NodeSelection&&f.from<=s&&f.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){u.view.mouseDown==u&&u.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),et(e,"pointer")};function ft(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}dt.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},dt.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(rt(e))),this.allowDefault||!t?et(this.view,"pointer"):at(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(it(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):et(this.view,"pointer")}},dt.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),et(this.view,"pointer"),0==e.buttons&&this.done()},Xe.touchdown=function(e){ct(e),et(e,"pointer")},Xe.contextmenu=function(e){return ct(e)};var pt=a.android?5e3:-1;function ht(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return yt(e)}),t))}function mt(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function yt(e,t){if(e.domObserver.forceFlush(),mt(e),t||e.docView.dirty){var n=fe(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}Qe.compositionstart=Qe.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),yt(e,!0),e.markCursor=null;else if(yt(e),a.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}o=s,i=-1}e.composing=!0}ht(e,pt)},Qe.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ht(e,20))};var _t=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function vt(e,t,n,r){var i=ze(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,i||o.Slice.empty)})))return!0;if(!i)return!1;var a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=a?e.state.tr.replaceSelectionWith(a,e.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Xe.copy=Qe.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=_t?null:t.clipboardData,i=Fe(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Qe.paste=function(e,t){var n=_t?null:t.clipboardData;n&&vt(e,n.getData("text/plain"),n.getData("text/html"),t)?t.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?vt(e,r.value,null,t):vt(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var gt=function(e,t){this.slice=e,this.move=t},bt=a.mac?"altKey":"ctrlKey";for(var Mt in Xe.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(rt(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var a=e.docView.nearestDesc(t.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=Fe(e,s),c=u.dom,l=u.text;t.dataTransfer.clearData(),t.dataTransfer.setData(_t?"Text":"text/html",c.innerHTML),t.dataTransfer.effectAllowed="copyMove",_t||t.dataTransfer.setData("text/plain",l),e.dragging=new gt(s,!t[bt])}},Xe.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Qe.dragover=Qe.dragenter=function(e,t){return t.preventDefault()},Qe.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var a=e.posAtCoords(rt(t));if(a){var s=e.state.doc.resolve(a.pos);if(s){var u=n&&n.slice;u?e.someProp("transformPasted",(function(e){u=e(u)})):u=ze(e,t.dataTransfer.getData(_t?"Text":"text/plain"),_t?null:t.dataTransfer.getData("text/html"),!1,s);var c=n&&!t[bt];if(e.someProp("handleDrop",(function(n){return n(e,t,u||o.Slice.empty,c)})))t.preventDefault();else if(u){t.preventDefault();var l=u?(0,i.dropPoint)(e.state.doc,s.pos,u):s.pos;null==l&&(l=s.pos);var d=e.state.tr;c&&d.deleteSelection();var f=d.mapping.map(l),p=0==u.openStart&&0==u.openEnd&&1==u.content.childCount,h=d.doc;if(p?d.replaceRangeWith(f,f,u.content.firstChild):d.replaceRange(f,f,u),!d.doc.eq(h)){var m=d.doc.resolve(f);if(p&&r.NodeSelection.isSelectable(u.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(u.content.firstChild))d.setSelection(new r.NodeSelection(m));else{var y=d.mapping.map(l);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,r){return y=r})),d.setSelection(Me(e,m,d.doc.resolve(y)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}}}}}},Xe.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&he(e)}),20))},Xe.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},Xe.beforeinput=function(e,t){if(a.chrome&&a.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Qe)Xe[Mt]=Qe[Mt];function kt(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var wt=function(e,t){this.spec=t||Yt,this.side=this.spec.side||0,this.toDOM=e};wt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new xt(i-n,i-n,this)},wt.prototype.valid=function(){return!0},wt.prototype.eq=function(e){return this==e||e instanceof wt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&kt(this.spec,e.spec))};var St=function(e,t){this.spec=t||Yt,this.attrs=e};St.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new xt(o,i,this)},St.prototype.valid=function(e,t){return t.from<t.to},St.prototype.eq=function(e){return this==e||e instanceof St&&kt(this.attrs,e.attrs)&&kt(this.spec,e.spec)},St.is=function(e){return e.type instanceof St};var Lt=function(e,t){this.spec=t||Yt,this.attrs=e};Lt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new xt(o.pos-n,i.pos-n,this)},Lt.prototype.valid=function(e,t){var n=e.content.findIndex(t.from),r=n.index,o=n.offset;return o==t.from&&o+e.child(r).nodeSize==t.to},Lt.prototype.eq=function(e){return this==e||e instanceof Lt&&kt(this.attrs,e.attrs)&&kt(this.spec,e.spec)};var xt=function(e,t,n){this.from=e,this.to=t,this.type=n};t.Decoration=xt;var Tt={spec:{configurable:!0},inline:{configurable:!0}};xt.prototype.copy=function(e,t){return new xt(e,t,this.type)},xt.prototype.eq=function(e,t){return void 0===t&&(t=0),this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to},xt.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},xt.widget=function(e,t,n){return new xt(e,e,new wt(t,n))},xt.inline=function(e,t,n,r){return new xt(e,t,new St(n,r))},xt.node=function(e,t,n,r){return new xt(e,t,new Lt(n,r))},Tt.spec.get=function(){return this.type.spec},Tt.inline.get=function(){return this.type instanceof St},Object.defineProperties(xt.prototype,Tt);var Dt=[],Yt={},Ct=function(e,t){this.local=e&&e.length?e:Dt,this.children=t&&t.length?t:Dt};t.DecorationSet=Ct,Ct.create=function(e,t){return t.length?Nt(t,e,0,Yt):At},Ct.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Ct.prototype.findInner=function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}},Ct.prototype.map=function(e,t,n){return this==At||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Yt)},Ct.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;a<this.local.length;a++){var s=this.local[a].map(e,n,r);s&&s.type.valid(t,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),u=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;-1==u||e>u+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c))}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,d=0;d<s.length;d+=3)if(-1==s[d+1]){var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){l=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),y=m.index,_=m.offset,v=r.maybeChild(y);if(v&&_==p&&_+v.nodeSize==h){var g=s[d+2].mapInner(n,v,f+1,e[d]+i+1,a);g!=At?(s[d]=p,s[d+1]=h,s[d+2]=g):(s[d+1]=-2,l=!0)}else l=!0}if(l){var b=Nt(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var u=e.local[i].map(r,o,t);u?n.push(u):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var u=0;u<e.length;u+=3)-1==e[u+1]&&s(e[u+2],t[u]+i+1);return n}(s,e,t||[],n,o,i,a),r,0,a);t=b.local;for(var M=0;M<s.length;M+=3)s[M+1]<0&&(s.splice(M,3),M-=3);for(var k=0,w=0;k<b.children.length;k+=3){for(var S=b.children[k];w<s.length&&s[w]<S;)w+=3;s.splice(w,0,b.children[k],b.children[k+1],b.children[k+2])}}return new Ct(t&&t.sort(Ht),s)}(this.children,i,e,t,n,r,o):i?new Ct(i.sort(Ht)):At},Ct.prototype.add=function(e,t){return t.length?this==At?Ct.create(e,t):this.addInner(e,t,0):this},Ct.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,a){var s,u=a+n;if(s=jt(t,e,u)){for(r||(r=o.children.slice());i<r.length&&r[i]<a;)i+=3;r[i]==a?r[i+2]=r[i+2].addInner(e,s,u+1):r.splice(i,0,a,a+e.nodeSize,Nt(s,e,u+1,Yt)),i+=3}}));for(var a=Et(i?Pt(t):t,-n),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Ct(a.length?this.local.concat(a).sort(Ht):this.local,r||this.children)},Ct.prototype.remove=function(e){return 0==e.length||this==At?this:this.removeInner(e,0)},Ct.prototype.removeInner=function(e,t){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,a=n[o]+t,s=n[o+1]+t,u=0,c=void 0;u<e.length;u++)(c=e[u])&&c.from>a&&c.to<s&&(e[u]=null,(i||(i=[])).push(c));if(i){n==this.children&&(n=this.children.slice());var l=n[o+2].removeInner(i,a+1);l!=At?n[o+2]=l:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,f=void 0;d<e.length;d++)if(f=e[d])for(var p=0;p<r.length;p++)r[p].eq(f,t)&&(r==this.local&&(r=this.local.slice()),r.splice(p--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Ct(r,n):At},Ct.prototype.forChild=function(e,t){if(this==At)return this;if(t.isLeaf)return Ct.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;s<this.local.length;s++){var u=this.local[s];if(u.from<a&&u.to>i&&u.type instanceof St){var c=Math.max(i,u.from)-i,l=Math.min(a,u.to)-i;c<l&&(r||(r=[])).push(u.copy(c,l))}}if(r){var d=new Ct(r.sort(Ht));return n?new Ot([d,n]):d}return n||At},Ct.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Ct)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(var t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0},Ct.prototype.locals=function(e){return Rt(this.localsInner(e))},Ct.prototype.localsInner=function(e){if(this==At)return Dt;if(e.inlineContent||!this.local.some(St.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof St||t.push(this.local[n]);return t};var At=new Ct;Ct.empty=At,Ct.removeOverlap=Rt;var Ot=function(e){this.members=e};function Et(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new xt(o.from+t,o.to+t,o.type))}return n}function jt(e,t,n){if(t.isLeaf)return null;for(var r=n+t.nodeSize,o=null,i=0,a=void 0;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function Pt(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Nt(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=jt(e,t,a+n);if(s){i=!0;var u=Nt(s,t,n+a+1,r);u!=At&&o.push(a,a+t.nodeSize,u)}}));for(var a=Et(i?Pt(e):e,-n).sort(Ht),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Ct(a,o):At}function Ht(e,t){return e.from-t.from||e.to-t.to}function Rt(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),It(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),It(t,o+1,i.copy(r.to,i.to)))}}return t}function It(e,t,n){for(;t<e.length&&Ht(n,e[t])>0;)t++;e.splice(t,0,n)}function Ft(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=At&&t.push(r)})),e.cursorWrapper&&t.push(Ct.create(e.state.doc,[e.cursorWrapper.deco])),Ot.from(t)}Ot.prototype.forChild=function(e,t){if(t.isLeaf)return Ct.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=At&&(o instanceof Ot?n=n.concat(o.members):n.push(o))}return Ot.from(n)},Ot.prototype.eq=function(e){if(!(e instanceof Ot)||e.members.length!=this.members.length)return!1;for(var t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0},Ot.prototype.locals=function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Rt(n?t:t.sort(Ht)):Dt},Ot.from=function(e){switch(e.length){case 0:return At;case 1:return e[0];default:return new Ot(e)}};var zt=function(e,t){this._props=t,this.state=t.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):e.apply?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ut(this),this.markCursor=null,this.cursorWrapper=null,Wt(this),this.nodeViews=qt(this),this.docView=Z(this.state.doc,Bt(this),Ft(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(e){e.shiftKey=!1,e.mouseDown=null,e.lastKeyCode=null,e.lastKeyCodeTime=0,e.lastClick={time:0,x:0,y:0,type:""},e.lastSelectionOrigin=null,e.lastSelectionTime=0,e.lastIOSEnter=0,e.lastIOSEnterFallbackTimeout=null,e.lastAndroidDelete=0,e.composing=!1,e.composingTimeout=null,e.compositionNodes=[],e.compositionEndedAt=-2e8,e.domObserver=new Ke(e,(function(t,n,r,o){return He(e,t,n,r,o)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=Xe[t];e.dom.addEventListener(t,e.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||nt(e,t)||!e.editable&&t.type in Qe||n(e,t)})};for(var n in Xe)t(n);a.safari&&e.dom.addEventListener("input",(function(){return null})),tt(e)}(this),this.pluginViews=[],this.updatePluginViews()};t.EditorView=zt;var $t={props:{configurable:!0},root:{configurable:!0}};function Bt(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r?t.class+=" "+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[xt.node(0,e.state.doc.content.size,t)]}function Wt(e){if(e.markCursor){var t=document.createElement("img");t.setAttribute("mark-placeholder","true"),e.cursorWrapper={dom:t,deco:xt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ut(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function qt(e){var t={};return e.someProp("nodeViews",(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])})),t}$t.props.get=function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props},zt.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&tt(this),this._props=e,this.updateStateInner(e.state,!0)},zt.prototype.setProps=function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)},zt.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},zt.prototype.updateStateInner=function(e,t){var n=this,o=this.state,i=!1,s=!1;if(e.storedMarks&&this.composing&&(mt(this),s=!0),this.state=e,t){var u=qt(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(u,this.nodeViews)&&(this.nodeViews=u,i=!0),tt(this)}this.editable=Ut(this),Wt(this);var c=Ft(this),l=Bt(this),d=t?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,l,c);!f&&e.selection.eq(o.selection)||(s=!0);var p,h,m,_,v,g,b,M,k,w,S,L="preserve"==d&&s&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s!=e.dom&&e.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:T(e.dom)}}(this);if(s){this.domObserver.stop();var Y=f&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(_=o.selection,v=e.selection,g=Math.min(_.$anchor.sharedDepth(_.head),v.$anchor.sharedDepth(v.head)),_.$anchor.start(g)!=v.$anchor.start(g));if(f){var C=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,l,c,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Z(e.doc,l,c,this.dom,this)),C&&!this.trackWrites&&(Y=!0)}Y||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,h=p.docView.domFromPos(p.state.selection.anchor,0),m=p.root.getSelection(),y(h.node,h.offset,m.anchorNode,m.anchorOffset)))?he(this,Y):(ge(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var A=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof r.NodeSelection?x(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),A):x(this,this.coordsAtPos(e.selection.head,1),A))}else L&&(M=(b=L).refDOM,k=b.refTop,w=b.stack,S=M?M.getBoundingClientRect().top:0,D(w,0==S?0:S-k))},zt.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},zt.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.destroyPluginViews();for(var r=0;r<this.state.plugins.length;r++){var o=this.state.plugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}},zt.prototype.someProp=function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;var o=this.state.plugins;if(o)for(var i=0;i<o.length;i++){var a=o[i].props[e];if(null!=a&&(n=t?t(a):a))return n}},zt.prototype.hasFocus=function(){return this.root.activeElement==this.dom},zt.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Y)return e.focus(Y);var t=T(e);e.focus(null==Y?{get preventScroll(){return Y={preventScroll:!0},!0}}:void 0),Y||(Y=!1,D(t,0))}(this.dom),he(this),this.domObserver.start()},$t.root.get=function(){var e=this._root;if(null==e)for(var t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return document.getSelection()}),this._root=t;return e||document},zt.prototype.posAtCoords=function(e){return O(this,e)},zt.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),P(this,e,t)},zt.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},zt.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},zt.prototype.posAtDOM=function(e,t,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},zt.prototype.endOfTextblock=function(e,t){return B(this,t||this.state,e)},zt.prototype.destroy=function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.eventHandlers)e.dom.removeEventListener(t,e.eventHandlers[t]);clearTimeout(e.composingTimeout),clearTimeout(e.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ft(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},zt.prototype.dispatchEvent=function(e){return function(e,t){nt(e,t)||!Xe[t.type]||!e.editable&&t.type in Qe||Xe[t.type](e,t)}(this,e)},zt.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(zt.prototype,$t)},function(e,t,n){"use strict";(function(e){var r,o,i,a;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}window,a=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==s(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=21)}({0:function(e,t,n){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var t=r(e,4),n=t[1],o=t[3];if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(a," */"),u=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[n].concat(u).concat([s]).join("\n")}return[n].join("\n")}},1:function(e,t,n){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},2:function(e,t,n){var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],o=0;o<e.length;o++){var s=e[o],u=t.base?s[0]+t.base:s[0],c=n[u]||0,l="".concat(u," ").concat(c);n[u]=c+1;var d=a(l),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(i[d].references++,i[d].updater(f)):i.push({identifier:l,updater:m(f,t),references:1}),r.push(l)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,l=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,h=0;function m(e,t){var n,r,o;if(t.singleton){var i=h++;n=p||(p=u(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=u(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=a(n[r]);i[o].references--}for(var u=s(e,t),c=0;c<n.length;c++){var l=a(n[c]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}n=u}}}},21:function(e,t,n){n.r(t);var r=n(7),o=n(2),i=n.n(o),a=n(22);i()(a.a,{insert:"head",singleton:!1}),a.a.locals, /** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * @@ -294,4 +294,4 @@ a=function(e){return e.defineLocale("zh-hk",{months:"一月_二月_三月_四月 //! moment.js locale configuration a=function(e){return e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})},"object"===s(t)&&void 0!==e?a(n(201)):(o=[n(201)],void 0===(i="function"==typeof(r=a)?r.apply(t,o):r)||(e.exports=i))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoJoin=function(e,t){if(Array.isArray(t)){var n=t;t=function(e){return n.indexOf(e.type.name)>-1}}return function(n,o){return e(n,o&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var o=[],i=0;i<n.mapping.maps.length;i++){for(var a=n.mapping.maps[i],s=0;s<o.length;s++)o[s]=a.map(o[s]);a.forEach((function(e,t,n,r){return o.push(n,r)}))}for(var u=[],c=0;c<o.length;c+=2)for(var l=o[c],d=o[c+1],f=n.doc.resolve(l),p=f.sharedDepth(d),h=f.node(p),m=f.indexAfter(p),y=f.after(p+1);y<=d;++m){var _=h.maybeChild(m);if(!_)break;if(m&&-1==u.indexOf(y)){var v=h.child(m-1);v.type==_.type&&t(v,_)&&u.push(y)}y+=_.nodeSize}u.sort((function(e,t){return e-t}));for(var g=u.length-1;g>=0;g--)(0,r.canJoin)(n.doc,u[g])&&n.join(u[g]);e(n)}}(o,t))}},t.chainCommands=k,t.createParagraphNear=_,t.deleteSelection=a,t.exitCode=y,t.joinBackward=s,t.joinDown=function(e,t){var n,o=e.selection;if(o instanceof i.NodeSelection){if(o.node.isTextblock||!(0,r.canJoin)(e.doc,o.to))return!1;n=o.to}else if(null==(n=(0,r.joinPoint)(e.doc,o.to,1)))return!1;t&&t(e.tr.join(n).scrollIntoView());return!0},t.joinForward=d,t.joinUp=function(e,t){var n,o=e.selection,a=o instanceof i.NodeSelection;if(a){if(o.node.isTextblock||!(0,r.canJoin)(e.doc,o.from))return!1;n=o.from}else if(null==(n=(0,r.joinPoint)(e.doc,o.from,-1)))return!1;if(t){var s=e.tr.join(n);a&&s.setSelection(i.NodeSelection.create(s.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},t.lift=function(e,t){var n=e.selection,o=n.$from,i=n.$to,a=o.blockRange(i),s=a&&(0,r.liftTarget)(a);if(null==s)return!1;t&&t(e.tr.lift(a,s).scrollIntoView());return!0},t.liftEmptyBlock=v,t.newlineInCode=h,t.selectAll=b,t.selectNodeBackward=c,t.selectNodeForward=f,t.selectParentNode=function(e,t){var n,r=e.selection,o=r.$from,a=r.to,s=o.sharedDepth(a);if(0==s)return!1;n=o.before(s),t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,n)));return!0},t.setBlockType=function(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}},t.splitBlock=g,t.splitBlockKeepMarks=function(e,t){return g(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})},t.toggleMark=function(e,t){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,s,e))return!1;if(r)if(a)e.isInSet(n.storedMarks||a.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{for(var u=!1,c=n.tr,l=0;!u&&l<s.length;l++){var d=s[l],f=d.$from,p=d.$to;u=n.doc.rangeHasMark(f.pos,p.pos,e)}for(var h=0;h<s.length;h++){var m=s[h],y=m.$from,_=m.$to;if(u)c.removeMark(y.pos,_.pos,e);else{var v=y.pos,g=_.pos,b=y.nodeAfter,M=_.nodeBefore,k=b&&b.isText?/^\s*/.exec(b.text)[0].length:0,w=M&&M.isText?/\s*$/.exec(M.text)[0].length:0;v+k<g&&(v+=k,g-=w),c.addMark(v,g,e.create(t))}}r(c.scrollIntoView())}return!0}},t.wrapIn=function(e,t){return function(n,o){var i=n.selection,a=i.$from,s=i.$to,u=a.blockRange(s),c=u&&(0,r.findWrapping)(u,e,t);return!!c&&(o&&o(n.tr.wrap(u,c).scrollIntoView()),!0)}},t.pcBaseKeymap=t.macBaseKeymap=t.baseKeymap=void 0;var r=n(207),o=n(205),i=n(204);function a(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function s(e,t,n){var o=e.selection.$cursor;if(!o||(n?!n.endOfTextblock("backward",e):o.parentOffset>0))return!1;var a=l(o);if(!a){var s=o.blockRange(),c=s&&(0,r.liftTarget)(s);return null!=c&&(t&&t(e.tr.lift(s,c).scrollIntoView()),!0)}var d=a.nodeBefore;if(!d.type.spec.isolating&&M(e,a,t))return!0;if(0==o.parent.content.size&&(u(d,"end")||i.NodeSelection.isSelectable(d))){if(t){var f=e.tr.deleteRange(o.before(),o.after());f.setSelection(u(d,"end")?i.Selection.findFrom(f.doc.resolve(f.mapping.map(a.pos,-1)),-1):i.NodeSelection.create(f.doc,a.pos-d.nodeSize)),t(f.scrollIntoView())}return!0}return!(!d.isAtom||a.depth!=o.depth-1)&&(t&&t(e.tr.delete(a.pos-d.nodeSize,a.pos).scrollIntoView()),!0)}function u(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function c(e,t,n){var r=e.selection,o=r.$head,a=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;a=l(o)}var s=a&&a.nodeBefore;return!(!s||!i.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)}function l(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function d(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=p(r);if(!o)return!1;var a=o.nodeAfter;if(M(e,o,t))return!0;if(0==r.parent.content.size&&(u(a,"start")||i.NodeSelection.isSelectable(a))){if(t){var s=e.tr.deleteRange(r.before(),r.after());s.setSelection(u(a,"start")?i.Selection.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):i.NodeSelection.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}return!(!a.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+a.nodeSize).scrollIntoView()),!0)}function f(e,t,n){var r=e.selection,o=r.$head,a=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;a=p(o)}var s=a&&a.nodeAfter;return!(!s||!i.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,a.pos)).scrollIntoView()),!0)}function p(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function h(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}function m(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function y(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var a=r.node(-1),s=r.indexAfter(-1),u=m(a.contentMatchAt(s));if(!a.canReplaceWith(s,s,u))return!1;if(t){var c=r.after(),l=e.tr.replaceWith(c,c,u.createAndFill());l.setSelection(i.Selection.near(l.doc.resolve(c),1)),t(l.scrollIntoView())}return!0}function _(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof i.AllSelection||r.parent.inlineContent||o.parent.inlineContent)return!1;var a=m(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){var s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,u=e.tr.insert(s,a.createAndFill());u.setSelection(i.TextSelection.create(u.doc,s+1)),t(u.scrollIntoView())}return!0}function v(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var o=n.before();if((0,r.canSplit)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),a=i&&(0,r.liftTarget)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function g(e,t){var n=e.selection,a=n.$from,s=n.$to;if(e.selection instanceof i.NodeSelection&&e.selection.node.isBlock)return!(!a.parentOffset||!(0,r.canSplit)(e.doc,a.pos))&&(t&&t(e.tr.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(t){var u=s.parentOffset==s.parent.content.size,c=e.tr;(e.selection instanceof i.TextSelection||e.selection instanceof i.AllSelection)&&c.deleteSelection();var l=0==a.depth?null:m(a.node(-1).contentMatchAt(a.indexAfter(-1))),d=u&&l?[{type:l}]:null,f=(0,r.canSplit)(c.doc,c.mapping.map(a.pos),1,d);d||f||!(0,r.canSplit)(c.doc,c.mapping.map(a.pos),1,l&&[{type:l}])||(d=[{type:l}],f=!0),f&&(c.split(c.mapping.map(a.pos),1,d),u||a.parentOffset||a.parent.type==l||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),o.Fragment.from([l.create(),a.parent]))||c.setNodeMarkup(c.mapping.map(a.before()),l)),t(c.scrollIntoView())}return!0}function b(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function M(e,t,n){var a,s,c=t.nodeBefore,l=t.nodeAfter;if(c.type.spec.isolating||l.type.spec.isolating)return!1;if(function(e,t,n){var o=t.nodeBefore,i=t.nodeAfter,a=t.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(a,a+1)||!i.isTextblock&&!(0,r.canJoin)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var d=t.parent.canReplace(t.index(),t.index()+1);if(d&&(a=(s=c.contentMatchAt(c.childCount)).findWrapping(l.type))&&s.matchType(a[0]||l.type).validEnd){if(n){for(var f=t.pos+l.nodeSize,p=o.Fragment.empty,h=a.length-1;h>=0;h--)p=o.Fragment.from(a[h].create(null,p));p=o.Fragment.from(c.copy(p));var m=e.tr.step(new r.ReplaceAroundStep(t.pos-1,f,t.pos,f,new o.Slice(p,1,0),a.length,!0)),y=f+2*a.length;(0,r.canJoin)(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}var _=i.Selection.findFrom(t,1),v=_&&_.$from.blockRange(_.$to),g=v&&(0,r.liftTarget)(v);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(v,g).scrollIntoView()),!0;if(d&&l.isTextblock&&u(c,"end")){for(var b=c,M=[];M.push(b),!b.isTextblock;)b=b.lastChild;if(b.canReplace(b.childCount,b.childCount,l.content)){if(n){for(var k=o.Fragment.empty,w=M.length-1;w>=0;w--)k=o.Fragment.from(M[w].copy(k));n(e.tr.step(new r.ReplaceAroundStep(t.pos-M.length,t.pos+l.nodeSize,t.pos+1,t.pos+l.nodeSize-1,new o.Slice(k,M.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function k(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var w=k(a,s,c),S=k(a,d,f),L={Enter:k(h,_,v,g),"Mod-Enter":y,Backspace:w,"Mod-Backspace":w,Delete:S,"Mod-Delete":S,"Mod-a":b};t.pcBaseKeymap=L;var x={"Ctrl-h":L.Backspace,"Alt-Backspace":L["Mod-Backspace"],"Ctrl-d":L.Delete,"Ctrl-Alt-Backspace":L["Mod-Delete"],"Alt-Delete":L["Mod-Delete"],"Alt-d":L["Mod-Delete"]};for(var T in t.macBaseKeymap=x,L)x[T]=L[T];var D=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?x:L;t.baseKeymap=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__clipCells=N,t.__insertCells=I,t.__pastedCells=j,t.addColSpan=Y,t.addColumn=ee,t.addColumnAfter=function(e,t){if(!M(e))return!1;if(t){var n=Q(e);t(ee(e.tr,n,n.right))}return!0},t.addColumnBefore=function(e,t){if(!M(e))return!1;if(t){var n=Q(e);t(ee(e.tr,n,n.left))}return!0},t.addRow=re,t.addRowAfter=function(e,t){if(!M(e))return!1;if(t){var n=Q(e);t(re(e.tr,n,n.bottom))}return!0},t.addRowBefore=function(e,t){if(!M(e))return!1;if(t){var n=Q(e);t(re(e.tr,n,n.top))}return!0},t.cellAround=b,t.colCount=function(e){return h.get(e.node(-1)).colCount(e.pos-e.start(-1))},t.columnIsHeader=C,t.columnResizing=function(e){void 0===e&&(e={});var t=e.handleWidth;void 0===t&&(t=5);var n=e.cellMinWidth;void 0===n&&(n=25);var r=e.View;void 0===r&&(r=fe);var o=e.lastColumnResizable;void 0===o&&(o=!0);return new i.Plugin({key:he,state:{init:function(e,t){return this.spec.props.nodeViews[v(t.schema).table.name]=function(e,t){return new r(e,n,t)},new me(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return he.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=he.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var u=a.getBoundingClientRect(),c=u.left,l=u.right;t.clientX-c<=n?s=ye(e,t,"left"):l-t.clientX<=n&&(s=ye(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var d=e.state.doc.resolve(s),f=d.node(-1),p=h.get(f),m=d.start(-1);if(p.colCount(d.pos-m)+d.nodeAfter.attrs.colspan-1==p.width-1)return}ve(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=he.getState(e.state);t.activeHandle>-1&&!t.dragging&&ve(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=he.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,u=r;if(o)for(var c=0;c<r;c++)o[c]&&(s-=o[c],u--);return s/u}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=he.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=h.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,u=e.state.tr,c=0;c<i.height;c++){var l=c*i.width+s;if(!c||i.map[l]!=i.map[l-i.width]){var d=i.map[l],f=o.nodeAt(d).attrs,p=1==f.colspan?0:s-i.colCount(d);if(!f.colwidth||f.colwidth[p]!=n){var m=f.colwidth?f.colwidth.slice():ge(f.colspan);m[p]=n,u.setNodeMarkup(a+d,null,T(f,"colwidth",m))}}}u.docChanged&&e.dispatch(u)}(e,r.activeHandle,_e(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(he,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=he.getState(e.state),o=_e(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=h.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,u=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=u.nodeName;)u=u.parentNode;pe(i,u.firstChild,u,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(he,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=he.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=h.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,c=0;c<i.height;c++){var l=s+c*i.width-1;if(!(s!=i.width&&i.map[l]==i.map[l+1]||0!=c&&i.map[l-1]==i.map[l-1-i.width])){var d=i.map[l],f=a+d+o.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(u.Decoration.widget(f,p))}}return u.DecorationSet.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})},t.deleteColumn=function(e,t){if(!M(e))return!1;if(t){var n=Q(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;te(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=h.get(n.table);t(r)}return!0},t.deleteRow=function(e,t){if(!M(e))return!1;if(t){var n=Q(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;oe(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=h.get(n.table);t(r)}return!0},t.deleteTable=function(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1},t.findCell=function(e){return h.get(e.node(-1)).findCell(e.pos-e.start(-1))},t.fixTables=X,t.goToNextCell=function(e){return function(t,n){if(!M(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var a=e.node(-1),s=e.indexAfter(-1),u=e.after();s<a.childCount;s++){var c=a.child(s);if(c.childCount)return u+1;u+=c.nodeSize}}}(k(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(i.TextSelection.between(o,S(o))).scrollIntoView())}return!0}}},t.handlePaste=q,t.inSameTable=L,t.isInTable=M,t.mergeCells=function(e,t){var n=e.selection;if(!(n instanceof A)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=Q(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,a=i,s=(t.bottom-1)*n+t.left,u=i+(t.right-t.left-1),c=t.top;c<t.bottom;c++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[u]==o[u+1])return!0;a+=n,u+=n}for(var l=t.left;l<t.right;l++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[s]==o[s+n])return!0;i++,s++}return!1}(o,r))return!1;if(t){for(var i,s,u=e.tr,c={},l=a.Fragment.empty,d=r.top;d<r.bottom;d++)for(var f=r.left;f<r.right;f++){var p=o.map[d*o.width+f],h=r.table.nodeAt(p);if(!c[p])if(c[p]=!0,null==i)i=p,s=h;else{ie(h)||(l=l.append(h.content));var m=u.mapping.map(p+r.tableStart);u.delete(m,m+h.nodeSize)}}if(u.setNodeMarkup(i+r.tableStart,null,T(Y(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),"rowspan",r.bottom-r.top)),l.size){var y=i+1+s.content.size,_=ie(s)?i+1:y;u.replaceWith(_+r.tableStart,y+r.tableStart,l)}u.setSelection(new A(u.doc.resolve(i+r.tableStart))),t(u)}return!0},t.moveCellForward=S,t.nextCell=x,t.pointsAtCell=w,t.removeColSpan=D,t.removeColumn=te,t.removeRow=oe,t.rowIsHeader=ne,t.selectedRect=Q,t.selectionCell=k,t.setAttr=T,t.setCellAttr=function(e,t){return function(n,r){if(!M(n))return!1;var o=k(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof A?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,T(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,T(o.nodeAfter.attrs,e,t)),r(i)}return!0}},t.splitCell=function(e,t){var n=v(e.schema);return ae((function(e){var t=e.node;return n[t.type.spec.tableRole]}))(e,t)},t.splitCellWithType=ae,t.tableEditing=function(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;void 0===t&&(t=!1);return new i.Plugin({key:g,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(g);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:E,handleDOMEvents:{mousedown:V},createSelectionBetween:function(e){if(null!=g.getState(e.state))return e.state.selection},handleTripleClick:U,handleKeyDown:F,handlePaste:q},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,a=(t||e).selection,s=(t||e).doc;if(a instanceof i.NodeSelection&&(o=a.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=A.create(s,a.from);else if("row"==o){var u=s.resolve(a.from+1);r=A.rowSelection(u,u)}else if(!n){var c=h.get(a.node),l=a.from+1,d=l+c.map[c.width*c.height-1];r=A.create(s,l+1,d)}}else a instanceof i.TextSelection&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var a=n.depth;a>=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(a)?r=i.TextSelection.create(s,a.from):a instanceof i.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var u=o.node(s);if("cell"===u.type.spec.tableRole||"header_cell"===u.type.spec.tableRole){n=u;break}}return t!==n&&0===o.parentOffset}(a)&&(r=i.TextSelection.create(s,a.$from.start(),a.$from.end()));r&&(t||(t=e.tr)).setSelection(r);return t}(r,X(r,n),t)}})},t.tableNodeTypes=v,t.tableNodes=function(e){var t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(e){return y(e,t)}}],toDOM:function(e){return["td",_(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return y(e,t)}}],toDOM:function(e){return["th",_(e,t),0]}}}},t.toggleHeader=ue,t.updateColumnsOnResize=pe,t.toggleHeaderRow=t.toggleHeaderColumn=t.toggleHeaderCell=t.tableEditingKey=t.fixTablesKey=t.columnResizingPluginKey=t.TableView=t.TableMap=t.CellSelection=void 0;var r,o,i=n(204),a=n(205),s=n(239),u=n(213),c=n(207);if("undefined"!=typeof WeakMap){var l=new WeakMap;r=function(e){return l.get(e)},o=function(e,t){return l.set(e,t),t}}else{var d=[],f=0;r=function(e){for(var t=0;t<d.length;t+=2)if(d[t]==e)return d[t+1]},o=function(e,t){return 10==f&&(f=0),d[f++]=e,d[f++]=t}}var p=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},h=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function m(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function y(e,t){var n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((function(e){return Number(e)})):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(var a in t){var s=t[a].getFromDOM,u=s&&s(e);null!=u&&(i[a]=u)}return i}function _(e,t){var n={};for(var r in 1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(",")),t){var o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function v(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}t.TableMap=h,h.prototype.findCell=function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,a=o+1,s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(var u=1;a<this.height&&this.map[t+this.width*u]==n;u++)a++;return new p(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},h.prototype.colCount=function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")},h.prototype.nextCell=function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,a=r.top,s=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[a*this.width+(n<0?o-1:i)]:(n<0?0==a:s==this.height)?null:this.map[o+this.width*(n<0?a-1:s)]},h.prototype.rectBetween=function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,a=n.bottom,s=this.findCell(t),u=s.left,c=s.right,l=s.top,d=s.bottom;return new p(Math.min(r,u),Math.min(i,l),Math.max(o,c),Math.max(a,d))},h.prototype.cellsInRect=function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t},h.prototype.positionAt=function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var a=t+e*this.width,s=(e+1)*this.width;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}},h.get=function(e){return r(e)||o(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var a=0;a<r;a++)for(var s=e.child(a),u=0;u<s.childCount;u++){var c=s.child(u);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}for(var l=0;l<o.childCount;l++){var d=o.child(l);i+=d.attrs.colspan,d.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,u=t*n;s<u;s++)r[s]=0;for(var c=0,l=0;c<n;c++){var d=e.child(c);l++;for(var f=0;;f++){for(;o<r.length&&0!=r[o];)o++;if(f==d.childCount)break;for(var p=d.child(f),y=p.attrs,_=y.colspan,v=y.rowspan,g=y.colwidth,b=0;b<v;b++){if(b+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:v-b});break}for(var M=o+b*t,k=0;k<_;k++){0==r[M+k]?r[M+k]=l:(i||(i=[])).push({type:"collision",row:c,pos:l,n:_-k});var w=g&&g[k];if(w){var S=(M+k)%t*2,L=a[S];null==L||L!=w&&1==a[S+1]?(a[S]=w,a[S+1]=1):L==w&&a[S+1]++}}}o+=_,l+=p.nodeSize}for(var x=(c+1)*t,T=0;o<x;)0==r[o++]&&T++;T&&(i||(i=[])).push({type:"missing",row:c,n:T}),l++}for(var D=new h(t,n,r,i),Y=!1,C=0;!Y&&C<a.length;C+=2)null!=a[C]&&a[C+1]<n&&(Y=!0);Y&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var a=n.nodeAt(i),s=null,u=0;u<a.attrs.colspan;u++){var c=(r+u)%e.width,l=t[2*c];null==l||a.attrs.colwidth&&a.attrs.colwidth[u]==l||((s||(s=m(a.attrs)))[u]=l)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(D,a,e);return D}(e))};var g=new i.PluginKey("selectingCells");function b(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function M(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function k(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:b(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function w(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function S(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function L(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function x(e,t,n){var r=e.start(-1),o=h.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function T(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function D(e,t,n){void 0===n&&(n=1);var r=T(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function Y(e,t,n){void 0===n&&(n=1);var r=T(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}function C(e,t,n){for(var r=v(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}t.tableEditingKey=g;var A=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=h.get(r),a=t.start(-1),s=o.rectBetween(t.pos-a,n.pos-a),u=t.node(0),c=o.cellsInRect(s).filter((function(e){return e!=n.pos-a}));c.unshift(n.pos-a);var l=c.map((function(e){var t=r.nodeAt(e),n=e+a+1;return new i.SelectionRange(u.resolve(n),u.resolve(n+t.content.size))}));e.call(this,l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(e,n){var r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(w(r)&&w(o)&&L(r,o)){var a=this.$anchorCell.node(-1)!=r.node(-1);return a&&this.isRowSelection()?t.rowSelection(r,o):a&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return i.TextSelection.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=h.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[],s=r.top;s<r.bottom;s++){for(var u=[],c=s*t.width+r.left,l=r.left;l<r.right;l++,c++){var d=t.map[c];if(!o[d]){o[d]=!0;var f=t.findCell(d),p=e.nodeAt(d),m=r.left-f.left,y=f.right-r.right;if(m>0||y>0){var _=p.attrs;m>0&&(_=D(_,0,m)),y>0&&(_=D(_,_.colspan-y,y)),p=f.left<r.left?p.type.createAndFill(_):p.type.create(_,p.content)}if(f.top<r.top||f.bottom>r.bottom){var v=T(p.attrs,"rowspan",Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top));p=f.top<r.top?p.type.createAndFill(v):p.type.create(v,p.content)}u.push(p)}}i.push(e.child(s).copy(a.Fragment.from(u)))}var g=this.isColSelection()&&this.isRowSelection()?e:i;return new a.Slice(a.Fragment.from(g),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=a.Slice.empty);for(var r=t.steps.length,o=this.ranges,i=0;i<o.length;i++){var s=o[i],u=s.$from,c=s.$to,l=t.mapping.slice(r);t.replace(l.map(u.pos),l.map(c.pos),i?a.Slice.empty:n)}var d=e.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);d&&t.setSelection(d)},t.prototype.replaceWith=function(e,t){this.replace(e,new a.Slice(a.Fragment.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=h.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])},t.prototype.isColSelection=function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom<r.height&&(n=s.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(n=s.resolve(o+r.map[a.left])),i.bottom<r.height&&(e=s.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new t(e,n)},t.prototype.isRowSelection=function(){var e=h.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right<r.width&&(n=s.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right<r.width&&(e=s.resolve(o+r.map[r.width*(i.top+1)-1]))),new t(e,n)},t.prototype.toJSON=function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}},t.fromJSON=function(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,n,r){return void 0===r&&(r=n),new t(e.resolve(n),e.resolve(r))},t.prototype.getBookmark=function(){return new O(this.$anchorCell.pos,this.$headCell.pos)},t}(i.Selection);t.CellSelection=A,A.prototype.visible=!1,i.Selection.jsonID("cell",A);var O=function(e,t){this.anchor=e,this.head=t};function E(e){if(!(e.selection instanceof A))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(u.Decoration.node(n,n+e.nodeSize,{class:"selectedCell"}))})),u.DecorationSet.create(e.doc,t)}function j(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,s=o.type.schema,u=[];if("row"==i)for(var c=0;c<t.childCount;c++){var l=t.child(c).content,d=c?0:Math.max(0,n-1),f=c<t.childCount-1?0:Math.max(0,r-1);(d||f)&&(l=P(v(s).row,new a.Slice(l,d,f)).content),u.push(l)}else{if("cell"!=i&&"header_cell"!=i)return null;u.push(n||r?P(v(s).row,new a.Slice(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],i=o.childCount-1;i>=0;i--)for(var s=o.child(i).attrs,u=s.rowspan,c=s.colspan,l=r;l<r+u;l++)n[l]=(n[l]||0)+c;for(var d=0,f=0;f<n.length;f++)d=Math.max(d,n[f]);for(var p=0;p<n.length;p++)if(p>=t.length&&t.push(a.Fragment.empty),n[p]<d){for(var h=v(e).cell.createAndFill(),m=[],y=n[p];y<d;y++)m.push(h);t[p]=t[p].append(a.Fragment.from(m))}return{height:t.length,width:d,rows:t}}(s,u)}function P(e,t){var n=e.createAndFill();return new c.Transform(n).replace(0,n.content.size,t).doc}function N(e,t,n){var r=e.width,o=e.height,i=e.rows;if(r!=t){for(var s=[],u=[],c=0;c<i.length;c++){for(var l=i[c],d=[],f=s[c]||0,p=0;f<t;p++){var h=l.child(p%l.childCount);f+h.attrs.colspan>t&&(h=h.type.create(D(h.attrs,h.attrs.colspan,f+h.attrs.colspan-t),h.content)),d.push(h),f+=h.attrs.colspan;for(var m=1;m<h.attrs.rowspan;m++)s[c+m]=(s[c+m]||0)+h.attrs.colspan}u.push(a.Fragment.from(d))}i=u,r=t}if(o!=n){for(var y=[],_=0,v=0;_<n;_++,v++){for(var g=[],b=i[v%o],M=0;M<b.childCount;M++){var k=b.child(M);_+k.attrs.rowspan>n&&(k=k.type.create(T(k.attrs,"rowspan",Math.max(1,n-k.attrs.rowspan)),k.content)),g.push(k)}y.push(a.Fragment.from(g))}i=y,o=n}return{width:r,height:o,rows:i}}function H(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var u=!1,c=o;c<i;c++){var l=a*t.width+c,d=t.map[l];if(t.map[l-t.width]==d){u=!0;var f=n.nodeAt(d),p=t.findCell(d),h=p.top,m=p.left;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,T(f.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),f.type.createAndFill(T(f.attrs,"rowspan",h+f.attrs.rowspan-a))),c+=f.attrs.colspan-1}}return u}function R(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var u=!1,c=o;c<i;c++){var l=c*t.width+a,d=t.map[l];if(t.map[l-1]==d){u=!0;var f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(s).map(d+r);e.setNodeMarkup(h,null,D(f.attrs,a-p,f.attrs.colspan-(a-p))),e.insert(h+f.nodeSize,f.type.createAndFill(D(f.attrs,0,a-p))),c+=f.attrs.rowspan-1}}return u}function I(e,t,n,r,o){var i=n?e.doc.nodeAt(n-1):e.doc,s=h.get(i),u=r.top,c=r.left,l=c+o.width,d=u+o.height,f=e.tr,p=0;function m(){i=n?f.doc.nodeAt(n-1):f.doc,s=h.get(i),p=f.mapping.maps.length}(function(e,t,n,r,o,i,s){var u,c,l=v(e.doc.type.schema);if(o>t.width)for(var d=0,f=0;d<t.height;d++){var p=n.child(d);f+=p.nodeSize;var h=[],m=void 0;m=null==p.lastChild||p.lastChild.type==l.cell?u||(u=l.cell.createAndFill()):c||(c=l.header_cell.createAndFill());for(var y=t.width;y<o;y++)h.push(m);e.insert(e.mapping.slice(s).map(f-1+r),h)}if(i>t.height){for(var _=[],g=0,b=(t.height-1)*t.width;g<Math.max(t.width,o);g++){var M=!(g>=t.width)&&n.nodeAt(t.map[b+g]).type==l.header_cell;_.push(M?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}for(var k=l.row.create(null,a.Fragment.from(_)),w=[],S=t.height;S<i;S++)w.push(k);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),w)}return!(!u&&!c)})(f,s,i,n,l,d,p)&&m(),H(f,s,i,n,c,l,u,p)&&m(),H(f,s,i,n,c,l,d,p)&&m(),R(f,s,i,n,u,d,c,p)&&m(),R(f,s,i,n,u,d,l,p)&&m();for(var y=u;y<d;y++){var _=s.positionAt(y,c,i),g=s.positionAt(y,l,i);f.replace(f.mapping.slice(p).map(_+n),f.mapping.slice(p).map(g+n),new a.Slice(o.rows[y-u],0,0))}m(),f.setSelection(new A(f.doc.resolve(n+s.positionAt(u,c,i)),f.doc.resolve(n+s.positionAt(d-1,l-1,i)))),t(f)}O.prototype.map=function(e){return new O(e.map(this.anchor),e.map(this.head))},O.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&L(t,n)?new A(t,n):i.Selection.near(n,1)};var F=(0,s.keydownHandler)({ArrowLeft:$("horiz",-1),ArrowRight:$("horiz",1),ArrowUp:$("vert",-1),ArrowDown:$("vert",1),"Shift-ArrowLeft":B("horiz",-1),"Shift-ArrowRight":B("horiz",1),"Shift-ArrowUp":B("vert",-1),"Shift-ArrowDown":B("vert",1),Backspace:W,"Mod-Backspace":W,Delete:W,"Mod-Delete":W});function z(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function $(e,t){return function(n,r,o){var a=n.selection;if(a instanceof A)return z(n,r,i.Selection.near(a.$headCell,t));if("horiz"!=e&&!a.empty)return!1;var s=J(o,e,t);if(null==s)return!1;if("horiz"==e)return z(n,r,i.Selection.near(n.doc.resolve(a.head+t),t));var u,c=n.doc.resolve(s),l=x(c,e,t);return u=l?i.Selection.near(l,1):t<0?i.Selection.near(n.doc.resolve(c.before(-1)),-1):i.Selection.near(n.doc.resolve(c.after(-1)),1),z(n,r,u)}}function B(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof A)){var a=J(o,e,t);if(null==a)return!1;i=new A(n.doc.resolve(a))}var s=x(i.$headCell,e,t);return!!s&&z(n,r,new A(i.$anchorCell,s))}}function W(e,t){var n=e.selection;if(!(n instanceof A))return!1;if(t){var r=e.tr,o=v(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.Slice(o,0,0))})),r.docChanged&&t(r)}return!0}function U(e,t){var n=b(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new A(n))),!0)}function q(e,t,n){if(!M(e.state))return!1;var r=j(n),o=e.state.selection;if(o instanceof A){r||(r={width:1,height:1,rows:[a.Fragment.from(P(v(e.state.schema).cell,n))]});var i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),u=h.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=N(r,u.right-u.left,u.bottom-u.top),I(e.state,e.dispatch,s,u,r),!0}if(r){var c=k(e.state),l=c.start(-1);return I(e.state,e.dispatch,l,h.get(c.node(-1)).findCell(c.pos-l),r),!0}return!1}function V(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=G(e,t.target);if(t.shiftKey&&e.state.selection instanceof A)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=b(e.state.selection.$anchor))&&K(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function o(t,n){var r=K(e,n),o=null==g.getState(e.state);if(!r||!L(t,r)){if(!o)return;r=t}var i=new A(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(g,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=g.getState(e.state)&&e.dispatch(e.state.tr.setMeta(g,-1))}function a(n){var a,s=g.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(G(e,n.target)!=r&&!(a=K(e,t)))return i();a&&o(a,n)}}function J(e,t,n){if(!(e.state.selection instanceof i.TextSelection))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(o),u="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(u)?s:null}}return null}function G(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function K(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?b(e.state.doc.resolve(n.pos)):null}var Z=new i.PluginKey("fix-tables");function X(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=h.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],u=0;u<o.height;u++)s.push(0);for(var c=0;c<o.problems.length;c++){var l=o.problems[c];if("collision"==l.type){for(var d=t.nodeAt(l.pos),f=0;f<d.attrs.rowspan;f++)s[l.row+f]+=l.n;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,D(d.attrs,d.attrs.colspan-l.n,l.n))}else if("missing"==l.type)s[l.row]+=l.n;else if("overlong_rowspan"==l.type){var p=t.nodeAt(l.pos);r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,T(p.attrs,"rowspan",p.attrs.rowspan-l.n))}else if("colwidth mismatch"==l.type){var m=t.nodeAt(l.pos);r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,T(m.attrs,"colwidth",l.colwidth))}}for(var y=0;y<s.length;y++)s[y]&&(null==i&&(i=y),a=y);for(var _=0,g=n+1;_<o.height;_++){var b=t.child(_),M=g+b.nodeSize,k=s[_];if(k>0){var w="cell";b.firstChild&&(w=b.firstChild.type.spec.tableRole);for(var S=[],L=0;L<k;L++)S.push(v(e.schema)[w].createAndFill());var x=0!=_&&i!=_-1||a!=_?M-1:g+1;r.insert(r.mapping.map(x),S)}g=M}return r.setMeta(Z,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){var i=t.childCount,a=n.childCount;e:for(var s=0,u=0;s<a;s++){for(var c=n.child(s),l=u,d=Math.min(i,s+3);l<d;l++)if(t.child(l)==c){u=l+1,r+=c.nodeSize;continue e}o(c,r),u<i&&t.child(u).sameMarkup(c)?e(t.child(u),c,r+1,o):c.nodesBetween(0,c.content.size,o,r+1),r+=c.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Q(e){var t,n=e.selection,r=k(e),o=r.node(-1),i=r.start(-1),a=h.get(o);return(t=n instanceof A?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i)).tableStart=i,t.map=a,t.table=o,t}function ee(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;C(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s<r.height;s++){var u=s*r.width+n;if(n>0&&n<r.width&&r.map[u-1]==r.map[u]){var c=r.map[u],l=i.nodeAt(c);e.setNodeMarkup(e.mapping.map(o+c),null,Y(l.attrs,n-r.colCount(c))),s+=l.attrs.rowspan-1}else{var d=null==a?v(i.type.schema).cell:i.nodeAt(r.map[u+a]).type,f=r.positionAt(s,n,i);e.insert(e.mapping.map(o+f),d.createAndFill())}}return e}function te(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=e.mapping.maps.length,s=0;s<r.height;){var u=s*r.width+n,c=r.map[u],l=o.nodeAt(c);if(n>0&&r.map[u-1]==c||n<r.width-1&&r.map[u+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(i+c),null,D(l.attrs,n-r.colCount(c)));else{var d=e.mapping.slice(a).map(i+c);e.delete(d,d+l.nodeSize)}s+=l.attrs.rowspan}}function ne(e,t,n){for(var r=v(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0}function re(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,a=o,s=0;s<n;s++)a+=i.child(s).nodeSize;var u=[],c=n>0?-1:0;ne(r,i,n+c)&&(c=0==n||n==r.height?null:0);for(var l=0,d=r.width*n;l<r.width;l++,d++)if(n>0&&n<r.height&&r.map[d]==r.map[d-r.width]){var f=r.map[d],p=i.nodeAt(f).attrs;e.setNodeMarkup(o+f,null,T(p,"rowspan",p.rowspan+1)),l+=p.colspan-1}else{var h=null==c?v(i.type.schema).cell:i.nodeAt(r.map[d+c*r.width]).type;u.push(h.createAndFill())}return e.insert(a,v(i.type.schema).row.create(null,u)),e}function oe(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=0,s=0;s<n;s++)a+=o.child(s).nodeSize;var u=a+o.child(n).nodeSize,c=e.mapping.maps.length;e.delete(a+i,u+i);for(var l=0,d=n*r.width;l<r.width;l++,d++){var f=r.map[d];if(n>0&&f==r.map[d-r.width]){var p=o.nodeAt(f).attrs;e.setNodeMarkup(e.mapping.slice(c).map(f+i),null,T(p,"rowspan",p.rowspan-1)),l+=p.colspan-1}else if(n<r.width&&f==r.map[d+r.width]){var h=o.nodeAt(f),m=h.type.create(T(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),y=r.positionAt(n+1,l,o);e.insert(e.mapping.slice(c).map(i+y),m),l+=h.attrs.colspan-1}}}function ie(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function ae(e){return function(t,n){var r,o,i=t.selection;if(i instanceof A){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(!(r=function(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=b(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],u=a.colwidth;a.rowspan>1&&(a=T(a,"rowspan",1)),a.colspan>1&&(a=T(a,"colspan",1));for(var c,l=Q(t),d=t.tr,f=0;f<l.right-l.left;f++)s.push(u?T(a,"colwidth",u&&u[f]?[u[f]]:null):a);for(var p=l.top;p<l.bottom;p++){var h=l.map.positionAt(p,l.left,l.table);p==l.top&&(h+=r.nodeSize);for(var m=l.left,y=0;m<l.right;m++,y++)m==l.left&&p==l.top||d.insert(c=d.mapping.map(h+l.tableStart,1),e({node:r,row:p,col:m}).createAndFill(s[y]))}d.setNodeMarkup(o,e({node:r,row:l.top,col:l.left}),s[0]),i instanceof A&&d.setSelection(new A(d.doc.resolve(i.$anchorCell.pos),c&&d.doc.resolve(c))),n(d)}return!0}}function se(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function ue(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!M(t))return!1;if(n){for(var r=v(t.schema),o=Q(t),i=t.tr,a=o.map.cellsInRect("column"==e?new p(o.left,0,o.right,o.map.height):"row"==e?new p(0,o.top,o.map.width,o.bottom):o),s=a.map((function(e){return o.table.nodeAt(e)})),u=0;u<a.length;u++)s[u].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[u],r.cell,s[u].attrs);if(0==i.steps.length)for(var c=0;c<a.length;c++)i.setNodeMarkup(o.tableStart+a[c],r.header_cell,s[c].attrs);n(i)}return!0}}(e):function(t,n){if(!M(t))return!1;if(n){var r=v(t.schema),o=Q(t),i=t.tr,a=se("row",o,r),s=se("column",o,r),u=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new p(0,u,1,o.map.height):"row"==e?new p(u,0,o.map.width,1):o,l="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,l,n.attrs)})),n(i)}return!0}}t.fixTablesKey=Z;var ce=ue("row",{useDeprecatedLogic:!0});t.toggleHeaderRow=ce;var le=ue("column",{useDeprecatedLogic:!0});t.toggleHeaderColumn=le;var de=ue("cell",{useDeprecatedLogic:!0});t.toggleHeaderCell=de;var fe=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),pe(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function pe(e,t,n,r,o,i){for(var a=0,s=!0,u=t.firstChild,c=e.firstChild,l=0,d=0;l<c.childCount;l++)for(var f=c.child(l).attrs,p=f.colspan,h=f.colwidth,m=0;m<p;m++,d++){var y=o==d?i:h&&h[m],_=y?y+"px":"";a+=y||r,y||(s=!1),u?(u.style.width!=_&&(u.style.width=_),u=u.nextSibling):t.appendChild(document.createElement("col")).style.width=_}for(;u;){var v=u.nextSibling;u.parentNode.removeChild(u),u=v}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}t.TableView=fe,fe.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,pe(e,this.colgroup,this.table,this.cellMinWidth),!0)},fe.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var he=new i.PluginKey("tableColumnResizing");t.columnResizingPluginKey=he;var me=function(e,t){this.activeHandle=e,this.dragging=t};function ye(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=b(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=h.get(i.node(-1)),s=i.start(-1),u=a.map.indexOf(i.pos-s);return u%a.width==0?-1:s+a.map[u-1]}function _e(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ve(e,t){e.dispatch(e.state.tr.setMeta(he,{setHandle:t}))}function ge(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}me.prototype.apply=function(e){var t=this,n=e.getMeta(he);if(n&&null!=n.setHandle)return new me(n.setHandle,null);if(n&&void 0!==n.setDragging)return new me(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);w(e.doc.resolve(r))||(r=null),t=new me(r,t.dragging)}return t}},function(e,t,n){"use strict";e.exports=n(676)},function(e,t,n){"use strict";e.exports=n(677)},function(e,t,n){"use strict";e.exports.encode=n(678),e.exports.decode=n(679),e.exports.format=n(680),e.exports.parse=n(681)},function(e,t,n){"use strict";e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t,n){"use strict";e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t,n){"use strict";e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",i=new RegExp("^(?:"+r+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+r+"|"+o+")");e.exports.HTML_TAG_RE=i,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,o,i,a,s=[],u=t.length;for(n=0;n<u;n++)126===(o=t[n]).marker&&-1!==o.end&&(i=t[o.end],(a=e.tokens[o.token]).type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",(a=e.tokens[i.token]).type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&s.push(i.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(a=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=a)}}e.exports.tokenize=function(e,t){var n,r,o,i,a=e.pos,s=e.src.charCodeAt(a);if(t)return!1;if(126!==s)return!1;if(o=(r=e.scanDelims(e.pos,!0)).length,i=String.fromCharCode(s),o<2)return!1;for(o%2&&(e.push("text","",0).content=i,o--),n=0;n<o;n+=2)e.push("text","",0).content=i+i,e.delimiters.push({marker:s,length:0,jump:n/2,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.postProcess=function(e){var t,n=e.tokens_meta,o=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<o;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},function(e,t,n){"use strict";function r(e,t){var n,r,o,i,a,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(o=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(i=e.tokens[r.token]).type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?a+a:a,i.content="",(i=e.tokens[o.token]).type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?a+a:a,i.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,o=e.pos,i=e.src.charCodeAt(o);if(t)return!1;if(95!==i&&42!==i)return!1;for(r=e.scanDelims(e.pos,42===i),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,jump:n,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.postProcess=function(e){var t,n=e.tokens_meta,o=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<o;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},function(e,t){(function(t){e.exports=t}).call(this,{})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){var r,o,i,a;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}window,a=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==s(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=n(201)},function(e,t){e.exports=n(237)},function(e,t){e.exports=n(218)},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i=n(1),a=n.n(i),s=n(2),u=new a.a,c=Object(s.getLocale)();[{locale:"ast",json:{charset:"utf-8",headers:{"Last-Translator":"enolp <enolp@softastur.org>, 2020","Language-Team":"Asturian (https://www.transifex.com/nextcloud/teams/64236/ast/)","Content-Type":"text/plain; charset=UTF-8",Language:"ast","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nenolp <enolp@softastur.org>, 2020\n"},msgstr:["Last-Translator: enolp <enolp@softastur.org>, 2020\nLanguage-Team: Asturian (https://www.transifex.com/nextcloud/teams/64236/ast/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: ast\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segundos"]}}}}},{locale:"cs_CZ",json:{charset:"utf-8",headers:{"Last-Translator":"Pavel Borecki <pavel.borecki@gmail.com>, 2020","Language-Team":"Czech (Czech Republic) (https://www.transifex.com/nextcloud/teams/64236/cs_CZ/)","Content-Type":"text/plain; charset=UTF-8",Language:"cs_CZ","Plural-Forms":"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nPavel Borecki <pavel.borecki@gmail.com>, 2020\n"},msgstr:["Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>, 2020\nLanguage-Team: Czech (Czech Republic) (https://www.transifex.com/nextcloud/teams/64236/cs_CZ/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: cs_CZ\nPlural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekund"]}}}}},{locale:"da",json:{charset:"utf-8",headers:{"Last-Translator":"Henrik Troels-Hansen <henrik@troels-hansen.dk>, 2020","Language-Team":"Danish (https://www.transifex.com/nextcloud/teams/64236/da/)","Content-Type":"text/plain; charset=UTF-8",Language:"da","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nHenrik Troels-Hansen <henrik@troels-hansen.dk>, 2020\n"},msgstr:["Last-Translator: Henrik Troels-Hansen <henrik@troels-hansen.dk>, 2020\nLanguage-Team: Danish (https://www.transifex.com/nextcloud/teams/64236/da/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: da\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekunder"]}}}}},{locale:"de_DE",json:{charset:"utf-8",headers:{"Last-Translator":"Christoph Wurst <christoph@winzerhof-wurst.at>, 2020","Language-Team":"German (Germany) (https://www.transifex.com/nextcloud/teams/64236/de_DE/)","Content-Type":"text/plain; charset=UTF-8",Language:"de_DE","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nChristoph Wurst <christoph@winzerhof-wurst.at>, 2020\n"},msgstr:["Last-Translator: Christoph Wurst <christoph@winzerhof-wurst.at>, 2020\nLanguage-Team: German (Germany) (https://www.transifex.com/nextcloud/teams/64236/de_DE/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: de_DE\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["Sekunden"]}}}}},{locale:"el",json:{charset:"utf-8",headers:{"Last-Translator":"GRMarksman <alexakos01@gmail.com>, 2020","Language-Team":"Greek (https://www.transifex.com/nextcloud/teams/64236/el/)","Content-Type":"text/plain; charset=UTF-8",Language:"el","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nGRMarksman <alexakos01@gmail.com>, 2020\n"},msgstr:["Last-Translator: GRMarksman <alexakos01@gmail.com>, 2020\nLanguage-Team: Greek (https://www.transifex.com/nextcloud/teams/64236/el/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: el\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["δευτερόλεπτα"]}}}}},{locale:"en_GB",json:{charset:"utf-8",headers:{"Last-Translator":"Oleksa Stasevych <oleksiy.stasevych@gmail.com>, 2020","Language-Team":"English (United Kingdom) (https://www.transifex.com/nextcloud/teams/64236/en_GB/)","Content-Type":"text/plain; charset=UTF-8",Language:"en_GB","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nOleksa Stasevych <oleksiy.stasevych@gmail.com>, 2020\n"},msgstr:["Last-Translator: Oleksa Stasevych <oleksiy.stasevych@gmail.com>, 2020\nLanguage-Team: English (United Kingdom) (https://www.transifex.com/nextcloud/teams/64236/en_GB/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: en_GB\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["seconds"]}}}}},{locale:"es",json:{charset:"utf-8",headers:{"Last-Translator":"Javier San Juan <javier.sj@trantor.es>, 2020","Language-Team":"Spanish (https://www.transifex.com/nextcloud/teams/64236/es/)","Content-Type":"text/plain; charset=UTF-8",Language:"es","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nJavier San Juan <javier.sj@trantor.es>, 2020\n"},msgstr:["Last-Translator: Javier San Juan <javier.sj@trantor.es>, 2020\nLanguage-Team: Spanish (https://www.transifex.com/nextcloud/teams/64236/es/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: es\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segundos"]}}}}},{locale:"eu",json:{charset:"utf-8",headers:{"Last-Translator":"Asier Iturralde Sarasola <asier.iturralde@gmail.com>, 2020","Language-Team":"Basque (https://www.transifex.com/nextcloud/teams/64236/eu/)","Content-Type":"text/plain; charset=UTF-8",Language:"eu","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nAsier Iturralde Sarasola <asier.iturralde@gmail.com>, 2020\n"},msgstr:["Last-Translator: Asier Iturralde Sarasola <asier.iturralde@gmail.com>, 2020\nLanguage-Team: Basque (https://www.transifex.com/nextcloud/teams/64236/eu/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: eu\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segundo"]}}}}},{locale:"fr",json:{charset:"utf-8",headers:{"Last-Translator":"Yoplala <yoplala@pataraphe.net>, 2020","Language-Team":"French (https://www.transifex.com/nextcloud/teams/64236/fr/)","Content-Type":"text/plain; charset=UTF-8",Language:"fr","Plural-Forms":"nplurals=2; plural=(n > 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nYoplala <yoplala@pataraphe.net>, 2020\n"},msgstr:["Last-Translator: Yoplala <yoplala@pataraphe.net>, 2020\nLanguage-Team: French (https://www.transifex.com/nextcloud/teams/64236/fr/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: fr\nPlural-Forms: nplurals=2; plural=(n > 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["secondes"]}}}}},{locale:"gl",json:{charset:"utf-8",headers:{"Last-Translator":"Miguel Anxo Bouzada <mbouzada@gmail.com>, 2020","Language-Team":"Galician (https://www.transifex.com/nextcloud/teams/64236/gl/)","Content-Type":"text/plain; charset=UTF-8",Language:"gl","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nMiguel Anxo Bouzada <mbouzada@gmail.com>, 2020\n"},msgstr:["Last-Translator: Miguel Anxo Bouzada <mbouzada@gmail.com>, 2020\nLanguage-Team: Galician (https://www.transifex.com/nextcloud/teams/64236/gl/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: gl\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segundos"]}}}}},{locale:"he",json:{charset:"utf-8",headers:{"Last-Translator":"Yaron Shahrabani <sh.yaron@gmail.com>, 2020","Language-Team":"Hebrew (https://www.transifex.com/nextcloud/teams/64236/he/)","Content-Type":"text/plain; charset=UTF-8",Language:"he","Plural-Forms":"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nYaron Shahrabani <sh.yaron@gmail.com>, 2020\n"},msgstr:["Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>, 2020\nLanguage-Team: Hebrew (https://www.transifex.com/nextcloud/teams/64236/he/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: he\nPlural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["שניות"]}}}}},{locale:"hu_HU",json:{charset:"utf-8",headers:{"Last-Translator":"Balázs Meskó <meskobalazs@gmail.com>, 2020","Language-Team":"Hungarian (Hungary) (https://www.transifex.com/nextcloud/teams/64236/hu_HU/)","Content-Type":"text/plain; charset=UTF-8",Language:"hu_HU","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nBalázs Meskó <meskobalazs@gmail.com>, 2020\n"},msgstr:["Last-Translator: Balázs Meskó <meskobalazs@gmail.com>, 2020\nLanguage-Team: Hungarian (Hungary) (https://www.transifex.com/nextcloud/teams/64236/hu_HU/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: hu_HU\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["másodperc"]}}}}},{locale:"is",json:{charset:"utf-8",headers:{"Last-Translator":"Sveinn í Felli <sv1@fellsnet.is>, 2020","Language-Team":"Icelandic (https://www.transifex.com/nextcloud/teams/64236/is/)","Content-Type":"text/plain; charset=UTF-8",Language:"is","Plural-Forms":"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nSveinn í Felli <sv1@fellsnet.is>, 2020\n"},msgstr:["Last-Translator: Sveinn í Felli <sv1@fellsnet.is>, 2020\nLanguage-Team: Icelandic (https://www.transifex.com/nextcloud/teams/64236/is/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: is\nPlural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekúndur"]}}}}},{locale:"it",json:{charset:"utf-8",headers:{"Last-Translator":"Random_R, 2020","Language-Team":"Italian (https://www.transifex.com/nextcloud/teams/64236/it/)","Content-Type":"text/plain; charset=UTF-8",Language:"it","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nRandom_R, 2020\n"},msgstr:["Last-Translator: Random_R, 2020\nLanguage-Team: Italian (https://www.transifex.com/nextcloud/teams/64236/it/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: it\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["secondi"]}}}}},{locale:"ja_JP",json:{charset:"utf-8",headers:{"Last-Translator":"YANO Tetsu <tetuyano+transi@gmail.com>, 2020","Language-Team":"Japanese (Japan) (https://www.transifex.com/nextcloud/teams/64236/ja_JP/)","Content-Type":"text/plain; charset=UTF-8",Language:"ja_JP","Plural-Forms":"nplurals=1; plural=0;"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nYANO Tetsu <tetuyano+transi@gmail.com>, 2020\n"},msgstr:["Last-Translator: YANO Tetsu <tetuyano+transi@gmail.com>, 2020\nLanguage-Team: Japanese (Japan) (https://www.transifex.com/nextcloud/teams/64236/ja_JP/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: ja_JP\nPlural-Forms: nplurals=1; plural=0;\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["秒"]}}}}},{locale:"lt_LT",json:{charset:"utf-8",headers:{"Last-Translator":"Moo, 2020","Language-Team":"Lithuanian (Lithuania) (https://www.transifex.com/nextcloud/teams/64236/lt_LT/)","Content-Type":"text/plain; charset=UTF-8",Language:"lt_LT","Plural-Forms":"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nMoo, 2020\n"},msgstr:["Last-Translator: Moo, 2020\nLanguage-Team: Lithuanian (Lithuania) (https://www.transifex.com/nextcloud/teams/64236/lt_LT/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: lt_LT\nPlural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sek."]}}}}},{locale:"lv",json:{charset:"utf-8",headers:{"Last-Translator":"stendec <stendec@inbox.lv>, 2020","Language-Team":"Latvian (https://www.transifex.com/nextcloud/teams/64236/lv/)","Content-Type":"text/plain; charset=UTF-8",Language:"lv","Plural-Forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nstendec <stendec@inbox.lv>, 2020\n"},msgstr:["Last-Translator: stendec <stendec@inbox.lv>, 2020\nLanguage-Team: Latvian (https://www.transifex.com/nextcloud/teams/64236/lv/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: lv\nPlural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekundes"]}}}}},{locale:"mk",json:{charset:"utf-8",headers:{"Last-Translator":"Сашко Тодоров, 2020","Language-Team":"Macedonian (https://www.transifex.com/nextcloud/teams/64236/mk/)","Content-Type":"text/plain; charset=UTF-8",Language:"mk","Plural-Forms":"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nСашко Тодоров, 2020\n"},msgstr:["Last-Translator: Сашко Тодоров, 2020\nLanguage-Team: Macedonian (https://www.transifex.com/nextcloud/teams/64236/mk/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: mk\nPlural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["секунди"]}}}}},{locale:"nl",json:{charset:"utf-8",headers:{"Last-Translator":"Roeland Jago Douma <roeland@famdouma.nl>, 2020","Language-Team":"Dutch (https://www.transifex.com/nextcloud/teams/64236/nl/)","Content-Type":"text/plain; charset=UTF-8",Language:"nl","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nRoeland Jago Douma <roeland@famdouma.nl>, 2020\n"},msgstr:["Last-Translator: Roeland Jago Douma <roeland@famdouma.nl>, 2020\nLanguage-Team: Dutch (https://www.transifex.com/nextcloud/teams/64236/nl/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: nl\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["seconden"]}}}}},{locale:"oc",json:{charset:"utf-8",headers:{"Last-Translator":"Quentin PAGÈS, 2020","Language-Team":"Occitan (post 1500) (https://www.transifex.com/nextcloud/teams/64236/oc/)","Content-Type":"text/plain; charset=UTF-8",Language:"oc","Plural-Forms":"nplurals=2; plural=(n > 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nQuentin PAGÈS, 2020\n"},msgstr:["Last-Translator: Quentin PAGÈS, 2020\nLanguage-Team: Occitan (post 1500) (https://www.transifex.com/nextcloud/teams/64236/oc/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: oc\nPlural-Forms: nplurals=2; plural=(n > 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segondas"]}}}}},{locale:"pl",json:{charset:"utf-8",headers:{"Last-Translator":"Janusz Gwiazda <j.gwiazda@gwiazdaelektronika.eu>, 2020","Language-Team":"Polish (https://www.transifex.com/nextcloud/teams/64236/pl/)","Content-Type":"text/plain; charset=UTF-8",Language:"pl","Plural-Forms":"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nJanusz Gwiazda <j.gwiazda@gwiazdaelektronika.eu>, 2020\n"},msgstr:["Last-Translator: Janusz Gwiazda <j.gwiazda@gwiazdaelektronika.eu>, 2020\nLanguage-Team: Polish (https://www.transifex.com/nextcloud/teams/64236/pl/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: pl\nPlural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekundy"]}}}}},{locale:"pt_BR",json:{charset:"utf-8",headers:{"Last-Translator":"André Marcelo Alvarenga <alvarenga@kde.org>, 2020","Language-Team":"Portuguese (Brazil) (https://www.transifex.com/nextcloud/teams/64236/pt_BR/)","Content-Type":"text/plain; charset=UTF-8",Language:"pt_BR","Plural-Forms":"nplurals=2; plural=(n > 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nAndré Marcelo Alvarenga <alvarenga@kde.org>, 2020\n"},msgstr:["Last-Translator: André Marcelo Alvarenga <alvarenga@kde.org>, 2020\nLanguage-Team: Portuguese (Brazil) (https://www.transifex.com/nextcloud/teams/64236/pt_BR/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: pt_BR\nPlural-Forms: nplurals=2; plural=(n > 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segundos"]}}}}},{locale:"pt_PT",json:{charset:"utf-8",headers:{"Last-Translator":"fpapoila <fpapoila@gmail.com>, 2020","Language-Team":"Portuguese (Portugal) (https://www.transifex.com/nextcloud/teams/64236/pt_PT/)","Content-Type":"text/plain; charset=UTF-8",Language:"pt_PT","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nfpapoila <fpapoila@gmail.com>, 2020\n"},msgstr:["Last-Translator: fpapoila <fpapoila@gmail.com>, 2020\nLanguage-Team: Portuguese (Portugal) (https://www.transifex.com/nextcloud/teams/64236/pt_PT/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: pt_PT\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["segundos"]}}}}},{locale:"ru",json:{charset:"utf-8",headers:{"Last-Translator":"Игорь Бондаренко <garbond@yandex.ru>, 2020","Language-Team":"Russian (https://www.transifex.com/nextcloud/teams/64236/ru/)","Content-Type":"text/plain; charset=UTF-8",Language:"ru","Plural-Forms":"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nИгорь Бондаренко <garbond@yandex.ru>, 2020\n"},msgstr:["Last-Translator: Игорь Бондаренко <garbond@yandex.ru>, 2020\nLanguage-Team: Russian (https://www.transifex.com/nextcloud/teams/64236/ru/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: ru\nPlural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["секунды"]}}}}},{locale:"sq",json:{charset:"utf-8",headers:{"Last-Translator":"Greta, 2020","Language-Team":"Albanian (https://www.transifex.com/nextcloud/teams/64236/sq/)","Content-Type":"text/plain; charset=UTF-8",Language:"sq","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nGreta, 2020\n"},msgstr:["Last-Translator: Greta, 2020\nLanguage-Team: Albanian (https://www.transifex.com/nextcloud/teams/64236/sq/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: sq\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekonda"]}}}}},{locale:"sr",json:{charset:"utf-8",headers:{"Last-Translator":"Slobodan Simić <slsimic@gmail.com>, 2020","Language-Team":"Serbian (https://www.transifex.com/nextcloud/teams/64236/sr/)","Content-Type":"text/plain; charset=UTF-8",Language:"sr","Plural-Forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nSlobodan Simić <slsimic@gmail.com>, 2020\n"},msgstr:["Last-Translator: Slobodan Simić <slsimic@gmail.com>, 2020\nLanguage-Team: Serbian (https://www.transifex.com/nextcloud/teams/64236/sr/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: sr\nPlural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["секунде"]}}}}},{locale:"sv",json:{charset:"utf-8",headers:{"Last-Translator":"Magnus Höglund, 2020","Language-Team":"Swedish (https://www.transifex.com/nextcloud/teams/64236/sv/)","Content-Type":"text/plain; charset=UTF-8",Language:"sv","Plural-Forms":"nplurals=2; plural=(n != 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nMagnus Höglund, 2020\n"},msgstr:["Last-Translator: Magnus Höglund, 2020\nLanguage-Team: Swedish (https://www.transifex.com/nextcloud/teams/64236/sv/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: sv\nPlural-Forms: nplurals=2; plural=(n != 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["sekunder"]}}}}},{locale:"tr",json:{charset:"utf-8",headers:{"Last-Translator":"Hüseyin Fahri Uzun <mail@fahriuzun.com>, 2020","Language-Team":"Turkish (https://www.transifex.com/nextcloud/teams/64236/tr/)","Content-Type":"text/plain; charset=UTF-8",Language:"tr","Plural-Forms":"nplurals=2; plural=(n > 1);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nHüseyin Fahri Uzun <mail@fahriuzun.com>, 2020\n"},msgstr:["Last-Translator: Hüseyin Fahri Uzun <mail@fahriuzun.com>, 2020\nLanguage-Team: Turkish (https://www.transifex.com/nextcloud/teams/64236/tr/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: tr\nPlural-Forms: nplurals=2; plural=(n > 1);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["saniye"]}}}}},{locale:"uk",json:{charset:"utf-8",headers:{"Last-Translator":"Oleksa Stasevych <oleksiy.stasevych@gmail.com>, 2020","Language-Team":"Ukrainian (https://www.transifex.com/nextcloud/teams/64236/uk/)","Content-Type":"text/plain; charset=UTF-8",Language:"uk","Plural-Forms":"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nOleksa Stasevych <oleksiy.stasevych@gmail.com>, 2020\n"},msgstr:["Last-Translator: Oleksa Stasevych <oleksiy.stasevych@gmail.com>, 2020\nLanguage-Team: Ukrainian (https://www.transifex.com/nextcloud/teams/64236/uk/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: uk\nPlural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["секунди"]}}}}},{locale:"zh_CN",json:{charset:"utf-8",headers:{"Last-Translator":"Jay Guo <jayguo921@gmail.com>, 2020","Language-Team":"Chinese (China) (https://www.transifex.com/nextcloud/teams/64236/zh_CN/)","Content-Type":"text/plain; charset=UTF-8",Language:"zh_CN","Plural-Forms":"nplurals=1; plural=0;"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nJay Guo <jayguo921@gmail.com>, 2020\n"},msgstr:["Last-Translator: Jay Guo <jayguo921@gmail.com>, 2020\nLanguage-Team: Chinese (China) (https://www.transifex.com/nextcloud/teams/64236/zh_CN/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: zh_CN\nPlural-Forms: nplurals=1; plural=0;\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["秒"]}}}}},{locale:"zh_TW",json:{charset:"utf-8",headers:{"Last-Translator":"Jim Tsai <poormusic2001@gmail.com>, 2020","Language-Team":"Chinese (Taiwan) (https://www.transifex.com/nextcloud/teams/64236/zh_TW/)","Content-Type":"text/plain; charset=UTF-8",Language:"zh_TW","Plural-Forms":"nplurals=1; plural=0;"},translations:{"":{"":{msgid:"",comments:{translator:"Translators:\nJim Tsai <poormusic2001@gmail.com>, 2020\n"},msgstr:["Last-Translator: Jim Tsai <poormusic2001@gmail.com>, 2020\nLanguage-Team: Chinese (Taiwan) (https://www.transifex.com/nextcloud/teams/64236/zh_TW/)\nContent-Type: text/plain; charset=UTF-8\nLanguage: zh_TW\nPlural-Forms: nplurals=1; plural=0;\n"]},seconds:{msgid:"seconds",comments:{reference:"lib/index.ts:22"},msgstr:["秒"]}}}}}].map((function(e){u.addTranslations(e.locale,"messages",e.json)})),u.setLocale(c),o.a.locale(c),o.a.updateLocale(o.a.locale(),{parentLocale:o.a.locale(),relativeTime:Object.assign(o.a.localeData(o.a.locale())._relativeTime,{s:u.gettext("seconds")})}),t.default=o.a}])},"object"==s(t)&&"object"==s(e)?e.exports=a():(o=[],void 0===(i="function"==typeof(r=a)?r.apply(t,o):r)||(e.exports=i))}).call(this,n(203)(e))},,,,,function(e,t,n){"use strict";function r(e){this.content=e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),a=o.content.slice();return-1==i?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new r(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),a=o.find(e);return i.splice(-1==a?i.length:a,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;t.default=o},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropCursor=function(e){void 0===e&&(e={});return new r.Plugin({view:function(t){return new i(t,e)}})};var r=n(204),o=n(207);var i=function(e,t){var n=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(t){var r=function(e){return n[t](e)};return e.dom.addEventListener(t,r),{name:t,handler:r}}))};i.prototype.destroy=function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))},i.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&this.updateOverlay()},i.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},i.prototype.updateOverlay=function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var a=this.editorView.coordsAtPos(this.cursorPos);e={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,u,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!c||c==document.body&&"static"==getComputedStyle(c).position)s=-pageXOffset,u=-pageYOffset;else{var l=c.getBoundingClientRect();s=l.left-c.scrollLeft,u=l.top-c.scrollTop}this.element.style.left=e.left-s+"px",this.element.style.top=e.top-u+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"},i.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},i.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY});if(t){var n=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(n=(0,o.dropPoint)(this.editorView.state.doc,n,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(n),this.scheduleRemoval(5e3)}}},i.prototype.dragend=function(){this.scheduleRemoval(20)},i.prototype.drop=function(){this.scheduleRemoval(20)},i.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gapCursor=t.GapCursor=void 0;var r=n(239),o=n(204),i=n(213),a=n(205),s=function(e){function t(t){e.call(this,t,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));return t.valid(o)?new t(o):e.near(o)},t.prototype.content=function(){return a.Slice.empty},t.prototype.eq=function(e){return e instanceof t&&e.head==this.head},t.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))},t.prototype.getBookmark=function(){return new u(this.anchor)},t.valid=function(e){var t=e.parent;if(t.isTextblock||!function(e){for(var t=e.depth;t>=0;t--){var n=e.index(t);if(0!=n)for(var r=e.node(t).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock},t.findFrom=function(e,n,r){e:for(;;){if(!r&&t.valid(e))return e;for(var i=e.pos,a=null,s=e.depth;;s--){var u=e.node(s);if(n>0?e.indexAfter(s)<u.childCount:e.index(s)>0){a=u.child(n>0?e.indexAfter(s):e.index(s)-1);break}if(0==s)return null;i+=n;var c=e.doc.resolve(i);if(t.valid(c))return c}for(;;){var l=n>0?a.firstChild:a.lastChild;if(!l){if(a.isAtom&&!a.isText&&!o.NodeSelection.isSelectable(a)){e=e.doc.resolve(i+a.nodeSize*n),r=!1;continue e}break}a=l,i+=n;var d=e.doc.resolve(i);if(t.valid(d))return d}return null}},t}(o.Selection);t.GapCursor=s,s.prototype.visible=!1,o.Selection.jsonID("gapcursor",s);var u=function(e){this.pos=e};u.prototype.map=function(e){return new u(e.map(this.pos))},u.prototype.resolve=function(e){var t=e.resolve(this.pos);return s.valid(t)?new s(t):o.Selection.near(t)};t.gapCursor=function(){return new o.Plugin({props:{decorations:f,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&s.valid(n))return new s(n)},handleClick:d,handleKeyDown:c}})};var c=(0,r.keydownHandler)({ArrowLeft:l("horiz",-1),ArrowRight:l("horiz",1),ArrowUp:l("vert",-1),ArrowDown:l("vert",1)});function l(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){var a=e.selection,u=t>0?a.$to:a.$from,c=a.empty;if(a instanceof o.TextSelection){if(!i.endOfTextblock(n)||0==u.depth)return!1;c=!1,u=e.doc.resolve(t>0?u.after():u.before())}var l=s.findFrom(u,t,c);return!!l&&(r&&r(e.tr.setSelection(new s(l))),!0)}}function d(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!s.valid(r))return!1;var i=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(i>-1&&o.NodeSelection.isSelectable(e.state.doc.nodeAt(i)))&&(e.dispatch(e.state.tr.setSelection(new s(r))),!0)}function f(e){if(!(e.selection instanceof s))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",i.DecorationSet.create(e.doc,[i.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyName=function(e){var t=!(l&&(e.ctrlKey||e.altKey||e.metaKey)||(a||c)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?o:r)[e.keyCode]||e.key||"Unidentified";"Esc"==t&&(t="Escape");"Del"==t&&(t="Delete");"Left"==t&&(t="ArrowLeft");"Up"==t&&(t="ArrowUp");"Right"==t&&(t="ArrowRight");"Down"==t&&(t="ArrowDown");return t},t.shift=t.base=void 0;var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"};t.base=r;var o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"};t.shift=o;for(var i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),c="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=i&&(u||+i[1]<57)||s&&u,d=0;d<10;d++)r[48+d]=r[96+d]=String(d);for(d=1;d<=24;d++)r[d+111]="F"+d;for(d=65;d<=90;d++)r[d]=String.fromCharCode(d+32),o[d]=String.fromCharCode(d);for(var f in r)o.hasOwnProperty(f)||(o[f]=r[f])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addListNodes=function(e,t,n){return e.append({ordered_list:d(u,{content:"list_item+",group:n}),bullet_list:d(c,{content:"list_item+",group:n}),list_item:d(l,{content:t})})},t.liftListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!u&&(!n||(a.node(u.depth-1).type==e?function(e,t,n,i){var a=e.tr,s=i.end,u=i.$to.end(i.depth);s<u&&(a.step(new r.ReplaceAroundStep(s-1,u,s,u,new o.Slice(o.Fragment.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new o.NodeRange(a.doc.resolve(i.$from.pos),a.doc.resolve(u),i.depth));return t(a.lift(i,(0,r.liftTarget)(i)).scrollIntoView()),!0}(t,n,e,u):function(e,t,n){for(var i=e.tr,a=n.parent,s=n.end,u=n.endIndex-1,c=n.startIndex;u>c;u--)s-=a.child(u).nodeSize,i.delete(s-1,s+1);var l=i.doc.resolve(n.start),d=l.nodeAfter,f=0==n.startIndex,p=n.endIndex==a.childCount,h=l.node(-1),m=l.index(-1);if(!h.canReplace(m+(f?0:1),m+1,d.content.append(p?o.Fragment.empty:o.Fragment.from(a))))return!1;var y=l.pos,_=y+d.nodeSize;return i.step(new r.ReplaceAroundStep(y-(f?1:0),_+(p?1:0),y+1,_-1,new o.Slice((f?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))).append(p?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))),f?0:1,p?0:1),f?0:1)),t(i.scrollIntoView()),!0}(t,n,u)))}},t.sinkListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!u)return!1;var c=u.startIndex;if(0==c)return!1;var l=u.parent,d=l.child(c-1);if(d.type!=e)return!1;if(n){var f=d.lastChild&&d.lastChild.type==l.type,p=o.Fragment.from(f?e.create():null),h=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(l.type.create(null,p)))),f?3:1,0),m=u.start,y=u.end;n(t.tr.step(new r.ReplaceAroundStep(m-(f?3:1),y,m,y,h,1,!0)).scrollIntoView())}return!0}},t.splitListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=i.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(s))return!1;var c=a.node(-1);if(c.type!=e)return!1;if(0==a.parent.content.size&&a.node(-1).childCount==a.indexAfter(-1)){if(2==a.depth||a.node(-3).type!=e||a.index(-2)!=a.node(-2).childCount-1)return!1;if(n){for(var l=o.Fragment.empty,d=a.index(-1)?1:a.index(-2)?2:3,f=a.depth-d;f>=a.depth-3;f--)l=o.Fragment.from(a.node(f).copy(l));var p=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3;l=l.append(o.Fragment.from(e.createAndFill()));var h=a.before(a.depth-(d-1)),m=t.tr.replace(h,a.after(-p),new o.Slice(l,4-d,0)),y=-1;m.doc.nodesBetween(h,m.doc.content.size,(function(e,t){if(y>-1)return!1;e.isTextblock&&0==e.content.size&&(y=t+1)})),y>-1&&m.setSelection(t.selection.constructor.near(m.doc.resolve(y))),n(m.scrollIntoView())}return!0}var _=s.pos==a.end()?c.contentMatchAt(0).defaultType:null,v=t.tr.delete(a.pos,s.pos),g=_&&[null,{type:_}];return!!(0,r.canSplit)(v.doc,a.pos,2,g)&&(n&&n(v.split(a.pos,2,g).scrollIntoView()),!0)}},t.wrapInList=function(e,t){return function(n,i){var a=n.selection,s=a.$from,u=a.$to,c=s.blockRange(u),l=!1,d=c;if(!c)return!1;if(c.depth>=2&&s.node(c.depth-1).type.compatibleContent(e)&&0==c.startIndex){if(0==s.index(c.depth-1))return!1;var f=n.doc.resolve(c.start-2);d=new o.NodeRange(f,f,c.depth),c.endIndex<c.parent.childCount&&(c=new o.NodeRange(s,n.doc.resolve(u.end(c.depth)),c.depth)),l=!0}var p=(0,r.findWrapping)(d,e,t,c);return!!p&&(i&&i(function(e,t,n,i,a){for(var s=o.Fragment.empty,u=n.length-1;u>=0;u--)s=o.Fragment.from(n[u].type.create(n[u].attrs,s));e.step(new r.ReplaceAroundStep(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(s,0,0),n.length,!0));for(var c=0,l=0;l<n.length;l++)n[l].type==a&&(c=l+1);for(var d=n.length-c,f=t.start+n.length-(i?2:0),p=t.parent,h=t.startIndex,m=t.endIndex,y=!0;h<m;h++,y=!1)!y&&(0,r.canSplit)(e.doc,f,d)&&(e.split(f,d),f+=2*d),f+=p.child(h).nodeSize;return e}(n.tr,c,p,l,e).scrollIntoView()),!0)}},t.orderedList=t.listItem=t.bulletList=void 0;var r=n(207),o=n(205),i=["ol",0],a=["ul",0],s=["li",0],u={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?i:["ol",{start:e.attrs.order},0]}};t.orderedList=u;var c={parseDOM:[{tag:"ul"}],toDOM:function(){return a}};t.bulletList=c;var l={parseDOM:[{tag:"li"}],toDOM:function(){return s},defining:!0};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}t.listItem=l},function(e,t,n){"use strict";var r=n(658),o=n(659);t.highlight=i,t.highlightAuto=function(e,t){var n,a,s,u,c=t||{},l=c.subset||r.listLanguages(),d=c.prefix,f=l.length,p=-1;null==d&&(d="hljs-");if("string"!=typeof e)throw o("Expected `string` for value, got `%s`",e);a={relevance:0,language:null,value:[]},n={relevance:0,language:null,value:[]};for(;++p<f;)u=l[p],r.getLanguage(u)&&((s=i(u,e,t)).language=u,s.relevance>a.relevance&&(a=s),s.relevance>n.relevance&&(a=n,n=s));a.language&&(n.secondBest=a);return n},t.registerLanguage=function(e,t){r.registerLanguage(e,t)},t.listLanguages=function(){return r.listLanguages()},t.registerAlias=function(e,t){var n,o=e;t&&((o={})[e]=t);for(n in o)r.registerAliases(o[n],{languageName:n})},a.prototype.addText=function(e){var t,n,r=this.stack;if(""===e)return;t=r[r.length-1],(n=t.children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})},a.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},a.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],o=e.rootNode.children,i=t?{type:"element",tagName:"span",properties:{className:[t]},children:o}:o;r.children=r.children.concat(i)},a.prototype.openNode=function(e){var t=this.stack,n=this.options.classPrefix+e,r=t[t.length-1],o={type:"element",tagName:"span",properties:{className:[n]},children:[]};r.children.push(o),t.push(o)},a.prototype.closeNode=function(){this.stack.pop()},a.prototype.closeAllNodes=s,a.prototype.finalize=s,a.prototype.toHTML=function(){return""};function i(e,t,n){var i,s=r.configure({}),u=(n||{}).prefix;if("string"!=typeof e)throw o("Expected `string` for name, got `%s`",e);if(!r.getLanguage(e))throw o("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw o("Expected `string` for value, got `%s`",t);if(null==u&&(u="hljs-"),r.configure({__emitter:a,classPrefix:u}),i=r.highlight(t,{language:e,ignoreIllegals:!0}),r.configure(s||{}),i.errorRaised)throw i.errorRaised;return{relevance:i.relevance,language:i.language,value:i.emitter.rootNode.children}}function a(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function s(){}},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=h(n)||Object.isFrozen(n)||m(n)})),e}var y=m,_=m;y.default=_;var v=function(){function e(t){d(this,e),void 0===t.data&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}return p(e,[{key:"ignoreMatch",value:function(){this.isMatchIgnored=!0}}]),e}();function g(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function b(e){var t=Object.create(null);for(var n in e)t[n]=e[n];for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.forEach((function(e){for(var n in e)t[n]=e[n]})),t}var M=function(e){return!!e.kind},k=function(){function e(t,n){d(this,e),this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}return p(e,[{key:"addText",value:function(e){this.buffer+=g(e)}},{key:"openNode",value:function(e){if(M(e)){var t=e.kind;e.sublanguage||(t="".concat(this.classPrefix).concat(t)),this.span(t)}}},{key:"closeNode",value:function(e){M(e)&&(this.buffer+="</span>")}},{key:"value",value:function(){return this.buffer}},{key:"span",value:function(e){this.buffer+='<span class="'.concat(e,'">')}}]),e}(),w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(n,e);var t=u(n);function n(e){var r;return d(this,n),(r=t.call(this)).options=e,r}return p(n,[{key:"addKeyword",value:function(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}},{key:"addText",value:function(e){""!==e&&this.add(e)}},{key:"addSublanguage",value:function(e,t){var n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}},{key:"toHTML",value:function(){return new k(this,this.options).value()}},{key:"finalize",value:function(){return!0}}]),n}(function(){function e(){d(this,e),this.rootNode={children:[]},this.stack=[this.rootNode]}return p(e,[{key:"top",get:function(){return this.stack[this.stack.length-1]}},{key:"root",get:function(){return this.rootNode}},{key:"add",value:function(e){this.top.children.push(e)}},{key:"openNode",value:function(e){var t={kind:e,children:[]};this.add(t),this.stack.push(t)}},{key:"closeNode",value:function(){if(this.stack.length>1)return this.stack.pop()}},{key:"closeAllNodes",value:function(){for(;this.closeNode(););}},{key:"toJSON",value:function(){return JSON.stringify(this.rootNode,null,4)}},{key:"walk",value:function(e){return this.constructor._walk(e,this.rootNode)}}],[{key:"_walk",value:function(e,t){var n=this;return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((function(t){return n._walk(e,t)})),e.closeNode(t)),e}},{key:"_collapse",value:function(t){"string"!=typeof t&&t.children&&(t.children.every((function(e){return"string"==typeof e}))?t.children=[t.children.join("")]:t.children.forEach((function(t){e._collapse(t)})))}}]),e}());function S(e){return e?"string"==typeof e?e:e.source:null}function L(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return S(e)})).join("");return r}function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r="("+t.map((function(e){return S(e)})).join("|")+")";return r}var T=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;var D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Y={begin:"\\\\[\\s\\S]",relevance:0},C={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[Y]},A={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[Y]},O={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},E=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=b({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(O),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},j=E("//","$"),P=E("/\\*","\\*/"),N=E("#","$"),H={className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},R={className:"number",begin:D,relevance:0},I={className:"number",begin:"\\b(0b[01]+)",relevance:0},F={className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},z={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Y,{begin:/\[/,end:/\]/,relevance:0,contains:[Y]}]}]},$={className:"title",begin:"[a-zA-Z]\\w*",relevance:0},B={className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},W={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},U=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:D,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^#![ ]*\//;return e.binary&&(e.begin=L(t,/.*\b/,e.binary,/\b.*/)),b({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":function(e,t){0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Y,APOS_STRING_MODE:C,QUOTE_STRING_MODE:A,PHRASAL_WORDS_MODE:O,COMMENT:E,C_LINE_COMMENT_MODE:j,C_BLOCK_COMMENT_MODE:P,HASH_COMMENT_MODE:N,NUMBER_MODE:H,C_NUMBER_MODE:R,BINARY_NUMBER_MODE:I,CSS_NUMBER_MODE:F,REGEXP_MODE:z,TITLE_MODE:$,UNDERSCORE_TITLE_MODE:B,METHOD_GUARD:W,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":function(e,t){t.data._beginMatch=e[1]},"on:end":function(e,t){t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function q(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function V(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=q,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function J(e,t){Array.isArray(e.illegal)&&(e.illegal=x.apply(void 0,o(e.illegal)))}function G(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function K(e,t){void 0===e.relevance&&(e.relevance=1)}var Z=["of","and","for","in","not","or","if","then","parent","list","value"];function X(e,t){return t?Number(t):function(e){return Z.includes(e.toLowerCase())}(e)?0:1}function Q(e,t){t.plugins;function n(t,n){return new RegExp(S(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}var i=function(){function e(){d(this,e),this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}return p(e,[{key:"addRule",value:function(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}},{key:"compile",value:function(){0===this.regexes.length&&(this.exec=function(){return null});var e=this.regexes.map((function(e){return e[1]}));this.matcherRe=n(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"|",n=0;return e.map((function(e){for(var t=n+=1,r=S(e),o="";r.length>0;){var i=T.exec(r);if(!i){o+=r;break}o+=r.substring(0,i.index),r=r.substring(i.index+i[0].length),"\\"===i[0][0]&&i[1]?o+="\\"+String(Number(i[1])+t):(o+=i[0],"("===i[0]&&n++)}return o})).map((function(e){return"(".concat(e,")")})).join(t)}(e),!0),this.lastIndex=0}},{key:"exec",value:function(e){this.matcherRe.lastIndex=this.lastIndex;var t=this.matcherRe.exec(e);if(!t)return null;var n=t.findIndex((function(e,t){return t>0&&void 0!==e})),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}]),e}(),a=function(){function e(){d(this,e),this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}return p(e,[{key:"getMatcher",value:function(e){if(this.multiRegexes[e])return this.multiRegexes[e];var t=new i;return this.rules.slice(e).forEach((function(e){var n=r(e,2),o=n[0],i=n[1];return t.addRule(o,i)})),t.compile(),this.multiRegexes[e]=t,t}},{key:"resumingScanAtSamePosition",value:function(){return 0!==this.regexIndex}},{key:"considerAll",value:function(){this.regexIndex=0}},{key:"addRule",value:function(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}},{key:"exec",value:function(e){var t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;var n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{var r=this.getMatcher(0);r.lastIndex=this.lastIndex+1,n=r.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}]),e}();if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=b(e.classNameAliases||{}),function t(r,i){var s,u=r;if(r.isCompiled)return u;[G].forEach((function(e){return e(r,i)})),e.compilerExtensions.forEach((function(e){return e(r,i)})),r.__beforeBegin=null,[V,J,K].forEach((function(e){return e(r,i)})),r.isCompiled=!0;var c=null;if("object"===h(r.keywords)&&(c=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"keyword",o={};return"string"==typeof t?i(r,t.split(" ")):Array.isArray(t)?i(r,t):Object.keys(t).forEach((function(r){Object.assign(o,e(t[r],n,r))})),o;function i(e,t){n&&(t=t.map((function(e){return e.toLowerCase()}))),t.forEach((function(t){var n=t.split("|");o[n[0]]=[e,X(n[0],n[1])]}))}}(r.keywords,e.case_insensitive)),r.lexemes&&c)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return c=c||r.lexemes||/\w+/,u.keywordPatternRe=n(c,!0),i&&(r.begin||(r.begin=/\B|\b/),u.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(u.endRe=n(r.end)),u.terminatorEnd=S(r.end)||"",r.endsWithParent&&i.terminatorEnd&&(u.terminatorEnd+=(r.end?"|":"")+i.terminatorEnd)),r.illegal&&(u.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=(s=[]).concat.apply(s,o(r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return b(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(function e(t){return!!t&&(t.endsWithParent||e(t.starts))}(e))return b(e,{starts:e.starts?b(e.starts):null});if(Object.isFrozen(e))return b(e);return e}("self"===e?r:e)})))),r.contains.forEach((function(e){t(e,u)})),r.starts&&t(r.starts,i),u.matcher=function(e){var t=new a;return e.contains.forEach((function(e){return t.addRule(e.begin,{rule:e,type:"begin"})})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(u),u}(e)}function ee(e){var t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className:function(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted:function(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn('The language "'.concat(this.language,'" you specified could not be found.')),this.unknownLanguage=!0,g(this.code);var t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect:function(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:function(){return!0}},render:function(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install:function(e){e.component("highlightjs",t)}}}}var te={"after:highlightElement":function(e){var t=e.el,n=e.result,r=e.text,o=re(t);if(o.length){var i=document.createElement("div");i.innerHTML=n.value,n.value=function(e,t,n){var r=0,o="",i=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function s(e){o+="<"+ne(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+g(e.value)+'"'})).join("")+">"}function u(e){o+="</"+ne(e)+">"}function c(e){("start"===e.event?s:u)(e.node)}for(;e.length||t.length;){var l=a();if(o+=g(n.substring(r,l[0].offset)),r=l[0].offset,l===e){i.reverse().forEach(u);do{c(l.splice(0,1)[0]),l=a()}while(l===e&&l.length&&l[0].offset===r);i.reverse().forEach(s)}else"start"===l[0].event?i.push(l[0].node):i.pop(),c(l.splice(0,1)[0])}return o+g(n.substr(r))}(o,re(i),r)}}};function ne(e){return e.nodeName.toLowerCase()}function re(e){var t=[];return function e(n,r){for(var o=n.firstChild;o;o=o.nextSibling)3===o.nodeType?r+=o.nodeValue.length:1===o.nodeType&&(t.push({event:"start",offset:r,node:o}),r=e(o,r),ne(o).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:o}));return r}(e,0),t}var oe={},ie=function(e){console.error(e)},ae=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).log.apply(t,["WARN: ".concat(e)].concat(r))},se=function(e,t){oe["".concat(e,"/").concat(t)]||(console.log("Deprecated as of ".concat(e,". ").concat(t)),oe["".concat(e,"/").concat(t)]=!0)},ue=g,ce=b,le=Symbol("nomatch"),de=function(e){var t=Object.create(null),n=Object.create(null),o=[],i=!0,a=/(^(<[^>]+>|\t|)+|\n)/gm,s="Could not find the language '{}', did you forget to load/include a language module?",u={disableAutodetect:!0,name:"Plain text",contains:[]},c={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:w};function l(e){return c.noHighlightRe.test(e)}function d(e,t,n,r){var o="",i="";"object"===h(t)?(o=e,n=t.ignoreIllegals,i=t.language,r=void 0):(se("10.7.0","highlight(lang, code, ...args) has been deprecated."),se("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,o=t);var a={code:o,language:i};T("before:highlight",a);var s=a.result?a.result:f(a.language,a.code,n,r);return s.code=a.code,T("after:highlight",s),s}function f(e,n,a,u){function l(e,t){var n=M.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){null!=L.subLanguage?function(){if(""!==D){var e=null;if("string"==typeof L.subLanguage){if(!t[L.subLanguage])return void T.addText(D);e=f(L.subLanguage,D,!0,x[L.subLanguage]),x[L.subLanguage]=e.top}else e=p(D,L.subLanguage.length?L.subLanguage:null);L.relevance>0&&(Y+=e.relevance),T.addSublanguage(e.emitter,e.language)}}():function(){if(L.keywords){var e=0;L.keywordPatternRe.lastIndex=0;for(var t=L.keywordPatternRe.exec(D),n="";t;){n+=D.substring(e,t.index);var o=l(L,t);if(o){var i=r(o,2),a=i[0],s=i[1];if(T.addText(n),n="",Y+=s,a.startsWith("_"))n+=t[0];else{var u=M.classNameAliases[a]||a;T.addKeyword(t[0],u)}}else n+=t[0];e=L.keywordPatternRe.lastIndex,t=L.keywordPatternRe.exec(D)}n+=D.substr(e),T.addText(n)}else T.addText(D)}(),D=""}function h(e){return e.className&&T.openNode(M.classNameAliases[e.className]||e.className),L=Object.create(e,{parent:{value:L}})}function m(e){return 0===L.matcher.regexIndex?(D+=e[0],1):(O=!0,0)}function y(e){for(var t=e[0],n=e.rule,r=new v(n),o=0,i=[n.__beforeBegin,n["on:begin"]];o<i.length;o++){var a=i[o];if(a&&(a(e,r),r.isMatchIgnored))return m(t)}return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?D+=t:(n.excludeBegin&&(D+=t),d(),n.returnBegin||n.excludeBegin||(D=t)),h(n),n.returnBegin?0:t.length}function _(e){var t=e[0],r=n.substr(e.index),o=function e(t,n,r){var o=function(e,t){var n=e&&e.exec(t);return n&&0===n.index}(t.endRe,r);if(o){if(t["on:end"]){var i=new v(t);t["on:end"](n,i),i.isMatchIgnored&&(o=!1)}if(o){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return e(t.parent,n,r)}(L,e,r);if(!o)return le;var i=L;i.skip?D+=t:(i.returnEnd||i.excludeEnd||(D+=t),d(),i.excludeEnd&&(D=t));do{L.className&&T.closeNode(),L.skip||L.subLanguage||(Y+=L.relevance),L=L.parent}while(L!==o.parent);return o.starts&&(o.endSameAsBegin&&(o.starts.endRe=o.endRe),h(o.starts)),i.returnEnd?0:t.length}var g={};function b(t,r){var o=r&&r[0];if(D+=t,null==o)return d(),0;if("begin"===g.type&&"end"===r.type&&g.index===r.index&&""===o){if(D+=n.slice(r.index,r.index+1),!i){var s=new Error("0 width match regex");throw s.languageName=e,s.badRule=g.rule,s}return 1}if(g=r,"begin"===r.type)return y(r);if("illegal"===r.type&&!a){var u=new Error('Illegal lexeme "'+o+'" for mode "'+(L.className||"<unnamed>")+'"');throw u.mode=L,u}if("end"===r.type){var c=_(r);if(c!==le)return c}if("illegal"===r.type&&""===o)return 1;if(A>1e5&&A>3*r.index)throw new Error("potential infinite loop, way more iterations than matches");return D+=o,o.length}var M=S(e);if(!M)throw ie(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');var k=Q(M,{plugins:o}),w="",L=u||k,x={},T=new c.__emitter(c);!function(){for(var e=[],t=L;t!==M;t=t.parent)t.className&&e.unshift(t.className);e.forEach((function(e){return T.openNode(e)}))}();var D="",Y=0,C=0,A=0,O=!1;try{for(L.matcher.considerAll();;){A++,O?O=!1:L.matcher.considerAll(),L.matcher.lastIndex=C;var E=L.matcher.exec(n);if(!E)break;var j=b(n.substring(C,E.index),E);C=E.index+j}return b(n.substr(C)),T.closeAllNodes(),T.finalize(),w=T.toHTML(),{relevance:Math.floor(Y),value:w,language:e,illegal:!1,emitter:T,top:L}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(C-100,C+100),mode:t.mode},sofar:w,relevance:0,value:ue(n),emitter:T};if(i)return{illegal:!1,relevance:0,value:ue(n),emitter:T,language:e,top:L,errorRaised:t};throw t}}function p(e,n){n=n||c.languages||Object.keys(t);var o=function(e){var t={relevance:0,emitter:new c.__emitter(c),value:ue(e),illegal:!1,top:u};return t.emitter.addText(e),t}(e),i=n.filter(S).filter(x).map((function(t){return f(t,e,!1)}));i.unshift(o);var a=r(i.sort((function(e,t){if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(S(e.language).supersetOf===t.language)return 1;if(S(t.language).supersetOf===e.language)return-1}return 0})),2),s=a[0],l=a[1],d=s;return d.second_best=l,d}var m={"before:highlightElement":function(e){var t=e.el;c.useBR&&(t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":function(e){var t=e.result;c.useBR&&(t.value=t.value.replace(/\n/g,"<br>"))}},_=/^(<[^>]+>|\t)+/gm,g={"after:highlightElement":function(e){var t=e.result;c.tabReplace&&(t.value=t.value.replace(_,(function(e){return e.replace(/\t/g,c.tabReplace)})))}};function b(e){var t=function(e){var t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";var n=c.languageDetectRe.exec(t);if(n){var r=S(n[1]);return r||(ae(s.replace("{}",n[1])),ae("Falling back to no-highlight mode for this block.",e)),r?n[1]:"no-highlight"}return t.split(/\s+/).find((function(e){return l(e)||S(e)}))}(e);if(!l(t)){T("before:highlightElement",{el:e,language:t});var r=e.textContent,o=t?d(r,{language:t,ignoreIllegals:!0}):p(r);T("after:highlightElement",{el:e,result:o,text:r}),e.innerHTML=o.value,function(e,t,r){var o=t?n[t]:r;e.classList.add("hljs"),o&&e.classList.add(o)}(e,t,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}}var M=!1;function k(){"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(b):M=!0}function S(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function L(e,t){var r=t.languageName;"string"==typeof e&&(e=[e]),e.forEach((function(e){n[e.toLowerCase()]=r}))}function x(e){var t=S(e);return t&&!t.disableAutodetect}function T(e,t){var n=e;o.forEach((function(e){e[n]&&e[n](t)}))}for(var D in"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){M&&k()}),!1),Object.assign(e,{highlight:d,highlightAuto:p,highlightAll:k,fixMarkup:function(e){return se("10.2.0","fixMarkup will be removed entirely in v11.0"),se("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,c.tabReplace||c.useBR?t.replace(a,(function(e){return"\n"===e?c.useBR?"<br>":e:c.tabReplace?e.replace(/\t/g,c.tabReplace):e})):t;var t},highlightElement:b,highlightBlock:function(e){return se("10.7.0","highlightBlock will be removed entirely in v12.0"),se("10.7.0","Please use highlightElement now."),b(e)},configure:function(e){e.useBR&&(se("10.3.0","'useBR' will be removed entirely in v11.0"),se("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),c=ce(c,e)},initHighlighting:function e(){e.called||(e.called=!0,se("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(b))},initHighlightingOnLoad:function(){se("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),M=!0},registerLanguage:function(n,r){var o=null;try{o=r(e)}catch(e){if(ie("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;ie(e),o=u}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&L(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];n[i]===e&&delete n[i]}},listLanguages:function(){return Object.keys(t)},getLanguage:S,registerAliases:L,requireLanguage:function(e){se("10.4.0","requireLanguage will be removed entirely in v11."),se("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");var t=S(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:x,inherit:ce,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=function(t){e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=function(t){e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},vuePlugin:ee(e).VuePlugin}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString="10.7.3",U)"object"===h(U[D])&&y(U[D]);return Object.assign(e,U),e.addPlugin(m),e.addPlugin(te),e.addPlugin(g),e}({});e.exports=de},function(e,t,n){"use strict";var r=n(660),o=i(Error);function i(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=o,o.eval=i(EvalError),o.range=i(RangeError),o.reference=i(ReferenceError),o.syntax=i(SyntaxError),o.type=i(TypeError),o.uri=i(URIError),o.create=i},function(e,t,n){"use strict";!function(){var t;function n(e){for(var t,n,r,o,i=1,a=[].slice.call(arguments),s=0,u=e.length,c="",l=!1,d=!1,f=function(){return a[i++]},p=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s<u;++s)if(t=e[s],l)switch(l=!1,"."==t?(d=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(d=!0,t=e[s+=2]):d=!0,o=p(),t){case"b":c+=parseInt(f(),10).toString(2);break;case"c":c+="string"==typeof(n=f())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(f(),10);break;case"f":r=String(parseFloat(f()).toFixed(o||6)),c+=d?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(f());break;case"o":c+="0"+parseInt(f(),10).toString(8);break;case"s":c+=f();break;case"x":c+="0x"+parseInt(f(),10).toString(16);break;case"X":c+="0x"+parseInt(f(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?l=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeHistory=function(e){return e.setMeta(v,!0)},t.history=function(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new a.Plugin({key:_,state:{init:function(){return new c(s.empty,s.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(_);if(i)return i.historyState;n.getMeta(v)&&(e=new c(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(_))return a.getMeta(_).redo?new c(e.done.addTransform(n,null,r,y(t)),e.undone,d(n.mapping.maps[n.steps.length-1]),e.prevTime):new c(e.done,e.undone.addTransform(n,null,r,y(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new c(e.done.rebased(n,o),e.undone.rebased(n,o),f(e.prevRanges,n.mapping),e.prevTime):new c(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),f(e.prevRanges,n.mapping),e.prevTime);var u=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=a?f(e.prevRanges,n.mapping):d(n.mapping.maps[n.steps.length-1]);return new c(e.done.addTransform(n,u?t.selection.getBookmark():null,r,y(t)),s.empty,l,n.time)}(n,r,t,e)}},config:e})},t.redo=function(e,t){var n=_.getState(e);if(!n||0==n.undone.eventCount)return!1;t&&p(n,e,t,!0);return!0},t.redoDepth=function(e){var t=_.getState(e);return t?t.undone.eventCount:0},t.undo=function(e,t){var n=_.getState(e);if(!n||0==n.done.eventCount)return!1;t&&p(n,e,t,!1);return!0},t.undoDepth=function(e){var t=_.getState(e);return t?t.done.eventCount:0},t.HistoryState=void 0;var r,o=(r=n(662))&&r.__esModule?r:{default:r},i=n(207),a=n(204);var s=function(e,t){this.items=e,this.eventCount=t};s.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,c,l=e.tr,d=[],f=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void f.push(e);if(r){f.push(new u(e.map));var p,h=e.step.map(r.slice(o));h&&l.maybeStep(h).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],d.push(new u(p,null,null,d.length+f.length))),o--,p&&r.appendMap(p,o)}else l.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,c=new s(n.items.slice(0,i).append(f.reverse().concat(d)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:c,transform:l,selection:a}},s.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,a=this.items,c=!r&&a.length?a.get(a.length-1):null,d=0;d<e.steps.length;d++){var f,p=e.steps[d].invert(e.docs[d]),h=new u(e.mapping.maps[d],p,t);(f=c&&c.merge(h))&&(h=f,d?o.pop():a=a.slice(0,a.length-1)),o.push(h),t&&(i++,t=null),r||(c=h)}var m,y,_,v=i-n.depth;return v>l&&(y=v,(m=a).forEach((function(e,t){if(e.selection&&0==y--)return _=t,!1})),a=m.slice(_),i-=v),new s(a.append(o),i)},s.prototype.remapping=function(e,t){var n=new i.Mapping;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,o)}),e,t),n},s.prototype.addMaps=function(e){return 0==this.eventCount?this:new s(this.items.append(e.map((function(e){return new u(e)}))),this.eventCount)},s.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((function(e){e.selection&&a--}),r);var c=t;this.items.forEach((function(t){var r=o.getMirror(--c);if(null!=r){i=Math.min(i,r);var s=o.maps[r];if(t.step){var l=e.steps[r].invert(e.docs[r]),d=t.selection&&t.selection.map(o.slice(c+1,r));d&&a++,n.push(new u(s,l,d))}else n.push(new u(s))}}),r);for(var l=[],d=t;d<i;d++)l.push(new u(o.maps[d]));var f=this.items.slice(0,r).append(l).append(n),p=new s(f,a);return p.emptyItemCount()>500&&(p=p.compress(this.items.length-n.length)),p},s.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},s.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((function(o,a){if(a>=e)r.push(o),o.selection&&i++;else if(o.step){var s=o.step.map(t.slice(n)),c=s&&s.getMap();if(n--,c&&t.appendMap(c,n),s){var l=o.selection&&o.selection.map(t.slice(n));l&&i++;var d,f=new u(c.invert(),s,l),p=r.length-1;(d=r.length&&r[p].merge(f))?r[p]=d:r.push(f)}}else o.map&&n--}),this.items.length,0),new s(o.default.from(r.reverse()),i)},s.empty=new s(o.default.empty,0);var u=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};u.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new u(t.getMap().invert(),t,this.selection)}};var c=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r};t.HistoryState=c;var l=20;function d(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function f(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function p(e,t,n,r){var o=y(t),i=_.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),u=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),l=new c(r?u:a.remaining,r?a.remaining:u,null,0);n(a.transform.setSelection(s).setMeta(_,{redo:r,historyState:l}).scrollIntoView())}}var h=!1,m=null;function y(e){var t=e.plugins;if(m!=t){h=!1,m=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){h=!0;break}}return h}var _=new a.PluginKey("history"),v=new a.PluginKey("closeHistory")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){};r.prototype.append=function(e){return e.length?(e=r.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},r.prototype.prepend=function(e){return e.length?r.from(e).append(this):this},r.prototype.appendInner=function(e){return new i(this,e)},r.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?r.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},r.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},r.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},r.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},r.from=function(e){return e instanceof r?e:e&&e.length?new o(e):r.empty};var o=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(r);r.empty=new o([]);var i=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(r),a=r;t.default=a},,,,,,function(e,t,n){"use strict";(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}var c=[];for(u=s;u<o.length;u++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(41))},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(204),o=n(205),i=n(413),a=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,o=e.length;r<o;r++){var i=O(e[r])(n.selection);if(i){var a=m(i.pos,t)(n);if(a!==n)return a}}return n}},s=function(e){return function(t){if(f(t.selection)){var n=t.selection,i=n.$from,a=n.$to;if(e instanceof o.Fragment&&i.parent.canReplace(i.index(),i.indexAfter(),e)||i.parent.canReplaceWith(i.index(),i.indexAfter(),e.type))return h(t.replaceWith(i.pos,a.pos,e).setSelection(new r.NodeSelection(t.doc.resolve(i.pos))))}return t}},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(e),t,!0);return o?n.setSelection(o):n}},c=function(e){return e.type&&e.type.spec.selectable},l=function(e,t,n){return function(e){return c(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):u(t)(n)},d=function(e,t,n){return function(r){var o="number"==typeof t,i=r.selection.$from,u=o?r.doc.resolve(t):f(r.selection)?r.doc.resolve(i.pos+1):i,d=u.parent;if(f(r.selection)&&n&&r!==(r=s(e)(r)))return r;if(b(d)&&r!==(r=a(d.type,e)(r))){var p=c(e)?u.before(u.depth):u.pos;return l(e,p,r)}if(g(u,e)){r.insert(u.pos,e);var m=o?u.pos:c(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return h(l(e,m,r))}for(var y=u.depth;y>0;y--){var _=u.after(y),v=r.doc.resolve(_);if(g(v,e))return r.insert(_,e),h(l(e,_,r))}return r}},f=function(e){return e instanceof r.NodeSelection},p=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},h=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},m=function(e,t){return function(n){var r=n.doc.nodeAt(e),o=n.doc.resolve(e);if(y(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=u(Math.max(i,0),-1)(n),n=u(n.selection.$from.start())(n),h(n)}return n}},y=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},_=function(e){return function(t){var n=t.doc.nodeAt(e);return h(t.delete(e,e+n.nodeSize))}},v=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t},g=function(e,t){var n=e.index();return t instanceof o.Fragment?e.parent.canReplace(n,n,t):t instanceof o.Node&&e.parent.canReplaceWith(n,n,t.type)},b=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},M=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},k=function(e){return function(t){for(var n=i.TableMap.get(t.$anchorCell.node(-1)),r=t.$anchorCell.start(-1),o=n.cellsInRect(e),a=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r)),s=0,u=o.length;s<u;s++)if(-1===a.indexOf(o[s]))return!1;return!0}},w=function(e){return e[0].map((function(t,n){return e.map((function(e){return e[n]}))}))},S=function(e){for(var t=i.TableMap.get(e),n=[],r=0;r<t.height;r++){for(var o=[],a={},s=0;s<t.width;s++){var u=t.map[r*t.width+s],c=e.nodeAt(u),l=t.findCell(u);a[u]||l.top!==r?o.push(null):(a[u]=!0,o.push(c))}n.push(o)}return n},L=function(e,t){for(var n=[],r=i.TableMap.get(e),o=0;o<r.height;o++){for(var a=e.child(o),s=[],u=0;u<r.width;u++)if(t[o][u]){var c=r.map[o*r.width+u],l=t[o][u],d=e.nodeAt(c).type.createChecked(Object.assign({},l.attrs),l.content,l.marks);s.push(d)}n.push(a.type.createChecked(a.attrs,s,a.marks))}return e.type.createChecked(e.attrs,n,e.marks)},x=function(e,t,n,r){var o=t[0]>n[0]?-1:1,i=e.splice(t[0],t.length),a=i.length%2==0?1:0,s=void 0;return s=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-a+1:-1===o?n[0]:n[n.length-1]-a,e.splice.apply(e,[s,0].concat(i)),e},T=function(e,t,n,r){var o="Target position is invalid, you can't move the "+r+" "+e+" to "+t+", the target can't be split. You could use tryToFit option.";if(1===(e>t?-1:1)){if(-1!==n.slice(0,n.length-1).indexOf(t))throw new Error(o)}else if(-1!==n.slice(1).indexOf(t))throw new Error(o);return!0},D=function(e){return function(t){var n=t.$from;return Y(n,e)}},Y=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},C=function(e,t){return function(n){var r=D(e)(n);if(r)return j(r.pos,t)}},A=function(e){return function(t){return!!D(e)(t)}},O=function(e){return function(t){return D((function(t){return p(e,t)}))(t)}},E=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var o=O(t.type)(n);return o?o.pos:n.$from.pos}},j=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},P=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},N=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return P(e,n).filter((function(e){return t(e.node)}))},H=function(e,t,n){return N(e,(function(e){return e.type===t}),n)};var R=function(e){return D((function(e){return e.type.spec.tableRole&&"table"===e.type.spec.tableRole}))(e)},I=function(e){return e instanceof i.CellSelection},F=function(e){if(I(e)){var t=i.TableMap.get(e.$anchorCell.node(-1));return k({left:0,right:t.width,top:0,bottom:t.height})(e)}return!1},z=function(e){return function(t){var n=R(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.width-1){var o=r.cellsInRect({left:t,right:t+1,top:0,bottom:r.height});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},$=function(e){return function(t){var n=R(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.height-1){var o=r.cellsInRect({left:0,right:r.width,top:t,bottom:t+1});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},B=function(e){return function(t,n){return function(r){var o=R(r.selection),a="row"===e;if(o){var s=i.TableMap.get(o.node);if(t>=0&&t<(a?s.height:s.width)){var u=a?0:t,c=a?t:0,l=a?s.width:t+1,d=a?t+1:s.height;if(n){var f=Z(r.selection.$from);if(!f)return r;var p=s.findCell(f.pos-o.start);a?(c=Math.min(c,p.top),d=Math.max(d,p.bottom)):(u=Math.min(u,p.left),l=Math.max(l,p.right))}var m=s.cellsInRect({left:u,top:c,right:a?l:u+1,bottom:a?c+1:d}),y=d-c==1?m:s.cellsInRect({left:a?u:l-1,top:a?d-1:c,right:l,bottom:d}),_=o.start+m[0],v=o.start+y[y.length-1],g=r.doc.resolve(_),b=r.doc.resolve(v);return h(r.setSelection(new i.CellSelection(b,g)))}}return r}}},W=B("column"),U=B("row"),q=function(e){return function(t){var n=R(t.selection);if(n){var r=i.TableMap.get(n.node);if(e>=0&&e<=r.height){for(var o=n.node,a=v(o.type.schema),s=n.start,u=0;u<e+1;u++)s+=o.child(u).nodeSize;var c=o.child(e),l=[],f=0;if(c.forEach((function(e){1===e.attrs.rowspan&&(f+=e.attrs.colspan,l.push(a[e.type.spec.tableRole].createAndFill(e.attrs,e.marks)))})),f<r.width){for(var p=[],h=function(n){var r=Q(n,(function(t,r){var o=t.node.attrs.rowspan;return o>1&&n+o>e}))(t);p.push.apply(p,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(r))},m=e;m>=0;m--)h(m);p.length&&p.forEach((function(e){t=K(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return d(a.row.create(c.attrs,l),s)(t)}}return t}},V=function(e){return function(t){var n=R(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.width)return G(t);if(e>=0&&e<=r.width)return i.removeColumn(t,{map:r,tableStart:n.start,table:n.node},e),h(t)}return t}},J=function(e){return function(t){var n=R(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.height)return G(t);if(e>=0&&e<=r.height)return i.removeRow(t,{map:r,tableStart:n.start,table:n.node},e),h(t)}return t}},G=function(e){for(var t=e.selection.$from,n=t.depth;n>0;n--){if("table"===t.node(n).type.spec.tableRole)return h(e.delete(t.before(n),t.after(n)))}return e},K=function(e,t){return function(n){return e?(n.setNodeMarkup(e.pos,null,Object.assign({},e.node.attrs,t)),h(n)):n}},Z=function(e){return Y(e,(function(e){return e.type.spec.tableRole&&/cell/i.test(e.type.spec.tableRole)}))},X=function(e){var t=Z(e);if(t){var n=function(e){return Y(e,(function(e){return e.type.spec.tableRole&&/table/i.test(e.type.spec.tableRole)}))}(e),r=i.TableMap.get(n.node),o=t.pos-n.start;return r.rectBetween(o,o)}},Q=function(e,t){return function(n){var r=[],o=$(e)(n.selection);if(o)for(var i=o.length-1;i>=0;i--)t(o[i],n)&&r.push(o[i]);return r}},ee=function(e){return function(t){for(var n=e,r=e,o=function(e){var o=z(e)(t.selection);o&&o.forEach((function(t){var o=t.node.attrs.colspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var a=function(e){var n=z(e)(t.selection);n&&n.forEach((function(t){var n=t.node.attrs.colspan+e-1;t.node.attrs.colspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)a(i);var s=[];for(i=n;i<=r;i++){var u=z(i)(t.selection);u&&u.length&&s.push(i)}n=s[0],r=s[s.length-1];for(var c=z(n)(t.selection),l=$(0)(t.selection),d=t.doc.resolve(c[c.length-1].pos),f=void 0,p=r;p>=n;p--){var h=z(p)(t.selection);if(h&&h.length){for(var m=l.length-1;m>=0;m--)if(l[m].pos===h[0].pos){f=h[0];break}if(f)break}}return{$anchor:d,$head:t.doc.resolve(f.pos),indexes:s}}},te=function(e){return function(t){for(var n=e,r=e,o=function(e){$(e)(t.selection).forEach((function(t){var o=t.node.attrs.rowspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var a=function(e){$(e)(t.selection).forEach((function(t){var n=t.node.attrs.rowspan+e-1;t.node.attrs.rowspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)a(i);var s=[];for(i=n;i<=r;i++){var u=$(i)(t.selection);u&&u.length&&s.push(i)}n=s[0],r=s[s.length-1];for(var c=$(n)(t.selection),l=z(0)(t.selection),d=t.doc.resolve(c[c.length-1].pos),f=void 0,p=r;p>=n;p--){var h=$(p)(t.selection);if(h&&h.length){for(var m=l.length-1;m>=0;m--)if(l[m].pos===h[0].pos){f=h[0];break}if(f)break}}return{$anchor:d,$head:t.doc.resolve(f.pos),indexes:s}}};t.isNodeSelection=f,t.canInsert=g,t.convertTableNodeToArrayOfRows=S,t.convertArrayOfRowsToTableNode=L,t.findParentNode=D,t.findParentNodeClosestToPos=Y,t.findParentDomRef=C,t.hasParentNode=A,t.findParentNodeOfType=O,t.findParentNodeOfTypeClosestToPos=function(e,t){return Y(e,(function(e){return p(t,e)}))},t.hasParentNodeOfType=function(e){return function(t){return A((function(t){return p(e,t)}))(t)}},t.findParentDomRefOfType=function(e,t){return function(n){return C((function(t){return p(e,t)}),t)(n)}},t.findSelectedNodeOfType=function(e){return function(t){if(f(t)){var n=t.node,r=t.$from;if(p(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.findPositionOfNodeBefore=E,t.findDomRefAtPos=j,t.flatten=P,t.findChildren=N,t.findTextNodes=function(e,t){return N(e,(function(e){return e.isText}),t)},t.findInlineNodes=function(e,t){return N(e,(function(e){return e.isInline}),t)},t.findBlockNodes=function(e,t){return N(e,(function(e){return e.isBlock}),t)},t.findChildrenByAttr=function(e,t,n){return N(e,(function(e){return!!t(e.attrs)}),n)},t.findChildrenByType=H,t.findChildrenByMark=function(e,t,n){return N(e,(function(e){return t.isInSet(e.marks)}),n)},t.contains=function(e,t){return!!H(e,t).length},t.findTable=R,t.isCellSelection=I,t.getSelectionRect=function(e){if(I(e)){var t=e.$anchorCell.start(-1);return i.TableMap.get(e.$anchorCell.node(-1)).rectBetween(e.$anchorCell.pos-t,e.$headCell.pos-t)}},t.isColumnSelected=function(e){return function(t){if(I(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return k({left:e,right:e+1,top:0,bottom:n.height})(t)}return!1}},t.isRowSelected=function(e){return function(t){if(I(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return k({left:0,right:n.width,top:e,bottom:e+1})(t)}return!1}},t.isTableSelected=F,t.getCellsInColumn=z,t.getCellsInRow=$,t.getCellsInTable=function(e){var t=R(e);if(t){var n=i.TableMap.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((function(e){var n=t.node.nodeAt(e),r=e+t.start;return{pos:r,start:r+1,node:n}}))}},t.selectColumn=W,t.selectRow=U,t.selectTable=function(e){var t=R(e.selection);if(t){var n=i.TableMap.get(t.node).map;if(n&&n.length){var r=t.start+n[0],o=t.start+n[n.length-1],a=e.doc.resolve(r),s=e.doc.resolve(o);return h(e.setSelection(new i.CellSelection(s,a)))}}return e},t.emptyCell=function(e,t){return function(n){if(e){var r=v(t).cell.createAndFill().content;if(!e.node.content.eq(r))return n.replaceWith(e.pos+1,e.pos+e.node.nodeSize,r),h(n)}return n}},t.addColumnAt=function(e){return function(t){var n=R(t.selection);if(n){var r=i.TableMap.get(n.node);if(e>=0&&e<=r.width)return h(i.addColumn(t,{map:r,tableStart:n.start,table:n.node},e))}return t}},t.moveRow=function(e,t,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=R(r.selection);if(!i)return r;var a=te(e)(r).indexes,s=te(t)(r).indexes;if(a.indexOf(t)>-1)return r;!o.tryToFit&&s.length>1&&T(e,t,s,"row");var u=function(e,t,n,r){var o=S(e.node);return o=x(o,t,n,r),L(e.node,o)}(i,a,s,o.direction);return h(r).replaceWith(i.pos,i.pos+i.node.nodeSize,u)}},t.moveColumn=function(e,t,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=R(r.selection);if(!i)return r;var a=ee(e)(r).indexes,s=ee(t)(r).indexes;if(a.indexOf(t)>-1)return r;!o.tryToFit&&s.length>1&&T(e,t,s,"column");var u=function(e,t,n,r){var o=w(S(e.node));return o=x(o,t,n,r),o=w(o),L(e.node,o)}(i,a,s,o.direction);return h(r).replaceWith(i.pos,i.pos+i.node.nodeSize,u)}},t.addRowAt=function(e,t){return function(n){var r=R(n.selection);if(r){var o=i.TableMap.get(r.node),a=e-1;if(t&&a>=0)return h(q(a)(n));if(e>=0&&e<=o.height)return h(i.addRow(n,{map:o,tableStart:r.start,table:r.node},e))}return n}},t.cloneRowAt=q,t.removeColumnAt=V,t.removeRowAt=J,t.removeTable=G,t.removeSelectedColumns=function(e){var t=e.selection;if(F(t))return G(e);if(I(t)){var n=R(t);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==o.left&&o.right==r.width)return!1;for(var a=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),s=a.right-1;i.removeColumn(e,a,s),s!==a.left;s--)a.table=a.tableStart?e.doc.nodeAt(a.tableStart-1):e.doc,a.map=i.TableMap.get(a.table);return h(e)}}return e},t.removeSelectedRows=function(e){var t=e.selection;if(F(t))return G(e);if(I(t)){var n=R(t);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==o.top&&o.bottom==r.height)return!1;for(var a=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),s=a.bottom-1;i.removeRow(e,a,s),s!==a.top;s--)a.table=a.tableStart?e.doc.nodeAt(a.tableStart-1):e.doc,a.map=i.TableMap.get(a.table);return h(e)}}return e},t.removeColumnClosestToPos=function(e){return function(t){var n=X(e);return n?V(n.left)(u(e.pos)(t)):t}},t.removeRowClosestToPos=function(e){return function(t){var n=X(e);return n?J(n.top)(u(e.pos)(t)):t}},t.forEachCellInColumn=function(e,t,n){return function(o){var i=z(e)(o.selection);if(i){for(var a=i.length-1;a>=0;a--)o=t(i[a],o);if(n){var s=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(s))}return h(o)}return o}},t.forEachCellInRow=function(e,t,n){return function(o){var i=$(e)(o.selection);if(i){for(var a=i.length-1;a>=0;a--)o=t(i[a],o);if(n){var s=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(s))}}return o}},t.setCellAttrs=K,t.createTable=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=v(e),a=i.cell,s=i.header_cell,u=i.row,c=i.table,l=[],d=[],f=0;f<n;f++)l.push(M(a,o)),r&&d.push(M(s,o));for(var p=[],h=0;h<t;h++)p.push(u.createChecked(null,r&&0===h?d:l));return c.createChecked(null,p)},t.findCellClosestToPos=Z,t.findCellRectClosestToPos=X,t.getSelectionRangeInColumn=ee,t.getSelectionRangeInRow=te,t.removeParentNodeOfType=function(e){return function(t){var n=O(e)(t.selection);return n?_(n.pos)(t):t}},t.replaceParentNodeOfType=a,t.removeSelectedNode=function(e){if(f(e.selection)){var t=e.selection.$from.pos,n=e.selection.$to.pos;return h(e.delete(t,n))}return e},t.replaceSelectedNode=s,t.setTextSelection=u,t.safeInsert=d,t.setParentNodeMarkup=function(e,t,n,r){return function(o){var i=O(e)(o.selection);return i?h(o.setNodeMarkup(i.pos,t,Object.assign({},i.node.attrs,n),r)):o}},t.selectParentNodeOfType=function(e){return function(t){if(!f(t.selection)){var n=O(e)(t.selection);if(n)return h(t.setSelection(r.NodeSelection.create(t.doc,n.pos)))}return t}},t.removeNodeBefore=function(e){var t=E(e.selection);return"number"==typeof t?_(t)(e):e}},,,,function(e,t,n){"use strict";var r=n(202),o=n(684),i=n(688),a=n(689),s=n(697),u=n(711),c=n(724),l=n(416),d=n(726),f={default:n(727),zero:n(728),commonmark:n(729)},p=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!p.test(t)||!!h.test(t)}var y=["http:","https:","mailto:"];function _(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return l.encode(l.format(t))}function v(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return l.decode(l.format(t),l.decode.defaultChars+"%")}function g(e,t){if(!(this instanceof g))return new g(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new u,this.block=new s,this.core=new a,this.renderer=new i,this.linkify=new c,this.validateLink=m,this.normalizeLink=_,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(e),t&&this.set(t)}g.prototype.set=function(e){return r.assign(this.options,e),this},g.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=f[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},g.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},g.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},g.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},g.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},g.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},g.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},g.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=g},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},function(e,t,n){"use strict";var r={};function o(e,t,n){var i,a,s,u,c,l="";for("string"!=typeof t&&(n=t,t=o.defaultChars),void 0===n&&(n=!0),c=function(e){var t,n,o=r[e];if(o)return o;for(o=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?o.push(n):o.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)o[e.charCodeAt(t)]=e[t];return o}(t),i=0,a=e.length;i<a;i++)if(s=e.charCodeAt(i),n&&37===s&&i+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3)))l+=e.slice(i,i+3),i+=2;else if(s<128)l+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&i+1<a&&(u=e.charCodeAt(i+1))>=56320&&u<=57343){l+=encodeURIComponent(e[i]+e[i+1]),i++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[i]);return l}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},function(e,t,n){"use strict";var r={};function o(e,t){var n;return"string"!=typeof t&&(t=o.defaultChars),n=function(e){var t,n,o=r[e];if(o)return o;for(o=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),o.push(n);for(t=0;t<e.length;t++)o[n=e.charCodeAt(t)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return o}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,o,i,a,s,u,c="";for(t=0,r=e.length;t<r;t+=3)(o=parseInt(e.slice(t+1,t+3),16))<128?c+=n[o]:192==(224&o)&&t+3<r&&128==(192&(i=parseInt(e.slice(t+4,t+6),16)))?(c+=(u=o<<6&1984|63&i)<128?"��":String.fromCharCode(u),t+=3):224==(240&o)&&t+6<r&&(i=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128==(192&i)&&128==(192&a))?(c+=(u=o<<12&61440|i<<6&4032|63&a)<2048||u>=55296&&u<=57343?"���":String.fromCharCode(u),t+=6):240==(248&o)&&t+9<r&&(i=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&i)&&128==(192&a)&&128==(192&s))?((u=o<<18&1835008|i<<12&258048|a<<6&4032|63&s)<65536||u>1114111?c+="����":(u-=65536,c+=String.fromCharCode(55296+(u>>10),56320+(1023&u))),t+=9):c+="�";return c}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",e.exports=o},function(e,t,n){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),c=["%","/","?",";","#"].concat(u),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(e,t){var n,r,i,s,u,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var y=a.exec(m);if(y)return this.pathname=y[1],y[2]&&(this.search=y[2]),this}var _=o.exec(m);if(_&&(i=(_=_[0]).toLowerCase(),this.protocol=_,m=m.substr(_.length)),(t||_||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(u="//"===m.substr(0,2))||_&&p[_]||(m=m.substr(2),this.slashes=!0)),!p[_]&&(u||_&&!h[_])){var v,g,b=-1;for(n=0;n<l.length;n++)-1!==(s=m.indexOf(l[n]))&&(-1===b||s<b)&&(b=s);for(-1!==(g=-1===b?m.lastIndexOf("@"):m.lastIndexOf("@",b))&&(v=m.slice(0,g),m=m.slice(g+1),this.auth=v),b=-1,n=0;n<c.length;n++)-1!==(s=m.indexOf(c[n]))&&(-1===b||s<b)&&(b=s);-1===b&&(b=m.length),":"===m[b-1]&&b--;var M=m.slice(0,b);m=m.slice(b),this.parseHost(M),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k){var w=this.hostname.split(/\./);for(n=0,r=w.length;n<r;n++){var S=w[n];if(S&&!S.match(d)){for(var L="",x=0,T=S.length;x<T;x++)S.charCodeAt(x)>127?L+="x":L+=S[x];if(!L.match(d)){var D=w.slice(0,n),Y=w.slice(n+1),C=S.match(f);C&&(D.push(C[1]),Y.unshift(C[2])),Y.length&&(m=Y.join(".")+m),this.hostname=D.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var A=m.indexOf("#");-1!==A&&(this.hash=m.substr(A),m=m.slice(0,A));var O=m.indexOf("?");return-1!==O&&(this.search=m.substr(O),m=m.slice(0,O)),m&&(this.pathname=m),h[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){var t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,t){if(e&&e instanceof r)return e;var n=new r;return n.parse(e,t),n}},function(e,t,n){"use strict";t.Any=n(417),t.Cc=n(418),t.Cf=n(683),t.P=n(243),t.Z=n(419)},function(e,t,n){"use strict";e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){"use strict";t.parseLinkLabel=n(685),t.parseLinkDestination=n(686),t.parseLinkTitle=n(687)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i,a,s=-1,u=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<u;){if(93===(i=e.src.charCodeAt(e.pos))&&0===--r){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),91===i)if(a===e.pos-1)r++;else if(n)return e.pos=c,-1}return o&&(s=e.pos),e.pos=c,s}},function(e,t,n){"use strict";var r=n(202).unescapeAll;e.exports=function(e,t,n){var o,i,a=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(o=e.charCodeAt(t)))return s;if(60===o)return s;if(62===o)return s.pos=t+1,s.str=r(e.slice(a+1,t)),s.ok=!0,s;92===o&&t+1<n?t+=2:t++}return s}for(i=0;t<n&&32!==(o=e.charCodeAt(t))&&!(o<32||127===o);)if(92===o&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===o&&++i>32)return s;if(41===o){if(0===i)break;i--}t++}return a===t||0!==i||(s.str=r(e.slice(a,t)),s.lines=0,s.pos=t,s.ok=!0),s}},function(e,t,n){"use strict";var r=n(202).unescapeAll;e.exports=function(e,t,n){var o,i,a=0,s=t,u={ok:!1,pos:0,lines:0,str:""};if(t>=n)return u;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return u;for(t++,40===i&&(i=41);t<n;){if((o=e.charCodeAt(t))===i)return u.pos=t+1,u.lines=a,u.str=r(e.slice(s+1,t)),u.ok=!0,u;if(40===o&&41===i)return u;10===o?a++:92===o&&t+1<n&&(t++,10===e.charCodeAt(t)&&a++),t++}return u}},function(e,t,n){"use strict";var r=n(202).assign,o=n(202).unescapeAll,i=n(202).escapeHtml,a={};function s(){this.rules=r({},a)}a.code_inline=function(e,t,n,r,o){var a=e[t];return"<code"+o.renderAttrs(a)+">"+i(e[t].content)+"</code>"},a.code_block=function(e,t,n,r,o){var a=e[t];return"<pre"+o.renderAttrs(a)+"><code>"+i(e[t].content)+"</code></pre>\n"},a.fence=function(e,t,n,r,a){var s,u,c,l,d,f=e[t],p=f.info?o(f.info).trim():"",h="",m="";return p&&(h=(c=p.split(/(\s+)/g))[0],m=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(f.content,h,m)||i(f.content)).indexOf("<pre")?s+"\n":p?(u=f.attrIndex("class"),l=f.attrs?f.attrs.slice():[],u<0?l.push(["class",n.langPrefix+h]):(l[u]=l[u].slice(),l[u][1]+=" "+n.langPrefix+h),d={attrs:l},"<pre><code"+a.renderAttrs(d)+">"+s+"</code></pre>\n"):"<pre><code"+a.renderAttrs(f)+">"+s+"</code></pre>\n"},a.image=function(e,t,n,r,o){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},a.text=function(e,t){return i(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+i(e.attrs[t][0])+'="'+i(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,o="",i=!1,a=e[t];return a.hidden?"":(a.block&&-1!==a.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===a.nesting?"</":"<")+a.tag,o+=this.renderAttrs(a),0===a.nesting&&n.xhtmlOut&&(o+=" /"),a.block&&(i=!0,1===a.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===a.tag)&&(i=!1)),o+=i?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,o="",i=this.rules,a=0,s=e.length;a<s;a++)void 0!==i[r=e[a].type]?o+=i[r](e,a,t,n,this):o+=this.renderToken(e,a,t);return o},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",o=0,i=e.length;o<i;o++)"text"===e[o].type?r+=e[o].content:"image"===e[o].type?r+=this.renderInlineAsText(e[o].children,t,n):"softbreak"===e[o].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,o,i,a="",s=this.rules;for(r=0,o=e.length;r<o;r++)"inline"===(i=e[r].type)?a+=this.renderInline(e[r].children,t,n):void 0!==s[i]?a+=s[e[r].type](e,r,t,n,this):a+=this.renderToken(e,r,t,n);return a},e.exports=s},function(e,t,n){"use strict";var r=n(244),o=[["normalize",n(690)],["block",n(691)],["inline",n(692)],["linkify",n(693)],["replacements",n(694)],["smartquotes",n(695)]];function i(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1])}i.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},i.prototype.State=n(696),e.exports=i},function(e,t,n){"use strict";var r=/\r\n?|\n/g,o=/\0/g;e.exports=function(e){var t;t=(t=e.src.replace(r,"\n")).replace(o,"�"),e.src=t}},function(e,t,n){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r,o=e.tokens;for(n=0,r=o.length;n<r;n++)"inline"===(t=o[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},function(e,t,n){"use strict";var r=n(202).arrayReplaceAt;function o(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,i,a,s,u,c,l,d,f,p,h,m,y,_,v,g,b,M=e.tokens;if(e.md.options.linkify)for(n=0,i=M.length;n<i;n++)if("inline"===M[n].type&&e.md.linkify.pretest(M[n].content))for(m=0,t=(a=M[n].children).length-1;t>=0;t--)if("link_close"!==(u=a[t]).type){if("html_inline"===u.type&&(b=u.content,/^<a[>\s]/i.test(b)&&m>0&&m--,o(u.content)&&m++),!(m>0)&&"text"===u.type&&e.md.linkify.test(u.content)){for(d=u.content,g=e.md.linkify.match(d),c=[],h=u.level,p=0,l=0;l<g.length;l++)y=g[l].url,_=e.md.normalizeLink(y),e.md.validateLink(_)&&(v=g[l].text,v=g[l].schema?"mailto:"!==g[l].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(f=g[l].index)>p&&((s=new e.Token("text","",0)).content=d.slice(p,f),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",_]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),p=g[l].lastIndex);p<d.length&&((s=new e.Token("text","",0)).content=d.slice(p),s.level=h,c.push(s)),M[n].children=a=r(a,t,c)}}else for(t--;a[t].level!==u.level&&"link_open"!==a[t].type;)t--}},function(e,t,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r|p)\)/i,i=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function s(e,t){return a[t.toLowerCase()]}function u(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(i,s)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function c(e){var t,n,o=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||o||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(o.test(e.tokens[t].content)&&u(e.tokens[t].children),r.test(e.tokens[t].content)&&c(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(202).isWhiteSpace,o=n(202).isPunctChar,i=n(202).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,a,c,l,d,f,p,h,m,y,_,v,g,b,M,k,w,S,L,x,T;for(L=[],n=0;n<e.length;n++){for(a=e[n],p=e[n].level,w=L.length-1;w>=0&&!(L[w].level<=p);w--);if(L.length=w+1,"text"===a.type){d=0,f=(c=a.content).length;e:for(;d<f&&(s.lastIndex=d,l=s.exec(c));){if(M=k=!0,d=l.index+1,S="'"===l[0],m=32,l.index-1>=0)m=c.charCodeAt(l.index-1);else for(w=n-1;w>=0&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w--)if(e[w].content){m=e[w].content.charCodeAt(e[w].content.length-1);break}if(y=32,d<f)y=c.charCodeAt(d);else for(w=n+1;w<e.length&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w++)if(e[w].content){y=e[w].content.charCodeAt(0);break}if(_=i(m)||o(String.fromCharCode(m)),v=i(y)||o(String.fromCharCode(y)),g=r(m),(b=r(y))?M=!1:v&&(g||_||(M=!1)),g?k=!1:_&&(b||v||(k=!1)),34===y&&'"'===l[0]&&m>=48&&m<=57&&(k=M=!1),M&&k&&(M=_,k=v),M||k){if(k)for(w=L.length-1;w>=0&&(h=L[w],!(L[w].level<p));w--)if(h.single===S&&L[w].level===p){h=L[w],S?(x=t.md.options.quotes[2],T=t.md.options.quotes[3]):(x=t.md.options.quotes[0],T=t.md.options.quotes[1]),a.content=u(a.content,l.index,T),e[h.token].content=u(e[h.token].content,h.pos,x),d+=T.length-1,h.token===n&&(d+=x.length-1),f=(c=a.content).length,L.length=w;continue e}M?L.push({token:n,pos:l.index,single:S,level:p}):k&&S&&(a.content=u(a.content,l.index,"’"))}else S&&(a.content=u(a.content,l.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(245);function o(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(244),o=[["table",n(698),["paragraph","reference"]],["code",n(699)],["fence",n(700),["paragraph","reference","blockquote","list"]],["blockquote",n(701),["paragraph","reference","blockquote","list"]],["hr",n(702),["paragraph","reference","blockquote","list"]],["list",n(703),["paragraph","reference","blockquote"]],["reference",n(704)],["html_block",n(705),["paragraph","reference","blockquote"]],["heading",n(707),["paragraph","reference","blockquote"]],["lheading",n(708)],["paragraph",n(709)]];function i(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1],{alt:(o[e][2]||[]).slice()})}i.prototype.tokenize=function(e,t,n){for(var r,o=this.ruler.getRules(""),i=o.length,a=t,s=!1,u=e.md.options.maxNesting;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n))&&!(e.sCount[a]<e.blkIndent);){if(e.level>=u){e.line=n;break}for(r=0;r<i&&!o[r](e,a,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(a=e.line)<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},i.prototype.parse=function(e,t,n,r){var o;e&&(o=new this.State(e,t,n,r),this.tokenize(o,o.line,o.lineMax))},i.prototype.State=n(710),e.exports=i},function(e,t,n){"use strict";var r=n(202).isSpace;function o(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function i(e){var t,n=[],r=0,o=e.length,i=!1,a=0,s="";for(t=e.charCodeAt(r);r<o;)124===t&&(i?(s+=e.substring(a,r-1),a=r):(n.push(s+e.substring(a,r)),s="",a=r+1)),i=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(a)),n}e.exports=function(e,t,n,a){var s,u,c,l,d,f,p,h,m,y,_,v,g,b,M,k,w,S;if(t+2>n)return!1;if(f=t+1,e.sCount[f]<e.blkIndent)return!1;if(e.sCount[f]-e.blkIndent>=4)return!1;if((c=e.bMarks[f]+e.tShift[f])>=e.eMarks[f])return!1;if(124!==(w=e.src.charCodeAt(c++))&&45!==w&&58!==w)return!1;if(c>=e.eMarks[f])return!1;if(124!==(S=e.src.charCodeAt(c++))&&45!==S&&58!==S&&!r(S))return!1;if(45===w&&r(S))return!1;for(;c<e.eMarks[f];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(p=(u=o(e,t+1)).split("|"),y=[],l=0;l<p.length;l++){if(!(_=p[l].trim())){if(0===l||l===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(_))return!1;58===_.charCodeAt(_.length-1)?y.push(58===_.charCodeAt(0)?"center":"right"):58===_.charCodeAt(0)?y.push("left"):y.push("")}if(-1===(u=o(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((p=i(u)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(h=p.length)||h!==y.length)return!1;if(a)return!0;for(b=e.parentType,e.parentType="table",k=e.md.block.ruler.getRules("blockquote"),(m=e.push("table_open","table",1)).map=v=[t,0],(m=e.push("thead_open","thead",1)).map=[t,t+1],(m=e.push("tr_open","tr",1)).map=[t,t+1],l=0;l<p.length;l++)m=e.push("th_open","th",1),y[l]&&(m.attrs=[["style","text-align:"+y[l]]]),(m=e.push("inline","",0)).content=p[l].trim(),m.children=[],m=e.push("th_close","th",-1);for(m=e.push("tr_close","tr",-1),m=e.push("thead_close","thead",-1),f=t+2;f<n&&!(e.sCount[f]<e.blkIndent);f++){for(M=!1,l=0,d=k.length;l<d;l++)if(k[l](e,f,n,!0)){M=!0;break}if(M)break;if(!(u=o(e,f).trim()))break;if(e.sCount[f]-e.blkIndent>=4)break;for((p=i(u)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),f===t+2&&((m=e.push("tbody_open","tbody",1)).map=g=[t+2,0]),(m=e.push("tr_open","tr",1)).map=[f,f+1],l=0;l<h;l++)m=e.push("td_open","td",1),y[l]&&(m.attrs=[["style","text-align:"+y[l]]]),(m=e.push("inline","",0)).content=p[l]?p[l].trim():"",m.children=[],m=e.push("td_close","td",-1);m=e.push("tr_close","tr",-1)}return g&&(m=e.push("tbody_close","tbody",-1),g[1]=f),m=e.push("table_close","table",-1),v[1]=f,e.parentType=b,e.line=f,!0}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(o=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;o=++r}return e.line=o,(i=e.push("code_block","code",0)).content=e.getLines(t,o,4+e.blkIndent,!0),i.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,a,s,u,c,l,d=!1,f=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(f+3>p)return!1;if(126!==(o=e.src.charCodeAt(f))&&96!==o)return!1;if(u=f,(i=(f=e.skipChars(f,o))-u)<3)return!1;if(l=e.src.slice(u,f),a=e.src.slice(f,p),96===o&&a.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((f=u=e.bMarks[s]+e.tShift[s])<(p=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(f)===o&&!(e.sCount[s]-e.blkIndent>=4||(f=e.skipChars(f,o))-u<i||(f=e.skipSpaces(f))<p)){d=!0;break}return i=e.sCount[t],e.line=s+(d?1:0),(c=e.push("fence","code",0)).info=a,c.content=e.getLines(t+1,s,i,!0),c.markup=l,c.map=[t,e.line],!0}},function(e,t,n){"use strict";var r=n(202).isSpace;e.exports=function(e,t,n,o){var i,a,s,u,c,l,d,f,p,h,m,y,_,v,g,b,M,k,w,S,L=e.lineMax,x=e.bMarks[t]+e.tShift[t],T=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(x++))return!1;if(o)return!0;for(u=p=e.sCount[t]+1,32===e.src.charCodeAt(x)?(x++,u++,p++,i=!1,b=!0):9===e.src.charCodeAt(x)?(b=!0,(e.bsCount[t]+p)%4==3?(x++,u++,p++,i=!1):i=!0):b=!1,h=[e.bMarks[t]],e.bMarks[t]=x;x<T&&(a=e.src.charCodeAt(x),r(a));)9===a?p+=4-(p+e.bsCount[t]+(i?1:0))%4:p++,x++;for(m=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(b?1:0),l=x>=T,v=[e.sCount[t]],e.sCount[t]=p-u,g=[e.tShift[t]],e.tShift[t]=x-e.bMarks[t],k=e.md.block.ruler.getRules("blockquote"),_=e.parentType,e.parentType="blockquote",f=t+1;f<n&&(S=e.sCount[f]<e.blkIndent,!((x=e.bMarks[f]+e.tShift[f])>=(T=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(x++)||S){if(l)break;for(M=!1,s=0,c=k.length;s<c;s++)if(k[s](e,f,n,!0)){M=!0;break}if(M){e.lineMax=f,0!==e.blkIndent&&(h.push(e.bMarks[f]),m.push(e.bsCount[f]),g.push(e.tShift[f]),v.push(e.sCount[f]),e.sCount[f]-=e.blkIndent);break}h.push(e.bMarks[f]),m.push(e.bsCount[f]),g.push(e.tShift[f]),v.push(e.sCount[f]),e.sCount[f]=-1}else{for(u=p=e.sCount[f]+1,32===e.src.charCodeAt(x)?(x++,u++,p++,i=!1,b=!0):9===e.src.charCodeAt(x)?(b=!0,(e.bsCount[f]+p)%4==3?(x++,u++,p++,i=!1):i=!0):b=!1,h.push(e.bMarks[f]),e.bMarks[f]=x;x<T&&(a=e.src.charCodeAt(x),r(a));)9===a?p+=4-(p+e.bsCount[f]+(i?1:0))%4:p++,x++;l=x>=T,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(b?1:0),v.push(e.sCount[f]),e.sCount[f]=p-u,g.push(e.tShift[f]),e.tShift[f]=x-e.bMarks[f]}for(y=e.blkIndent,e.blkIndent=0,(w=e.push("blockquote_open","blockquote",1)).markup=">",w.map=d=[t,0],e.md.block.tokenize(e,t,f),(w=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=L,e.parentType=_,d[1]=e.line,s=0;s<g.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=g[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=m[s];return e.blkIndent=y,!0}},function(e,t,n){"use strict";var r=n(202).isSpace;e.exports=function(e,t,n,o){var i,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(i=e.src.charCodeAt(c++))&&45!==i&&95!==i)return!1;for(a=1;c<l;){if((s=e.src.charCodeAt(c++))!==i&&!r(s))return!1;s===i&&a++}return!(a<3)&&(o||(e.line=t+1,(u=e.push("hr","hr",0)).map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(i))),!0)}},function(e,t,n){"use strict";var r=n(202).isSpace;function o(e,t){var n,o,i,a;return o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],42!==(n=e.src.charCodeAt(o++))&&45!==n&&43!==n||o<i&&(a=e.src.charCodeAt(o),!r(a))?-1:o}function i(e,t){var n,o=e.bMarks[t]+e.tShift[t],i=o,a=e.eMarks[t];if(i+1>=a)return-1;if((n=e.src.charCodeAt(i++))<48||n>57)return-1;for(;;){if(i>=a)return-1;if(!((n=e.src.charCodeAt(i++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(i-o>=10)return-1}return i<a&&(n=e.src.charCodeAt(i),!r(n))?-1:i}e.exports=function(e,t,n,r){var a,s,u,c,l,d,f,p,h,m,y,_,v,g,b,M,k,w,S,L,x,T,D,Y,C,A,O,E,j=!1,P=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.tShift[t]>=e.blkIndent&&(j=!0),(D=i(e,t))>=0){if(f=!0,C=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(C,D-C-1)),j&&1!==v)return!1}else{if(!((D=o(e,t))>=0))return!1;f=!1}if(j&&e.skipSpaces(D)>=e.eMarks[t])return!1;if(_=e.src.charCodeAt(D-1),r)return!0;for(y=e.tokens.length,f?(E=e.push("ordered_list_open","ol",1),1!==v&&(E.attrs=[["start",v]])):E=e.push("bullet_list_open","ul",1),E.map=m=[t,0],E.markup=String.fromCharCode(_),b=t,Y=!1,O=e.md.block.ruler.getRules("list"),w=e.parentType,e.parentType="list";b<n;){for(T=D,g=e.eMarks[b],d=M=e.sCount[b]+D-(e.bMarks[t]+e.tShift[t]);T<g;){if(9===(a=e.src.charCodeAt(T)))M+=4-(M+e.bsCount[b])%4;else{if(32!==a)break;M++}T++}if((l=(s=T)>=g?1:M-d)>4&&(l=1),c=d+l,(E=e.push("list_item_open","li",1)).markup=String.fromCharCode(_),E.map=p=[t,0],x=e.tight,L=e.tShift[t],S=e.sCount[t],k=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=M,s>=g&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!Y||(P=!1),Y=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=k,e.tShift[t]=L,e.sCount[t]=S,e.tight=x,(E=e.push("list_item_close","li",-1)).markup=String.fromCharCode(_),b=t=e.line,p[1]=b,s=e.bMarks[t],b>=n)break;if(e.sCount[b]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(A=!1,u=0,h=O.length;u<h;u++)if(O[u](e,b,n,!0)){A=!0;break}if(A)break;if(f){if((D=i(e,b))<0)break}else if((D=o(e,b))<0)break;if(_!==e.src.charCodeAt(D-1))break}return(E=f?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(_),m[1]=b,e.line=b,e.parentType=w,P&&function(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,y),!0}},function(e,t,n){"use strict";var r=n(202).normalizeReference,o=n(202).isSpace;e.exports=function(e,t,n,i){var a,s,u,c,l,d,f,p,h,m,y,_,v,g,b,M,k=0,w=e.bMarks[t]+e.tShift[t],S=e.eMarks[t],L=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(w))return!1;for(;++w<S;)if(93===e.src.charCodeAt(w)&&92!==e.src.charCodeAt(w-1)){if(w+1===S)return!1;if(58!==e.src.charCodeAt(w+1))return!1;break}for(c=e.lineMax,b=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";L<c&&!e.isEmpty(L);L++)if(!(e.sCount[L]-e.blkIndent>3||e.sCount[L]<0)){for(g=!1,d=0,f=b.length;d<f;d++)if(b[d](e,L,c,!0)){g=!0;break}if(g)break}for(S=(v=e.getLines(t,L,e.blkIndent,!1).trim()).length,w=1;w<S;w++){if(91===(a=v.charCodeAt(w)))return!1;if(93===a){h=w;break}(10===a||92===a&&++w<S&&10===v.charCodeAt(w))&&k++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(w=h+2;w<S;w++)if(10===(a=v.charCodeAt(w)))k++;else if(!o(a))break;if(!(y=e.md.helpers.parseLinkDestination(v,w,S)).ok)return!1;if(l=e.md.normalizeLink(y.str),!e.md.validateLink(l))return!1;for(s=w=y.pos,u=k+=y.lines,_=w;w<S;w++)if(10===(a=v.charCodeAt(w)))k++;else if(!o(a))break;for(y=e.md.helpers.parseLinkTitle(v,w,S),w<S&&_!==w&&y.ok?(M=y.str,w=y.pos,k+=y.lines):(M="",w=s,k=u);w<S&&(a=v.charCodeAt(w),o(a));)w++;if(w<S&&10!==v.charCodeAt(w)&&M)for(M="",w=s,k=u;w<S&&(a=v.charCodeAt(w),o(a));)w++;return!(w<S&&10!==v.charCodeAt(w))&&(!!(p=r(v.slice(1,h)))&&(i||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[p]&&(e.env.references[p]={title:M,href:l}),e.parentType=m,e.line=t+k+1),!0))}},function(e,t,n){"use strict";var r=n(706),o=n(420).HTML_OPEN_CLOSE_TAG_RE,i=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var o,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(u=e.src.slice(c,l),o=0;o<i.length&&!i[o][0].test(u);o++);if(o===i.length)return!1;if(r)return i[o][2];if(a=t+1,!i[o][1].test(u))for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(c=e.bMarks[a]+e.tShift[a],l=e.eMarks[a],u=e.src.slice(c,l),i[o][1].test(u)){0!==u.length&&a++;break}return e.line=a,(s=e.push("html_block","",0)).map=[t,a],s.content=e.getLines(t,a,e.blkIndent,!0),!0}},function(e,t,n){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},function(e,t,n){"use strict";var r=n(202).isSpace;e.exports=function(e,t,n,o){var i,a,s,u,c=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(i=e.src.charCodeAt(c))||c>=l)return!1;for(a=1,i=e.src.charCodeAt(++c);35===i&&c<l&&a<=6;)a++,i=e.src.charCodeAt(++c);return!(a>6||c<l&&!r(i))&&(o||(l=e.skipSpacesBack(l,c),(s=e.skipCharsBack(l,35,c))>c&&r(e.src.charCodeAt(s-1))&&(l=s),e.line=t+1,(u=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),u.map=[t,e.line],(u=e.push("inline","",0)).content=e.src.slice(c,l).trim(),u.map=[t,e.line],u.children=[],(u=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i,a,s,u,c,l,d,f,p=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";p<n&&!e.isEmpty(p);p++)if(!(e.sCount[p]-e.blkIndent>3)){if(e.sCount[p]>=e.blkIndent&&(u=e.bMarks[p]+e.tShift[p])<(c=e.eMarks[p])&&(45===(d=e.src.charCodeAt(u))||61===d)&&(u=e.skipChars(u,d),(u=e.skipSpaces(u))>=c)){l=61===d?1:2;break}if(!(e.sCount[p]<0)){for(o=!1,i=0,a=h.length;i<a;i++)if(h[i](e,p,n,!0)){o=!0;break}if(o)break}}return!!l&&(r=e.getLines(t,p,e.blkIndent,!1).trim(),e.line=p+1,(s=e.push("heading_open","h"+String(l),1)).markup=String.fromCharCode(d),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(l),-1)).markup=String.fromCharCode(d),e.parentType=f,!0)}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,s,u=t+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;for(s=e.parentType,e.parentType="paragraph";u<l&&!e.isEmpty(u);u++)if(!(e.sCount[u]-e.blkIndent>3||e.sCount[u]<0)){for(r=!1,o=0,i=c.length;o<i;o++)if(c[o](e,u,l,!0)){r=!0;break}if(r)break}return n=e.getLines(t,u,e.blkIndent,!1).trim(),e.line=u,(a=e.push("paragraph_open","p",1)).map=[t,e.line],(a=e.push("inline","",0)).content=n,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),e.parentType=s,!0}},function(e,t,n){"use strict";var r=n(245),o=n(202).isSpace;function i(e,t,n,r){var i,a,s,u,c,l,d,f;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",f=!1,s=u=l=d=0,c=(a=this.src).length;u<c;u++){if(i=a.charCodeAt(u),!f){if(o(i)){l++,9===i?d+=4-d%4:d++;continue}f=!0}10!==i&&u!==c-1||(10!==i&&u++,this.bMarks.push(s),this.eMarks.push(u),this.tShift.push(l),this.sCount.push(d),this.bsCount.push(0),f=!1,l=0,d=0,s=u+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}i.prototype.push=function(e,t,n){var o=new r(e,t,n);return o.block=!0,n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},i.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},i.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),o(t));e++);return e},i.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},i.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},i.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},i.prototype.getLines=function(e,t,n,r){var i,a,s,u,c,l,d,f=e;if(e>=t)return"";for(l=new Array(t-e),i=0;f<t;f++,i++){for(a=0,d=u=this.bMarks[f],c=f+1<t||r?this.eMarks[f]+1:this.eMarks[f];u<c&&a<n;){if(s=this.src.charCodeAt(u),o(s))9===s?a+=4-(a+this.bsCount[f])%4:a++;else{if(!(u-d<this.tShift[f]))break;a++}u++}l[i]=a>n?new Array(a-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return l.join("")},i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(244),o=[["text",n(712)],["newline",n(713)],["escape",n(714)],["backticks",n(715)],["strikethrough",n(421).tokenize],["emphasis",n(422).tokenize],["link",n(716)],["image",n(717)],["autolink",n(718)],["html_inline",n(719)],["entity",n(720)]],i=[["balance_pairs",n(721)],["strikethrough",n(421).postProcess],["emphasis",n(422).postProcess],["text_collapse",n(722)]];function a(){var e;for(this.ruler=new r,e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1]);for(this.ruler2=new r,e=0;e<i.length;e++)this.ruler2.push(i[e][0],i[e][1])}a.prototype.skipToken=function(e){var t,n,r=e.pos,o=this.ruler.getRules(""),i=o.length,a=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<a)for(n=0;n<i&&(e.level++,t=o[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},a.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,i=e.posMax,a=e.md.options.maxNesting;e.pos<i;){if(e.level<a)for(n=0;n<o&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var o,i,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(i=this.ruler2.getRules("")).length,o=0;o<a;o++)i[o](s)},a.prototype.State=n(723),e.exports=a},function(e,t,n){"use strict";function r(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,t){for(var n=e.pos;n<e.posMax&&!r(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},function(e,t,n){"use strict";var r=n(202).isSpace;e.exports=function(e,t){var n,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;for(n=e.pending.length-1,o=e.posMax,t||(n>=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),i++;i<o&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},function(e,t,n){"use strict";for(var r=n(202).isSpace,o=[],i=0;i<256;i++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){o[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,i=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(i))return!1;if(++i<a){if((n=e.src.charCodeAt(i))<256&&0!==o[n])return t||(e.pending+=e.src[i]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),i++;i<a&&(n=e.src.charCodeAt(i),r(n));)i++;return e.pos=i,!0}}return t||(e.pending+="\\"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,s,u,c,l=e.pos;if(96!==e.src.charCodeAt(l))return!1;for(n=l,l++,r=e.posMax;l<r&&96===e.src.charCodeAt(l);)l++;if(u=(o=e.src.slice(n,l)).length,e.backticksScanned&&(e.backticks[u]||0)<=n)return t||(e.pending+=o),e.pos+=u,!0;for(a=s=l;-1!==(a=e.src.indexOf("`",s));){for(s=a+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-a)===u)return t||((i=e.push("code_inline","code",0)).markup=o,i.content=e.src.slice(l,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=a}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=u,!0}},function(e,t,n){"use strict";var r=n(202).normalizeReference,o=n(202).isSpace;e.exports=function(e,t){var n,i,a,s,u,c,l,d,f="",p="",h=e.pos,m=e.posMax,y=e.pos,_=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(u=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<m&&40===e.src.charCodeAt(c)){for(_=!1,c++;c<m&&(i=e.src.charCodeAt(c),o(i)||10===i);c++);if(c>=m)return!1;if(y=c,(l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(f=e.md.normalizeLink(l.str),e.md.validateLink(f)?c=l.pos:f="",y=c;c<m&&(i=e.src.charCodeAt(c),o(i)||10===i);c++);if(l=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<m&&y!==c&&l.ok)for(p=l.str,c=l.pos;c<m&&(i=e.src.charCodeAt(c),o(i)||10===i);c++);}(c>=m||41!==e.src.charCodeAt(c))&&(_=!0),c++}if(_){if(void 0===e.env.references)return!1;if(c<m&&91===e.src.charCodeAt(c)?(y=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?a=e.src.slice(y,c++):c=s+1):c=s+1,a||(a=e.src.slice(u,s)),!(d=e.env.references[r(a)]))return e.pos=h,!1;f=d.href,p=d.title}return t||(e.pos=u,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",f]],p&&n.push(["title",p]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(202).normalizeReference,o=n(202).isSpace;e.exports=function(e,t){var n,i,a,s,u,c,l,d,f,p,h,m,y,_="",v=e.pos,g=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(u=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=u+1)<g&&40===e.src.charCodeAt(l)){for(l++;l<g&&(i=e.src.charCodeAt(l),o(i)||10===i);l++);if(l>=g)return!1;for(y=l,(f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?l=f.pos:_=""),y=l;l<g&&(i=e.src.charCodeAt(l),o(i)||10===i);l++);if(f=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<g&&y!==l&&f.ok)for(p=f.str,l=f.pos;l<g&&(i=e.src.charCodeAt(l),o(i)||10===i);l++);else p="";if(l>=g||41!==e.src.charCodeAt(l))return e.pos=v,!1;l++}else{if(void 0===e.env.references)return!1;if(l<g&&91===e.src.charCodeAt(l)?(y=l+1,(l=e.md.helpers.parseLinkLabel(e,l))>=0?s=e.src.slice(y,l++):l=u+1):l=u+1,s||(s=e.src.slice(c,u)),!(d=e.env.references[r(s)]))return e.pos=v,!1;_=d.href,p=d.title}return t||(a=e.src.slice(c,u),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",_],["alt",""]],h.children=m,h.content=a,p&&n.push(["title",p])),e.pos=l,e.posMax=g,!0}},function(e,t,n){"use strict";var r=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,o=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,t){var n,i,a,s,u,c,l=e.pos;if(60!==e.src.charCodeAt(l))return!1;for(u=e.pos,c=e.posMax;;){if(++l>=c)return!1;if(60===(s=e.src.charCodeAt(l)))return!1;if(62===s)break}return n=e.src.slice(u+1,l),o.test(n)?(i=e.md.normalizeLink(n),!!e.md.validateLink(i)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",i]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0)):!!r.test(n)&&(i=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(i)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",i]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0))}},function(e,t,n){"use strict";var r=n(420).HTML_TAG_RE;e.exports=function(e,t){var n,o,i,a=e.pos;return!!e.md.options.html&&(i=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=i)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(o=e.src.slice(a).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(a,a+o[0].length)),e.pos+=o[0].length,!0))))}},function(e,t,n){"use strict";var r=n(415),o=n(202).has,i=n(202).isValidEntityCode,a=n(202).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l=e.pos,d=e.posMax;if(38!==e.src.charCodeAt(l))return!1;if(l+1<d)if(35===e.src.charCodeAt(l+1)){if(c=e.src.slice(l).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=i(n)?a(n):a(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(l).match(u))&&o(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},function(e,t,n){"use strict";function r(e,t){var n,r,o,i,a,s,u,c,l={},d=t.length;for(n=0;n<d;n++)if((o=t[n]).length=o.length||0,o.close){for(l.hasOwnProperty(o.marker)||(l[o.marker]=[-1,-1,-1]),a=l[o.marker][o.length%3],(r=n-o.jump-1)<-1&&(r=-1),s=r;r>a;r-=i.jump+1)if((i=t[r]).marker===o.marker&&i.open&&i.end<0&&(u=!1,(i.close||o.open)&&(i.length+o.length)%3==0&&(i.length%3==0&&o.length%3==0||(u=!0)),!u)){c=r>0&&!t[r-1].open?t[r-1].jump+1:0,o.jump=n-r+c,o.open=!1,i.end=n,i.jump=c,i.close=!1,s=-1;break}-1!==s&&(l[o.marker][(o.length||0)%3]=s)}}e.exports=function(e){var t,n=e.tokens_meta,o=e.tokens_meta.length;for(r(0,e.delimiters),t=0;t<o;t++)n[t]&&n[t].delimiters&&r(0,n[t].delimiters)}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r=0,o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,"text"===o[t].type&&t+1<i&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}},function(e,t,n){"use strict";var r=n(245),o=n(202).isWhiteSpace,i=n(202).isPunctChar,a=n(202).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var o=new r(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(i),o},s.prototype.scanDelims=function(e,t){var n,r,s,u,c,l,d,f,p,h=e,m=!0,y=!0,_=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<_&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<_?this.src.charCodeAt(h):32,d=a(n)||i(String.fromCharCode(n)),p=a(r)||i(String.fromCharCode(r)),l=o(n),(f=o(r))?m=!1:p&&(l||d||(m=!1)),l?y=!1:d&&(f||p||(y=!1)),t?(u=m,c=y):(u=m&&(!y||d),c=y&&(!m||p)),{can_open:u,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===o(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var u={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function l(e){var t=e.re=n(725)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var u=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===o(n))return!function(e){return"[object RegExp]"===o(e)}(n.validate)?i(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===o(e)}(n)?c(t,n):u.push(t)}})),u.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var l=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function d(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function f(e,t){var n=new d(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function p(e,t){if(!(this instanceof p))return new p(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},u,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},l(this)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,l(this),this},p.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s,u;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),this.__index__>=0},p.prototype.pretest=function(e){return this.re.pretest.test(e)},p.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},p.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(f(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},p.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),l(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,l(this),this)},p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},p.prototype.onCompile=function(){},e.exports=p},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(417).source,t.src_Cc=n(418).source,t.src_Z=n(419).source,t.src_P=n(243).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t,n){"use strict";(function(e,r){var o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)} /*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){var s="object"==i(t)&&t&&!t.nodeType&&t,u="object"==i(e)&&e&&!e.nodeType&&e,c="object"==(void 0===r?"undefined":i(r))&&r;c.global!==c&&c.window!==c&&c.self!==c||(a=c);var l,d,f=2147483647,p=/^xn--/,h=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(y[e])}function b(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function M(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+b((e=e.replace(m,".")).split("."),t).join(".")}function k(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function w(e){return b(e,(function(e){var t="";return e>65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=v(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function L(e,t,n){var r=0;for(e=n?_(e/700):e>>1,e+=_(e/t);e>455;r+=36)e=_(e/35);return _(r+36*e/(e+38))}function x(e){var t,n,r,o,i,a,s,u,c,l,d,p=[],h=e.length,m=0,y=128,v=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),p.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<h;){for(i=m,a=1,s=36;o>=h&&g("invalid-input"),((u=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>_((f-m)/a))&&g("overflow"),m+=u*a,!(u<(c=s<=v?1:s>=v+26?26:s-v));s+=36)a>_(f/(l=36-c))&&g("overflow"),a*=l;v=L(m-i,t=p.length+1,0==i),_(m/t)>f-y&&g("overflow"),y+=_(m/t),m%=t,p.splice(m++,0,y)}return w(p)}function T(e){var t,n,r,o,i,a,s,u,c,l,d,p,h,m,y,b=[];for(p=(e=k(e)).length,t=128,n=0,i=72,a=0;a<p;++a)(d=e[a])<128&&b.push(v(d));for(r=o=b.length,o&&b.push("-");r<p;){for(s=f,a=0;a<p;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>_((f-n)/(h=r+1))&&g("overflow"),n+=(s-t)*h,t=s,a=0;a<p;++a)if((d=e[a])<t&&++n>f&&g("overflow"),d==t){for(u=n,c=36;!(u<(l=c<=i?1:c>=i+26?26:c-i));c+=36)y=u-l,m=36-l,b.push(v(S(l+y%m,0))),u=_(y/m);b.push(v(S(u,0))),i=L(n,h,r==o),n=0,++r}++n,++t}return b.join("")}if(l={version:"1.4.1",ucs2:{decode:k,encode:w},decode:x,encode:T,toASCII:function(e){return M(e,(function(e){return h.test(e)?"xn--"+T(e):e}))},toUnicode:function(e){return M(e,(function(e){return p.test(e)?x(e.slice(4).toLowerCase()):e}))}},"object"==i(n(423))&&n(423))void 0===(o=function(){return l}.call(t,n,t,e))||(e.exports=o);else if(s&&u)if(e.exports==s)u.exports=l;else for(d in l)l.hasOwnProperty(d)&&(s[d]=l[d]);else a.punycode=l}(void 0)}).call(this,n(203)(e),n(14))},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(e,t,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(e,t,n){"use strict";var r=!0,o=!1,i=!1;function a(e,t,n){var r=e.attrIndex(t),o=[t,n];r<0?e.attrPush(o):e.attrs[r]=o}function s(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return-1}function u(e,t){return"inline"===e[t].type&&function(e){return"paragraph_open"===e.type}(e[t-1])&&function(e){return"list_item_open"===e.type}(e[t-2])&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function c(e,t){if(e.children.unshift(function(e,t){var n=new t("html_inline","",0),o=r?' disabled="" ':"";0===e.content.indexOf("[ ] ")?n.content='<input class="task-list-item-checkbox"'+o+'type="checkbox">':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content='<input class="task-list-item-checkbox" checked=""'+o+'type="checkbox">');return n}(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),o)if(i){e.children.pop();var n="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(function(e,t,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[{for:t}],r}(e.content,n,t))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="<label>",t}(t)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content="</label>",t}(t))}e.exports=function(e,t){t&&(r=!t.enabled,o=!!t.label,i=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",(function(e){for(var t=e.tokens,n=2;n<t.length;n++)u(t,n)&&(c(t[n],e.Token),a(t[n-2],"class","task-list-item"+(r?"":" enabled")),a(t[s(t,n-2)],"class","contains-task-list"))}))}},function(e,t,n){"use strict";(function(e,t){var r;(r=void 0!==e&&"[object process]"==={}.toString.call(e)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?t:self).Proxy||(r.Proxy=n(732)(),r.Proxy.revocable=r.Proxy.revocable)}).call(this,n(41),n(14))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){var e,t=null;function n(e){return!!e&&("object"===r(e)||"function"==typeof e)}function o(e){if(null!==e&&!n(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var i=Object,a=Boolean(i.create)||!({__proto__:null}instanceof i),s=i.create||(a?function(e){return o(e),{__proto__:e}}:function(e){if(o(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");var t=function(){};return t.prototype=e,new t}),u=function(){return null},c=i.getPrototypeOf||([].__proto__===Array.prototype?function(e){var t=e.__proto__;return n(t)?t:null}:u);return(e=function(r,l){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!n(r)||!n(l))throw new TypeError("Cannot create proxy with a non-object as target or handler");var d=function(){};t=function(){r=null,d=function(e){throw new TypeError("Cannot perform '".concat(e,"' on a proxy that has been revoked"))}},setTimeout((function(){t=null}),0);var f=l;for(var p in l={get:null,set:null,apply:null,construct:null},f){if(!(p in l))throw new TypeError("Proxy polyfill does not support trap '".concat(p,"'"));l[p]=f[p]}"function"==typeof f&&(l.apply=f.apply.bind(f));var h,m=c(r),y=!1,_=!1;"function"==typeof r?(h=function(){var e=this&&this.constructor===h,t=Array.prototype.slice.call(arguments);if(d(e?"construct":"apply"),e&&l.construct)return l.construct.call(this,r,t);if(!e&&l.apply)return l.apply(r,this,t);if(e){t.unshift(r);var n=r.bind.apply(r,t);return new n}return r.apply(this,t)},y=!0):r instanceof Array?(h=[],_=!0):h=a||null!==m?s(m):{};var v=l.get?function(e){return d("get"),l.get(this,e,h)}:function(e){return d("get"),this[e]},g=l.set?function(e,t){d("set");l.set(this,e,t,h)}:function(e,t){d("set"),this[e]=t},b=i.getOwnPropertyNames(r),M={};b.forEach((function(e){if(!y&&!_||!(e in h)){var t=i.getOwnPropertyDescriptor(r,e),n={enumerable:Boolean(t.enumerable),get:v.bind(r,e),set:g.bind(r,e)};i.defineProperty(h,e,n),M[e]=!0}}));var k=!0;if(y||_){var w=i.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return o(t),e.__proto__=t,e}:u);m&&w(h,m)||(k=!1)}if(l.get||!k)for(var S in r)M[S]||i.defineProperty(h,S,{get:v.bind(r,S)});return i.seal(r),i.seal(h),h}).revocable=function(n,r){return{proxy:new e(n,r),revoke:t}},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schema=t.defaultMarkdownSerializer=t.defaultMarkdownParser=t.MarkdownSerializerState=t.MarkdownSerializer=t.MarkdownParser=void 0;var r,o=n(205),i=(r=n(414))&&r.__esModule?r:{default:r};var a=new o.Schema({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:function(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(e){return{params:e.getAttribute("data-params")||""}}}],toDOM:function(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM:function(e){return["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:function(e){return{tight:e.hasAttribute("data-tight")}}}],toDOM:function(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM:function(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(e){return"italic"==e&&null}}],toDOM:function(){return["em"]}},strong:{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}],toDOM:function(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:function(e){return["a",e.attrs]}},code:{parseDOM:[{tag:"code"}],toDOM:function(){return["code"]}}}});t.schema=a;var s=function(e,t){this.schema=e,this.stack=[{type:e.topNodeType,content:[]}],this.marks=o.Mark.none,this.tokenHandlers=t};function u(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function c(e,t){return e.noCloseToken||"code_inline"==t||"code_block"==t||"fence"==t}function l(e){return"\n"==e[e.length-1]?e.slice(0,e.length-1):e}function d(){}s.prototype.top=function(){return this.stack[this.stack.length-1]},s.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},s.prototype.addText=function(e){if(e){var t,n=this.top().content,r=n[n.length-1],i=this.schema.text(e,this.marks);r&&(t=function(e,t){if(e.isText&&t.isText&&o.Mark.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}(r,i))?n[n.length-1]=t:n.push(i)}},s.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},s.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},s.prototype.parseTokens=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=this.tokenHandlers[n.type];if(!r)throw new Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,e,t)}},s.prototype.addNode=function(e,t,n){var r=e.createAndFill(t,n,this.marks);return r?(this.push(r),r):null},s.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},s.prototype.closeNode=function(){this.marks.length&&(this.marks=o.Mark.none);var e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)};var f=function(e,t,n){this.tokens=n,this.schema=e,this.tokenizer=t,this.tokenHandlers=function(e,t){var n=Object.create(null),r=function(r){var o=t[r];if(o.block){var i=e.nodeType(o.block);c(o,r)?n[r]=function(e,t,n,r){e.openNode(i,u(o,t,n,r)),e.addText(l(t.content)),e.closeNode()}:(n[r+"_open"]=function(e,t,n,r){return e.openNode(i,u(o,t,n,r))},n[r+"_close"]=function(e){return e.closeNode()})}else if(o.node){var a=e.nodeType(o.node);n[r]=function(e,t,n,r){return e.addNode(a,u(o,t,n,r))}}else if(o.mark){var s=e.marks[o.mark];c(o,r)?n[r]=function(e,t,n,r){e.openMark(s.create(u(o,t,n,r))),e.addText(l(t.content)),e.closeMark(s)}:(n[r+"_open"]=function(e,t,n,r){return e.openMark(s.create(u(o,t,n,r)))},n[r+"_close"]=function(e){return e.closeMark(s)})}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o));c(o,r)?n[r]=d:(n[r+"_open"]=d,n[r+"_close"]=d)}};for(var o in t)r(o);return n.text=function(e,t){return e.addText(t.content)},n.inline=function(e,t){return e.parseTokens(t.children)},n.softbreak=n.softbreak||function(e){return e.addText("\n")},n}(e,n)};function p(e,t){for(;++t<e.length;)if("list_item_open"!=e[t].type)return e[t].hidden;return!1}t.MarkdownParser=f,f.prototype.parse=function(e){var t,n=new s(this.schema,this.tokenHandlers);n.parseTokens(this.tokenizer.parse(e,{}));do{t=n.closeNode()}while(n.stack.length);return t};var h=new f(a,(0,i.default)("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:function(e,t,n){return{tight:p(t,n)}}},ordered_list:{block:"ordered_list",getAttrs:function(e,t,n){return{order:+e.attrGet("start")||1,tight:p(t,n)}}},heading:{block:"heading",getAttrs:function(e){return{level:+e.tag.slice(1)}}},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:function(e){return{params:e.info||""}},noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:function(e){return{src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null}}},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:function(e){return{href:e.attrGet("href"),title:e.attrGet("title")||null}}},code_inline:{mark:"code",noCloseToken:!0}});t.defaultMarkdownParser=h;var m=function(e,t){this.nodes=e,this.marks=t};t.MarkdownSerializer=m,m.prototype.serialize=function(e,t){var n=new g(this.nodes,this.marks,t);return n.renderContent(e),n.out};var y=new m({blockquote:function(e,t){e.wrapBlock("> ",null,t,(function(){return e.renderContent(t)}))},code_block:function(e,t){e.write("```"+(t.attrs.params||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},heading:function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)},horizontal_rule:function(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list:function(e,t){e.renderList(t," ",(function(){return(t.attrs.bullet||"*")+" "}))},ordered_list:function(e,t){var n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,(function(t){var o=String(n+t);return e.repeat(" ",r-o.length)+o+". "}))},list_item:function(e,t){e.renderContent(t)},paragraph:function(e,t){e.renderInline(t),e.closeBlock(t)},image:function(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+e.esc(t.attrs.src)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")")},hard_break:function(e,t,n,r){for(var o=r+1;o<n.childCount;o++)if(n.child(o).type!=t.type)return void e.write("\\\n")},text:function(e,t){e.text(t.text)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:function(e,t,n,r){return v(t,n,r,1)?"<":"["},close:function(e,t,n,r){return v(t,n,r,-1)?">":"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}},code:{open:function(e,t,n,r){return _(n.child(r),-1)},close:function(e,t,n,r){return _(n.child(r-1),1)},escape:!1}});function _(e,t){var n,r=/`+/g,o=0;if(e.isText)for(;n=r.exec(e.text);)o=Math.max(o,n[0].length);for(var i=o>0&&t>0?" `":"`",a=0;a<o;a++)i+="`";return o>0&&t<0&&(i+=" "),i}function v(e,t,n,r){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;var o=t.child(n+(r<0?-1:0));if(!o.isText||o.text!=e.attrs.href||o.marks[o.marks.length-1]!=e)return!1;if(n==(r<0?1:t.childCount-1))return!0;var i=t.child(n+(r<0?-2:1));return!e.isInSet(i.marks)}t.defaultMarkdownSerializer=y;var g=function(e,t,n){this.nodes=e,this.marks=t,this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=n||{},void 0===this.options.tightLists&&(this.options.tightLists=!1)};t.MarkdownSerializerState=g,g.prototype.flushClose=function(e){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==e&&(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var r=1;r<e;r++)this.out+=t+"\n"}this.closed=!1}},g.prototype.wrapBlock=function(e,t,n,r){var o=this.delim;this.write(t||e),this.delim+=e,r(),this.delim=o,this.closeBlock(n)},g.prototype.atBlank=function(){return/(^|\n)$/.test(this.out)},g.prototype.ensureNewLine=function(){this.atBlank()||(this.out+="\n")},g.prototype.write=function(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)},g.prototype.closeBlock=function(e){this.closed=e},g.prototype.text=function(e,t){for(var n=e.split("\n"),r=0;r<n.length;r++){var o=this.atBlank()||this.closed;this.write(),this.out+=!1!==t?this.esc(n[r],o):n[r],r!=n.length-1&&(this.out+="\n")}},g.prototype.render=function(e,t,n){if("number"==typeof t)throw new Error("!");if(!this.nodes[e.type.name])throw new Error("Token type `"+e.type.name+"` not supported by Markdown renderer");this.nodes[e.type.name](this,e,t,n)},g.prototype.renderContent=function(e){var t=this;e.forEach((function(n,r,o){return t.render(n,e,o)}))},g.prototype.renderInline=function(e){var t=this,n=[],r="",o=function(o,i,a){var s=o?o.marks:[];o&&"hard_break"===o.type.name&&(s=s.filter((function(t){if(a+1==e.childCount)return!1;var n=e.child(a+1);return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))})));var u=r;if(r="",o&&o.isText&&s.some((function(e){var n=t.marks[e.type.name];return n&&n.expelEnclosingWhitespace}))){var c=/^(\s*)(.*?)(\s*)$/m.exec(o.text),l=(c[0],c[1]),d=c[2],f=c[3];u+=l,r=f,(l||f)&&((o=d?o.withText(d):null)||(s=n))}var p=s.length&&s[s.length-1],h=p&&!1===t.marks[p.type.name].escape,m=s.length-(h?1:0);e:for(var y=0;y<m;y++){var _=s[y];if(!t.marks[_.type.name].mixable)break;for(var v=0;v<n.length;v++){var g=n[v];if(!t.marks[g.type.name].mixable)break;if(_.eq(g)){y>v?s=s.slice(0,v).concat(_).concat(s.slice(v,y)).concat(s.slice(y+1,m)):v>y&&(s=s.slice(0,y).concat(s.slice(y+1,v)).concat(_).concat(s.slice(v,m)));continue e}}}for(var b=0;b<Math.min(n.length,m)&&s[b].eq(n[b]);)++b;for(;b<n.length;)t.text(t.markString(n.pop(),!1,e,a),!1);if(u&&t.text(u),o){for(;n.length<m;){var M=s[n.length];n.push(M),t.text(t.markString(M,!0,e,a),!1)}h&&o.isText?t.text(t.markString(p,!0,e,a)+o.text+t.markString(p,!1,e,a+1),!1):t.render(o,e,a)}};e.forEach(o),o(null,0,e.childCount)},g.prototype.renderList=function(e,t,n){var r=this;this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var o=void 0!==e.attrs.tight?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,e.forEach((function(i,a,s){s&&o&&r.flushClose(1),r.wrapBlock(t,n(s),e,(function(){return r.render(i,e,s)}))})),this.inTightList=i},g.prototype.esc=function(e,t){return e=e.replace(/[`*\\~\[\]]/g,"\\$&"),t&&(e=e.replace(/^[:#\-*+>]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),e},g.prototype.quote=function(e){var t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]},g.prototype.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},g.prototype.markString=function(e,t,n,r){var o=this.marks[e.type.name],i=t?o.open:o.close;return"string"==typeof i?i:i(this,e,n,r)},g.prototype.getEnclosingWhitespace=function(e){return{leading:(e.match(/^(\s+)/)||[])[0],trailing:(e.match(/(\s+)$/)||[])[0]}}}]]); -//# sourceMappingURL=vendors~editor.js.map?v=492ed00ea890178f1608
\ No newline at end of file +//# sourceMappingURL=vendors~editor.js.map?v=da2fcb527f849c04218d
\ No newline at end of file |