]> source.dussan.org Git - gitblit.git/commitdiff
Updating ProseMirror to 0.4.0
authorPaul Martin <paul@paulsputer.com>
Wed, 24 Feb 2016 23:05:13 +0000 (23:05 +0000)
committerPaul Martin <paul@paulsputer.com>
Sun, 27 Mar 2016 16:09:16 +0000 (17:09 +0100)
src/main/js/prosemirror
src/main/resources/gitblit-editor.min.js

index c28df1df1f2790b1d72715c4c1c4a1d8d24560e8..501e6fd6d5067c942b73d140a41e21afc8bb5f9b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c28df1df1f2790b1d72715c4c1c4a1d8d24560e8
+Subproject commit 501e6fd6d5067c942b73d140a41e21afc8bb5f9b
index 4efeee0f10476bfd20487e1fb7f8c31acd21acfe..e8af97da3257df4b6c057085e574362fd38246fc 100644 (file)
@@ -1,10 +1,10 @@
-!function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return o(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){function n(e,t,r){var n=document.createElement("div");n.className="ProseMirror-icon";var o=document.createElement("i");o.setAttribute("class","fa fa-fw "+r);var i=e.active(t);return(i||e.spec.invert)&&n.classList.add("ProseMirror-menu-active"),n.appendChild(o),n}function o(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function i(e){return o()?(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),!0):(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),!1)}attachDocumentEditor=function(t,r){var s=e("./prosemirror/dist/edit");e("./prosemirror/dist/inputrules/autoinput"),e("./prosemirror/dist/menu/menubar"),e("./prosemirror/dist/markdown");var a=e("./prosemirror/dist/menu/menu"),u=document.querySelector("#editor");u.style.display="none";var l=new a.MenuCommandGroup("gitblitCommands"),c=new a.MenuCommandGroup("viewCommands"),p=new a.MenuCommandGroup("textCommands"),f=new a.MenuCommandGroup("insertCommands"),h=[l,c,p,a.inlineGroup,a.blockGroup,a.historyGroup,f];const d=Object.create(null);d.GitblitCommit={label:"GitblitCommit",run:function(){r.modal({show:!0}),t.value=m.getContent("markdown")},menu:{group:"gitblitCommands",rank:10,display:{render:function(e,t){return n(e,t,"fa-save")}}}},d.FullScreen={label:"Toggle Fullscreen",derive:"toggle",run:function(e){var t=window.scrollY,r=[document.querySelector("div.repositorynavbar"),document.querySelector("div.navbar"),document.querySelector("div.docnav")],n=r.reduce(function(e,t){return e+t.offsetHeight},0);r.forEach(function(e){e.classList.toggle("forceHide")}),i(document.documentElement)?n-=60:n=60,e.signal("commandsChanged"),setTimeout(function(){window.scrollTo(0,Math.max(0,t-n))},100)},menu:{group:"viewCommands",rank:11,display:{render:function(e,t){return n(e,t,"fa-arrows-alt")}}},active:function(e){return o()?!0:!1}},d.heading1={derive:"toggle",run:function(e){var t=e.selection,r=t.from,n=t.to,o={name:"make",level:1},i=e.doc.path(r.path);return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(r,n,e.schema.nodes.paragraph,{}).apply(e.apply.scroll):e.tr.setBlockType(r,n,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.path(e.selection.from.path);return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:1})?!0:!1},menu:{group:"textCommands",rank:1,display:{render:function(e,t){return n(e,t,"fa-header fa-header-x fa-header-1")}}},select:function(){return!0}},d.heading2={derive:"toggle",run:function(e){var t=e.selection,r=t.from,n=t.to,o={name:"make",level:2},i=e.doc.path(r.path);return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(r,n,e.schema.nodes.paragraph,{}).apply(e.apply.scroll):e.tr.setBlockType(r,n,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.path(e.selection.from.path);return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:2})?!0:!1},menu:{group:"textCommands",rank:2,display:{render:function(e,t){return n(e,t,"fa-header fa-header-x fa-header-2")}}},select:function(){return!0}},d.heading3={derive:"toggle",run:function(e){var t=e.selection,r=t.from,n=t.to,o={name:"make",level:3},i=e.doc.path(r.path);return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(r,n,e.schema.nodes.paragraph,{}).apply(e.apply.scroll):e.tr.setBlockType(r,n,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.path(e.selection.from.path);return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:3})?!0:!1},menu:{group:"textCommands",rank:3,display:{render:function(e,t){return n(e,t,"fa-header fa-header-x fa-header-3")}}},select:function(){return!0}},d["strong:toggle"]={menu:{group:"textCommands",rank:4,display:{render:function(e,t){return n(e,t,"fa-bold")}}},select:function(){return!0}},d["em:toggle"]={menu:{group:"textCommands",rank:5,display:{render:function(e,t){return n(e,t,"fa-italic")}}},select:function(){return!0}},d["code:toggle"]={menu:{group:"textCommands",rank:6,display:{render:function(e,t){return n(e,t,"fa-code")}}},select:function(){return!0}},d["image:insert"]={menu:{group:"insertCommands",rank:1,display:{render:function(e,t){return n(e,t,"fa-picture-o")}}}};var m=window.pm=new s.ProseMirror({place:document.querySelector("#visualEditor"),autoInput:!0,doc:u.value,menuBar:{"float":!0,content:h},commands:s.CommandSet["default"].update(d),docFormat:"markdown"}),g=document.querySelector(".ProseMirror").offsetTop,v=!1;window.addEventListener("scroll",function(){var e=window.scrollY;v||window.requestAnimationFrame(function(){!o()&&e>g?document.querySelector(".ProseMirror-menubar").classList.add("scrolling"):document.querySelector(".ProseMirror-menubar").classList.remove("scrolling"),v=!1}),v=!0})},commitChanges=function(){document.querySelector("form#documentEditor").submit()}},{"./prosemirror/dist/edit":13,"./prosemirror/dist/inputrules/autoinput":26,"./prosemirror/dist/markdown":29,"./prosemirror/dist/menu/menu":32,"./prosemirror/dist/menu/menubar":33}],2:[function(e,t,r){(function(e){!function(n){function o(e){throw new RangeError(j[e])}function i(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function s(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(D,".");var o=e.split("."),s=i(o,t).join(".");return n+s}function a(e){for(var t,r,n=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function u(e){return i(e,function(e){var t="";return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function l(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:_}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function p(e,t,r){var n=0;for(e=r?z(e/S):e>>1,e+=z(e/t);e>q*C>>1;n+=_)e=z(e/q);return z(n+(q+1)*e/(e+M))}function f(e){var t,r,n,i,s,a,c,f,h,d,m=[],g=e.length,v=0,y=O,k=A;for(r=e.lastIndexOf(P),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(i=r>0?r+1:0;g>i;){for(s=v,a=1,c=_;i>=g&&o("invalid-input"),f=l(e.charCodeAt(i++)),(f>=_||f>z((w-v)/a))&&o("overflow"),v+=f*a,h=k>=c?x:c>=k+C?C:c-k,!(h>f);c+=_)d=_-h,a>z(w/d)&&o("overflow"),a*=d;t=m.length+1,k=p(v-s,t,0==s),z(v/t)>w-y&&o("overflow"),y+=z(v/t),v%=t,m.splice(v++,0,y)}return u(m)}function h(e){var t,r,n,i,s,u,l,f,h,d,m,g,v,y,k,b=[];for(e=a(e),g=e.length,t=O,r=0,s=A,u=0;g>u;++u)m=e[u],128>m&&b.push(N(m));for(n=i=b.length,i&&b.push(P);g>n;){for(l=w,u=0;g>u;++u)m=e[u],m>=t&&l>m&&(l=m);for(v=n+1,l-t>z((w-r)/v)&&o("overflow"),r+=(l-t)*v,t=l,u=0;g>u;++u)if(m=e[u],t>m&&++r>w&&o("overflow"),m==t){for(f=r,h=_;d=s>=h?x:h>=s+C?C:h-s,!(d>f);h+=_)k=f-d,y=_-d,b.push(N(c(d+k%y,0))),f=z(k/y);b.push(N(c(f,0))),s=p(r,v,n==i),r=0,++n}++r,++t}return b.join("")}function d(e){return s(e,function(e){return T.test(e)?f(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return E.test(e)?"xn--"+h(e):e})}var g="object"==typeof r&&r&&!r.nodeType&&r,v="object"==typeof t&&t&&!t.nodeType&&t,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(n=y);var k,b,w=2147483647,_=36,x=1,C=26,M=38,S=700,A=72,O=128,P="-",T=/^xn--/,E=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=_-x,z=Math.floor,N=String.fromCharCode;if(k={version:"1.3.2",ucs2:{decode:a,encode:u},decode:f,encode:h,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return k});else if(g&&v)if(t.exports==g)v.exports=k;else for(b in k)k.hasOwnProperty(b)&&(g[b]=k[b]);else n.punycode=k}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,r){"use strict";function n(e,t){var r=document.createElement(e);if(t)for(var n in t)"style"==n?r.style.cssText=t[n]:null!=t[n]&&r.setAttribute(n,t[n]);for(var i=arguments.length,s=Array(i>2?i-2:0),a=2;i>a;a++)s[a-2]=arguments[a];for(var u=0;u<s.length;u++)o(s[u],r);return r}function o(e,t){if("string"==typeof e&&(e=document.createTextNode(e)),Array.isArray(e))for(var r=0;r<e.length;r++)o(e[r],t);else t.appendChild(e)}function i(e){l?l(e):setTimeout(e,10)}function s(e,t){return 1!=t.nodeType&&(t=t.parentNode),t&&e.contains(t)}function a(e){h?h.textContent+=e:f+=e}function u(){h||(h=document.createElement("style"),h.textContent="/* ProseMirror CSS */\n"+f,document.head.insertBefore(h,document.head.firstChild))}Object.defineProperty(r,"__esModule",{value:!0}),r.elt=n,r.requestAnimationFrame=i,r.contains=s,r.insertCSS=a,r.ensureCSSAdded=u;var l=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,c=/MSIE \d/.test(navigator.userAgent),p=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),f=(r.browser={mac:/Mac/.test(navigator.platform),ie_upto10:c,ie_11up:p,ie:c||p,gecko:/gecko\/\d/i.test(navigator.userAgent)},""),h=null},{}],4:[function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t,r){"char"!=r&&"word"!=r&&m.AssertionError.raise("Unknown motion unit: "+r);for(var n=null,o=0;;){if(0==t)return t;var i=e.chunkBefore(t),s=i.start,a=i.node;if(!a.isText)return n?t:t-1;if("char"==r)for(var u=t-s;u>0;u--){if(!(0,g.isExtendingChar)(a.text.charAt(u-1)))return t-1;t--}else if("word"==r)for(var u=t-s;u>0;u--){var l=(0,g.charCategory)(a.text.charAt(u-1));if(null==n||1==o&&"space"==n)n=l;else if(n!=l)return t;t--,o++}}}function i(e,t){var r=e.doc.path(t.path),o=r.child(t.offset-1),i=r.child(t.offset);if(!o.type.canContainContent(i.type)||e.tr.join(t).apply(e.apply.scroll)===!1){var s=void 0;if(i.isTextblock&&(s=o.type.findConnection(i.type))){var a=e.tr,u=t.move(1);if(a.step("ancestor",t,u,null,{types:[o.type].concat(n(s)),attrs:[o.attrs].concat(n(s.map(function(){return null})))}),a.join(u),a.join(t),a.apply(e.apply.scroll)!==!1)return}var l=(0,v.findSelectionFrom)(e.doc,t,1);return e.tr.lift(l.from,l.to).apply(e.apply.scroll)}}function s(e,t,r){"char"!=r&&"word"!=r&&m.AssertionError.raise("Unknown motion unit: "+r);for(var n=null,o=0;;){if(t==e.size)return t;var i=e.chunkAfter(t),s=i.start,a=i.node;if(!a.isText)return n?t:t+1;if("char"==r)for(var u=t-s;u<a.text.length;u++){if(!(0,g.isExtendingChar)(a.text.charAt(u+1)))return t+1;t++}else if("word"==r)for(var u=t-s;u<a.text.length;u++){var l=(0,g.charCategory)(a.text.charAt(u));if(null==n||1==o&&"space"==n)n=l;else if(n!=l)return t;t++,o++}}}function a(e){var t=e.selection,r=t.node,n=t.from;return r?(0,d.joinableBlocks)(e.doc,n)?n:null:(0,d.joinPoint)(e.doc,n,-1)}function u(e){var t=e.selection,r=t.node,n=t.to;return r?(0,d.joinableBlocks)(e.doc,n)?n:null:(0,d.joinPoint)(e.doc,n,1)}function l(e){var t=e.selection,r=0;if(t.node)return!!t.from.depth&&t.from.shorten();for(;r<t.head.depth&&r<t.anchor.depth&&t.head.path[r]==t.anchor.path[r];r++);return 0==r?!1:t.head.shorten(r-1)}function c(e,t){var r=e.selection,n=r.from,o=r.to,i=r.node,s=t>0?o:n;return(0,v.findSelectionFrom)(e.doc,i&&i.isBlock?s:s.shorten(null,t>0?1:0),t)}function p(e,t){var r=e.selection,n=r.empty,o=r.node,i=r.from,s=r.to;if(!n&&!o)return!1;if(o&&o.isInline)return e.setTextSelection(t>0?s:i),!0;var a=void 0;if(!o&&(a=e.doc.path(i.path))&&(t>0?i.offset<a.size:i.offset)){var u=t>0?a.chunkAfter(i.offset):a.chunkBefore(i.offset),l=u.node,p=u.start;return l.type.selectable&&p==i.offset-(t>0?0:1)?(e.setNodeSelection(0>t?i.move(-1):i),!0):!1}var f=c(e,t);return f&&(f instanceof v.NodeSelection||o)?(e.setSelectionDirect(f),!0):!1}function f(e,t){var r=e.selection,n=r.empty,o=r.node,i=r.from,s=r.to;if(!n&&!o)return!1;var a=!0;if((!o||o.isInline)&&(a=(0,v.verticalMotionLeavesTextblock)(e,t>0?s:i,t)),a){var u=c(e,t);if(u&&u instanceof v.NodeSelection)return e.setSelectionDirect(u),o||(e.sel.lastNonNodePos=i),!0}if(!o)return!1;if(o.isInline)return(0,y.setDOMSelectionToPos)(e,i),!1;var l=e.sel.lastNonNodePos,p=(0,v.findSelectionFrom)(e.doc,0>t?i:s,t);return l&&p&&h.Pos.samePath(l.path,p.from.path)?((0,y.setDOMSelectionToPos)(e,l),!1):(e.setSelectionDirect(p),!0)}Object.defineProperty(r,"__esModule",{value:!0}),r.baseCommands=void 0;var h=e("../model"),d=e("../transform"),m=e("../util/error"),g=e("./char"),v=e("./selection"),y=e("./dompos"),k=r.baseCommands=Object.create(null);k.deleteSelection={label:"Delete the selection",run:function(e){return e.tr.replaceSelection().apply(e.apply.scroll)},keys:{all:["Backspace(10)","Delete(10)","Mod-Backspace(10)","Mod-Delete(10)"],mac:["Ctrl-H(10)","Alt-Backspace(10)","Ctrl-D(10)","Ctrl-Alt-Backspace(10)","Alt-Delete(10)","Alt-D(10)"]}},k.joinBackward={label:"Join with the block above",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset>0)return!1;for(var o=void 0,s=void 0,a=r.path.length-1;!o&&a>=0;a--)r.path[a]>0&&(s=r.shorten(a),o=e.doc.path(s.path).child(s.offset-1));return o?null==o.type.contains?e.tr["delete"](s.move(-1),s).apply(e.apply.scroll):i(e,s):e.tr.lift(r).apply(e.apply.scroll)},keys:["Backspace(30)","Mod-Backspace(30)"]},k.deleteCharBefore={label:"Delete a character before the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||0==r.offset)return!1;var i=o(e.doc.path(r.path),r.offset,"char");return e.tr["delete"](new h.Pos(r.path,i),r).apply(e.apply.scroll)},keys:{all:["Backspace(60)"],mac:["Ctrl-H(40)"]}},k.deleteWordBefore={label:"Delete the word before the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||0==r.offset)return!1;var i=o(e.doc.path(r.path),r.offset,"word");return e.tr["delete"](new h.Pos(r.path,i),r).apply(e.apply.scroll)},keys:{all:["Mod-Backspace(40)"],mac:["Alt-Backspace(40)"]}},k.joinForward={label:"Join with the block below",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset<e.doc.path(r.path).size)return!1;for(var o=void 0,s=void 0,a=r.path.length-1;!o&&a>=0;a--){s=r.shorten(a,1);var u=e.doc.path(s.path);s.offset<u.size&&(o=u.child(s.offset))}return o?null==o.type.contains?e.tr["delete"](s,s.move(1)).apply(e.apply.scroll):i(e,s):!1},keys:["Delete(30)","Mod-Delete(30)"]},k.deleteCharAfter={label:"Delete a character after the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset==e.doc.path(r.path).size)return!1;var o=s(e.doc.path(r.path),r.offset,"char");return e.tr["delete"](r,new h.Pos(r.path,o)).apply(e.apply.scroll)},keys:{all:["Delete(60)"],mac:["Ctrl-D(60)"]}},k.deleteWordAfter={label:"Delete a word after the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset==e.doc.path(r.path).size)return!1;var o=s(e.doc.path(r.path),r.offset,"word");return e.tr["delete"](r,new h.Pos(r.path,o)).apply(e.apply.scroll)},keys:{all:["Mod-Delete(40)"],mac:["Ctrl-Alt-Backspace(40)","Alt-Delete(40)","Alt-D(40)"]}},k.joinUp={label:"Join with above block",run:function(e){var t=a(e),r=e.selection.node;return t?(e.tr.join(t).apply(),void(r&&e.setNodeSelection(t.move(-1)))):!1},select:function(e){return a(e)},menu:{group:"block",rank:80,display:{type:"icon",width:800,height:900,path:"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z"}},keys:["Alt-Up"]},k.joinDown={label:"Join with below block",run:function(e){var t=e.selection.node,r=u(e);return r?(e.tr.join(r).apply(),void(t&&e.setNodeSelection(r.move(-1)))):!1},select:function(e){return u(e)},keys:["Alt-Down"]},k.lift={label:"Lift out of enclosing block",run:function(e){var t=e.selection,r=t.from,n=t.to;return e.tr.lift(r,n).apply(e.apply.scroll)},select:function(e){var t=e.selection,r=t.from,n=t.to;return(0,d.canLift)(e.doc,r,n)},menu:{group:"block",rank:75,display:{type:"icon",width:1024,height:1024,path:"M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z"}},keys:["Alt-Left"]},k.newlineInCode={label:"Insert newline",run:function(e){var t=e.selection,r=t.from,n=t.to,o=t.node,i=void 0;return!o&&h.Pos.samePath(r.path,n.path)&&(i=e.doc.path(r.path)).type.isCode&&n.offset<i.size?e.tr.typeText("\n").apply(e.apply.scroll):!1},keys:["Enter(10)"]},k.createParagraphNear={label:"Create a paragraph near the selected leaf block",run:function(e){var t=e.selection,r=t.from,n=t.to,o=t.node;if(!o||!o.isBlock||o.type.contains)return!1;var i=r.offset?n:r;e.tr.insert(i,e.schema.defaultTextblockType().create()).apply(e.apply.scroll),e.setTextSelection(new h.Pos(i.toPath(),0))},keys:["Enter(20)"]},k.liftEmptyBlock={label:"Move current block up",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset>0||e.doc.path(r.path).size)return!1;if(r.depth>1){var o=r.shorten();if(o.offset>0&&o.offset<e.doc.path(o.path).size-1&&e.tr.split(o).apply()!==!1)return}return e.tr.lift(r).apply(e.apply.scroll)},keys:["Enter(30)"]},k.splitBlock={label:"Split the current block",run:function(e){var t=e.selection,r=t.from,n=t.to,o=t.node,i=e.doc.path(n.path);if(o&&o.isBlock)return r.offset?e.tr.split(r).apply(e.apply.scroll):!1;var s=e.schema.defaultTextblockType(),a=n.offset==i.size?s:null,u=e.tr["delete"](r,n).split(r,1,a);return n.offset<i.size&&!r.offset&&e.doc.path(r.path).type!=s&&u.setNodeType(r.shorten(),s),u.apply(e.apply.scroll)},keys:["Enter(60)"]},k.selectParentNode={label:"Select parent node",run:function(e){var t=l(e);return t?void e.setNodeSelection(t):!1},select:function(e){return l(e)},menu:{group:"block",rank:90,display:{type:"icon",text:"⬚",style:"font-weight: bold; vertical-align: 20%"}},keys:["Esc"]},k.selectNodeLeft={label:"Move the selection onto or out of the block to the left",run:function(e){var t=p(e,-1);return t&&e.scrollIntoView(),t},keys:["Left","Mod-Left"]},k.selectNodeRight={label:"Move the selection onto or out of the block to the right",run:function(e){var t=p(e,1);return t&&e.scrollIntoView(),t},keys:["Right","Mod-Right"]},k.selectNodeUp={label:"Move the selection onto or out of the block above",run:function(e){var t=f(e,-1);return t!==!1&&e.scrollIntoView(),t},keys:["Up"]},k.selectNodeDown={label:"Move the selection onto or out of the block below",run:function(e){var t=f(e,1);return t!==!1&&e.scrollIntoView(),t},keys:["Down"]},k.undo={label:"Undo last change",run:function(e){return e.scrollIntoView(),e.history.undo()},select:function(e){return e.history.undoDepth>0},menu:{group:"history",rank:10,display:{type:"icon",width:1024,height:1024,path:"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z"}},keys:["Mod-Z"]},k.redo={label:"Redo last undone change",run:function(e){return e.scrollIntoView(),e.history.redo()},select:function(e){return e.history.redoDepth>0},menu:{group:"history",rank:20,display:{type:"icon",width:1024,height:1024,path:"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z"}},keys:["Mod-Y","Shift-Mod-Z"]}},{"../model":38,"../transform":44,"../util/error":55,"./char":6,"./dompos":10,"./selection":19}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){}function i(e){if(e.selection.node){var t=(0,u.findSelectionNear)(e.doc,e.selection.from,1,!0);t&&(0,l.setDOMSelectionToPos)(e,t.head)}return!1}Object.defineProperty(r,"__esModule",{value:!0}),r.captureKeys=void 0;var s=e("browserkeymap"),a=n(s),u=e("./selection"),l=e("./dompos"),c=e("../dom"),p={Esc:o,Enter:o,"Mod-Enter":o,"Shift-Enter":o,Backspace:o,Delete:o,"Mod-B":o,"Mod-I":o,"Mod-Backspace":o,"Mod-Delete":o,"Shift-Backspace":o,"Shift-Delete":o,"Shift-Mod-Backspace":o,"Shift-Mod-Delete":o,"Mod-Z":o,"Mod-Y":o,"Shift-Mod-Z":o,"Ctrl-D":o,"Ctrl-H":o,"Ctrl-Alt-Backspace":o,"Alt-D":o,"Alt-Delete":o,"Alt-Backspace":o,"Mod-A":i};["Left","Right","Up","Down","Home","End","PageUp","PageDown"].forEach(function(e){p[e]=p["Shift-"+e]=p["Mod-"+e]=p["Shift-Mod-"+e]=p["Alt-"+e]=p["Shift-Alt-"+e]=i}),["Left","Mod-Left","Right","Mod-Right","Up","Down"].forEach(function(e){return delete p[e]}),c.browser.mac&&(p["Ctrl-F"]=p["Ctrl-B"]=p["Ctrl-P"]=p["Ctrl-N"]=p["Alt-F"]=p["Alt-B"]=p["Ctrl-A"]=p["Ctrl-E"]=p["Ctrl-V"]=p.goPageUp=i);r.captureKeys=new a["default"](p)},{"../dom":3,"./dompos":10,"./selection":19,browserkeymap:60}],6:[function(e,t,r){"use strict";function n(e){return/\w/.test(e)||i(e)||e>"\80"&&(e.toUpperCase()!=e.toLowerCase()||s.test(e))}function o(e){return/\s/.test(e)?"space":n(e)?"word":"other"}function i(e){return e.charCodeAt(0)>=768&&a.test(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.isWordChar=n,r.charCategory=o,r.isExtendingChar=i;var s=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,a=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/},{}],7:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t,r){if(!t.derive)return t;var n="object"==b(t.derive)?t.derive:{},o=n.name||r,i=e.constructor.deriveableCommands[o];i||P.AssertionError.raise("Don't know how to derive command "+o);var s=i.call(e,n);for(var a in t)"derive"!=a&&(s[a]=t[a]);return s}function a(e){function t(e,t){for(var n=0;n<t.length;n++){var o=/^(.+?)(?:\((\d+)\))?$/.exec(t[n]),i=k(o,3),s=(i[0],i[1]),a=i[2],u=void 0===a?50:a;(0,O["default"])(r[s]||(r[s]=[]),{command:e,rank:u},function(e,t){return e.rank-t.rank})}}var r={},n=S.browser.mac?"mac":"pc";for(var o in e.commands){var i=e.commands[o],s=i.spec.keys;s&&(Array.isArray(s)&&t(i,s),s.all&&t(i,s.all),s[n]&&t(i,s[n]))}for(var a in r)r[a]=r[a].map(function(e){return e.command.name});return new x["default"](r)}function u(e,t){e.signal("commandsChanging"),e.commands=t.derive(e.schema),e.input.baseKeymap=a(e),e.commandKeys=Object.create(null),e.signal("commandsChanged")}function l(e,t){var r=e.selection;return r.empty?t.isInSet(e.activeMarks()):e.doc.rangeHasMark(r.from,r.to,t)}function c(e,t){var r=e.selection,n=r.from,o=r.to,i=r.empty;if(i)return!t.isInSet(e.activeMarks())&&e.doc.path(n.path).type.canContainMark(t);var s=!1;return e.doc.nodesBetween(n,o,function(e){return s||e.isTextblock&&!e.type.canContainMark(t)?!1:void(e.isInline&&!t.isInSet(e.marks)&&(s=!0))}),s}function p(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,function(e){return e.isTextblock?(e.type.canContainMark(t)&&(i=!0),!1):void 0}),i}function f(e,t,r){var n=e.selection,o=n.from,i=n.to,s=n.empty,a=void 0,u=void 0;if(s)a=u=t.isInSet(e.activeMarks());else{var l=e.doc.path(o.path),c=l.size>o.offset&&l.chunkAfter(o.offset);a=c?t.isInSet(c.node.marks):null,u=t.isInSet(e.doc.marksAt(i))}return a&&u&&a.attrs[r]==u.attrs[r]?a.attrs[r]:void 0}function h(e,t,r){var n=e.selection.node;return n&&n.type==t?n.attrs[r]:void 0}function d(e,t){return t&&t.map(function(t){var r=e.attrs[t.attr],n={type:"text","default":r["default"],prefill:e instanceof C.NodeType?function(e){return h(e,this,t.attr)}:function(e){return f(e,this,t.attr)}};for(var o in t)n[o]=t[o];return n})}function m(e,t){var r=e.attrs;return e.params&&!function(){var n=Object.create(null);if(r)for(var o in r)n[o]=r[o];e.params.forEach(function(e,r){return n[e.attr]=t[r]}),r=n}(),r}function g(e,t,r,n){return C.Pos.samePath(t.path,r.path)&&t.path.length>=2&&0==t.path[t.path.length-1]&&n.canContain(e.path(t.path.slice(0,t.path.length-1)))}function v(e,t,r,n,o){var i=!1;return o||(o={}),e.nodesBetween(t,r||t,function(e){return e.isTextblock?(e.hasMarkup(n,o)&&(i=!0),!1):void 0}),i}function y(e,t,r){var n=e.selection,o=n.from,i=n.to,s=n.node;if(!s||s.isInline){if(!C.Pos.samePath(o.path,i.path))return!1;s=e.doc.path(o.path)}else if(!s.isTextblock)return!1;return s.hasMarkup(t,r)}var k=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){o=!0,i=u}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},w=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.CommandSet=r.Command=void 0,r.updateCommands=u,r.selectedNodeAttr=h;var _=e("browserkeymap"),x=n(_),C=e("../model"),M=e("../transform"),S=e("../dom"),A=e("../util/sortedinsert"),O=n(A),P=e("../util/error"),T=e("../util/obj"),E=e("./base_commands"),D=r.Command=function(){function e(t,r,n){i(this,e),this.name=n,this.name||P.NamespaceError.raise("Trying to define a command without a name"),this.spec=t,this.self=r}return w(e,[{key:"exec",value:function(e,t){var r=this.spec.run;return t?(this.params.length!=(t?t.length:0)&&P.AssertionError.raise("Invalid amount of parameters for command "+this.name),r.call.apply(r,[this.self,e].concat(o(t)))):this.params.length?new e.options.commandParamPrompt(e,this).open():r.call(this.self,e)}},{key:"select",value:function(e){var t=this.spec.select;return t?t.call(this.self,e):!0}},{key:"active",value:function(e){var t=this.spec.active;return t?t.call(this.self,e):!1}},{key:"params",get:function(){return this.spec.params||j}},{key:"label",get:function(){return this.spec.label||this.name}}]),e}(),j=[],q=function(){function e(t,r){i(this,e),this.base=t,this.op=r}return w(e,[{key:"add",value:function(t,r){return new e(this,function(e,n){function o(t,n,o){(!r||r(t,n))&&(e[t]&&P.AssertionError.raise("Duplicate definition of command "+t),e[t]=new D(n,o,t))}if("schema"===t)n.registry("command",function(e,t,r,n){o(n+":"+e,s(r,t,e),r)});else for(var i in t)o(i,t[i])})}},{key:"update",value:function(t){return new e(this,function(e){for(var r in t){var n=t[r];if(n)if(n.run)e[r]=new D(n,null,r);else{var o=e[r];o&&(e[r]=new D((0,T.copyObj)(n,(0,T.copyObj)(o.spec)),o.self,r))}else delete e[r]}})}},{key:"derive",value:function(e){var t=this.base?this.base.derive(e):Object.create(null);return this.op(t,e),t}}]),e}();r.CommandSet=q,q.empty=new q(null,function(){return null}),q["default"]=q.empty.add("schema").add(E.baseCommands),C.NodeType.deriveableCommands=Object.create(null),C.MarkType.deriveableCommands=Object.create(null),C.MarkType.deriveableCommands.set=function(e){return{run:function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];t.setMark(this,!0,m(e,n))},select:function(t){return e.inverseSelect?p(t,this)&&!l(t,this):c(t,this)},params:d(this,e.params)}},C.MarkType.deriveableCommands.unset=function(){return{run:function(e){e.setMark(this,!1)},select:function(e){return l(e,this)}}},C.MarkType.deriveableCommands.toggle=function(){return{run:function(e){e.setMark(this,null)},active:function(e){return l(e,this)},select:function(e){return p(e,this)}}},C.NodeType.deriveableCommands.wrap=function(e){return{run:function(t){var r=t.selection,n=r.from,o=r.to,i=r.head,s=!1;if(e.list&&i&&g(t.doc,n,o,this)){if(0==n.path[n.path.length-2])return!1;s=!0}for(var a=arguments.length,u=Array(a>1?a-1:0),l=1;a>l;l++)u[l-1]=arguments[l];var c=t.tr.wrap(n,o,this,m(e,u));return s&&c.join(n.shorten(n.depth-2)),c.apply(t.apply.scroll)},select:function(t){var r=t.selection,n=r.from,o=r.to,i=r.head;return e.list&&i&&g(t.doc,n,o,this)&&0==n.path[n.path.length-2]?!1:(0,M.canWrap)(t.doc,n,o,this,e.attrs)},params:d(this,e.params)}},C.NodeType.deriveableCommands.make=function(e){return{run:function(t){var r=t.selection,n=r.from,o=r.to;return t.tr.setBlockType(n,o,this,e.attrs).apply(t.apply.scroll)},select:function(t){var r=t.selection,n=r.from,o=r.to,i=r.node;return i?i.isTextblock&&!i.hasMarkup(this,e.attrs):!v(t.doc,n,o,this,e.attrs)},active:function(t){return y(t,this,e.attrs)}}},C.NodeType.deriveableCommands.insert=function(e){return{run:function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return t.tr.replaceSelection(this.create(m(e,n))).apply(t.apply.scroll)},select:this.isInline?function(e){return e.doc.path(e.selection.from.path).type.canContainType(this)}:null,params:d(this,e.params)}}},{"../dom":3,"../model":38,"../transform":44,"../util/error":55,"../util/obj":58,"../util/sortedinsert":59,"./base_commands":4,browserkeymap:60}],8:[function(e,t,r){"use strict";var n=e("../dom");(0,n.insertCSS)('\n\n.ProseMirror {\n  border: 1px solid silver;\n  position: relative;\n}\n\n.ProseMirror-content {\n  padding: 4px 8px 4px 14px;\n  white-space: pre-wrap;\n  line-height: 1.2;\n}\n\n.ProseMirror-drop-target {\n  position: absolute;\n  width: 1px;\n  background: #666;\n  display: none;\n}\n\n.ProseMirror-content ul.tight p, .ProseMirror-content ol.tight p {\n  margin: 0;\n}\n\n.ProseMirror-content ul, .ProseMirror-content ol {\n  padding-left: 30px;\n  cursor: default;\n}\n\n.ProseMirror-content blockquote {\n  padding-left: 1em;\n  border-left: 3px solid #eee;\n  margin-left: 0; margin-right: 0;\n}\n\n.ProseMirror-content pre {\n  white-space: pre-wrap;\n}\n\n.ProseMirror-selectednode {\n  outline: 2px solid #8cf;\n}\n\n.ProseMirror-nodeselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-content p:first-child,\n.ProseMirror-content h1:first-child,\n.ProseMirror-content h2:first-child,\n.ProseMirror-content h3:first-child,\n.ProseMirror-content h4:first-child,\n.ProseMirror-content h5:first-child,\n.ProseMirror-content h6:first-child {\n  margin-top: .3em;\n}\n\n/* Add space around the hr to make clicking it easier */\n\n.ProseMirror-content hr {\n  position: relative;\n  height: 6px;\n  border: none;\n}\n\n.ProseMirror-content hr:after {\n  content: "";\n  position: absolute;\n  left: 10px;\n  right: 10px;\n  top: 2px;\n  border-top: 2px solid silver;\n}\n\n.ProseMirror-content img {\n  cursor: default;\n}\n\n/* Make sure li selections wrap around markers */\n\n.ProseMirror-content li {\n  position: relative;\n  pointer-events: none; /* Don\'t do weird stuff with marker clicks */\n}\n.ProseMirror-content li > * {\n  pointer-events: auto;\n}\n\nli.ProseMirror-selectednode {\n  outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n  content: "";\n  position: absolute;\n  left: -32px;\n  right: -2px; top: -2px; bottom: -2px;\n  border: 2px solid #8cf;\n  pointer-events: none;\n}\n\n');
-},{"../dom":3}],9:[function(e,t,r){"use strict";function n(e,t,r){for(var n=r||0;n<t.path.length;n++){var o=t.path[r];if(o<e.size-1)return!1;e=e.child(o)}return t.offset==e.size}function o(e,t){if(e.offset>0)return!1;for(var r=t||0;r<e.path.length;r++)if(e.path[t]>0)return!1;return!0}function i(e){for(var t=e.content,r=e.doc,i=e.selection,s=i.from,a=i.to,u=0;;u++){var l=r.child(a.path[u]),c=o(s,u+1),p=n(l,a,u+1);if(c||p||s.path[u]!=a.path[u]||l.isTextblock){var f=u==s.depth?s.offset:s.path[u];c&&f>0&&f--;var h=u==a.depth?a.offset:a.path[u]+1;p&&h<r.size-1&&h++;var d=(0,v.fromDOM)(e.schema,t,{topNode:r.copy(),from:f,to:t.childNodes.length-(r.size-h),preserveWhitespace:!0});d=d.copy(r.content.slice(0,f).append(d.content).append(r.content.slice(h)));for(var m=u-1;m>=0;m--){var g=e.doc.path(s.path.slice(0,m));d=g.replace(s.path[m],d)}return d}r=l,t=(0,k.findByPath)(t,s.path[u],!1)}}function s(e){var t=i(e),r=(0,g.findDiffStart)(e.doc.content,t.content);if(r){var n=u(e.doc.content,t.content,r);return c(e,r,n),e.tr.replace(r,n.a,t,r,n.b).apply(),!0}return!1}function a(e,t,r){var n=(0,y.samePathDepth)(e,t),o=n==e.depth,i=n==t.depth,s=(i?t.offset:t.path[n])-(o?e.offset:e.path[n]),a=o?r.move(s):r.shorten(n,s);return i?a:a.extend(new g.Pos(t.path.slice(n),t.offset))}function u(e,t,r){var n=(0,g.findDiffEnd)(e,t);return n?n.a.cmp(r)<0?{a:r,b:a(n.a,r,n.b)}:n.b.cmp(r)<0?{a:a(n.b,r,n.a),b:r}:n:n}function l(e,t){for(var r=Math.min(e.depth,t.depth),n=0;r>n;n++)if(e.path[n]!=t.path[n])return n;return r}function c(e,t,r){var n=Math.min(l(t,r.a),l(t,r.b));if(0==n)e.markAllDirty();else{var o=g.Pos.from(t.path.slice(0,n));e.markRangeDirty({from:o,to:o.move(1)})}}function p(e){var t=window.getSelection().getRangeAt(0),r=t.startContainer,n=t.endContainer;if(r==n&&3==r.nodeType){var o=r.nodeValue,i=t.startOffset,s=t.endOffset;return e&&s>=e.length&&o.slice(s-e.length,s)==e&&(i=s-e.length),{inside:r,lead:i,trail:o.length-s}}for(var a=null,u=null,l=r.childNodes[t.startOffset-1]||d(r);l.lastChild;)l=l.lastChild;if(l&&3==l.nodeType){var o=l.nodeValue;a=o.length,e&&o.slice(o.length-e.length)==e&&(a-=e.length)}for(var c=n.childNodes[t.endOffset]||h(n);c.firstChild;)c=c.firstChild;return c&&3==c.nodeType&&(u=c.nodeValue.length),{before:l,sizeBefore:a,after:c,sizeAfter:u}}function f(e,t){if(e.inside){var r=e.inside.nodeValue;return r.slice(e.lead,r.length-e.trail)}var n=e.before,o=e.after,i="";if(!n)return t;3==n.nodeType&&(i=n.nodeValue.slice(e.sizeBefore));var s=m(n,o);if(null==s)return t;if(i+=s,o&&3==o.nodeType){var a=o.nodeValue;i+=a.slice(0,a.length-e.sizeAfter)}return i}function h(e){for(;;){var t=e.nextSibling;if(t){for(;t.firstChild;)t=t.firstChild;return t}if(!(e=e.parentElement))return null}}function d(e){for(;;){var t=e.previousSibling;if(t){for(;t.lastChild;)t=t.lastChild;return t}if(!(e=e.parentElement))return null}}function m(e,t){for(var r="",n=h(e);;){if(n==t)return r;if(!n)return null;3==n.nodeType&&(r+=n.nodeValue),n=n.firstChild||h(n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.applyDOMChange=s,r.textContext=p,r.textInContext=f;var g=e("../model"),v=e("../format"),y=e("../transform/tree"),k=e("./dompos")},{"../format":22,"../model":38,"../transform/tree":52,"./dompos":10}],10:[function(e,t,r){"use strict";function n(e,t){for(var r=[];t!=e.content;){var n=t.getAttribute("pm-offset");n&&r.unshift(+n),t=t.parentNode}return r}function o(e){var t=e.getAttribute("pm-leaf");return t&&"true"!=t?+t:1}function i(e,t,r,i){!i&&e.operation&&e.doc!=e.operation.doc&&M.AssertionError.raise("Fetching a position from an outdated DOM structure"),null==r&&(r=Array.prototype.indexOf.call(t.parentNode.childNodes,t),t=t.parentNode);for(var s=0,a=void 0;;){var u=0;if(3==t.nodeType)s+=r;else{if(t.hasAttribute("pm-container"))break;(a=t.getAttribute("pm-inner-offset"))?(s+=+a,u=-1):r&&r==t.childNodes.length&&(u=1)}var l=t.parentNode;r=0>u?0:Array.prototype.indexOf.call(l.childNodes,t)+u,t=l}var c=n(e,t);if(t.hasAttribute("pm-leaf"))return x.Pos.from(c,s+(r?1:0));for(var p=0,f=r-1;f>=0;f--){var h=t.childNodes[f];if(3==h.nodeType)i&&(s+=h.nodeValue.length);else{if(a=h.getAttribute("pm-offset")){p=+a+o(h);break}i&&!h.hasAttribute("pm-ignore")&&(s+=h.textContent.length)}}return new x.Pos(c,p+s)}function s(e,t,r){for(var n=u(e),o=r?n.lastChild:n.firstChild;o;o=r?o.previousSibling:o.nextSibling)if(1==o.nodeType){var i=o.getAttribute("pm-offset");if(i&&+i==t)return o}}function a(e,t){for(var r=e,n=0;n<t.length;n++)r=s(r,t[n]),r||M.AssertionError.raise("Failed to resolve path "+t.join("/"));return r}function u(e){return e.hasAttribute("pm-container")?e:e.querySelector("[pm-container]")}function l(e,t,r){for(var n,i=e.firstChild,s=0;i;i=i.nextSibling,s++)if(1==i.nodeType&&(n=i.getAttribute("pm-offset"))){var a=t-+n,u=o(i);if(a>=0&&(r?u>=a:u>a))return{node:i,offset:s,innerOffset:a}}}function c(e,t){for(;;){var r=e.firstChild;if(!r)return{node:e,offset:t};if(1!=r.nodeType)return{node:r,offset:t};if(r.hasAttribute("pm-inner-offset")){for(var n=0;;){var o=r.nextSibling,i=void 0;if(!o||(i=+o.getAttribute("pm-inner-offset"))>=t)break;r=o,n=i}t-=n}e=r}}function p(e,t){var r=u(a(e,t.path)),n=l(r,t.offset,!0),o=void 0;return n?"true"!=n.node.getAttribute("pm-leaf")&&(o=c(n.node,n.innerOffset))?o:{node:n.node.parentNode,offset:n.offset+(n.innerOffset?1:0)}:{node:r,offset:0}}function f(){return{left:0,right:window.innerWidth,top:0,bottom:window.innerHeight}}function h(e,t){t||(t=e.sel.range.head||e.sel.range.from);for(var r=k(e,t),n=e.content;;n=n.parentNode){var o=n==document.body,i=o?f():n.getBoundingClientRect(),s=0,a=0;if(r.top<i.top?a=-(i.top-r.top+S):r.bottom>i.bottom&&(a=r.bottom-i.bottom+S),r.left<i.left?s=-(i.left-r.left+S):r.right>i.right&&(s=r.right-i.right+S),s||a?o&&window.scrollBy(s,a):(a&&(n.scrollTop+=a),s&&(n.scrollLeft+=s)),o)break}}function d(e,t){for(var r=void 0,n=1e8,o=void 0,i=0,s=e.firstChild;s;s=s.nextSibling){var a=void 0;if(1==s.nodeType)a=s.getClientRects();else{if(3!=s.nodeType)continue;a=y(s)}for(var u=0;u<a.length;u++){var l=a[u];if(l.left<=t.left&&l.right>=t.left){var c=l.top>t.top?l.top-t.top:l.bottom<t.top?t.top-l.bottom:0;if(n>c){r=s,n=c,o=c?{left:t.left,top:l.top}:t,1!=s.nodeType||s.firstChild||(i=u+(t.left>=(l.left+l.right)/2?1:0));continue}}!r&&(t.top>=l.bottom||t.top>=l.top&&t.left>=l.right)&&(i=u+1)}}return r?3==r.nodeType?m(r,o):r.firstChild?d(r,o):{node:e,offset:i}:{node:e,offset:i}}function m(e,t){for(var r=e.nodeValue.length,n=document.createRange(),o=0;r>o;o++){n.setEnd(e,o+1),n.setStart(e,o);var i=n.getBoundingClientRect();if(i.top!=i.bottom&&i.left<=t.left&&i.right>=t.left&&i.top<=t.top&&i.bottom>=t.top)return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function g(e,t){var r=document.elementFromPoint(t.left,t.top+1);if(!(0,C.contains)(e.content,r))return null;r.firstChild||(r=r.parentNode);var n=d(r,t),o=n.node,s=n.offset;return i(e,o,s)}function v(e,t,r){var n=document.createRange();return n.setEnd(e,r),n.setStart(e,t),n.getBoundingClientRect()}function y(e){var t=document.createRange();return t.setEnd(e,e.nodeValue.length),t.setStart(e,0),t.getClientRects()}function k(e,t){var r=p(e.content,t),n=r.node,o=r.offset,i=void 0,s=void 0;if(3==n.nodeType)o<n.nodeValue.length&&(s=v(n,o,o+1),i="left"),s&&s.left!=s.right||!o||(s=v(n,o-1,o),i="right");else if(n.firstChild){if(o<n.childNodes.length){var a=n.childNodes[o];s=3==a.nodeType?v(a,0,a.nodeValue.length):a.getBoundingClientRect(),i="left"}if((!s||s.left==s.right)&&o){var a=n.childNodes[o-1];s=3==a.nodeType?v(a,0,a.nodeValue.length):a.getBoundingClientRect(),i="right"}}else s=n.getBoundingClientRect(),i="left";var u=s[i];return{top:s.top,bottom:s.bottom,left:u,right:u}}function b(e,t){var r=p(e.content,t),n=r.node,o=r.offset,i=document.createRange();i.setEnd(n,o),i.setStart(n,o);var s=window.getSelection();s.removeAllRanges(),s.addRange(i)}function w(e,t,r,o){for(;t&&t!=e.content;t=t.parentNode)if(t.hasAttribute("pm-offset")){var i=n(e,t),s=e.doc.path(i);if(s.type.countCoordsAsChild){var a=s.type.countCoordsAsChild(s,i,t,r);if(a)return a}if((o||null==s.type.contains)&&s.type.selectable)return x.Pos.from(i);if(!o)return null}}function _(e,t,r,o){for(var i=r.target;i&&i!=e.content;i=i.parentNode)if(i.hasAttribute("pm-offset")){var s=n(e,i),a=e.doc.path(s),u=a.type[t]&&a.type[t](e,r,s,a)!==!1;if(o||u)return u}}Object.defineProperty(r,"__esModule",{value:!0}),r.pathFromDOM=n,r.widthFromDOM=o,r.posFromDOM=i,r.findByPath=s,r.pathToDOM=a,r.childContainer=u,r.DOMFromPos=p,r.scrollIntoView=h,r.posAtCoords=g,r.coordsAtPos=k,r.setDOMSelectionToPos=b,r.selectableNodeAbove=w,r.handleNodeClick=_;var x=e("../model"),C=e("../dom"),M=e("../util/error"),S=5},{"../dom":3,"../model":38,"../util/error":55}],11:[function(e,t,r){"use strict";function n(e,t){return{onRender:function(e,t,r){return e.isText||null!=e.type.contains||(t.contentEditable=!1,e.isBlock&&t.setAttribute("pm-leaf","true")),e.isBlock&&null!=r&&t.setAttribute("pm-offset",r),e.isTextblock&&s(t,e),t},onContainer:function(e){e.setAttribute("pm-container",!0)},renderInlineFlat:function(r,n,i){t.advanceTo(new c.Pos(e,i));for(var s=new c.Pos(e,i+r.width),a=t.nextChangeBefore(s),u=n,l=void 0,p=0;p<r.marks.length;p++)u=u.firstChild;1!=n.nodeType&&(n=(0,f.elt)("span",null,n),a||(l=n)),l||!a&&!t.current.length||(l=u==n?n=(0,f.elt)("span",null,u):u.parentNode.appendChild((0,f.elt)("span",null,u))),n.setAttribute("pm-offset",i),null==r.type.contains&&n.setAttribute("pm-leaf",r.isText?r.width:"true");for(var h=0;a;){var d=a-i,m=o(l,d);t.current.length&&(m.className=t.current.join(" ")),m.setAttribute("pm-inner-offset",h),h+=d,i+=d,t.advanceTo(new c.Pos(e,i)),(a=t.nextChangeBefore(s))||l.setAttribute("pm-inner-offset",h)}return t.current.length&&(l.className=t.current.join(" ")),n},document:document,path:e}}function o(e,t){var r=e.firstChild,n=r.nodeValue,o=e.parentNode.insertBefore((0,f.elt)("span",null,n.slice(0,t)),e);return r.nodeValue=n.slice(t),o}function i(e,t){e.content.textContent="",e.content.appendChild((0,p.toDOM)(t,n([],e.ranges.activeRangeTracker())))}function s(e,t){var r=0==t.size||t.lastChild.type.isBR||t.type.isCode&&t.lastChild.isText&&/\n$/.test(t.lastChild.text)?"br":t.lastChild.isText||null!=t.lastChild.type.contains?null:"text",n=e.lastChild,o=n&&1==n.nodeType&&n.hasAttribute("pm-ignore")?"BR"==n.nodeName?"br":"text":null;r!=o&&(o&&e.removeChild(n),r&&e.appendChild("br"==r?(0,f.elt)("br",{"pm-ignore":"trailing-break"}):(0,f.elt)("span",{"pm-ignore":"cursor-text"},"")))}function a(e,t){for(var r,n=e.copy();r=n.next().value;)if(r==t)return r}function u(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}function l(e,t,r,o){function l(e,r,n){for(var o,i=r.iter(),f=n.iter(),m=f.next().value,g=e.firstChild;o=i.next().value;){var v=i.offset-o.width,y=void 0,k=void 0;if(r.isTextblock||c.path.push(v),m==o)y=m;else if(y=a(f,o))for(;m!=y;)m=f.next().value,g=u(g);if(y&&!t.get(y))k=!0;else if(m&&!o.isText&&o.sameMarkup(m)&&t.get(m)!=h.DIRTY_REDRAW)k=!0,m.type.contains&&l((0,d.childContainer)(g),o,m);else{var b=(0,p.nodeToDOM)(o,c,v);e.insertBefore(b,g),k=!1}k&&(g.setAttribute("pm-offset",v),g=g.nextSibling,m=f.next().value),r.isTextblock||c.path.pop()}for(;m;)g=u(g),m=f.next().value;r.isTextblock&&s(e,r)}if(t.get(o)==h.DIRTY_REDRAW)return i(e,r);var c=n([],e.ranges.activeRangeTracker());l(e.content,r,o)}Object.defineProperty(r,"__esModule",{value:!0}),r.draw=i,r.redraw=l;var c=e("../model"),p=e("../format"),f=e("../dom"),h=e("./main"),d=e("./dompos")},{"../dom":3,"../format":22,"../model":38,"./dompos":10,"./main":15}],12:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return"replace"==e.type&&e.from.offset<e.to.offset&&s.Pos.samePath(e.from.path,e.to.path)&&(!e.param||0==e.param.content.size)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.History=void 0;var s=e("../model"),a=e("../transform"),u=function g(e,t,r){n(this,g),this.step=e,this.version=t,this.id=r},l=function(){function e(t){n(this,e),this.branch=t,this.remap=new a.Remapping,this.version=t.version,this.mirrorBuffer=Object.create(null)}return i(e,[{key:"moveToVersion",value:function(e){for(;this.version>e;)this.addNextMap()}},{key:"addNextMap",value:function(){var e=this.branch.mirror[this.version],t=this.branch.maps.length-(this.branch.version-this.version)-1,r=this.remap.addToFront(this.branch.maps[t],this.mirrorBuffer[this.version]);return--this.version,null!=e&&(this.mirrorBuffer[e]=r),r}},{key:"movePastStep",value:function(e){var t=this.addNextMap();e&&this.remap.addToBack(e.map,t)}}]),e}(),c=100,p=150,f=function(){function e(t,r,o){n(this,e),this.branch=r,this.callback=o,this.remap=new l(r),this.doc=t,this.events=[],this.maps=[],this.version=this.startVersion=r.version,this.i=r.events.length,this.timeout=null,this.aborted=!1}return i(e,[{key:"work",value:function(){var e=this;if(!this.aborted)for(var t=Date.now()+c;;){if(0==this.i)return this.finish();for(var r=this.branch.events[--this.i],n=[],i=r.length-1;i>=0;i--){var s=r[i],l=s.step,f=s.version,h=s.id;this.remap.moveToVersion(f);var d=l.map(this.remap.remap);if(d&&o(l)){for(var m=0,g=l.from;i>0;){var v=r[i-1];if(v.version!=f-1||!o(v.step)||g.cmp(v.step.to))break;m+=v.step.to.offset-v.step.from.offset,g=v.step.from,f--,i--,this.remap.addNextMap()}if(m>0){var y=d.from.move(-m);d=new a.Step("replace",y,d.to,y)}}var k=d&&d.apply(this.doc);k&&(this.doc=k.doc,this.maps.push(k.map.invert()),n.push(new u(d,this.version,h)),this.version--),this.remap.movePastStep(k)}if(n.length&&(n.reverse(),this.events.push(n)),Date.now()>t)return void(this.timeout=window.setTimeout(function(){return e.work()},p))}}},{key:"finish",value:function(){this.aborted||(this.events.reverse(),this.maps.reverse(),this.callback(this.maps.concat(this.branch.maps.slice(this.branch.maps.length-(this.branch.version-this.startVersion))),this.events))}},{key:"abort",value:function(){this.aborted=!0,window.clearTimeout(this.timeout)}}]),e}(),h=150,d=function(){function e(t){n(this,e),this.maxDepth=t,this.version=0,this.nextStepID=1,this.maps=[],this.mirror=Object.create(null),this.events=[],this.stepsSinceCompress=0,this.compressing=null,this.compressTimeout=null}return i(e,[{key:"clear",value:function(e){(e||!this.empty())&&(this.maps.length=this.events.length=this.stepsSinceCompress=0,this.mirror=Object.create(null),this.abortCompression())}},{key:"newEvent",value:function(){for(this.abortCompression(),this.events.push([]);this.events.length>this.maxDepth;)this.events.shift()}},{key:"addMap",value:function(e){return this.empty()?void 0:(this.maps.push(e),this.version++,this.stepsSinceCompress++,!0)}},{key:"empty",value:function(){return 0==this.events.length}},{key:"addStep",value:function(e,t,r){this.addMap(t),null==r&&(r=this.nextStepID++),this.events[this.events.length-1].push(new u(e,this.version,r))}},{key:"addTransform",value:function(e,t){this.abortCompression();for(var r=0;r<e.steps.length;r++){var n=e.steps[r].invert(e.docs[r],e.maps[r]);this.addStep(n,e.maps[r],t&&t[r])}}},{key:"popEvent",value:function(e,t){this.abortCompression();var r=this.events.pop();if(!r)return null;for(var n=new l(this),o=t,i=new a.Transform(e),s=[],u=r.length-1;u>=0;u--){var c=r[u],p=c.step;if(o&&c.version==n.version)this.version--,delete this.mirror[this.version],this.maps.pop(),i.step(p),s.push(c.id),--n.version;else{o=!1,n.moveToVersion(c.version),p=p.map(n.remap);var f=p&&i.step(p);f&&(s.push(c.id),this.addMap(f.map)&&(this.mirror[this.version]=c.version)),u>0&&n.movePastStep(f)}}return this.empty()&&this.clear(!0),{transform:i,ids:s}}},{key:"lastStep",value:function(){for(var e=this.events.length-1;e>=0;e--){var t=this.events[e];if(t.length)return t[t.length-1]}}},{key:"getVersion",value:function(){var e=this.lastStep();return{lastID:e&&e.id,version:this.version}}},{key:"isAtVersion",value:function(e){var t=this.lastStep();return this.version==e.version&&(t&&t.id)==e.lastID}},{key:"findVersion",value:function(e){for(var t=this.events.length-1;t>=0;t--)for(var r=this.events[t],n=r.length-1;n>=0;n--)if(r[n].id<=e.lastID)return{event:t,step:n+1}}},{key:"rebased",value:function(e,t,r){if(!this.empty()){this.abortCompression();var n=this.version-r.length;e:for(var o=this.events.length-1;o>=0;o--)for(var i=this.events[o],s=i.length-1;s>=0;s--){var a=i[s];if(a.version<=n)break e;var l=r[a.version-n-1];if(-1==l)i.splice(s--,1);else{var c=t.steps[l].invert(t.docs[l],t.maps[l]);i[s]=new u(c,n+e.length+l+1,a.id)}}this.maps.length>r.length?this.maps=this.maps.slice(0,this.maps.length-r.length).concat(e).concat(t.maps):this.maps=t.maps.slice(),this.version=n+e.length+t.maps.length,this.stepsSinceCompress+=e.length+t.steps.length-r.length}}},{key:"abortCompression",value:function(){this.compressing&&(this.compressing.abort(),this.compressing=null)}},{key:"needsCompression",value:function(){return this.stepsSinceCompress>h&&!this.compressing}},{key:"startCompression",value:function(e){var t=this;this.compressing=new f(e,this,function(e,r){t.maps=e,t.events=r,t.mirror=Object.create(null),t.compressing=null,t.stepsSinceCompress=0}),this.compressing.work()}}]),e}(),m=750;r.History=function(){function e(t){var r=this;n(this,e),this.pm=t,this.done=new d(t.options.historyDepth),this.undone=new d(t.options.historyDepth),this.lastAddedAt=0,this.ignoreTransform=!1,this.allowCollapsing=!0,t.on("transform",function(e,t){return r.recordTransform(e,t)})}return i(e,[{key:"recordTransform",value:function(e,t){if(!this.ignoreTransform){if(0==t.addToHistory)for(var r=0;r<e.maps.length;r++){var n=e.maps[r];this.done.addMap(n),this.undone.addMap(n)}else{this.undone.clear();var o=Date.now();o>this.lastAddedAt+this.pm.options.historyEventDelay&&this.done.newEvent(),this.done.addTransform(e),this.lastAddedAt=o}this.maybeScheduleCompression()}}},{key:"undo",value:function(){return this.shift(this.done,this.undone)}},{key:"redo",value:function(){return this.shift(this.undone,this.done)}},{key:"shift",value:function(e,t){var r=e.popEvent(this.pm.doc,this.allowCollapsing);if(!r)return!1;var n=r.transform,o=r.ids;return this.ignoreTransform=!0,this.pm.apply(n),this.ignoreTransform=!1,n.steps.length?(t&&(t.newEvent(),t.addTransform(n,o)),this.lastAddedAt=0,!0):this.shift(e,t)}},{key:"getVersion",value:function(){return this.done.getVersion()}},{key:"isAtVersion",value:function(e){return this.done.isAtVersion(e)}},{key:"backToVersion",value:function(e){var t=this.done.findVersion(e);if(!t)return!1;var r=this.done.events[t.event];if(t.event==this.done.events.length-1&&t.step==r.length)return!0;var n=this.done.events.slice(t.event+1).reduce(function(e,t){return e.concat(t)},r.slice(t.step));return this.done.events.length=t.event+((r.length=t.step)?1:0),this.done.events.push(n),this.shift(this.done),!0}},{key:"rebased",value:function(e,t,r){this.done.rebased(e,t,r),this.undone.rebased(e,t,r),this.maybeScheduleCompression()}},{key:"maybeScheduleCompression",value:function(){this.maybeScheduleCompressionForBranch(this.done),this.maybeScheduleCompressionForBranch(this.undone)}},{key:"maybeScheduleCompressionForBranch",value:function(e){var t=this;window.clearTimeout(e.compressTimeout),e.needsCompression()&&(e.compressTimeout=window.setTimeout(function(){e.needsCompression()&&e.startCompression(t.pm.doc)},m))}},{key:"undoDepth",get:function(){return this.done.events.length}},{key:"redoDepth",get:function(){return this.undone.events.length}}]),e}()},{"../model":38,"../transform":44}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0}),r.Keymap=r.baseCommands=r.Command=r.CommandSet=r.MarkedRange=r.SelectionError=r.Range=r.defineOption=r.ProseMirror=void 0;var o=e("./main");Object.defineProperty(r,"ProseMirror",{enumerable:!0,get:function(){return o.ProseMirror}});var i=e("./options");Object.defineProperty(r,"defineOption",{enumerable:!0,get:function(){return i.defineOption}});var s=e("./selection");Object.defineProperty(r,"Range",{enumerable:!0,get:function(){return s.Range}}),Object.defineProperty(r,"SelectionError",{enumerable:!0,get:function(){return s.SelectionError}});var a=e("./range");Object.defineProperty(r,"MarkedRange",{enumerable:!0,get:function(){return a.MarkedRange}});var u=e("./command");Object.defineProperty(r,"CommandSet",{enumerable:!0,get:function(){return u.CommandSet}}),Object.defineProperty(r,"Command",{enumerable:!0,get:function(){return u.Command}});var l=e("./base_commands");Object.defineProperty(r,"baseCommands",{enumerable:!0,get:function(){return l.baseCommands}}),e("./schema_commands");var c=e("browserkeymap"),p=n(c);r.Keymap=p["default"]},{"./base_commands":4,"./command":7,"./main":15,"./options":16,"./range":17,"./schema_commands":18,"./selection":19,browserkeymap:60}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r){var n=e.input.keySeq;if(n){if(g["default"].isModifierKey(t))return!0;clearTimeout(C),C=setTimeout(function(){e.input.keySeq==n&&(e.input.keySeq=null)},50),t=n+" "+t}for(var o=function a(t){if(t===!1)return"nothing";if("..."==t)return"multi";if(null==t)return!1;var r=!1;if(Array.isArray(t))for(var n=0;r===!1&&n<t.length;n++)r=a(t[n]);else r="string"==typeof t?e.execCommand(t):t(e);return 0==r?!1:"handled"},i=void 0,s=0;!i&&s<e.input.keymaps.length;s++)i=o(e.input.keymaps[s].map.lookup(t,e));return i||(i=o(e.input.baseKeymap.lookup(t,e))||o(k.captureKeys.lookup(t))),"multi"==i&&(e.input.keySeq=t),("handled"==i||"multi"==i)&&r.preventDefault(),n&&!i&&/\'$/.test(t)?(r.preventDefault(),!0):!!i}function s(e,t,r){if(t.empty&&!r)return!1;var n=e.input.storedMarks||e.doc.marksAt(t.from);e.tr.replaceWith(t.from,t.to,e.schema.text(r,n)).apply({scrollIntoView:!0}),e.signal("textInput",r)}function a(e,t){var r=(0,x.selectableNodeAbove)(e,t.target,{left:t.clientX,top:t.clientY},!0);if(!r)return e.sel.fastPoll();var n=e.selection,o=n.node,i=n.from;if(o&&r.depth>=i.depth&&0==r.shorten(i.depth).cmp(i)){if(0==i.depth)return e.sel.fastPoll();r=i.shorten()}e.setNodeSelection(r),e.focus(),t.preventDefault()}function u(e,t){t.preventDefault();var r=(0,x.selectableNodeAbove)(e,t.target,{left:t.clientX,top:t.clientY},!0);if(r){var n=e.doc.nodeAfter(r);if(n.isBlock&&!n.isTextblock)e.setNodeSelection(r);else{var o=n.isInline?r.path:r.toPath();n.isInline&&(n=e.doc.path(o)),e.setTextSelection(new v.Pos(o,0),new v.Pos(o,n.size))}e.focus()}}function l(e){var t=e.input.composing,r=(0,w.textInContext)(t.context,t.endData),n=(0,_.rangeFromDOMLoose)(e);e.ensureOperation(),e.input.composing=null,r!=t.data&&s(e,t.range,r),n&&!n.eq(e.sel.range)&&e.setSelectionDirect(n)}function c(e,t,r,n){var o=e.sliceBetween(t,r),i='<div pm-sides="'+t.depth+" "+r.depth+'">'+(0,y.toHTML)(o)+"</div>";n.clearData(),n.setData("text/html",i),n.setData("text/plain",(0,y.toText)(o))}function p(e,t,r){var n=t.getData("text/plain"),o=t.getData("text/html");if(!o&&!n)return null;var i=void 0,s=void 0,a=void 0;if(!r&&o||!n){var u=document.createElement("div");u.innerHTML=e.signalPipelined("transformPastedHTML",o);var l=u.querySelector("[pm-sides]"),c=void 0;l&&(c=/^(\d+) (\d+)$/.exec(l.getAttribute("pm-sides")))?(i=(0,y.fromDOM)(e.schema,l),s=f(i,+c[1]),a=h(i,+c[2])):i=(0,y.fromDOM)(e.schema,u)}else i=(0,y.parseFrom)(e.schema,e.signalPipelined("transformPastedText",n),!r&&(0,y.knownSource)("markdown")?"markdown":"text");return{doc:i,from:s||(0,_.findSelectionAtStart)(i).from,to:a||(0,_.findSelectionAtEnd)(i).to}}function f(e,t){for(var r=[],n=0,o=e;t>n&&(o=o.firstChild);n++)r.push(0);return new v.Pos(r,0)}function h(e,t){for(var r=[],n=e,o=0;t>o&&n.size;o++)r.push(n.size-1),n=n.lastChild;return new v.Pos(r,n.size)}var d=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Input=void 0,r.dispatchKey=i;var m=e("browserkeymap"),g=n(m),v=e("../model"),y=e("../format"),k=e("./capturekeys"),b=e("../dom"),w=e("./domchange"),_=e("./selection"),x=e("./dompos"),C=null,M={};r.Input=function(){function e(t){var r=this;o(this,e),this.pm=t,this.baseKeymap=null,this.keySeq=null,this.composing=null,this.mouseDown=null,this.shiftKey=this.updatingComposition=!1,this.skipInput=0,this.draggingFrom=!1,this.keymaps=[],this.defaultKeymap=null,this.storedMarks=null,this.dropTarget=t.wrapper.appendChild((0,b.elt)("div",{"class":"ProseMirror-drop-target"}));var n=function(e){var r=M[e];t.content.addEventListener(e,function(e){return r(t,e)})};for(var i in M)n(i);t.on("selectionChange",function(){return r.storedMarks=null})}return d(e,[{key:"maybeAbortComposition",value:function(){if(this.composing&&!this.updatingComposition){if(this.composing.finished)l(this.pm);else{this.composing=null,this.skipInput++;var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0);e.removeAllRanges(),e.addRange(t)}}return!0}}}]),e}();M.keydown=function(e,t){if(e.signal("interaction"),16==t.keyCode&&(e.input.shiftKey=!0),!e.input.composing){var r=g["default"].keyName(t);r&&i(e,r,t)||e.sel.fastPoll()}},M.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},M.keypress=function(e,t){if(!(e.input.composing||!t.charCode||t.ctrlKey&&!t.altKey||b.browser.mac&&t.metaKey||i(e,g["default"].keyName(t),t))){var r=e.selection;r.node&&null==r.node.contains&&(e.tr["delete"](r.from,r.to).apply(),r=e.selection),s(e,r,String.fromCharCode(t.charCode)),t.preventDefault()}};var S=0,A=0;M.mousedown=function(e,t){e.signal("interaction");var r=Date.now(),n=500>r-S,o=600>r-A;A=S,S=r,o?u(e,t):e.input.mouseDown=new O(e,t,n)};var O=function(){function e(t,r,n){o(this,e),this.pm=t,this.event=r,this.leaveToBrowser=t.input.shiftKey||n;var i=(0,x.pathFromDOM)(t,r.target),s=t.doc.path(i);this.mightDrag=s.type.draggable||s==t.sel.range.node?i:null,this.mightDrag&&(r.target.draggable=!0,b.browser.gecko&&(this.setContentEditable=!r.target.hasAttribute("contentEditable"))&&r.target.setAttribute("contentEditable","false")),this.x=r.clientX,this.y=r.clientY,window.addEventListener("mouseup",this.up=this.up.bind(this)),window.addEventListener("mousemove",this.move=this.move.bind(this)),t.sel.fastPoll()}return d(e,[{key:"done",value:function(){window.removeEventListener("mouseup",this.up),window.removeEventListener("mousemove",this.move),this.mightDrag&&(this.event.target.draggable=!1,b.browser.gecko&&this.setContentEditable&&this.event.target.removeAttribute("contentEditable"))}},{key:"up",value:function(){if(this.done(),this.leaveToBrowser)this.pm.sel.fastPoll();else if(this.event.ctrlKey)a(this.pm,this.event);else if(!(0,x.handleNodeClick)(this.pm,"handleClick",this.event,!0)){var e=(0,x.selectableNodeAbove)(this.pm,this.event.target,{left:this.x,top:this.y});e?(this.pm.setNodeSelection(e),this.pm.focus()):this.pm.sel.fastPoll()}}},{key:"move",value:function(e){!this.leaveToBrowser&&(Math.abs(this.x-e.clientX)>4||Math.abs(this.y-e.clientY)>4)&&(this.leaveToBrowser=!0),this.pm.sel.fastPoll()}}]),e}();M.touchdown=function(e){e.sel.fastPoll()},M.contextmenu=function(e,t){(0,x.handleNodeClick)(e,"handleContextMenu",t,!1)};var P=function T(e,t){o(this,T),this.finished=!1,this.context=(0,w.textContext)(t),this.data=t,this.endData=null;var r=e.selection;if(t){var n=r.head.path,i=e.doc.path(n).textContent,s=i.indexOf(t,r.head.offset-t.length);s>-1&&s<=r.head.offset+t.length&&(r=new _.TextSelection(new v.Pos(n,s),new v.Pos(n,s+t.length)))}this.range=r};M.compositionstart=function(e,t){if(!e.input.maybeAbortComposition()){e.flush(),e.input.composing=new P(e,t.data);var r=e.selection.head.shorten();e.markRangeDirty({from:r,to:r.move(1)})}},M.compositionupdate=function(e,t){var r=e.input.composing;r&&r.data!=t.data&&(r.data=t.data,e.input.updatingComposition=!0,s(e,r.range,r.data),e.input.updatingComposition=!1,r.range=new _.TextSelection(r.range.from,r.range.from.move(r.data.length)))},M.compositionend=function(e,t){var r=e.input.composing;r&&(e.input.composing.finished=!0,e.input.composing.endData=t.data,setTimeout(function(){e.input.composing==r&&l(e)},20))},M.input=function(e){return e.input.skipInput?--e.input.skipInput:e.input.composing?void(e.input.composing.finished&&l(e)):(e.startOperation({readSelection:!1}),(0,w.applyDOMChange)(e),void e.scrollIntoView())},M.copy=M.cut=function(e,t){var r=e.selection,n=r.from,o=r.to,i=r.empty;!i&&t.clipboardData&&(c(e.doc,n,o,t.clipboardData),t.preventDefault(),"cut"!=t.type||i||e.tr["delete"](n,o).apply())},M.paste=function(e,t){if(t.clipboardData){var r=e.selection,n=p(e,t.clipboardData,e.input.shiftKey);n&&(t.preventDefault(),e.tr.replace(r.from,r.to,n.doc,n.from,n.to).apply(),e.scrollIntoView())}},M.dragstart=function(e,t){var r=e.input.mouseDown;if(r&&r.done(),t.dataTransfer){var n=e.selection,o=n.from,i=n.to,s=n.empty,a=void 0,u=!s&&e.posAtCoords({left:t.clientX,top:t.clientY});if(u&&u.cmp(o)>=0&&u.cmp(i)<=0)a={from:o,to:i};else if(r&&r.mightDrag){var l=v.Pos.from(r.mightDrag);a={from:l,to:l.move(1)}}a&&(e.input.draggingFrom=a,c(e.doc,a.from,a.to,t.dataTransfer))}},M.dragend=function(e){return window.setTimeout(function(){return e.input.draggingFrom=!1},50)},M.dragover=M.dragenter=function(e,t){t.preventDefault();var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(r){var n=(0,x.coordsAtPos)(e,r),o=e.wrapper.getBoundingClientRect();n.top-=o.top,n.right-=o.left,n.bottom-=o.top,n.left-=o.left;var i=e.input.dropTarget;i.style.display="block",i.style.left=n.left-1+"px",i.style.top=n.top+"px",i.style.height=n.bottom-n.top+"px"}},M.dragleave=function(e){return e.input.dropTarget.style.display=""},M.drop=function(e,t){if(e.input.dropTarget.style.display="",t.dataTransfer&&!e.signalDOM(t)){var r=p(e,t.dataTransfer);if(r){t.preventDefault();var n=e.posAtCoords({left:t.clientX,top:t.clientY}),o=n;if(!n)return;var i=e.tr;e.input.draggingFrom&&!t.ctrlKey&&(i["delete"](e.input.draggingFrom.from,e.input.draggingFrom.to),n=i.map(n).pos),i.replace(n,n,r.doc,r.from,r.to).apply();var s=i.map(o).pos;v.Pos.samePath(n.path,s.path)&&s.offset==n.offset+1&&e.doc.nodeAfter(n).type.selectable?e.setNodeSelection(n):e.setTextSelection(n,s),e.focus()}}},M.focus=function(e){e.wrapper.classList.add("ProseMirror-focused"),e.signal("focus")},M.blur=function(e){e.wrapper.classList.remove("ProseMirror-focused"),e.signal("blur")}},{"../dom":3,"../format":22,"../model":38,"./capturekeys":5,"./domchange":9,"./dompos":10,"./selection":19,browserkeymap:60}],15:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.DIRTY_REDRAW=r.DIRTY_RESCAN=r.ProseMirror=void 0,e("./css");var u=e("browserkeymap"),l=n(u),c=e("../model"),p=e("../transform"),f=e("../util/sortedinsert"),h=n(f),d=e("../util/error"),m=e("../util/map"),g=e("../util/event"),v=e("../dom"),y=e("../format"),k=e("./options"),b=e("./selection"),w=e("./dompos"),_=e("./draw"),x=e("./input"),C=e("./history"),M=e("./range"),S=r.ProseMirror=function(){
-function e(t){s(this,e),(0,v.ensureCSSAdded)(),t=this.options=(0,k.parseOptions)(t),this.schema=t.schema,null==t.doc&&(t.doc=this.schema.node("doc",null,[this.schema.node("paragraph")])),this.content=(0,v.elt)("div",{"class":"ProseMirror-content","pm-container":!0}),this.wrapper=(0,v.elt)("div",{"class":"ProseMirror"},this.content),this.wrapper.ProseMirror=this,t.place&&t.place.appendChild?t.place.appendChild(this.wrapper):t.place&&t.place(this.wrapper),this.setDocInner(t.docFormat?(0,y.parseFrom)(this.schema,t.doc,t.docFormat):t.doc),(0,_.draw)(this,this.doc),this.content.contentEditable=!0,t.label&&this.content.setAttribute("aria-label",t.label),this.mod=Object.create(null),this.cached=Object.create(null),this.operation=null,this.dirtyNodes=new m.Map,this.flushScheduled=!1,this.sel=new b.SelectionState(this,(0,b.findSelectionAtStart)(this.doc)),this.accurateSelection=!1,this.input=new x.Input(this),this.commands=null,this.commandKeys=null,(0,k.initOptions)(this)}return a(e,[{key:"setOption",value:function(e,t){(0,k.setOption)(this,e,t),this.signal("optionChanged",e,t)}},{key:"getOption",value:function(e){return this.options[e]}},{key:"setTextSelection",value:function(e,t){this.setSelection(new b.TextSelection(e,t))}},{key:"setNodeSelection",value:function(e){this.checkPos(e,!1);var t=this.doc.path(e.path);e.offset>=t.size&&b.SelectionError.raise("Trying to set a node selection at the end of a node");var r=t.child(e.offset);r.type.selectable||b.SelectionError.raise("Trying to select a non-selectable node"),this.input.maybeAbortComposition(),this.sel.setAndSignal(new b.NodeSelection(e,e.move(1),r))}},{key:"setSelection",value:function(e){e instanceof b.TextSelection?(this.checkPos(e.head,!0),e.empty||this.checkPos(e.anchor,!0)):this.checkPos(e.to,!1),this.setSelectionDirect(e)}},{key:"setSelectionDirect",value:function(e){this.ensureOperation(),this.input.maybeAbortComposition(),e.eq(this.sel.range)||this.sel.setAndSignal(e)}},{key:"setContent",value:function(e,t){t&&(e=(0,y.parseFrom)(this.schema,e,t)),this.setDoc(e)}},{key:"getContent",value:function(e){return e?(0,y.serializeTo)(this.doc,e):this.doc}},{key:"setDocInner",value:function(e){e.type!=this.schema.nodes.doc&&d.AssertionError.raise("Trying to set a document with a different schema"),this.doc=e,this.ranges=new M.RangeStore(this),this.history=new C.History(this)}},{key:"setDoc",value:function(e,t){t||(t=(0,b.findSelectionAtStart)(e)),this.signal("beforeSetDoc",e,t),this.ensureOperation(),this.setDocInner(e),this.sel.set(t,!0),this.signal("setDoc",e,t)}},{key:"updateDoc",value:function(e,t,r){this.ensureOperation(),this.input.maybeAbortComposition(),this.ranges.transform(t),this.doc=e,this.sel.setAndSignal(r||this.sel.range.map(e,t)),this.signal("change")}},{key:"apply",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?P:arguments[1];return e.doc==this.doc?!1:(e.docs[0]!=this.doc&&(0,c.findDiffStart)(e.docs[0],this.doc)&&d.AssertionError.raise("Applying a transform that does not start with the current document"),this.updateDoc(e.doc,e,t.selection),this.signal("transform",e,t),t.scrollIntoView&&this.scrollIntoView(),e)}},{key:"checkPos",value:function(e,t){e.isValid(this.doc,t)||d.AssertionError.raise("Position "+e+" is not valid in current document")}},{key:"ensureOperation",value:function(){return this.operation||this.startOperation()}},{key:"startOperation",value:function(e){var t=this;return this.operation=new T(this),e&&e.readSelection===!1||!this.sel.readFromDOM()||(this.operation.sel=this.sel.range),this.flushScheduled||((0,v.requestAnimationFrame)(function(){t.flushScheduled=!1,t.flush()}),this.flushScheduled=!0),this.operation}},{key:"flush",value:function(){if(document.body.contains(this.wrapper)&&this.operation){this.signal("flushing");var e=this.operation;if(e){this.operation=null,this.accurateSelection=!0;var t=e.doc!=this.doc||this.dirtyNodes.size,r=!1;this.input.composing||!t&&!e.composingAtStart||((0,_.redraw)(this,this.dirtyNodes,this.doc,e.doc),this.dirtyNodes.clear(),r=!0),((r||!e.sel.eq(this.sel.range))&&!this.input.composing||e.focus)&&this.sel.toDOM(e.focus),e.scrollIntoView!==!1&&(0,w.scrollIntoView)(this,e.scrollIntoView),t&&this.signal("draw"),this.signal("flush"),this.accurateSelection=!1}}}},{key:"addKeymap",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?50:arguments[1];(0,h["default"])(this.input.keymaps,{map:e,rank:t},function(e,t){return e.rank-t.rank})}},{key:"removeKeymap",value:function(e){for(var t=this.input.keymaps,r=0;r<t.length;++r)if(t[r].map==e||t[r].map.options.name==e)return t.splice(r,1),!0}},{key:"markRange",value:function(e,t,r){this.checkPos(e),this.checkPos(t);var n=new M.MarkedRange(e,t,r);return this.ranges.addRange(n),n}},{key:"removeRange",value:function(e){this.ranges.removeRange(e)}},{key:"setMark",value:function(e,t,r){var n=this.selection;if(n.empty){var o=this.activeMarks();if(null==t&&(t=!e.isInSet(o)),t&&!this.doc.path(n.head.path).type.canContainMark(e))return;this.input.storedMarks=t?e.create(r).addToSet(o):e.removeFromSet(o),this.signal("activeMarkChange")}else(null!=t?t:!this.doc.rangeHasMark(n.from,n.to,e))?this.apply(this.tr.addMark(n.from,n.to,e.create(r))):this.apply(this.tr.removeMark(n.from,n.to,e))}},{key:"activeMarks",value:function(){var e;return this.input.storedMarks||((e=this.selection.head)?this.doc.marksAt(e):[])}},{key:"focus",value:function(){this.operation?this.operation.focus=!0:this.sel.toDOM(!0)}},{key:"hasFocus",value:function(){return this.sel.range instanceof b.NodeSelection?document.activeElement==this.content:(0,b.hasFocus)(this)}},{key:"posAtCoords",value:function(e){return(0,w.posAtCoords)(this,e)}},{key:"coordsAtPos",value:function(e){return this.checkPos(e),(0,w.coordsAtPos)(this,e)}},{key:"scrollIntoView",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];e&&this.checkPos(e),this.ensureOperation(),this.operation.scrollIntoView=e}},{key:"execCommand",value:function(e,t){var r=this.commands[e];return!(!r||r.exec(this,t)===!1)}},{key:"keyForCommand",value:function(e){var t=this.commandKeys[e];if(void 0!==t)return t;var r=this.commands[e],n=this.input.baseKeymap;if(!r)return this.commandKeys[e]=null;var o=r.spec.key||(v.browser.mac?r.spec.macKey:r.spec.pcKey);if(o){o=l["default"].normalizeKeyName(Array.isArray(o)?o[0]:o);var i=n.bindings[o];if(Array.isArray(i)?i.indexOf(e)>-1:i==e)return this.commandKeys[e]=o}for(var s in n.bindings){var a=n.bindings[s];if(Array.isArray(a)?a.indexOf(e)>-1:a==e)return this.commandKeys[e]=s}return this.commandKeys[e]=null}},{key:"markRangeDirty",value:function(e){this.ensureOperation();for(var t=this.dirtyNodes,r=e.from,n=e.to,o=0,i=this.doc;;o++){var s=o==r.depth,a=o==n.depth;if(s||a||r.path[o]!=n.path[o]){var u=function(){var e=s?r.offset:r.path[o],u=a?n.offset:n.path[o]+1;if(i.isTextblock)i.forEach(function(r,n,o){u>n&&o>e&&t.set(r,O)});else for(var l,c=i.iter(e,u);l=c.next().value;)t.set(l,O);return"break"}();if("break"===u)break}else{var l=i.child(r.path[o]);t.has(l)||t.set(l,A),i=l}}}},{key:"markAllDirty",value:function(){this.dirtyNodes.set(this.doc,O)}},{key:"selection",get:function(){return this.accurateSelection||this.ensureOperation(),this.sel.range}},{key:"tr",get:function(){return new E(this)}}]),e}();S.prototype.apply.scroll={scrollIntoView:!0};var A=r.DIRTY_RESCAN=1,O=r.DIRTY_REDRAW=2,P={};(0,g.eventMixin)(S);var T=function D(e){s(this,D),this.doc=e.doc,this.sel=e.sel.range,this.scrollIntoView=!1,this.focus=!1,this.composingAtStart=!!e.input.composing},E=function(e){function t(e){s(this,t);var r=o(this,Object.getPrototypeOf(t).call(this,e.doc));return r.pm=e,r}return i(t,e),a(t,[{key:"apply",value:function(e){return this.pm.apply(this,e)}},{key:"replaceSelection",value:function(e,t){var r=this.selection,n=r.empty,o=r.from,i=r.to,s=r.node,a=void 0;if(e&&e.isInline&&t!==!1){var u=n?this.pm.input.storedMarks:this.doc.marksAt(o);e=e.type.create(e.attrs,e.text,u)}if(s&&s.isTextblock&&e&&e.isInline)o=new c.Pos(o.toPath(),0),i=new c.Pos(o.path,s.size);else if(s)for(;o.depth&&0==o.offset&&(a=this.doc.path(o.path))&&o.offset==a.size-1&&!a.type.canBeEmpty&&(!e||!a.type.canContain(e));)o=o.shorten(),i=i.shorten(null,1);else if(e&&e.isBlock&&this.doc.path(o.path.slice(0,o.depth-1)).type.canContain(e)){this["delete"](o,i);var l=this.doc.path(o.path);return o.offset&&o.offset!=l.size&&this.split(o),this.insert(o.shorten(null,o.offset?1:0),e)}return e?this.replaceWith(o,i,e):this["delete"](o,i)}},{key:"deleteSelection",value:function(){return this.replaceSelection()}},{key:"typeText",value:function(e){return this.replaceSelection(this.pm.schema.text(e),!0)}},{key:"selection",get:function(){return this.steps.length?this.pm.selection.map(this):this.pm.selection}}]),t}(p.Transform)},{"../dom":3,"../format":22,"../model":38,"../transform":44,"../util/error":55,"../util/event":56,"../util/map":57,"../util/sortedinsert":59,"./css":8,"./dompos":10,"./draw":11,"./history":12,"./input":14,"./options":16,"./range":17,"./selection":19,browserkeymap:60}],16:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r,n){h[e]=new f(t,r,n)}function i(e){var t=Object.create(null),r=e?[e].concat(e.use||[]):[];e:for(var n in h){for(var o=0;o<r.length;o++)if(n in r[o]){t[n]=r[o][n];continue e}t[n]=h[n].defaultValue}return t}function s(e){for(var t in h){var r=h[t];r.update&&r.updateOnInit&&r.update(e,e.options[t],null,!0)}}function a(e,t,r){var n=h[t];void 0===n&&l.AssertionError.raise("Option '"+t+"' is not defined"),n.update===!1&&l.AssertionError.raise("Option '"+t+"' can not be changed");var o=e.options[t];e.options[t]=r,n.update&&n.update(e,r,o,!1)}Object.defineProperty(r,"__esModule",{value:!0}),r.defineOption=o,r.parseOptions=i,r.initOptions=s,r.setOption=a;var u=e("../model"),l=e("../util/error"),c=e("../ui/prompt"),p=e("./command"),f=function d(e,t,r){n(this,d),this.defaultValue=e,this.update=t,this.updateOnInit=r!==!1},h=Object.create(null);o("schema",u.defaultSchema,!1),o("doc",null,function(e,t){return e.setDoc(t)},!1),o("docFormat",null),o("place",null),o("historyDepth",100),o("historyEventDelay",500),o("commands",p.CommandSet["default"],p.updateCommands),o("commandParamPrompt",c.ParamPrompt),o("label",null)},{"../model":38,"../ui/prompt":53,"../util/error":55,"./command":7}],17:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.RangeStore=r.MarkedRange=void 0;var i=e("../util/event"),s=r.MarkedRange=function(){function e(t,r,o){n(this,e),this.options=o||{},this.from=t,this.to=r}return o(e,[{key:"remove",value:function(){this.signal("removed",this.from,this.to.max(this.from)),this.from=this.to=null}}]),e}();(0,i.eventMixin)(s);var a=function(){function e(){n(this,e),this.sorted=[]}return o(e,[{key:"find",value:function(e){for(var t=0,r=this.sorted.length;;){if(t+10>r){for(var n=t;r>n;n++)if(this.sorted[n].at.cmp(e)>=0)return n;return r}var o=t+r>>1;this.sorted[o].at.cmp(e)>0?r=o:t=o}}},{key:"insert",value:function(e){this.sorted.splice(this.find(e.at),0,e)}},{key:"remove",value:function(e,t){for(var r=this.find(e),n=0;;n++){var o=r-n-1,i=r+n;if(o>=0&&this.sorted[o].range==t)return void this.sorted.splice(o,1);if(i<this.sorted.length&&this.sorted[i].range==t)return void this.sorted.splice(i,1)}}},{key:"resort",value:function(){for(var e=0;e<this.sorted.length;e++)for(var t=this.sorted[e],r=t.at="open"==t.type?t.range.from:t.range.to,n=e;n>0&&this.sorted[n-1].at.cmp(r)>0;)this.sorted[n]=this.sorted[n-1],this.sorted[--n]=t}}]),e}(),u=(r.RangeStore=function(){function e(t){n(this,e),this.pm=t,this.ranges=[],this.sorted=new a}return o(e,[{key:"addRange",value:function(e){this.ranges.push(e),this.sorted.insert({type:"open",at:e.from,range:e}),this.sorted.insert({type:"close",at:e.to,range:e}),this.pm.markRangeDirty(e)}},{key:"removeRange",value:function(e){var t=this.ranges.indexOf(e);t>-1&&(this.ranges.splice(t,1),this.sorted.remove(e.from,e),this.sorted.remove(e.to,e),this.pm.markRangeDirty(e),e.remove())}},{key:"transform",value:function(e){for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t];r.from=e.map(r.from,r.options.inclusiveLeft?-1:1).pos,r.to=e.map(r.to,r.options.inclusiveRight?1:-1).pos;var n=r.from.cmp(r.to);r.options.removeWhenEmpty!==!1&&n>=0?(this.removeRange(r),t--):n>0&&(r.to=r.from)}this.sorted.resort()}},{key:"activeRangeTracker",value:function(){return new u(this.sorted.sorted)}}]),e}(),function(){function e(t){n(this,e),this.sorted=t,this.pos=0,this.current=[]}return o(e,[{key:"advanceTo",value:function(e){for(var t=void 0;this.pos<this.sorted.length&&(t=this.sorted[this.pos]).at.cmp(e)<=0;){var r=t.range.options.className;r&&("open"==t.type?this.current.push(r):this.current.splice(this.current.indexOf(r),1)),this.pos++}}},{key:"nextChangeBefore",value:function(e){for(;;){if(this.pos==this.sorted.length)return null;var t=this.sorted[this.pos];if(t.range.options.className)return t.at.cmp(e)>=0?null:t.at.offset;this.pos++}}}]),e}())},{"../util/event":56}],18:[function(e,t,r){"use strict";var n=e("../model"),o=e("./command"),i=e("../format");n.StrongMark.register("command","set",{derive:!0,label:"Set strong"}),n.StrongMark.register("command","unset",{derive:!0,label:"Unset strong"}),n.StrongMark.register("command","toggle",{derive:!0,label:"Toggle strong",menu:{group:"inline",rank:20,display:{type:"icon",width:805,height:1024,path:"M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z"}},keys:["Mod-B"]}),n.EmMark.register("command","set",{derive:!0,label:"Add emphasis"}),n.EmMark.register("command","unset",{derive:!0,label:"Remove emphasis"}),n.EmMark.register("command","toggle",{derive:!0,label:"Toggle emphasis",menu:{group:"inline",rank:21,display:{type:"icon",width:585,height:1024,path:"M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z"}},keys:["Mod-I"]}),n.CodeMark.register("command","set",{derive:!0,label:"Set code style"}),n.CodeMark.register("command","unset",{derive:!0,label:"Remove code style"}),n.CodeMark.register("command","toggle",{derive:!0,label:"Toggle code style",menu:{group:"inline",rank:22,display:{type:"icon",width:896,height:1024,path:"M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z"}},keys:["Mod-`"]});var s={type:"icon",width:951,height:1024,path:"M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z"};n.LinkMark.register("command","unset",{derive:!0,label:"Unlink",menu:{group:"inline",rank:30,display:s},active:function(){return!0}}),n.LinkMark.register("command","set",{derive:{inverseSelect:!0,params:[{label:"Target",attr:"href"},{label:"Title",attr:"title"}]},label:"Add link",menu:{group:"inline",rank:30,display:s}}),n.Image.register("command","insert",{derive:{params:[{label:"Image URL",attr:"src"},{label:"Description / alternative text",attr:"alt",prefill:function(e){return(0,o.selectedNodeAttr)(e,this,"alt")||(0,i.toText)(e.doc.sliceBetween(e.selection.from,e.selection.to))}},{label:"Title",attr:"title"}]},label:"Insert image",menu:{group:"insert",rank:20,display:{type:"label",label:"Image"}}}),n.BulletList.register("command","wrap",{derive:{list:!0},label:"Wrap the selection in a bullet list",menu:{group:"block",rank:40,display:{type:"icon",width:768,height:896,path:"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z"}},keys:["Alt-Right '*'","Alt-Right '-'"]}),n.OrderedList.register("command","wrap",{derive:{list:!0},label:"Wrap the selection in an ordered list",menu:{group:"block",rank:41,display:{type:"icon",width:768,height:896,path:"M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z"}},keys:["Alt-Right '1'"]}),n.BlockQuote.register("command","wrap",{derive:!0,label:"Wrap the selection in a block quote",menu:{group:"block",rank:45,display:{type:"icon",width:640,height:896,path:"M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z"}},keys:["Alt-Right '>'","Alt-Right '\"'"]}),n.HardBreak.register("command","insert",{label:"Insert hard break",run:function(e){var t=e.selection,r=t.node,n=t.from;return r&&r.isBlock?!1:e.doc.path(n.path).type.isCode?e.tr.typeText("\n").apply(e.apply.scroll):e.tr.replaceSelection(this.create()).apply(e.apply.scroll)},keys:["Mod-Enter","Shift-Enter"]}),n.ListItem.register("command","split",{label:"Split the current list item",run:function(e){var t=e.selection,r=t.from,o=t.to,i=t.node;if(i&&i.isBlock||r.path.length<2||!n.Pos.samePath(r.path,o.path))return!1;var s=r.shorten(),a=e.doc.path(s.path);if(a.type!=this)return!1;var u=o.offset==a.child(s.offset).size?e.schema.defaultTextblockType():null;return e.tr["delete"](r,o).split(r,2,u).apply(e.apply.scroll)},keys:["Enter(50)"]});for(var a=function(e){n.Heading.registerComputed("command","make"+e,function(t){return e<=t.maxLevel?{derive:{name:"make",attrs:{level:e}},label:"Change to heading "+e,keys:["Mod-H '"+e+"'"],menu:{group:"textblockHeading",rank:30+e,display:{type:"label",label:"Level "+e},activeDisplay:"Head "+e}}:void 0})},u=1;10>=u;u++)a(u);n.Paragraph.register("command","make",{derive:!0,label:"Change to paragraph",keys:["Mod-P"],menu:{group:"textblock",rank:10,display:{type:"label",label:"Plain"},activeDisplay:"Plain"}}),n.CodeBlock.register("command","make",{derive:!0,label:"Change to code block",keys:["Mod-\\"],menu:{group:"textblock",rank:20,display:{type:"label",label:"Code"},activeDisplay:"Code"}}),n.HorizontalRule.register("command","insert",{derive:!0,label:"Insert horizontal rule",keys:["Mod-Shift--"],menu:{group:"insert",rank:70,display:{type:"label",label:"Horizontal rule"}}})},{"../format":22,"../model":38,"./command":7}],19:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){if(!a(e))return null;var t=window.getSelection();return new w((0,y.posFromDOM)(e,t.anchorNode,t.anchorOffset,!0),(0,y.posFromDOM)(e,t.focusNode,t.focusOffset,!0))}function a(e){var t=window.getSelection();return t.rangeCount&&(0,v.contains)(e.content,t.anchorNode)}function u(e,t,r,n,o){var i=e.path(t);if(i.isTextblock)return new w(new m.Pos(t,r));for(var s=r+(n>0?0:-1);n>0?s<i.size:s>=0;s+=n){var a=i.child(s);if(!o&&null==a.type.contains&&a.type.selectable)return new _(new m.Pos(t,s),new m.Pos(t,s+1),a);t.push(s);var l=u(e,t,0>n?a.size:0,n,o);if(l)return l;t.pop()}}function l(e,t,r,n){for(var o=t.path.slice(),i=t.offset;;){var s=u(e,o,i,r,n);if(s)return s;if(!o.length)break;i=o.pop()+(r>0?1:0)}}function c(e,t){var r=arguments.length<=2||void 0===arguments[2]?1:arguments[2],n=arguments[3],o=l(e,t,r,n)||l(e,t,-r,n);return o||k("Searching for selection in invalid document "+e),o}function p(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];return u(e,t.slice(),0,1,r)}function f(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];return u(e,t.slice(),e.size,-1,r)}function h(e,t,r){for(var n=(0,y.pathToDOM)(e.content,t.path),o=(0,y.coordsAtPos)(e,t),i=n.firstChild;i;i=i.nextSibling)if(1==i.nodeType)for(var s=i.getClientRects(),a=0;a<s.length;a++){var u=s[a];if(0>r?u.bottom<o.top:u.top>o.bottom)return!1}return!0}var d=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.NodeSelection=r.TextSelection=r.Selection=r.SelectionState=r.SelectionError=void 0,r.rangeFromDOMLoose=s,r.hasFocus=a,r.findSelectionFrom=l,r.findSelectionNear=c,r.findSelectionAtStart=p,r.findSelectionAtEnd=f,r.verticalMotionLeavesTextblock=h;var m=e("../model"),g=e("../util/error"),v=e("../dom"),y=e("./dompos"),k=r.SelectionError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(g.ProseMirrorError),b=(r.SelectionState=function(){function e(t,r){var o=this;n(this,e),this.pm=t,this.range=r,this.lastNonNodePos=null,this.polling=null,this.lastAnchorNode=this.lastHeadNode=this.lastAnchorOffset=this.lastHeadOffset=null,this.lastNode=null,t.content.addEventListener("focus",function(){return o.receivedFocus()}),this.poller=this.poller.bind(this)}return d(e,[{key:"setAndSignal",value:function(e,t){this.set(e,t),this.pm.signal("selectionChange")}},{key:"set",value:function(e,t){this.range=e,e.node||(this.lastNonNodePos=null),t!==!1&&(this.lastAnchorNode=null)}},{key:"poller",value:function(){a(this.pm)?(this.pm.operation||this.readFromDOM(),this.polling=setTimeout(this.poller,100)):this.polling=null}},{key:"startPolling",value:function(){clearTimeout(this.polling),this.polling=setTimeout(this.poller,50)}},{key:"fastPoll",value:function(){this.startPolling()}},{key:"stopPolling",value:function(){clearTimeout(this.polling),this.polling=null}},{key:"domChanged",value:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastHeadNode||e.focusOffset!=this.lastHeadOffset}},{key:"storeDOMState",value:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastHeadNode=e.focusNode,this.lastHeadOffset=e.focusOffset}},{key:"readFromDOM",value:function(){if(this.pm.input.composing||!a(this.pm)||!this.domChanged())return!1;var e=window.getSelection(),t=this.pm.doc,r=(0,y.posFromDOM)(this.pm,e.anchorNode,e.anchorOffset),n=e.isCollapsed?r:(0,y.posFromDOM)(this.pm,e.focusNode,e.focusOffset),o=c(t,n,this.range.head&&this.range.head.cmp(n)<0?-1:1);return o instanceof w&&t.path(r.path).isTextblock&&(o=new w(r,o.head)),this.setAndSignal(o),o instanceof _||o.head.cmp(n)||o.anchor.cmp(r)?this.toDOM():(this.clearNode(),this.storeDOMState()),!0}},{key:"toDOM",value:function(e){if(!a(this.pm)){if(!e)return;v.browser.gecko&&this.pm.content.focus()}this.range instanceof _?this.nodeToDOM():this.rangeToDOM()}},{key:"nodeToDOM",value:function(){var e=(0,y.pathToDOM)(this.pm.content,this.range.from.toPath());e!=this.lastNode&&(this.clearNode(),e.classList.add("ProseMirror-selectednode"),this.pm.content.classList.add("ProseMirror-nodeselection"),this.lastNode=e);var t=document.createRange(),r=window.getSelection();t.selectNode(e),r.removeAllRanges(),r.addRange(t),this.storeDOMState()}},{key:"rangeToDOM",value:function(){this.clearNode();var e=(0,y.DOMFromPos)(this.pm.content,this.range.anchor),t=(0,y.DOMFromPos)(this.pm.content,this.range.head),r=window.getSelection(),n=document.createRange();if(r.extend)n.setEnd(e.node,e.offset),n.collapse(!1);else{if(this.range.anchor.cmp(this.range.head)>0){var o=e;e=t,t=o}n.setEnd(t.node,t.offset),n.setStart(e.node,e.offset)}r.removeAllRanges(),r.addRange(n),r.extend&&r.extend(t.node,t.offset),this.storeDOMState()}},{key:"clearNode",value:function(){return this.lastNode?(this.lastNode.classList.remove("ProseMirror-selectednode"),this.pm.content.classList.remove("ProseMirror-nodeselection"),this.lastNode=null,!0):void 0}},{key:"receivedFocus",value:function(){null==this.polling&&this.startPolling()}}]),e}(),r.Selection=function x(){n(this,x)}),w=r.TextSelection=function(e){function t(e,r){n(this,t);var i=o(this,Object.getPrototypeOf(t).call(this));return i.anchor=e,i.head=r||e,i}return i(t,e),d(t,[{key:"eq",value:function(e){return e instanceof t&&!e.head.cmp(this.head)&&!e.anchor.cmp(this.anchor)}},{key:"map",value:function(e,r){var n=r.map(this.head).pos;if(!e.path(n.path).isTextblock)return c(e,n);var o=r.map(this.anchor).pos;return new t(e.path(o.path).isTextblock?o:n,n)}},{key:"inverted",get:function(){return this.anchor.cmp(this.head)>0}},{key:"from",get:function(){return this.inverted?this.head:this.anchor}},{key:"to",get:function(){return this.inverted?this.anchor:this.head}},{key:"empty",get:function(){return 0==this.anchor.cmp(this.head)}}]),t}(b),_=r.NodeSelection=function(e){function t(e,r,i){n(this,t);var s=o(this,Object.getPrototypeOf(t).call(this));return s.from=e,s.to=r,s.node=i,s}return i(t,e),d(t,[{key:"eq",value:function(e){return e instanceof t&&!this.from.cmp(e.from)}},{key:"map",value:function(e,r){var n=r.map(this.from,1).pos,o=r.map(this.to,-1).pos;if(m.Pos.samePath(n.path,o.path)&&n.offset==o.offset-1){var i=e.nodeAfter(n);if(i.type.selectable)return new t(n,o,i)}return c(e,n)}},{key:"empty",get:function(){return!1}}]),t}(b)},{"../dom":3,"../model":38,"../util/error":55,"./dompos":10}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r){r||(r={});var n=new y(e,r.topNode||e.node("doc"),r),o=r.from?t.childNodes[r.from]:t.firstChild,i=null!=r.to&&t.childNodes[r.to]||null;n.addAll(o,i,!0);var s=void 0;do s=n.leave();while(n.stack.length);return s}function s(e,t,r){var n=(r&&r.document||window.document).createElement("div");return n.innerHTML=t,i(e,n,r)}function a(e){for(var t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=void 0,n=[];r=t.exec(e);)n.push(r[1],r[2].trim());return n}function u(e){return e.cached.parseDOMInfo||(e.cached.parseDOMInfo=l(e))}function l(e){var t=Object.create(null),r=Object.create(null);return t._=[],e.registry("parseDOM",function(e,r,n){var o=r.parse;"block"==o?o=function(e,t){t.wrapIn(e,this)}:"mark"==o&&(o=function(e,t){t.wrapMark(e,this)}),(0,h["default"])(t[e]||(t[e]=[]),{type:n,parse:o,rank:null==r.rank?50:r.rank},function(e,t){return e.rank-t.rank})}),e.registry("parseDOMStyle",function(e,t,n){(0,h["default"])(r[e]||(r[e]=[]),{type:n,parse:t.parse,rank:null==t.rank?50:t.rank},function(e,t){return e.rank-t.rank})}),{tags:t,styles:r}}var c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.fromDOM=i,r.fromHTML=s;var p=e("../model"),f=e("../util/sortedinsert"),h=n(f),d=e("./register");(0,d.defineSource)("dom",i),(0,d.defineSource)("html",s);var m={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},g={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},v=[],y=function(){function e(t,r,n){o(this,e),this.options=n||{},this.schema=t,this.stack=[],this.marks=v,this.closing=!1,this.enter(r.type,r.attrs);var i=u(t);this.tagInfo=i.tags,this.styleInfo=i.styles}return c(e,[{key:"addDOM",value:function(e){if(3==e.nodeType){var t=e.nodeValue,r=this.top,n=void 0;(/\S/.test(t)||r.type.isTextblock)&&(this.options.preserveWhitespace||(t=t.replace(/\s+/g," "),/^\s/.test(t)&&(!(n=r.content[r.content.length-1])||"text"==n.type.name&&/\s$/.test(n.text))&&(t=t.slice(1))),t&&this.insertNode(this.schema.text(t,this.marks)))}else if(1!=e.nodeType||e.hasAttribute("pm-ignore"));else{var o=e.getAttribute("style");o?this.addElementWithStyles(a(o),e):this.addElement(e)}}},{key:"addElement",value:function(e){var t=e.nodeName.toLowerCase();this.parseNodeType(t,e)||g.hasOwnProperty(t)||(this.addAll(e.firstChild,null),m.hasOwnProperty(t)&&this.top.type==this.schema.defaultTextblockType()&&(this.closing=!0))}},{key:"addElementWithStyles",value:function(e,t){for(var r=this,n=[],o=0;o<e.length;o+=2){var i=this.styleInfo[e[o]],s=e[o+1];if(i)for(var a=0;a<i.length;a++)n.push(i[a],s)}var u=function l(e){if(e==n.length)r.addElement(t);else{var o=n[e];o.parse.call(o.type,n[e+1],r,l.bind(null,e+2))}};u(0)}},{key:"tryParsers",value:function(e,t){if(e)for(var r=0;r<e.length;r++){var n=e[r];if(n.parse.call(n.type,t,this)!==!1)return!0}}},{key:"parseNodeType",value:function(e,t){return this.tryParsers(this.tagInfo[e],t)||this.tryParsers(this.tagInfo._,t)}},{key:"addAll",value:function(e,t,r){for(var n=r&&this.stack.slice(),o=e;o!=t;o=o.nextSibling)this.addDOM(o),r&&m.hasOwnProperty(o.nodeName.toLowerCase())&&this.sync(n)}},{key:"doClose",value:function(){if(this.closing&&!(this.stack.length<2)){var e=this.leave();this.enter(e.type,e.attrs),this.closing=!1}}},{key:"insertNode",value:function(e){if(this.top.type.canContain(e))this.doClose();else for(var t=this.stack.length-1;t>=0;t--){var r=this.stack[t].type.findConnection(e.type);if(r){if(t==this.stack.length-1)this.doClose();else for(;this.stack.length>t+1;)this.leave();for(var n=0;n<r.length;n++)this.enter(r[n]);this.marks.length&&(this.marks=v);break}}return this.top.content.push(e),e}},{key:"insert",value:function(e,t,r){return this.insertNode(e.createAutoFill(t,r,this.marks))}},{key:"enter",value:function(e,t){this.stack.push({type:e,attrs:t,content:[]})}},{key:"leave",value:function(){this.marks.length&&(this.marks=v);var e=this.stack.pop(),t=e.content[e.content.length-1];!this.options.preserveWhitespace&&t&&t.isText&&/\s$/.test(t.text)&&(e.content[e.content.length-1]=t.copy(t.text.slice(0,t.text.length-1)));var r=e.type.createAutoFill(e.attrs,e.content);return this.stack.length&&this.insertNode(r),r}},{key:"sync",value:function(e){for(;this.stack.length>e.length;)this.leave();for(;;){var t=this.stack.length-1,r=this.stack[t],n=e[t];if(r.type==n.type&&p.Node.sameAttrs(r.attrs,n.attrs))break;
-this.leave()}for(;e.length>this.stack.length;){var o=e[this.stack.length];this.enter(o.type,o.attrs)}this.marks.length&&(this.marks=v),this.closing=!1}},{key:"wrapIn",value:function(e,t,r){this.enter(t,r),this.addAll(e.firstChild,null,!0),this.leave()}},{key:"wrapMark",value:function(e,t){var r=this.marks;this.marks=(t.instance||t).addToSet(r),e.call?e():this.addAll(e.firstChild,null),this.marks=r}},{key:"top",get:function(){return this.stack[this.stack.length-1]}}]),e}();p.Paragraph.register("parseDOM","p",{parse:"block"}),p.BlockQuote.register("parseDOM","blockquote",{parse:"block"});for(var k=function(e){p.Heading.registerComputed("parseDOM","h"+e,function(t){return e<=t.maxLevel?{parse:function(t,r){r.wrapIn(t,this,{level:e})}}:void 0})},b=1;6>=b;b++)k(b);p.HorizontalRule.register("parseDOM","hr",{parse:"block"}),p.CodeBlock.register("parseDOM","pre",{parse:function(e,t){var r=e.firstChild&&/^code$/i.test(e.firstChild.nodeName)&&e.firstChild.getAttribute("class");if(r&&/fence/.test(r)){for(var n=[],o=/(?:^|\s)lang-(\S+)/g,i=void 0;i=o.exec(r);)n.push(i[1]);r=n.join(" ")}else r=null;var s=e.textContent;t.insert(this,{params:r},s?[t.schema.text(s)]:[])}}),p.BulletList.register("parseDOM","ul",{parse:"block"}),p.OrderedList.register("parseDOM","ol",{parse:function(e,t){var r={order:e.getAttribute("start")||1};t.wrapIn(e,this,r)}}),p.ListItem.register("parseDOM","li",{parse:"block"}),p.HardBreak.register("parseDOM","br",{parse:function(e,t){t.insert(this)}}),p.Image.register("parseDOM","img",{parse:function(e,t){t.insert(this,{src:e.getAttribute("src"),title:e.getAttribute("title")||null,alt:e.getAttribute("alt")||null})}}),p.LinkMark.register("parseDOM","a",{parse:function(e,t){var r=e.getAttribute("href");return r?void t.wrapMark(e,this.create({href:r,title:e.getAttribute("title")})):!1}}),p.EmMark.register("parseDOM","i",{parse:"mark"}),p.EmMark.register("parseDOM","em",{parse:"mark"}),p.StrongMark.register("parseDOMStyle","font-style",{parse:function(e,t,r){"italic"==e?t.wrapMark(r,this):r()}}),p.StrongMark.register("parseDOM","b",{parse:"mark"}),p.StrongMark.register("parseDOM","strong",{parse:"mark"}),p.StrongMark.register("parseDOMStyle","font-weight",{parse:function(e,t,r){"bold"==e||"bolder"==e||!/\D/.test(e)&&+e>=500?t.wrapMark(r,this):r()}}),p.CodeMark.register("parseDOM","code",{parse:"mark"})},{"../model":38,"../util/sortedinsert":59,"./register":23}],21:[function(e,t,r){"use strict";function n(e,t){for(var r=t.trim().split(/\n{2,}/),n=[],o=0;o<r.length;o++){for(var i=[],s=r[o].split("\n"),a=0;a<s.length;a++)a&&i.push(e.node("hard_break")),s[a]&&i.push(e.text(s[a]));n.push(e.node("paragraph",null,i))}return n.length||n.push(e.node("paragraph")),e.node("doc",null,n)}Object.defineProperty(r,"__esModule",{value:!0}),r.fromText=n;var o=e("./register");(0,o.defineSource)("text",n)},{"./register":23}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./register");Object.defineProperty(r,"serializeTo",{enumerable:!0,get:function(){return n.serializeTo}}),Object.defineProperty(r,"knownTarget",{enumerable:!0,get:function(){return n.knownTarget}}),Object.defineProperty(r,"defineTarget",{enumerable:!0,get:function(){return n.defineTarget}}),Object.defineProperty(r,"parseFrom",{enumerable:!0,get:function(){return n.parseFrom}}),Object.defineProperty(r,"knownSource",{enumerable:!0,get:function(){return n.knownSource}}),Object.defineProperty(r,"defineSource",{enumerable:!0,get:function(){return n.defineSource}});var o=e("./from_dom");Object.defineProperty(r,"fromDOM",{enumerable:!0,get:function(){return o.fromDOM}}),Object.defineProperty(r,"fromHTML",{enumerable:!0,get:function(){return o.fromHTML}});var i=e("./to_dom");Object.defineProperty(r,"toDOM",{enumerable:!0,get:function(){return i.toDOM}}),Object.defineProperty(r,"toHTML",{enumerable:!0,get:function(){return i.toHTML}}),Object.defineProperty(r,"nodeToDOM",{enumerable:!0,get:function(){return i.nodeToDOM}});var s=e("./from_text");Object.defineProperty(r,"fromText",{enumerable:!0,get:function(){return s.fromText}});var a=e("./to_text");Object.defineProperty(r,"toText",{enumerable:!0,get:function(){return a.toText}})},{"./from_dom":20,"./from_text":21,"./register":23,"./to_dom":24,"./to_text":25}],23:[function(e,t,r){"use strict";function n(e,t,r){var n=c[t];return n||l.NamespaceError.raise("Target format "+t+" not defined"),n(e,r)}function o(e){return!!c[e]}function i(e,t){c[e]=t}function s(e,t,r,n){var o=p[r];return o||l.NamespaceError.raise("Source format "+r+" not defined"),o(e,t,n)}function a(e){return!!p[e]}function u(e,t){p[e]=t}Object.defineProperty(r,"__esModule",{value:!0}),r.serializeTo=n,r.knownTarget=o,r.defineTarget=i,r.parseFrom=s,r.knownSource=a,r.defineSource=u;var l=e("../util/error"),c=Object.create(null);i("json",function(e){return e.toJSON()});var p=Object.create(null);u("json",function(e,t){return e.nodeFromJSON(t)})},{"../util/error":55}],24:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return new p(t).renderContent(e)}function i(e,t,r){var n=new p(t),o=n.renderNode(e,r);return e.isInline&&(o=n.wrapInlineFlat(o,e.marks),n.options.renderInlineFlat&&(o=t.renderInlineFlat(e,o,r)||o)),o}function s(e,t){var r=new p(t),n=r.elt("div");return n.appendChild(r.renderContent(e)),n.innerHTML}function a(e,t){e.prototype.serializeDOM=t}var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.toDOM=o,r.nodeToDOM=i,r.toHTML=s;var l=e("../model"),c=e("./register"),p=function(){function e(t){n(this,e),this.options=t||{},this.doc=this.options.document||window.document}return u(e,[{key:"elt",value:function(e,t){var r=this.doc.createElement(e);if(t)for(var n in t)"style"==n?r.style.cssText=t[n]:t[n]&&r.setAttribute(n,t[n]);for(var o=arguments.length,i=Array(o>2?o-2:0),s=2;o>s;s++)i[s-2]=arguments[s];for(var a=0;a<i.length;a++)r.appendChild("string"==typeof i[a]?this.doc.createTextNode(i[a]):i[a]);return r}},{key:"renderNode",value:function(e,t){var r=e.type.serializeDOM(e,this);return this.options.onRender&&(r=this.options.onRender(e,r,t)||r),r}},{key:"renderContent",value:function(e,t){return t||(t=this.doc.createDocumentFragment()),e.isTextblock?this.options.renderInlineFlat?this.renderInlineFlatInto(e,t):this.renderInlineInto(e,t):this.renderBlocksInto(e,t),t}},{key:"renderBlocksInto",value:function(e,t){for(var r,n=e.iter();r=n.next().value;)this.options.path&&this.options.path.push(n.offset-r.width),t.appendChild(this.renderNode(r,n.offset-r.width)),this.options.path&&this.options.path.pop()}},{key:"renderInlineInto",value:function(e,t){var r=this,n=t,o=[];e.forEach(function(e,t){for(var i=0;i<Math.min(o.length,e.marks.length)&&e.marks[i].eq(o[i]);++i);for(;i<o.length;)o.pop(),n=n.parentNode;for(;o.length<e.marks.length;){var s=e.marks[o.length];o.push(s),n=n.appendChild(r.renderMark(s))}n.appendChild(r.renderNode(e,t))})}},{key:"renderInlineFlatInto",value:function(e,t){var r=this;e.forEach(function(e,n){var o=r.renderNode(e,n);o=r.wrapInlineFlat(o,e.marks),o=r.options.renderInlineFlat(e,o,n)||o,t.appendChild(o)})}},{key:"renderMark",value:function(e){return e.type.serializeDOM(e,this)}},{key:"wrapInlineFlat",value:function(e,t){for(var r=t.length-1;r>=0;r--){var n=this.renderMark(t[r]);n.appendChild(e),e=n}return e}},{key:"renderAs",value:function(e,t,r){var n=this.renderContent(e,this.elt(t,r));return this.options.onContainer&&this.options.onContainer(n),n}}]),e}();(0,c.defineTarget)("dom",o),(0,c.defineTarget)("html",s),a(l.BlockQuote,function(e,t){return t.renderAs(e,"blockquote")}),l.BlockQuote.prototype.countCoordsAsChild=function(e,t,r,n){var o=r.firstChild.getBoundingClientRect();return n.left<o.left-2?l.Pos.from(t):void 0},a(l.BulletList,function(e,t){return t.renderAs(e,"ul")}),a(l.OrderedList,function(e,t){return t.renderAs(e,"ol",{start:"1"!=e.attrs.order&&e.attrs.order})}),l.OrderedList.prototype.countCoordsAsChild=l.BulletList.prototype.countCoordsAsChild=function(e,t,r,n){for(var o=0;o<r.childNodes.length;o++){var i=r.childNodes[o];if(i.hasAttribute("pm-offset")){var s=i.getBoundingClientRect();if(n.left>s.left-2)return null;if(s.top<=n.top&&s.bottom>=n.top)return new l.Pos(t,o)}}},a(l.ListItem,function(e,t){return t.renderAs(e,"li")}),a(l.HorizontalRule,function(e,t){return t.elt("hr")}),a(l.Paragraph,function(e,t){return t.renderAs(e,"p")}),a(l.Heading,function(e,t){return t.renderAs(e,"h"+e.attrs.level)}),a(l.CodeBlock,function(e,t){var r=t.renderAs(e,"code");return null!=e.attrs.params&&(r.className="fence "+e.attrs.params.replace(/(^|\s+)/g,"$&lang-")),t.elt("pre",null,r)}),a(l.Text,function(e,t){return t.doc.createTextNode(e.text)}),a(l.Image,function(e,t){return t.elt("img",{src:e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})}),a(l.HardBreak,function(e,t){return t.elt("br")}),a(l.EmMark,function(e,t){return t.elt("em")}),a(l.StrongMark,function(e,t){return t.elt("strong")}),a(l.CodeMark,function(e,t){return t.elt("code")}),a(l.LinkMark,function(e,t){return t.elt("a",{href:e.attrs.href,title:e.attrs.title})})},{"../model":38,"./register":23}],25:[function(e,t,r){"use strict";function n(e){return e.type.serializeText(e).trim()}Object.defineProperty(r,"__esModule",{value:!0}),r.toText=n;var o=e("../model"),i=e("./register");o.Block.prototype.serializeText=function(e){var t="";return e.forEach(function(e){return t+=e.type.serializeText(e)}),t},o.Textblock.prototype.serializeText=function(e){var t=o.Block.prototype.serializeText(e);return t&&t+"\n\n"},o.Inline.prototype.serializeText=function(){return""},o.HardBreak.prototype.serializeText=function(){return"\n"},o.Text.prototype.serializeText=function(e){return e.text},(0,i.defineTarget)("text",n)},{"../model":38,"./register":23}],26:[function(e,t,r){"use strict";function n(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?null:arguments[3],o=arguments.length<=4||void 0===arguments[4]?null:arguments[4],s=t.shorten(),a=s.offset>0&&e.doc.path(s.path).child(s.offset-1),u=a&&a.type.name==r&&(!o||o(a)),l=e.tr.wrap(t,t,r,n),c=l.map(t).pos;l["delete"](new i.Pos(c.path,0),c),u&&l.join(s),l.apply()}function o(e,t,r,n){e.tr.setBlockType(t,t,r,n)["delete"](new i.Pos(t.path,0),t).apply()}Object.defineProperty(r,"__esModule",{value:!0}),r.autoInputRules=void 0;var i=e("../model"),s=e("../edit"),a=e("./inputrules"),u=r.autoInputRules=Object.create(null);(0,s.defineOption)("autoInput",!1,function(e,t){e.mod.autoInput&&(e.mod.autoInput.forEach(function(t){return(0,a.removeInputRule)(e,t)}),e.mod.autoInput=null),t&&!function(){t===!0&&(t=["schema",u]);var r=Object.create(null),n=e.mod.autoInput=[];t.forEach(function(t){if("schema"===t)e.schema.registry("autoInput",function(e,t,n,o){var i=o+":"+e,s=t.handler;s.bind&&(s=s.bind(n)),r[i]=new a.InputRule(t.match,t.filter,s)});else for(var n in t){var o=t[n];null==o?delete r[n]:r[n]=o}});for(var o in r)(0,a.addInputRule)(e,r[o]),n.push(r[o])}()}),u.emDash=new a.InputRule(/--$/,"-","—"),u.openDoubleQuote=new a.InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,'"',"“"),u.closeDoubleQuote=new a.InputRule(/"$/,'"',"”"),u.openSingleQuote=new a.InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"'","‘"),u.closeSingleQuote=new a.InputRule(/'$/,"'","’"),i.BlockQuote.register("autoInput","startBlockQuote",new a.InputRule(/^\s*> $/," ",function(e,t,r){n(e,r,this)})),i.OrderedList.register("autoInput","startOrderedList",new a.InputRule(/^(\d+)\. $/," ",function(e,t,r){var o=+t[1];n(e,r,this,{order:o||null},function(e){return e.size+(e.attrs.order||1)==o})})),i.BulletList.register("autoInput","startBulletList",new a.InputRule(/^\s*([-+*]) $/," ",function(e,t,r){var o=t[1];n(e,r,this,null,function(e){return e.attrs.bullet==o})})),i.CodeBlock.register("autoInput","startCodeBlock",new a.InputRule(/^```$/,"`",function(e,t,r){o(e,r,this,{params:""})})),i.Heading.registerComputed("autoInput","startHeading",function(e){var t=new RegExp("^(#{1,"+e.maxLevel+"}) $");return new a.InputRule(t," ",function(e,t,r){o(e,r,this,{level:t[1].length})})})},{"../edit":13,"../model":38,"./inputrules":27}],27:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){e.mod.interpretInput||(e.mod.interpretInput=new c(e)),e.mod.interpretInput.addRule(t)}function i(e,t){var r=e.mod.interpretInput;r&&(r.removeRule(t),0==r.rules.length&&(r.unregister(),e.mod.interpretInput=null))}function s(e,t){for(var r,n=e.path(t.path),o=n.type.isCode,i="",s=n.iter(0,t.offset);r=s.next().value;)r.isText?i+=r.text:i="",s.atEnd()&&r.marks.some(function(e){return e.type.isCode})&&(o=!0);return{textBefore:i,isCode:o}}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.InputRule=void 0,r.addInputRule=o,r.removeInputRule=i;var u=e("../model"),l=e("../edit"),c=(r.InputRule=function p(e,t,r){n(this,p),this.filter=t,this.match=e,this.handler=r},function(){function e(t){var r=this;n(this,e),this.pm=t,this.rules=[],this.cancelVersion=null,t.on("selectionChange",this.onSelChange=function(){return r.cancelVersion=null}),t.on("textInput",this.onTextInput=this.onTextInput.bind(this)),t.addKeymap(new l.Keymap({Backspace:function(e){return r.backspace(e)}},{name:"inputRules"}),20)}return a(e,[{key:"unregister",value:function(){this.pm.off("selectionChange",this.onSelChange),this.pm.off("textInput",this.onTextInput),this.pm.removeKeymap("inputRules")}},{key:"addRule",value:function(e){this.rules.push(e)}},{key:"removeRule",value:function(e){var t=this.rules.indexOf(e);return t>-1?(this.rules.splice(t,1),!0):void 0}},{key:"onTextInput",value:function(e){var t=this.pm.selection.head;if(t)for(var r=void 0,n=void 0,o=e[e.length-1],i=0;i<this.rules.length;i++){var a=this.rules[i],l=void 0;if(!a.filter||a.filter==o){if(null==r){var c=s(this.pm.doc,t);if(r=c.textBefore,n=c.isCode)return}if(l=a.match.exec(r)){var p=this.pm.history.getVersion();if("string"==typeof a.handler){var f=t.offset-(l[1]||l[0]).length,h=new u.Pos(t.path,f),d=this.pm.doc.marksAt(t);this.pm.tr["delete"](h,t).insert(h,this.pm.schema.text(a.handler,d)).apply()}else a.handler(this.pm,l,t);return void(this.cancelVersion=p)}}}}},{key:"backspace",value:function(){return this.cancelVersion?(this.pm.history.backToVersion(this.cancelVersion),void(this.cancelVersion=null)):!1}}]),e}())},{"../edit":13,"../model":38}],28:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var r=p(e).parse(t,{}),n=new x(e,r),o=void 0;n.parseTokens(r);do o=n.closeNode();while(n.stack.length);return o}function s(e,t){return e.isText&&t.isText&&v.Mark.sameSet(e.marks,t.marks)?e.copy(e.text+t.text):void 0}function a(e){return e.cached.markdownTokens||(e.cached.markdownTokens=l(e))}function u(e,t,r,n){"block"==n.parse?(e[t+"_open"]=function(e,t){var o="function"==typeof n.attrs?n.attrs.call(r,e,t):n.attrs;e.openNode(r,o)},e[t+"_close"]=function(e){return e.closeNode()}):"mark"==n.parse?(e[t+"_open"]=function(e,t){var o=n.attrs instanceof Function?n.attrs.call(r,e,t):n.attrs;e.openMark(r.create(o))},e[t+"_close"]=function(e){return e.closeMark(r)}):n.parse?e[t]=n.parse.bind(r):k.AssertionError.raise("Unrecognized markdown parsing spec: "+n)}function l(e){var t=Object.create(null);return t.text=function(e,t){return e.addText(t.content)},t.inline=function(e,t){return e.parseTokens(t.children)},t.softbreak=function(e){return e.addText("\n")},e.registry("parseMarkdown",function(e,r,n){u(t,e,n,r)}),t}function c(e){var t=e.cached.markdownConfig;return t||!function(){var r=null,n=[];e.registry("configureMarkdown",function(e,t){if("init"==e)r&&k.AssertionError.raise("Two markdown parser initializers defined in schema"),r=t;else{var o=(/_(\d+)$/.exec(e)||[0,50])[1];(0,w["default"])(n,{f:t,rank:o},function(e,t){return e.rank-t.rank})}}),t={init:r||function(){return(0,g["default"])("commonmark")},modifiers:n.map(function(e){return e.f})}}(),t}function p(e){var t=c(e),r=t.init();return t.modifiers.forEach(function(e){return r=e(r)}),r}function f(e){return"\n"==e.charAt(e.length-1)?e.slice(0,e.length-1):e}function h(e,t){e.openNode(this),e.addText(f(t.content)),e.closeNode()}var d=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.fromMarkdown=i;var m=e("markdown-it"),g=n(m),v=e("../model"),y=e("../format"),k=e("../util/error"),b=e("../util/sortedinsert"),w=n(b);(0,y.defineSource)("markdown",i);var _=[],x=function(){function e(t,r){o(this,e),this.schema=t,this.stack=[{type:t.nodes.doc,content:[]}],this.tokens=r,this.marks=_,this.tokenTypes=a(t)}return d(e,[{key:"top",value:function(){return this.stack[this.stack.length-1]}},{key:"push",value:function(e){this.stack.length&&this.top().content.push(e)}},{key:"addText",value:function(e){var t=this.top().content,r=t[t.length-1],n=this.schema.text(e,this.marks),o=void 0;r&&(o=s(r,n))?t[t.length-1]=o:t.push(n)}},{key:"openMark",value:function(e){this.marks=e.addToSet(this.marks)}},{key:"closeMark",value:function(e){this.marks=e.removeFromSet(this.marks)}},{key:"parseTokens",value:function(e){for(var t=0;t<e.length;t++){var r=e[t],n=this.tokenTypes[r.type];if(!n)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");n(this,r)}}},{key:"addNode",value:function(e,t,r){var n=e.createAutoFill(t,r,this.marks);return this.push(n),n}},{key:"openNode",value:function(e,t){this.stack.push({type:e,attrs:t,content:[]})}},{key:"closeNode",value:function(){this.marks.length&&(this.marks=_);var e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}},{key:"getAttr",value:function(e,t){if(e.attrs)for(var r=0;r<e.attrs.length;r++)if(e.attrs[r][0]==t)return e.attrs[r][1]}}]),e}();v.BlockQuote.register("parseMarkdown","blockquote",{parse:"block"}),v.Paragraph.register("parseMarkdown","paragraph",{parse:"block"}),v.ListItem.register("parseMarkdown","list_item",{parse:"block"}),v.BulletList.register("parseMarkdown","bullet_list",{parse:"block"}),v.OrderedList.register("parseMarkdown","ordered_list",{parse:"block",attrs:function(e,t){return{order:Number(e.getAttr(t,"order")||1)}}}),v.Heading.register("parseMarkdown","heading",{parse:"block",attrs:function(e,t){return{level:Math.min(this.maxLevel,+t.tag.slice(1))}}}),v.CodeBlock.register("parseMarkdown","code_block",{parse:h}),v.CodeBlock.register("parseMarkdown","fence",{parse:h}),v.HorizontalRule.register("parseMarkdown","hr",{parse:function(e,t){e.addNode(this,{markup:t.markup})}}),v.Image.register("parseMarkdown","image",{parse:function(e,t){e.addNode(this,{src:e.getAttr(t,"src"),title:e.getAttr(t,"title")||null,alt:t.children[0]&&t.children[0].content||null})}}),v.HardBreak.register("parseMarkdown","hardbreak",{parse:function(e){e.addNode(this)}}),v.EmMark.register("parseMarkdown","em",{parse:"mark"}),v.StrongMark.register("parseMarkdown","strong",{parse:"mark"}),v.LinkMark.register("parseMarkdown","link",{parse:"mark",attrs:function(e,t){return{href:e.getAttr(t,"href"),title:e.getAttr(t,"title")||null}}}),v.CodeMark.register("parseMarkdown","code_inline",{parse:function(e,t){e.openMark(this.create()),e.addText(t.content),e.closeMark(this)}})},{"../format":22,"../model":38,"../util/error":55,"../util/sortedinsert":59,"markdown-it":64}],29:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./from_markdown");Object.defineProperty(r,"fromMarkdown",{enumerable:!0,get:function(){return n.fromMarkdown}});var o=e("./to_markdown");Object.defineProperty(r,"toMarkdown",{enumerable:!0,get:function(){return o.toMarkdown}})},{"./from_markdown":28,"./to_markdown":30}],30:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=new c;return t.renderContent(e),t.out}function i(e,t){e.prototype.serializeMarkdown=t}function s(e,t,r){e.prototype.openMarkdown=t,e.prototype.closeMarkdown=r}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.toMarkdown=o;var u=e("../model"),l=e("../format");(0,l.defineTarget)("markdown",o);var c=function(){function e(){n(this,e),this.delim=this.out="",this.closed=!1,this.inTightList=!1}return a(e,[{key:"flushClose",value:function(e){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==e&&(e=2),e>1){var t=this.delim,r=/\s+$/.exec(t);r&&(t=t.slice(0,t.length-r[0].length));for(var n=1;e>n;n++)this.out+=t+"\n"}this.closed=!1}}},{key:"wrapBlock",value:function(e,t,r,n){var o=this.delim;this.write(t||e),this.delim+=e,n(),this.delim=o,this.closeBlock(r)}},{key:"atBlank",value:function(){return/(^|\n)$/.test(this.out)}},{key:"ensureNewLine",value:function(){this.atBlank()||(this.out+="\n")}},{key:"write",value:function(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}},{key:"closeBlock",value:function(e){this.closed=e}},{key:"text",value:function(e,t){for(var r=e.split("\n"),n=0;n<r.length;n++){var o=this.atBlank()||this.closed;this.write(),this.out+=t!==!1?this.esc(r[n],o):r[n],n!=r.length-1&&(this.out+="\n")}}},{key:"render",value:function(e){e.type.serializeMarkdown(this,e)}},{key:"renderContent",value:function(e){var t=this;e.forEach(function(e){return t.render(e)})}},{key:"renderInline",value:function(e){var t=this,r=[],n=function(e){var n=e?e.marks.slice():[];!r.length||"code"!=r[r.length-1].type||n.length&&"code"==n[n.length-1].type||(t.text("`",!1),r.pop());for(var o=0;o<r.length;o++){for(var i=r[o],s=!1,a=0;a<n.length;a++)if(n[a].eq(r[o])){n.splice(a,1),s=!0;break}s||(t.text(t.markString(i,!1),!1),r.splice(o--,1))}for(var o=0;o<n.length;o++){var i=n[o];r.push(i),t.text(t.markString(i,!0),!1)}e&&t.render(e)};e.forEach(n),n(null)}},{key:"renderList",value:function(e,t,r){var n=this;this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var o=this.inTightList;this.inTightList=e.attrs.tight;for(var i,s=function(o,i,s){i&&e.attrs.tight&&n.flushClose(1),n.wrapBlock(t,r(i),e,function(){return n.render(s)})},a=e.iter(),u=0;i=a.next().value;u++)s(a,u,i);this.inTightList=o}},{key:"esc",value:function(e,t){return e=e.replace(/[`*\\~+\[\]]/g,"\\$&"),t&&(e=e.replace(/^[:#-]/,"\\$&")),e}},{key:"quote",value:function(e){var t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]}},{key:"repeat",value:function(e,t){for(var r="",n=0;t>n;n++)r+=e;return r}},{key:"markString",value:function(e,t){var r=t?e.type.openMarkdown:e.type.closeMarkdown;return"string"==typeof r?r:r(this,e)}}]),e}();i(u.BlockQuote,function(e,t){e.wrapBlock("> ",null,t,function(){return e.renderContent(t)})}),i(u.CodeBlock,function(e,t){null==t.attrs.params?e.wrapBlock("    ",null,t,function(){return e.text(t.textContent,!1)}):(e.write("```"+t.attrs.params+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t))}),i(u.Heading,function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)}),i(u.HorizontalRule,function(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)}),i(u.BulletList,function(e,t){e.renderList(t,"  ",function(){return(t.attrs.bullet||"*")+" "})}),i(u.OrderedList,function(e,t){var r=Number(t.attrs.order||1),n=String(r+t.size-1).length,o=e.repeat(" ",n+2);e.renderList(t,o,function(t){var o=String(r+t);return e.repeat(" ",n-o.length)+o+". "})}),i(u.ListItem,function(e,t){return e.renderContent(t)}),i(u.Paragraph,function(e,t){e.renderInline(t),e.closeBlock(t)}),i(u.Image,function(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+e.esc(t.attrs.src)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")")}),i(u.HardBreak,function(e){return e.write("\\\n")}),i(u.Text,function(e,t){return e.text(t.text)}),s(u.EmMark,"*","*"),s(u.StrongMark,"**","**"),s(u.LinkMark,"[",function(e,t){return"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}),s(u.CodeMark,"`","`")},{"../format":22,"../model":38}],31:[function(e,t,r){"use strict";function n(e,t){var r=document.createElement("div");if(r.className=c,t.path){a[e]||o(e,t);var n=r.appendChild(document.createElementNS(u,"svg"));n.style.width=t.width/t.height+"em";var i=n.appendChild(document.createElementNS(u,"use"));i.setAttributeNS(l,"href","#pm-icon-"+e)}else r.appendChild(document.createElement("span")).textContent=t.text||"",t.css&&(r.firstChild.style.cssText=t.css);return r}function o(e,t){s||(s=document.createElementNS(u,"svg"),s.style.display="none",document.body.insertBefore(s,document.body.firstChild));var r=document.createElementNS(u,"symbol");r.id="pm-icon-"+e,r.setAttribute("viewBox","0 0 "+t.width+" "+t.height);var n=r.appendChild(document.createElementNS(u,"path"));n.setAttribute("d",t.path),s.appendChild(r),a[e]=!0}Object.defineProperty(r,"__esModule",{value:!0}),r.getIcon=n;var i=e("../dom"),s=null,a=Object.create(null),u="http://www.w3.org/2000/svg",l="http://www.w3.org/1999/xlink",c="ProseMirror-icon";(0,i.insertCSS)("\n."+c+" {\n  display: inline-block;\n  line-height: .8;\n  vertical-align: -2px; /* Compensate for padding */\n  padding: 2px 8px;\n  cursor: pointer;\n}\n\n."+c+" svg {\n  fill: currentColor;\n  height: 1em;\n}\n\n."+c+" span {\n  vertical-align: text-top;\n}")},{"../dom":3}],32:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!t.label)return null;var r=t.name&&e.keyForCommand(t.name);return r?t.label+" ("+r+")":t.label}function s(e,t){for(var r=[],n=0;n<e.length;n++){var o=e[n].render(t);o&&r.push((0,p.elt)("div",{"class":v+"-dropdown-item"},o))}return r.length||r.push((0,p.elt)("div",{"class":v+"-dropdown-empty"},"(empty)")),r}function a(e,t){for(var r=void 0,n=Array.isArray(t),o=0;o<(n?t.length:1);o++){var i=n?t[o]:t;if(i instanceof k){var s=i.get(e);if(!n||1==t.length)return s;r=(r||t.slice(0,o)).concat(s)}else r&&r.push(i)}return r||(n?t:[t])}function u(e,t){for(var r=document.createDocumentFragment(),n=!1,o=0;o<t.length;o++){for(var i=a(e,t[o]),s=!1,u=0;u<i.length;u++){var c=i[u].render(e);c&&(!s&&n&&r.appendChild(l()),r.appendChild((0,p.elt)("span",{"class":v+"item"},c)),s=!0)}s&&(n=!0)}return r}function l(){return(0,p.elt)("span",{"class":v+"separator"})}var c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.historyGroup=r.blockGroup=r.textblockMenu=r.insertMenu=r.inlineGroup=r.DropdownSubmenu=r.Dropdown=r.MenuCommandGroup=r.MenuCommand=void 0,r.resolveGroup=a,r.renderGrouped=u;var p=e("../dom"),f=e("../util/sortedinsert"),h=n(f),d=e("../util/obj"),m=e("../util/error"),g=e("./icons"),v="ProseMirror-menu",y=r.MenuCommand=function(){function e(t,r){o(this,e),this.command_=t,this.options=r}return c(e,[{key:"command",value:function(e){return"string"==typeof this.command_?e.commands[this.command_]:this.command_}},{key:"render",value:function(e){var t=this.command(e),r=!1;if(t){if("ignore"!=this.options.select&&!t.select(e)){if(null==this.options.select||"hide"==this.options.select)return null;"disable"==this.options.select&&(r=!0)}var n=this.options.display;n||m.AssertionError.raise("No display style defined for menu command "+t.name);var o=void 0;return n.render?o=n.render(t,e):"icon"==n.type?(o=(0,g.getIcon)(t.name,n),!r&&t.active(e)&&o.classList.add(v+"-active")):"label"==n.type?o=(0,p.elt)("div",null,n.label||t.spec.label):m.AssertionError.raise("Unsupported command display style: "+n.type),o.setAttribute("title",i(e,t)),this.options["class"]&&o.classList.add(this.options["class"]),r&&o.classList.add(v+"-disabled"),this.options.css&&(o.style.cssText+=this.options.css),o.addEventListener("mousedown",function(r){r.preventDefault(),r.stopPropagation(),e.signal("interaction"),t.exec(e,null,o)}),o}}}]),e}(),k=r.MenuCommandGroup=function(){function e(t,r){o(this,e),this.name=t,this.options=r}return c(e,[{key:"collect",value:function(e){var t=this,r=[];for(var n in e.commands){var o=e.commands[n],i=o.spec.menu;i&&i.group==this.name&&(0,h["default"])(r,{cmd:o,rank:null==i.rank?50:i.rank},function(e,t){return e.rank-t.rank})}return r.map(function(e){var r=e.cmd.spec.menu;return t.options&&(r=(0,d.copyObj)(t.options,(0,d.copyObj)(r))),new y(e.cmd,r)})}},{key:"get",value:function(e){var t=e.mod.menuGroups||this.startGroups(e);return t[this.name]||(t[this.name]=this.collect(e))}},{key:"startGroups",value:function(e){var t=function r(){e.mod.menuGroups=null,e.off("commandsChanging",r)};return e.on("commandsChanging",t),e.mod.menuGroups=Object.create(null)}}]),e}(),b=r.Dropdown=function(){function e(t,r){o(this,e),this.options=t||{},this.content=r}return c(e,[{key:"render",value:function(e){var t=this;if(0!=a(e,this.content).length){var r=this.options.activeLabel&&this.findActiveIn(this,e)||this.options.label,n=(0,p.elt)("div",{"class":v+"-dropdown "+(this.options["class"]||""),style:this.options.css,title:this.options.title},r),o=null;return n.addEventListener("mousedown",function(r){r.preventDefault(),r.stopPropagation(),o=o&&o()?null:t.expand(e,n)}),n}}},{key:"expand",value:function(e,t){function r(){return l?void 0:(l=!0,e.off("interaction",r),e.wrapper.removeChild(u),!0)}var n=s(a(e,this.content),e),o=t.getBoundingClientRect(),i=e.wrapper.getBoundingClientRect(),u=(0,p.elt)("div",{"class":v+"-dropdown-menu "+(this.options["class"]||""),style:"left: "+(o.left-i.left)+"px; top: "+(o.bottom-i.top)+"px"},n),l=!1;return e.signal("interaction"),e.wrapper.appendChild(u),e.on("interaction",r),r}},{key:"findActiveIn",value:function(e,t){for(var r=a(t,e.content),n=0;n<r.length;n++){var o=r[n];if(o instanceof y){var i=o.command(t).active(t);if(i)return o.options.activeLabel}else if(o instanceof w){var s=this.findActiveIn(o,t);if(s)return s}}}}]),e}(),w=r.DropdownSubmenu=function(){function e(t,r){o(this,e),this.options=t||{},this.content=r}return c(e,[{key:"render",value:function(e){var t=a(e,this.content);if(t.length){var r=(0,p.elt)("div",{"class":v+"-submenu-label"},this.options.label),n=(0,p.elt)("div",{"class":v+"-submenu-wrap"},r,(0,p.elt)("div",{"class":v+"-submenu"},s(t,e)));return r.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation(),n.classList.toggle(v+"-submenu-wrap-active")}),n}}}]),e}();r.inlineGroup=new k("inline"),r.insertMenu=new b({label:"Insert"},new k("insert")),r.textblockMenu=new b({label:"Type..",displayActive:!0,"class":"ProseMirror-textblock-dropdown"},[new k("textblock"),new w({label:"Heading"},new k("textblockHeading"))]),r.blockGroup=new k("block"),r.historyGroup=new k("history");(0,p.insertCSS)("\n\n.ProseMirror-textblock-dropdown {\n  min-width: 3em;\n}\n\n."+v+" {\n  margin: 0 -4px;\n  line-height: 1;\n}\n\n.ProseMirror-tooltip ."+v+" {\n  width: -webkit-fit-content;\n  width: fit-content;\n  white-space: pre;\n}\n\n."+v+"item {\n  margin-right: 3px;\n  display: inline-block;\n}\n\n."+v+"separator {\n  border-right: 1px solid #ddd;\n  margin-right: 3px;\n}\n\n."+v+"-dropdown, ."+v+"-dropdown-menu {\n  font-size: 90%;\n  white-space: nowrap;\n}\n\n."+v+"-dropdown {\n  padding: 1px 14px 1px 4px;\n  display: inline-block;\n  vertical-align: 1px;\n  position: relative;\n  cursor: pointer;\n}\n\n."+v+'-dropdown:after {\n  content: "";\n  border-left: 4px solid transparent;\n  border-right: 4px solid transparent;\n  border-top: 4px solid currentColor;\n  opacity: .6;\n  position: absolute;\n  right: 2px;\n  top: calc(50% - 2px);\n}\n\n.'+v+"-dropdown-menu, ."+v+"-submenu {\n  position: absolute;\n  background: white;\n  color: #666;\n  border: 1px solid #aaa;\n  padding: 2px;\n}\n\n."+v+"-dropdown-menu {\n  z-index: 15;\n  min-width: 6em;\n}\n\n."+v+"-dropdown-item {\n  cursor: pointer;\n  padding: 2px 8px 2px 4px;\n}\n\n."+v+"-dropdown-item:hover {\n  background: #f2f2f2;\n}\n\n."+v+"-dropdown-empty {\n  opacity: 0.4;\n}\n\n."+v+"-submenu-wrap {\n  position: relative;\n  margin-right: -4px;\n}\n\n."+v+'-submenu-label:after {\n  content: "";\n  border-top: 4px solid transparent;\n  border-bottom: 4px solid transparent;\n  border-left: 4px solid currentColor;\n  opacity: .6;\n  position: absolute;\n  right: 4px;\n  top: calc(50% - 4px);\n}\n\n.'+v+"-submenu {\n  display: none;\n  min-width: 4em;\n  left: 100%;\n  top: -3px;\n}\n\n."+v+"-active {\n  background: #eee;\n  border-radius: 4px;\n}\n\n."+v+"-active {\n  background: #eee;\n  border-radius: 4px;\n}\n\n."+v+"-disabled {\n  opacity: .3;\n}\n\n."+v+"-submenu-wrap:hover ."+v+"-submenu, ."+v+"-submenu-wrap-active ."+v+"-submenu {\n  display: block;\n}\n");
-},{"../dom":3,"../util/error":55,"../util/obj":58,"../util/sortedinsert":59,"./icons":31}],33:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){for(var t=e.parentNode;t;t=t.parentNode)if(t.scrollHeight>t.clientHeight)return t}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("../edit"),u=e("../dom"),l=e("../ui/update"),c=e("./menu"),p="ProseMirror-menubar";(0,a.defineOption)("menuBar",!1,function(e,t){e.mod.menuBar&&e.mod.menuBar.detach(),e.mod.menuBar=t?new h(e,t):null});var f=[c.inlineGroup,c.insertMenu,[c.textblockMenu,c.blockGroup],c.historyGroup],h=function(){function e(t,r){var o=this;n(this,e),this.pm=t,this.config=r||{},this.wrapper=t.wrapper.insertBefore((0,u.elt)("div",{"class":p}),t.wrapper.firstChild),this.spacer=null,this.maxHeight=0,this.widthForMaxHeight=0,this.updater=new l.UpdateScheduler(t,"selectionChange change activeMarkChange commandsChanged",function(){return o.update()}),this.content=r.content||f,this.updater.force(),this.floating=!1,this.config["float"]&&(this.updateFloat(),this.scrollFunc=function(){document.body.contains(o.pm.wrapper)?o.updateFloat():window.removeEventListener("scroll",o.scrollFunc)},window.addEventListener("scroll",this.scrollFunc))}return s(e,[{key:"detach",value:function(){this.updater.detach(),this.wrapper.parentNode.removeChild(this.wrapper),this.scrollFunc&&window.removeEventListener("scroll",this.scrollFunc)}},{key:"update",value:function(){var e=this;return this.wrapper.textContent="",this.wrapper.appendChild((0,c.renderGrouped)(this.pm,this.content)),this["float"]?this.updateScrollCursor():function(){return e.wrapper.offsetWidth!=e.widthForMaxHeight&&(e.widthForMaxHeight=e.wrapper.offsetWidth,e.maxHeight=0),e.wrapper.offsetHeight>e.maxHeight?(e.maxHeight=e.wrapper.offsetHeight,function(){e.wrapper.style.minHeight=e.maxHeight+"px"}):void 0}}},{key:"updateFloat",value:function(){var e=this.pm.wrapper.getBoundingClientRect();if(this.floating)if(e.top>=0||e.bottom<this.wrapper.offsetHeight+10)this.floating=!1,this.wrapper.style.position=this.wrapper.style.left=this.wrapper.style.width="",this.wrapper.style.display="",this.spacer.parentNode.removeChild(this.spacer),this.spacer=null;else{var t=(this.pm.wrapper.offsetWidth-this.pm.wrapper.clientWidth)/2;this.wrapper.style.left=e.left+t+"px",this.wrapper.style.display=e.top>window.innerHeight?"none":""}else if(e.top<0&&e.bottom>=this.wrapper.offsetHeight+10){this.floating=!0;var r=this.wrapper.getBoundingClientRect();this.wrapper.style.left=r.left+"px",this.wrapper.style.width=r.width+"px",this.wrapper.style.position="fixed",this.spacer=(0,u.elt)("div",{"class":p+"-spacer",style:"height: "+r.height+"px"}),this.pm.wrapper.insertBefore(this.spacer,this.wrapper)}}},{key:"updateScrollCursor",value:function(){var e=this;if(!this.floating)return null;var t=this.pm.selection.head;return t?function(){var r=e.pm.coordsAtPos(t),n=e.wrapper.getBoundingClientRect();if(r.top<n.bottom&&r.bottom>n.top){var s=function(){var t=o(e.pm.wrapper);return t?{v:function(){t.scrollTop-=n.bottom-r.top}}:void 0}();if("object"===("undefined"==typeof s?"undefined":i(s)))return s.v}}:null}}]),e}();(0,u.insertCSS)("\n."+p+" {\n  border-top-left-radius: inherit;\n  border-top-right-radius: inherit;\n  position: relative;\n  min-height: 1em;\n  color: #666;\n  padding: 1px 6px;\n  top: 0; left: 0; right: 0;\n  border-bottom: 1px solid silver;\n  background: white;\n  z-index: 10;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  overflow: visible;\n}\n")},{"../dom":3,"../edit":13,"../ui/update":54,"./menu":32}],34:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.defaultSchema=r.CodeMark=r.LinkMark=r.StrongMark=r.EmMark=r.HardBreak=r.Image=r.Paragraph=r.CodeBlock=r.Heading=r.HorizontalRule=r.ListItem=r.BulletList=r.OrderedList=r.BlockQuote=r.Doc=void 0;var a=e("./schema"),u=r.Doc=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,null,[{key:"kinds",get:function(){return"doc"}}]),t}(a.Block),l=r.BlockQuote=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(a.Block),c=r.OrderedList=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return"list_item"}},{key:"attrs",get:function(){return{order:new a.Attribute({"default":"1"})}}}]),t}(a.Block),p=r.BulletList=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return"list_item"}}]),t}(a.Block),f=r.ListItem=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,null,[{key:"kinds",get:function(){return"list_item"}}]),t}(a.Block),h=r.HorizontalRule=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return null}}]),t}(a.Block),d=r.Heading=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"attrs",get:function(){return{level:new a.Attribute({"default":"1"})}}},{key:"maxLevel",get:function(){return 6}}]),t}(a.Textblock),m=r.CodeBlock=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return"text"}},{key:"containsMarks",get:function(){return!1}},{key:"isCode",get:function(){return!0}}]),t}(a.Textblock),g=r.Paragraph=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"defaultTextblock",get:function(){return!0}}]),t}(a.Textblock),v=r.Image=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"attrs",get:function(){return{src:new a.Attribute,alt:new a.Attribute({"default":""}),title:new a.Attribute({"default":""})}}},{key:"draggable",get:function(){return!0}}]),t}(a.Inline),y=r.HardBreak=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"selectable",get:function(){return!1}},{key:"isBR",get:function(){return!0}}]),t}(a.Inline),k=r.EmMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,null,[{key:"rank",get:function(){return 51}}]),t}(a.MarkType),b=r.StrongMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,null,[{key:"rank",get:function(){return 52}}]),t}(a.MarkType),w=r.LinkMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"attrs",get:function(){return{href:new a.Attribute,title:new a.Attribute({"default":""})}}}],[{key:"rank",get:function(){return 25}}]),t}(a.MarkType),_=r.CodeMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"isCode",get:function(){return!0}}],[{key:"rank",get:function(){return 101}}]),t}(a.MarkType),x=new a.SchemaSpec({doc:u,blockquote:l,ordered_list:c,bullet_list:p,list_item:f,horizontal_rule:h,paragraph:g,heading:d,code_block:m,text:a.Text,image:v,hard_break:y},{em:k,strong:b,link:w,code:_});r.defaultSchema=new a.Schema(x)},{"./schema":42}],35:[function(e,t,r){"use strict";function n(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],o=e.iter(),s=t.iter(),a=0;;){if(o.atEnd()||s.atEnd()){if(e.size==t.size)return null;break}var u=o.next(),l=s.next();if(u!=l){if(!u.sameMarkup(l))break;if(u.isText&&u.text!=l.text){for(var c=0;u.text[c]==l.text[c];c++)a++;break}if(u.size||l.size){r.push(a);var p=n(u.content,l.content,r);if(p)return p;r.pop()}a+=u.width}else a+=u.width}return new i.Pos(r,a)}function o(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],n=arguments.length<=3||void 0===arguments[3]?[]:arguments[3],s=e.reverseIter(),a=t.reverseIter(),u=e.size,l=t.size;;){if(s.atEnd()||a.atEnd()){if(e.size==t.size)return null;break}var c=s.next(),p=a.next();if(c!=p){if(!c.sameMarkup(p))break;if(c.isText&&c.text!=p.text){for(var f=0,h=Math.min(c.text.length,p.text.length);h>f&&c.text[c.text.length-f-1]==p.text[p.text.length-f-1];)f++,u--,l--;break}if(u-=c.width,l-=p.width,c.size||p.size){r.push(u),n.push(l);var d=o(c.content,p.content,r,n);if(d)return d;r.pop(),n.pop()}}else u-=c.width,l-=p.width}return{a:new i.Pos(r,u),b:new i.Pos(n,l)}}Object.defineProperty(r,"__esModule",{value:!0}),r.findDiffStart=n,r.findDiffEnd=o;var i=e("./pos")},{"./pos":41}],36:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0}),r.ModelError=void 0;var s=e("../util/error");r.ModelError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(s.ProseMirrorError)},{"../util/error":55}],37:[function(e,t,r){"use strict";function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.emptyFragment=r.Fragment=void 0;var a=e("./error"),u=r.Fragment=function(){function e(){i(this,e)}return s(e,[{key:"append",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return this.size?e.size?this.appendInner(e,t,r):t?this.replace(this.size-1,this.lastChild.close(t-1,"end")):this:r?e.replace(0,e.firstChild.close(r-1,"start")):e}},{key:"toString",value:function(){var e="";return this.forEach(function(t){return e+=(e?", ":"")+t.toString()}),e}},{key:"toArray",value:function(){for(var e,t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1],n=arguments[2],o=[],i=this.iter(t,r);e=i.next().value;)o.push(n?n(e):e);return o}},{key:"map",value:function(t){return e.fromArray(this.toArray(void 0,void 0,t))}},{key:"some",value:function(e){for(var t,r=this.iter();t=r.next().value;)if(e(t))return t}},{key:"close",value:function(e,t){var r="start"==t?this.firstChild:this.lastChild,n=r.close(e-1,t);return n==r?this:this.replace("start"==t?0:this.size-1,n)}},{key:"nodesBetween",value:function(e,t,r,n,o){for(var i,s=e&&e.depth>n.length,a=t&&t.depth>n.length,u=s?e.path[n.length]:e?e.offset:0,l=a?t.path[n.length]+1:t?t.offset:this.size,c=this.iter(u,l);i=c.next().value;){var p=c.offset-i.width;n.push(p),i.nodesBetween(s&&p==u?e:null,a&&c.offset==l?t:null,r,n,o),n.pop()}}},{key:"sliceBetween",value:function(e,t){for(var r,n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=e&&e.depth>n,i=t&&t.depth>n,s=o?e.path[n]:e?e.offset:0,a=i?t.path[n]+1:t?t.offset:this.size,u=[],l=this.iter(s,a);r=l.next().value;){var c=o&&l.offset-r.width==s?e:null,p=i&&l.offset==a?t:null;(c||p)&&(r=r.sliceBetween(c,p,n+1)),u.push(r)}return new this.constructor(u)}},{key:"textContent",get:function(){var e="";return this.forEach(function(t){return e+=t.textContent}),e}}],[{key:"fromJSON",value:function(e,t){return t?this.fromArray(t.map(e.nodeFromJSON)):h}},{key:"fromArray",value:function(e){if(!e.length)return h;for(var t=!1,r=void 0,n=0;n<e.length;n++){var o=e[n];o.isText&&(t=!0,n&&e[n-1].sameMarkup(o))?(r||(r=e.slice(0,n)),r[r.length-1]=o.copy(r[r.length-1].text+o.text)):r&&r.push(o)}return t?new g(r||e):new f(e)}},{key:"from",value:function(t){return t?t instanceof e?t:this.fromArray(Array.isArray(t)?t:[t]):h}}]),e}(),l={done:!0},c=function(){function e(t,r,n){i(this,e),this.array=t,this.pos=r,this.end=n}return s(e,[{key:"copy",value:function(){return new this.constructor(this.array,this.pos,this.end)}},{key:"atEnd",value:function(){return this.pos==this.end}},{key:"next",value:function(){return this.pos==this.end?l:this.array[this.pos++]}},{key:"offset",get:function(){return this.pos}}]),e}(),p=function(e){function t(){return i(this,t),n(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),s(t,[{key:"next",value:function(){return this.pos==this.end?l:this.array[--this.pos]}}]),t}(c),f=function(e){function t(e){i(this,t);var r=n(this,Object.getPrototypeOf(t).call(this));return r.content=e,r}return o(t,e),s(t,[{key:"iter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return new c(this.content,e,t)}},{key:"reverseIter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.size:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return new p(this.content,e,t)}},{key:"child",value:function(e){return(0>e||e>=this.content.length)&&a.ModelError.raise("Offset "+e+" out of range"),this.content[e]}},{key:"forEach",value:function(e){for(var t=0;t<this.content.length;t++)e(this.content[t],t,t+1)}},{key:"chunkBefore",value:function(e){return{node:this.child(e-1),start:e-1}}},{key:"chunkAfter",value:function(e){return{node:this.child(e),start:e}}},{key:"slice",value:function(e){var r=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return e==r?h:new t(this.content.slice(e,r))}},{key:"replace",value:function(e,r){r.isText&&a.ModelError.raise("Argument to replace should be a non-text node");var n=this.content.slice();return n[e]=r,new t(n)}},{key:"appendInner",value:function(e,t,r){var n=this.content.length-1,o=this.content.slice(0,n),i=this.content[n],s=e.firstChild;return t>0&&r>0&&i.sameMarkup(s)?o.push(i.append(s.content,t-1,r-1)):o.push(i.close(t-1,"end"),s.close(r-1,"start")),u.fromArray(o.concat(e.toArray(s.width)))}},{key:"toJSON",value:function(){return this.content.map(function(e){return e.toJSON()})}},{key:"size",get:function(){return this.content.length}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}}]),t}(u),h=r.emptyFragment=new f([]),d=function(){function e(t,r,n){var o=arguments.length<=3||void 0===arguments[3]?-1:arguments[3];i(this,e),this.frag=t,this.offset=r,this.pos=o,this.endOffset=n}return s(e,[{key:"copy",value:function(){return new this.constructor(this.frag,this.offset,this.endOffset,this.pos)}},{key:"atEnd",value:function(){return this.offset==this.endOffset}},{key:"next",value:function(){if(-1==this.pos){var e=this.init();if(e)return e}return this.offset==this.endOffset?l:this.advance()}},{key:"advance",value:function(){var e=this.frag.content[this.pos++],t=this.offset+e.width;return t>this.endOffset?(e=e.copy(e.text.slice(0,this.endOffset-this.offset)),this.offset=this.endOffset,e):(this.offset=t,e)}},{key:"init",value:function(){this.pos=0;for(var e=0;e<this.offset;){var t=this.frag.content[this.pos++],r=e+t.width;if(r==this.offset)break;if(r>this.offset){var n=t.width;return r>this.endOffset&&(n=this.endOffset-e,r=this.endOffset),t=t.copy(t.text.slice(this.offset-e,n)),this.offset=r,t}e=r}}}]),e}(),m=function(e){function t(){return i(this,t),n(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),s(t,[{key:"advance",value:function(){var e=this.frag.content[--this.pos],t=this.offset-e.width;return t<this.endOffset?(e=e.copy(e.text.slice(this.endOffset-t)),this.offset=this.endOffset,e):(this.offset=t,e)}},{key:"init",value:function(){this.pos=this.frag.content.length;for(var e=this.frag.size;e>this.offset;){var t=this.frag.content[--this.pos],r=e-t.width;if(r==this.offset)break;if(r<this.offset)return r<this.endOffset?(t=t.copy(t.text.slice(this.endOffset-r,this.offset-r)),r=this.endOffset):t=t.copy(t.text.slice(0,this.offset-r)),this.offset=r,t;e=r}}}]),t}(d),g=function(e){function t(e,r){i(this,t);var o=n(this,Object.getPrototypeOf(t).call(this));if(o.content=e,o.size=r||0,null==r)for(var s=0;s<e.length;s++)o.size+=e[s].width;return o}return o(t,e),s(t,[{key:"iter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return new d(this,e,t)}},{key:"reverseIter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.size:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return new m(this,e,t)}},{key:"child",value:function r(e){(0>e||e>=this.size)&&a.ModelError.raise("Offset "+e+" out of range");for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];if(n+=r.width,n>e)return r}}},{key:"forEach",value:function(e){for(var t=0,r=0;t<this.content.length;t++){var n=this.content[t];e(n,r,r+=n.width)}}},{key:"chunkBefore",value:function(e){e||a.ModelError.raise("No chunk before start of node");for(var t=0,r=0;t<this.content.length;t++){var n=this.content[t],o=r+n.width;if(o>=e)return{node:n,start:r};r=o}}},{key:"chunkAfter",value:function(e){e==this.size&&a.ModelError.raise("No chunk after end of node");for(var t=0,r=0;t<this.content.length;t++){var n=this.content[t],o=r+n.width;if(o>e)return{node:n,start:r};r=o}}},{key:"slice",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return e==r?h:new t(this.toArray(e,r))}},{key:"replace",value:function(e,r){r.isText&&a.ModelError.raise("Argument to replace should be a non-text node");for(var n=void 0,o=void 0,i=0;e>i;o++)n=this.content[o],i+=n.width;n.isText&&a.ModelError.raise("Can not replace text content with replace method");var s=this.content.slice();return s[o]=r,new t(s)}},{key:"appendInner",value:function(e,t,r){var n=this.content.length-1,o=this.content.slice(0,n),i=this.content[n],s=e.firstChild,a=i.sameMarkup(s);return a&&i.isText?o.push(i.copy(i.text+s.text)):a&&t>0&&r>0?o.push(i.append(s.content,t-1,r-1)):o.push(i.close(t-1,"end"),s.close(r-1,"start")),u.fromArray(o.concat(e.toArray(s.width)))}},{key:"toJSON",value:function(){return this.content.map(function(e){return e.toJSON()})}},{key:"firstChild",get:function(){return this.size?this.content[0]:null}},{key:"lastChild",get:function(){return this.size?this.content[this.content.length-1]:null}}]),t}(u);"undefined"!=typeof Symbol&&(u.prototype[Symbol.iterator]=function(){return this.iter()},c.prototype[Symbol.iterator]=d.prototype[Symbol.iterator]=function(){return this})},{"./error":36}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./node");Object.defineProperty(r,"Node",{enumerable:!0,get:function(){return n.Node}});var o=e("./fragment");Object.defineProperty(r,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(r,"emptyFragment",{enumerable:!0,get:function(){return o.emptyFragment}});var i=e("./mark");Object.defineProperty(r,"Mark",{enumerable:!0,get:function(){return i.Mark}});var s=e("./schema");Object.defineProperty(r,"SchemaSpec",{enumerable:!0,get:function(){return s.SchemaSpec}}),Object.defineProperty(r,"Schema",{enumerable:!0,get:function(){return s.Schema}}),Object.defineProperty(r,"SchemaError",{enumerable:!0,get:function(){return s.SchemaError}}),Object.defineProperty(r,"NodeType",{enumerable:!0,get:function(){return s.NodeType}}),Object.defineProperty(r,"Block",{enumerable:!0,get:function(){return s.Block}}),Object.defineProperty(r,"Textblock",{enumerable:!0,get:function(){return s.Textblock}}),Object.defineProperty(r,"Inline",{enumerable:!0,get:function(){return s.Inline}}),Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return s.Text}}),Object.defineProperty(r,"MarkType",{enumerable:!0,get:function(){return s.MarkType}}),Object.defineProperty(r,"Attribute",{enumerable:!0,get:function(){return s.Attribute}});var a=e("./defaultschema");Object.defineProperty(r,"defaultSchema",{enumerable:!0,get:function(){return a.defaultSchema}}),Object.defineProperty(r,"Doc",{enumerable:!0,get:function(){return a.Doc}}),Object.defineProperty(r,"BlockQuote",{enumerable:!0,get:function(){return a.BlockQuote}}),Object.defineProperty(r,"OrderedList",{enumerable:!0,get:function(){return a.OrderedList}}),Object.defineProperty(r,"BulletList",{enumerable:!0,get:function(){return a.BulletList}}),Object.defineProperty(r,"ListItem",{enumerable:!0,get:function(){return a.ListItem}}),Object.defineProperty(r,"HorizontalRule",{enumerable:!0,get:function(){return a.HorizontalRule}}),Object.defineProperty(r,"Paragraph",{enumerable:!0,get:function(){return a.Paragraph}}),Object.defineProperty(r,"Heading",{enumerable:!0,get:function(){return a.Heading}}),Object.defineProperty(r,"CodeBlock",{enumerable:!0,get:function(){return a.CodeBlock}}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return a.Image}}),Object.defineProperty(r,"HardBreak",{enumerable:!0,get:function(){return a.HardBreak}}),Object.defineProperty(r,"CodeMark",{enumerable:!0,get:function(){return a.CodeMark}}),Object.defineProperty(r,"EmMark",{enumerable:!0,get:function(){return a.EmMark}}),Object.defineProperty(r,"StrongMark",{enumerable:!0,get:function(){return a.StrongMark}}),Object.defineProperty(r,"LinkMark",{enumerable:!0,get:function(){return a.LinkMark}});var u=e("./pos");Object.defineProperty(r,"Pos",{enumerable:!0,get:function(){return u.Pos}});var l=e("./diff");Object.defineProperty(r,"findDiffStart",{enumerable:!0,get:function(){return l.findDiffStart}}),Object.defineProperty(r,"findDiffEnd",{enumerable:!0,get:function(){return l.findDiffEnd}});var c=e("./error");Object.defineProperty(r,"ModelError",{enumerable:!0,get:function(){return c.ModelError}})},{"./defaultschema":34,"./diff":35,"./error":36,"./fragment":37,"./mark":39,"./node":40,"./pos":41,"./schema":42}],39:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0});var i=(r.Mark=function(){function e(t,r){n(this,e),this.type=t,this.attrs=r}return o(e,[{key:"toJSON",value:function(){var e={_:this.type.name};for(var t in this.attrs)e[t]=this.attrs[t];return e}},{key:"addToSet",value:function(e){for(var t=0;t<e.length;t++){var r=e[t];if(r.type==this.type)return this.eq(r)?e:e.slice(0,t).concat(this).concat(e.slice(t+1));if(r.type.rank>this.type.rank)return e.slice(0,t).concat(this).concat(e.slice(t))}return e.concat(this)}},{key:"removeFromSet",value: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}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){if(this==e)return!0;if(this.type!=e.type)return!1;for(var t in this.attrs)if(e.attrs[t]!=this.attrs[t])return!1;return!0}}],[{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||0==t.length)return i;if(t instanceof e)return[t];var r=t.slice();return r.sort(function(e,t){return e.type.rank-t.type.rank}),r}}]),e}(),[])},{}],40:[function(e,t,r){"use strict";function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}var a=function m(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:m(o,t,r)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(r)},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.TextNode=r.Node=void 0;var l=e("./fragment"),c=e("./mark"),p=e("./pos"),f=[],h=Object.create(null),d=function(){function e(t,r,n,o){i(this,e),this.type=t,this.attrs=r,this.content=n||l.emptyFragment,this.marks=o||f}return u(e,[{key:"child",value:function(e){return this.content.child(e)}},{key:"iter",value:function(e,t){return this.content.iter(e,t)}},{key:"reverseIter",value:function(e,t){return this.content.reverseIter(e,t)}},{key:"chunkBefore",value:function(e){return this.content.chunkBefore(e)}},{key:"chunkAfter",value:function(e){return this.content.chunkAfter(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(t,r,n){return this.type==t&&e.sameAttrs(this.attrs,r||h)&&c.Mark.sameSet(this.marks,n||f)}},{key:"copy",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];return new this.constructor(this.type,this.attrs,e,this.marks)}},{key:"mark",value:function(e){return new this.constructor(this.type,this.attrs,this.content,e)}},{key:"slice",value:function(e,t){return this.copy(this.content.slice(e,t))}},{key:"splice",value:function(e,t,r){return this.copy(this.content.slice(0,e).append(r).append(this.content.slice(t)))}},{key:"append",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return this.copy(this.content.append(e,t,r))}},{key:"replace",value:function(e,t){return this.copy(this.content.replace(e,t))}},{key:"replaceDeep",value:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(r==e.length)return t;var n=e[r];return this.replace(n,this.child(n).replaceDeep(e,t,r+1))}},{key:"close",value:function(e,t){if(0==e&&0==this.size&&!this.type.canBeEmpty)return this.copy(this.type.defaultContent());var r=void 0;return e>0&&(r=this.content.close(e-1,t))!=this.content?this.copy(r):this}},{key:"path",value:function(e){for(var t=0,r=this;t<e.length;r=r.child(e[t]),t++);return r}},{key:"nodeAfter",value:function(e){var t=this.path(e.path);return e.offset<t.size?t.child(e.offset):null}},{key:"pathNodes",value:function(e){for(var t=[],r=0,n=this;t.push(n),r!=e.length;r++)n=n.child(e[r]);return t}},{key:"siblingRange",value:function(e,t){for(var r=0,n=this;;r++){if(n.isTextblock){var o=e.path.slice(0,r-1),i=e.path[r-1];return{from:new p.Pos(o,i),to:new p.Pos(o,i+1)}}var s=r==e.path.length,a=r==t.path.length,u=s?e.offset:e.path[r],l=a?t.offset:t.path[r];if(s||a||u!=l){var o=e.path.slice(0,r);return{from:new p.Pos(o,u),to:new p.Pos(o,l+(a?0:1))}}n=n.child(u)}}},{key:"nodesBetween",value:function(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?[]:arguments[3],o=arguments.length<=4||void 0===arguments[4]?null:arguments[4];r(this,n,o)!==!1&&this.content.nodesBetween(e,t,r,n,this)}},{key:"inlineNodesBetween",value:function(e,t,r){this.nodesBetween(e,t,function(e,t,n){if(e.isInline){var o=t.length-1;r(e,t.slice(0,o),t[o],t[o]+e.width,n)}})}},{key:"sliceBetween",value:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return this.copy(this.content.sliceBetween(e,t,r))}},{key:"marksAt",value:function(e){var t=this.path(e.path);return t.isTextblock&&t.size?t.chunkBefore(e.offset||1).node.marks:f}},{key:"rangeHasMark",value:function(e,t,r){var n=!1;return this.nodesBetween(e,t,function(e){r.isInSet(e.marks)&&(n=!0)}),n}},{key:"toString",value:function(){var e=this.type.name;return this.content.size&&(e+="("+this.content.toString()+")"),s(this.marks,e)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(function(e){return e.toJSON()})),e}},{key:"size",get:function(){return this.content.size}},{key:"width",get:function(){return 1}},{key:"textContent",get:function(){return this.content.textContent}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"value",get:function(){return this}}],[{key:"sameAttrs",value:function(e,t){if(e==t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0}},{key:"fromJSON",value:function(e,t){var r=e.nodeType(t.type),n=null!=t.text?t.text:l.Fragment.fromJSON(e,t.content);return r.create(t.attrs,n,t.marks&&t.marks.map(e.markFromJSON))}}]),e}();r.Node=d,"undefined"!=typeof Symbol&&(d.prototype[Symbol.iterator]=function(){return this.iter()});r.TextNode=function(e){function t(e,r,o,s){i(this,t);var a=n(this,Object.getPrototypeOf(t).call(this,e,r,null,s));
-return a.text=o,a}return o(t,e),u(t,[{key:"toString",value:function(){return s(this.marks,JSON.stringify(this.text))}},{key:"mark",value:function(e){return new t(this.type,this.attrs,this.text,e)}},{key:"toJSON",value:function(){var e=a(Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.text=this.text,e}},{key:"textContent",get:function(){return this.text}},{key:"width",get:function(){return this.text.length}}]),t}(d)},{"./fragment":37,"./mark":39,"./pos":41}],41:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Pos=void 0;var i=e("./error");r.Pos=function(){function e(t,r){n(this,e),this.path=t,this.offset=r}return o(e,[{key:"toString",value:function(){return this.path.join("/")+":"+this.offset}},{key:"max",value:function(e){return this.cmp(e)>0?this:e}},{key:"min",value:function(e){return this.cmp(e)<0?this:e}},{key:"cmp",value:function(t){return t==this?0:e.cmp(this.path,this.offset,t.path,t.offset)}},{key:"shorten",value:function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(t>=this.depth){if(t==this.depth&&!r)return new e(this.path,this.offset+r);i.ModelError.raise("Invalid shorten depth "+t+" for "+this)}return e.shorten(this.path,t,r)}},{key:"move",value:function(t){return new e(this.path,this.offset+t)}},{key:"toPath",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return this.path.concat(this.offset+e)}},{key:"extend",value:function(t){for(var r=this.path.slice(),n=this.offset,o=0;o<t.path.length;o++)r.push(t.path[o]+n),n=0;return new e(r,t.offset+n)}},{key:"isValid",value:function(e,t){for(var r=0,n=e;;r++){if(r==this.path.length)return t&&!n.isTextblock?!1:this.offset<=n.size;var o=this.path[r];if(o>=n.size)return!1;n=n.child(o)}}},{key:"toJSON",value:function(){return this}},{key:"depth",get:function(){return this.path.length}}],[{key:"cmp",value:function(e,t,r,n){for(var o=e.length,i=r.length,s=0,a=Math.min(o,i);a>s;s++){var u=e[s]-r[s];if(0!=u)return u}return o>i?n<=e[s]?1:-1:i>o?t<=r[s]?-1:1:t-n}},{key:"samePath",value:function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}},{key:"shorten",value:function(t){var r=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return null==r&&(r=t.length-1),new e(t.slice(0,r),t[r]+n)}},{key:"from",value:function(t){var r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return t.length||i.ModelError.raise("Can't create a pos from an empty array"),new e(t.slice(0,t.length-1),t[t.length-1]+r)}},{key:"fromJSON",value:function(t){return new e(t.path,t.offset)}}]),e}()},{"./error":36}],42:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var r=(0,f.copyObj)(e);for(var n in t){var o=t[n];null==o?delete r[n]:r[n]=o}return r}var a=function w(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:w(o,t,r)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(r)},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Schema=r.SchemaSpec=r.MarkType=r.Attribute=r.Text=r.Inline=r.Textblock=r.Block=r.NodeType=r.SchemaError=void 0;var l=e("./node"),c=e("./fragment"),p=e("./mark"),f=e("../util/obj"),h=e("../util/error"),d=r.SchemaError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(h.ProseMirrorError),m=function(){function e(){n(this,e)}return u(e,[{key:"getDefaultAttrs",value:function(){var e=Object.create(null);for(var t in this.attrs){var r=this.attrs[t];if(null==r["default"])return null;e[t]=r["default"]}return e}},{key:"computeAttrs",value:function(e,t){var r=Object.create(null);for(var n in this.attrs){var o=e&&e[n];if(null==o){var i=this.attrs[n];null!=i["default"]?o=i["default"]:i.compute?o=i.compute(this,t):d.raise("No value supplied for attribute "+n)}r[n]=o}return r}},{key:"freezeAttrs",value:function(){var e=Object.create(null);for(var t in this.attrs)e[t]=this.attrs[t];Object.defineProperty(this,"attrs",{value:e})}},{key:"attrs",get:function(){return{}}}],[{key:"updateAttrs",value:function(e){Object.defineProperty(this.prototype,"attrs",{value:s(this.prototype.attrs,e)})}},{key:"getRegistry",value:function(){return this==e?null:(this.prototype.hasOwnProperty("registry")||(this.prototype.registry=Object.create(Object.getPrototypeOf(this).getRegistry())),this.prototype.registry)}},{key:"getNamespace",value:function(t){if(this==e)return null;var r=this.getRegistry();return Object.prototype.hasOwnProperty.call(r,t)||(r[t]=Object.create(Object.getPrototypeOf(this).getNamespace(t))),r[t]}},{key:"register",value:function(e,t,r){this.getNamespace(e)[t]=function(){return r}}},{key:"registerComputed",value:function(e,t,r){this.getNamespace(e)[t]=r}},{key:"cleanNamespace",value:function(e){this.getNamespace(e).__proto__=null}}]),e}(),g=r.NodeType=function(e){function t(e,r,i){n(this,t);var s=o(this,Object.getPrototypeOf(t).call(this));return s.name=e,s.kind=r,s.freezeAttrs(),s.defaultAttrs=s.getDefaultAttrs(),s.schema=i,s}return i(t,e),u(t,[{key:"canContainFragment",value:function(e){var t=this,r=!0;return e.forEach(function(e){t.canContain(e)||(r=!1)}),r}},{key:"canContain",value:function(e){if(!this.canContainType(e.type))return!1;for(var t=0;t<e.marks.length;t++)if(!this.canContainMark(e.marks[t]))return!1;return!0}},{key:"canContainMark",value:function(e){var t=this.containsMarks;if(t===!0)return!0;if(t)for(var r=0;r<t.length;r++)if(t[r]==e.name)return!0;return!1}},{key:"canContainType",value:function(e){return this.schema.subKind(e.kind,this.contains)}},{key:"canContainContent",value:function(e){return this.schema.subKind(e.contains,this.contains)}},{key:"findConnection",value:function(e){if(this.canContainType(e))return[];for(var t=Object.create(null),r=[{from:this,via:[]}];r.length;){var n=r.shift();for(var o in this.schema.nodes){var i=this.schema.nodes[o];if(i.defaultAttrs&&!(i.contains in t)&&n.from.canContainType(i)){var s=n.via.concat(i);if(i.canContainType(e))return s;r.push({from:i,via:s}),t[i.contains]=!0}}}}},{key:"computeAttrs",value:function(e,r){return!e&&this.defaultAttrs?this.defaultAttrs:a(Object.getPrototypeOf(t.prototype),"computeAttrs",this).call(this,e,r)}},{key:"create",value:function(e,t,r){return new l.Node(this,this.computeAttrs(e,t),c.Fragment.from(t),p.Mark.setFrom(r))}},{key:"createAutoFill",value:function(e,t,r){return t&&0!=t.length||this.canBeEmpty||(t=this.defaultContent()),this.create(e,t,r)}},{key:"isBlock",get:function(){return!1}},{key:"isTextblock",get:function(){return!1}},{key:"isInline",get:function(){return!1}},{key:"isText",get:function(){return!1}},{key:"selectable",get:function(){return!0}},{key:"draggable",get:function(){return!1}},{key:"locked",get:function(){return!1}},{key:"contains",get:function(){return null}},{key:"canBeEmpty",get:function(){return!0}},{key:"containsMarks",get:function(){return!1}}],[{key:"compile",value:function(e,t){var r=Object.create(null);for(var n in e){for(var o=e[n],i=o.kinds.split(" "),s=0;s<i.length;s++)t.registerKind(i[s],s?i[s-1]:null);r[n]=new o(n,i[i.length-1],t)}for(var n in r){var a=r[n].contains;!a||a in t.kinds||d.raise("Node type "+n+" is specified to contain non-existing kind "+a)}return r.doc||d.raise("Every schema needs a 'doc' type"),r.text||d.raise("Every schema needs a 'text' type"),r}},{key:"kinds",get:function(){return"node"}}]),t}(m),v=r.Block=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"defaultContent",value:function(){var e=this.schema.defaultTextblockType().create(),t=this.findConnection(e.type);t||d.raise("Can't create default content for "+this.name);for(var r=t.length-1;r>=0;r--)e=t[r].create(null,e);return c.Fragment.from(e)}},{key:"contains",get:function(){return"block"}},{key:"isBlock",get:function(){return!0}},{key:"canBeEmpty",get:function(){return null==this.contains}}],[{key:"kinds",get:function(){return"block"}}]),t}(g),y=(r.Textblock=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"contains",get:function(){return"inline"}},{key:"containsMarks",get:function(){return!0}},{key:"isTextblock",get:function(){return!0}},{key:"canBeEmpty",get:function(){return!0}}]),t}(v),r.Inline=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"isInline",get:function(){return!0}}],[{key:"kinds",get:function(){return"inline"}}]),t}(g)),k=(r.Text=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"create",value:function(e,t,r){return new l.TextNode(this,this.computeAttrs(e,t),t,r)}},{key:"selectable",get:function(){return!1}},{key:"isText",get:function(){return!0}}],[{key:"kinds",get:function(){return a(Object.getPrototypeOf(t),"kinds",this)+" text"}}]),t}(y),r.Attribute=function _(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n(this,_),this["default"]=e["default"],this.compute=e.compute,this.label=e.label},r.MarkType=function(e){function t(e,r,i){n(this,t);var s=o(this,Object.getPrototypeOf(t).call(this));s.name=e,s.freezeAttrs(),s.rank=r,s.schema=i;var a=s.getDefaultAttrs();return s.instance=a&&new p.Mark(s,a),s}return i(t,e),u(t,[{key:"create",value:function(e){return!e&&this.instance?this.instance:new p.Mark(this,this.computeAttrs(e))}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}}],[{key:"getOrder",value:function(e){var t=[];for(var r in e)t.push({name:r,rank:e[r].rank});t.sort(function(e,t){return e.rank-t.rank});for(var n=Object.create(null),o=0;o<t.length;o++)n[t[o].name]=o;return n}},{key:"compile",value:function(e,t){var r=this.getOrder(e),n=Object.create(null);for(var o in e)n[o]=new e[o](o,r[o],t);return n}},{key:"rank",get:function(){return 50}}]),t}(m)),b=(r.SchemaSpec=function(){function e(t,r){n(this,e),this.nodes=t||{},this.marks=r||{}}return u(e,[{key:"update",value:function(t,r){return new e(t?s(this.nodes,t):this.nodes,r?s(this.marks,r):this.marks)}}]),e}(),function(){function e(t){n(this,e),this.spec=t,this.kinds=Object.create(null),this.nodes=g.compile(t.nodes,this),this.marks=k.compile(t.marks,this);for(var r in this.nodes)r in this.marks&&d.raise(r+" can not be both a node and a mark");this.cached=Object.create(null),this.node=this.node.bind(this),this.text=this.text.bind(this),this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this)}return u(e,[{key:"node",value:function(e,t,r,n){return"string"==typeof e?e=this.nodeType(e):e instanceof g?e.schema!=this&&d.raise("Node type from different schema used ("+e.name+")"):d.raise("Invalid node type: "+e),e.create(t,r,n)}},{key:"text",value:function(e,t){return this.nodes.text.create(null,e,p.Mark.setFrom(t))}},{key:"defaultTextblockType",value:function(){var e=this.cached.defaultTextblockType;if(void 0!==e)return e;for(var t in this.nodes)if(this.nodes[t].defaultTextblock)return this.cached.defaultTextblockType=this.nodes[t];return this.cached.defaultTextblockType=null}},{key:"mark",value:function(e,t){var r=this.marks[e]||d.raise("No mark named "+e);return r.create(t)}},{key:"nodeFromJSON",value:function(e){return l.Node.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){var t=this.marks[e._],r=null;for(var n in e)"_"!=n&&(r||(r=Object.create(null)),r[n]=e[n]);return r?t.create(r):t.instance}},{key:"nodeType",value:function(e){return this.nodes[e]||d.raise("Unknown node type: "+e)}},{key:"registerKind",value:function(e,t){if(e in this.kinds){if(this.kinds[e]==t)return;d.raise("Inconsistent superkinds for kind "+e+": "+t+" and "+this.kinds[e])}this.subKind(e,t)&&d.raise("Conflicting kind hierarchy through "+e+" and "+t),this.kinds[e]=t}},{key:"subKind",value:function(e,t){for(;;){if(e==t)return!0;if(e=this.kinds[e],!e)return!1}}},{key:"registry",value:function t(e,r){for(var n=0;2>n;n++){var o=n?this.marks:this.nodes;for(var i in o){var s=o[i],t=s.registry,a=t&&t[e];if(a)for(var u in a){var l=a[u](s);null!=l&&r(u,l,s,i)}}}}}]),e}());r.Schema=b},{"../util/error":55,"../util/obj":58,"./fragment":37,"./mark":39,"./node":40}],43:[function(e,t,r){"use strict";function n(e,t){for(var r=[e.path(t.from.path)],n=!1;;){for(var o=-1,i=function(e,n){r.some(function(t){return!e.type.canContainContent(t.type)})||(o=n),e=e.child(t.from.path[n]),s=e},s=e,a=0;a<t.from.path.length;a++)i(s,a);if(o>-1)return{path:t.from.path.slice(0,o),unwrap:n};if(n||!r[0].isBlock)return null;r=r[0].content.slice(t.from.offset,t.to.offset),n=!0}}function o(e,t,r){var o=e.siblingRange(t,r||t),i=n(e,o);return i?{found:i,range:o}:void 0}function i(e,t,r,n){var o=e.siblingRange(t,r||t);if(o.from.offset==o.to.offset)return null;var i=e.path(o.from.path),s=i.type.findConnection(n),a=n.findConnection(i.child(o.from.offset).type);return s&&a?{range:o,around:s,inside:a}:void 0}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0}),r.canLift=o,r.canWrap=i;var a=e("../model"),u=e("./transform"),l=e("./step"),c=e("./tree"),p=e("./map");l.Step.define("ancestor",{apply:function(e,t){var r=t.from,n=t.to;if(!(0,c.isFlatRange)(r,n))return null;for(var o=r.path,i=r.offset,u=n.offset,f=t.param,h=f.depth,d=void 0===h?0:h,m=f.types,g=void 0===m?[]:m,v=f.attrs,y=void 0===v?[]:v,k=e.path(r.path),b=0;d>b;b++){if(i>0||u<e.path(o).size||0==o.length)return null;i=o[o.length-1],u=i+1,o=o.slice(0,o.length-1)}if(0==d&&0==g.length)return null;var w=e.path(o),_=w.size,x=void 0;if(w.type.locked)return null;if(g.length){var C=function(){var e=g[g.length-1],t=k.content.slice(r.offset,n.offset);if(!w.type.canContainType(g[0])||t.some(function(t){return!e.canContain(t)})||!k.size&&!e.canBeEmpty||e.locked)return{v:null};for(var o=null,s=g.length-1;s>=0;s--)o=g[s].create(y[s],o||t);x=w.splice(i,u,a.Fragment.from(o))}();if("object"===("undefined"==typeof C?"undefined":s(C)))return C.v}else{if(!w.type.canContainFragment(k.content)||!k.size&&0==i&&u==w.size&&!w.type.canBeEmpty)return null;x=w.splice(i,u,k.content)}for(var M=e.replaceDeep(o,x),S=o.slice(),b=0;b<g.length;b++)S.push(b?0:i);var A=new a.Pos(S,g.length?0:i),O=null,P=g.length?1:n.offset-r.offset;if(d!=g.length||d>1||g.length>1){var T=new a.Pos(o,i),E=new a.Pos(o,u),D=new a.Pos(o,i+P),j=new a.Pos(S,A.offset+(n.offset-r.offset));O=[new p.ReplacedRange(T,r,T,A),new p.ReplacedRange(n,E,j,D,E,D)]}var q=[new p.MovedRange(r,n.offset-r.offset,A)];return u-i!=P&&q.push(new p.MovedRange(new a.Pos(o,u),_-u,new a.Pos(o,i+P))),new l.StepResult(M,new p.PosMap(q,O))},invert:function(e,t,r){var n=[],o=[];if(e.param.depth)for(var i=0;i<e.param.depth;i++){var s=t.path(e.from.path.slice(0,e.from.path.length-i));n.unshift(s.type),o.unshift(s.attrs)}var a=r.map(e.from).pos,u=e.from.cmp(e.to)?r.map(e.to,-1).pos:a;return new l.Step("ancestor",a,u,null,{depth:e.param.types?e.param.types.length:0,types:n,attrs:o})},paramToJSON:function(e){return{depth:e.depth,types:e.types&&e.types.map(function(e){return e.name}),attrs:e.attrs}},paramFromJSON:function(e,t){return{depth:t.depth,types:t.types&&t.types.map(function(t){return e.nodeType(t)}),attrs:t.attrs}}}),u.Transform.prototype.lift=function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1],r=o(this.doc,e,t);if(!r)return this;for(var n=r.found,i=r.range,s=i.from.path.length-n.path.length,u=n.unwrap&&this.doc.path(i.from.path),l=0,c=i.to;;l++){if(c.offset<this.doc.path(c.path).size){this.split(c,s-l);break}if(l==s-1)break;c=c.shorten(null,1)}for(var l=0,c=i.from;;l++){if(c.offset>0){this.split(c,s-l);for(var p=i.from.path.length-s,f=c.path.slice(0,p).concat(c.path[p]+1);f.length<i.from.path.length;)f.push(0);i={from:new a.Pos(f,0),to:new a.Pos(f,i.to.offset-i.from.offset)};break}if(l==s-1)break;c=c.shorten()}if(n.unwrap){for(var h=i.to.offset-1;h>i.from.offset;h--)this.join(new a.Pos(i.from.path,h));for(var d,m=0,h=u.iter(i.from.offset,i.to.offset);d=h.next().value;)m+=d.size;var f=i.from.path.concat(i.from.offset);i={from:new a.Pos(f,0),to:new a.Pos(f,m)},++s}return this.step("ancestor",i.from,i.to,null,{depth:s}),this},u.Transform.prototype.wrap=function(e,t,r,n){var o=i(this.doc,e,t,r);if(!o)return this;var s=o.range,u=o.around,l=o.inside,c=u.concat(r).concat(l),p=u.map(function(){return null}).concat(n).concat(l.map(function(){return null}));if(this.step("ancestor",s.from,s.to,null,{types:c,attrs:p}),l.length){for(var f=s.from.path.slice(),h=0;h<u.length+l.length+1;h++)f.push(h?0:s.from.offset);for(var h=s.to.offset-1-s.from.offset;h>0;h--)this.split(new a.Pos(f,h),l.length)}return this},u.Transform.prototype.setBlockType=function(e,t,r,n){var o=this;return this.doc.nodesBetween(e,t||e,function(e,t){return e.isTextblock&&!e.hasMarkup(r,n)?(t=t.slice(),o.clearMarkup(new a.Pos(t,0),new a.Pos(t,e.size),r),o.step("ancestor",new a.Pos(t,0),new a.Pos(t,o.doc.path(t).size),null,{depth:1,types:[r],attrs:[n]}),!1):void 0}),this},u.Transform.prototype.setNodeType=function(e,t,r){var n=this.doc.nodeAfter(e),o=e.toPath();return this.step("ancestor",new a.Pos(o,0),new a.Pos(o,n.size),null,{depth:1,types:[t],attrs:[r]}),this}},{"../model":38,"./map":46,"./step":50,"./transform":51,"./tree":52}],44:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Remapping=r.MapResult=r.PosMap=r.joinableBlocks=r.joinPoint=r.canWrap=r.canLift=r.StepResult=r.Step=r.Transform=void 0;var n=e("./transform");Object.defineProperty(r,"Transform",{enumerable:!0,get:function(){return n.Transform}});var o=e("./step");Object.defineProperty(r,"Step",{enumerable:!0,get:function(){return o.Step}}),Object.defineProperty(r,"StepResult",{enumerable:!0,get:function(){return o.StepResult}});var i=e("./ancestor");Object.defineProperty(r,"canLift",{enumerable:!0,get:function(){return i.canLift}}),Object.defineProperty(r,"canWrap",{enumerable:!0,get:function(){return i.canWrap}});var s=e("./join");Object.defineProperty(r,"joinPoint",{enumerable:!0,get:function(){return s.joinPoint}}),Object.defineProperty(r,"joinableBlocks",{enumerable:!0,get:function(){return s.joinableBlocks}});var a=e("./map");Object.defineProperty(r,"PosMap",{enumerable:!0,get:function(){return a.PosMap}}),Object.defineProperty(r,"MapResult",{enumerable:!0,get:function(){return a.MapResult}}),Object.defineProperty(r,"Remapping",{enumerable:!0,get:function(){return a.Remapping}}),e("./mark"),e("./split"),e("./replace")},{"./ancestor":43,"./join":45,"./map":46,"./mark":47,"./replace":48,"./split":49,"./step":50,"./transform":51}],45:[function(e,t,r){"use strict";function n(e,t){if(0==t.offset)return!1;var r=e.path(t.path);if(r.isTextblock||t.offset==r.size)return!1;var n=r.child(t.offset-1).type;return!n.isTextblock&&n.contains&&n==r.child(t.offset).type}function o(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?-1:arguments[2];;){if(n(e,t))return t;if(0==t.depth)return null;t=t.shorten(null,0>r?0:1)}}Object.defineProperty(r,"__esModule",{value:!0}),r.joinableBlocks=n,r.joinPoint=o;var i=e("../model"),s=e("./transform"),a=e("./step"),u=e("./map");a.Step.define("join",{apply:function(e,t){var r=e.path(t.from.path),n=e.path(t.to.path);if(t.from.offset<r.size||t.to.offset>0||!r.type.canContainFragment(n.content))return null;var o=t.from.path,s=t.to.path,l=o.length-1,c=o[l]+1;if(o.length!=s.length||0==o.length||c!=s[l])return null;for(var p=0;l>p;p++)if(o[p]!=s[p])return null;var f=o.slice(0,l),h=e.path(f),d=h.size;if(h.type.locked)return null;var m=r.append(n.content),g=e.replaceDeep(f,h.splice(c-1,c+1,i.Fragment.from(m))),v=new u.PosMap([new u.MovedRange(t.to,n.size,t.from),new u.MovedRange(new i.Pos(f,c+1),d-c-1,new i.Pos(f,c))],[new u.ReplacedRange(t.from,t.to,t.from,t.from,t.to.shorten())]);return new a.StepResult(g,v)},invert:function(e,t){return new a.Step("split",null,null,e.from,t.path(e.to.path).copy())}}),s.Transform.prototype.join=function(e){var t=this.doc.path(e.path);return 0==e.offset||e.offset==t.size||t.isTextblock?this:(this.step("join",new i.Pos(e.path.concat(e.offset-1),t.child(e.offset-1).size),new i.Pos(e.path.concat(e.offset),0)),this)}},{"../model":38,"./map":46,"./step":50,"./transform":51}],46:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(t.path.length>e.path.length){for(var r=[t.path[e.path.length]-e.offset],n=e.path.length+1;n<t.path.length;n++)r.push(t.path[n]);return new a.Pos(r,t.offset)}return new a.Pos([],t.offset-e.offset)}function i(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?1:arguments[2],n=arguments[3],i=0;i<e.replaced.length;i++){var s=e.replaced[i],u=n?s.after:s.before,l=void 0,c=void 0;if((l=t.cmp(u.from))>=0&&(c=t.cmp(u.to))<=0){var f=n?s.before:s.after;return new p(0>r?f.from:f.to,!(!l||!c),{rangeID:i,offset:o(u.ref,t)})}}for(var i=0;i<e.moved.length;i++){var s=e.moved[i],h=n?s.dest:s.start;if(t.cmp(h)>=0&&a.Pos.cmp(t.path,t.offset,h.path,h.offset+s.size)<=0){var d=n?s.start:s.dest,m=h.depth;if(t.depth>m){var g=d.offset+(t.path[m]-h.offset);return new p(new a.Pos(d.path.concat(g).concat(t.path.slice(m+1)),t.offset))}return new p(new a.Pos(d.path,d.offset+(t.offset-h.offset)))}}return new p(t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Remapping=r.nullMap=r.MapResult=r.PosMap=r.ReplacedRange=r.MovedRange=void 0;var a=e("../model"),u=(r.MovedRange=function(){function e(t,r){var o=arguments.length<=2||void 0===arguments[2]?null:arguments[2];n(this,e),this.start=t,this.size=r,this.dest=o}return s(e,[{key:"toString",value:function(){return"[moved "+this.start+"+"+this.size+" to "+this.dest+"]"}},{key:"end",get:function(){return new a.Pos(this.start.path,this.start.offset+this.size)}}]),e}(),function h(e,t,r){n(this,h),this.from=e,this.to=t,this.ref=r}),l=(r.ReplacedRange=function(){function e(t,r,o,i){var s=arguments.length<=4||void 0===arguments[4]?t:arguments[4],a=arguments.length<=5||void 0===arguments[5]?o:arguments[5];n(this,e),this.before=new u(t,r,s),this.after=new u(o,i,a)}return s(e,[{key:"toString",value:function(){return"[replaced "+this.before.from+"-"+this.before.to+" with "+this.after.from+"-"+this.after.to+"]"}}]),e}(),[]),c=r.PosMap=function(){function e(t,r){n(this,e),this.moved=t||l,this.replaced=r||l}return s(e,[{key:"recover",value:function(e){return this.replaced[e.rangeID].after.ref.extend(e.offset)}},{key:"map",value:function(e,t){return i(this,e,t,!1)}},{key:"invert",value:function(){return new f(this)}},{key:"toString",value:function(){return this.moved.concat(this.replaced).join(" ")}}]),e}(),p=r.MapResult=function d(e){var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];n(this,d),this.pos=e,this.deleted=t,this.recover=r},f=function(){function e(t){n(this,e),this.inner=t}return s(e,[{key:"recover",value:function(e){return this.inner.replaced[e.rangeID].before.ref.extend(e.offset)}},{key:"map",value:function(e,t){return i(this.inner,e,t,!0)}},{key:"invert",value:function(){return this.inner}},{key:"toString",value:function(){return"-"+this.inner}}]),e}();r.nullMap=new c,r.Remapping=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],r=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],o=arguments.length<=2||void 0===arguments[2]?Object.create(null):arguments[2];n(this,e),this.head=t,this.tail=r,this.mirror=o}return s(e,[{key:"addToFront",value:function(e,t){this.head.push(e);var r=-this.head.length;return null!=t&&(this.mirror[r]=t),r}},{key:"addToBack",value:function(e,t){this.tail.push(e);var r=this.tail.length-1;return null!=t&&(this.mirror[t]=r),r}},{key:"get",value:function(e){return 0>e?this.head[-e-1]:this.tail[e]}},{key:"map",value:function t(e,r){for(var n=!1,o=-this.head.length;o<this.tail.length;o++){var t=this.get(o),i=t.map(e,r);if(i.recover){var s=this.mirror[o];if(null!=s){o=s,e=this.get(s).recover(i.recover);continue}}i.deleted&&(n=!0),e=i.pos}return new p(e,n)}}]),e}()},{"../model":38}],47:[function(e,t,r){"use strict";var n=e("../model"),o=e("./transform"),i=e("./step"),s=e("./tree");i.Step.define("addMark",{apply:function(e,t){return new i.StepResult((0,s.copyStructure)(e,t.from,t.to,function(e,r,n){return e.type.canContainMark(t.param)?(0,s.copyInline)(e,r,n,function(e){return e.mark(t.param.addToSet(e.marks))}):e}))},invert:function(e,t,r){return new i.Step("removeMark",e.from,r.map(e.to).pos,null,e.param)},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return e.markFromJSON(t)}}),o.Transform.prototype.addMark=function(e,t,r){var o=this,s=[],a=[],u=null,l=null;return this.doc.inlineNodesBetween(e,t,function(e,t,o,c,p){var f=e.marks;if(r.isInSet(f)||!p.type.canContainMark(r.type))l=u=null;else{var h=r.type.isInSet(f);h?u&&u.param.eq(h)?u.to=new n.Pos(t,c):(u=new i.Step("removeMark",new n.Pos(t,o),new n.Pos(t,c),null,h),s.push(u)):u&&(u=null),l?l.to=new n.Pos(t,c):(l=new i.Step("addMark",new n.Pos(t,o),new n.Pos(t,c),null,r),a.push(l))}}),s.forEach(function(e){return o.step(e)}),a.forEach(function(e){return o.step(e)}),this},i.Step.define("removeMark",{apply:function(e,t){return new i.StepResult((0,s.copyStructure)(e,t.from,t.to,function(e,r,n){return(0,s.copyInline)(e,r,n,function(e){return e.mark(t.param.removeFromSet(e.marks))})}))},invert:function(e,t,r){return new i.Step("addMark",e.from,r.map(e.to).pos,null,e.param)},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return e.markFromJSON(t)}}),o.Transform.prototype.removeMark=function(e,t){var r=this,o=arguments.length<=2||void 0===arguments[2]?null:arguments[2],i=[],s=0;return this.doc.inlineNodesBetween(e,t,function(e,t,r,a){var u=e.marks;s++;var l=null;if(o instanceof n.MarkType){var c=o.isInSet(u);c&&(l=[c])}else o?o.isInSet(u)&&(l=[o]):l=u;if(l&&l.length){t=t.slice();for(var p=0;p<l.length;p++){for(var f=l[p],c=void 0,h=0;h<i.length;h++){var d=i[h];d.step==s-1&&f.eq(i[h].style)&&(c=d)}c?(c.to=new n.Pos(t,a),c.step=s):i.push({style:f,from:new n.Pos(t,r),to:new n.Pos(t,a),step:s})}}}),i.forEach(function(e){return r.step("removeMark",e.from,e.to,null,e.style)}),this},o.Transform.prototype.clearMarkup=function(e,t,r){var o=this,s=[];this.doc.inlineNodesBetween(e,t,function(e,t,a,u){var l=e.marks,c=e.type;if(r?!r.canContainType(c):!c.isText){t=t.slice();var p=new n.Pos(t,a);return void s.push(new i.Step("replace",p,new n.Pos(t,u),p))}for(var f=0;f<l.length;f++){var h=l[f];r&&r.canContainMark(h.type)||(t=t.slice(),o.step("removeMark",new n.Pos(t,a),new n.Pos(t,u),null,h))}});for(var a=s.length-1;a>=0;a--)this.step(s[a]);return this}},{"../model":38,"./step":50,"./transform":51,"./tree":52}],48:[function(e,t,r){"use strict";function n(e,t,r,n){for(var o=[],i=t.path.slice(0,n),s=n;;s++){var a=s==t.depth?0:1,l=s==t.depth?t.offset:t.path[s],c=e.size-l,f=r.size-c,h=t.shorten(s,a),d=new u.Pos(i,f+a);if(h.cmp(d)&&o.push(new p.MovedRange(h,c-a,d)),!a)return o;e=e.child(l),r=r.child(f),i=i.concat(f)}}function o(e,t,r,i,s){var a=arguments.length<=5||void 0===arguments[5]?0:arguments[5];if(a==i.length){var u=e.sliceBetween(null,t,a),l=e.sliceBetween(r,null,a),c=void 0;return u.type.canContainFragment(s.content)?(c=s.content.size?u.append(s.content,t.depth-a,s.openLeft).append(l.content,s.openRight,r.depth-a):u.append(l.content,t.depth-a,r.depth-a),c.size||c.type.canBeEmpty||(c=c.copy(c.type.defaultContent())),{doc:c,moved:n(e,r,c,a)}):null}var p=i[a],c=o(e.child(p),t,r,i,s,a+1);return c?{doc:e.replace(p,c.doc),moved:c.moved}:null}function i(e,t){for(var r=e[t]=e[t].slice(1),n=t-1;n>=0;n--)r=e[n]=e[n].replace(0,r)}function s(e,t,r,n){for(var o=t.sliceBetween(r,n),s=[],a=o,l=0;l<=r.path.length;l++,a=a.firstChild)s.push(a);var c=(0,f.samePathDepth)(r,n),p=e.length-1,h=s.length-1,d=null,m=s[h];for(m.isTextblock&&m.size&&e[p].isTextblock&&(d=e[p--].copy(m.content),--h,i(s,h));;h--){for(var a=s[h],g=a.type,v=null,y=c>=h,l=p;l>=0;l--){var k=e[l];if(y?k.type.canContainContent(a.type):k.type==g){v=l;break}}if(null!=v)if(d)for(;p>=v;){var b=e[p],w=u.Fragment.from(d);d=b.copy(p==v?w.append(a.content):w),p--}else d=e[v].copy(a.content),p=v-1;if(null!=v||0==a.size){if(y)break;i(s,h-1)}}var _={content:d?d.content:u.emptyFragment,openLeft:r.depth-h,openRight:n.depth-h};return{repl:_,depth:p+1}}function a(e,t,r,n){for(var o=(0,f.samePathDepth)(r,n),i=n.shorten(null,1);i.path.length>o&&1==t.path(i.path).size;)i=i.shorten(null,1);e.split(i,i.path.length-o);for(var s=n,a=new u.Pos(s.path,t.path(s.path).size),l=t.path(s.path.slice(0,o)),c=l.pathNodes(r.path.slice(o)),p=l.pathNodes(s.path.slice(o));c.length&&p.length&&c[0].sameMarkup(p[0]);)c.shift(),p.shift();(p.length||c.length)&&e.step("ancestor",s,a,null,{depth:p.length,types:c.map(function(e){return e.type}),attrs:c.map(function(e){return e.attrs})});for(var h=o;h<r.path.length;h++)e.join(r.shorten(h,1))}Object.defineProperty(r,"__esModule",{value:!0}),r.replace=o;var u=e("../model"),l=e("./transform"),c=e("./step"),p=e("./map"),f=e("./tree"),h={content:u.emptyFragment,openLeft:0,openRight:0};c.Step.define("replace",{apply:function(e,t){var r=t.pos,n=r.path;if(t.from.depth<n.length||t.to.depth<n.length)return null;for(var i=0;i<n.length;i++)if(t.from.path[i]!=n[i]||t.to.path[i]!=n[i])return null;var s=o(e,t.from,t.to,r.path,t.param||h);if(!s)return null;var a=s.doc,u=s.moved,l=u.length?u[u.length-1].dest:t.to,f=new p.ReplacedRange(t.from,t.to,t.from,l,r,r);return new c.StepResult(a,new p.PosMap(u,[f]))},invert:function(e,t,r){var n=e.pos.depth;return new c.Step("replace",e.from,r.map(e.to).pos,e.from.shorten(n),{content:t.path(e.pos.path).content.sliceBetween(e.from,e.to,n),openLeft:e.from.depth-n,openRight:e.to.depth-n})},paramToJSON:function(e){return e&&{content:e.content.size&&e.content.toJSON(),openLeft:e.openLeft,openRight:e.openRight}},paramFromJSON:function(e,t){return t&&{content:u.Fragment.fromJSON(e,t.content),openLeft:t.openLeft,openRight:t.openRight}}}),l.Transform.prototype["delete"]=function(e,t){return e.cmp(t)&&this.replace(e,t),this},l.Transform.prototype.replace=function(e,t,r,n,o){var i=void 0,l=void 0,c=this.doc,p=(0,
-f.samePathDepth)(e,t);if(r){var d=s(c.pathNodes(e.path),r,n,o);for(i=d.repl,l=d.depth;l>p;)i.content.size&&(i={content:u.Fragment.from(c.path(e.path.slice(0,l)).copy(i.content)),openLeft:i.openLeft+1,openRight:i.openRight+1}),l--}else i=h,l=p;var m=e.shorten(l),g=c,v=t;if(i.content.size||(0,f.replaceHasEffect)(c,e,t)){var y=this.step("replace",e,t,m,i);g=y.doc,v=y.map.map(t).pos}if(!c.path(t.path).isTextblock)return this;if(!(i.content.size?r.path(o.path).isTextblock:c.path(e.path).isTextblock))return this;var k=c.path(m.path).pathNodes(t.path.slice(l)).slice(1),b=void 0;if(i.content.size){var w=i.content;b=[];for(var _=0;_<i.openRight;_++){var x=w.child(w.size-1);b.push(x),w=x.content}}else b=c.path(m.path).pathNodes(e.path.slice(l)).slice(1);if(b.length&&(k.length!=b.length||!k.every(function(e,t){return e.sameMarkup(b[t])}))){for(var C=v.shorten(m.depth),M=C.path,S=C.offset,A=void 0,O=g.path(M),_=0;;_++){if(_==b.length){A=new u.Pos(M,S);break}M.push(S-1),O=O.child(S-1),S=O.size}a(this,g,A,v)}return this},l.Transform.prototype.replaceWith=function(e,t,r){return r instanceof u.Fragment||(r=u.Fragment.from(r)),u.Pos.samePath(e.path,t.path)?this.step("replace",e,t,e,{content:r,openLeft:0,openRight:0}):this["delete"](e,t).step("replace",e,e,e,{content:r,openLeft:0,openRight:0}),this},l.Transform.prototype.insert=function(e,t){return this.replaceWith(e,e,t)},l.Transform.prototype.insertText=function(e,t){return this.insert(e,this.doc.type.schema.text(t,this.doc.marksAt(e)))},l.Transform.prototype.insertInline=function(e,t){return this.insert(e,t.mark(this.doc.marksAt(e)))}},{"../model":38,"./map":46,"./step":50,"./transform":51,"./tree":52}],49:[function(e,t,r){"use strict";var n=e("../model"),o=e("./transform"),i=e("./step"),s=e("./map");i.Step.define("split",{apply:function(e,t){var r=t.pos;if(0==r.depth)return null;var o=r.shorten(),a=o.path,u=o.offset,l=e.path(a),c=l.child(u),p=c.size,f=t.param||c,h=f.type,d=f.attrs,m=r.offset;if(0==m&&!c.type.canBeEmpty||c.type.locked||m==c.size&&!h.canBeEmpty)return null;var g=l.splice(u,u+1,n.Fragment.from([c.slice(0,m),h.create(d,c.content.slice(m))])),v=e.replaceDeep(a,g),y=new n.Pos(a.concat(u+1),0),k=new s.PosMap([new s.MovedRange(r,p-r.offset,y),new s.MovedRange(new n.Pos(a,u+1),g.size-2-u,new n.Pos(a,u+2))],[new s.ReplacedRange(r,r,r,y,r,r.shorten(null,1))]);return new i.StepResult(v,k)},invert:function(e,t,r){return new i.Step("join",e.pos,r.map(e.pos).pos)},paramToJSON:function(e){return e&&{type:e.type.name,attrs:e.attrs}},paramFromJSON:function(e,t){return t&&{type:e.nodeType(t.type),attrs:t.attrs}}}),o.Transform.prototype.split=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=arguments[2],n=arguments[3];if(0==t)return this;for(var o=0;;o++){if(this.step("split",null,null,e,r&&{type:r,attrs:n}),o==t-1)return this;r=null,e=e.shorten(null,1)}},o.Transform.prototype.splitIfNeeded=function(e){for(var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=0;t>r;r++){var n=e.shorten(e.depth-r);n.offset&&n.offset<this.doc.path(n.path).size&&this.step("split",null,null,n)}return this}},{"../model":38,"./map":46,"./step":50,"./transform":51}],50:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.StepResult=r.Step=void 0;var i=e("../model"),s=e("../util/error"),a=e("./map"),u=(r.Step=function(){function e(t,r,o,i){var a=arguments.length<=4||void 0===arguments[4]?null:arguments[4];n(this,e),t in u||s.NamespaceError.raise("Unknown step type: "+t),this.type=t,this.from=r,this.to=o,this.pos=i,this.param=a}return o(e,[{key:"apply",value:function(e){return u[this.type].apply(e,this)}},{key:"invert",value:function(e,t){return u[this.type].invert(this,e,t)}},{key:"map",value:function(t){var r=!0,n=null,o=null,i=null;if(this.from){var s=t.map(this.from,1);n=s.pos,s.deleted||(r=!1)}if(this.to)if(0==this.to.cmp(this.from))o=n;else{var s=t.map(this.to,-1);o=s.pos.max(n),s.deleted||(r=!1)}if(this.pos)if(n&&0==this.pos.cmp(this.from))i=n;else if(o&&0==this.pos.cmp(this.to))i=o;else{var s=t.map(this.pos,1);i=s.pos,s.deleted||(r=!1)}return r?null:new e(this.type,n,o,i,this.param)}},{key:"toJSON",value:function(){var e=u[this.type];return{type:this.type,from:this.from,to:this.to,pos:this.pos,param:e.paramToJSON?e.paramToJSON(this.param):this.param}}}],[{key:"fromJSON",value:function(t,r){var n=u[r.type];return new e(r.type,r.from&&i.Pos.fromJSON(r.from),r.to&&i.Pos.fromJSON(r.to),r.pos&&i.Pos.fromJSON(r.pos),n.paramFromJSON?n.paramFromJSON(t,r.param):r.param)}},{key:"define",value:function(e,t){u[e]=t}}]),e}(),r.StepResult=function l(e){var t=arguments.length<=1||void 0===arguments[1]?a.nullMap:arguments[1];n(this,l),this.doc=e,this.map=t},Object.create(null))},{"../model":38,"../util/error":55,"./map":46}],51:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Transform=void 0;var i=e("./step"),s=e("./map"),a=function(){function e(t){n(this,e),this.steps=[],this.docs=[t],this.maps=[]}return o(e,[{key:"step",value:function(e,t,r,n,o){"string"==typeof e&&(e=new i.Step(e,t,r,n,o));var s=e.apply(this.doc);return s&&(this.steps.push(e),this.maps.push(s.map),this.docs.push(s.doc)),s}},{key:"map",value:function(e,t){for(var r=!1,n=0;n<this.maps.length;n++){var o=this.maps[n].map(e,t);e=o.pos,o.deleted&&(r=!0)}return new s.MapResult(e,r)}},{key:"doc",get:function(){return this.docs[this.docs.length-1]}},{key:"before",get:function(){return this.docs[0]}}]),e}();r.Transform=a},{"./map":46,"./step":50}],52:[function(e,t,r){"use strict";function n(e,t,r,o){var i=arguments.length<=4||void 0===arguments[4]?0:arguments[4];if(e.isTextblock)return o(e,t?t.offset:0,r?r.offset:e.size);if(!e.size)return e;for(var s,a=t?t.path[i]:0,u=r?r.path[i]+1:e.size,c=e.content.toArray(0,a),p=e.iter(a,u);s=p.next().value;){var f=p.offset-s.width==a?t:null,h=p.offset==u?r:null;c.push(n(s,f,h,o,i+1))}return e.copy(l.Fragment.fromArray(c.concat(e.content.toArray(u))))}function o(e,t,r,n){return e.splice(t,r,e.content.slice(t,r).map(n))}function i(e,t){if(e.path.length!=t.path.length)return!1;for(var r=0;r<e.path.length;r++)if(e.path[r]!=t.path[r])return!1;return e.offset<=t.offset}function s(e,t,r){if(!r||0==t||t==e.size)return!1;var n=e.child(t-1),o=e.child(t);return n.sameMarkup(o)}function a(e,t,r){for(var n=0,o=e;;n++){var i=n==t.depth,a=n==r.depth;if(i||a||t.path[n]!=r.path[n]){var u=void 0,l=void 0;if(i)u=t.offset;else{u=t.path[n]+1;for(var c=n+1,p=o.child(u-1);c<=t.path.length;c++)if(c==t.path.length){if(t.offset<p.size)return!0}else{if(t.path[c]+1<p.size)return!0;p=p.child(t.path[c])}}if(a)l=r.offset;else{l=r.path[n];for(var c=n+1;c<=r.path.length;c++)if((c==r.path.length?r.offset:r.path[c])>0)return!0}return u!=l?!0:s(o,u,Math.min(t.depth,r.depth)-n)}o=o.child(t.path[n])}}function u(e,t){for(var r=0;;r++)if(r==e.path.length||r==t.path.length||e.path[r]!=t.path[r])return r}Object.defineProperty(r,"__esModule",{value:!0}),r.copyStructure=n,r.copyInline=o,r.isFlatRange=i,r.replaceHasEffect=a,r.samePathDepth=u;var l=e("../model")},{"../model":38}],53:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){var n=(0,a.elt)("button",{"class":"ProseMirror-prompt-close"}),o=(0,a.elt)("div",{"class":"ProseMirror-prompt"},t,n),i=e.wrapper.getBoundingClientRect();if(e.wrapper.appendChild(o),r&&r.pos)o.style.left=r.pos.left-i.left+"px",o.style.pos=r.pos.top-i.top+"px";else{var s=o.getBoundingClientRect(),u=Math.max(0,i.left)+Math.min(window.innerWidth,i.right)-s.width,l=Math.max(0,i.top)+Math.min(window.innerHeight,i.bottom)-s.height;o.style.left=u/2-i.left+"px",o.style.top=l/2-i.top+"px"}var c=function p(){e.off("interaction",p),o.parentNode&&(o.parentNode.removeChild(o),r&&r.onClose&&r.onClose())};return n.addEventListener("click",c),e.on("interaction",c),{close:c}}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.ParamPrompt=void 0,r.openPrompt=o;var s=e("../util/error"),a=e("../dom"),u=r.ParamPrompt=function(){function e(t,r){var o=this;n(this,e),this.pm=t,this.command=r,this.doClose=null,this.fields=r.params.map(function(e){return e.type in o.paramTypes||s.AssertionError.raise("Unsupported parameter type: "+e.type),o.paramTypes[e.type].render.call(o.pm,e,o.defaultValue(e))}),this.form=(0,a.elt)("form",null,this.fields.map(function(e){return(0,a.elt)("div",null,e)}))}return i(e,[{key:"close",value:function(){this.doClose&&(this.doClose(),this.doClose=null)}},{key:"open",value:function(){var e=this;this.close();var t=this.prompt(),r=this.pm.hasFocus();this.doClose=function(){t.close(),r&&setTimeout(function(){return e.pm.focus()},50)};var n=function(){var t=e.values();t&&(e.close(),e.command.exec(e.pm,t))};this.form.addEventListener("submit",function(e){e.preventDefault(),n()}),this.form.addEventListener("keydown",function(e){27==e.keyCode?t.close():13!=e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||n()});var o=this.form.querySelector("input, textarea");o&&o.focus()}},{key:"values",value:function(){for(var e=[],t=0;t<this.command.params.length;t++){var r=this.command.params[t],n=this.fields[t],o=this.paramTypes[r.type],i=void 0,s=void 0;if(o.validate&&(s=o.validate(n)),s||(i=o.read.call(this.pm,n),r.validate?s=r.validate(i):i||null!=r["default"]||(s="No default value available")),s)return o.reportInvalid?o.reportInvalid.call(this.pm,n,s):this.reportInvalid(n,s),null;e.push(i)}return e}},{key:"defaultValue",value:function(e){if(e.prefill){var t=e.prefill.call(this.command.self,this.pm);if(null!=t)return t}return e["default"]}},{key:"prompt",value:function(){var e=this;return o(this.pm,this.form,{onClose:function(){return e.close()}})}},{key:"reportInvalid",value:function(e,t){var r=e.parentNode,n="left: "+(e.offsetLeft+e.offsetWidth+2)+"px; top: "+(e.offsetTop-5)+"px",o=r.appendChild((0,a.elt)("div",{"class":"ProseMirror-invalid",style:n},t));setTimeout(function(){return r.removeChild(o)},1500)}}]),e}();u.prototype.paramTypes=Object.create(null),u.prototype.paramTypes.text={render:function(e,t){return(0,a.elt)("input",{type:"text",placeholder:e.label,value:t,autocomplete:"off"})},read:function(e){return e.value}},u.prototype.paramTypes.select={render:function(e,t){var r=e.options.call?e.options(this):e.options;return(0,a.elt)("select",null,r.map(function(e){return(0,a.elt)("option",{value:e.value,selected:e.value==t?"true":null},e.label)}))},read:function(e){return e.value}},(0,a.insertCSS)('\n.ProseMirror-prompt {\n  background: white;\n  padding: 2px 6px 2px 15px;\n  border: 1px solid silver;\n  position: absolute;\n  border-radius: 3px;\n  z-index: 11;\n}\n\n.ProseMirror-prompt input[type="text"],\n.ProseMirror-prompt textarea {\n  background: #eee;\n  border: none;\n  outline: none;\n}\n\n.ProseMirror-prompt input[type="text"] {\n  padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n  position: absolute;\n  left: 2px; top: 1px;\n  color: #666;\n  border: none; background: transparent; padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n  content: "✕";\n  font-size: 12px;\n}\n\n.ProseMirror-invalid {\n  background: #ffc;\n  border: 1px solid #cc7;\n  border-radius: 4px;\n  padding: 5px 10px;\n  position: absolute;\n  min-width: 10em;\n}\n')},{"../dom":3,"../util/error":55}],54:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){l.get(e).set(t)}function i(e,t){l.get(e).unset(t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.scheduleDOMUpdate=o,r.unscheduleDOMUpdate=i;var a=50,u=100,l=function(){function e(t){n(this,e),this.waiting=[],this.timeout=null,this.lastForce=0,this.pm=t,this.force=this.force.bind(this),t.on("flush",this.onFlush.bind(this))}return s(e,[{key:"set",value:function(e){0==this.waiting.length&&(this.timeout=setTimeout(this.force,a)),-1==this.waiting.indexOf(e)&&this.waiting.push(e)}},{key:"unset",value:function(e){var t=this.waiting.indexOf(e);t>-1&&this.waiting.splice(t,1)}},{key:"force",value:function(){for(clearTimeout(this.timeout),this.lastForce=Date.now();this.waiting.length;)for(var e=0;e<this.waiting.length;e++){var t=this.waiting[e]();t?this.waiting[e]=t:this.waiting.splice(e--,1)}}},{key:"onFlush",value:function(){this.waiting.length&&Date.now()-this.lastForce>u&&this.force()}}],[{key:"get",value:function(e){return e.mod.centralScheduler||(e.mod.centralScheduler=new this(e))}}]),e}();r.UpdateScheduler=function(){function e(t,r,o){var i=this;n(this,e),this.pm=t,this.start=o,this.events=r.split(" "),this.onEvent=this.onEvent.bind(this),this.events.forEach(function(e){return t.on(e,i.onEvent)})}return s(e,[{key:"detach",value:function(){var e=this;i(this.pm,this.start),this.events.forEach(function(t){return e.pm.off(t,e.onEvent)})}},{key:"onEvent",value:function(){o(this.pm,this.start)}},{key:"force",value:function(){if(this.pm.operation)this.onEvent();else{i(this.pm,this.start);for(var e=this.start;e;e=e());}}}]),e}()},{}],55:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=/^function (\w+)/.exec(e.toString());return t&&t[1]}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0});var u=r.ProseMirrorError=function(e){function t(e){n(this,t);var r=o(this,Object.getPrototypeOf(t).call(this,e));return r.message!=e&&(r.message=e,Error.captureStackTrace?Error.captureStackTrace(r,r.name):r.stack=new Error(e).stack),r}return i(t,e),a(t,[{key:"name",get:function(){return this.constructor.name||s(this.constructor)||"ProseMirrorError"}}],[{key:"raise",value:function(e){throw new this(e)}}]),t}(Error);r.AssertionError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(u),r.NamespaceError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(u)},{}],56:[function(e,t,r){"use strict";function n(e){var t=e.prototype;for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])}Object.defineProperty(r,"__esModule",{value:!0}),r.eventMixin=n;var o={on:function(e,t){var r=this._handlers||(this._handlers={}),n=r[e]||(r[e]=[]);n.push(t)},off:function(e,t){var r=this._handlers&&this._handlers[e];if(r)for(var n=0;n<r.length;++n)if(r[n]==t){r.splice(n,1);break}},signal:function(e){for(var t=this._handlers&&this._handlers[e],r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];if(t)for(var i=0;i<t.length;++i)t[i].apply(t,n)},signalHandleable:function(e){var t=this._handlers&&this._handlers[e];if(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];for(var i=0;i<t.length;++i){var s=t[i].apply(t,n);if(s!==!1)return s}}return!1},signalPipelined:function(e,t){var r=this._handlers&&this._handlers[e];if(r)for(var n=0;n<r.length;++n)t=r[n](t);return t},signalDOM:function(e,t){var r=this._handlers&&this._handlers[t||e.type];if(r)for(var n=0;n<r.length;++n)if(r[n](e)||e.defaultPrevented)return!0;return!1},hasHandler:function(e){var t=this._handlers&&this._handlers[e];return t&&t.length>0}}},{}],57:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0});r.Map=window.Map||function(){function e(){n(this,e),this.content=[]}return o(e,[{key:"set",value:function(e,t){var r=this.find(e);r>-1?this.content[r+1]=t:this.content.push(e,t)}},{key:"get",value:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]}},{key:"has",value:function(e){return this.find(e)>-1}},{key:"find",value:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t}},{key:"clear",value:function(){this.content.length=0}},{key:"size",get:function(){return this.content.length/2}}]),e}()},{}],58:[function(e,t,r){"use strict";function n(e,t){var r=t||Object.create(null);for(var n in e)r[n]=e[n];return r}Object.defineProperty(r,"__esModule",{value:!0}),r.copyObj=n},{}],59:[function(e,t,r){"use strict";function n(e,t,r){for(var n=0;n<e.length&&!(r(e[n],t)>0);n++);e.splice(n,0,t)}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=n},{}],60:[function(e,t,r){!function(e){if("object"==typeof r&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);(this||window).browserKeymap=e()}}(function(){"use strict";function e(e){if("keypress"==e.type)return"'"+String.fromCharCode(e.charCode)+"'";var t=i[e.keyCode],r=t;return null==r||e.altGraphKey?null:(e.altKey&&"Alt"!=t&&(r="Alt-"+r),e.ctrlKey&&"Ctrl"!=t&&(r="Ctrl-"+r),e.metaKey&&"Cmd"!=t&&(r="Cmd-"+r),e.shiftKey&&"Shift"!=t&&(r="Shift-"+r),r)}function t(e){return e=/[^-]*$/.exec(e)[0],"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function r(e){for(var t,r,n,i,s=e.split(/-(?!'?$)/),a=s[s.length-1],u=0;u<s.length-1;u++){var l=s[u];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)$/i.test(l))n=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);o?i=!0:r=!0}}return t&&(a="Alt-"+a),r&&(a="Ctrl-"+a),i&&(a="Cmd-"+a),n&&(a="Shift-"+a),a}function n(e,t){if(this.options=t||{},this.bindings=Object.create(null),e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.addBinding(r,e[r])}for(var o="undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os?"darwin"==os.platform():!1,i={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},s=0;10>s;s++)i[s+48]=i[s+96]=String(s);for(var s=65;90>=s;s++)i[s]=String.fromCharCode(s);for(var s=1;12>=s;s++)i[s+111]=i[s+63235]="F"+s;return n.prototype={normalize:function(e){return this.options.multi!==!1?e.split(/ +(?!\'$)/).map(r):[r(e)]},addBinding:function(e,t){for(var r=this.normalize(e),n=0;n<r.length;n++){var o=r.slice(0,n+1).join(" "),i=n==r.length-1?t:"...",s=this.bindings[o];if(s){if(s!=i)throw new Error("Inconsistent bindings for "+o)}else this.bindings[o]=i}},removeBinding:function(e){for(var t=this.normalize(e),r=t.length-1;r>=0;r--){var n=t.slice(0,r).join(" "),o=this.bindings[n];if("..."==o&&!this.unusedMulti(n))break;o&&delete this.bindings[n]}},unusedMulti:function(e){for(var t in this.bindings)if(t.length>e&&0==t.indexOf(e)&&" "==t.charAt(e.length))return!1;return!0},lookup:function(e,t){return this.options.call?this.options.call(e,t):this.bindings[e]},constructor:n},n.keyName=e,n.isModifierKey=t,n.normalizeKeyName=r,n})},{}],61:[function(e,t,r){t.exports={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:"        ",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:"‌"}},{}],62:[function(e,t,r){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(r){e[r]=t[r]})}),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===o(e)}function s(e){return"[object Object]"===o(e)}function a(e){return"[object RegExp]"===o(e)}function u(e){return"[object Function]"===o(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(e){return Object.keys(e||{}).reduce(function(e,t){return e||y.hasOwnProperty(t)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function f(e){return function(t,r){var n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function h(){return function(e,t){t.normalize(e)}}function d(t){function r(e){return e.replace("%TLDS%",c.src_tlds)}function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var c=t.re=n({},e("./lib/re")),d=t.__tlds__.slice();t.__tlds_replaced__||d.push(b),d.push(c.src_xn),c.src_tlds=d.join("|"),c.email_fuzzy=RegExp(r(c.tpl_email_fuzzy),"i"),c.link_fuzzy=RegExp(r(c.tpl_link_fuzzy),"i"),c.link_no_ip_fuzzy=RegExp(r(c.tpl_link_no_ip_fuzzy),"i"),c.host_fuzzy_test=RegExp(r(c.tpl_host_fuzzy_test),"i");var m=[];t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){var r=t.__schemas__[e];if(null!==r){var n={validate:null,link:null};return t.__compiled__[e]=n,s(r)?(a(r.validate)?n.validate=f(r.validate):u(r.validate)?n.validate=r.validate:o(e,r),void(u(r.normalize)?n.normalize=r.normalize:r.normalize?o(e,r):n.normalize=h())):i(r)?void m.push(e):void o(e,r)}}),m.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:h()};var g=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map(l).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+g+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+g+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),p(t)}function m(e,t){var r=e.__index__,n=e.__last_index__,o=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=o,this.text=o,this.url=o}function g(e,t){var r=new m(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function v(e,t){return this instanceof v?(t||c(e)&&(t=e,e={}),this.__opts__=n({},y,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},k,e),this.__compiled__={},this.__tlds__=w,this.__tlds_replaced__=!1,this.re={},void d(this)):new v(e,t)}var y={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,r){var n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){var n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&":"===e[t-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){var n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},b="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]",w="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");v.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},v.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},v.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,r,n,o,i,s,a,u,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(o=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&null!==(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&null!==(n=e.match(this.re.email_fuzzy))&&(i=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s))),this.__index__>=0},v.prototype.pretest=function(e){return this.re.pretest.test(e)},v.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},v.prototype.match=function(e){var t=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(g(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)r.push(g(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return r.length?r:null},v.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,r){return e!==r[t-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},v.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},t.exports=v},{"./lib/re":63}],63:[function(e,t,r){"use strict";var n=r.src_Any=e("uc.micro/properties/Any/regex").source,o=r.src_Cc=e("uc.micro/categories/Cc/regex").source,i=r.src_Z=e("uc.micro/categories/Z/regex").source,s=r.src_P=e("uc.micro/categories/P/regex").source,a=r.src_ZPCc=[i,s,o].join("|"),u=r.src_ZCc=[i,o].join("|"),l="(?:(?!"+a+")"+n+")",c="(?:(?![0-9]|"+a+")"+n+")",p=r.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]?)";r.src_auth="(?:(?:(?!"+u+").)+@)?";var f=r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",h=r.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=r.src_path="(?:[/?#](?:(?!"+u+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+u+"|\\]).)*\\]|\\((?:(?!"+u+"|[)]).)*\\)|\\{(?:(?!"+u+'|[}]).)*\\}|\\"(?:(?!'+u+'|["]).)+\\"|\\\'(?:(?!'+u+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+u+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+u+").|\\!(?!"+u+"|[!]).|\\?(?!"+u+"|[?]).)+|\\/)?",m=r.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=r.src_xn="xn--[a-z0-9\\-]{1,59}",v=r.src_domain_root="(?:"+g+"|"+c+"{1,63})",y=r.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",k=r.src_host="(?:"+p+"|(?:(?:(?:"+y+")\\.)*"+v+"))",b=r.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+y+")\\.)+(?:%TLDS%)))",w=r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+y+")\\.)+(?:%TLDS%))";r.src_host_strict=k+h;var _=r.tpl_host_fuzzy_strict=b+h;r.src_host_port_strict=k+f+h;var x=r.tpl_host_port_fuzzy_strict=b+f+h,C=r.tpl_host_port_no_ip_fuzzy_strict=w+f+h;r.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",r.tpl_email_fuzzy="(^|>|"+u+")("+m+"@"+_+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+x+d+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")"},{"uc.micro/categories/Cc/regex":120,"uc.micro/categories/P/regex":122,"uc.micro/categories/Z/regex":123,"uc.micro/properties/Any/regex":125}],64:[function(e,t,r){"use strict";t.exports=e("./lib/")},{"./lib/":74}],65:[function(e,t,r){"use strict";t.exports=e("entities/maps/entities.json")},{"entities/maps/entities.json":61}],66:[function(e,t,r){"use strict";t.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","head","header","hr","html","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},{}],67:[function(e,t,r){"use strict";var n="[a-zA-Z_:][a-zA-Z0-9:._-]*",o="[^\"'=<>`\\x00-\\x20]+",i="'[^']*'",s='"[^"]*"',a="(?:"+o+"|"+i+"|"+s+")",u="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+u+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",f="<[?].*?[?]>",h="<![A-Z]+\\s+[^>]*>",d="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",m=new RegExp("^(?:"+l+"|"+c+"|"+p+"|"+f+"|"+h+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+c+")");t.exports.HTML_TAG_RE=m,t.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],68:[function(e,t,r){"use strict";t.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},{}],69:[function(e,t,r){"use strict";function n(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===n(e)}function i(e,t){return b.call(e,t)}function s(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(r){e[r]=t[r]})}}),e}function a(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function u(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(e){if(e>65535){e-=65536;var t=55296+(e>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function c(e,t){var r=0;return i(M,t)?M[t]:35===t.charCodeAt(0)&&C.test(t)&&(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(r))?l(r):e}function p(e){return e.indexOf("\\")<0?e:e.replace(w,"$1")}function f(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(x,function(e,t,r){return t?t:c(e,r)})}function h(e){return O[e]}function d(e){return S.test(e)?e.replace(A,h):e}function m(e){return e.replace(P,"\\$&")}function g(e){if(e>=8192&&8202>=e)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}function v(e){return T.test(e)}function y(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}}function k(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var b=Object.prototype.hasOwnProperty,w=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,_=/&([a-z#][a-z0-9]{1,31});/gi,x=new RegExp(w.source+"|"+_.source,"gi"),C=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,M=e("./entities"),S=/[&<>"]/,A=/[&<>"]/g,O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},P=/[.?*+^$[\]\\(){}|-]/g,T=e("uc.micro/categories/P/regex");r.lib={},r.lib.mdurl=e("mdurl"),r.lib.ucmicro=e("uc.micro"),r.assign=s,r.isString=o,r.has=i,r.unescapeMd=p,r.unescapeAll=f,r.isValidEntityCode=u,r.fromCodePoint=l,r.escapeHtml=d,r.arrayReplaceAt=a,r.isWhiteSpace=g,r.isMdAsciiPunct=y,r.isPunctChar=v,r.escapeRE=m,r.normalizeReference=k},{"./entities":65,mdurl:118,"uc.micro":124,"uc.micro/categories/P/regex":122}],70:[function(e,t,r){"use strict";r.parseLinkLabel=e("./parse_link_label"),r.parseLinkDestination=e("./parse_link_destination"),r.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":71,"./parse_link_label":72,"./parse_link_title":73}],71:[function(e,t,r){"use strict";var n=e("../common/utils").unescapeAll;t.exports=function(e,t,r){var o,i,s=0,a=t,u={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;r>t;){if(o=e.charCodeAt(t),10===o)return u;if(62===o)return u.pos=t+1,u.str=n(e.slice(a+1,t)),u.ok=!0,u;92===o&&r>t+1?t+=2:t++}return u}for(i=0;r>t&&(o=e.charCodeAt(t),32!==o)&&!(32>o||127===o);)if(92===o&&r>t+1)t+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;t++}return a===t?u:(u.str=n(e.slice(a,t)),u.lines=s,u.pos=t,u.ok=!0,u)}},{"../common/utils":69}],72:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,i,s,a=-1,u=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<u;){if(i=e.src.charCodeAt(e.pos),93===i&&(n--,0===n)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===i)if(s===e.pos-1)n++;else if(r)return e.pos=l,-1}return o&&(a=e.pos),e.pos=l,a}},{}],73:[function(e,t,r){"use strict";var n=e("../common/utils").unescapeAll;t.exports=function(e,t,r){var o,i,s=0,a=t,u={ok:!1,pos:0,lines:0,str:""};if(t>=r)return u;if(i=e.charCodeAt(t),34!==i&&39!==i&&40!==i)return u;for(t++,40===i&&(i=41);r>t;){if(o=e.charCodeAt(t),o===i)return u.pos=t+1,u.lines=s,u.str=n(e.slice(a+1,t)),u.ok=!0,u;10===o?s++:92===o&&r>t+1&&(t++,10===e.charCodeAt(t)&&s++),t++}return u}},{"../common/utils":69}],74:[function(e,t,r){"use strict";function n(e){var t=e.trim().toLowerCase();return v.test(t)?y.test(t)?!0:!1:!0}function o(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||k.indexOf(t.protocol)>=0))try{t.hostname=m.toASCII(t.hostname)}catch(r){}return d.encode(d.format(t))}function i(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||k.indexOf(t.protocol)>=0))try{t.hostname=m.toUnicode(t.hostname)}catch(r){}return d.decode(d.format(t))}function s(e,t){return this instanceof s?(t||a.isString(e)||(t=e||{},e="default"),this.inline=new f,this.block=new p,this.core=new c,this.renderer=new l,this.linkify=new h,this.validateLink=n,this.normalizeLink=o,this.normalizeLinkText=i,this.utils=a,this.helpers=u,this.options={},this.configure(e),void(t&&this.set(t))):new s(e,t)}var a=e("./common/utils"),u=e("./helpers"),l=e("./renderer"),c=e("./parser_core"),p=e("./parser_block"),f=e("./parser_inline"),h=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},v=/^(vbscript|javascript|file|data):/,y=/^data:image\/(gif|png|jpeg|webp);/,k=["http:","https:","mailto:"];s.prototype.set=function(e){return a.assign(this.options,e),this},s.prototype.configure=function(e){var t,r=this;if(a.isString(e)&&(t=e,e=g[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&&r.set(e.options),e.components&&Object.keys(e.components).forEach(function(t){e.components[t].rules&&r[t].ruler.enableOnly(e.components[t].rules)}),this},s.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.enable(e,!0))},this);var n=e.filter(function(e){return r.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},s.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(e,!0))},this);var n=e.filter(function(e){return r.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},s.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},s.prototype.parse=function(e,t){var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},s.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},s.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},s.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},t.exports=s},{"./common/utils":69,"./helpers":70,"./parser_block":75,"./parser_core":76,"./parser_inline":77,"./presets/commonmark":78,"./presets/default":79,"./presets/zero":80,"./renderer":81,"linkify-it":62,mdurl:118,punycode:2}],75:[function(e,t,r){"use strict";function n(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1],{alt:(i[e][2]||[]).slice()})}var o=e("./ruler"),i=[["code",e("./rules_block/code")],["fence",e("./rules_block/fence"),["paragraph","reference","blockquote","list"]],["blockquote",e("./rules_block/blockquote"),["paragraph","reference","list"]],["hr",e("./rules_block/hr"),["paragraph","reference","blockquote","list"]],["list",e("./rules_block/list"),["paragraph","reference","blockquote"]],["reference",e("./rules_block/reference")],["heading",e("./rules_block/heading"),["paragraph","reference","blockquote"]],["lheading",e("./rules_block/lheading")],["html_block",e("./rules_block/html_block"),["paragraph","reference","blockquote"]],["table",e("./rules_block/table"),["paragraph","reference"]],["paragraph",e("./rules_block/paragraph")]];
-n.prototype.tokenize=function(e,t,r){for(var n,o,i=this.ruler.getRules(""),s=i.length,a=t,u=!1,l=e.md.options.maxNesting;r>a&&(e.line=a=e.skipEmptyLines(a),!(a>=r))&&!(e.tShift[a]<e.blkIndent);){if(e.level>=l){e.line=r;break}for(o=0;s>o&&!(n=i[o](e,a,r,!1));o++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),a=e.line,r>a&&e.isEmpty(a)){if(u=!0,a++,r>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,t,r,n){var o;return e?(o=new this.State(e,t,r,n),void this.tokenize(o,o.line,o.lineMax)):[]},n.prototype.State=e("./rules_block/state_block"),t.exports=n},{"./ruler":82,"./rules_block/blockquote":83,"./rules_block/code":84,"./rules_block/fence":85,"./rules_block/heading":86,"./rules_block/hr":87,"./rules_block/html_block":88,"./rules_block/lheading":89,"./rules_block/list":90,"./rules_block/paragraph":91,"./rules_block/reference":92,"./rules_block/state_block":93,"./rules_block/table":94}],76:[function(e,t,r){"use strict";function n(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}var o=e("./ruler"),i=[["normalize",e("./rules_core/normalize")],["block",e("./rules_core/block")],["inline",e("./rules_core/inline")],["linkify",e("./rules_core/linkify")],["replacements",e("./rules_core/replacements")],["smartquotes",e("./rules_core/smartquotes")]];n.prototype.process=function(e){var t,r,n;for(n=this.ruler.getRules(""),t=0,r=n.length;r>t;t++)n[t](e)},n.prototype.State=e("./rules_core/state_core"),t.exports=n},{"./ruler":82,"./rules_core/block":95,"./rules_core/inline":96,"./rules_core/linkify":97,"./rules_core/normalize":98,"./rules_core/replacements":99,"./rules_core/smartquotes":100,"./rules_core/state_core":101}],77:[function(e,t,r){"use strict";function n(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}var o=e("./ruler"),i=[["text",e("./rules_inline/text")],["newline",e("./rules_inline/newline")],["escape",e("./rules_inline/escape")],["backticks",e("./rules_inline/backticks")],["strikethrough",e("./rules_inline/strikethrough")],["emphasis",e("./rules_inline/emphasis")],["link",e("./rules_inline/link")],["image",e("./rules_inline/image")],["autolink",e("./rules_inline/autolink")],["html_inline",e("./rules_inline/html_inline")],["entity",e("./rules_inline/entity")]];n.prototype.skipToken=function(e){var t,r=e.pos,n=this.ruler.getRules(""),o=n.length,i=e.md.options.maxNesting,s=e.cache;if("undefined"!=typeof s[r])return void(e.pos=s[r]);if(e.level<i)for(t=0;o>t;t++)if(n[t](e,!0))return void(s[r]=e.pos);e.pos++,s[r]=e.pos},n.prototype.tokenize=function(e){for(var t,r,n=this.ruler.getRules(""),o=n.length,i=e.posMax,s=e.md.options.maxNesting;e.pos<i;){if(e.level<s)for(r=0;o>r&&!(t=n[r](e,!1));r++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,t,r,n){var o=new this.State(e,t,r,n);this.tokenize(o)},n.prototype.State=e("./rules_inline/state_inline"),t.exports=n},{"./ruler":82,"./rules_inline/autolink":102,"./rules_inline/backticks":103,"./rules_inline/emphasis":104,"./rules_inline/entity":105,"./rules_inline/escape":106,"./rules_inline/html_inline":107,"./rules_inline/image":108,"./rules_inline/link":109,"./rules_inline/newline":110,"./rules_inline/state_inline":111,"./rules_inline/strikethrough":112,"./rules_inline/text":113}],78:[function(e,t,r){"use strict";t.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"]}}}},{}],79:[function(e,t,r){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}}},{}],80:[function(e,t,r){"use strict";t.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"]}}}},{}],81:[function(e,t,r){"use strict";function n(){this.rules=o({},a)}var o=e("./common/utils").assign,i=e("./common/utils").unescapeAll,s=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,t){return"<code>"+s(e[t].content)+"</code>"},a.code_block=function(e,t){return"<pre><code>"+s(e[t].content)+"</code></pre>\n"},a.fence=function(e,t,r,n,o){var a,u=e[t],l=u.info?i(u.info).trim():"",c="";return l&&(c=l.split(/\s+/g)[0],u.attrPush(["class",r.langPrefix+c])),a=r.highlight?r.highlight(u.content,c)||s(u.content):s(u.content),"<pre><code"+o.renderAttrs(u)+">"+a+"</code></pre>\n"},a.image=function(e,t,r,n,o){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,r,n),o.renderToken(e,t,r)},a.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},a.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},a.text=function(e,t){return s(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},n.prototype.renderAttrs=function(e){var t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;r>t;t++)n+=" "+s(e.attrs[t][0])+'="'+s(e.attrs[t][1])+'"';return n},n.prototype.renderToken=function(e,t,r){var n,o="",i=!1,s=e[t];return s.hidden?"":(s.block&&-1!==s.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===s.nesting?"</":"<")+s.tag,o+=this.renderAttrs(s),0===s.nesting&&r.xhtmlOut&&(o+=" /"),s.block&&(i=!0,1===s.nesting&&t+1<e.length&&(n=e[t+1],"inline"===n.type||n.hidden?i=!1:-1===n.nesting&&n.tag===s.tag&&(i=!1))),o+=i?">\n":">")},n.prototype.renderInline=function(e,t,r){for(var n,o="",i=this.rules,s=0,a=e.length;a>s;s++)n=e[s].type,o+="undefined"!=typeof i[n]?i[n](e,s,t,r,this):this.renderToken(e,s,t);return o},n.prototype.renderInlineAsText=function(e,t,r){for(var n="",o=this.rules,i=0,s=e.length;s>i;i++)"text"===e[i].type?n+=o.text(e,i,t,r,this):"image"===e[i].type&&(n+=this.renderInlineAsText(e[i].children,t,r));return n},n.prototype.render=function(e,t,r){var n,o,i,s="",a=this.rules;for(n=0,o=e.length;o>n;n++)i=e[n].type,s+="inline"===i?this.renderInline(e[n].children,t,r):"undefined"!=typeof a[i]?a[e[n].type](e,n,t,r,this):this.renderToken(e,n,t,r);return s},t.exports=n},{"./common/utils":69}],82:[function(e,t,r){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},n.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||e.__cache__[t].push(r.fn))})})},n.prototype.at=function(e,t,r){var n=this.__find__(e),o=r||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=o.alt||[],this.__cache__=null},n.prototype.before=function(e,t,r,n){var o=this.__find__(e),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},n.prototype.after=function(e,t,r,n){var o=this.__find__(e),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},n.prototype.push=function(e,t,r){var n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},n.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,r.push(e)},this),this.__cache__=null,r},n.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},n.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,r.push(e)},this),this.__cache__=null,r},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},t.exports=n},{}],83:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u,l,c,p,f,h,d,m,g=e.bMarks[t]+e.tShift[t],v=e.eMarks[t];if(62!==e.src.charCodeAt(g++))return!1;if(n)return!0;for(32===e.src.charCodeAt(g)&&g++,u=e.blkIndent,e.blkIndent=0,a=[e.bMarks[t]],e.bMarks[t]=g,g=v>g?e.skipSpaces(g):g,i=g>=v,s=[e.tShift[t]],e.tShift[t]=g-e.bMarks[t],p=e.md.block.ruler.getRules("blockquote"),o=t+1;r>o&&!(e.tShift[o]<u)&&(g=e.bMarks[o]+e.tShift[o],v=e.eMarks[o],!(g>=v));o++)if(62!==e.src.charCodeAt(g++)){if(i)break;for(m=!1,h=0,d=p.length;d>h;h++)if(p[h](e,o,r,!0)){m=!0;break}if(m)break;a.push(e.bMarks[o]),s.push(e.tShift[o]),e.tShift[o]=-1}else 32===e.src.charCodeAt(g)&&g++,a.push(e.bMarks[o]),e.bMarks[o]=g,g=v>g?e.skipSpaces(g):g,i=g>=v,s.push(e.tShift[o]),e.tShift[o]=g-e.bMarks[o];for(l=e.parentType,e.parentType="blockquote",f=e.push("blockquote_open","blockquote",1),f.markup=">",f.map=c=[t,0],e.md.block.tokenize(e,t,o),f=e.push("blockquote_close","blockquote",-1),f.markup=">",e.parentType=l,c[1]=e.line,h=0;h<s.length;h++)e.bMarks[h+t]=a[h],e.tShift[h+t]=s[h];return e.blkIndent=u,!0}},{}],84:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,i;if(e.tShift[t]-e.blkIndent<4)return!1;for(o=n=t+1;r>n;)if(e.isEmpty(n))n++;else{if(!(e.tShift[n]-e.blkIndent>=4))break;n++,o=n}return e.line=n,i=e.push("code_block","code",0),i.content=e.getLines(t,o,4+e.blkIndent,!0),i.map=[t,e.line],!0}},{}],85:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u,l,c,p=!1,f=e.bMarks[t]+e.tShift[t],h=e.eMarks[t];if(f+3>h)return!1;if(o=e.src.charCodeAt(f),126!==o&&96!==o)return!1;if(u=f,f=e.skipChars(f,o),i=f-u,3>i)return!1;if(c=e.src.slice(u,f),s=e.src.slice(f,h),s.indexOf("`")>=0)return!1;if(n)return!0;for(a=t;(a++,!(a>=r))&&(f=u=e.bMarks[a]+e.tShift[a],h=e.eMarks[a],!(h>f&&e.tShift[a]<e.blkIndent));)if(e.src.charCodeAt(f)===o&&!(e.tShift[a]-e.blkIndent>=4||(f=e.skipChars(f,o),i>f-u||(f=e.skipSpaces(f),h>f)))){p=!0;break}return i=e.tShift[t],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=s,l.content=e.getLines(t+1,a,i,!0),l.markup=c,l.map=[t,e.line],!0}},{}],86:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(o=e.src.charCodeAt(u),35!==o||u>=l)return!1;for(i=1,o=e.src.charCodeAt(++u);35===o&&l>u&&6>=i;)i++,o=e.src.charCodeAt(++u);return i>6||l>u&&32!==o?!1:n?!0:(l=e.skipCharsBack(l,32,u),s=e.skipCharsBack(l,35,u),s>u&&32===e.src.charCodeAt(s-1)&&(l=s),e.line=t+1,a=e.push("heading_open","h"+String(i),1),a.markup="########".slice(0,i),a.map=[t,e.line],a=e.push("inline","",0),a.content=e.src.slice(u,l).trim(),a.map=[t,e.line],a.children=[],a=e.push("heading_close","h"+String(i),-1),a.markup="########".slice(0,i),!0)}},{}],87:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(o=e.src.charCodeAt(u++),42!==o&&45!==o&&95!==o)return!1;for(i=1;l>u;){if(s=e.src.charCodeAt(u++),s!==o&&32!==s)return!1;s===o&&i++}return 3>i?!1:n?!0:(e.line=t+1,a=e.push("hr","hr",0),a.map=[t,e.line],a.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{}],88:[function(e,t,r){"use strict";var n=e("../common/html_blocks"),o=e("../common/html_re").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("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(e,t,r,n){var o,s,a,u,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(u=e.src.slice(l,c),o=0;o<i.length&&!i[o][0].test(u);o++);if(o===i.length)return!1;if(n)return i[o][2];if(s=t+1,!i[o][1].test(u))for(;r>s&&!(e.tShift[s]<e.blkIndent);s++)if(l=e.bMarks[s]+e.tShift[s],c=e.eMarks[s],u=e.src.slice(l,c),i[o][1].test(u)){0!==u.length&&s++;break}return e.line=s,a=e.push("html_block","",0),a.map=[t,s],a.content=e.getLines(t,s,e.blkIndent,!0),!0}},{"../common/html_blocks":66,"../common/html_re":67}],89:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,i,s,a,u=t+1;return u>=r?!1:e.tShift[u]<e.blkIndent?!1:e.tShift[u]-e.blkIndent>3?!1:(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],o>=i?!1:(n=e.src.charCodeAt(o),45!==n&&61!==n?!1:(o=e.skipChars(o,n),o=e.skipSpaces(o),i>o?!1:(o=e.bMarks[t]+e.tShift[t],e.line=u+1,a=61===n?1:2,s=e.push("heading_open","h"+String(a),1),s.markup=String.fromCharCode(n),s.map=[t,e.line],s=e.push("inline","",0),s.content=e.src.slice(o,e.eMarks[t]).trim(),s.map=[t,e.line-1],s.children=[],s=e.push("heading_close","h"+String(a),-1),s.markup=String.fromCharCode(n),!0))))}},{}],90:[function(e,t,r){"use strict";function n(e,t){var r,n,o;return n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],r=e.src.charCodeAt(n++),42!==r&&45!==r&&43!==r?-1:o>n&&32!==e.src.charCodeAt(n)?-1:n}function o(e,t){var r,n=e.bMarks[t]+e.tShift[t],o=n,i=e.eMarks[t];if(o+1>=i)return-1;if(r=e.src.charCodeAt(o++),48>r||r>57)return-1;for(;;){if(o>=i)return-1;r=e.src.charCodeAt(o++);{if(!(r>=48&&57>=r)){if(41===r||46===r)break;return-1}if(o-n>=10)return-1}}return i>o&&32!==e.src.charCodeAt(o)?-1:o}function i(e,t){var r,n,o=e.level+2;for(r=t+2,n=e.tokens.length-2;n>r;r++)e.tokens[r].level===o&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}t.exports=function(e,t,r,s){var a,u,l,c,p,f,h,d,m,g,v,y,k,b,w,_,x,C,M,S,A,O,P,T=!0;if((d=o(e,t))>=0)k=!0;else{if(!((d=n(e,t))>=0))return!1;k=!1}if(y=e.src.charCodeAt(d-1),s)return!0;for(w=e.tokens.length,k?(h=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(h,d-h-1)),S=e.push("ordered_list_open","ol",1),1!==v&&(S.attrs=[["start",v]])):S=e.push("bullet_list_open","ul",1),S.map=x=[t,0],S.markup=String.fromCharCode(y),a=t,_=!1,M=e.md.block.ruler.getRules("list");!(!(r>a)||(b=e.skipSpaces(d),m=e.eMarks[a],g=b>=m?1:b-d,g>4&&(g=1),u=d-e.bMarks[a]+g,S=e.push("list_item_open","li",1),S.markup=String.fromCharCode(y),S.map=C=[t,0],c=e.blkIndent,p=e.tight,l=e.tShift[t],f=e.parentType,e.tShift[t]=b-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.md.block.tokenize(e,t,r,!0),(!e.tight||_)&&(T=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[t]=l,e.tight=p,e.parentType=f,S=e.push("list_item_close","li",-1),S.markup=String.fromCharCode(y),a=t=e.line,C[1]=a,b=e.bMarks[t],a>=r)||e.isEmpty(a)||e.tShift[a]<e.blkIndent);){for(P=!1,A=0,O=M.length;O>A;A++)if(M[A](e,a,r,!0)){P=!0;break}if(P)break;if(k){if(d=o(e,a),0>d)break}else if(d=n(e,a),0>d)break;if(y!==e.src.charCodeAt(d-1))break}return S=k?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),S.markup=String.fromCharCode(y),x[1]=a,e.line=a,T&&i(e,w),!0}},{}],91:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r,n,o,i,s,a=t+1,u=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.tShift[a]-e.blkIndent>3||e.tShift[a]<0)){for(n=!1,o=0,i=u.length;i>o;o++)if(u[o](e,a,l,!0)){n=!0;break}if(n)break}return r=e.getLines(t,a,e.blkIndent,!1).trim(),e.line=a,s=e.push("paragraph_open","p",1),s.map=[t,e.line],s=e.push("inline","",0),s.content=r,s.map=[t,e.line],s.children=[],s=e.push("paragraph_close","p",-1),!0}},{}],92:[function(e,t,r){"use strict";var n=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference;t.exports=function(e,t,r,s){var a,u,l,c,p,f,h,d,m,g,v,y,k,b,w,_=0,x=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],M=t+1;if(91!==e.src.charCodeAt(x))return!1;for(;++x<C;)if(93===e.src.charCodeAt(x)&&92!==e.src.charCodeAt(x-1)){if(x+1===C)return!1;if(58!==e.src.charCodeAt(x+1))return!1;break}for(c=e.lineMax,b=e.md.block.ruler.getRules("reference");c>M&&!e.isEmpty(M);M++)if(!(e.tShift[M]-e.blkIndent>3||e.tShift[M]<0)){for(k=!1,f=0,h=b.length;h>f;f++)if(b[f](e,M,c,!0)){k=!0;break}if(k)break}for(y=e.getLines(t,M,e.blkIndent,!1).trim(),C=y.length,x=1;C>x;x++){if(a=y.charCodeAt(x),91===a)return!1;if(93===a){m=x;break}10===a?_++:92===a&&(x++,C>x&&10===y.charCodeAt(x)&&_++)}if(0>m||58!==y.charCodeAt(m+1))return!1;for(x=m+2;C>x;x++)if(a=y.charCodeAt(x),10===a)_++;else if(32!==a)break;if(g=n(y,x,C),!g.ok)return!1;if(p=e.md.normalizeLink(g.str),!e.md.validateLink(p))return!1;for(x=g.pos,_+=g.lines,u=x,l=_,v=x;C>x;x++)if(a=y.charCodeAt(x),10===a)_++;else if(32!==a)break;for(g=o(y,x,C),C>x&&v!==x&&g.ok?(w=g.str,x=g.pos,_+=g.lines):(w="",x=u,_=l);C>x&&32===y.charCodeAt(x);)x++;if(C>x&&10!==y.charCodeAt(x)&&w)for(w="",x=u,_=l;C>x&&32===y.charCodeAt(x);)x++;return C>x&&10!==y.charCodeAt(x)?!1:(d=i(y.slice(1,m)))?s?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[d]&&(e.env.references[d]={title:w,href:p}),e.line=t+_+1,!0):!1}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_title":73}],93:[function(e,t,r){"use strict";function n(e,t,r,n){var o,i,s,a,u,l,c;for(this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,l=0,c=!1,s=a=l=0,u=i.length;u>a;a++){if(o=i.charCodeAt(a),!c){if(32===o){l++;continue}c=!0}(10===o||a===u-1)&&(10!==o&&a++,this.bMarks.push(s),this.eMarks.push(a),this.tShift.push(l),c=!1,l=0,s=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}var o=e("../token");n.prototype.push=function(e,t,r){var n=new o(e,t,r);return n.block=!0,0>r&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;t>e&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},n.prototype.skipSpaces=function(e){for(var t=this.src.length;t>e&&32===this.src.charCodeAt(e);e++);return e},n.prototype.skipChars=function(e,t){for(var r=this.src.length;r>e&&this.src.charCodeAt(e)===t;e++);return e},n.prototype.skipCharsBack=function(e,t,r){if(r>=e)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,t,r,n){var o,i,s,a,u,l=e;if(e>=t)return"";if(l+1===t)return i=this.bMarks[l]+Math.min(this.tShift[l],r),s=this.eMarks[t-1]+(n?1:0),this.src.slice(i,s);for(a=new Array(t-e),o=0;t>l;l++,o++)u=this.tShift[l],u>r&&(u=r),0>u&&(u=0),i=this.bMarks[l]+u,s=t>l+1||n?this.eMarks[l]+1:this.eMarks[l],a[o]=this.src.slice(i,s);return a.join("")},n.prototype.Token=o,t.exports=n},{"../token":114}],94:[function(e,t,r){"use strict";function n(e,t){var r=e.bMarks[t]+e.blkIndent,n=e.eMarks[t];return e.src.substr(r,n-r)}function o(e){var t,r=[],n=0,o=e.length,i=0,s=0,a=!1,u=0;for(t=e.charCodeAt(n);o>n;)96===t&&i%2===0?(a=!a,u=n):124!==t||i%2!==0||a?92===t?i++:i=0:(r.push(e.substring(s,n)),s=n+1),n++,n===o&&a&&(a=!1,n=u+1),t=e.charCodeAt(n);return r.push(e.substring(s)),r}t.exports=function(e,t,r,i){var s,a,u,l,c,p,f,h,d,m,g;if(t+2>r)return!1;if(c=t+1,e.tShift[c]<e.blkIndent)return!1;if(u=e.bMarks[c]+e.tShift[c],u>=e.eMarks[c])return!1;if(s=e.src.charCodeAt(u),124!==s&&45!==s&&58!==s)return!1;if(a=n(e,t+1),!/^[-:| ]+$/.test(a))return!1;if(p=a.split("|"),p.length<2)return!1;for(h=[],l=0;l<p.length;l++){if(d=p[l].trim(),!d){if(0===l||l===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(d))return!1;58===d.charCodeAt(d.length-1)?h.push(58===d.charCodeAt(0)?"center":"right"):58===d.charCodeAt(0)?h.push("left"):h.push("")}if(a=n(e,t).trim(),-1===a.indexOf("|"))return!1;if(p=o(a.replace(/^\||\|$/g,"")),h.length!==p.length)return!1;if(i)return!0;for(f=e.push("table_open","table",1),f.map=m=[t,0],f=e.push("thead_open","thead",1),f.map=[t,t+1],f=e.push("tr_open","tr",1),f.map=[t,t+1],l=0;l<p.length;l++)f=e.push("th_open","th",1),f.map=[t,t+1],h[l]&&(f.attrs=[["style","text-align:"+h[l]]]),f=e.push("inline","",0),f.content=p[l].trim(),f.map=[t,t+1],f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),f=e.push("tbody_open","tbody",1),f.map=g=[t+2,0],c=t+2;r>c&&!(e.tShift[c]<e.blkIndent)&&(a=n(e,c).trim(),-1!==a.indexOf("|"));c++){for(p=o(a.replace(/^\||\|$/g,"")),p.length=h.length,f=e.push("tr_open","tr",1),l=0;l<p.length;l++)f=e.push("td_open","td",1),h[l]&&(f.attrs=[["style","text-align:"+h[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),m[1]=g[1]=c,e.line=c,!0}},{}],95:[function(e,t,r){"use strict";t.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.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)}},{}],96:[function(e,t,r){"use strict";t.exports=function(e){var t,r,n,o=e.tokens;for(r=0,n=o.length;n>r;r++)t=o[r],"inline"===t.type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},{}],97:[function(e,t,r){"use strict";function n(e){return/^<a[>\s]/i.test(e)}function o(e){return/^<\/a\s*>/i.test(e)}var i=e("../common/utils").arrayReplaceAt;t.exports=function(e){var t,r,s,a,u,l,c,p,f,h,d,m,g,v,y,k,b,w=e.tokens;if(e.md.options.linkify)for(r=0,s=w.length;s>r;r++)if("inline"===w[r].type&&e.md.linkify.pretest(w[r].content))for(a=w[r].children,g=0,t=a.length-1;t>=0;t--)if(l=a[t],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,o(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(f=l.content,b=e.md.linkify.match(f),c=[],m=l.level,d=0,p=0;p<b.length;p++)v=b[p].url,y=e.md.normalizeLink(v),e.md.validateLink(y)&&(k=b[p].text,k=b[p].schema?"mailto:"!==b[p].schema||/^mailto:/i.test(k)?e.md.normalizeLinkText(k):e.md.normalizeLinkText("mailto:"+k).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+k).replace(/^http:\/\//,""),h=b[p].index,h>d&&(u=new e.Token("text","",0),u.content=f.slice(d,h),u.level=m,c.push(u)),u=new e.Token("link_open","a",1),u.attrs=[["href",y]],u.level=m++,u.markup="linkify",u.info="auto",c.push(u),u=new e.Token("text","",0),u.content=k,u.level=m,c.push(u),u=new e.Token("link_close","a",-1),u.level=--m,u.markup="linkify",u.info="auto",c.push(u),d=b[p].lastIndex);d<f.length&&(u=new e.Token("text","",0),u.content=f.slice(d),u.level=m,c.push(u)),w[r].children=a=i(a,t,c)}}else for(t--;a[t].level!==l.level&&"link_open"!==a[t].type;)t--}},{"../common/utils":69}],98:[function(e,t,r){"use strict";var n=/[\n\t]/g,o=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,i=/\u0000/g;t.exports=function(e){var t,r,s;t=e.src.replace(o,"\n"),t=t.replace(i,"�"),t.indexOf("   ")>=0&&(r=0,s=0,t=t.replace(n,function(e,n){var o;return 10===t.charCodeAt(n)?(r=n+1,s=0,e):(o="    ".slice((n-r-s)%4),s=n-r+1,o)})),e.src=t}},{}],99:[function(e,t,r){"use strict";function n(e,t){return l[t.toLowerCase()]}function o(e){var t,r;for(t=e.length-1;t>=0;t--)r=e[t],"text"===r.type&&(r.content=r.content.replace(u,n))}function i(e){var t,r;for(t=e.length-1;t>=0;t--)r=e[t],"text"===r.type&&s.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var s=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,u=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};t.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)&&o(e.tokens[t].children),s.test(e.tokens[t].content)&&i(e.tokens[t].children))}},{}],100:[function(e,t,r){"use strict";function n(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}function o(e,t){var r,o,u,p,f,h,d,m,g,v,y,k,b,w,_,x,C,M,S,A,O;for(S=[],r=0;r<e.length;r++){for(o=e[r],d=e[r].level,C=S.length-1;C>=0&&!(S[C].level<=d);C--);if(S.length=C+1,"text"===o.type){u=o.content,f=0,h=u.length;e:for(;h>f&&(l.lastIndex=f,p=l.exec(u));)if(_=x=!0,f=p.index+1,M="'"===p[0],g=p.index-1>=0?u.charCodeAt(p.index-1):32,v=h>f?u.charCodeAt(f):32,y=a(g)||s(String.fromCharCode(g)),k=a(v)||s(String.fromCharCode(v)),b=i(g),w=i(v),w?_=!1:k&&(b||y||(_=!1)),b?x=!1:y&&(w||k||(x=!1)),34===v&&'"'===p[0]&&g>=48&&57>=g&&(x=_=!1),_&&x&&(_=!1,x=k),_||x){if(x)for(C=S.length-1;C>=0&&(m=S[C],!(S[C].level<d));C--)if(m.single===M&&S[C].level===d){m=S[C],M?(A=t.md.options.quotes[2],O=t.md.options.quotes[3]):(A=t.md.options.quotes[0],O=t.md.options.quotes[1]),o.content=n(o.content,p.index,O),e[m.token].content=n(e[m.token].content,m.pos,A),f+=O.length-1,m.token===r&&(f+=A.length-1),u=o.content,h=u.length,S.length=C;continue e}_?S.push({token:r,pos:p.index,single:M,level:d}):x&&M&&(o.content=n(o.content,p.index,c))}else M&&(o.content=n(o.content,p.index,c))}}}var i=e("../common/utils").isWhiteSpace,s=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct,u=/['"]/,l=/['"]/g,c="’";t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&u.test(e.tokens[t].content)&&o(e.tokens[t].children,e)}},{"../common/utils":69}],101:[function(e,t,r){"use strict";function n(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}var o=e("../token");n.prototype.Token=o,t.exports=n},{"../token":114}],102:[function(e,t,r){"use strict";var n=e("../common/url_schemas"),o=/^<([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])?)*)>/,i=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;t.exports=function(e,t){var r,s,a,u,l,c,p=e.pos;return 60!==e.src.charCodeAt(p)?!1:(r=e.src.slice(p),r.indexOf(">")<0?!1:i.test(r)?(s=r.match(i),n.indexOf(s[1].toLowerCase())<0?!1:(u=s[0].slice(1,-1),l=e.md.normalizeLink(u),e.md.validateLink(l)?(t||(c=e.push("link_open","a",1),c.attrs=[["href",l]],c=e.push("text","",0),c.content=e.md.normalizeLinkText(u),c=e.push("link_close","a",-1)),e.pos+=s[0].length,!0):!1)):o.test(r)?(a=r.match(o),u=a[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+u),e.md.validateLink(l)?(t||(c=e.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=e.push("text","",0),c.content=e.md.normalizeLinkText(u),c=e.push("link_close","a",-1),c.markup="autolink",c.info="auto"),e.pos+=a[0].length,!0):!1):!1)}},{"../common/url_schemas":68}],103:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,o,i,s,a,u=e.pos,l=e.src.charCodeAt(u);if(96!==l)return!1;for(r=u,u++,n=e.posMax;n>u&&96===e.src.charCodeAt(u);)u++;for(o=e.src.slice(r,u),i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;n>s&&96===e.src.charCodeAt(s);)s++;if(s-i===o.length)return t||(a=e.push("code_inline","code",0),a.markup=o,a.content=e.src.slice(u,i).replace(/[ \n]+/g," ").trim()),e.pos=s,!0}return t||(e.pending+=o),e.pos+=o.length,!0}},{}],104:[function(e,t,r){"use strict";function n(e,t){var r,n,a,u,l,c,p,f,h,d=t,m=!0,g=!0,v=e.posMax,y=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):32;v>d&&e.src.charCodeAt(d)===y;)d++;return a=d-t,n=v>d?e.src.charCodeAt(d):32,p=s(r)||i(String.fromCharCode(r)),h=s(n)||i(String.fromCharCode(n)),c=o(r),f=o(n),f?m=!1:h&&(c||p||(m=!1)),c?g=!1:p&&(f||h||(g=!1)),95===y?(u=m&&(!g||p),l=g&&(!m||h)):(u=m,l=g),{can_open:u,can_close:l,delims:a}}var o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct;t.exports=function(e,t){var r,o,i,s,a,u,l,c,p=e.posMax,f=e.pos,h=e.src.charCodeAt(f);if(95!==h&&42!==h)return!1;if(t)return!1;if(l=n(e,f),r=l.delims,!l.can_open)return e.pos+=r,e.pending+=e.src.slice(f,e.pos),!0;for(e.pos=f+r,u=[r];e.pos<p;)if(e.src.charCodeAt(e.pos)!==h)e.md.inline.skipToken(e);else{if(l=n(e,e.pos),o=l.delims,l.can_close){for(s=u.pop(),a=o;s!==a;){if(s>a){u.push(s-a);break}if(a-=s,0===u.length)break;e.pos+=s,s=u.pop()}if(0===u.length){r=s,i=!0;break}e.pos+=o;continue}l.can_open&&u.push(o),e.pos+=o}if(!i)return e.pos=f,!1;for(e.posMax=e.pos,e.pos=f+r,o=r;o>1;o-=2)c=e.push("strong_open","strong",1),c.markup=String.fromCharCode(h)+String.fromCharCode(h);for(o%2&&(c=e.push("em_open","em",1),c.markup=String.fromCharCode(h)),e.md.inline.tokenize(e),o%2&&(c=e.push("em_close","em",-1),c.markup=String.fromCharCode(h)),o=r;o>1;o-=2)c=e.push("strong_close","strong",-1),c.markup=String.fromCharCode(h)+String.fromCharCode(h);return e.pos=e.posMax+r,e.posMax=p,!0}},{"../common/utils":69}],105:[function(e,t,r){"use strict";var n=e("../common/entities"),o=e("../common/utils").has,i=e("../common/utils").isValidEntityCode,s=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(e,t){var r,l,c,p=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(f>p+1)if(r=e.src.charCodeAt(p+1),35===r){if(c=e.src.slice(p).match(a))return t||(l="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=s(i(l)?l:65533)),e.pos+=c[0].length,!0}else if(c=e.src.slice(p).match(u),c&&o(n,c[1]))return t||(e.pending+=n[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},{"../common/entities":65,"../common/utils":69}],106:[function(e,t,r){"use strict";for(var n=[],o=0;256>o;o++)n.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){n[e.charCodeAt(0)]=1}),t.exports=function(e,t){var r,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(r=e.src.charCodeAt(o),256>r&&0!==n[r])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===r){for(t||e.push("hardbreak","br",0),o++;i>o&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},{}],107:[function(e,t,r){"use strict";function n(e){var t=32|e;return t>=97&&122>=t}var o=e("../common/html_re").HTML_TAG_RE;t.exports=function(e,t){var r,i,s,a,u=e.pos;return e.md.options.html?(s=e.posMax,60!==e.src.charCodeAt(u)||u+2>=s?!1:(r=e.src.charCodeAt(u+1),(33===r||63===r||47===r||n(r))&&(i=e.src.slice(u).match(o))?(t||(a=e.push("html_inline","",0),a.content=e.src.slice(u,u+i[0].length)),e.pos+=i[0].length,!0):!1)):!1}},{"../common/html_re":67}],108:[function(e,t,r){"use strict";var n=e("../helpers/parse_link_label"),o=e("../helpers/parse_link_destination"),i=e("../helpers/parse_link_title"),s=e("../common/utils").normalizeReference;t.exports=function(e,t){var r,a,u,l,c,p,f,h,d,m,g,v,y="",k=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,l=n(e,e.pos+1,!1),0>l)return!1;if(p=l+1,b>p&&40===e.src.charCodeAt(p)){for(p++;b>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);if(p>=b)return!1;for(v=p,h=o(e.src,p,e.posMax),h.ok&&(y=e.md.normalizeLink(h.str),e.md.validateLink(y)?p=h.pos:y=""),v=p;b>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);if(h=i(e.src,p,e.posMax),b>p&&v!==p&&h.ok)for(d=h.str,p=h.pos;b>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);else d="";if(p>=b||41!==e.src.charCodeAt(p))return e.pos=k,!1;p++}else{if("undefined"==typeof e.env.references)return!1;for(;b>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);if(b>p&&91===e.src.charCodeAt(p)?(v=p+1,p=n(e,p),p>=0?u=e.src.slice(v,p++):p=l+1):p=l+1,u||(u=e.src.slice(c,l)),f=e.env.references[s(u)],!f)return e.pos=k,!1;y=f.href,d=f.title}if(!t){e.pos=c,e.posMax=l;var w=new e.md.inline.State(e.src.slice(c,l),e.md,e.env,g=[]);w.md.inline.tokenize(w),m=e.push("image","img",0),m.attrs=r=[["src",y],["alt",""]],m.children=g,d&&r.push(["title",d]);
-}return e.pos=p,e.posMax=b,!0}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_label":72,"../helpers/parse_link_title":73}],109:[function(e,t,r){"use strict";var n=e("../helpers/parse_link_label"),o=e("../helpers/parse_link_destination"),i=e("../helpers/parse_link_title"),s=e("../common/utils").normalizeReference;t.exports=function(e,t){var r,a,u,l,c,p,f,h,d,m,g="",v=e.pos,y=e.posMax,k=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(c=e.pos+1,l=n(e,e.pos,!0),0>l)return!1;if(p=l+1,y>p&&40===e.src.charCodeAt(p)){for(p++;y>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);if(p>=y)return!1;for(k=p,f=o(e.src,p,e.posMax),f.ok&&(g=e.md.normalizeLink(f.str),e.md.validateLink(g)?p=f.pos:g=""),k=p;y>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);if(f=i(e.src,p,e.posMax),y>p&&k!==p&&f.ok)for(d=f.str,p=f.pos;y>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);else d="";if(p>=y||41!==e.src.charCodeAt(p))return e.pos=v,!1;p++}else{if("undefined"==typeof e.env.references)return!1;for(;y>p&&(a=e.src.charCodeAt(p),32===a||10===a);p++);if(y>p&&91===e.src.charCodeAt(p)?(k=p+1,p=n(e,p),p>=0?u=e.src.slice(k,p++):p=l+1):p=l+1,u||(u=e.src.slice(c,l)),h=e.env.references[s(u)],!h)return e.pos=v,!1;g=h.href,d=h.title}return t||(e.pos=c,e.posMax=l,m=e.push("link_open","a",1),m.attrs=r=[["href",g]],d&&r.push(["title",d]),e.md.inline.tokenize(e),m=e.push("link_close","a",-1)),e.pos=p,e.posMax=y,!0}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_label":72,"../helpers/parse_link_title":73}],110:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;for(r=e.pending.length-1,n=e.posMax,t||(r>=0&&32===e.pending.charCodeAt(r)?r>=1&&32===e.pending.charCodeAt(r-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)),o++;n>o&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}},{}],111:[function(e,t,r){"use strict";function n(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={}}var o=e("../token");n.prototype.pushPending=function(){var e=new o("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,t,r){this.pending&&this.pushPending();var n=new o(e,t,r);return 0>r&&this.level--,n.level=this.level,r>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.Token=o,t.exports=n},{"../token":114}],112:[function(e,t,r){"use strict";function n(e,t){var r,n,a,u,l,c,p,f=t,h=!0,d=!0,m=e.posMax,g=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):32;m>f&&e.src.charCodeAt(f)===g;)f++;return f>=m&&(h=!1),a=f-t,n=m>f?e.src.charCodeAt(f):32,l=s(r)||i(String.fromCharCode(r)),p=s(n)||i(String.fromCharCode(n)),u=o(r),c=o(n),c?h=!1:p&&(u||l||(h=!1)),u?d=!1:l&&(c||p||(d=!1)),{can_open:h,can_close:d,delims:a}}var o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct;t.exports=function(e,t){var r,o,i,s,a,u,l,c=e.posMax,p=e.pos,f=e.src.charCodeAt(p);if(126!==f)return!1;if(t)return!1;if(u=n(e,p),r=u.delims,!u.can_open)return e.pos+=r,e.pending+=e.src.slice(p,e.pos),!0;if(a=Math.floor(r/2),0>=a)return!1;for(e.pos=p+r;e.pos<c;)if(e.src.charCodeAt(e.pos)!==f)e.md.inline.skipToken(e);else{if(u=n(e,e.pos),o=u.delims,i=Math.floor(o/2),u.can_close){if(i>=a){e.pos+=o-2,s=!0;break}a-=i,e.pos+=o;continue}u.can_open&&(a+=i),e.pos+=o}return s?(e.posMax=e.pos,e.pos=p+2,l=e.push("s_open","s",1),l.markup="~~",e.md.inline.tokenize(e),l=e.push("s_close","s",-1),l.markup="~~",e.pos=e.posMax+2,e.posMax=c,!0):(e.pos=p,!1)}},{"../common/utils":69}],113:[function(e,t,r){"use strict";function n(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}}t.exports=function(e,t){for(var r=e.pos;r<e.posMax&&!n(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},{}],114:[function(e,t,r){"use strict";function n(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var t,r,n;if(!this.attrs)return-1;for(t=this.attrs,r=0,n=t.length;n>r;r++)if(t[r][0]===e)return r;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.exports=n},{}],115:[function(e,t,r){"use strict";function n(e){var t,r,n=i[e];if(n)return n;for(n=i[e]=[],t=0;128>t;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)r=e.charCodeAt(t),n[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}function o(e,t){var r;return"string"!=typeof t&&(t=o.defaultChars),r=n(t),e.replace(/(%[a-f0-9]{2})+/gi,function(e){var t,n,o,i,s,a,u,l="";for(t=0,n=e.length;n>t;t+=3)o=parseInt(e.slice(t+1,t+3),16),128>o?l+=r[o]:192===(224&o)&&n>t+3&&(i=parseInt(e.slice(t+4,t+6),16),128===(192&i))?(u=o<<6&1984|63&i,l+=128>u?"��":String.fromCharCode(u),t+=3):224===(240&o)&&n>t+6&&(i=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),128===(192&i)&&128===(192&s))?(u=o<<12&61440|i<<6&4032|63&s,l+=2048>u||u>=55296&&57343>=u?"���":String.fromCharCode(u),t+=6):240===(248&o)&&n>t+9&&(i=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),a=parseInt(e.slice(t+10,t+12),16),128===(192&i)&&128===(192&s)&&128===(192&a))?(u=o<<18&1835008|i<<12&258048|s<<6&4032|63&a,65536>u||u>1114111?l+="����":(u-=65536,l+=String.fromCharCode(55296+(u>>10),56320+(1023&u))),t+=9):l+="�";return l})}var i={};o.defaultChars=";/?:@&=+$,#",o.componentChars="",t.exports=o},{}],116:[function(e,t,r){"use strict";function n(e){var t,r,n=i[e];if(n)return n;for(n=i[e]=[],t=0;128>t;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}function o(e,t,r){var i,s,a,u,l,c="";for("string"!=typeof t&&(r=t,t=o.defaultChars),"undefined"==typeof r&&(r=!0),l=n(t),i=0,s=e.length;s>i;i++)if(a=e.charCodeAt(i),r&&37===a&&s>i+2&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3)))c+=e.slice(i,i+3),i+=2;else if(128>a)c+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&s>i+1&&(u=e.charCodeAt(i+1),u>=56320&&57343>=u)){c+=encodeURIComponent(e[i]+e[i+1]),i++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[i]);return c}var i={};o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",t.exports=o},{}],117:[function(e,t,r){"use strict";t.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",t+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},{}],118:[function(e,t,r){"use strict";t.exports.encode=e("./encode"),t.exports.decode=e("./decode"),t.exports.format=e("./format"),t.exports.parse=e("./parse")},{"./decode":115,"./encode":116,"./format":117,"./parse":119}],119:[function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function o(e,t){if(e&&e instanceof n)return e;var r=new n;return r.parse(e,t),r}var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["<",">",'"',"`"," ","\r","\n","       "],l=["{","}","|","\\","^","`"].concat(u),c=["'"].concat(l),p=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,t){var r,n,o,s,u,l=e;if(l=l.trim(),!t&&1===e.split("#").length){var c=a.exec(l);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var y=i.exec(l);if(y&&(y=y[0],o=y.toLowerCase(),this.protocol=y,l=l.substr(y.length)),(t||y||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(u="//"===l.substr(0,2),!u||y&&g[y]||(l=l.substr(2),this.slashes=!0)),!g[y]&&(u||y&&!v[y])){var k=-1;for(r=0;r<f.length;r++)s=l.indexOf(f[r]),-1!==s&&(-1===k||k>s)&&(k=s);var b,w;for(w=-1===k?l.lastIndexOf("@"):l.lastIndexOf("@",k),-1!==w&&(b=l.slice(0,w),l=l.slice(w+1),this.auth=b),k=-1,r=0;r<p.length;r++)s=l.indexOf(p[r]),-1!==s&&(-1===k||k>s)&&(k=s);-1===k&&(k=l.length),":"===l[k-1]&&k--;var _=l.slice(0,k);l=l.slice(k),this.parseHost(_),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var C=this.hostname.split(/\./);for(r=0,n=C.length;n>r;r++){var M=C[r];if(M&&!M.match(d)){for(var S="",A=0,O=M.length;O>A;A++)S+=M.charCodeAt(A)>127?"x":M[A];if(!S.match(d)){var P=C.slice(0,r),T=C.slice(r+1),E=M.match(m);E&&(P.push(E[1]),T.unshift(E[2])),T.length&&(l=T.join(".")+l),this.hostname=P.join(".");break}}}}this.hostname.length>h&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=l.indexOf("#");-1!==D&&(this.hash=l.substr(D),l=l.slice(0,D));var j=l.indexOf("?");return-1!==j&&(this.search=l.substr(j),l=l.slice(0,j)),l&&(this.pathname=l),v[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var t=s.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.exports=o},{}],120:[function(e,t,r){t.exports=/[\0-\x1F\x7F-\x9F]/},{}],121:[function(e,t,r){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],122:[function(e,t,r){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/},{}],123:[function(e,t,r){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],124:[function(e,t,r){t.exports.Any=e("./properties/Any/regex"),t.exports.Cc=e("./categories/Cc/regex"),t.exports.Cf=e("./categories/Cf/regex"),t.exports.P=e("./categories/P/regex"),t.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":120,"./categories/Cf/regex":121,"./categories/P/regex":122,"./categories/Z/regex":123,"./properties/Any/regex":125}],125:[function(e,t,r){t.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}]},{},[1]);
\ No newline at end of file
+!function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return o(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){function n(e,t,r){var n=document.createElement("div");n.className="ProseMirror-icon";var o=document.createElement("i");o.setAttribute("class","fa fa-fw "+r);var i=e.active(t);return(i||e.spec.invert)&&n.classList.add("ProseMirror-menu-active"),n.appendChild(o),n}function o(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function i(e){return o()?(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),!0):(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),!1)}attachDocumentEditor=function(t,r){var s=e("./prosemirror/dist/edit");e("./prosemirror/dist/inputrules/autoinput"),e("./prosemirror/dist/menu/menubar"),e("./prosemirror/dist/markdown");var a=e("./prosemirror/dist/menu/menu"),u=document.querySelector("#editor");u.style.display="none";var l=new a.MenuCommandGroup("gitblitCommands"),c=new a.MenuCommandGroup("viewCommands"),f=new a.MenuCommandGroup("textCommands"),p=new a.MenuCommandGroup("insertCommands"),h=[l,c,f,a.inlineGroup,a.blockGroup,a.historyGroup,p];const d=Object.create(null);d.GitblitCommit={label:"GitblitCommit",run:function(){r.modal({show:!0}),t.value=m.getContent("markdown")},menu:{group:"gitblitCommands",rank:10,display:{render:function(e,t){return n(e,t,"fa-save")}}}},d.FullScreen={label:"Toggle Fullscreen",derive:"toggle",run:function(e){var t=window.scrollY,r=[document.querySelector("div.repositorynavbar"),document.querySelector("div.navbar"),document.querySelector("div.docnav")],n=r.reduce(function(e,t){return e+t.offsetHeight},0);r.forEach(function(e){e.classList.toggle("forceHide")}),i(document.documentElement)?n-=60:n=60,e.signal("commandsChanged"),setTimeout(function(){window.scrollTo(0,Math.max(0,t-n))},100)},menu:{group:"viewCommands",rank:11,display:{render:function(e,t){return n(e,t,"fa-arrows-alt")}}},active:function(e){return o()?!0:!1}},d.heading1={derive:"toggle",run:function(e){var t=e.selection,r=t.from,n=t.to,o={name:"make",level:1},i=e.doc.path(r.path);return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(r,n,e.schema.nodes.paragraph,{}).apply(e.apply.scroll):e.tr.setBlockType(r,n,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.path(e.selection.from.path);return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:1})?!0:!1},menu:{group:"textCommands",rank:1,display:{render:function(e,t){return n(e,t,"fa-header fa-header-x fa-header-1")}}},select:function(){return!0}},d.heading2={derive:"toggle",run:function(e){var t=e.selection,r=t.from,n=t.to,o={name:"make",level:2},i=e.doc.path(r.path);return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(r,n,e.schema.nodes.paragraph,{}).apply(e.apply.scroll):e.tr.setBlockType(r,n,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.path(e.selection.from.path);return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:2})?!0:!1},menu:{group:"textCommands",rank:2,display:{render:function(e,t){return n(e,t,"fa-header fa-header-x fa-header-2")}}},select:function(){return!0}},d.heading3={derive:"toggle",run:function(e){var t=e.selection,r=t.from,n=t.to,o={name:"make",level:3},i=e.doc.path(r.path);return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(r,n,e.schema.nodes.paragraph,{}).apply(e.apply.scroll):e.tr.setBlockType(r,n,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.path(e.selection.from.path);return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:3})?!0:!1},menu:{group:"textCommands",rank:3,display:{render:function(e,t){return n(e,t,"fa-header fa-header-x fa-header-3")}}},select:function(){return!0}},d["strong:toggle"]={menu:{group:"textCommands",rank:4,display:{render:function(e,t){return n(e,t,"fa-bold")}}},select:function(){return!0}},d["em:toggle"]={menu:{group:"textCommands",rank:5,display:{render:function(e,t){return n(e,t,"fa-italic")}}},select:function(){return!0}},d["code:toggle"]={menu:{group:"textCommands",rank:6,display:{render:function(e,t){return n(e,t,"fa-code")}}},select:function(){return!0}},d["image:insert"]={menu:{group:"insertCommands",rank:1,display:{render:function(e,t){return n(e,t,"fa-picture-o")}}}};var m=window.pm=new s.ProseMirror({place:document.querySelector("#visualEditor"),autoInput:!0,doc:u.value,menuBar:{"float":!0,content:h},commands:s.CommandSet["default"].update(d),docFormat:"markdown"}),g=document.querySelector(".ProseMirror").offsetTop,v=!1;window.addEventListener("scroll",function(){var e=window.scrollY;v||window.requestAnimationFrame(function(){!o()&&e>g?document.querySelector(".ProseMirror-menubar").classList.add("scrolling"):document.querySelector(".ProseMirror-menubar").classList.remove("scrolling"),v=!1}),v=!0})},commitChanges=function(){document.querySelector("form#documentEditor").submit()}},{"./prosemirror/dist/edit":13,"./prosemirror/dist/inputrules/autoinput":26,"./prosemirror/dist/markdown":29,"./prosemirror/dist/menu/menu":32,"./prosemirror/dist/menu/menubar":33}],2:[function(e,t,r){(function(e){!function(n){function o(e){throw new RangeError(j[e])}function i(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function s(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(D,".");var o=e.split("."),s=i(o,t).join(".");return n+s}function a(e){for(var t,r,n=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function u(e){return i(e,function(e){var t="";return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function l(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:_}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function f(e,t,r){var n=0;for(e=r?z(e/S):e>>1,e+=z(e/t);e>q*C>>1;n+=_)e=z(e/q);return z(n+(q+1)*e/(e+M))}function p(e){var t,r,n,i,s,a,c,p,h,d,m=[],g=e.length,v=0,y=O,k=A;for(r=e.lastIndexOf(P),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(i=r>0?r+1:0;g>i;){for(s=v,a=1,c=_;i>=g&&o("invalid-input"),p=l(e.charCodeAt(i++)),(p>=_||p>z((w-v)/a))&&o("overflow"),v+=p*a,h=k>=c?x:c>=k+C?C:c-k,!(h>p);c+=_)d=_-h,a>z(w/d)&&o("overflow"),a*=d;t=m.length+1,k=f(v-s,t,0==s),z(v/t)>w-y&&o("overflow"),y+=z(v/t),v%=t,m.splice(v++,0,y)}return u(m)}function h(e){var t,r,n,i,s,u,l,p,h,d,m,g,v,y,k,b=[];for(e=a(e),g=e.length,t=O,r=0,s=A,u=0;g>u;++u)m=e[u],128>m&&b.push(N(m));for(n=i=b.length,i&&b.push(P);g>n;){for(l=w,u=0;g>u;++u)m=e[u],m>=t&&l>m&&(l=m);for(v=n+1,l-t>z((w-r)/v)&&o("overflow"),r+=(l-t)*v,t=l,u=0;g>u;++u)if(m=e[u],t>m&&++r>w&&o("overflow"),m==t){for(p=r,h=_;d=s>=h?x:h>=s+C?C:h-s,!(d>p);h+=_)k=p-d,y=_-d,b.push(N(c(d+k%y,0))),p=z(k/y);b.push(N(c(p,0))),s=f(r,v,n==i),r=0,++n}++r,++t}return b.join("")}function d(e){return s(e,function(e){return T.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return E.test(e)?"xn--"+h(e):e})}var g="object"==typeof r&&r&&!r.nodeType&&r,v="object"==typeof t&&t&&!t.nodeType&&t,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(n=y);var k,b,w=2147483647,_=36,x=1,C=26,M=38,S=700,A=72,O=128,P="-",T=/^xn--/,E=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=_-x,z=Math.floor,N=String.fromCharCode;if(k={version:"1.3.2",ucs2:{decode:a,encode:u},decode:p,encode:h,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return k});else if(g&&v)if(t.exports==g)v.exports=k;else for(b in k)k.hasOwnProperty(b)&&(g[b]=k[b]);else n.punycode=k}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,r){"use strict";function n(e,t){var r=document.createElement(e);if(t)for(var n in t)"style"==n?r.style.cssText=t[n]:null!=t[n]&&r.setAttribute(n,t[n]);for(var i=arguments.length,s=Array(i>2?i-2:0),a=2;i>a;a++)s[a-2]=arguments[a];for(var u=0;u<s.length;u++)o(s[u],r);return r}function o(e,t){if("string"==typeof e&&(e=document.createTextNode(e)),Array.isArray(e))for(var r=0;r<e.length;r++)o(e[r],t);else t.appendChild(e)}function i(e){l?l(e):setTimeout(e,10)}function s(e,t){return 1!=t.nodeType&&(t=t.parentNode),t&&e.contains(t)}function a(e){h?h.textContent+=e:p+=e}function u(){h||(h=document.createElement("style"),h.textContent="/* ProseMirror CSS */\n"+p,document.head.insertBefore(h,document.head.firstChild))}Object.defineProperty(r,"__esModule",{value:!0}),r.elt=n,r.requestAnimationFrame=i,r.contains=s,r.insertCSS=a,r.ensureCSSAdded=u;var l=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,c=/MSIE \d/.test(navigator.userAgent),f=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),p=(r.browser={mac:/Mac/.test(navigator.platform),ie_upto10:c,ie_11up:f,ie:c||f,gecko:/gecko\/\d/i.test(navigator.userAgent)},""),h=null},{}],4:[function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t,r){if("char"!=r&&"word"!=r)throw new m.AssertionError("Unknown motion unit: "+r);for(var n=null,o=0;;){if(0==t)return t;var i=e.chunkBefore(t),s=i.start,a=i.node;if(!a.isText)return n?t:t-1;if("char"==r)for(var u=t-s;u>0;u--){if(!(0,g.isExtendingChar)(a.text.charAt(u-1)))return t-1;t--}else if("word"==r)for(var u=t-s;u>0;u--){var l=(0,g.charCategory)(a.text.charAt(u-1));if(null==n||1==o&&"space"==n)n=l;else if(n!=l)return t;t--,o++}}}function i(e,t){var r=e.doc.path(t.path),o=r.child(t.offset-1),i=r.child(t.offset);if(!o.type.canContainContent(i.type)||e.tr.join(t).apply(e.apply.scroll)===!1){var s=void 0;if(i.isTextblock&&(s=o.type.findConnection(i.type))){var a=e.tr,u=t.move(1);if(a.step("ancestor",t,u,null,{types:[o.type].concat(n(s)),attrs:[o.attrs].concat(n(s.map(function(){return null})))}),a.join(u),a.join(t),a.apply(e.apply.scroll)!==!1)return}var l=(0,v.findSelectionFrom)(e.doc,t,1);return e.tr.lift(l.from,l.to).apply(e.apply.scroll)}}function s(e,t,r){if("char"!=r&&"word"!=r)throw new m.AssertionError("Unknown motion unit: "+r);for(var n=null,o=0;;){if(t==e.size)return t;var i=e.chunkAfter(t),s=i.start,a=i.node;if(!a.isText)return n?t:t+1;if("char"==r)for(var u=t-s;u<a.text.length;u++){if(!(0,g.isExtendingChar)(a.text.charAt(u+1)))return t+1;t++}else if("word"==r)for(var u=t-s;u<a.text.length;u++){var l=(0,g.charCategory)(a.text.charAt(u));if(null==n||1==o&&"space"==n)n=l;else if(n!=l)return t;t++,o++}}}function a(e){var t=e.selection,r=t.node,n=t.from;return r?(0,d.joinableBlocks)(e.doc,n)?n:null:(0,d.joinPoint)(e.doc,n,-1)}function u(e){var t=e.selection,r=t.node,n=t.to;return r?(0,d.joinableBlocks)(e.doc,n)?n:null:(0,d.joinPoint)(e.doc,n,1)}function l(e){var t=e.selection,r=0;if(t.node)return!!t.from.depth&&t.from.shorten();for(;r<t.head.depth&&r<t.anchor.depth&&t.head.path[r]==t.anchor.path[r];r++);return 0==r?!1:t.head.shorten(r-1)}function c(e,t){var r=e.selection,n=r.from,o=r.to,i=r.node,s=t>0?o:n;return(0,v.findSelectionFrom)(e.doc,i&&i.isBlock?s:s.shorten(null,t>0?1:0),t)}function f(e,t){var r=e.selection,n=r.empty,o=r.node,i=r.from,s=r.to;if(!n&&!o)return!1;if(o&&o.isInline)return e.setTextSelection(t>0?s:i),!0;var a=void 0;if(!o&&(a=e.doc.path(i.path))&&(t>0?i.offset<a.size:i.offset)){var u=t>0?a.chunkAfter(i.offset):a.chunkBefore(i.offset),l=u.node,f=u.start;return l.type.selectable&&f==i.offset-(t>0?0:1)?(e.setNodeSelection(0>t?i.move(-1):i),!0):!1}var p=c(e,t);return p&&(p instanceof v.NodeSelection||o)?(e.setSelectionDirect(p),!0):!1}function p(e,t){var r=e.selection,n=r.empty,o=r.node,i=r.from,s=r.to;if(!n&&!o)return!1;var a=!0;if((!o||o.isInline)&&(a=(0,v.verticalMotionLeavesTextblock)(e,t>0?s:i,t)),a){var u=c(e,t);if(u&&u instanceof v.NodeSelection)return e.setSelectionDirect(u),o||(e.sel.lastNonNodePos=i),!0}if(!o)return!1;if(o.isInline)return(0,y.setDOMSelectionToPos)(e,i),!1;var l=e.sel.lastNonNodePos,f=(0,v.findSelectionFrom)(e.doc,0>t?i:s,t);return l&&f&&h.Pos.samePath(l.path,f.from.path)?((0,y.setDOMSelectionToPos)(e,l),!1):(f&&e.setSelectionDirect(f),!0)}Object.defineProperty(r,"__esModule",{value:!0}),r.baseCommands=void 0;var h=e("../model"),d=e("../transform"),m=e("../util/error"),g=e("./char"),v=e("./selection"),y=e("./dompos"),k=r.baseCommands=Object.create(null);k.deleteSelection={label:"Delete the selection",run:function(e){return e.tr.replaceSelection().apply(e.apply.scroll)},keys:{all:["Backspace(10)","Delete(10)","Mod-Backspace(10)","Mod-Delete(10)"],mac:["Ctrl-H(10)","Alt-Backspace(10)","Ctrl-D(10)","Ctrl-Alt-Backspace(10)","Alt-Delete(10)","Alt-D(10)"]}},k.joinBackward={label:"Join with the block above",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset>0)return!1;for(var o=void 0,s=void 0,a=r.path.length-1;!o&&a>=0;a--)r.path[a]>0&&(s=r.shorten(a),o=e.doc.path(s.path).child(s.offset-1));return o?null==o.type.contains?e.tr["delete"](s.move(-1),s).apply(e.apply.scroll):i(e,s):e.tr.lift(r).apply(e.apply.scroll)},keys:["Backspace(30)","Mod-Backspace(30)"]},k.deleteCharBefore={label:"Delete a character before the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||0==r.offset)return!1;var i=o(e.doc.path(r.path),r.offset,"char");return e.tr["delete"](new h.Pos(r.path,i),r).apply(e.apply.scroll)},keys:{all:["Backspace(60)"],mac:["Ctrl-H(40)"]}},k.deleteWordBefore={label:"Delete the word before the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||0==r.offset)return!1;var i=o(e.doc.path(r.path),r.offset,"word");return e.tr["delete"](new h.Pos(r.path,i),r).apply(e.apply.scroll)},keys:{all:["Mod-Backspace(40)"],mac:["Alt-Backspace(40)"]}},k.joinForward={label:"Join with the block below",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset<e.doc.path(r.path).size)return!1;for(var o=void 0,s=void 0,a=r.path.length-1;!o&&a>=0;a--){s=r.shorten(a,1);var u=e.doc.path(s.path);s.offset<u.size&&(o=u.child(s.offset))}return o?null==o.type.contains?e.tr["delete"](s,s.move(1)).apply(e.apply.scroll):i(e,s):!1},keys:["Delete(30)","Mod-Delete(30)"]},k.deleteCharAfter={label:"Delete a character after the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset==e.doc.path(r.path).size)return!1;var o=s(e.doc.path(r.path),r.offset,"char");return e.tr["delete"](r,new h.Pos(r.path,o)).apply(e.apply.scroll)},keys:{all:["Delete(60)"],mac:["Ctrl-D(60)"]}},k.deleteWordAfter={label:"Delete a word after the cursor",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset==e.doc.path(r.path).size)return!1;var o=s(e.doc.path(r.path),r.offset,"word");return e.tr["delete"](r,new h.Pos(r.path,o)).apply(e.apply.scroll)},keys:{all:["Mod-Delete(40)"],mac:["Ctrl-Alt-Backspace(40)","Alt-Delete(40)","Alt-D(40)"]}},k.joinUp={label:"Join with above block",run:function(e){var t=a(e),r=e.selection.node;return t?(e.tr.join(t).apply(),void(r&&e.setNodeSelection(t.move(-1)))):!1},select:function(e){return a(e)},menu:{group:"block",rank:80,display:{type:"icon",width:800,height:900,path:"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z"}},keys:["Alt-Up"]},k.joinDown={label:"Join with below block",run:function(e){var t=e.selection.node,r=u(e);return r?(e.tr.join(r).apply(),void(t&&e.setNodeSelection(r.move(-1)))):!1},select:function(e){return u(e)},keys:["Alt-Down"]},k.lift={label:"Lift out of enclosing block",run:function(e){var t=e.selection,r=t.from,n=t.to;return e.tr.lift(r,n).apply(e.apply.scroll)},select:function(e){var t=e.selection,r=t.from,n=t.to;return(0,d.canLift)(e.doc,r,n)},menu:{group:"block",rank:75,display:{type:"icon",width:1024,height:1024,path:"M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z"}},keys:["Alt-Left"]},k.newlineInCode={label:"Insert newline",run:function(e){var t=e.selection,r=t.from,n=t.to,o=t.node,i=void 0;return!o&&h.Pos.samePath(r.path,n.path)&&(i=e.doc.path(r.path)).type.isCode&&n.offset<i.size?e.tr.typeText("\n").apply(e.apply.scroll):!1},keys:["Enter(10)"]},k.createParagraphNear={label:"Create a paragraph near the selected block",run:function(e){var t=e.selection,r=t.from,n=t.to,o=t.node;if(!o||!o.isBlock)return!1;var i=r.offset?n:r;e.tr.insert(i,e.schema.defaultTextblockType().create()).apply(e.apply.scroll),e.setTextSelection(new h.Pos(i.toPath(),0))},keys:["Enter(20)"]},k.liftEmptyBlock={label:"Move current block up",run:function(e){var t=e.selection,r=t.head,n=t.empty;if(!n||r.offset>0||e.doc.path(r.path).size)return!1;if(r.depth>1){var o=r.shorten();if(o.offset>0&&o.offset<e.doc.path(o.path).size-1&&e.tr.split(o).apply()!==!1)return}return e.tr.lift(r).apply(e.apply.scroll)},keys:["Enter(30)"]},k.splitBlock={label:"Split the current block",run:function(e){var t=e.selection,r=t.from,n=t.to,o=t.node,i=e.doc.path(n.path);if(o&&o.isBlock)return r.offset?e.tr.split(r).apply(e.apply.scroll):!1;var s=e.schema.defaultTextblockType(),a=n.offset==i.size?s:null,u=e.tr["delete"](r,n).split(r,1,a);return n.offset<i.size&&!r.offset&&e.doc.path(r.path).type!=s&&u.setNodeType(r.shorten(),s),u.apply(e.apply.scroll)},keys:["Enter(60)"]},k.selectParentNode={label:"Select parent node",run:function(e){var t=l(e);return t?void e.setNodeSelection(t):!1},select:function(e){return l(e)},menu:{group:"block",rank:90,display:{type:"icon",text:"⬚",style:"font-weight: bold"}},keys:["Esc"]},k.selectNodeLeft={label:"Move the selection onto or out of the block to the left",run:function(e){var t=f(e,-1);return t&&e.scrollIntoView(),t},keys:["Left","Mod-Left"]},k.selectNodeRight={label:"Move the selection onto or out of the block to the right",run:function(e){var t=f(e,1);return t&&e.scrollIntoView(),t},keys:["Right","Mod-Right"]},k.selectNodeUp={label:"Move the selection onto or out of the block above",run:function(e){var t=p(e,-1);return t!==!1&&e.scrollIntoView(),t},keys:["Up"]},k.selectNodeDown={label:"Move the selection onto or out of the block below",run:function(e){var t=p(e,1);return t!==!1&&e.scrollIntoView(),t},keys:["Down"]},k.undo={label:"Undo last change",run:function(e){return e.scrollIntoView(),e.history.undo()},select:function(e){return e.history.undoDepth>0},menu:{group:"history",rank:10,display:{type:"icon",width:1024,height:1024,path:"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z"}},keys:["Mod-Z"]},k.redo={label:"Redo last undone change",run:function(e){return e.scrollIntoView(),e.history.redo()},select:function(e){return e.history.redoDepth>0},menu:{group:"history",rank:20,display:{type:"icon",width:1024,height:1024,path:"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z"}},keys:["Mod-Y","Shift-Mod-Z"]}},{"../model":38,"../transform":44,"../util/error":55,"./char":6,"./dompos":10,"./selection":19}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){}function i(e){if(e.selection.node){var t=(0,u.findSelectionNear)(e.doc,e.selection.from,1,!0);t&&(0,l.setDOMSelectionToPos)(e,t.head)}return!1}Object.defineProperty(r,"__esModule",{value:!0}),r.captureKeys=void 0;var s=e("browserkeymap"),a=n(s),u=e("./selection"),l=e("./dompos"),c=e("../dom"),f={Esc:o,Enter:o,"Mod-Enter":o,"Shift-Enter":o,Backspace:o,Delete:o,"Mod-B":o,"Mod-I":o,"Mod-Backspace":o,"Mod-Delete":o,"Shift-Backspace":o,"Shift-Delete":o,"Shift-Mod-Backspace":o,"Shift-Mod-Delete":o,"Mod-Z":o,"Mod-Y":o,"Shift-Mod-Z":o,"Ctrl-D":o,"Ctrl-H":o,"Ctrl-Alt-Backspace":o,"Alt-D":o,"Alt-Delete":o,"Alt-Backspace":o,"Mod-A":i};["Left","Right","Up","Down","Home","End","PageUp","PageDown"].forEach(function(e){f[e]=f["Shift-"+e]=f["Mod-"+e]=f["Shift-Mod-"+e]=f["Alt-"+e]=f["Shift-Alt-"+e]=i}),["Left","Mod-Left","Right","Mod-Right","Up","Down"].forEach(function(e){return delete f[e]}),c.browser.mac&&(f["Ctrl-F"]=f["Ctrl-B"]=f["Ctrl-P"]=f["Ctrl-N"]=f["Alt-F"]=f["Alt-B"]=f["Ctrl-A"]=f["Ctrl-E"]=f["Ctrl-V"]=f.goPageUp=i);r.captureKeys=new a["default"](f)},{"../dom":3,"./dompos":10,"./selection":19,browserkeymap:60}],6:[function(e,t,r){"use strict";function n(e){return/\w/.test(e)||i(e)||e>"\80"&&(e.toUpperCase()!=e.toLowerCase()||s.test(e))}function o(e){return/\s/.test(e)?"space":n(e)?"word":"other"}function i(e){return e.charCodeAt(0)>=768&&a.test(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.isWordChar=n,r.charCategory=o,r.isExtendingChar=i;var s=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,a=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/},{}],7:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t,r){if(!t.derive)return t;var n="object"==b(t.derive)?t.derive:{},o=n.name||r,i=e.constructor.derivableCommands[o];if(!i)throw new P.AssertionError("Don't know how to derive command "+o);var s=i.call(e,n);for(var a in t)"derive"!=a&&(s[a]=t[a]);return s}function a(e){function t(e,t){for(var n=0;n<t.length;n++){var o=/^(.+?)(?:\((\d+)\))?$/.exec(t[n]),i=k(o,3),s=(i[0],i[1]),a=i[2],u=void 0===a?50:a;(0,O["default"])(r[s]||(r[s]=[]),{command:e,rank:u},function(e,t){return e.rank-t.rank})}}var r={},n=S.browser.mac?"mac":"pc";for(var o in e.commands){var i=e.commands[o],s=i.spec.keys;s&&(Array.isArray(s)&&t(i,s),s.all&&t(i,s.all),s[n]&&t(i,s[n]))}for(var a in r)r[a]=r[a].map(function(e){return e.command.name});return new x["default"](r)}function u(e,t){e.signal("commandsChanging"),e.commands=t.derive(e.schema),e.input.baseKeymap=a(e),e.commandKeys=Object.create(null),e.signal("commandsChanged")}function l(e,t){var r=e.selection;return r.empty?t.isInSet(e.activeMarks()):e.doc.rangeHasMark(r.from,r.to,t)}function c(e,t){var r=e.selection,n=r.from,o=r.to,i=r.empty;if(i)return!t.isInSet(e.activeMarks())&&e.doc.path(n.path).type.canContainMark(t);var s=!1;return e.doc.nodesBetween(n,o,function(e){return s||e.isTextblock&&!e.type.canContainMark(t)?!1:void(e.isInline&&!t.isInSet(e.marks)&&(s=!0))}),s}function f(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,function(e){return e.isTextblock?(e.type.canContainMark(t)&&(i=!0),!1):void 0}),i}function p(e,t,r){var n=e.selection,o=n.from,i=n.to,s=n.empty,a=void 0,u=void 0;if(s)a=u=t.isInSet(e.activeMarks());else{var l=e.doc.path(o.path),c=l.size>o.offset&&l.chunkAfter(o.offset);a=c?t.isInSet(c.node.marks):null,u=t.isInSet(e.doc.marksAt(i))}return a&&u&&a.attrs[r]==u.attrs[r]?a.attrs[r]:void 0}function h(e,t,r){var n=e.selection.node;return n&&n.type==t?n.attrs[r]:void 0}function d(e,t){return t&&t.map(function(t){var r=e.attrs[t.attr],n={type:"text","default":r["default"],prefill:e instanceof C.NodeType?function(e){return h(e,this,t.attr)}:function(e){return p(e,this,t.attr)}};for(var o in t)n[o]=t[o];return n})}function m(e,t){var r=e.attrs;return e.params&&!function(){var n=Object.create(null);if(r)for(var o in r)n[o]=r[o];e.params.forEach(function(e,r){return n[e.attr]=t[r]}),r=n}(),r}function g(e,t,r,n){return C.Pos.samePath(t.path,r.path)&&t.path.length>=2&&0==t.path[t.path.length-1]&&n.canContain(e.path(t.path.slice(0,t.path.length-1)))}function v(e,t,r,n,o){var i=!1;return o||(o={}),e.nodesBetween(t,r||t,function(e){return e.isTextblock?(e.hasMarkup(n,o)&&(i=!0),!1):void 0}),i}function y(e,t,r){var n=e.selection,o=n.from,i=n.to,s=n.node;if(!s||s.isInline){if(!C.Pos.samePath(o.path,i.path))return!1;s=e.doc.path(o.path)}else if(!s.isTextblock)return!1;return s.hasMarkup(t,r)}var k=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){o=!0,i=u}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},w=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.CommandSet=r.Command=void 0,r.updateCommands=u,r.selectedNodeAttr=h;var _=e("browserkeymap"),x=n(_),C=e("../model"),M=e("../transform"),S=e("../dom"),A=e("../util/sortedinsert"),O=n(A),P=e("../util/error"),T=e("../util/obj"),E=e("./base_commands"),D=r.Command=function(){function e(t,r,n){if(i(this,e),this.name=n,!this.name)throw new P.NamespaceError("Trying to define a command without a name");this.spec=t,this.self=r}return w(e,[{key:"exec",value:function(e,t){var r=this.spec.run;if(t){if(this.params.length!=(t?t.length:0))throw new P.AssertionError("Invalid amount of parameters for command "+this.name);return r.call.apply(r,[this.self,e].concat(o(t)))}return this.params.length?new e.options.commandParamPrompt(e,this).open():r.call(this.self,e)}},{key:"select",value:function(e){var t=this.spec.select;return t?t.call(this.self,e):!0}},{key:"active",value:function(e){var t=this.spec.active;return t?t.call(this.self,e):!1}},{key:"params",get:function(){return this.spec.params||j}},{key:"label",get:function(){return this.spec.label||this.name}}]),e}(),j=[],q=function(){function e(t,r){i(this,e),this.base=t,this.op=r}return w(e,[{key:"add",value:function(t,r){return new e(this,function(e,n){function o(t,n,o){if(!r||r(t,n)){if(e[t])throw new P.AssertionError("Duplicate definition of command "+t);e[t]=new D(n,o,t)}}if("schema"===t)n.registry("command",function(e,t,r,n){o(n+":"+e,s(r,t,e),r)});else for(var i in t)o(i,t[i])})}},{key:"update",value:function(t){return new e(this,function(e){for(var r in t){var n=t[r];if(n)if(n.run)e[r]=new D(n,null,r);else{var o=e[r];o&&(e[r]=new D((0,T.copyObj)(n,(0,T.copyObj)(o.spec)),o.self,r))}else delete e[r]}})}},{key:"derive",value:function(e){var t=this.base?this.base.derive(e):Object.create(null);return this.op(t,e),t}}]),e}();r.CommandSet=q,q.empty=new q(null,function(){return null}),q["default"]=q.empty.add("schema").add(E.baseCommands),C.NodeType.derivableCommands=Object.create(null),C.MarkType.derivableCommands=Object.create(null),C.MarkType.derivableCommands.set=function(e){return{run:function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];t.setMark(this,!0,m(e,n))},select:function(t){return e.inverseSelect?f(t,this)&&!l(t,this):c(t,this)},params:d(this,e.params)}},C.MarkType.derivableCommands.unset=function(){return{run:function(e){e.setMark(this,!1)},select:function(e){return l(e,this)}}},C.MarkType.derivableCommands.toggle=function(){return{run:function(e){e.setMark(this,null)},active:function(e){return l(e,this)},select:function(e){return f(e,this)}}},C.NodeType.derivableCommands.wrap=function(e){return{run:function(t){var r=t.selection,n=r.from,o=r.to,i=r.head,s=!1;if(e.list&&i&&g(t.doc,n,o,this)){if(0==n.path[n.path.length-2])return!1;s=!0}for(var a=arguments.length,u=Array(a>1?a-1:0),l=1;a>l;l++)u[l-1]=arguments[l];var c=t.tr.wrap(n,o,this,m(e,u));return s&&c.join(n.shorten(n.depth-2)),c.apply(t.apply.scroll)},select:function(t){var r=t.selection,n=r.from,o=r.to,i=r.head;return e.list&&i&&g(t.doc,n,o,this)&&0==n.path[n.path.length-2]?!1:(0,M.canWrap)(t.doc,n,o,this,e.attrs)},params:d(this,e.params)}},C.NodeType.derivableCommands.make=function(e){return{run:function(t){var r=t.selection,n=r.from,o=r.to;return t.tr.setBlockType(n,o,this,e.attrs).apply(t.apply.scroll)},select:function(t){var r=t.selection,n=r.from,o=r.to,i=r.node;return i?i.isTextblock&&!i.hasMarkup(this,e.attrs):!v(t.doc,n,o,this,e.attrs)},active:function(t){return y(t,this,e.attrs)}}},C.NodeType.derivableCommands.insert=function(e){return{run:function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return t.tr.replaceSelection(this.create(m(e,n))).apply(t.apply.scroll)},select:this.isInline?function(e){return e.doc.path(e.selection.from.path).type.canContainType(this)}:null,params:d(this,e.params)}}},{"../dom":3,"../model":38,"../transform":44,"../util/error":55,"../util/obj":58,"../util/sortedinsert":59,"./base_commands":4,browserkeymap:60}],8:[function(e,t,r){"use strict";var n=e("../dom");(0,n.insertCSS)('\n\n.ProseMirror {\n  border: 1px solid silver;\n  position: relative;\n}\n\n.ProseMirror-content {\n  padding: 4px 8px 4px 14px;\n  white-space: pre-wrap;\n  line-height: 1.2;\n}\n\n.ProseMirror-drop-target {\n  position: absolute;\n  width: 1px;\n  background: #666;\n  display: none;\n}\n\n.ProseMirror-content ul.tight p, .ProseMirror-content ol.tight p {\n  margin: 0;\n}\n\n.ProseMirror-content ul, .ProseMirror-content ol {\n  padding-left: 30px;\n  cursor: default;\n}\n\n.ProseMirror-content blockquote {\n  padding-left: 1em;\n  border-left: 3px solid #eee;\n  margin-left: 0; margin-right: 0;\n}\n\n.ProseMirror-content pre {\n  white-space: pre-wrap;\n}\n\n.ProseMirror-selectednode {\n  outline: 2px solid #8cf;\n}\n\n.ProseMirror-nodeselection *::selection { background: transparent; }\n.ProseMirror-nodeselection *::-moz-selection { background: transparent; }\n\n.ProseMirror-content p:first-child,\n.ProseMirror-content h1:first-child,\n.ProseMirror-content h2:first-child,\n.ProseMirror-content h3:first-child,\n.ProseMirror-content h4:first-child,\n.ProseMirror-content h5:first-child,\n.ProseMirror-content h6:first-child {\n  margin-top: .3em;\n}\n\n/* Add space around the hr to make clicking it easier */\n\n.ProseMirror-content hr {\n  position: relative;\n  height: 6px;\n  border: none;\n}\n\n.ProseMirror-content hr:after {\n  content: "";\n  position: absolute;\n  left: 10px;\n  right: 10px;\n  top: 2px;\n  border-top: 2px solid silver;\n}\n\n.ProseMirror-content img {\n  cursor: default;\n}\n\n/* Make sure li selections wrap around markers */\n\n.ProseMirror-content li {\n  position: relative;\n  pointer-events: none; /* Don\'t do weird stuff with marker clicks */\n}\n.ProseMirror-content li > * {\n  pointer-events: auto;\n}\n\nli.ProseMirror-selectednode {\n  outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n  content: "";\n  position: absolute;\n  left: -32px;\n  right: -2px; top: -2px; bottom: -2px;\n  border: 2px solid #8cf;\n  pointer-events: none;\n}\n\n');
+},{"../dom":3}],9:[function(e,t,r){"use strict";function n(e,t,r){for(var n=r||0;n<t.path.length;n++){var o=t.path[r];if(o<e.size-1)return!1;e=e.child(o)}return t.offset==e.size}function o(e,t){if(e.offset>0)return!1;for(var r=t||0;r<e.path.length;r++)if(e.path[t]>0)return!1;return!0}function i(e){for(var t=e.content,r=e.doc,i=e.selection,s=i.from,a=i.to,u=0;;u++){var l=r.child(a.path[u]),c=o(s,u+1),f=n(l,a,u+1);if(c||f||s.path[u]!=a.path[u]||l.isTextblock){var p=u==s.depth?s.offset:s.path[u];c&&p>0&&p--;var h=u==a.depth?a.offset:a.path[u]+1;f&&h<r.size-1&&h++;var d=(0,v.fromDOM)(e.schema,t,{topNode:r.copy(),from:p,to:t.childNodes.length-(r.size-h),preserveWhitespace:!0});d=d.copy(r.content.slice(0,p).append(d.content).append(r.content.slice(h)));for(var m=u-1;m>=0;m--){var g=e.doc.path(s.path.slice(0,m));d=g.replace(s.path[m],d)}return d}r=l,t=(0,k.findByPath)(t,s.path[u],!1)}}function s(e){var t=i(e),r=(0,g.findDiffStart)(e.doc.content,t.content);if(r){var n=u(e.doc.content,t.content,r);return c(e,r,n),e.tr.replace(r,n.a,t,r,n.b).apply(),!0}return!1}function a(e,t,r){var n=(0,y.samePathDepth)(e,t),o=n==e.depth,i=n==t.depth,s=(i?t.offset:t.path[n])-(o?e.offset:e.path[n]),a=o?r.move(s):r.shorten(n,s);return i?a:a.extend(new g.Pos(t.path.slice(n),t.offset))}function u(e,t,r){var n=(0,g.findDiffEnd)(e,t);return n?n.a.cmp(r)<0?{a:r,b:a(n.a,r,n.b)}:n.b.cmp(r)<0?{a:a(n.b,r,n.a),b:r}:n:n}function l(e,t){for(var r=Math.min(e.depth,t.depth),n=0;r>n;n++)if(e.path[n]!=t.path[n])return n;return r}function c(e,t,r){var n=Math.min(l(t,r.a),l(t,r.b));if(0==n)e.markAllDirty();else{var o=g.Pos.from(t.path.slice(0,n));e.markRangeDirty({from:o,to:o.move(1)})}}function f(e){var t=window.getSelection().getRangeAt(0),r=t.startContainer,n=t.endContainer;if(r==n&&3==r.nodeType){var o=r.nodeValue,i=t.startOffset,s=t.endOffset;return e&&s>=e.length&&o.slice(s-e.length,s)==e&&(i=s-e.length),{inside:r,lead:i,trail:o.length-s}}for(var a=null,u=null,l=r.childNodes[t.startOffset-1]||d(r);l.lastChild;)l=l.lastChild;if(l&&3==l.nodeType){var o=l.nodeValue;a=o.length,e&&o.slice(o.length-e.length)==e&&(a-=e.length)}for(var c=n.childNodes[t.endOffset]||h(n);c.firstChild;)c=c.firstChild;return c&&3==c.nodeType&&(u=c.nodeValue.length),{before:l,sizeBefore:a,after:c,sizeAfter:u}}function p(e,t){if(e.inside){var r=e.inside.nodeValue;return r.slice(e.lead,r.length-e.trail)}var n=e.before,o=e.after,i="";if(!n)return t;3==n.nodeType&&(i=n.nodeValue.slice(e.sizeBefore));var s=m(n,o);if(null==s)return t;if(i+=s,o&&3==o.nodeType){var a=o.nodeValue;i+=a.slice(0,a.length-e.sizeAfter)}return i}function h(e){for(;;){var t=e.nextSibling;if(t){for(;t.firstChild;)t=t.firstChild;return t}if(!(e=e.parentElement))return null}}function d(e){for(;;){var t=e.previousSibling;if(t){for(;t.lastChild;)t=t.lastChild;return t}if(!(e=e.parentElement))return null}}function m(e,t){for(var r="",n=h(e);;){if(n==t)return r;if(!n)return null;3==n.nodeType&&(r+=n.nodeValue),n=n.firstChild||h(n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.applyDOMChange=s,r.textContext=f,r.textInContext=p;var g=e("../model"),v=e("../format"),y=e("../transform/tree"),k=e("./dompos")},{"../format":22,"../model":38,"../transform/tree":52,"./dompos":10}],10:[function(e,t,r){"use strict";function n(e,t){for(var r=[];t!=e.content;){var n=t.getAttribute("pm-offset");n&&r.unshift(+n),t=t.parentNode}return r}function o(e){var t=e.getAttribute("pm-leaf");return t&&"true"!=t?+t:1}function i(e,t,r,i){if(!i&&e.operation&&e.doc!=e.operation.doc)throw new M.AssertionError("Fetching a position from an outdated DOM structure");null==r&&(r=Array.prototype.indexOf.call(t.parentNode.childNodes,t),t=t.parentNode);for(var s=0,a=void 0;;){var u=0;if(3==t.nodeType)s+=r;else{if(t.hasAttribute("pm-container"))break;(a=t.getAttribute("pm-inner-offset"))?(s+=+a,u=-1):r&&r==t.childNodes.length&&(u=1)}var l=t.parentNode;r=0>u?0:Array.prototype.indexOf.call(l.childNodes,t)+u,t=l}var c=n(e,t);if(t.hasAttribute("pm-leaf"))return x.Pos.from(c,s+(r?1:0));for(var f=0,p=r-1;p>=0;p--){var h=t.childNodes[p];if(3==h.nodeType)i&&(s+=h.nodeValue.length);else{if(a=h.getAttribute("pm-offset")){f=+a+o(h);break}i&&!h.hasAttribute("pm-ignore")&&(s+=h.textContent.length)}}return new x.Pos(c,f+s)}function s(e,t,r){for(var n=u(e),o=r?n.lastChild:n.firstChild;o;o=r?o.previousSibling:o.nextSibling)if(1==o.nodeType){var i=o.getAttribute("pm-offset");if(i&&+i==t)return o}}function a(e,t){for(var r=e,n=0;n<t.length;n++)if(r=s(r,t[n]),!r)throw new M.AssertionError("Failed to resolve path "+t.join("/"));return r}function u(e){return e.hasAttribute("pm-container")?e:e.querySelector("[pm-container]")}function l(e,t,r){for(var n,i=e.firstChild,s=0;i;i=i.nextSibling,s++)if(1==i.nodeType&&(n=i.getAttribute("pm-offset"))){var a=t-+n,u=o(i);if(a>=0&&(r?u>=a:u>a))return{node:i,offset:s,innerOffset:a}}}function c(e,t){for(;;){var r=e.firstChild;if(!r)return{node:e,offset:t};if(1!=r.nodeType)return{node:r,offset:t};if(r.hasAttribute("pm-inner-offset")){for(var n=0;;){var o=r.nextSibling,i=void 0;if(!o||(i=+o.getAttribute("pm-inner-offset"))>=t)break;r=o,n=i}t-=n}e=r}}function f(e,t){var r=u(a(e,t.path)),n=l(r,t.offset,!0),o=void 0;return n?"true"!=n.node.getAttribute("pm-leaf")&&(o=c(n.node,n.innerOffset))?o:{node:n.node.parentNode,offset:n.offset+(n.innerOffset?1:0)}:{node:r,offset:0}}function p(){return{left:0,right:window.innerWidth,top:0,bottom:window.innerHeight}}function h(e,t){t||(t=e.sel.range.head||e.sel.range.from);for(var r=k(e,t),n=e.content;;n=n.parentNode){var o=n==document.body,i=o?p():n.getBoundingClientRect(),s=0,a=0;if(r.top<i.top?a=-(i.top-r.top+S):r.bottom>i.bottom&&(a=r.bottom-i.bottom+S),r.left<i.left?s=-(i.left-r.left+S):r.right>i.right&&(s=r.right-i.right+S),(s||a)&&(o?window.scrollBy(s,a):(a&&(n.scrollTop+=a),s&&(n.scrollLeft+=s))),o)break}}function d(e,t){for(var r=void 0,n=1e8,o=void 0,i=0,s=e.firstChild;s;s=s.nextSibling){var a=void 0;if(1==s.nodeType)a=s.getClientRects();else{if(3!=s.nodeType)continue;a=y(s)}for(var u=0;u<a.length;u++){var l=a[u];if(l.left<=t.left&&l.right>=t.left){var c=l.top>t.top?l.top-t.top:l.bottom<t.top?t.top-l.bottom:0;if(n>c){r=s,n=c,o=c?{left:t.left,top:l.top}:t,1!=s.nodeType||s.firstChild||(i=u+(t.left>=(l.left+l.right)/2?1:0));continue}}!r&&(t.top>=l.bottom||t.top>=l.top&&t.left>=l.right)&&(i=u+1)}}return r?3==r.nodeType?m(r,o):r.firstChild?d(r,o):{node:e,offset:i}:{node:e,offset:i}}function m(e,t){for(var r=e.nodeValue.length,n=document.createRange(),o=0;r>o;o++){n.setEnd(e,o+1),n.setStart(e,o);var i=n.getBoundingClientRect();if(i.top!=i.bottom&&i.left<=t.left&&i.right>=t.left&&i.top<=t.top&&i.bottom>=t.top)return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function g(e,t){var r=document.elementFromPoint(t.left,t.top+1);if(!(0,C.contains)(e.content,r))return null;r.firstChild||(r=r.parentNode);var n=d(r,t),o=n.node,s=n.offset;return i(e,o,s)}function v(e,t,r){var n=document.createRange();return n.setEnd(e,r),n.setStart(e,t),n.getBoundingClientRect()}function y(e){var t=document.createRange();return t.setEnd(e,e.nodeValue.length),t.setStart(e,0),t.getClientRects()}function k(e,t){var r=f(e.content,t),n=r.node,o=r.offset,i=void 0,s=void 0;if(3==n.nodeType)o<n.nodeValue.length&&(s=v(n,o,o+1),i="left"),s&&s.left!=s.right||!o||(s=v(n,o-1,o),i="right");else if(n.firstChild){if(o<n.childNodes.length){var a=n.childNodes[o];s=3==a.nodeType?v(a,0,a.nodeValue.length):a.getBoundingClientRect(),i="left"}if((!s||s.left==s.right)&&o){var a=n.childNodes[o-1];s=3==a.nodeType?v(a,0,a.nodeValue.length):a.getBoundingClientRect(),i="right"}}else s=n.getBoundingClientRect(),i="left";var u=s[i];return{top:s.top,bottom:s.bottom,left:u,right:u}}function b(e,t){var r=f(e.content,t),n=r.node,o=r.offset,i=document.createRange();i.setEnd(n,o),i.setStart(n,o);var s=window.getSelection();s.removeAllRanges(),s.addRange(i)}function w(e,t,r,o){for(;t&&t!=e.content;t=t.parentNode)if(t.hasAttribute("pm-offset")){var i=n(e,t),s=e.doc.path(i);if(s.type.countCoordsAsChild){var a=s.type.countCoordsAsChild(s,i,t,r);if(a)return a}if((o||null==s.type.contains)&&s.type.selectable)return x.Pos.from(i);if(!o)return null}}function _(e,t,r,o){for(var i=r.target;i&&i!=e.content;i=i.parentNode)if(i.hasAttribute("pm-offset")){var s=n(e,i),a=e.doc.path(s),u=a.type[t]&&a.type[t](e,r,s,a)!==!1;if(o||u)return u}}Object.defineProperty(r,"__esModule",{value:!0}),r.pathFromDOM=n,r.widthFromDOM=o,r.posFromDOM=i,r.findByPath=s,r.pathToDOM=a,r.childContainer=u,r.DOMFromPos=f,r.scrollIntoView=h,r.posAtCoords=g,r.coordsAtPos=k,r.setDOMSelectionToPos=b,r.selectableNodeAbove=w,r.handleNodeClick=_;var x=e("../model"),C=e("../dom"),M=e("../util/error"),S=5},{"../dom":3,"../model":38,"../util/error":55}],11:[function(e,t,r){"use strict";function n(e,t){return{onRender:function(e,t,r){return e.isText||null!=e.type.contains||(t.contentEditable=!1,e.isBlock&&t.setAttribute("pm-leaf","true")),e.isBlock&&null!=r&&t.setAttribute("pm-offset",r),e.isTextblock&&s(t,e),t},onContainer:function(e){e.setAttribute("pm-container",!0)},renderInlineFlat:function(r,n,i){t.advanceTo(new c.Pos(e,i));for(var s=new c.Pos(e,i+r.width),a=t.nextChangeBefore(s),u=n,l=void 0,f=0;f<r.marks.length;f++)u=u.firstChild;1!=n.nodeType&&(n=(0,p.elt)("span",null,n),a||(l=n)),l||!a&&!t.current.length||(l=u==n?n=(0,p.elt)("span",null,u):u.parentNode.appendChild((0,p.elt)("span",null,u))),n.setAttribute("pm-offset",i),null==r.type.contains&&n.setAttribute("pm-leaf",r.isText?r.width:"true");for(var h=0;a;){var d=a-i,m=o(l,d);t.current.length&&(m.className=t.current.join(" ")),m.setAttribute("pm-inner-offset",h),h+=d,i+=d,t.advanceTo(new c.Pos(e,i)),(a=t.nextChangeBefore(s))||l.setAttribute("pm-inner-offset",h)}return t.current.length&&(l.className=t.current.join(" ")),n},document:document,path:e}}function o(e,t){var r=e.firstChild,n=r.nodeValue,o=e.parentNode.insertBefore((0,p.elt)("span",null,n.slice(0,t)),e);return r.nodeValue=n.slice(t),o}function i(e,t){e.content.textContent="",e.content.appendChild((0,f.toDOM)(t,n([],e.ranges.activeRangeTracker())))}function s(e,t){var r=0==t.size||t.lastChild.type.isBR||t.type.isCode&&t.lastChild.isText&&/\n$/.test(t.lastChild.text)?"br":t.lastChild.isText||null!=t.lastChild.type.contains?null:"text",n=e.lastChild,o=n&&1==n.nodeType&&n.hasAttribute("pm-ignore")?"BR"==n.nodeName?"br":"text":null;r!=o&&(o&&e.removeChild(n),r&&e.appendChild("br"==r?(0,p.elt)("br",{"pm-ignore":"trailing-break"}):(0,p.elt)("span",{"pm-ignore":"cursor-text"},"")))}function a(e,t){for(var r,n=e.copy();r=n.next().value;)if(r==t)return r}function u(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}function l(e,t,r,o){function l(e,r,n){for(var o,i=r.iter(),p=n.iter(),m=p.next().value,g=e.firstChild;o=i.next().value;){var v=i.offset-o.width,y=void 0,k=void 0;if(r.isTextblock||c.path.push(v),m==o)y=m;else if(y=a(p,o))for(;m!=y;)m=p.next().value,g=u(g);if(y&&!t.get(y))k=!0;else if(m&&!o.isText&&o.sameMarkup(m)&&t.get(m)!=h.DIRTY_REDRAW)k=!0,m.type.contains&&l((0,d.childContainer)(g),o,m);else{var b=(0,f.nodeToDOM)(o,c,v);e.insertBefore(b,g),k=!1}k&&(g.setAttribute("pm-offset",v),g=g.nextSibling,m=p.next().value),r.isTextblock||c.path.pop()}for(;m;)g=u(g),m=p.next().value;r.isTextblock&&s(e,r)}if(t.get(o)==h.DIRTY_REDRAW)return i(e,r);var c=n([],e.ranges.activeRangeTracker());l(e.content,r,o)}Object.defineProperty(r,"__esModule",{value:!0}),r.draw=i,r.redraw=l;var c=e("../model"),f=e("../format"),p=e("../dom"),h=e("./main"),d=e("./dompos")},{"../dom":3,"../format":22,"../model":38,"./dompos":10,"./main":15}],12:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return"replace"==e.type&&e.from.offset<e.to.offset&&s.Pos.samePath(e.from.path,e.to.path)&&(!e.param||0==e.param.content.size)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.History=void 0;var s=e("../model"),a=e("../transform"),u=function g(e,t,r){n(this,g),this.step=e,this.version=t,this.id=r},l=function(){function e(t){n(this,e),this.branch=t,this.remap=new a.Remapping,this.version=t.version,this.mirrorBuffer=Object.create(null)}return i(e,[{key:"moveToVersion",value:function(e){for(;this.version>e;)this.addNextMap()}},{key:"addNextMap",value:function(){var e=this.branch.mirror[this.version],t=this.branch.maps.length-(this.branch.version-this.version)-1,r=this.remap.addToFront(this.branch.maps[t],this.mirrorBuffer[this.version]);return--this.version,null!=e&&(this.mirrorBuffer[e]=r),r}},{key:"movePastStep",value:function(e){var t=this.addNextMap();e&&this.remap.addToBack(e.map,t)}}]),e}(),c=100,f=150,p=function(){function e(t,r,o){n(this,e),this.branch=r,this.callback=o,this.remap=new l(r),this.doc=t,this.events=[],this.maps=[],this.version=this.startVersion=r.version,this.i=r.events.length,this.timeout=null,this.aborted=!1}return i(e,[{key:"work",value:function(){var e=this;if(!this.aborted)for(var t=Date.now()+c;;){if(0==this.i)return this.finish();for(var r=this.branch.events[--this.i],n=[],i=r.length-1;i>=0;i--){var s=r[i],l=s.step,p=s.version,h=s.id;this.remap.moveToVersion(p);var d=l.map(this.remap.remap);if(d&&o(l)){for(var m=0,g=l.from;i>0;){var v=r[i-1];if(v.version!=p-1||!o(v.step)||g.cmp(v.step.to))break;m+=v.step.to.offset-v.step.from.offset,g=v.step.from,p--,i--,this.remap.addNextMap()}if(m>0){var y=d.from.move(-m);d=new a.Step("replace",y,d.to,y)}}var k=d&&d.apply(this.doc);k&&(this.doc=k.doc,this.maps.push(k.map.invert()),n.push(new u(d,this.version,h)),this.version--),this.remap.movePastStep(k)}if(n.length&&(n.reverse(),this.events.push(n)),Date.now()>t)return void(this.timeout=window.setTimeout(function(){return e.work()},f))}}},{key:"finish",value:function(){this.aborted||(this.events.reverse(),this.maps.reverse(),this.callback(this.maps.concat(this.branch.maps.slice(this.branch.maps.length-(this.branch.version-this.startVersion))),this.events))}},{key:"abort",value:function(){this.aborted=!0,window.clearTimeout(this.timeout)}}]),e}(),h=150,d=function(){function e(t){n(this,e),this.maxDepth=t,this.version=0,this.nextStepID=1,this.maps=[],this.mirror=Object.create(null),this.events=[],this.stepsSinceCompress=0,this.compressing=null,this.compressTimeout=null}return i(e,[{key:"clear",value:function(e){(e||!this.empty())&&(this.maps.length=this.events.length=this.stepsSinceCompress=0,this.mirror=Object.create(null),this.abortCompression())}},{key:"newEvent",value:function(){for(this.abortCompression(),this.events.push([]);this.events.length>this.maxDepth;)this.events.shift()}},{key:"addMap",value:function(e){return this.empty()?void 0:(this.maps.push(e),this.version++,this.stepsSinceCompress++,!0)}},{key:"empty",value:function(){return 0==this.events.length}},{key:"addStep",value:function(e,t,r){this.addMap(t),null==r&&(r=this.nextStepID++),this.events[this.events.length-1].push(new u(e,this.version,r))}},{key:"addTransform",value:function(e,t){this.abortCompression();for(var r=0;r<e.steps.length;r++){var n=e.steps[r].invert(e.docs[r],e.maps[r]);this.addStep(n,e.maps[r],t&&t[r])}}},{key:"popEvent",value:function(e,t){this.abortCompression();var r=this.events.pop();if(!r)return null;for(var n=new l(this),o=t,i=new a.Transform(e),s=[],u=r.length-1;u>=0;u--){var c=r[u],f=c.step;if(o&&c.version==n.version)this.version--,delete this.mirror[this.version],this.maps.pop(),i.step(f),s.push(c.id),--n.version;else{o=!1,n.moveToVersion(c.version),f=f.map(n.remap);var p=f&&i.step(f);p&&(s.push(c.id),this.addMap(p.map)&&(this.mirror[this.version]=c.version)),u>0&&n.movePastStep(p)}}return this.empty()&&this.clear(!0),{transform:i,ids:s}}},{key:"lastStep",value:function(){for(var e=this.events.length-1;e>=0;e--){var t=this.events[e];if(t.length)return t[t.length-1]}}},{key:"getVersion",value:function(){var e=this.lastStep();return{lastID:e&&e.id,version:this.version}}},{key:"isAtVersion",value:function(e){var t=this.lastStep();return this.version==e.version&&(t&&t.id)==e.lastID}},{key:"findVersion",value:function(e){for(var t=this.events.length-1;t>=0;t--)for(var r=this.events[t],n=r.length-1;n>=0;n--)if(r[n].id<=e.lastID)return{event:t,step:n+1}}},{key:"rebased",value:function(e,t,r){if(!this.empty()){this.abortCompression();var n=this.version-r.length;e:for(var o=this.events.length-1;o>=0;o--)for(var i=this.events[o],s=i.length-1;s>=0;s--){var a=i[s];if(a.version<=n)break e;var l=r[a.version-n-1];if(-1==l)i.splice(s--,1);else{var c=t.steps[l].invert(t.docs[l],t.maps[l]);i[s]=new u(c,n+e.length+l+1,a.id)}}this.maps.length>r.length?this.maps=this.maps.slice(0,this.maps.length-r.length).concat(e).concat(t.maps):this.maps=t.maps.slice(),this.version=n+e.length+t.maps.length,this.stepsSinceCompress+=e.length+t.steps.length-r.length}}},{key:"abortCompression",value:function(){this.compressing&&(this.compressing.abort(),this.compressing=null)}},{key:"needsCompression",value:function(){return this.stepsSinceCompress>h&&!this.compressing}},{key:"startCompression",value:function(e){var t=this;this.compressing=new p(e,this,function(e,r){t.maps=e,t.events=r,t.mirror=Object.create(null),t.compressing=null,t.stepsSinceCompress=0}),this.compressing.work()}}]),e}(),m=750;r.History=function(){function e(t){var r=this;n(this,e),this.pm=t,this.done=new d(t.options.historyDepth),this.undone=new d(t.options.historyDepth),this.lastAddedAt=0,this.ignoreTransform=!1,this.allowCollapsing=!0,t.on("transform",function(e,t){return r.recordTransform(e,t)})}return i(e,[{key:"recordTransform",value:function(e,t){if(!this.ignoreTransform){if(0==t.addToHistory)for(var r=0;r<e.maps.length;r++){var n=e.maps[r];this.done.addMap(n),this.undone.addMap(n)}else{this.undone.clear();var o=Date.now();o>this.lastAddedAt+this.pm.options.historyEventDelay&&this.done.newEvent(),this.done.addTransform(e),this.lastAddedAt=o}this.maybeScheduleCompression()}}},{key:"undo",value:function(){return this.shift(this.done,this.undone)}},{key:"redo",value:function(){return this.shift(this.undone,this.done)}},{key:"shift",value:function(e,t){var r=e.popEvent(this.pm.doc,this.allowCollapsing);if(!r)return!1;var n=r.transform,o=r.ids;return this.ignoreTransform=!0,this.pm.apply(n),this.ignoreTransform=!1,n.steps.length?(t&&(t.newEvent(),t.addTransform(n,o)),this.lastAddedAt=0,!0):this.shift(e,t)}},{key:"getVersion",value:function(){return this.done.getVersion()}},{key:"isAtVersion",value:function(e){return this.done.isAtVersion(e)}},{key:"backToVersion",value:function(e){var t=this.done.findVersion(e);if(!t)return!1;var r=this.done.events[t.event];if(t.event==this.done.events.length-1&&t.step==r.length)return!0;var n=this.done.events.slice(t.event+1).reduce(function(e,t){return e.concat(t)},r.slice(t.step));return this.done.events.length=t.event+((r.length=t.step)?1:0),this.done.events.push(n),this.shift(this.done),!0}},{key:"rebased",value:function(e,t,r){this.done.rebased(e,t,r),this.undone.rebased(e,t,r),this.maybeScheduleCompression()}},{key:"maybeScheduleCompression",value:function(){this.maybeScheduleCompressionForBranch(this.done),this.maybeScheduleCompressionForBranch(this.undone)}},{key:"maybeScheduleCompressionForBranch",value:function(e){var t=this;window.clearTimeout(e.compressTimeout),e.needsCompression()&&(e.compressTimeout=window.setTimeout(function(){e.needsCompression()&&e.startCompression(t.pm.doc)},m))}},{key:"undoDepth",get:function(){return this.done.events.length}},{key:"redoDepth",get:function(){return this.undone.events.length}}]),e}()},{"../model":38,"../transform":44}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0}),r.Keymap=r.baseCommands=r.Command=r.CommandSet=r.MarkedRange=r.NodeSelection=r.TextSelection=r.Selection=r.SelectionError=r.defineOption=r.ProseMirror=void 0;var o=e("./main");Object.defineProperty(r,"ProseMirror",{enumerable:!0,get:function(){return o.ProseMirror}});var i=e("./options");Object.defineProperty(r,"defineOption",{enumerable:!0,get:function(){return i.defineOption}});var s=e("./selection");Object.defineProperty(r,"SelectionError",{enumerable:!0,get:function(){return s.SelectionError}}),Object.defineProperty(r,"Selection",{enumerable:!0,get:function(){return s.Selection}}),Object.defineProperty(r,"TextSelection",{enumerable:!0,get:function(){return s.TextSelection}}),Object.defineProperty(r,"NodeSelection",{enumerable:!0,get:function(){return s.NodeSelection}});var a=e("./range");Object.defineProperty(r,"MarkedRange",{enumerable:!0,get:function(){return a.MarkedRange}});var u=e("./command");Object.defineProperty(r,"CommandSet",{enumerable:!0,get:function(){return u.CommandSet}}),Object.defineProperty(r,"Command",{enumerable:!0,get:function(){return u.Command}});var l=e("./base_commands");Object.defineProperty(r,"baseCommands",{enumerable:!0,get:function(){return l.baseCommands}}),e("./schema_commands");var c=e("browserkeymap"),f=n(c);r.Keymap=f["default"]},{"./base_commands":4,"./command":7,"./main":15,"./options":16,"./range":17,"./schema_commands":18,"./selection":19,browserkeymap:60}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r){var n=e.input.keySeq;if(n){if(v["default"].isModifierKey(t))return!0;clearTimeout(M),M=setTimeout(function(){e.input.keySeq==n&&(e.input.keySeq=null)},50),t=n+" "+t}for(var o=function a(t){if(t===!1)return"nothing";if("..."==t)return"multi";if(null==t)return!1;var r=!1;if(Array.isArray(t))for(var n=0;r===!1&&n<t.length;n++)r=a(t[n]);else r="string"==typeof t?e.execCommand(t):t(e);return 0==r?!1:"handled"},i=void 0,s=0;!i&&s<e.input.keymaps.length;s++)i=o(e.input.keymaps[s].map.lookup(t,e));return i||(i=o(e.input.baseKeymap.lookup(t,e))||o(b.captureKeys.lookup(t))),"multi"==i&&(e.input.keySeq=t),("handled"==i||"multi"==i)&&r.preventDefault(),n&&!i&&/\'$/.test(t)?(r.preventDefault(),!0):!!i}function s(e,t,r){if(t.empty&&!r)return!1;var n=e.input.storedMarks||e.doc.marksAt(t.from);e.tr.replaceWith(t.from,t.to,e.schema.text(r,n)).apply({scrollIntoView:!0}),e.signal("textInput",r)}function a(e,t){var r=(0,C.selectableNodeAbove)(e,t.target,{left:t.clientX,top:t.clientY},!0);if(!r)return e.sel.fastPoll();var n=e.selection,o=n.node,i=n.from;if(o&&r.depth>=i.depth&&0==r.shorten(i.depth).cmp(i)){if(0==i.depth)return e.sel.fastPoll();r=i.shorten()}e.setNodeSelection(r),e.focus(),t.preventDefault()}function u(e,t){t.preventDefault();var r=(0,C.selectableNodeAbove)(e,t.target,{left:t.clientX,top:t.clientY},!0);if(r){var n=e.doc.nodeAfter(r);if(n.isBlock&&!n.isTextblock)e.setNodeSelection(r);else{var o=n.isInline?r.path:r.toPath();n.isInline&&(n=e.doc.path(o)),e.setTextSelection(new y.Pos(o,0),new y.Pos(o,n.size))}e.focus()}}function l(e){var t=e.input.composing,r=(0,_.textInContext)(t.context,t.endData),n=(0,x.rangeFromDOMLoose)(e);e.ensureOperation(),e.input.composing=null,r!=t.data&&s(e,t.range,r),n&&!n.eq(e.sel.range)&&e.setSelectionDirect(n)}function c(e,t,r,n){for(var o=void 0,i=Math.min(t.depth,r.depth),s=0,a=e.sliceBetween(t,r);i>=s&&(a.type.defaultAttrs&&(o={depth:s,node:a}),!(a.size>1));s++)a=a.firstChild;var u=o.node.type.name+" "+(t.depth-o.depth)+" "+(r.depth-o.depth),l='<div pm-context="'+u+'">'+(0,k.toHTML)(o.node)+"</div>";n.clearData(),n.setData("text/html",l),n.setData("text/plain",(0,k.toText)(o.node))}function f(e,t,r){var n=t.getData("text/plain"),o=t.getData("text/html");if(!o&&!n)return null;var i=void 0,s=void 0,a=void 0;if(!r&&o||!n){var u=document.createElement("div");u.innerHTML=e.signalPipelined("transformPastedHTML",o);var l=u.querySelector("[pm-context]"),c=void 0,f=void 0,p=void 0;if(l&&(c=/^(\w+) (\d+) (\d+)$/.exec(l.getAttribute("pm-context")))&&(f=e.schema.nodes[c[1]])&&f.defaultAttrs&&(p=d(l,f,+c[2],+c[3]))){var h=p;i=h.doc,s=h.from,a=h.to}else i=(0,k.fromDOM)(e.schema,u)}else i=(0,k.parseFrom)(e.schema,e.signalPipelined("transformPastedText",n),"text");return{doc:i,from:s||(0,x.findSelectionAtStart)(i).from,to:a||(0,x.findSelectionAtEnd)(i).to}}function p(e,t){for(var r=[],n=0,o=e;t>n&&(o=o.firstChild);n++)r.push(0);return new y.Pos(r,0)}function h(e,t){for(var r=[],n=e,o=0;t>o&&n.size;o++)r.push(n.size-1),n=n.lastChild;return new y.Pos(r,n.size)}function d(e,t,r,n){var o=t.schema,i=o.nodes.doc,s=(0,k.fromDOM)(o,e,{topNode:t.create(),preserveWhitespace:!0});if(t!=i){var a=i.findConnection(t);if(!a)return null;for(var u=a.length-1;u>=-1;u--)s=(0>u?i:a[u]).create(null,s),++r,++n}return{doc:s,from:p(s,r),to:h(s,n)}}var m=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Input=void 0,r.dispatchKey=i;var g=e("browserkeymap"),v=n(g),y=e("../model"),k=e("../format"),b=e("./capturekeys"),w=e("../dom"),_=e("./domchange"),x=e("./selection"),C=e("./dompos"),M=null,S={};r.Input=function(){function e(t){var r=this;o(this,e),this.pm=t,this.baseKeymap=null,this.keySeq=null,this.composing=null,this.mouseDown=null,this.shiftKey=this.updatingComposition=!1,this.skipInput=0,this.draggingFrom=!1,this.keymaps=[],this.defaultKeymap=null,this.storedMarks=null,this.dropTarget=t.wrapper.appendChild((0,w.elt)("div",{"class":"ProseMirror-drop-target"}));var n=function(e){var r=S[e];t.content.addEventListener(e,function(e){return r(t,e)})};for(var i in S)n(i);t.on("selectionChange",function(){return r.storedMarks=null})}return m(e,[{key:"maybeAbortComposition",value:function(){if(this.composing&&!this.updatingComposition){if(this.composing.finished)l(this.pm);else{this.composing=null,this.skipInput++;var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0);e.removeAllRanges(),e.addRange(t)}}return!0}}}]),e}();S.keydown=function(e,t){if(e.signal("interaction"),16==t.keyCode&&(e.input.shiftKey=!0),!e.input.composing){var r=v["default"].keyName(t);r&&i(e,r,t)||e.sel.fastPoll()}},S.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},S.keypress=function(e,t){if(!(e.input.composing||!t.charCode||t.ctrlKey&&!t.altKey||w.browser.mac&&t.metaKey||i(e,v["default"].keyName(t),t))){var r=e.selection;r.node&&null==r.node.contains&&(e.tr["delete"](r.from,r.to).apply(),r=e.selection),s(e,r,String.fromCharCode(t.charCode)),t.preventDefault()}};var A=0,O=0;S.mousedown=function(e,t){e.signal("interaction");var r=Date.now(),n=500>r-A,o=600>r-O;O=A,A=r,o?u(e,t):e.input.mouseDown=new P(e,t,n)};var P=function(){function e(t,r,n){o(this,e),this.pm=t,this.event=r,this.leaveToBrowser=t.input.shiftKey||n;var i=(0,C.pathFromDOM)(t,r.target),s=t.doc.path(i);this.mightDrag=s.type.draggable||s==t.sel.range.node?i:null,this.mightDrag&&(r.target.draggable=!0,w.browser.gecko&&(this.setContentEditable=!r.target.hasAttribute("contentEditable"))&&r.target.setAttribute("contentEditable","false")),this.x=r.clientX,this.y=r.clientY,window.addEventListener("mouseup",this.up=this.up.bind(this)),window.addEventListener("mousemove",this.move=this.move.bind(this)),t.sel.fastPoll()}return m(e,[{key:"done",value:function(){window.removeEventListener("mouseup",this.up),window.removeEventListener("mousemove",this.move),this.mightDrag&&(this.event.target.draggable=!1,w.browser.gecko&&this.setContentEditable&&this.event.target.removeAttribute("contentEditable"))}},{key:"up",value:function(){if(this.done(),this.leaveToBrowser)this.pm.sel.fastPoll();else if(this.event.ctrlKey)a(this.pm,this.event);else if(!(0,C.handleNodeClick)(this.pm,"handleClick",this.event,!0)){var e=(0,C.selectableNodeAbove)(this.pm,this.event.target,{left:this.x,top:this.y});e?(this.pm.setNodeSelection(e),this.pm.focus()):this.pm.sel.fastPoll()}}},{key:"move",value:function(e){!this.leaveToBrowser&&(Math.abs(this.x-e.clientX)>4||Math.abs(this.y-e.clientY)>4)&&(this.leaveToBrowser=!0),this.pm.sel.fastPoll()}}]),e}();S.touchdown=function(e){e.sel.fastPoll()},S.contextmenu=function(e,t){(0,C.handleNodeClick)(e,"handleContextMenu",t,!1)};var T=function E(e,t){o(this,E),this.finished=!1,this.context=(0,_.textContext)(t),this.data=t,this.endData=null;var r=e.selection;if(t){var n=r.head.path,i=e.doc.path(n).textContent,s=i.indexOf(t,r.head.offset-t.length);s>-1&&s<=r.head.offset+t.length&&(r=new x.TextSelection(new y.Pos(n,s),new y.Pos(n,s+t.length)))}this.range=r};S.compositionstart=function(e,t){if(!e.input.maybeAbortComposition()){e.flush(),e.input.composing=new T(e,t.data);var r=e.selection.head.shorten();e.markRangeDirty({from:r,to:r.move(1)})}},S.compositionupdate=function(e,t){var r=e.input.composing;r&&r.data!=t.data&&(r.data=t.data,e.input.updatingComposition=!0,s(e,r.range,r.data),e.input.updatingComposition=!1,r.range=new x.TextSelection(r.range.from,r.range.from.move(r.data.length)))},S.compositionend=function(e,t){var r=e.input.composing;r&&(e.input.composing.finished=!0,e.input.composing.endData=t.data,setTimeout(function(){e.input.composing==r&&l(e)},20))},S.input=function(e){return e.input.skipInput?--e.input.skipInput:e.input.composing?void(e.input.composing.finished&&l(e)):(e.startOperation({readSelection:!1}),(0,_.applyDOMChange)(e),void e.scrollIntoView())},S.copy=S.cut=function(e,t){var r=e.selection,n=r.from,o=r.to,i=r.empty;!i&&t.clipboardData&&(c(e.doc,n,o,t.clipboardData),t.preventDefault(),"cut"!=t.type||i||e.tr["delete"](n,o).apply())},S.paste=function(e,t){if(t.clipboardData){var r=e.selection,n=f(e,t.clipboardData,e.input.shiftKey);n&&(t.preventDefault(),e.tr.replace(r.from,r.to,n.doc,n.from,n.to).apply(),e.scrollIntoView())}},S.dragstart=function(e,t){var r=e.input.mouseDown;if(r&&r.done(),t.dataTransfer){var n=e.selection,o=n.from,i=n.to,s=n.empty,a=void 0,u=!s&&e.posAtCoords({left:t.clientX,top:t.clientY});if(u&&u.cmp(o)>=0&&u.cmp(i)<=0)a={from:o,to:i};else if(r&&r.mightDrag){var l=y.Pos.from(r.mightDrag);a={from:l,to:l.move(1)}}a&&(e.input.draggingFrom=a,c(e.doc,a.from,a.to,t.dataTransfer))}},S.dragend=function(e){return window.setTimeout(function(){return e.input.draggingFrom=!1},50)},S.dragover=S.dragenter=function(e,t){t.preventDefault();var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(r){var n=(0,C.coordsAtPos)(e,r),o=e.wrapper.getBoundingClientRect();n.top-=o.top,n.right-=o.left,n.bottom-=o.top,n.left-=o.left;var i=e.input.dropTarget;i.style.display="block",i.style.left=n.left-1+"px",i.style.top=n.top+"px",i.style.height=n.bottom-n.top+"px"}},S.dragleave=function(e){return e.input.dropTarget.style.display=""},S.drop=function(e,t){if(e.input.dropTarget.style.display="",t.dataTransfer&&!e.signalDOM(t)){var r=f(e,t.dataTransfer);if(r){t.preventDefault();var n=e.posAtCoords({left:t.clientX,top:t.clientY}),o=n;if(!n)return;var i=e.tr;e.input.draggingFrom&&!t.ctrlKey&&(i["delete"](e.input.draggingFrom.from,e.input.draggingFrom.to),n=i.map(n).pos),i.replace(n,n,r.doc,r.from,r.to).apply();var s=i.map(o).pos;y.Pos.samePath(n.path,s.path)&&s.offset==n.offset+1&&e.doc.nodeAfter(n).type.selectable?e.setNodeSelection(n):e.setTextSelection(n,s),e.focus()}}},S.focus=function(e){e.wrapper.classList.add("ProseMirror-focused"),e.signal("focus")},S.blur=function(e){e.wrapper.classList.remove("ProseMirror-focused"),e.signal("blur")}},{"../dom":3,"../format":22,"../model":38,"./capturekeys":5,"./domchange":9,"./dompos":10,"./selection":19,browserkeymap:60}],15:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
+e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.DIRTY_REDRAW=r.DIRTY_RESCAN=r.ProseMirror=void 0,e("./css");var u=e("browserkeymap"),l=n(u),c=e("../model"),f=e("../transform"),p=e("../util/sortedinsert"),h=n(p),d=e("../util/error"),m=e("../util/map"),g=e("../util/event"),v=e("../dom"),y=e("../format"),k=e("./options"),b=e("./selection"),w=e("./dompos"),_=e("./draw"),x=e("./input"),C=e("./history"),M=e("./range"),S=r.ProseMirror=function(){function e(t){s(this,e),(0,v.ensureCSSAdded)(),t=this.options=(0,k.parseOptions)(t),this.schema=t.schema,null==t.doc&&(t.doc=this.schema.node("doc",null,[this.schema.node("paragraph")])),this.content=(0,v.elt)("div",{"class":"ProseMirror-content","pm-container":!0}),this.wrapper=(0,v.elt)("div",{"class":"ProseMirror"},this.content),this.wrapper.ProseMirror=this,t.place&&t.place.appendChild?t.place.appendChild(this.wrapper):t.place&&t.place(this.wrapper),this.setDocInner(t.docFormat?(0,y.parseFrom)(this.schema,t.doc,t.docFormat):t.doc),(0,_.draw)(this,this.doc),this.content.contentEditable=!0,t.label&&this.content.setAttribute("aria-label",t.label),this.mod=Object.create(null),this.cached=Object.create(null),this.operation=null,this.dirtyNodes=new m.Map,this.flushScheduled=!1,this.sel=new b.SelectionState(this,(0,b.findSelectionAtStart)(this.doc)),this.accurateSelection=!1,this.input=new x.Input(this),this.commands=null,this.commandKeys=null,(0,k.initOptions)(this)}return a(e,[{key:"setOption",value:function(e,t){(0,k.setOption)(this,e,t),this.signal("optionChanged",e,t)}},{key:"getOption",value:function(e){return this.options[e]}},{key:"setTextSelection",value:function(e,t){this.setSelection(new b.TextSelection(e,t))}},{key:"setNodeSelection",value:function(e){this.checkPos(e,!1);var t=this.doc.path(e.path);if(e.offset>=t.size)throw new b.SelectionError("Trying to set a node selection at the end of a node");var r=t.child(e.offset);if(!r.type.selectable)throw new b.SelectionError("Trying to select a non-selectable node");this.input.maybeAbortComposition(),this.sel.setAndSignal(new b.NodeSelection(e,e.move(1),r))}},{key:"setSelection",value:function(e){e instanceof b.TextSelection?(this.checkPos(e.head,!0),e.empty||this.checkPos(e.anchor,!0)):this.checkPos(e.to,!1),this.setSelectionDirect(e)}},{key:"setSelectionDirect",value:function(e){this.ensureOperation(),this.input.maybeAbortComposition(),e.eq(this.sel.range)||this.sel.setAndSignal(e)}},{key:"setContent",value:function(e,t){t&&(e=(0,y.parseFrom)(this.schema,e,t)),this.setDoc(e)}},{key:"getContent",value:function(e){return e?(0,y.serializeTo)(this.doc,e):this.doc}},{key:"setDocInner",value:function(e){if(e.type!=this.schema.nodes.doc)throw new d.AssertionError("Trying to set a document with a different schema");this.doc=e,this.ranges=new M.RangeStore(this),this.history=new C.History(this)}},{key:"setDoc",value:function(e,t){t||(t=(0,b.findSelectionAtStart)(e)),this.signal("beforeSetDoc",e,t),this.ensureOperation(),this.setDocInner(e),this.sel.set(t,!0),this.signal("setDoc",e,t)}},{key:"updateDoc",value:function(e,t,r){this.ensureOperation(),this.input.maybeAbortComposition(),this.ranges.transform(t),this.doc=e,this.sel.setAndSignal(r||this.sel.range.map(e,t)),this.signal("change")}},{key:"apply",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?P:arguments[1];if(e.doc==this.doc)return!1;if(e.docs[0]!=this.doc&&(0,c.findDiffStart)(e.docs[0],this.doc))throw new d.AssertionError("Applying a transform that does not start with the current document");return this.signal("beforeTransform",e,t),this.updateDoc(e.doc,e,t.selection),this.signal("transform",e,t),t.scrollIntoView&&this.scrollIntoView(),e}},{key:"checkPos",value:function(e,t){if(!e.isValid(this.doc,t))throw new d.AssertionError("Position "+e+" is not valid in current document")}},{key:"ensureOperation",value:function(e){return this.operation||this.startOperation(e)}},{key:"startOperation",value:function(e){var t=this;return this.operation=new T(this),e&&e.readSelection===!1||!this.sel.readFromDOM()||(this.operation.sel=this.sel.range),this.flushScheduled||((0,v.requestAnimationFrame)(function(){t.flushScheduled=!1,t.flush()}),this.flushScheduled=!0),this.operation}},{key:"flush",value:function(){if(document.body.contains(this.wrapper)&&this.operation){this.signal("flushing");var e=this.operation;if(e){this.operation=null,this.accurateSelection=!0;var t=e.doc!=this.doc||this.dirtyNodes.size,r=!1;this.input.composing||!t&&!e.composingAtStart||((0,_.redraw)(this,this.dirtyNodes,this.doc,e.doc),this.dirtyNodes.clear(),r=!0),((r||!e.sel.eq(this.sel.range))&&!this.input.composing||e.focus)&&this.sel.toDOM(e.focus),e.scrollIntoView!==!1&&(0,w.scrollIntoView)(this,e.scrollIntoView),t&&this.signal("draw"),this.signal("flush"),this.accurateSelection=!1}}}},{key:"addKeymap",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?50:arguments[1];(0,h["default"])(this.input.keymaps,{map:e,rank:t},function(e,t){return e.rank-t.rank})}},{key:"removeKeymap",value:function(e){for(var t=this.input.keymaps,r=0;r<t.length;++r)if(t[r].map==e||t[r].map.options.name==e)return t.splice(r,1),!0}},{key:"markRange",value:function(e,t,r){this.checkPos(e),this.checkPos(t);var n=new M.MarkedRange(e,t,r);return this.ranges.addRange(n),n}},{key:"removeRange",value:function(e){this.ranges.removeRange(e)}},{key:"setMark",value:function(e,t,r){var n=this.selection;if(n.empty){var o=this.activeMarks();if(null==t&&(t=!e.isInSet(o)),t&&!this.doc.path(n.head.path).type.canContainMark(e))return;this.input.storedMarks=t?e.create(r).addToSet(o):e.removeFromSet(o),this.signal("activeMarkChange")}else(null!=t?t:!this.doc.rangeHasMark(n.from,n.to,e))?this.apply(this.tr.addMark(n.from,n.to,e.create(r))):this.apply(this.tr.removeMark(n.from,n.to,e))}},{key:"activeMarks",value:function(){var e;return this.input.storedMarks||((e=this.selection.head)?this.doc.marksAt(e):[])}},{key:"focus",value:function(){this.operation?this.operation.focus=!0:this.sel.toDOM(!0)}},{key:"hasFocus",value:function(){return this.sel.range instanceof b.NodeSelection?document.activeElement==this.content:(0,b.hasFocus)(this)}},{key:"posAtCoords",value:function(e){return(0,w.posAtCoords)(this,e)}},{key:"coordsAtPos",value:function(e){return this.checkPos(e),(0,w.coordsAtPos)(this,e)}},{key:"scrollIntoView",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];e&&this.checkPos(e),this.ensureOperation(),this.operation.scrollIntoView=e}},{key:"execCommand",value:function(e,t){var r=this.commands[e];return!(!r||r.exec(this,t)===!1)}},{key:"keyForCommand",value:function(e){var t=this.commandKeys[e];if(void 0!==t)return t;var r=this.commands[e],n=this.input.baseKeymap;if(!r)return this.commandKeys[e]=null;var o=r.spec.key||(v.browser.mac?r.spec.macKey:r.spec.pcKey);if(o){o=l["default"].normalizeKeyName(Array.isArray(o)?o[0]:o);var i=n.bindings[o];if(Array.isArray(i)?i.indexOf(e)>-1:i==e)return this.commandKeys[e]=o}for(var s in n.bindings){var a=n.bindings[s];if(Array.isArray(a)?a.indexOf(e)>-1:a==e)return this.commandKeys[e]=s}return this.commandKeys[e]=null}},{key:"markRangeDirty",value:function(e){this.ensureOperation();for(var t=this.dirtyNodes,r=e.from,n=e.to,o=0,i=this.doc;;o++){var s=o==r.depth,a=o==n.depth;if(s||a||r.path[o]!=n.path[o]){var u=function(){var e=s?r.offset:r.path[o],u=a?n.offset:n.path[o]+1;if(i.isTextblock)i.forEach(function(r,n,o){u>n&&o>e&&t.set(r,O)});else for(var l,c=i.iter(e,u);l=c.next().value;)t.set(l,O);return"break"}();if("break"===u)break}else{var l=i.child(r.path[o]);t.has(l)||t.set(l,A),i=l}}}},{key:"markAllDirty",value:function(){this.dirtyNodes.set(this.doc,O)}},{key:"selection",get:function(){return this.accurateSelection||this.ensureOperation(),this.sel.range}},{key:"tr",get:function(){return new E(this)}}]),e}();S.prototype.apply.scroll={scrollIntoView:!0};var A=r.DIRTY_RESCAN=1,O=r.DIRTY_REDRAW=2,P={};(0,g.eventMixin)(S);var T=function D(e){s(this,D),this.doc=e.doc,this.sel=e.sel.range,this.scrollIntoView=!1,this.focus=!1,this.composingAtStart=!!e.input.composing},E=function(e){function t(e){s(this,t);var r=o(this,Object.getPrototypeOf(t).call(this,e.doc));return r.pm=e,r}return i(t,e),a(t,[{key:"apply",value:function(e){return this.pm.apply(this,e)}},{key:"replaceSelection",value:function(e,t){var r=this.selection,n=r.empty,o=r.from,i=r.to,s=r.node,a=void 0;if(e&&e.isInline&&t!==!1){var u=n?this.pm.input.storedMarks:this.doc.marksAt(o);e=e.type.create(e.attrs,e.text,u)}if(s&&s.isTextblock&&e&&e.isInline)o=new c.Pos(o.toPath(),0),i=new c.Pos(o.path,s.size);else if(s)for(;o.depth&&0==o.offset&&(a=this.doc.path(o.path))&&o.offset==a.size-1&&!a.type.canBeEmpty&&(!e||!a.type.canContain(e));)o=o.shorten(),i=i.shorten(null,1);else if(e&&e.isBlock&&this.doc.path(o.path.slice(0,o.depth-1)).type.canContain(e)){this["delete"](o,i);var l=this.doc.path(o.path);return o.offset&&o.offset!=l.size&&this.split(o),this.insert(o.shorten(null,o.offset?1:0),e)}return e?this.replaceWith(o,i,e):this["delete"](o,i)}},{key:"deleteSelection",value:function(){return this.replaceSelection()}},{key:"typeText",value:function(e){return this.replaceSelection(this.pm.schema.text(e),!0)}},{key:"selection",get:function(){return this.steps.length?this.pm.selection.map(this):this.pm.selection}}]),t}(f.Transform)},{"../dom":3,"../format":22,"../model":38,"../transform":44,"../util/error":55,"../util/event":56,"../util/map":57,"../util/sortedinsert":59,"./css":8,"./dompos":10,"./draw":11,"./history":12,"./input":14,"./options":16,"./range":17,"./selection":19,browserkeymap:60}],16:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r,n){h[e]=new p(t,r,n)}function i(e){var t=Object.create(null),r=e?[e].concat(e.use||[]):[];e:for(var n in h){for(var o=0;o<r.length;o++)if(n in r[o]){t[n]=r[o][n];continue e}t[n]=h[n].defaultValue}return t}function s(e){for(var t in h){var r=h[t];r.update&&r.updateOnInit&&r.update(e,e.options[t],null,!0)}}function a(e,t,r){var n=h[t];if(void 0===n)throw new l.AssertionError("Option '"+t+"' is not defined");if(n.update===!1)throw new l.AssertionError("Option '"+t+"' can not be changed");var o=e.options[t];e.options[t]=r,n.update&&n.update(e,r,o,!1)}Object.defineProperty(r,"__esModule",{value:!0}),r.defineOption=o,r.parseOptions=i,r.initOptions=s,r.setOption=a;var u=e("../model"),l=e("../util/error"),c=e("../ui/prompt"),f=e("./command"),p=function d(e,t,r){n(this,d),this.defaultValue=e,this.update=t,this.updateOnInit=r!==!1},h=Object.create(null);o("schema",u.defaultSchema,!1),o("doc",null,function(e,t){return e.setDoc(t)},!1),o("docFormat",null),o("place",null),o("historyDepth",100),o("historyEventDelay",500),o("commands",f.CommandSet["default"],f.updateCommands),o("commandParamPrompt",c.ParamPrompt),o("label",null)},{"../model":38,"../ui/prompt":53,"../util/error":55,"./command":7}],17:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.RangeStore=r.MarkedRange=void 0;var i=e("../util/event"),s=r.MarkedRange=function(){function e(t,r,o){n(this,e),this.options=o||{},this.from=t,this.to=r}return o(e,[{key:"remove",value:function(){this.signal("removed",this.from,this.to.max(this.from)),this.from=this.to=null}}]),e}();(0,i.eventMixin)(s);var a=function(){function e(){n(this,e),this.sorted=[]}return o(e,[{key:"find",value:function(e){for(var t=0,r=this.sorted.length;;){if(t+10>r){for(var n=t;r>n;n++)if(this.sorted[n].at.cmp(e)>=0)return n;return r}var o=t+r>>1;this.sorted[o].at.cmp(e)>0?r=o:t=o}}},{key:"insert",value:function(e){this.sorted.splice(this.find(e.at),0,e)}},{key:"remove",value:function(e,t){for(var r=this.find(e),n=0;;n++){var o=r-n-1,i=r+n;if(o>=0&&this.sorted[o].range==t)return void this.sorted.splice(o,1);if(i<this.sorted.length&&this.sorted[i].range==t)return void this.sorted.splice(i,1)}}},{key:"resort",value:function(){for(var e=0;e<this.sorted.length;e++)for(var t=this.sorted[e],r=t.at="open"==t.type?t.range.from:t.range.to,n=e;n>0&&this.sorted[n-1].at.cmp(r)>0;)this.sorted[n]=this.sorted[n-1],this.sorted[--n]=t}}]),e}(),u=(r.RangeStore=function(){function e(t){n(this,e),this.pm=t,this.ranges=[],this.sorted=new a}return o(e,[{key:"addRange",value:function(e){this.ranges.push(e),this.sorted.insert({type:"open",at:e.from,range:e}),this.sorted.insert({type:"close",at:e.to,range:e}),this.pm.markRangeDirty(e)}},{key:"removeRange",value:function(e){var t=this.ranges.indexOf(e);t>-1&&(this.ranges.splice(t,1),this.sorted.remove(e.from,e),this.sorted.remove(e.to,e),this.pm.markRangeDirty(e),e.remove())}},{key:"transform",value:function(e){for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t];r.from=e.map(r.from,r.options.inclusiveLeft?-1:1).pos,r.to=e.map(r.to,r.options.inclusiveRight?1:-1).pos;var n=r.from.cmp(r.to);r.options.removeWhenEmpty!==!1&&n>=0?(this.removeRange(r),t--):n>0&&(r.to=r.from)}this.sorted.resort()}},{key:"activeRangeTracker",value:function(){return new u(this.sorted.sorted)}}]),e}(),function(){function e(t){n(this,e),this.sorted=t,this.pos=0,this.current=[]}return o(e,[{key:"advanceTo",value:function(e){for(var t=void 0;this.pos<this.sorted.length&&(t=this.sorted[this.pos]).at.cmp(e)<=0;){var r=t.range.options.className;r&&("open"==t.type?this.current.push(r):this.current.splice(this.current.indexOf(r),1)),this.pos++}}},{key:"nextChangeBefore",value:function(e){for(;;){if(this.pos==this.sorted.length)return null;var t=this.sorted[this.pos];if(t.range.options.className)return t.at.cmp(e)>=0?null:t.at.offset;this.pos++}}}]),e}())},{"../util/event":56}],18:[function(e,t,r){"use strict";var n=e("../model"),o=e("./command"),i=e("../format");n.StrongMark.register("command","set",{derive:!0,label:"Set strong"}),n.StrongMark.register("command","unset",{derive:!0,label:"Unset strong"}),n.StrongMark.register("command","toggle",{derive:!0,label:"Toggle strong",menu:{group:"inline",rank:20,display:{type:"icon",width:805,height:1024,path:"M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z"}},keys:["Mod-B"]}),n.EmMark.register("command","set",{derive:!0,label:"Add emphasis"}),n.EmMark.register("command","unset",{derive:!0,label:"Remove emphasis"}),n.EmMark.register("command","toggle",{derive:!0,label:"Toggle emphasis",menu:{group:"inline",rank:21,display:{type:"icon",width:585,height:1024,path:"M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z"}},keys:["Mod-I"]}),n.CodeMark.register("command","set",{derive:!0,label:"Set code style"}),n.CodeMark.register("command","unset",{derive:!0,label:"Remove code style"}),n.CodeMark.register("command","toggle",{derive:!0,label:"Toggle code style",menu:{group:"inline",rank:22,display:{type:"icon",width:896,height:1024,path:"M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z"}},keys:["Mod-`"]});var s={type:"icon",width:951,height:1024,path:"M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z"};n.LinkMark.register("command","unset",{derive:!0,label:"Unlink",menu:{group:"inline",rank:30,display:s},active:function(){return!0}}),n.LinkMark.register("command","set",{derive:{inverseSelect:!0,params:[{label:"Target",attr:"href"},{label:"Title",attr:"title"}]},label:"Add link",menu:{group:"inline",rank:30,display:s}}),n.Image.register("command","insert",{derive:{params:[{label:"Image URL",attr:"src"},{label:"Description / alternative text",attr:"alt",prefill:function(e){return(0,o.selectedNodeAttr)(e,this,"alt")||(0,i.toText)(e.doc.sliceBetween(e.selection.from,e.selection.to))}},{label:"Title",attr:"title"}]},label:"Insert image",menu:{group:"insert",rank:20,display:{type:"label",label:"Image"}}}),n.BulletList.register("command","wrap",{derive:{list:!0},label:"Wrap the selection in a bullet list",menu:{group:"block",rank:40,display:{type:"icon",width:768,height:896,path:"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z"}},keys:["Alt-Right '*'","Alt-Right '-'"]}),n.OrderedList.register("command","wrap",{derive:{list:!0},label:"Wrap the selection in an ordered list",menu:{group:"block",rank:41,display:{type:"icon",width:768,height:896,path:"M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z"}},keys:["Alt-Right '1'"]}),n.BlockQuote.register("command","wrap",{derive:!0,label:"Wrap the selection in a block quote",menu:{group:"block",rank:45,display:{type:"icon",width:640,height:896,path:"M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z"}},keys:["Alt-Right '>'","Alt-Right '\"'"]}),n.HardBreak.register("command","insert",{label:"Insert hard break",run:function(e){var t=e.selection,r=t.node,n=t.from;return r&&r.isBlock?!1:e.doc.path(n.path).type.isCode?e.tr.typeText("\n").apply(e.apply.scroll):e.tr.replaceSelection(this.create()).apply(e.apply.scroll)},keys:["Mod-Enter","Shift-Enter"]}),n.ListItem.register("command","split",{label:"Split the current list item",run:function(e){var t=e.selection,r=t.from,o=t.to,i=t.node;if(i&&i.isBlock||r.path.length<2||!n.Pos.samePath(r.path,o.path))return!1;var s=r.shorten(),a=e.doc.path(s.path);if(a.type!=this)return!1;var u=o.offset==a.child(s.offset).size?e.schema.defaultTextblockType():null;return e.tr["delete"](r,o).split(r,2,u).apply(e.apply.scroll)},keys:["Enter(50)"]});for(var a=function(e){n.Heading.registerComputed("command","make"+e,function(t){return e<=t.maxLevel?{derive:{name:"make",attrs:{level:e}},label:"Change to heading "+e,keys:10>e&&["Mod-"+e],menu:{group:"textblockHeading",rank:30+e,display:{type:"label",label:"Level "+e},activeDisplay:"Head "+e}}:void 0})},u=1;10>=u;u++)a(u);n.Paragraph.register("command","make",{derive:!0,label:"Change to paragraph",keys:["Mod-0"],menu:{group:"textblock",rank:10,display:{type:"label",label:"Plain"},activeDisplay:"Plain"}}),n.CodeBlock.register("command","make",{derive:!0,label:"Change to code block",keys:["Mod-\\"],menu:{group:"textblock",rank:20,display:{type:"label",label:"Code"},activeDisplay:"Code"}}),n.HorizontalRule.register("command","insert",{derive:!0,label:"Insert horizontal rule",keys:["Mod-Shift--"],menu:{group:"insert",rank:70,display:{type:"label",label:"Horizontal rule"}}})},{"../format":22,"../model":38,"./command":7}],19:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){if(!a(e))return null;var t=window.getSelection();return new w((0,y.posFromDOM)(e,t.anchorNode,t.anchorOffset,!0),(0,y.posFromDOM)(e,t.focusNode,t.focusOffset,!0))}function a(e){var t=window.getSelection();return t.rangeCount&&(0,v.contains)(e.content,t.anchorNode)}function u(e,t,r,n,o){var i=e.path(t);if(i.isTextblock)return new w(new m.Pos(t,r));for(var s=r+(n>0?0:-1);n>0?s<i.size:s>=0;s+=n){var a=i.child(s);if(!o&&null==a.type.contains&&a.type.selectable)return new _(new m.Pos(t,s),new m.Pos(t,s+1),a);t.push(s);var l=u(e,t,0>n?a.size:0,n,o);if(l)return l;t.pop()}}function l(e,t,r,n){for(var o=t.path.slice(),i=t.offset;;){var s=u(e,o,i,r,n);if(s)return s;if(!o.length)break;i=o.pop()+(r>0?1:0)}}function c(e,t){var r=arguments.length<=2||void 0===arguments[2]?1:arguments[2],n=arguments[3],o=l(e,t,r,n)||l(e,t,-r,n);return o||k("Searching for selection in invalid document "+e),o}function f(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];return u(e,t.slice(),0,1,r)}function p(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments[2];return u(e,t.slice(),e.size,-1,r)}function h(e,t,r){for(var n=(0,y.pathToDOM)(e.content,t.path),o=(0,y.coordsAtPos)(e,t),i=n.firstChild;i;i=i.nextSibling)if(1==i.nodeType)for(var s=i.getClientRects(),a=0;a<s.length;a++){var u=s[a];if(0>r?u.bottom<o.top:u.top>o.bottom)return!1}return!0}var d=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.NodeSelection=r.TextSelection=r.Selection=r.SelectionState=r.SelectionError=void 0,r.rangeFromDOMLoose=s,r.hasFocus=a,r.findSelectionFrom=l,r.findSelectionNear=c,r.findSelectionAtStart=f,r.findSelectionAtEnd=p,r.verticalMotionLeavesTextblock=h;var m=e("../model"),g=e("../util/error"),v=e("../dom"),y=e("./dompos"),k=r.SelectionError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(g.ProseMirrorError),b=(r.SelectionState=function(){function e(t,r){var o=this;n(this,e),this.pm=t,this.range=r,this.lastNonNodePos=null,this.polling=null,this.lastAnchorNode=this.lastHeadNode=this.lastAnchorOffset=this.lastHeadOffset=null,this.lastNode=null,t.content.addEventListener("focus",function(){return o.receivedFocus()}),this.poller=this.poller.bind(this)}return d(e,[{key:"setAndSignal",value:function(e,t){this.set(e,t),this.pm.signal("selectionChange")}},{key:"set",value:function(e,t){this.pm.ensureOperation({readSelection:!1}),this.range=e,e.node||(this.lastNonNodePos=null),t!==!1&&(this.lastAnchorNode=null)}},{key:"poller",value:function(){a(this.pm)?(this.pm.operation||this.readFromDOM(),this.polling=setTimeout(this.poller,100)):this.polling=null}},{key:"startPolling",value:function(){clearTimeout(this.polling),this.polling=setTimeout(this.poller,50)}},{key:"fastPoll",value:function(){this.startPolling()}},{key:"stopPolling",value:function(){clearTimeout(this.polling),this.polling=null}},{key:"domChanged",value:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastHeadNode||e.focusOffset!=this.lastHeadOffset}},{key:"storeDOMState",value:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastHeadNode=e.focusNode,this.lastHeadOffset=e.focusOffset}},{key:"readFromDOM",value:function(){if(this.pm.input.composing||!a(this.pm)||!this.domChanged())return!1;var e=window.getSelection(),t=this.pm.doc,r=(0,y.posFromDOM)(this.pm,e.anchorNode,e.anchorOffset),n=e.isCollapsed?r:(0,y.posFromDOM)(this.pm,e.focusNode,e.focusOffset),o=c(t,n,this.range.head&&this.range.head.cmp(n)<0?-1:1);return o instanceof w&&t.path(r.path).isTextblock&&(o=new w(r,o.head)),this.setAndSignal(o),o instanceof _||o.head.cmp(n)||o.anchor.cmp(r)?this.toDOM():(this.clearNode(),this.storeDOMState()),!0}},{key:"toDOM",value:function(e){if(!a(this.pm)){if(!e)return;v.browser.gecko&&this.pm.content.focus()}this.range instanceof _?this.nodeToDOM():this.rangeToDOM()}},{key:"nodeToDOM",value:function(){var e=(0,y.pathToDOM)(this.pm.content,this.range.from.toPath());e!=this.lastNode&&(this.clearNode(),e.classList.add("ProseMirror-selectednode"),this.pm.content.classList.add("ProseMirror-nodeselection"),this.lastNode=e);var t=document.createRange(),r=window.getSelection();t.selectNode(e),r.removeAllRanges(),r.addRange(t),this.storeDOMState()}},{key:"rangeToDOM",value:function(){this.clearNode();var e=(0,y.DOMFromPos)(this.pm.content,this.range.anchor),t=(0,y.DOMFromPos)(this.pm.content,this.range.head),r=window.getSelection(),n=document.createRange();if(r.extend)n.setEnd(e.node,e.offset),n.collapse(!1);else{if(this.range.anchor.cmp(this.range.head)>0){var o=e;e=t,t=o}n.setEnd(t.node,t.offset),n.setStart(e.node,e.offset)}r.removeAllRanges(),r.addRange(n),r.extend&&r.extend(t.node,t.offset),this.storeDOMState()}},{key:"clearNode",value:function(){return this.lastNode?(this.lastNode.classList.remove("ProseMirror-selectednode"),this.pm.content.classList.remove("ProseMirror-nodeselection"),this.lastNode=null,!0):void 0}},{key:"receivedFocus",value:function(){null==this.polling&&this.startPolling()}}]),e}(),r.Selection=function x(){n(this,x)}),w=r.TextSelection=function(e){function t(e,r){n(this,t);var i=o(this,Object.getPrototypeOf(t).call(this));return i.anchor=e,i.head=r||e,i}return i(t,e),d(t,[{key:"eq",value:function(e){return e instanceof t&&!e.head.cmp(this.head)&&!e.anchor.cmp(this.anchor)}},{key:"map",value:function(e,r){var n=r.map(this.head).pos;if(!e.path(n.path).isTextblock)return c(e,n);var o=r.map(this.anchor).pos;return new t(e.path(o.path).isTextblock?o:n,n)}},{key:"inverted",get:function(){return this.anchor.cmp(this.head)>0}},{key:"from",get:function(){return this.inverted?this.head:this.anchor}},{key:"to",get:function(){return this.inverted?this.anchor:this.head}},{key:"empty",get:function(){return 0==this.anchor.cmp(this.head)}}]),t}(b),_=r.NodeSelection=function(e){function t(e,r,i){n(this,t);var s=o(this,Object.getPrototypeOf(t).call(this));return s.from=e,s.to=r,s.node=i,s}return i(t,e),d(t,[{key:"eq",value:function(e){return e instanceof t&&!this.from.cmp(e.from)}},{key:"map",value:function(e,r){var n=r.map(this.from,1).pos,o=r.map(this.to,-1).pos;if(m.Pos.samePath(n.path,o.path)&&n.offset==o.offset-1){var i=e.nodeAfter(n);if(i.type.selectable)return new t(n,o,i)}return c(e,n)}},{key:"empty",get:function(){return!1}}]),t}(b)},{"../dom":3,"../model":38,"../util/error":55,"./dompos":10}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r){r||(r={});var n=new k(e,r.topNode||e.node("doc"),r),o=r.from?t.childNodes[r.from]:t.firstChild,i=null!=r.to&&t.childNodes[r.to]||null;n.addAll(o,i,!0);var s=void 0;do s=n.leave();while(n.stack.length);return s}function s(e,t,r){var n=(r&&r.document||window.document).createElement("div");return n.innerHTML=t,i(e,n,r)}function a(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function u(e){for(var t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=void 0,n=[];r=t.exec(e);)n.push(r[1],r[2].trim());return n}function l(e){return e.cached.parseDOMInfo||(e.cached.parseDOMInfo=c(e))}function c(e){var t=Object.create(null),r=Object.create(null);return t._=[],e.registry("parseDOM",function(e,r,n){var o=r.parse;"block"==o?o=function(e,t){t.wrapIn(e,this)}:"mark"==o&&(o=function(e,t){t.wrapMark(e,this)}),(0,d["default"])(t[e]||(t[e]=[]),{type:n,parse:o,selector:r.selector,rank:null==r.rank?50:r.rank},function(e,t){return e.rank-t.rank})}),e.registry("parseDOMStyle",function(e,t,n){(0,d["default"])(r[e]||(r[e]=[]),{type:n,parse:t.parse,rank:null==t.rank?50:t.rank},function(e,t){return e.rank-t.rank})}),{tags:t,styles:r}}var f=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.fromDOM=i,r.fromHTML=s;var p=e("../model"),h=e("../util/sortedinsert"),d=n(h),m=e("./register");(0,m.defineSource)("dom",i),(0,m.defineSource)("html",s);var g={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},v={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},y=[],k=function(){function e(t,r,n){o(this,e),this.options=n||{},this.schema=t,this.stack=[],this.marks=y,this.closing=!1,this.enter(r.type,r.attrs);var i=l(t);this.tagInfo=i.tags,this.styleInfo=i.styles}return f(e,[{key:"addDOM",value:function(e){if(3==e.nodeType){var t=e.nodeValue,r=this.top,n=void 0;(/\S/.test(t)||r.type.isTextblock)&&(this.options.preserveWhitespace||(t=t.replace(/\s+/g," "),/^\s/.test(t)&&(!(n=r.content[r.content.length-1])||"text"==n.type.name&&/\s$/.test(n.text))&&(t=t.slice(1))),t&&this.insertNode(this.schema.text(t,this.marks)))}else if(1!=e.nodeType||e.hasAttribute("pm-ignore"));else{var o=e.getAttribute("style");o?this.addElementWithStyles(u(o),e):this.addElement(e)}}},{key:"addElement",value:function(e){var t=e.nodeName.toLowerCase();this.parseNodeType(t,e)||v.hasOwnProperty(t)||(this.addAll(e.firstChild,null),g.hasOwnProperty(t)&&this.top.type==this.schema.defaultTextblockType()&&(this.closing=!0))}},{key:"addElementWithStyles",value:function(e,t){for(var r=this,n=[],o=0;o<e.length;o+=2){var i=this.styleInfo[e[o]],s=e[o+1];if(i)for(var a=0;a<i.length;a++)n.push(i[a],s)}var u=function l(e){if(e==n.length)r.addElement(t);else{var o=n[e];o.parse.call(o.type,n[e+1],r,l.bind(null,e+2))}};u(0)}},{key:"tryParsers",value:function(e,t){if(e)for(var r=0;r<e.length;r++){var n=e[r];if((!n.selector||a(t,n.selector))&&n.parse.call(n.type,t,this)!==!1)return!0}}},{key:"parseNodeType",value:function(e,t){return this.tryParsers(this.tagInfo[e],t)||this.tryParsers(this.tagInfo._,t)}},{key:"addAll",value:function(e,t,r){for(var n=r&&this.stack.slice(),o=e;o!=t;o=o.nextSibling)this.addDOM(o),r&&g.hasOwnProperty(o.nodeName.toLowerCase())&&this.sync(n);
+}},{key:"doClose",value:function(){if(this.closing&&!(this.stack.length<2)){var e=this.leave();this.enter(e.type,e.attrs),this.closing=!1}}},{key:"insertNode",value:function(e){if(this.top.type.canContain(e))this.doClose();else{for(var t=void 0,r=this.stack.length-1;r>=0;r--){var n=this.stack[r].type.findConnection(e.type);if(n){if(r==this.stack.length-1)this.doClose();else for(;this.stack.length>r+1;)this.leave();t=n;break}}if(!t)return;for(var o=0;o<t.length;o++)this.enter(t[o]);this.marks.length&&(this.marks=y)}return this.top.content.push(e),e}},{key:"insert",value:function(e,t,r){return this.insertNode(e.createAutoFill(t,r,this.marks))}},{key:"enter",value:function(e,t){this.stack.push({type:e,attrs:t,content:[]})}},{key:"leave",value:function(){this.marks.length&&(this.marks=y);var e=this.stack.pop(),t=e.content[e.content.length-1];!this.options.preserveWhitespace&&t&&t.isText&&/\s$/.test(t.text)&&(1==t.text.length?e.content.pop():e.content[e.content.length-1]=t.copy(t.text.slice(0,t.text.length-1)));var r=e.type.createAutoFill(e.attrs,e.content);return this.stack.length&&this.insertNode(r),r}},{key:"sync",value:function(e){for(;this.stack.length>e.length;)this.leave();for(;;){var t=this.stack.length-1,r=this.stack[t],n=e[t];if(r.type==n.type&&p.Node.sameAttrs(r.attrs,n.attrs))break;this.leave()}for(;e.length>this.stack.length;){var o=e[this.stack.length];this.enter(o.type,o.attrs)}this.marks.length&&(this.marks=y),this.closing=!1}},{key:"wrapIn",value:function(e,t,r){this.enter(t,r),this.addAll(e.firstChild,null,!0),this.leave()}},{key:"wrapMark",value:function(e,t){var r=this.marks;this.marks=(t.instance||t).addToSet(r),e.call?e():this.addAll(e.firstChild,null),this.marks=r}},{key:"top",get:function(){return this.stack[this.stack.length-1]}}]),e}();p.Paragraph.register("parseDOM","p",{parse:"block"}),p.BlockQuote.register("parseDOM","blockquote",{parse:"block"});for(var b=function(e){p.Heading.registerComputed("parseDOM","h"+e,function(t){return e<=t.maxLevel?{parse:function(t,r){r.wrapIn(t,this,{level:e})}}:void 0})},w=1;6>=w;w++)b(w);p.HorizontalRule.register("parseDOM","hr",{parse:"block"}),p.CodeBlock.register("parseDOM","pre",{parse:function(e,t){var r=e.firstChild&&/^code$/i.test(e.firstChild.nodeName)&&e.firstChild.getAttribute("class");if(r&&/fence/.test(r)){for(var n=[],o=/(?:^|\s)lang-(\S+)/g,i=void 0;i=o.exec(r);)n.push(i[1]);r=n.join(" ")}else r=null;var s=e.textContent;t.insert(this,{params:r},s?[t.schema.text(s)]:[])}}),p.BulletList.register("parseDOM","ul",{parse:"block"}),p.OrderedList.register("parseDOM","ol",{parse:function(e,t){var r={order:e.getAttribute("start")||1};t.wrapIn(e,this,r)}}),p.ListItem.register("parseDOM","li",{parse:"block"}),p.HardBreak.register("parseDOM","br",{parse:function(e,t){t.insert(this)}}),p.Image.register("parseDOM","img",{parse:function(e,t){t.insert(this,{src:e.getAttribute("src"),title:e.getAttribute("title")||null,alt:e.getAttribute("alt")||null})}}),p.LinkMark.register("parseDOM","a",{parse:function(e,t){t.wrapMark(e,this.create({href:e.getAttribute("href"),title:e.getAttribute("title")}))},selector:"[href]"}),p.EmMark.register("parseDOM","i",{parse:"mark"}),p.EmMark.register("parseDOM","em",{parse:"mark"}),p.EmMark.register("parseDOMStyle","font-style",{parse:function(e,t,r){"italic"==e?t.wrapMark(r,this):r()}}),p.StrongMark.register("parseDOM","b",{parse:"mark"}),p.StrongMark.register("parseDOM","strong",{parse:"mark"}),p.StrongMark.register("parseDOMStyle","font-weight",{parse:function(e,t,r){"bold"==e||"bolder"==e||!/\D/.test(e)&&+e>=500?t.wrapMark(r,this):r()}}),p.CodeMark.register("parseDOM","code",{parse:"mark"})},{"../model":38,"../util/sortedinsert":59,"./register":23}],21:[function(e,t,r){"use strict";function n(e,t){for(var r=t.trim().split(/\n{2,}/),n=[],o=0;o<r.length;o++){for(var i=[],s=r[o].split("\n"),a=0;a<s.length;a++)a&&i.push(e.node("hard_break")),s[a]&&i.push(e.text(s[a]));n.push(e.node("paragraph",null,i))}return n.length||n.push(e.node("paragraph")),e.node("doc",null,n)}Object.defineProperty(r,"__esModule",{value:!0}),r.fromText=n;var o=e("./register");(0,o.defineSource)("text",n)},{"./register":23}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./register");Object.defineProperty(r,"serializeTo",{enumerable:!0,get:function(){return n.serializeTo}}),Object.defineProperty(r,"knownTarget",{enumerable:!0,get:function(){return n.knownTarget}}),Object.defineProperty(r,"defineTarget",{enumerable:!0,get:function(){return n.defineTarget}}),Object.defineProperty(r,"parseFrom",{enumerable:!0,get:function(){return n.parseFrom}}),Object.defineProperty(r,"knownSource",{enumerable:!0,get:function(){return n.knownSource}}),Object.defineProperty(r,"defineSource",{enumerable:!0,get:function(){return n.defineSource}});var o=e("./from_dom");Object.defineProperty(r,"fromDOM",{enumerable:!0,get:function(){return o.fromDOM}}),Object.defineProperty(r,"fromHTML",{enumerable:!0,get:function(){return o.fromHTML}});var i=e("./to_dom");Object.defineProperty(r,"toDOM",{enumerable:!0,get:function(){return i.toDOM}}),Object.defineProperty(r,"toHTML",{enumerable:!0,get:function(){return i.toHTML}}),Object.defineProperty(r,"nodeToDOM",{enumerable:!0,get:function(){return i.nodeToDOM}});var s=e("./from_text");Object.defineProperty(r,"fromText",{enumerable:!0,get:function(){return s.fromText}});var a=e("./to_text");Object.defineProperty(r,"toText",{enumerable:!0,get:function(){return a.toText}})},{"./from_dom":20,"./from_text":21,"./register":23,"./to_dom":24,"./to_text":25}],23:[function(e,t,r){"use strict";function n(e,t,r){var n=c[t];if(!n)throw new l.NamespaceError("Target format "+t+" not defined");return n(e,r)}function o(e){return!!c[e]}function i(e,t){c[e]=t}function s(e,t,r,n){var o=f[r];if(!o)throw new l.NamespaceError("Source format "+r+" not defined");return o(e,t,n)}function a(e){return!!f[e]}function u(e,t){f[e]=t}Object.defineProperty(r,"__esModule",{value:!0}),r.serializeTo=n,r.knownTarget=o,r.defineTarget=i,r.parseFrom=s,r.knownSource=a,r.defineSource=u;var l=e("../util/error"),c=Object.create(null);i("json",function(e){return e.toJSON()});var f=Object.create(null);u("json",function(e,t){return e.nodeFromJSON(t)})},{"../util/error":55}],24:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return new f(t).renderContent(e)}function i(e,t,r){var n=new f(t),o=n.renderNode(e,r);return e.isInline&&(o=n.wrapInlineFlat(o,e.marks),n.options.renderInlineFlat&&(o=t.renderInlineFlat(e,o,r)||o)),o}function s(e,t){var r=new f(t),n=r.elt("div");return n.appendChild(r.renderContent(e)),n.innerHTML}function a(e,t){e.prototype.serializeDOM=t}var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.toDOM=o,r.nodeToDOM=i,r.toHTML=s;var l=e("../model"),c=e("./register"),f=function(){function e(t){n(this,e),this.options=t||{},this.doc=this.options.document||window.document}return u(e,[{key:"elt",value:function(e,t){var r=this.doc.createElement(e);if(t)for(var n in t)"style"==n?r.style.cssText=t[n]:t[n]&&r.setAttribute(n,t[n]);for(var o=arguments.length,i=Array(o>2?o-2:0),s=2;o>s;s++)i[s-2]=arguments[s];for(var a=0;a<i.length;a++)r.appendChild("string"==typeof i[a]?this.doc.createTextNode(i[a]):i[a]);return r}},{key:"renderNode",value:function(e,t){var r=e.type.serializeDOM(e,this);return this.options.onRender&&(r=this.options.onRender(e,r,t)||r),r}},{key:"renderContent",value:function(e,t){return t||(t=this.doc.createDocumentFragment()),e.isTextblock?this.options.renderInlineFlat?this.renderInlineFlatInto(e,t):this.renderInlineInto(e,t):this.renderBlocksInto(e,t),t}},{key:"renderBlocksInto",value:function(e,t){for(var r,n=e.iter();r=n.next().value;)this.options.path&&this.options.path.push(n.offset-r.width),t.appendChild(this.renderNode(r,n.offset-r.width)),this.options.path&&this.options.path.pop()}},{key:"renderInlineInto",value:function(e,t){var r=this,n=t,o=[];e.forEach(function(e,t){for(var i=0;i<Math.min(o.length,e.marks.length)&&e.marks[i].eq(o[i]);++i);for(;i<o.length;)o.pop(),n=n.parentNode;for(;o.length<e.marks.length;){var s=e.marks[o.length];o.push(s),n=n.appendChild(r.renderMark(s))}n.appendChild(r.renderNode(e,t))})}},{key:"renderInlineFlatInto",value:function(e,t){var r=this;e.forEach(function(e,n){var o=r.renderNode(e,n);o=r.wrapInlineFlat(o,e.marks),o=r.options.renderInlineFlat(e,o,n)||o,t.appendChild(o)})}},{key:"renderMark",value:function(e){return e.type.serializeDOM(e,this)}},{key:"wrapInlineFlat",value:function(e,t){for(var r=t.length-1;r>=0;r--){var n=this.renderMark(t[r]);n.appendChild(e),e=n}return e}},{key:"renderAs",value:function(e,t,r){var n=this.renderContent(e,this.elt(t,r));return this.options.onContainer&&this.options.onContainer(n),n}}]),e}();(0,c.defineTarget)("dom",o),(0,c.defineTarget)("html",s),a(l.BlockQuote,function(e,t){return t.renderAs(e,"blockquote")}),l.BlockQuote.prototype.countCoordsAsChild=function(e,t,r,n){var o=r.firstChild.getBoundingClientRect();return n.left<o.left-2?l.Pos.from(t):void 0},a(l.BulletList,function(e,t){return t.renderAs(e,"ul")}),a(l.OrderedList,function(e,t){return t.renderAs(e,"ol",{start:"1"!=e.attrs.order&&e.attrs.order})}),l.OrderedList.prototype.countCoordsAsChild=l.BulletList.prototype.countCoordsAsChild=function(e,t,r,n){for(var o=0;o<r.childNodes.length;o++){var i=r.childNodes[o];if(i.hasAttribute("pm-offset")){var s=i.getBoundingClientRect();if(n.left>s.left-2)return null;if(s.top<=n.top&&s.bottom>=n.top)return new l.Pos(t,o)}}},a(l.ListItem,function(e,t){return t.renderAs(e,"li")}),a(l.HorizontalRule,function(e,t){return t.elt("hr")}),a(l.Paragraph,function(e,t){return t.renderAs(e,"p")}),a(l.Heading,function(e,t){return t.renderAs(e,"h"+e.attrs.level)}),a(l.CodeBlock,function(e,t){var r=t.renderAs(e,"code");return null!=e.attrs.params&&(r.className="fence "+e.attrs.params.replace(/(^|\s+)/g,"$&lang-")),t.elt("pre",null,r)}),a(l.Text,function(e,t){return t.doc.createTextNode(e.text)}),a(l.Image,function(e,t){return t.elt("img",{src:e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})}),a(l.HardBreak,function(e,t){return t.elt("br")}),a(l.EmMark,function(e,t){return t.elt("em")}),a(l.StrongMark,function(e,t){return t.elt("strong")}),a(l.CodeMark,function(e,t){return t.elt("code")}),a(l.LinkMark,function(e,t){return t.elt("a",{href:e.attrs.href,title:e.attrs.title})})},{"../model":38,"./register":23}],25:[function(e,t,r){"use strict";function n(e){return e.type.serializeText(e).trim()}Object.defineProperty(r,"__esModule",{value:!0}),r.toText=n;var o=e("../model"),i=e("./register");o.Block.prototype.serializeText=function(e){var t="";return e.forEach(function(e){return t+=e.type.serializeText(e)}),t},o.Textblock.prototype.serializeText=function(e){var t=o.Block.prototype.serializeText(e);return t&&t+"\n\n"},o.Inline.prototype.serializeText=function(){return""},o.HardBreak.prototype.serializeText=function(){return"\n"},o.Text.prototype.serializeText=function(e){return e.text},(0,i.defineTarget)("text",n)},{"../model":38,"./register":23}],26:[function(e,t,r){"use strict";function n(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?null:arguments[3],o=arguments.length<=4||void 0===arguments[4]?null:arguments[4],s=t.shorten(),a=s.offset>0&&e.doc.path(s.path).child(s.offset-1),u=a&&a.type.name==r&&(!o||o(a)),l=e.tr.wrap(t,t,r,n),c=l.map(t).pos;l["delete"](new i.Pos(c.path,0),c),u&&l.join(s),l.apply()}function o(e,t,r,n){e.tr.setBlockType(t,t,r,n)["delete"](new i.Pos(t.path,0),t).apply()}Object.defineProperty(r,"__esModule",{value:!0}),r.autoInputRules=void 0;var i=e("../model"),s=e("../edit"),a=e("./inputrules"),u=r.autoInputRules=Object.create(null);(0,s.defineOption)("autoInput",!1,function(e,t){e.mod.autoInput&&(e.mod.autoInput.forEach(function(t){return(0,a.removeInputRule)(e,t)}),e.mod.autoInput=null),t&&!function(){t===!0&&(t=["schema",u]);var r=Object.create(null),n=e.mod.autoInput=[];t.forEach(function(t){if("schema"===t)e.schema.registry("autoInput",function(e,t,n,o){var i=o+":"+e,s=t.handler;s.bind&&(s=s.bind(n)),r[i]=new a.InputRule(t.match,t.filter,s)});else for(var n in t){var o=t[n];null==o?delete r[n]:r[n]=o}});for(var o in r)(0,a.addInputRule)(e,r[o]),n.push(r[o])}()}),u.emDash=new a.InputRule(/--$/,"-","—"),u.openDoubleQuote=new a.InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,'"',"“"),u.closeDoubleQuote=new a.InputRule(/"$/,'"',"”"),u.openSingleQuote=new a.InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"'","‘"),u.closeSingleQuote=new a.InputRule(/'$/,"'","’"),i.BlockQuote.register("autoInput","startBlockQuote",new a.InputRule(/^\s*> $/," ",function(e,t,r){n(e,r,this)})),i.OrderedList.register("autoInput","startOrderedList",new a.InputRule(/^(\d+)\. $/," ",function(e,t,r){var o=+t[1];n(e,r,this,{order:o||null},function(e){return e.size+(e.attrs.order||1)==o})})),i.BulletList.register("autoInput","startBulletList",new a.InputRule(/^\s*([-+*]) $/," ",function(e,t,r){var o=t[1];n(e,r,this,null,function(e){return e.attrs.bullet==o})})),i.CodeBlock.register("autoInput","startCodeBlock",new a.InputRule(/^```$/,"`",function(e,t,r){o(e,r,this,{params:""})})),i.Heading.registerComputed("autoInput","startHeading",function(e){var t=new RegExp("^(#{1,"+e.maxLevel+"}) $");return new a.InputRule(t," ",function(e,t,r){o(e,r,this,{level:t[1].length})})})},{"../edit":13,"../model":38,"./inputrules":27}],27:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){e.mod.interpretInput||(e.mod.interpretInput=new c(e)),e.mod.interpretInput.addRule(t)}function i(e,t){var r=e.mod.interpretInput;r&&(r.removeRule(t),0==r.rules.length&&(r.unregister(),e.mod.interpretInput=null))}function s(e,t){for(var r,n=e.path(t.path),o=n.type.isCode,i="",s=n.iter(0,t.offset);r=s.next().value;)r.isText?i+=r.text:i="",s.atEnd()&&r.marks.some(function(e){return e.type.isCode})&&(o=!0);return{textBefore:i,isCode:o}}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.InputRule=void 0,r.addInputRule=o,r.removeInputRule=i;var u=e("../model"),l=e("../edit"),c=(r.InputRule=function f(e,t,r){n(this,f),this.filter=t,this.match=e,this.handler=r},function(){function e(t){var r=this;n(this,e),this.pm=t,this.rules=[],this.cancelVersion=null,t.on("selectionChange",this.onSelChange=function(){return r.cancelVersion=null}),t.on("textInput",this.onTextInput=this.onTextInput.bind(this)),t.addKeymap(new l.Keymap({Backspace:function(e){return r.backspace(e)}},{name:"inputRules"}),20)}return a(e,[{key:"unregister",value:function(){this.pm.off("selectionChange",this.onSelChange),this.pm.off("textInput",this.onTextInput),this.pm.removeKeymap("inputRules")}},{key:"addRule",value:function(e){this.rules.push(e)}},{key:"removeRule",value:function(e){var t=this.rules.indexOf(e);return t>-1?(this.rules.splice(t,1),!0):void 0}},{key:"onTextInput",value:function(e){var t=this.pm.selection.head;if(t)for(var r=void 0,n=void 0,o=e[e.length-1],i=0;i<this.rules.length;i++){var a=this.rules[i],l=void 0;if(!a.filter||a.filter==o){if(null==r){var c=s(this.pm.doc,t);if(r=c.textBefore,n=c.isCode)return}if(l=a.match.exec(r)){var f=this.pm.history.getVersion();if("string"==typeof a.handler){var p=t.offset-(l[1]||l[0]).length,h=new u.Pos(t.path,p),d=this.pm.doc.marksAt(t);this.pm.tr["delete"](h,t).insert(h,this.pm.schema.text(a.handler,d)).apply()}else a.handler(this.pm,l,t);return void(this.cancelVersion=f)}}}}},{key:"backspace",value:function(){return this.cancelVersion?(this.pm.history.backToVersion(this.cancelVersion),void(this.cancelVersion=null)):!1}}]),e}())},{"../edit":13,"../model":38}],28:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r){var n=f(e).parse(t,{}),o=new x(e,n,r),i=void 0;o.parseTokens(n);do i=o.closeNode();while(o.stack.length);return i}function s(e,t){return e.isText&&t.isText&&v.Mark.sameSet(e.marks,t.marks)?e.copy(e.text+t.text):void 0}function a(e){return e.cached.markdownTokens||(e.cached.markdownTokens=l(e))}function u(e,t,r,n){if("block"==n.parse)e[t+"_open"]=function(e,t){var o="function"==typeof n.attrs?n.attrs.call(r,e,t):n.attrs;e.openNode(r,o)},e[t+"_close"]=function(e){return e.closeNode()};else if("mark"==n.parse)e[t+"_open"]=function(e,t){var o=n.attrs instanceof Function?n.attrs.call(r,e,t):n.attrs;e.openMark(r.create(o))},e[t+"_close"]=function(e){return e.closeMark(r)};else{if(!n.parse)throw new k.AssertionError("Unrecognized markdown parsing spec: "+n);e[t]=n.parse.bind(r)}}function l(e){var t=Object.create(null);return t.text=function(e,t){return e.addText(t.content)},t.inline=function(e,t){return e.parseTokens(t.children)},t.softbreak=function(e){return e.addText("\n")},e.registry("parseMarkdown",function(e,r,n){u(t,e,n,r)}),t}function c(e){var t=e.cached.markdownConfig;return t||!function(){var r=null,n=[];e.registry("configureMarkdown",function(e,t){if("init"==e){if(r)throw new k.AssertionError("Two markdown parser initializers defined in schema");r=t}else{var o=(/_(\d+)$/.exec(e)||[0,50])[1];(0,w["default"])(n,{f:t,rank:o},function(e,t){return e.rank-t.rank})}}),t={init:r||function(){return(0,g["default"])("commonmark",{html:!1})},modifiers:n.map(function(e){return e.f})}}(),t}function f(e){var t=c(e),r=t.init();return t.modifiers.forEach(function(e){return r=e(r)}),r}function p(e){return"\n"==e.charAt(e.length-1)?e.slice(0,e.length-1):e}function h(e,t){e.openNode(this),e.addText(p(t.content)),e.closeNode()}var d=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.fromMarkdown=i;var m=e("markdown-it"),g=n(m),v=e("../model"),y=e("../format"),k=e("../util/error"),b=e("../util/sortedinsert"),w=n(b);(0,y.defineSource)("markdown",i);var _=[],x=function(){function e(t,r,n){o(this,e),this.schema=t,this.stack=[{type:t.nodes.doc,content:[]}],this.tokens=r,this.marks=_,this.tokenTypes=a(t),this.options=n}return d(e,[{key:"top",value:function(){return this.stack[this.stack.length-1]}},{key:"push",value:function(e){this.stack.length&&this.top().content.push(e)}},{key:"addText",value:function(e){var t=this.top().content,r=t[t.length-1],n=this.schema.text(e,this.marks),o=void 0;r&&(o=s(r,n))?t[t.length-1]=o:t.push(n)}},{key:"openMark",value:function(e){this.marks=e.addToSet(this.marks)}},{key:"closeMark",value:function(e){this.marks=e.removeFromSet(this.marks)}},{key:"parseTokens",value:function(e){for(var t=0;t<e.length;t++){var r=e[t],n=this.tokenTypes[r.type];if(!n)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");n(this,r)}}},{key:"addNode",value:function(e,t,r){var n=e.createAutoFill(t,r,this.marks);return this.push(n),n}},{key:"openNode",value:function(e,t){this.stack.push({type:e,attrs:t,content:[]})}},{key:"closeNode",value:function(){this.marks.length&&(this.marks=_);var e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}},{key:"getAttr",value:function(e,t){if(e.attrs)for(var r=0;r<e.attrs.length;r++)if(e.attrs[r][0]==t)return e.attrs[r][1]}}]),e}();v.BlockQuote.register("parseMarkdown","blockquote",{parse:"block"}),v.Paragraph.register("parseMarkdown","paragraph",{parse:"block"}),v.ListItem.register("parseMarkdown","list_item",{parse:"block"}),v.BulletList.register("parseMarkdown","bullet_list",{parse:"block"}),v.OrderedList.register("parseMarkdown","ordered_list",{parse:"block",attrs:function(e,t){return{order:Number(e.getAttr(t,"order")||1)}}}),v.Heading.register("parseMarkdown","heading",{parse:"block",attrs:function(e,t){return{level:Math.min(this.maxLevel,+t.tag.slice(1))}}}),v.CodeBlock.register("parseMarkdown","code_block",{parse:h}),v.CodeBlock.register("parseMarkdown","fence",{parse:h}),v.HorizontalRule.register("parseMarkdown","hr",{parse:function(e,t){e.addNode(this,{markup:t.markup})}}),v.Image.register("parseMarkdown","image",{parse:function(e,t){e.addNode(this,{src:e.getAttr(t,"src"),title:e.getAttr(t,"title")||null,alt:t.children[0]&&t.children[0].content||null})}}),v.HardBreak.register("parseMarkdown","hardbreak",{parse:function(e){e.addNode(this)}}),v.EmMark.register("parseMarkdown","em",{parse:"mark"}),v.StrongMark.register("parseMarkdown","strong",{parse:"mark"}),v.LinkMark.register("parseMarkdown","link",{parse:"mark",attrs:function(e,t){return{href:e.getAttr(t,"href"),title:e.getAttr(t,"title")||null}}}),v.CodeMark.register("parseMarkdown","code_inline",{parse:function(e,t){e.openMark(this.create()),e.addText(t.content),e.closeMark(this)}})},{"../format":22,"../model":38,"../util/error":55,"../util/sortedinsert":59,"markdown-it":64}],29:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./from_markdown");Object.defineProperty(r,"fromMarkdown",{enumerable:!0,get:function(){return n.fromMarkdown}});var o=e("./to_markdown");Object.defineProperty(r,"toMarkdown",{enumerable:!0,get:function(){return o.toMarkdown}})},{"./from_markdown":28,"./to_markdown":30}],30:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var r=new c(t);return r.renderContent(e),r.out}function i(e,t){e.prototype.serializeMarkdown=t}function s(e,t,r){e.prototype.openMarkdown=t,e.prototype.closeMarkdown=r}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.toMarkdown=o;var u=e("../model"),l=e("../format");(0,l.defineTarget)("markdown",o);var c=function(){function e(t){n(this,e),this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=t}return a(e,[{key:"flushClose",value:function(e){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==e&&(e=2),e>1){var t=this.delim,r=/\s+$/.exec(t);r&&(t=t.slice(0,t.length-r[0].length));for(var n=1;e>n;n++)this.out+=t+"\n"}this.closed=!1}}},{key:"wrapBlock",value:function(e,t,r,n){var o=this.delim;this.write(t||e),this.delim+=e,n(),this.delim=o,this.closeBlock(r)}},{key:"atBlank",value:function(){return/(^|\n)$/.test(this.out)}},{key:"ensureNewLine",value:function(){this.atBlank()||(this.out+="\n")}},{key:"write",value:function(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}},{key:"closeBlock",value:function(e){this.closed=e}},{key:"text",value:function(e,t){for(var r=e.split("\n"),n=0;n<r.length;n++){var o=this.atBlank()||this.closed;this.write(),this.out+=t!==!1?this.esc(r[n],o):r[n],n!=r.length-1&&(this.out+="\n")}}},{key:"render",value:function(e){e.type.serializeMarkdown(this,e)}},{key:"renderContent",value:function(e){var t=this;e.forEach(function(e){return t.render(e)})}},{key:"renderInline",value:function(e){var t=this,r=[],n=function(e){var n=e?e.marks.slice():[];!r.length||"code"!=r[r.length-1].type||n.length&&"code"==n[n.length-1].type||(t.text("`",!1),r.pop());for(var o=0;o<r.length;o++){for(var i=r[o],s=!1,a=0;a<n.length;a++)if(n[a].eq(r[o])){n.splice(a,1),s=!0;break}s||(t.text(t.markString(i,!1),!1),r.splice(o--,1))}for(var o=0;o<n.length;o++){var i=n[o];r.push(i),t.text(t.markString(i,!0),!1)}e&&t.render(e)};e.forEach(n),n(null)}},{key:"renderList",value:function(e,t,r){var n=this;this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var o=this.inTightList;this.inTightList=e.attrs.tight;for(var i,s=function(o,i,s){i&&e.attrs.tight&&n.flushClose(1),n.wrapBlock(t,r(i),e,function(){return n.render(s)})},a=e.iter(),u=0;i=a.next().value;u++)s(a,u,i);this.inTightList=o}},{key:"esc",value:function(e,t){return e=e.replace(/[`*\\~+\[\]]/g,"\\$&"),t&&(e=e.replace(/^[:#-]/,"\\$&")),e}},{key:"quote",value:function(e){var t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]}},{key:"repeat",value:function(e,t){for(var r="",n=0;t>n;n++)r+=e;return r}},{key:"markString",value:function(e,t){var r=t?e.type.openMarkdown:e.type.closeMarkdown;return"string"==typeof r?r:r(this,e)}}]),e}();i(u.BlockQuote,function(e,t){e.wrapBlock("> ",null,t,function(){return e.renderContent(t)})}),i(u.CodeBlock,function(e,t){null==t.attrs.params?e.wrapBlock("    ",null,t,function(){return e.text(t.textContent,!1)}):(e.write("```"+t.attrs.params+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t))}),i(u.Heading,function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)}),i(u.HorizontalRule,function(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)}),i(u.BulletList,function(e,t){e.renderList(t,"  ",function(){return(t.attrs.bullet||"*")+" "})}),i(u.OrderedList,function(e,t){var r=Number(t.attrs.order||1),n=String(r+t.size-1).length,o=e.repeat(" ",n+2);e.renderList(t,o,function(t){var o=String(r+t);return e.repeat(" ",n-o.length)+o+". "})}),i(u.ListItem,function(e,t){return e.renderContent(t)}),i(u.Paragraph,function(e,t){e.renderInline(t),e.closeBlock(t)}),i(u.Image,function(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+e.esc(t.attrs.src)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")")}),i(u.HardBreak,function(e){return e.write("\\\n")}),i(u.Text,function(e,t){return e.text(t.text)}),s(u.EmMark,"*","*"),s(u.StrongMark,"**","**"),s(u.LinkMark,"[",function(e,t){return"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}),s(u.CodeMark,"`","`")},{"../format":22,"../model":38}],31:[function(e,t,r){"use strict";function n(e,t){var r=document.createElement("div");if(r.className=c,t.path){a[e]||o(e,t);var n=r.appendChild(document.createElementNS(u,"svg"));n.style.width=t.width/t.height+"em";var i=n.appendChild(document.createElementNS(u,"use"));i.setAttributeNS(l,"href","#pm-icon-"+e)}else t.dom?r.appendChild(t.dom.cloneNode(!0)):(r.appendChild(document.createElement("span")).textContent=t.text||"",t.style&&(r.firstChild.style.cssText=t.style));return r}function o(e,t){s||(s=document.createElementNS(u,"svg"),s.style.display="none",document.body.insertBefore(s,document.body.firstChild));var r=document.createElementNS(u,"symbol");r.id="pm-icon-"+e,r.setAttribute("viewBox","0 0 "+t.width+" "+t.height);var n=r.appendChild(document.createElementNS(u,"path"));n.setAttribute("d",t.path),s.appendChild(r),a[e]=!0}Object.defineProperty(r,"__esModule",{value:!0}),r.getIcon=n;var i=e("../dom"),s=null,a=Object.create(null),u="http://www.w3.org/2000/svg",l="http://www.w3.org/1999/xlink",c="ProseMirror-icon";(0,i.insertCSS)("\n."+c+" {\n  display: inline-block;\n  line-height: .8;\n  vertical-align: -2px; /* Compensate for padding */\n  padding: 2px 8px;\n  cursor: pointer;\n}\n\n."+c+" svg {\n  fill: currentColor;\n  height: 1em;\n}\n\n."+c+" span {\n  vertical-align: text-top;\n}")},{"../dom":3}],32:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!t.label)return null;var r=t.name&&e.keyForCommand(t.name);return r?t.label+" ("+r+")":t.label}function s(e,t){for(var r=[],n=0;n<e.length;n++){var o=e[n].render(t);o&&r.push((0,f.elt)("div",{"class":v+"-dropdown-item"},o))}return r}function a(e,t){for(var r=void 0,n=Array.isArray(t),o=0;o<(n?t.length:1);o++){var i=n?t[o]:t;if(i instanceof k){var s=i.get(e);if(!n||1==t.length)return s;r=(r||t.slice(0,o)).concat(s)}else r&&r.push(i)}return r||(n?t:[t])}function u(e,t){for(var r=document.createDocumentFragment(),n=!1,o=0;o<t.length;o++){for(var i=a(e,t[o]),s=!1,u=0;u<i.length;u++){var c=i[u].render(e);c&&(!s&&n&&r.appendChild(l()),r.appendChild((0,f.elt)("span",{"class":v+"item"},c)),s=!0)}s&&(n=!0)}return r}function l(){return(0,f.elt)("span",{"class":v+"separator"})}var c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.historyGroup=r.blockGroup=r.textblockMenu=r.insertMenu=r.inlineGroup=r.DropdownSubmenu=r.Dropdown=r.MenuCommandGroup=r.MenuCommand=void 0,r.resolveGroup=a,r.renderGrouped=u;var f=e("../dom"),p=e("../util/sortedinsert"),h=n(p),d=e("../util/obj"),m=e("../util/error"),g=e("./icons"),v="ProseMirror-menu",y=r.MenuCommand=function(){function e(t,r){o(this,e),this.command_=t,this.options=r}return c(e,[{key:"command",value:function(e){return"string"==typeof this.command_?e.commands[this.command_]:this.command_}},{key:"render",value:function(e){var t=this.command(e),r=!1;if(t){if("ignore"!=this.options.select&&!t.select(e)){if(null==this.options.select||"hide"==this.options.select)return null;"disable"==this.options.select&&(r=!0)}var n=this.options.display;if(!n)throw new m.AssertionError("No display style defined for menu command "+t.name);var o=void 0;if(n.render)o=n.render(t,e);else if("icon"==n.type)o=(0,g.getIcon)(t.name,n),!r&&t.active(e)&&o.classList.add(v+"-active");else{if("label"!=n.type)throw new m.AssertionError("Unsupported command display style: "+n.type);o=(0,f.elt)("div",null,n.label||t.spec.label)}return o.setAttribute("title",i(e,t)),this.options["class"]&&o.classList.add(this.options["class"]),r&&o.classList.add(v+"-disabled"),this.options.css&&(o.style.cssText+=this.options.css),o.addEventListener("mousedown",function(r){r.preventDefault(),r.stopPropagation(),e.signal("interaction"),t.exec(e,null,o)}),o}}}]),e}(),k=r.MenuCommandGroup=function(){function e(t,r){o(this,e),this.name=t,this.options=r}return c(e,[{key:"collect",value:function(e){var t=this,r=[];for(var n in e.commands){var o=e.commands[n],i=o.spec.menu;i&&i.group==this.name&&(0,h["default"])(r,{cmd:o,rank:null==i.rank?50:i.rank},function(e,t){return e.rank-t.rank})}return r.map(function(e){var r=e.cmd.spec.menu;return t.options&&(r=(0,d.copyObj)(t.options,(0,d.copyObj)(r))),new y(e.cmd,r)})}},{key:"get",value:function(e){var t=e.mod.menuGroups||this.startGroups(e);return t[this.name]||(t[this.name]=this.collect(e))}},{key:"startGroups",value:function(e){var t=function r(){e.mod.menuGroups=null,e.off("commandsChanging",r)};return e.on("commandsChanging",t),e.mod.menuGroups=Object.create(null)}}]),e}(),b=r.Dropdown=function(){function e(t,r){o(this,e),this.options=t||{},this.content=r}return c(e,[{key:"render",value:function(e){var t=this,r=s(a(e,this.content),e);if(r.length){var n=this.options.activeLabel&&this.findActiveIn(this,e)||this.options.label,o=(0,f.elt)("div",{"class":v+"-dropdown "+(this.options["class"]||""),style:this.options.css,title:this.options.title},n),i=null;return o.addEventListener("mousedown",function(n){n.preventDefault(),n.stopPropagation(),i=i&&i()?null:t.expand(e,o,r)}),o}}},{key:"select",value:function(e){return a(e,this.content).some(function(t){return t.select(e)})}},{key:"expand",value:function(e,t,r){function n(){return a?void 0:(a=!0,e.off("interaction",n),e.wrapper.removeChild(s),!0)}var o=t.getBoundingClientRect(),i=e.wrapper.getBoundingClientRect(),s=(0,f.elt)("div",{"class":v+"-dropdown-menu "+(this.options["class"]||""),style:"left: "+(o.left-i.left)+"px; top: "+(o.bottom-i.top)+"px"
+},r),a=!1;return e.signal("interaction"),e.wrapper.appendChild(s),e.on("interaction",n),n}},{key:"findActiveIn",value:function(e,t){for(var r=a(t,e.content),n=0;n<r.length;n++){var o=r[n];if(o instanceof y){var i=o.command(t).active(t);if(i)return o.options.activeLabel}else if(o instanceof w){var s=this.findActiveIn(o,t);if(s)return s}}}}]),e}(),w=r.DropdownSubmenu=function(){function e(t,r){o(this,e),this.options=t||{},this.content=r}return c(e,[{key:"render",value:function(e){var t=s(a(e,this.content),e);if(t.length){var r=(0,f.elt)("div",{"class":v+"-submenu-label"},this.options.label),n=(0,f.elt)("div",{"class":v+"-submenu-wrap"},r,(0,f.elt)("div",{"class":v+"-submenu"},t));return r.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation(),n.classList.toggle(v+"-submenu-wrap-active")}),n}}}]),e}();r.inlineGroup=new k("inline"),r.insertMenu=new b({label:"Insert"},new k("insert")),r.textblockMenu=new b({label:"Type..",displayActive:!0,"class":"ProseMirror-textblock-dropdown"},[new k("textblock"),new w({label:"Heading"},new k("textblockHeading"))]),r.blockGroup=new k("block"),r.historyGroup=new k("history");(0,f.insertCSS)("\n\n.ProseMirror-textblock-dropdown {\n  min-width: 3em;\n}\n\n."+v+" {\n  margin: 0 -4px;\n  line-height: 1;\n}\n\n.ProseMirror-tooltip ."+v+" {\n  width: -webkit-fit-content;\n  width: fit-content;\n  white-space: pre;\n}\n\n."+v+"item {\n  margin-right: 3px;\n  display: inline-block;\n}\n\n."+v+"separator {\n  border-right: 1px solid #ddd;\n  margin-right: 3px;\n}\n\n."+v+"-dropdown, ."+v+"-dropdown-menu {\n  font-size: 90%;\n  white-space: nowrap;\n}\n\n."+v+"-dropdown {\n  padding: 1px 14px 1px 4px;\n  display: inline-block;\n  vertical-align: 1px;\n  position: relative;\n  cursor: pointer;\n}\n\n."+v+'-dropdown:after {\n  content: "";\n  border-left: 4px solid transparent;\n  border-right: 4px solid transparent;\n  border-top: 4px solid currentColor;\n  opacity: .6;\n  position: absolute;\n  right: 2px;\n  top: calc(50% - 2px);\n}\n\n.'+v+"-dropdown-menu, ."+v+"-submenu {\n  position: absolute;\n  background: white;\n  color: #666;\n  border: 1px solid #aaa;\n  padding: 2px;\n}\n\n."+v+"-dropdown-menu {\n  z-index: 15;\n  min-width: 6em;\n}\n\n."+v+"-dropdown-item {\n  cursor: pointer;\n  padding: 2px 8px 2px 4px;\n}\n\n."+v+"-dropdown-item:hover {\n  background: #f2f2f2;\n}\n\n."+v+"-submenu-wrap {\n  position: relative;\n  margin-right: -4px;\n}\n\n."+v+'-submenu-label:after {\n  content: "";\n  border-top: 4px solid transparent;\n  border-bottom: 4px solid transparent;\n  border-left: 4px solid currentColor;\n  opacity: .6;\n  position: absolute;\n  right: 4px;\n  top: calc(50% - 4px);\n}\n\n.'+v+"-submenu {\n  display: none;\n  min-width: 4em;\n  left: 100%;\n  top: -3px;\n}\n\n."+v+"-active {\n  background: #eee;\n  border-radius: 4px;\n}\n\n."+v+"-active {\n  background: #eee;\n  border-radius: 4px;\n}\n\n."+v+"-disabled {\n  opacity: .3;\n}\n\n."+v+"-submenu-wrap:hover ."+v+"-submenu, ."+v+"-submenu-wrap-active ."+v+"-submenu {\n  display: block;\n}\n")},{"../dom":3,"../util/error":55,"../util/obj":58,"../util/sortedinsert":59,"./icons":31}],33:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){for(var t=e.parentNode;t;t=t.parentNode)if(t.scrollHeight>t.clientHeight)return t}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("../edit"),u=e("../dom"),l=e("../ui/update"),c=e("./menu"),f="ProseMirror-menubar";(0,a.defineOption)("menuBar",!1,function(e,t){e.mod.menuBar&&e.mod.menuBar.detach(),e.mod.menuBar=t?new h(e,t):null});var p=[c.inlineGroup,c.insertMenu,[c.textblockMenu,c.blockGroup],c.historyGroup],h=function(){function e(t,r){var o=this;n(this,e),this.pm=t,this.config=r||{},this.wrapper=t.wrapper.insertBefore((0,u.elt)("div",{"class":f}),t.wrapper.firstChild),this.spacer=null,this.maxHeight=0,this.widthForMaxHeight=0,this.updater=new l.UpdateScheduler(t,"selectionChange change activeMarkChange commandsChanged",function(){return o.update()}),this.content=r.content||p,this.updater.force(),this.floating=!1,this.config["float"]&&(this.updateFloat(),this.scrollFunc=function(){document.body.contains(o.pm.wrapper)?o.updateFloat():window.removeEventListener("scroll",o.scrollFunc)},window.addEventListener("scroll",this.scrollFunc))}return s(e,[{key:"detach",value:function(){this.updater.detach(),this.wrapper.parentNode.removeChild(this.wrapper),this.scrollFunc&&window.removeEventListener("scroll",this.scrollFunc)}},{key:"update",value:function(){var e=this;return this.wrapper.textContent="",this.wrapper.appendChild((0,c.renderGrouped)(this.pm,this.content)),this["float"]?this.updateScrollCursor():function(){return e.wrapper.offsetWidth!=e.widthForMaxHeight&&(e.widthForMaxHeight=e.wrapper.offsetWidth,e.maxHeight=0),e.wrapper.offsetHeight>e.maxHeight?(e.maxHeight=e.wrapper.offsetHeight,function(){e.wrapper.style.minHeight=e.maxHeight+"px"}):void 0}}},{key:"updateFloat",value:function(){var e=this.pm.wrapper.getBoundingClientRect();if(this.floating)if(e.top>=0||e.bottom<this.wrapper.offsetHeight+10)this.floating=!1,this.wrapper.style.position=this.wrapper.style.left=this.wrapper.style.width="",this.wrapper.style.display="",this.spacer.parentNode.removeChild(this.spacer),this.spacer=null;else{var t=(this.pm.wrapper.offsetWidth-this.pm.wrapper.clientWidth)/2;this.wrapper.style.left=e.left+t+"px",this.wrapper.style.display=e.top>window.innerHeight?"none":""}else if(e.top<0&&e.bottom>=this.wrapper.offsetHeight+10){this.floating=!0;var r=this.wrapper.getBoundingClientRect();this.wrapper.style.left=r.left+"px",this.wrapper.style.width=r.width+"px",this.wrapper.style.position="fixed",this.spacer=(0,u.elt)("div",{"class":f+"-spacer",style:"height: "+r.height+"px"}),this.pm.wrapper.insertBefore(this.spacer,this.wrapper)}}},{key:"updateScrollCursor",value:function(){var e=this;if(!this.floating)return null;var t=this.pm.selection.head;return t?function(){var r=e.pm.coordsAtPos(t),n=e.wrapper.getBoundingClientRect();if(r.top<n.bottom&&r.bottom>n.top){var s=function(){var t=o(e.pm.wrapper);return t?{v:function(){t.scrollTop-=n.bottom-r.top}}:void 0}();if("object"===("undefined"==typeof s?"undefined":i(s)))return s.v}}:null}}]),e}();(0,u.insertCSS)("\n."+f+" {\n  border-top-left-radius: inherit;\n  border-top-right-radius: inherit;\n  position: relative;\n  min-height: 1em;\n  color: #666;\n  padding: 1px 6px;\n  top: 0; left: 0; right: 0;\n  border-bottom: 1px solid silver;\n  background: white;\n  z-index: 10;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  overflow: visible;\n}\n")},{"../dom":3,"../edit":13,"../ui/update":54,"./menu":32}],34:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.defaultSchema=r.CodeMark=r.LinkMark=r.StrongMark=r.EmMark=r.HardBreak=r.Image=r.Paragraph=r.CodeBlock=r.Heading=r.HorizontalRule=r.ListItem=r.BulletList=r.OrderedList=r.BlockQuote=r.Doc=void 0;var a=e("./schema"),u=r.Doc=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"kind",get:function(){return null}}]),t}(a.Block),l=r.BlockQuote=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(a.Block);a.NodeKind.list_item=new a.NodeKind("list_item");var c=r.OrderedList=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return a.NodeKind.list_item}},{key:"attrs",get:function(){return{order:new a.Attribute({"default":"1"})}}}]),t}(a.Block),f=r.BulletList=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return a.NodeKind.list_item}}]),t}(a.Block),p=r.ListItem=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"kind",get:function(){return a.NodeKind.list_item}}]),t}(a.Block),h=r.HorizontalRule=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return null}}]),t}(a.Block),d=r.Heading=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"attrs",get:function(){return{level:new a.Attribute({"default":"1"})}}},{key:"maxLevel",get:function(){return 6}}]),t}(a.Textblock),m=r.CodeBlock=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"contains",get:function(){return a.NodeKind.text}},{key:"containsMarks",get:function(){return!1}},{key:"isCode",get:function(){return!0}}]),t}(a.Textblock),g=r.Paragraph=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"defaultTextblock",get:function(){return!0}}]),t}(a.Textblock),v=r.Image=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"attrs",get:function(){return{src:new a.Attribute,alt:new a.Attribute({"default":""}),title:new a.Attribute({"default":""})}}},{key:"draggable",get:function(){return!0}}]),t}(a.Inline),y=r.HardBreak=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"selectable",get:function(){return!1}},{key:"isBR",get:function(){return!0}}]),t}(a.Inline),k=r.EmMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,null,[{key:"rank",get:function(){return 51}}]),t}(a.MarkType),b=r.StrongMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,null,[{key:"rank",get:function(){return 52}}]),t}(a.MarkType),w=r.LinkMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"attrs",get:function(){return{href:new a.Attribute,title:new a.Attribute({"default":""})}}}],[{key:"rank",get:function(){return 25}}]),t}(a.MarkType),_=r.CodeMark=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"isCode",get:function(){return!0}}],[{key:"rank",get:function(){return 101}}]),t}(a.MarkType),x=new a.SchemaSpec({doc:u,blockquote:l,ordered_list:c,bullet_list:f,list_item:p,horizontal_rule:h,paragraph:g,heading:d,code_block:m,text:a.Text,image:v,hard_break:y},{em:k,strong:b,link:w,code:_});r.defaultSchema=new a.Schema(x)},{"./schema":42}],35:[function(e,t,r){"use strict";function n(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],o=e.iter(),s=t.iter(),a=0;;){if(o.atEnd()||s.atEnd()){if(e.size==t.size)return null;break}var u=o.next(),l=s.next();if(u!=l){if(!u.sameMarkup(l))break;if(u.isText&&u.text!=l.text){for(var c=0;u.text[c]==l.text[c];c++)a++;break}if(u.size||l.size){r.push(a);var f=n(u.content,l.content,r);if(f)return f;r.pop()}a+=u.width}else a+=u.width}return new i.Pos(r,a)}function o(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],n=arguments.length<=3||void 0===arguments[3]?[]:arguments[3],s=e.reverseIter(),a=t.reverseIter(),u=e.size,l=t.size;;){if(s.atEnd()||a.atEnd()){if(e.size==t.size)return null;break}var c=s.next(),f=a.next();if(c!=f){if(!c.sameMarkup(f))break;if(c.isText&&c.text!=f.text){for(var p=0,h=Math.min(c.text.length,f.text.length);h>p&&c.text[c.text.length-p-1]==f.text[f.text.length-p-1];)p++,u--,l--;break}if(u-=c.width,l-=f.width,c.size||f.size){r.push(u),n.push(l);var d=o(c.content,f.content,r,n);if(d)return d;r.pop(),n.pop()}}else u-=c.width,l-=f.width}return{a:new i.Pos(r,u),b:new i.Pos(n,l)}}Object.defineProperty(r,"__esModule",{value:!0}),r.findDiffStart=n,r.findDiffEnd=o;var i=e("./pos")},{"./pos":41}],36:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0}),r.ModelError=void 0;var s=e("../util/error");r.ModelError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(s.ProseMirrorError)},{"../util/error":55}],37:[function(e,t,r){"use strict";function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.emptyFragment=r.Fragment=void 0;var a=e("./error"),u=r.Fragment=function(){function e(){i(this,e)}return s(e,[{key:"append",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return this.size?e.size?this.appendInner(e,t,r):t?this.replace(this.size-1,this.lastChild.close(t-1,"end")):this:r?e.replace(0,e.firstChild.close(r-1,"start")):e}},{key:"toString",value:function(){var e="";return this.forEach(function(t){return e+=(e?", ":"")+t.toString()}),e}},{key:"toArray",value:function(){for(var e,t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1],n=arguments[2],o=[],i=this.iter(t,r);e=i.next().value;)o.push(n?n(e):e);return o}},{key:"map",value:function(t){return e.fromArray(this.toArray(void 0,void 0,t))}},{key:"some",value:function(e){for(var t,r=this.iter();t=r.next().value;)if(e(t))return t}},{key:"close",value:function(e,t){var r="start"==t?this.firstChild:this.lastChild,n=r.close(e-1,t);return n==r?this:this.replace("start"==t?0:this.size-1,n)}},{key:"nodesBetween",value:function(e,t,r,n,o){for(var i,s=e&&e.depth>n.length,a=t&&t.depth>n.length,u=s?e.path[n.length]:e?e.offset:0,l=a?t.path[n.length]+1:t?t.offset:this.size,c=this.iter(u,l);i=c.next().value;){var f=c.offset-i.width;n.push(f),i.nodesBetween(s&&f==u?e:null,a&&c.offset==l?t:null,r,n,o),n.pop()}}},{key:"sliceBetween",value:function(e,t){for(var r,n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=e&&e.depth>n,i=t&&t.depth>n,s=o?e.path[n]:e?e.offset:0,a=i?t.path[n]+1:t?t.offset:this.size,u=[],l=this.iter(s,a);r=l.next().value;){var c=o&&l.offset-r.width==s?e:null,f=i&&l.offset==a?t:null;(c||f)&&(r=r.sliceBetween(c,f,n+1)),u.push(r)}return new this.constructor(u)}},{key:"textContent",get:function(){var e="";return this.forEach(function(t){return e+=t.textContent}),e}}],[{key:"fromJSON",value:function(e,t){return t?this.fromArray(t.map(e.nodeFromJSON)):h}},{key:"fromArray",value:function(e){if(!e.length)return h;for(var t=!1,r=void 0,n=0,o=0;o<e.length;o++){var i=e[o];n+=i.width,i.isText&&(t=!0,o&&e[o-1].sameMarkup(i))?(r||(r=e.slice(0,o)),r[r.length-1]=i.copy(r[r.length-1].text+i.text)):r&&r.push(i)}return t?new g(r||e,n):new p(e)}},{key:"from",value:function(t){return t?t instanceof e?t:this.fromArray(Array.isArray(t)?t:[t]):h}}]),e}(),l={done:!0},c=function(){function e(t,r,n){i(this,e),this.array=t,this.pos=r,this.end=n}return s(e,[{key:"copy",value:function(){return new this.constructor(this.array,this.pos,this.end)}},{key:"atEnd",value:function(){return this.pos==this.end}},{key:"next",value:function(){return this.pos==this.end?l:this.array[this.pos++]}},{key:"offset",get:function(){return this.pos}}]),e}(),f=function(e){function t(){return i(this,t),n(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),s(t,[{key:"next",value:function(){return this.pos==this.end?l:this.array[--this.pos]}}]),t}(c),p=function(e){function t(e){i(this,t);var r=n(this,Object.getPrototypeOf(t).call(this));return r.content=e,r}return o(t,e),s(t,[{key:"iter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return new c(this.content,e,t)}},{key:"reverseIter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.size:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return new f(this.content,e,t)}},{key:"child",value:function(e){if(0>e||e>=this.content.length)throw new a.ModelError("Offset "+e+" out of range");return this.content[e]}},{key:"forEach",value:function(e){for(var t=0;t<this.content.length;t++)e(this.content[t],t,t+1)}},{key:"chunkBefore",value:function(e){return{node:this.child(e-1),start:e-1}}},{key:"chunkAfter",value:function(e){return{node:this.child(e),start:e}}},{key:"slice",value:function(e){var r=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return e==r?h:new t(this.content.slice(e,r))}},{key:"replace",value:function(e,r){if(r.isText)throw new a.ModelError("Argument to replace should be a non-text node");var n=this.content.slice();return n[e]=r,new t(n)}},{key:"appendInner",value:function(e,t,r){var n=this.content.length-1,o=this.content.slice(0,n),i=this.content[n],s=e.firstChild;return t>0&&r>0&&i.sameMarkup(s)?o.push(i.append(s.content,t-1,r-1)):o.push(i.close(t-1,"end"),s.close(r-1,"start")),u.fromArray(o.concat(e.toArray(s.width)))}},{key:"toJSON",value:function(){return this.content.map(function(e){return e.toJSON()})}},{key:"size",get:function(){return this.content.length}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}}]),t}(u),h=r.emptyFragment=new p([]),d=function(){function e(t,r,n){var o=arguments.length<=3||void 0===arguments[3]?-1:arguments[3];i(this,e),this.frag=t,this.offset=r,this.pos=o,this.endOffset=n}return s(e,[{key:"copy",value:function(){return new this.constructor(this.frag,this.offset,this.endOffset,this.pos)}},{key:"atEnd",value:function(){return this.offset==this.endOffset}},{key:"next",value:function(){if(-1==this.pos){var e=this.init();if(e)return e}return this.offset==this.endOffset?l:this.advance()}},{key:"advance",value:function(){var e=this.frag.content[this.pos++],t=this.offset+e.width;return t>this.endOffset?(e=e.copy(e.text.slice(0,this.endOffset-this.offset)),this.offset=this.endOffset,e):(this.offset=t,e)}},{key:"init",value:function(){this.pos=0;for(var e=0;e<this.offset;){var t=this.frag.content[this.pos++],r=e+t.width;if(r==this.offset)break;if(r>this.offset){var n=t.width;return r>this.endOffset&&(n=this.endOffset-e,r=this.endOffset),t=t.copy(t.text.slice(this.offset-e,n)),this.offset=r,t}e=r}}}]),e}(),m=function(e){function t(){return i(this,t),n(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),s(t,[{key:"advance",value:function(){var e=this.frag.content[--this.pos],t=this.offset-e.width;return t<this.endOffset?(e=e.copy(e.text.slice(this.endOffset-t)),this.offset=this.endOffset,e):(this.offset=t,e)}},{key:"init",value:function(){this.pos=this.frag.content.length;for(var e=this.frag.size;e>this.offset;){var t=this.frag.content[--this.pos],r=e-t.width;if(r==this.offset)break;if(r<this.offset)return r<this.endOffset?(t=t.copy(t.text.slice(this.endOffset-r,this.offset-r)),r=this.endOffset):t=t.copy(t.text.slice(0,this.offset-r)),this.offset=r,t;e=r}}}]),t}(d),g=function(e){function t(e,r){i(this,t);var o=n(this,Object.getPrototypeOf(t).call(this));if(o.content=e,o.size=r||0,null==r)for(var s=0;s<e.length;s++)o.size+=e[s].width;return o}return o(t,e),s(t,[{key:"iter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return new d(this,e,t)}},{key:"reverseIter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.size:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return new m(this,e,t)}},{key:"child",value:function r(e){if(0>e||e>=this.size)throw new a.ModelError("Offset "+e+" out of range");for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];if(n+=r.width,n>e)return r}}},{key:"forEach",value:function(e){for(var t=0,r=0;t<this.content.length;t++){var n=this.content[t];e(n,r,r+=n.width)}}},{key:"chunkBefore",value:function(e){if(!e)throw new a.ModelError("No chunk before start of node");for(var t=0,r=0;t<this.content.length;t++){var n=this.content[t],o=r+n.width;if(o>=e)return{node:n,start:r};r=o}}},{key:"chunkAfter",value:function(e){if(e==this.size)throw new a.ModelError("No chunk after end of node");for(var t=0,r=0;t<this.content.length;t++){var n=this.content[t],o=r+n.width;if(o>e)return{node:n,start:r};r=o}}},{key:"slice",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1];return e==r?h:new t(this.toArray(e,r),r-e)}},{key:"replace",value:function(e,r){if(r.isText)throw new a.ModelError("Argument to replace should be a non-text node");for(var n=void 0,o=void 0,i=0;e>i;o++)n=this.content[o],i+=n.width;if(n.isText)throw new a.ModelError("Can not replace text content with replace method");var s=this.content.slice();return s[o]=r,new t(s,this.size)}},{key:"appendInner",value:function(e,t,r){var n=this.content.length-1,o=this.content.slice(0,n),i=this.content[n],s=e.firstChild,a=i.sameMarkup(s);return a&&i.isText?o.push(i.copy(i.text+s.text)):a&&t>0&&r>0?o.push(i.append(s.content,t-1,r-1)):o.push(i.close(t-1,"end"),s.close(r-1,"start")),u.fromArray(o.concat(e.toArray(s.width)))}},{key:"toJSON",value:function(){return this.content.map(function(e){return e.toJSON()})}},{key:"firstChild",get:function(){return this.size?this.content[0]:null}},{key:"lastChild",get:function(){return this.size?this.content[this.content.length-1]:null}}]),t}(u);"undefined"!=typeof Symbol&&(u.prototype[Symbol.iterator]=function(){return this.iter()},c.prototype[Symbol.iterator]=d.prototype[Symbol.iterator]=function(){return this})},{"./error":36}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./node");Object.defineProperty(r,"Node",{enumerable:!0,get:function(){return n.Node}});var o=e("./fragment");Object.defineProperty(r,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(r,"emptyFragment",{enumerable:!0,get:function(){return o.emptyFragment}});var i=e("./mark");Object.defineProperty(r,"Mark",{enumerable:!0,get:function(){return i.Mark}});var s=e("./schema");Object.defineProperty(r,"SchemaSpec",{enumerable:!0,get:function(){return s.SchemaSpec}}),Object.defineProperty(r,"Schema",{enumerable:!0,get:function(){return s.Schema}}),Object.defineProperty(r,"SchemaError",{enumerable:!0,get:function(){return s.SchemaError}}),Object.defineProperty(r,"NodeType",{enumerable:!0,get:function(){return s.NodeType}}),Object.defineProperty(r,"Block",{enumerable:!0,get:function(){return s.Block}}),Object.defineProperty(r,"Textblock",{enumerable:!0,get:function(){return s.Textblock}}),Object.defineProperty(r,"Inline",{enumerable:!0,get:function(){return s.Inline}}),Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return s.Text}}),Object.defineProperty(r,"MarkType",{enumerable:!0,get:function(){return s.MarkType}}),Object.defineProperty(r,"Attribute",{enumerable:!0,get:function(){return s.Attribute}}),Object.defineProperty(r,"NodeKind",{enumerable:!0,get:function(){return s.NodeKind}});var a=e("./defaultschema");Object.defineProperty(r,"defaultSchema",{enumerable:!0,get:function(){return a.defaultSchema}}),Object.defineProperty(r,"Doc",{enumerable:!0,get:function(){return a.Doc}}),Object.defineProperty(r,"BlockQuote",{enumerable:!0,get:function(){return a.BlockQuote}}),Object.defineProperty(r,"OrderedList",{enumerable:!0,get:function(){return a.OrderedList}}),Object.defineProperty(r,"BulletList",{enumerable:!0,get:function(){return a.BulletList}}),Object.defineProperty(r,"ListItem",{enumerable:!0,get:function(){return a.ListItem}}),Object.defineProperty(r,"HorizontalRule",{enumerable:!0,get:function(){return a.HorizontalRule}}),Object.defineProperty(r,"Paragraph",{enumerable:!0,get:function(){return a.Paragraph}}),Object.defineProperty(r,"Heading",{enumerable:!0,get:function(){return a.Heading}}),Object.defineProperty(r,"CodeBlock",{enumerable:!0,get:function(){return a.CodeBlock}}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return a.Image}}),Object.defineProperty(r,"HardBreak",{enumerable:!0,get:function(){return a.HardBreak}}),Object.defineProperty(r,"CodeMark",{enumerable:!0,get:function(){return a.CodeMark}}),Object.defineProperty(r,"EmMark",{enumerable:!0,get:function(){return a.EmMark}}),Object.defineProperty(r,"StrongMark",{enumerable:!0,get:function(){return a.StrongMark}}),Object.defineProperty(r,"LinkMark",{enumerable:!0,get:function(){return a.LinkMark}});var u=e("./pos");Object.defineProperty(r,"Pos",{enumerable:!0,get:function(){return u.Pos}});var l=e("./diff");Object.defineProperty(r,"findDiffStart",{enumerable:!0,get:function(){return l.findDiffStart}}),Object.defineProperty(r,"findDiffEnd",{enumerable:!0,get:function(){return l.findDiffEnd}});var c=e("./error");Object.defineProperty(r,"ModelError",{enumerable:!0,get:function(){return c.ModelError}})},{"./defaultschema":34,"./diff":35,"./error":36,"./fragment":37,"./mark":39,"./node":40,"./pos":41,"./schema":42}],39:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0});var i=(r.Mark=function(){function e(t,r){n(this,e),this.type=t,this.attrs=r}return o(e,[{key:"toJSON",value:function(){var e={_:this.type.name};for(var t in this.attrs)e[t]=this.attrs[t];return e}},{key:"addToSet",value:function(e){for(var t=0;t<e.length;t++){var r=e[t];if(r.type==this.type)return this.eq(r)?e:e.slice(0,t).concat(this).concat(e.slice(t+1));if(r.type.rank>this.type.rank)return e.slice(0,t).concat(this).concat(e.slice(t))}return e.concat(this)}},{key:"removeFromSet",value: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}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){if(this==e)return!0;if(this.type!=e.type)return!1;for(var t in this.attrs)if(e.attrs[t]!=this.attrs[t])return!1;return!0}}],[{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||0==t.length)return i;if(t instanceof e)return[t];var r=t.slice();return r.sort(function(e,t){return e.type.rank-t.type.rank}),r}}]),e}(),[])},{}],40:[function(e,t,r){"use strict";function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}var a=function m(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:m(o,t,r)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(r)},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.TextNode=r.Node=void 0;var l=e("./fragment"),c=e("./mark"),f=e("./pos"),p=[],h=Object.create(null),d=function(){function e(t,r,n,o){i(this,e),this.type=t,this.attrs=r,this.content=n||l.emptyFragment,this.marks=o||p}return u(e,[{key:"child",value:function(e){return this.content.child(e)}},{key:"iter",value:function(e,t){return this.content.iter(e,t)}},{key:"reverseIter",value:function(e,t){return this.content.reverseIter(e,t)}},{key:"chunkBefore",value:function(e){return this.content.chunkBefore(e)}},{key:"chunkAfter",value:function(e){return this.content.chunkAfter(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(t,r,n){return this.type==t&&e.sameAttrs(this.attrs,r||h)&&c.Mark.sameSet(this.marks,n||p)}},{key:"copy",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];return new this.constructor(this.type,this.attrs,e,this.marks)}},{key:"mark",value:function(e){return new this.constructor(this.type,this.attrs,this.content,e)}},{key:"slice",value:function(e,t){return this.copy(this.content.slice(e,t))}},{key:"splice",value:function(e,t,r){return this.copy(this.content.slice(0,e).append(r).append(this.content.slice(t)))}},{key:"append",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return this.copy(this.content.append(e,t,r))}},{key:"replace",value:function(e,t){return this.copy(this.content.replace(e,t))}},{key:"replaceDeep",
+value:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(r==e.length)return t;var n=e[r];return this.replace(n,this.child(n).replaceDeep(e,t,r+1))}},{key:"close",value:function(e,t){if(0==e&&0==this.size&&!this.type.canBeEmpty)return this.copy(this.type.defaultContent());var r=void 0;return e>0&&(r=this.content.close(e-1,t))!=this.content?this.copy(r):this}},{key:"path",value:function(e){for(var t=0,r=this;t<e.length;r=r.child(e[t]),t++);return r}},{key:"nodeAfter",value:function(e){var t=this.path(e.path);return e.offset<t.size?t.child(e.offset):null}},{key:"pathNodes",value:function(e){for(var t=[],r=0,n=this;t.push(n),r!=e.length;r++)n=n.child(e[r]);return t}},{key:"siblingRange",value:function(e,t){for(var r=0,n=this;;r++){if(n.isTextblock){var o=e.path.slice(0,r-1),i=e.path[r-1];return{from:new f.Pos(o,i),to:new f.Pos(o,i+1)}}var s=r==e.path.length,a=r==t.path.length,u=s?e.offset:e.path[r],l=a?t.offset:t.path[r];if(s||a||u!=l){var o=e.path.slice(0,r);return{from:new f.Pos(o,u),to:new f.Pos(o,l+(a?0:1))}}n=n.child(u)}}},{key:"nodesBetween",value:function(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?[]:arguments[3],o=arguments.length<=4||void 0===arguments[4]?null:arguments[4];r(this,n,o)!==!1&&this.content.nodesBetween(e,t,r,n,this)}},{key:"inlineNodesBetween",value:function(e,t,r){this.nodesBetween(e,t,function(e,t,n){if(e.isInline){var o=t.length-1;r(e,t.slice(0,o),t[o],t[o]+e.width,n)}})}},{key:"sliceBetween",value:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return this.copy(this.content.sliceBetween(e,t,r))}},{key:"marksAt",value:function(e){var t=this.path(e.path);return t.isTextblock&&t.size?t.chunkBefore(e.offset||1).node.marks:p}},{key:"rangeHasMark",value:function(e,t,r){var n=!1;return this.nodesBetween(e,t,function(e){r.isInSet(e.marks)&&(n=!0)}),n}},{key:"toString",value:function(){var e=this.type.name;return this.content.size&&(e+="("+this.content.toString()+")"),s(this.marks,e)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(function(e){return e.toJSON()})),e}},{key:"size",get:function(){return this.content.size}},{key:"width",get:function(){return 1}},{key:"textContent",get:function(){return this.content.textContent}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"value",get:function(){return this}}],[{key:"sameAttrs",value:function(e,t){if(e==t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0}},{key:"fromJSON",value:function(e,t){var r=e.nodeType(t.type),n=null!=t.text?t.text:l.Fragment.fromJSON(e,t.content);return r.create(t.attrs,n,t.marks&&t.marks.map(e.markFromJSON))}}]),e}();r.Node=d,"undefined"!=typeof Symbol&&(d.prototype[Symbol.iterator]=function(){return this.iter()});r.TextNode=function(e){function t(e,r,o,s){i(this,t);var a=n(this,Object.getPrototypeOf(t).call(this,e,r,null,s));return a.text=o,a}return o(t,e),u(t,[{key:"toString",value:function(){return s(this.marks,JSON.stringify(this.text))}},{key:"mark",value:function(e){return new t(this.type,this.attrs,this.text,e)}},{key:"toJSON",value:function(){var e=a(Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.text=this.text,e}},{key:"textContent",get:function(){return this.text}},{key:"width",get:function(){return this.text.length}}]),t}(d)},{"./fragment":37,"./mark":39,"./pos":41}],41:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Pos=void 0;var i=e("./error");r.Pos=function(){function e(t,r){n(this,e),this.path=t,this.offset=r}return o(e,[{key:"toString",value:function(){return this.path.join("/")+":"+this.offset}},{key:"max",value:function(e){return this.cmp(e)>0?this:e}},{key:"min",value:function(e){return this.cmp(e)<0?this:e}},{key:"cmp",value:function(t){return t==this?0:e.cmp(this.path,this.offset,t.path,t.offset)}},{key:"shorten",value:function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(t>=this.depth){if(t!=this.depth||r)throw new i.ModelError("Invalid shorten depth "+t+" for "+this);return new e(this.path,this.offset+r)}return e.shorten(this.path,t,r)}},{key:"move",value:function(t){return new e(this.path,this.offset+t)}},{key:"toPath",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return this.path.concat(this.offset+e)}},{key:"extend",value:function(t){for(var r=this.path.slice(),n=this.offset,o=0;o<t.path.length;o++)r.push(t.path[o]+n),n=0;return new e(r,t.offset+n)}},{key:"isValid",value:function(e,t){for(var r=0,n=e;;r++){if(r==this.path.length)return t&&!n.isTextblock?!1:this.offset<=n.size;var o=this.path[r];if(o>=n.size)return!1;n=n.child(o)}}},{key:"toJSON",value:function(){return this}},{key:"depth",get:function(){return this.path.length}}],[{key:"cmp",value:function(e,t,r,n){for(var o=e.length,i=r.length,s=0,a=Math.min(o,i);a>s;s++){var u=e[s]-r[s];if(0!=u)return u}return o>i?n<=e[s]?1:-1:i>o?t<=r[s]?-1:1:t-n}},{key:"samePath",value:function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}},{key:"shorten",value:function(t){var r=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return null==r&&(r=t.length-1),new e(t.slice(0,r),t[r]+n)}},{key:"from",value:function(t){var r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(!t.length)throw new i.ModelError("Can't create a pos from an empty array");return new e(t.slice(0,t.length-1),t[t.length-1]+r)}},{key:"fromJSON",value:function(t){return new e(t.path,t.offset)}}]),e}()},{"./error":36}],42:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var r=(0,p.copyObj)(e);for(var n in t){var o=t[n];null==o?delete r[n]:r[n]=o}return r}var a=function _(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:_(o,t,r)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(r)},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Schema=r.SchemaSpec=r.MarkType=r.Attribute=r.Text=r.Inline=r.Textblock=r.Block=r.NodeKind=r.NodeType=r.SchemaError=void 0;var l=e("./node"),c=e("./fragment"),f=e("./mark"),p=e("../util/obj"),h=e("../util/error"),d=r.SchemaError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(h.ProseMirrorError),m=function(){function e(){n(this,e)}return u(e,[{key:"getDefaultAttrs",value:function(){var e=Object.create(null);for(var t in this.attrs){var r=this.attrs[t];if(null==r["default"])return null;e[t]=r["default"]}return e}},{key:"computeAttrs",value:function(e,t){var r=Object.create(null);for(var n in this.attrs){var o=e&&e[n];if(null==o){var i=this.attrs[n];if(null!=i["default"])o=i["default"];else{if(!i.compute)throw new d("No value supplied for attribute "+n);o=i.compute(this,t)}}r[n]=o}return r}},{key:"freezeAttrs",value:function(){var e=Object.create(null);for(var t in this.attrs)e[t]=this.attrs[t];Object.defineProperty(this,"attrs",{value:e})}},{key:"attrs",get:function(){return{}}}],[{key:"updateAttrs",value:function(e){Object.defineProperty(this.prototype,"attrs",{value:s(this.prototype.attrs,e)})}},{key:"getRegistry",value:function(){return this==e?null:(this.prototype.hasOwnProperty("registry")||(this.prototype.registry=Object.create(Object.getPrototypeOf(this).getRegistry())),this.prototype.registry)}},{key:"getNamespace",value:function(t){if(this==e)return null;var r=this.getRegistry();return Object.prototype.hasOwnProperty.call(r,t)||(r[t]=Object.create(Object.getPrototypeOf(this).getNamespace(t))),r[t]}},{key:"register",value:function(e,t,r){this.getNamespace(e)[t]=function(){return r}}},{key:"registerComputed",value:function(e,t,r){this.getNamespace(e)[t]=r}},{key:"cleanNamespace",value:function(e){this.getNamespace(e).__proto__=null}}]),e}(),g=r.NodeType=function(e){function t(e,r){n(this,t);var i=o(this,Object.getPrototypeOf(t).call(this));return i.name=e,i.freezeAttrs(),i.defaultAttrs=i.getDefaultAttrs(),i.schema=r,i}return i(t,e),u(t,[{key:"canContainFragment",value:function(e){var t=this,r=!0;return e.forEach(function(e){t.canContain(e)||(r=!1)}),r}},{key:"canContain",value:function(e){if(!this.canContainType(e.type))return!1;for(var t=0;t<e.marks.length;t++)if(!this.canContainMark(e.marks[t]))return!1;return!0}},{key:"canContainMark",value:function(e){var t=this.containsMarks;if(t===!0)return!0;if(t)for(var r=0;r<t.length;r++)if(t[r]==e.name)return!0;return!1}},{key:"canContainType",value:function(e){return e.kind&&e.kind.isSubKind(this.contains)}},{key:"canContainContent",value:function(e){return e.contains&&e.contains.isSubKind(this.contains)}},{key:"findConnection",value:function(e){if(this.canContainType(e))return[];for(var t=Object.create(null),r=[{from:this,via:[]}];r.length;){var n=r.shift();for(var o in this.schema.nodes){var i=this.schema.nodes[o];if(i.contains&&i.defaultAttrs&&!(i.contains.id in t)&&n.from.canContainType(i)){var s=n.via.concat(i);if(i.canContainType(e))return s;r.push({from:i,via:s}),t[i.contains.id]=!0}}}}},{key:"computeAttrs",value:function(e,r){return!e&&this.defaultAttrs?this.defaultAttrs:a(Object.getPrototypeOf(t.prototype),"computeAttrs",this).call(this,e,r)}},{key:"create",value:function(e,t,r){return new l.Node(this,this.computeAttrs(e,t),c.Fragment.from(t),f.Mark.setFrom(r))}},{key:"createAutoFill",value:function(e,t,r){return t&&0!=t.length||this.canBeEmpty||(t=this.defaultContent()),this.create(e,t,r)}},{key:"isBlock",get:function(){return!1}},{key:"isTextblock",get:function(){return!1}},{key:"isInline",get:function(){return!1}},{key:"isText",get:function(){return!1}},{key:"selectable",get:function(){return!0}},{key:"draggable",get:function(){return!1}},{key:"locked",get:function(){return!1}},{key:"contains",get:function(){return null}},{key:"kind",get:function(){return null}},{key:"canBeEmpty",get:function(){return!0}},{key:"containsMarks",get:function(){return!1}}],[{key:"compile",value:function(e,t){var r=Object.create(null);for(var n in e)r[n]=new e[n](n,t);if(!r.doc)throw new d("Every schema needs a 'doc' type");if(!r.text)throw new d("Every schema needs a 'text' type");return r}}]),t}(m),v=r.NodeKind=function(){function e(t){var r=this;n(this,e),this.name=t,this.supers=Object.create(null),this.id=++e.nextID,this.supers[this.id]=!0;for(var o=arguments.length,i=Array(o>1?o-1:0),s=1;o>s;s++)i[s-1]=arguments[s];i.forEach(function(e){for(var t in e.supers)r.supers[t]=!0})}return u(e,[{key:"isSubKind",value:function(e){return e&&e.id in this.supers||!1}}]),e}();v.nextID=0,v.block=new v("block"),v.inline=new v("inline"),v.text=new v("text",v.inline);var y=r.Block=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"defaultContent",value:function(){var e=this.schema.defaultTextblockType().create(),t=this.findConnection(e.type);if(!t)throw new d("Can't create default content for "+this.name);for(var r=t.length-1;r>=0;r--)e=t[r].create(null,e);return c.Fragment.from(e)}},{key:"contains",get:function(){return v.block}},{key:"kind",get:function(){return v.block}},{key:"isBlock",get:function(){return!0}},{key:"canBeEmpty",get:function(){return null==this.contains}}]),t}(g),k=(r.Textblock=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"contains",get:function(){return v.inline}},{key:"containsMarks",get:function(){return!0}},{key:"isTextblock",get:function(){return!0}},{key:"canBeEmpty",get:function(){return!0}}]),t}(y),r.Inline=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"kind",get:function(){return v.inline}},{key:"isInline",get:function(){return!0}}]),t}(g)),b=(r.Text=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"create",value:function(e,t,r){return new l.TextNode(this,this.computeAttrs(e,t),t,r)}},{key:"selectable",get:function(){return!1}},{key:"isText",get:function(){return!0}},{key:"kind",get:function(){return v.text}}]),t}(k),r.Attribute=function x(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n(this,x),this["default"]=e["default"],this.compute=e.compute,this.label=e.label},r.MarkType=function(e){function t(e,r,i){n(this,t);var s=o(this,Object.getPrototypeOf(t).call(this));s.name=e,s.freezeAttrs(),s.rank=r,s.schema=i;var a=s.getDefaultAttrs();return s.instance=a&&new f.Mark(s,a),s}return i(t,e),u(t,[{key:"create",value:function(e){return!e&&this.instance?this.instance:new f.Mark(this,this.computeAttrs(e))}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}}],[{key:"getOrder",value:function(e){var t=[];for(var r in e)t.push({name:r,rank:e[r].rank});t.sort(function(e,t){return e.rank-t.rank});for(var n=Object.create(null),o=0;o<t.length;o++)n[t[o].name]=o;return n}},{key:"compile",value:function(e,t){var r=this.getOrder(e),n=Object.create(null);for(var o in e)n[o]=new e[o](o,r[o],t);return n}},{key:"rank",get:function(){return 50}}]),t}(m)),w=(r.SchemaSpec=function(){function e(t,r){n(this,e),this.nodes=t||{},this.marks=r||{}}return u(e,[{key:"update",value:function(t,r){return new e(t?s(this.nodes,t):this.nodes,r?s(this.marks,r):this.marks)}}]),e}(),function(){function e(t){n(this,e),this.spec=t,this.nodes=g.compile(t.nodes,this),this.marks=b.compile(t.marks,this);for(var r in this.nodes)if(r in this.marks)throw new d(r+" can not be both a node and a mark");this.cached=Object.create(null),this.node=this.node.bind(this),this.text=this.text.bind(this),this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this)}return u(e,[{key:"node",value:function(e,t,r,n){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof g))throw new d("Invalid node type: "+e);if(e.schema!=this)throw new d("Node type from different schema used ("+e.name+")")}return e.create(t,r,n)}},{key:"text",value:function(e,t){return this.nodes.text.create(null,e,f.Mark.setFrom(t))}},{key:"defaultTextblockType",value:function(){var e=this.cached.defaultTextblockType;if(void 0!==e)return e;for(var t in this.nodes)if(this.nodes[t].defaultTextblock)return this.cached.defaultTextblockType=this.nodes[t];return this.cached.defaultTextblockType=null}},{key:"mark",value:function(e,t){var r=this.marks[e];if(!r)throw new d("No mark named "+e);return r.create(t)}},{key:"nodeFromJSON",value:function(e){return l.Node.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){var t=this.marks[e._],r=null;for(var n in e)"_"!=n&&(r||(r=Object.create(null)),r[n]=e[n]);return r?t.create(r):t.instance}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new d("Unknown node type: "+e);return t}},{key:"registry",value:function t(e,r){for(var n=0;2>n;n++){var o=n?this.marks:this.nodes;for(var i in o){var s=o[i],t=s.registry,a=t&&t[e];if(a)for(var u in a){var l=a[u](s);null!=l&&r(u,l,s,i)}}}}}]),e}());r.Schema=w},{"../util/error":55,"../util/obj":58,"./fragment":37,"./mark":39,"./node":40}],43:[function(e,t,r){"use strict";function n(e,t){for(var r=[e.path(t.from.path)],n=!1;;){for(var o=-1,i=function(e,n){r.some(function(t){return!e.type.canContainContent(t.type)})||(o=n),e=e.child(t.from.path[n]),s=e},s=e,a=0;a<t.from.path.length;a++)i(s,a);if(o>-1)return{path:t.from.path.slice(0,o),unwrap:n};if(n||!r[0].isBlock)return null;r=r[0].content.slice(t.from.offset,t.to.offset),n=!0}}function o(e,t,r){var o=e.siblingRange(t,r||t),i=n(e,o);return i?{found:i,range:o}:void 0}function i(e,t,r,n){var o=e.siblingRange(t,r||t);if(o.from.offset==o.to.offset)return null;var i=e.path(o.from.path),s=i.type.findConnection(n),a=n.findConnection(i.child(o.from.offset).type);return s&&a?{range:o,around:s,inside:a}:void 0}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0}),r.canLift=o,r.canWrap=i;var a=e("../model"),u=e("./transform"),l=e("./step"),c=e("./tree"),f=e("./map");l.Step.define("ancestor",{apply:function(e,t){var r=t.from,n=t.to;if(!(0,c.isFlatRange)(r,n))return null;for(var o=r.path,i=r.offset,u=n.offset,p=t.param,h=p.depth,d=void 0===h?0:h,m=p.types,g=void 0===m?[]:m,v=p.attrs,y=void 0===v?[]:v,k=e.path(r.path),b=0;d>b;b++){if(i>0||u<e.path(o).size||0==o.length)return null;i=o[o.length-1],u=i+1,o=o.slice(0,o.length-1)}if(0==d&&0==g.length)return null;var w=e.path(o),_=w.size,x=void 0;if(w.type.locked)return null;if(g.length){var C=function(){var e=g[g.length-1],t=k.content.slice(r.offset,n.offset);if(!w.type.canContainType(g[0])||t.some(function(t){return!e.canContain(t)})||!k.size&&!e.canBeEmpty||e.locked)return{v:null};for(var o=null,s=g.length-1;s>=0;s--)o=g[s].create(y[s],o||t);x=w.splice(i,u,a.Fragment.from(o))}();if("object"===("undefined"==typeof C?"undefined":s(C)))return C.v}else{if(!w.type.canContainFragment(k.content)||!k.size&&0==i&&u==w.size&&!w.type.canBeEmpty)return null;x=w.splice(i,u,k.content)}for(var M=e.replaceDeep(o,x),S=o.slice(),b=0;b<g.length;b++)S.push(b?0:i);var A=new a.Pos(S,g.length?0:i),O=null,P=g.length?1:n.offset-r.offset;if(d!=g.length||d>1||g.length>1){var T=new a.Pos(o,i),E=new a.Pos(o,u),D=new a.Pos(o,i+P),j=new a.Pos(S,A.offset+(n.offset-r.offset));O=[new f.ReplacedRange(T,r,T,A),new f.ReplacedRange(n,E,j,D,E,D)]}var q=[new f.MovedRange(r,n.offset-r.offset,A)];return u-i!=P&&q.push(new f.MovedRange(new a.Pos(o,u),_-u,new a.Pos(o,i+P))),new l.StepResult(M,new f.PosMap(q,O))},invert:function(e,t,r){var n=[],o=[];if(e.param.depth)for(var i=0;i<e.param.depth;i++){var s=t.path(e.from.path.slice(0,e.from.path.length-i));n.unshift(s.type),o.unshift(s.attrs)}var a=r.map(e.from).pos,u=e.from.cmp(e.to)?r.map(e.to,-1).pos:a;return new l.Step("ancestor",a,u,null,{depth:e.param.types?e.param.types.length:0,types:n,attrs:o})},paramToJSON:function(e){return{depth:e.depth,types:e.types&&e.types.map(function(e){return e.name}),attrs:e.attrs}},paramFromJSON:function(e,t){return{depth:t.depth,types:t.types&&t.types.map(function(t){return e.nodeType(t)}),attrs:t.attrs}}}),u.Transform.prototype.lift=function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1],r=o(this.doc,e,t);if(!r)return this;for(var n=r.found,i=r.range,s=i.from.path.length-n.path.length,u=n.unwrap&&this.doc.path(i.from.path),l=0,c=i.to;;l++){if(c.offset<this.doc.path(c.path).size){this.split(c,s-l);break}if(l==s-1)break;c=c.shorten(null,1)}for(var l=0,c=i.from;;l++){if(c.offset>0){this.split(c,s-l);for(var f=i.from.path.length-s,p=c.path.slice(0,f).concat(c.path[f]+1);p.length<i.from.path.length;)p.push(0);i={from:new a.Pos(p,0),to:new a.Pos(p,i.to.offset-i.from.offset)};break}if(l==s-1)break;c=c.shorten()}if(n.unwrap){for(var h=i.to.offset-1;h>i.from.offset;h--)this.join(new a.Pos(i.from.path,h));for(var d,m=0,h=u.iter(i.from.offset,i.to.offset);d=h.next().value;)m+=d.size;var p=i.from.path.concat(i.from.offset);i={from:new a.Pos(p,0),to:new a.Pos(p,m)},++s}return this.step("ancestor",i.from,i.to,null,{depth:s}),this},u.Transform.prototype.wrap=function(e,t,r,n){var o=i(this.doc,e,t,r);if(!o)return this;var s=o.range,u=o.around,l=o.inside,c=u.concat(r).concat(l),f=u.map(function(){return null}).concat(n).concat(l.map(function(){return null}));if(this.step("ancestor",s.from,s.to,null,{types:c,attrs:f}),l.length){for(var p=s.from.path.slice(),h=0;h<u.length+l.length+1;h++)p.push(h?0:s.from.offset);for(var h=s.to.offset-1-s.from.offset;h>0;h--)this.split(new a.Pos(p,h),l.length)}return this},u.Transform.prototype.setBlockType=function(e,t,r,n){var o=this;return this.doc.nodesBetween(e,t||e,function(e,t){return e.isTextblock&&!e.hasMarkup(r,n)?(t=t.slice(),o.clearMarkup(new a.Pos(t,0),new a.Pos(t,e.size),r),o.step("ancestor",new a.Pos(t,0),new a.Pos(t,o.doc.path(t).size),null,{depth:1,types:[r],attrs:[n]}),!1):void 0}),this},u.Transform.prototype.setNodeType=function(e,t,r){var n=this.doc.nodeAfter(e),o=e.toPath();return this.step("ancestor",new a.Pos(o,0),new a.Pos(o,n.size),null,{depth:1,types:[t],attrs:[r]}),this}},{"../model":38,"./map":46,"./step":50,"./transform":51,"./tree":52}],44:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Remapping=r.MapResult=r.PosMap=r.joinableBlocks=r.joinPoint=r.canWrap=r.canLift=r.StepResult=r.Step=r.Transform=void 0;var n=e("./transform");Object.defineProperty(r,"Transform",{enumerable:!0,get:function(){return n.Transform}});var o=e("./step");Object.defineProperty(r,"Step",{enumerable:!0,get:function(){return o.Step}}),Object.defineProperty(r,"StepResult",{enumerable:!0,get:function(){return o.StepResult}});var i=e("./ancestor");Object.defineProperty(r,"canLift",{enumerable:!0,get:function(){return i.canLift}}),Object.defineProperty(r,"canWrap",{enumerable:!0,get:function(){return i.canWrap}});var s=e("./join");Object.defineProperty(r,"joinPoint",{enumerable:!0,get:function(){return s.joinPoint}}),Object.defineProperty(r,"joinableBlocks",{enumerable:!0,get:function(){return s.joinableBlocks}});var a=e("./map");Object.defineProperty(r,"PosMap",{enumerable:!0,get:function(){return a.PosMap}}),Object.defineProperty(r,"MapResult",{enumerable:!0,get:function(){return a.MapResult}}),Object.defineProperty(r,"Remapping",{enumerable:!0,get:function(){return a.Remapping}}),e("./mark"),e("./split"),e("./replace")},{"./ancestor":43,"./join":45,"./map":46,"./mark":47,"./replace":48,"./split":49,"./step":50,"./transform":51}],45:[function(e,t,r){"use strict";function n(e,t){if(0==t.offset)return!1;var r=e.path(t.path);if(r.isTextblock||t.offset==r.size)return!1;var n=r.child(t.offset-1).type;return!n.isTextblock&&n.contains&&n==r.child(t.offset).type}function o(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?-1:arguments[2];;){if(n(e,t))return t;if(0==t.depth)return null;t=t.shorten(null,0>r?0:1)}}Object.defineProperty(r,"__esModule",{value:!0}),r.joinableBlocks=n,r.joinPoint=o;var i=e("../model"),s=e("./transform"),a=e("./step"),u=e("./map");a.Step.define("join",{apply:function(e,t){var r=e.path(t.from.path),n=e.path(t.to.path);if(t.from.offset<r.size||t.to.offset>0||!r.type.canContainFragment(n.content))return null;var o=t.from.path,s=t.to.path,l=o.length-1,c=o[l]+1;if(o.length!=s.length||0==o.length||c!=s[l])return null;for(var f=0;l>f;f++)if(o[f]!=s[f])return null;var p=o.slice(0,l),h=e.path(p),d=h.size;if(h.type.locked)return null;var m=r.append(n.content),g=e.replaceDeep(p,h.splice(c-1,c+1,i.Fragment.from(m))),v=new u.PosMap([new u.MovedRange(t.to,n.size,t.from),new u.MovedRange(new i.Pos(p,c+1),d-c-1,new i.Pos(p,c))],[new u.ReplacedRange(t.from,t.to,t.from,t.from,t.to.shorten())]);return new a.StepResult(g,v)},invert:function(e,t){return new a.Step("split",null,null,e.from,t.path(e.to.path).copy())}}),s.Transform.prototype.join=function(e){var t=this.doc.path(e.path);return 0==e.offset||e.offset==t.size||t.isTextblock?this:(this.step("join",new i.Pos(e.path.concat(e.offset-1),t.child(e.offset-1).size),new i.Pos(e.path.concat(e.offset),0)),this)}},{"../model":38,"./map":46,"./step":50,"./transform":51}],46:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(t.path.length>e.path.length){for(var r=[t.path[e.path.length]-e.offset],n=e.path.length+1;n<t.path.length;n++)r.push(t.path[n]);return new a.Pos(r,t.offset)}return new a.Pos([],t.offset-e.offset)}function i(e,t){for(var r=arguments.length<=2||void 0===arguments[2]?1:arguments[2],n=arguments[3],i=0;i<e.replaced.length;i++){var s=e.replaced[i],u=n?s.after:s.before,l=void 0,c=void 0;if((l=t.cmp(u.from))>=0&&(c=t.cmp(u.to))<=0){var p=n?s.before:s.after;return new f(0>r?p.from:p.to,!(!l||!c),{rangeID:i,offset:o(u.ref,t)})}}for(var i=0;i<e.moved.length;i++){var s=e.moved[i],h=n?s.dest:s.start;if(t.cmp(h)>=0&&a.Pos.cmp(t.path,t.offset,h.path,h.offset+s.size)<=0){var d=n?s.start:s.dest,m=h.depth;if(t.depth>m){var g=d.offset+(t.path[m]-h.offset);return new f(new a.Pos(d.path.concat(g).concat(t.path.slice(m+1)),t.offset))}return new f(new a.Pos(d.path,d.offset+(t.offset-h.offset)))}}return new f(t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Remapping=r.nullMap=r.MapResult=r.PosMap=r.ReplacedRange=r.MovedRange=void 0;var a=e("../model"),u=(r.MovedRange=function(){function e(t,r){var o=arguments.length<=2||void 0===arguments[2]?null:arguments[2];n(this,e),this.start=t,this.size=r,this.dest=o}return s(e,[{key:"toString",value:function(){return"[moved "+this.start+"+"+this.size+" to "+this.dest+"]"}},{key:"end",get:function(){return new a.Pos(this.start.path,this.start.offset+this.size)}}]),e}(),function h(e,t,r){n(this,h),this.from=e,this.to=t,this.ref=r}),l=(r.ReplacedRange=function(){function e(t,r,o,i){var s=arguments.length<=4||void 0===arguments[4]?t:arguments[4],a=arguments.length<=5||void 0===arguments[5]?o:arguments[5];n(this,e),this.before=new u(t,r,s),this.after=new u(o,i,a)}return s(e,[{key:"toString",value:function(){return"[replaced "+this.before.from+"-"+this.before.to+" with "+this.after.from+"-"+this.after.to+"]"}}]),e}(),[]),c=r.PosMap=function(){function e(t,r){n(this,e),this.moved=t||l,this.replaced=r||l}return s(e,[{key:"recover",value:function(e){return this.replaced[e.rangeID].after.ref.extend(e.offset)}},{key:"map",value:function(e,t){return i(this,e,t,!1)}},{key:"invert",value:function(){return new p(this)}},{key:"toString",value:function(){return this.moved.concat(this.replaced).join(" ")}}]),e}(),f=r.MapResult=function d(e){var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];n(this,d),this.pos=e,this.deleted=t,this.recover=r},p=function(){function e(t){n(this,e),this.inner=t}return s(e,[{key:"recover",value:function(e){return this.inner.replaced[e.rangeID].before.ref.extend(e.offset)}},{key:"map",value:function(e,t){return i(this.inner,e,t,!0)}},{key:"invert",value:function(){return this.inner}},{key:"toString",value:function(){return"-"+this.inner}}]),e}();r.nullMap=new c,r.Remapping=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],r=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],o=arguments.length<=2||void 0===arguments[2]?Object.create(null):arguments[2];n(this,e),this.head=t,this.tail=r,this.mirror=o}return s(e,[{key:"addToFront",value:function(e,t){this.head.push(e);var r=-this.head.length;return null!=t&&(this.mirror[r]=t),r}},{key:"addToBack",value:function(e,t){this.tail.push(e);var r=this.tail.length-1;return null!=t&&(this.mirror[t]=r),r}},{key:"get",value:function(e){return 0>e?this.head[-e-1]:this.tail[e]}},{key:"map",value:function t(e,r){for(var n=!1,o=-this.head.length;o<this.tail.length;o++){var t=this.get(o),i=t.map(e,r);if(i.recover){var s=this.mirror[o];if(null!=s){o=s,e=this.get(s).recover(i.recover);continue}}i.deleted&&(n=!0),e=i.pos}return new f(e,n)}}]),e}()},{"../model":38}],47:[function(e,t,r){"use strict";var n=e("../model"),o=e("./transform"),i=e("./step"),s=e("./tree");i.Step.define("addMark",{apply:function(e,t){return new i.StepResult((0,s.copyStructure)(e,t.from,t.to,function(e,r,n){return e.type.canContainMark(t.param)?(0,s.copyInline)(e,r,n,function(e){return e.mark(t.param.addToSet(e.marks))}):e}))},invert:function(e,t,r){return new i.Step("removeMark",e.from,r.map(e.to).pos,null,e.param)},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return e.markFromJSON(t)}}),o.Transform.prototype.addMark=function(e,t,r){var o=this,s=[],a=[],u=null,l=null;return this.doc.inlineNodesBetween(e,t,function(e,t,o,c,f){var p=e.marks;if(r.isInSet(p)||!f.type.canContainMark(r.type))l=u=null;else{var h=r.type.isInSet(p);h?u&&u.param.eq(h)?u.to=new n.Pos(t,c):(u=new i.Step("removeMark",new n.Pos(t,o),new n.Pos(t,c),null,h),s.push(u)):u&&(u=null),l?l.to=new n.Pos(t,c):(l=new i.Step("addMark",new n.Pos(t,o),new n.Pos(t,c),null,r),a.push(l))}}),s.forEach(function(e){return o.step(e)}),a.forEach(function(e){return o.step(e)}),this},i.Step.define("removeMark",{apply:function(e,t){return new i.StepResult((0,s.copyStructure)(e,t.from,t.to,function(e,r,n){return(0,s.copyInline)(e,r,n,function(e){return e.mark(t.param.removeFromSet(e.marks))})}))},invert:function(e,t,r){return new i.Step("addMark",e.from,r.map(e.to).pos,null,e.param)},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return e.markFromJSON(t)}}),o.Transform.prototype.removeMark=function(e,t){var r=this,o=arguments.length<=2||void 0===arguments[2]?null:arguments[2],i=[],s=0;return this.doc.inlineNodesBetween(e,t,function(e,t,r,a){var u=e.marks;s++;var l=null;if(o instanceof n.MarkType){var c=o.isInSet(u);c&&(l=[c])}else o?o.isInSet(u)&&(l=[o]):l=u;if(l&&l.length){t=t.slice();for(var f=0;f<l.length;f++){for(var p=l[f],c=void 0,h=0;h<i.length;h++){var d=i[h];d.step==s-1&&p.eq(i[h].style)&&(c=d)}c?(c.to=new n.Pos(t,a),c.step=s):i.push({style:p,from:new n.Pos(t,r),to:new n.Pos(t,a),step:s})}}}),i.forEach(function(e){return r.step("removeMark",e.from,e.to,null,e.style)}),this},o.Transform.prototype.clearMarkup=function(e,t,r){var o=this,s=[];this.doc.inlineNodesBetween(e,t,function(e,t,a,u){var l=e.marks,c=e.type;if(r?!r.canContainType(c):!c.isText){t=t.slice();var f=new n.Pos(t,a);return void s.push(new i.Step("replace",f,new n.Pos(t,u),f))}for(var p=0;p<l.length;p++){var h=l[p];r&&r.canContainMark(h.type)||(t=t.slice(),o.step("removeMark",new n.Pos(t,a),new n.Pos(t,u),null,h))}});for(var a=s.length-1;a>=0;a--)this.step(s[a]);return this}},{"../model":38,"./step":50,"./transform":51,"./tree":52}],48:[function(e,t,r){"use strict";function n(e,t,r,n){for(var o=[],i=t.path.slice(0,n),s=n;;s++){var a=s==t.depth?0:1,l=s==t.depth?t.offset:t.path[s],c=e.size-l,p=r.size-c,h=t.shorten(s,a),d=new u.Pos(i,p+a);
+if(h.cmp(d)&&o.push(new f.MovedRange(h,c-a,d)),!a)return o;e=e.child(l),r=r.child(p),i=i.concat(p)}}function o(e,t,r,i,s){var a=arguments.length<=5||void 0===arguments[5]?0:arguments[5];if(a==i.length){var u=e.sliceBetween(null,t,a),l=e.sliceBetween(r,null,a),c=void 0;return u.type.canContainFragment(s.content)?(c=s.content.size?u.append(s.content,t.depth-a,s.openLeft).append(l.content,s.openRight,r.depth-a):u.append(l.content,t.depth-a,r.depth-a),c.size||c.type.canBeEmpty||(c=c.copy(c.type.defaultContent())),{doc:c,moved:n(e,r,c,a)}):null}var f=i[a],c=o(e.child(f),t,r,i,s,a+1);return c?{doc:e.replace(f,c.doc),moved:c.moved}:null}function i(e,t){for(var r=e[t]=e[t].slice(1),n=t-1;n>=0;n--)r=e[n]=e[n].replace(0,r)}function s(e,t,r,n){for(var o=t.sliceBetween(r,n),s=[],a=o,l=0;l<=r.path.length;l++,a=a.firstChild)s.push(a);var c=(0,p.samePathDepth)(r,n),f=e.length-1,h=s.length-1,d=null,m=r.depth,g=n.depth,v=s[h];for(v.isTextblock&&v.size&&e[f].isTextblock&&(d=e[f--].copy(v.content),--h,i(s,h));;h--){for(var a=s[h],y=a.type,k=null,b=c>=h,l=f;l>=0;l--){var w=e[l];if(b?w.type.canContainContent(a.type):w.type==y){k=l;break}}if(null!=k){if(d)for(;f>=k;){var _=e[f],x=u.Fragment.from(d);d=_.copy(f==k?x.append(a.content):x),f--}else d=e[k].copy(a.content),f=k-1;if(b)break}else--m;(null!=k||0==a.size)&&(b&&null==k&&--g,i(s,h-1))}var C={content:d?d.content:u.emptyFragment,openLeft:m-h,openRight:g-h};return{repl:C,depth:f+1}}function a(e,t,r,n){for(var o=(0,p.samePathDepth)(r,n),i=n.shorten(null,1);i.path.length>o&&1==t.path(i.path).size;)i=i.shorten(null,1);e.split(i,i.path.length-o);for(var s=n,a=new u.Pos(s.path,t.path(s.path).size),l=t.path(s.path.slice(0,o)),c=l.pathNodes(r.path.slice(o)),f=l.pathNodes(s.path.slice(o));c.length&&f.length&&c[0].sameMarkup(f[0]);)c.shift(),f.shift();(f.length||c.length)&&e.step("ancestor",s,a,null,{depth:f.length,types:c.map(function(e){return e.type}),attrs:c.map(function(e){return e.attrs})});for(var h=o;h<r.path.length;h++)e.join(r.shorten(h,1))}Object.defineProperty(r,"__esModule",{value:!0}),r.replace=o;var u=e("../model"),l=e("./transform"),c=e("./step"),f=e("./map"),p=e("./tree"),h={content:u.emptyFragment,openLeft:0,openRight:0};c.Step.define("replace",{apply:function(e,t){var r=t.pos,n=r.path;if(t.from.depth<n.length||t.to.depth<n.length)return null;for(var i=0;i<n.length;i++)if(t.from.path[i]!=n[i]||t.to.path[i]!=n[i])return null;var s=o(e,t.from,t.to,r.path,t.param||h);if(!s)return null;var a=s.doc,u=s.moved,l=u.length?u[u.length-1].dest:t.to,p=new f.ReplacedRange(t.from,t.to,t.from,l,r,r);return new c.StepResult(a,new f.PosMap(u,[p]))},invert:function(e,t,r){var n=e.pos.depth;return new c.Step("replace",e.from,r.map(e.to).pos,e.from.shorten(n),{content:t.path(e.pos.path).content.sliceBetween(e.from,e.to,n),openLeft:e.from.depth-n,openRight:e.to.depth-n})},paramToJSON:function(e){return e&&{content:e.content.size&&e.content.toJSON(),openLeft:e.openLeft,openRight:e.openRight}},paramFromJSON:function(e,t){return t&&{content:u.Fragment.fromJSON(e,t.content),openLeft:t.openLeft,openRight:t.openRight}}}),l.Transform.prototype["delete"]=function(e,t){return e.cmp(t)&&this.replace(e,t),this},l.Transform.prototype.replace=function(e,t,r,n,o){var i=void 0,l=void 0,c=this.doc,f=(0,p.samePathDepth)(e,t);if(r){var d=s(c.pathNodes(e.path),r,n,o);for(i=d.repl,l=d.depth;l>f;)i.content.size&&(i={content:u.Fragment.from(c.path(e.path.slice(0,l)).copy(i.content)),openLeft:i.openLeft+1,openRight:i.openRight+1}),l--}else i=h,l=f;var m=e.shorten(l),g=c,v=t;if(i.content.size||(0,p.replaceHasEffect)(c,e,t)){var y=this.step("replace",e,t,m,i);g=y.doc,v=y.map.map(t).pos}if(!c.path(t.path).isTextblock)return this;if(!(i.content.size?r.path(o.path).isTextblock:c.path(e.path).isTextblock))return this;var k=c.path(m.path).pathNodes(t.path.slice(l)).slice(1),b=void 0;if(i.content.size){var w=i.content;b=[];for(var _=0;_<i.openRight;_++){var x=w.child(w.size-1);b.push(x),w=x.content}}else b=c.path(m.path).pathNodes(e.path.slice(l)).slice(1);if(b.length&&(k.length!=b.length||!k.every(function(e,t){return e.sameMarkup(b[t])}))){for(var C=v.shorten(m.depth),M=C.path,S=C.offset,A=void 0,O=g.path(M),_=0;;_++){if(_==b.length){A=new u.Pos(M,S);break}M.push(S-1),O=O.child(S-1),S=O.size}a(this,g,A,v)}return this},l.Transform.prototype.replaceWith=function(e,t,r){return r instanceof u.Fragment||(r=u.Fragment.from(r)),u.Pos.samePath(e.path,t.path)?this.step("replace",e,t,e,{content:r,openLeft:0,openRight:0}):this["delete"](e,t).step("replace",e,e,e,{content:r,openLeft:0,openRight:0}),this},l.Transform.prototype.insert=function(e,t){return this.replaceWith(e,e,t)},l.Transform.prototype.insertText=function(e,t){return this.insert(e,this.doc.type.schema.text(t,this.doc.marksAt(e)))},l.Transform.prototype.insertInline=function(e,t){return this.insert(e,t.mark(this.doc.marksAt(e)))}},{"../model":38,"./map":46,"./step":50,"./transform":51,"./tree":52}],49:[function(e,t,r){"use strict";var n=e("../model"),o=e("./transform"),i=e("./step"),s=e("./map");i.Step.define("split",{apply:function(e,t){var r=t.pos;if(0==r.depth)return null;var o=r.shorten(),a=o.path,u=o.offset,l=e.path(a),c=l.child(u),f=c.size,p=t.param||c,h=p.type,d=p.attrs,m=r.offset;if(0==m&&!c.type.canBeEmpty||c.type.locked||m==c.size&&!h.canBeEmpty)return null;var g=l.splice(u,u+1,n.Fragment.from([c.slice(0,m),h.create(d,c.content.slice(m))])),v=e.replaceDeep(a,g),y=new n.Pos(a.concat(u+1),0),k=new s.PosMap([new s.MovedRange(r,f-r.offset,y),new s.MovedRange(new n.Pos(a,u+1),g.size-2-u,new n.Pos(a,u+2))],[new s.ReplacedRange(r,r,r,y,r,r.shorten(null,1))]);return new i.StepResult(v,k)},invert:function(e,t,r){return new i.Step("join",e.pos,r.map(e.pos).pos)},paramToJSON:function(e){return e&&{type:e.type.name,attrs:e.attrs}},paramFromJSON:function(e,t){return t&&{type:e.nodeType(t.type),attrs:t.attrs}}}),o.Transform.prototype.split=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=arguments[2],n=arguments[3];if(0==t)return this;for(var o=0;;o++){if(this.step("split",null,null,e,r&&{type:r,attrs:n}),o==t-1)return this;r=null,e=e.shorten(null,1)}},o.Transform.prototype.splitIfNeeded=function(e){for(var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],r=0;t>r;r++){var n=e.shorten(e.depth-r);n.offset&&n.offset<this.doc.path(n.path).size&&this.step("split",null,null,n)}return this}},{"../model":38,"./map":46,"./step":50,"./transform":51}],50:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.StepResult=r.Step=void 0;var i=e("../model"),s=e("../util/error"),a=e("./map"),u=(r.Step=function(){function e(t,r,o,i){var a=arguments.length<=4||void 0===arguments[4]?null:arguments[4];if(n(this,e),!(t in u))throw new s.NamespaceError("Unknown step type: "+t);this.type=t,this.from=r,this.to=o,this.pos=i,this.param=a}return o(e,[{key:"apply",value:function(e){return u[this.type].apply(e,this)}},{key:"invert",value:function(e,t){return u[this.type].invert(this,e,t)}},{key:"map",value:function(t){var r=!0,n=null,o=null,i=null;if(this.from){var s=t.map(this.from,1);n=s.pos,s.deleted||(r=!1)}if(this.to)if(0==this.to.cmp(this.from))o=n;else{var s=t.map(this.to,-1);o=s.pos.max(n),s.deleted||(r=!1)}if(this.pos)if(n&&0==this.pos.cmp(this.from))i=n;else if(o&&0==this.pos.cmp(this.to))i=o;else{var s=t.map(this.pos,1);i=s.pos,s.deleted||(r=!1)}return r?null:new e(this.type,n,o,i,this.param)}},{key:"toJSON",value:function(){var e=u[this.type];return{type:this.type,from:this.from,to:this.to,pos:this.pos,param:e.paramToJSON?e.paramToJSON(this.param):this.param}}}],[{key:"fromJSON",value:function(t,r){var n=u[r.type];return new e(r.type,r.from&&i.Pos.fromJSON(r.from),r.to&&i.Pos.fromJSON(r.to),r.pos&&i.Pos.fromJSON(r.pos),n.paramFromJSON?n.paramFromJSON(t,r.param):r.param)}},{key:"define",value:function(e,t){u[e]=t}}]),e}(),r.StepResult=function l(e){var t=arguments.length<=1||void 0===arguments[1]?a.nullMap:arguments[1];n(this,l),this.doc=e,this.map=t},Object.create(null))},{"../model":38,"../util/error":55,"./map":46}],51:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.Transform=void 0;var i=e("./step"),s=e("./map"),a=function(){function e(t){n(this,e),this.steps=[],this.docs=[t],this.maps=[]}return o(e,[{key:"step",value:function(e,t,r,n,o){"string"==typeof e&&(e=new i.Step(e,t,r,n,o));var s=e.apply(this.doc);return s&&(this.steps.push(e),this.maps.push(s.map),this.docs.push(s.doc)),s}},{key:"map",value:function(e,t){for(var r=!1,n=0;n<this.maps.length;n++){var o=this.maps[n].map(e,t);e=o.pos,o.deleted&&(r=!0)}return new s.MapResult(e,r)}},{key:"doc",get:function(){return this.docs[this.docs.length-1]}},{key:"before",get:function(){return this.docs[0]}}]),e}();r.Transform=a},{"./map":46,"./step":50}],52:[function(e,t,r){"use strict";function n(e,t,r,o){var i=arguments.length<=4||void 0===arguments[4]?0:arguments[4];if(e.isTextblock)return o(e,t?t.offset:0,r?r.offset:e.size);if(!e.size)return e;for(var s,a=t?t.path[i]:0,u=r?r.path[i]+1:e.size,c=e.content.toArray(0,a),f=e.iter(a,u);s=f.next().value;){var p=f.offset-s.width==a?t:null,h=f.offset==u?r:null;c.push(n(s,p,h,o,i+1))}return e.copy(l.Fragment.fromArray(c.concat(e.content.toArray(u))))}function o(e,t,r,n){return e.splice(t,r,e.content.slice(t,r).map(n))}function i(e,t){if(e.path.length!=t.path.length)return!1;for(var r=0;r<e.path.length;r++)if(e.path[r]!=t.path[r])return!1;return e.offset<=t.offset}function s(e,t,r){if(!r||0==t||t==e.size)return!1;var n=e.child(t-1),o=e.child(t);return n.sameMarkup(o)}function a(e,t,r){for(var n=0,o=e;;n++){var i=n==t.depth,a=n==r.depth;if(i||a||t.path[n]!=r.path[n]){var u=void 0,l=void 0;if(i)u=t.offset;else{u=t.path[n]+1;for(var c=n+1,f=o.child(u-1);c<=t.path.length;c++)if(c==t.path.length){if(t.offset<f.size)return!0}else{if(t.path[c]+1<f.size)return!0;f=f.child(t.path[c])}}if(a)l=r.offset;else{l=r.path[n];for(var c=n+1;c<=r.path.length;c++)if((c==r.path.length?r.offset:r.path[c])>0)return!0}return u!=l?!0:s(o,u,Math.min(t.depth,r.depth)-n)}o=o.child(t.path[n])}}function u(e,t){for(var r=0;;r++)if(r==e.path.length||r==t.path.length||e.path[r]!=t.path[r])return r}Object.defineProperty(r,"__esModule",{value:!0}),r.copyStructure=n,r.copyInline=o,r.isFlatRange=i,r.replaceHasEffect=a,r.samePathDepth=u;var l=e("../model")},{"../model":38}],53:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){var n=(0,a.elt)("button",{"class":"ProseMirror-prompt-close"}),o=(0,a.elt)("div",{"class":"ProseMirror-prompt"},t,n),i=e.wrapper.getBoundingClientRect();if(e.wrapper.appendChild(o),r&&r.pos)o.style.left=r.pos.left-i.left+"px",o.style.pos=r.pos.top-i.top+"px";else{var s=o.getBoundingClientRect(),u=Math.max(0,i.left)+Math.min(window.innerWidth,i.right)-s.width,l=Math.max(0,i.top)+Math.min(window.innerHeight,i.bottom)-s.height;o.style.left=u/2-i.left+"px",o.style.top=l/2-i.top+"px"}var c=function f(){e.off("interaction",f),o.parentNode&&(o.parentNode.removeChild(o),r&&r.onClose&&r.onClose())};return n.addEventListener("click",c),e.on("interaction",c),{close:c}}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.ParamPrompt=void 0,r.openPrompt=o;var s=e("../util/error"),a=e("../dom"),u=r.ParamPrompt=function(){function e(t,r){var o=this;n(this,e),this.pm=t,this.command=r,this.doClose=null,this.fields=r.params.map(function(e){if(!(e.type in o.paramTypes))throw new s.AssertionError("Unsupported parameter type: "+e.type);return o.paramTypes[e.type].render.call(o.pm,e,o.defaultValue(e))}),this.form=(0,a.elt)("form",null,this.fields.map(function(e){return(0,a.elt)("div",null,e)}))}return i(e,[{key:"close",value:function(){this.doClose&&(this.doClose(),this.doClose=null)}},{key:"open",value:function(){var e=this;this.close();var t=this.prompt(),r=this.pm.hasFocus();this.doClose=function(){t.close(),r&&setTimeout(function(){return e.pm.focus()},50)};var n=function(){var t=e.values();t&&(e.close(),e.command.exec(e.pm,t))};this.form.addEventListener("submit",function(e){e.preventDefault(),n()}),this.form.addEventListener("keydown",function(e){27==e.keyCode?(e.preventDefault(),t.close()):13!=e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||(e.preventDefault(),n())});var o=this.form.querySelector("input, textarea");o&&o.focus()}},{key:"values",value:function(){for(var e=[],t=0;t<this.command.params.length;t++){var r=this.command.params[t],n=this.fields[t],o=this.paramTypes[r.type],i=void 0,s=void 0;if(o.validate&&(s=o.validate(n)),s||(i=o.read.call(this.pm,n),r.validate?s=r.validate(i):i||null!=r["default"]||(s="No default value available")),s)return o.reportInvalid?o.reportInvalid.call(this.pm,n,s):this.reportInvalid(n,s),null;e.push(i)}return e}},{key:"defaultValue",value:function(e){if(e.prefill){var t=e.prefill.call(this.command.self,this.pm);if(null!=t)return t}return e["default"]}},{key:"prompt",value:function(){var e=this;return o(this.pm,this.form,{onClose:function(){return e.close()}})}},{key:"reportInvalid",value:function(e,t){var r=e.parentNode,n="left: "+(e.offsetLeft+e.offsetWidth+2)+"px; top: "+(e.offsetTop-5)+"px",o=r.appendChild((0,a.elt)("div",{"class":"ProseMirror-invalid",style:n},t));setTimeout(function(){return r.removeChild(o)},1500)}}]),e}();u.prototype.paramTypes=Object.create(null),u.prototype.paramTypes.text={render:function(e,t){return(0,a.elt)("input",{type:"text",placeholder:e.label,value:t,autocomplete:"off"})},read:function(e){return e.value}},u.prototype.paramTypes.select={render:function(e,t){var r=e.options.call?e.options(this):e.options;return(0,a.elt)("select",null,r.map(function(e){return(0,a.elt)("option",{value:e.value,selected:e.value==t?"true":null},e.label)}))},read:function(e){return e.value}},(0,a.insertCSS)('\n.ProseMirror-prompt {\n  background: white;\n  padding: 2px 6px 2px 15px;\n  border: 1px solid silver;\n  position: absolute;\n  border-radius: 3px;\n  z-index: 11;\n}\n\n.ProseMirror-prompt input[type="text"],\n.ProseMirror-prompt textarea {\n  background: #eee;\n  border: none;\n  outline: none;\n}\n\n.ProseMirror-prompt input[type="text"] {\n  padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n  position: absolute;\n  left: 2px; top: 1px;\n  color: #666;\n  border: none; background: transparent; padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n  content: "✕";\n  font-size: 12px;\n}\n\n.ProseMirror-invalid {\n  background: #ffc;\n  border: 1px solid #cc7;\n  border-radius: 4px;\n  padding: 5px 10px;\n  position: absolute;\n  min-width: 10em;\n}\n')},{"../dom":3,"../util/error":55}],54:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){l.get(e).set(t)}function i(e,t){l.get(e).unset(t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0}),r.scheduleDOMUpdate=o,r.unscheduleDOMUpdate=i;var a=50,u=100,l=function(){function e(t){n(this,e),this.waiting=[],this.timeout=null,this.lastForce=0,this.pm=t,this.force=this.force.bind(this),t.on("flush",this.onFlush.bind(this))}return s(e,[{key:"set",value:function(e){0==this.waiting.length&&(this.timeout=setTimeout(this.force,a)),-1==this.waiting.indexOf(e)&&this.waiting.push(e)}},{key:"unset",value:function(e){var t=this.waiting.indexOf(e);t>-1&&this.waiting.splice(t,1)}},{key:"force",value:function(){for(clearTimeout(this.timeout),this.lastForce=Date.now();this.waiting.length;)for(var e=0;e<this.waiting.length;e++){var t=this.waiting[e]();t?this.waiting[e]=t:this.waiting.splice(e--,1)}}},{key:"onFlush",value:function(){this.waiting.length&&Date.now()-this.lastForce>u&&this.force()}}],[{key:"get",value:function(e){return e.mod.centralScheduler||(e.mod.centralScheduler=new this(e))}}]),e}();r.UpdateScheduler=function(){function e(t,r,o){var i=this;n(this,e),this.pm=t,this.start=o,this.events=r.split(" "),this.onEvent=this.onEvent.bind(this),this.events.forEach(function(e){return t.on(e,i.onEvent)})}return s(e,[{key:"detach",value:function(){var e=this;i(this.pm,this.start),this.events.forEach(function(t){return e.pm.off(t,e.onEvent)})}},{key:"onEvent",value:function(){o(this.pm,this.start)}},{key:"force",value:function(){if(this.pm.operation)this.onEvent();else{i(this.pm,this.start);for(var e=this.start;e;e=e());}}}]),e}()},{}],55:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=/^function (\w+)/.exec(e.toString());return t&&t[1]}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0});var u=r.ProseMirrorError=function(e){function t(e){n(this,t);var r=o(this,Object.getPrototypeOf(t).call(this,e));return r.message!=e&&(r.message=e,Error.captureStackTrace?Error.captureStackTrace(r,r.name):r.stack=new Error(e).stack),r}return i(t,e),a(t,[{key:"name",get:function(){return this.constructor.name||s(this.constructor)||"ProseMirrorError"}}]),t}(Error);r.AssertionError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(u),r.NamespaceError=function(e){function t(){return n(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(u)},{}],56:[function(e,t,r){"use strict";function n(e){var t=e.prototype;for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])}Object.defineProperty(r,"__esModule",{value:!0}),r.eventMixin=n;var o={on:function(e,t){var r=this._handlers||(this._handlers={}),n=r[e]||(r[e]=[]);n.push(t)},off:function(e,t){var r=this._handlers&&this._handlers[e];if(r)for(var n=0;n<r.length;++n)if(r[n]==t){r.splice(n,1);break}},signal:function(e){for(var t=this._handlers&&this._handlers[e],r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];if(t)for(var i=0;i<t.length;++i)t[i].apply(t,n)},signalHandleable:function(e){var t=this._handlers&&this._handlers[e];if(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];for(var i=0;i<t.length;++i){var s=t[i].apply(t,n);if(s!==!1)return s}}return!1},signalPipelined:function(e,t){var r=this._handlers&&this._handlers[e];if(r)for(var n=0;n<r.length;++n)t=r[n](t);return t},signalDOM:function(e,t){var r=this._handlers&&this._handlers[t||e.type];if(r)for(var n=0;n<r.length;++n)if(r[n](e)||e.defaultPrevented)return!0;return!1},hasHandler:function(e){var t=this._handlers&&this._handlers[e];return t&&t.length>0}}},{}],57:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(r,"__esModule",{value:!0});r.Map=window.Map||function(){function e(){n(this,e),this.content=[]}return o(e,[{key:"set",value:function(e,t){var r=this.find(e);r>-1?this.content[r+1]=t:this.content.push(e,t)}},{key:"get",value:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]}},{key:"has",value:function(e){return this.find(e)>-1}},{key:"find",value:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t}},{key:"clear",value:function(){this.content.length=0}},{key:"size",get:function(){return this.content.length/2}}]),e}()},{}],58:[function(e,t,r){"use strict";function n(e,t){var r=t||Object.create(null);for(var n in e)r[n]=e[n];return r}Object.defineProperty(r,"__esModule",{value:!0}),r.copyObj=n},{}],59:[function(e,t,r){"use strict";function n(e,t,r){for(var n=0;n<e.length&&!(r(e[n],t)>0);n++);e.splice(n,0,t)}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=n},{}],60:[function(e,t,r){!function(e){if("object"==typeof r&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);(this||window).browserKeymap=e()}}(function(){"use strict";function e(e){if("keypress"==e.type)return"'"+String.fromCharCode(e.charCode)+"'";var t=i[e.keyCode],r=t;return null==r||e.altGraphKey?null:(e.altKey&&"Alt"!=t&&(r="Alt-"+r),e.ctrlKey&&"Ctrl"!=t&&(r="Ctrl-"+r),e.metaKey&&"Cmd"!=t&&(r="Cmd-"+r),e.shiftKey&&"Shift"!=t&&(r="Shift-"+r),r)}function t(e){return e=/[^-]*$/.exec(e)[0],"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function r(e){for(var t,r,n,i,s=e.split(/-(?!'?$)/),a=s[s.length-1],u=0;u<s.length-1;u++){var l=s[u];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)$/i.test(l))n=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);o?i=!0:r=!0}}return t&&(a="Alt-"+a),r&&(a="Ctrl-"+a),i&&(a="Cmd-"+a),n&&(a="Shift-"+a),a}function n(e,t){if(this.options=t||{},this.bindings=Object.create(null),e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.addBinding(r,e[r])}for(var o="undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os?"darwin"==os.platform():!1,i={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},s=0;10>s;s++)i[s+48]=i[s+96]=String(s);for(var s=65;90>=s;s++)i[s]=String.fromCharCode(s);for(var s=1;12>=s;s++)i[s+111]=i[s+63235]="F"+s;return n.prototype={normalize:function(e){return this.options.multi!==!1?e.split(/ +(?!\'$)/).map(r):[r(e)]},addBinding:function(e,t){for(var r=this.normalize(e),n=0;n<r.length;n++){var o=r.slice(0,n+1).join(" "),i=n==r.length-1?t:"...",s=this.bindings[o];if(s){if(s!=i)throw new Error("Inconsistent bindings for "+o)}else this.bindings[o]=i}},removeBinding:function(e){for(var t=this.normalize(e),r=t.length-1;r>=0;r--){var n=t.slice(0,r).join(" "),o=this.bindings[n];if("..."==o&&!this.unusedMulti(n))break;o&&delete this.bindings[n]}},unusedMulti:function(e){for(var t in this.bindings)if(t.length>e&&0==t.indexOf(e)&&" "==t.charAt(e.length))return!1;return!0},lookup:function(e,t){return this.options.call?this.options.call(e,t):this.bindings[e]},constructor:n},n.keyName=e,n.isModifierKey=t,n.normalizeKeyName=r,n})},{}],61:[function(e,t,r){t.exports={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:"   ",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:"‌"}},{}],62:[function(e,t,r){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(r){e[r]=t[r]})}),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===o(e)}function s(e){return"[object Object]"===o(e)}function a(e){return"[object RegExp]"===o(e)}function u(e){return"[object Function]"===o(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(e){return Object.keys(e||{}).reduce(function(e,t){return e||y.hasOwnProperty(t)},!1)}function f(e){e.__index__=-1,e.__text_cache__=""}function p(e){return function(t,r){var n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function h(){return function(e,t){t.normalize(e)}}function d(t){function r(e){return e.replace("%TLDS%",c.src_tlds)}function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var c=t.re=n({},e("./lib/re")),d=t.__tlds__.slice();t.__tlds_replaced__||d.push(b),d.push(c.src_xn),c.src_tlds=d.join("|"),c.email_fuzzy=RegExp(r(c.tpl_email_fuzzy),"i"),c.link_fuzzy=RegExp(r(c.tpl_link_fuzzy),"i"),c.link_no_ip_fuzzy=RegExp(r(c.tpl_link_no_ip_fuzzy),"i"),c.host_fuzzy_test=RegExp(r(c.tpl_host_fuzzy_test),"i");var m=[];t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){var r=t.__schemas__[e];if(null!==r){var n={validate:null,link:null};return t.__compiled__[e]=n,s(r)?(a(r.validate)?n.validate=p(r.validate):u(r.validate)?n.validate=r.validate:o(e,r),void(u(r.normalize)?n.normalize=r.normalize:r.normalize?o(e,r):n.normalize=h())):i(r)?void m.push(e):void o(e,r)}}),m.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:h()};var g=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map(l).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+g+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+g+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),f(t)}function m(e,t){var r=e.__index__,n=e.__last_index__,o=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=o,this.text=o,this.url=o}function g(e,t){var r=new m(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function v(e,t){return this instanceof v?(t||c(e)&&(t=e,e={}),this.__opts__=n({},y,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},k,e),this.__compiled__={},this.__tlds__=w,this.__tlds_replaced__=!1,this.re={},void d(this)):new v(e,t)}var y={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,r){var n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){var n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&":"===e[t-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){var n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},b="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]",w="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");v.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},v.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},v.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,r,n,o,i,s,a,u,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(o=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&null!==(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&null!==(n=e.match(this.re.email_fuzzy))&&(i=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s))),this.__index__>=0},v.prototype.pretest=function(e){return this.re.pretest.test(e)},v.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},v.prototype.match=function(e){var t=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(g(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)r.push(g(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return r.length?r:null},v.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,r){return e!==r[t-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},v.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},t.exports=v},{"./lib/re":63}],63:[function(e,t,r){"use strict";var n=r.src_Any=e("uc.micro/properties/Any/regex").source,o=r.src_Cc=e("uc.micro/categories/Cc/regex").source,i=r.src_Z=e("uc.micro/categories/Z/regex").source,s=r.src_P=e("uc.micro/categories/P/regex").source,a=r.src_ZPCc=[i,s,o].join("|"),u=r.src_ZCc=[i,o].join("|"),l="(?:(?!"+a+")"+n+")",c="(?:(?![0-9]|"+a+")"+n+")",f=r.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]?)";r.src_auth="(?:(?:(?!"+u+").)+@)?";var p=r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",h=r.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=r.src_path="(?:[/?#](?:(?!"+u+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+u+"|\\]).)*\\]|\\((?:(?!"+u+"|[)]).)*\\)|\\{(?:(?!"+u+'|[}]).)*\\}|\\"(?:(?!'+u+'|["]).)+\\"|\\\'(?:(?!'+u+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+u+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+u+").|\\!(?!"+u+"|[!]).|\\?(?!"+u+"|[?]).)+|\\/)?",m=r.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=r.src_xn="xn--[a-z0-9\\-]{1,59}",v=r.src_domain_root="(?:"+g+"|"+c+"{1,63})",y=r.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",k=r.src_host="(?:"+f+"|(?:(?:(?:"+y+")\\.)*"+v+"))",b=r.tpl_host_fuzzy="(?:"+f+"|(?:(?:(?:"+y+")\\.)+(?:%TLDS%)))",w=r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+y+")\\.)+(?:%TLDS%))";r.src_host_strict=k+h;var _=r.tpl_host_fuzzy_strict=b+h;r.src_host_port_strict=k+p+h;var x=r.tpl_host_port_fuzzy_strict=b+p+h,C=r.tpl_host_port_no_ip_fuzzy_strict=w+p+h;r.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",r.tpl_email_fuzzy="(^|>|"+u+")("+m+"@"+_+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+x+d+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")"},{"uc.micro/categories/Cc/regex":120,"uc.micro/categories/P/regex":122,"uc.micro/categories/Z/regex":123,"uc.micro/properties/Any/regex":125}],64:[function(e,t,r){"use strict";t.exports=e("./lib/")},{"./lib/":74}],65:[function(e,t,r){"use strict";t.exports=e("entities/maps/entities.json")},{"entities/maps/entities.json":61}],66:[function(e,t,r){"use strict";t.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","head","header","hr","html","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},{}],67:[function(e,t,r){"use strict";var n="[a-zA-Z_:][a-zA-Z0-9:._-]*",o="[^\"'=<>`\\x00-\\x20]+",i="'[^']*'",s='"[^"]*"',a="(?:"+o+"|"+i+"|"+s+")",u="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+u+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",f="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",p="<[?].*?[?]>",h="<![A-Z]+\\s+[^>]*>",d="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",m=new RegExp("^(?:"+l+"|"+c+"|"+f+"|"+p+"|"+h+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+c+")");t.exports.HTML_TAG_RE=m,t.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],68:[function(e,t,r){"use strict";t.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},{}],69:[function(e,t,r){"use strict";function n(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===n(e)}function i(e,t){return b.call(e,t)}function s(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(r){e[r]=t[r]})}}),e}function a(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function u(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(e){if(e>65535){e-=65536;var t=55296+(e>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function c(e,t){var r=0;return i(M,t)?M[t]:35===t.charCodeAt(0)&&C.test(t)&&(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(r))?l(r):e}function f(e){return e.indexOf("\\")<0?e:e.replace(w,"$1")}function p(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(x,function(e,t,r){return t?t:c(e,r)})}function h(e){return O[e]}function d(e){return S.test(e)?e.replace(A,h):e}function m(e){return e.replace(P,"\\$&")}function g(e){if(e>=8192&&8202>=e)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}function v(e){return T.test(e)}function y(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}}function k(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var b=Object.prototype.hasOwnProperty,w=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,_=/&([a-z#][a-z0-9]{1,31});/gi,x=new RegExp(w.source+"|"+_.source,"gi"),C=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,M=e("./entities"),S=/[&<>"]/,A=/[&<>"]/g,O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},P=/[.?*+^$[\]\\(){}|-]/g,T=e("uc.micro/categories/P/regex");r.lib={},r.lib.mdurl=e("mdurl"),r.lib.ucmicro=e("uc.micro"),r.assign=s,r.isString=o,r.has=i,r.unescapeMd=f,r.unescapeAll=p,r.isValidEntityCode=u,r.fromCodePoint=l,r.escapeHtml=d,r.arrayReplaceAt=a,r.isWhiteSpace=g,r.isMdAsciiPunct=y,r.isPunctChar=v,r.escapeRE=m,r.normalizeReference=k},{"./entities":65,mdurl:118,"uc.micro":124,"uc.micro/categories/P/regex":122}],70:[function(e,t,r){"use strict";r.parseLinkLabel=e("./parse_link_label"),r.parseLinkDestination=e("./parse_link_destination"),r.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":71,"./parse_link_label":72,"./parse_link_title":73}],71:[function(e,t,r){"use strict";var n=e("../common/utils").unescapeAll;t.exports=function(e,t,r){var o,i,s=0,a=t,u={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;r>t;){if(o=e.charCodeAt(t),10===o)return u;if(62===o)return u.pos=t+1,u.str=n(e.slice(a+1,t)),u.ok=!0,u;92===o&&r>t+1?t+=2:t++}return u}for(i=0;r>t&&(o=e.charCodeAt(t),32!==o)&&!(32>o||127===o);)if(92===o&&r>t+1)t+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;t++}return a===t?u:(u.str=n(e.slice(a,t)),u.lines=s,u.pos=t,u.ok=!0,u)}},{"../common/utils":69}],72:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,i,s,a=-1,u=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<u;){if(i=e.src.charCodeAt(e.pos),93===i&&(n--,0===n)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===i)if(s===e.pos-1)n++;else if(r)return e.pos=l,-1}return o&&(a=e.pos),e.pos=l,a}},{}],73:[function(e,t,r){"use strict";var n=e("../common/utils").unescapeAll;t.exports=function(e,t,r){var o,i,s=0,a=t,u={ok:!1,pos:0,lines:0,str:""};if(t>=r)return u;if(i=e.charCodeAt(t),34!==i&&39!==i&&40!==i)return u;for(t++,40===i&&(i=41);r>t;){if(o=e.charCodeAt(t),o===i)return u.pos=t+1,u.lines=s,u.str=n(e.slice(a+1,t)),u.ok=!0,u;10===o?s++:92===o&&r>t+1&&(t++,10===e.charCodeAt(t)&&s++),t++}return u}},{"../common/utils":69}],74:[function(e,t,r){"use strict";function n(e){
+var t=e.trim().toLowerCase();return v.test(t)?y.test(t)?!0:!1:!0}function o(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||k.indexOf(t.protocol)>=0))try{t.hostname=m.toASCII(t.hostname)}catch(r){}return d.encode(d.format(t))}function i(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||k.indexOf(t.protocol)>=0))try{t.hostname=m.toUnicode(t.hostname)}catch(r){}return d.decode(d.format(t))}function s(e,t){return this instanceof s?(t||a.isString(e)||(t=e||{},e="default"),this.inline=new p,this.block=new f,this.core=new c,this.renderer=new l,this.linkify=new h,this.validateLink=n,this.normalizeLink=o,this.normalizeLinkText=i,this.utils=a,this.helpers=u,this.options={},this.configure(e),void(t&&this.set(t))):new s(e,t)}var a=e("./common/utils"),u=e("./helpers"),l=e("./renderer"),c=e("./parser_core"),f=e("./parser_block"),p=e("./parser_inline"),h=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},v=/^(vbscript|javascript|file|data):/,y=/^data:image\/(gif|png|jpeg|webp);/,k=["http:","https:","mailto:"];s.prototype.set=function(e){return a.assign(this.options,e),this},s.prototype.configure=function(e){var t,r=this;if(a.isString(e)&&(t=e,e=g[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&&r.set(e.options),e.components&&Object.keys(e.components).forEach(function(t){e.components[t].rules&&r[t].ruler.enableOnly(e.components[t].rules)}),this},s.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.enable(e,!0))},this);var n=e.filter(function(e){return r.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},s.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(e,!0))},this);var n=e.filter(function(e){return r.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},s.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},s.prototype.parse=function(e,t){var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},s.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},s.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},s.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},t.exports=s},{"./common/utils":69,"./helpers":70,"./parser_block":75,"./parser_core":76,"./parser_inline":77,"./presets/commonmark":78,"./presets/default":79,"./presets/zero":80,"./renderer":81,"linkify-it":62,mdurl:118,punycode:2}],75:[function(e,t,r){"use strict";function n(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1],{alt:(i[e][2]||[]).slice()})}var o=e("./ruler"),i=[["code",e("./rules_block/code")],["fence",e("./rules_block/fence"),["paragraph","reference","blockquote","list"]],["blockquote",e("./rules_block/blockquote"),["paragraph","reference","list"]],["hr",e("./rules_block/hr"),["paragraph","reference","blockquote","list"]],["list",e("./rules_block/list"),["paragraph","reference","blockquote"]],["reference",e("./rules_block/reference")],["heading",e("./rules_block/heading"),["paragraph","reference","blockquote"]],["lheading",e("./rules_block/lheading")],["html_block",e("./rules_block/html_block"),["paragraph","reference","blockquote"]],["table",e("./rules_block/table"),["paragraph","reference"]],["paragraph",e("./rules_block/paragraph")]];n.prototype.tokenize=function(e,t,r){for(var n,o,i=this.ruler.getRules(""),s=i.length,a=t,u=!1,l=e.md.options.maxNesting;r>a&&(e.line=a=e.skipEmptyLines(a),!(a>=r))&&!(e.tShift[a]<e.blkIndent);){if(e.level>=l){e.line=r;break}for(o=0;s>o&&!(n=i[o](e,a,r,!1));o++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),a=e.line,r>a&&e.isEmpty(a)){if(u=!0,a++,r>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,t,r,n){var o;return e?(o=new this.State(e,t,r,n),void this.tokenize(o,o.line,o.lineMax)):[]},n.prototype.State=e("./rules_block/state_block"),t.exports=n},{"./ruler":82,"./rules_block/blockquote":83,"./rules_block/code":84,"./rules_block/fence":85,"./rules_block/heading":86,"./rules_block/hr":87,"./rules_block/html_block":88,"./rules_block/lheading":89,"./rules_block/list":90,"./rules_block/paragraph":91,"./rules_block/reference":92,"./rules_block/state_block":93,"./rules_block/table":94}],76:[function(e,t,r){"use strict";function n(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}var o=e("./ruler"),i=[["normalize",e("./rules_core/normalize")],["block",e("./rules_core/block")],["inline",e("./rules_core/inline")],["linkify",e("./rules_core/linkify")],["replacements",e("./rules_core/replacements")],["smartquotes",e("./rules_core/smartquotes")]];n.prototype.process=function(e){var t,r,n;for(n=this.ruler.getRules(""),t=0,r=n.length;r>t;t++)n[t](e)},n.prototype.State=e("./rules_core/state_core"),t.exports=n},{"./ruler":82,"./rules_core/block":95,"./rules_core/inline":96,"./rules_core/linkify":97,"./rules_core/normalize":98,"./rules_core/replacements":99,"./rules_core/smartquotes":100,"./rules_core/state_core":101}],77:[function(e,t,r){"use strict";function n(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}var o=e("./ruler"),i=[["text",e("./rules_inline/text")],["newline",e("./rules_inline/newline")],["escape",e("./rules_inline/escape")],["backticks",e("./rules_inline/backticks")],["strikethrough",e("./rules_inline/strikethrough")],["emphasis",e("./rules_inline/emphasis")],["link",e("./rules_inline/link")],["image",e("./rules_inline/image")],["autolink",e("./rules_inline/autolink")],["html_inline",e("./rules_inline/html_inline")],["entity",e("./rules_inline/entity")]];n.prototype.skipToken=function(e){var t,r=e.pos,n=this.ruler.getRules(""),o=n.length,i=e.md.options.maxNesting,s=e.cache;if("undefined"!=typeof s[r])return void(e.pos=s[r]);if(e.level<i)for(t=0;o>t;t++)if(n[t](e,!0))return void(s[r]=e.pos);e.pos++,s[r]=e.pos},n.prototype.tokenize=function(e){for(var t,r,n=this.ruler.getRules(""),o=n.length,i=e.posMax,s=e.md.options.maxNesting;e.pos<i;){if(e.level<s)for(r=0;o>r&&!(t=n[r](e,!1));r++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,t,r,n){var o=new this.State(e,t,r,n);this.tokenize(o)},n.prototype.State=e("./rules_inline/state_inline"),t.exports=n},{"./ruler":82,"./rules_inline/autolink":102,"./rules_inline/backticks":103,"./rules_inline/emphasis":104,"./rules_inline/entity":105,"./rules_inline/escape":106,"./rules_inline/html_inline":107,"./rules_inline/image":108,"./rules_inline/link":109,"./rules_inline/newline":110,"./rules_inline/state_inline":111,"./rules_inline/strikethrough":112,"./rules_inline/text":113}],78:[function(e,t,r){"use strict";t.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"]}}}},{}],79:[function(e,t,r){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}}},{}],80:[function(e,t,r){"use strict";t.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"]}}}},{}],81:[function(e,t,r){"use strict";function n(){this.rules=o({},a)}var o=e("./common/utils").assign,i=e("./common/utils").unescapeAll,s=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,t){return"<code>"+s(e[t].content)+"</code>"},a.code_block=function(e,t){return"<pre><code>"+s(e[t].content)+"</code></pre>\n"},a.fence=function(e,t,r,n,o){var a,u=e[t],l=u.info?i(u.info).trim():"",c="";return l&&(c=l.split(/\s+/g)[0],u.attrPush(["class",r.langPrefix+c])),a=r.highlight?r.highlight(u.content,c)||s(u.content):s(u.content),"<pre><code"+o.renderAttrs(u)+">"+a+"</code></pre>\n"},a.image=function(e,t,r,n,o){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,r,n),o.renderToken(e,t,r)},a.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},a.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},a.text=function(e,t){return s(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},n.prototype.renderAttrs=function(e){var t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;r>t;t++)n+=" "+s(e.attrs[t][0])+'="'+s(e.attrs[t][1])+'"';return n},n.prototype.renderToken=function(e,t,r){var n,o="",i=!1,s=e[t];return s.hidden?"":(s.block&&-1!==s.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===s.nesting?"</":"<")+s.tag,o+=this.renderAttrs(s),0===s.nesting&&r.xhtmlOut&&(o+=" /"),s.block&&(i=!0,1===s.nesting&&t+1<e.length&&(n=e[t+1],"inline"===n.type||n.hidden?i=!1:-1===n.nesting&&n.tag===s.tag&&(i=!1))),o+=i?">\n":">")},n.prototype.renderInline=function(e,t,r){for(var n,o="",i=this.rules,s=0,a=e.length;a>s;s++)n=e[s].type,o+="undefined"!=typeof i[n]?i[n](e,s,t,r,this):this.renderToken(e,s,t);return o},n.prototype.renderInlineAsText=function(e,t,r){for(var n="",o=this.rules,i=0,s=e.length;s>i;i++)"text"===e[i].type?n+=o.text(e,i,t,r,this):"image"===e[i].type&&(n+=this.renderInlineAsText(e[i].children,t,r));return n},n.prototype.render=function(e,t,r){var n,o,i,s="",a=this.rules;for(n=0,o=e.length;o>n;n++)i=e[n].type,s+="inline"===i?this.renderInline(e[n].children,t,r):"undefined"!=typeof a[i]?a[e[n].type](e,n,t,r,this):this.renderToken(e,n,t,r);return s},t.exports=n},{"./common/utils":69}],82:[function(e,t,r){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},n.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||e.__cache__[t].push(r.fn))})})},n.prototype.at=function(e,t,r){var n=this.__find__(e),o=r||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=o.alt||[],this.__cache__=null},n.prototype.before=function(e,t,r,n){var o=this.__find__(e),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},n.prototype.after=function(e,t,r,n){var o=this.__find__(e),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},n.prototype.push=function(e,t,r){var n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},n.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,r.push(e)},this),this.__cache__=null,r},n.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},n.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,r.push(e)},this),this.__cache__=null,r},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},t.exports=n},{}],83:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u,l,c,f,p,h,d,m,g=e.bMarks[t]+e.tShift[t],v=e.eMarks[t];if(62!==e.src.charCodeAt(g++))return!1;if(n)return!0;for(32===e.src.charCodeAt(g)&&g++,u=e.blkIndent,e.blkIndent=0,a=[e.bMarks[t]],e.bMarks[t]=g,g=v>g?e.skipSpaces(g):g,i=g>=v,s=[e.tShift[t]],e.tShift[t]=g-e.bMarks[t],f=e.md.block.ruler.getRules("blockquote"),o=t+1;r>o&&!(e.tShift[o]<u)&&(g=e.bMarks[o]+e.tShift[o],v=e.eMarks[o],!(g>=v));o++)if(62!==e.src.charCodeAt(g++)){if(i)break;for(m=!1,h=0,d=f.length;d>h;h++)if(f[h](e,o,r,!0)){m=!0;break}if(m)break;a.push(e.bMarks[o]),s.push(e.tShift[o]),e.tShift[o]=-1}else 32===e.src.charCodeAt(g)&&g++,a.push(e.bMarks[o]),e.bMarks[o]=g,g=v>g?e.skipSpaces(g):g,i=g>=v,s.push(e.tShift[o]),e.tShift[o]=g-e.bMarks[o];for(l=e.parentType,e.parentType="blockquote",p=e.push("blockquote_open","blockquote",1),p.markup=">",p.map=c=[t,0],e.md.block.tokenize(e,t,o),p=e.push("blockquote_close","blockquote",-1),p.markup=">",e.parentType=l,c[1]=e.line,h=0;h<s.length;h++)e.bMarks[h+t]=a[h],e.tShift[h+t]=s[h];return e.blkIndent=u,!0}},{}],84:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,i;if(e.tShift[t]-e.blkIndent<4)return!1;for(o=n=t+1;r>n;)if(e.isEmpty(n))n++;else{if(!(e.tShift[n]-e.blkIndent>=4))break;n++,o=n}return e.line=n,i=e.push("code_block","code",0),i.content=e.getLines(t,o,4+e.blkIndent,!0),i.map=[t,e.line],!0}},{}],85:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u,l,c,f=!1,p=e.bMarks[t]+e.tShift[t],h=e.eMarks[t];if(p+3>h)return!1;if(o=e.src.charCodeAt(p),126!==o&&96!==o)return!1;if(u=p,p=e.skipChars(p,o),i=p-u,3>i)return!1;if(c=e.src.slice(u,p),s=e.src.slice(p,h),s.indexOf("`")>=0)return!1;if(n)return!0;for(a=t;(a++,!(a>=r))&&(p=u=e.bMarks[a]+e.tShift[a],h=e.eMarks[a],!(h>p&&e.tShift[a]<e.blkIndent));)if(e.src.charCodeAt(p)===o&&!(e.tShift[a]-e.blkIndent>=4||(p=e.skipChars(p,o),i>p-u||(p=e.skipSpaces(p),h>p)))){f=!0;break}return i=e.tShift[t],e.line=a+(f?1:0),l=e.push("fence","code",0),l.info=s,l.content=e.getLines(t+1,a,i,!0),l.markup=c,l.map=[t,e.line],!0}},{}],86:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(o=e.src.charCodeAt(u),35!==o||u>=l)return!1;for(i=1,o=e.src.charCodeAt(++u);35===o&&l>u&&6>=i;)i++,o=e.src.charCodeAt(++u);return i>6||l>u&&32!==o?!1:n?!0:(l=e.skipCharsBack(l,32,u),s=e.skipCharsBack(l,35,u),s>u&&32===e.src.charCodeAt(s-1)&&(l=s),e.line=t+1,a=e.push("heading_open","h"+String(i),1),a.markup="########".slice(0,i),a.map=[t,e.line],a=e.push("inline","",0),a.content=e.src.slice(u,l).trim(),a.map=[t,e.line],a.children=[],a=e.push("heading_close","h"+String(i),-1),a.markup="########".slice(0,i),!0)}},{}],87:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o,i,s,a,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(o=e.src.charCodeAt(u++),42!==o&&45!==o&&95!==o)return!1;for(i=1;l>u;){if(s=e.src.charCodeAt(u++),s!==o&&32!==s)return!1;s===o&&i++}return 3>i?!1:n?!0:(e.line=t+1,a=e.push("hr","hr",0),a.map=[t,e.line],a.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{}],88:[function(e,t,r){"use strict";var n=e("../common/html_blocks"),o=e("../common/html_re").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("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(e,t,r,n){var o,s,a,u,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(u=e.src.slice(l,c),o=0;o<i.length&&!i[o][0].test(u);o++);if(o===i.length)return!1;if(n)return i[o][2];if(s=t+1,!i[o][1].test(u))for(;r>s&&!(e.tShift[s]<e.blkIndent);s++)if(l=e.bMarks[s]+e.tShift[s],c=e.eMarks[s],u=e.src.slice(l,c),i[o][1].test(u)){0!==u.length&&s++;break}return e.line=s,a=e.push("html_block","",0),a.map=[t,s],a.content=e.getLines(t,s,e.blkIndent,!0),!0}},{"../common/html_blocks":66,"../common/html_re":67}],89:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,i,s,a,u=t+1;return u>=r?!1:e.tShift[u]<e.blkIndent?!1:e.tShift[u]-e.blkIndent>3?!1:(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],o>=i?!1:(n=e.src.charCodeAt(o),45!==n&&61!==n?!1:(o=e.skipChars(o,n),o=e.skipSpaces(o),i>o?!1:(o=e.bMarks[t]+e.tShift[t],e.line=u+1,a=61===n?1:2,s=e.push("heading_open","h"+String(a),1),s.markup=String.fromCharCode(n),s.map=[t,e.line],s=e.push("inline","",0),s.content=e.src.slice(o,e.eMarks[t]).trim(),s.map=[t,e.line-1],s.children=[],s=e.push("heading_close","h"+String(a),-1),s.markup=String.fromCharCode(n),!0))))}},{}],90:[function(e,t,r){"use strict";function n(e,t){var r,n,o;return n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],r=e.src.charCodeAt(n++),42!==r&&45!==r&&43!==r?-1:o>n&&32!==e.src.charCodeAt(n)?-1:n}function o(e,t){var r,n=e.bMarks[t]+e.tShift[t],o=n,i=e.eMarks[t];if(o+1>=i)return-1;if(r=e.src.charCodeAt(o++),48>r||r>57)return-1;for(;;){if(o>=i)return-1;r=e.src.charCodeAt(o++);{if(!(r>=48&&57>=r)){if(41===r||46===r)break;return-1}if(o-n>=10)return-1}}return i>o&&32!==e.src.charCodeAt(o)?-1:o}function i(e,t){var r,n,o=e.level+2;for(r=t+2,n=e.tokens.length-2;n>r;r++)e.tokens[r].level===o&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}t.exports=function(e,t,r,s){var a,u,l,c,f,p,h,d,m,g,v,y,k,b,w,_,x,C,M,S,A,O,P,T=!0;if((d=o(e,t))>=0)k=!0;else{if(!((d=n(e,t))>=0))return!1;k=!1}if(y=e.src.charCodeAt(d-1),s)return!0;for(w=e.tokens.length,k?(h=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(h,d-h-1)),S=e.push("ordered_list_open","ol",1),1!==v&&(S.attrs=[["start",v]])):S=e.push("bullet_list_open","ul",1),S.map=x=[t,0],S.markup=String.fromCharCode(y),a=t,_=!1,M=e.md.block.ruler.getRules("list");!(!(r>a)||(b=e.skipSpaces(d),m=e.eMarks[a],g=b>=m?1:b-d,g>4&&(g=1),u=d-e.bMarks[a]+g,S=e.push("list_item_open","li",1),S.markup=String.fromCharCode(y),S.map=C=[t,0],c=e.blkIndent,f=e.tight,l=e.tShift[t],p=e.parentType,e.tShift[t]=b-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.md.block.tokenize(e,t,r,!0),(!e.tight||_)&&(T=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[t]=l,e.tight=f,e.parentType=p,S=e.push("list_item_close","li",-1),S.markup=String.fromCharCode(y),a=t=e.line,C[1]=a,b=e.bMarks[t],a>=r)||e.isEmpty(a)||e.tShift[a]<e.blkIndent);){for(P=!1,A=0,O=M.length;O>A;A++)if(M[A](e,a,r,!0)){P=!0;break}if(P)break;if(k){if(d=o(e,a),0>d)break}else if(d=n(e,a),0>d)break;if(y!==e.src.charCodeAt(d-1))break}return S=k?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),S.markup=String.fromCharCode(y),x[1]=a,e.line=a,T&&i(e,w),!0}},{}],91:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r,n,o,i,s,a=t+1,u=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.tShift[a]-e.blkIndent>3||e.tShift[a]<0)){for(n=!1,o=0,i=u.length;i>o;o++)if(u[o](e,a,l,!0)){n=!0;break}if(n)break}return r=e.getLines(t,a,e.blkIndent,!1).trim(),e.line=a,s=e.push("paragraph_open","p",1),s.map=[t,e.line],s=e.push("inline","",0),s.content=r,s.map=[t,e.line],s.children=[],s=e.push("paragraph_close","p",-1),!0}},{}],92:[function(e,t,r){"use strict";var n=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference;t.exports=function(e,t,r,s){var a,u,l,c,f,p,h,d,m,g,v,y,k,b,w,_=0,x=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],M=t+1;if(91!==e.src.charCodeAt(x))return!1;for(;++x<C;)if(93===e.src.charCodeAt(x)&&92!==e.src.charCodeAt(x-1)){if(x+1===C)return!1;if(58!==e.src.charCodeAt(x+1))return!1;break}for(c=e.lineMax,b=e.md.block.ruler.getRules("reference");c>M&&!e.isEmpty(M);M++)if(!(e.tShift[M]-e.blkIndent>3||e.tShift[M]<0)){for(k=!1,p=0,h=b.length;h>p;p++)if(b[p](e,M,c,!0)){k=!0;break}if(k)break}for(y=e.getLines(t,M,e.blkIndent,!1).trim(),C=y.length,x=1;C>x;x++){if(a=y.charCodeAt(x),91===a)return!1;if(93===a){m=x;break}10===a?_++:92===a&&(x++,C>x&&10===y.charCodeAt(x)&&_++)}if(0>m||58!==y.charCodeAt(m+1))return!1;for(x=m+2;C>x;x++)if(a=y.charCodeAt(x),10===a)_++;else if(32!==a)break;if(g=n(y,x,C),!g.ok)return!1;if(f=e.md.normalizeLink(g.str),!e.md.validateLink(f))return!1;for(x=g.pos,_+=g.lines,u=x,l=_,v=x;C>x;x++)if(a=y.charCodeAt(x),10===a)_++;else if(32!==a)break;for(g=o(y,x,C),C>x&&v!==x&&g.ok?(w=g.str,x=g.pos,_+=g.lines):(w="",x=u,_=l);C>x&&32===y.charCodeAt(x);)x++;if(C>x&&10!==y.charCodeAt(x)&&w)for(w="",x=u,_=l;C>x&&32===y.charCodeAt(x);)x++;return C>x&&10!==y.charCodeAt(x)?!1:(d=i(y.slice(1,m)))?s?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[d]&&(e.env.references[d]={title:w,href:f}),e.line=t+_+1,!0):!1}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_title":73}],93:[function(e,t,r){"use strict";function n(e,t,r,n){var o,i,s,a,u,l,c;for(this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,l=0,c=!1,s=a=l=0,u=i.length;u>a;a++){if(o=i.charCodeAt(a),!c){if(32===o){l++;continue}c=!0}(10===o||a===u-1)&&(10!==o&&a++,this.bMarks.push(s),this.eMarks.push(a),this.tShift.push(l),c=!1,l=0,s=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}var o=e("../token");n.prototype.push=function(e,t,r){var n=new o(e,t,r);return n.block=!0,0>r&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;t>e&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},n.prototype.skipSpaces=function(e){for(var t=this.src.length;t>e&&32===this.src.charCodeAt(e);e++);return e},n.prototype.skipChars=function(e,t){for(var r=this.src.length;r>e&&this.src.charCodeAt(e)===t;e++);return e},n.prototype.skipCharsBack=function(e,t,r){if(r>=e)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,t,r,n){var o,i,s,a,u,l=e;if(e>=t)return"";if(l+1===t)return i=this.bMarks[l]+Math.min(this.tShift[l],r),s=this.eMarks[t-1]+(n?1:0),this.src.slice(i,s);for(a=new Array(t-e),o=0;t>l;l++,o++)u=this.tShift[l],u>r&&(u=r),0>u&&(u=0),i=this.bMarks[l]+u,s=t>l+1||n?this.eMarks[l]+1:this.eMarks[l],a[o]=this.src.slice(i,s);return a.join("")},n.prototype.Token=o,t.exports=n},{"../token":114}],94:[function(e,t,r){"use strict";function n(e,t){var r=e.bMarks[t]+e.blkIndent,n=e.eMarks[t];return e.src.substr(r,n-r)}function o(e){var t,r=[],n=0,o=e.length,i=0,s=0,a=!1,u=0;for(t=e.charCodeAt(n);o>n;)96===t&&i%2===0?(a=!a,u=n):124!==t||i%2!==0||a?92===t?i++:i=0:(r.push(e.substring(s,n)),s=n+1),n++,n===o&&a&&(a=!1,n=u+1),t=e.charCodeAt(n);return r.push(e.substring(s)),r}t.exports=function(e,t,r,i){var s,a,u,l,c,f,p,h,d,m,g;if(t+2>r)return!1;if(c=t+1,e.tShift[c]<e.blkIndent)return!1;if(u=e.bMarks[c]+e.tShift[c],u>=e.eMarks[c])return!1;if(s=e.src.charCodeAt(u),124!==s&&45!==s&&58!==s)return!1;if(a=n(e,t+1),!/^[-:| ]+$/.test(a))return!1;if(f=a.split("|"),f.length<2)return!1;for(h=[],l=0;l<f.length;l++){if(d=f[l].trim(),!d){if(0===l||l===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(d))return!1;58===d.charCodeAt(d.length-1)?h.push(58===d.charCodeAt(0)?"center":"right"):58===d.charCodeAt(0)?h.push("left"):h.push("")}if(a=n(e,t).trim(),-1===a.indexOf("|"))return!1;if(f=o(a.replace(/^\||\|$/g,"")),h.length!==f.length)return!1;if(i)return!0;for(p=e.push("table_open","table",1),p.map=m=[t,0],p=e.push("thead_open","thead",1),p.map=[t,t+1],p=e.push("tr_open","tr",1),p.map=[t,t+1],l=0;l<f.length;l++)p=e.push("th_open","th",1),p.map=[t,t+1],h[l]&&(p.attrs=[["style","text-align:"+h[l]]]),p=e.push("inline","",0),p.content=f[l].trim(),p.map=[t,t+1],p.children=[],p=e.push("th_close","th",-1);for(p=e.push("tr_close","tr",-1),p=e.push("thead_close","thead",-1),p=e.push("tbody_open","tbody",1),p.map=g=[t+2,0],c=t+2;r>c&&!(e.tShift[c]<e.blkIndent)&&(a=n(e,c).trim(),-1!==a.indexOf("|"));c++){for(f=o(a.replace(/^\||\|$/g,"")),f.length=h.length,p=e.push("tr_open","tr",1),l=0;l<f.length;l++)p=e.push("td_open","td",1),h[l]&&(p.attrs=[["style","text-align:"+h[l]]]),p=e.push("inline","",0),p.content=f[l]?f[l].trim():"",p.children=[],p=e.push("td_close","td",-1);p=e.push("tr_close","tr",-1)}return p=e.push("tbody_close","tbody",-1),p=e.push("table_close","table",-1),m[1]=g[1]=c,e.line=c,!0}},{}],95:[function(e,t,r){"use strict";t.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.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)}},{}],96:[function(e,t,r){"use strict";t.exports=function(e){var t,r,n,o=e.tokens;for(r=0,n=o.length;n>r;r++)t=o[r],"inline"===t.type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},{}],97:[function(e,t,r){"use strict";function n(e){return/^<a[>\s]/i.test(e)}function o(e){return/^<\/a\s*>/i.test(e)}var i=e("../common/utils").arrayReplaceAt;t.exports=function(e){var t,r,s,a,u,l,c,f,p,h,d,m,g,v,y,k,b,w=e.tokens;if(e.md.options.linkify)for(r=0,s=w.length;s>r;r++)if("inline"===w[r].type&&e.md.linkify.pretest(w[r].content))for(a=w[r].children,g=0,t=a.length-1;t>=0;t--)if(l=a[t],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,o(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,b=e.md.linkify.match(p),c=[],m=l.level,d=0,f=0;f<b.length;f++)v=b[f].url,y=e.md.normalizeLink(v),e.md.validateLink(y)&&(k=b[f].text,k=b[f].schema?"mailto:"!==b[f].schema||/^mailto:/i.test(k)?e.md.normalizeLinkText(k):e.md.normalizeLinkText("mailto:"+k).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+k).replace(/^http:\/\//,""),h=b[f].index,h>d&&(u=new e.Token("text","",0),u.content=p.slice(d,h),u.level=m,c.push(u)),u=new e.Token("link_open","a",1),u.attrs=[["href",y]],u.level=m++,u.markup="linkify",u.info="auto",c.push(u),u=new e.Token("text","",0),u.content=k,u.level=m,c.push(u),u=new e.Token("link_close","a",-1),u.level=--m,u.markup="linkify",u.info="auto",c.push(u),d=b[f].lastIndex);d<p.length&&(u=new e.Token("text","",0),u.content=p.slice(d),u.level=m,c.push(u)),w[r].children=a=i(a,t,c)}}else for(t--;a[t].level!==l.level&&"link_open"!==a[t].type;)t--}},{"../common/utils":69}],98:[function(e,t,r){"use strict";var n=/[\n\t]/g,o=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,i=/\u0000/g;t.exports=function(e){var t,r,s;t=e.src.replace(o,"\n"),t=t.replace(i,"�"),t.indexOf(" ")>=0&&(r=0,s=0,t=t.replace(n,function(e,n){var o;return 10===t.charCodeAt(n)?(r=n+1,s=0,e):(o="    ".slice((n-r-s)%4),s=n-r+1,o)})),e.src=t}},{}],99:[function(e,t,r){"use strict";function n(e,t){return l[t.toLowerCase()]}function o(e){var t,r;for(t=e.length-1;t>=0;t--)r=e[t],"text"===r.type&&(r.content=r.content.replace(u,n))}function i(e){var t,r;for(t=e.length-1;t>=0;t--)r=e[t],"text"===r.type&&s.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var s=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,u=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};t.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)&&o(e.tokens[t].children),s.test(e.tokens[t].content)&&i(e.tokens[t].children))}},{}],100:[function(e,t,r){"use strict";function n(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}function o(e,t){var r,o,u,f,p,h,d,m,g,v,y,k,b,w,_,x,C,M,S,A,O;for(S=[],r=0;r<e.length;r++){for(o=e[r],d=e[r].level,C=S.length-1;C>=0&&!(S[C].level<=d);C--);if(S.length=C+1,"text"===o.type){u=o.content,p=0,h=u.length;e:for(;h>p&&(l.lastIndex=p,f=l.exec(u));)if(_=x=!0,p=f.index+1,M="'"===f[0],g=f.index-1>=0?u.charCodeAt(f.index-1):32,v=h>p?u.charCodeAt(p):32,y=a(g)||s(String.fromCharCode(g)),k=a(v)||s(String.fromCharCode(v)),b=i(g),w=i(v),w?_=!1:k&&(b||y||(_=!1)),b?x=!1:y&&(w||k||(x=!1)),34===v&&'"'===f[0]&&g>=48&&57>=g&&(x=_=!1),_&&x&&(_=!1,x=k),_||x){if(x)for(C=S.length-1;C>=0&&(m=S[C],!(S[C].level<d));C--)if(m.single===M&&S[C].level===d){m=S[C],M?(A=t.md.options.quotes[2],O=t.md.options.quotes[3]):(A=t.md.options.quotes[0],O=t.md.options.quotes[1]),o.content=n(o.content,f.index,O),e[m.token].content=n(e[m.token].content,m.pos,A),p+=O.length-1,m.token===r&&(p+=A.length-1),u=o.content,h=u.length,S.length=C;continue e}_?S.push({token:r,pos:f.index,single:M,level:d}):x&&M&&(o.content=n(o.content,f.index,c))}else M&&(o.content=n(o.content,f.index,c))}}}var i=e("../common/utils").isWhiteSpace,s=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct,u=/['"]/,l=/['"]/g,c="’";t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&u.test(e.tokens[t].content)&&o(e.tokens[t].children,e)}},{"../common/utils":69}],101:[function(e,t,r){"use strict";function n(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}var o=e("../token");n.prototype.Token=o,t.exports=n},{"../token":114}],102:[function(e,t,r){"use strict";var n=e("../common/url_schemas"),o=/^<([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])?)*)>/,i=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;t.exports=function(e,t){var r,s,a,u,l,c,f=e.pos;return 60!==e.src.charCodeAt(f)?!1:(r=e.src.slice(f),r.indexOf(">")<0?!1:i.test(r)?(s=r.match(i),n.indexOf(s[1].toLowerCase())<0?!1:(u=s[0].slice(1,-1),l=e.md.normalizeLink(u),e.md.validateLink(l)?(t||(c=e.push("link_open","a",1),c.attrs=[["href",l]],c=e.push("text","",0),c.content=e.md.normalizeLinkText(u),c=e.push("link_close","a",-1)),e.pos+=s[0].length,!0):!1)):o.test(r)?(a=r.match(o),u=a[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+u),e.md.validateLink(l)?(t||(c=e.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=e.push("text","",0),c.content=e.md.normalizeLinkText(u),c=e.push("link_close","a",-1),c.markup="autolink",c.info="auto"),e.pos+=a[0].length,!0):!1):!1)}},{"../common/url_schemas":68}],103:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,o,i,s,a,u=e.pos,l=e.src.charCodeAt(u);if(96!==l)return!1;for(r=u,u++,n=e.posMax;n>u&&96===e.src.charCodeAt(u);)u++;for(o=e.src.slice(r,u),i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;n>s&&96===e.src.charCodeAt(s);)s++;if(s-i===o.length)return t||(a=e.push("code_inline","code",0),a.markup=o,a.content=e.src.slice(u,i).replace(/[ \n]+/g," ").trim()),e.pos=s,!0}return t||(e.pending+=o),e.pos+=o.length,!0}},{}],104:[function(e,t,r){"use strict";function n(e,t){var r,n,a,u,l,c,f,p,h,d=t,m=!0,g=!0,v=e.posMax,y=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):32;v>d&&e.src.charCodeAt(d)===y;)d++;return a=d-t,n=v>d?e.src.charCodeAt(d):32,f=s(r)||i(String.fromCharCode(r)),h=s(n)||i(String.fromCharCode(n)),c=o(r),p=o(n),p?m=!1:h&&(c||f||(m=!1)),c?g=!1:f&&(p||h||(g=!1)),95===y?(u=m&&(!g||f),l=g&&(!m||h)):(u=m,l=g),{can_open:u,can_close:l,delims:a}}var o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct;t.exports=function(e,t){var r,o,i,s,a,u,l,c,f=e.posMax,p=e.pos,h=e.src.charCodeAt(p);if(95!==h&&42!==h)return!1;if(t)return!1;if(l=n(e,p),r=l.delims,!l.can_open)return e.pos+=r,
+e.pending+=e.src.slice(p,e.pos),!0;for(e.pos=p+r,u=[r];e.pos<f;)if(e.src.charCodeAt(e.pos)!==h)e.md.inline.skipToken(e);else{if(l=n(e,e.pos),o=l.delims,l.can_close){for(s=u.pop(),a=o;s!==a;){if(s>a){u.push(s-a);break}if(a-=s,0===u.length)break;e.pos+=s,s=u.pop()}if(0===u.length){r=s,i=!0;break}e.pos+=o;continue}l.can_open&&u.push(o),e.pos+=o}if(!i)return e.pos=p,!1;for(e.posMax=e.pos,e.pos=p+r,o=r;o>1;o-=2)c=e.push("strong_open","strong",1),c.markup=String.fromCharCode(h)+String.fromCharCode(h);for(o%2&&(c=e.push("em_open","em",1),c.markup=String.fromCharCode(h)),e.md.inline.tokenize(e),o%2&&(c=e.push("em_close","em",-1),c.markup=String.fromCharCode(h)),o=r;o>1;o-=2)c=e.push("strong_close","strong",-1),c.markup=String.fromCharCode(h)+String.fromCharCode(h);return e.pos=e.posMax+r,e.posMax=f,!0}},{"../common/utils":69}],105:[function(e,t,r){"use strict";var n=e("../common/entities"),o=e("../common/utils").has,i=e("../common/utils").isValidEntityCode,s=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(e,t){var r,l,c,f=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(f))return!1;if(p>f+1)if(r=e.src.charCodeAt(f+1),35===r){if(c=e.src.slice(f).match(a))return t||(l="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=s(i(l)?l:65533)),e.pos+=c[0].length,!0}else if(c=e.src.slice(f).match(u),c&&o(n,c[1]))return t||(e.pending+=n[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},{"../common/entities":65,"../common/utils":69}],106:[function(e,t,r){"use strict";for(var n=[],o=0;256>o;o++)n.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){n[e.charCodeAt(0)]=1}),t.exports=function(e,t){var r,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(r=e.src.charCodeAt(o),256>r&&0!==n[r])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===r){for(t||e.push("hardbreak","br",0),o++;i>o&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},{}],107:[function(e,t,r){"use strict";function n(e){var t=32|e;return t>=97&&122>=t}var o=e("../common/html_re").HTML_TAG_RE;t.exports=function(e,t){var r,i,s,a,u=e.pos;return e.md.options.html?(s=e.posMax,60!==e.src.charCodeAt(u)||u+2>=s?!1:(r=e.src.charCodeAt(u+1),(33===r||63===r||47===r||n(r))&&(i=e.src.slice(u).match(o))?(t||(a=e.push("html_inline","",0),a.content=e.src.slice(u,u+i[0].length)),e.pos+=i[0].length,!0):!1)):!1}},{"../common/html_re":67}],108:[function(e,t,r){"use strict";var n=e("../helpers/parse_link_label"),o=e("../helpers/parse_link_destination"),i=e("../helpers/parse_link_title"),s=e("../common/utils").normalizeReference;t.exports=function(e,t){var r,a,u,l,c,f,p,h,d,m,g,v,y="",k=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,l=n(e,e.pos+1,!1),0>l)return!1;if(f=l+1,b>f&&40===e.src.charCodeAt(f)){for(f++;b>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);if(f>=b)return!1;for(v=f,h=o(e.src,f,e.posMax),h.ok&&(y=e.md.normalizeLink(h.str),e.md.validateLink(y)?f=h.pos:y=""),v=f;b>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);if(h=i(e.src,f,e.posMax),b>f&&v!==f&&h.ok)for(d=h.str,f=h.pos;b>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);else d="";if(f>=b||41!==e.src.charCodeAt(f))return e.pos=k,!1;f++}else{if("undefined"==typeof e.env.references)return!1;for(;b>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);if(b>f&&91===e.src.charCodeAt(f)?(v=f+1,f=n(e,f),f>=0?u=e.src.slice(v,f++):f=l+1):f=l+1,u||(u=e.src.slice(c,l)),p=e.env.references[s(u)],!p)return e.pos=k,!1;y=p.href,d=p.title}if(!t){e.pos=c,e.posMax=l;var w=new e.md.inline.State(e.src.slice(c,l),e.md,e.env,g=[]);w.md.inline.tokenize(w),m=e.push("image","img",0),m.attrs=r=[["src",y],["alt",""]],m.children=g,d&&r.push(["title",d])}return e.pos=f,e.posMax=b,!0}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_label":72,"../helpers/parse_link_title":73}],109:[function(e,t,r){"use strict";var n=e("../helpers/parse_link_label"),o=e("../helpers/parse_link_destination"),i=e("../helpers/parse_link_title"),s=e("../common/utils").normalizeReference;t.exports=function(e,t){var r,a,u,l,c,f,p,h,d,m,g="",v=e.pos,y=e.posMax,k=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(c=e.pos+1,l=n(e,e.pos,!0),0>l)return!1;if(f=l+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);if(f>=y)return!1;for(k=f,p=o(e.src,f,e.posMax),p.ok&&(g=e.md.normalizeLink(p.str),e.md.validateLink(g)?f=p.pos:g=""),k=f;y>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);if(p=i(e.src,f,e.posMax),y>f&&k!==f&&p.ok)for(d=p.str,f=p.pos;y>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);else d="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=v,!1;f++}else{if("undefined"==typeof e.env.references)return!1;for(;y>f&&(a=e.src.charCodeAt(f),32===a||10===a);f++);if(y>f&&91===e.src.charCodeAt(f)?(k=f+1,f=n(e,f),f>=0?u=e.src.slice(k,f++):f=l+1):f=l+1,u||(u=e.src.slice(c,l)),h=e.env.references[s(u)],!h)return e.pos=v,!1;g=h.href,d=h.title}return t||(e.pos=c,e.posMax=l,m=e.push("link_open","a",1),m.attrs=r=[["href",g]],d&&r.push(["title",d]),e.md.inline.tokenize(e),m=e.push("link_close","a",-1)),e.pos=f,e.posMax=y,!0}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_label":72,"../helpers/parse_link_title":73}],110:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;for(r=e.pending.length-1,n=e.posMax,t||(r>=0&&32===e.pending.charCodeAt(r)?r>=1&&32===e.pending.charCodeAt(r-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)),o++;n>o&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}},{}],111:[function(e,t,r){"use strict";function n(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={}}var o=e("../token");n.prototype.pushPending=function(){var e=new o("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,t,r){this.pending&&this.pushPending();var n=new o(e,t,r);return 0>r&&this.level--,n.level=this.level,r>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.Token=o,t.exports=n},{"../token":114}],112:[function(e,t,r){"use strict";function n(e,t){var r,n,a,u,l,c,f,p=t,h=!0,d=!0,m=e.posMax,g=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):32;m>p&&e.src.charCodeAt(p)===g;)p++;return p>=m&&(h=!1),a=p-t,n=m>p?e.src.charCodeAt(p):32,l=s(r)||i(String.fromCharCode(r)),f=s(n)||i(String.fromCharCode(n)),u=o(r),c=o(n),c?h=!1:f&&(u||l||(h=!1)),u?d=!1:l&&(c||f||(d=!1)),{can_open:h,can_close:d,delims:a}}var o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct;t.exports=function(e,t){var r,o,i,s,a,u,l,c=e.posMax,f=e.pos,p=e.src.charCodeAt(f);if(126!==p)return!1;if(t)return!1;if(u=n(e,f),r=u.delims,!u.can_open)return e.pos+=r,e.pending+=e.src.slice(f,e.pos),!0;if(a=Math.floor(r/2),0>=a)return!1;for(e.pos=f+r;e.pos<c;)if(e.src.charCodeAt(e.pos)!==p)e.md.inline.skipToken(e);else{if(u=n(e,e.pos),o=u.delims,i=Math.floor(o/2),u.can_close){if(i>=a){e.pos+=o-2,s=!0;break}a-=i,e.pos+=o;continue}u.can_open&&(a+=i),e.pos+=o}return s?(e.posMax=e.pos,e.pos=f+2,l=e.push("s_open","s",1),l.markup="~~",e.md.inline.tokenize(e),l=e.push("s_close","s",-1),l.markup="~~",e.pos=e.posMax+2,e.posMax=c,!0):(e.pos=f,!1)}},{"../common/utils":69}],113:[function(e,t,r){"use strict";function n(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}}t.exports=function(e,t){for(var r=e.pos;r<e.posMax&&!n(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},{}],114:[function(e,t,r){"use strict";function n(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var t,r,n;if(!this.attrs)return-1;for(t=this.attrs,r=0,n=t.length;n>r;r++)if(t[r][0]===e)return r;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.exports=n},{}],115:[function(e,t,r){"use strict";function n(e){var t,r,n=i[e];if(n)return n;for(n=i[e]=[],t=0;128>t;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)r=e.charCodeAt(t),n[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}function o(e,t){var r;return"string"!=typeof t&&(t=o.defaultChars),r=n(t),e.replace(/(%[a-f0-9]{2})+/gi,function(e){var t,n,o,i,s,a,u,l="";for(t=0,n=e.length;n>t;t+=3)o=parseInt(e.slice(t+1,t+3),16),128>o?l+=r[o]:192===(224&o)&&n>t+3&&(i=parseInt(e.slice(t+4,t+6),16),128===(192&i))?(u=o<<6&1984|63&i,l+=128>u?"��":String.fromCharCode(u),t+=3):224===(240&o)&&n>t+6&&(i=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),128===(192&i)&&128===(192&s))?(u=o<<12&61440|i<<6&4032|63&s,l+=2048>u||u>=55296&&57343>=u?"���":String.fromCharCode(u),t+=6):240===(248&o)&&n>t+9&&(i=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),a=parseInt(e.slice(t+10,t+12),16),128===(192&i)&&128===(192&s)&&128===(192&a))?(u=o<<18&1835008|i<<12&258048|s<<6&4032|63&a,65536>u||u>1114111?l+="����":(u-=65536,l+=String.fromCharCode(55296+(u>>10),56320+(1023&u))),t+=9):l+="�";return l})}var i={};o.defaultChars=";/?:@&=+$,#",o.componentChars="",t.exports=o},{}],116:[function(e,t,r){"use strict";function n(e){var t,r,n=i[e];if(n)return n;for(n=i[e]=[],t=0;128>t;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}function o(e,t,r){var i,s,a,u,l,c="";for("string"!=typeof t&&(r=t,t=o.defaultChars),"undefined"==typeof r&&(r=!0),l=n(t),i=0,s=e.length;s>i;i++)if(a=e.charCodeAt(i),r&&37===a&&s>i+2&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3)))c+=e.slice(i,i+3),i+=2;else if(128>a)c+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&s>i+1&&(u=e.charCodeAt(i+1),u>=56320&&57343>=u)){c+=encodeURIComponent(e[i]+e[i+1]),i++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[i]);return c}var i={};o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",t.exports=o},{}],117:[function(e,t,r){"use strict";t.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",t+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},{}],118:[function(e,t,r){"use strict";t.exports.encode=e("./encode"),t.exports.decode=e("./decode"),t.exports.format=e("./format"),t.exports.parse=e("./parse")},{"./decode":115,"./encode":116,"./format":117,"./parse":119}],119:[function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function o(e,t){if(e&&e instanceof n)return e;var r=new n;return r.parse(e,t),r}var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["<",">",'"',"`"," ","\r","\n","   "],l=["{","}","|","\\","^","`"].concat(u),c=["'"].concat(l),f=["%","/","?",";","#"].concat(c),p=["/","?","#"],h=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,t){var r,n,o,s,u,l=e;if(l=l.trim(),!t&&1===e.split("#").length){var c=a.exec(l);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var y=i.exec(l);if(y&&(y=y[0],o=y.toLowerCase(),this.protocol=y,l=l.substr(y.length)),(t||y||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(u="//"===l.substr(0,2),!u||y&&g[y]||(l=l.substr(2),this.slashes=!0)),!g[y]&&(u||y&&!v[y])){var k=-1;for(r=0;r<p.length;r++)s=l.indexOf(p[r]),-1!==s&&(-1===k||k>s)&&(k=s);var b,w;for(w=-1===k?l.lastIndexOf("@"):l.lastIndexOf("@",k),-1!==w&&(b=l.slice(0,w),l=l.slice(w+1),this.auth=b),k=-1,r=0;r<f.length;r++)s=l.indexOf(f[r]),-1!==s&&(-1===k||k>s)&&(k=s);-1===k&&(k=l.length),":"===l[k-1]&&k--;var _=l.slice(0,k);l=l.slice(k),this.parseHost(_),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var C=this.hostname.split(/\./);for(r=0,n=C.length;n>r;r++){var M=C[r];if(M&&!M.match(d)){for(var S="",A=0,O=M.length;O>A;A++)S+=M.charCodeAt(A)>127?"x":M[A];if(!S.match(d)){var P=C.slice(0,r),T=C.slice(r+1),E=M.match(m);E&&(P.push(E[1]),T.unshift(E[2])),T.length&&(l=T.join(".")+l),this.hostname=P.join(".");break}}}}this.hostname.length>h&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=l.indexOf("#");-1!==D&&(this.hash=l.substr(D),l=l.slice(0,D));var j=l.indexOf("?");return-1!==j&&(this.search=l.substr(j),l=l.slice(0,j)),l&&(this.pathname=l),v[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var t=s.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.exports=o},{}],120:[function(e,t,r){t.exports=/[\0-\x1F\x7F-\x9F]/},{}],121:[function(e,t,r){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],122:[function(e,t,r){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/},{}],123:[function(e,t,r){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],124:[function(e,t,r){t.exports.Any=e("./properties/Any/regex"),t.exports.Cc=e("./categories/Cc/regex"),t.exports.Cf=e("./categories/Cf/regex"),t.exports.P=e("./categories/P/regex"),t.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":120,"./categories/Cf/regex":121,"./categories/P/regex":122,"./categories/Z/regex":123,"./properties/Any/regex":125}],125:[function(e,t,r){t.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}]},{},[1]);
\ No newline at end of file