Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendors~editor.js')
-rw-r--r--js/vendors~editor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/vendors~editor.js b/js/vendors~editor.js
index 4539a5190..86456d9d7 100644
--- a/js/vendors~editor.js
+++ b/js/vendors~editor.js
@@ -10,7 +10,7 @@ var r=Object.freeze({});function o(e){return null==e}function i(e){return null!=
* (c) 2021 Evan You
* @license MIT
*/
-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)}}(u=e)}d.state.get=function(){return this._vm._data.$$state},d.state.set=function(e){0},c.prototype.commit=function(e,t,n){var r=this,o=g(e,t,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),l=this._mutations[i];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},c.prototype.dispatch=function(e,t){var n=this,r=g(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 l=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);return new Promise((function(e,t){l.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)}))}))}},c.prototype.subscribe=function(e,t){return h(e,this._subscribers,t)},c.prototype.subscribeAction=function(e,t){return h("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},c.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},c.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},c.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),m(this,this.state,e,this._modules.get(e),n.preserveState),f(this,this.state)},c.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));u.delete(n,e[e.length-1])})),p(this)},c.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},c.prototype.hotUpdate=function(e){this._modules.update(e),p(this,!0)},c.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(c.prototype,d);var y=T((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=x(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=y;var M=T((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=x(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=T((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||x(this.$store,"mapGetters",e))return this.$store.getters[o]},n[r].vuex=!0})),n}));t.mapGetters=k;var b=T((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=x(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=b;var w=function(e){return{mapState:y.bind(null,e),mapGetters:k.bind(null,e),mapMutations:M.bind(null,e),mapActions:b.bind(null,e)}};function L(e){return function(e){return Array.isArray(e)||i(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 T(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function x(e,t,n){return e._modulesNamespaceMap[n]}function S(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 o=e.transformer;void 0===o&&(o=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 l=e.logMutations;void 0===l&&(l=!0);var u=e.logActions;void 0===u&&(u=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=r(e.state);void 0!==c&&(l&&e.subscribe((function(e,a){var s=r(a);if(n(e,d,s)){var l=C(),u=i(e),h="mutation "+e.type+l;D(c,h,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",o(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",u),c.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),Y(c)}d=s})),u&&e.subscribeAction((function(e,n){if(a(e,n)){var r=C(),o=s(e),i="action "+e.type+r;D(c,i,t),c.log("%c action","color: #03A9F4; font-weight: bold",o),Y(c)}})))}}function D(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch(n){e.log(t)}}function Y(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function C(){var e=new Date;return" @ "+A(e.getHours(),2)+":"+A(e.getMinutes(),2)+":"+A(e.getSeconds(),2)+"."+A(e.getMilliseconds(),3)}function A(e,t){return n="0",r=t-e.toString().length,new Array(r+1).join(n)+e;var n,r}t.createNamespacedHelpers=w;var O={Store:c,install:v,version:"3.6.2",mapState:y,mapMutations:M,mapGetters:k,mapActions:b,createNamespacedHelpers:w,createLogger:S};t.default=O}).call(this,n(5))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(23))&&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";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(115))&&r.__esModule?r:{default:r},i=n(92);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 l=s;t.default=l},,,,,function(e,t,n){"use strict";var r=n(13),o=n(105),i=n(29),a=n(47),s=n(111),l=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var r=n(98),o=n(6),i=n(44),a=n(15),s=n(14),l=n(101),u=n(144),c=n(102),d=Math.max,h=Math.min;r("replace",2,(function(e,t,n,r){var p=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,f=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&&f||"string"==typeof r&&-1===r.indexOf(m)){var s=n(t,e,this,r);if(s.done)return s.value}var _=o(e),g=String(this),v="function"==typeof r;v||(r=String(r));var y=_.global;if(y){var M=_.unicode;_.lastIndex=0}for(var k=[];;){var b=c(_,g);if(null===b)break;if(k.push(b),!y)break;""===String(b[0])&&(_.lastIndex=l(g,i(_.lastIndex),M))}for(var w,L="",T=0,x=0;x<k.length;x++){b=k[x];for(var S=String(b[0]),D=d(h(a(b.index),g.length),0),Y=[],C=1;C<b.length;C++)Y.push(void 0===(w=b[C])?w:String(w));var A=b.groups;if(v){var O=[S].concat(Y,D,g);void 0!==A&&O.push(A);var E=String(r.apply(void 0,O))}else E=u(S,g,D,Y,A,r);D>=T&&(L+=g.slice(T,D)+E,T=D+S.length)}return L+g.slice(T)}]}))},function(e,t,n){"use strict";var r=n(1),o=n(93),i=n(80),a=n(4),s=n(7),l=s("iterator"),u=s("toStringTag"),c=i.values;for(var d in o){var h=r[d],p=h&&h.prototype;if(p){if(p[l]!==c)try{a(p,l,c)}catch(e){p[l]=c}if(p[u]||a(p,u,d),o[d])for(var f in i)if(p[f]!==i[f])try{a(p,f,i[f])}catch(e){p[f]=i[f]}}}},function(e,t,n){"use strict";var r=n(68),o=n(37).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(68),o=n(37);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(15),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){"use strict";var r=n(2),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(2),o=n(46),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,n){"use strict";var r,o,i=n(1),a=n(94),s=i.process,l=s&&s.versions,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){"use strict";var r=n(6),o=n(142);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){"use strict";var r=n(43),o=n(33);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){"use strict";var r=n(15),o=n(14),i=function(e){return function(t,n){var i,a,s=String(o(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},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(133),o=n(143)},function(e,t,n){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";var r=n(27);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";var r=n(27),o=n(83),i=n(97),a=n(6);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";n(90);var r=n(25),o=n(33),i=n(2),a=n(7),s=n(4),l=a("species"),u=RegExp.prototype,c=!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"),h=a("replace"),p=!!/./[h]&&""===/./[h]("a","$0"),f=!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,h){var m=a(e),_=!i((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),g=_&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!_||!g||"replace"===e&&(!c||!d||p)||"split"===e&&!f){var v=/./[m],y=n(m,""[e],(function(e,t,n,r,i){var a=t.exec;return a===o||a===u.exec?_&&!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}),M=y[0],k=y[1];r(String.prototype,e,M),r(u,m,2==t?function(e,t){return k.call(e,this,t)}:function(e){return k.call(e,this)})}h&&s(u[m],"sham",!0)}},function(e,t,n){"use strict";var r=n(6);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(2);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";var r=n(91).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(46),o=n(33);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},,,function(e,t,n){"use strict";var r=n(7),o=n(49),i=n(11),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(1);e.exports=r},function(e,t,n){"use strict";var r=n(53);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(9),o=n(11),i=n(6),a=n(84);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),s=r.length,l=0;s>l;)o.f(e,n=r[l++],t[n]);return e}},function(e,t,n){"use strict";var r=n(13),o=n(44),i=n(85),a=function(e){return function(t,n,a){var s,l=r(t),u=o(l.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var r=n(27);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(43),o=n(113),i=n(70),a=n(89),s=n(50),l=n(4),u=n(25),c=n(7),d=n(26),h=n(29),p=n(69),f=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,_=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,p,v,y){o(n,t,c);var M,k,b,w=function(e){if(e===p&&D)return D;if(!m&&e in x)return x[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},L=t+" Iterator",T=!1,x=e.prototype,S=x[_]||x["@@iterator"]||p&&x[p],D=!m&&S||w(p),Y="Array"==t&&x.entries||S;if(Y&&(M=i(Y.call(new e)),f!==Object.prototype&&M.next&&(d||i(M)===f||(a?a(M,f):"function"!=typeof M[_]&&l(M,_,g)),s(M,L,!0,!0),d&&(h[L]=g))),"values"==p&&S&&"values"!==S.name&&(T=!0,D=function(){return S.call(this)}),d&&!y||x[_]===D||l(x,_,D),h[t]=D,p)if(k={values:w("values"),keys:v?D:w("keys"),entries:w("entries")},y)for(b in k)(m||T||!(b in x))&&u(x,b,k[b]);else r({target:t,proto:!0,forced:m||T},k);return k}},function(e,t,n){"use strict";var r=n(3),o=n(96),i=n(45),a=n(11);e.exports=function(e,t){for(var n=o(t),s=a.f,l=i.f,u=0;u<n.length;u++){var c=n[u];r(e,c)||s(e,c,l(t,c))}}},function(e,t,n){"use strict";var r=n(69).IteratorPrototype,o=n(49),i=n(28),a=n(50),s=n(29),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,u,!1,!0),s[u]=l,e}},,function(e,t,n){"use strict";e.exports=n(116)},function(e,t,n){"use strict";var r=n(0),o=n(56),i=n(117),a=n(62);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 l=s(n(59));l.Axios=i,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(63),l.CancelToken=n(130),l.isCancel=n(58),l.all=function(e){return Promise.all(e)},l.spread=n(131),l.isAxiosError=n(132),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(0),o=n(57),i=n(118),a=n(119),s=n(62);function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.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},l.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){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(0);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(0),o=n(120),i=n(58),a=n(59);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(0);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(0);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(61);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(0);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(126),o=n(127);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(0),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(0);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(63);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";e.exports=function(e){return"object"==typeof 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(41),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(135)),o=i(n(138));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",l=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=l},function(e,t,n){"use strict";const r=n(136);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},function(e,t,n){"use strict";const{MAX_LENGTH:r}=n(34),{re:o,t:i}=n(64),a=n(66);e.exports=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},function(e,t,n){"use strict";const r=/^[0-9]+$/,o=(e,t)=>{const 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:(e,t)=>o(t,e)}},function(e,t,n){"use strict";const r=n(66);e.exports=(e,t)=>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(82),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(1),o=n(54),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){"use strict";var r=n(2);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(10);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";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(24),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,l,u,c){var d=n+e.length,h=l.length,p=s;return void 0!==u&&(u=r(u),p=a),i.call(c,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=u[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>h){var c=o(s/10);return 0===c?r:c<=h?void 0===l[c-1]?i.charAt(1):l[c-1]+i.charAt(1):r}a=l[s-1]}return void 0===a?"":a}))}},,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){e.exports=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 a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Lt(e,t,n,r,!0).utc()}function f(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 m(e){if(null==e._isValid){var t=f(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=p(NaN);return null!=e?h(f(t),e):f(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 g=o.momentProperties=[];function v(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=f(t)),s(t._locale)||(e._locale=t._locale),g.length>0)for(n=0;n<g.length;n++)s(o=t[r=g[n]])||(e[r]=o);return e}var y=!1;function M(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,o.updateOffset(this),y=!1)}function k(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(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&&w(e[r])!==w(t[r]))&&a++;return a+i}function T(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var n=!0;return h((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var S,D={};function Y(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),D[e]||(T(t),D[e]=!0)}function C(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=h({},e);for(n in t)d(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function O(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var E={};function j(e,t){var n=e.toLowerCase();E[n]=E[n+"s"]=E[t]=e}function P(e){return"string"==typeof e?E[e]||E[e.toLowerCase()]:void 0}function N(e){var t,n,r={};for(n in e)d(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var H={};function R(e,t){H[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 I=/(\[[^\[]*\])|(\\)?([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,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,$={},B={};function W(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(B[e]=o),t&&(B[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=U(t,e.localeData()),$[t]=$[t]||function(e){var t,n,r,o=e.match(I);for(t=0,n=o.length;t<n;t++)B[o[t]]?o[t]=B[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+=C(o[r])?o[r].call(t,e):o[r];return i}}(t),$[t](e)):e.localeData().invalidDate()}function U(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(z.lastIndex=0;n>=0&&z.test(e);)e=e.replace(z,r),z.lastIndex=0,n-=1;return e}var V=/\d/,J=/\d\d/,G=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,X=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[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,ue={};function ce(e,t,n){ue[e]=C(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function fe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=w(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function me(e,t){fe(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function _e(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}function ge(e){return ve(e)?366:365}function ve(e){return e%4==0&&e%100!=0||e%400==0}W("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),W(0,["YY",2],0,(function(){return this.year()%100})),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),j("year","y"),R("year",1),ce("Y",ie),ce("YY",X,J),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),fe(["YYYYY","YYYYYY"],0),fe("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):w(e)})),fe("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),fe("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return w(e)+(w(e)>68?1900:2e3)};var ye,Me=ke("FullYear",!0);function ke(e,t){return function(n){return null!=n?(we(this,e,n),o.updateOffset(this,t),this):be(this,e)}}function be(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function we(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ve(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?ve(e)?29:28:31-r%7%2}ye=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},W("M",["MM",2],"Mo",(function(){return this.month()+1})),W("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),W("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),j("month","M"),R("month",8),ce("M",X),ce("MM",X,J),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),fe(["M","MM"],(function(e,t){t[1]=w(e)-1})),fe(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:f(n).invalidMonth=e}));var Te=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,xe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function De(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=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=ye.call(this._shortMonthsParse,a))?o:null:-1!==(o=ye.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=ye.call(this._shortMonthsParse,a))||-1!==(o=ye.call(this._longMonthsParse,a))?o:null:-1!==(o=ye.call(this._longMonthsParse,a))||-1!==(o=ye.call(this._shortMonthsParse,a))?o:null}function Ye(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(!l(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 Ce(e){return null!=e?(Ye(this,e),o.updateOffset(this,!0),this):be(this,"Month")}var Ae=le,Oe=le;function Ee(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=p([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]=he(r[t]),o[t]=he(o[t]);for(t=0;t<24;t++)i[t]=he(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 je(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 Pe(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 Ne(e,t,n){var r=7+t-n;return-(7+Pe(e,0,r).getUTCDay()-t)%7+r-1}function He(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Ne(e,r,o);return s<=0?a=ge(i=e-1)+s:s>ge(e)?(i=e+1,a=s-ge(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Re(e,t,n){var r,o,i=Ne(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=Ne(e,t,n),o=Ne(e+1,t,n);return(ge(e)-r+o)/7}function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),R("week",5),R("isoWeek",5),ce("w",X),ce("ww",X,J),ce("W",X),ce("WW",X,J),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=w(e)})),W("d",0,"do","day"),W("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),W("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),W("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ce("d",X),ce("e",X),ce("E",X),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:f(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=w(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function We(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=p([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=ye.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ye.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ye.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ye.call(this._weekdaysParse,a))||-1!==(o=ye.call(this._shortWeekdaysParse,a))||-1!==(o=ye.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ye.call(this._shortWeekdaysParse,a))||-1!==(o=ye.call(this._weekdaysParse,a))||-1!==(o=ye.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ye.call(this._minWeekdaysParse,a))||-1!==(o=ye.call(this._weekdaysParse,a))||-1!==(o=ye.call(this._shortWeekdaysParse,a))?o:null}var qe=le,Ue=le,Ve=le;function Je(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=he(s[t]),l[t]=he(l[t]),u[t]=he(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ge(){return this.hours()%12||12}function Ke(e,t){W(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ze(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Ge),W("k",["kk",2],0,(function(){return this.hours()||24})),W("hmm",0,0,(function(){return""+Ge.apply(this)+F(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+Ge.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),j("hour","h"),R("hour",13),ce("a",Ze),ce("A",Ze),ce("H",X),ce("h",X),ce("k",X),ce("HH",X,J),ce("hh",X,J),ce("kk",X,J),ce("hmm",Q),ce("hmmss",ee),ce("Hmm",Q),ce("Hmmss",ee),fe(["H","HH"],3),fe(["k","kk"],(function(e,t,n){var r=w(e);t[3]=24===r?0:r})),fe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),fe(["h","hh"],(function(e,t,n){t[3]=w(e),f(n).bigHour=!0})),fe("hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r)),f(n).bigHour=!0})),fe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(o)),f(n).bigHour=!0})),fe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r))})),fe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(o))}));var Xe,Qe=ke("Hours",!0),et={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:xe,monthsShort:Se,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Be,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function ot(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Xe._abbr,n(632)("./"+t),it(r)}catch(e){}return tt[t]}function it(e,t){var n;return e&&((n=s(t)?st(e):at(e,t))?Xe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function at(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])Y("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=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new O(A(r,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!i(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=rt(e[i]).split("-")).length,n=(n=rt(e[i+1]))?n.split("-"):null;t>0;){if(r=ot(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(o,n,!0)>=t-1)break;t--}i++}return Xe}(e)}function lt(e){var t,n=e._a;return n&&-2===f(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,f(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),f(e)._overflowWeeks&&-1===t&&(t=7),f(e)._overflowWeekday&&-1===t&&(t=8),f(e).overflow=t),e}function ut(e,t,n){return null!=e?e:null!=t?t:n}function ct(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,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=ut(t.GG,e._a[0],Re(Tt(),1,4).year),r=ut(t.W,1),((o=ut(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Re(Tt(),i,a);n=ut(t.gg,e._a[0],u.year),r=ut(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>Fe(n,i,a)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(s=He(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=ut(e._a[0],r[0]),(e._dayOfYear>ge(a)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Pe(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?Pe:je).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&&(f(e).weekdayMismatch=!0)}}var dt=/^\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=/^\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=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["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}/]],mt=[["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 gt(e){var t,n,r,o,i,a,s=e._i,l=dt.exec(s)||ht.exec(s);if(l){for(f(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[1])){o=ft[t][0],r=!1!==ft[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[3])){i=(l[2]||" ")+mt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!pt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),bt(e)}else e._isValid=!1}var vt=/^(?:(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 yt(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,l=vt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var u=(t=l[4],n=l[3],r=l[2],o=l[5],i=l[6],a=l[7],s=[yt(t),Se.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||$e.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,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}(l[8],l[9],l[10]),e._d=Pe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function bt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],f(e).empty=!0;var t,n,r,i,a,s=""+e._i,l=s.length,u=0;for(r=U(e._f,e._locale).match(I)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(de(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&f(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?f(e).empty=!1:f(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&f(e).unusedTokens.push(i);f(e).charsLeftOver=l-u,s.length>0&&f(e).unusedInput.push(s),e._a[3]<=12&&!0===f(e).bigHour&&e._a[3]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(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),ct(e),lt(e)}else kt(e);else gt(e)}function wt(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new M(lt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],bt(t),m(t)&&(i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,(null==r||i<r)&&(r=i,n=t));h(e,n||t)}(e):n?bt(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(gt(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=c(t.slice(0),(function(e){return parseInt(e,10)})),ct(e)):a(t)?function(e){if(!e._d){var t=N(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ct(e)}}(e):l(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function Lt(e,t,n,r,o){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(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),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new M(lt(wt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,n,r){return Lt(e,t,n,r,!1)}o.createFromInputFallback=x("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 xt=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),St=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Dt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Yt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var t=N(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,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(Yt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Yt.length;++r)if(e[Yt[r]]){if(n)return!1;parseFloat(e[Yt[r]])!==w(e[Yt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function At(e){return e instanceof Ct}function Ot(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Et(e,t){W(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)}))}Et("Z",":"),Et("ZZ",""),ce("Z",se),ce("ZZ",se),fe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Pt(se,e)}));var jt=/([\+\-]|\d\d)/gi;function Pt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(jt)||["-",0,0],o=60*r[1]+w(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Nt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||u(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Tt(e).local()}function Ht(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Rt(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(e,t){var n,r,o,i,a,s,u=e,c=null;return At(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Ft.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:w(c[2])*n,h:w(c[3])*n,m:w(c[4])*n,s:w(c[5])*n,ms:w(Ot(1e3*c[6]))*n}):(c=It.exec(e))?(n="-"===c[1]?-1:1,u={y:$t(c[2],n),M:$t(c[3],n),w:$t(c[4],n),d:$t(c[5],n),h:$t(c[6],n),m:$t(c[7],n),s:$t(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Tt(u.from),a=Tt(u.to),o=i.isValid()&&a.isValid()?(a=Nt(a,i),i.isBefore(a)?s=Bt(i,a):((s=Bt(a,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=o.milliseconds,u.M=o.months),r=new Ct(u),At(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function $t(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Bt(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 Wt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(Y(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,zt(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,n,r){var i=t._milliseconds,a=Ot(t._days),s=Ot(t._months);e.isValid()&&(r=null==r||r,s&&Ye(e,be(e,"Month")+s*n),a&&we(e,"Date",be(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}zt.fn=Ct.prototype,zt.invalid=function(){return zt(NaN)};var Ut=Wt(1,"add"),Vt=Wt(-1,"subtract");function Jt(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 Gt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Kt=x("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 Zt(){return this._locale}function Xt(e,t){return(e%t+t)%t}function Qt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){W(0,[e,e.length],0,t)}function nn(e,t,n,r,o){var i;return null==e?Re(this,r,o).year:(t>(i=Fe(e,r,o))&&(t=i),rn.call(this,e,t,n,r,o))}function rn(e,t,n,r,o){var i=He(e,t,n,r,o),a=Pe(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",X,J),ce("gg",X,J),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=w(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),W("Q",0,"Qo","quarter"),j("quarter","Q"),R("quarter",7),ce("Q",V),fe("Q",(function(e,t){t[1]=3*(w(e)-1)})),W("D",["DD",2],"Do","date"),j("date","D"),R("date",9),ce("D",X),ce("DD",X,J),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(["D","DD"],2),fe("Do",(function(e,t){t[2]=w(e.match(X)[0])}));var on=ke("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),R("dayOfYear",4),ce("DDD",te),ce("DDDD",G),fe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=w(e)})),W("m",["mm",2],0,"minute"),j("minute","m"),R("minute",14),ce("m",X),ce("mm",X,J),fe(["m","mm"],4);var an=ke("Minutes",!1);W("s",["ss",2],0,"second"),j("second","s"),R("second",15),ce("s",X),ce("ss",X,J),fe(["s","ss"],5);var sn,ln=ke("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),j("millisecond","ms"),R("millisecond",16),ce("S",te,V),ce("SS",te,J),ce("SSS",te,G),sn="SSSS";sn.length<=9;sn+="S")ce(sn,oe);function un(e,t){t[6]=w(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")fe(sn,un);var cn=ke("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var dn=M.prototype;function hn(e){return e}dn.add=Ut,dn.calendar=function(e,t){var n=e||Tt(),r=Nt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(C(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Tt(n)))},dn.clone=function(){return new M(this)},dn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Nt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=P(t)){case"year":i=Jt(this,r)/12;break;case"month":i=Jt(this,r);break;case"quarter":i=Jt(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:b(i)},dn.endOf=function(e){var t;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Qt;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-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Tt(),e)},dn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Tt(),e)},dn.get=function(e){return C(this[e=P(e)])?this[e]():this},dn.invalidAt=function(){return f(this).overflow},dn.isAfter=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){var o=k(e)?e:Tt(e),i=k(t)?t:Tt(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))},dn.isSame=function(e,t){var n,r=k(e)?e:Tt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return m(this)},dn.lang=Kt,dn.locale=Gt,dn.localeData=Zt,dn.max=St,dn.min=xt,dn.parsingFlags=function(){return h({},f(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:H[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=N(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(C(this[e=P(e)]))return this[e](t);return this},dn.startOf=function(e){var t;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Qt;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-=Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Xt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Xt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},dn.subtract=Vt,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.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()}},dn.toDate=function(){return new Date(this.valueOf())},dn.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"):C(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")},dn.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)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=Me,dn.isLeapYear=function(){return ve(this.year())},dn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=Ce,dn.daysInMonth=function(){return Le(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},dn.date=on,dn.day=dn.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},dn.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")},dn.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},dn.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")},dn.hour=dn.hours=Qe,dn.minute=dn.minutes=an,dn.second=dn.seconds=ln,dn.millisecond=dn.milliseconds=cn,dn.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=Pt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ht(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?qt(this,zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ht(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ht(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Pt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Rt,dn.isUTC=Rt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=x("dates accessor is deprecated. Use date instead.",on),dn.months=x("months accessor is deprecated. Use month instead",Ce),dn.years=x("years accessor is deprecated. Use year instead",Me),dn.zone=x("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()})),dn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=wt(e))._a){var t=e._isUTC?p(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var pn=O.prototype;function fn(e,t,n,r){var o=st(),i=p().set(r,t);return o[n](i,e)}function mn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return fn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=fn(e,r,n,"month");return o}function _n(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var o,i=st(),a=e?i._week.dow:0;if(null!=n)return fn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=fn(t,(o+a)%7,r,"day");return s}pn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return C(r)?r.call(t,n):r},pn.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])},pn.invalidDate=function(){return this._invalidDate},pn.ordinal=function(e){return this._ordinal.replace("%d",e)},pn.preparse=hn,pn.postformat=hn,pn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return C(o)?o(e,t,n,r):o.replace(/%d/i,e)},pn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},pn.set=function(e){var t,n;for(n in e)C(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)},pn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Te).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},pn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Te.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=p([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}},pn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Oe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},pn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ae),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},pn.week=function(e){return Re(e,this._week.dow,this._week.doy).week},pn.firstDayOfYear=function(){return this._week.doy},pn.firstDayOfWeek=function(){return this._week.dow},pn.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?Ie(n,this._week.dow):e?n[e.day()]:n},pn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},pn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},pn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return We.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=p([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}},pn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},pn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ue),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ve),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},pn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=x("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=x("moment.langData is deprecated. Use moment.localeData instead.",st);var gn=Math.abs;function vn(e,t,n,r){var o=zt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function yn(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 bn(e){return function(){return this.as(e)}}var wn=bn("ms"),Ln=bn("s"),Tn=bn("m"),xn=bn("h"),Sn=bn("d"),Dn=bn("w"),Yn=bn("M"),Cn=bn("Q"),An=bn("y");function On(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=On("milliseconds"),jn=On("seconds"),Pn=On("minutes"),Nn=On("hours"),Hn=On("days"),Rn=On("months"),Fn=On("years"),In=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};function $n(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Bn=Math.abs;function Wn(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Bn(this._milliseconds)/1e3,r=Bn(this._days),o=Bn(this._months);e=b(n/60),t=b(e/60),n%=60,e%=60;var i=b(o/12),a=o%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",p=Wn(this._months)!==Wn(d)?"-":"",f=Wn(this._days)!==Wn(d)?"-":"",m=Wn(this._milliseconds)!==Wn(d)?"-":"";return h+"P"+(i?p+i+"Y":"")+(a?p+a+"M":"")+(s?f+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var Un=Ct.prototype;return Un.isValid=function(){return this._isValid},Un.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},Un.add=function(e,t){return vn(this,e,t,1)},Un.subtract=function(e,t){return vn(this,e,t,-1)},Un.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=P(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)}},Un.asMilliseconds=wn,Un.asSeconds=Ln,Un.asMinutes=Tn,Un.asHours=xn,Un.asDays=Sn,Un.asWeeks=Dn,Un.asMonths=Yn,Un.asQuarters=Cn,Un.asYears=An,Un.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Un._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*yn(kn(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=b(i/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,a+=b(n/24),o=b(Mn(a)),s+=o,a-=yn(kn(o)),r=b(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Un.clone=function(){return zt(this)},Un.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Un.milliseconds=En,Un.seconds=jn,Un.minutes=Pn,Un.hours=Nn,Un.days=Hn,Un.weeks=function(){return b(this.days()/7)},Un.months=Rn,Un.years=Fn,Un.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=zt(e).abs(),o=In(r.as("s")),i=In(r.as("m")),a=In(r.as("h")),s=In(r.as("d")),l=In(r.as("M")),u=In(r.as("y")),c=o<=zn.ss&&["s",o]||o<zn.s&&["ss",o]||i<=1&&["m"]||i<zn.m&&["mm",i]||a<=1&&["h"]||a<zn.h&&["hh",a]||s<=1&&["d"]||s<zn.d&&["dd",s]||l<=1&&["M"]||l<zn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,$n.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Un.toISOString=qn,Un.toString=qn,Un.toJSON=qn,Un.locale=Gt,Un.localeData=Zt,Un.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Un.lang=Kt,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),fe("x",(function(e,t,n){n._d=new Date(w(e))})),o.version="2.24.0",t=Tt,o.fn=dn,o.min=function(){var e=[].slice.call(arguments,0);return Dt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Dt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=p,o.unix=function(e){return Tt(1e3*e)},o.months=function(e,t){return mn(e,t,"months")},o.isDate=u,o.locale=it,o.invalid=_,o.duration=zt,o.isMoment=k,o.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},o.parseZone=function(){return Tt.apply(null,arguments).parseZone()},o.localeData=st,o.isDuration=At,o.monthsShort=function(e,t){return mn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},o.defineLocale=at,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=(r=ot(e))&&(o=r._config),t=A(o,t),(n=new O(t)).parentLocale=tt[e],tt[e]=n,it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return S(tt)},o.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},o.normalizeUnits=P,o.relativeTimeRounding=function(e){return void 0===e?In:"function"==typeof e&&(In=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.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=dn,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}()}).call(this,n(176)(e))},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function i(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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(396);var d=/[&<>"]/,h=/[&<>"]/g,p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function f(e){return p[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var _=n(213);t.lib={},t.lib.mdurl=n(397),t.lib.ucmicro=n(665),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof 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=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return o(c,t)?c[t]:35===t.charCodeAt(0)&&u.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=i,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(h,f):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(m,"\\$&")},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(163),o=n(165),i=Object.create(null),a=function(e,t,n){this.ranges=n||[new l(e.min(t),e.max(t))],this.$anchor=e,this.$head=t};t.Selection=a;var s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.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},a.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},a.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,l=0;l<s.length;l++){var u=s[l],c=u.$from,d=u.$to,h=e.mapping.slice(a);e.replaceRange(h.map(c.pos),h.map(d.pos),l?r.Slice.empty:t),0==l&&_(e,a,(n?n.isInline:o&&o.isTextblock)?-1:1)}},a.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,l=e.mapping.slice(n),u=l.map(a.pos),c=l.map(s.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),_(e,n,t.isInline?-1:1))}},a.findFrom=function(e,t,n){var r=e.parent.inlineContent?new u(e):m(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?m(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):m(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))},a.atStart=function(e){return m(e,e,0,0,1)||new p(e)},a.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new p(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return u.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var l=function(e,t){this.$from=e,this.$to=t};t.SelectionRange=l;var u=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 c(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}(a);t.TextSelection=u,a.jsonID("text",u);var c=function(e,t){this.anchor=e,this.head=t};c.prototype.map=function(e){return new c(e.map(this.anchor),e.map(this.head))},c.prototype.resolve=function(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))};var d=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 h(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}(a);t.NodeSelection=d,d.prototype.visible=!1,a.jsonID("node",d);var h=function(e){this.anchor=e};h.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new c(r,r):new h(r)},h.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):a.near(t)};var p=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 f},t}(a);t.AllSelection=p,a.jsonID("all",p);var f={map:function(){return this},resolve:function(e){return new p(e)}};function m(e,t,n,r,o,i){if(t.inlineContent)return u.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&&d.isSelectable(s))return d.create(e,n-(o<0?s.nodeSize:0))}else{var l=m(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function _(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,s=e.steps[r];if(s instanceof o.ReplaceStep||s instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==i&&(i=r)})),e.setSelection(a.near(e.doc.resolve(i),n))}}var g=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(a.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 v(e,t){return t&&e?e.bind(t):e}t.Transaction=g;var y=function(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)},M=[new y("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new y("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new y("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new y("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 y(e.key,e.spec.state,e))}))},b=function(e){this.config=e};t.EditorState=b;var w={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};w.schema.get=function(){return this.config.schema},w.plugins.get=function(){return this.config.plugins},b.prototype.apply=function(e){return this.applyTransaction(e).state},b.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},b.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,l=r?r[i].state:this,u=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(u&&n.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(var c=0;c<this.config.plugins.length;c++)r.push(c<i?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},b.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new b(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},w.tr.get=function(){return new g(this)},b.create=function(e){for(var t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new b(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},b.prototype.reconfigure=function(e){for(var t=new k(this.schema,e.plugins),n=t.fields,r=new b(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},b.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"==typeof 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},b.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 b(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=a.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 s in n){var l=n[s],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,s))return void(i[o.name]=u.fromJSON.call(l,e,t[s],i))}i[o.name]=o.init(e,i)}})),i},b.addApplyListener=function(e){L.push(e)},b.removeApplyListener=function(e){var t=L.indexOf(e);t>-1&&L.splice(t,1)},Object.defineProperties(b.prototype,w);var L=[];var T=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:S("plugin")};t.Plugin=T,T.prototype.getState=function(e){return e[this.key]};var x=Object.create(null);function S(e){return e in x?e+"$"+ ++x[e]:(x[e]=0,e+"$")}var D=function(e){void 0===e&&(e="key"),this.key=S(e)};t.PluginKey=D,D.prototype.get=function(e){return e.config.pluginsByKey[this.key]},D.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceError=d,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(636))&&r.__esModule?r:{default:r};var i=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=i;var a={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};i.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],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o,i)&&s.content.size){var u=a+1;s.nodesBetween(Math.max(0,e-u),Math.min(s.content.size,t-u),n,r+u)}a=l}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.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},i.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 i(r,this.size+e.size)},i.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,a=0;a<t;o++){var s=this.content[o],l=a+s.nodeSize;l>e&&((a<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=l}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.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 i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.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},a.firstChild.get=function(){return this.content.length?this.content[0]:null},a.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},a.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.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}},i.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 l=e(i.content,a.content,r+1);if(null!=l)return l}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.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),l=n.child(--a),u=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:r,b:o};if(s.isText&&s.text!=l.text){for(var c=0,d=Math.min(s.text.length,l.text.length);c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,r--,o--;return{a:r,b:o}}if(s.content.size||l.content.size){var h=e(s.content,l.content,r-1,o-1);if(h)return h}r-=u,o-=u}else r-=u,o-=u}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return l(0,e);if(e==this.size)return l(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?l(n+1,o):l(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.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 i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([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(i.prototype,a);var s={index:0,offset:0};function l(e,t){return s.index=e,s.offset=t,s}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof 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(!u(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!u(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var c=function(e,t){this.type=e,this.attrs=t};function d(e){var t=Error.call(this,e);return t.__proto__=d.prototype,t}t.Mark=c,c.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},c.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},c.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},c.prototype.eq=function(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)},c.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},c.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)},c.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},c.setFrom=function(e){if(!e||0==e.length)return c.none;if(e instanceof c)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},c.none=[],d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.name="ReplaceError";var h=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n};t.Slice=h;var p={size:{configurable:!0}};function f(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o<t.depth-r.openStart){var l=e(t,n,r,o+1);return s.copy(s.content.replaceChild(a,l))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var u=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(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),c=u.start,d=u.end;return y(s,function e(t,n,r,o,a){var s=t.depth>a&&_(t,n,a+1),l=o.depth>a&&_(r,o,a+1),u=[];v(null,t,a,u),s&&l&&n.index(a)==r.index(a)?(m(s,l),g(y(s,e(t,n,r,o,a+1)),u)):(s&&g(y(s,M(t,n,a+1)),u),v(n,r,a,u),l&&g(y(l,M(r,o,a+1)),u));return v(o,null,a,u),new i(u)}(t,c,d,n,o))}var h=t.parent,p=h.content;return y(h,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return y(s,M(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.name)}function _(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function g(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 v(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&&(g(e.nodeAfter,r),i++));for(var s=i;s<a;s++)g(o.child(s),r);t&&t.depth==n&&t.textOffset&&g(t.nodeBefore,r)}function y(e,t){if(!e.type.validContent(t))throw new d("Invalid content for node "+e.type.name);return e.copy(t)}function M(e,t,n){var r=[];(v(null,e,n,r),e.depth>n)&&g(y(_(e,t,n+1),M(e,t,n+1)),r);return v(t,null,n,r),new i(r)}p.size.get=function(){return this.content.size-this.openStart-this.openEnd},h.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,l=t.maybeChild(a);if(s==n||l.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var u=e(l.content,n-s-1,r);return u&&t.replaceChild(a,l.copy(u))}(this.content,e+this.openStart,t,null);return n&&new h(n,this.openStart,this.openEnd)},h.prototype.removeBetween=function(e,t){return new h(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),l=t.findIndex(r),u=l.index,c=l.offset;if(a==n||s.isText){if(c!=r&&!t.child(u).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)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)},h.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},h.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},h.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},h.fromJSON=function(e,t){if(!t)return h.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 h(i.fromJSON(e,t.content),n,r)},h.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 h(e,n,r)},Object.defineProperties(h.prototype,p),h.empty=new h(i.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 b={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},b.parent.get=function(){return this.node(this.depth)},b.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},b.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},b.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},b.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 c.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 x(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,l=a.offset,u=o-l;if(n.push(i,s,r+l),!u)break;if((i=i.child(s)).isText)break;o=u-1,r+=l+1}return new k(t,n,o)},k.resolveCached=function(e,t){for(var n=0;n<w.length;n++){var r=w[n];if(r.pos==t&&r.doc==e)return r}var o=w[L]=k.resolve(e,t);return L=(L+1)%T,o},Object.defineProperties(k.prototype,b);var w=[],L=0,T=12,x=function(e,t,n){this.$from=e,this.$to=t,this.depth=n};t.NodeRange=x;var S={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};S.start.get=function(){return this.$from.before(this.depth+1)},S.end.get=function(){return this.$to.after(this.depth+1)},S.parent.get=function(){return this.$from.node(this.depth)},S.startIndex.get=function(){return this.$from.index(this.depth)},S.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(x.prototype,S);var D=Object.create(null),Y=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||c.none};t.Node=Y;var C={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}};C.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},C.childCount.get=function(){return this.content.childCount},Y.prototype.child=function(e){return this.content.child(e)},Y.prototype.maybeChild=function(e){return this.content.maybeChild(e)},Y.prototype.forEach=function(e){this.content.forEach(e)},Y.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},Y.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},C.textContent.get=function(){return this.textBetween(0,this.content.size,"")},Y.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},C.firstChild.get=function(){return this.content.firstChild},C.lastChild.get=function(){return this.content.lastChild},Y.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},Y.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},Y.prototype.hasMarkup=function(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||D)&&c.sameSet(this.marks,n||c.none)},Y.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},Y.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},Y.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},Y.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return h.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 h(s,r.depth-i,o.depth-i)},Y.prototype.replace=function(e,t,n){return f(this.resolve(e),this.resolve(t),n)},Y.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}},Y.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}},Y.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}},Y.prototype.resolve=function(e){return k.resolveCached(this,e)},Y.prototype.resolveNoCache=function(e){return k.resolve(this,e)},Y.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},C.isBlock.get=function(){return this.type.isBlock},C.isTextblock.get=function(){return this.type.isTextblock},C.inlineContent.get=function(){return this.type.inlineContent},C.isInline.get=function(){return this.type.isInline},C.isText.get=function(){return this.type.isText},C.isLeaf.get=function(){return this.type.isLeaf},C.isAtom.get=function(){return this.type.isAtom},Y.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()+")"),O(this.marks,e)},Y.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},Y.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0},Y.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},Y.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},Y.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=c.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!c.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()}))},Y.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},Y.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=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(Y.prototype,C);var A=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):O(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}(Y);function O(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var E=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]};t.ContentMatch=E;var j={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};E.parse=function(e,t){var n=new P(e,t);if(null==n.next)return E.empty;var r=H(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];B(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new E(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort($);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(B(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 l=n();return r(i,l),o(e(t.expr,l),l),[r(l)]}if("plus"==t.type){var u=n();return o(e(t.expr,i),u),o(e(t.expr,u),u),[r(u)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var c=i,d=0;d<t.min;d++){var h=n();o(e(t.expr,c),h),c=h}if(-1==t.max)o(e(t.expr,c),c);else for(var p=t.min;p<t.max;p++){var f=n();r(c,f),o(e(t.expr,c),f),c=f}return[r(c)]}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 l=o.next[s],u=o.next[s+1];a.push(l.name),!i||l.isText||l.hasRequiredAttrs()||(i=!1),-1==r.indexOf(u)&&r.push(u)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},E.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},E.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},j.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},j.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}},E.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},E.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(a,s){var l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return i.from(s.map((function(e){return e.createAndFill()})));for(var u=0;u<a.next.length;u+=2){var c=a.next[u],d=a.next[u+1];if(!c.isText&&!c.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var h=o(d,s.concat(c));if(h)return h}}}(this,[])},E.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},E.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 l=o.next[s];l.isLeaf||l.hasRequiredAttrs()||l.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:l.contentMatch,type:l,via:r}),t[l.name]=!0)}}},j.edgeCount.get=function(){return this.next.length>>1},E.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]}},E.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(E.prototype,j),E.empty=new E(!0);var P=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()},N={next:{configurable:!0}};function H(e){var t=[];do{t.push(R(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function R(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=H(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=z(e,t)}return t}function I(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function z(e,t){var n=I(e),r=n;return e.eat(",")&&(r="}"!=e.next?I(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $(e,t){return t-e}function B(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,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort($)}function W(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 U(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new G(e[n]);return t}N.next.get=function(){return this.tokens[this.pos]},P.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},P.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(P.prototype,N);var V=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=U(n.attrs),this.defaultAttrs=W(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e};t.NodeType=V;var J={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};J.isInline.get=function(){return!this.isBlock},J.isTextblock.get=function(){return this.isBlock&&this.inlineContent},J.isLeaf.get=function(){return this.contentMatch==E.empty},J.isAtom.get=function(){return this.isLeaf||this.spec.atom},V.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},V.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},V.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:q(this.attrs,e)},V.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Y(this,this.computeAttrs(e),i.from(t),c.setFrom(n))},V.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new Y(this,this.computeAttrs(e),t,c.setFrom(n))},V.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new Y(this,e,t.append(o),c.setFrom(n)):null},V.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},V.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},V.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},V.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:c.empty:e},V.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new V(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(V.prototype,J);var G=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},K={isRequired:{configurable:!0}};K.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(G.prototype,K);var Z=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=U(r.attrs),this.rank=t,this.excluded=null;var o=W(this.attrs);this.instance=o&&new c(this,o)};t.MarkType=Z,Z.prototype.create=function(e){return!e&&this.instance?this.instance:new c(this,q(this.attrs,e))},Z.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new Z(e,r++,t,o)})),n},Z.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},Z.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},Z.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var X=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=V.compile(this.spec.nodes,this),this.marks=Z.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]=E.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Q(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var l in this.marks){var u=this.marks[l],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:Q(this,c.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 Q(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 l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}t.Schema=X,X.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof V))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)},X.prototype.text=function(e,t){var n=this.nodes.text;return new A(n,n.defaultAttrs,e,c.setFrom(t))},X.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},X.prototype.nodeFromJSON=function(e){return Y.fromJSON(this,e)},X.prototype.markFromJSON=function(e){return c.fromJSON(this,e)},X.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=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=ee,ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),h.maxOpen(n.finish())},ee.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(le(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}}},ee.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}}},ee.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=ue(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=ue(e)),e.node=a}));return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={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},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0};function oe(e){return(e?1:0)|("full"===e?2:0)}var ie=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=c.none,this.pendingMarks=r,this.stashMarks=[]};ie.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.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)},ie.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=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ie.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]},ie.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):ce(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}};var ae=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=oe(t.preserveWhitespace)|(n?4:0);r=o?new ie(o.type,o.attrs,c.none,c.none,!0,t.topMatch||o.type.contentMatch,i):new ie(n?null:e.schema.topNodeType,null,c.none,c.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},se={top:{configurable:!0},currentPos:{configurable:!0}};function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ue(e){var t={};for(var n in e)t[n]=e[n];return t}function ce(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[],a=function(e){i.push(e);for(var n=0;n<e.edgeCount;n++){var r=e.edge(n),o=r.type,s=r.next;if(o==t)return!0;if(i.indexOf(s)<0&&a(s))return!0}};return a(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}se.top.get=function(){return this.nodes[this.open]},ae.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)}},ae.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/[^ \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)},ae.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();re.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&&re.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:ne.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(te.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)},ae.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},ae.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},ae.prototype.readStyles=function(e){var t=c.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},ae.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 l=t.contentElement;"string"==typeof l?l=e.querySelector(l):"function"==typeof l&&(l=l(e)),l||(l=e),this.findAround(e,l,!0),this.addAll(l,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},ae.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&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ae.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},ae.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},ae.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},ae.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:oe(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ie(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},ae.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}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.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},ae.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)},ae.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)},ae.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)}},ae.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))},ae.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),a=function(e,s){for(;e>=0;e--){var l=n[e];if(""==l){if(e==n.length-1||0==e)continue;for(;s>=i;s--)if(a(e-1,s))return!0;return!1}var u=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!u||u.name!=l&&-1==u.groups.indexOf(l))return!1;s--}return!0};return a(n.length-1,this.open)},ae.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}},ae.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)},ae.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(ae.prototype,se);var de=function(e,t){this.nodes=e||{},this.marks=t||{}};function he(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function pe(e){return e.document||window.document}t.DOMSerializer=de,de.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=pe(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 l=e.marks[a++],u=r.serializeMark(l,e.isInline,t);u&&(i.push(l,o),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(r.serializeNode(e,t))})),n},de.prototype.serializeNode=function(e,t){void 0===t&&(t={});var n=de.renderSpec(pe(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},de.prototype.serializeNodeAndMarks=function(e,t){void 0===t&&(t={});for(var n=this.serializeNode(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},de.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&de.renderSpec(pe(n),r(e,t))},de.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 i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var u in l=2,s)if(null!=s[u]){var c=u.indexOf(" ");c>0?a.setAttributeNS(u.slice(0,c),u.slice(c+1),s[u]):a.setAttribute(u,s[u])}for(var d=l;d<t.length;d++){var h=t[d];if(0===h){if(d<t.length-1||d>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=de.renderSpec(e,h,n),f=p.dom,m=p.contentDOM;if(a.appendChild(f),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},de.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new de(this.nodesFromSchema(e),this.marksFromSchema(e)))},de.nodesFromSchema=function(e){var t=he(e.nodes);return t.text||(t.text=function(e){return e.text}),t},de.marksFromSchema=function(e){return he(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(162),i=n(177),a=n(163),s=n(638),l=n(639),u=n(210),c=n(392),d=n(393),h=n(187),p=(r=n(8))&&r.__esModule?r:{default:r},f=n(188);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&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(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 b(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}let w=function(){function e(t,{editor:n,extension:r,parent:o,node:i,view:a,decorations:s,getPos:l}){M(this,e),this.component=t,this.editor=n,this.extension=r,this.parent=o,this.node=i,this.view=a,this.decorations=s,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:l,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return b(e,[{key:"createDOM",value:function(){const e=p.default.extend(this.component),t={editor:this.editor,node:this.node,view:this.view,getPos:()=>this.getPos(),decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:e=>this.updateAttrs(e)};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"==typeof this.extension.update&&(this.update=this.extension.update),this.vm=new e({parent:this.parent,propsData:t}).$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){if(!this.vm._props)return;const t=p.default.config.silent;p.default.config.silent=!0,Object.entries(e).forEach(([e,t])=>{this.vm._props[e]=t}),p.default.config.silent=t}},{key:"updateAttrs",value:function(e){if(!this.view.editable)return;const{state:t}=this.view,{type:n}=this.node,r=this.getPos(),o={...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){if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);const t=!!this.extension.schema.draggable;if(t&&"mousedown"===e.type){const t=e.target.closest&&e.target.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.captureEvents=!1,document.addEventListener("dragend",()=>{this.captureEvents=!0},{once:!0}))}const n="copy"===e.type,r="paste"===e.type,o="cut"===e.type,i=e.type.startsWith("drag")||"drop"===e.type;return!(t&&i||n||r||o)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){const e=this.view.posAtDOM(this.dom),t=this.view.state.doc.resolve(e);return(0,h.getMarkRange)(t,this.node.type)}},{key:"destroy",value:function(){this.vm.$destroy()}}]),e}(),L=function(){function e(){M(this,e)}return b(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,...t){this._callbacks=this._callbacks||{};const n=this._callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}},{key:"off",value:function(e,t){if(arguments.length){const n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter(e=>e!==t):delete this._callbacks[e])}else this._callbacks={};return this}}]),e}(),T=function(){function e(t={}){M(this,e),this.options={...this.defaultOptions,...t}}return b(e,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(e=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=T;let x=function(){function e(t=[],n){M(this,e),t.forEach(e=>{e.bindEditor(n),e.init()}),this.extensions=t}return b(e,[{key:"nodes",get:function(){return this.extensions.filter(e=>"node"===e.type).reduce((e,{name:t,schema:n})=>({...e,[t]:n}),{})}},{key:"options",get:function(){const{view:e}=this;return this.extensions.reduce((t,n)=>({...t,[n.name]:new Proxy(n.options,{set(t,n,r){const o=t[n]!==r;return Object.assign(t,{[n]:r}),o&&e.updateState(e.state),!0}})}),{})}},{key:"marks",get:function(){return this.extensions.filter(e=>"mark"===e.type).reduce((e,{name:t,schema:n})=>({...e,[t]:n}),{})}},{key:"plugins",get:function(){return this.extensions.filter(e=>e.plugins).reduce((e,{plugins:t})=>[...e,...t],[])}},{key:"keymaps",value:function({schema:e}){return[...this.extensions.filter(e=>["extension"].includes(e.type)).filter(e=>e.keys).map(t=>t.keys({schema:e})),...this.extensions.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.keys).map(t=>t.keys({type:e["".concat(t.type,"s")][t.name],schema:e}))].map(e=>(0,u.keymap)(e))}},{key:"inputRules",value:function({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions;return[...n.filter(e=>["extension"].includes(e.type)).filter(e=>e.inputRules).map(t=>t.inputRules({schema:e})),...n.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.inputRules).map(t=>t.inputRules({type:e["".concat(t.type,"s")][t.name],schema:e}))].reduce((e,t)=>[...e,...t],[])}},{key:"pasteRules",value:function({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions;return[...n.filter(e=>["extension"].includes(e.type)).filter(e=>e.pasteRules).map(t=>t.pasteRules({schema:e})),...n.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.pasteRules).map(t=>t.pasteRules({type:e["".concat(t.type,"s")][t.name],schema:e}))].reduce((e,t)=>[...e,...t],[])}},{key:"commands",value:function({schema:e,view:t}){return this.extensions.filter(e=>e.commands).reduce((n,r)=>{const{name:o,type:i}=r,a={},s=r.commands({schema:e,...["node","mark"].includes(i)?{type:e["".concat(i,"s")][o]}:{}}),l=(e,n)=>!!t.editable&&(t.focus(),e(n)(t.state,t.dispatch,t)),u=(e,t)=>{Array.isArray(t)?a[e]=e=>t.forEach(t=>l(t,e)):"function"==typeof t&&(a[e]=e=>l(t,e))};return"object"==typeof s?Object.entries(s).forEach(([e,t])=>{u(e,t)}):u(o,s),{...n,...a}},{})}}]),e}();let S=function(e){m(n,e);var t=g(n);function n(e={}){return M(this,n),t.call(this,e)}return b(n,[{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return()=>{}}}]),n}(T);function D(e=0,t=0,n=0){return Math.min(Math.max(parseInt(e,10),t),n)}t.Mark=S;let Y=function(e){m(n,e);var t=g(n);function n(e={}){return M(this,n),t.call(this,e)}return b(n,[{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return()=>{}}}]),n}(T);t.Node=Y;let C=function(e){m(n,e);var t=g(n);function n(){return M(this,n),t.apply(this,arguments)}return b(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(Y);t.Doc=C;let A=function(e){m(n,e);var t=g(n);function n(){return M(this,n),t.apply(this,arguments)}return b(n,[{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}},{key:"commands",value:function({type:e}){return()=>(0,f.setBlockType)(e)}}]),n}(Y);t.Paragraph=A;let O=function(e){m(n,e);var t=g(n);function n(){return M(this,n),t.apply(this,arguments)}return b(n,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(Y);t.Text=O;let E=function(e){m(n,e);var t=g(n);function n(e={}){var r;return M(this,n),(r=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:()=>{},onTransaction:()=>{},onUpdate:()=>{},onFocus:()=>{},onBlur:()=>{},onPaste:()=>{},onDrop:()=>{}},r.events=["init","transaction","update","focus","blur","paste","drop"],r.init(e),r}return b(n,[{key:"init",value:function(e={}){this.setOptions({...this.defaultOptions,...e}),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&&function(e){{const t=document.createElement("style");t.type="text/css",t.textContent=e;const{head:n}=document,{firstChild:r}=n;r?n.insertBefore(t,r):n.appendChild(t)}}('.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'),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach(e=>{var t;this.on(e,this.options[(t="on ".concat(e),t.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===t?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,""))]||(()=>{}))}),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(e){this.options={...this.options,...e},this.view&&this.state&&this.view.updateState(this.state)}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new C,new O,new A]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"createExtensions",value:function(){return new x([...this.builtInExtensions,...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(){return o.EditorState.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,(0,d.inputRules)({rules:this.inputRules}),...this.pasteRules,...this.keymaps,(0,u.keymap)({Backspace:d.undoInputRule}),(0,u.keymap)(c.baseKeymap),...this.options.enableDropCursor?[(0,s.dropCursor)(this.options.dropCursor)]:[],...this.options.enableGapCursor?[(0,l.gapCursor)()]:[],new o.Plugin({key:new o.PluginKey("editable"),props:{editable:()=>this.options.editable}}),new o.Plugin({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,t)=>{this.focused=!0,this.emit("focus",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!0);this.view.dispatch(n)},blur:(e,t)=>{this.focused=!1,this.emit("blur",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!1);this.view.dispatch(n)}}}}),new o.Plugin({props:this.options.editorProps})]})}},{key:"createDocument",value:function(e,t=this.options.parseOptions){if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof 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){const n="<div>".concat(e,"</div>"),r=(new window.DOMParser).parseFromString(n,"text/html").body.firstElementChild;return a.DOMParser.fromSchema(this.schema).parse(r,t)}return!1}},{key:"createView",value:function(){return new i.EditorView(this.element,{state:this.createState(),handlePaste:(...e)=>{this.emit("paste",...e)},handleDrop:(...e)=>{this.emit("drop",...e)},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(e=null){e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[...this.builtInExtensions,...this.options.extensions]})})}},{key:"initNodeViews",value:function({parent:e,extensions:t}){return t.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.view).reduce((t,n)=>({...t,[n.name]:(t,r,o,i)=>{const a=n.view;return new w(a,{editor:this,extension:n,parent:e,node:t,view:r,getPos:o,decorations:i})}}),{})}},{key:"dispatchTransaction",value:function(e){const 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(e=null){if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){const{doc:e}=this.state;return{from:e.content.size,to:e.content.size}}return{from:e,to:e}}},{key:"focus",value:function(e=null){if(this.view.focused&&null===e||!1===e)return;const{from:t,to:n}=this.resolveSelection(e);this.setSelection(t,n),setTimeout(()=>this.view.focus(),10)}},{key:"setSelection",value:function(e=0,t=0){const{doc:n,tr:r}=this.state,i=D(e,0,n.content.size),a=D(t,0,n.content.size),s=o.TextSelection.create(n,i,a),l=r.setSelection(s);this.view.dispatch(l)}},{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(){const 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(e={},t=!1,n){const{doc:r,tr:i}=this.state,a=this.createDocument(e,n),s=o.TextSelection.create(r,0,r.content.size),l=i.setSelection(s).replaceSelectionWith(a,!1).setMeta("preventUpdate",!t);this.view.dispatch(l)}},{key:"clearContent",value:function(e=!1){this.setContent(this.options.emptyDocument,e)}},{key:"setActiveNodesAndMarks",value:function(){this.activeMarks=Object.entries(this.schema.marks).reduce((e,[t,n])=>({...e,[t]:(e={})=>(0,h.markIsActive)(this.state,n,e)}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((e,[t,n])=>({...e,[t]:(0,h.getMarkAttrs)(this.state,n)}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((e,[t,n])=>({...e,[t]:(e={})=>(0,h.nodeIsActive)(this.state,n,e)}),{})}},{key:"getMarkAttrs",value:function(e=null){return this.activeMarkAttrs[e]}},{key:"getNodeAttrs",value:function(e=null){return{...(0,h.getNodeAttrs)(this.state,this.schema.nodes[e])}}},{key:"isActive",get:function(){return Object.entries({...this.activeMarks,...this.activeNodes}).reduce((e,[t,n])=>({...e,[t]:(e={})=>n(e)}),{})}},{key:"registerPlugin",value:function(e=null,t){const n="function"==typeof t?t(e,this.state.plugins):[e,...this.state.plugins],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e=null){if(!e||!this.view.docView)return;const t=this.state.reconfigure({plugins:this.state.plugins.filter(t=>!t.key.startsWith("".concat(e,"$")))});this.view.updateState(t)}},{key:"destroy",value:function(){this.view&&this.view.destroy()}}]),n}(L);t.Editor=E;var j={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(e){e&&e.element&&this.$nextTick(()=>{this.$el.appendChild(e.element.firstChild),e.setParentComponent(this)})}}},render:e=>e("div"),beforeDestroy(){this.editor.element=this.$el}};t.EditorContent=j;let P=function(){function e({options:t}){M(this,e),this.options=t,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.blurHandler=()=>{this.preventHide?this.preventHide=!1:this.options.editor.emit("menubar:focusUpdate",!1)},this.options.editor.on("blur",this.blurHandler)}return b(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 N={props:{editor:{default:null,type:Object}},data:()=>({focused:!1}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{var t;e.registerPlugin((t={editor:e,element:this.$el},new o.Plugin({key:new o.PluginKey("menu_bar"),view:e=>new P({editorView:e,options:t})}))),this.focused=e.focused,e.on("focus",()=>{this.focused=!0}),e.on("menubar:focusUpdate",e=>{this.focused=e})})}}},render(){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 H(e,t,n){const r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,Math.max(t,0)),r}function R(e,t){const n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function F(e,t,n=!1){const{node:r,offset:o}=e.docView.domFromPos(t);let i,a;if(3===r.nodeType)n&&o<r.nodeValue.length?(a=R(H(r,o-1,o),-1),i="right"):o<r.nodeValue.length&&(a=R(H(r,o,o+1),-1),i="left");else if(r.firstChild){if(o<r.childNodes.length){const e=r.childNodes[o];a=R(3===e.nodeType?H(e):e,-1),i="left"}if((!a||a.top===a.bottom)&&o){const e=r.childNodes[o-1];a=R(3===e.nodeType?H(e):e,1),i="right"}}else a=r.getBoundingClientRect(),i="left";const s=a[i];return{top:a.top,bottom:a.bottom,left:s,right:s}}t.EditorMenuBar=N;let I=function(){function e({options:t,editorView:n}){M(this,e),this.options={element:null,keepInBounds:!0,onUpdate:()=>!1,...t},this.editorView=n,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=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler)}return b(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){const{state:n}=e;if(e.composing)return;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(n.selection.empty)return void this.hide();const{from:r,to:o}=n.selection,i=F(e,r),a=F(e,o,!0),s=this.options.element.offsetParent;if(!s)return void this.hide();const l=s.getBoundingClientRect(),u=this.options.element.getBoundingClientRect(),c=(i.left+a.left)/2-l.left;this.left=Math.round(this.options.keepInBounds?Math.min(l.width-u.width/2,Math.max(c,u.width/2)):c),this.bottom=Math.round(l.bottom-i.top),this.top=Math.round(a.bottom-l.top),this.isActive=!0,this.sendUpdate()}},{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 z={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:()=>({menu:{isActive:!1,left:0,bottom:0}}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{var t;e.registerPlugin((t={editor:e,element:this.$el,keepInBounds:this.keepInBounds,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}},new o.Plugin({key:new o.PluginKey("menu_bubble"),view:e=>new I({editorView:e,options:t})})))})}}},render(){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(){this.editor.unregisterPlugin("menu_bubble")}};t.EditorMenuBubble=z;let $=function(){function e({options:t,editorView:n}){M(this,e),this.options={resizeObserver:!0,element:null,onUpdate:()=>!1,...t},this.preventHide=!1,this.editorView=n,this.isActive=!1,this.top=0,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler),this.options.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{this.isActive&&this.update(this.editorView)}),this.resizeObserver.observe(this.editorView.dom))}return b(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){const{state:n}=e;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(!n.selection.empty)return void this.hide();const r=e.domAtPos(n.selection.anchor);if(!("<br>"===r.node.innerHTML&&"P"===r.node.tagName&&r.node.parentNode===e.dom))return void this.hide();const o=this.options.element.offsetParent;if(!o)return void this.hide();const i=o.getBoundingClientRect(),a=e.coordsAtPos(n.selection.anchor).top-i.top;this.isActive=!0,this.top=a,this.sendUpdate()}},{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 B={props:{editor:{default:null,type:Object}},data:()=>({menu:{isActive:!1,left:0,bottom:0}}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{var t;e.registerPlugin((t={editor:e,element:this.$el,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}},new o.Plugin({key:new o.PluginKey("floating_menu"),view:e=>new $({editorView:e,options:t})})))})}}},render(){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(){this.editor.unregisterPlugin("floating_menu")}};t.EditorFloatingMenu=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformError=u,t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return k(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,l=n-2;s>i;s--,l--){var u=o.node(s),c=o.index(s);if(u.type.spec.isolating)return!1;var d=u.content.cutByIndex(c,u.childCount),h=r&&r[l]||u;if(h!=u&&(d=d.replaceChild(0,h.type.create(h.attrs))),!u.canReplace(c+1,u.childCount)||!h.type.validContent(d))return!1}var p=o.indexAfter(i),f=r&&r[0];return o.node(i).canReplaceWith(p,p,f?f.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 l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(1==a)d=c.canReplace(u,u,o);else{var h=c.contentMatchAt(u).findWrapping(o.firstChild.type);d=h&&c.canReplaceWith(u,u,h[0])}if(d)return 0==l?r.pos:l<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,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);if(!s||!s.validEnd)return null;return a}(r,t);if(!i)return null;return o.map(M).concat({type:t,attrs:n}).concat(i.map(M))},t.insertPoint=b,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&&k(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||!y(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(163),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,l=0;l<this.ranges.length;l+=3){var u=this.ranges[l]-(this.inverted?r:0);if(u>e)break;var c=this.ranges[l+i],d=this.ranges[l+s],h=u+c;if(e<=h){var p=u+r+((c?e==u?-1:e==h?1:t:t)<0?0:d);if(n)return p;var f=e==(t<0?u:h)?null:l/3+(e-u)*o;return new a(p,t<0?e!=u:e!=h,f)}r+=d-c}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 l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;var u=this.ranges[s+o];if(e<=l+u&&s==3*r)return!0;n+=this.ranges[s+a]-u}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),l=this.ranges[r+t],u=this.ranges[r+n];e(a,a+l,s,s+u),o+=u-l}},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 l=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function u(e){var t=Error.call(this,e);return t.__proto__=u.prototype,t}t.Mapping=l,l.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new l(this.maps,this.mirror,e,t)},l.prototype.copy=function(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},l.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},l.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)}},l.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)]},l.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},l.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)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.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},l.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},l.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)},u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.name="TransformError";var c=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l};t.Transform=c;var d={before:{configurable:!0},docChanged:{configurable:!0}};function h(){throw new Error("Override me")}d.before.get=function(){return this.docs.length?this.docs[0]:this.doc},c.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new u(t.failed);return this},c.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},c.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(c.prototype,d);var p=Object.create(null),f=function(){};t.Step=f,f.prototype.apply=function(e){return h()},f.prototype.getMap=function(){return s.empty},f.prototype.invert=function(e){return h()},f.prototype.map=function(e){return h()},f.prototype.merge=function(e){return null},f.prototype.toJSON=function(){return h()},f.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)},f.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 _=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}(f);t.ReplaceStep=_,f.jsonID("replace",_);var g=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}(f);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 y(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function M(e){return{type:e,attrs:null}}function k(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function b(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=g,f.jsonID("replaceAround",g),c.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),l=a,u=s,c=r.Fragment.empty,d=0,h=i,p=!1;h>t;h--)p||n.index(h)>0?(p=!0,c=r.Fragment.from(n.node(h).copy(c)),d++):l--;for(var f=r.Fragment.empty,m=0,_=i,v=!1;_>t;_--)v||o.after(_+1)<o.end(_)?(v=!0,f=r.Fragment.from(o.node(_).copy(f)),m++):u++;return this.step(new g(l,u,a,s,new r.Slice(c.append(f),d,m),c.size-d,!0))},c.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 g(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},c.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),l=s.map(t,1),u=s.map(t+e.nodeSize,1);return i.step(new g(l,u,l+1,u-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},c.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 g(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},c.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,l=o.depth-t,u=t-1;s>l;s--,u--){i=r.Fragment.from(o.node(s).copy(i));var c=n&&n[u];a=r.Fragment.from(c?c.type.create(c.attrs,a):o.node(s).copy(a))}return this.step(new _(e,e,new r.Slice(i.append(a),t,t),!0))},c.prototype.join=function(e,t){void 0===t&&(t=1);var n=new _(e-t,e+t,r.Slice.empty,!0);return this.step(n)};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=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 T(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}(f);t.AddMarkStep=L,f.jsonID("addMark",L);var T=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 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:"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}(f);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 S(i,a,o)?new _(t,n,o):new D(i,a,o).fit()}function S(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}t.RemoveMarkStep=T,f.jsonID("removeMark",T),c.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,u){if(r.isInline){var c=r.marks;if(!n.isInSet(c)&&u.type.allowsMarkType(n.type)){for(var d=Math.max(l,e),h=Math.min(l+r.nodeSize,t),p=n.addToSet(c),f=0;f<c.length;f++)c[f].isInSet(p)||(a&&a.to==d&&a.mark.eq(c[f])?a.to=h:o.push(a=new T(d,h,c[f])));s&&s.to==d?s.to=h:i.push(s=new L(d,h,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},c.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 l=null;if(n instanceof r.MarkType)for(var u,c=o.marks;u=n.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c);else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length)for(var d=Math.min(s+o.nodeSize,t),h=0;h<l.length;h++){for(var p=l[h],f=void 0,m=0;m<i.length;m++){var _=i[m];_.step==a-1&&p.eq(i[m].style)&&(f=_)}f?(f.to=d,f.step=a):i.push({style:p,from:Math.max(s,e),to:d,step:a})}}})),i.forEach((function(e){return o.step(new T(e.from,e.to,e.style))})),this},c.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 l=o.child(s),u=a+l.nodeSize,c=n.matchType(l.type,l.attrs);if(c){n=c;for(var d=0;d<l.marks.length;d++)t.allowsMarkType(l.marks[d].type)||this.step(new T(a,u,l.marks[d]))}else i.push(new _(a,u,r.Slice.empty));a=u}if(!n.validEnd){var h=n.fillBefore(r.Fragment.empty,!0);this.replace(a,a,new r.Slice(h,0,0))}for(var p=i.length-1;p>=0;p--)this.step(i[p]);return this},c.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},c.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},c.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),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).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,l=i.depth;s&&l&&1==a.childCount;)a=a.firstChild.content,s--,l--;var u=new r.Slice(a,s,l);return t>-1?new g(o.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||o.pos!=this.$to.pos?new _(o.pos,i.pos,u):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,l=a.match,u=void 0,c=void 0;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:c};if(2==e&&o&&(u=l.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:u};if(n&&l.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 l=this.unplaced,u=o?o.content:l.content,c=l.openStart-t,d=0,h=[],p=this.frontier[n],f=p.match,m=p.type;if(i){for(var _=0;_<i.childCount;_++)h.push(i.child(_));f=f.matchFragment(i)}for(var g=u.size+t-(l.content.size-l.openEnd);d<u.childCount;){var v=u.child(d),y=f.matchType(v.type);if(!y)break;(++d>1||0==c||v.content.size)&&(f=y,h.push(E(v.mark(m.allowedMarks(v.marks)),1==d?c:0,d==u.childCount?g:-1)))}var M=d==u.childCount;M||(g=-1),this.placed=A(this.placed,n,r.Fragment.from(h)),this.frontier[n].match=f,M&&g<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var k=0,b=u;k<g;k++){var w=b.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),b=w.content}this.unplaced=M?0==t?r.Slice.empty:new r.Slice(C(l.content,t-1,1),t-1,g<0?l.openEnd:t-1):new r.Slice(C(l.content,t,d),l.openStart,l.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 l=this.frontier[s],u=l.match,c=j(e,s,l.type,u,!0);if(!c||c.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),c.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(S(o,i,n))return this.step(new _(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 l=o.depth,u=o.pos-1;l>0;l--,u--){var c=o.node(l).type.spec;if(c.defining||c.isolating)break;a.indexOf(l)>-1?s=l:o.before(l)==u&&a.splice(1,0,-l)}for(var d=a.indexOf(s),h=[],p=n.openStart,f=n.content,m=0;;m++){var g=f.firstChild;if(h.push(g),m==n.openStart)break;f=g.content}p>0&&h[p-1].type.spec.defining&&o.node(d).type!=h[p-1].type?p-=1:p>=2&&h[p-1].isTextblock&&h[p-2].type.spec.defining&&o.node(d).type!=h[p-2].type&&(p-=2);for(var v=n.openStart;v>=0;v--){var y=(v+p+1)%(n.openStart+1),M=h[y];if(M)for(var k=0;k<a.length;k++){var b=a[(k+d)%a.length],w=!0;b<0&&(w=!1,b=-b);var L=o.node(b-1),T=o.index(b-1);if(L.canReplaceWith(T,T,M.type,M.marks))return this.replace(o.before(b),w?i.after(b):t,new r.Slice(P(n.content,0,n.openStart,y),y,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},c.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=b(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.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 l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Highlight=S,t.Suggestions=N,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 r,o=n(164),i=n(188),a=(r=n(642))&&r.__esModule?r:{default:r},s=n(177),l=n(187),u=n(163),c=n(162),d=n(394),h=n(165),p=n(186),f=n(646);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(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 g(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),e}function v(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 M(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=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}let w=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block*",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleWrap)(e)}},{key:"keys",value:function({type:e}){return{"Ctrl->":(0,i.toggleWrap)(e)}}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^\s*>\s$/,e)]}}]),n}(o.Node);t.Blockquote=w;let L=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleList)(e,t.nodes.list_item)}},{key:"keys",value:function({type:e,schema:t}){return{"Shift-Ctrl-8":(0,i.toggleList)(e,t.nodes.list_item)}}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^\s*([-+*])\s$/,e)]}}]),n}(o.Node);t.BulletList=L;let T=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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:()=>["pre",["code",0]]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleBlockType)(e,t.nodes.paragraph)}},{key:"keys",value:function({type:e}){return{"Shift-Ctrl-\\":(0,i.setBlockType)(e)}}},{key:"inputRules",value:function({type:e}){return[(0,i.textblockTypeInputRule)(/^```$/,e)]}}]),n}(o.Node);function x({doc:e,name:t}){const n=[],r=(0,l.findBlockNodes)(e).filter(e=>e.node.type.name===t),o=e=>e.reduce((e,t)=>e.concat(Array.isArray(t)?o(t):t),[]);return r.forEach(e=>{let t=e.pos+1;const r=a.default.highlightAuto(e.node.textContent).value;o(function e(t,n=[]){return t.map(t=>{const r=[...n,...t.properties?t.properties.className:[]];return t.children?e(t.children,r):{text:t.value,classes:r}})}(r)).map(e=>{const n=t,r=n+e.text.length;return t=r,{...e,from:n,to:r}}).forEach(e=>{const t=s.Decoration.inline(e.from,e.to,{class:e.classes.join(" ")});n.push(t)})}),s.DecorationSet.create(e,n)}function S({name:e}){return new o.Plugin({name:new o.PluginKey("highlight"),state:{init:(t,{doc:n})=>x({doc:n,name:e}),apply:(t,n,r,o)=>{const i=r.selection.$head.parent.type.name,a=o.selection.$head.parent.type.name,s=(0,l.findBlockNodes)(r.doc).filter(t=>t.node.type.name===e),u=(0,l.findBlockNodes)(o.doc).filter(t=>t.node.type.name===e);return t.docChanged&&([i,a].includes(e)||u.length!==s.length)?x({doc:t.doc,name:e}):n.map(t.mapping,t.doc)}},props:{decorations(e){return this.getState(e)}}})}t.CodeBlock=T;let D=function(e){v(n,e);var t=M(n);function n(e={}){var r;m(this,n),r=t.call(this,e);try{Object.entries(r.options.languages).forEach(([e,t])=>{a.default.registerLanguage(e,t)})}catch(e){throw new Error("Invalid syntax highlight definitions: define at least one highlight.js language mapping")}return r}return g(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:()=>["pre",["code",0]]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleBlockType)(e,t.nodes.paragraph)}},{key:"keys",value:function({type:e}){return{"Shift-Ctrl-\\":(0,i.setBlockType)(e)}}},{key:"inputRules",value:function({type:e}){return[(0,i.textblockTypeInputRule)(/^```$/,e)]}},{key:"plugins",get:function(){return[S({name:this.name})]}}]),n}(o.Node);t.CodeBlockHighlight=D;let Y=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"hard_break"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}},{key:"commands",value:function({type:e}){return()=>(0,i.chainCommands)(i.exitCode,(t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0))}},{key:"keys",value:function({type:e}){const t=(0,i.chainCommands)(i.exitCode,(t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0));return{"Mod-Enter":t,"Shift-Enter":t}}}]),n}(o.Node);t.HardBreak=Y;let C=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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(e=>({tag:"h".concat(e),attrs:{level:e}})),toDOM:e=>["h".concat(e.attrs.level),0]}}},{key:"commands",value:function({type:e,schema:t}){return n=>(0,i.toggleBlockType)(e,t.nodes.paragraph,n)}},{key:"keys",value:function({type:e}){return this.options.levels.reduce((t,n)=>({...t,["Shift-Ctrl-".concat(n)]:(0,i.setBlockType)(e,{level:n})}),{})}},{key:"inputRules",value:function({type:e}){return this.options.levels.map(t=>(0,i.textblockTypeInputRule)(new RegExp("^(#{1,".concat(t,"})\\s$")),e,()=>({level:t})))}}]),n}(o.Node);t.Heading=C;let A=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"horizontal_rule"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]}}},{key:"commands",value:function({type:e}){return()=>(t,n)=>n(t.tr.replaceSelectionWith(e.create()))}},{key:"inputRules",value:function({type:e}){return[(0,i.nodeInputRule)(/^(?:---|___\s|\*\*\*\s)$/,e)]}}]),n}(o.Node);t.HorizontalRule=A;const O=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/;let E=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]}}},{key:"commands",value:function({type:e}){return t=>(n,r)=>{const{selection:o}=n,i=o.$cursor?o.$cursor.pos:o.$to.pos,a=e.create(t);r(n.tr.insert(i,a))}}},{key:"inputRules",value:function({type:e}){return[(0,i.nodeInputRule)(O,e,e=>{const[,t,n,r]=e;return{src:n,alt:t,title:r}})]}},{key:"plugins",get:function(){return[new o.Plugin({props:{handleDOMEvents:{drop(e,t){if(!(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length))return;const n=Array.from(t.dataTransfer.files).filter(e=>/image/i.test(e.type));if(0===n.length)return;t.preventDefault();const{schema:r}=e.state,o=e.posAtCoords({left:t.clientX,top:t.clientY});n.forEach(t=>{const n=new FileReader;n.onload=t=>{const n=r.nodes.image.create({src:t.target.result}),i=e.state.tr.insert(o.pos,n);e.dispatch(i)},n.readAsDataURL(t)})}}}})]}}]),n}(o.Node);t.Image=E;let j=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}},{key:"keys",value:function({type:e}){return{Enter:(0,i.splitListItem)(e),Tab:(0,i.sinkListItem)(e),"Shift-Tab":(0,i.liftListItem)(e)}}}]),n}(o.Node);function P({char:e="@",allowSpaces:t=!1,startOfLine:n=!1}){return r=>{if(r.depth<=0)return!1;const o="\\".concat(e),i=new RegExp("\\s".concat(o,"$")),a=n?"^":"",s=t?new RegExp("".concat(a).concat(o,".*?(?=\\s").concat(o,"|$)"),"gm"):new RegExp("".concat(a,"(?:^)?").concat(o,"[^\\s").concat(o,"]*"),"gm"),l=r.before(),u=r.end(),c=function(e,t,n,r,o,i="\0"){let a="",s=!0,l=null;return e.content.nodesBetween(t,n,(e,u)=>{if(e.isText){if(l)return void(l=null);a+=e.text.slice(Math.max(t,u)-u,n-u),s=!r}else e.isLeaf&&i?(a+=i,s=!r):e.isInline&&!e.isLeaf?(a+=o,e.textContent&&(a+=e.textContent,l=e),a+=o,s=!s):!s&&e.isBlock&&(a+=r,s=!0)},0),a}(r.doc,l,u,"\0","\0");let d,h=s.exec(c);for(;null!==h;){const n=h.input.slice(Math.max(0,h.index-1),h.index);if(/^[\s\0]?$/.test(n)){const n=h.index+r.start();let o=n+h[0].length;t&&i.test(c.slice(o-1,o+1))&&(h[0]+=" ",o+=1),n<r.pos&&o>=r.pos&&(d={range:{from:n,to:o},query:h[0].slice(e.length),text:h[0]})}h=s.exec(c)}return d}}function N({matcher:e={char:"@",allowSpaces:!1,startOfLine:!1},appendText:t=null,suggestionClass:n="suggestion",command:r=(()=>!1),items:o=[],onEnter:a=(()=>!1),onChange:l=(()=>!1),onExit:u=(()=>!1),onKeyDown:d=(()=>!1),onFilter:h=((e,t)=>t?e.filter(e=>JSON.stringify(e).toLowerCase().includes(t.toLowerCase())):e)}){return new c.Plugin({key:new c.PluginKey("suggestions"),view(){return{update:async(e,n)=>{const s=this.key.getState(n),c=this.key.getState(e.state),d=s.active&&c.active&&s.range.from!==c.range.from,p=!s.active&&c.active,f=s.active&&!c.active,m=p||d,_=!p&&!f&&s.query!==c.query&&!d,g=f||d;if(!m&&!_&&!g)return;const v=g?s:c,y=document.querySelector('[data-decoration-id="'.concat(v.decorationId,'"]')),M=y?{getBoundingClientRect:()=>y.getBoundingClientRect(),clientWidth:y.clientWidth,clientHeight:y.clientHeight}:null,k={view:e,range:v.range,query:v.query,text:v.text,decorationNode:y,virtualNode:M,items:_||m?await h(Array.isArray(o)?o:await o(),v.query):[],command:({range:n,attrs:o})=>{r({range:n,attrs:o,schema:e.state.schema})(e.state,e.dispatch,e),t&&(0,i.insertText)(t)(e.state,e.dispatch,e)}};g&&u(k),_&&l(k),m&&a(k)}}},state:{init:()=>({active:!1,range:{},query:null,text:null}),apply(t,n){const{selection:r}=t,o={...n};if(r.from===r.to){(r.from<n.range.from||r.from>n.range.to)&&(o.active=!1);const t=r.$from,i=P(e)(t),a=(Math.random()+1).toString(36).substr(2,5);i?(o.active=!0,o.decorationId=n.decorationId?n.decorationId:a,o.range=i.range,o.query=i.query,o.text=i.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(e,t){const{active:n,range:r}=this.getState(e.state);return!!n&&d({view:e,event:t,range:r})},decorations(e){const{active:t,range:r,decorationId:o}=this.getState(e);return t?s.DecorationSet.create(e.doc,[s.Decoration.inline(r.from,r.to,{nodeName:"span",class:n,"data-decoration-id":o})]):null}}})}t.ListItem=j;let H=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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 u.Fragment.fromJSON(e,[{type:"text",text:"".concat(this.options.matcher.char).concat(t)}])}},{key:"insertMention",value:function(e,t,n){const r=n.nodes[this.name],o=this.createFragment(n,t.label);return(0,i.replaceText)(e,r,t,o)}},{key:"schema",get:function(){return{attrs:{id:{},label:{}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:e=>["span",{class:this.options.mentionClass,"data-mention-id":e.attrs.id},"".concat(this.options.matcher.char).concat(e.attrs.label)],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.getAttribute("data-mention-id"),label:this.getLabel(e)}),getContent:(e,t)=>{const n=this.getLabel(e);return this.createFragment(t,n)}}]}}},{key:"commands",value:function({schema:e}){return t=>this.insertMention(null,t,e)}},{key:"plugins",get:function(){return[N({command:({range:e,attrs:t,schema:n})=>this.insertMention(e,t,n),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}(o.Node);t.Mention=H;let R=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleList)(e,t.nodes.list_item)}},{key:"keys",value:function({type:e,schema:t}){return{"Shift-Ctrl-9":(0,i.toggleList)(e,t.nodes.list_item)}}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^(\d+)\.\s$/,e,e=>({order:+e[1]}),(e,t)=>t.childCount+t.attrs.order===+e[1])]}}]),n}(o.Node);t.OrderedList=R;var F=(0,d.tableNodes)({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:e=>e.style.backgroundColor||null,setDOMAttr(e,t){if(e){const n={style:"".concat(t.style||"","background-color: ").concat(e,";")};Object.assign(t,n)}}}}});let I=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table"}},{key:"defaultOptions",get:function(){return{resizable:!1}}},{key:"schema",get:function(){return F.table}},{key:"commands",value:function({schema:e}){return{createTable:({rowsCount:t,colsCount:n,withHeaderRow:r})=>(o,i)=>{const a=o.tr.selection.anchor+1,s=(0,l.createTable)(e,t,n,r),u=o.tr.replaceSelectionWith(s).scrollIntoView(),d=u.doc.resolve(a);u.setSelection(c.TextSelection.near(d)),i(u)},addColumnBefore:()=>d.addColumnBefore,addColumnAfter:()=>d.addColumnAfter,deleteColumn:()=>d.deleteColumn,addRowBefore:()=>d.addRowBefore,addRowAfter:()=>d.addRowAfter,deleteRow:()=>d.deleteRow,deleteTable:()=>d.deleteTable,toggleCellMerge:()=>(e,t)=>{(0,d.mergeCells)(e,t)||(0,d.splitCell)(e,t)},mergeCells:()=>d.mergeCells,splitCell:()=>d.splitCell,toggleHeaderColumn:()=>d.toggleHeaderColumn,toggleHeaderRow:()=>d.toggleHeaderRow,toggleHeaderCell:()=>d.toggleHeaderCell,setCellAttr:({name:e,value:t})=>(0,d.setCellAttr)(e,t),fixTables:()=>d.fixTables}}},{key:"keys",value:function(){return{Tab:(0,d.goToNextCell)(1),"Shift-Tab":(0,d.goToNextCell)(-1)}}},{key:"plugins",get:function(){return[...this.options.resizable?[(0,d.columnResizing)()]:[],(0,d.tableEditing)()]}}]),n}(o.Node);t.Table=I;let z=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table_header"}},{key:"schema",get:function(){return F.table_header}}]),n}(o.Node);t.TableHeader=z;let $=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table_cell"}},{key:"schema",get:function(){return F.table_cell}}]),n}(o.Node);t.TableCell=$;let B=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table_row"}},{key:"schema",get:function(){return F.table_row}}]),n}(o.Node);t.TableRow=B;let W=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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(){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(){return{attrs:{done:{default:!1}},draggable:!0,content:this.options.nested?"(paragraph|todo_list)+":"paragraph+",toDOM:e=>{const{done:t}=e.attrs;return["li",{"data-type":this.name,"data-done":t.toString()},["span",{class:"todo-checkbox",contenteditable:"false"}],["div",{class:"todo-content"},0]]},parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]'),getAttrs:e=>({done:"true"===e.getAttribute("data-done")})}]}}},{key:"keys",value:function({type:e}){return{Enter:(0,i.splitToDefaultListItem)(e),Tab:this.options.nested?(0,i.sinkListItem)(e):()=>{},"Shift-Tab":(0,i.liftListItem)(e)}}}]),n}(o.Node);t.TodoItem=W;let q=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"todo_list"}},{key:"schema",get:function(){return{group:"block",content:"todo_item+",toDOM:()=>["ul",{"data-type":this.name},0],parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]')}]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleList)(e,t.nodes.todo_item)}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^\s*(\[ \])\s$/,e)]}}]),n}(o.Node);t.TodoList=q;let U=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"bold"}},{key:"schema",get:function(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]}}},{key:"keys",value:function({type:e}){return{"Mod-b":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,e)]}}]),n}(o.Mark);t.Bold=U;let V=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"code"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:()=>["code",0]}}},{key:"keys",value:function({type:e}){return{"Mod-`":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/(?:`)([^`]+)(?:`)$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/(?:`)([^`]+)(?:`)/g,e)]}}]),n}(o.Mark);t.Code=V;let J=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"italic"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}},{key:"keys",value:function({type:e}){return{"Mod-i":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/(?:^|[^_])(_([^_]+)_)$/,e),(0,i.markInputRule)(/(?:^|[^*])(\*([^*]+)\*)$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/_([^_]+)_/g,e),(0,i.markPasteRule)(/\*([^*]+)\*/g,e)]}}]),n}(o.Mark);t.Italic=J;let G=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"link"}},{key:"defaultOptions",get:function(){return{openOnClick:!0,target:null}}},{key:"schema",get:function(){return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target")})}],toDOM:e=>["a",{...e.attrs,rel:"noopener noreferrer nofollow",target:e.attrs.target||this.options.target},0]}}},{key:"commands",value:function({type:e}){return t=>t.href?(0,i.updateMark)(e,t):(0,i.removeMark)(e)}},{key:"pasteRules",value:function({type:e}){return[(0,i.pasteRule)(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,e,e=>({href:e}))]}},{key:"plugins",get:function(){return this.options.openOnClick?[new o.Plugin({props:{handleClick:(e,t,n)=>{const{schema:r}=e.state,o=(0,l.getMarkAttrs)(e.state,r.marks.link);o.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(o.href,o.target))}}})]:[]}}]),n}(o.Mark);t.Link=G;let K=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"strike"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e}],toDOM:()=>["s",0]}}},{key:"keys",value:function({type:e}){return{"Mod-d":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/~([^~]+)~$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/~([^~]+)~/g,e)]}}]),n}(o.Mark);t.Strike=K;let Z=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"underline"}},{key:"schema",get:function(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e}],toDOM:()=>["u",0]}}},{key:"keys",value:function({type:e}){return{"Mod-u":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}}]),n}(o.Mark);t.Underline=Z;let X=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"collaboration"}},{key:"init",value:function(){this.getSendableSteps=this.debounce(e=>{const t=(0,p.sendableSteps)(e);t&&this.options.onSendable({editor:this.editor,sendable:{version:t.version,steps:t.steps.map(e=>e.toJSON()),clientID:t.clientID}})},this.options.debounce),this.editor.on("transaction",({state:e})=>{this.getSendableSteps(e)})}},{key:"defaultOptions",get:function(){return{version:0,clientID:Math.floor(4294967295*Math.random()),debounce:250,onSendable:()=>{},update:({steps:e,version:t})=>{const{state:n,view:r,schema:o}=this.editor;(0,p.getVersion)(n)>t||r.dispatch((0,p.receiveTransaction)(n,e.map(e=>h.Step.fromJSON(o,e.step)),e.map(e=>e.clientID)))}}}},{key:"plugins",get:function(){return[(0,p.collab)({version:this.options.version,clientID:this.options.clientID})]}},{key:"debounce",value:function(e,t){let n;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null},t)}}}]),n}(o.Extension);t.Collaboration=X;let Q=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"focus"}},{key:"defaultOptions",get:function(){return{className:"has-focus",nested:!1}}},{key:"plugins",get:function(){return[new o.Plugin({props:{decorations:({doc:e,plugins:t,selection:n})=>{const r=t.find(e=>e.key.startsWith("editable$")).props.editable()&&this.options.className,{focused:o}=this.editor,{anchor:i}=n,a=[];return!(!r||!o)&&(e.descendants((e,t)=>{if(i>=t&&i<=t+e.nodeSize&&!e.isText){const n=s.Decoration.node(t,t+e.nodeSize,{class:this.options.className});a.push(n)}return this.options.nested}),s.DecorationSet.create(e,a))}}})]}}]),n}(o.Extension);t.Focus=Q;let ee=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"history"}},{key:"defaultOptions",get:function(){return{depth:"",newGroupDelay:""}}},{key:"keys",value:function(){return{"Mod-z":f.undo,"Mod-y":f.redo,"Shift-Mod-z":f.redo,"Mod-я":f.undo,"Shift-Mod-я":f.redo}}},{key:"plugins",get:function(){return[(0,f.history)({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}},{key:"commands",value:function(){return{undo:()=>f.undo,redo:()=>f.redo,undoDepth:()=>f.undoDepth,redoDepth:()=>f.redoDepth}}}]),n}(o.Extension);t.History=ee;let te=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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(){return[new o.Plugin({props:{decorations:({doc:e,plugins:t,selection:n})=>{const r=t.find(e=>e.key.startsWith("editable$")).props.editable()||!this.options.showOnlyWhenEditable,{anchor:o}=n,i=[],a=0===e.textContent.length;return!!r&&(e.descendants((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,r=0===e.content.size;if((n||!this.options.showOnlyCurrent)&&r){const n=[this.options.emptyNodeClass];a&&n.push(this.options.emptyEditorClass);const r=s.Decoration.node(t,t+e.nodeSize,{class:n.join(" "),"data-empty-text":"function"==typeof this.options.emptyNodeText?this.options.emptyNodeText(e):this.options.emptyNodeText});i.push(r)}return!1}),s.DecorationSet.create(e,i))}}})]}}]),n}(o.Extension);t.Placeholder=te;let ne=function(e){v(n,e);var t=M(n);function n(e={}){var r;return m(this,n),(r=t.call(this,e)).results=[],r.searchTerm=null,r._updating=!1,r}return g(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(){return{find:e=>this.find(e),replace:e=>this.replace(e),replaceAll:e=>this.replaceAll(e),clearSearch:()=>this.clear()}}},{key:"findRegExp",get:function(){return RegExp(this.searchTerm,this.options.caseSensitive?"gu":"gui")}},{key:"decorations",get:function(){return this.results.map(e=>s.Decoration.inline(e.from,e.to,{class:this.options.findClass}))}},{key:"_search",value:function(e){this.results=[];const t=[];let n=0;this.searchTerm&&(e.descendants((e,r)=>{e.isText?t[n]?t[n]={text:t[n].text+e.text,pos:t[n].pos}:t[n]={text:e.text,pos:r}:n+=1}),t.forEach(({text:e,pos:t})=>{const n=this.findRegExp;let r;for(;(r=n.exec(e))&&""!==r[0];)this.results.push({from:t+r.index,to:t+r.index+r[0].length})}))}},{key:"replace",value:function(e){return(t,n)=>{if(!this.results[0])return;const{from:r,to:o}=this.results[0];n(t.tr.insertText(e,r,o)),this.editor.commands.find(this.searchTerm)}}},{key:"rebaseNextResult",value:function(e,t,n=0){const r=t+1;if(!this.results[r])return null;const{from:o,to:i}=this.results[t],a=i-o-e.length+n,{from:s,to:l}=this.results[r];return this.results[r]={to:l-a,from:s-a},a}},{key:"replaceAll",value:function(e){return({tr:t},n)=>{let r;this.results.length&&(this.results.forEach(({from:n,to:o},i)=>{t.insertText(e,n,o),r=this.rebaseNextResult(e,i,r)}),n(t),this.editor.commands.find(this.searchTerm))}}},{key:"find",value:function(e){return(t,n)=>{this.searchTerm=this.options.disableRegex?e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"):e,this.updateView(t,n)}}},{key:"clear",value:function(){return(e,t)=>{this.searchTerm=null,this.updateView(e,t)}}},{key:"updateView",value:function({tr:e},t){this._updating=!0,t(e),this._updating=!1}},{key:"createDeco",value:function(e){return this._search(e),this.decorations?s.DecorationSet.create(e,this.decorations):[]}},{key:"plugins",get:function(){return[new o.Plugin({state:{init:()=>s.DecorationSet.empty,apply:(e,t)=>this._updating||this.options.searching||e.docChanged&&this.options.alwaysSearch?this.createDeco(e.doc):e.docChanged?t.map(e.mapping,e.doc):t},props:{decorations(e){return this.getState(e)}}})]}}]),n}(o.Extension);t.Search=ne;let re=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"trailing_node"}},{key:"defaultOptions",get:function(){return{node:"paragraph",notAfter:["paragraph"]}}},{key:"plugins",get:function(){const e=new o.PluginKey(this.name),t=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>this.options.notAfter.includes(e.name));return[new o.Plugin({key:e,view:()=>({update:t=>{const{state:n}=t;if(!e.getState(n))return;const{doc:r,schema:o,tr:i}=n,a=o.nodes[this.options.node],s=i.insert(r.content.size,a.create());t.dispatch(s)}}),state:{init:(e,n)=>{const r=n.tr.doc.lastChild;return!(0,l.nodeEqualsType)({node:r,types:t})},apply:(e,n)=>{if(!e.docChanged)return n;const r=e.doc.lastChild;return!(0,l.nodeEqualsType)({node:r,types:t})}}})]}}]),n}(o.Extension);t.TrailingNode=re},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__endComposition=_t,t.__parseFromClipboard=ze,t.__serializeForClipboard=Ie,t.EditorView=t.DecorationSet=t.Decoration=void 0;var r=n(162),o=n(163),i=n(165),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),l=/MSIE \d/.test(navigator.userAgent),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var c=a.ie=!!(l||u||s);a.ie_version=l?document.documentMode||6:u?+u[1]:s?+s[1]:null,a.gecko=!c&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!c&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!d,a.chrome_version=d&&+d[1],a.safari=!c&&/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 h=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},p=function(e){var t=e.parentNode;return t&&11==t.nodeType?t.host:t},f=null,m=function(e,t,n){var r=f||(f=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},_=function(e,t,n,r){return n&&(v(e,t,n,r,-1)||v(e,t,n,r,1))},g=/^(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:y(e))){var i=e.parentNode;if(1!=i.nodeType||M(e)||g.test(e.nodeName)||"false"==e.contentEditable)return!1;t=h(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?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function M(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 k=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function b(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 L(e,t){return"number"==typeof e?e:e[t]}function T(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,l=s?w(i):T(a),u=0,c=0;if(t.top<l.top+L(r,"top")?c=-(l.top-t.top+L(o,"top")):t.bottom>l.bottom-L(r,"bottom")&&(c=t.bottom-l.bottom+L(o,"bottom")),t.left<l.left+L(r,"left")?u=-(l.left-t.left+L(o,"left")):t.right>l.right-L(r,"right")&&(u=t.right-l.right+L(o,"right")),u||c)if(s)i.defaultView.scrollBy(u,c);else{var d=a.scrollLeft,h=a.scrollTop;c&&(a.scrollTop+=c),u&&(a.scrollLeft+=u);var f=a.scrollLeft-d,m=a.scrollTop-h;t={left:t.left-f,top:t.top-m,right:t.right-f,bottom:t.bottom-m}}if(s)break}}function S(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,l=e.firstChild,u=0;l;l=l.nextSibling,u++){var c=void 0;if(1==l.nodeType)c=l.getClientRects();else{if(3!=l.nodeType)continue;c=m(l).getClientRects()}for(var d=0;d<c.length;d++){var h=c[d];if(h.top<=a&&h.bottom>=s){a=Math.max(h.bottom,a),s=Math.min(h.top,s);var p=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(p<o){n=l,o=p,r=p&&3==n.nodeType?{left:h.right<t.left?h.right:h.left,top:t.top}:t,1==l.nodeType&&p&&(i=u+(t.left>=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=u+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 l=s.caretPositionFromPoint(t.left,t.top);l&&(o=(n=l).offsetNode,i=n.offset)}catch(e){}if(!o&&s.caretRangeFromPoint){var u=s.caretRangeFromPoint(t.left,t.top);u&&(o=(r=u).startContainer,i=r.startOffset)}var c,d=s.elementFromPoint(t.left,t.top+1);if(!d||!e.dom.contains(1!=d.nodeType?d.parentNode:d)){var h=e.dom.getBoundingClientRect();if(!A(t,h))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 l=s.getClientRects(),u=0;u<l.length;u++){var c=l[u];if(A(n,c))return e(s,n,c)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,h)))return null}if(a.safari&&d.draggable&&(o=i=null),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 p,f=o.childNodes[i];"IMG"==f.nodeName&&(p=f.getBoundingClientRect()).right<=t.left&&p.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(c=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==c&&(c=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 m=e.docView.nearestDesc(d,!0);return{pos:c,inside:m?m.posAtStart-m.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 l=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(l--,c=1):n<0?l--:u++,N(E(m(o,l,u),c),c<0)}var d=E(m(o,i,i),n);if(a.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var h=E(m(o,i-1,i-1),-1);if(h.top==d.top){var p=E(m(o,i,i+1),-1);if(p.top!=d.top)return N(p,p.left<h.left)}}return d}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==y(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return H(f.getBoundingClientRect(),!1)}if(i<y(o)){var _=o.childNodes[i];if(1==_.nodeType)return H(_.getBoundingClientRect(),!0)}return H(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==y(o))){var g=o.childNodes[i-1],v=3==g.nodeType?m(g,y(g)-(s?0:1)):1!=g.nodeType||"BR"==g.nodeName&&g.nextSibling?null:g;if(v)return N(E(v,1),!1)}if(i<y(o)){var M=o.childNodes[i],k=3==M.nodeType?m(M,0,s?0:1):1==M.nodeType?M:null;if(k)return N(E(k,-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 F=/[\u0590-\u08ac]/;var I=null,z=null,$=!1;function B(e,t,n){return I==t&&z==n?$:(I=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 l=0;l<s.length;l++){var u=s[l];if(u.bottom>u.top&&("up"==n?u.bottom<i.top+1:u.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 F.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 l=!(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),l})):"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},q={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(){return!1},q.beforePosition.get=function(){return!1},W.prototype.parseRule=function(){return null},W.prototype.stopEvent=function(){return!1},q.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},q.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}},q.posBefore.get=function(){return this.parent.posBeforeChild(this)},q.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},q.posAfter.get=function(){return this.posBefore+this.size},q.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>h(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 l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.parentNode.firstChild!=l)break}if(null==s&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!0;break}if(u.parentNode.lastChild!=u)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?h(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],l=i+s.size;if(-1==r&&e<=l){var u=i+s.border;if(e>=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var d=this.children[c-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=h(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var p=a+1;p<this.children.length;p++){var f=this.children[p];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=h(f.dom);break}t+=f.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}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,l=0;s<this.children.length;s++){var u=this.children[s],c=l+u.size;if(o>l&&i<c)return u.setSelection(e-l-u.border,t-l-u.border,n,r);l=c}var d=this.domFromPos(e,e?-1:1),p=t==e?d:this.domFromPos(t,t?-1:1),f=n.getSelection(),m=!1;if((a.gecko||a.safari)&&e==t){var g=d.node,v=d.offset;if(3==g.nodeType)(m=v&&"\n"==g.nodeValue[v-1])&&v==g.nodeValue.length&&g.nextSibling&&"BR"==g.nextSibling.nodeName&&(d=p={node:g.parentNode,offset:h(g)+1});else{var y=g.childNodes[v-1];m=y&&("BR"==y.nodeName||"false"==y.contentEditable)}}if(r||m&&a.safari||!_(d.node,d.offset,f.anchorNode,f.anchorOffset)||!_(p.node,p.offset,f.focusNode,f.focusOffset)){var M=!1;if((f.extend||e==t)&&!m){f.collapse(d.node,d.offset);try{e!=t&&f.extend(p.node,p.offset),M=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!M){if(e>t){var k=d;d=p,p=k}var b=document.createRange();b.setEnd(p.node,p.offset),b.setStart(d.node,d.offset),f.removeAllRanges(),f.addRange(b)}}},W.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},q.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=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)}},q.domAtom.get=function(){return!1},Object.defineProperties(W.prototype,q);var U=[],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,U,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,U,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,l,u){e.call(this,t,n.isLeaf?U:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(l,u)}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 l,u,c=a.nodeViews[n.type.name],d=c&&c(n,a,(function(){return u?u.parent?u.parent.posBeforeChild(u):void 0:s}),r,i),h=d&&d.dom,p=d&&d.contentDOM;if(n.isText)if(h){if(3!=h.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else h=document.createTextNode(n.text);else h||(h=(l=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=l.contentDOM);p||n.isText||"BR"==h.nodeName||(h.hasAttribute("contenteditable")||(h.contentEditable=!1),n.type.spec.draggable&&(h.draggable=!0));var f=h;return h=ae(h,r,n),d?u=new ee(e,n,r,i,h,p,f,d,a,s+1):n.isText?new X(e,n,r,i,h,f,a):new t(e,n,r,i,h,p,f,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=r&&e.composing&&this.localCompositionNode(e,t),l=new ue(this,s&&s.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 l=0,u=[],c=null,d=0;;){if(l<o.length&&o[l].to==i){for(var h=o[l++],p=void 0;l<o.length&&o[l].to==i;)(p||(p=[h])).push(o[l++]);if(p){p.sort(ce);for(var f=0;f<p.length;f++)n(p[f],d,!!c)}else n(h,d,!!c)}var m=void 0,_=void 0;if(c)_=-1,m=c,c=null;else{if(!(d<e.childCount))break;_=d,m=e.child(d++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)u.push(o[l++]);var v=i+m.nodeSize;if(m.isText){var y=v;l<o.length&&o[l].from<y&&(y=o[l].from);for(var M=0;M<u.length;M++)u[M].to<y&&(y=u[M].to);y<v&&(c=m.cut(y-i),m=m.cut(0,y-i),v=y,_=-1)}var k=u.length?m.isInline&&!m.isLeaf?u.filter((function(e){return!e.inline})):u.slice():U;r(m,k,t.forChild(i,m),_),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){l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,o,a)||l.updateNextNode(t,n,o,e,a)||l.addNode(t,n,o,e,i),i+=t.nodeSize})),l.syncToMarks(U,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;a<n.length;a++){var s=n[a],l=s.dom;if(l.parentNode==t){for(;l!=o;)o=le(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(s instanceof G){var u=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=u?u.nextSibling:t.firstChild}}for(;o;)o=le(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.localCompositionNode=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=y(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)){var l=s.nodeValue,u=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 l=a.text;o<e.childCount;){var u=e.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){var c=l.lastIndexOf(t,r-s);if(c>=0&&c+t.length+s>=n)return s+c}}}return-1}(this.node.content,l,o-t,i-t);return u<0?null:{node:s,pos:u,text:l}}}},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)},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(){return 0==this.dirty},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,l,u,c){e.call(this,t,n,r,o,i,a,s,u,c),this.spec=l}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 l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new te(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}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 l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.tagName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=ne[0]),o=l}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):U,a=n.class?n.class.split(" ").filter(Boolean):U,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l])}if(t.style!=n.style){if(t.style)for(var u,c=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=c.exec(t.style);)e.style.removeProperty(u[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 le(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var ue=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 ce(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 l=e[a],u=s,c=s+=l.size;u>=n||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,r)),o&&(i.push(o),o=null),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function he(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 l,u,c=o.resolve(s);if(k(n)){for(l=c;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==y(e);r||o;){if(e==n)return!0;var i=h(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==y(e)}}(n.focusNode,n.focusOffset,i.dom))){var d=i.posBefore;u=new r.NodeSelection(s==d?c:o.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;l=o.resolve(p)}u||(u=ke(e,l,c,"pointer"==t||e.state.selection.head<c.pos&&!a?1:-1));return u}function pe(e){return e.editable?e.hasFocus():be(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function fe(e,t){var n=e.state.selection;if(ye(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,h(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,l=n.head;!me||n instanceof r.TextSelection||(n.$from.parent.inlineContent||(o=_e(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=_e(e,n.to))),e.docView.setSelection(s,l,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()}}ue.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}},ue.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ue.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 l=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}},ue.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,l=Math.min(o.length,s+1);s<l;s++){var u=o[s];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},ue.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 l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.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!=l&&(this.changed=!0),this.index++,!0;break}}return!1},ue.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},ue.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++},ue.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof G;)e=e.children[e.children.length-1];if(!e||!(e instanceof X)||/\n$/.test(e.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var t=document.createElement("br");this.top.children.splice(this.index++,0,new Q(this.top,U,t,null)),this.changed=!0}};var me=a.safari||a.chrome&&a.chrome_version<63;function _e(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 ge(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return ge(i);if(s)return ge(s)}}function ge(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 ye(e,t){if(t instanceof r.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Me(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Me(e)}function Me(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function ke(e,t,n,o){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||r.TextSelection.between(t,n,o)}function be(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 Le(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Te(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return Le(e,new r.TextSelection(t>0?o.$to:o.$from));var i=we(e.state,t);return!!i&&Le(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)&&Le(e,s)}if(!(a.mac&&n.indexOf("m")>-1)){var l,u=o.$head,c=u.textOffset?null:t<0?u.nodeBefore:u.nodeAfter;if(!c||c.isText)return!1;var d=t<0?u.pos-c.nodeSize:u.pos;return!!(c.isAtom||(l=e.docView.descAt(d))&&!l.contentDOM)&&(r.NodeSelection.isSelectable(c)?Le(e,new r.NodeSelection(t<0?e.state.doc.resolve(u.pos-c.nodeSize):u)):!!a.webkit&&Le(e,new r.TextSelection(e.state.doc.resolve(t<0?d:d+c.nodeSize))))}}function xe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Se(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)&&Se(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;var l=n.childNodes[r-1];if(Se(l))o=n,i=--r;else{if(3!=l.nodeType)break;r=(n=l).nodeValue.length}}else{if(Ce(n))break;for(var u=n.previousSibling;u&&Se(u);)o=n.parentNode,i=h(u),u=u.previousSibling;if(u)r=xe(n=u);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(!Se(n.childNodes[r]))break;o=n,i=++r}else{if(Ce(n))break;for(var s=n.nextSibling;s&&Se(s);)o=s.parentNode,i=h(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(k(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&&fe(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 l=we(e.state,t);if(l&&l instanceof r.NodeSelection)return Le(e,l)}if(!i.parent.inlineContent){var u=t<0?i:s,c=o instanceof r.AllSelection?r.Selection.near(u,t):r.Selection.findFrom(u,t);return!!c&&Le(e,c)}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 l=e.state.tr;return t<0?l.delete(o.pos-s.nodeSize,o.pos):l.delete(o.pos,o.pos+s.nodeSize),e.dispatch(l),!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?Te(e,-1,r)||De(e):39==n?Te(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 l=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,u=he(e,l);if(u&&!e.state.selection.eq(u)){var c=e.state.tr.setSelection(u);"pointer"==l?c.setMeta("pointer",!0):"key"==l&&c.scrollIntoView(),e.dispatch(c)}}else{var d=e.state.doc.resolve(t),h=d.sharedDepth(n);t=d.before(h+1),n=e.state.doc.resolve(n).after(h+1);var p=e.state.selection,f=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,l=r.toOffset,u=r.from,c=r.to,d=e.root.getSelection(),h=null,p=d.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(h=[{node:p,offset:d.anchorOffset}],k(d)||h.push({node:d.focusNode,offset:d.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var f=l;f>s;f--){var m=i.childNodes[f-1],_=m.pmViewDesc;if("BR"==m.nodeType&&!_){l=f;break}if(!_||_.size)break}var g=e.state.doc,v=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),y=g.resolve(u),M=null,b=v.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:s,to:l,preserveWhitespace:!y.parent.type.spec.code||"full",editableContent:!0,findPositions:h,ruleFromNode:Ne,context:y});if(h&&null!=h[0].pos){var w=h[0].pos,L=h[1]&&h[1].pos;null==L&&(L=w),M={anchor:w+u,head:L+u}}return{doc:b,sel:M,from:u,to:c}}(e,t,n);if(a.chrome&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from){var m=e.cursorWrapper.deco.type.toDOM.nextSibling,_=m&&m.nodeValue?m.nodeValue.length:1;f.sel={anchor:f.sel.anchor+_,head:f.sel.anchor+_}}var g,v,y=e.state.doc,M=y.slice(f.from,f.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(g=e.state.selection.to,v="end"):(g=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,l=a.b;if("end"==o){var u=Math.max(0,i-Math.min(s,l));r-=s+u-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(M.content,f.doc.content,f.from,g,v);if(!w){if(!(i&&p instanceof r.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.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,b(13,"Enter"))})))return void(e.lastIOSEnter=0);if(f.sel){var L=Re(e,e.state.doc,f.sel);L&&!L.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(L))}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>f.from&&"  "==f.doc.textBetween(w.start-f.from-1,w.start-f.from+1)&&(w.start--,w.endA--,w.endB--);var T,x=f.doc.resolveNoCache(w.start-f.from),S=f.doc.resolveNoCache(w.endB-f.from),D=x.sameParent(S)&&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<f.doc.content.size&&(T=r.Selection.findFrom(f.doc.resolve(x.pos+1),1,!0))&&T.head==S.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,b(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||Fe(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(Fe(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Fe(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,x,S)&&e.someProp("handleKeyDown",(function(t){return t(e,b(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()!=S.start()&&0==S.parentOffset&&x.depth==S.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==w.endA&&(w.endB-=2,S=f.doc.resolveNoCache(w.endB-f.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,b(13,"Enter"))}))}),20));var Y,C,A,O,E=w.start,j=w.endA;if(D)if(x.pos==S.pos)a.ie&&a.ie_version<=11&&0==x.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return fe(e)}),20)),Y=e.state.tr.delete(E,j),C=y.resolve(w.start).marksAcross(y.resolve(w.endA));else if(w.endA==w.endB&&(O=y.resolve(w.start))&&(A=function(e,t){for(var n,r,i,a=e.firstChild.marks,s=t.firstChild.marks,l=a,u=s,c=0;c<s.length;c++)l=s[c].removeFromSet(l);for(var d=0;d<a.length;d++)u=a[d].removeFromSet(u);if(1==l.length&&0==u.length)r=l[0],n="add",i=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=l.length||1!=u.length)return null;r=u[0],n="remove",i=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var h=[],p=0;p<t.childCount;p++)h.push(i(t.child(p)));if(o.Fragment.from(h).eq(e))return{mark:r,type:n}}(x.parent.content.cut(x.parentOffset,S.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()==S.index()-(S.textOffset?0:1)){var P=x.parent.textBetween(x.parentOffset,S.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,f.doc.slice(w.start-f.from,w.endB-f.from))),f.sel){var N=Re(e,Y.doc,f.sel);N&&!(a.chrome&&a.android&&e.composing&&N.empty&&(w.from!=w.toB||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:ke(e,t.resolve(n.anchor),t.resolve(n.head))}function Fe(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 Ie(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 l=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),u=Ue(),c=u.createElement("div");c.appendChild(l.serializeFragment(r,{document:u}));for(var d,h=c.firstChild;h&&1==h.nodeType&&(d=We[h.nodeName.toLowerCase()]);){for(var p=d.length-1;p>=0;p--){for(var f=u.createElement(d[p]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f)}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:c,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 a,s,l=i.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||l||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t,l||r)})),l)return new o.Slice(o.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0);var c=e.someProp("clipboardTextParser",(function(e){return e(t,i,r)}));c?s=c:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Ue().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);var d=a&&a.querySelector("[data-pm-slice]"),h=d&&/^(\d+) (\d+) (.*)/.exec(d.getAttribute("data-pm-slice"));if(!s){var p=e.someProp("clipboardParser")||e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema);s=p.parseSlice(a,{preserveWhitespace:!(!u&&!h),context:i})}return s=h?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,l=n.length-2;l>=0;l-=2){var u=r.nodes[n[l]];if(!u||u.hasRequiredAttrs())break;i=o.Fragment.from(u.create(n[l+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}(s,+h[1],+h[2]),h[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}(s.content,i),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}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,l=s.content;return i<r-1&&(l=Be(l,t,n,r,i+1,a)),i>=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}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"]},qe=null;function Ue(){return qe||(qe=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)&&be(e)){var e;if(this.suppressingSelectionUpdates)return fe(this.view);if(a.ie&&a.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&_(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)&&be(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var l=0;l<e.length;l++){var u=this.registerMutation(e[l],s);u&&(r=r<0?u.from:Math.min(u.from,r),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(i=!0))}if(a.gecko&&s.length>1){var c=s.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.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)||fe(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 l=e.addedNodes[s],u=l.previousSibling,c=l.nextSibling;(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(o=u),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var d=o&&o.parentNode==e.target?h(o)+1:0,p=n.localPosFromDOM(e.target,d,-1),f=i&&i.parentNode==e.target?h(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,f,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 l=a(s);if(l)return l.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 l=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(l)){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 lt(e,t,n,o){return ot(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(it(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)it(e,r.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;it(e,r.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function ut(e){return _t(e)}Qe.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!ht(e,t))if(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,b(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Qe.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Qe.keypress=function(e,t){if(!(ht(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 ct=a.mac?"metaKey":"ctrlKey";Xe.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ut(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[ct]&&("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=new dt(e,i,t,n):("doubleClick"==o?st:lt)(e,i.pos,i.inside,t)?t.preventDefault():et(e,"pointer"))};var dt=function(e,t,n,o){var i,s,l=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[ct],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var u=e.state.doc.resolve(t.pos);i=u.parent,s=u.depth?u.before():0}this.mightDrag=null;var c=o?null:n.target,d=c?e.docView.nearestDesc(c,!0):null;this.target=d?d.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&s==e.state.selection.from)&&(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(){return l.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 ht(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():this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&(t.pos==this.view.state.selection.from||t.pos==this.view.state.selection.to)?(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")},Xe.touchdown=function(e){ut(e),et(e,"pointer")},Xe.contextmenu=function(e){return ut(e)};var pt=a.android?5e3:-1;function ft(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return _t(e)}),t))}function mt(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function _t(e,t){if(e.domObserver.forceFlush(),mt(e),t||e.docView.dirty){var n=he(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(),_t(e,!0),e.markCursor=null;else if(_t(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}ft(e,pt)},Qe.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ft(e,20))};var gt=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=gt?null:t.clipboardData,i=Ie(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=gt?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 yt=function(e,t){this.slice=e,this.move=t},Mt=a.mac?"altKey":"ctrlKey";for(var kt 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);if(!a||!a.node.type.spec.draggable||a==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=Ie(e,s),u=l.dom,c=l.text;t.dataTransfer.clearData(),t.dataTransfer.setData(gt?"Text":"text/html",u.innerHTML),gt||t.dataTransfer.setData("text/plain",c),e.dragging=new yt(s,!t[Mt])}},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 l=n&&n.slice||ze(e,t.dataTransfer.getData(gt?"Text":"text/plain"),gt?null:t.dataTransfer.getData("text/html"),!1,s),u=n&&!t[Mt];if(e.someProp("handleDrop",(function(n){return n(e,t,l||o.Slice.empty,u)})))t.preventDefault();else if(l){t.preventDefault();var c=l?(0,i.dropPoint)(e.state.doc,s.pos,l):s.pos;null==c&&(c=s.pos);var d=e.state.tr;u&&d.deleteSelection();var h=d.mapping.map(c),p=0==l.openStart&&0==l.openEnd&&1==l.content.childCount,f=d.doc;if(p?d.replaceRangeWith(h,h,l.content.firstChild):d.replaceRange(h,h,l),!d.doc.eq(f)){var m=d.doc.resolve(h);if(p&&r.NodeSelection.isSelectable(l.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(l.content.firstChild))d.setSelection(new r.NodeSelection(m));else{var _=d.mapping.map(c);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,r){return _=r})),d.setSelection(ke(e,m,d.doc.resolve(_)))}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())&&fe(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,b(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[kt]=Qe[kt];function bt(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&&bt(this.spec,e.spec))};var Lt=function(e,t){this.spec=t||Yt,this.attrs=e};Lt.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)},Lt.prototype.valid=function(e,t){return t.from<t.to},Lt.prototype.eq=function(e){return this==e||e instanceof Lt&&bt(this.attrs,e.attrs)&&bt(this.spec,e.spec)},Lt.is=function(e){return e.type instanceof Lt};var Tt=function(e,t){this.spec=t||Yt,this.attrs=e};Tt.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)},Tt.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},Tt.prototype.eq=function(e){return this==e||e instanceof Tt&&bt(this.attrs,e.attrs)&&bt(this.spec,e.spec)};var xt=function(e,t,n){this.from=e,this.to=t,this.type=n};t.Decoration=xt;var St={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 Lt(n,r))},xt.node=function(e,t,n,r){return new xt(e,t,new Tt(n,r))},St.spec.get=function(){return this.type.spec},St.inline.get=function(){return this.type instanceof Lt},Object.defineProperties(xt.prototype,St);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 l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,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(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;-1==l||e>l+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u))}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(-1==s[d+1]){var h=n.map(e[d]+i),p=h-o;if(p<0||p>=r.content.size){c=!0;continue}var f=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),_=m.index,g=m.offset,v=r.maybeChild(_);if(v&&g==p&&g+v.nodeSize==f){var y=s[d+2].mapInner(n,v,h+1,e[d]+i+1,a);y!=At?(s[d]=p,s[d+1]=f,s[d+2]=y):(s[d+1]=-2,c=!0)}else c=!0}if(c){var M=Nt(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t||[],n,o,i,a),r,0,a);t=M.local;for(var k=0;k<s.length;k+=3)s[k+1]<0&&(s.splice(k,3),k-=3);for(var b=0,w=0;b<M.children.length;b+=3){for(var L=M.children[b];w<s.length&&s[w]<L;)w+=3;s.splice(w,0,M.children[b],M.children[b+1],M.children[b+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,l=a+n;if(s=jt(t,e,l)){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,l+1):r.splice(i,0,a,a+e.nodeSize,Nt(s,e,l+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,l=0,u=void 0;l<e.length;l++)(u=e[l])&&u.from>a&&u.to<s&&(e[l]=null,(i||(i=[])).push(u));if(i){n==this.children&&(n=this.children.slice());var c=n[o+2].removeInner(i,a+1);c!=At?n[o+2]=c:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,h=void 0;d<e.length;d++)if(h=e[d])for(var p=0;p<r.length;p++)r[p].eq(h,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 l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof Lt){var u=Math.max(i,l.from)-i,c=Math.min(a,l.to)-i;u<c&&(r||(r=[])).push(l.copy(u,c))}}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(Lt.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Lt||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 l=Nt(s,t,n+a+1,r);l!=At&&o.push(a,a+t.nodeSize,l)}}));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),Ft(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),Ft(t,o+1,i.copy(r.to,i.to)))}}return t}function Ft(e,t,n){for(;t<e.length&&Ht(n,e[t])>0;)t++;e.splice(t,0,n)}function It(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=qt(this),this.markCursor=null,this.cursorWrapper=null,Wt(this),this.nodeViews=Ut(this),this.docView=Z(this.state.doc,Bt(this),It(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 qt(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function Ut(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 l=Ut(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})(l,this.nodeViews)&&(this.nodeViews=l,i=!0),tt(this)}this.editable=qt(this),Wt(this);var u=It(this),c=Bt(this),d=t?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,c,u);!h&&e.selection.eq(o.selection)||(s=!0);var p,f,m,g,v,y,M,k,b,w,L,T="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 l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:S(e.dom)}}(this);if(s){this.domObserver.stop();var Y=h&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(g=o.selection,v=e.selection,y=Math.min(g.$anchor.sharedDepth(g.head),v.$anchor.sharedDepth(v.head)),g.$anchor.start(y)!=v.$anchor.start(y));if(h){var C=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,c,u,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Z(e.doc,c,u,this.dom,this)),C&&!this.trackWrites&&(Y=!0)}Y||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,f=p.docView.domFromPos(p.state.selection.anchor,0),m=p.root.getSelection(),_(f.node,f.offset,m.anchorNode,m.anchorOffset)))?fe(this,Y):(ye(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 T&&(k=(M=T).refDOM,b=M.refTop,w=M.stack,L=k?k.getBoundingClientRect().top:0,D(w,0==L?0:L-b))},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=S(e);e.focus(null==Y?{get preventScroll(){return Y={preventScroll:!0},!0}}:void 0),Y||(Y=!1,D(t,0))}(this.dom),fe(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,[],It(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";window,e.exports=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"==typeof 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," */"),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[n].concat(l).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 l=[].concat(e[s]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},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],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var d=a(c),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(i[d].references++,i[d].updater(h)):i.push({identifier:c,updater:m(h,t),references:1}),r.push(c)}return r}function l(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 u,c=(u=[],function(e,t){return u[e]=t,u.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=c(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 h(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,f=0;function m(e,t){var n,r,o;if(t.singleton){var i=f++;n=p||(p=l(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=l(t),r=h.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 l=s(e,t),u=0;u<n.length;u++){var c=a(n[u]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}n=l}}}},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,
+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)}}(u=e)}d.state.get=function(){return this._vm._data.$$state},d.state.set=function(e){0},c.prototype.commit=function(e,t,n){var r=this,o=g(e,t,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),l=this._mutations[i];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},c.prototype.dispatch=function(e,t){var n=this,r=g(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 l=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);return new Promise((function(e,t){l.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)}))}))}},c.prototype.subscribe=function(e,t){return h(e,this._subscribers,t)},c.prototype.subscribeAction=function(e,t){return h("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},c.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},c.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},c.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),m(this,this.state,e,this._modules.get(e),n.preserveState),f(this,this.state)},c.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));u.delete(n,e[e.length-1])})),p(this)},c.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},c.prototype.hotUpdate=function(e){this._modules.update(e),p(this,!0)},c.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(c.prototype,d);var y=T((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=x(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=y;var M=T((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=x(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=T((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||x(this.$store,"mapGetters",e))return this.$store.getters[o]},n[r].vuex=!0})),n}));t.mapGetters=k;var b=T((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=x(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=b;var w=function(e){return{mapState:y.bind(null,e),mapGetters:k.bind(null,e),mapMutations:M.bind(null,e),mapActions:b.bind(null,e)}};function L(e){return function(e){return Array.isArray(e)||i(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 T(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function x(e,t,n){return e._modulesNamespaceMap[n]}function S(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 o=e.transformer;void 0===o&&(o=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 l=e.logMutations;void 0===l&&(l=!0);var u=e.logActions;void 0===u&&(u=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=r(e.state);void 0!==c&&(l&&e.subscribe((function(e,a){var s=r(a);if(n(e,d,s)){var l=C(),u=i(e),h="mutation "+e.type+l;D(c,h,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",o(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",u),c.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),Y(c)}d=s})),u&&e.subscribeAction((function(e,n){if(a(e,n)){var r=C(),o=s(e),i="action "+e.type+r;D(c,i,t),c.log("%c action","color: #03A9F4; font-weight: bold",o),Y(c)}})))}}function D(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch(n){e.log(t)}}function Y(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function C(){var e=new Date;return" @ "+A(e.getHours(),2)+":"+A(e.getMinutes(),2)+":"+A(e.getSeconds(),2)+"."+A(e.getMilliseconds(),3)}function A(e,t){return n="0",r=t-e.toString().length,new Array(r+1).join(n)+e;var n,r}t.createNamespacedHelpers=w;var O={Store:c,install:v,version:"3.6.2",mapState:y,mapMutations:M,mapGetters:k,mapActions:b,createNamespacedHelpers:w,createLogger:S};t.default=O}).call(this,n(5))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(23))&&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";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(115))&&r.__esModule?r:{default:r},i=n(92);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 l=s;t.default=l},,,,,function(e,t,n){"use strict";var r=n(13),o=n(105),i=n(29),a=n(47),s=n(111),l=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var r=n(98),o=n(6),i=n(44),a=n(15),s=n(14),l=n(101),u=n(144),c=n(102),d=Math.max,h=Math.min;r("replace",2,(function(e,t,n,r){var p=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,f=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&&f||"string"==typeof r&&-1===r.indexOf(m)){var s=n(t,e,this,r);if(s.done)return s.value}var _=o(e),g=String(this),v="function"==typeof r;v||(r=String(r));var y=_.global;if(y){var M=_.unicode;_.lastIndex=0}for(var k=[];;){var b=c(_,g);if(null===b)break;if(k.push(b),!y)break;""===String(b[0])&&(_.lastIndex=l(g,i(_.lastIndex),M))}for(var w,L="",T=0,x=0;x<k.length;x++){b=k[x];for(var S=String(b[0]),D=d(h(a(b.index),g.length),0),Y=[],C=1;C<b.length;C++)Y.push(void 0===(w=b[C])?w:String(w));var A=b.groups;if(v){var O=[S].concat(Y,D,g);void 0!==A&&O.push(A);var E=String(r.apply(void 0,O))}else E=u(S,g,D,Y,A,r);D>=T&&(L+=g.slice(T,D)+E,T=D+S.length)}return L+g.slice(T)}]}))},function(e,t,n){"use strict";var r=n(1),o=n(93),i=n(80),a=n(4),s=n(7),l=s("iterator"),u=s("toStringTag"),c=i.values;for(var d in o){var h=r[d],p=h&&h.prototype;if(p){if(p[l]!==c)try{a(p,l,c)}catch(e){p[l]=c}if(p[u]||a(p,u,d),o[d])for(var f in i)if(p[f]!==i[f])try{a(p,f,i[f])}catch(e){p[f]=i[f]}}}},function(e,t,n){"use strict";var r=n(68),o=n(37).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(68),o=n(37);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(15),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){"use strict";var r=n(2),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(2),o=n(46),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,n){"use strict";var r,o,i=n(1),a=n(94),s=i.process,l=s&&s.versions,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){"use strict";var r=n(6),o=n(142);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){"use strict";var r=n(43),o=n(33);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){"use strict";var r=n(15),o=n(14),i=function(e){return function(t,n){var i,a,s=String(o(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},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(133),o=n(143)},function(e,t,n){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";var r=n(27);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";var r=n(27),o=n(83),i=n(97),a=n(6);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";n(90);var r=n(25),o=n(33),i=n(2),a=n(7),s=n(4),l=a("species"),u=RegExp.prototype,c=!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"),h=a("replace"),p=!!/./[h]&&""===/./[h]("a","$0"),f=!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,h){var m=a(e),_=!i((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),g=_&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!_||!g||"replace"===e&&(!c||!d||p)||"split"===e&&!f){var v=/./[m],y=n(m,""[e],(function(e,t,n,r,i){var a=t.exec;return a===o||a===u.exec?_&&!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}),M=y[0],k=y[1];r(String.prototype,e,M),r(u,m,2==t?function(e,t){return k.call(e,this,t)}:function(e){return k.call(e,this)})}h&&s(u[m],"sham",!0)}},function(e,t,n){"use strict";var r=n(6);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(2);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";var r=n(91).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(46),o=n(33);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},,,function(e,t,n){"use strict";var r=n(7),o=n(49),i=n(11),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(1);e.exports=r},function(e,t,n){"use strict";var r=n(53);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(9),o=n(11),i=n(6),a=n(84);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),s=r.length,l=0;s>l;)o.f(e,n=r[l++],t[n]);return e}},function(e,t,n){"use strict";var r=n(13),o=n(44),i=n(85),a=function(e){return function(t,n,a){var s,l=r(t),u=o(l.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var r=n(27);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(43),o=n(113),i=n(70),a=n(89),s=n(50),l=n(4),u=n(25),c=n(7),d=n(26),h=n(29),p=n(69),f=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,_=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,p,v,y){o(n,t,c);var M,k,b,w=function(e){if(e===p&&D)return D;if(!m&&e in x)return x[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},L=t+" Iterator",T=!1,x=e.prototype,S=x[_]||x["@@iterator"]||p&&x[p],D=!m&&S||w(p),Y="Array"==t&&x.entries||S;if(Y&&(M=i(Y.call(new e)),f!==Object.prototype&&M.next&&(d||i(M)===f||(a?a(M,f):"function"!=typeof M[_]&&l(M,_,g)),s(M,L,!0,!0),d&&(h[L]=g))),"values"==p&&S&&"values"!==S.name&&(T=!0,D=function(){return S.call(this)}),d&&!y||x[_]===D||l(x,_,D),h[t]=D,p)if(k={values:w("values"),keys:v?D:w("keys"),entries:w("entries")},y)for(b in k)(m||T||!(b in x))&&u(x,b,k[b]);else r({target:t,proto:!0,forced:m||T},k);return k}},function(e,t,n){"use strict";var r=n(3),o=n(96),i=n(45),a=n(11);e.exports=function(e,t){for(var n=o(t),s=a.f,l=i.f,u=0;u<n.length;u++){var c=n[u];r(e,c)||s(e,c,l(t,c))}}},function(e,t,n){"use strict";var r=n(69).IteratorPrototype,o=n(49),i=n(28),a=n(50),s=n(29),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,u,!1,!0),s[u]=l,e}},,function(e,t,n){"use strict";e.exports=n(116)},function(e,t,n){"use strict";var r=n(0),o=n(56),i=n(117),a=n(62);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 l=s(n(59));l.Axios=i,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(63),l.CancelToken=n(130),l.isCancel=n(58),l.all=function(e){return Promise.all(e)},l.spread=n(131),l.isAxiosError=n(132),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(0),o=n(57),i=n(118),a=n(119),s=n(62);function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.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},l.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){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(0);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(0),o=n(120),i=n(58),a=n(59);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(0);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(0);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(61);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(0);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(126),o=n(127);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(0),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(0);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(63);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";e.exports=function(e){return"object"==typeof 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(41),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(135)),o=i(n(138));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",l=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=l},function(e,t,n){"use strict";const r=n(136);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},function(e,t,n){"use strict";const{MAX_LENGTH:r}=n(34),{re:o,t:i}=n(64),a=n(66);e.exports=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},function(e,t,n){"use strict";const r=/^[0-9]+$/,o=(e,t)=>{const 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:(e,t)=>o(t,e)}},function(e,t,n){"use strict";const r=n(66);e.exports=(e,t)=>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(82),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(1),o=n(54),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){"use strict";var r=n(2);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(10);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";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(24),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,l,u,c){var d=n+e.length,h=l.length,p=s;return void 0!==u&&(u=r(u),p=a),i.call(c,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=u[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>h){var c=o(s/10);return 0===c?r:c<=h?void 0===l[c-1]?i.charAt(1):l[c-1]+i.charAt(1):r}a=l[s-1]}return void 0===a?"":a}))}},,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){e.exports=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 a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Lt(e,t,n,r,!0).utc()}function f(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 m(e){if(null==e._isValid){var t=f(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=p(NaN);return null!=e?h(f(t),e):f(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 g=o.momentProperties=[];function v(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=f(t)),s(t._locale)||(e._locale=t._locale),g.length>0)for(n=0;n<g.length;n++)s(o=t[r=g[n]])||(e[r]=o);return e}var y=!1;function M(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,o.updateOffset(this),y=!1)}function k(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(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&&w(e[r])!==w(t[r]))&&a++;return a+i}function T(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var n=!0;return h((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var S,D={};function Y(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),D[e]||(T(t),D[e]=!0)}function C(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=h({},e);for(n in t)d(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function O(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var E={};function j(e,t){var n=e.toLowerCase();E[n]=E[n+"s"]=E[t]=e}function P(e){return"string"==typeof e?E[e]||E[e.toLowerCase()]:void 0}function N(e){var t,n,r={};for(n in e)d(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var H={};function R(e,t){H[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 I=/(\[[^\[]*\])|(\\)?([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,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,$={},B={};function W(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(B[e]=o),t&&(B[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=U(t,e.localeData()),$[t]=$[t]||function(e){var t,n,r,o=e.match(I);for(t=0,n=o.length;t<n;t++)B[o[t]]?o[t]=B[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+=C(o[r])?o[r].call(t,e):o[r];return i}}(t),$[t](e)):e.localeData().invalidDate()}function U(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(z.lastIndex=0;n>=0&&z.test(e);)e=e.replace(z,r),z.lastIndex=0,n-=1;return e}var V=/\d/,J=/\d\d/,G=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,X=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[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,ue={};function ce(e,t,n){ue[e]=C(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function fe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=w(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function me(e,t){fe(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function _e(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}function ge(e){return ve(e)?366:365}function ve(e){return e%4==0&&e%100!=0||e%400==0}W("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),W(0,["YY",2],0,(function(){return this.year()%100})),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),j("year","y"),R("year",1),ce("Y",ie),ce("YY",X,J),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),fe(["YYYYY","YYYYYY"],0),fe("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):w(e)})),fe("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),fe("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return w(e)+(w(e)>68?1900:2e3)};var ye,Me=ke("FullYear",!0);function ke(e,t){return function(n){return null!=n?(we(this,e,n),o.updateOffset(this,t),this):be(this,e)}}function be(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function we(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ve(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?ve(e)?29:28:31-r%7%2}ye=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},W("M",["MM",2],"Mo",(function(){return this.month()+1})),W("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),W("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),j("month","M"),R("month",8),ce("M",X),ce("MM",X,J),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),fe(["M","MM"],(function(e,t){t[1]=w(e)-1})),fe(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:f(n).invalidMonth=e}));var Te=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,xe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function De(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=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=ye.call(this._shortMonthsParse,a))?o:null:-1!==(o=ye.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=ye.call(this._shortMonthsParse,a))||-1!==(o=ye.call(this._longMonthsParse,a))?o:null:-1!==(o=ye.call(this._longMonthsParse,a))||-1!==(o=ye.call(this._shortMonthsParse,a))?o:null}function Ye(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(!l(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 Ce(e){return null!=e?(Ye(this,e),o.updateOffset(this,!0),this):be(this,"Month")}var Ae=le,Oe=le;function Ee(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=p([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]=he(r[t]),o[t]=he(o[t]);for(t=0;t<24;t++)i[t]=he(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 je(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 Pe(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 Ne(e,t,n){var r=7+t-n;return-(7+Pe(e,0,r).getUTCDay()-t)%7+r-1}function He(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Ne(e,r,o);return s<=0?a=ge(i=e-1)+s:s>ge(e)?(i=e+1,a=s-ge(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Re(e,t,n){var r,o,i=Ne(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=Ne(e,t,n),o=Ne(e+1,t,n);return(ge(e)-r+o)/7}function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),R("week",5),R("isoWeek",5),ce("w",X),ce("ww",X,J),ce("W",X),ce("WW",X,J),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=w(e)})),W("d",0,"do","day"),W("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),W("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),W("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ce("d",X),ce("e",X),ce("E",X),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:f(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=w(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function We(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=p([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=ye.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ye.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ye.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ye.call(this._weekdaysParse,a))||-1!==(o=ye.call(this._shortWeekdaysParse,a))||-1!==(o=ye.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ye.call(this._shortWeekdaysParse,a))||-1!==(o=ye.call(this._weekdaysParse,a))||-1!==(o=ye.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ye.call(this._minWeekdaysParse,a))||-1!==(o=ye.call(this._weekdaysParse,a))||-1!==(o=ye.call(this._shortWeekdaysParse,a))?o:null}var qe=le,Ue=le,Ve=le;function Je(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=he(s[t]),l[t]=he(l[t]),u[t]=he(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ge(){return this.hours()%12||12}function Ke(e,t){W(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ze(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Ge),W("k",["kk",2],0,(function(){return this.hours()||24})),W("hmm",0,0,(function(){return""+Ge.apply(this)+F(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+Ge.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),j("hour","h"),R("hour",13),ce("a",Ze),ce("A",Ze),ce("H",X),ce("h",X),ce("k",X),ce("HH",X,J),ce("hh",X,J),ce("kk",X,J),ce("hmm",Q),ce("hmmss",ee),ce("Hmm",Q),ce("Hmmss",ee),fe(["H","HH"],3),fe(["k","kk"],(function(e,t,n){var r=w(e);t[3]=24===r?0:r})),fe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),fe(["h","hh"],(function(e,t,n){t[3]=w(e),f(n).bigHour=!0})),fe("hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r)),f(n).bigHour=!0})),fe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(o)),f(n).bigHour=!0})),fe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r))})),fe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(o))}));var Xe,Qe=ke("Hours",!0),et={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:xe,monthsShort:Se,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Be,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function ot(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Xe._abbr,n(632)("./"+t),it(r)}catch(e){}return tt[t]}function it(e,t){var n;return e&&((n=s(t)?st(e):at(e,t))?Xe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function at(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])Y("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=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new O(A(r,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!i(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=rt(e[i]).split("-")).length,n=(n=rt(e[i+1]))?n.split("-"):null;t>0;){if(r=ot(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(o,n,!0)>=t-1)break;t--}i++}return Xe}(e)}function lt(e){var t,n=e._a;return n&&-2===f(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,f(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),f(e)._overflowWeeks&&-1===t&&(t=7),f(e)._overflowWeekday&&-1===t&&(t=8),f(e).overflow=t),e}function ut(e,t,n){return null!=e?e:null!=t?t:n}function ct(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,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=ut(t.GG,e._a[0],Re(Tt(),1,4).year),r=ut(t.W,1),((o=ut(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Re(Tt(),i,a);n=ut(t.gg,e._a[0],u.year),r=ut(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>Fe(n,i,a)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(s=He(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=ut(e._a[0],r[0]),(e._dayOfYear>ge(a)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Pe(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?Pe:je).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&&(f(e).weekdayMismatch=!0)}}var dt=/^\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=/^\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=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["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}/]],mt=[["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 gt(e){var t,n,r,o,i,a,s=e._i,l=dt.exec(s)||ht.exec(s);if(l){for(f(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[1])){o=ft[t][0],r=!1!==ft[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[3])){i=(l[2]||" ")+mt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!pt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),bt(e)}else e._isValid=!1}var vt=/^(?:(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 yt(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,l=vt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var u=(t=l[4],n=l[3],r=l[2],o=l[5],i=l[6],a=l[7],s=[yt(t),Se.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||$e.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,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}(l[8],l[9],l[10]),e._d=Pe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function bt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],f(e).empty=!0;var t,n,r,i,a,s=""+e._i,l=s.length,u=0;for(r=U(e._f,e._locale).match(I)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(de(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&f(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?f(e).empty=!1:f(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&f(e).unusedTokens.push(i);f(e).charsLeftOver=l-u,s.length>0&&f(e).unusedInput.push(s),e._a[3]<=12&&!0===f(e).bigHour&&e._a[3]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(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),ct(e),lt(e)}else kt(e);else gt(e)}function wt(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new M(lt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],bt(t),m(t)&&(i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,(null==r||i<r)&&(r=i,n=t));h(e,n||t)}(e):n?bt(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(gt(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=c(t.slice(0),(function(e){return parseInt(e,10)})),ct(e)):a(t)?function(e){if(!e._d){var t=N(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ct(e)}}(e):l(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function Lt(e,t,n,r,o){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(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),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new M(lt(wt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,n,r){return Lt(e,t,n,r,!1)}o.createFromInputFallback=x("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 xt=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),St=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Dt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Yt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var t=N(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,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(Yt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Yt.length;++r)if(e[Yt[r]]){if(n)return!1;parseFloat(e[Yt[r]])!==w(e[Yt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function At(e){return e instanceof Ct}function Ot(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Et(e,t){W(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)}))}Et("Z",":"),Et("ZZ",""),ce("Z",se),ce("ZZ",se),fe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Pt(se,e)}));var jt=/([\+\-]|\d\d)/gi;function Pt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(jt)||["-",0,0],o=60*r[1]+w(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Nt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||u(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Tt(e).local()}function Ht(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Rt(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(e,t){var n,r,o,i,a,s,u=e,c=null;return At(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Ft.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:w(c[2])*n,h:w(c[3])*n,m:w(c[4])*n,s:w(c[5])*n,ms:w(Ot(1e3*c[6]))*n}):(c=It.exec(e))?(n="-"===c[1]?-1:1,u={y:$t(c[2],n),M:$t(c[3],n),w:$t(c[4],n),d:$t(c[5],n),h:$t(c[6],n),m:$t(c[7],n),s:$t(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Tt(u.from),a=Tt(u.to),o=i.isValid()&&a.isValid()?(a=Nt(a,i),i.isBefore(a)?s=Bt(i,a):((s=Bt(a,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=o.milliseconds,u.M=o.months),r=new Ct(u),At(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function $t(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Bt(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 Wt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(Y(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,zt(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,n,r){var i=t._milliseconds,a=Ot(t._days),s=Ot(t._months);e.isValid()&&(r=null==r||r,s&&Ye(e,be(e,"Month")+s*n),a&&we(e,"Date",be(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}zt.fn=Ct.prototype,zt.invalid=function(){return zt(NaN)};var Ut=Wt(1,"add"),Vt=Wt(-1,"subtract");function Jt(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 Gt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Kt=x("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 Zt(){return this._locale}function Xt(e,t){return(e%t+t)%t}function Qt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){W(0,[e,e.length],0,t)}function nn(e,t,n,r,o){var i;return null==e?Re(this,r,o).year:(t>(i=Fe(e,r,o))&&(t=i),rn.call(this,e,t,n,r,o))}function rn(e,t,n,r,o){var i=He(e,t,n,r,o),a=Pe(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",X,J),ce("gg",X,J),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=w(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),W("Q",0,"Qo","quarter"),j("quarter","Q"),R("quarter",7),ce("Q",V),fe("Q",(function(e,t){t[1]=3*(w(e)-1)})),W("D",["DD",2],"Do","date"),j("date","D"),R("date",9),ce("D",X),ce("DD",X,J),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(["D","DD"],2),fe("Do",(function(e,t){t[2]=w(e.match(X)[0])}));var on=ke("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),R("dayOfYear",4),ce("DDD",te),ce("DDDD",G),fe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=w(e)})),W("m",["mm",2],0,"minute"),j("minute","m"),R("minute",14),ce("m",X),ce("mm",X,J),fe(["m","mm"],4);var an=ke("Minutes",!1);W("s",["ss",2],0,"second"),j("second","s"),R("second",15),ce("s",X),ce("ss",X,J),fe(["s","ss"],5);var sn,ln=ke("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),j("millisecond","ms"),R("millisecond",16),ce("S",te,V),ce("SS",te,J),ce("SSS",te,G),sn="SSSS";sn.length<=9;sn+="S")ce(sn,oe);function un(e,t){t[6]=w(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")fe(sn,un);var cn=ke("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var dn=M.prototype;function hn(e){return e}dn.add=Ut,dn.calendar=function(e,t){var n=e||Tt(),r=Nt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(C(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Tt(n)))},dn.clone=function(){return new M(this)},dn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Nt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=P(t)){case"year":i=Jt(this,r)/12;break;case"month":i=Jt(this,r);break;case"quarter":i=Jt(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:b(i)},dn.endOf=function(e){var t;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Qt;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-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Tt(),e)},dn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Tt(),e)},dn.get=function(e){return C(this[e=P(e)])?this[e]():this},dn.invalidAt=function(){return f(this).overflow},dn.isAfter=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){var o=k(e)?e:Tt(e),i=k(t)?t:Tt(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))},dn.isSame=function(e,t){var n,r=k(e)?e:Tt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return m(this)},dn.lang=Kt,dn.locale=Gt,dn.localeData=Zt,dn.max=St,dn.min=xt,dn.parsingFlags=function(){return h({},f(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:H[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=N(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(C(this[e=P(e)]))return this[e](t);return this},dn.startOf=function(e){var t;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Qt;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-=Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Xt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Xt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},dn.subtract=Vt,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.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()}},dn.toDate=function(){return new Date(this.valueOf())},dn.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"):C(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")},dn.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)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=Me,dn.isLeapYear=function(){return ve(this.year())},dn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=Ce,dn.daysInMonth=function(){return Le(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},dn.date=on,dn.day=dn.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},dn.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")},dn.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},dn.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")},dn.hour=dn.hours=Qe,dn.minute=dn.minutes=an,dn.second=dn.seconds=ln,dn.millisecond=dn.milliseconds=cn,dn.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=Pt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ht(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?qt(this,zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ht(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ht(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Pt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Rt,dn.isUTC=Rt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=x("dates accessor is deprecated. Use date instead.",on),dn.months=x("months accessor is deprecated. Use month instead",Ce),dn.years=x("years accessor is deprecated. Use year instead",Me),dn.zone=x("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()})),dn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=wt(e))._a){var t=e._isUTC?p(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var pn=O.prototype;function fn(e,t,n,r){var o=st(),i=p().set(r,t);return o[n](i,e)}function mn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return fn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=fn(e,r,n,"month");return o}function _n(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var o,i=st(),a=e?i._week.dow:0;if(null!=n)return fn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=fn(t,(o+a)%7,r,"day");return s}pn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return C(r)?r.call(t,n):r},pn.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])},pn.invalidDate=function(){return this._invalidDate},pn.ordinal=function(e){return this._ordinal.replace("%d",e)},pn.preparse=hn,pn.postformat=hn,pn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return C(o)?o(e,t,n,r):o.replace(/%d/i,e)},pn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},pn.set=function(e){var t,n;for(n in e)C(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)},pn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Te).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},pn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Te.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=p([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}},pn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Oe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},pn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ae),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},pn.week=function(e){return Re(e,this._week.dow,this._week.doy).week},pn.firstDayOfYear=function(){return this._week.doy},pn.firstDayOfWeek=function(){return this._week.dow},pn.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?Ie(n,this._week.dow):e?n[e.day()]:n},pn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},pn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},pn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return We.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=p([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}},pn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},pn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ue),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ve),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},pn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=x("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=x("moment.langData is deprecated. Use moment.localeData instead.",st);var gn=Math.abs;function vn(e,t,n,r){var o=zt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function yn(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 bn(e){return function(){return this.as(e)}}var wn=bn("ms"),Ln=bn("s"),Tn=bn("m"),xn=bn("h"),Sn=bn("d"),Dn=bn("w"),Yn=bn("M"),Cn=bn("Q"),An=bn("y");function On(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=On("milliseconds"),jn=On("seconds"),Pn=On("minutes"),Nn=On("hours"),Hn=On("days"),Rn=On("months"),Fn=On("years"),In=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};function $n(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Bn=Math.abs;function Wn(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Bn(this._milliseconds)/1e3,r=Bn(this._days),o=Bn(this._months);e=b(n/60),t=b(e/60),n%=60,e%=60;var i=b(o/12),a=o%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",p=Wn(this._months)!==Wn(d)?"-":"",f=Wn(this._days)!==Wn(d)?"-":"",m=Wn(this._milliseconds)!==Wn(d)?"-":"";return h+"P"+(i?p+i+"Y":"")+(a?p+a+"M":"")+(s?f+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var Un=Ct.prototype;return Un.isValid=function(){return this._isValid},Un.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},Un.add=function(e,t){return vn(this,e,t,1)},Un.subtract=function(e,t){return vn(this,e,t,-1)},Un.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=P(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)}},Un.asMilliseconds=wn,Un.asSeconds=Ln,Un.asMinutes=Tn,Un.asHours=xn,Un.asDays=Sn,Un.asWeeks=Dn,Un.asMonths=Yn,Un.asQuarters=Cn,Un.asYears=An,Un.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Un._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*yn(kn(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=b(i/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,a+=b(n/24),o=b(Mn(a)),s+=o,a-=yn(kn(o)),r=b(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Un.clone=function(){return zt(this)},Un.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Un.milliseconds=En,Un.seconds=jn,Un.minutes=Pn,Un.hours=Nn,Un.days=Hn,Un.weeks=function(){return b(this.days()/7)},Un.months=Rn,Un.years=Fn,Un.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=zt(e).abs(),o=In(r.as("s")),i=In(r.as("m")),a=In(r.as("h")),s=In(r.as("d")),l=In(r.as("M")),u=In(r.as("y")),c=o<=zn.ss&&["s",o]||o<zn.s&&["ss",o]||i<=1&&["m"]||i<zn.m&&["mm",i]||a<=1&&["h"]||a<zn.h&&["hh",a]||s<=1&&["d"]||s<zn.d&&["dd",s]||l<=1&&["M"]||l<zn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,$n.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Un.toISOString=qn,Un.toString=qn,Un.toJSON=qn,Un.locale=Gt,Un.localeData=Zt,Un.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Un.lang=Kt,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),fe("x",(function(e,t,n){n._d=new Date(w(e))})),o.version="2.24.0",t=Tt,o.fn=dn,o.min=function(){var e=[].slice.call(arguments,0);return Dt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Dt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=p,o.unix=function(e){return Tt(1e3*e)},o.months=function(e,t){return mn(e,t,"months")},o.isDate=u,o.locale=it,o.invalid=_,o.duration=zt,o.isMoment=k,o.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},o.parseZone=function(){return Tt.apply(null,arguments).parseZone()},o.localeData=st,o.isDuration=At,o.monthsShort=function(e,t){return mn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},o.defineLocale=at,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=(r=ot(e))&&(o=r._config),t=A(o,t),(n=new O(t)).parentLocale=tt[e],tt[e]=n,it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return S(tt)},o.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},o.normalizeUnits=P,o.relativeTimeRounding=function(e){return void 0===e?In:"function"==typeof e&&(In=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.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=dn,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}()}).call(this,n(176)(e))},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function i(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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(396);var d=/[&<>"]/,h=/[&<>"]/g,p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function f(e){return p[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var _=n(213);t.lib={},t.lib.mdurl=n(397),t.lib.ucmicro=n(665),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof 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=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return o(c,t)?c[t]:35===t.charCodeAt(0)&&u.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=i,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(h,f):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(m,"\\$&")},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(163),o=n(165),i=Object.create(null),a=function(e,t,n){this.ranges=n||[new l(e.min(t),e.max(t))],this.$anchor=e,this.$head=t};t.Selection=a;var s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.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},a.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},a.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,l=0;l<s.length;l++){var u=s[l],c=u.$from,d=u.$to,h=e.mapping.slice(a);e.replaceRange(h.map(c.pos),h.map(d.pos),l?r.Slice.empty:t),0==l&&_(e,a,(n?n.isInline:o&&o.isTextblock)?-1:1)}},a.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,l=e.mapping.slice(n),u=l.map(a.pos),c=l.map(s.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),_(e,n,t.isInline?-1:1))}},a.findFrom=function(e,t,n){var r=e.parent.inlineContent?new u(e):m(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?m(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):m(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))},a.atStart=function(e){return m(e,e,0,0,1)||new p(e)},a.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new p(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return u.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var l=function(e,t){this.$from=e,this.$to=t};t.SelectionRange=l;var u=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 c(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}(a);t.TextSelection=u,a.jsonID("text",u);var c=function(e,t){this.anchor=e,this.head=t};c.prototype.map=function(e){return new c(e.map(this.anchor),e.map(this.head))},c.prototype.resolve=function(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))};var d=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 h(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}(a);t.NodeSelection=d,d.prototype.visible=!1,a.jsonID("node",d);var h=function(e){this.anchor=e};h.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new c(r,r):new h(r)},h.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):a.near(t)};var p=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 f},t}(a);t.AllSelection=p,a.jsonID("all",p);var f={map:function(){return this},resolve:function(e){return new p(e)}};function m(e,t,n,r,o,i){if(t.inlineContent)return u.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&&d.isSelectable(s))return d.create(e,n-(o<0?s.nodeSize:0))}else{var l=m(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function _(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,s=e.steps[r];if(s instanceof o.ReplaceStep||s instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==i&&(i=r)})),e.setSelection(a.near(e.doc.resolve(i),n))}}var g=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(a.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 v(e,t){return t&&e?e.bind(t):e}t.Transaction=g;var y=function(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)},M=[new y("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new y("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new y("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new y("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 y(e.key,e.spec.state,e))}))},b=function(e){this.config=e};t.EditorState=b;var w={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};w.schema.get=function(){return this.config.schema},w.plugins.get=function(){return this.config.plugins},b.prototype.apply=function(e){return this.applyTransaction(e).state},b.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},b.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,l=r?r[i].state:this,u=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(u&&n.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(var c=0;c<this.config.plugins.length;c++)r.push(c<i?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},b.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new b(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},w.tr.get=function(){return new g(this)},b.create=function(e){for(var t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new b(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},b.prototype.reconfigure=function(e){for(var t=new k(this.schema,e.plugins),n=t.fields,r=new b(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},b.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"==typeof 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},b.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 b(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=a.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 s in n){var l=n[s],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,s))return void(i[o.name]=u.fromJSON.call(l,e,t[s],i))}i[o.name]=o.init(e,i)}})),i},b.addApplyListener=function(e){L.push(e)},b.removeApplyListener=function(e){var t=L.indexOf(e);t>-1&&L.splice(t,1)},Object.defineProperties(b.prototype,w);var L=[];var T=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:S("plugin")};t.Plugin=T,T.prototype.getState=function(e){return e[this.key]};var x=Object.create(null);function S(e){return e in x?e+"$"+ ++x[e]:(x[e]=0,e+"$")}var D=function(e){void 0===e&&(e="key"),this.key=S(e)};t.PluginKey=D,D.prototype.get=function(e){return e.config.pluginsByKey[this.key]},D.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceError=d,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(636))&&r.__esModule?r:{default:r};var i=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=i;var a={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};i.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],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o,i)&&s.content.size){var u=a+1;s.nodesBetween(Math.max(0,e-u),Math.min(s.content.size,t-u),n,r+u)}a=l}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.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},i.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 i(r,this.size+e.size)},i.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,a=0;a<t;o++){var s=this.content[o],l=a+s.nodeSize;l>e&&((a<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=l}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.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 i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.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},a.firstChild.get=function(){return this.content.length?this.content[0]:null},a.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},a.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.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}},i.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 l=e(i.content,a.content,r+1);if(null!=l)return l}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.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),l=n.child(--a),u=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:r,b:o};if(s.isText&&s.text!=l.text){for(var c=0,d=Math.min(s.text.length,l.text.length);c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,r--,o--;return{a:r,b:o}}if(s.content.size||l.content.size){var h=e(s.content,l.content,r-1,o-1);if(h)return h}r-=u,o-=u}else r-=u,o-=u}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return l(0,e);if(e==this.size)return l(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?l(n+1,o):l(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.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 i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([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(i.prototype,a);var s={index:0,offset:0};function l(e,t){return s.index=e,s.offset=t,s}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof 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(!u(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!u(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var c=function(e,t){this.type=e,this.attrs=t};function d(e){var t=Error.call(this,e);return t.__proto__=d.prototype,t}t.Mark=c,c.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},c.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},c.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},c.prototype.eq=function(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)},c.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},c.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)},c.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},c.setFrom=function(e){if(!e||0==e.length)return c.none;if(e instanceof c)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},c.none=[],d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.name="ReplaceError";var h=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n};t.Slice=h;var p={size:{configurable:!0}};function f(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o<t.depth-r.openStart){var l=e(t,n,r,o+1);return s.copy(s.content.replaceChild(a,l))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var u=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(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),c=u.start,d=u.end;return y(s,function e(t,n,r,o,a){var s=t.depth>a&&_(t,n,a+1),l=o.depth>a&&_(r,o,a+1),u=[];v(null,t,a,u),s&&l&&n.index(a)==r.index(a)?(m(s,l),g(y(s,e(t,n,r,o,a+1)),u)):(s&&g(y(s,M(t,n,a+1)),u),v(n,r,a,u),l&&g(y(l,M(r,o,a+1)),u));return v(o,null,a,u),new i(u)}(t,c,d,n,o))}var h=t.parent,p=h.content;return y(h,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return y(s,M(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.name)}function _(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function g(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 v(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&&(g(e.nodeAfter,r),i++));for(var s=i;s<a;s++)g(o.child(s),r);t&&t.depth==n&&t.textOffset&&g(t.nodeBefore,r)}function y(e,t){if(!e.type.validContent(t))throw new d("Invalid content for node "+e.type.name);return e.copy(t)}function M(e,t,n){var r=[];(v(null,e,n,r),e.depth>n)&&g(y(_(e,t,n+1),M(e,t,n+1)),r);return v(t,null,n,r),new i(r)}p.size.get=function(){return this.content.size-this.openStart-this.openEnd},h.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,l=t.maybeChild(a);if(s==n||l.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var u=e(l.content,n-s-1,r);return u&&t.replaceChild(a,l.copy(u))}(this.content,e+this.openStart,t,null);return n&&new h(n,this.openStart,this.openEnd)},h.prototype.removeBetween=function(e,t){return new h(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),l=t.findIndex(r),u=l.index,c=l.offset;if(a==n||s.isText){if(c!=r&&!t.child(u).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)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)},h.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},h.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},h.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},h.fromJSON=function(e,t){if(!t)return h.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 h(i.fromJSON(e,t.content),n,r)},h.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 h(e,n,r)},Object.defineProperties(h.prototype,p),h.empty=new h(i.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 b={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},b.parent.get=function(){return this.node(this.depth)},b.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},b.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},b.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},b.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 c.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 x(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,l=a.offset,u=o-l;if(n.push(i,s,r+l),!u)break;if((i=i.child(s)).isText)break;o=u-1,r+=l+1}return new k(t,n,o)},k.resolveCached=function(e,t){for(var n=0;n<w.length;n++){var r=w[n];if(r.pos==t&&r.doc==e)return r}var o=w[L]=k.resolve(e,t);return L=(L+1)%T,o},Object.defineProperties(k.prototype,b);var w=[],L=0,T=12,x=function(e,t,n){this.$from=e,this.$to=t,this.depth=n};t.NodeRange=x;var S={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};S.start.get=function(){return this.$from.before(this.depth+1)},S.end.get=function(){return this.$to.after(this.depth+1)},S.parent.get=function(){return this.$from.node(this.depth)},S.startIndex.get=function(){return this.$from.index(this.depth)},S.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(x.prototype,S);var D=Object.create(null),Y=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||c.none};t.Node=Y;var C={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}};C.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},C.childCount.get=function(){return this.content.childCount},Y.prototype.child=function(e){return this.content.child(e)},Y.prototype.maybeChild=function(e){return this.content.maybeChild(e)},Y.prototype.forEach=function(e){this.content.forEach(e)},Y.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},Y.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},C.textContent.get=function(){return this.textBetween(0,this.content.size,"")},Y.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},C.firstChild.get=function(){return this.content.firstChild},C.lastChild.get=function(){return this.content.lastChild},Y.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},Y.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},Y.prototype.hasMarkup=function(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||D)&&c.sameSet(this.marks,n||c.none)},Y.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},Y.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},Y.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},Y.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return h.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 h(s,r.depth-i,o.depth-i)},Y.prototype.replace=function(e,t,n){return f(this.resolve(e),this.resolve(t),n)},Y.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}},Y.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}},Y.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}},Y.prototype.resolve=function(e){return k.resolveCached(this,e)},Y.prototype.resolveNoCache=function(e){return k.resolve(this,e)},Y.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},C.isBlock.get=function(){return this.type.isBlock},C.isTextblock.get=function(){return this.type.isTextblock},C.inlineContent.get=function(){return this.type.inlineContent},C.isInline.get=function(){return this.type.isInline},C.isText.get=function(){return this.type.isText},C.isLeaf.get=function(){return this.type.isLeaf},C.isAtom.get=function(){return this.type.isAtom},Y.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()+")"),O(this.marks,e)},Y.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},Y.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0},Y.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},Y.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},Y.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=c.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!c.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()}))},Y.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},Y.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=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(Y.prototype,C);var A=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):O(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}(Y);function O(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var E=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]};t.ContentMatch=E;var j={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};E.parse=function(e,t){var n=new P(e,t);if(null==n.next)return E.empty;var r=H(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];B(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new E(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort($);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(B(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 l=n();return r(i,l),o(e(t.expr,l),l),[r(l)]}if("plus"==t.type){var u=n();return o(e(t.expr,i),u),o(e(t.expr,u),u),[r(u)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var c=i,d=0;d<t.min;d++){var h=n();o(e(t.expr,c),h),c=h}if(-1==t.max)o(e(t.expr,c),c);else for(var p=t.min;p<t.max;p++){var f=n();r(c,f),o(e(t.expr,c),f),c=f}return[r(c)]}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 l=o.next[s],u=o.next[s+1];a.push(l.name),!i||l.isText||l.hasRequiredAttrs()||(i=!1),-1==r.indexOf(u)&&r.push(u)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},E.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},E.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},j.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},j.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}},E.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},E.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(a,s){var l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return i.from(s.map((function(e){return e.createAndFill()})));for(var u=0;u<a.next.length;u+=2){var c=a.next[u],d=a.next[u+1];if(!c.isText&&!c.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var h=o(d,s.concat(c));if(h)return h}}}(this,[])},E.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},E.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 l=o.next[s];l.isLeaf||l.hasRequiredAttrs()||l.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:l.contentMatch,type:l,via:r}),t[l.name]=!0)}}},j.edgeCount.get=function(){return this.next.length>>1},E.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]}},E.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(E.prototype,j),E.empty=new E(!0);var P=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()},N={next:{configurable:!0}};function H(e){var t=[];do{t.push(R(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function R(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=H(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=z(e,t)}return t}function I(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function z(e,t){var n=I(e),r=n;return e.eat(",")&&(r="}"!=e.next?I(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $(e,t){return t-e}function B(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,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort($)}function W(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 U(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new G(e[n]);return t}N.next.get=function(){return this.tokens[this.pos]},P.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},P.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(P.prototype,N);var V=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=U(n.attrs),this.defaultAttrs=W(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e};t.NodeType=V;var J={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};J.isInline.get=function(){return!this.isBlock},J.isTextblock.get=function(){return this.isBlock&&this.inlineContent},J.isLeaf.get=function(){return this.contentMatch==E.empty},J.isAtom.get=function(){return this.isLeaf||this.spec.atom},V.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},V.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},V.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:q(this.attrs,e)},V.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Y(this,this.computeAttrs(e),i.from(t),c.setFrom(n))},V.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new Y(this,this.computeAttrs(e),t,c.setFrom(n))},V.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new Y(this,e,t.append(o),c.setFrom(n)):null},V.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},V.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},V.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},V.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:c.empty:e},V.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new V(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(V.prototype,J);var G=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},K={isRequired:{configurable:!0}};K.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(G.prototype,K);var Z=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=U(r.attrs),this.rank=t,this.excluded=null;var o=W(this.attrs);this.instance=o&&new c(this,o)};t.MarkType=Z,Z.prototype.create=function(e){return!e&&this.instance?this.instance:new c(this,q(this.attrs,e))},Z.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new Z(e,r++,t,o)})),n},Z.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},Z.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},Z.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var X=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=V.compile(this.spec.nodes,this),this.marks=Z.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]=E.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Q(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var l in this.marks){var u=this.marks[l],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:Q(this,c.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 Q(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 l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}t.Schema=X,X.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof V))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)},X.prototype.text=function(e,t){var n=this.nodes.text;return new A(n,n.defaultAttrs,e,c.setFrom(t))},X.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},X.prototype.nodeFromJSON=function(e){return Y.fromJSON(this,e)},X.prototype.markFromJSON=function(e){return c.fromJSON(this,e)},X.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=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=ee,ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),h.maxOpen(n.finish())},ee.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(le(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}}},ee.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}}},ee.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=ue(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=ue(e)),e.node=a}));return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={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},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0};function oe(e){return(e?1:0)|("full"===e?2:0)}var ie=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=c.none,this.pendingMarks=r,this.stashMarks=[]};ie.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.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)},ie.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=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ie.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]},ie.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):ce(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}};var ae=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=oe(t.preserveWhitespace)|(n?4:0);r=o?new ie(o.type,o.attrs,c.none,c.none,!0,t.topMatch||o.type.contentMatch,i):new ie(n?null:e.schema.topNodeType,null,c.none,c.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},se={top:{configurable:!0},currentPos:{configurable:!0}};function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ue(e){var t={};for(var n in e)t[n]=e[n];return t}function ce(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[],a=function(e){i.push(e);for(var n=0;n<e.edgeCount;n++){var r=e.edge(n),o=r.type,s=r.next;if(o==t)return!0;if(i.indexOf(s)<0&&a(s))return!0}};return a(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}se.top.get=function(){return this.nodes[this.open]},ae.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)}},ae.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if(2&n.options||(n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/[^ \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)},ae.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();re.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&&re.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:ne.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(te.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)},ae.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},ae.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},ae.prototype.readStyles=function(e){var t=c.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},ae.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 l=t.contentElement;"string"==typeof l?l=e.querySelector(l):"function"==typeof l&&(l=l(e)),l||(l=e),this.findAround(e,l,!0),this.addAll(l,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},ae.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&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ae.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},ae.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},ae.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},ae.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:oe(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ie(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},ae.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}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.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},ae.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)},ae.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)},ae.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)}},ae.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))},ae.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),a=function(e,s){for(;e>=0;e--){var l=n[e];if(""==l){if(e==n.length-1||0==e)continue;for(;s>=i;s--)if(a(e-1,s))return!0;return!1}var u=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!u||u.name!=l&&-1==u.groups.indexOf(l))return!1;s--}return!0};return a(n.length-1,this.open)},ae.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}},ae.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)},ae.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(ae.prototype,se);var de=function(e,t){this.nodes=e||{},this.marks=t||{}};function he(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function pe(e){return e.document||window.document}t.DOMSerializer=de,de.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=pe(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 l=e.marks[a++],u=r.serializeMark(l,e.isInline,t);u&&(i.push(l,o),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(r.serializeNode(e,t))})),n},de.prototype.serializeNode=function(e,t){void 0===t&&(t={});var n=de.renderSpec(pe(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},de.prototype.serializeNodeAndMarks=function(e,t){void 0===t&&(t={});for(var n=this.serializeNode(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},de.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&de.renderSpec(pe(n),r(e,t))},de.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 i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var u in l=2,s)if(null!=s[u]){var c=u.indexOf(" ");c>0?a.setAttributeNS(u.slice(0,c),u.slice(c+1),s[u]):a.setAttribute(u,s[u])}for(var d=l;d<t.length;d++){var h=t[d];if(0===h){if(d<t.length-1||d>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=de.renderSpec(e,h,n),f=p.dom,m=p.contentDOM;if(a.appendChild(f),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},de.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new de(this.nodesFromSchema(e),this.marksFromSchema(e)))},de.nodesFromSchema=function(e){var t=he(e.nodes);return t.text||(t.text=function(e){return e.text}),t},de.marksFromSchema=function(e){return he(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(162),i=n(177),a=n(163),s=n(638),l=n(639),u=n(210),c=n(392),d=n(393),h=n(187),p=(r=n(8))&&r.__esModule?r:{default:r},f=n(188);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&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(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 b(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}let w=function(){function e(t,{editor:n,extension:r,parent:o,node:i,view:a,decorations:s,getPos:l}){M(this,e),this.component=t,this.editor=n,this.extension=r,this.parent=o,this.node=i,this.view=a,this.decorations=s,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:l,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return b(e,[{key:"createDOM",value:function(){const e=p.default.extend(this.component),t={editor:this.editor,node:this.node,view:this.view,getPos:()=>this.getPos(),decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:e=>this.updateAttrs(e)};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"==typeof this.extension.update&&(this.update=this.extension.update),this.vm=new e({parent:this.parent,propsData:t}).$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){if(!this.vm._props)return;const t=p.default.config.silent;p.default.config.silent=!0,Object.entries(e).forEach(([e,t])=>{this.vm._props[e]=t}),p.default.config.silent=t}},{key:"updateAttrs",value:function(e){if(!this.view.editable)return;const{state:t}=this.view,{type:n}=this.node,r=this.getPos(),o={...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){if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);const t=!!this.extension.schema.draggable;if(t&&"mousedown"===e.type){const t=e.target.closest&&e.target.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.captureEvents=!1,document.addEventListener("dragend",()=>{this.captureEvents=!0},{once:!0}))}const n="copy"===e.type,r="paste"===e.type,o="cut"===e.type,i=e.type.startsWith("drag")||"drop"===e.type;return!(t&&i||n||r||o)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){const e=this.view.posAtDOM(this.dom),t=this.view.state.doc.resolve(e);return(0,h.getMarkRange)(t,this.node.type)}},{key:"destroy",value:function(){this.vm.$destroy()}}]),e}(),L=function(){function e(){M(this,e)}return b(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,...t){this._callbacks=this._callbacks||{};const n=this._callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}},{key:"off",value:function(e,t){if(arguments.length){const n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter(e=>e!==t):delete this._callbacks[e])}else this._callbacks={};return this}}]),e}(),T=function(){function e(t={}){M(this,e),this.options={...this.defaultOptions,...t}}return b(e,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(e=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=T;let x=function(){function e(t=[],n){M(this,e),t.forEach(e=>{e.bindEditor(n),e.init()}),this.extensions=t}return b(e,[{key:"nodes",get:function(){return this.extensions.filter(e=>"node"===e.type).reduce((e,{name:t,schema:n})=>({...e,[t]:n}),{})}},{key:"options",get:function(){const{view:e}=this;return this.extensions.reduce((t,n)=>({...t,[n.name]:new Proxy(n.options,{set(t,n,r){const o=t[n]!==r;return Object.assign(t,{[n]:r}),o&&e.updateState(e.state),!0}})}),{})}},{key:"marks",get:function(){return this.extensions.filter(e=>"mark"===e.type).reduce((e,{name:t,schema:n})=>({...e,[t]:n}),{})}},{key:"plugins",get:function(){return this.extensions.filter(e=>e.plugins).reduce((e,{plugins:t})=>[...e,...t],[])}},{key:"keymaps",value:function({schema:e}){return[...this.extensions.filter(e=>["extension"].includes(e.type)).filter(e=>e.keys).map(t=>t.keys({schema:e})),...this.extensions.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.keys).map(t=>t.keys({type:e["".concat(t.type,"s")][t.name],schema:e}))].map(e=>(0,u.keymap)(e))}},{key:"inputRules",value:function({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions;return[...n.filter(e=>["extension"].includes(e.type)).filter(e=>e.inputRules).map(t=>t.inputRules({schema:e})),...n.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.inputRules).map(t=>t.inputRules({type:e["".concat(t.type,"s")][t.name],schema:e}))].reduce((e,t)=>[...e,...t],[])}},{key:"pasteRules",value:function({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter(e=>!t.includes(e.name)):this.extensions;return[...n.filter(e=>["extension"].includes(e.type)).filter(e=>e.pasteRules).map(t=>t.pasteRules({schema:e})),...n.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.pasteRules).map(t=>t.pasteRules({type:e["".concat(t.type,"s")][t.name],schema:e}))].reduce((e,t)=>[...e,...t],[])}},{key:"commands",value:function({schema:e,view:t}){return this.extensions.filter(e=>e.commands).reduce((n,r)=>{const{name:o,type:i}=r,a={},s=r.commands({schema:e,...["node","mark"].includes(i)?{type:e["".concat(i,"s")][o]}:{}}),l=(e,n)=>!!t.editable&&(t.focus(),e(n)(t.state,t.dispatch,t)),u=(e,t)=>{Array.isArray(t)?a[e]=e=>t.forEach(t=>l(t,e)):"function"==typeof t&&(a[e]=e=>l(t,e))};return"object"==typeof s?Object.entries(s).forEach(([e,t])=>{u(e,t)}):u(o,s),{...n,...a}},{})}}]),e}();let S=function(e){m(n,e);var t=g(n);function n(e={}){return M(this,n),t.call(this,e)}return b(n,[{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return()=>{}}}]),n}(T);function D(e=0,t=0,n=0){return Math.min(Math.max(parseInt(e,10),t),n)}t.Mark=S;let Y=function(e){m(n,e);var t=g(n);function n(e={}){return M(this,n),t.call(this,e)}return b(n,[{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}},{key:"command",value:function(){return()=>{}}}]),n}(T);t.Node=Y;let C=function(e){m(n,e);var t=g(n);function n(){return M(this,n),t.apply(this,arguments)}return b(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(Y);t.Doc=C;let A=function(e){m(n,e);var t=g(n);function n(){return M(this,n),t.apply(this,arguments)}return b(n,[{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}},{key:"commands",value:function({type:e}){return()=>(0,f.setBlockType)(e)}}]),n}(Y);t.Paragraph=A;let O=function(e){m(n,e);var t=g(n);function n(){return M(this,n),t.apply(this,arguments)}return b(n,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(Y);t.Text=O;let E=function(e){m(n,e);var t=g(n);function n(e={}){var r;return M(this,n),(r=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:()=>{},onTransaction:()=>{},onUpdate:()=>{},onFocus:()=>{},onBlur:()=>{},onPaste:()=>{},onDrop:()=>{}},r.events=["init","transaction","update","focus","blur","paste","drop"],r.init(e),r}return b(n,[{key:"init",value:function(e={}){this.setOptions({...this.defaultOptions,...e}),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&&function(e){{const t=document.createElement("style");t.type="text/css",t.textContent=e;const{head:n}=document,{firstChild:r}=n;r?n.insertBefore(t,r):n.appendChild(t)}}('.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'),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach(e=>{var t;this.on(e,this.options[(t="on ".concat(e),t.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===t?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,""))]||(()=>{}))}),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(e){this.options={...this.options,...e},this.view&&this.state&&this.view.updateState(this.state)}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new C,new O,new A]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"createExtensions",value:function(){return new x([...this.builtInExtensions,...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(){return o.EditorState.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,(0,d.inputRules)({rules:this.inputRules}),...this.pasteRules,...this.keymaps,(0,u.keymap)({Backspace:d.undoInputRule}),(0,u.keymap)(c.baseKeymap),...this.options.enableDropCursor?[(0,s.dropCursor)(this.options.dropCursor)]:[],...this.options.enableGapCursor?[(0,l.gapCursor)()]:[],new o.Plugin({key:new o.PluginKey("editable"),props:{editable:()=>this.options.editable}}),new o.Plugin({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,t)=>{this.focused=!0,this.emit("focus",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!0);this.view.dispatch(n)},blur:(e,t)=>{this.focused=!1,this.emit("blur",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!1);this.view.dispatch(n)}}}}),new o.Plugin({props:this.options.editorProps})]})}},{key:"createDocument",value:function(e,t=this.options.parseOptions){if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof 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){const n="<div>".concat(e,"</div>"),r=(new window.DOMParser).parseFromString(n,"text/html").body.firstElementChild;return a.DOMParser.fromSchema(this.schema).parse(r,t)}return!1}},{key:"createView",value:function(){return new i.EditorView(this.element,{state:this.createState(),handlePaste:(...e)=>{this.emit("paste",...e)},handleDrop:(...e)=>{this.emit("drop",...e)},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(e=null){e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[...this.builtInExtensions,...this.options.extensions]})})}},{key:"initNodeViews",value:function({parent:e,extensions:t}){return t.filter(e=>["node","mark"].includes(e.type)).filter(e=>e.view).reduce((t,n)=>({...t,[n.name]:(t,r,o,i)=>{const a=n.view;return new w(a,{editor:this,extension:n,parent:e,node:t,view:r,getPos:o,decorations:i})}}),{})}},{key:"dispatchTransaction",value:function(e){const 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(e=null){if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){const{doc:e}=this.state;return{from:e.content.size,to:e.content.size}}return{from:e,to:e}}},{key:"focus",value:function(e=null){if(this.view.focused&&null===e||!1===e)return;const{from:t,to:n}=this.resolveSelection(e);this.setSelection(t,n),setTimeout(()=>this.view.focus(),10)}},{key:"setSelection",value:function(e=0,t=0){const{doc:n,tr:r}=this.state,i=D(e,0,n.content.size),a=D(t,0,n.content.size),s=o.TextSelection.create(n,i,a),l=r.setSelection(s);this.view.dispatch(l)}},{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(){const 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(e={},t=!1,n){const{doc:r,tr:i}=this.state,a=this.createDocument(e,n),s=o.TextSelection.create(r,0,r.content.size),l=i.setSelection(s).replaceSelectionWith(a,!1).setMeta("preventUpdate",!t);this.view.dispatch(l)}},{key:"clearContent",value:function(e=!1){this.setContent(this.options.emptyDocument,e)}},{key:"setActiveNodesAndMarks",value:function(){this.activeMarks=Object.entries(this.schema.marks).reduce((e,[t,n])=>({...e,[t]:(e={})=>(0,h.markIsActive)(this.state,n,e)}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((e,[t,n])=>({...e,[t]:(0,h.getMarkAttrs)(this.state,n)}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((e,[t,n])=>({...e,[t]:(e={})=>(0,h.nodeIsActive)(this.state,n,e)}),{})}},{key:"getMarkAttrs",value:function(e=null){return this.activeMarkAttrs[e]}},{key:"getNodeAttrs",value:function(e=null){return{...(0,h.getNodeAttrs)(this.state,this.schema.nodes[e])}}},{key:"isActive",get:function(){return Object.entries({...this.activeMarks,...this.activeNodes}).reduce((e,[t,n])=>({...e,[t]:(e={})=>n(e)}),{})}},{key:"registerPlugin",value:function(e=null,t){const n="function"==typeof t?t(e,this.state.plugins):[e,...this.state.plugins],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e=null){if(!e||!this.view.docView)return;const t=this.state.reconfigure({plugins:this.state.plugins.filter(t=>!t.key.startsWith("".concat(e,"$")))});this.view.updateState(t)}},{key:"destroy",value:function(){this.view&&this.view.destroy()}}]),n}(L);t.Editor=E;var j={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(e){e&&e.element&&this.$nextTick(()=>{this.$el.appendChild(e.element.firstChild),e.setParentComponent(this)})}}},render:e=>e("div"),beforeDestroy(){this.editor.element=this.$el}};t.EditorContent=j;let P=function(){function e({options:t}){M(this,e),this.options=t,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.blurHandler=()=>{this.preventHide?this.preventHide=!1:this.options.editor.emit("menubar:focusUpdate",!1)},this.options.editor.on("blur",this.blurHandler)}return b(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 N={props:{editor:{default:null,type:Object}},data:()=>({focused:!1}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{var t;e.registerPlugin((t={editor:e,element:this.$el},new o.Plugin({key:new o.PluginKey("menu_bar"),view:e=>new P({editorView:e,options:t})}))),this.focused=e.focused,e.on("focus",()=>{this.focused=!0}),e.on("menubar:focusUpdate",e=>{this.focused=e})})}}},render(){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 H(e,t,n){const r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,Math.max(t,0)),r}function R(e,t){const n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function F(e,t,n=!1){const{node:r,offset:o}=e.docView.domFromPos(t);let i,a;if(3===r.nodeType)n&&o<r.nodeValue.length?(a=R(H(r,o-1,o),-1),i="right"):o<r.nodeValue.length&&(a=R(H(r,o,o+1),-1),i="left");else if(r.firstChild){if(o<r.childNodes.length){const e=r.childNodes[o];a=R(3===e.nodeType?H(e):e,-1),i="left"}if((!a||a.top===a.bottom)&&o){const e=r.childNodes[o-1];a=R(3===e.nodeType?H(e):e,1),i="right"}}else a=r.getBoundingClientRect(),i="left";const s=a[i];return{top:a.top,bottom:a.bottom,left:s,right:s}}t.EditorMenuBar=N;let I=function(){function e({options:t,editorView:n}){M(this,e),this.options={element:null,keepInBounds:!0,onUpdate:()=>!1,...t},this.editorView=n,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=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler)}return b(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){const{state:n}=e;if(e.composing)return;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(n.selection.empty)return void this.hide();const{from:r,to:o}=n.selection,i=F(e,r),a=F(e,o,!0),s=this.options.element.offsetParent;if(!s)return void this.hide();const l=s.getBoundingClientRect(),u=this.options.element.getBoundingClientRect(),c=(i.left+a.left)/2-l.left;this.left=Math.round(this.options.keepInBounds?Math.min(l.width-u.width/2,Math.max(c,u.width/2)):c),this.bottom=Math.round(l.bottom-i.top),this.top=Math.round(a.bottom-l.top),this.isActive=!0,this.sendUpdate()}},{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 z={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:()=>({menu:{isActive:!1,left:0,bottom:0}}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{var t;e.registerPlugin((t={editor:e,element:this.$el,keepInBounds:this.keepInBounds,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}},new o.Plugin({key:new o.PluginKey("menu_bubble"),view:e=>new I({editorView:e,options:t})})))})}}},render(){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(){this.editor.unregisterPlugin("menu_bubble")}};t.EditorMenuBubble=z;let $=function(){function e({options:t,editorView:n}){M(this,e),this.options={resizeObserver:!0,element:null,onUpdate:()=>!1,...t},this.preventHide=!1,this.editorView=n,this.isActive=!1,this.top=0,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler),this.options.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{this.isActive&&this.update(this.editorView)}),this.resizeObserver.observe(this.editorView.dom))}return b(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){const{state:n}=e;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(!n.selection.empty)return void this.hide();const r=e.domAtPos(n.selection.anchor);if(!("<br>"===r.node.innerHTML&&"P"===r.node.tagName&&r.node.parentNode===e.dom))return void this.hide();const o=this.options.element.offsetParent;if(!o)return void this.hide();const i=o.getBoundingClientRect(),a=e.coordsAtPos(n.selection.anchor).top-i.top;this.isActive=!0,this.top=a,this.sendUpdate()}},{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 B={props:{editor:{default:null,type:Object}},data:()=>({menu:{isActive:!1,left:0,bottom:0}}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{var t;e.registerPlugin((t={editor:e,element:this.$el,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}},new o.Plugin({key:new o.PluginKey("floating_menu"),view:e=>new $({editorView:e,options:t})})))})}}},render(){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(){this.editor.unregisterPlugin("floating_menu")}};t.EditorFloatingMenu=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformError=u,t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return k(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,l=n-2;s>i;s--,l--){var u=o.node(s),c=o.index(s);if(u.type.spec.isolating)return!1;var d=u.content.cutByIndex(c,u.childCount),h=r&&r[l]||u;if(h!=u&&(d=d.replaceChild(0,h.type.create(h.attrs))),!u.canReplace(c+1,u.childCount)||!h.type.validContent(d))return!1}var p=o.indexAfter(i),f=r&&r[0];return o.node(i).canReplaceWith(p,p,f?f.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 l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(1==a)d=c.canReplace(u,u,o);else{var h=c.contentMatchAt(u).findWrapping(o.firstChild.type);d=h&&c.canReplaceWith(u,u,h[0])}if(d)return 0==l?r.pos:l<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,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);if(!s||!s.validEnd)return null;return a}(r,t);if(!i)return null;return o.map(M).concat({type:t,attrs:n}).concat(i.map(M))},t.insertPoint=b,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&&k(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||!y(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(163),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,l=0;l<this.ranges.length;l+=3){var u=this.ranges[l]-(this.inverted?r:0);if(u>e)break;var c=this.ranges[l+i],d=this.ranges[l+s],h=u+c;if(e<=h){var p=u+r+((c?e==u?-1:e==h?1:t:t)<0?0:d);if(n)return p;var f=e==(t<0?u:h)?null:l/3+(e-u)*o;return new a(p,t<0?e!=u:e!=h,f)}r+=d-c}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 l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;var u=this.ranges[s+o];if(e<=l+u&&s==3*r)return!0;n+=this.ranges[s+a]-u}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),l=this.ranges[r+t],u=this.ranges[r+n];e(a,a+l,s,s+u),o+=u-l}},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 l=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function u(e){var t=Error.call(this,e);return t.__proto__=u.prototype,t}t.Mapping=l,l.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new l(this.maps,this.mirror,e,t)},l.prototype.copy=function(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},l.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},l.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)}},l.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)]},l.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},l.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)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.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},l.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},l.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)},u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.name="TransformError";var c=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l};t.Transform=c;var d={before:{configurable:!0},docChanged:{configurable:!0}};function h(){throw new Error("Override me")}d.before.get=function(){return this.docs.length?this.docs[0]:this.doc},c.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new u(t.failed);return this},c.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},c.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(c.prototype,d);var p=Object.create(null),f=function(){};t.Step=f,f.prototype.apply=function(e){return h()},f.prototype.getMap=function(){return s.empty},f.prototype.invert=function(e){return h()},f.prototype.map=function(e){return h()},f.prototype.merge=function(e){return null},f.prototype.toJSON=function(){return h()},f.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)},f.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 _=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}(f);t.ReplaceStep=_,f.jsonID("replace",_);var g=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}(f);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 y(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function M(e){return{type:e,attrs:null}}function k(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function b(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=g,f.jsonID("replaceAround",g),c.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),l=a,u=s,c=r.Fragment.empty,d=0,h=i,p=!1;h>t;h--)p||n.index(h)>0?(p=!0,c=r.Fragment.from(n.node(h).copy(c)),d++):l--;for(var f=r.Fragment.empty,m=0,_=i,v=!1;_>t;_--)v||o.after(_+1)<o.end(_)?(v=!0,f=r.Fragment.from(o.node(_).copy(f)),m++):u++;return this.step(new g(l,u,a,s,new r.Slice(c.append(f),d,m),c.size-d,!0))},c.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 g(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},c.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),l=s.map(t,1),u=s.map(t+e.nodeSize,1);return i.step(new g(l,u,l+1,u-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},c.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 g(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},c.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,l=o.depth-t,u=t-1;s>l;s--,u--){i=r.Fragment.from(o.node(s).copy(i));var c=n&&n[u];a=r.Fragment.from(c?c.type.create(c.attrs,a):o.node(s).copy(a))}return this.step(new _(e,e,new r.Slice(i.append(a),t,t),!0))},c.prototype.join=function(e,t){void 0===t&&(t=1);var n=new _(e-t,e+t,r.Slice.empty,!0);return this.step(n)};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=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 T(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}(f);t.AddMarkStep=L,f.jsonID("addMark",L);var T=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 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:"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}(f);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 S(i,a,o)?new _(t,n,o):new D(i,a,o).fit()}function S(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}t.RemoveMarkStep=T,f.jsonID("removeMark",T),c.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,u){if(r.isInline){var c=r.marks;if(!n.isInSet(c)&&u.type.allowsMarkType(n.type)){for(var d=Math.max(l,e),h=Math.min(l+r.nodeSize,t),p=n.addToSet(c),f=0;f<c.length;f++)c[f].isInSet(p)||(a&&a.to==d&&a.mark.eq(c[f])?a.to=h:o.push(a=new T(d,h,c[f])));s&&s.to==d?s.to=h:i.push(s=new L(d,h,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},c.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 l=null;if(n instanceof r.MarkType)for(var u,c=o.marks;u=n.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c);else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length)for(var d=Math.min(s+o.nodeSize,t),h=0;h<l.length;h++){for(var p=l[h],f=void 0,m=0;m<i.length;m++){var _=i[m];_.step==a-1&&p.eq(i[m].style)&&(f=_)}f?(f.to=d,f.step=a):i.push({style:p,from:Math.max(s,e),to:d,step:a})}}})),i.forEach((function(e){return o.step(new T(e.from,e.to,e.style))})),this},c.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 l=o.child(s),u=a+l.nodeSize,c=n.matchType(l.type,l.attrs);if(c){n=c;for(var d=0;d<l.marks.length;d++)t.allowsMarkType(l.marks[d].type)||this.step(new T(a,u,l.marks[d]))}else i.push(new _(a,u,r.Slice.empty));a=u}if(!n.validEnd){var h=n.fillBefore(r.Fragment.empty,!0);this.replace(a,a,new r.Slice(h,0,0))}for(var p=i.length-1;p>=0;p--)this.step(i[p]);return this},c.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},c.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},c.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),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).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,l=i.depth;s&&l&&1==a.childCount;)a=a.firstChild.content,s--,l--;var u=new r.Slice(a,s,l);return t>-1?new g(o.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||o.pos!=this.$to.pos?new _(o.pos,i.pos,u):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,l=a.match,u=void 0,c=void 0;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:c};if(2==e&&o&&(u=l.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:u};if(n&&l.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 l=this.unplaced,u=o?o.content:l.content,c=l.openStart-t,d=0,h=[],p=this.frontier[n],f=p.match,m=p.type;if(i){for(var _=0;_<i.childCount;_++)h.push(i.child(_));f=f.matchFragment(i)}for(var g=u.size+t-(l.content.size-l.openEnd);d<u.childCount;){var v=u.child(d),y=f.matchType(v.type);if(!y)break;(++d>1||0==c||v.content.size)&&(f=y,h.push(E(v.mark(m.allowedMarks(v.marks)),1==d?c:0,d==u.childCount?g:-1)))}var M=d==u.childCount;M||(g=-1),this.placed=A(this.placed,n,r.Fragment.from(h)),this.frontier[n].match=f,M&&g<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var k=0,b=u;k<g;k++){var w=b.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),b=w.content}this.unplaced=M?0==t?r.Slice.empty:new r.Slice(C(l.content,t-1,1),t-1,g<0?l.openEnd:t-1):new r.Slice(C(l.content,t,d),l.openStart,l.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 l=this.frontier[s],u=l.match,c=j(e,s,l.type,u,!0);if(!c||c.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),c.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(S(o,i,n))return this.step(new _(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 l=o.depth,u=o.pos-1;l>0;l--,u--){var c=o.node(l).type.spec;if(c.defining||c.isolating)break;a.indexOf(l)>-1?s=l:o.before(l)==u&&a.splice(1,0,-l)}for(var d=a.indexOf(s),h=[],p=n.openStart,f=n.content,m=0;;m++){var g=f.firstChild;if(h.push(g),m==n.openStart)break;f=g.content}p>0&&h[p-1].type.spec.defining&&o.node(d).type!=h[p-1].type?p-=1:p>=2&&h[p-1].isTextblock&&h[p-2].type.spec.defining&&o.node(d).type!=h[p-2].type&&(p-=2);for(var v=n.openStart;v>=0;v--){var y=(v+p+1)%(n.openStart+1),M=h[y];if(M)for(var k=0;k<a.length;k++){var b=a[(k+d)%a.length],w=!0;b<0&&(w=!1,b=-b);var L=o.node(b-1),T=o.index(b-1);if(L.canReplaceWith(T,T,M.type,M.marks))return this.replace(o.before(b),w?i.after(b):t,new r.Slice(P(n.content,0,n.openStart,y),y,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},c.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=b(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.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 l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Highlight=S,t.Suggestions=N,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 r,o=n(164),i=n(188),a=(r=n(642))&&r.__esModule?r:{default:r},s=n(177),l=n(187),u=n(163),c=n(162),d=n(394),h=n(165),p=n(186),f=n(646);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(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 g(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),e}function v(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 M(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=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}let w=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block*",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleWrap)(e)}},{key:"keys",value:function({type:e}){return{"Ctrl->":(0,i.toggleWrap)(e)}}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^\s*>\s$/,e)]}}]),n}(o.Node);t.Blockquote=w;let L=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleList)(e,t.nodes.list_item)}},{key:"keys",value:function({type:e,schema:t}){return{"Shift-Ctrl-8":(0,i.toggleList)(e,t.nodes.list_item)}}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^\s*([-+*])\s$/,e)]}}]),n}(o.Node);t.BulletList=L;let T=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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:()=>["pre",["code",0]]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleBlockType)(e,t.nodes.paragraph)}},{key:"keys",value:function({type:e}){return{"Shift-Ctrl-\\":(0,i.setBlockType)(e)}}},{key:"inputRules",value:function({type:e}){return[(0,i.textblockTypeInputRule)(/^```$/,e)]}}]),n}(o.Node);function x({doc:e,name:t}){const n=[],r=(0,l.findBlockNodes)(e).filter(e=>e.node.type.name===t),o=e=>e.reduce((e,t)=>e.concat(Array.isArray(t)?o(t):t),[]);return r.forEach(e=>{let t=e.pos+1;const r=a.default.highlightAuto(e.node.textContent).value;o(function e(t,n=[]){return t.map(t=>{const r=[...n,...t.properties?t.properties.className:[]];return t.children?e(t.children,r):{text:t.value,classes:r}})}(r)).map(e=>{const n=t,r=n+e.text.length;return t=r,{...e,from:n,to:r}}).forEach(e=>{const t=s.Decoration.inline(e.from,e.to,{class:e.classes.join(" ")});n.push(t)})}),s.DecorationSet.create(e,n)}function S({name:e}){return new o.Plugin({name:new o.PluginKey("highlight"),state:{init:(t,{doc:n})=>x({doc:n,name:e}),apply:(t,n,r,o)=>{const i=r.selection.$head.parent.type.name,a=o.selection.$head.parent.type.name,s=(0,l.findBlockNodes)(r.doc).filter(t=>t.node.type.name===e),u=(0,l.findBlockNodes)(o.doc).filter(t=>t.node.type.name===e);return t.docChanged&&([i,a].includes(e)||u.length!==s.length)?x({doc:t.doc,name:e}):n.map(t.mapping,t.doc)}},props:{decorations(e){return this.getState(e)}}})}t.CodeBlock=T;let D=function(e){v(n,e);var t=M(n);function n(e={}){var r;m(this,n),r=t.call(this,e);try{Object.entries(r.options.languages).forEach(([e,t])=>{a.default.registerLanguage(e,t)})}catch(e){throw new Error("Invalid syntax highlight definitions: define at least one highlight.js language mapping")}return r}return g(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:()=>["pre",["code",0]]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleBlockType)(e,t.nodes.paragraph)}},{key:"keys",value:function({type:e}){return{"Shift-Ctrl-\\":(0,i.setBlockType)(e)}}},{key:"inputRules",value:function({type:e}){return[(0,i.textblockTypeInputRule)(/^```$/,e)]}},{key:"plugins",get:function(){return[S({name:this.name})]}}]),n}(o.Node);t.CodeBlockHighlight=D;let Y=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"hard_break"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}},{key:"commands",value:function({type:e}){return()=>(0,i.chainCommands)(i.exitCode,(t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0))}},{key:"keys",value:function({type:e}){const t=(0,i.chainCommands)(i.exitCode,(t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0));return{"Mod-Enter":t,"Shift-Enter":t}}}]),n}(o.Node);t.HardBreak=Y;let C=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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(e=>({tag:"h".concat(e),attrs:{level:e}})),toDOM:e=>["h".concat(e.attrs.level),0]}}},{key:"commands",value:function({type:e,schema:t}){return n=>(0,i.toggleBlockType)(e,t.nodes.paragraph,n)}},{key:"keys",value:function({type:e}){return this.options.levels.reduce((t,n)=>({...t,["Shift-Ctrl-".concat(n)]:(0,i.setBlockType)(e,{level:n})}),{})}},{key:"inputRules",value:function({type:e}){return this.options.levels.map(t=>(0,i.textblockTypeInputRule)(new RegExp("^(#{1,".concat(t,"})\\s$")),e,()=>({level:t})))}}]),n}(o.Node);t.Heading=C;let A=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"horizontal_rule"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]}}},{key:"commands",value:function({type:e}){return()=>(t,n)=>n(t.tr.replaceSelectionWith(e.create()))}},{key:"inputRules",value:function({type:e}){return[(0,i.nodeInputRule)(/^(?:---|___\s|\*\*\*\s)$/,e)]}}]),n}(o.Node);t.HorizontalRule=A;const O=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/;let E=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]}}},{key:"commands",value:function({type:e}){return t=>(n,r)=>{const{selection:o}=n,i=o.$cursor?o.$cursor.pos:o.$to.pos,a=e.create(t);r(n.tr.insert(i,a))}}},{key:"inputRules",value:function({type:e}){return[(0,i.nodeInputRule)(O,e,e=>{const[,t,n,r]=e;return{src:n,alt:t,title:r}})]}},{key:"plugins",get:function(){return[new o.Plugin({props:{handleDOMEvents:{drop(e,t){if(!(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length))return;const n=Array.from(t.dataTransfer.files).filter(e=>/image/i.test(e.type));if(0===n.length)return;t.preventDefault();const{schema:r}=e.state,o=e.posAtCoords({left:t.clientX,top:t.clientY});n.forEach(t=>{const n=new FileReader;n.onload=t=>{const n=r.nodes.image.create({src:t.target.result}),i=e.state.tr.insert(o.pos,n);e.dispatch(i)},n.readAsDataURL(t)})}}}})]}}]),n}(o.Node);t.Image=E;let j=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}},{key:"keys",value:function({type:e}){return{Enter:(0,i.splitListItem)(e),Tab:(0,i.sinkListItem)(e),"Shift-Tab":(0,i.liftListItem)(e)}}}]),n}(o.Node);function P({char:e="@",allowSpaces:t=!1,startOfLine:n=!1}){return r=>{if(r.depth<=0)return!1;const o="\\".concat(e),i=new RegExp("\\s".concat(o,"$")),a=n?"^":"",s=t?new RegExp("".concat(a).concat(o,".*?(?=\\s").concat(o,"|$)"),"gm"):new RegExp("".concat(a,"(?:^)?").concat(o,"[^\\s").concat(o,"]*"),"gm"),l=r.before(),u=r.end(),c=function(e,t,n,r,o,i="\0"){let a="",s=!0,l=null;return e.content.nodesBetween(t,n,(e,u)=>{if(e.isText){if(l)return void(l=null);a+=e.text.slice(Math.max(t,u)-u,n-u),s=!r}else e.isLeaf&&i?(a+=i,s=!r):e.isInline&&!e.isLeaf?(a+=o,e.textContent&&(a+=e.textContent,l=e),a+=o,s=!s):!s&&e.isBlock&&(a+=r,s=!0)},0),a}(r.doc,l,u,"\0","\0");let d,h=s.exec(c);for(;null!==h;){const n=h.input.slice(Math.max(0,h.index-1),h.index);if(/^[\s\0]?$/.test(n)){const n=h.index+r.start();let o=n+h[0].length;t&&i.test(c.slice(o-1,o+1))&&(h[0]+=" ",o+=1),n<r.pos&&o>=r.pos&&(d={range:{from:n,to:o},query:h[0].slice(e.length),text:h[0]})}h=s.exec(c)}return d}}function N({matcher:e={char:"@",allowSpaces:!1,startOfLine:!1},appendText:t=null,suggestionClass:n="suggestion",command:r=(()=>!1),items:o=[],onEnter:a=(()=>!1),onChange:l=(()=>!1),onExit:u=(()=>!1),onKeyDown:d=(()=>!1),onFilter:h=((e,t)=>t?e.filter(e=>JSON.stringify(e).toLowerCase().includes(t.toLowerCase())):e)}){return new c.Plugin({key:new c.PluginKey("suggestions"),view(){return{update:async(e,n)=>{const s=this.key.getState(n),c=this.key.getState(e.state),d=s.active&&c.active&&s.range.from!==c.range.from,p=!s.active&&c.active,f=s.active&&!c.active,m=p||d,_=!p&&!f&&s.query!==c.query&&!d,g=f||d;if(!m&&!_&&!g)return;const v=g?s:c,y=document.querySelector('[data-decoration-id="'.concat(v.decorationId,'"]')),M=y?{getBoundingClientRect:()=>y.getBoundingClientRect(),clientWidth:y.clientWidth,clientHeight:y.clientHeight}:null,k={view:e,range:v.range,query:v.query,text:v.text,decorationNode:y,virtualNode:M,items:_||m?await h(Array.isArray(o)?o:await o(),v.query):[],command:({range:n,attrs:o})=>{r({range:n,attrs:o,schema:e.state.schema})(e.state,e.dispatch,e),t&&(0,i.insertText)(t)(e.state,e.dispatch,e)}};g&&u(k),_&&l(k),m&&a(k)}}},state:{init:()=>({active:!1,range:{},query:null,text:null}),apply(t,n){const{selection:r}=t,o={...n};if(r.from===r.to){(r.from<n.range.from||r.from>n.range.to)&&(o.active=!1);const t=r.$from,i=P(e)(t),a=(Math.random()+1).toString(36).substr(2,5);i?(o.active=!0,o.decorationId=n.decorationId?n.decorationId:a,o.range=i.range,o.query=i.query,o.text=i.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(e,t){const{active:n,range:r}=this.getState(e.state);return!!n&&d({view:e,event:t,range:r})},decorations(e){const{active:t,range:r,decorationId:o}=this.getState(e);return t?s.DecorationSet.create(e.doc,[s.Decoration.inline(r.from,r.to,{nodeName:"span",class:n,"data-decoration-id":o})]):null}}})}t.ListItem=j;let H=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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 u.Fragment.fromJSON(e,[{type:"text",text:"".concat(this.options.matcher.char).concat(t)}])}},{key:"insertMention",value:function(e,t,n){const r=n.nodes[this.name],o=this.createFragment(n,t.label);return(0,i.replaceText)(e,r,t,o)}},{key:"schema",get:function(){return{attrs:{id:{},label:{}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:e=>["span",{class:this.options.mentionClass,"data-mention-id":e.attrs.id},"".concat(this.options.matcher.char).concat(e.attrs.label)],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.getAttribute("data-mention-id"),label:this.getLabel(e)}),getContent:(e,t)=>{const n=this.getLabel(e);return this.createFragment(t,n)}}]}}},{key:"commands",value:function({schema:e}){return t=>this.insertMention(null,t,e)}},{key:"plugins",get:function(){return[N({command:({range:e,attrs:t,schema:n})=>this.insertMention(e,t,n),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}(o.Node);t.Mention=H;let R=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleList)(e,t.nodes.list_item)}},{key:"keys",value:function({type:e,schema:t}){return{"Shift-Ctrl-9":(0,i.toggleList)(e,t.nodes.list_item)}}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^(\d+)\.\s$/,e,e=>({order:+e[1]}),(e,t)=>t.childCount+t.attrs.order===+e[1])]}}]),n}(o.Node);t.OrderedList=R;var F=(0,d.tableNodes)({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:e=>e.style.backgroundColor||null,setDOMAttr(e,t){if(e){const n={style:"".concat(t.style||"","background-color: ").concat(e,";")};Object.assign(t,n)}}}}});let I=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table"}},{key:"defaultOptions",get:function(){return{resizable:!1}}},{key:"schema",get:function(){return F.table}},{key:"commands",value:function({schema:e}){return{createTable:({rowsCount:t,colsCount:n,withHeaderRow:r})=>(o,i)=>{const a=o.tr.selection.anchor+1,s=(0,l.createTable)(e,t,n,r),u=o.tr.replaceSelectionWith(s).scrollIntoView(),d=u.doc.resolve(a);u.setSelection(c.TextSelection.near(d)),i(u)},addColumnBefore:()=>d.addColumnBefore,addColumnAfter:()=>d.addColumnAfter,deleteColumn:()=>d.deleteColumn,addRowBefore:()=>d.addRowBefore,addRowAfter:()=>d.addRowAfter,deleteRow:()=>d.deleteRow,deleteTable:()=>d.deleteTable,toggleCellMerge:()=>(e,t)=>{(0,d.mergeCells)(e,t)||(0,d.splitCell)(e,t)},mergeCells:()=>d.mergeCells,splitCell:()=>d.splitCell,toggleHeaderColumn:()=>d.toggleHeaderColumn,toggleHeaderRow:()=>d.toggleHeaderRow,toggleHeaderCell:()=>d.toggleHeaderCell,setCellAttr:({name:e,value:t})=>(0,d.setCellAttr)(e,t),fixTables:()=>d.fixTables}}},{key:"keys",value:function(){return{Tab:(0,d.goToNextCell)(1),"Shift-Tab":(0,d.goToNextCell)(-1)}}},{key:"plugins",get:function(){return[...this.options.resizable?[(0,d.columnResizing)()]:[],(0,d.tableEditing)()]}}]),n}(o.Node);t.Table=I;let z=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table_header"}},{key:"schema",get:function(){return F.table_header}}]),n}(o.Node);t.TableHeader=z;let $=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table_cell"}},{key:"schema",get:function(){return F.table_cell}}]),n}(o.Node);t.TableCell=$;let B=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"table_row"}},{key:"schema",get:function(){return F.table_row}}]),n}(o.Node);t.TableRow=B;let W=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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(){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(){return{attrs:{done:{default:!1}},draggable:!0,content:this.options.nested?"(paragraph|todo_list)+":"paragraph+",toDOM:e=>{const{done:t}=e.attrs;return["li",{"data-type":this.name,"data-done":t.toString()},["span",{class:"todo-checkbox",contenteditable:"false"}],["div",{class:"todo-content"},0]]},parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]'),getAttrs:e=>({done:"true"===e.getAttribute("data-done")})}]}}},{key:"keys",value:function({type:e}){return{Enter:(0,i.splitToDefaultListItem)(e),Tab:this.options.nested?(0,i.sinkListItem)(e):()=>{},"Shift-Tab":(0,i.liftListItem)(e)}}}]),n}(o.Node);t.TodoItem=W;let q=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"todo_list"}},{key:"schema",get:function(){return{group:"block",content:"todo_item+",toDOM:()=>["ul",{"data-type":this.name},0],parseDOM:[{priority:51,tag:'[data-type="'.concat(this.name,'"]')}]}}},{key:"commands",value:function({type:e,schema:t}){return()=>(0,i.toggleList)(e,t.nodes.todo_item)}},{key:"inputRules",value:function({type:e}){return[(0,i.wrappingInputRule)(/^\s*(\[ \])\s$/,e)]}}]),n}(o.Node);t.TodoList=q;let U=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"bold"}},{key:"schema",get:function(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]}}},{key:"keys",value:function({type:e}){return{"Mod-b":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,e)]}}]),n}(o.Mark);t.Bold=U;let V=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"code"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:()=>["code",0]}}},{key:"keys",value:function({type:e}){return{"Mod-`":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/(?:`)([^`]+)(?:`)$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/(?:`)([^`]+)(?:`)/g,e)]}}]),n}(o.Mark);t.Code=V;let J=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"italic"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}},{key:"keys",value:function({type:e}){return{"Mod-i":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/(?:^|[^_])(_([^_]+)_)$/,e),(0,i.markInputRule)(/(?:^|[^*])(\*([^*]+)\*)$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/_([^_]+)_/g,e),(0,i.markPasteRule)(/\*([^*]+)\*/g,e)]}}]),n}(o.Mark);t.Italic=J;let G=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"link"}},{key:"defaultOptions",get:function(){return{openOnClick:!0,target:null}}},{key:"schema",get:function(){return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target")})}],toDOM:e=>["a",{...e.attrs,rel:"noopener noreferrer nofollow",target:e.attrs.target||this.options.target},0]}}},{key:"commands",value:function({type:e}){return t=>t.href?(0,i.updateMark)(e,t):(0,i.removeMark)(e)}},{key:"pasteRules",value:function({type:e}){return[(0,i.pasteRule)(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,e,e=>({href:e}))]}},{key:"plugins",get:function(){return this.options.openOnClick?[new o.Plugin({props:{handleClick:(e,t,n)=>{const{schema:r}=e.state,o=(0,l.getMarkAttrs)(e.state,r.marks.link);o.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(o.href,o.target))}}})]:[]}}]),n}(o.Mark);t.Link=G;let K=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"strike"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e}],toDOM:()=>["s",0]}}},{key:"keys",value:function({type:e}){return{"Mod-d":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}},{key:"inputRules",value:function({type:e}){return[(0,i.markInputRule)(/~([^~]+)~$/,e)]}},{key:"pasteRules",value:function({type:e}){return[(0,i.markPasteRule)(/~([^~]+)~/g,e)]}}]),n}(o.Mark);t.Strike=K;let Z=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"underline"}},{key:"schema",get:function(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e}],toDOM:()=>["u",0]}}},{key:"keys",value:function({type:e}){return{"Mod-u":(0,i.toggleMark)(e)}}},{key:"commands",value:function({type:e}){return()=>(0,i.toggleMark)(e)}}]),n}(o.Mark);t.Underline=Z;let X=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"collaboration"}},{key:"init",value:function(){this.getSendableSteps=this.debounce(e=>{const t=(0,p.sendableSteps)(e);t&&this.options.onSendable({editor:this.editor,sendable:{version:t.version,steps:t.steps.map(e=>e.toJSON()),clientID:t.clientID}})},this.options.debounce),this.editor.on("transaction",({state:e})=>{this.getSendableSteps(e)})}},{key:"defaultOptions",get:function(){return{version:0,clientID:Math.floor(4294967295*Math.random()),debounce:250,onSendable:()=>{},update:({steps:e,version:t})=>{const{state:n,view:r,schema:o}=this.editor;(0,p.getVersion)(n)>t||r.dispatch((0,p.receiveTransaction)(n,e.map(e=>h.Step.fromJSON(o,e.step)),e.map(e=>e.clientID)))}}}},{key:"plugins",get:function(){return[(0,p.collab)({version:this.options.version,clientID:this.options.clientID})]}},{key:"debounce",value:function(e,t){let n;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null},t)}}}]),n}(o.Extension);t.Collaboration=X;let Q=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"focus"}},{key:"defaultOptions",get:function(){return{className:"has-focus",nested:!1}}},{key:"plugins",get:function(){return[new o.Plugin({props:{decorations:({doc:e,plugins:t,selection:n})=>{const r=t.find(e=>e.key.startsWith("editable$")).props.editable()&&this.options.className,{focused:o}=this.editor,{anchor:i}=n,a=[];return!(!r||!o)&&(e.descendants((e,t)=>{if(i>=t&&i<=t+e.nodeSize&&!e.isText){const n=s.Decoration.node(t,t+e.nodeSize,{class:this.options.className});a.push(n)}return this.options.nested}),s.DecorationSet.create(e,a))}}})]}}]),n}(o.Extension);t.Focus=Q;let ee=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"history"}},{key:"defaultOptions",get:function(){return{depth:"",newGroupDelay:""}}},{key:"keys",value:function(){return{"Mod-z":f.undo,"Mod-y":f.redo,"Shift-Mod-z":f.redo,"Mod-я":f.undo,"Shift-Mod-я":f.redo}}},{key:"plugins",get:function(){return[(0,f.history)({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}},{key:"commands",value:function(){return{undo:()=>f.undo,redo:()=>f.redo,undoDepth:()=>f.undoDepth,redoDepth:()=>f.redoDepth}}}]),n}(o.Extension);t.History=ee;let te=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(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(){return[new o.Plugin({props:{decorations:({doc:e,plugins:t,selection:n})=>{const r=t.find(e=>e.key.startsWith("editable$")).props.editable()||!this.options.showOnlyWhenEditable,{anchor:o}=n,i=[],a=0===e.textContent.length;return!!r&&(e.descendants((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,r=0===e.content.size;if((n||!this.options.showOnlyCurrent)&&r){const n=[this.options.emptyNodeClass];a&&n.push(this.options.emptyEditorClass);const r=s.Decoration.node(t,t+e.nodeSize,{class:n.join(" "),"data-empty-text":"function"==typeof this.options.emptyNodeText?this.options.emptyNodeText(e):this.options.emptyNodeText});i.push(r)}return!1}),s.DecorationSet.create(e,i))}}})]}}]),n}(o.Extension);t.Placeholder=te;let ne=function(e){v(n,e);var t=M(n);function n(e={}){var r;return m(this,n),(r=t.call(this,e)).results=[],r.searchTerm=null,r._updating=!1,r}return g(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(){return{find:e=>this.find(e),replace:e=>this.replace(e),replaceAll:e=>this.replaceAll(e),clearSearch:()=>this.clear()}}},{key:"findRegExp",get:function(){return RegExp(this.searchTerm,this.options.caseSensitive?"gu":"gui")}},{key:"decorations",get:function(){return this.results.map(e=>s.Decoration.inline(e.from,e.to,{class:this.options.findClass}))}},{key:"_search",value:function(e){this.results=[];const t=[];let n=0;this.searchTerm&&(e.descendants((e,r)=>{e.isText?t[n]?t[n]={text:t[n].text+e.text,pos:t[n].pos}:t[n]={text:e.text,pos:r}:n+=1}),t.forEach(({text:e,pos:t})=>{const n=this.findRegExp;let r;for(;(r=n.exec(e))&&""!==r[0];)this.results.push({from:t+r.index,to:t+r.index+r[0].length})}))}},{key:"replace",value:function(e){return(t,n)=>{if(!this.results[0])return;const{from:r,to:o}=this.results[0];n(t.tr.insertText(e,r,o)),this.editor.commands.find(this.searchTerm)}}},{key:"rebaseNextResult",value:function(e,t,n=0){const r=t+1;if(!this.results[r])return null;const{from:o,to:i}=this.results[t],a=i-o-e.length+n,{from:s,to:l}=this.results[r];return this.results[r]={to:l-a,from:s-a},a}},{key:"replaceAll",value:function(e){return({tr:t},n)=>{let r;this.results.length&&(this.results.forEach(({from:n,to:o},i)=>{t.insertText(e,n,o),r=this.rebaseNextResult(e,i,r)}),n(t),this.editor.commands.find(this.searchTerm))}}},{key:"find",value:function(e){return(t,n)=>{this.searchTerm=this.options.disableRegex?e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"):e,this.updateView(t,n)}}},{key:"clear",value:function(){return(e,t)=>{this.searchTerm=null,this.updateView(e,t)}}},{key:"updateView",value:function({tr:e},t){this._updating=!0,t(e),this._updating=!1}},{key:"createDeco",value:function(e){return this._search(e),this.decorations?s.DecorationSet.create(e,this.decorations):[]}},{key:"plugins",get:function(){return[new o.Plugin({state:{init:()=>s.DecorationSet.empty,apply:(e,t)=>this._updating||this.options.searching||e.docChanged&&this.options.alwaysSearch?this.createDeco(e.doc):e.docChanged?t.map(e.mapping,e.doc):t},props:{decorations(e){return this.getState(e)}}})]}}]),n}(o.Extension);t.Search=ne;let re=function(e){v(n,e);var t=M(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"name",get:function(){return"trailing_node"}},{key:"defaultOptions",get:function(){return{node:"paragraph",notAfter:["paragraph"]}}},{key:"plugins",get:function(){const e=new o.PluginKey(this.name),t=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>this.options.notAfter.includes(e.name));return[new o.Plugin({key:e,view:()=>({update:t=>{const{state:n}=t;if(!e.getState(n))return;const{doc:r,schema:o,tr:i}=n,a=o.nodes[this.options.node],s=i.insert(r.content.size,a.create());t.dispatch(s)}}),state:{init:(e,n)=>{const r=n.tr.doc.lastChild;return!(0,l.nodeEqualsType)({node:r,types:t})},apply:(e,n)=>{if(!e.docChanged)return n;const r=e.doc.lastChild;return!(0,l.nodeEqualsType)({node:r,types:t})}}})]}}]),n}(o.Extension);t.TrailingNode=re},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__endComposition=_t,t.__parseFromClipboard=ze,t.__serializeForClipboard=Ie,t.EditorView=t.DecorationSet=t.Decoration=void 0;var r=n(162),o=n(163),i=n(165),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),l=/MSIE \d/.test(navigator.userAgent),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var c=a.ie=!!(l||u||s);a.ie_version=l?document.documentMode||6:u?+u[1]:s?+s[1]:null,a.gecko=!c&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!c&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!d,a.chrome_version=d&&+d[1],a.safari=!c&&/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 h=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},f=null,m=function(e,t,n){var r=f||(f=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},_=function(e,t,n,r){return n&&(v(e,t,n,r,-1)||v(e,t,n,r,1))},g=/^(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:y(e))){var i=e.parentNode;if(1!=i.nodeType||M(e)||g.test(e.nodeName)||"false"==e.contentEditable)return!1;t=h(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?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function M(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 k=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function b(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 L(e,t){return"number"==typeof e?e:e[t]}function T(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,l=s?w(i):T(a),u=0,c=0;if(t.top<l.top+L(r,"top")?c=-(l.top-t.top+L(o,"top")):t.bottom>l.bottom-L(r,"bottom")&&(c=t.bottom-l.bottom+L(o,"bottom")),t.left<l.left+L(r,"left")?u=-(l.left-t.left+L(o,"left")):t.right>l.right-L(r,"right")&&(u=t.right-l.right+L(o,"right")),u||c)if(s)i.defaultView.scrollBy(u,c);else{var d=a.scrollLeft,h=a.scrollTop;c&&(a.scrollTop+=c),u&&(a.scrollLeft+=u);var f=a.scrollLeft-d,m=a.scrollTop-h;t={left:t.left-f,top:t.top-m,right:t.right-f,bottom:t.bottom-m}}if(s)break}}function S(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,l=e.firstChild,u=0;l;l=l.nextSibling,u++){var c=void 0;if(1==l.nodeType)c=l.getClientRects();else{if(3!=l.nodeType)continue;c=m(l).getClientRects()}for(var d=0;d<c.length;d++){var h=c[d];if(h.top<=a&&h.bottom>=s){a=Math.max(h.bottom,a),s=Math.min(h.top,s);var p=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(p<o){n=l,o=p,r=p&&3==n.nodeType?{left:h.right<t.left?h.right:h.left,top:t.top}:t,1==l.nodeType&&p&&(i=u+(t.left>=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=u+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 l=s.caretPositionFromPoint(t.left,t.top);l&&(o=(n=l).offsetNode,i=n.offset)}catch(e){}if(!o&&s.caretRangeFromPoint){var u=s.caretRangeFromPoint(t.left,t.top);u&&(o=(r=u).startContainer,i=r.startOffset)}var c,d=s.elementFromPoint(t.left,t.top+1);if(!d||!e.dom.contains(1!=d.nodeType?d.parentNode:d)){var h=e.dom.getBoundingClientRect();if(!A(t,h))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 l=s.getClientRects(),u=0;u<l.length;u++){var c=l[u];if(A(n,c))return e(s,n,c)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,h)))return null}if(a.safari&&d.draggable&&(o=i=null),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 p,f=o.childNodes[i];"IMG"==f.nodeName&&(p=f.getBoundingClientRect()).right<=t.left&&p.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(c=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==c&&(c=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 m=e.docView.nearestDesc(d,!0);return{pos:c,inside:m?m.posAtStart-m.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 l=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(l--,c=1):n<0?l--:u++,N(E(m(o,l,u),c),c<0)}var d=E(m(o,i,i),n);if(a.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var h=E(m(o,i-1,i-1),-1);if(h.top==d.top){var p=E(m(o,i,i+1),-1);if(p.top!=d.top)return N(p,p.left<h.left)}}return d}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==y(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return H(f.getBoundingClientRect(),!1)}if(i<y(o)){var _=o.childNodes[i];if(1==_.nodeType)return H(_.getBoundingClientRect(),!0)}return H(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==y(o))){var g=o.childNodes[i-1],v=3==g.nodeType?m(g,y(g)-(s?0:1)):1!=g.nodeType||"BR"==g.nodeName&&g.nextSibling?null:g;if(v)return N(E(v,1),!1)}if(i<y(o)){var M=o.childNodes[i],k=3==M.nodeType?m(M,0,s?0:1):1==M.nodeType?M:null;if(k)return N(E(k,-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 F=/[\u0590-\u08ac]/;var I=null,z=null,$=!1;function B(e,t,n){return I==t&&z==n?$:(I=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 l=0;l<s.length;l++){var u=s[l];if(u.bottom>u.top&&("up"==n?u.bottom<i.top+1:u.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 F.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 l=!(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),l})):"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},q={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(){return!1},q.beforePosition.get=function(){return!1},W.prototype.parseRule=function(){return null},W.prototype.stopEvent=function(){return!1},q.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},q.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}},q.posBefore.get=function(){return this.parent.posBeforeChild(this)},q.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},q.posAfter.get=function(){return this.posBefore+this.size},q.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>h(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 l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.parentNode.firstChild!=l)break}if(null==s&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!0;break}if(u.parentNode.lastChild!=u)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?h(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],l=i+s.size;if(-1==r&&e<=l){var u=i+s.border;if(e>=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var d=this.children[c-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=h(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var p=a+1;p<this.children.length;p++){var f=this.children[p];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=h(f.dom);break}t+=f.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}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,l=0;s<this.children.length;s++){var u=this.children[s],c=l+u.size;if(o>l&&i<c)return u.setSelection(e-l-u.border,t-l-u.border,n,r);l=c}var d=this.domFromPos(e,e?-1:1),p=t==e?d:this.domFromPos(t,t?-1:1),f=n.getSelection(),m=!1;if((a.gecko||a.safari)&&e==t){var g=d.node,v=d.offset;if(3==g.nodeType)(m=v&&"\n"==g.nodeValue[v-1])&&v==g.nodeValue.length&&g.nextSibling&&"BR"==g.nextSibling.nodeName&&(d=p={node:g.parentNode,offset:h(g)+1});else{var y=g.childNodes[v-1];m=y&&("BR"==y.nodeName||"false"==y.contentEditable)}}if(a.gecko&&f.focusNode&&f.focusNode!=p.node&&1==f.focusNode.nodeType){var M=f.focusNode.childNodes[f.focusOffset];M&&"false"==M.contentEditable&&(r=!0)}if(r||m&&a.safari||!_(d.node,d.offset,f.anchorNode,f.anchorOffset)||!_(p.node,p.offset,f.focusNode,f.focusOffset)){var k=!1;if((f.extend||e==t)&&!m){f.collapse(d.node,d.offset);try{e!=t&&f.extend(p.node,p.offset),k=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!k){if(e>t){var b=d;d=p,p=b}var w=document.createRange();w.setEnd(p.node,p.offset),w.setStart(d.node,d.offset),f.removeAllRanges(),f.addRange(w)}}},W.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},q.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=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)}},q.domAtom.get=function(){return!1},Object.defineProperties(W.prototype,q);var U=[],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,U,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,U,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,l,u){e.call(this,t,n.isLeaf?U:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(l,u)}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 l,u,c=a.nodeViews[n.type.name],d=c&&c(n,a,(function(){return u?u.parent?u.parent.posBeforeChild(u):void 0:s}),r,i),h=d&&d.dom,p=d&&d.contentDOM;if(n.isText)if(h){if(3!=h.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else h=document.createTextNode(n.text);else h||(h=(l=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=l.contentDOM);p||n.isText||"BR"==h.nodeName||(h.hasAttribute("contenteditable")||(h.contentEditable=!1),n.type.spec.draggable&&(h.draggable=!0));var f=h;return h=ae(h,r,n),d?u=new ee(e,n,r,i,h,p,f,d,a,s+1):n.isText?new X(e,n,r,i,h,f,a):new t(e,n,r,i,h,p,f,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=r&&e.composing&&this.localCompositionNode(e,t),l=new ue(this,s&&s.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 l=0,u=[],c=null,d=0;;){if(l<o.length&&o[l].to==i){for(var h=o[l++],p=void 0;l<o.length&&o[l].to==i;)(p||(p=[h])).push(o[l++]);if(p){p.sort(ce);for(var f=0;f<p.length;f++)n(p[f],d,!!c)}else n(h,d,!!c)}var m=void 0,_=void 0;if(c)_=-1,m=c,c=null;else{if(!(d<e.childCount))break;_=d,m=e.child(d++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)u.push(o[l++]);var v=i+m.nodeSize;if(m.isText){var y=v;l<o.length&&o[l].from<y&&(y=o[l].from);for(var M=0;M<u.length;M++)u[M].to<y&&(y=u[M].to);y<v&&(c=m.cut(y-i),m=m.cut(0,y-i),v=y,_=-1)}var k=u.length?m.isInline&&!m.isLeaf?u.filter((function(e){return!e.inline})):u.slice():U;r(m,k,t.forChild(i,m),_),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){l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,o,a)||l.updateNextNode(t,n,o,e,a)||l.addNode(t,n,o,e,i),i+=t.nodeSize})),l.syncToMarks(U,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;a<n.length;a++){var s=n[a],l=s.dom;if(l.parentNode==t){for(;l!=o;)o=le(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(s instanceof G){var u=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=u?u.nextSibling:t.firstChild}}for(;o;)o=le(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.localCompositionNode=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=y(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)){var l=s.nodeValue,u=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 l=a.text;o<e.childCount;){var u=e.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){var c=l.lastIndexOf(t,r-s);if(c>=0&&c+t.length+s>=n)return s+c}}}return-1}(this.node.content,l,o-t,i-t);return u<0?null:{node:s,pos:u,text:l}}}},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)},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(){return 0==this.dirty},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,l,u,c){e.call(this,t,n,r,o,i,a,s,u,c),this.spec=l}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 l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new te(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}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 l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.tagName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=ne[0]),o=l}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):U,a=n.class?n.class.split(" ").filter(Boolean):U,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l])}if(t.style!=n.style){if(t.style)for(var u,c=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=c.exec(t.style);)e.style.removeProperty(u[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 le(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var ue=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 ce(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 l=e[a],u=s,c=s+=l.size;u>=n||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,r)),o&&(i.push(o),o=null),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function he(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 l,u,c=o.resolve(s);if(k(n)){for(l=c;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==y(e);r||o;){if(e==n)return!0;var i=h(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==y(e)}}(n.focusNode,n.focusOffset,i.dom))){var d=i.posBefore;u=new r.NodeSelection(s==d?c:o.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;l=o.resolve(p)}u||(u=ke(e,l,c,"pointer"==t||e.state.selection.head<c.pos&&!a?1:-1));return u}function pe(e){return e.editable?e.hasFocus():be(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function fe(e,t){var n=e.state.selection;if(ye(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,h(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,l=n.head;!me||n instanceof r.TextSelection||(n.$from.parent.inlineContent||(o=_e(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=_e(e,n.to))),e.docView.setSelection(s,l,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()}}ue.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}},ue.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ue.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 l=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}},ue.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,l=Math.min(o.length,s+1);s<l;s++){var u=o[s];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},ue.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 l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.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!=l&&(this.changed=!0),this.index++,!0;break}}return!1},ue.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},ue.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++},ue.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof G;)e=e.children[e.children.length-1];if(!e||!(e instanceof X)||/\n$/.test(e.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var t=document.createElement("br");this.top.children.splice(this.index++,0,new Q(this.top,U,t,null)),this.changed=!0}};var me=a.safari||a.chrome&&a.chrome_version<63;function _e(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 ge(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return ge(i);if(s)return ge(s)}}function ge(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 ye(e,t){if(t instanceof r.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Me(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Me(e)}function Me(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function ke(e,t,n,o){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||r.TextSelection.between(t,n,o)}function be(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 Le(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Te(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return Le(e,new r.TextSelection(t>0?o.$to:o.$from));var i=we(e.state,t);return!!i&&Le(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)&&Le(e,s)}if(!(a.mac&&n.indexOf("m")>-1)){var l,u=o.$head,c=u.textOffset?null:t<0?u.nodeBefore:u.nodeAfter;if(!c||c.isText)return!1;var d=t<0?u.pos-c.nodeSize:u.pos;return!!(c.isAtom||(l=e.docView.descAt(d))&&!l.contentDOM)&&(r.NodeSelection.isSelectable(c)?Le(e,new r.NodeSelection(t<0?e.state.doc.resolve(u.pos-c.nodeSize):u)):!!a.webkit&&Le(e,new r.TextSelection(e.state.doc.resolve(t<0?d:d+c.nodeSize))))}}function xe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Se(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)&&Se(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;var l=n.childNodes[r-1];if(Se(l))o=n,i=--r;else{if(3!=l.nodeType)break;r=(n=l).nodeValue.length}}else{if(Ce(n))break;for(var u=n.previousSibling;u&&Se(u);)o=n.parentNode,i=h(u),u=u.previousSibling;if(u)r=xe(n=u);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(!Se(n.childNodes[r]))break;o=n,i=++r}else{if(Ce(n))break;for(var s=n.nextSibling;s&&Se(s);)o=s.parentNode,i=h(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(k(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&&fe(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 l=we(e.state,t);if(l&&l instanceof r.NodeSelection)return Le(e,l)}if(!i.parent.inlineContent){var u=t<0?i:s,c=o instanceof r.AllSelection?r.Selection.near(u,t):r.Selection.findFrom(u,t);return!!c&&Le(e,c)}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 l=e.state.tr;return t<0?l.delete(o.pos-s.nodeSize,o.pos):l.delete(o.pos,o.pos+s.nodeSize),e.dispatch(l),!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?Te(e,-1,r)||De(e):39==n?Te(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 l=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,u=he(e,l);if(u&&!e.state.selection.eq(u)){var c=e.state.tr.setSelection(u);"pointer"==l?c.setMeta("pointer",!0):"key"==l&&c.scrollIntoView(),e.dispatch(c)}}else{var d=e.state.doc.resolve(t),h=d.sharedDepth(n);t=d.before(h+1),n=e.state.doc.resolve(n).after(h+1);var p=e.state.selection,f=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,l=r.toOffset,u=r.from,c=r.to,d=e.root.getSelection(),h=null,p=d.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(h=[{node:p,offset:d.anchorOffset}],k(d)||h.push({node:d.focusNode,offset:d.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var f=l;f>s;f--){var m=i.childNodes[f-1],_=m.pmViewDesc;if("BR"==m.nodeName&&!_){l=f;break}if(!_||_.size)break}var g=e.state.doc,v=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),y=g.resolve(u),M=null,b=v.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:s,to:l,preserveWhitespace:!y.parent.type.spec.code||"full",editableContent:!0,findPositions:h,ruleFromNode:Ne,context:y});if(h&&null!=h[0].pos){var w=h[0].pos,L=h[1]&&h[1].pos;null==L&&(L=w),M={anchor:w+u,head:L+u}}return{doc:b,sel:M,from:u,to:c}}(e,t,n);if(a.chrome&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from){var m=e.cursorWrapper.deco.type.toDOM.nextSibling,_=m&&m.nodeValue?m.nodeValue.length:1;f.sel={anchor:f.sel.anchor+_,head:f.sel.anchor+_}}var g,v,y=e.state.doc,M=y.slice(f.from,f.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(g=e.state.selection.to,v="end"):(g=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,l=a.b;if("end"==o){var u=Math.max(0,i-Math.min(s,l));r-=s+u-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(M.content,f.doc.content,f.from,g,v);if(!w){if(!(i&&p instanceof r.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.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,b(13,"Enter"))})))return void(e.lastIOSEnter=0);if(f.sel){var L=Re(e,e.state.doc,f.sel);L&&!L.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(L))}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>f.from&&"  "==f.doc.textBetween(w.start-f.from-1,w.start-f.from+1)&&(w.start--,w.endA--,w.endB--);var T,x=f.doc.resolveNoCache(w.start-f.from),S=f.doc.resolveNoCache(w.endB-f.from),D=x.sameParent(S)&&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<f.doc.content.size&&(T=r.Selection.findFrom(f.doc.resolve(x.pos+1),1,!0))&&T.head==S.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,b(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||Fe(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(Fe(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Fe(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,x,S)&&e.someProp("handleKeyDown",(function(t){return t(e,b(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()!=S.start()&&0==S.parentOffset&&x.depth==S.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==w.endA&&(w.endB-=2,S=f.doc.resolveNoCache(w.endB-f.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,b(13,"Enter"))}))}),20));var Y,C,A,O,E=w.start,j=w.endA;if(D)if(x.pos==S.pos)a.ie&&a.ie_version<=11&&0==x.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return fe(e)}),20)),Y=e.state.tr.delete(E,j),C=y.resolve(w.start).marksAcross(y.resolve(w.endA));else if(w.endA==w.endB&&(O=y.resolve(w.start))&&(A=function(e,t){for(var n,r,i,a=e.firstChild.marks,s=t.firstChild.marks,l=a,u=s,c=0;c<s.length;c++)l=s[c].removeFromSet(l);for(var d=0;d<a.length;d++)u=a[d].removeFromSet(u);if(1==l.length&&0==u.length)r=l[0],n="add",i=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=l.length||1!=u.length)return null;r=u[0],n="remove",i=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var h=[],p=0;p<t.childCount;p++)h.push(i(t.child(p)));if(o.Fragment.from(h).eq(e))return{mark:r,type:n}}(x.parent.content.cut(x.parentOffset,S.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()==S.index()-(S.textOffset?0:1)){var P=x.parent.textBetween(x.parentOffset,S.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,f.doc.slice(w.start-f.from,w.endB-f.from))),f.sel){var N=Re(e,Y.doc,f.sel);N&&!(a.chrome&&a.android&&e.composing&&N.empty&&(w.from!=w.toB||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:ke(e,t.resolve(n.anchor),t.resolve(n.head))}function Fe(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 Ie(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 l=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),u=Ue(),c=u.createElement("div");c.appendChild(l.serializeFragment(r,{document:u}));for(var d,h=c.firstChild;h&&1==h.nodeType&&(d=We[h.nodeName.toLowerCase()]);){for(var p=d.length-1;p>=0;p--){for(var f=u.createElement(d[p]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f)}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:c,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 a,s,l=i.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||l||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t,l||r)})),l)return new o.Slice(o.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0);var c=e.someProp("clipboardTextParser",(function(e){return e(t,i,r)}));c?s=c:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Ue().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);var d=a&&a.querySelector("[data-pm-slice]"),h=d&&/^(\d+) (\d+) (.*)/.exec(d.getAttribute("data-pm-slice"));if(!s){var p=e.someProp("clipboardParser")||e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema);s=p.parseSlice(a,{preserveWhitespace:!(!u&&!h),context:i})}return s=h?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,l=n.length-2;l>=0;l-=2){var u=r.nodes[n[l]];if(!u||u.hasRequiredAttrs())break;i=o.Fragment.from(u.create(n[l+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}(s,+h[1],+h[2]),h[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}(s.content,i),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}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,l=s.content;return i<r-1&&(l=Be(l,t,n,r,i+1,a)),i>=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}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"]},qe=null;function Ue(){return qe||(qe=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)&&be(e)){var e;if(this.suppressingSelectionUpdates)return fe(this.view);if(a.ie&&a.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&_(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)&&be(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var l=0;l<e.length;l++){var u=this.registerMutation(e[l],s);u&&(r=r<0?u.from:Math.min(u.from,r),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(i=!0))}if(a.gecko&&s.length>1){var c=s.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.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)||fe(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 l=e.addedNodes[s],u=l.previousSibling,c=l.nextSibling;(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(o=u),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var d=o&&o.parentNode==e.target?h(o)+1:0,p=n.localPosFromDOM(e.target,d,-1),f=i&&i.parentNode==e.target?h(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,f,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 l=a(s);if(l)return l.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 l=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(l)){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 lt(e,t,n,o){return ot(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(it(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)it(e,r.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;it(e,r.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function ut(e){return _t(e)}Qe.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!ht(e,t))if(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,b(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Qe.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Qe.keypress=function(e,t){if(!(ht(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 ct=a.mac?"metaKey":"ctrlKey";Xe.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ut(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[ct]&&("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:lt)(e,i.pos,i.inside,t)?t.preventDefault():et(e,"pointer"))};var dt=function(e,t,n,o){var i,s,l=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[ct],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var u=e.state.doc.resolve(t.pos);i=u.parent,s=u.depth?u.before():0}this.mightDrag=null;var c=o?null:n.target,d=c?e.docView.nearestDesc(c,!0):null;this.target=d?d.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&s==e.state.selection.from)&&(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(){l.view.mouseDown==l&&l.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 ht(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():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){ut(e),et(e,"pointer")},Xe.contextmenu=function(e){return ut(e)};var pt=a.android?5e3:-1;function ft(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return _t(e)}),t))}function mt(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function _t(e,t){if(e.domObserver.forceFlush(),mt(e),t||e.docView.dirty){var n=he(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(),_t(e,!0),e.markCursor=null;else if(_t(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}ft(e,pt)},Qe.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ft(e,20))};var gt=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=gt?null:t.clipboardData,i=Ie(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=gt?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 yt=function(e,t){this.slice=e,this.move=t},Mt=a.mac?"altKey":"ctrlKey";for(var kt 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);if(!a||!a.node.type.spec.draggable||a==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=Ie(e,s),u=l.dom,c=l.text;t.dataTransfer.clearData(),t.dataTransfer.setData(gt?"Text":"text/html",u.innerHTML),t.dataTransfer.effectAllowed="copyMove",gt||t.dataTransfer.setData("text/plain",c),e.dragging=new yt(s,!t[Mt])}},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 l=n&&n.slice;l?e.someProp("transformPasted",(function(e){l=e(l)})):l=ze(e,t.dataTransfer.getData(gt?"Text":"text/plain"),gt?null:t.dataTransfer.getData("text/html"),!1,s);var u=n&&!t[Mt];if(e.someProp("handleDrop",(function(n){return n(e,t,l||o.Slice.empty,u)})))t.preventDefault();else if(l){t.preventDefault();var c=l?(0,i.dropPoint)(e.state.doc,s.pos,l):s.pos;null==c&&(c=s.pos);var d=e.state.tr;u&&d.deleteSelection();var h=d.mapping.map(c),p=0==l.openStart&&0==l.openEnd&&1==l.content.childCount,f=d.doc;if(p?d.replaceRangeWith(h,h,l.content.firstChild):d.replaceRange(h,h,l),!d.doc.eq(f)){var m=d.doc.resolve(h);if(p&&r.NodeSelection.isSelectable(l.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(l.content.firstChild))d.setSelection(new r.NodeSelection(m));else{var _=d.mapping.map(c);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,r){return _=r})),d.setSelection(ke(e,m,d.doc.resolve(_)))}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())&&fe(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,b(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[kt]=Qe[kt];function bt(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&&bt(this.spec,e.spec))};var Lt=function(e,t){this.spec=t||Yt,this.attrs=e};Lt.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)},Lt.prototype.valid=function(e,t){return t.from<t.to},Lt.prototype.eq=function(e){return this==e||e instanceof Lt&&bt(this.attrs,e.attrs)&&bt(this.spec,e.spec)},Lt.is=function(e){return e.type instanceof Lt};var Tt=function(e,t){this.spec=t||Yt,this.attrs=e};Tt.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)},Tt.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},Tt.prototype.eq=function(e){return this==e||e instanceof Tt&&bt(this.attrs,e.attrs)&&bt(this.spec,e.spec)};var xt=function(e,t,n){this.from=e,this.to=t,this.type=n};t.Decoration=xt;var St={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 Lt(n,r))},xt.node=function(e,t,n,r){return new xt(e,t,new Tt(n,r))},St.spec.get=function(){return this.type.spec},St.inline.get=function(){return this.type instanceof Lt},Object.defineProperties(xt.prototype,St);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 l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,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(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;-1==l||e>l+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u))}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(-1==s[d+1]){var h=n.map(e[d]+i),p=h-o;if(p<0||p>=r.content.size){c=!0;continue}var f=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),_=m.index,g=m.offset,v=r.maybeChild(_);if(v&&g==p&&g+v.nodeSize==f){var y=s[d+2].mapInner(n,v,h+1,e[d]+i+1,a);y!=At?(s[d]=p,s[d+1]=f,s[d+2]=y):(s[d+1]=-2,c=!0)}else c=!0}if(c){var M=Nt(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t||[],n,o,i,a),r,0,a);t=M.local;for(var k=0;k<s.length;k+=3)s[k+1]<0&&(s.splice(k,3),k-=3);for(var b=0,w=0;b<M.children.length;b+=3){for(var L=M.children[b];w<s.length&&s[w]<L;)w+=3;s.splice(w,0,M.children[b],M.children[b+1],M.children[b+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,l=a+n;if(s=jt(t,e,l)){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,l+1):r.splice(i,0,a,a+e.nodeSize,Nt(s,e,l+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,l=0,u=void 0;l<e.length;l++)(u=e[l])&&u.from>a&&u.to<s&&(e[l]=null,(i||(i=[])).push(u));if(i){n==this.children&&(n=this.children.slice());var c=n[o+2].removeInner(i,a+1);c!=At?n[o+2]=c:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,h=void 0;d<e.length;d++)if(h=e[d])for(var p=0;p<r.length;p++)r[p].eq(h,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 l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof Lt){var u=Math.max(i,l.from)-i,c=Math.min(a,l.to)-i;u<c&&(r||(r=[])).push(l.copy(u,c))}}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(Lt.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Lt||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 l=Nt(s,t,n+a+1,r);l!=At&&o.push(a,a+t.nodeSize,l)}}));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),Ft(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),Ft(t,o+1,i.copy(r.to,i.to)))}}return t}function Ft(e,t,n){for(;t<e.length&&Ht(n,e[t])>0;)t++;e.splice(t,0,n)}function It(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=qt(this),this.markCursor=null,this.cursorWrapper=null,Wt(this),this.nodeViews=Ut(this),this.docView=Z(this.state.doc,Bt(this),It(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 qt(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function Ut(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 l=Ut(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})(l,this.nodeViews)&&(this.nodeViews=l,i=!0),tt(this)}this.editable=qt(this),Wt(this);var u=It(this),c=Bt(this),d=t?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,c,u);!h&&e.selection.eq(o.selection)||(s=!0);var p,f,m,g,v,y,M,k,b,w,L,T="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 l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:S(e.dom)}}(this);if(s){this.domObserver.stop();var Y=h&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(g=o.selection,v=e.selection,y=Math.min(g.$anchor.sharedDepth(g.head),v.$anchor.sharedDepth(v.head)),g.$anchor.start(y)!=v.$anchor.start(y));if(h){var C=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,c,u,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Z(e.doc,c,u,this.dom,this)),C&&!this.trackWrites&&(Y=!0)}Y||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,f=p.docView.domFromPos(p.state.selection.anchor,0),m=p.root.getSelection(),_(f.node,f.offset,m.anchorNode,m.anchorOffset)))?fe(this,Y):(ye(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 T&&(k=(M=T).refDOM,b=M.refTop,w=M.stack,L=k?k.getBoundingClientRect().top:0,D(w,0==L?0:L-b))},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=S(e);e.focus(null==Y?{get preventScroll(){return Y={preventScroll:!0},!0}}:void 0),Y||(Y=!1,D(t,0))}(this.dom),fe(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,[],It(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";window,e.exports=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"==typeof 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," */"),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[n].concat(l).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 l=[].concat(e[s]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},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],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var d=a(c),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(i[d].references++,i[d].updater(h)):i.push({identifier:c,updater:m(h,t),references:1}),r.push(c)}return r}function l(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 u,c=(u=[],function(e,t){return u[e]=t,u.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=c(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 h(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,f=0;function m(e,t){var n,r,o;if(t.singleton){var i=f++;n=p||(p=l(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=l(t),r=h.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 l=s(e,t),u=0;u<n.length;u++){var c=a(n[u]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}n=l}}}},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>
*
@@ -305,4 +305,4 @@ n(160).defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_
//! moment.js locale configuration
n(160).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 年"}})},,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 l=[],u=0;u<o.length;u+=2)for(var c=o[u],d=o[u+1],h=n.doc.resolve(c),p=h.sharedDepth(d),f=h.node(p),m=h.indexAfter(p),_=h.after(p+1);_<=d;++m){var g=f.maybeChild(m);if(!g)break;if(m&&-1==l.indexOf(_)){var v=f.child(m-1);v.type==g.type&&t(v,g)&&l.push(_)}_+=g.nodeSize}l.sort((function(e,t){return e-t}));for(var y=l.length-1;y>=0;y--)(0,r.canJoin)(n.doc,l[y])&&n.join(l[y]);e(n)}}(o,t))}},t.chainCommands=b,t.createParagraphNear=g,t.deleteSelection=a,t.exitCode=_,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=f,t.selectAll=M,t.selectNodeBackward=u,t.selectNodeForward=h,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=y,t.splitBlockKeepMarks=function(e,t){return y(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 l=!1,u=n.tr,c=0;!l&&c<s.length;c++){var d=s[c],h=d.$from,p=d.$to;l=n.doc.rangeHasMark(h.pos,p.pos,e)}for(var f=0;f<s.length;f++){var m=s[f],_=m.$from,g=m.$to;if(l)u.removeMark(_.pos,g.pos,e);else{var v=_.pos,y=g.pos,M=_.nodeAfter,k=g.nodeBefore,b=M&&M.isText?/^\s*/.exec(M.text)[0].length:0,w=k&&k.isText?/\s*$/.exec(k.text)[0].length:0;v+b<y&&(v+=b,y-=w),u.addMark(v,y,e.create(t))}}r(u.scrollIntoView())}return!0}},t.wrapIn=function(e,t){return function(n,o){var i=n.selection,a=i.$from,s=i.$to,l=a.blockRange(s),u=l&&(0,r.findWrapping)(l,e,t);return!!u&&(o&&o(n.tr.wrap(l,u).scrollIntoView()),!0)}},t.pcBaseKeymap=t.macBaseKeymap=t.baseKeymap=void 0;var r=n(165),o=n(163),i=n(162);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=c(o);if(!a){var s=o.blockRange(),u=s&&(0,r.liftTarget)(s);return null!=u&&(t&&t(e.tr.lift(s,u).scrollIntoView()),!0)}var d=a.nodeBefore;if(!d.type.spec.isolating&&k(e,a,t))return!0;if(0==o.parent.content.size&&(l(d,"end")||i.NodeSelection.isSelectable(d))){if(t){var h=e.tr.deleteRange(o.before(),o.after());h.setSelection(l(d,"end")?i.Selection.findFrom(h.doc.resolve(h.mapping.map(a.pos,-1)),-1):i.NodeSelection.create(h.doc,a.pos-d.nodeSize)),t(h.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 l(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function u(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=c(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 c(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(k(e,o,t))return!0;if(0==r.parent.content.size&&(l(a,"start")||i.NodeSelection.isSelectable(a))){if(t){var s=e.tr.deleteRange(r.before(),r.after());s.setSelection(l(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 h(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 f(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 _(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),l=m(a.contentMatchAt(s));if(!a.canReplaceWith(s,s,l))return!1;if(t){var u=r.after(),c=e.tr.replaceWith(u,u,l.createAndFill());c.setSelection(i.Selection.near(c.doc.resolve(u),1)),t(c.scrollIntoView())}return!0}function g(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,l=e.tr.insert(s,a.createAndFill());l.setSelection(i.TextSelection.create(l.doc,s+1)),t(l.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 y(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 l=s.parentOffset==s.parent.content.size,u=e.tr;(e.selection instanceof i.TextSelection||e.selection instanceof i.AllSelection)&&u.deleteSelection();var c=0==a.depth?null:m(a.node(-1).contentMatchAt(a.indexAfter(-1))),d=l&&c?[{type:c}]:null,h=(0,r.canSplit)(u.doc,u.mapping.map(a.pos),1,d);d||h||!(0,r.canSplit)(u.doc,u.mapping.map(a.pos),1,c&&[{type:c}])||(d=[{type:c}],h=!0),h&&(u.split(u.mapping.map(a.pos),1,d),l||a.parentOffset||a.parent.type==c||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),o.Fragment.from([c.create(),a.parent]))||u.setNodeMarkup(u.mapping.map(a.before()),c)),t(u.scrollIntoView())}return!0}function M(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function k(e,t,n){var a,s,u=t.nodeBefore,c=t.nodeAfter;if(u.type.spec.isolating||c.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=u.contentMatchAt(u.childCount)).findWrapping(c.type))&&s.matchType(a[0]||c.type).validEnd){if(n){for(var h=t.pos+c.nodeSize,p=o.Fragment.empty,f=a.length-1;f>=0;f--)p=o.Fragment.from(a[f].create(null,p));p=o.Fragment.from(u.copy(p));var m=e.tr.step(new r.ReplaceAroundStep(t.pos-1,h,t.pos,h,new o.Slice(p,1,0),a.length,!0)),_=h+2*a.length;(0,r.canJoin)(m.doc,_)&&m.join(_),n(m.scrollIntoView())}return!0}var g=i.Selection.findFrom(t,1),v=g&&g.$from.blockRange(g.$to),y=v&&(0,r.liftTarget)(v);if(null!=y&&y>=t.depth)return n&&n(e.tr.lift(v,y).scrollIntoView()),!0;if(d&&c.isTextblock&&l(u,"end")){for(var M=u,k=[];k.push(M),!M.isTextblock;)M=M.lastChild;if(M.canReplace(M.childCount,M.childCount,c.content)){if(n){for(var b=o.Fragment.empty,w=k.length-1;w>=0;w--)b=o.Fragment.from(k[w].copy(b));n(e.tr.step(new r.ReplaceAroundStep(t.pos-k.length,t.pos+c.nodeSize,t.pos+1,t.pos+c.nodeSize-1,new o.Slice(b,k.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function b(){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=b(a,s,u),L=b(a,d,h),T={Enter:b(f,g,v,y),"Mod-Enter":_,Backspace:w,"Mod-Backspace":w,Delete:L,"Mod-Delete":L,"Mod-a":M};t.pcBaseKeymap=T;var x={"Ctrl-h":T.Backspace,"Alt-Backspace":T["Mod-Backspace"],"Ctrl-d":T.Delete,"Ctrl-Alt-Backspace":T["Mod-Delete"],"Alt-Delete":T["Mod-Delete"],"Alt-d":T["Mod-Delete"]};for(var S in t.macBaseKeymap=x,T)x[S]=T[S];var D=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?x:T;t.baseKeymap=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inputRules=function(e){var t=e.rules,n=new r.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return a(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&a(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n},t.textblockTypeInputRule=function(e,t,n){return new i(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))},t.undoInputRule=function(e,t){for(var n=e.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){for(var a=e.tr,s=i.transform,l=s.steps.length-1;l>=0;l--)a.step(s.steps[l].invert(s.docs[l]));if(i.text){var u=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,u))}else a.delete(i.from,i.to);t(a)}return!0}}return!1},t.wrappingInputRule=function(e,t,n,r){return new i(e,(function(e,i,a,s){var l=n instanceof Function?n(i):n,u=e.tr.delete(a,s),c=u.doc.resolve(a).blockRange(),d=c&&(0,o.findWrapping)(c,t,l);if(!d)return null;u.wrap(c,d);var h=u.doc.resolve(a-1).nodeBefore;return h&&h.type==t&&(0,o.canJoin)(u.doc,a-1)&&(!r||r(i,h))&&u.join(a-1),u}))},t.smartQuotes=t.openSingleQuote=t.openDoubleQuote=t.emDash=t.ellipsis=t.closeSingleQuote=t.closeDoubleQuote=t.InputRule=void 0;var r=n(162),o=n(165),i=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){var i=n;if(t[1]){var a=t[0].lastIndexOf(t[1]);i+=t[0].slice(a+t[1].length);var s=(r+=a)-o;s>0&&(i=t[0].slice(a-s,a)+i,r=o)}return e.tr.insertText(i,r,o)}):t};t.InputRule=i;function a(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r,u=0;u<o.length;u++){var c=o[u].match.exec(l),d=c&&o[u].handler(a,c,t-(c[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(i,{transform:d,from:t,to:n,text:r})),!0}return!1}var s=new i(/--$/,"—");t.emDash=s;var l=new i(/\.\.\.$/,"…");t.ellipsis=l;var u=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");t.openDoubleQuote=u;var c=new i(/"$/,"”");t.closeDoubleQuote=c;var d=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");t.openSingleQuote=d;var h=new i(/'$/,"’");t.closeSingleQuote=h;var p=[u,c,d,h];t.smartQuotes=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__clipCells=N,t.__insertCells=F,t.__pastedCells=j,t.addColSpan=Y,t.addColumn=ee,t.addColumnAfter=function(e,t){if(!k(e))return!1;if(t){var n=Q(e);t(ee(e.tr,n,n.right))}return!0},t.addColumnBefore=function(e,t){if(!k(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(!k(e))return!1;if(t){var n=Q(e);t(re(e.tr,n,n.bottom))}return!0},t.addRowBefore=function(e,t){if(!k(e))return!1;if(t){var n=Q(e);t(re(e.tr,n,n.top))}return!0},t.cellAround=M,t.colCount=function(e){return f.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=he);var o=e.lastColumnResizable;void 0===o&&(o=!0);return new i.Plugin({key:fe,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 fe.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=fe.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 l=a.getBoundingClientRect(),u=l.left,c=l.right;t.clientX-u<=n?s=_e(e,t,"left"):c-t.clientX<=n&&(s=_e(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var d=e.state.doc.resolve(s),h=d.node(-1),p=f.get(h),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=fe.getState(e.state);t.activeHandle>-1&&!t.dragging&&ve(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=fe.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,l=r;if(o)for(var u=0;u<r;u++)o[u]&&(s-=o[u],l--);return s/l}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=fe.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=f.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr,u=0;u<i.height;u++){var c=u*i.width+s;if(!u||i.map[c]!=i.map[c-i.width]){var d=i.map[c],h=o.nodeAt(d).attrs,p=1==h.colspan?0:s-i.colCount(d);if(!h.colwidth||h.colwidth[p]!=n){var m=h.colwidth?h.colwidth.slice():ye(h.colspan);m[p]=n,l.setNodeMarkup(a+d,null,S(h,"colwidth",m))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,ge(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(fe,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=fe.getState(e.state),o=ge(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=f.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;pe(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(fe,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=fe.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=f.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,u=0;u<i.height;u++){var c=s+u*i.width-1;if(!(s!=i.width&&i.map[c]==i.map[c+1]||0!=u&&i.map[c-1]==i.map[c-1-i.width])){var d=i.map[c],h=a+d+o.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(l.Decoration.widget(h,p))}}return l.DecorationSet.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})},t.deleteColumn=function(e,t){if(!k(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=f.get(n.table);t(r)}return!0},t.deleteRow=function(e,t){if(!k(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=f.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 f.get(e.node(-1)).findCell(e.pos-e.start(-1))},t.fixTables=X,t.goToNextCell=function(e){return function(t,n){if(!k(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),l=e.after();s<a.childCount;s++){var u=a.child(s);if(u.childCount)return l+1;l+=u.nodeSize}}}(b(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(i.TextSelection.between(o,L(o))).scrollIntoView())}return!0}}},t.handlePaste=U,t.inSameTable=T,t.isInTable=k,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,l=i+(t.right-t.left-1),u=t.top;u<t.bottom;u++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[l]==o[l+1])return!0;a+=n,l+=n}for(var c=t.left;c<t.right;c++){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,l=e.tr,u={},c=a.Fragment.empty,d=r.top;d<r.bottom;d++)for(var h=r.left;h<r.right;h++){var p=o.map[d*o.width+h],f=r.table.nodeAt(p);if(!u[p])if(u[p]=!0,null==i)i=p,s=f;else{ie(f)||(c=c.append(f.content));var m=l.mapping.map(p+r.tableStart);l.delete(m,m+f.nodeSize)}}if(l.setNodeMarkup(i+r.tableStart,null,S(Y(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),"rowspan",r.bottom-r.top)),c.size){var _=i+1+s.content.size,g=ie(s)?i+1:_;l.replaceWith(g+r.tableStart,_+r.tableStart,c)}l.setSelection(new A(l.doc.resolve(i+r.tableStart))),t(l)}return!0},t.moveCellForward=L,t.nextCell=x,t.pointsAtCell=w,t.removeColSpan=D,t.removeColumn=te,t.removeRow=oe,t.rowIsHeader=ne,t.selectedRect=Q,t.selectionCell=b,t.setAttr=S,t.setCellAttr=function(e,t){return function(n,r){if(!k(n))return!1;var o=b(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,S(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,S(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:y,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(y);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!=y.getState(e.state))return e.state.selection},handleTripleClick:q,handleKeyDown:I,handlePaste:U},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 l=s.resolve(a.from+1);r=A.rowSelection(l,l)}else if(!n){var u=f.get(a.node),c=a.from+1,d=c+u.map[u.width*u.height-1];r=A.create(s,c+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 l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;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 _(e,t)}}],toDOM:function(e){return["td",g(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return _(e,t)}}],toDOM:function(e){return["th",g(e,t),0]}}}},t.toggleHeader=le,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(162),a=n(163),s=n(210),l=n(177),u=n(165);if("undefined"!=typeof WeakMap){var c=new WeakMap;r=function(e){return c.get(e)},o=function(e,t){return c.set(e,t),t}}else{var d=[],h=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==h&&(h=0),d[h++]=e,d[h++]=t}}var p=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},f=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 _(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,l=s&&s(e);null!=l&&(i[a]=l)}return i}function g(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=f,f.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 l=1;a<this.height&&this.map[t+this.width*l]==n;l++)a++;return new p(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},f.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")},f.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)]},f.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),l=s.left,u=s.right,c=s.top,d=s.bottom;return new p(Math.min(r,l),Math.min(i,c),Math.max(o,u),Math.max(a,d))},f.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},f.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}},f.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),l=0;l<s.childCount;l++){var u=s.child(l);a+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}for(var c=0;c<o.childCount;c++){var d=o.child(c);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,l=t*n;s<l;s++)r[s]=0;for(var u=0,c=0;u<n;u++){var d=e.child(u);c++;for(var h=0;;h++){for(;o<r.length&&0!=r[o];)o++;if(h==d.childCount)break;for(var p=d.child(h),_=p.attrs,g=_.colspan,v=_.rowspan,y=_.colwidth,M=0;M<v;M++){if(M+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:v-M});break}for(var k=o+M*t,b=0;b<g;b++){0==r[k+b]?r[k+b]=c:(i||(i=[])).push({type:"collision",row:u,pos:c,n:g-b});var w=y&&y[b];if(w){var L=(k+b)%t*2,T=a[L];null==T||T!=w&&1==a[L+1]?(a[L]=w,a[L+1]=1):T==w&&a[L+1]++}}}o+=g,c+=p.nodeSize}for(var x=(u+1)*t,S=0;o<x;)0==r[o++]&&S++;S&&(i||(i=[])).push({type:"missing",row:u,n:S}),c++}for(var D=new f(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,l=0;l<a.attrs.colspan;l++){var u=(r+l)%e.width,c=t[2*u];null==c||a.attrs.colwidth&&a.attrs.colwidth[l]==c||((s||(s=m(a.attrs)))[l]=c)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(D,a,e);return D}(e))};var y=new i.PluginKey("selectingCells");function M(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 k(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 b(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:M(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 L(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function T(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=f.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function S(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=S(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=S(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=y;var A=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=f.get(r),a=t.start(-1),s=o.rectBetween(t.pos-a,n.pos-a),l=t.node(0),u=o.cellsInRect(s).filter((function(e){return e!=n.pos-a}));u.unshift(n.pos-a);var c=u.map((function(e){var t=r.nodeAt(e),n=e+a+1;return new i.SelectionRange(l.resolve(n),l.resolve(n+t.content.size))}));e.call(this,c[0].$from,c[0].$to,c),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)&&T(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=f.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 l=[],u=s*t.width+r.left,c=r.left;c<r.right;c++,u++){var d=t.map[u];if(!o[d]){o[d]=!0;var h=t.findCell(d),p=e.nodeAt(d),m=r.left-h.left,_=h.right-r.right;if(m>0||_>0){var g=p.attrs;m>0&&(g=D(g,0,m)),_>0&&(g=D(g,g.colspan-_,_)),p=h.left<r.left?p.type.createAndFill(g):p.type.create(g,p.content)}if(h.top<r.top||h.bottom>r.bottom){var v=S(p.attrs,"rowspan",Math.min(h.bottom,r.bottom)-Math.max(h.top,r.top));p=h.top<r.top?p.type.createAndFill(v):p.type.create(v,p.content)}l.push(p)}}i.push(e.child(s).copy(a.Fragment.from(l)))}var y=this.isColSelection()&&this.isRowSelection()?e:i;return new a.Slice(a.Fragment.from(y),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],l=s.$from,u=s.$to,c=t.mapping.slice(r);t.replace(c.map(l.pos),c.map(u.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=f.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=f.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=f.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=f.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(l.Decoration.node(n,n+e.nodeSize,{class:"selectedCell"}))})),l.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,l=[];if("row"==i)for(var u=0;u<t.childCount;u++){var c=t.child(u).content,d=u?0:Math.max(0,n-1),h=u<t.childCount-1?0:Math.max(0,r-1);(d||h)&&(c=P(v(s).row,new a.Slice(c,d,h)).content),l.push(c)}else{if("cell"!=i&&"header_cell"!=i)return null;l.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,l=s.rowspan,u=s.colspan,c=r;c<r+l;c++)n[c]=(n[c]||0)+u;for(var d=0,h=0;h<n.length;h++)d=Math.max(d,n[h]);for(var p=0;p<n.length;p++)if(p>=t.length&&t.push(a.Fragment.empty),n[p]<d){for(var f=v(e).cell.createAndFill(),m=[],_=n[p];_<d;_++)m.push(f);t[p]=t[p].append(a.Fragment.from(m))}return{height:t.length,width:d,rows:t}}(s,l)}function P(e,t){var n=e.createAndFill();return new u.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=[],l=[],u=0;u<i.length;u++){for(var c=i[u],d=[],h=s[u]||0,p=0;h<t;p++){var f=c.child(p%c.childCount);h+f.attrs.colspan>t&&(f=f.type.create(D(f.attrs,f.attrs.colspan,h+f.attrs.colspan-t),f.content)),d.push(f),h+=f.attrs.colspan;for(var m=1;m<f.attrs.rowspan;m++)s[u+m]=(s[u+m]||0)+f.attrs.colspan}l.push(a.Fragment.from(d))}i=l,r=t}if(o!=n){for(var _=[],g=0,v=0;g<n;g++,v++){for(var y=[],M=i[v%o],k=0;k<M.childCount;k++){var b=M.child(k);g+b.attrs.rowspan>n&&(b=b.type.create(S(b.attrs,"rowspan",Math.max(1,n-b.attrs.rowspan)),b.content)),y.push(b)}_.push(a.Fragment.from(y))}i=_,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 l=!1,u=o;u<i;u++){var c=a*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){l=!0;var h=n.nodeAt(d),p=t.findCell(d),f=p.top,m=p.left;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,S(h.attrs,"rowspan",a-f)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),h.type.createAndFill(S(h.attrs,"rowspan",f+h.attrs.rowspan-a))),u+=h.attrs.colspan-1}}return l}function R(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var l=!1,u=o;u<i;u++){var c=u*t.width+a,d=t.map[c];if(t.map[c-1]==d){l=!0;var h=n.nodeAt(d),p=t.colCount(d),f=e.mapping.slice(s).map(d+r);e.setNodeMarkup(f,null,D(h.attrs,a-p,h.attrs.colspan-(a-p))),e.insert(f+h.nodeSize,h.type.createAndFill(D(h.attrs,0,a-p))),u+=h.attrs.rowspan-1}}return l}function F(e,t,n,r,o){var i=n?e.doc.nodeAt(n-1):e.doc,s=f.get(i),l=r.top,u=r.left,c=u+o.width,d=l+o.height,h=e.tr,p=0;function m(){i=n?h.doc.nodeAt(n-1):h.doc,s=f.get(i),p=h.mapping.maps.length}(function(e,t,n,r,o,i,s){var l,u,c=v(e.doc.type.schema);if(o>t.width)for(var d=0,h=0;d<t.height;d++){var p=n.child(d);h+=p.nodeSize;var f=[],m=void 0;m=null==p.lastChild||p.lastChild.type==c.cell?l||(l=c.cell.createAndFill()):u||(u=c.header_cell.createAndFill());for(var _=t.width;_<o;_++)f.push(m);e.insert(e.mapping.slice(s).map(h-1+r),f)}if(i>t.height){for(var g=[],y=0,M=(t.height-1)*t.width;y<Math.max(t.width,o);y++){var k=!(y>=t.width)&&n.nodeAt(t.map[M+y]).type==c.header_cell;g.push(k?u||(u=c.header_cell.createAndFill()):l||(l=c.cell.createAndFill()))}for(var b=c.row.create(null,a.Fragment.from(g)),w=[],L=t.height;L<i;L++)w.push(b);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),w)}return!(!l&&!u)})(h,s,i,n,c,d,p)&&m(),H(h,s,i,n,u,c,l,p)&&m(),H(h,s,i,n,u,c,d,p)&&m(),R(h,s,i,n,l,d,u,p)&&m(),R(h,s,i,n,l,d,c,p)&&m();for(var _=l;_<d;_++){var g=s.positionAt(_,u,i),y=s.positionAt(_,c,i);h.replace(h.mapping.slice(p).map(g+n),h.mapping.slice(p).map(y+n),new a.Slice(o.rows[_-l],0,0))}m(),h.setSelection(new A(h.doc.resolve(n+s.positionAt(l,u,i)),h.doc.resolve(n+s.positionAt(d-1,c-1,i)))),t(h)}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&&T(t,n)?new A(t,n):i.Selection.near(n,1)};var I=(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 l,u=n.doc.resolve(s),c=x(u,e,t);return l=c?i.Selection.near(c,1):t<0?i.Selection.near(n.doc.resolve(u.before(-1)),-1):i.Selection.near(n.doc.resolve(u.after(-1)),1),z(n,r,l)}}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 q(e,t){var n=M(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new A(n))),!0)}function U(e,t,n){if(!k(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),l=f.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=N(r,l.right-l.left,l.bottom-l.top),F(e.state,e.dispatch,s,l,r),!0}if(r){var u=b(e.state),c=u.start(-1);return F(e.state,e.dispatch,c,f.get(u.node(-1)).findCell(u.pos-c),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=M(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==y.getState(e.state);if(!r||!T(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(y,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=y.getState(e.state)&&e.dispatch(e.state.tr.setMeta(y,-1))}function a(n){var a,s=y.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),l="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?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?M(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=f.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l<o.height;l++)s.push(0);for(var u=0;u<o.problems.length;u++){var c=o.problems[u];if("collision"==c.type){for(var d=t.nodeAt(c.pos),h=0;h<d.attrs.rowspan;h++)s[c.row+h]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,D(d.attrs,d.attrs.colspan-c.n,c.n))}else if("missing"==c.type)s[c.row]+=c.n;else if("overlong_rowspan"==c.type){var p=t.nodeAt(c.pos);r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,S(p.attrs,"rowspan",p.attrs.rowspan-c.n))}else if("colwidth mismatch"==c.type){var m=t.nodeAt(c.pos);r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,S(m.attrs,"colwidth",c.colwidth))}}for(var _=0;_<s.length;_++)s[_]&&(null==i&&(i=_),a=_);for(var g=0,y=n+1;g<o.height;g++){var M=t.child(g),k=y+M.nodeSize,b=s[g];if(b>0){var w="cell";M.firstChild&&(w=M.firstChild.type.spec.tableRole);for(var L=[],T=0;T<b;T++)L.push(v(e.schema)[w].createAndFill());var x=0!=g&&i!=g-1||a!=g?k-1:y+1;r.insert(r.mapping.map(x),L)}y=k}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,l=0;s<a;s++){for(var u=n.child(s),c=l,d=Math.min(i,s+3);c<d;c++)if(t.child(c)==u){l=c+1,r+=u.nodeSize;continue e}o(u,r),l<i&&t.child(l).sameMarkup(u)?e(t.child(l),u,r+1,o):u.nodesBetween(0,u.content.size,o,r+1),r+=u.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Q(e){var t,n=e.selection,r=b(e),o=r.node(-1),i=r.start(-1),a=f.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 l=s*r.width+n;if(n>0&&n<r.width&&r.map[l-1]==r.map[l]){var u=r.map[l],c=i.nodeAt(u);e.setNodeMarkup(e.mapping.map(o+u),null,Y(c.attrs,n-r.colCount(u))),s+=c.attrs.rowspan-1}else{var d=null==a?v(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,h=r.positionAt(s,n,i);e.insert(e.mapping.map(o+h),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 l=s*r.width+n,u=r.map[l],c=o.nodeAt(u);if(n>0&&r.map[l-1]==u||n<r.width-1&&r.map[l+1]==u)e.setNodeMarkup(e.mapping.slice(a).map(i+u),null,D(c.attrs,n-r.colCount(u)));else{var d=e.mapping.slice(a).map(i+u);e.delete(d,d+c.nodeSize)}s+=c.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 l=[],u=n>0?-1:0;ne(r,i,n+u)&&(u=0==n||n==r.height?null:0);for(var c=0,d=r.width*n;c<r.width;c++,d++)if(n>0&&n<r.height&&r.map[d]==r.map[d-r.width]){var h=r.map[d],p=i.nodeAt(h).attrs;e.setNodeMarkup(o+h,null,S(p,"rowspan",p.rowspan+1)),c+=p.colspan-1}else{var f=null==u?v(i.type.schema).cell:i.nodeAt(r.map[d+u*r.width]).type;l.push(f.createAndFill())}return e.insert(a,v(i.type.schema).row.create(null,l)),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 l=a+o.child(n).nodeSize,u=e.mapping.maps.length;e.delete(a+i,l+i);for(var c=0,d=n*r.width;c<r.width;c++,d++){var h=r.map[d];if(n>0&&h==r.map[d-r.width]){var p=o.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(u).map(h+i),null,S(p,"rowspan",p.rowspan-1)),c+=p.colspan-1}else if(n<r.width&&h==r.map[d+r.width]){var f=o.nodeAt(h),m=f.type.create(S(f.attrs,"rowspan",f.attrs.rowspan-1),f.content),_=r.positionAt(n+1,c,o);e.insert(e.mapping.slice(u).map(i+_),m),c+=f.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=M(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=S(a,"rowspan",1)),a.colspan>1&&(a=S(a,"colspan",1));for(var u,c=Q(t),d=t.tr,h=0;h<c.right-c.left;h++)s.push(l?S(a,"colwidth",l&&l[h]?[l[h]]:null):a);for(var p=c.top;p<c.bottom;p++){var f=c.map.positionAt(p,c.left,c.table);p==c.top&&(f+=r.nodeSize);for(var m=c.left,_=0;m<c.right;m++,_++)m==c.left&&p==c.top||d.insert(u=d.mapping.map(f+c.tableStart,1),e({node:r,row:p,col:m}).createAndFill(s[_]))}d.setNodeMarkup(o,e({node:r,row:c.top,col:c.left}),s[0]),i instanceof A&&d.setSelection(new A(d.doc.resolve(i.$anchorCell.pos),u&&d.doc.resolve(u))),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 le(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!k(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)})),l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(0==i.steps.length)for(var u=0;u<a.length;u++)i.setNodeMarkup(o.tableStart+a[u],r.header_cell,s[u].attrs);n(i)}return!0}}(e):function(t,n){if(!k(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),l=("column"===e?a:"row"===e&&s)?1:0,u="column"==e?new p(0,l,1,o.map.height):"row"==e?new p(l,0,o.map.width,1):o,c="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(u).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,c,n.attrs)})),n(i)}return!0}}t.fixTablesKey=Z;var ue=le("row",{useDeprecatedLogic:!0});t.toggleHeaderRow=ue;var ce=le("column",{useDeprecatedLogic:!0});t.toggleHeaderColumn=ce;var de=le("cell",{useDeprecatedLogic:!0});t.toggleHeaderCell=de;var he=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,l=t.firstChild,u=e.firstChild,c=0,d=0;c<u.childCount;c++)for(var h=u.child(c).attrs,p=h.colspan,f=h.colwidth,m=0;m<p;m++,d++){var _=o==d?i:f&&f[m],g=_?_+"px":"";a+=_||r,_||(s=!1),l?(l.style.width!=g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var v=l.nextSibling;l.parentNode.removeChild(l),l=v}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}t.TableView=he,he.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,pe(e,this.colgroup,this.table,this.cellMinWidth),!0)},he.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var fe=new i.PluginKey("tableColumnResizing");t.columnResizingPluginKey=fe;var me=function(e,t){this.activeHandle=e,this.dragging=t};function _e(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=M(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=f.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function ge(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(fe,{setHandle:t}))}function ye(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(fe);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(659)},function(e,t,n){"use strict";e.exports=n(660)},function(e,t,n){"use strict";e.exports.encode=n(661),e.exports.decode=n(662),e.exports.format=n(663),e.exports.parse=n(664)},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=[],l=t.length;for(n=0;n<l;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,n){"use strict";window,e.exports=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"==typeof 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(160)},function(e,t){e.exports=n(208)},function(e,t){e.exports=n(185)},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),l=new a.a,u=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){l.addTranslations(e.locale,"messages",e.json)})),l.setLocale(u),o.a.locale(u),o.a.updateLocale(o.a.locale(),{parentLocale:o.a.locale(),relativeTime:Object.assign(o.a.localeData(o.a.locale())._relativeTime,{s:l.gettext("seconds")})}),t.default=o.a}])},,,,,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(162),o=n(165);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,l,u=this.editorView.dom.offsetParent;if(this.element||(this.element=u.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),!u||u==document.body&&"static"==getComputedStyle(u).position)s=-pageXOffset,l=-pageYOffset;else{var c=u.getBoundingClientRect();s=c.left-u.scrollLeft,l=c.top-u.scrollTop}this.element.style.left=e.left-s+"px",this.element.style.top=e.top-l+"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(210),o=n(162),i=n(177),a=n(163),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 l(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 l=e.node(s);if(n>0?e.indexAfter(s)<l.childCount:e.index(s)>0){a=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}if(0==s)return null;i+=n;var u=e.doc.resolve(i);if(t.valid(u))return u}for(;;){var c=n>0?a.firstChild:a.lastChild;if(!c){if(a.isAtom&&!a.isText&&!o.NodeSelection.isSelectable(a)){e=e.doc.resolve(i+a.nodeSize*n),r=!1;continue e}break}a=c,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 l=function(e){this.pos=e};l.prototype.map=function(e){return new l(e.map(this.pos))},l.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:h,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&s.valid(n))return new s(n)},handleClick:d,handleKeyDown:u}})};var u=(0,r.keydownHandler)({ArrowLeft:c("horiz",-1),ArrowRight:c("horiz",1),ArrowUp:c("vert",-1),ArrowDown:c("vert",1)});function c(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){var a=e.selection,l=t>0?a.$to:a.$from,u=a.empty;if(a instanceof o.TextSelection){if(!i.endOfTextblock(n)||0==l.depth)return!1;u=!1,l=e.doc.resolve(t>0?l.after():l.before())}var c=s.findFrom(l,t,u);return!!c&&(r&&r(e.tr.setSelection(new s(c))),!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 h(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=!(c&&(e.ctrlKey||e.altKey||e.metaKey)||(a||u)&&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),l="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),c=i&&(l||+i[1]<57)||s&&l,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 h in r)o.hasOwnProperty(h)||(o[h]=r[h])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addListNodes=function(e,t,n){return e.append({ordered_list:d(l,{content:"list_item+",group:n}),bullet_list:d(u,{content:"list_item+",group:n}),list_item:d(c,{content:t})})},t.liftListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!l&&(!n||(a.node(l.depth-1).type==e?function(e,t,n,i){var a=e.tr,s=i.end,l=i.$to.end(i.depth);s<l&&(a.step(new r.ReplaceAroundStep(s-1,l,s,l,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(l),i.depth));return t(a.lift(i,(0,r.liftTarget)(i)).scrollIntoView()),!0}(t,n,e,l):function(e,t,n){for(var i=e.tr,a=n.parent,s=n.end,l=n.endIndex-1,u=n.startIndex;l>u;l--)s-=a.child(l).nodeSize,i.delete(s-1,s+1);var c=i.doc.resolve(n.start),d=c.nodeAfter,h=0==n.startIndex,p=n.endIndex==a.childCount,f=c.node(-1),m=c.index(-1);if(!f.canReplace(m+(h?0:1),m+1,d.content.append(p?o.Fragment.empty:o.Fragment.from(a))))return!1;var _=c.pos,g=_+d.nodeSize;return i.step(new r.ReplaceAroundStep(_-(h?1:0),g+(p?1:0),_+1,g-1,new o.Slice((h?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))).append(p?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))),h?0:1,p?0:1),h?0:1)),t(i.scrollIntoView()),!0}(t,n,l)))}},t.sinkListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!l)return!1;var u=l.startIndex;if(0==u)return!1;var c=l.parent,d=c.child(u-1);if(d.type!=e)return!1;if(n){var h=d.lastChild&&d.lastChild.type==c.type,p=o.Fragment.from(h?e.create():null),f=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(c.type.create(null,p)))),h?3:1,0),m=l.start,_=l.end;n(t.tr.step(new r.ReplaceAroundStep(m-(h?3:1),_,m,_,f,1,!0)).scrollIntoView())}return!0}},t.splitListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=i.node;if(l&&l.isBlock||a.depth<2||!a.sameParent(s))return!1;var u=a.node(-1);if(u.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 c=o.Fragment.empty,d=a.index(-1)>0,h=a.depth-(d?1:2);h>=a.depth-3;h--)c=o.Fragment.from(a.node(h).copy(c));c=c.append(o.Fragment.from(e.createAndFill()));var p=t.tr.replace(a.before(d?null:-1),a.after(-3),new o.Slice(c,d?3:2,2));p.setSelection(t.selection.constructor.near(p.doc.resolve(a.pos+(d?3:2)))),n(p.scrollIntoView())}return!0}var f=s.pos==a.end()?u.contentMatchAt(0).defaultType:null,m=t.tr.delete(a.pos,s.pos),_=f&&[null,{type:f}];return!!(0,r.canSplit)(m.doc,a.pos,2,_)&&(n&&n(m.split(a.pos,2,_).scrollIntoView()),!0)}},t.wrapInList=function(e,t){return function(n,i){var a=n.selection,s=a.$from,l=a.$to,u=s.blockRange(l),c=!1,d=u;if(!u)return!1;if(u.depth>=2&&s.node(u.depth-1).type.compatibleContent(e)&&0==u.startIndex){if(0==s.index(u.depth-1))return!1;var h=n.doc.resolve(u.start-2);d=new o.NodeRange(h,h,u.depth),u.endIndex<u.parent.childCount&&(u=new o.NodeRange(s,n.doc.resolve(l.end(u.depth)),u.depth)),c=!0}var p=(0,r.findWrapping)(d,e,t,u);return!!p&&(i&&i(function(e,t,n,i,a){for(var s=o.Fragment.empty,l=n.length-1;l>=0;l--)s=o.Fragment.from(n[l].type.create(n[l].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 u=0,c=0;c<n.length;c++)n[c].type==a&&(u=c+1);for(var d=n.length-u,h=t.start+n.length-(i?2:0),p=t.parent,f=t.startIndex,m=t.endIndex,_=!0;f<m;f++,_=!1)!_&&(0,r.canSplit)(e.doc,h,d)&&(e.split(h,d),h+=2*d),h+=p.child(f).nodeSize;return e}(n.tr,u,p,c,e).scrollIntoView()),!0)}},t.orderedList=t.listItem=t.bulletList=void 0;var r=n(165),o=n(163),i=["ol",0],a=["ul",0],s=["li",0],l={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=l;var u={parseDOM:[{tag:"ul"}],toDOM:function(){return a}};t.bulletList=u;var c={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=c},function(e,t,n){"use strict";var r=n(643),o=n(644);t.highlight=i,t.highlightAuto=function(e,t){var n,a,s,l,u=t||{},c=u.subset||r.listLanguages(),d=u.prefix,h=c.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<h;)l=c[p],r.getLanguage(l)&&((s=i(l,e,t)).language=l,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({}),l=(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==l&&(l="hljs-"),r.configure({__emitter:a,classPrefix:l}),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(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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 i(this,n)}}function i(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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 u(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function c(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"!=typeof n||Object.isFrozen(n)||c(n)})),e}var d=c,h=c;d.default=h;let p=function(){function e(t){s(this,e),void 0===t.data&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}return u(e,[{key:"ignoreMatch",value:function(){this.isMatchIgnored=!0}}]),e}();function f(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function m(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const _=e=>!!e.kind;let g=function(){function e(t,n){s(this,e),this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}return u(e,[{key:"addText",value:function(e){this.buffer+=f(e)}},{key:"openNode",value:function(e){if(!_(e))return;let t=e.kind;e.sublanguage||(t="".concat(this.classPrefix).concat(t)),this.span(t)}},{key:"closeNode",value:function(e){_(e)&&(this.buffer+="</span>")}},{key:"value",value:function(){return this.buffer}},{key:"span",value:function(e){this.buffer+='<span class="'.concat(e,'">')}}]),e}(),v=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&&r(e,t)}(n,e);var t=o(n);function n(e){var r;return s(this,n),(r=t.call(this)).options=e,r}return u(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){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}},{key:"toHTML",value:function(){return new g(this,this.options).value()}},{key:"finalize",value:function(){return!0}}]),n}(function(){function e(){s(this,e),this.rootNode={children:[]},this.stack=[this.rootNode]}return u(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){const 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){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}},{key:"_collapse",value:function(t){"string"!=typeof t&&t.children&&(t.children.every(e=>"string"==typeof e)?t.children=[t.children.join("")]:t.children.forEach(t=>{e._collapse(t)}))}}]),e}());function y(e){return e?"string"==typeof e?e:e.source:null}const M=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const k="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",b={begin:"\\\\[\\s\\S]",relevance:0},w={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[b]},L={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[b]},T={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/},x=function(e,t,n={}){const r=m({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(T),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},S=x("//","$"),D=x("/\\*","\\*/"),Y=x("#","$"),C={className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},A={className:"number",begin:k,relevance:0},O={className:"number",begin:"\\b(0b[01]+)",relevance:0},E={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},j={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[b,{begin:/\[/,end:/\]/,relevance:0,contains:[b]}]}]},P={className:"title",begin:"[a-zA-Z]\\w*",relevance:0},N={className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},H={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0};var R=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:k,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>y(e)).join("")}(t,/.*\b/,e.binary,/\b.*/)),m({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:b,APOS_STRING_MODE:w,QUOTE_STRING_MODE:L,PHRASAL_WORDS_MODE:T,COMMENT:x,C_LINE_COMMENT_MODE:S,C_BLOCK_COMMENT_MODE:D,HASH_COMMENT_MODE:Y,NUMBER_MODE:C,C_NUMBER_MODE:A,BINARY_NUMBER_MODE:O,CSS_NUMBER_MODE:E,REGEXP_MODE:j,TITLE_MODE:P,UNDERSCORE_TITLE_MODE:N,METHOD_GUARD:H,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function F(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function I(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=F,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function z(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map(e=>y(e)).join("|")+")"}(...e.illegal))}function $(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 B(e,t){void 0===e.relevance&&(e.relevance=1)}const W=["of","and","for","in","not","or","if","then","parent","list","value"];function q(e,t){return t?Number(t):function(e){return W.includes(e.toLowerCase())}(e)?0:1}function U(e,{plugins:t}){function n(t,n){return new RegExp(y(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}let r=function(){function e(){s(this,e),this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}return u(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=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,t="|"){let n=0;return e.map(e=>{n+=1;const t=n;let r=y(e),o="";for(;r.length>0;){const e=M.exec(r);if(!e){o+=r;break}o+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o}).map(e=>"(".concat(e,")")).join(t)}(e),!0),this.lastIndex=0}},{key:"exec",value:function(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}]),e}(),o=function(){function e(){s(this,e),this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}return u(e,[{key:"getMatcher",value:function(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),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){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.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=m(e.classNameAliases||{}),function t(r,i){const a=r;if(r.isCompiled)return a;[$].forEach(e=>e(r,i)),e.compilerExtensions.forEach(e=>e(r,i)),r.__beforeBegin=null,[I,z,B].forEach(e=>e(r,i)),r.isCompiled=!0;let s=null;if("object"==typeof r.keywords&&(s=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=function e(t,n,r="keyword"){const 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(e=>e.toLowerCase())),t.forEach((function(t){const n=t.split("|");o[n[0]]=[e,q(n[0],n[1])]}))}}(r.keywords,e.case_insensitive)),r.lexemes&&s)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return s=s||r.lexemes||/\w+/,a.keywordPatternRe=n(s,!0),i&&(r.begin||(r.begin=/\B|\b/),a.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(a.endRe=n(r.end)),a.terminatorEnd=y(r.end)||"",r.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+i.terminatorEnd)),r.illegal&&(a.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return m(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(function e(t){return!!t&&(t.endsWithParent||e(t.starts))}(e))return m(e,{starts:e.starts?m(e.starts):null});if(Object.isFrozen(e))return m(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,a)})),r.starts&&t(r.starts,i),a.matcher=function(e){const t=new o;return e.contains.forEach(e=>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}(a),a}(e)}function V(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn('The language "'.concat(this.language,'" you specified could not be found.')),this.unknownLanguage=!0,f(this.code);let 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(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const J={"after:highlightElement":({el:e,result:t,text:n})=>{const r=K(e);if(!r.length)return;const o=document.createElement("div");o.innerHTML=t.value,t.value=function(e,t,n){let r=0,o="";const 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+="<"+G(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+f(e.value)+'"'})).join("")+">"}function l(e){o+="</"+G(e)+">"}function u(e){("start"===e.event?s:l)(e.node)}for(;e.length||t.length;){let t=a();if(o+=f(n.substring(r,t[0].offset)),r=t[0].offset,t===e){i.reverse().forEach(l);do{u(t.splice(0,1)[0]),t=a()}while(t===e&&t.length&&t[0].offset===r);i.reverse().forEach(s)}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])}return o+f(n.substr(r))}(r,K(o),n)}};function G(e){return e.nodeName.toLowerCase()}function K(e){const t=[];return function e(n,r){for(let 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),G(o).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:o}));return r}(e,0),t}const Z={},X=e=>{console.error(e)},Q=(e,...t)=>{console.log("WARN: ".concat(e),...t)},ee=(e,t)=>{Z["".concat(e,"/").concat(t)]||(console.log("Deprecated as of ".concat(e,". ").concat(t)),Z["".concat(e,"/").concat(t)]=!0)},te=f,ne=m,re=Symbol("nomatch");var oe=function(e){const t=Object.create(null),n=Object.create(null),r=[];let o=!0;const i=/(^(<[^>]+>|\t|)+|\n)/gm,a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let l={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:v};function u(e){return l.noHighlightRe.test(e)}function c(e,t,n,r){let o="",i="";"object"==typeof t?(o=e,n=t.ignoreIllegals,i=t.language,r=void 0):(ee("10.7.0","highlight(lang, code, ...args) has been deprecated."),ee("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,o=t);const a={code:o,language:i};x("before:highlight",a);const s=a.result?a.result:h(a.language,a.code,n,r);return s.code=a.code,x("after:highlight",s),s}function h(e,n,i,s){function u(e,t){const n=M.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function c(){null!=L.subLanguage?function(){if(""===S)return;let e=null;if("string"==typeof L.subLanguage){if(!t[L.subLanguage])return void x.addText(S);e=h(L.subLanguage,S,!0,T[L.subLanguage]),T[L.subLanguage]=e.top}else e=f(S,L.subLanguage.length?L.subLanguage:null);L.relevance>0&&(D+=e.relevance),x.addSublanguage(e.emitter,e.language)}():function(){if(!L.keywords)return void x.addText(S);let e=0;L.keywordPatternRe.lastIndex=0;let t=L.keywordPatternRe.exec(S),n="";for(;t;){n+=S.substring(e,t.index);const r=u(L,t);if(r){const[e,o]=r;if(x.addText(n),n="",D+=o,e.startsWith("_"))n+=t[0];else{const n=M.classNameAliases[e]||e;x.addKeyword(t[0],n)}}else n+=t[0];e=L.keywordPatternRe.lastIndex,t=L.keywordPatternRe.exec(S)}n+=S.substr(e),x.addText(n)}(),S=""}function d(e){return e.className&&x.openNode(M.classNameAliases[e.className]||e.className),L=Object.create(e,{parent:{value:L}}),L}function m(e){return 0===L.matcher.regexIndex?(S+=e[0],1):(A=!0,0)}function _(e){const t=e[0],n=e.rule,r=new p(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return m(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?S+=t:(n.excludeBegin&&(S+=t),c(),n.returnBegin||n.excludeBegin||(S=t)),d(n),n.returnBegin?0:t.length}function g(e){const t=e[0],r=n.substr(e.index),o=function e(t,n,r){let o=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(t.endRe,r);if(o){if(t["on:end"]){const e=new p(t);t["on:end"](n,e),e.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 re;const i=L;i.skip?S+=t:(i.returnEnd||i.excludeEnd||(S+=t),c(),i.excludeEnd&&(S=t));do{L.className&&x.closeNode(),L.skip||L.subLanguage||(D+=L.relevance),L=L.parent}while(L!==o.parent);return o.starts&&(o.endSameAsBegin&&(o.starts.endRe=o.endRe),d(o.starts)),i.returnEnd?0:t.length}let v={};function y(t,r){const a=r&&r[0];if(S+=t,null==a)return c(),0;if("begin"===v.type&&"end"===r.type&&v.index===r.index&&""===a){if(S+=n.slice(r.index,r.index+1),!o){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=r,"begin"===r.type)return _(r);if("illegal"===r.type&&!i){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(L.className||"<unnamed>")+'"');throw e.mode=L,e}if("end"===r.type){const e=g(r);if(e!==re)return e}if("illegal"===r.type&&""===a)return 1;if(C>1e5&&C>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return S+=a,a.length}const M=w(e);if(!M)throw X(a.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=U(M,{plugins:r});let b="",L=s||k;const T={},x=new l.__emitter(l);!function(){const e=[];for(let t=L;t!==M;t=t.parent)t.className&&e.unshift(t.className);e.forEach(e=>x.openNode(e))}();let S="",D=0,Y=0,C=0,A=!1;try{for(L.matcher.considerAll();;){C++,A?A=!1:L.matcher.considerAll(),L.matcher.lastIndex=Y;const e=L.matcher.exec(n);if(!e)break;const t=y(n.substring(Y,e.index),e);Y=e.index+t}return y(n.substr(Y)),x.closeAllNodes(),x.finalize(),b=x.toHTML(),{relevance:Math.floor(D),value:b,language:e,illegal:!1,emitter:x,top:L}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(Y-100,Y+100),mode:t.mode},sofar:b,relevance:0,value:te(n),emitter:x};if(o)return{illegal:!1,relevance:0,value:te(n),emitter:x,language:e,top:L,errorRaised:t};throw t}}function f(e,n){n=n||l.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new l.__emitter(l),value:te(e),illegal:!1,top:s};return t.emitter.addText(e),t}(e),o=n.filter(w).filter(T).map(t=>h(t,e,!1));o.unshift(r);const i=o.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(w(e.language).supersetOf===t.language)return 1;if(w(t.language).supersetOf===e.language)return-1}return 0}),[a,u]=i,c=a;return c.second_best=u,c}const m={"before:highlightElement":({el:e})=>{l.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":({result:e})=>{l.useBR&&(e.value=e.value.replace(/\n/g,"<br>"))}},_=/^(<[^>]+>|\t)+/gm,g={"after:highlightElement":({result:e})=>{l.tabReplace&&(e.value=e.value.replace(_,e=>e.replace(/\t/g,l.tabReplace)))}};function y(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=l.languageDetectRe.exec(t);if(n){const t=w(n[1]);return t||(Q(a.replace("{}",n[1])),Q("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>u(e)||w(e))}(e);if(u(r))return;x("before:highlightElement",{el:e,language:r}),t=e;const o=t.textContent,i=r?c(o,{language:r,ignoreIllegals:!0}):f(o);x("after:highlightElement",{el:e,result:i,text:o}),e.innerHTML=i.value,function(e,t,r){const o=t?n[t]:r;e.classList.add("hljs"),o&&e.classList.add(o)}(e,r,i.language),e.result={language:i.language,re:i.relevance,relavance:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance,relavance:i.second_best.relevance})}const M=()=>{if(M.called)return;M.called=!0,ee("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(y)};let k=!1;function b(){if("loading"===document.readyState)return void(k=!0);document.querySelectorAll("pre code").forEach(y)}function w(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function L(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function T(e){const t=w(e);return t&&!t.disableAutodetect}function x(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){k&&b()}),!1),Object.assign(e,{highlight:c,highlightAuto:f,highlightAll:b,fixMarkup:function(e){return ee("10.2.0","fixMarkup will be removed entirely in v11.0"),ee("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,l.tabReplace||l.useBR?t.replace(i,e=>"\n"===e?l.useBR?"<br>":e:l.tabReplace?e.replace(/\t/g,l.tabReplace):e):t;var t},highlightElement:y,highlightBlock:function(e){return ee("10.7.0","highlightBlock will be removed entirely in v12.0"),ee("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){e.useBR&&(ee("10.3.0","'useBR' will be removed entirely in v11.0"),ee("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),l=ne(l,e)},initHighlighting:M,initHighlightingOnLoad:function(){ee("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),k=!0},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(X("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;X(e),i=s}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&L(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:w,registerAliases:L,requireLanguage:function(e){ee("10.4.0","requireLanguage will be removed entirely in v11."),ee("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=w(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:T,inherit:ne,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},vuePlugin:V(e).VuePlugin}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="10.7.2";for(const e in R)"object"==typeof R[e]&&d(R[e]);return Object.assign(e,R),e.addPlugin(m),e.addPlugin(J),e.addPlugin(g),e}({});e.exports=oe},function(e,t,n){"use strict";var r=n(645),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,l=e.length,u="",c=!1,d=!1,h=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<l;++s)if(t=e[s],c)switch(c=!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":u+=parseInt(h(),10).toString(2);break;case"c":u+="string"==typeof(n=h())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":u+=parseInt(h(),10);break;case"f":r=String(parseFloat(h()).toFixed(o||6)),u+=d?r:r.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?c=!0:u+=t;return u}(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:g,state:{init:function(){return new u(s.empty,s.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(g);if(i)return i.historyState;n.getMeta(v)&&(e=new u(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(g))return a.getMeta(g).redo?new u(e.done.addTransform(n,null,r,_(t)),e.undone,d(n.mapping.maps[n.steps.length-1]),e.prevTime):new u(e.done,e.undone.addTransform(n,null,r,_(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new u(e.done.rebased(n,o),e.undone.rebased(n,o),h(e.prevRanges,n.mapping),e.prevTime):new u(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),h(e.prevRanges,n.mapping),e.prevTime);var l=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)),c=a?h(e.prevRanges,n.mapping):d(n.mapping.maps[n.steps.length-1]);return new u(e.done.addTransform(n,l?t.selection.getBookmark():null,r,_(t)),s.empty,c,n.time)}(n,r,t,e)}},config:e})},t.redo=function(e,t){var n=g.getState(e);if(!n||0==n.undone.eventCount)return!1;t&&p(n,e,t,!0);return!0},t.redoDepth=function(e){var t=g.getState(e);return t?t.undone.eventCount:0},t.undo=function(e,t){var n=g.getState(e);if(!n||0==n.done.eventCount)return!1;t&&p(n,e,t,!1);return!0},t.undoDepth=function(e){var t=g.getState(e);return t?t.done.eventCount:0},t.HistoryState=void 0;var r,o=(r=n(647))&&r.__esModule?r:{default:r},i=n(165),a=n(162);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,u,c=e.tr,d=[],h=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void h.push(e);if(r){h.push(new l(e.map));var p,f=e.step.map(r.slice(o));f&&c.maybeStep(f).doc&&(p=c.mapping.maps[c.mapping.maps.length-1],d.push(new l(p,null,null,d.length+h.length))),o--,p&&r.appendMap(p,o)}else c.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,u=new s(n.items.slice(0,i).append(h.reverse().concat(d)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:u,transform:c,selection:a}},s.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,a=this.items,u=!r&&a.length?a.get(a.length-1):null,d=0;d<e.steps.length;d++){var h,p=e.steps[d].invert(e.docs[d]),f=new l(e.mapping.maps[d],p,t);(h=u&&u.merge(f))&&(f=h,d?o.pop():a=a.slice(0,a.length-1)),o.push(f),t&&(i++,t=null),r||(u=f)}var m,_,g,v=i-n.depth;return v>c&&(_=v,(m=a).forEach((function(e,t){if(e.selection&&0==_--)return g=t,!1})),a=m.slice(g),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 l(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 u=t;this.items.forEach((function(t){var r=o.getMirror(--u);if(null!=r){i=Math.min(i,r);var s=o.maps[r];if(t.step){var c=e.steps[r].invert(e.docs[r]),d=t.selection&&t.selection.map(o.slice(u+1,r));d&&a++,n.push(new l(s,c,d))}else n.push(new l(s))}}),r);for(var c=[],d=t;d<i;d++)c.push(new l(o.maps[d]));var h=this.items.slice(0,r).append(c).append(n),p=new s(h,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)),u=s&&s.getMap();if(n--,u&&t.appendMap(u,n),s){var c=o.selection&&o.selection.map(t.slice(n));c&&i++;var d,h=new l(u.invert(),s,c),p=r.length-1;(d=r.length&&r[p].merge(h))?r[p]=d:r.push(h)}}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 l=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};l.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new l(t.getMap().invert(),t,this.selection)}};var u=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r};t.HistoryState=u;var c=20;function d(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function h(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=_(t),i=g.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),c=new u(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(g,{redo:r,historyState:c}).scrollIntoView())}}var f=!1,m=null;function _(e){var t=e.plugins;if(m!=t){f=!1,m=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){f=!0;break}}return f}var g=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,l=0;l<a;l++)if(o[l]!==i[l]){s=l;break}var u=[];for(l=s;l<o.length;l++)u.push("..");return(u=u.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(16))},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(162),o=n(163),i=n(394),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(h(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 f(t.replaceWith(i.pos,a.pos,e).setSelection(new r.NodeSelection(t.doc.resolve(i.pos))))}return t}},l=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}},u=function(e){return e.type&&e.type.spec.selectable},c=function(e,t,n){return function(e){return u(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):l(t)(n)},d=function(e,t,n){return function(r){var o="number"==typeof t,i=r.selection.$from,l=o?r.doc.resolve(t):h(r.selection)?r.doc.resolve(i.pos+1):i,d=l.parent;if(h(r.selection)&&n&&r!==(r=s(e)(r)))return r;if(M(d)&&r!==(r=a(d.type,e)(r))){var p=u(e)?l.before(l.depth):l.pos;return c(e,p,r)}if(y(l,e)){r.insert(l.pos,e);var m=o?l.pos:u(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return f(c(e,m,r))}for(var _=l.depth;_>0;_--){var g=l.after(_),v=r.doc.resolve(g);if(y(v,e))return r.insert(g,e),f(c(e,g,r))}return r}},h=function(e){return e instanceof r.NodeSelection},p=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},f=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(_(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=l(Math.max(i,0),-1)(n),n=l(n.selection.$from.start())(n),f(n)}return n}},_=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},g=function(e){return function(t){var n=t.doc.nodeAt(e);return f(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},y=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)},M=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},b=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,l=o.length;s<l;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]}))}))},L=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 l=t.map[r*t.width+s],u=e.nodeAt(l),c=t.findCell(l);a[l]||c.top!==r?o.push(null):(a[l]=!0,o.push(u))}n.push(o)}return n},T=function(e,t){for(var n=[],r=i.TableMap.get(e),o=0;o<r.height;o++){for(var a=e.child(o),s=[],l=0;l<r.width;l++)if(t[o][l]){var u=r.map[o*r.width+l],c=t[o][l],d=e.nodeAt(u).type.createChecked(Object.assign({},c.attrs),c.content,c.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},S=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)},F=function(e){return e instanceof i.CellSelection},I=function(e){if(F(e)){var t=i.TableMap.get(e.$anchorCell.node(-1));return b({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 l=a?0:t,u=a?t:0,c=a?s.width:t+1,d=a?t+1:s.height;if(n){var h=Z(r.selection.$from);if(!h)return r;var p=s.findCell(h.pos-o.start);a?(u=Math.min(u,p.top),d=Math.max(d,p.bottom)):(l=Math.min(l,p.left),c=Math.max(c,p.right))}var m=s.cellsInRect({left:l,top:u,right:a?c:l+1,bottom:a?u+1:d}),_=d-u==1?m:s.cellsInRect({left:a?l:c-1,top:a?d-1:u,right:c,bottom:d}),g=o.start+m[0],v=o.start+_[_.length-1],y=r.doc.resolve(g),M=r.doc.resolve(v);return f(r.setSelection(new i.CellSelection(M,y)))}}return r}}},W=B("column"),q=B("row"),U=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,l=0;l<e+1;l++)s+=o.child(l).nodeSize;var u=o.child(e),c=[],h=0;if(u.forEach((function(e){1===e.attrs.rowspan&&(h+=e.attrs.colspan,c.push(a[e.type.spec.tableRole].createAndFill(e.attrs,e.marks)))})),h<r.width){for(var p=[],f=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--)f(m);p.length&&p.forEach((function(e){t=K(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return d(a.row.create(u.attrs,c),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),f(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),f(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 f(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)),f(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 l=z(i)(t.selection);l&&l.length&&s.push(i)}n=s[0],r=s[s.length-1];for(var u=z(n)(t.selection),c=$(0)(t.selection),d=t.doc.resolve(u[u.length-1].pos),h=void 0,p=r;p>=n;p--){var f=z(p)(t.selection);if(f&&f.length){for(var m=c.length-1;m>=0;m--)if(c[m].pos===f[0].pos){h=f[0];break}if(h)break}}return{$anchor:d,$head:t.doc.resolve(h.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 l=$(i)(t.selection);l&&l.length&&s.push(i)}n=s[0],r=s[s.length-1];for(var u=$(n)(t.selection),c=z(0)(t.selection),d=t.doc.resolve(u[u.length-1].pos),h=void 0,p=r;p>=n;p--){var f=$(p)(t.selection);if(f&&f.length){for(var m=c.length-1;m>=0;m--)if(c[m].pos===f[0].pos){h=f[0];break}if(h)break}}return{$anchor:d,$head:t.doc.resolve(h.pos),indexes:s}}};t.isNodeSelection=h,t.canInsert=y,t.convertTableNodeToArrayOfRows=L,t.convertArrayOfRowsToTableNode=T,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(h(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=F,t.getSelectionRect=function(e){if(F(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(F(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return b({left:e,right:e+1,top:0,bottom:n.height})(t)}return!1}},t.isRowSelected=function(e){return function(t){if(F(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return b({left:0,right:n.width,top:e,bottom:e+1})(t)}return!1}},t.isTableSelected=I,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=q,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 f(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),f(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 f(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&&S(e,t,s,"row");var l=function(e,t,n,r){var o=L(e.node);return o=x(o,t,n,r),T(e.node,o)}(i,a,s,o.direction);return f(r).replaceWith(i.pos,i.pos+i.node.nodeSize,l)}},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&&S(e,t,s,"column");var l=function(e,t,n,r){var o=w(L(e.node));return o=x(o,t,n,r),o=w(o),T(e.node,o)}(i,a,s,o.direction);return f(r).replaceWith(i.pos,i.pos+i.node.nodeSize,l)}},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 f(U(a)(n));if(e>=0&&e<=o.height)return f(i.addRow(n,{map:o,tableStart:r.start,table:r.node},e))}return n}},t.cloneRowAt=U,t.removeColumnAt=V,t.removeRowAt=J,t.removeTable=G,t.removeSelectedColumns=function(e){var t=e.selection;if(I(t))return G(e);if(F(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 f(e)}}return e},t.removeSelectedRows=function(e){var t=e.selection;if(I(t))return G(e);if(F(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 f(e)}}return e},t.removeColumnClosestToPos=function(e){return function(t){var n=X(e);return n?V(n.left)(l(e.pos)(t)):t}},t.removeRowClosestToPos=function(e){return function(t){var n=X(e);return n?J(n.top)(l(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 f(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,l=i.row,u=i.table,c=[],d=[],h=0;h<n;h++)c.push(k(a,o)),r&&d.push(k(s,o));for(var p=[],f=0;f<t;f++)p.push(l.createChecked(null,r&&0===f?d:c));return u.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?g(n.pos)(t):t}},t.replaceParentNodeOfType=a,t.removeSelectedNode=function(e){if(h(e.selection)){var t=e.selection.$from.pos,n=e.selection.$to.pos;return f(e.delete(t,n))}return e},t.replaceSelectedNode=s,t.setTextSelection=l,t.safeInsert=d,t.setParentNodeMarkup=function(e,t,n,r){return function(o){var i=O(e)(o.selection);return i?f(o.setNodeMarkup(i.pos,t,Object.assign({},i.node.attrs,n),r)):o}},t.selectParentNodeOfType=function(e){return function(t){if(!h(t.selection)){var n=O(e)(t.selection);if(n)return f(t.setSelection(r.NodeSelection.create(t.doc,n.pos)))}return t}},t.removeNodeBefore=function(e){var t=E(e.selection);return"number"==typeof t?g(t)(e):e}},,function(e,t,n){"use strict";var r=n(161),o=n(667),i=n(671),a=n(672),s=n(680),l=n(694),u=n(707),c=n(397),d=n(709),h={default:n(710),zero:n(711),commonmark:n(712)},p=/^(vbscript|javascript|file|data):/,f=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!p.test(t)||!!f.test(t)}var _=["http:","https:","mailto:"];function g(e){var t=c.parse(e,!0);if(t.hostname&&(!t.protocol||_.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return c.encode(c.format(t))}function v(e){var t=c.parse(e,!0);if(t.hostname&&(!t.protocol||_.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return c.decode(c.format(t),c.decode.defaultChars+"%")}function y(e,t){if(!(this instanceof y))return new y(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new a,this.renderer=new i,this.linkify=new u,this.validateLink=m,this.normalizeLink=g,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(e),t&&this.set(t)}y.prototype.set=function(e){return r.assign(this.options,e),this},y.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=h[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},y.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},y.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},y.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},y.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},y.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},y.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},y.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=y},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,l,u,c="";for("string"!=typeof t&&(n=t,t=o.defaultChars),void 0===n&&(n=!0),u=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)))c+=e.slice(i,i+3),i+=2;else if(s<128)c+=u[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&i+1<a&&(l=e.charCodeAt(i+1))>=56320&&l<=57343){c+=encodeURIComponent(e[i]+e[i+1]),i++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[i]);return c}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,l,u="";for(t=0,r=e.length;t<r;t+=3)(o=parseInt(e.slice(t+1,t+3),16))<128?u+=n[o]:192==(224&o)&&t+3<r&&128==(192&(i=parseInt(e.slice(t+4,t+6),16)))?(u+=(l=o<<6&1984|63&i)<128?"��":String.fromCharCode(l),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))?(u+=(l=o<<12&61440|i<<6&4032|63&a)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),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))?((l=o<<18&1835008|i<<12&258048|a<<6&4032|63&s)<65536||l>1114111?u+="����":(l-=65536,u+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):u+="�";return u}))}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"]),l=["'"].concat(s),u=["%","/","?",";","#"].concat(l),c=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},f={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,l,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var _=a.exec(m);if(_)return this.pathname=_[1],_[2]&&(this.search=_[2]),this}var g=o.exec(m);if(g&&(i=(g=g[0]).toLowerCase(),this.protocol=g,m=m.substr(g.length)),(t||g||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(l="//"===m.substr(0,2))||g&&p[g]||(m=m.substr(2),this.slashes=!0)),!p[g]&&(l||g&&!f[g])){var v,y,M=-1;for(n=0;n<c.length;n++)-1!==(s=m.indexOf(c[n]))&&(-1===M||s<M)&&(M=s);for(-1!==(y=-1===M?m.lastIndexOf("@"):m.lastIndexOf("@",M))&&(v=m.slice(0,y),m=m.slice(y+1),this.auth=v),M=-1,n=0;n<u.length;n++)-1!==(s=m.indexOf(u[n]))&&(-1===M||s<M)&&(M=s);-1===M&&(M=m.length),":"===m[M-1]&&M--;var k=m.slice(0,M);m=m.slice(M),this.parseHost(k),this.hostname=this.hostname||"";var b="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!b){var w=this.hostname.split(/\./);for(n=0,r=w.length;n<r;n++){var L=w[n];if(L&&!L.match(d)){for(var T="",x=0,S=L.length;x<S;x++)L.charCodeAt(x)>127?T+="x":T+=L[x];if(!T.match(d)){var D=w.slice(0,n),Y=w.slice(n+1),C=L.match(h);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=""),b&&(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),f[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(398),t.Cc=n(399),t.Cf=n(666),t.P=n(213),t.Z=n(400)},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(668),t.parseLinkDestination=n(669),t.parseLinkTitle=n(670)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i,a,s=-1,l=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<l;){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=u,-1}return o&&(s=e.pos),e.pos=u,s}},function(e,t,n){"use strict";var r=n(161).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(161).unescapeAll;e.exports=function(e,t,n){var o,i,a=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return l;for(t++,40===i&&(i=41);t<n;){if((o=e.charCodeAt(t))===i)return l.pos=t+1,l.lines=a,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===o&&41===i)return l;10===o?a++:92===o&&t+1<n&&(t++,10===e.charCodeAt(t)&&a++),t++}return l}},function(e,t,n){"use strict";var r=n(161).assign,o=n(161).unescapeAll,i=n(161).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,l,u,c,d,h=e[t],p=h.info?o(h.info).trim():"",f="",m="";return p&&(f=(u=p.split(/(\s+)/g))[0],m=u.slice(2).join("")),0===(s=n.highlight&&n.highlight(h.content,f,m)||i(h.content)).indexOf("<pre")?s+"\n":p?(l=h.attrIndex("class"),c=h.attrs?h.attrs.slice():[],l<0?c.push(["class",n.langPrefix+f]):(c[l]=c[l].slice(),c[l][1]+=" "+n.langPrefix+f),d={attrs:c},"<pre><code"+a.renderAttrs(d)+">"+s+"</code></pre>\n"):"<pre><code"+a.renderAttrs(h)+">"+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(214),o=[["normalize",n(673)],["block",n(674)],["inline",n(675)],["linkify",n(676)],["replacements",n(677)],["smartquotes",n(678)]];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(679),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(161).arrayReplaceAt;function o(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,i,a,s,l,u,c,d,h,p,f,m,_,g,v,y,M,k=e.tokens;if(e.md.options.linkify)for(n=0,i=k.length;n<i;n++)if("inline"===k[n].type&&e.md.linkify.pretest(k[n].content))for(m=0,t=(a=k[n].children).length-1;t>=0;t--)if("link_close"!==(l=a[t]).type){if("html_inline"===l.type&&(M=l.content,/^<a[>\s]/i.test(M)&&m>0&&m--,o(l.content)&&m++),!(m>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(d=l.content,y=e.md.linkify.match(d),u=[],f=l.level,p=0,c=0;c<y.length;c++)_=y[c].url,g=e.md.normalizeLink(_),e.md.validateLink(g)&&(v=y[c].text,v=y[c].schema?"mailto:"!==y[c].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(h=y[c].index)>p&&((s=new e.Token("text","",0)).content=d.slice(p,h),s.level=f,u.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",g]],s.level=f++,s.markup="linkify",s.info="auto",u.push(s),(s=new e.Token("text","",0)).content=v,s.level=f,u.push(s),(s=new e.Token("link_close","a",-1)).level=--f,s.markup="linkify",s.info="auto",u.push(s),p=y[c].lastIndex);p<d.length&&((s=new e.Token("text","",0)).content=d.slice(p),s.level=f,u.push(s)),k[n].children=a=r(a,t,u)}}else for(t--;a[t].level!==l.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 l(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 u(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)&&l(e.tokens[t].children),r.test(e.tokens[t].content)&&u(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(161).isWhiteSpace,o=n(161).isPunctChar,i=n(161).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function u(e,t){var n,a,u,c,d,h,p,f,m,_,g,v,y,M,k,b,w,L,T,x,S;for(T=[],n=0;n<e.length;n++){for(a=e[n],p=e[n].level,w=T.length-1;w>=0&&!(T[w].level<=p);w--);if(T.length=w+1,"text"===a.type){d=0,h=(u=a.content).length;e:for(;d<h&&(s.lastIndex=d,c=s.exec(u));){if(k=b=!0,d=c.index+1,L="'"===c[0],m=32,c.index-1>=0)m=u.charCodeAt(c.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(_=32,d<h)_=u.charCodeAt(d);else for(w=n+1;w<e.length&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w++)if(e[w].content){_=e[w].content.charCodeAt(0);break}if(g=i(m)||o(String.fromCharCode(m)),v=i(_)||o(String.fromCharCode(_)),y=r(m),(M=r(_))?k=!1:v&&(y||g||(k=!1)),y?b=!1:g&&(M||v||(b=!1)),34===_&&'"'===c[0]&&m>=48&&m<=57&&(b=k=!1),k&&b&&(k=g,b=v),k||b){if(b)for(w=T.length-1;w>=0&&(f=T[w],!(T[w].level<p));w--)if(f.single===L&&T[w].level===p){f=T[w],L?(x=t.md.options.quotes[2],S=t.md.options.quotes[3]):(x=t.md.options.quotes[0],S=t.md.options.quotes[1]),a.content=l(a.content,c.index,S),e[f.token].content=l(e[f.token].content,f.pos,x),d+=S.length-1,f.token===n&&(d+=x.length-1),h=(u=a.content).length,T.length=w;continue e}k?T.push({token:n,pos:c.index,single:L,level:p}):b&&L&&(a.content=l(a.content,c.index,"’"))}else L&&(a.content=l(a.content,c.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)&&u(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(215);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(214),o=[["table",n(681),["paragraph","reference"]],["code",n(682)],["fence",n(683),["paragraph","reference","blockquote","list"]],["blockquote",n(684),["paragraph","reference","blockquote","list"]],["hr",n(685),["paragraph","reference","blockquote","list"]],["list",n(686),["paragraph","reference","blockquote"]],["reference",n(687)],["html_block",n(688),["paragraph","reference","blockquote"]],["heading",n(690),["paragraph","reference","blockquote"]],["lheading",n(691)],["paragraph",n(692)]];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,l=e.md.options.maxNesting;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n))&&!(e.sCount[a]<e.blkIndent);){if(e.level>=l){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(693),e.exports=i},function(e,t,n){"use strict";var r=n(161).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,l,u,c,d,h,p,f,m,_,g,v,y,M,k,b,w,L;if(t+2>n)return!1;if(h=t+1,e.sCount[h]<e.blkIndent)return!1;if(e.sCount[h]-e.blkIndent>=4)return!1;if((u=e.bMarks[h]+e.tShift[h])>=e.eMarks[h])return!1;if(124!==(w=e.src.charCodeAt(u++))&&45!==w&&58!==w)return!1;if(u>=e.eMarks[h])return!1;if(124!==(L=e.src.charCodeAt(u++))&&45!==L&&58!==L&&!r(L))return!1;if(45===w&&r(L))return!1;for(;u<e.eMarks[h];){if(124!==(s=e.src.charCodeAt(u))&&45!==s&&58!==s&&!r(s))return!1;u++}for(p=(l=o(e,t+1)).split("|"),_=[],c=0;c<p.length;c++){if(!(g=p[c].trim())){if(0===c||c===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(g))return!1;58===g.charCodeAt(g.length-1)?_.push(58===g.charCodeAt(0)?"center":"right"):58===g.charCodeAt(0)?_.push("left"):_.push("")}if(-1===(l=o(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(f=p.length)||f!==_.length)return!1;if(a)return!0;for(M=e.parentType,e.parentType="table",b=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],c=0;c<p.length;c++)m=e.push("th_open","th",1),_[c]&&(m.attrs=[["style","text-align:"+_[c]]]),(m=e.push("inline","",0)).content=p[c].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),h=t+2;h<n&&!(e.sCount[h]<e.blkIndent);h++){for(k=!1,c=0,d=b.length;c<d;c++)if(b[c](e,h,n,!0)){k=!0;break}if(k)break;if(!(l=o(e,h).trim()))break;if(e.sCount[h]-e.blkIndent>=4)break;for((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),h===t+2&&((m=e.push("tbody_open","tbody",1)).map=y=[t+2,0]),(m=e.push("tr_open","tr",1)).map=[h,h+1],c=0;c<f;c++)m=e.push("td_open","td",1),_[c]&&(m.attrs=[["style","text-align:"+_[c]]]),(m=e.push("inline","",0)).content=p[c]?p[c].trim():"",m.children=[],m=e.push("td_close","td",-1);m=e.push("tr_close","tr",-1)}return y&&(m=e.push("tbody_close","tbody",-1),y[1]=h),m=e.push("table_close","table",-1),v[1]=h,e.parentType=M,e.line=h,!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,l,u,c,d=!1,h=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(h+3>p)return!1;if(126!==(o=e.src.charCodeAt(h))&&96!==o)return!1;if(l=h,(i=(h=e.skipChars(h,o))-l)<3)return!1;if(c=e.src.slice(l,h),a=e.src.slice(h,p),96===o&&a.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((h=l=e.bMarks[s]+e.tShift[s])<(p=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(h)===o&&!(e.sCount[s]-e.blkIndent>=4||(h=e.skipChars(h,o))-l<i||(h=e.skipSpaces(h))<p)){d=!0;break}return i=e.sCount[t],e.line=s+(d?1:0),(u=e.push("fence","code",0)).info=a,u.content=e.getLines(t+1,s,i,!0),u.markup=c,u.map=[t,e.line],!0}},function(e,t,n){"use strict";var r=n(161).isSpace;e.exports=function(e,t,n,o){var i,a,s,l,u,c,d,h,p,f,m,_,g,v,y,M,k,b,w,L,T=e.lineMax,x=e.bMarks[t]+e.tShift[t],S=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(l=p=e.sCount[t]+1,32===e.src.charCodeAt(x)?(x++,l++,p++,i=!1,M=!0):9===e.src.charCodeAt(x)?(M=!0,(e.bsCount[t]+p)%4==3?(x++,l++,p++,i=!1):i=!0):M=!1,f=[e.bMarks[t]],e.bMarks[t]=x;x<S&&(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+(M?1:0),c=x>=S,v=[e.sCount[t]],e.sCount[t]=p-l,y=[e.tShift[t]],e.tShift[t]=x-e.bMarks[t],b=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",h=t+1;h<n&&(L=e.sCount[h]<e.blkIndent,!((x=e.bMarks[h]+e.tShift[h])>=(S=e.eMarks[h])));h++)if(62!==e.src.charCodeAt(x++)||L){if(c)break;for(k=!1,s=0,u=b.length;s<u;s++)if(b[s](e,h,n,!0)){k=!0;break}if(k){e.lineMax=h,0!==e.blkIndent&&(f.push(e.bMarks[h]),m.push(e.bsCount[h]),y.push(e.tShift[h]),v.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}f.push(e.bMarks[h]),m.push(e.bsCount[h]),y.push(e.tShift[h]),v.push(e.sCount[h]),e.sCount[h]=-1}else{for(l=p=e.sCount[h]+1,32===e.src.charCodeAt(x)?(x++,l++,p++,i=!1,M=!0):9===e.src.charCodeAt(x)?(M=!0,(e.bsCount[h]+p)%4==3?(x++,l++,p++,i=!1):i=!0):M=!1,f.push(e.bMarks[h]),e.bMarks[h]=x;x<S&&(a=e.src.charCodeAt(x),r(a));)9===a?p+=4-(p+e.bsCount[h]+(i?1:0))%4:p++,x++;c=x>=S,m.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(M?1:0),v.push(e.sCount[h]),e.sCount[h]=p-l,y.push(e.tShift[h]),e.tShift[h]=x-e.bMarks[h]}for(_=e.blkIndent,e.blkIndent=0,(w=e.push("blockquote_open","blockquote",1)).markup=">",w.map=d=[t,0],e.md.block.tokenize(e,t,h),(w=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=T,e.parentType=g,d[1]=e.line,s=0;s<y.length;s++)e.bMarks[s+t]=f[s],e.tShift[s+t]=y[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=m[s];return e.blkIndent=_,!0}},function(e,t,n){"use strict";var r=n(161).isSpace;e.exports=function(e,t,n,o){var i,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(i=e.src.charCodeAt(u++))&&45!==i&&95!==i)return!1;for(a=1;u<c;){if((s=e.src.charCodeAt(u++))!==i&&!r(s))return!1;s===i&&a++}return!(a<3)&&(o||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(i))),!0)}},function(e,t,n){"use strict";var r=n(161).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,l,u,c,d,h,p,f,m,_,g,v,y,M,k,b,w,L,T,x,S,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(h=!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;h=!1}if(j&&e.skipSpaces(D)>=e.eMarks[t])return!1;if(g=e.src.charCodeAt(D-1),r)return!0;for(_=e.tokens.length,h?(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(g),M=t,Y=!1,O=e.md.block.ruler.getRules("list"),w=e.parentType,e.parentType="list";M<n;){for(S=D,y=e.eMarks[M],d=k=e.sCount[M]+D-(e.bMarks[t]+e.tShift[t]);S<y;){if(9===(a=e.src.charCodeAt(S)))k+=4-(k+e.bsCount[M])%4;else{if(32!==a)break;k++}S++}if((c=(s=S)>=y?1:k-d)>4&&(c=1),u=d+c,(E=e.push("list_item_open","li",1)).markup=String.fromCharCode(g),E.map=p=[t,0],x=e.tight,T=e.tShift[t],L=e.sCount[t],b=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=u,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=k,s>=y&&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=b,e.tShift[t]=T,e.sCount[t]=L,e.tight=x,(E=e.push("list_item_close","li",-1)).markup=String.fromCharCode(g),M=t=e.line,p[1]=M,s=e.bMarks[t],M>=n)break;if(e.sCount[M]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(A=!1,l=0,f=O.length;l<f;l++)if(O[l](e,M,n,!0)){A=!0;break}if(A)break;if(h){if((D=i(e,M))<0)break}else if((D=o(e,M))<0)break;if(g!==e.src.charCodeAt(D-1))break}return(E=h?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),m[1]=M,e.line=M,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,_),!0}},function(e,t,n){"use strict";var r=n(161).normalizeReference,o=n(161).isSpace;e.exports=function(e,t,n,i){var a,s,l,u,c,d,h,p,f,m,_,g,v,y,M,k,b=0,w=e.bMarks[t]+e.tShift[t],L=e.eMarks[t],T=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(w))return!1;for(;++w<L;)if(93===e.src.charCodeAt(w)&&92!==e.src.charCodeAt(w-1)){if(w+1===L)return!1;if(58!==e.src.charCodeAt(w+1))return!1;break}for(u=e.lineMax,M=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";T<u&&!e.isEmpty(T);T++)if(!(e.sCount[T]-e.blkIndent>3||e.sCount[T]<0)){for(y=!1,d=0,h=M.length;d<h;d++)if(M[d](e,T,u,!0)){y=!0;break}if(y)break}for(L=(v=e.getLines(t,T,e.blkIndent,!1).trim()).length,w=1;w<L;w++){if(91===(a=v.charCodeAt(w)))return!1;if(93===a){f=w;break}(10===a||92===a&&++w<L&&10===v.charCodeAt(w))&&b++}if(f<0||58!==v.charCodeAt(f+1))return!1;for(w=f+2;w<L;w++)if(10===(a=v.charCodeAt(w)))b++;else if(!o(a))break;if(!(_=e.md.helpers.parseLinkDestination(v,w,L)).ok)return!1;if(c=e.md.normalizeLink(_.str),!e.md.validateLink(c))return!1;for(s=w=_.pos,l=b+=_.lines,g=w;w<L;w++)if(10===(a=v.charCodeAt(w)))b++;else if(!o(a))break;for(_=e.md.helpers.parseLinkTitle(v,w,L),w<L&&g!==w&&_.ok?(k=_.str,w=_.pos,b+=_.lines):(k="",w=s,b=l);w<L&&(a=v.charCodeAt(w),o(a));)w++;if(w<L&&10!==v.charCodeAt(w)&&k)for(k="",w=s,b=l;w<L&&(a=v.charCodeAt(w),o(a));)w++;return!(w<L&&10!==v.charCodeAt(w))&&(!!(p=r(v.slice(1,f)))&&(i||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[p]&&(e.env.references[p]={title:k,href:c}),e.parentType=m,e.line=t+b+1),!0))}},function(e,t,n){"use strict";var r=n(689),o=n(401).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,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(u))return!1;for(l=e.src.slice(u,c),o=0;o<i.length&&!i[o][0].test(l);o++);if(o===i.length)return!1;if(r)return i[o][2];if(a=t+1,!i[o][1].test(l))for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(u=e.bMarks[a]+e.tShift[a],c=e.eMarks[a],l=e.src.slice(u,c),i[o][1].test(l)){0!==l.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(161).isSpace;e.exports=function(e,t,n,o){var i,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(i=e.src.charCodeAt(u))||u>=c)return!1;for(a=1,i=e.src.charCodeAt(++u);35===i&&u<c&&a<=6;)a++,i=e.src.charCodeAt(++u);return!(a>6||u<c&&!r(i))&&(o||(c=e.skipSpacesBack(c,u),(s=e.skipCharsBack(c,35,u))>u&&r(e.src.charCodeAt(s-1))&&(c=s),e.line=t+1,(l=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(u,c).trim(),l.map=[t,e.line],l.children=[],(l=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,l,u,c,d,h,p=t+1,f=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";p<n&&!e.isEmpty(p);p++)if(!(e.sCount[p]-e.blkIndent>3)){if(e.sCount[p]>=e.blkIndent&&(l=e.bMarks[p]+e.tShift[p])<(u=e.eMarks[p])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=u)){c=61===d?1:2;break}if(!(e.sCount[p]<0)){for(o=!1,i=0,a=f.length;i<a;i++)if(f[i](e,p,n,!0)){o=!0;break}if(o)break}}return!!c&&(r=e.getLines(t,p,e.blkIndent,!1).trim(),e.line=p+1,(s=e.push("heading_open","h"+String(c),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(c),-1)).markup=String.fromCharCode(d),e.parentType=h,!0)}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,s,l=t+1,u=e.md.block.ruler.getRules("paragraph"),c=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<c&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,o=0,i=u.length;o<i;o++)if(u[o](e,l,c,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(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(215),o=n(161).isSpace;function i(e,t,n,r){var i,a,s,l,u,c,d,h;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="",h=!1,s=l=c=d=0,u=(a=this.src).length;l<u;l++){if(i=a.charCodeAt(l),!h){if(o(i)){c++,9===i?d+=4-d%4:d++;continue}h=!0}10!==i&&l!==u-1||(10!==i&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(c),this.sCount.push(d),this.bsCount.push(0),h=!1,c=0,d=0,s=l+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,l,u,c,d,h=e;if(e>=t)return"";for(c=new Array(t-e),i=0;h<t;h++,i++){for(a=0,d=l=this.bMarks[h],u=h+1<t||r?this.eMarks[h]+1:this.eMarks[h];l<u&&a<n;){if(s=this.src.charCodeAt(l),o(s))9===s?a+=4-(a+this.bsCount[h])%4:a++;else{if(!(l-d<this.tShift[h]))break;a++}l++}c[i]=a>n?new Array(a-n+1).join(" ")+this.src.slice(l,u):this.src.slice(l,u)}return c.join("")},i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(214),o=[["text",n(695)],["newline",n(696)],["escape",n(697)],["backticks",n(698)],["strikethrough",n(402).tokenize],["emphasis",n(403).tokenize],["link",n(699)],["image",n(700)],["autolink",n(701)],["html_inline",n(702)],["entity",n(703)]],i=[["balance_pairs",n(704)],["strikethrough",n(402).postProcess],["emphasis",n(403).postProcess],["text_collapse",n(705)]];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(706),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(161).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(161).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,l,u,c=e.pos;if(96!==e.src.charCodeAt(c))return!1;for(n=c,c++,r=e.posMax;c<r&&96===e.src.charCodeAt(c);)c++;if(l=(o=e.src.slice(n,c)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=o),e.pos+=l,!0;for(a=s=c;-1!==(a=e.src.indexOf("`",s));){for(s=a+1;s<r&&96===e.src.charCodeAt(s);)s++;if((u=s-a)===l)return t||((i=e.push("code_inline","code",0)).markup=o,i.content=e.src.slice(c,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[u]=a}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=l,!0}},function(e,t,n){"use strict";var r=n(161).normalizeReference,o=n(161).isSpace;e.exports=function(e,t){var n,i,a,s,l,u,c,d,h="",p="",f=e.pos,m=e.posMax,_=e.pos,g=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((u=s+1)<m&&40===e.src.charCodeAt(u)){for(g=!1,u++;u<m&&(i=e.src.charCodeAt(u),o(i)||10===i);u++);if(u>=m)return!1;if(_=u,(c=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok){for(h=e.md.normalizeLink(c.str),e.md.validateLink(h)?u=c.pos:h="",_=u;u<m&&(i=e.src.charCodeAt(u),o(i)||10===i);u++);if(c=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<m&&_!==u&&c.ok)for(p=c.str,u=c.pos;u<m&&(i=e.src.charCodeAt(u),o(i)||10===i);u++);}(u>=m||41!==e.src.charCodeAt(u))&&(g=!0),u++}if(g){if(void 0===e.env.references)return!1;if(u<m&&91===e.src.charCodeAt(u)?(_=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?a=e.src.slice(_,u++):u=s+1):u=s+1,a||(a=e.src.slice(l,s)),!(d=e.env.references[r(a)]))return e.pos=f,!1;h=d.href,p=d.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",h]],p&&n.push(["title",p]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=u,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(161).normalizeReference,o=n(161).isSpace;e.exports=function(e,t){var n,i,a,s,l,u,c,d,h,p,f,m,_,g="",v=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(u=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((c=l+1)<y&&40===e.src.charCodeAt(c)){for(c++;c<y&&(i=e.src.charCodeAt(c),o(i)||10===i);c++);if(c>=y)return!1;for(_=c,(h=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(g=e.md.normalizeLink(h.str),e.md.validateLink(g)?c=h.pos:g=""),_=c;c<y&&(i=e.src.charCodeAt(c),o(i)||10===i);c++);if(h=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<y&&_!==c&&h.ok)for(p=h.str,c=h.pos;c<y&&(i=e.src.charCodeAt(c),o(i)||10===i);c++);else p="";if(c>=y||41!==e.src.charCodeAt(c))return e.pos=v,!1;c++}else{if(void 0===e.env.references)return!1;if(c<y&&91===e.src.charCodeAt(c)?(_=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?s=e.src.slice(_,c++):c=l+1):c=l+1,s||(s=e.src.slice(u,l)),!(d=e.env.references[r(s)]))return e.pos=v,!1;g=d.href,p=d.title}return t||(a=e.src.slice(u,l),e.md.inline.parse(a,e.md,e.env,m=[]),(f=e.push("image","img",0)).attrs=n=[["src",g],["alt",""]],f.children=m,f.content=a,p&&n.push(["title",p])),e.pos=c,e.posMax=y,!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,l,u,c=e.pos;if(60!==e.src.charCodeAt(c))return!1;for(l=e.pos,u=e.posMax;;){if(++c>=u)return!1;if(60===(s=e.src.charCodeAt(c)))return!1;if(62===s)break}return n=e.src.slice(l+1,c),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(401).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(396),o=n(161).has,i=n(161).isValidEntityCode,a=n(161).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,u,c=e.pos,d=e.posMax;if(38!==e.src.charCodeAt(c))return!1;if(c+1<d)if(35===e.src.charCodeAt(c+1)){if(u=e.src.slice(c).match(s))return t||(n="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(n)?a(n):a(65533)),e.pos+=u[0].length,!0}else if((u=e.src.slice(c).match(l))&&o(r,u[1]))return t||(e.pending+=r[u[1]]),e.pos+=u[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,l,u,c={},d=t.length;for(n=0;n<d;n++)if((o=t[n]).length=o.length||0,o.close){for(c.hasOwnProperty(o.marker)||(c[o.marker]=[-1,-1,-1]),a=c[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&&(l=!1,(i.close||o.open)&&(i.length+o.length)%3==0&&(i.length%3==0&&o.length%3==0||(l=!0)),!l)){u=r>0&&!t[r-1].open?t[r-1].jump+1:0,o.jump=n-r+u,o.open=!1,i.end=n,i.jump=u,i.close=!1,s=-1;break}-1!==s&&(c[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(215),o=n(161).isWhiteSpace,i=n(161).isPunctChar,a=n(161).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,l,u,c,d,h,p,f=e,m=!0,_=!0,g=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;f<g&&this.src.charCodeAt(f)===v;)f++;return s=f-e,r=f<g?this.src.charCodeAt(f):32,d=a(n)||i(String.fromCharCode(n)),p=a(r)||i(String.fromCharCode(r)),c=o(n),(h=o(r))?m=!1:p&&(c||d||(m=!1)),c?_=!1:d&&(h||p||(_=!1)),t?(l=m,u=_):(l=m&&(!_||d),u=_&&(!m||p)),{can_open:l,can_close:u,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 l={"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}}},u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function c(e){var t=e.re=n(708)(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 l=[];function u(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:u(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?u(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===o(e)}(n)?u(t,n):l.push(t)}})),l.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 c=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+"))("+c+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","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 h(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({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},c(this)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,c(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,l;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:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<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(h(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(h(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(),c(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,c(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(398).source,t.src_Cc=n(399).source,t.src_Z=n(400).source,t.src_P=n(213).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;
/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(h[e])}function _(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function g(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+_((e=e.replace(d,".")).split("."),t).join(".")}function v(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 y(e){return _(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)})).join("")}function M(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function b(e){var t,n,r,o,i,a,s,u,c,d,h,f=[],_=e.length,g=0,v=128,M=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),f.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<_;){for(i=g,a=1,s=36;o>=_&&m("invalid-input"),((u=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||u>p((l-g)/a))&&m("overflow"),g+=u*a,!(u<(c=s<=M?1:s>=M+26?26:s-M));s+=36)a>p(l/(d=36-c))&&m("overflow"),a*=d;M=k(g-i,t=f.length+1,0==i),p(g/t)>l-v&&m("overflow"),v+=p(g/t),g%=t,f.splice(g++,0,v)}return y(f)}function w(e){var t,n,r,o,i,a,s,u,c,d,h,_,g,y,b,w=[];for(_=(e=v(e)).length,t=128,n=0,i=72,a=0;a<_;++a)(h=e[a])<128&&w.push(f(h));for(r=o=w.length,o&&w.push("-");r<_;){for(s=l,a=0;a<_;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>p((l-n)/(g=r+1))&&m("overflow"),n+=(s-t)*g,t=s,a=0;a<_;++a)if((h=e[a])<t&&++n>l&&m("overflow"),h==t){for(u=n,c=36;!(u<(d=c<=i?1:c>=i+26?26:c-i));c+=36)b=u-d,y=36-d,w.push(f(M(d+b%y,0))),u=p(b/y);w.push(f(M(u,0))),i=k(n,g,r==o),n=0,++r}++n,++t}return w.join("")}s={version:"1.4.1",ucs2:{decode:v,encode:y},decode:b,encode:w,toASCII:function(e){return g(e,(function(e){return c.test(e)?"xn--"+w(e):e}))},toUnicode:function(e){return g(e,(function(e){return u.test(e)?b(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(176)(e),n(5))},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 l(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 u(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++)l(t,n)&&(u(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(715)(),r.Proxy.revocable=r.Proxy.revocable)}).call(this,n(16),n(5))},function(e,t,n){"use strict";e.exports=function(){let e,t=null;function n(e){return!!e&&("object"==typeof e||"function"==typeof e)}function r(e){if(null!==e&&!n(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}const o=Object,i=Boolean(o.create)||!({__proto__:null}instanceof o),a=o.create||(i?function(e){return r(e),{__proto__:e}}:function(e){if(r(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}),s=function(){return null},l=o.getPrototypeOf||([].__proto__===Array.prototype?function(e){const t=e.__proto__;return n(t)?t:null}:s);return e=function(u,c){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!n(u)||!n(c))throw new TypeError("Cannot create proxy with a non-object as target or handler");let d=function(){};t=function(){u=null,d=function(e){throw new TypeError("Cannot perform '".concat(e,"' on a proxy that has been revoked"))}},setTimeout((function(){t=null}),0);const h=c;c={get:null,set:null,apply:null,construct:null};for(let e in h){if(!(e in c))throw new TypeError("Proxy polyfill does not support trap '".concat(e,"'"));c[e]=h[e]}"function"==typeof h&&(c.apply=h.apply.bind(h));const p=l(u);let f,m=!1,_=!1;"function"==typeof u?(f=function(){const e=this&&this.constructor===f,t=Array.prototype.slice.call(arguments);if(d(e?"construct":"apply"),e&&c.construct)return c.construct.call(this,u,t);if(!e&&c.apply)return c.apply(u,this,t);if(e){t.unshift(u);return new(u.bind.apply(u,t))}return u.apply(this,t)},m=!0):u instanceof Array?(f=[],_=!0):f=i||null!==p?a(p):{};const g=c.get?function(e){return d("get"),c.get(this,e,f)}:function(e){return d("get"),this[e]},v=c.set?function(e,t){d("set");c.set(this,e,t,f)}:function(e,t){d("set"),this[e]=t},y=o.getOwnPropertyNames(u),M={};y.forEach((function(e){if((m||_)&&e in f)return;const t=o.getOwnPropertyDescriptor(u,e),n={enumerable:Boolean(t.enumerable),get:g.bind(u,e),set:v.bind(u,e)};o.defineProperty(f,e,n),M[e]=!0}));let k=!0;if(m||_){const e=o.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return r(t),e.__proto__=t,e}:s);p&&e(f,p)||(k=!1)}if(c.get||!k)for(let e in u)M[e]||o.defineProperty(f,e,{get:g.bind(u,e)});return o.seal(u),o.seal(f),f},e.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(163),i=(r=n(395))&&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 l(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function u(e,t){return e.noCloseToken||"code_inline"==t||"code_block"==t||"fence"==t}function c(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 h=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);u(o,r)?n[r]=function(e,t,n,r){e.openNode(i,l(o,t,n,r)),e.addText(c(t.content)),e.closeNode()}:(n[r+"_open"]=function(e,t,n,r){return e.openNode(i,l(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,l(o,t,n,r))}}else if(o.mark){var s=e.marks[o.mark];u(o,r)?n[r]=function(e,t,n,r){e.openMark(s.create(l(o,t,n,r))),e.addText(c(t.content)),e.closeMark(s)}:(n[r+"_open"]=function(e,t,n,r){return e.openMark(s.create(l(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));u(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=h,h.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 f=new h(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=f;var m=function(e,t){this.nodes=e,this.marks=t};t.MarkdownSerializer=m,m.prototype.serialize=function(e,t){var n=new y(this.nodes,this.marks,t);return n.renderContent(e),n.out};var _=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 g(n.child(r),-1)},close:function(e,t,n,r){return g(n.child(r-1),1)},escape:!1}});function g(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=_;var y=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=y,y.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}},y.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)},y.prototype.atBlank=function(){return/(^|\n)$/.test(this.out)},y.prototype.ensureNewLine=function(){this.atBlank()||(this.out+="\n")},y.prototype.write=function(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)},y.prototype.closeBlock=function(e){this.closed=e},y.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")}},y.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)},y.prototype.renderContent=function(e){var t=this;e.forEach((function(n,r,o){return t.render(n,e,o)}))},y.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 l=r;if(r="",o&&o.isText&&s.some((function(e){var n=t.marks[e.type.name];return n&&n.expelEnclosingWhitespace}))){var u=/^(\s*)(.*?)(\s*)$/m.exec(o.text),c=(u[0],u[1]),d=u[2],h=u[3];l+=c,r=h,(c||h)&&((o=d?o.withText(d):null)||(s=n))}var p=s.length&&s[s.length-1],f=p&&!1===t.marks[p.type.name].escape,m=s.length-(f?1:0);e:for(var _=0;_<m;_++){var g=s[_];if(!t.marks[g.type.name].mixable)break;for(var v=0;v<n.length;v++){var y=n[v];if(!t.marks[y.type.name].mixable)break;if(g.eq(y)){_>v?s=s.slice(0,v).concat(g).concat(s.slice(v,_)).concat(s.slice(_+1,m)):v>_&&(s=s.slice(0,_).concat(s.slice(_+1,v)).concat(g).concat(s.slice(v,m)));continue e}}}for(var M=0;M<Math.min(n.length,m)&&s[M].eq(n[M]);)++M;for(;M<n.length;)t.text(t.markString(n.pop(),!1,e,a),!1);if(l&&t.text(l),o){for(;n.length<m;){var k=s[n.length];n.push(k),t.text(t.markString(k,!0,e,a),!1)}f&&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)},y.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},y.prototype.esc=function(e,t){return e=e.replace(/[`*\\~\[\]]/g,"\\$&"),t&&(e=e.replace(/^[:#\-*+]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),e},y.prototype.quote=function(e){var t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]},y.prototype.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},y.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)},y.prototype.getEnclosingWhitespace=function(e){return{leading:(e.match(/^(\s+)/)||[])[0],trailing:(e.match(/(\s+)$/)||[])[0]}}}]]);
-//# sourceMappingURL=vendors~editor.js.map?v=4e6bf1b33822929d7262 \ No newline at end of file
+//# sourceMappingURL=vendors~editor.js.map?v=a4ced4e9a39f3193502c \ No newline at end of file