text: webpackJsonp([0],{445:function(e,t,n){var r=n(163)(n(483),n(947),null,null);e.exports=r.exports},450:function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function i(e,t,n,i){var o=r(e,t,n,i);return o.setAttribute("role","presentation"),o}function o(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function a(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function l(t,n){var r=t.className;e(n).test(r)||(t.className+=(r?" ":"")+n)}function s(t,n){for(var r=t.split(" "),i=0;i<r.length;i++)r[i]&&!e(r[i]).test(n)&&(n+=" "+r[i]);return n}function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function u(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function d(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}function f(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function h(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function p(e){for(;Xa.length<=e;)Xa.push(m(Xa)+" ");return Xa[e]}function m(e){return e[e.length-1]}function g(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function v(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function x(){}function b(e,t){var n;return Object.create?n=Object.create(e):(x.prototype=e,n=new x),t&&u(t,n),n}function y(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ka.test(e))}function k(e,t){return t?!!(t.source.indexOf("\\w")>-1&&y(e))||t.test(e):y(e)}function w(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function C(e){return e.charCodeAt(0)>=768&&Za.test(e)}function S(e,t,n){for(;(n<0?t>0:t<e.length)&&C(e.charAt(t));)t+=n;return t}function M(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function T(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}function L(e,t,n){var r;Ya=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Ya=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Ya=i)}return null!=r?r:Ya}function A(e,t){var n=e.order;return null==n&&(n=e.order=Qa(e.text,t)),n}function N(e,t){return e._handlers&&e._handlers[t]||Ja}function D(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=f(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function F(e,t){var n=N(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function E(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),F(e,n||t.type,e,t),H(t)||t.codemirrorIgnore}function O(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==f(n,t[r])&&n.push(t[r])}function z(e,t){return N(e,t).length>0}function I(e){e.prototype.on=function(e,t){el(this,e,t)},e.prototype.off=function(e,t){D(this,e,t)}}function _(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function R(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function H(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function P(e){_(e),R(e)}function W(e){return e.target||e.srcElement}function B(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Fa&&e.ctrlKey&&1==t&&(t=3),t}function j(e){if(null==Ba){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ba=t.offsetWidth<=1&&t.offsetHeight>2&&!(ba&&ya<8))}var i=Ba?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function q(e){if(null!=ja)return ja;var r=n(e,document.createTextNode("AخA")),i=Ia(r,0,1).getBoundingClientRect(),o=Ia(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(ja=o.right-i.right<3)}function $(e){if(null!=ol)return ol;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=Ia(t,0,1).getBoundingClientRect();return ol=Math.abs(i.left-o.left)>1}function U(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),al[e]=t}function G(e,t){ll[e]=t}function V(e){if("string"==typeof e&&ll.hasOwnProperty(e))e=ll[e];else if(e&&"string"==typeof e.name&&ll.hasOwnProperty(e.name)){var t=ll[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return V("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return V("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function X(e,t){t=V(t);var n=al[t.name];if(!n)return X(e,"text/plain");var r=n(e,t);if(sl.hasOwnProperty(t.name)){var i=sl[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function K(e,t){u(t,sl.hasOwnProperty(e)?sl[e]:sl[e]={})}function Z(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Y(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Q(e,t,n){return!e.startState||e.startState(t,n)}function J(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function ee(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function te(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ne(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function re(e){if(null==e.parent)return null;for(var t=e.parent,n=f(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ie(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return n+a}function oe(e,t){return t>=e.first&&t<e.first+e.size}function ae(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function le(e,t,n){if(void 0===n&&(n=null),!(this instanceof le))return new le(e,t,n);this.line=e,this.ch=t,this.sticky=n}function se(e,t){return e.line-t.line||e.ch-t.ch}function ce(e,t){return e.sticky==t.sticky&&0==se(e,t)}function ue(e){return le(e.line,e.ch)}function de(e,t){return se(e,t)<0?t:e}function fe(e,t){return se(e,t)<0?e:t}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pe(e,t){if(t.line<e.first)return le(e.first,0);var n=e.first+e.size-1;return t.line>n?le(n,J(e,n).text.length):me(t,J(e,t.line).text.length)}function me(e,t){var n=e.ch;return null==n||n>t?le(e.line,t):n<0?le(e.line,0):e}function ge(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=pe(e,t[r]);return n}function ve(e,t,n,r){var i=[e.state.modeGen],o={};Me(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,l=0;l<e.state.overlays.length;++l)!function(r){n.baseTokens=i;var l=e.state.overlays[r],s=1,c=0;n.state=!0,Me(e,t.text,l.mode,n,function(e,t){for(var n=s;c<e;){var r=i[s];r>e&&i.splice(s,1,e,i[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}},o),n.state=a,n.baseTokens=null,n.baseTokenPos=1}(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function xe(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=be(e,re(t)),i=t.text.length>e.options.maxHighlightLength&&Z(e.doc.mode,r.state),o=ve(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function be(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new dl(r,!0,t);var o=Te(e,t,n),a=o>r.first&&J(r,o-1).stateAfter,l=a?dl.fromSaved(r,a,o):new dl(r,Q(r.mode),o);return r.iter(o,t,function(n){ye(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function ye(e,t,n,r){var i=e.doc.mode,o=new cl(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&ke(i,n.state);!o.eol();)we(i,o,n.state),o.start=o.pos}function ke(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Y(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function we(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Y(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Ce(e,t,n,r){var i,o=e.doc,a=o.mode;t=pe(o,t);var l,s=J(o,t.line),c=be(e,t.line,n),u=new cl(s.text,e.options.tabSize,c);for(r&&(l=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=we(a,u,c.state),r&&l.push(new fl(u,i,Z(o.mode,c.state)));return r?l:new fl(u,i,c.state)}function Se(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Me(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new cl(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Se(ke(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&ye(e,t,r,d.pos),d.pos=t.length,s=null):s=Se(we(n,d,r.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)c=Math.min(d.start,c+5e3),i(c,u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Te(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=J(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof ul?c.lookAhead:0)<=o.modeFrontier))return l;var u=d(s.text,null,e.options.tabSize);(null==i||r>u)&&(i=l-1,r=u)}return i}function Le(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=J(e,r).stateAfter;if(i&&(!(i instanceof ul)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}function Ae(){hl=!0}function Ne(){pl=!0}function De(e,t,n){this.marker=e,this.from=t,this.to=n}function Fe(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ee(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Oe(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ze(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new De(a,o.from,s?null:o.to))}}return r}function Ie(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new De(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}function _e(e,t){if(t.full)return null;var n=oe(e,t.from.line)&&J(e,t.from.line).markedSpans,r=oe(e,t.to.line)&&J(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==se(t.from,t.to),l=ze(n,i,a),s=Ie(r,o,a),c=1==t.text.length,u=m(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=Fe(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];if(null!=g.to&&(g.to+=u),null==g.from){var v=Fe(l,g.marker);v||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=Re(l)),s&&s!=l&&(s=Re(s));var x=[l];if(!c){var b,y=t.text.length-2;if(y>0&&l)for(var k=0;k<l.length;++k)null==l[k].to&&(b||(b=[])).push(new De(l[k].marker,null,null));for(var w=0;w<y;++w)x.push(b);x.push(s)}return x}function Re(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function He(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=f(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(se(c.to,l.from)<0||se(c.from,l.to)>0)){var u=[s,1],d=se(c.from,l.from),h=se(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}function Pe(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function We(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Be(e){return e.inclusiveLeft?-1:0}function je(e){return e.inclusiveRight?1:0}function qe(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=se(r.from,i.from)||Be(e)-Be(t);if(o)return-o;var a=se(r.to,i.to)||je(e)-je(t);return a||t.id-e.id}function $e(e,t){var n,r=pl&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||qe(n,i.marker)<0)&&(n=i.marker);return n}function Ue(e){return $e(e,!0)}function Ge(e){return $e(e,!1)}function Ve(e,t){var n,r=pl&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||qe(n,o.marker)<0)&&(n=o.marker)}return n}function Xe(e,t,n,r,i){var o=J(e,t),a=pl&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=se(c.from,n)||Be(s.marker)-Be(i),d=se(c.to,r)||je(s.marker)-je(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?se(c.to,n)>=0:se(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?se(c.from,r)<=0:se(c.from,r)<0)))return!0}}}function Ke(e){for(var t;t=Ue(e);)e=t.find(-1,!0).line;return e}function Ze(e){for(var t;t=Ge(e);)e=t.find(1,!0).line;return e}function Ye(e){for(var t,n;t=Ge(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Qe(e,t){var n=J(e,t),r=Ke(n);return n==r?t:re(r)}function Je(e,t){if(t>e.lastLine())return t;var n,r=J(e,t);if(!et(e,r))return t;for(;n=Ge(r);)r=n.find(1,!0).line;return re(r)+1}function et(e,t){var n=pl&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&tt(e,t,r))return!0}}function tt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return tt(e,r.line,Fe(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&tt(e,t,i))return!0}function nt(e){e=Ke(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function rt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Ue(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Ge(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,r=o.to.line,n+=r.text.length-o.to.ch}return n}function it(e){var t=e.display,n=e.doc;t.maxLine=J(n,n.first),t.maxLineLength=rt(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=rt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function ot(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Pe(e),We(e,n);var i=r?r(e):1;i!=e.height&&ne(e,i)}function at(e){e.parent=null,Pe(e)}function lt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?xl:vl;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function st(e,t){var n=i("span",null,null,ka?"padding-right: .1px":null),r={pre:i("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,l=void 0;r.pos=0,r.addToken=ut,q(e.display.measure)&&(l=A(a,e.doc.direction))&&(r.addToken=ft(r.addToken,l)),r.map=[];pt(a,r,xe(e,a,t!=e.display.externalMeasured&&re(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=s(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=s(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(j(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ka){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return F(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=s(r.pre.className,r.textClass||"")),r}function ct(e){var t=r("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ut(e,t,n,i,o,a,l){if(t){var s,c=e.splitSpaces?dt(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){s=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var h=u.exec(t),m=h?h.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));ba&&ya<9?s.appendChild(r("span",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;f+=m+1;var v=void 0;if("\t"==h[0]){var x=e.cm.options.tabSize,b=x-e.col%x;v=s.appendChild(r("span",p(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?(v=s.appendChild(r("span","\r"==h[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",h[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(h[0]),v.setAttribute("cm-text",h[0]),ba&&ya<9?s.appendChild(r("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),ba&&ya<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||i||o||d||a||l){var y=n||"";i&&(y+=i),o&&(y+=o);var k=r("span",[s],y,a);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,l[w]);return e.content.appendChild(k)}e.content.appendChild(s)}}function dt(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function ft(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>c&&d.from<=c));f++);if(d.to>=u)return e(n,r,i,o,a,l,s);e(n,r.slice(0,d.to-c),i,o,null,l,s),o=null,r=r.slice(d.to-c),c=d.to}}}function ht(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function pt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=l="",f=null,d=null,v=1/0;for(var x=[],b=void 0,y=0;y<r.length;++y){var k=r[y],w=k.marker;if("bookmark"==w.type&&k.from==p&&w.widgetNode)x.push(w);else if(k.from<=p&&(null==k.to||k.to>p||w.collapsed&&k.to==p&&k.from==p)){if(null!=k.to&&k.to!=p&&v>k.to&&(v=k.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&k.from==p&&(u+=" "+w.startStyle),w.endStyle&&k.to==v&&(b||(b=[])).push(w.endStyle,k.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var C in w.attributes)(f||(f={}))[C]=w.attributes[C];w.collapsed&&(!d||qe(d.marker,w)<0)&&(d=k)}else k.from>p&&v>k.from&&(v=k.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=" "+b[S]);if(!d||d.from==p)for(var M=0;M<x.length;++M)ht(t,0,x[M]);if(d&&(d.from||0)==p){if(ht(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;for(var T=Math.min(h,v);;){if(g){var L=p+g.length;if(!d){var A=L>T?g.slice(0,T-p):g;t.addToken(t,A,a?a+s:s,u,p+A.length==v?c:"",l,f)}if(L>=T){g=g.slice(T-p),p=T;break}p=L,u=""}g=i.slice(o,o=n[m++]),a=lt(n[m++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,i.slice(o,o=n[N]),lt(n[N+1],t.cm.options))}function mt(e,t,n){this.line=t,this.rest=Ye(t),this.size=this.rest?re(m(this.rest))-n+1:1,this.node=this.text=null,this.hidden=et(e,t)}function gt(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new mt(e.doc,J(e.doc,o),o);r=o+a.size,i.push(a)}return i}function vt(e){bl?bl.ops.push(e):e.ownsGroup=bl={ops:[e],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function bt(e,t){var n=e.ownsGroup;if(n)try{xt(n)}finally{bl=null,t(n)}}function yt(e,t){var n=N(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);bl?r=bl.delayedCallbacks:yl?r=yl:(r=yl=[],setTimeout(kt,0));for(var o=0;o<n.length;++o)!function(e){r.push(function(){return n[e].apply(null,i)})}(o)}}function kt(){var e=yl;yl=null;for(var t=0;t<e.length;++t)e[t]()}function wt(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Tt(e,t):"gutter"==o?At(e,t,n,r):"class"==o?Lt(e,t):"widget"==o&&Nt(e,t,r)}t.changes=null}function Ct(e){return e.node==e.text&&(e.node=r("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),ba&&ya<8&&(e.node.style.zIndex=2)),e.node}function St(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=Ct(t);t.background=i.insertBefore(r("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}function Mt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):st(e,t)}function Tt(e,t){var n=t.text.className,r=Mt(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Lt(e,t)):n&&(t.text.className=n)}function Lt(e,t){St(e,t),t.line.wrapClass?Ct(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function At(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Ct(t);t.gutterBackground=r("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=Ct(t),s=t.gutter=r("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(r("div",ae(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var u=e.display.gutterSpecs[c].className,d=a.hasOwnProperty(u)&&a[u];d&&s.appendChild(r("div",[d],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function Nt(t,n,r){n.alignable&&(n.alignable=null);for(var i=e("CodeMirror-linewidget"),o=n.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,i.test(o.className)&&n.node.removeChild(o);Ft(t,n,r)}function Dt(e,t,n,r){var i=Mt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Lt(e,t),At(e,t,n,r),Ft(e,t,r),t.node}function Ft(e,t,n){if(Et(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Et(e,t.rest[r],t,n,!1)}function Et(e,t,n,i,o){if(t.widgets)for(var a=Ct(n),l=0,s=t.widgets;l<s.length;++l){var c=s[l],u=r("div",[c.node],"CodeMirror-linewidget"+(c.className?" "+c.className:""));c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Ot(c,u,n,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,n.gutter||n.text):a.appendChild(u),yt(c,"redraw")}}function Ot(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function zt(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,r("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function It(e,t){for(var n=W(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function _t(e){return e.lineSpace.offsetTop}function Rt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ht(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,r("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Pt(e){return qa-e.display.nativeBarWidth}function Wt(e){return e.display.scroller.clientWidth-Pt(e)-e.display.barWidth}function Bt(e){return e.display.scroller.clientHeight-Pt(e)-e.display.barHeight}function jt(e,t,n){var r=e.options.lineWrapping,i=r&&Wt(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function qt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(re(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function $t(e,t){t=Ke(t);var r=re(t),i=e.display.externalMeasured=new mt(e.doc,t,r);i.lineN=r;var o=i.built=st(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function Ut(e,t,n,r){return Xt(e,Vt(e,t),n,r)}function Gt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Tn(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Vt(e,t){var n=re(t),r=Gt(e,n);r&&!r.text?r=null:r&&r.changes&&(wt(e,r,n,kn(e)),e.curOp.forceUpdate=!0),r||(r=$t(e,t));var i=qt(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Xt(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(jt(e,t.view,t.rect),t.hasHeights=!0),o=Yt(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Kt(e,t,n){for(var r,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),null!=i){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Zt(e,t){var n=kl;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Yt(e,t,n,r){var i,o=Kt(t.map,n,r),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&C(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&C(t.line.text.charAt(o.coverStart+s));)++s;if(i=ba&&ya<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Zt(Ia(a,l,s).getClientRects(),r),i.left||i.right||0==l)break;s=l,l-=1,c="right"}ba&&ya<11&&(i=Qt(e.display.measure,i))}else{l>0&&(c=r="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(ba&&ya<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+yn(e.display),top:f.top,bottom:f.bottom}:kl}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var x=v?g[v-1]:0,b=g[v],y={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:x,bottom:b};return i.left||i.right||(y.bogus=!0),e.options.singleCursorHeightPerLine||(y.rtop=h,y.rbottom=p),y}function Qt(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!$(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function Jt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function en(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)Jt(e.display.view[n])}function tn(e){en(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function nn(){return Ca&&Na?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function rn(){return Ca&&Na?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function on(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=zt(e.widgets[n]));return t}function an(e,t,n,r,i){if(!i){var o=on(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=nt(t);if("local"==r?a+=_t(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:rn());var s=l.left+("window"==r?0:nn());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function ln(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=nn(),i-=rn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function sn(e,t,n,r,i){return r||(r=J(e.doc,t.line)),an(e,r,Ut(e,r,t.ch,i),n)}function cn(e,t,n,r,i,o){function a(t,a){var l=Xt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,an(e,r,l,n)}function l(e,t,n){var r=s[t],i=1==r.level;return a(n?e-1:e,i!=n)}r=r||J(e.doc,t.line),i||(i=Vt(e,r));var s=A(r,e.doc.direction),c=t.ch,u=t.sticky;if(c>=r.text.length?(c=r.text.length,u="before"):c<=0&&(c=0,u="after"),!s)return a("before"==u?c-1:c,"before"==u);var d=L(s,c,u),f=Ya,h=l(c,d,"before"==u);return null!=f&&(h.other=l(c,f,"before"!=u)),h}function un(e,t){var n=0;t=pe(e.doc,t),e.options.lineWrapping||(n=yn(e.display)*t.ch);var r=J(e.doc,t.line),i=nt(r)+_t(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function dn(e,t,n,r,i){var o=le(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function fn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return dn(r.first,0,null,-1,-1);var i=ie(r,n),o=r.first+r.size-1;if(i>o)return dn(r.first+r.size-1,J(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=J(r,i);;){var l=gn(e,a,i,t,n),s=Ve(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=J(r,i=c.line)}}function hn(e,t,n,r){r-=on(t);var i=t.text.length,o=M(function(t){return Xt(e,n,t-1).bottom<=r},i,0);return i=M(function(t){return Xt(e,n,t).top>r},o,i),{begin:o,end:i}}function pn(e,t,n,r){return n||(n=Vt(e,t)),hn(e,t,n,an(e,t,Xt(e,n,r),"line").top)}function mn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function gn(e,t,n,r,i){i-=nt(t);var o=Vt(e,t),a=on(t),l=0,s=t.text.length,c=!0,u=A(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?xn:vn)(e,t,n,o,u,r,i);c=1!=d.level,l=c?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=M(function(t){var n=Xt(e,o,t);return n.top+=a,n.bottom+=a,!!mn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)},l,s),v=!1;if(m){var x=r-m.left<m.right-r,b=x==c;g=p+(b?0:1),h=b?"after":"before",f=x?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==t.text.length?"before":Xt(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var y=cn(e,le(n,g,h),"line",t,o);f=y.left,v=i<y.top?-1:i>=y.bottom?1:0}return g=S(t.text,g,1),dn(n,g,h,v,r-f)}function vn(e,t,n,r,i,o,a){var l=M(function(l){var s=i[l],c=1!=s.level;return mn(cn(e,le(n,c?s.to:s.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=cn(e,le(n,c?s.from:s.to,c?"after":"before"),"line",t,r);mn(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s}function xn(e,t,n,r,i,o,a){var l=hn(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=Xt(e,r,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||d>g)&&(u=h,d=g)}}return u||(u=i[i.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function bn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==gl){gl=r("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)gl.appendChild(document.createTextNode("x")),gl.appendChild(r("br"));gl.appendChild(document.createTextNode("x"))}n(e.measure,gl);var o=gl.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function yn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t],"CodeMirror-line-like");n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function kn(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cn(e){var t=bn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/yn(e.display)-3);return function(i){if(et(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Sn(e){var t=e.doc,n=Cn(e);t.iter(function(e){var t=n(e);t!=e.height&&ne(e,t)})}function Mn(e,t,n,r){var i=e.display;if(!n&&"true"==W(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=fn(e,o,a);if(r&&c.xRel>0&&(s=J(e.doc,c.line).text).length==c.ch){var u=d(s,s.length,e.options.tabSize)-s.length;c=le(c.line,Math.max(0,Math.round((o-Ht(e.display).left)/yn(e.display))-u))}return c}function Tn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Ln(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)pl&&Qe(e.doc,t)<i.viewTo&&Nn(e);else if(n<=i.viewFrom)pl&&Je(e.doc,n+r)>i.viewFrom?Nn(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Nn(e);else if(t<=i.viewFrom){var o=Dn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Nn(e)}else if(n>=i.viewTo){var a=Dn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Nn(e)}else{var l=Dn(e,t,t,-1),s=Dn(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(gt(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Nn(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function An(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Tn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,n)&&a.push(n)}}}function Nn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Dn(e,t,n,r){var i,o=Tn(e,t),a=e.display.view;if(!pl||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Qe(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Fn(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=gt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=gt(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Tn(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(gt(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Tn(e,n)))),r.viewTo=n}function En(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function On(e){e.display.input.showSelection(e.display.input.prepareSelection())}function zn(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&In(e,l.head,i),s||Rn(e,l,o)}}return r}function In(e,t,n){var i=cn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(r("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var a=n.appendChild(r("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function _n(e,t){return e.top-t.top||e.left-t.left}function Rn(e,t,n){function i(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(r("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?d-e:n)+"px;\n                             height: "+(i-t)+"px"))}function o(t,n,r){function o(n,r){return sn(e,le(t,n),"div",h,r)}function a(t,n,r){var i=pn(e,h,null,t),a="ltr"==n==("after"==r)?"left":"right";return o("after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),a)[a]}var s,c,h=J(l,t),p=h.text.length,m=A(h,l.direction);return T(m,n||0,null==r?p:r,function(e,t,l,h){var g="ltr"==l,v=o(e,g?"left":"right"),x=o(t-1,g?"right":"left"),b=null==n&&0==e,y=null==r&&t==p,k=0==h,w=!m||h==m.length-1;if(x.top-v.top<=3){var C=(f?b:y)&&k,S=(f?y:b)&&w,M=C?u:(g?v:x).left,T=S?d:(g?x:v).right;i(M,v.top,T-M,v.bottom)}else{var L,A,N,D;g?(L=f&&b&&k?u:v.left,A=f?d:a(e,l,"before"),N=f?u:a(t,l,"after"),D=f&&y&&w?d:x.right):(L=f?a(e,l,"before"):u,A=!f&&b&&k?d:v.right,N=!f&&y&&w?u:x.left,D=f?a(t,l,"after"):d),i(L,v.top,A-L,v.bottom),v.bottom<x.top&&i(u,v.bottom,null,x.top),i(N,x.top,D-N,x.bottom)}(!s||_n(v,s)<0)&&(s=v),_n(x,s)<0&&(s=x),(!c||_n(v,c)<0)&&(c=v),_n(x,c)<0&&(c=x)}),{start:s,end:c}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=Ht(e.display),u=c.left,d=Math.max(a.sizerWidth,Wt(e)-a.sizer.offsetLeft)-c.right,f="ltr"==l.direction,h=t.from(),p=t.to();if(h.line==p.line)o(h.line,h.ch,p.ch);else{var m=J(l,h.line),g=J(l,p.line),v=Ke(m)==Ke(g),x=o(h.line,h.ch,v?m.text.length+1:null).end,b=o(p.line,v?0:null,p.ch).start;v&&(x.top<b.top-2?(i(x.right,x.top,null,x.bottom),i(u,b.top,b.left,b.bottom)):i(x.right,x.top,b.left-x.right,x.bottom)),x.bottom<b.top&&i(u,x.bottom,null,b.top)}n.appendChild(s)}function Hn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||jn(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Pn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Bn(e))}function Wn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&jn(e))},100)}function Bn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(F(e,"focus",e,t),e.state.focused=!0,l(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ka&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Hn(e))}function jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(F(e,"blur",e,t),e.state.focused=!1,Ha(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function qn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(ba&&ya<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-n,n=s}else{var c=i.node.getBoundingClientRect();a=c.bottom-c.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-c.left-1)}var u=i.line.height-a;if((u>.005||u<-.005)&&(ne(i.line,a),$n(i.line),i.rest))for(var d=0;d<i.rest.length;d++)$n(i.rest[d]);if(l>e.display.sizerWidth){var f=Math.ceil(l/yn(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function $n(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Un(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-_t(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ie(t,r),a=ie(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=ie(t,nt(J(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ie(t,nt(J(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Gn(e,t){if(!E(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!La){var a=r("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-_t(e.display))+"px;\n                         height: "+(t.bottom-t.top+Pt(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Vn(e,t,n,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=n||(t=t.ch?le(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?le(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=cn(e,t),s=n&&n!=t?cn(e,n):l;i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r};var c=Kn(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(nr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(ir(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function Xn(e,t){var n=Kn(e,t);null!=n.scrollTop&&nr(e,n.scrollTop),null!=n.scrollLeft&&ir(e,n.scrollLeft)}function Kn(e,t){var n=e.display,r=bn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Bt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Rt(n),s=t.top<r,c=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,h=Wt(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function Zn(e,t){null!=t&&(er(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Yn(e){er(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Qn(e,t,n){null==t&&null==n||er(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Jn(e,t){er(e),e.curOp.scrollToPos=t}function er(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;tr(e,un(e,t.from),un(e,t.to),t.margin)}}function tr(e,t,n,r){var i=Kn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Qn(e,i.scrollLeft,i.scrollTop)}function nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(ma||Ar(e,{top:t}),rr(e,t,!0),ma&&Ar(e),kr(e,100))}function rr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ir(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Er(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function or(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Rt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Pt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function ar(e,t){t||(t=or(e));var n=e.display.barWidth,r=e.display.barHeight;lr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&qn(e),lr(e,or(e)),n=e.display.barWidth,r=e.display.barHeight}function lr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function sr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ha(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Sl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),el(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?ir(e,t):nr(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function cr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ml},vt(e.curOp)}function ur(e){var t=e.curOp;t&&bt(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;dr(e)})}function dr(e){for(var t=e.ops,n=0;n<t.length;n++)fr(t[n]);for(var r=0;r<t.length;r++)hr(t[r]);for(var i=0;i<t.length;i++)pr(t[i]);for(var o=0;o<t.length;o++)mr(t[o]);for(var a=0;a<t.length;a++)gr(t[a])}function fr(e){var t=e.cm,n=t.display;Cr(t),e.updateMaxLine&&it(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Tl(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function hr(e){e.updatedDisplay=e.mustUpdate&&Tr(e.cm,e.update)}function pr(e){var t=e.cm,n=t.display;e.updatedDisplay&&qn(t),e.barMeasure=or(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ut(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Pt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Wt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function mr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&ar(t,e.barMeasure),e.updatedDisplay&&Fr(t,e.barMeasure),e.selectionChanged&&Hn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Pn(e.cm)}function gr(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Lr(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&rr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&ir(t,e.scrollLeft,!0,!0),e.scrollToPos){Gn(t,Vn(t,pe(r,e.scrollToPos.from),pe(r,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||F(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&F(o[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&F(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function vr(e,t){if(e.curOp)return t();cr(e);try{return t()}finally{ur(e)}}function xr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);cr(e);try{return t.apply(e,arguments)}finally{ur(e)}}}function br(e){return function(){if(this.curOp)return e.apply(this,arguments);cr(this);try{return e.apply(this,arguments)}finally{ur(this)}}}function yr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);cr(t);try{return e.apply(this,arguments)}finally{ur(t)}}}function kr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(wr,e))}function wr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=be(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Z(t.mode,r.state):null,s=ve(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ye(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return kr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&vr(e,function(){for(var t=0;t<i.length;t++)An(e,i[t],"text")})}}function Cr(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Pt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Pt(e)+"px",t.scrollbarsClipped=!0)}function Sr(e){if(e.hasFocus())return null;var t=a();if(!t||!o(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&o(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Mr(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&o(document.body,e.anchorNode)&&o(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Tr(e,n){var r=e.display,i=e.doc;if(n.editorIsHidden)return Nn(e),!1;if(!n.force&&n.visible.from>=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==En(e))return!1;Or(e)&&(Nn(e),n.dims=kn(e));var o=i.first+i.size,a=Math.max(n.visible.from-e.options.viewportMargin,i.first),l=Math.min(o,n.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(i.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(o,r.viewTo)),pl&&(a=Qe(e.doc,a),l=Je(e.doc,l));var s=a!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;Fn(e,a,l),r.viewOffset=nt(J(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=En(e);if(!s&&0==c&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Sr(e);return c>4&&(r.lineDiv.style.display="none"),Nr(e,r.updateLineNumbers,n.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Mr(u),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,kr(e,400)),r.updateLineNumbers=null,!0}function Lr(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Wt(e))r&&(t.visible=Un(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Rt(e.display)-Bt(e),n.top)}),t.visible=Un(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Tr(e,t))break;qn(e);var i=or(e);On(e),ar(e,i),Fr(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ar(e,t){var n=new Tl(e,t);if(Tr(e,n)){qn(e),Lr(e,n);var r=or(e);On(e),ar(e,r),Fr(e,r),n.finish()}}function Nr(e,n,r){function i(t){var n=t.nextSibling;return ka&&Fa&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild,c=o.view,u=o.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==l){for(;s!=h.node;)s=i(s);var p=a&&null!=n&&n<=u&&h.lineNumber;h.changes&&(f(h.changes,"gutter")>-1&&(p=!1),wt(e,h,u,r)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(ae(e.options,u)))),s=h.node.nextSibling}else{var m=Dt(e,h,u,r);l.insertBefore(m,s)}u+=h.size}for(;s;)s=i(s)}function Dr(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Fr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Pt(e)+"px"}function Er(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Or(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ae(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var o=i.measure.appendChild(r("div",[r("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Dr(e.display),!0}return!1}function zr(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ir(e){var n=e.gutters,i=e.gutterSpecs;t(n),e.lineGutter=null;for(var o=0;o<i.length;++o){var a=i[o],l=a.className,s=a.style,c=n.appendChild(r("div",null,"CodeMirror-gutter "+l));s&&(c.style.cssText=s),"CodeMirror-linenumbers"==l&&(e.lineGutter=c,c.style.width=(e.lineNumWidth||1)+"px")}n.style.display=i.length?"":"none",Dr(e)}function _r(e){Ir(e.display),Ln(e),Er(e)}function Rr(e,t,n,o){var a=this;this.input=n,a.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=i("div",null,"CodeMirror-code"),a.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=r("div",null,"CodeMirror-cursors"),a.measure=r("div",null,"CodeMirror-measure"),a.lineMeasure=r("div",null,"CodeMirror-measure"),a.lineSpace=i("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var l=i("div",[a.lineSpace],"CodeMirror-lines");a.mover=r("div",[l],null,"position: relative"),a.sizer=r("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=r("div",null,null,"position: absolute; height: "+qa+"px; width: 1px;"),a.gutters=r("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=r("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=r("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),ba&&ya<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),ka||ma&&Da||(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=zr(o.gutters,o.lineNumbers),Ir(a),n.init(a)}function Hr(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Pr(e){var t=Hr(e);return t.x*=Al,t.y*=Al,t}function Wr(e,t){var n=Hr(t),r=n.x,i=n.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&Fa&&ka)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(r&&!ma&&!Sa&&null!=Al)return i&&s&&nr(e,Math.max(0,a.scrollTop+i*Al)),ir(e,Math.max(0,a.scrollLeft+r*Al)),(!i||i&&s)&&_(t),void(o.wheelStartX=null);if(i&&null!=Al){var f=i*Al,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),Ar(e,{top:h,bottom:p})}Ll<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Al=(Al*Ll+n)/(Ll+1),++Ll)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function Br(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return se(e.from(),t.from())}),n=f(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=se(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var c=fe(l.from(),a.from()),u=de(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Dl(d?u:c,d?c:u))}}return new Nl(t,n)}function jr(e,t){return new Nl([new Dl(e,t||e)],0)}function qr(e){return e.text?le(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function $r(e,t){if(se(e,t.from)<0)return e;if(se(e,t.to)<=0)return qr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=qr(t).ch-t.to.ch),le(n,r)}function Ur(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Dl($r(i.anchor,t),$r(i.head,t)))}return Br(e.cm,n,e.sel.primIndex)}function Gr(e,t,n){return e.line==t.line?le(n.line,e.ch-t.ch+n.ch):le(n.line+(e.line-t.line),e.ch)}function Vr(e,t,n){for(var r=[],i=le(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Gr(l.from,i,o),c=Gr(qr(l),i,o);if(i=l.to,o=c,"around"==n){var u=e.sel.ranges[a],d=se(u.head,u.anchor)<0;r[a]=new Dl(d?c:s,d?s:c)}else r[a]=new Dl(s,s)}return new Nl(r,e.sel.primIndex)}function Xr(e){e.doc.mode=X(e.options,e.doc.modeOption),Kr(e)}function Kr(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,kr(e,100),e.state.modeGen++,e.curOp&&Ln(e)}function Zr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Yr(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){ot(e,n,i,r),yt(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new ml(c[o],i(o),r));return n}var l=t.from,s=t.to,c=t.text,u=J(e,l.line),d=J(e,s.line),f=m(c),h=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Zr(e,t)){var g=a(0,c.length-1);o(d,d.text,h),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var v=a(1,c.length-1);v.push(new ml(f+u.text.slice(s.ch),h,r)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var x=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,x)}yt(e,"change",e,t)}function Qr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;n&&!s||(t(l.doc,s),r(l.doc,e,s))}}}r(e,null,!0)}function Jr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Sn(e),Xr(e),ei(e),e.options.lineWrapping||it(e),e.options.mode=t.modeOption,Ln(e)}function ei(e){("rtl"==e.doc.direction?l:Ha)(e.display.lineDiv,"CodeMirror-rtl")}function ti(e){vr(e,function(){ei(e),Ln(e)})}function ni(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ri(e,t){var n={from:ue(t.from),to:qr(t),text:ee(e,t.from,t.to)};return ui(e,n,t.from.line,t.to.line+1),Qr(e,function(e){return ui(e,n,t.from.line,t.to.line+1)},!0),n}function ii(e){for(;e.length;){if(!m(e).ranges)break;e.pop()}}function oi(e,t){return t?(ii(e.done),m(e.done)):e.done.length&&!m(e.done).ranges?m(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}function ai(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=oi(i,i.lastOp==r)))a=m(o.changes),0==se(t.from,t.to)&&0==se(t.from,a.to)?a.to=qr(t):o.changes.push(ri(e,t));else{var s=m(i.done);for(s&&s.ranges||ci(e.sel,i.done),o={changes:[ri(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||F(e,"historyAdded")}function li(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||li(e,o,m(i.done),t))?i.done[i.done.length-1]=t:ci(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ii(i.undone)}function ci(e,t){var n=m(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function di(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function fi(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(di(n[i]));return r}function hi(e,t){var n=fi(e,t),r=_e(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function pi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Nl.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&f(t,Number(u[1]))>-1&&(m(l)[d]=c[d],delete c[d])}}}return r}function mi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=se(t,i)<0;o!=se(n,i)<0?(i=t,t=n):o!=se(t,n)<0&&(t=n)}return new Dl(i,t)}return new Dl(n||t,t)}function gi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Nl([mi(e.sel.primary(),t,n,i)],0),r)}function vi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=mi(e.sel.ranges[o],t[o],null,i);wi(e,Br(e.cm,r,e.sel.primIndex),n)}function xi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,wi(e,Br(e.cm,i,e.sel.primIndex),r)}function bi(e,t,n,r){wi(e,jr(t,n),r)}function yi(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Dl(pe(e,t[n].anchor),pe(e,t[n].head))},origin:n&&n.origin};return F(e,"beforeSelectionChange",e,r),e.cm&&F(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Br(e.cm,r.ranges,r.ranges.length-1):t}function ki(e,t,n){var r=e.history.done,i=m(r);i&&i.ranges?(r[r.length-1]=t,Ci(e,t,n)):wi(e,t,n)}function wi(e,t,n){Ci(e,t,n),si(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Ci(e,t,n){(z(e,"beforeSelectionChange")||e.cm&&z(e.cm,"beforeSelectionChange"))&&(t=yi(e,t,n)),Si(e,Ti(e,t,n&&n.bias||(se(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||Yn(e.cm)}function Si(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,O(e.cm)),yt(e,"cursorActivity",e))}function Mi(e){Si(e,Ti(e,e.sel,null,!1))}function Ti(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Ai(e,a.anchor,l&&l.anchor,n,r),c=Ai(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Dl(s,c))}return i?Br(e.cm,i,t.primIndex):t}function Li(e,t,n,r,i){var o=J(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(i&&(F(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=Ni(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=se(d,n))&&(r<0?f<0:f>0))return Li(e,d,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?c:u)&&(h=Ni(e,h,r,h.line==t.line?o:null)),h?Li(e,h,t,r,i):null}}return t}function Ai(e,t,n,r,i){var o=r||1,a=Li(e,t,n,o,i)||!i&&Li(e,t,n,o,!0)||Li(e,t,n,-o,i)||!i&&Li(e,t,n,-o,!0);return a||(e.cantEdit=!0,le(e.first,0))}function Ni(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?pe(e,le(t.line-1)):null:n>0&&t.ch==(r||J(e,t.line)).text.length?t.line<e.first+e.size-1?le(t.line+1,0):null:new le(t.line,t.ch+n)}function Di(e){e.setSelection(le(e.firstLine(),0),le(e.lastLine()),Ua)}function Fi(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=pe(e,t)),n&&(r.to=pe(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),F(e,"beforeChange",e,r),e.cm&&F(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Ei(e,t,n){if(e.cm){if(!e.cm.curOp)return xr(e.cm,Ei)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(z(e,"beforeChange")||e.cm&&z(e.cm,"beforeChange"))||(t=Fi(e,t,!0))){var r=hl&&!n&&He(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Oi(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Oi(e,t)}}function Oi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=se(t.from,t.to)){var n=Ur(e,t);ai(e,t,n,e.cm?e.cm.curOp.id:NaN),_i(e,t,n,_e(e,t));var r=[];Qr(e,function(e,n){n||-1!=f(r,e.history)||(Bi(e.history,t),r.push(e.history)),_i(e,t,null,_e(e,t))})}}function zi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,c=0;c<l.length&&(i=l[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(i=l.pop(),!i.ranges){if(r)return void l.push(i);break}if(ci(i,s),n&&!i.equals(e.sel))return void wi(e,i,{clearRedo:!1});a=i}var u=[];ci(a,s),s.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=z(e,"beforeChange")||e.cm&&z(e.cm,"beforeChange"),h=i.changes.length-1;h>=0;--h){var p=function(n){var r=i.changes[n];if(r.origin=t,d&&!Fi(e,r,!1))return l.length=0,{};u.push(ri(e,r));var o=n?Ur(e,r):m(l);_i(e,r,o,hi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:qr(r)});var a=[];Qr(e,function(e,t){t||-1!=f(a,e.history)||(Bi(e.history,r),a.push(e.history)),_i(e,r,null,hi(e,r))})}(h);if(p)return p.v}}}}function Ii(e,t){if(0!=t&&(e.first+=t,e.sel=new Nl(g(e.sel.ranges,function(e){return new Dl(le(e.anchor.line+t,e.anchor.ch),le(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Ln(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)An(e.cm,r,"gutter")}}function _i(e,t,n,r){if(e.cm&&!e.cm.curOp)return xr(e.cm,_i)(e,t,n,r);if(t.to.line<e.first)return void Ii(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ii(e,i),t={from:le(e.first,0),to:le(t.to.line+i,t.to.ch),text:[m(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:le(o,J(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ee(e,t.from,t.to),n||(n=Ur(e,t)),e.cm?Ri(e.cm,t,r):Yr(e,t,r),Ci(e,n,Ua),e.cantEdit&&Ai(e,le(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ri(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=re(Ke(J(r,o.line))),r.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&O(e),Yr(r,t,n,Cn(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=rt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Le(r,o.line),kr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Ln(e):o.line!=a.line||1!=t.text.length||Zr(e.doc,t)?Ln(e,o.line,a.line+1,c):An(e,o.line,"text");var u=z(e,"changes"),d=z(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&yt(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Hi(e,t,n,r,i){var o;r||(r=n),se(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Ei(e,{from:n,to:r,text:t,origin:i})}function Pi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Wi(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Pi(o.ranges[l].anchor,t,n,r),Pi(o.ranges[l].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=le(c.from.line+r,c.from.ch),c.to=le(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Bi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Wi(e.done,n,r,i),Wi(e.undone,n,r,i)}function ji(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=J(e,he(e,t)):i=re(t),null==i?null:(r(o,i)&&e.cm&&An(e.cm,i,n),o)}function qi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function $i(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}function Ui(e,t,n){nt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Zn(e,n)}function Gi(e,t,n,r){var i=new Fl(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ji(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!et(e,t)){var r=nt(t)<e.scrollTop;ne(t,t.height+zt(i)),r&&Zn(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&yt(o,"lineWidgetAdded",o,i,"number"==typeof t?t:re(t)),i}function Vi(e,t,n,r,o){if(r&&r.shared)return Xi(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return xr(e.cm,Vi)(e,t,n,r,o);var a=new Ol(e,o),l=se(t,n);if(r&&u(r,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Xe(e,t.line,t,n,a)||t.line!=n.line&&Xe(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ne()}a.addToHistory&&ai(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,c=t.line,d=e.cm;if(e.iter(c,n.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&Ke(e)==d.display.maxLine&&(s=!0),a.collapsed&&c!=t.line&&ne(e,0),Oe(e,new De(a,c==t.line?t.ch:null,c==n.line?n.ch:null)),++c}),a.collapsed&&e.iter(t.line,n.line+1,function(t){et(e,t)&&ne(t,0)}),a.clearOnEnter&&el(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Ae(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++El,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)Ln(d,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var f=t.line;f<=n.line;f++)An(d,f,"text");a.atomic&&Mi(d.doc),yt(d,"markerAdded",d,a)}return a}function Xi(e,t,n,r,i){r=u(r),r.shared=!1;var o=[Vi(e,t,n,r,i)],a=o[0],l=r.widgetNode;return Qr(e,function(e){l&&(r.widgetNode=l.cloneNode(!0)),o.push(Vi(e,pe(e,t),pe(e,n),r,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=m(o)}),new zl(o,a)}function Ki(e){return e.findMarks(le(e.first,0),e.clipPos(le(e.lastLine())),function(e){return e.parent})}function Zi(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(se(o,a)){var l=Vi(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Yi(e){for(var t=0;t<e.length;t++)!function(t){var n=e[t],r=[n.primary.doc];Qr(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==f(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}(t)}function Qi(e){var t=this;if(to(t),!E(t,e)&&!It(t.display,e)){_(e),ba&&(Rl=+new Date);var n=Mn(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&xr(t,function(){n=pe(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(o.filter(function(e){return null!=e}).join(t.doc.lineSeparator())),origin:"paste"};Ei(t.doc,e),ki(t.doc,jr(pe(t.doc,n),pe(t.doc,qr(e))))})()},s=0;s<r.length;s++)!function(e,n){if(t.options.allowDropFileTypes&&-1==f(t.options.allowDropFileTypes,e.type))return void l();var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e))return void l();o[n]=e,l()},r.readAsText(e)}(r[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),Ci(t.doc,jr(n,n)),u)for(var d=0;d<u.length;++d)Hi(t.doc,"",u[d].anchor,u[d].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ji(e,t){if(ba&&(!e.state.draggingText||+new Date-Rl<100))return void P(t);if(!E(e,t)&&!It(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ma)){var n=r("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Sa&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),Sa&&n.parentNode.removeChild(n)}}function eo(e,t){var i=Mn(e,t);if(i){var o=document.createDocumentFragment();In(e,i,o),e.display.dragCursor||(e.display.dragCursor=r("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,o)}}function to(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function no(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}function ro(){Hl||(io(),Hl=!0)}function io(){var e;el(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,no(oo)},100))}),el(window,"blur",function(){return no(jn)})}function oo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}function ao(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function lo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=g(n.split(" "),ao),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=r):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function so(e,t,n,r){t=ho(t);var i=t.call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return so(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=so(e,t.fallthrough[o],n,r);if(a)return a}}}function co(e){var t="string"==typeof e?e:Pl[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function uo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(_a?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(_a?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function fo(e,t){if(Sa&&34==e.keyCode&&e.char)return!1;var n=Pl[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),uo(n,e,t))}function ho(e){return"string"==typeof e?ql[e]:e}function po(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&se(o.from,m(r).to)<=0;){var a=r.pop();if(se(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}vr(e,function(){for(var t=r.length-1;t>=0;t--)Hi(e.doc,"",r[t].from,r[t].to,"+delete");Yn(e)})}function mo(e,t,n){var r=S(e.text,t+n,n);return r<0||r>e.text.length?null:r}function go(e,t,n){var r=mo(e,t.ch,n);return null==r?null:new le(t.line,r,n<0?"after":"before")}function vo(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=A(n,t.doc.direction);if(o){var a,l=i<0?m(o):o[0],s=i<0==(1==l.level),c=s?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=Vt(t,n);a=i<0?n.text.length-1:0;var d=Xt(t,u,a).top;a=M(function(e){return Xt(t,u,e).top==d},i<0==(1==l.level)?l.from:l.to-1,a),"before"==c&&(a=mo(n,a,1))}else a=i<0?l.to:l.from;return new le(r,a,c)}}return new le(r,i<0?n.text.length:0,i<0?"before":"after")}function xo(e,t,n,r){var i=A(t,e.doc.direction);if(!i)return go(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=L(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return go(t,n,r);var l,s=function(e,n){return mo(t,e instanceof le?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||Vt(e,t),pn(e,t,l,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,f=s(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after";return new le(n.line,f,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new le(n.line,s(e,1),"before"):new le(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?r.begin:s(r.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),r.begin<=c&&c<r.end)return o(c,l)}},m=p(o+r,r,u);if(m)return m;var g=r>0?u.end:s(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}function bo(e,t){var n=J(e.doc,t),r=Ke(n);return r!=n&&(t=re(r)),vo(!0,e,r,t,1)}function yo(e,t){var n=J(e.doc,t),r=Ze(n);return r!=n&&(t=re(r)),vo(!0,e,n,t,-1)}function ko(e,t){var n=bo(e,t.line),r=J(e.doc,n.line),i=A(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return le(n.line,a?0:o,n.sticky)}return n}function wo(e,t,n){if("string"==typeof t&&!(t=$l[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=$a}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Co(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=so(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&so(t,e.options.extraKeys,n,e)||so(t,e.options.keyMap,n,e)}function So(e,t,n,r){var i=e.state.keySeq;if(i){if(co(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Mo(e,i+" "+t,n,r))return!0}return Mo(e,t,n,r)}function Mo(e,t,n,r){var i=Co(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&yt(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(_(n),Hn(e)),!!i}function To(e,t){var n=fo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?So(e,"Shift-"+n,t,function(t){return wo(e,t,!0)})||So(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return wo(e,t)}):So(e,n,t,function(t){return wo(e,t)}))}function Lo(e,t,n){return So(e,"'"+n+"'",t,function(t){return wo(e,t,!0)})}function Ao(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=a(),E(t,e)))){ba&&ya<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=To(t,e);Sa&&(Gl=r?n:null,!r&&88==n&&!il&&(Fa?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),ma&&!Fa&&!r&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||No(t)}}function No(e){function t(e){18!=e.keyCode&&e.altKey||(Ha(n,"CodeMirror-crosshair"),D(document,"keyup",t),D(document,"mouseover",t))}var n=e.display.lineDiv;l(n,"CodeMirror-crosshair"),el(document,"keyup",t),el(document,"mouseover",t)}function Do(e){16==e.keyCode&&(this.doc.sel.shift=!1),E(this,e)}function Fo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||It(t.display,e)||E(t,e)||e.ctrlKey&&!e.altKey||Fa&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(Sa&&n==Gl)return Gl=null,void _(e);if(!Sa||e.which&&!(e.which<10)||!To(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(Lo(t,e,i)||t.display.input.onKeyPress(e))}}}function Eo(e,t){var n=+new Date;return Kl&&Kl.compare(n,e,t)?(Xl=Kl=null,"triple"):Xl&&Xl.compare(n,e,t)?(Kl=new Vl(n,e,t),Xl=null,"double"):(Xl=new Vl(n,e,t),Kl=null,"single")}function Oo(e){var t=this,n=t.display;if(!(E(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,It(n,e))return void(ka||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!jo(t,e)){var r=Mn(t,e),i=B(e),o=r?Eo(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&zo(t,i,r,o,e)||(1==i?r?_o(t,r,o,e):W(e)==n.scroller&&_(e):2==i?(r&&gi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(Ra?t.display.input.onContextMenu(e):Wn(t)))}}}function zo(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,So(e,uo(o,i),i,function(t){if("string"==typeof t&&(t=$l[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=$a}finally{e.state.suppressEdits=!1}return r})}function Io(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=Ea?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=Fa?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(Fa?n.altKey:n.ctrlKey)),i}function _o(e,t,n,r){ba?setTimeout(c(Pn,e),0):e.curOp.focus=a();var i,o=Io(e,n,r),l=e.doc.sel;e.options.dragDrop&&tl&&!e.isReadOnly()&&"single"==n&&(i=l.contains(t))>-1&&(se((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(se(i.to(),t)>0||t.xRel<0)?Ro(e,r,t,o):Po(e,r,t,o)}function Ro(e,t,n,r){var i=e.display,o=!1,a=xr(e,function(t){ka&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Wn(e)),D(i.wrapper.ownerDocument,"mouseup",a),D(i.wrapper.ownerDocument,"mousemove",l),D(i.scroller,"dragstart",s),D(i.scroller,"drop",a),o||(_(t),r.addNew||gi(e.doc,n,null,null,r.extend),ka&&!Ma||ba&&9==ya?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return o=!0};ka&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,el(i.wrapper.ownerDocument,"mouseup",a),el(i.wrapper.ownerDocument,"mousemove",l),el(i.scroller,"dragstart",s),el(i.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ho(e,t,n){if("char"==n)return new Dl(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Dl(le(t.line,0),pe(e.doc,le(t.line+1,0)));var r=n(e,t);return new Dl(r.from,r.to)}function Po(e,t,n,r){function i(t){if(0!=se(v,t))if(v=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,a=d(J(c,n.line).text,n.ch,o),l=d(J(c,t.line).text,t.ch,o),s=Math.min(a,l),m=Math.max(a,l),g=Math.min(n.line,t.line),x=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=x;g++){var b=J(c,g).text,y=h(b,s,o);s==m?i.push(new Dl(le(g,y),le(g,y))):b.length>y&&i.push(new Dl(le(g,y),le(g,h(b,m,o))))}i.length||i.push(new Dl(n,n)),wi(c,Br(e,p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var k,w=u,C=Ho(e,t,r.unit),S=w.anchor;se(C.anchor,S)>0?(k=C.head,S=fe(w.from(),C.anchor)):(k=C.anchor,S=de(w.to(),C.head));var M=p.ranges.slice(0);M[f]=Wo(e,new Dl(pe(c,S),k)),wi(c,Br(e,M,f),Ga)}}function o(t){var n=++b,l=Mn(e,t,!0,"rectangle"==r.unit);if(l)if(0!=se(l,v)){e.curOp.focus=a(),i(l);var u=Un(s,c);(l.line>=u.to||l.line<u.from)&&setTimeout(xr(e,function(){b==n&&o(t)}),150)}else{var d=t.clientY<x.top?-20:t.clientY>x.bottom?20:0;d&&setTimeout(xr(e,function(){b==n&&(s.scroller.scrollTop+=d,o(t))}),50)}}function l(t){e.state.selectingText=!1,b=1/0,t&&(_(t),s.input.focus()),D(s.wrapper.ownerDocument,"mousemove",y),D(s.wrapper.ownerDocument,"mouseup",k),c.history.lastSelOrigin=null}ba&&Wn(e);var s=e.display,c=e.doc;_(t);var u,f,p=c.sel,m=p.ranges;if(r.addNew&&!r.extend?(f=c.sel.contains(n),u=f>-1?m[f]:new Dl(n,n)):(u=c.sel.primary(),f=c.sel.primIndex),"rectangle"==r.unit)r.addNew||(u=new Dl(n,n)),n=Mn(e,t,!0,!0),f=-1;else{var g=Ho(e,n,r.unit);u=r.extend?mi(u,g.anchor,g.head,r.extend):g}r.addNew?-1==f?(f=m.length,wi(c,Br(e,m.concat([u]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==r.unit&&!r.extend?(wi(c,Br(e,m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):xi(c,f,u,Ga):(f=0,wi(c,new Nl([u],0),Ga),p=c.sel);var v=n,x=s.wrapper.getBoundingClientRect(),b=0,y=xr(e,function(e){0!==e.buttons&&B(e)?o(e):l(e)}),k=xr(e,l);e.state.selectingText=k,el(s.wrapper.ownerDocument,"mousemove",y),el(s.wrapper.ownerDocument,"mouseup",k)}function Wo(e,t){var n=t.anchor,r=t.head,i=J(e.doc,n.line);if(0==se(n,r)&&n.sticky==r.sticky)return t;var o=A(i);if(!o)return t;var a=L(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;var c;if(r.line!=n.line)c=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=L(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==l.level?-1:1);c=u==s-1||u==s?d<0:d>0}var f=o[s+(c?-1:0)],h=c==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Dl(new le(n.line,p,m),r)}function Bo(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&_(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!z(e,n))return H(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){return F(e,n,e,ie(e.doc,o),e.display.gutterSpecs[s].className,t),H(t)}}}function jo(e,t){return Bo(e,t,"gutterClick",!0)}function qo(e,t){It(e.display,t)||$o(e,t)||E(e,t,"contextmenu")||Ra||e.display.input.onContextMenu(t)}function $o(e,t){return!!z(e,"gutterContextMenu")&&Bo(e,t,"gutterContextMenu",!1)}function Uo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tn(e)}function Go(e,t,n){if(!t!=!(n&&n!=Zl)){var r=e.display.dragFunctions,i=t?el:D;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Vo(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ha(e.display.wrapper,"CodeMirror-wrap"),it(e)),Sn(e),Ln(e),tn(e),setTimeout(function(){return ar(e)},100)}function Xo(e,t){var n=this;if(!(this instanceof Xo))return new Xo(e,t);this.options=t=t?u(t):{},u(Yl,t,!1);var r=t.value;"string"==typeof r?r=new _l(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Xo.inputStyles[t.inputStyle](this),o=this.display=new Rr(e,r,i,t);o.wrapper.CodeMirror=this,Uo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),sr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Wa,keySeq:null,specialChars:null},t.autofocus&&!Da&&o.input.focus(),ba&&ya<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ko(this),ro(),cr(this),this.curOp.forceUpdate=!0,Jr(this,r),t.autofocus&&!Da||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Bn(n)},20):jn(this);for(var a in Ql)Ql.hasOwnProperty(a)&&Ql[a](this,t[a],Zl);Or(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Jl.length;++l)Jl[l](this);ur(this),ka&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ko(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function n(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}var i=e.display;el(i.scroller,"mousedown",xr(e,Oo)),ba&&ya<11?el(i.scroller,"dblclick",xr(e,function(t){if(!E(e,t)){var n=Mn(e,t);if(n&&!jo(e,t)&&!It(e.display,t)){_(t);var r=e.findWordAt(n);gi(e.doc,r.anchor,r.head)}}})):el(i.scroller,"dblclick",function(t){return E(e,t)||_(t)}),el(i.scroller,"contextmenu",function(t){return qo(e,t)}),el(i.input.getField(),"contextmenu",function(t){i.scroller.contains(t.target)||qo(e,t)});var o,a={end:0};el(i.scroller,"touchstart",function(t){if(!E(e,t)&&!n(t)&&!jo(e,t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),el(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),el(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!It(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new Dl(l,l):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(l):new Dl(le(l.line,0),pe(e.doc,le(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),_(n)}t()}),el(i.scroller,"touchcancel",t),el(i.scroller,"scroll",function(){i.scroller.clientHeight&&(nr(e,i.scroller.scrollTop),ir(e,i.scroller.scrollLeft,!0),F(e,"scroll",e))}),el(i.scroller,"mousewheel",function(t){return Wr(e,t)}),el(i.scroller,"DOMMouseScroll",function(t){return Wr(e,t)}),el(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){E(e,t)||P(t)},over:function(t){E(e,t)||(eo(e,t),P(t))},start:function(t){return Ji(e,t)},drop:xr(e,Qi),leave:function(t){E(e,t)||to(e)}};var l=i.input.getField();el(l,"keyup",function(t){return Do.call(e,t)}),el(l,"keydown",xr(e,Ao)),el(l,"keypress",xr(e,Fo)),el(l,"focus",function(t){return Bn(e,t)}),el(l,"blur",function(t){return jn(e,t)})}function Zo(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=be(e,t).state:n="prev");var a=e.options.tabSize,l=J(o,t),s=d(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==$a||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?d(J(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)h+=a,f+="\t";if(h<c&&(f+=p(c-h)),f!=u)return Hi(o,f,le(t,0),le(t,u.length),"+input"),l.stateAfter=null,!0;for(var g=0;g<o.sel.ranges.length;g++){var v=o.sel.ranges[g];if(v.head.line==t&&v.head.ch<u.length){var x=le(t,u.length);xi(o,g,new Dl(x,x));break}}}function Yo(e){es=e}function Qo(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=nl(t),c=null;if(l&&r.ranges.length>1)if(es&&es.text.join("\n")==t){if(r.ranges.length%es.text.length==0){c=[];for(var u=0;u<es.text.length;u++)c.push(o.splitLines(es.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=g(s,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var h=r.ranges[f],p=h.from(),v=h.to();h.empty()&&(n&&n>0?p=le(p.line,p.ch-n):e.state.overwrite&&!l?v=le(v.line,Math.min(J(o,v.line).text.length,v.ch+m(s).length)):l&&es&&es.lineWise&&es.text.join("\n")==s.join("\n")&&(p=v=le(p.line,0)));var x={from:p,to:v,text:c?c[f%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Ei(e.doc,x),yt(e,"inputRead",e,x)}t&&!l&&ea(e,t),Yn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Jo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||vr(t,function(){return Qo(t,n,0,null,"paste")}),!0}function ea(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Zo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(J(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Zo(e,i.head.line,"smart"));a&&yt(e,"electricInput",e,i.head.line)}}}function ta(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:le(i,0),head:le(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function na(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function ra(){var e=r("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=r("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ka?e.style.width="1000px":e.setAttribute("wrap","off"),Aa&&(e.style.border="1px solid black"),na(e),t}function ia(e,t,n,r,i){function o(){var n=t.line+u;return!(n<e.first||n>=e.first+e.size)&&(t=new le(n,t.ch,t.sticky),c=J(e,n))}function a(a){var l;if("codepoint"==r){var s=c.text.charCodeAt(t.ch+(r>0?0:-1));l=isNaN(s)?null:new le(t.line,Math.max(0,Math.min(c.text.length,t.ch+n*(s>=55296&&s<56320?2:1))),-n)}else l=i?xo(e.cm,c,t,n):go(c,t,n);if(null==l){if(a||!o())return!1;t=vo(i,e.cm,c,t.line,u)}else t=l;return!0}var l=t,s=n,c=J(e,t.line),u=i&&"rtl"==e.direction?-n:n;if("char"==r||"codepoint"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||a(!p);p=!1){var m=c.text.charAt(t.ch)||"\n",g=k(m,h)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||p||g||(g="s"),d&&d!=g){n<0&&(n=1,a(),t.sticky="after");break}if(g&&(d=g),n>0&&!a(!p))break}var v=Ai(e,t,l,s,!0);return ce(l,v)&&(v.hitSide=!0),v}function oa(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*bn(e.display),3);i=(n>0?t.bottom:t.top)+n*s}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;c=fn(e,a,i),c.outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}function aa(e,t){var n=Gt(e,t.line);if(!n||n.hidden)return null;var r=J(e.doc,t.line),i=qt(n,r,t.line),o=A(r,e.doc.direction),a="left";if(o){a=L(o,t.ch)%2?"right":"left"}var l=Kt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function la(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sa(e,t){return t&&(e.bad=!0),e}function ca(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(){u&&(c+=d,f&&(c+=d),u=f=!1)}function l(e){e&&(a(),c+=e)}function s(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var c,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(le(r,0),le(i+1,0),o(+h));return void(p.length&&(c=p[0].find(0))&&l(ee(e.doc,c.from,c.to).join(d)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&a();for(var g=0;g<t.childNodes.length;g++)s(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(f=!0),m&&(u=!0)}else 3==t.nodeType&&l(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(var c="",u=!1,d=e.doc.lineSeparator(),f=!1;s(t),t!=n;)t=t.nextSibling,f=!1;return c}function ua(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return sa(e.clipPos(le(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return da(o,t,n)}}function da(e,t,n){function r(t,n,r){for(var i=-1;i<(d?d.length:0);i++)for(var o=i<0?u.map:d[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==n){var s=re(i<0?e.line:e.rest[i]),c=o[a]+r;return(r<0||l!=t)&&(c=o[a+(r?1:0)]),le(s,c)}}}var i=e.text.firstChild,a=!1;if(!t||!o(i,t))return sa(le(re(e.line),0),!0);if(t==i&&(a=!0,t=i.childNodes[n],n=0,!t)){var l=e.rest?m(e.rest):e.line;return sa(le(re(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));c.parentNode!=i;)c=c.parentNode;var u=e.measure,d=u.maps,f=r(s,c,n);if(f)return sa(f,a);for(var h=c.nextSibling,p=s?s.nodeValue.length-n:0;h;h=h.nextSibling){if(f=r(h,h.firstChild,0))return sa(le(f.line,f.ch-p),a);p+=h.textContent.length}for(var g=c.previousSibling,v=n;g;g=g.previousSibling){if(f=r(g,g.firstChild,-1))return sa(le(f.line,f.ch+v),a);v+=g.textContent.length}}function fa(e,t){function n(){e.value=s.getValue()}if(t=t?u(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=a();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}var i;if(e.form&&(el(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(D(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Xo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}var ha=navigator.userAgent,pa=navigator.platform,ma=/gecko\/\d/i.test(ha),ga=/MSIE \d/.test(ha),va=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ha),xa=/Edge\/(\d+)/.exec(ha),ba=ga||va||xa,ya=ba&&(ga?document.documentMode||6:+(xa||va)[1]),ka=!xa&&/WebKit\//.test(ha),wa=ka&&/Qt\/\d+\.\d+/.test(ha),Ca=!xa&&/Chrome\//.test(ha),Sa=/Opera\//.test(ha),Ma=/Apple Computer/.test(navigator.vendor),Ta=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ha),La=/PhantomJS/.test(ha),Aa=!xa&&/AppleWebKit/.test(ha)&&/Mobile\/\w+/.test(ha),Na=/Android/.test(ha),Da=Aa||Na||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ha),Fa=Aa||/Mac/.test(pa),Ea=/\bCrOS\b/.test(ha),Oa=/win/i.test(pa),za=Sa&&ha.match(/Version\/(\d*\.\d*)/);za&&(za=Number(za[1])),za&&za>=15&&(Sa=!1,ka=!0);var Ia,_a=Fa&&(wa||Sa&&(null==za||za<12.11)),Ra=ma||ba&&ya>=9,Ha=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};Ia=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Pa=function(e){e.select()};Aa?Pa=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ba&&(Pa=function(e){try{e.select()}catch(e){}});var Wa=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};Wa.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Wa.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var Ba,ja,qa=50,$a={toString:function(){return"CodeMirror.Pass"}},Ua={scroll:!1},Ga={origin:"*mouse"},Va={origin:"+move"},Xa=[""],Ka=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Za=/[\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]/,Ya=null,Qa=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(n,r){var c="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!i.test(n))return!1;for(var u=n.length,d=[],f=0;f<u;++f)d.push(e(n.charCodeAt(f)));for(var h=0,p=c;h<u;++h){var g=d[h];"m"==g?d[h]=p:p=g}for(var v=0,x=c;v<u;++v){var b=d[v];"1"==b&&"r"==x?d[v]="n":a.test(b)&&(x=b,"r"==b&&(d[v]="R"))}for(var y=1,k=d[0];y<u-1;++y){var w=d[y];"+"==w&&"1"==k&&"1"==d[y+1]?d[y]="1":","!=w||k!=d[y+1]||"1"!=k&&"n"!=k||(d[y]=k),k=w}for(var C=0;C<u;++C){var S=d[C];if(","==S)d[C]="N";else if("%"==S){var M=void 0;for(M=C+1;M<u&&"%"==d[M];++M);for(var T=C&&"!"==d[C-1]||M<u&&"1"==d[M]?"1":"N",L=C;L<M;++L)d[L]=T;C=M-1}}for(var A=0,N=c;A<u;++A){var D=d[A];"L"==N&&"1"==D?d[A]="L":a.test(D)&&(N=D)}for(var F=0;F<u;++F)if(o.test(d[F])){var E=void 0;for(E=F+1;E<u&&o.test(d[E]);++E);for(var O="L"==(F?d[F-1]:c),z="L"==(E<u?d[E]:c),I=O==z?O?"L":"R":c,_=F;_<E;++_)d[_]=I;F=E-1}for(var R,H=[],P=0;P<u;)if(l.test(d[P])){var W=P;for(++P;P<u&&l.test(d[P]);++P);H.push(new t(0,W,P))}else{var B=P,j=H.length,q="rtl"==r?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var $=B;$<P;)if(s.test(d[$])){B<$&&(H.splice(j,0,new t(1,B,$)),j+=q);var U=$;for(++$;$<P&&s.test(d[$]);++$);H.splice(j,0,new t(2,U,$)),j+=q,B=$}else++$;B<P&&H.splice(j,0,new t(1,B,P))}return"ltr"==r&&(1==H[0].level&&(R=n.match(/^\s+/))&&(H[0].from=R[0].length,H.unshift(new t(0,0,R[0].length))),1==m(H).level&&(R=n.match(/\s+$/))&&(m(H).to-=R[0].length,H.push(new t(0,u-R[0].length,u)))),"rtl"==r?H.reverse():H}}(),Ja=[],el=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Ja).concat(n)}},tl=function(){if(ba&&ya<9)return!1;var e=r("div");return"draggable"in e||"dragDrop"in e}(),nl=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},rl=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},il=function(){var e=r("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ol=null,al={},ll={},sl={},cl=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};cl.prototype.eol=function(){return this.pos>=this.string.length},cl.prototype.sol=function(){return this.pos==this.lineStart},cl.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cl.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},cl.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},cl.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},cl.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},cl.prototype.skipToEnd=function(){this.pos=this.string.length},cl.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cl.prototype.backUp=function(e){this.pos-=e},cl.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=d(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},cl.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},cl.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},cl.prototype.current=function(){return this.string.slice(this.start,this.pos)},cl.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cl.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cl.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ul=function(e,t){this.state=e,this.lookAhead=t},dl=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};dl.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},dl.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},dl.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dl.fromSaved=function(e,t,n){return t instanceof ul?new dl(e,Z(e.mode,t.state),n,t.lookAhead):new dl(e,Z(e.mode,t),n)},dl.prototype.save=function(e){var t=!1!==e?Z(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ul(t,this.maxLookAhead):t};var fl=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},hl=!1,pl=!1,ml=function(e,t,n){this.text=e,We(this,t),this.height=n?n(this):1};ml.prototype.lineNo=function(){return re(this)},I(ml);var gl,vl={},xl={},bl=null,yl=null,kl={left:0,right:0,top:0,bottom:0},wl=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,e(i),e(o),el(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),el(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ba&&ya<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wl.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},wl.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wl.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wl.prototype.zeroWidthHack=function(){var e=Fa&&!Ta?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Wa,this.disableVert=new Wa},wl.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},wl.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Cl=function(){};Cl.prototype.update=function(){return{bottom:0,right:0}},Cl.prototype.setScrollLeft=function(){},Cl.prototype.setScrollTop=function(){},Cl.prototype.clear=function(){};var Sl={native:wl,null:Cl},Ml=0,Tl=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Un(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Wt(e),this.force=n,this.dims=kn(e),this.events=[]};Tl.prototype.signal=function(e,t){z(e,t)&&this.events.push(arguments)},Tl.prototype.finish=function(){for(var e=0;e<this.events.length;e++)F.apply(null,this.events[e])};var Ll=0,Al=null;ba?Al=-.53:ma?Al=15:Ca?Al=-.7:Ma&&(Al=-1/3);var Nl=function(e,t){this.ranges=e,this.primIndex=t};Nl.prototype.primary=function(){return this.ranges[this.primIndex]},Nl.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ce(n.anchor,r.anchor)||!ce(n.head,r.head))return!1}return!0},Nl.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Dl(ue(this.ranges[t].anchor),ue(this.ranges[t].head));return new Nl(e,this.primIndex)},Nl.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Nl.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(se(t,r.from())>=0&&se(e,r.to())<=0)return n}return-1};var Dl=function(e,t){this.anchor=e,this.head=t};Dl.prototype.from=function(){return fe(this.anchor,this.head)},Dl.prototype.to=function(){return de(this.anchor,this.head)},Dl.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},qi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,at(i),yt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},$i.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof qi))){var l=[];this.collapse(l),this.children=[new qi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new qi(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new $i(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=f(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new $i(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Fl=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Fl.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=re(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=zt(this);ne(n,Math.max(0,n.height-o)),e&&(vr(e,function(){Ui(e,n,-o),An(e,r,"widget")}),yt(e,"lineWidgetCleared",e,this,r))}},Fl.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=zt(this)-t;i&&(et(this.doc,r)||ne(r,r.height+i),n&&vr(n,function(){n.curOp.forceUpdate=!0,Ui(n,r,i),yt(n,"lineWidgetChanged",n,e,re(r))}))},I(Fl);var El=0,Ol=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++El};Ol.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&cr(e),z(this,"clear")){var n=this.find();n&&yt(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Fe(a.markedSpans,this);e&&!this.collapsed?An(e,re(a),"text"):e&&(null!=l.to&&(i=re(a)),null!=l.from&&(r=re(a))),a.markedSpans=Ee(a.markedSpans,l),null==l.from&&this.collapsed&&!et(this.doc,a)&&e&&ne(a,bn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Ke(this.lines[s]),u=rt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Ln(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Mi(e.doc)),e&&yt(e,"markerCleared",e,this,r,i),t&&ur(e),this.parent&&this.parent.clear()}},Ol.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Fe(o.markedSpans,this);if(null!=a.from&&(n=le(t?o:re(o),a.from),-1==e))return n;if(null!=a.to&&(r=le(t?o:re(o),a.to),1==e))return r}return n&&{from:n,to:r}},Ol.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&vr(r,function(){var i=t.line,o=re(t.line),a=Gt(r,o);if(a&&(Jt(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!et(n.doc,i)&&null!=n.height){var l=n.height;n.height=null;var s=zt(n)-l;s&&ne(i,i.height+s)}yt(r,"markerChanged",r,e)})},Ol.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=f(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ol.prototype.detachLine=function(e){if(this.lines.splice(f(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},I(Ol);var zl=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};zl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();yt(this,"clear")}},zl.prototype.find=function(e,t){return this.primary.find(e,t)},I(zl);var Il=0,_l=function(e,t,n,r,i){if(!(this instanceof _l))return new _l(e,t,n,r,i);null==n&&(n=0),$i.call(this,[new qi([new ml("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=le(n,0);this.sel=jr(o),this.history=new ni(null),this.id=++Il,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Yr(this,{from:o,to:o,text:e}),wi(this,jr(o),Ua)};_l.prototype=b($i.prototype,{constructor:_l,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=te(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:yr(function(e){var t=le(this.first,0),n=this.first+this.size-1;Ei(this,{from:t,to:le(n,J(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Qn(this.cm,0,0),wi(this,jr(t),Ua)}),replaceRange:function(e,t,n,r){t=pe(this,t),n=n?pe(this,n):t,Hi(this,e,t,n,r)},getRange:function(e,t,n){var r=ee(this,pe(this,e),pe(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(oe(this,e))return J(this,e)},getLineNumber:function(e){return re(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=J(this,e)),Ke(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pe(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:yr(function(e,t,n){bi(this,pe(this,"number"==typeof e?le(e,t||0):e),null,n)}),setSelection:yr(function(e,t,n){bi(this,pe(this,e),pe(this,t||e),n)}),extendSelection:yr(function(e,t,n){gi(this,pe(this,e),t&&pe(this,t),n)}),extendSelections:yr(function(e,t){vi(this,ge(this,e),t)}),extendSelectionsBy:yr(function(e,t){vi(this,ge(this,g(this.sel.ranges,e)),t)}),setSelections:yr(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Dl(pe(this,e[i].anchor),pe(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),wi(this,Br(this.cm,r,t),n)}}),addSelection:yr(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Dl(pe(this,e),pe(this,t||e))),wi(this,Br(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=ee(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=ee(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:yr(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&Vr(this,r,t),s=r.length-1;s>=0;s--)Ei(this,r[s]);l?ki(this,l):this.cm&&Yn(this.cm)}),undo:yr(function(){zi(this,"undo")}),redo:yr(function(){zi(this,"redo")}),undoSelection:yr(function(){zi(this,"undo",!0)}),redoSelection:yr(function(){zi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new ni(this.history.maxGeneration),Qr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:pi(this.history.done),undone:pi(this.history.undone)}},setHistory:function(e){var t=this.history=new ni(this.history.maxGeneration);t.done=pi(e.done.slice(0),null,!0),t.undone=pi(e.undone.slice(0),null,!0)},setGutterMarker:yr(function(e,t,n){return ji(this,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&w(r)&&(e.gutterMarkers=null),!0})}),clearGutter:yr(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ji(t,n,"gutter",function(){return n.gutterMarkers[e]=null,w(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!oe(this,e))return null;if(t=e,!(e=J(this,e)))return null}else if(null==(t=re(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:yr(function(t,n,r){return ji(this,t,"gutter"==n?"gutter":"class",function(t){var i="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(t[i]){if(e(r).test(t[i]))return!1;t[i]+=" "+r}else t[i]=r;return!0})}),removeLineClass:yr(function(t,n,r){return ji(this,t,"gutter"==n?"gutter":"class",function(t){var i="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==r)t[i]=null;else{var a=o.match(e(r));if(!a)return!1;var l=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:yr(function(e,t,n){return Gi(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Vi(this,pe(this,e),pe(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=pe(this,e),Vi(this,e,e,n,"bookmark")},findMarksAt:function(e){e=pe(this,e);var t=[],n=J(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=pe(this,e),t=pe(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),pe(this,le(n,t))},indexFromPos:function(e){e=pe(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new _l(te(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new _l(te(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Zi(r,Ki(this)),r},unlinkDoc:function(e){if(e instanceof Xo&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Yi(Ki(this));break}}if(e.history==this.history){var r=[e.id];Qr(e,function(e){return r.push(e.id)},!0),e.history=new ni(null),e.history.done=pi(this.history.done,r),e.history.undone=pi(this.history.undone,r)}},iterLinkedDocs:function(e){Qr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):nl(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:yr(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&ti(this.cm))})}),_l.prototype.eachLine=_l.prototype.iter;for(var Rl=0,Hl=!1,Pl={3:"Pause",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:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Wl=0;Wl<10;Wl++)Pl[Wl+48]=Pl[Wl+96]=String(Wl);for(var Bl=65;Bl<=90;Bl++)Pl[Bl]=String.fromCharCode(Bl);for(var jl=1;jl<=12;jl++)Pl[jl+111]=Pl[jl+63235]="F"+jl;var ql={};ql.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ql.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ql.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ql.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ql.default=Fa?ql.macDefault:ql.pcDefault;var $l={selectAll:Di,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ua)},killLine:function(e){return po(e,function(t){if(t.empty()){var n=J(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:le(t.head.line+1,0)}:{from:t.head,to:le(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return po(e,function(t){return{from:le(t.from().line,0),to:pe(e.doc,le(t.to().line+1,0))}})},delLineLeft:function(e){return po(e,function(e){return{from:le(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return po(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},delWrappedLineRight:function(e){return po(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(le(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(le(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return bo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ko(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return yo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Va)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Va)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ko(e,t.head):r},Va)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=d(e.getLine(o.line),o.ch,r);t.push(p(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return vr(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=J(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new le(i.line,i.ch-1)),i.ch>0)i=new le(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),le(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=J(e.doc,i.line-1).text;a&&(i=new le(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),le(i.line-1,a.length-1),i,"+transpose"))}n.push(new Dl(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return vr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Yn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Ul=new Wa,Gl=null,Vl=function(e,t,n){this.time=e,this.pos=t,this.button=n};Vl.prototype.compare=function(e,t,n){return this.time+400>e&&0==se(t,this.pos)&&n==this.button};var Xl,Kl,Zl={toString:function(){return"CodeMirror.Init"}},Yl={},Ql={};Xo.defaults=Yl,Xo.optionHandlers=Ql;var Jl=[];Xo.defineInitHook=function(e){return Jl.push(e)};var es=null,ts=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Wa,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ts.prototype.init=function(e){function t(e){for(var t=e.target;t;t=t.parentNode){if(t==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function n(e){if(t(e)&&!E(o,e)){if(o.somethingSelected())Yo({lineWise:!1,text:o.getSelections()}),"cut"==e.type&&o.replaceSelection("",null,"cut");else{if(!o.options.lineWiseCopyCut)return;var n=ta(o);Yo({lineWise:!0,text:n.text}),"cut"==e.type&&o.operation(function(){o.setSelections(n.ranges,0,Ua),o.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=es.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=ra(),s=l.firstChild;o.display.lineSpace.insertBefore(l,o.display.lineSpace.firstChild),s.value=es.text.join("\n");var c=document.activeElement;Pa(s),setTimeout(function(){o.display.lineSpace.removeChild(l),c.focus(),c==a&&i.showPrimarySelection()},50)}}var r=this,i=this,o=i.cm,a=i.div=e.lineDiv;na(a,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize),el(a,"paste",function(e){!t(e)||E(o,e)||Jo(e,o)||ya<=11&&setTimeout(xr(o,function(){return r.updateFromDOM()}),20)}),el(a,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),el(a,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),el(a,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),el(a,"touchstart",function(){return i.forceCompositionEnd()}),el(a,"input",function(){r.composing||r.readFromDOMSoon()}),el(a,"copy",n),el(a,"cut",n)},ts.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ts.prototype.prepareSelection=function(){var e=zn(this.cm,!1);return e.focus=document.activeElement==this.div,e},ts.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ts.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ts.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom)return void e.removeAllRanges();var o=ua(t,e.anchorNode,e.anchorOffset),a=ua(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=se(fe(o,a),r)||0!=se(de(o,a),i)){var l=t.display.view,s=r.line>=t.display.viewFrom&&aa(t,r)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&aa(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(!s||!c)return void e.removeAllRanges();var f,h=e.rangeCount&&e.getRangeAt(0);try{f=Ia(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!ma&&t.state.focused?(e.collapse(s.node,s.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):ma&&this.startGracePeriod()),this.rememberSelection()}},ts.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ts.prototype.showMultipleSelections=function(e){n(this.cm.display.cursorDiv,e.cursors),n(this.cm.display.selectionDiv,e.selection)},ts.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ts.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},ts.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ts.prototype.blur=function(){this.div.blur()},ts.prototype.getField=function(){return this.div},ts.prototype.supportsTouch=function(){return!0},ts.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():vr(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},ts.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ts.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(Na&&Ca&&this.cm.display.gutterSpecs.length&&la(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ua(t,e.anchorNode,e.anchorOffset),r=ua(t,e.focusNode,e.focusOffset);n&&r&&vr(t,function(){wi(t.doc,jr(n,r),Ua),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},ts.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(0==r.ch&&r.line>e.firstLine()&&(r=le(r.line-1,J(e.doc,r.line-1).length)),i.ch==J(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=le(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||0==(o=Tn(e,r.line))?(a=re(t.view[0].line),l=t.view[0].node):(a=re(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Tn(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=re(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(ca(e,l,c,a,s)),f=ee(e.doc,le(a,0),le(s,J(e.doc,s).text.length));d.length>1&&f.length>1;)if(m(d)==m(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var h=0,p=0,g=d[0],v=f[0],x=Math.min(g.length,v.length);h<x&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=m(d),y=m(f),k=Math.min(b.length-(1==d.length?h:0),y.length-(1==f.length?h:0));p<k&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==f.length&&a==r.line)for(;h&&h>r.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)h--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var w=le(a,h),C=le(s,f.length?m(f).length-p:0);return d.length>1||d[0]||se(w,C)?(Hi(e.doc,d,w,C,"+input"),!0):void 0},ts.prototype.ensurePolled=function(){this.forceCompositionEnd()},ts.prototype.reset=function(){this.forceCompositionEnd()},ts.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ts.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ts.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||vr(this.cm,function(){return Ln(e.cm)})},ts.prototype.setUneditable=function(e){e.contentEditable="false"},ts.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||xr(this.cm,Qo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ts.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ts.prototype.onContextMenu=function(){},ts.prototype.resetPosition=function(){},ts.prototype.needsContentAttribute=!0;var ns=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Wa,this.hasSelection=!1,this.composing=null};ns.prototype.init=function(e){function t(e){if(!E(i,e)){if(i.somethingSelected())Yo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=ta(i);Yo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Ua):(r.prevInput="",o.value=t.text.join("\n"),Pa(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}var n=this,r=this,i=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Aa&&(o.style.width="0px"),el(o,"input",function(){ba&&ya>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),el(o,"paste",function(e){E(i,e)||Jo(e,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())}),el(o,"cut",t),el(o,"copy",t),el(e.scroller,"paste",function(t){if(!It(e,t)&&!E(i,t)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void r.focus();var n=new Event("paste");n.clipboardData=t.clipboardData,o.dispatchEvent(n)}}),el(e.lineSpace,"selectstart",function(t){It(e,t)||_(t)}),el(o,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),el(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ns.prototype.createField=function(e){this.wrapper=ra(),this.textarea=this.wrapper.firstChild},ns.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ns.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=zn(e);if(e.options.moveInputWithCursor){var i=cn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},ns.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ns.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Pa(this.textarea),ba&&ya>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ba&&ya>=9&&(this.hasSelection=null))}},ns.prototype.getField=function(){return this.textarea},ns.prototype.supportsTouch=function(){return!1},ns.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Da||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},ns.prototype.blur=function(){this.textarea.blur()},ns.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ns.prototype.receivedFocus=function(){this.slowPoll()},ns.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ns.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},ns.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||rl(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(ba&&ya>=9&&this.hasSelection===i||Fa&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return vr(t,function(){Qo(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ns.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ns.prototype.onKeyPress=function(){ba&&ya>=9&&(this.hasSelection=null),this.fastPoll()},ns.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending==n&&(r.contextMenuPending=!1,r.wrapper.style.cssText=u,a.style.cssText=c,ba&&ya<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart)){(!ba||ba&&ya<9)&&t();var e=0,l=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?xr(i,Di)(i):e++<10?o.detectingSelectAll=setTimeout(l,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(l,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea;r.contextMenuPending&&r.contextMenuPending();var l=Mn(i,e),s=o.scroller.scrollTop;if(l&&!Sa){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&xr(i,wi)(i.doc,jr(l),Ua);var c=a.style.cssText,u=r.wrapper.style.cssText,d=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",a.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n      z-index: 1000; background: "+(ba?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var f;if(ka&&(f=window.scrollY),o.input.focus(),ka&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=n,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ba&&ya>=9&&t(),Ra){P(e);var h=function(){D(window,"mouseup",h),setTimeout(n,20)};el(window,"mouseup",h)}else setTimeout(n,50)}},ns.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ns.prototype.setUneditable=function(){},ns.prototype.needsContentAttribute=!1,function(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=Zl&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=Zl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Xr(e)},!0),t("indentUnit",2,Xr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Kr(e),tn(e),Ln(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(le(r,o))}r++});for(var i=n.length-1;i>=0;i--)Hi(e.doc,t,n[i],le(n[i].line,n[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Zl&&e.refresh()}),t("specialCharPlaceholder",ct,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Da?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),t("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),t("rtlMoveVisually",!Oa),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Uo(e),_r(e)},!0),t("keyMap","default",function(e,t,n){var r=ho(t),i=n!=Zl&&ho(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Vo,!0),t("gutters",[],function(e,t){e.display.gutterSpecs=zr(t,e.options.lineNumbers),_r(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?wn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return ar(e)},!0),t("scrollbarStyle","native",function(e){sr(e),ar(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e,t){e.display.gutterSpecs=zr(e.options.gutters,t),_r(e)},!0),t("firstLineNumber",1,_r,!0),t("lineNumberFormatter",function(e){return e},_r,!0),t("showCursorWhenSelecting",!1,On,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("selectionsMayTouch",!1),t("readOnly",!1,function(e,t){"nocursor"==t&&(jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Go),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,On,!0),t("singleCursorHeightPerLine",!0,On,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Kr,!0),t("addModeClass",!1,Kr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Kr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),t("phrases",null)}(Xo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&xr(this,t[e])(this,n,i),F(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ho(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:br(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Ln(this)}),removeOverlay:br(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Ln(this)}}),indentLine:br(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),oe(this.doc,e)&&Zo(this,e,t,n)}),indentSelection:br(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Zo(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Yn(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Zo(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&xi(this.doc,r,new Dl(o,c[r].to()),Ua)}}}),getTokenAt:function(e,t){return Ce(this,e,t)},getLineTokens:function(e,t){return Ce(this,le(e),t,!0)},getTokenTypeAt:function(e){e=pe(this.doc,e);var t,n=xe(this,J(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&r.push(l)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==f(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=he(n,null==e?n.first+n.size-1:e),be(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?pe(this.doc,e):e?r.from():r.to(),cn(this,n,t||"page")},charCoords:function(e,t){return sn(this,pe(this.doc,e),t||"page")},coordsChar:function(e,t){return e=ln(this,e,t||"page"),fn(this,e.left,e.top)},lineAtHeight:function(e,t){return e=ln(this,{top:e,left:0},t||"page").top,ie(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=J(this.doc,e)}else r=e;return an(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-nt(r):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return yn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=cn(this,pe(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&Xn(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:br(Ao),triggerOnKeyPress:br(Fo),triggerOnKeyUp:Do,triggerOnMouseDown:br(Oo),execCommand:function(e){if($l.hasOwnProperty(e))return $l[e].call(null,this)},triggerElectric:br(function(e){ea(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=pe(this.doc,e),a=0;a<t&&(o=ia(this.doc,o,i,n,r),!o.hitSide);++a);return o},moveH:br(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?ia(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},Va)}),deleteH:br(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):po(this,function(n){var i=ia(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=pe(this.doc,e),l=0;l<t;++l){var s=cn(this,a,"div");if(null==o?o=s.left:s.left=o,a=oa(this,s,i,n),a.hitSide)break}return a},moveV:br(function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=cn(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=oa(n,l,e,t);return"page"==t&&a==r.sel.primary()&&Zn(n,sn(n,s,"div").top-l.top),s},Va),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,n=J(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=n.length||!r?++i:--r;for(var a=n.charAt(r),l=k(a,o)?function(e){return k(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!k(e)};r>0&&l(n.charAt(r-1));)--r;for(;i<n.length&&l(n.charAt(i));)++i}return new Dl(le(e.line,r),le(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):Ha(this.display.cursorDiv,"CodeMirror-overwrite"),F(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:br(function(e,t){Qn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Pt(this)-this.display.barHeight,width:e.scrollWidth-Pt(this)-this.display.barWidth,clientHeight:Bt(this),clientWidth:Wt(this)}},scrollIntoView:br(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:le(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?Jn(this,e):tr(this,e.from,e.to,e.margin)}),setSize:br(function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&en(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){An(n,i,"widget");break}++i}),this.curOp.forceUpdate=!0,F(this,"refresh",this)}),operation:function(e){return vr(this,e)},startOperation:function(){return cr(this)},endOperation:function(){return ur(this)},refresh:br(function(){var e=this.display.cachedTextHeight;Ln(this),this.curOp.forceUpdate=!0,tn(this),Qn(this,this.doc.scrollLeft,this.doc.scrollTop),Dr(this.display),(null==e||Math.abs(e-bn(this.display))>.5||this.options.lineWrapping)&&Sn(this),F(this,"refresh",this)}),swapDoc:br(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Jr(this,e),tn(this),this.display.input.reset(),Qn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,yt(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},I(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Xo);var rs="iter insert remove copy getEditor constructor".split(" ");for(var is in _l.prototype)_l.prototype.hasOwnProperty(is)&&f(rs,is)<0&&(Xo.prototype[is]=function(e){return function(){return e.apply(this.doc,arguments)}}(_l.prototype[is]));return I(_l),Xo.inputStyles={textarea:ns,contenteditable:ts},Xo.defineMode=function(e){Xo.defaults.mode||"null"==e||(Xo.defaults.mode=e),U.apply(this,arguments)},Xo.defineMIME=G,Xo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Xo.defineMIME("text/plain","null"),Xo.defineExtension=function(e,t){Xo.prototype[e]=t},Xo.defineDocExtension=function(e,t){_l.prototype[e]=t},Xo.fromTextArea=fa,function(e){e.off=D,e.on=el,e.wheelEventPixels=Pr,e.Doc=_l,e.splitLines=nl,e.countColumn=d,e.findColumn=h,e.isWordChar=y,e.Pass=$a,e.signal=F,e.Line=ml,e.changeEnd=qr,e.scrollbarModel=Sl,e.Pos=le,e.cmpPos=se,e.modes=al,e.mimeModes=ll,e.resolveMode=V,e.getMode=X,e.modeExtensions=sl,e.extendMode=K,e.copyState=Z,e.startState=Q,e.innerMode=Y,e.commands=$l,e.keyMap=ql,e.keyName=fo,e.isModifierKey=co,e.lookupKey=so,e.normalizeKeyMap=lo,e.StringStream=cl,e.SharedTextMarker=zl,e.TextMarker=Ol,e.LineWidget=Fl,e.e_preventDefault=_,e.e_stopPropagation=R,e.e_stop=P,e.addClass=l,e.contains=o,e.rmClass=Ha,e.keyNames=Pl}(Xo),Xo.version="5.58.3",Xo})},451:function(e,t,n){e.exports=!n(453)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},452:function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},453:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},454:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},455:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},456:function(e,t,n){!function(e){e(n(450))}(function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,o;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?i:r&&null!=i?i+" "+o:o}}}})},457:function(e,t,n){!function(e){e(n(450),n(458),n(497))}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}function i(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return!e||!/\S/.test(e.string)}function l(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==c){var n=k;if(!n){var r=e.innerMode(y,t.htmlState);n="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}n&&(t.f=h,t.block=s,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function s(t,o){var l=t.column()===o.indentation,s=a(o.prevLine.stream),c=o.indentedCode,f=o.prevLine.hr,h=!1!==o.list,p=(o.listStack[o.listStack.length-1]||0)+3;o.indentedCode=!1;var m=o.indentation;if(null===o.indentationDiff&&(o.indentationDiff=o.indentation,h)){for(o.list=null;m<o.listStack[o.listStack.length-1];)o.listStack.pop(),o.listStack.length?o.indentation=o.listStack[o.listStack.length-1]:o.list=!1;!1!==o.list&&(o.indentationDiff=m-o.listStack[o.listStack.length-1])}var g=!(s||f||o.prevLine.header||h&&c||o.prevLine.fencedCodeEnd),x=(!1===o.list||f||s)&&o.indentation<=p&&t.match(S),b=null;if(o.indentationDiff>=4&&(c||o.prevLine.fencedCodeEnd||o.prevLine.header||s))return t.skipToEnd(),o.indentedCode=!0,w.code;if(t.eatSpace())return null;if(l&&o.indentation<=p&&(b=t.match(L))&&b[1].length<=6)return o.quote=0,o.header=b[1].length,o.thisLine.header=!0,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,d(o);if(o.indentation<=p&&t.eat(">"))return o.quote=l?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),t.eatSpace(),d(o);if(!x&&!o.setext&&l&&o.indentation<=p&&(b=t.match(M))){var y=b[1]?"ol":"ul";return o.indentation=m+t.current().length,o.list=!0,o.quote=0,o.listStack.push(o.indentation),o.em=!1,o.strong=!1,o.code=!1,o.strikethrough=!1,n.taskLists&&t.match(T,!1)&&(o.taskList=!0),o.f=o.inline,n.highlightFormatting&&(o.formatting=["list","list-"+y]),d(o)}return l&&o.indentation<=p&&(b=t.match(D,!0))?(o.quote=0,o.fencedEndRE=new RegExp(b[1]+"+ *$"),o.localMode=n.fencedCodeBlockHighlighting&&r(b[2]||n.fencedCodeBlockDefaultMode),o.localMode&&(o.localState=e.startState(o.localMode)),o.f=o.block=u,n.highlightFormatting&&(o.formatting="code-block"),o.code=-1,d(o)):o.setext||!(g&&h||o.quote||!1!==o.list||o.code||x||F.test(t.string))&&(b=t.lookAhead(1))&&(b=b.match(A))?(o.setext?(o.header=o.setext,o.setext=0,t.skipToEnd(),n.highlightFormatting&&(o.formatting="header")):(o.header="="==b[0].charAt(0)?1:2,o.setext=o.header),o.thisLine.header=!0,o.f=o.inline,d(o)):x?(t.skipToEnd(),o.hr=!0,o.thisLine.hr=!0,w.hr):"["===t.peek()?i(t,o,v):i(t,o,o.inline)}function c(t,n){var r=y.token(t,n.htmlState);if(!k){var i=e.innerMode(y,n.htmlState);("xml"==i.mode.name&&null===i.state.tagStart&&!i.state.context&&i.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=h,n.block=s,n.htmlState=null)}return r}function u(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,a=r+3;if(t.fencedEndRE&&t.indentation<=a&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting="code-block");var l;return i||(l=d(t)),t.localMode=t.localState=null,t.block=s,t.f=h,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?o(e,t,t.block):l}return t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),w.code)}function d(e){var t=[];if(e.formatting){t.push(w.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(w.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(w.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(w.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(w.linkHref,"url"):(e.strong&&t.push(w.strong),e.em&&t.push(w.em),e.strikethrough&&t.push(w.strikethrough),e.emoji&&t.push(w.emoji),e.linkText&&t.push(w.linkText),e.code&&t.push(w.code),e.image&&t.push(w.image),e.imageAltText&&t.push(w.imageAltText,"link"),e.imageMarker&&t.push(w.imageMarker)),e.header&&t.push(w.header,w.header+"-"+e.header),e.quote&&(t.push(w.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(w.quote+"-"+e.quote):t.push(w.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(w.list2):t.push(w.list3):t.push(w.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function f(e,t){if(e.match(N,!0))return d(t)}function h(t,r){var i=r.text(t,r);if(void 0!==i)return i;if(r.list)return r.list=null,d(r);if(r.taskList){return" "===t.match(T,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,d(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),d(r);var a=t.next();if(r.linkTitle){r.linkTitle=!1;var l=a;"("===a&&(l=")"),l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var s="^\\s*(?:[^"+l+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(s),!0))return w.linkHref}if("`"===a){var u=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=r.code||r.quote&&1!=f){if(f==r.code){var g=d(r);return r.code=0,g}return r.formatting=u,d(r)}return r.code=f,d(r)}if(r.code)return d(r);if("\\"===a&&(t.next(),n.highlightFormatting)){var v=d(r),x=w.formatting+"-escape";return v?v+" "+x:x}if("!"===a&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),d(r);if("["===a&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),d(r);if("]"===a&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var v=d(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=m,v}if("["===a&&!r.image)return r.linkText&&t.match(/^.*?\]/)?d(r):(r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),d(r));if("]"===a&&r.linkText){n.highlightFormatting&&(r.formatting="link");var v=d(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?m:h,v}if("<"===a&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=p,n.highlightFormatting&&(r.formatting="link");var v=d(r);return v?v+=" ":v="",v+w.linkInline}if("<"===a&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=p,n.highlightFormatting&&(r.formatting="link");var v=d(r);return v?v+=" ":v="",v+w.linkEmail}if(n.xml&&"<"===a&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(t.string.substring(t.start,b))&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(y),o(t,r,c)}if(n.xml&&"<"===a&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===a||"_"===a){for(var k=1,C=1==t.pos?" ":t.string.charAt(t.pos-2);k<3&&t.eat(a);)k++;var S=t.peek()||" ",M=!/\s/.test(S)&&(!E.test(S)||/\s/.test(C)||E.test(C)),L=!/\s/.test(C)&&(!E.test(C)||/\s/.test(S)||E.test(S)),A=null,N=null;if(k%2&&(r.em||!M||"*"!==a&&L&&!E.test(C)?r.em!=a||!L||"*"!==a&&M&&!E.test(S)||(A=!1):A=!0),k>1&&(r.strong||!M||"*"!==a&&L&&!E.test(C)?r.strong!=a||!L||"*"!==a&&M&&!E.test(S)||(N=!1):N=!0),null!=N||null!=A){n.highlightFormatting&&(r.formatting=null==A?"strong":null==N?"em":"strong em"),!0===A&&(r.em=a),!0===N&&(r.strong=a);var g=d(r);return!1===A&&(r.em=!1),!1===N&&(r.strong=!1),g}}else if(" "===a&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return d(r);t.backUp(1)}if(n.strikethrough)if("~"===a&&t.eatWhile(a)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var g=d(r);return r.strikethrough=!1,g}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),d(r)}else if(" "===a&&t.match(/^~~/,!0)){if(" "===t.peek())return d(r);t.backUp(2)}if(n.emoji&&":"===a&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var D=d(r);return r.emoji=!1,D}return" "===a&&(t.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),d(r)}function p(e,t){if(">"===e.next()){t.f=t.inline=h,n.highlightFormatting&&(t.formatting="link");var r=d(t);return r?r+=" ":r="",r+w.linkInline}return e.match(/^[^>]+/,!0),w.linkInline}function m(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=g("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,d(t)):"error"}function g(e){return function(t,r){if(t.next()===e){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link-string");var i=d(r);return r.linkHref=!1,i}return t.match(O[e]),r.linkHref=!0,d(r)}}function v(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=x,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,d(t)):i(e,t,h)}function x(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=b,n.highlightFormatting&&(t.formatting="link");var r=d(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function b(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=h,w.linkHref+" url")}var y=e.getMode(t,"text/html"),k="null"==y.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var w={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var C in w)w.hasOwnProperty(C)&&n.tokenTypeOverrides[C]&&(w[C]=n.tokenTypeOverrides[C]);var S=/^([*\-_])(?:\s*\1){2,}\s*$/,M=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,T=/^\[(x| )\](?=\s)/i,L=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,A=/^ {0,3}(?:\={1,}|-{2,})\s*$/,N=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,F=/^\s*\[[^\]]+?\]:.*$/,E=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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\uA8FC\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-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/},z={startState:function(){return{f:s,prevLine:{stream:null},thisLine:{stream:null},block:s,htmlState:null,indentation:0,inline:h,text:f,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(y,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return l(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=c)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:y}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:z}},indent:function(t,n,r){return t.block==c&&y.indent?y.indent(t.htmlState,n,r):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},blankLine:l,getType:d,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")})},458:function(e,t,n){!function(e){e(n(450))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(s("atom","]]>")):null:e.match("--")?n(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=o,t.state=h,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(t))return;d(e)}}function h(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?m:h}function p(e,t,n){return"word"==e?(n.tagName=t.current(),L="tag",x):C.allowMissingTagName&&"endTag"==e?(L="tag bracket",x(e,t,n)):(L="error",p)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==r||!1===C.matchClosing?(L="tag",g):(L="tag error",v)}return C.allowMissingTagName&&"endTag"==e?(L="tag bracket",g(e,t,n)):(L="error",v)}function g(e,t,n){return"endTag"!=e?(L="error",g):(d(n),h)}function v(e,t,n){return L="error",g(e,t,n)}function x(e,t,n){if("word"==e)return L="attribute",b;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(r)?f(n,r):(f(n,r),n.context=new u(n,r,i==n.indented)),h}return L="error",x}function b(e,t,n){return"equals"==e?y:(C.allowMissing||(L="error"),x(e,t,n))}function y(e,t,n){return"string"==e?k:"word"==e&&C.allowUnquoted?(L="string",x):(L="error",x(e,t,n))}function k(e,t,n){return"string"==e?k:x(e,t,n)}var w=r.indentUnit,C={},S=i.htmlMode?t:n;for(var M in S)C[M]=S[M];for(var M in i)C[M]=i[M];var T,L;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:h,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(L=null,t.state=t.state(T||n,e,t),L&&(n="error"==L?n+" error":L)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==C.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+w:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==y&&(e.state=x)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},459:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},460:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},461:function(e,t,n){var r=n(502);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},462:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},463:function(e,t,n){var r=n(461),i=n(459);e.exports=function(e){return r(i(e))}},474:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(488),i=n.n(r),o=n(922),a=n.n(o);t.default={name:"markdown-editor",props:{value:String,previewClass:String,customTheme:{type:Boolean,default:function(){return!1}},configs:{type:Object,default:function(){return{}}}},ready:function(){this.initialize(),this.syncValue()},mounted:function(){this.initialize()},methods:{initialize:function(){var e={};i()(e,this.configs),e.element=e.element||this.$el.firstElementChild,e.initialValue=e.initialValue||this.value,this.simplemde=new a.a(e),e.renderingConfig&&e.renderingConfig.codeSyntaxHighlighting&&n.e(13).then(function(){var t=e.renderingConfig.highlightingTheme||"default";window.hljs=n(730),n(916)("./"+t+".css")}.bind(null,n)).catch(n.oe),this.customTheme||n(728);var t=this.previewClass||"";this.addPreviewClass(t),this.bindingEvents()},bindingEvents:function(){var e=this;this.simplemde.codemirror.on("change",function(){e.$emit("input",e.simplemde.value())})},addPreviewClass:function(e){var t=this.simplemde.codemirror.getWrapperElement(),n=document.createElement("div");t.nextSibling.className+=" "+e,n.className="editor-preview "+e,t.appendChild(n)},syncValue:function(){var e=this;this.simplemde.codemirror.on("change",function(){e.value=e.simplemde.value()})}},destroyed:function(){this.simplemde=null},watch:{value:function(e){e!==this.simplemde.value()&&this.simplemde.value(e)}}}},483:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(961);n.n(r);t.default={data:function(){return{content:"",configs:{status:!0,initialValue:"Hello BBK",renderingConfig:{codeSyntaxHighlighting:!0,highlightingTheme:"atom-one-light"}}}},components:{markdownEditor:r.markdownEditor}}},488:function(e,t,n){e.exports={default:n(498),__esModule:!0}},491:function(e,t,n){"use strict";function r(e){if(e=e||{},"function"!=typeof e.codeMirrorInstance||"function"!=typeof e.codeMirrorInstance.defineMode)return void console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",function(t){if(!r.aff_loading){r.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(r.aff_data=n.responseText,2==++r.num_loaded&&(r.typo=new i("en_US",r.aff_data,r.dic_data,{platform:"any"})))},n.send(null)}if(!r.dic_loading){r.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(r.dic_data=o.responseText,2==++r.num_loaded&&(r.typo=new i("en_US",r.aff_data,r.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',l={token:function(e){var t=e.peek(),n="";if(a.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!a.includes(t);)n+=t,e.next();return r.typo&&!r.typo.check(n)?"spell-error":null}},s=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(s,l,!0)})}var i=n(923);r.num_loaded=0,r.aff_loading=!1,r.dic_loading=!1,r.aff_data="",r.dic_data="",r.typo,e.exports=r},492:function(e,t,n){!function(e){e(n(450))}(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))})})},493:function(e,t,n){!function(e){e(n(450))}(function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout(function(){var r=!1;if(1==e.lineCount()){var i=e.getInputField();r="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}r?n(e):t(e)},20)}function i(e){a(e)&&n(e)}function o(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",function(n,a,l){var s=l&&l!=e.Init;if(a&&!s)n.on("blur",i),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),o(n);else if(!a&&s){n.off("blur",i),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&i(n)})})},494:function(e,t,n){!function(e){e(n(450))}(function(e){"use strict";function t(e,t){var r=t.line,i=0,o=0,a=n.exec(e.getLine(r)),l=a[1];do{i+=1;var s=r+i,c=e.getLine(s),u=n.exec(c);if(u){var d=u[1],f=parseInt(a[3],10)+i-o,h=parseInt(u[3],10),p=h;if(l!==d||isNaN(h)){if(l.length>d.length)return;if(l.length<d.length&&1===i)return;o+=1}else f===h&&(p=h+1),f>h&&(p=f+1),e.replaceRange(c.replace(n,d+p+u[4]+u[5]),{line:s,ch:0},{line:s,ch:c.length})}}while(u)}var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,r=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],s=0;s<a.length;s++){var c=a[s].head,u=o.getStateAfter(c.line),d=e.innerMode(o.getMode(),u);if("markdown"!==d.mode.name)return void o.execCommand("newlineAndIndent");u=d.state;var f=!1!==u.list,h=0!==u.quote,p=o.getLine(c.line),m=n.exec(p),g=/^\s*$/.test(p.slice(0,c.ch));if(!a[s].empty()||!f&&!h||!m||g)return void o.execCommand("newlineAndIndent");if(r.test(p)){var v=h&&/>\s*$/.test(p),x=!/>\s*$/.test(p);(v||x)&&o.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),l[s]="\n"}else{var b=m[1],y=m[5],k=!(i.test(m[2])||m[2].indexOf(">")>=0),w=k?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");l[s]="\n"+b+w+y,k&&t(o,c)}}o.replaceSelections(l)}})},495:function(e,t,n){!function(e){e(n(450))}(function(e){"use strict";function t(e){e.state.markedSelection&&e.operation(function(){a(e)})}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation(function(){i(e)})}function r(e,t,n,r){if(0!=c(t,n))for(var i=e.state.markedSelection,o=e.state.markedSelectionStyle,a=t.line;;){var u=a==t.line?t:s(a,0),d=a+l,f=d>=n.line,h=f?n:s(d,0),p=e.markText(u,h,{className:o});if(null==r?i.push(p):i.splice(r++,0,p),f)break;a=d}}function i(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function o(e){i(e);for(var t=e.listSelections(),n=0;n<t.length;n++)r(e,t[n].from(),t[n].to())}function a(e){if(!e.somethingSelected())return i(e);if(e.listSelections().length>1)return o(e);var t=e.getCursor("start"),n=e.getCursor("end"),a=e.state.markedSelection;if(!a.length)return r(e,t,n);var s=a[0].find(),u=a[a.length-1].find();if(!s||!u||n.line-t.line<=l||c(t,u.to)>=0||c(n,s.from)<=0)return o(e);for(;c(t,s.from)>0;)a.shift().clear(),s=a[0].find();for(c(t,s.from)<0&&(s.to.line-t.line<l?(a.shift().clear(),r(e,t,s.to,0)):r(e,t,s.from,0));c(n,u.to)<0;)a.pop().clear(),u=a[a.length-1].find();c(n,u.to)>0&&(n.line-u.from.line<l?(a.pop().clear(),r(e,u.from,n)):r(e,u.to,n))}e.defineOption("styleSelectedText",!1,function(r,a,l){var s=l&&l!=e.Init;a&&!s?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof a?a:"CodeMirror-selectedtext",o(r),r.on("cursorActivity",t),r.on("change",n)):!a&&s&&(r.off("cursorActivity",t),r.off("change",n),i(r),r.state.markedSelection=r.state.markedSelectionStyle=null)});var l=8,s=e.Pos,c=e.cmpPos})},496:function(e,t,n){!function(e){e(n(450),n(457),n(456))}(function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,r){function i(e){return e.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var i=e.pos;e.eatWhile("`");var a=1+e.pos-i;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:i},l={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in r)l[s]=r[s];return l.name="markdown",e.overlayMode(e.getMode(n,l),a)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},497:function(e,t,n){!function(e){e(n(450))}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}})},498:function(e,t,n){n(524),e.exports=n(452).Object.assign},499:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},500:function(e,t,n){var r=n(455);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},501:function(e,t,n){var r=n(463),i=n(520),o=n(519);e.exports=function(e){return function(t,n,a){var l,s=r(t),c=i(s.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}}},502:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},503:function(e,t,n){var r=n(499);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},504:function(e,t,n){var r=n(455),i=n(454).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},505:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},506:function(e,t,n){var r=n(454),i=n(452),o=n(503),a=n(507),l=n(460),s=function(e,t,n){var c,u,d,f=e&s.F,h=e&s.G,p=e&s.S,m=e&s.P,g=e&s.B,v=e&s.W,x=h?i:i[t]||(i[t]={}),b=x.prototype,y=h?r:p?r[t]:(r[t]||{}).prototype;h&&(n=t);for(c in n)(u=!f&&y&&void 0!==y[c])&&l(x,c)||(d=u?y[c]:n[c],x[c]=h&&"function"!=typeof y[c]?n[c]:g&&u?o(d,r):v&&y[c]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((x.virtual||(x.virtual={}))[c]=d,e&s.R&&b&&!b[c]&&a(b,c,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},507:function(e,t,n){var r=n(511),i=n(516);e.exports=n(451)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},508:function(e,t,n){e.exports=!n(451)&&!n(453)(function(){return 7!=Object.defineProperty(n(504)("div"),"a",{get:function(){return 7}}).a})},509:function(e,t){e.exports=!0},510:function(e,t,n){"use strict";var r=n(451),i=n(514),o=n(512),a=n(515),l=n(521),s=n(461),c=Object.assign;e.exports=!c||n(453)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r})?function(e,t){for(var n=l(e),c=arguments.length,u=1,d=o.f,f=a.f;c>u;)for(var h,p=s(arguments[u++]),m=d?i(p).concat(d(p)):i(p),g=m.length,v=0;g>v;)h=m[v++],r&&!f.call(p,h)||(n[h]=p[h]);return n}:c},511:function(e,t,n){var r=n(500),i=n(508),o=n(522),a=Object.defineProperty;t.f=n(451)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},512:function(e,t){t.f=Object.getOwnPropertySymbols},513:function(e,t,n){var r=n(460),i=n(463),o=n(501)(!1),a=n(517)("IE_PROTO");e.exports=function(e,t){var n,l=i(e),s=0,c=[];for(n in l)n!=a&&r(l,n)&&c.push(n);for(;t.length>s;)r(l,n=t[s++])&&(~o(c,n)||c.push(n));return c}},514:function(e,t,n){var r=n(513),i=n(505);e.exports=Object.keys||function(e){return r(e,i)}},515:function(e,t){t.f={}.propertyIsEnumerable},516:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},517:function(e,t,n){var r=n(518)("keys"),i=n(523);e.exports=function(e){return r[e]||(r[e]=i(e))}},518:function(e,t,n){var r=n(452),i=n(454),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(509)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},519:function(e,t,n){var r=n(462),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},520:function(e,t,n){var r=n(462),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},521:function(e,t,n){var r=n(459);e.exports=function(e){return Object(r(e))}},522:function(e,t,n){var r=n(455);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},523:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},524:function(e,t,n){var r=n(506);r(r.S+r.F,"Object",{assign:n(510)})},618:function(e,t,n){t=e.exports=n(74)(!1),t.push([e.i,'/**\n * simplemde v1.11.2\n * Copyright Next Step Webs, Inc.\n * @link https://github.com/NextStepWebs/simplemde-markdown-editor\n * @license MIT\n */\n.CodeMirror{color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\'\'}span.CodeMirror-selectedtext{background:0 0}.CodeMirror{height:auto;min-height:300px;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:1}.CodeMirror-scroll{min-height:300px}.CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-sided{width:50%!important}.editor-toolbar{position:relative;opacity:.6;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:0 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar:after,.editor-toolbar:before{display:block;content:\' \';height:1px}.editor-toolbar:before{margin-bottom:8px}.editor-toolbar:after{margin-top:8px}.editor-toolbar:hover,.editor-wrapper input.title:focus,.editor-wrapper input.title:hover{opacity:.8}.editor-toolbar.fullscreen{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,1)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);position:fixed;top:0;right:0;margin:0;padding:0}.editor-toolbar a{display:inline-block;text-align:center;text-decoration:none!important;color:#2c3e50!important;width:30px;height:30px;margin:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar a.active,.editor-toolbar a:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar a:before{line-height:30px}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar a.fa-header-x:after{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar a.fa-header-1:after{content:"1"}.editor-toolbar a.fa-header-2:after{content:"2"}.editor-toolbar a.fa-header-3:after{content:"3"}.editor-toolbar a.fa-header-bigger:after{content:"\\25B2"}.editor-toolbar a.fa-header-smaller:after{content:"\\25BC"}.editor-toolbar.disabled-for-preview a:not(.no-disable){pointer-events:none;background:#fff;border-color:transparent;text-shadow:inherit}@media only screen and (max-width:700px){.editor-toolbar a.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-preview,.editor-preview-side{padding:10px;background:#fafafa;overflow:auto;display:none;box-sizing:border-box}.editor-statusbar .lines:before{content:\'lines: \'}.editor-statusbar .words:before{content:\'words: \'}.editor-statusbar .characters:before{content:\'characters: \'}.editor-preview{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;border:1px solid #ddd}.editor-preview-active,.editor-preview-active-side{display:block}.editor-preview-side>p,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}',""])},632:function(e,t,n){t=e.exports=n(74)(!1),t.push([e.i,".markdown-editor .markdown-body{padding:.5em}.markdown-editor .editor-preview-active,.markdown-editor .editor-preview-active-side{display:block}",""])},728:function(e,t,n){var r=n(618);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(162)("1a9401b8",r,!0)},919:function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function n(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return r=e[Symbol.iterator](),r.next.bind(r)}function o(e,t){if(t){if(w.test(e))return e.replace(C,L)}else if(S.test(e))return e.replace(M,L);return e}function a(e){return e.replace(A,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=r.source||r,r=r.replace(N,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}function s(e,t,n){if(e){var r;try{r=decodeURIComponent(a(n)).replace(D,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!F.test(n)&&(n=c(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}function c(e,t){E[" "+e]||(O.test(e)?E[" "+e]=e+"/":E[" "+e]=f(e,"/",!0)),e=E[" "+e];var n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(z,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(I,"$1")+t:e+t}function u(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function d(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}),r=n.split(/ \|/),i=0;if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function f(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.substr(0,r-i)}function h(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1}function p(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function m(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function g(e,t,n){var r=t.href,i=t.title?B(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:o}:{type:"image",raw:n,href:r,title:i,text:B(o)}}function v(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map(function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e}).join("\n")}function x(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function b(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}function y(e,t,n){if(void 0===e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=ue({},y.defaults,t||{}),de(t),n){var r,i=t.highlight;try{r=ee.lex(e,t)}catch(e){return n(e)}var o=function(e){var o;if(!e)try{o=ce.parse(r,t)}catch(t){e=t}return t.highlight=i,e?n(e):n(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!r.length)return o();var a=0;return y.walkTokens(r,function(e){"code"===e.type&&(a++,setTimeout(function(){i(e.text,e.lang,function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0===--a&&o()})},0))}),void(0===a&&o())}try{var l=ee.lex(e,t);return t.walkTokens&&y.walkTokens(l,t.walkTokens),ce.parse(l,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+fe(e.message+"",!0)+"</pre>";throw e}}var k=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}}),w=(k.defaults,k.getDefaults,k.changeDefaults,/[&<>"']/),C=/[&<>"']/g,S=/[<>"']|&(?!#?\w+;)/,M=/[<>"']|&(?!#?\w+;)/g,T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},L=function(e){return T[e]},A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,N=/(^|[^\[])\^/g,D=/[^\w:]/g,F=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,E={},O=/^[^:]+:\/*[^/]*$/,z=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/,_={exec:function(){}},R={escape:o,unescape:a,edit:l,cleanUrl:s,resolveUrl:c,noopTest:_,merge:u,splitCells:d,rtrim:f,findClosingBracket:h,checkSanitizeDeprecation:p,repeatString:m},H=k.defaults,P=R.rtrim,W=R.splitCells,B=R.escape,j=R.findClosingBracket,q=function(){function e(e){this.options=e||H}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:P(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=v(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:W(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=W(n.cells[r],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,l,s,c,u=t[0],d=t[2],f=d.length>1,h={type:"list",raw:u,ordered:f,start:f?+d.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,g=p.length;i=this.rules.block.listItemStart.exec(p[0]);for(var v=0;v<g;v++){if(n=p[v],u=n,v!==g-1){if(o=this.rules.block.listItemStart.exec(p[v+1]),o[1].length>i[0].length||o[1].length>3){p.splice(v,2,p[v]+"\n"+p[v+1]),v--,g--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==d[d.length-1]:f===(1===o[2].length))&&(a=p.slice(v+1).join("\n"),h.raw=h.raw.substring(0,h.raw.length-a.length),v=g-1),i=o}r=n.length,n=n.replace(/^ *([*+-]|\d+[.)]) ?/,""),~n.indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),l=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),l||(l=m)),l&&(h.loose=!0),this.options.gfm&&(s=/^\[[ xX]\] /.test(n),c=void 0,s&&(c=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,""))),h.items.push({type:"list_item",raw:u,task:s,checked:c,loose:l,text:n})}return h}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):B(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:W(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=W(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:B(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):B(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=j(t[2],"()");if(n>-1){var r=0===t[0].indexOf("!")?5:4,i=r+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,i).trim(),t[3]=""}var o=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l?(o=l[1],a=l[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";o=o.trim().replace(/^<([\s\S]*)>$/,"$1");return g(t,{href:o?o.replace(this.rules.inline._escapes,"$1"):o,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return g(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;i.lastIndex=0;for(var o;null!=(r=i.exec(t));)if(o=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,o[0].length),text:e.slice(2,o[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;i.lastIndex=0;for(var o;null!=(r=i.exec(t));)if(o=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,o[0].length),text:e.slice(1,o[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=B(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n=this.rules.inline.autolink.exec(e);if(n){var r,i;return"@"===n[2]?(r=B(this.options.mangle?t(n[1]):n[1]),i="mailto:"+r):(r=B(n[1]),i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])r=B(this.options.mangle?t(n[0]):n[0]),i="mailto:"+r;else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=B(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r=this.rules.inline.text.exec(e);if(r){var i;return i=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):B(r[0]):r[0]:B(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}},e}(),$=R.noopTest,U=R.edit,G=R.merge,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:$,table:$,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};V._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,V._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,V.def=U(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,V.item=U(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.listItemStart=U(/^( *)(bull)/).replace("bull",V.bullet).getRegex(),V.list=U(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,V.html=U(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=U(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=U(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=G({},V),V.gfm=G({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=U(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=U(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=G({},V.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:$,paragraph:U(V.normal._paragraph).replace("hr",V.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:$,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:$,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/};X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=U(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",X._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",X._comment=U(V._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),X.em.start=U(X.em.start).replace(/punctuation/g,X._punctuation).getRegex(),X.em.middle=U(X.em.middle).replace(/punctuation/g,X._punctuation).replace(/overlapSkip/g,X._overlapSkip).getRegex(),X.em.endAst=U(X.em.endAst,"g").replace(/punctuation/g,X._punctuation).getRegex(),X.em.endUnd=U(X.em.endUnd,"g").replace(/punctuation/g,X._punctuation).getRegex(),X.strong.start=U(X.strong.start).replace(/punctuation/g,X._punctuation).getRegex(),X.strong.middle=U(X.strong.middle).replace(/punctuation/g,X._punctuation).replace(/overlapSkip/g,X._overlapSkip).getRegex(),X.strong.endAst=U(X.strong.endAst,"g").replace(/punctuation/g,X._punctuation).getRegex(),X.strong.endUnd=U(X.strong.endUnd,"g").replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=U(X._blockSkip,"g").getRegex(),X.overlapSkip=U(X._overlapSkip,"g").getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._email=/[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])?)+(?![-_])/,X.autolink=U(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=U(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=U(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=U(X.reflink).replace("label",X._label).getRegex(),X.reflinkSearch=U(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal=G({},X),X.pedantic=G({},X.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:U(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()}),X.gfm=G({},X.normal,{escape:U(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),X.gfm.url=U(X.gfm.url,"i").replace("email",X.gfm._extended_email).getRegex(),X.breaks=G({},X.gfm,{br:U(X.br).replace("{2,}","*").getRegex(),text:U(X.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var K={block:V,inline:X},Z=k.defaults,Y=K.block,Q=K.inline,J=R.repeatString,ee=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Z,this.options.tokenizer=this.options.tokenizer||new q,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Y.normal,inline:Q.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=Q.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=Q.breaks:t.inline=Q.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n=e.prototype;return n.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.blockTokens=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");for(var r,i,o,a;e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):(a=t[t.length-1],a.raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i<o;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):(a=t[t.length-1],a.raw+="\n"+r.raw,a.text+="\n"+r.text);else if(e){var l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}return t},n.inline=function(e){var t,n,r,i,o,a,l=e.length;for(t=0;t<l;t++)switch(a=e[t],a.type){case"paragraph":case"text":case"heading":a.tokens=[],this.inlineTokens(a.text,a.tokens);break;case"table":for(a.tokens={header:[],cells:[]},i=a.header.length,n=0;n<i;n++)a.tokens.header[n]=[],this.inlineTokens(a.header[n],a.tokens.header[n]);for(i=a.cells.length,n=0;n<i;n++)for(o=a.cells[n],a.tokens.cells[n]=[],r=0;r<o.length;r++)a.tokens.cells[n][r]=[],this.inlineTokens(o[r],a.tokens.cells[n][r]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(i=a.items.length,n=0;n<i;n++)this.inline(a.items[n].tokens)}return e},n.inlineTokens=function(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1);var i,o,a,l,s=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+J("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+J("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a||(l=""),a=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r))e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.strong(e,s,l))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.em(e,s,l))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,b))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,b))){if(i=this.tokenizer.inlineText(e,r,x))e=e.substring(i.raw.length),l=i.raw.slice(-1),a=!0,t.push(i);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else e=e.substring(i.raw.length),t.push(i);return t},t(e,null,[{key:"rules",get:function(){return{block:Y,inline:Q}}}]),e}(),te=k.defaults,ne=R.cleanUrl,re=R.escape,ie=function(){function e(e){this.options=e||te}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+re(r,!0)+'">'+(n?e:re(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:re(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=ne(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+re(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=ne(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),oe=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),ae=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),le=k.defaults,se=R.unescape,ce=function(){function e(e){this.options=e||le,this.options.renderer=this.options.renderer||new ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new oe,this.slugger=new ae}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,l,s,c,u,d,f,h,p,m,g,v,x,b,y="",k=e.length;for(n=0;n<k;n++)switch(d=e[n],d.type){case"space":continue;case"hr":y+=this.renderer.hr();continue;case"heading":y+=this.renderer.heading(this.parseInline(d.tokens),d.depth,se(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":y+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",s="",o=d.header.length,r=0;r<o;r++)s+=this.renderer.tablecell(this.parseInline(d.tokens.header[r]),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(s),u="",o=d.cells.length,r=0;r<o;r++){for(l=d.tokens.cells[r],s="",a=l.length,i=0;i<a;i++)s+=this.renderer.tablecell(this.parseInline(l[i]),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(s)}y+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),y+=this.renderer.blockquote(u);continue;case"list":for(f=d.ordered,h=d.start,p=d.loose,o=d.items.length,u="",r=0;r<o;r++)g=d.items[r],v=g.checked,x=g.task,m="",g.task&&(b=this.renderer.checkbox(v),p?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,x,v);y+=this.renderer.list(u,f,h);continue;case"html":y+=this.renderer.html(d.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<k&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);y+=t?this.renderer.paragraph(u):u;continue;default:var w='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return y},t.parseInline=function(e,t){t=t||this.renderer;var n,r,i="",o=e.length;for(n=0;n<o;n++)switch(r=e[n],r.type){case"escape":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;case"text":i+=t.text(r.text);break;default:var a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}return i},e}(),ue=R.merge,de=R.checkSanitizeDeprecation,fe=R.escape,he=k.getDefaults,pe=k.changeDefaults,me=k.defaults;return y.options=y.setOptions=function(e){return ue(y.defaults,e),pe(y.defaults),y},y.getDefaults=he,y.defaults=me,y.use=function(e){var t=ue({},e);if(e.renderer&&function(){var n=y.defaults.renderer||new ie;for(var r in e.renderer)!function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=e.renderer[t].apply(n,o);return!1===l&&(l=r.apply(n,o)),l}}(r);t.renderer=n}(),e.tokenizer&&function(){var n=y.defaults.tokenizer||new q;for(var r in e.tokenizer)!function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=e.tokenizer[t].apply(n,o);return!1===l&&(l=r.apply(n,o)),l}}(r);t.tokenizer=n}(),e.walkTokens){var n=y.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}y.setOptions(t)},y.walkTokens=function(e,t){for(var n,r=i(e);!(n=r()).done;){var o=n.value;switch(t(o),o.type){case"table":for(var a,l=i(o.tokens.header);!(a=l()).done;){var s=a.value;y.walkTokens(s,t)}for(var c,u=i(o.tokens.cells);!(c=u()).done;)for(var d,f=c.value,h=i(f);!(d=h()).done;){var p=d.value;y.walkTokens(p,t)}break;case"list":y.walkTokens(o.items,t);break;default:o.tokens&&y.walkTokens(o.tokens,t)}}},y.parseInline=function(e,t){if(void 0===e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=ue({},y.defaults,t||{}),de(t);try{var n=ee.lexInline(e,t);return t.walkTokens&&y.walkTokens(n,t.walkTokens),ce.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+fe(e.message+"",!0)+"</pre>";throw e}},y.Parser=ce,y.parser=ce.parse,y.Renderer=ie,y.TextRenderer=oe,y.Lexer=ee,y.lexer=ee.lex,y.Tokenizer=q,y.Slugger=ae,y.parse=y,y})},921:function(e,t,n){var r=n(450);r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head;if(!1!==e.getStateAfter(n.line).list)return void e.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head;if(!1!==e.getStateAfter(n.line).list)return void e.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}}},922:function(e,t,n){"use strict";function r(e){return e=q?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function i(e,t,n){e=e||{};var r=document.createElement("a");return t=void 0==t||t,e.title&&t&&(r.title=a(e.title,e.action,n),q&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function o(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function a(e,t,n){var i,o=e;return t&&(i=G(t),n[i]&&(o+=" ("+r(n[i])+")")),o}function l(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var r,i,o=n.type.split(" "),a={},l=0;l<o.length;l++)r=o[l],"strong"===r?a.bold=!0:"variable-2"===r?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===r?a.quote=!0:"em"===r?a.italic=!0:"quote"===r?a.quote=!0:"strikethrough"===r?a.strikethrough=!0:"comment"===r?a.code=!0:"link"===r?a.link=!0:"tag"===r?a.image=!0:r.match(/^header(\-[1-6])?$/)&&(a[r.replace("header","heading")]=!0);return a}function s(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(X=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=X;var n=t.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen";var r=e.toolbarElements.fullscreen;/active/.test(r.className)?r.className=r.className.replace(/\s*active\s*/g,""):r.className+=" active",/editor-preview-active-side/.test(t.getWrapperElement().nextSibling.className)&&A(e)}function c(e){O(e,"bold",e.options.blockStyles.bold)}function u(e){O(e,"italic",e.options.blockStyles.italic)}function d(e){O(e,"strikethrough","~~")}function f(e){function t(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text).  Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function n(e){return e.state.base.base||e.state.base}function r(e,r,i,o,a){i=i||e.getLineHandle(r),o=o||e.getTokenAt({line:r,ch:1}),a=a||!!i.text&&e.getTokenAt({line:r,ch:i.text.length-1});var l=o.type?o.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1!==l.indexOf("comment")&&(n(o).fencedChars||n(a).fencedChars||t(i)?"fenced":"single")}var i,o,a,l=e.options.blockStyles.code,s=e.codemirror,c=s.getCursor("start"),u=s.getCursor("end"),d=s.getTokenAt({line:c.line,ch:c.ch||1}),f=s.getLineHandle(c.line),h=r(s,c.line,f,d);if("single"===h){var p=f.text.slice(0,c.ch).replace("`",""),m=f.text.slice(c.ch).replace("`","");s.replaceRange(p+m,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),c.ch--,c!==u&&u.ch--,s.setSelection(c,u),s.focus()}else if("fenced"===h)if(c.line!==u.line||c.ch!==u.ch){for(i=c.line;i>=0&&(f=s.getLineHandle(i),!t(f));i--);var g,v,x,b,y=s.getTokenAt({line:i,ch:1}),k=n(y).fencedChars;t(s.getLineHandle(c.line))?(g="",v=c.line):t(s.getLineHandle(c.line-1))?(g="",v=c.line-1):(g=k+"\n",v=c.line),t(s.getLineHandle(u.line))?(x="",b=u.line,0===u.ch&&(b+=1)):0!==u.ch&&t(s.getLineHandle(u.line+1))?(x="",b=u.line+1):(x=k+"\n",b=u.line+1),0===u.ch&&(b-=1),s.operation(function(){s.replaceRange(x,{line:b,ch:0},{line:b+(x?0:1),ch:0}),s.replaceRange(g,{line:v,ch:0},{line:v+(g?0:1),ch:0})}),s.setSelection({line:v+(g?1:0),ch:0},{line:b+(g?1:-1),ch:0}),s.focus()}else{var w=c.line;if(t(s.getLineHandle(c.line))&&("fenced"===r(s,c.line+1)?(i=c.line,w=c.line+1):(o=c.line,w=c.line-1)),void 0===i)for(i=w;i>=0&&(f=s.getLineHandle(i),!t(f));i--);if(void 0===o)for(a=s.lineCount(),o=w;o<a&&(f=s.getLineHandle(o),!t(f));o++);s.operation(function(){s.replaceRange("",{line:i,ch:0},{line:i+1,ch:0}),s.replaceRange("",{line:o-1,ch:0},{line:o,ch:0})}),s.focus()}else if("indented"===h){if(c.line!==u.line||c.ch!==u.ch)i=c.line,o=u.line,0===u.ch&&o--;else{for(i=c.line;i>=0;i--)if(f=s.getLineHandle(i),!f.text.match(/^\s*$/)&&"indented"!==r(s,i,f)){i+=1;break}for(a=s.lineCount(),o=c.line;o<a;o++)if(f=s.getLineHandle(o),!f.text.match(/^\s*$/)&&"indented"!==r(s,o,f)){o-=1;break}}var C=s.getLineHandle(o+1),S=C&&s.getTokenAt({line:o+1,ch:C.text.length-1}),M=S&&n(S).indentedCode;M&&s.replaceRange("\n",{line:o+1,ch:0});for(var T=i;T<=o;T++)s.indentLine(T,"subtract");s.focus()}else{var L=c.line===u.line&&c.ch===u.ch&&0===c.ch,A=c.line!==u.line;L||A?function(e,t,n,r){var i=t.line+1,o=n.line+1,a=t.line!==n.line,l=r+"\n",s="\n"+r;a&&o++,a&&0===n.ch&&(s=r+"\n",o--),D(e,!1,[l,s]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(s,c,u,l):D(s,!1,["`","`"])}}function h(e){E(e.codemirror,"quote")}function p(e){F(e.codemirror,"smaller")}function m(e){F(e.codemirror,"bigger")}function g(e){F(e.codemirror,void 0,1)}function v(e){F(e.codemirror,void 0,2)}function x(e){F(e.codemirror,void 0,3)}function b(e){E(e.codemirror,"unordered-list")}function y(e){E(e.codemirror,"ordered-list")}function k(e){z(e.codemirror)}function w(e){var t=e.codemirror,n=l(t),r=e.options,i="http://";if(r.promptURLs&&!(i=prompt(r.promptTexts.link)))return!1;D(t,n.link,r.insertTexts.link,i)}function C(e){var t=e.codemirror,n=l(t),r=e.options,i="http://";if(r.promptURLs&&!(i=prompt(r.promptTexts.image)))return!1;D(t,n.image,r.insertTexts.image,i)}function S(e){var t=e.codemirror,n=l(t),r=e.options;D(t,n.table,r.insertTexts.table)}function M(e){var t=e.codemirror,n=l(t),r=e.options;D(t,n.image,r.insertTexts.horizontalRule)}function T(e){var t=e.codemirror;t.undo(),t.focus()}function L(e){var t=e.codemirror;t.redo(),t.focus()}function A(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||s(e),r.className+=" editor-preview-active-side"},1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var l=e.toolbarElements.preview,c=n.previousSibling;l.className=l.className.replace(/\s*active\s*/g,""),c.className=c.className.replace(/\s*disabled-for-preview*/g,"")}var u=function(){r.innerHTML=e.options.previewRender(e.value(),r)};t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=u),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function N(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||(o=document.createElement("div"),o.className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),r.className=r.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),i&&(i.className+=" active",r.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o),/editor-preview-active-side/.test(t.getWrapperElement().nextSibling.className)&&A(e)}function D(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l=e.getCursor("start"),s=e.getCursor("end");r&&(a=a.replace("#url#",r)),t?(i=e.getLine(l.line),o=i.slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function F(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/);i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==n?o<=0?"# "+i:o==n?i.substr(o+1):"# "+i.substr(o+1):2==n?o<=0?"## "+i:o==n?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==n?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(o);e.focus()}}function E(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=l(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},s=r.line;s<=i.line;s++)!function(r){var i=e.getLine(r);i=n[t]?i.replace(o[t],"$1"):a[t]+i,e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(s);e.focus()}}function O(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r=void 0===r?n:r;var i,o=e.codemirror,a=l(o),s=n,c=r,u=o.getCursor("start"),d=o.getCursor("end");a[t]?(i=o.getLine(u.line),s=i.slice(0,u.ch),c=i.slice(u.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(s+c,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==d&&(d.ch-=2)):"italic"==t&&(u.ch-=1,u!==d&&(d.ch-=1))):(i=o.getSelection(),"bold"==t?(i=i.split("**").join(""),i=i.split("__").join("")):"italic"==t?(i=i.split("*").join(""),i=i.split("_").join("")):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+c),u.ch+=n.length,d.ch=u.ch+i.length),o.setSelection(u,d),o.focus()}}function z(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=e.getLine(i),t=t.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}function I(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=I(e[n]||{},t[n]):e[n]=t[n]);return e}function _(e){for(var t=1;t<arguments.length;t++)e=I(e,arguments[t]);return e}function R(e){var t=/[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,n=e.match(t),r=0;if(null===n)return r;for(var i=0;i<n.length;i++)n[i].charCodeAt(0)>=19968?r+=n[i].length:r+=1;return r}function H(e){e=e||{},e.parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var n=document.styleSheets,r=0;r<n.length;r++)n[r].href&&n[r].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar){e.toolbar=[];for(var o in K)K.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===K[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))}e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=_({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=_({},Z,e.insertTexts||{}),e.promptTexts=Y,e.blockStyles=_({},Q,e.blockStyles||{}),e.shortcuts=_({},U,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue)}function P(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}var W=n(450);n(494),n(921),n(492),n(457),n(456),n(493),n(495),n(496),n(458);var B=n(491),j=n(919),q=/Mac/.test(navigator.platform),$={toggleBold:c,toggleItalic:u,drawLink:w,toggleHeadingSmaller:p,toggleHeadingBigger:m,drawImage:C,toggleBlockquote:h,toggleOrderedList:y,toggleUnorderedList:b,toggleCodeBlock:f,togglePreview:N,toggleStrikethrough:d,toggleHeading1:g,toggleHeading2:v,toggleHeading3:x,cleanBlock:k,drawTable:S,drawHorizontalRule:M,undo:T,redo:L,toggleSideBySide:A,toggleFullScreen:s},U={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},G=function(e){for(var t in $)if($[t]===e)return t;return null},V=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},X="",K={bold:{name:"bold",action:c,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:u,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:d,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:m,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:g,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:x,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:f,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:h,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:b,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:y,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:k,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:w,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:C,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:S,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:M,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:N,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:A,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:s,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:T,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:L,className:"fa fa-repeat no-disable",title:"Redo"}},Z={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text     | Text     | Text     |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Y={link:"URL for the link:",image:"URL of the image:"},Q={bold:"**",code:"```",italic:"*"};H.prototype.markdown=function(e){if(j){var t={};return this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),j.setOptions(t),j(e)}},H.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t=this.options,n=this,i={};for(var o in t.shortcuts)null!==t.shortcuts[o]&&null!==$[o]&&function(e){i[r(t.shortcuts[e])]=function(){$[e](n)}}(o);i.Enter="newlineAndIndentContinueMarkdownList",i.Tab="tabAndIndentMarkdownList",i["Shift-Tab"]="shiftTabAndUnindentMarkdownList",i.Esc=function(e){e.getOption("fullScreen")&&s(n)},document.addEventListener("keydown",function(e){e=e||window.event,27==e.keyCode&&n.codemirror.getOption("fullScreen")&&s(n)},!1);var a,l;if(!1!==t.spellChecker?(a="spell-checker",l=t.parsingConfig,l.name="gfm",l.gitHubSpice=!1,B({codeMirrorInstance:W})):(a=t.parsingConfig,a.name="gfm",a.gitHubSpice=!1),this.codemirror=W.fromTextArea(e,{mode:a,backdrop:l,theme:"paper",tabSize:void 0!=t.tabSize?t.tabSize:2,indentUnit:void 0!=t.tabSize?t.tabSize:2,indentWithTabs:!1!==t.indentWithTabs,lineNumbers:!1,autofocus:!0===t.autofocus,extraKeys:i,lineWrapping:!1!==t.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:t.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0==t.styleSelectedText||t.styleSelectedText}),!0===t.forceSync){var c=this.codemirror;c.on("change",function(){c.save()})}this.gui={},!1!==t.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==t.status&&(this.gui.statusbar=this.createStatusbar()),void 0!=t.autosave&&!0===t.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var u=this.codemirror;setTimeout(function(){u.refresh()}.bind(u),0)}},H.prototype.autosave=function(){if(P()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)}),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r;a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=i<10?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout(function(){e.autosave()},this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},H.prototype.clearAutosavedValue=function(){if(P()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},H.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||(n=document.createElement("div"),n.className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var r=!1,i=!1;return e.on("scroll",function(e){if(r)return void(r=!1);i=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}),n.onscroll=function(){if(i)return void(i=!1);r=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,a)},n},H.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t<e.length;t++)void 0!=K[e[t]]&&(e[t]=K[e[t]]);var n=document.createElement("div");n.className="editor-toolbar";var r=this,a={};for(r.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==r.options.toolbarGuideIcon)&&!(r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&V())){if("|"===e[t]){for(var s=!1,c=t+1;c<e.length;c++)"|"===e[c]||r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[c].name)||(s=!0);if(!s)continue}!function(e){var t;t="|"===e?o():i(e,r.options.toolbarTips,r.options.shortcuts),e.action&&("function"==typeof e.action?t.onclick=function(t){t.preventDefault(),e.action(r)}:"string"==typeof e.action&&(t.href=e.action,t.target="_blank")),a[e.name||e]=t,n.appendChild(t)}(e[t])}r.toolbarElements=a;var u=this.codemirror;u.on("cursorActivity",function(){var e=l(u);for(var t in a)!function(t){var n=a[t];e[t]?n.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&(n.className=n.className.replace(/\s*active\s*/g,""))}(t)});var d=u.getWrapperElement();return d.parentNode.insertBefore(n,d),n}},H.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,n=this.codemirror;if(e&&0!==e.length){var r,i,o,a=[];for(r=0;r<e.length;r++)if(i=void 0,o=void 0,"object"==typeof e[r])a.push({className:e[r].className,defaultValue:e[r].defaultValue,onUpdate:e[r].onUpdate});else{var l=e[r];"words"===l?(o=function(e){e.innerHTML=R(n.getValue())},i=function(e){e.innerHTML=R(n.getValue())}):"lines"===l?(o=function(e){e.innerHTML=n.lineCount()},i=function(e){e.innerHTML=n.lineCount()}):"cursor"===l?(o=function(e){e.innerHTML="0:0"},i=function(e){var t=n.getCursor();e.innerHTML=t.line+":"+t.ch}):"autosave"===l&&(o=function(e){void 0!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}),a.push({className:l,defaultValue:o,onUpdate:i})}var s=document.createElement("div");for(s.className="editor-statusbar",r=0;r<a.length;r++){var c=a[r],u=document.createElement("span");u.className=c.className,"function"==typeof c.defaultValue&&c.defaultValue(u),"function"==typeof c.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(u,c)),s.appendChild(u)}var d=this.codemirror.getWrapperElement();return d.parentNode.insertBefore(s,d.nextSibling),s}},H.prototype.value=function(e){return void 0===e?this.codemirror.getValue():(this.codemirror.getDoc().setValue(e),this)},H.toggleBold=c,H.toggleItalic=u,H.toggleStrikethrough=d,H.toggleBlockquote=h,H.toggleHeadingSmaller=p,H.toggleHeadingBigger=m,H.toggleHeading1=g,H.toggleHeading2=v,H.toggleHeading3=x,H.toggleCodeBlock=f,H.toggleUnorderedList=b,H.toggleOrderedList=y,H.cleanBlock=k,H.drawLink=w,H.drawImage=C,H.drawTable=S,H.drawHorizontalRule=M,H.undo=T,H.redo=L,H.togglePreview=N,H.toggleSideBySide=A,H.toggleFullScreen=s,H.prototype.toggleBold=function(){c(this)},H.prototype.toggleItalic=function(){u(this)},H.prototype.toggleStrikethrough=function(){d(this)},H.prototype.toggleBlockquote=function(){h(this)},H.prototype.toggleHeadingSmaller=function(){p(this)},H.prototype.toggleHeadingBigger=function(){m(this)},H.prototype.toggleHeading1=function(){g(this)},H.prototype.toggleHeading2=function(){v(this)},H.prototype.toggleHeading3=function(){x(this)},H.prototype.toggleCodeBlock=function(){f(this)},H.prototype.toggleUnorderedList=function(){b(this)},H.prototype.toggleOrderedList=function(){y(this)},H.prototype.cleanBlock=function(){k(this)},H.prototype.drawLink=function(){w(this)},H.prototype.drawImage=function(){C(this)},H.prototype.drawTable=function(){S(this)},H.prototype.drawHorizontalRule=function(){M(this)},H.prototype.undo=function(){T(this)},H.prototype.redo=function(){L(this)},H.prototype.togglePreview=function(){N(this)},H.prototype.toggleSideBySide=function(){A(this)},H.prototype.toggleFullScreen=function(){s(this)},H.prototype.isPreviewActive=function(){return/editor-preview-active/.test(this.codemirror.getWrapperElement().lastChild.className)},H.prototype.isSideBySideActive=function(){return/editor-preview-active-side/.test(this.codemirror.getWrapperElement().nextSibling.className)},H.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},H.prototype.getState=function(){return l(this.codemirror)},H.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement();t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},e.exports=H},923:function(e,t,n){(function(t){var r;!function(){"use strict";r=function(e,n,r,i){function o(e,t){var n=p._readFile(e,null,i.asyncLoad);i.asyncLoad?n.then(function(e){t(e)}):t(n)}function a(e){n=e,r&&s()}function l(e){r=e,n&&s()}function s(){for(p.rules=p._parseAFF(n),p.compoundRuleCodes={},u=0,f=p.compoundRules.length;u<f;u++){var e=p.compoundRules[u];for(d=0,h=e.length;d<h;d++)p.compoundRuleCodes[e[d]]=[]}"ONLYINCOMPOUND"in p.flags&&(p.compoundRuleCodes[p.flags.ONLYINCOMPOUND]=[]),p.dictionaryTable=p._parseDIC(r);for(u in p.compoundRuleCodes)0===p.compoundRuleCodes[u].length&&delete p.compoundRuleCodes[u];for(u=0,f=p.compoundRules.length;u<f;u++){var t=p.compoundRules[u],o="";for(d=0,h=t.length;d<h;d++){var a=t[d];a in p.compoundRuleCodes?o+="("+p.compoundRuleCodes[a].join("|")+")":o+=a}p.compoundRules[u]=new RegExp(o,"i")}p.loaded=!0,i.asyncLoad&&i.loadedCallback&&i.loadedCallback(p)}i=i||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=i.flags||{},this.memoized={},this.loaded=!1;var c,u,d,f,h,p=this;return e&&(p.dictionary=e,n&&r?s():"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(c=i.dictionaryPath?i.dictionaryPath:"typo/dictionaries",n||o(chrome.extension.getURL(c+"/"+e+"/"+e+".aff"),a),r||o(chrome.extension.getURL(c+"/"+e+"/"+e+".dic"),l)):(c=i.dictionaryPath?i.dictionaryPath:t+"/dictionaries",n||o(c+"/"+e+"/"+e+".aff",a),r||o(c+"/"+e+"/"+e+".dic",l))),this},r.prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(e,t,r){if(t=t||"utf8","undefined"!=typeof XMLHttpRequest){var i,o=new XMLHttpRequest;return o.open("GET",e,r),r&&(i=new Promise(function(e,t){o.onload=function(){200===o.status?e(o.responseText):t(o.statusText)},o.onerror=function(){t(o.statusText)}})),o.overrideMimeType&&o.overrideMimeType("text/plain; charset="+t),o.send(null),r?i:o.responseText}var a=n(977);try{if(a.existsSync(e))return a.readFileSync(e,t);console.log("Path "+e+" does not exist.")}catch(e){return console.log(e),""}},_parseAFF:function(e){var t,n,r,i,o,a,l,s,c={};e=this._removeAffixComments(e);var u=e.split(/\r?\n/);for(o=0,l=u.length;o<l;o++){t=u[o];var d=t.split(/\s+/),f=d[0];if("PFX"==f||"SFX"==f){var h=d[1],p=d[2];r=parseInt(d[3],10);var m=[];for(a=o+1,s=o+1+r;a<s;a++){n=u[a],i=n.split(/\s+/);var g=i[2],v=i[3].split("/"),x=v[0];"0"===x&&(x="");var b=this.parseRuleCodes(v[1]),y=i[4],k={};k.add=x,b.length>0&&(k.continuationClasses=b),"."!==y&&(k.match="SFX"===f?new RegExp(y+"$"):new RegExp("^"+y)),"0"!=g&&(k.remove="SFX"===f?new RegExp(g+"$"):g),m.push(k)}c[h]={type:f,combineable:"Y"==p,entries:m},o+=r}else if("COMPOUNDRULE"===f){for(r=parseInt(d[1],10),a=o+1,s=o+1+r;a<s;a++)t=u[a],i=t.split(/\s+/),this.compoundRules.push(i[1]);o+=r}else"REP"===f?(i=t.split(/\s+/),3===i.length&&this.replacementTable.push([i[1],i[2]])):this.flags[f]=d[1]}return c},_removeAffixComments:function(e){return e=e.replace(/^\s*#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){function t(e,t){r.hasOwnProperty(e)||(r[e]=null),t.length>0&&(null===r[e]&&(r[e]=[]),r[e].push(t))}e=this._removeDicComments(e);for(var n=e.split(/\r?\n/),r={},i=1,o=n.length;i<o;i++){var a=n[i];if(a){var l=a.split("/",2),s=l[0];if(l.length>1){var c=this.parseRuleCodes(l[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||t(s,c);for(var u=0,d=c.length;u<d;u++){var f=c[u],h=this.rules[f];if(h)for(var p=this._applyRule(s,h),m=0,g=p.length;m<g;m++){var v=p[m];if(t(v,[]),h.combineable)for(var x=u+1;x<d;x++){var b=c[x],y=this.rules[b];if(y&&y.combineable&&h.type!=y.type)for(var k=this._applyRule(v,y),w=0,C=k.length;w<C;w++){var S=k[w];t(S,[])}}}f in this.compoundRuleCodes&&this.compoundRuleCodes[f].push(s)}}else t(s.trim(),[])}}return r},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],n=0,r=e.length;n<r;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?e.split(","):void 0},_applyRule:function(e,t){for(var n=t.entries,r=[],i=0,o=n.length;i<o;i++){var a=n[i];if(!a.match||e.match(a.match)){var l=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,r.push(l),"continuationClasses"in a)for(var s=0,c=a.continuationClasses.length;s<c;s++){var u=this.rules[a.continuationClasses[s]];u&&(r=r.concat(this._applyRule(l,u)))}}}return r},check:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var r=t.toLowerCase();if(r!==t){if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,n,r=this.dictionaryTable[e];if(void 0===r){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,n=this.compoundRules.length;t<n;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===r)return!0;if("object"==typeof r)for(t=0,n=r.length;t<n;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",r[t]))return!0}return!1},hasFlag:function(e,t,n){if(!this.loaded)throw"Dictionary not loaded.";return!!(t in this.flags&&(void 0===n&&(n=Array.prototype.concat.apply([],this.dictionaryTable[e])),n&&-1!==n.indexOf(this.flags[t])))},alphabet:"",suggest:function(e,t){function n(e,t){var n,r,i,o,a,l={};if("string"==typeof e){var c=e;e={},e[c]=!0}for(var c in e)for(n=0,i=c.length+1;n<i;n++){var u=[c.substring(0,n),c.substring(n)];if(u[1]&&(a=u[0]+u[1].substring(1),t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1)),u[1].length>1&&u[1][1]!==u[1][0]&&(a=u[0]+u[1][1]+u[1][0]+u[1].substring(2),t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1)),u[1])for(r=0,o=s.alphabet.length;r<o;r++)s.alphabet[r]!=u[1].substring(0,1)&&(a=u[0]+s.alphabet[r]+u[1].substring(1),t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1));if(u[1])for(r=0,o=s.alphabet.length;r<o;r++)a=u[0]+s.alphabet[r]+u[1],t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1)}return l}if(!this.loaded)throw"Dictionary not loaded.";if(t=t||5,this.memoized.hasOwnProperty(e)){var r=this.memoized[e].limit;if(t<=r||this.memoized[e].suggestions.length<r)return this.memoized[e].suggestions.slice(0,t)}if(this.check(e))return[];for(var i=0,o=this.replacementTable.length;i<o;i++){var a=this.replacementTable[i];if(-1!==e.indexOf(a[0])){var l=e.replace(a[0],a[1]);if(this.check(l))return[l]}}var s=this;return s.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:function(e){function r(e,t){var n=e[1],r=t[1];return n<r?-1:n>r?1:t[0].localeCompare(e[0])}var i=n(e),o=n(i,!0),a=o;for(var l in i)s.check(l)&&(l in a?a[l]+=i[l]:a[l]=i[l]);var c,u=[];for(c in a)a.hasOwnProperty(c)&&u.push([c,a[c]]);u.sort(r).reverse();var d=[],f="lowercase";e.toUpperCase()===e?f="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(f="capitalized");var h=t;for(c=0;c<Math.min(h,u.length);c++)"uppercase"===f?u[c][0]=u[c][0].toUpperCase():"capitalized"===f&&(u[c][0]=u[c][0].substr(0,1).toUpperCase()+u[c][0].substr(1)),s.hasFlag(u[c][0],"NOSUGGEST")||-1!=d.indexOf(u[c][0])?h++:d.push(u[c][0]);return d}(e),limit:t},this.memoized[e].suggestions}}}(),e.exports=r}).call(t,"/")},938:function(e,t,n){n(975);var r=n(163)(n(474),n(958),null,null);e.exports=r.exports},947:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"crumbs"},[n("el-breadcrumb",{attrs:{separator:"/"}},[n("el-breadcrumb-item",[n("i",{staticClass:"el-icon-date"}),e._v(" 表单")]),e._v(" "),n("el-breadcrumb-item",[e._v("markdown")])],1)],1),e._v(" "),e._m(0),e._v(" "),n("markdown-editor",{ref:"markdownEditor",attrs:{configs:e.configs},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}),e._v(" "),e._m(1)],1)},staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"plugins-tips"},[e._v("\n        Vue-SimpleMDE：Vue.js的Markdown Editor组件。\n        访问地址："),n("a",{attrs:{href:"https://github.com/F-loat/vue-simplemde",target:"_blank"}},[e._v("Vue-SimpleMDE")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"plugins-tips"},[n("p",[e._v("既然用了markdown语法了，那么就有一个很实际的问题了。要怎么在前台展示数据呢？")]),e._v(" "),n("br"),e._v(" "),n("p",[e._v("这个时候就需要解析markdown语法了。可以使用 "),n("a",{attrs:{href:"https://github.com/miaolz123/vue-markdown",target:"_blank"}},[e._v("vue-markdown")]),e._v("：一个基于vue.js的markdown语法解析插件。（这里不作展开，有需要自行了解）")])])}]}},958:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"markdown-editor"},[n("textarea")])}]}},961:function(e,t,n){var r=n(938),i={markdownEditor:r,install:function(e){e.component("markdown-editor",r)}};e.exports=i},975:function(e,t,n){var r=n(632);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(162)("11c7f997",r,!0)},977:function(e,t){}});