/** * easymde v2.4.2 * Copyright Jeroen Akkerman * @link https://github.com/ionaru/easy-markdown-editor * @license MIT */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EasyMDE=e()}}(function(){return function o(a,l,s){function u(t,e){if(!l[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=l[t]={exports:{}};a[t][0].call(i.exports,function(e){return u(a[t][1][e]||e)},i,i.exports,o,a,l,s)}return l[t].exports}for(var c="function"==typeof require&&require,e=0;e>16&255,o[a++]=t>>8&255,o[a++]=255&t;var u,c;2===i&&(t=h[e.charCodeAt(s)]<<2|h[e.charCodeAt(s+1)]>>4,o[a++]=255&t);1===i&&(t=h[e.charCodeAt(s)]<<10|h[e.charCodeAt(s+1)]<<4|h[e.charCodeAt(s+2)]>>2,o[a++]=t>>8&255,o[a++]=255&t);return o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],o=0,a=n-r;o>2]+l[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"="));return i.join("")};for(var l=[],h=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=r.length;i>18&63]+l[i>>12&63]+l[i>>6&63]+l[63&i]);return o.join("")}h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){"use strict";var r=e("base64-js"),o=e("ieee754");n.Buffer=h,n.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},n.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(i>>1;case"base64":return I(e).length;default:if(i)return r?-1:O(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=h.from(t,r)),h.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o,a=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;l/=a=2,s/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return b(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),""},h.prototype.compare=function(e,t,n,r,i){if(R(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(o,a),s=this.slice(r,i),u=e.slice(t,n),c=0;c>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||ithis.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,a,l,s,u,c,h,f,d,p=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return f=t,d=n,B(O(e,(h=this).length-f),h,f,d);case"ascii":return y(this,e,t,n);case"latin1":case"binary":return y(this,e,t,n);case"base64":return s=this,u=t,c=n,B(I(e),s,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,l=n,B(function(e,t){for(var n,r,i,o=[],a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,(o=this).length-a),o,a,l);default:if(p)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ie.length)throw new RangeError("Index out of range")}function A(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return t=+t,n>>>=0,i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function E(e,t,n,r,i){return t=+t,n>>>=0,i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}h.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n>>=0,t>>>=0,n||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||T(e,t,this.length);for(var r=this[e+--t],i=1;0>>=0,t||T(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||T(e,t,this.length);for(var r=t,i=1,o=this[e+--r];0>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,a=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},h.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,a=1,l=0;for(this[t+o]=255&e;0<=--o&&(a*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/a>>0)-l&255;return t+n},h.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){return E(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){return E(this,e,t,!1,n)},h.prototype.copy=function(e,t,n,r){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function I(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function R(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}},{"base64-js":1,ieee754:16}],4:[function(e,t,n){"use strict";var l=e("typo-js");function s(a){"function"==typeof(a=a||{}).codeMirrorInstance&&"function"==typeof a.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),a.codeMirrorInstance.defineMode("spell-checker",function(e){if(!s.aff_loading){s.aff_loading=!0;var t=new XMLHttpRequest;t.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),t.onload=function(){4===t.readyState&&200===t.status&&(s.aff_data=t.responseText,2==++s.num_loaded&&(s.typo=new l("en_US",s.aff_data,s.dic_data,{platform:"any"})))},t.send(null)}if(!s.dic_loading){s.dic_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),n.onload=function(){4===n.readyState&&200===n.status&&(s.dic_data=n.responseText,2==++s.num_loaded&&(s.typo=new l("en_US",s.aff_data,s.dic_data,{platform:"any"})))},n.send(null)}var r='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',i={token:function(e){var t=e.peek(),n="";if(r.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!r.includes(t);)n+=t,e.next();return s.typo&&!s.typo.check(n)?"spell-error":null}},o=a.codeMirrorInstance.getMode(e,e.backdrop||"text/plain");return a.codeMirrorInstance.overlayMode(o,i,!0)})):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}s.num_loaded=0,s.aff_loading=!1,s.dic_loading=!1,s.aff_data="",s.dic_data="",t.exports=s},{"typo-js":18}],5:[function(e,t,n){(function(o){"use strict";o.defineOption("fullScreen",!1,function(e,t,n){var r,i;(n==o.Init&&(n=!1),!n!=!t)&&(t?(i=(r=e).getWrapperElement(),r.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:i.style.width,height:i.style.height},i.style.width="",i.style.height="auto",i.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",r.refresh()):function(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))})})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":11}],6:[function(e,t,n){(function(o){function a(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){a(e);var t=e.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=e.getOption("direction"),t.className="CodeMirror-placeholder";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),t.appendChild(n),e.display.lineSpace.insertBefore(t,e.display.lineSpace.firstChild)}function l(e){i(e)&&r(e)}function s(e){var t=e.getWrapperElement(),n=i(e);t.className=t.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?r(e):a(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}o.defineOption("placeholder","",function(e,t,n){var r=n&&n!=o.Init;if(t&&!r)e.on("blur",l),e.on("change",s),e.on("swapDoc",s),s(e);else if(!t&&r){e.off("blur",l),e.off("change",s),e.off("swapDoc",s),a(e);var i=e.getWrapperElement();i.className=i.className.replace(" CodeMirror-empty","")}t&&!e.hasFocus()&&l(e)})})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":11}],7:[function(e,t,n){(function(m){"use strict";var g=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,v=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,y=/[*+-]\s/;function x(e,t){var n=t.line,r=0,i=0,o=g.exec(e.getLine(n)),a=o[1];do{var l=n+(r+=1),s=e.getLine(l),u=g.exec(s);if(u){var c=u[1],h=parseInt(o[3],10)+r-i,f=parseInt(u[3],10),d=f;if(a!==c||isNaN(f)){if(a.length>c.length)return;if(a.length\s*$/.test(s)||e.replaceRange("",{line:i.line,ch:0},{line:i.line,ch:i.ch+1}),n[r]="\n";else{var h=u[1],f=u[5],d=!(y.test(u[2])||0<=u[2].indexOf(">")),p=d?parseInt(u[3],10)+1+u[4]:u[2].replace("x"," ");n[r]="\n"+h+p+f,d&&x(e,i)}}e.replaceSelections(n)}})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":11}],8:[function(e,t,n){(function(t){"use strict";t.overlayMode=function(r,i,o){return{startState:function(){return{base:t.startState(r),overlay:t.startState(i),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(e){return{base:t.copyState(r,e.base),overlay:t.copyState(i,e.overlay),basePos:e.basePos,baseCur:null,overlayPos:e.overlayPos,overlayCur:null}},token:function(e,t){return(e!=t.streamSeen||Math.min(t.basePos,t.overlayPos)>1,l=r(e.slice(0,a)).length;if(l==n)return a;n=n.line,c=u?n:d(s,0),h=e.markText(l,c,{className:o});if(null==r?i.push(h):i.splice(r++,0,h),u)break;a=s}}function s(e){for(var t=e.state.markedSelection,n=0;n=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=e.first&&to?ge(o,se(e,o).text.length):(r=se(e,(n=t).line).text.length,null==(i=n.ch)||r=t:o.to>t);(r||(r=[])).push(new Me(a,o.from,l?null:o.to))}}return r}(n,i,a),s=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.fromt)&&(!n||Re(n,o.marker)<0)&&(n=o.marker)}return n}function _e(e,t,n,r,i){var o=se(e,t),a=Te&&o.markedSpans;if(a)for(var l=0;le.lastLine())return t;var n,r=se(e,t);if(!$e(e,r))return t;for(;n=Pe(r);)r=n.find(1,!0).line;return fe(r)+1}function $e(e,t){var n=Te&&t.markedSpans;if(n)for(var r=void 0,i=0;in.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}var Ye=null;function Ze(e,t,n){var r;Ye=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Ye=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Ye=i)}return null!=r?r:Ye}var Je=function(){var H="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var P=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,W=/[stwN]/,_=/[LRr]/,j=/[Lb1n]/,U=/[1n]/;function q(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var n="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!P.test(e))return!1;for(var r,i=e.length,o=[],a=0;a=this.string.length},It.prototype.sol=function(){return this.pos==this.lineStart},It.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},It.prototype.next=function(){if(this.post},It.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},It.prototype.skipToEnd=function(){this.pos=this.string.length},It.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1e.options.maxHighlightLength&&Dt(e.doc.mode,r.state),o=Ht(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 Pt(n,r,e){var t=n.doc,i=n.display;if(!t.mode.startState)return new Rt(t,!0,r);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;at.first&&se(t,o-1).stateAfter,l=a?Rt.fromSaved(t,a,o):new Rt(t,Ot(t.mode),o);return t.iter(o,r,function(e){Wt(n,e.text,l);var t=l.line;e.stateAfter=t==r-1||t%5==0||t>=i.viewFrom&&tt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Rt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Rt.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}},Rt.prototype.nextLine=function(){this.line++,0e.options.maxHighlightLength?(l=!1,a&&Wt(e,t,r,h.pos),h.pos=t.length,null):$t(jt(n,h,r.state,f),o),f){var d=f[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!l||c!=s){for(;ul&&u.from<=l);c++);if(u.to>=s)return h(e,t,n,r,i,o,a);h(e,t.slice(0,u.to-l),n,r,null,o,a),r=null,t=t.slice(u.to-l),l=u.to}}}function tn(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 nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,u,c,h,f,d=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=u=c=h=l="",f=null,v=1/0;for(var y=[],x=void 0,b=0;bp||k.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&w.from==p&&(c+=" "+k.startStyle),k.endStyle&&w.to==v&&(x||(x=[])).push(k.endStyle,w.to),k.title&&!h&&(h=k.title),k.collapsed&&(!f||Re(f.marker,k)<0)&&(f=w)):w.from>p&&v>w.from&&(v=w.from)}if(x)for(var C=0;Cn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Nn(e,t,n,r){return Fn(e,Dn(e,t),n,r)}function En(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=(o=s-l)-1,s<=t&&(a="right")),null!=i){if(r=e[u+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==s-l)for(;u=o.text.length?(t=o.text.length,n="before"):t<=0&&(t=0,n="after"),!u)return s("before"==n?t-1:t,"before"==n);function c(e,t,n){return s(n?e-1:e,1==u[t].level!=n)}var h=Ze(u,t,n),f=Ye,d=c(t,h,"before"==n);return null!=f&&(d.other=c(t,f,"before"!=n)),d}function Vn(e,t){var n=0;t=Ce(e.doc,t),e.options.lineWrapping||(n=tr(e.display)*t.ch);var r=se(e.doc,t.line),i=Ve(r)+kn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(e,t,n,r,i){var o=ge(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function Kn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Xn(r.first,0,null,!0,-1);var i=de(r,n),o=r.first+r.size-1;if(or},o,i)}}function Zn(e,t,n,r){return n||(n=Dn(e,t)),Yn(e,t,n,Un(e,t,Fn(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Qn(n,e,t,r,i){i-=Ve(e);var o=Dn(n,e),a=jn(e),l=0,s=e.text.length,u=!0,c=Qe(e,n.doc.direction);if(c){var h=(n.options.lineWrapping?function(e,t,n,r,i,o,a){var l=Yn(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=s)){var p=1!=d.level,m=Fn(e,r,p?Math.min(u,d.to)-1:Math.max(s,d.from)).right,g=mu&&(c={from:c.from,to:u,level:c.level});return c}:function(r,i,o,a,l,s,u){var e=ae(function(e){var t=l[e],n=1!=t.level;return Jn(Gn(r,ge(o,n?t.to:t.from,n?"before":"after"),"line",i,a),s,u,!0)},0,l.length-1),t=l[e];if(0u&&(t=l[e-1])}return t})(n,e,t,o,c,r,i);l=(u=1!=h.level)?h.from:h.to-1,s=u?h.to:h.from-1}var f,d,p=null,m=null,g=ae(function(e){var t=Fn(n,o,e);return t.top+=a,t.bottom+=a,!!Jn(t,r,i,!1)&&(t.top<=i&&t.left<=r&&(p=e,m=t),!0)},l,s),v=!1;if(m){var y=r-m.left=b.bottom}return Xn(t,g=oe(e.text,g,1),d,v,r-f)}function er(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==On){On=E("pre");for(var t=0;t<49;++t)On.appendChild(document.createTextNode("x")),On.appendChild(E("br"));On.appendChild(document.createTextNode("x"))}A(e.measure,On);var n=On.offsetHeight/50;return 3=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||l.to().linet||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")}(L,y||0,null==x?k:x,function(e,t,n,r){var i="ltr"==n,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),l=null==y&&0==e,s=null==x&&t==k,u=0==r,c=!L||r==L.length-1;if(a.top-o.top<=3){var h=(A?s:l)&&c,f=(A?l:s)&&u?T:(i?o:a).left,d=h?M:(i?a:o).right;N(f,o.top,d-f,o.bottom)}else{var p,m,g,v;v=i?(p=A&&l&&u?T:o.left,m=A?M:S(e,n,"before"),g=A?T:S(t,n,"after"),A&&s&&c?M:a.right):(p=A?S(e,n,"before"):T,m=!A&&l&&u?M:o.right,g=!A&&s&&c?T:a.left,A?S(t,n,"after"):M),N(p,o.top,m-p,o.bottom),o.bottom=a&&(o=de(t,Ve(se(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function wr(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=rr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;ao&&(t.bottom=t.top+o);var l=e.doc.height+Cn(n),s=t.topl-r;if(t.topi+o){var c=Math.min(t.top,(u?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Tn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+h-3&&(a.scrollLeft=t.right+(d?0:10)-f),a}function Sr(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Lr(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Tr(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ar(e,Vn(e,t.from),Vn(e,t.to),t.margin))}function Ar(e,t,n,r){var i=Cr(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});Tr(e,i.scrollLeft,i.scrollTop)}function Nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||ai(e,{top:t}),Er(e,t,!0),m&&ai(e),ti(e,100))}function Er(e,t,n){t=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 Dr(e,t,n,r){t=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,wr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(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+Ln(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Or=function(e,t,n){this.cm=n;var r=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),tt(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Or.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&&0=i.viewTo)||i.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ri(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ur(e){var t=e.cm,n=t.display;e.updatedDisplay&&yr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Nn(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+Ln(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!u){var o=E("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+Ln(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?ge(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ge(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Gn(e,t),s=n&&n!=t?Gn(e,n):l,u=Cr(e,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}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Nr(e,u.scrollTop),1t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ue(e.doc,t)i.viewFrom?Jr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Jr(e);else if(t<=i.viewFrom){var o=Qr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Jr(e)}else if(n>=i.viewTo){var a=Qr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Jr(e)}else{var l=Qr(e,t,t,-1),s=Qr(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(on(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Jr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[lr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,n)&&a.push(n)}}}function Jr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Qr(e,t,n,r){var i,o=lr(e,t),a=e.display.view;if(!Te||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s=s.display.viewTo)){var c=+new Date+s.options.workTime,h=Pt(s,u.highlightFrontier),f=[];u.iter(h.line,Math.min(u.first+u.size,s.display.viewTo+500),function(e){if(h.line>=s.display.viewFrom){var t=e.styles,n=e.text.length>s.options.maxHighlightLength?Dt(u.mode,h.state):null,r=Ht(s,e,h,!0);n&&(h.state=n),e.styles=r.styles;var i=e.styleClasses,o=r.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),l=0;!a&&lc)return ti(s,s.options.workDelay),!0}),u.highlightFrontier=h.line,u.modeFrontier=Math.max(u.modeFrontier,h.line),f.length&&Gr(s,function(){for(var e=0;e=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==ei(e))return!1;kr(e)&&(Jr(e),t.dims=nr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Te&&(o=Ue(e.doc,o),a=qe(e.doc,a));var l,s,u,c,h=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;s=o,u=a,0==(c=(l=e).display).view.length||s>=c.viewTo||u<=c.viewFrom?(c.view=on(l,s,u),c.viewFrom=s):(c.viewFrom>s?c.view=on(l,s,c.viewFrom).concat(c.view):c.viewFromu&&(c.view=c.view.slice(0,lr(l,u)))),c.viewTo=u,n.viewOffset=Ve(se(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var f=ei(e);if(!h&&0==f&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var d=function(e){if(e.hasFocus())return null;var t=F();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ii(e,t);r=!1){yr(e);var i=Fr(e);sr(e),Br(e,i),si(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 ai(e,t){var n=new ri(e,t);if(ii(e,n)){yr(e),oi(e,n);var r=Fr(e);sr(e),Br(e,r),si(e,r),n.finish()}}function li(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function si(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+Ln(e)+"px"}function ui(e){var t=e.display.gutters,n=e.options.gutters;M(t);for(var r=0;ra.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&b&&x)e:for(var u=t.target,c=o.view;u!=a;u=u.parentNode)for(var h=0;hs-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(l=i).lastOp==r?(Oi(l.done),K(l.done)):l.done.length&&!K(l.done).ranges?K(l.done):1i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||it(e,"historyAdded")}function Bi(e,t,n,r){var i,o,a,l,s,u=e.history,c=r&&r.origin;n==u.lastSelOp||c&&u.lastSelOrigin==c&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==c||(i=e,o=c,a=K(u.done),l=t,"*"==(s=o.charAt(0))||"+"==s&&a.ranges.length==l.ranges.length&&a.somethingSelected()==l.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?u.done[u.done.length-1]=t:Ri(t,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=c,u.lastSelOp=n,r&&!1!==r.clearRedo&&Oi(u.undone)}function Ri(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Hi(t,n,e,r){var i=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,r),function(e){e.markedSpans&&((i||(i=n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function zi(e){if(!e)return null;for(var t,n=0;n=t.ch:l.to>t.ch))){if(i&&(it(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var u=s.find(r<0?1:-1),c=void 0;if((r<0?s.inclusiveRight:s.inclusiveLeft)&&(u=eo(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=ve(u,n))&&(r<0?c<0:0e.first?Ce(e,ge(t.line-1)):null:0e.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ge(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),n||(n=ki(e,t)),e.cm?function(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=fe(je(se(r,o.line))),r.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0}));-1i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiert.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Yr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Yi(t.doc)),t&&sn(t,"markerCleared",t,this,i,o),n&&_r(t),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,a){i=Ce(this,i),o=Ce(this,o);var l=[],s=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n=r.to||null==r.from&&s!=i.line||null!=r.from&&s==o.line&&r.from>=o.ch||a&&!a(r.marker)||l.push(r.marker.parent||r.marker)}++s}),l},getAllMarks:function(){var r=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;nt&&(t=e.from),null!=e.to&&e.toe.text.length?null:r}function Vo(e,t,n){var r=Go(e,t.ch,n);return null==r?null:new ge(t.line,r,n<0?"after":"before")}function Xo(e,t,n,r,i){if(e){var o=Qe(n,t.doc.direction);if(o){var a,l=i<0?K(o):o[0],s=i<0==(1==l.level)?"after":"before";if(0a.doc.first){var o=se(a.doc,r.line-1).text;o&&(r=new ge(r.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),ge(r.line-1,o.length-1),r,"+transpose"))}t.push(new vi(r,r))}a.setSelections(t)})},newlineAndIndent:function(r){return Gr(r,function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange(r.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=r.listSelections();for(var n=0;nc&&t.push(new vi(ge(l,c),ge(l,G(u,a,n))))}t.length||t.push(new vi(v,v)),Vi(x,yi(g,k.ranges.slice(0,w).concat(t),w),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var h,f=b,d=ha(g,e,y.unit),p=f.anchor;p=0=i.to||r.lines.bottom?20:0;o&&setTimeout(Vr(g,function(){u==n&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):r(e)}),o=Vr(g,r);g.state.selectingText=o,tt(a.wrapper.ownerDocument,"mousemove",i),tt(a.wrapper.ownerDocument,"mouseup",o)}(e,r,t,o)}(t,a,s,e):dt(e)==n.scroller&&ut(e):2==l?(a&&ji(t.doc,a),setTimeout(function(){return n.input.focus()},20)):3==l&&(C?t.display.input.onContextMenu(e):mr(t)))}}function ha(e,t,n){if("char"==n)return new vi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new vi(ge(t.line,0),Ce(e.doc,ge(t.line+1,0)));var r=n(e,t);return new vi(r.from,r.to)}function fa(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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ut(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!lt(e,n))return ht(t);o-=l.top-a.viewOffset;for(var s=0;s=i)return it(e,n,e,de(e.doc,o),e.options.gutters[s],t),ht(t)}}function da(e,t){return fa(e,t,"gutterClick",!0)}function pa(e,t){var n,r;wn(e.display,t)||(r=t,lt(n=e,"gutterContextMenu")&&fa(n,r,"gutterContextMenu",!1))||(ot(e,t,"contextmenu")||C||e.display.input.onContextMenu(t))}function ma(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pn(e)}ua.prototype.compare=function(e,t,n){return this.time+400>e&&0==ve(t,this.pos)&&n==this.button};var ga={toString:function(){return"CodeMirror.Init"}},va={},ya={};function xa(e){ui(e),Yr(e),wr(e)}function ba(e,t,n){if(!t!=!(n&&n!=ga)){var r=e.display.dragFunctions,i=t?tt:rt;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 wa(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Ke(e)),or(e),Yr(e),Pn(e),setTimeout(function(){return Br(e)},100)}function ka(e,t){var n=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?H(t):{},H(va,t,!1),ci(t);var r=t.value;"string"==typeof r?r=new Lo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new ka.inputStyles[t.inputStyle](this),o=this.display=new le(e,r,i);for(var a in ui(o.wrapper.CodeMirror=this),ma(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(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 P,keySeq:null,specialChars:null},t.autofocus&&!f&&o.input.focus(),w&&k<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(i){var o=i.display;tt(o.scroller,"mousedown",Vr(i,ca)),tt(o.scroller,"dblclick",w&&k<11?Vr(i,function(e){if(!ot(i,e)){var t=ar(i,e);if(t&&!da(i,e)&&!wn(i.display,e)){ut(e);var n=i.findWordAt(t);ji(i.doc,n.anchor,n.head)}}}):function(e){return ot(i,e)||ut(e)});tt(o.scroller,"contextmenu",function(e){return pa(i,e)});var n,r={end:0};function a(){o.activeTouch&&(n=setTimeout(function(){return o.activeTouch=null},1e3),(r=o.activeTouch).end=+new Date)}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400o.first?z(se(o,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/a);d;--d)f+=a,h+="\t";if(f=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var r=Ze(s,l.ch,l.sticky),i=s[r];if("ltr"==t.doc.direction&&i.level%2==0&&(0l.ch:i.from=i.from&&f>=c.begin)){var d=h?"before":"after";return new ge(l.line,f,d)}}var p=function(e,t,n){for(var r=function(e,t){return t?new ge(l.line,u(e,1),"before"):new ge(l.line,e,"after")};0<=e&&e=r.first+r.size||(i=new ge(n,i.ch,i.sticky),!(l=se(r,n))))return!1;i=Xo(a,r.cm,l,i.line,o)}else i=t;return!0}if("char"==e)s();else if("column"==e)s(!0);else if("word"==e||"group"==e)for(var u=null,c="group"==e,h=r.cm&&r.cm.getHelper(i,"wordChars"),f=!0;!(o<0)||s(!f);f=!1){var d=l.text.charAt(i.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){o<0&&(o=1,s(),i.sticky="after");break}if(p&&(u=p),0=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ba=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new P,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ra(e,t){var n=En(e,t.line);if(!n||n.hidden)return null;var r=se(e.doc,t.line),i=An(n,r,t.line),o=Qe(r,e.doc.direction),a="left";o&&(a=Ze(o,t.ch)%2?"right":"left");var l=Bn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ha(e,t){return t&&(e.bad=!0),e}function za(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ha(e.clipPos(ge(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=t.display.viewTo||i.line=t.display.viewFrom&&Ra(t,r)||{node:l[0].measure.map[2],offset:0},u=i.liner.firstLine()&&(a=ge(a.line-1,se(r.doc,a.line-1).length)),l.ch==se(r.doc,l.line).text.length&&l.linei.viewTo-1)return!1;n=a.line==i.viewFrom||0==(e=lr(r,a.line))?(t=fe(i.view[0].line),i.view[0].node):(t=fe(i.view[e].line),i.view[e-1].node.nextSibling);var s,u,c=lr(r,l.line);if(u=c==i.view.length-1?(s=i.viewTo-1,i.lineDiv.lastChild):(s=fe(i.view[c+1].line)-1,i.view[c+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(s,e,t,u,c){var n="",h=!1,f=s.doc.lineSeparator(),d=!1;function p(){h&&(n+=f,d&&(n+=f),h=d=!1)}function m(e){e&&(p(),n+=e)}function g(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void m(t);var n,r=e.getAttribute("cm-marker");if(r){var i=s.findMarks(ge(u,0),ge(c+1,0),(l=+r,function(e){return e.id==l}));return void(i.length&&(n=i[0].find(0))&&m(ue(s.doc,n.from,n.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&p();for(var a=0;aa.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var w=ge(t,d),k=ge(s,f.length?K(f).length-p:0);return 1n&&(Sa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Lr(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>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(l=Cr(o,a)).scrollTop&&Nr(o,l.scrollTop),null!=l.scrollLeft&&Dr(o,l.scrollLeft))},triggerOnKeyDown:Xr(ia),triggerOnKeyPress:Xr(aa),triggerOnKeyUp:oa,triggerOnMouseDown:Xr(ca),execCommand:function(e){if(Ko.hasOwnProperty(e))return Ko[e].call(null,this)},triggerElectric:Xr(function(e){Na(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=Ce(this.doc,e),a=0;a]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;a.defineMode("gfm",function(e,i){var o=0;var t={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,t){if(t.combineTokens=null,t.codeBlock)return e.match(/^```+/)?t.codeBlock=!1:e.skipToEnd(),null;if(e.sol()&&(t.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),t.codeBlock=!0,null;if("`"===e.peek()){e.next();var n=e.pos;e.eatWhile("`");var r=1+e.pos-n;return t.code?r===o&&(t.code=!1):(o=r,t.code=!0),null}if(t.code)return e.next(),null;if(e.eatSpace())return t.ateSpace=!0,null;if((e.sol()||t.ateSpace)&&(t.ateSpace=!1)!==i.gitHubSpice){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return t.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return t.combineTokens=!0,"link"}return e.match(l)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(t.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},n={taskLists:!0,strikethrough:!0,emoji:!0};for(var r in i)n[r]=i[r];return n.name="markdown",a.overlayMode(a.getMode(e,n),t)},"markdown"),a.defineMIME("text/x-gfm","gfm")},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("../markdown/markdown"),e("../../addon/mode/overlay")):r(CodeMirror)},{"../../addon/mode/overlay":8,"../../lib/codemirror":11,"../markdown/markdown":13}],13:[function(e,t,n){var r;r=function(B){"use strict";B.defineMode("markdown",function(p,w){var k=B.getMode(p,"text/html"),i="null"==k.name;void 0===w.highlightFormatting&&(w.highlightFormatting=!1),void 0===w.maxBlockquoteDepth&&(w.maxBlockquoteDepth=0),void 0===w.taskLists&&(w.taskLists=!1),void 0===w.strikethrough&&(w.strikethrough=!1),void 0===w.emoji&&(w.emoji=!1),void 0===w.fencedCodeBlockHighlighting&&(w.fencedCodeBlockHighlighting=!0),void 0===w.xml&&(w.xml=!0),void 0===w.tokenTypeOverrides&&(w.tokenTypeOverrides={});var C={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 e in C)C.hasOwnProperty(e)&&w.tokenTypeOverrides[e]&&(C[e]=w.tokenTypeOverrides[e]);var m=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,S=/^\[(x| )\](?=\s)/i,v=w.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,y=/^ *(?:\={1,}|-{1,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,x=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,b=/^\s*\[[^\]]+?\]:.*$/,L=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/;function T(e,t,n){return t.f=t.inline=n,n(e,t)}function M(e,t,n){return t.f=t.block=n,n(e,t)}function r(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==A){var t=i;if(!t){var n=B.innerMode(k,e.htmlState);t="xml"==n.mode.name&&null===n.state.tagStart&&!n.state.context&&n.state.tokenize.isInText}t&&(e.f=D,e.block=a,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function a(e,t){var n,r=e.column()===t.indentation,i=!(n=t.prevLine.stream)||!/\S/.test(n.string),o=t.indentedCode,a=t.prevLine.hr,l=!1!==t.list,s=(t.listStack[t.listStack.length-1]||0)+3;t.indentedCode=!1;var u=t.indentation;if(null===t.indentationDiff&&(t.indentationDiff=t.indentation,l)){for(t.em=!1,t.strong=!1,t.code=!1,t.strikethrough=!1,t.list=null;u"))return t.quote=r?1:t.quote+1,w.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),E(t);if(!h&&!t.setext&&r&&t.indentation<=s&&(f=e.match(g))){var d=f[1]?"ol":"ul";return t.indentation=u+e.current().length,t.list=!0,t.quote=0,t.listStack.push(t.indentation),w.taskLists&&e.match(S,!1)&&(t.taskList=!0),t.f=t.inline,w.highlightFormatting&&(t.formatting=["list","list-"+d]),E(t)}return r&&t.indentation<=s&&(f=e.match(x,!0))?(t.quote=0,t.fencedEndRE=new RegExp(f[1]+"+ *$"),t.localMode=w.fencedCodeBlockHighlighting&&function(e){if(B.findModeByName){var t=B.findModeByName(e);t&&(e=t.mime||t.mimes[0])}var n=B.getMode(p,e);return"null"==n.name?null:n}(f[2]),t.localMode&&(t.localState=B.startState(t.localMode)),t.f=t.block=N,w.highlightFormatting&&(t.formatting="code-block"),t.code=-1,E(t)):t.setext||!(c&&l||t.quote||!1!==t.list||t.code||h||b.test(e.string))&&(f=e.lookAhead(1))&&(f=f.match(y))?(t.setext?(t.header=t.setext,t.setext=0,e.skipToEnd(),w.highlightFormatting&&(t.formatting="header")):(t.header="="==f[0].charAt(0)?1:2,t.setext=t.header),t.thisLine.header=!0,t.f=t.inline,E(t)):h?(e.skipToEnd(),t.hr=!0,t.thisLine.hr=!0,C.hr):"["===e.peek()?T(e,t,I):T(e,t,t.inline)}function A(e,t){var n=k.token(e,t.htmlState);if(!i){var r=B.innerMode(k,t.htmlState);("xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText||t.md_inside&&-1"))&&(t.f=D,t.block=a,t.htmlState=null)}return n}function N(e,t){var n,r=t.listStack[t.listStack.length-1]||0,i=t.indentation=e.quote?t.push(C.formatting+"-"+e.formatting[n]+"-"+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(C.linkHref,"url"):(e.strong&&t.push(C.strong),e.em&&t.push(C.em),e.strikethrough&&t.push(C.strikethrough),e.emoji&&t.push(C.emoji),e.linkText&&t.push(C.linkText),e.code&&t.push(C.code),e.image&&t.push(C.image),e.imageAltText&&t.push(C.imageAltText,"link"),e.imageMarker&&t.push(C.imageMarker)),e.header&&t.push(C.header,C.header+"-"+e.header),e.quote&&(t.push(C.quote),!w.maxBlockquoteDepth||w.maxBlockquoteDepth>=e.quote?t.push(C.quote+"-"+e.quote):t.push(C.quote+"-"+w.maxBlockquoteDepth)),!1!==e.list){var r=(e.listStack.length-1)%3;r?1===r?t.push(C.list2):t.push(C.list3):t.push(C.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 t(e,t){if(e.match(n,!0))return E(t)}function D(e,t){var n=t.text(e,t);if(void 0!==n)return n;if(t.list)return t.list=null,E(t);if(t.taskList)return" "===e.match(S,!0)[1]?t.taskOpen=!0:t.taskClosed=!0,w.highlightFormatting&&(t.formatting="task"),t.taskList=!1,E(t);if(t.taskOpen=!1,t.taskClosed=!1,t.header&&e.match(/^#+$/,!0))return w.highlightFormatting&&(t.formatting="header"),E(t);var r=e.next();if(t.linkTitle){t.linkTitle=!1;var i=r;"("===r&&(i=")");var o="^\\s*(?:[^"+(i=(i+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+i;if(e.match(new RegExp(o),!0))return C.linkHref}if("`"===r){var a=t.formatting;w.highlightFormatting&&(t.formatting="code"),e.eatWhile("`");var l=e.current().length;if(0!=t.code||t.quote&&1!=l){if(l!=t.code)return t.formatting=a,E(t);var s=E(t);return t.code=0,s}return t.code=l,E(t)}if(t.code)return E(t);if("\\"===r&&(e.next(),w.highlightFormatting)){var u=E(t),c=C.formatting+"-escape";return u?u+" "+c:c}if("!"===r&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.imageMarker=!0,t.image=!0,w.highlightFormatting&&(t.formatting="image"),E(t);if("["===r&&t.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return t.imageMarker=!1,t.imageAltText=!0,w.highlightFormatting&&(t.formatting="image"),E(t);if("]"===r&&t.imageAltText){w.highlightFormatting&&(t.formatting="image");var u=E(t);return t.imageAltText=!1,t.image=!1,t.inline=t.f=O,u}if("["===r&&!t.image)return t.linkText&&e.match(/^.*?\]/)||(t.linkText=!0,w.highlightFormatting&&(t.formatting="link")),E(t);if("]"===r&&t.linkText){w.highlightFormatting&&(t.formatting="link");var u=E(t);return t.linkText=!1,t.inline=t.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?O:D,u}if("<"===r&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=F,w.highlightFormatting&&(t.formatting="link"),(u=E(t))?u+=" ":u="",u+C.linkInline;if("<"===r&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=F,w.highlightFormatting&&(t.formatting="link"),(u=E(t))?u+=" ":u="",u+C.linkEmail;if(w.xml&&"<"===r&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var h=e.string.indexOf(">",e.pos);if(-1!=h){var f=e.string.substring(e.start,h);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(f)&&(t.md_inside=!0)}return e.backUp(1),t.htmlState=B.startState(k),M(e,t,A)}if(w.xml&&"<"===r&&e.match(/^\/\w*?>/))return t.md_inside=!1,"tag";if("*"===r||"_"===r){for(var d=1,p=1==e.pos?" ":e.string.charAt(e.pos-2);d<3&&e.eat(r);)d++;var m=e.peek()||" ",g=!/\s/.test(m)&&(!L.test(m)||/\s/.test(p)||L.test(p)),v=!/\s/.test(p)&&(!L.test(p)||/\s/.test(m)||L.test(m)),y=null,x=null;if(d%2&&(t.em||!g||"*"!==r&&v&&!L.test(p)?t.em!=r||!v||"*"!==r&&g&&!L.test(m)||(y=!1):y=!0),1"!==e.next())return e.match(/^[^>]+/,!0),C.linkInline;t.f=t.inline=D,w.highlightFormatting&&(t.formatting="link");var n=E(t);return n?n+=" ":n="",n+C.linkInline}function O(e,t){if(e.eatSpace())return null;var i,n=e.next();return"("===n||"["===n?(t.f=t.inline=(i="("===n?")":"]",function(e,t){var n=e.next();if(n!==i)return e.match(o[i]),t.linkHref=!0,E(t);t.f=t.inline=D,w.highlightFormatting&&(t.formatting="link-string");var r=E(t);return t.linkHref=!1,r}),w.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,E(t)):"error"}var o={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=l,e.next(),w.highlightFormatting&&(t.formatting="link"),t.linkText=!0,E(t)):T(e,t,D)}function l(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=s,w.highlightFormatting&&(t.formatting="link");var n=E(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function s(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=D,C.linkHref+" url")}var u={startState:function(){return{f:a,prevLine:{stream:null},thisLine:{stream:null},block:a,htmlState:null,indentation:0,inline:D,text:t,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(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&B.copyState(k,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?B.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.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 r(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!=A)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,0")):null:t.match("--")?e(i("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function r(i){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=r(i+1),t.tokenize(e,t);if(">"==n){if(1!=i)return t.tokenize=r(i-1),t.tokenize(e,t);t.tokenize=u;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=i("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket"):"&"!=r?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function c(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=u,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(t.tokenize=(r=n,(i=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=c;break}return"string"}).isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=u,t.state=p,t.tagName=t.tagStart=null;var r,i,o=t.tokenize(e,t);return o?o+" tag error":"tag error"}function i(n,r){return function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=u;break}e.next()}return n}}function h(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function d(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(n)||!s.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",x):s.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,t,n)):(o="error",m)}function g(e,t,n){if("word"!=e)return s.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,n)):(o="error",y);var r=t.current();return n.context&&n.context.tagName!=r&&s.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===s.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,n){return"endTag"!=e?(o="error",v):(f(n),p)}function y(e,t,n){return o="error",v(e,0,n)}function x(e,t,n){if("word"==e)return o="attribute",b;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",x;var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(r)?d(n,r):(d(n,r),n.context=new h(n,r,i==n.indented)),p}function b(e,t,n){return"equals"==e?w:(s.allowMissing||(o="error"),x(e,0,n))}function w(e,t,n){return"string"==e?k:"word"==e&&s.allowUnquoted?(o="string",x):(o="error",x(e,0,n))}function k(e,t,n){return"string"==e?k:x(e,0,n)}return u.isInText=!0,{startState:function(e){var t={tokenize:u,state:p,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;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(e,t,n){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+l;if(r&&r.noIndent)return C.Pass;if(e.tokenize!=c&&e.tokenize!=u)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==s.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=x)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":11}],16:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,l=8*i-r-1,s=(1<>1,c=-7,h=n?i-1:0,f=n?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=l;0>=-c,c+=r;0>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),2<=(t+=1<=a+h?f/s:f*Math.pow(2,1-h))*s&&(a++,s/=2),c<=a+h?(l=0,a=c):1<=a+h?(l=(t*s-1)*Math.pow(2,i),a+=h):(l=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));8<=i;e[n+d]=255&l,d+=p,l/=256,i-=8);for(a=a< ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function s(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||m.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.options.tables?this.rules=y.tables:this.rules=y.gfm)}y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=t(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d+\.)/,y.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,y.item=t(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=t(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._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",y._comment=//,y.html=t(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=t(y.paragraph).replace("hr",y.hr).replace("heading",y.heading).replace("lheading",y.lheading).replace("tag",y._tag).getRegex(),y.blockquote=t(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=p({},y),y.gfm=p({},y.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),y.gfm.paragraph=t(y.paragraph).replace("(?!","(?!"+y.gfm.fences.source.replace("\\1","\\2")+"|"+y.list.source.replace("\\1","\\3")+"|").getRegex(),y.tables=p({},y.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=p({},y.normal,{html:t("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),s.rules=y,s.lex=function(e,t){return new s(t).lex(e)},s.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},s.prototype.token=function(e,t){var n,r,i,o,a,l,s,u,c,h,f,d,p,m,g,v;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),1 ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),s={type:"list_start",ordered:m=1<(o=i[2]).length,start:m?+o:"",loose:!1},this.tokens.push(s),n=!(u=[]),p=(i=i[0].match(this.rules.item)).length,f=0;f?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:d,text:/^(`+|[^`])[\s\S]*?(?=[\\?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._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])?)+(?![-_])/,n.autolink=t(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=t(n.tag).replace("comment",y._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,n._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f\\]*\)|[^\s\x00-\x1f()\\])*?)/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=t(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=t(n.reflink).replace("label",n._label).getRegex(),n.normal=p({},n),n.pedantic=p({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:t(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=p({},n.normal,{escape:t(n.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)~+/,text:t(n.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),n.gfm.url=t(n.gfm.url).replace("email",n.gfm._extended_email).getRegex(),n.breaks=p({},n.gfm,{br:t(n.br).replace("{2,}","*").getRegex(),text:t(n.gfm.text).replace("{2,}","*").getRegex()}),u.rules=n,u.output=function(e,t,n){return new u(t,n).output(e)},u.prototype.output=function(e){for(var t,n,r,i,o,a,l="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),l+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),r="@"===o[2]?"mailto:"+(n=h(this.mangle(o[1]))):n=h(o[1]),l+=this.renderer.link(r,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(this.inRawBlock=!1),e=e.substring(o[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):h(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,r=o[2],i=this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],t[3]):"":o[3]?o[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(o,{href:u.escapes(r),title:u.escapes(i)}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),l+=this.renderer.strong(this.output(o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),l+=this.renderer.em(this.output(o[6]||o[5]||o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),l+=this.renderer.codespan(h(o[2].trim(),!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),l+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),l+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.inRawBlock?l+=this.renderer.text(o[0]):l+=this.renderer.text(h(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===o[2])r="mailto:"+(n=h(o[0]));else{for(;a=o[0],o[0]=this.rules._backpedal.exec(o[0])[0],a!==o[0];);n=h(o[0]),r="www."===o[1]?"http://"+n:n}e=e.substring(o[0].length),l+=this.renderer.link(r,null,n)}return l},u.escapes=function(e){return e?e.replace(u.rules._escapes,"$1"):e},u.prototype.outputLink=function(e,t){var n=t.href,r=t.title?h(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,h(e[1]))},u.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},u.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i'+(n?e:h(e,!0))+"\n":"
"+(n?e:h(e,!0))+"
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(f(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!l.test(e)&&(e=o(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var i='
    "},r.prototype.image=function(e,t,n){this.options.baseUrl&&!l.test(e)&&(e=o(this.options.baseUrl,e));var r=''+n+'":">"},r.prototype.text=function(e){return e},i.prototype.strong=i.prototype.em=i.prototype.codespan=i.prototype.del=i.prototype.text=function(e){return e},i.prototype.link=i.prototype.image=function(e,t,n){return""+n},i.prototype.br=function(){return""},c.parse=function(e,t){return new c(t).parse(e)},c.prototype.parse=function(e){this.inline=new u(e.links,this.options),this.inlineText=new u(e.links,p({},this.options,{renderer:new i})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},c.prototype.next=function(){return this.token=this.tokens.pop()},c.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},c.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},c.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,f(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e"']/,h.escapeReplace=/[&<>"']/g,h.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},h.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,h.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var a={},l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(){}function p(e){for(var t,n,r=1;rt)n.splice(t);else for(;n.lengthAn error occurred:

    "+h(e.message+"",!0)+"
    ";throw e}}d.exec=d,m.options=m.setOptions=function(e){return p(m.defaults,e),m},m.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},m.defaults=m.getDefaults(),m.Parser=c,m.parser=c.parse,m.Renderer=r,m.TextRenderer=i,m.Lexer=s,m.lexer=s.lex,m.InlineLexer=u,m.inlineLexer=u.output,m.parse=m,void 0!==g&&"object"==typeof v?g.exports=m:e.marked=m}(this||("undefined"!=typeof window?window:e))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(c,t,e){(function(u,p){var e;!function(){"use strict";(e=function(e,i,o,a){a=a||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=a.flags||{},this.memoized={},this.loaded=!1;var t,l,s,u,c,h=this;function n(e,t){var n=h._readFile(e,null,a.asyncLoad);a.asyncLoad?n.then(function(e){t(e)}):t(n)}function r(e){i=e,o&&d()}function f(e){o=e,i&&d()}function d(){for(h.rules=h._parseAFF(i),h.compoundRuleCodes={},l=0,u=h.compoundRules.length;l=this.flags.COMPOUNDMIN)for(t=0,n=this.compoundRules.length;t)+?/g),h={toggleBold:r,toggleItalic:y,drawLink:E,toggleHeadingSmaller:k,toggleHeadingBigger:C,drawImage:D,toggleBlockquote:w,toggleOrderedList:A,toggleUnorderedList:M,toggleCodeBlock:b,togglePreview:H,toggleStrikethrough:x,toggleHeading1:S,toggleHeading2:L,toggleHeading3:T,cleanBlock:N,drawTable:F,drawHorizontalRule:O,undo:I,redo:B,toggleSideBySide:R,toggleFullScreen:v},l={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"},s=function(e){for(var t in h)if(h[t]===e)return t;return null},f=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(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(e)||/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(e.substr(0,4)))&&(t=!0),t};function d(e){return e=o?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function p(e,t,n){e=e||{};var r=document.createElement("button");r.className=e.name,t=null==t||t,e.title&&t&&(r.title=function(e,t,n){var r,i=e;t&&(r=s(t),n[r]&&(i+=" ("+d(n[r])+")"));return i}(e.title,e.action,n),o&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),e.noDisable&&r.classList.add("no-disable"),e.noMobile&&r.classList.add("no-mobile"),r.tabIndex=-1;var i=document.createElement("i");return i.className=e.className,r.appendChild(i),r}function m(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 ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function E(e){var t=e.codemirror,n=m(t),r=e.options,i="https://";if(r.promptURLs&&!(i=prompt(r.promptTexts.link)))return!1;z(t,n.link,r.insertTexts.link,i)}function D(e){var t=e.codemirror,n=m(t),r=e.options,i="https://";if(r.promptURLs&&!(i=prompt(r.promptTexts.image)))return!1;z(t,n.image,r.insertTexts.image,i)}function F(e){var t=e.codemirror,n=m(t),r=e.options;z(t,n.table,r.insertTexts.table)}function O(e){var t=e.codemirror,n=m(t),r=e.options;z(t,n.image,r.insertTexts.horizontalRule)}function I(e){var t=e.codemirror;t.undo(),t.focus()}function B(e){var t=e.codemirror;t.redo(),t.focus()}function R(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements&&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&&(i.className=i.className.replace(/\s*active\s*/g,"")),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||v(e),r.className+=" editor-preview-active-side"},1),i&&(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,s=n.previousSibling;l.className=l.className.replace(/\s*active\s*/g,""),s.className=s.className.replace(/\s*disabled-for-preview*/g,"")}t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){r.innerHTML=e.options.previewRender(e.value(),r)}),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function H(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")).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);var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&R(e)}function z(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l={},s={};Object.assign(l,e.getCursor("start")),Object.assign(s,e.getCursor("end")),r&&(a=a.replace("#url#",r)),t?(o=(i=e.getLine(l.line)).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 P(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r,i,o,a=e.getCursor("start"),l=e.getCursor("end"),s=a.line;s<=l.line;s++)r=s,i=void 0,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});e.focus()}}function W(s,u){if(!/editor-preview-active/.test(s.getWrapperElement().lastChild.className)){for(var c=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,h=/^\s*/,f=m(s),e=s.getCursor("start"),t=s.getCursor("end"),d={quote:/^(\s*)>\s+/,"unordered-list":c,"ordered-list":c},p=1,n=e.line;n<=t.line;n++)!function(e){var t,n,r,i,o=s.getLine(e);if(f[u])o=o.replace(d[u],"$1");else{var a=c.exec(o),l=(i=p,{quote:">","unordered-list":"*","ordered-list":"%%i."}[u].replace("%%i",i));o=null!==a?(t=u,n=a[2],r=new RegExp({quote:">","unordered-list":"*","ordered-list":"d+."}[t]),n&&r.test(n)&&(l=""),a[1]+l+a[3]+o.replace(h,"").replace(d[u],"$1")):l+" "+o,p+=1}s.replaceRange(o,{line:e,ch:0},{line:e,ch:99999999999999})}(n);s.focus()}}function _(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=m(o),l=n,s=r,u=o.getCursor("start"),c=o.getCursor("end");a[t]?(l=(i=o.getLine(u.line)).slice(0,u.ch),s=i.slice(u.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),s=s.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),s=s.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),s=s.replace(/(\*\*|~~)/,"")),o.replaceRange(l+s,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==c&&(c.ch-=2)):"italic"==t&&(u.ch-=1,u!==c&&(c.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(l+i+s),u.ch+=n.length,c.ch=u.ch+i.length),o.setSelection(u,c),o.focus()}}function j(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]=j(e[n]||{},t[n]):e[n]=t[n]);return e}function U(e){for(var t=1;t$/,' target="_blank">');e=e.replace(n,r)}}return e}(r)}},K.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,n,r=this.options,i=this,o={};for(var a in r.shortcuts)null!==r.shortcuts[a]&&null!==h[a]&&function(e){o[d(r.shortcuts[e])]=function(){h[e](i)}}(a);if(o.Enter="newlineAndIndentContinueMarkdownList",o.Tab="tabAndIndentMarkdownList",o["Shift-Tab"]="shiftTabAndUnindentMarkdownList",o.Esc=function(e){e.getOption("fullScreen")&&v(i)},document.addEventListener("keydown",function(e){27==(e=e||window.event).keyCode&&i.codemirror.getOption("fullScreen")&&v(i)},!1),!1!==r.spellChecker?(t="spell-checker",(n=r.parsingConfig).name="gfm",n.gitHubSpice=!1,c({codeMirrorInstance:u})):((t=r.parsingConfig).name="gfm",t.gitHubSpice=!1),this.codemirror=u.fromTextArea(e,{mode:t,backdrop:n,theme:null!=r.theme?r.theme:"easymde",tabSize:null!=r.tabSize?r.tabSize:2,indentUnit:null!=r.tabSize?r.tabSize:2,indentWithTabs:!1!==r.indentWithTabs,lineNumbers:!1,autofocus:!0===r.autofocus,extraKeys:o,lineWrapping:!1!==r.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:r.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null!=r.styleSelectedText?r.styleSelectedText:!f(),configureMouse:function(e,t,n){return{addNew:!1}}}),this.codemirror.getScrollerElement().style.minHeight=r.minHeight,!0===r.forceSync){var l=this.codemirror;l.on("change",function(){l.save()})}!(this.gui={})!==r.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==r.status&&(this.gui.statusbar=this.createStatusbar()),null!=r.autosave&&!0===r.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var s=this.codemirror;setTimeout(function(){s.refresh()}.bind(s),0)}},K.prototype.autosave=function(){if(Y()){var e=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to use the autosave feature");!0!==this.options.autosave.binded&&(null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",function(){clearTimeout(e.autosaveTimeoutId),e.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+e.options.autosave.uniqueId),setTimeout(function(){e.autosave()},e.options.autosave.delay||1e4)}),this.options.autosave.binded=!0),!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&&null!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r;12<=a&&(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("EasyMDE: localStorage not available, cannot autosave")},K.prototype.clearAutosavedValue=function(){if(Y()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},K.prototype.createSideBySide=function(){var r=this.codemirror,e=r.getWrapperElement(),i=e.nextSibling;if(i&&/editor-preview-side/.test(i.className)||((i=document.createElement("div")).className="editor-preview-side",e.parentNode.insertBefore(i,e.nextSibling)),!1===this.options.syncSideBySidePreviewScroll)return i;var o=!1,a=!1;return r.on("scroll",function(e){if(o)o=!1;else{a=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,n=parseFloat(e.getScrollInfo().top)/t,r=(i.scrollHeight-i.clientHeight)*n;i.scrollTop=r}}),i.onscroll=function(){if(a)a=!1;else{o=!0;var e=i.scrollHeight-i.clientHeight,t=parseFloat(i.scrollTop)/e,n=(r.getScrollInfo().height-r.getScrollInfo().clientHeight)*t;r.scrollTo(0,n)}},i},K.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t