1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15551262"],{"11c6":function(e,t,r){"use strict";r("5e9d")},3905:function(e,t,r){"use strict";r("44eb")},"3d07":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,'.ant-pro-footer-toolbar[data-v-89d7d506]{position:fixed;width:100%;bottom:0;right:0;height:56px;line-height:56px;box-shadow:0 -1px 2px rgba(0,0,0,.03);background:hsla(0,0%,100%,.5490196078431373);border-top:1px solid #e8e8e8;padding:0 24px;z-index:9}@media (prefers-color-scheme:dark){.ant-pro-footer-toolbar[data-v-89d7d506]{background:rgba(24,24,24,.62);border-top:unset}}.ant-pro-footer-toolbar[data-v-89d7d506]:after{content:"";display:block;clear:both}',""]),e.exports=t},"44eb":function(e,t,r){var n=r("c2e8");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=r("499e").default;i("19d0ff77",n,!0,{sourceMap:!1,shadowMode:!1})},"56b3":function(e,t,r){(function(t,r){e.exports=r()})(0,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),c=a&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,a=!0);var C=y&&(c||d&&(null==w||w<12.11)),k=r||l&&s>=9;function _(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,M=function(e,t){var r=e.className,n=_(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function L(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return L(e).appendChild(t)}function N(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"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 O(e,t,r,n){var i=N(e,t,r,n);return i.setAttribute("role","presentation"),i}function A(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 D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}while(e&&e.shadowRoot&&e.shadowRoot.activeElement)e=e.shadowRoot.activeElement;return e}function W(e,t){var r=e.className;_(t).test(r)||(e.className+=(r?" ":"")+t)}function z(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!_(r[n]).test(t)&&(t+=" "+r[n]);return t}S=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var H=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function F(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function P(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(H=function(e){try{e.select()}catch(t){}});var I=function(){this.id=null,this.f=null,this.time=0,this.handler=E(this.onTimeout,this)};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}I.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},I.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var B=50,G={toString:function(){return"CodeMirror.Pass"}},U={scroll:!1},V={origin:"*mouse"},j={origin:"+move"};function K(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var $=[""];function X(e){while($.length<=e)$.push(q($)+" ");return $[e]}function q(e){return e[e.length-1]}function Y(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(e,t,r){var n=0,i=r(t);while(n<e.length&&r(e[n])<=i)n++;e.splice(n,0,t)}function J(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(J.prototype=e,r=new J),t&&F(t,r),r}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\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]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){while((r<0?t>0:t<e.length)&&oe(e.charAt(t)))t+=r;return t}function se(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function ae(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var ce=null;function ue(e,t,r){var n;ce=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"==r?n=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ce=i)}return null!=n?n:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;function a(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(r(e.charCodeAt(f)));for(var h=0,p=c;h<u;++h){var g=d[h];"m"==g?d[h]=p:p=g}for(var m=0,v=c;m<u;++m){var y=d[m];"1"==y&&"r"==v?d[m]="n":o.test(y)&&(v=y,"r"==y&&(d[m]="R"))}for(var b=1,x=d[0];b<u-1;++b){var w=d[b];"+"==w&&"1"==x&&"1"==d[b+1]?d[b]="1":","!=w||x!=d[b+1]||"1"!=x&&"n"!=x||(d[b]=x),x=w}for(var C=0;C<u;++C){var k=d[C];if(","==k)d[C]="N";else if("%"==k){var _=void 0;for(_=C+1;_<u&&"%"==d[_];++_);for(var S=C&&"!"==d[C-1]||_<u&&"1"==d[_]?"1":"N",M=C;M<_;++M)d[M]=S;C=_-1}}for(var L=0,T=c;L<u;++L){var N=d[L];"L"==T&&"1"==N?d[L]="L":o.test(N)&&(T=N)}for(var O=0;O<u;++O)if(i.test(d[O])){var A=void 0;for(A=O+1;A<u&&i.test(d[A]);++A);for(var D="L"==(O?d[O-1]:c),W="L"==(A<u?d[A]:c),z=D==W?D?"L":"R":c,H=O;H<A;++H)d[H]=z;O=A-1}for(var E,F=[],P=0;P<u;)if(l.test(d[P])){var I=P;for(++P;P<u&&l.test(d[P]);++P);F.push(new a(0,I,P))}else{var R=P,B=F.length,G="rtl"==t?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var U=R;U<P;)if(s.test(d[U])){R<U&&(F.splice(B,0,new a(1,R,U)),B+=G);var V=U;for(++U;U<P&&s.test(d[U]);++U);F.splice(B,0,new a(2,V,U)),B+=G,R=U}else++U;R<P&&F.splice(B,0,new a(1,R,P))}return"ltr"==t&&(1==F[0].level&&(E=e.match(/^\s+/))&&(F[0].from=E[0].length,F.unshift(new a(0,0,E[0].length))),1==q(F).level&&(E=e.match(/\s+$/))&&(q(F).to-=E[0].length,F.push(new a(0,u-E[0].length,u)))),"rtl"==t?F.reverse():F}}();function fe(e,t){var r=e.order;return null==r&&(r=e.order=de(e.text,t)),r}var he=[],pe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||he).concat(r)}};function ge(e,t){return e._handlers&&e._handlers[t]||he}function me(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=R(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var r=ge(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function ye(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,r||t.type,e,t),_e(t)||t.codemirrorIgnore}function be(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==R(r,t[n])&&r.push(t[n])}function xe(e,t){return ge(e,t).length>0}function we(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){Ce(e),ke(e)}function Me(e){return e.target||e.srcElement}function Le(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Ne,Oe=function(){if(l&&s<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Te){var t=N("span","");T(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=Te?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function De(e){if(null!=Ne)return Ne;var t=T(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return L(e),!(!r||r.left==r.right)&&(Ne=n.right-r.right<3)}var We=3!="\n\nb".split(/\n/).length?function(e){var t=0,r=[],n=e.length;while(t<=n){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ze=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},He=function(){var e=N("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ee=null;function Fe(e){if(null!=Ee)return Ee;var t=T(e,N("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Ee=Math.abs(r.left-n.left)>1}var Pe={},Ie={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pe[e]=t}function Be(e,t){Ie[e]=t}function Ge(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),e=Q(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=Ge(t);var r=Pe[t.name];if(!r)return Ue(e,"text/plain");var n=r(e,t);if(Ve.hasOwnProperty(t.name)){var i=Ve[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Ve={};function je(e,t){var r=Ve.hasOwnProperty(e)?Ve[e]:Ve[e]={};F(t,r)}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $e(e,t){var r;while(e.innerMode){if(r=e.innerMode(t),!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}}function Xe(e,t,r){return!e.startState||e.startState(t,r)}var qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ye(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var r=e;while(!r.lines)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function Ze(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function Je(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function Qe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function et(e){if(null==e.parent)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;;++i){if(n.children[i]==t)break;r+=n.children[i].chunkSize()}return r+t.first}function tt(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l],a=s.height;if(t<a)break;t-=a}return r+l}function rt(e,t){return t>=e.first&&t<e.first+e.size}function nt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,r){if(void 0===r&&(r=null),!(this instanceof it))return new it(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ot(e,t){return e.line-t.line||e.ch-t.ch}function lt(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function st(e){return it(e.line,e.ch)}function at(e,t){return ot(e,t)<0?t:e}function ct(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function dt(e,t){if(t.line<e.first)return it(e.first,0);var r=e.first+e.size-1;return t.line>r?it(r,Ye(e,r).text.length):ft(t,Ye(e,t.line).text.length)}function ft(e,t){var r=e.ch;return null==r||r>t?it(e.line,t):r<0?it(e.line,0):e}function ht(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=dt(e,t[n]);return r}qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.prototype.eat=function(e){var t,r=this.string.charAt(this.pos);if(t="string"==typeof e?r==e:r&&(e.test?e.test(r):e(r)),t)return++this.pos,r},qe.prototype.eatWhile=function(e){var t=this.pos;while(this.eat(e));return this.pos>t},qe.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=P(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},qe.prototype.indentation=function(){return P(this.string,null,this.tabSize)-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},qe.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var pt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,r,n){var i=[e.state.modeGen],o={};St(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,c=0;r.state=!0,St(e,t.text,s.mode,r,(function(e,t){var r=a;while(c<e){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,c=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=l,r.baseTokens=null,r.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function vt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=yt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&Ke(e.doc.mode,n.state),o=mt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new gt(n,!0,t);var o=Mt(e,t,r),l=o>n.first&&Ye(n,o-1).stateAfter,s=l?gt.fromSaved(n,l,o):new gt(n,Xe(n.mode),o);return n.iter(o,t,(function(r){bt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()})),r&&(n.modeFrontier=s.line),s}function bt(e,t,r,n){var i=e.doc.mode,o=new qe(t,e.options.tabSize,r);o.start=o.pos=n||0,""==t&&xt(i,r.state);while(!o.eol())wt(i,o,r.state),o.start=o.pos}function xt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=$e(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function wt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=$e(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(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}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,r){return t instanceof pt?new gt(e,Ke(e.mode,t.state),r,t.lookAhead):new gt(e,Ke(e.mode,t),r)},gt.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pt(t,this.maxLookAhead):t};var Ct=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function kt(e,t,r,n){var i,o=e.doc,l=o.mode;t=dt(o,t);var s,a=Ye(o,t.line),c=yt(e,t.line,r),u=new qe(a.text,e.options.tabSize,c);n&&(s=[]);while((n||u.pos<t.ch)&&!u.eol())u.start=u.pos,i=wt(l,u,c.state),n&&s.push(new Ct(u,i,Ke(o.mode,c.state)));return n?s:new Ct(u,i,c.state)}function _t(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function St(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,c=0,u=null,d=new qe(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];""==t&&_t(xt(r,n.state),o);while(!d.eol()){if(d.pos>e.options.maxHighlightLength?(s=!1,l&&bt(e,t,n,d.pos),d.pos=t.length,a=null):a=_t(wt(r,d,n.state,f),o),f){var h=f[0].name;h&&(a="m-"+(a?h+" "+a:h))}if(!s||u!=a){while(c<d.start)c=Math.min(d.start,c+5e3),i(c,u);u=a}d.start=d.pos}while(c<d.pos){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Mt(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=Ye(o,s-1),c=a.stateAfter;if(c&&(!r||s+(c instanceof pt?c.lookAhead:0)<=o.modeFrontier))return s;var u=P(a.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function Lt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=Ye(e,n).stateAfter;if(i&&(!(i instanceof pt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Tt=!1,Nt=!1;function Ot(){Tt=!0}function At(){Nt=!0}function Dt(e,t,r){this.marker=e,this.from=t,this.to=r}function Wt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function zt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ht(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Et(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Dt(l,o.from,a?null:o.to))}}return n}function Ft(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Dt(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return n}function Pt(e,t){if(t.full)return null;var r=rt(e,t.from.line)&&Ye(e,t.from.line).markedSpans,n=rt(e,t.to.line)&&Ye(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==ot(t.from,t.to),s=Et(r,i,l),a=Ft(n,o,l),c=1==t.text.length,u=q(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var h=Wt(a,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=u),null==g.from){var m=Wt(s,g.marker);m||(g.from=u,c&&(s||(s=[])).push(g))}else g.from+=u,c&&(s||(s=[])).push(g)}s&&(s=It(s)),a&&a!=s&&(a=It(a));var v=[s];if(!c){var y,b=t.text.length-2;if(b>0&&s)for(var x=0;x<s.length;++x)null==s[x].to&&(y||(y=[])).push(new Dt(s[x].marker,null,null));for(var w=0;w<b;++w)v.push(y);v.push(a)}return v}function It(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Rt(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=R(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var c=i[a];if(!(ot(c.to,s.from)<0||ot(c.from,s.to)>0)){var u=[a,1],d=ot(c.from,s.from),f=ot(c.to,s.to);(d<0||!l.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),a+=u.length-3}}return i}function Bt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Gt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ut(e){return e.inclusiveLeft?-1:0}function Vt(e){return e.inclusiveRight?1:0}function jt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ot(n.from,i.from)||Ut(e)-Ut(t);if(o)return-o;var l=ot(n.to,i.to)||Vt(e)-Vt(t);return l||t.id-e.id}function Kt(e,t){var r,n=Nt&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||jt(r,i.marker)<0)&&(r=i.marker);return r}function $t(e){return Kt(e,!0)}function Xt(e){return Kt(e,!1)}function qt(e,t){var r,n=Nt&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||jt(r,o.marker)<0)&&(r=o.marker)}return r}function Yt(e,t,r,n,i){var o=Ye(e,t),l=Nt&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var c=a.marker.find(0),u=ot(c.from,r)||Ut(a.marker)-Ut(i),d=ot(c.to,n)||Vt(a.marker)-Vt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ot(c.to,r)>=0:ot(c.to,r)>0)||u>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ot(c.from,n)<=0:ot(c.from,n)<0)))return!0}}}function Zt(e){var t;while(t=$t(e))e=t.find(-1,!0).line;return e}function Jt(e){var t;while(t=Xt(e))e=t.find(1,!0).line;return e}function Qt(e){var t,r;while(t=Xt(e))e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function er(e,t){var r=Ye(e,t),n=Zt(r);return r==n?t:et(n)}function tr(e,t){if(t>e.lastLine())return t;var r,n=Ye(e,t);if(!rr(e,n))return t;while(r=Xt(n))n=r.find(1,!0).line;return et(n)+1}function rr(e,t){var r=Nt&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&nr(e,t,n))return!0}}function nr(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return nr(e,n.line,Wt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.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==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&nr(e,t,i))return!0}function ir(e){e=Zt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function or(e){if(0==e.height)return 0;var t,r=e.text.length,n=e;while(t=$t(n)){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}n=e;while(t=Xt(n)){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function lr(e){var t=e.display,r=e.doc;t.maxLine=Ye(r,r.first),t.maxLineLength=or(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=or(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Gt(this,t),this.height=r?r(this):1};function ar(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Bt(e),Gt(e,r);var i=n?n(e):1;i!=e.height&&Qe(e,i)}function cr(e){e.parent=null,Bt(e)}sr.prototype.lineNo=function(){return et(this)},we(sr);var ur={},dr={};function fr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?dr:ur;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function hr(e,t){var r=O("span",null,null,a?"padding-right: .1px":null),n={pre:O("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=gr,De(e.display.measure)&&(l=fe(o,e.doc.direction))&&(n.addToken=vr(n.addToken,l)),n.map=[];var s=t!=e.display.externalMeasured&&et(o);br(o,n,vt(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=z(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=z(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ae(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=z(n.pre.className,n.textClass||"")),n}function pr(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gr(e,t,r,n,i,o,a){if(t){var c,u=e.splitSpaces?mr(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();var h=0;while(1){d.lastIndex=h;var p=d.exec(t),g=p?p.index-h:t.length-h;if(g){var m=document.createTextNode(u.slice(h,h+g));l&&s<9?c.appendChild(N("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;v=c.appendChild(N("span",X(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(v=c.appendChild(N("span","\r"==p[0]?"␍":"","cm-invalidchar")),v.setAttribute("cm-text",p[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),l&&s<9?c.appendChild(N("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||f||o||a){var x=r||"";n&&(x+=n),i&&(x+=i);var w=N("span",[c],x,o);if(a)for(var C in a)a.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,a[C]);return e.content.appendChild(w)}e.content.appendChild(c)}}function mr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function vr(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length;f++)if(d=t[f],d.to>c&&d.from<=c)break;if(d.to>=u)return e(r,n,i,o,l,s,a);e(r,n.slice(0,d.to-c),i,o,null,s,a),o=null,n=n.slice(d.to-c),c=d.to}}}function yr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function br(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,c,u,d,f,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){a=c=u=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,x=0;x<n.length;++x){var w=n[x],C=w.marker;if("bookmark"==C.type&&w.from==p&&C.widgetNode)y.push(C);else if(w.from<=p&&(null==w.to||w.to>p||C.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var k in C.attributes)(f||(f={}))[k]=C.attributes[k];C.collapsed&&(!d||jt(d.marker,C)<0)&&(d=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var _=0;_<b.length;_+=2)b[_+1]==v&&(c+=" "+b[_]);if(!d||d.from==p)for(var S=0;S<y.length;++S)yr(t,0,y[S]);if(d&&(d.from||0)==p){if(yr(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;var M=Math.min(h,v);while(1){if(m){var L=p+m.length;if(!d){var T=L>M?m.slice(0,M-p):m;t.addToken(t,T,l?l+a:a,u,p+T.length==v?c:"",s,f)}if(L>=M){m=m.slice(M-p),p=M;break}p=L,u=""}m=i.slice(o,o=r[g++]),l=fr(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),fr(r[N+1],t.cm.options))}function xr(e,t,r){this.line=t,this.rest=Qt(t),this.size=this.rest?et(q(this.rest))-r+1:1,this.node=this.text=null,this.hidden=rr(e,t)}function wr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new xr(e.doc,Ye(e.doc,o),o);n=o+l.size,i.push(l)}return i}var Cr=null;function kr(e){Cr?Cr.ops.push(e):e.ownsGroup=Cr={ops:[e],delayedCallbacks:[]}}function _r(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)while(i.cursorActivityCalled<i.cursorActivityHandlers.length)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Sr(e,t){var r=e.ownsGroup;if(r)try{_r(r)}finally{Cr=null,t(r)}}var Mr=null;function Lr(e,t){var r=ge(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);Cr?n=Cr.delayedCallbacks:Mr?n=Mr:(n=Mr=[],setTimeout(Tr,0));for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},l=0;l<r.length;++l)o(l)}}function Tr(){var e=Mr;Mr=null;for(var t=0;t<e.length;++t)e[t]()}function Nr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Wr(e,t):"gutter"==o?Hr(e,t,r,n):"class"==o?zr(e,t):"widget"==o&&Er(e,t,n)}t.changes=null}function Or(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function Ar(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Or(t);t.background=n.insertBefore(N("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Dr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):hr(e,t)}function Wr(e,t){var r=t.text.className,n=Dr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,zr(e,t)):r&&(t.text.className=r)}function zr(e,t){Ar(e,t),t.line.wrapClass?Or(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Hr(e,t,r,n){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 i=Or(t);t.gutterBackground=N("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=Or(t),s=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(N("div",nt(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.display.gutterSpecs.length;++a){var c=e.display.gutterSpecs[a].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(N("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function Er(e,t,r){t.alignable&&(t.alignable=null);for(var n=_("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Pr(e,t,r)}function Fr(e,t,r,n){var i=Dr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),zr(e,t),Hr(e,t,r,n),Pr(e,t,n),t.node}function Pr(e,t,r){if(Ir(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ir(e,t.rest[n],t,r,!1)}function Ir(e,t,r,n,i){if(t.widgets)for(var o=Or(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],c=N("div",[a.node],"CodeMirror-linewidget"+(a.className?" "+a.className:""));a.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Rr(a,c,r,n),e.display.input.setUneditable(c),i&&a.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),Lr(a,"redraw")}}function Rr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Br(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!A(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,N("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Gr(e,t){for(var r=Me(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ur(e){return e.lineSpace.offsetTop}function Vr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function jr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,N("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Kr(e){return B-e.display.nativeBarWidth}function $r(e){return e.display.scroller.clientWidth-Kr(e)-e.display.barWidth}function Xr(e){return e.display.scroller.clientHeight-Kr(e)-e.display.barHeight}function qr(e,t,r){var n=e.options.lineWrapping,i=n&&$r(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],c=l[s+1];Math.abs(a.bottom-c.bottom)>2&&o.push((a.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Yr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Zr(e,t){t=Zt(t);var r=et(t),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=hr(e,n);return n.text=i.pre,T(e.display.lineMeasure,i.pre),n}function Jr(e,t,r,n){return tn(e,en(e,t),r,n)}function Qr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Hn(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function en(e,t){var r=et(t),n=Qr(e,r);n&&!n.text?n=null:n&&n.changes&&(Nr(e,n,r,On(e)),e.curOp.forceUpdate=!0),n||(n=Zr(e,t));var i=Yr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function tn(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(qr(e,t.view,t.rect),t.hasHeights=!0),o=sn(e,t,r,n),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var rn,nn={left:0,right:0,top:0,bottom:0};function on(e,t,r){for(var n,i,o,l,s,a,c=0;c<e.length;c+=3)if(s=e[c],a=e[c+1],t<s?(i=0,o=1,l="left"):t<a?(i=t-s,o=i+1):(c==e.length-3||t==a&&e[c+3]>t)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[c+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)while(c&&e[c-2]==e[c-3]&&e[c-1].insertLeft)n=e[2+(c-=3)],l="left";if("right"==r&&i==a-s)while(c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft)n=e[(c+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function ln(e,t){var r=nn;if("left"==t){for(var n=0;n<e.length;n++)if((r=e[n]).left!=r.right)break}else for(var i=e.length-1;i>=0;i--)if((r=e[i]).left!=r.right)break;return r}function sn(e,t,r,n){var i,o=on(t.map,r,n),a=o.node,c=o.start,u=o.end,d=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){while(c&&oe(t.line.text.charAt(o.coverStart+c)))--c;while(o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u)))++u;if(i=l&&s<9&&0==c&&u==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():ln(S(a,c,u).getClientRects(),n),i.left||i.right||0==c)break;u=c,c-=1,d="right"}l&&s<11&&(i=an(e.display.measure,i))}else{var h;c>0&&(d=n="right"),i=e.options.lineWrapping&&(h=a.getClientRects()).length>1?h["right"==n?h.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Nn(e.display),top:p.top,bottom:p.bottom}:nn}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1;b++)if(v<y[b])break;var x=b?y[b-1]:0,w=y[b],C={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:x,bottom:w};return i.left||i.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=m),C}function an(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Fe(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function cn(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 un(e){e.display.externalMeasure=null,L(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)cn(e.display.view[t])}function dn(e){un(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fn(){return u&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function hn(){return u&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Br(e.widgets[r]));return t}function gn(e,t,r,n,i){if(!i){var o=pn(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=ir(t);if("local"==n?l+=Ur(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:hn());var a=s.left+("window"==n?0:fn());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function mn(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=fn(),i-=hn();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function vn(e,t,r,n,i){return n||(n=Ye(e.doc,t.line)),gn(e,n,Jr(e,n,t.ch,i),r)}function yn(e,t,r,n,i,o){function l(t,l){var s=tn(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,gn(e,n,s,r)}n=n||Ye(e.doc,t.line),i||(i=en(e,n));var s=fe(n,e.doc.direction),a=t.ch,c=t.sticky;if(a>=n.text.length?(a=n.text.length,c="before"):a<=0&&(a=0,c="after"),!s)return l("before"==c?a-1:a,"before"==c);function u(e,t,r){var n=s[t],i=1==n.level;return l(r?e-1:e,i!=r)}var d=ue(s,a,c),f=ce,h=u(a,d,"before"==c);return null!=f&&(h.other=u(a,f,"before"!=c)),h}function bn(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=Nn(e.display)*t.ch);var n=Ye(e.doc,t.line),i=ir(n)+Ur(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=it(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function wn(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return xn(n.first,0,null,-1,-1);var i=tt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ye(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ye(n,i);;){var s=Sn(e,l,i,t,r),a=qt(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var c=a.find(1);if(c.line==i)return c;l=Ye(n,i=c.line)}}function Cn(e,t,r,n){n-=pn(t);var i=t.text.length,o=se((function(t){return tn(e,r,t-1).bottom<=n}),i,0);return i=se((function(t){return tn(e,r,t).top>n}),o,i),{begin:o,end:i}}function kn(e,t,r,n){r||(r=en(e,t));var i=gn(e,t,tn(e,r,n),"line").top;return Cn(e,t,r,i)}function _n(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Sn(e,t,r,n,i){i-=ir(t);var o=en(e,t),l=pn(t),s=0,a=t.text.length,c=!0,u=fe(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Ln:Mn)(e,t,r,o,u,n,i);c=1!=d.level,s=c?d.from:d.to-1,a=c?d.to:d.from-1}var f,h,p=null,g=null,m=se((function(t){var r=tn(e,o,t);return r.top+=l,r.bottom+=l,!!_n(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),s,a),v=!1;if(g){var y=n-g.left<g.right-n,b=y==c;m=p+(b?0:1),h=b?"after":"before",f=y?g.left:g.right}else{c||m!=a&&m!=s||m++,h=0==m?"after":m==t.text.length?"before":tn(e,o,m-(c?1:0)).bottom+l<=i==c?"after":"before";var x=yn(e,it(r,m,h),"line",t,o);f=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return m=le(t.text,m,1),xn(r,m,h,v,n-f)}function Mn(e,t,r,n,i,o,l){var s=se((function(s){var a=i[s],c=1!=a.level;return _n(yn(e,it(r,c?a.to:a.from,c?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),a=i[s];if(s>0){var c=1!=a.level,u=yn(e,it(r,c?a.from:a.to,c?"after":"before"),"line",t,n);_n(u,o,l,!0)&&u.top>l&&(a=i[s-1])}return a}function Ln(e,t,r,n,i,o,l){var s=Cn(e,t,n,l),a=s.begin,c=s.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<=a)){var p=1!=h.level,g=tn(e,n,p?Math.min(c,h.to)-1:Math.max(a,h.from)).right,m=g<o?o-g+1e9:g-o;(!u||d>m)&&(u=h,d=m)}}return u||(u=i[i.length-1]),u.from<a&&(u={from:a,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Tn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rn){rn=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rn.appendChild(document.createTextNode("x")),rn.appendChild(N("br"));rn.appendChild(document.createTextNode("x"))}T(e.measure,rn);var r=rn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),L(e.measure),r||1}function Nn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t],"CodeMirror-line-like");T(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function On(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:An(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function An(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Dn(e){var t=Tn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Nn(e.display)-3);return function(i){if(rr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Wn(e){var t=e.doc,r=Dn(e);t.iter((function(e){var t=r(e);t!=e.height&&Qe(e,t)}))}function zn(e,t,r,n){var i=e.display;if(!r&&"true"==Me(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(d){return null}var a,c=wn(e,o,l);if(n&&c.xRel>0&&(a=Ye(e.doc,c.line).text).length==c.ch){var u=P(a,a.length,e.options.tabSize)-a.length;c=it(c.line,Math.max(0,Math.round((o-jr(e.display).left)/Nn(e.display))-u))}return c}function Hn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function En(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Nt&&er(e.doc,t)<i.viewTo&&Pn(e);else if(r<=i.viewFrom)Nt&&tr(e.doc,r+n)>i.viewFrom?Pn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Pn(e);else if(t<=i.viewFrom){var o=In(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Pn(e)}else if(r>=i.viewTo){var l=In(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Pn(e)}else{var s=In(e,t,t,-1),a=In(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(wr(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Pn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Fn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Hn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==R(l,r)&&l.push(r)}}}function Pn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function In(e,t,r,n){var i,o=Hn(e,t),l=e.display.view;if(!Nt||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}while(er(e.doc,r)!=r){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Rn(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=wr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=wr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Hn(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(wr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Hn(e,r)))),n.viewTo=r}function Bn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Gn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Un(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&Vn(e,s.head,i),a||Kn(e,s,o)}}return n}function Vn(e,t,r){var n=yn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(N("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=vn(e,t,"div",null,null);i.style.width=Math.max(0,o.right-o.left)+"px"}if(n.other){var l=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function jn(e,t){return e.top-t.top||e.left-t.left}function Kn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=jr(e.display),s=l.left,a=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-l.right,c="ltr"==i.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function d(t,r,n){var o,l,d=Ye(i,t),f=d.text.length;function h(r,n){return vn(e,it(t,r),"div",d,n)}function p(t,r,n){var i=kn(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right",l="after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1);return h(l,o)[o]}var g=fe(d,i.direction);return ae(g,r||0,null==n?f:n,(function(e,t,i,d){var m="ltr"==i,v=h(e,m?"left":"right"),y=h(t-1,m?"right":"left"),b=null==r&&0==e,x=null==n&&t==f,w=0==d,C=!g||d==g.length-1;if(y.top-v.top<=3){var k=(c?b:x)&&w,_=(c?x:b)&&C,S=k?s:(m?v:y).left,M=_?a:(m?y:v).right;u(S,v.top,M-S,v.bottom)}else{var L,T,N,O;m?(L=c&&b&&w?s:v.left,T=c?a:p(e,i,"before"),N=c?s:p(t,i,"after"),O=c&&x&&C?a:y.right):(L=c?p(e,i,"before"):s,T=!c&&b&&w?a:v.right,N=!c&&x&&C?s:y.left,O=c?p(t,i,"after"):a),u(L,v.top,T-L,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(N,y.top,O-N,y.bottom)}(!o||jn(v,o)<0)&&(o=v),jn(y,o)<0&&(o=y),(!l||jn(v,l)<0)&&(l=v),jn(y,l)<0&&(l=y)})),{start:o,end:l}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=Ye(i,f.line),g=Ye(i,h.line),m=Zt(p)==Zt(g),v=d(f.line,f.ch,m?p.text.length+1:null).end,y=d(h.line,m?0:null,h.ch).start;m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}r.appendChild(o)}function $n(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Zn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Yn(e))}function qn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zn(e))}),100)}function Yn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Zn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Jn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,c=0;if(!i.hidden){if(l&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;a=u-r,r=u}else{var d=i.node.getBoundingClientRect();a=d.bottom-d.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=i.line.height-a;if((f>.005||f<-.005)&&(Qe(i.line,a),Qn(i.line),i.rest))for(var h=0;h<i.rest.length;h++)Qn(i.rest[h]);if(c>e.display.sizerWidth){var p=Math.ceil(c/Nn(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Qn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ei(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ur(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=tt(t,n),l=tt(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=tt(t,ir(Ye(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=tt(t,ir(Ye(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function ti(e,t){if(!ye(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ur(e.display))+"px;\n height: "+(t.bottom-t.top+Kr(e)+r.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)}}}function ri(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,s=yn(e,t),a=r&&r!=t?yn(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};var c=ii(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(di(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(l=!0)),null!=c.scrollLeft&&(hi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(l=!0)),!l)break}return i}function ni(e,t){var r=ii(e,t);null!=r.scrollTop&&di(e,r.scrollTop),null!=r.scrollLeft&&hi(e,r.scrollLeft)}function ii(e,t){var r=e.display,n=Tn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Xr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Vr(r),a=t.top<n,c=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(l.scrollTop=u)}var d=e.options.fixedGutter?0:r.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,h=$r(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<f?l.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function oi(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function li(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ai(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=bn(e,t.from),n=bn(e,t.to);ui(e,r,n,t.margin)}}function ui(e,t,r,n){var i=ii(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||Gi(e,{top:t}),fi(e,t,!0),r&&Gi(e),zi(e,100))}function fi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Ki(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Vr(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?r:0,docHeight:n,scrollHeight:n+Kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var gi=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};gi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},gi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},gi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},gi.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new I,this.disableVert=new I},gi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect(),o="vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},gi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var mi=function(){};function vi(e,t){t||(t=pi(e));var r=e.display.barWidth,n=e.display.barHeight;yi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Jn(e),yi(e,pi(e)),r=e.display.barWidth,n=e.display.barHeight}function yi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var bi={native:gi,null:mi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?hi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var wi=0;function Ci(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:++wi,markArrays:null},kr(e.curOp)}function ki(e){var t=e.curOp;t&&Sr(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;_i(e)}))}function _i(e){for(var t=e.ops,r=0;r<t.length;r++)Si(t[r]);for(var n=0;n<t.length;n++)Mi(t[n]);for(var i=0;i<t.length;i++)Li(t[i]);for(var o=0;o<t.length;o++)Ti(t[o]);for(var l=0;l<t.length;l++)Ni(t[l])}function Si(e){var t=e.cm,r=t.display;Fi(t),e.updateMaxLine&&lr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ei(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mi(e){e.updatedDisplay=e.mustUpdate&&Ri(e.cm,e.update)}function Li(e){var t=e.cm,r=t.display;e.updatedDisplay&&Jn(t),e.barMeasure=pi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Jr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ti(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&hi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&vi(t,e.barMeasure),e.updatedDisplay&&ji(t,e.barMeasure),e.selectionChanged&&$n(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Xn(e.cm)}function Ni(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Bi(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&fi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&hi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=ri(t,dt(n,e.scrollToPos.from),dt(n,e.scrollToPos.to),e.scrollToPos.margin);ti(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||ve(o[s],"hide");if(l)for(var a=0;a<l.length;++a)l[a].lines.length&&ve(l[a],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Oi(e,t){if(e.curOp)return t();Ci(e);try{return t()}finally{ki(e)}}function Ai(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ci(e);try{return t.apply(e,arguments)}finally{ki(e)}}}function Di(e){return function(){if(this.curOp)return e.apply(this,arguments);Ci(this);try{return e.apply(this,arguments)}finally{ki(this)}}}function Wi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ci(t);try{return e.apply(this,arguments)}finally{ki(t)}}}function zi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(Hi,e))}function Hi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=yt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?Ke(t.mode,n.state):null,a=mt(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var c=o.styleClasses,u=a.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!l||l.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<l.length;++f)d=l[f]!=o.styles[f];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return zi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Oi(e,(function(){for(var t=0;t<i.length;t++)Fn(e,i[t],"text")}))}}var Ei=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ei(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=$r(e),this.force=r,this.dims=On(e),this.events=[]};function Fi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kr(e)+"px",t.scrollbarsClipped=!0)}function Pi(e){if(e.hasFocus())return null;var t=D();if(!t||!A(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&A(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Ii(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Ri(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Pn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Bn(e))return!1;$i(e)&&(Pn(e),t.dims=On(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Nt&&(o=er(e.doc,o),l=tr(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Rn(e,o,l),r.viewOffset=ir(Ye(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var a=Bn(e);if(!s&&0==a&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=Pi(e);return a>4&&(r.lineDiv.style.display="none"),Ui(e,r.updateLineNumbers,t.dims),a>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ii(c),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,zi(e,400)),r.updateLineNumbers=null,!0}function Bi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ei(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Vr(e.display)-Xr(e),r.top)}),t.visible=ei(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ri(e,t))break;Jn(e);var i=pi(e);Gn(e),vi(e,i),ji(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 Gi(e,t){var r=new Ei(e,t);if(Ri(e,r)){Jn(e),Bi(e,r);var n=pi(e);Gn(e),vi(e,n),ji(e,n),r.finish()}}function Ui(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var c=n.view,u=n.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){while(l!=f.node)l=s(l);var h=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(R(f.changes,"gutter")>-1&&(h=!1),Nr(e,f,u,r)),h&&(L(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(nt(e.options,u)))),l=f.node.nextSibling}else{var p=Fr(e,f,u,r);o.insertBefore(p,l)}u+=f.size}while(l)l=s(l)}function Vi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Lr(e,"gutterChanged",e)}function ji(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+Kr(e)+"px"}function Ki(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=An(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function $i(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=nt(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(N("div",[N("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Vi(e.display),!0}return!1}function Xi(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:l})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function qi(e){var t=e.gutters,r=e.gutterSpecs;L(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,l=i.style,s=t.appendChild(N("div",null,"CodeMirror-gutter "+o));l&&(s.style.cssText=l),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Vi(e)}function Yi(e){qi(e.display),En(e),Ki(e)}function Zi(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=O("div",null,"CodeMirror-code"),o.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=N("div",null,"CodeMirror-cursors"),o.measure=N("div",null,"CodeMirror-measure"),o.lineMeasure=N("div",null,"CodeMirror-measure"),o.lineSpace=O("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=O("div",[o.lineSpace],"CodeMirror-lines");o.mover=N("div",[c],null,"position: relative"),o.sizer=N("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=N("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),o.gutters=N("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=N("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=N("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),l&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),a||r&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Xi(i.gutters,i.lineNumbers),qi(o),n.init(o)}Ei.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},Ei.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var Ji=0,Qi=null;function eo(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function to(e){var t=eo(e);return t.x*=Qi,t.y*=Qi,t}function ro(e,t){var n=eo(t),i=n.x,o=n.y,l=e.display,s=l.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&a)e:for(var f=t.target,h=l.view;f!=s;f=f.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!d&&null!=Qi)return o&&u&&di(e,Math.max(0,s.scrollTop+o*Qi)),hi(e,Math.max(0,s.scrollLeft+i*Qi)),(!o||o&&u)&&Ce(t),void(l.wheelStartX=null);if(o&&null!=Qi){var g=o*Qi,m=e.doc.scrollTop,v=m+l.wrapper.clientHeight;g<0?m=Math.max(0,m+g-50):v=Math.min(e.doc.height,v+g+50),Gi(e,{top:m,bottom:v})}Ji<20&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout((function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(Qi=(Qi*Ji+r)/(Ji+1),++Ji)}}),200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?Qi=-.53:r?Qi=15:u?Qi=-.7:f&&(Qi=-1/3);var no=function(e,t){this.ranges=e,this.primIndex=t};no.prototype.primary=function(){return this.ranges[this.primIndex]},no.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 r=this.ranges[t],n=e.ranges[t];if(!lt(r.anchor,n.anchor)||!lt(r.head,n.head))return!1}return!0},no.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new io(st(this.ranges[t].anchor),st(this.ranges[t].head));return new no(e,this.primIndex)},no.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},no.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ot(t,n.from())>=0&&ot(e,n.to())<=0)return r}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return ot(e.from(),t.from())})),r=R(t,i);for(var o=1;o<t.length;o++){var l=t[o],s=t[o-1],a=ot(s.to(),l.from());if(n&&!l.empty()?a>0:a>=0){var c=ct(s.from(),l.from()),u=at(s.to(),l.to()),d=s.empty()?l.from()==l.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new io(d?u:c,d?c:u))}}return new no(t,r)}function lo(e,t){return new no([new io(e,t||e)],0)}function so(e){return e.text?it(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ao(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),it(r,n)}function co(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new io(ao(i.anchor,t),ao(i.head,t)))}return oo(e.cm,r,e.sel.primIndex)}function uo(e,t,r){return e.line==t.line?it(r.line,e.ch-t.ch+r.ch):it(r.line+(e.line-t.line),e.ch)}function fo(e,t,r){for(var n=[],i=it(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=uo(s.from,i,o),c=uo(so(s),i,o);if(i=s.to,o=c,"around"==r){var u=e.sel.ranges[l],d=ot(u.head,u.anchor)<0;n[l]=new io(d?c:a,d?a:c)}else n[l]=new io(a,a)}return new no(n,e.sel.primIndex)}function ho(e){e.doc.mode=Ue(e.options,e.doc.modeOption),po(e)}function po(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,zi(e,100),e.state.modeGen++,e.curOp&&En(e)}function go(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function mo(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){ar(e,r,i,n),Lr(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new sr(c[o],i(o),n));return r}var s=t.from,a=t.to,c=t.text,u=Ye(e,s.line),d=Ye(e,a.line),f=q(c),h=i(c.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,c.length)),e.remove(c.length,e.size-c.length);else if(go(e,t)){var g=l(0,c.length-1);o(d,d.text,h),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+f+u.text.slice(a.ch),h);else{var m=l(1,c.length-1);m.push(new sr(f+u.text.slice(a.ch),h,n)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(d,f+d.text.slice(a.ch),h);var v=l(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}Lr(e,"change",e,t)}function vo(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var s=e.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),n(s.doc,e,a))}}}n(e,null,!0)}function yo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Wn(e),ho(e),bo(e),e.options.direction=t.direction,e.options.lineWrapping||lr(e),e.options.mode=t.modeOption,En(e)}function bo(e){("rtl"==e.doc.direction?W:M)(e.display.lineDiv,"CodeMirror-rtl")}function xo(e){Oi(e,(function(){bo(e),En(e)}))}function wo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Co(e,t){var r={from:st(t.from),to:so(t),text:Ze(e,t.from,t.to)};return No(e,r,t.from.line,t.to.line+1),vo(e,(function(e){return No(e,r,t.from.line,t.to.line+1)}),!0),r}function ko(e){while(e.length){var t=q(e);if(!t.ranges)break;e.pop()}}function _o(e,t){return t?(ko(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}function So(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=_o(i,i.lastOp==n)))l=q(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,l.to)?l.to=so(t):o.changes.push(Co(e,t));else{var a=q(i.done);a&&a.ranges||To(e.sel,i.done),o={changes:[Co(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||ve(e,"historyAdded")}function Mo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Lo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Mo(e,o,q(i.done),t))?i.done[i.done.length-1]=t:To(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ko(i.undone)}function To(e,t){var r=q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function No(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Oo(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Ao(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Oo(r[i]));return n}function Do(e,t){var r=Ao(e,t),n=Pt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],c=0;c<o.length;++c)if(o[c].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function Wo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?no.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var c=l[a],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&R(t,Number(u[1]))>-1&&(q(s)[d]=c[d],delete c[d])}}}return n}function zo(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ot(t,i)<0;o!=ot(r,i)<0?(i=t,t=r):o!=ot(t,r)<0&&(t=r)}return new io(i,t)}return new io(r||t,t)}function Ho(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Bo(e,new no([zo(e.sel.primary(),t,r,i)],0),n)}function Eo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=zo(e.sel.ranges[o],t[o],null,i);var l=oo(e.cm,n,e.sel.primIndex);Bo(e,l,r)}function Fo(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Bo(e,oo(e.cm,i,e.sel.primIndex),n)}function Po(e,t,r,n){Bo(e,lo(t,r),n)}function Io(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new io(dt(e,t[r].anchor),dt(e,t[r].head))},origin:r&&r.origin};return ve(e,"beforeSelectionChange",e,n),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?oo(e.cm,n.ranges,n.ranges.length-1):t}function Ro(e,t,r){var n=e.history.done,i=q(n);i&&i.ranges?(n[n.length-1]=t,Go(e,t,r)):Bo(e,t,r)}function Bo(e,t,r){Go(e,t,r),Lo(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Go(e,t,r){(xe(e,"beforeSelectionChange")||e.cm&&xe(e.cm,"beforeSelectionChange"))&&(t=Io(e,t,r));var n=r&&r.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);Uo(e,jo(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||li(e.cm)}function Uo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,be(e.cm)),Lr(e,"cursorActivity",e))}function Vo(e){Uo(e,jo(e,e.sel,null,!1))}function jo(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=$o(e,l.anchor,s&&s.anchor,r,n),c=$o(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||c!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new io(a,c))}return i?oo(e.cm,i,t.primIndex):t}function Ko(e,t,r,n,i){var o=Ye(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker,c="selectLeft"in a?!a.selectLeft:a.inclusiveLeft,u="selectRight"in a?!a.selectRight:a.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(ve(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var d=a.find(n<0?1:-1),f=void 0;if((n<0?u:c)&&(d=Xo(e,d,-n,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=ot(d,r))&&(n<0?f<0:f>0))return Ko(e,d,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?c:u)&&(h=Xo(e,h,n,h.line==t.line?o:null)),h?Ko(e,h,t,n,i):null}}return t}function $o(e,t,r,n,i){var o=n||1,l=Ko(e,t,r,o,i)||!i&&Ko(e,t,r,o,!0)||Ko(e,t,r,-o,i)||!i&&Ko(e,t,r,-o,!0);return l||(e.cantEdit=!0,it(e.first,0))}function Xo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1)):null:r>0&&t.ch==(n||Ye(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+r)}function qo(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),U)}function Yo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=dt(e,t)),r&&(n.to=dt(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),ve(e,"beforeChange",e,n),e.cm&&ve(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Zo(e,t,r){if(e.cm){if(!e.cm.curOp)return Ai(e.cm,Zo)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"))||(t=Yo(e,t,!0),t)){var n=Tt&&!r&&Rt(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Jo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Jo(e,t)}}function Jo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var r=co(e,t);So(e,t,r,e.cm?e.cm.curOp.id:NaN),tl(e,t,r,Pt(e,t));var n=[];vo(e,(function(e,r){r||-1!=R(n,e.history)||(ll(e.history,t),n.push(e.history)),tl(e,t,null,Pt(e,t))}))}}function Qo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,s="undo"==t?o.done:o.undone,a="undo"==t?o.undone:o.done,c=0;c<s.length;c++)if(i=s[c],r?i.ranges&&!i.equals(e.sel):!i.ranges)break;if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(i=s.pop(),!i.ranges){if(n)return void s.push(i);break}if(To(i,a),r&&!i.equals(e.sel))return void Bo(e,i,{clearRedo:!1});l=i}var u=[];To(l,a),a.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"),f=function(r){var n=i.changes[r];if(n.origin=t,d&&!Yo(e,n,!1))return s.length=0,{};u.push(Co(e,n));var o=r?co(e,n):q(s);tl(e,n,o,Do(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:so(n)});var l=[];vo(e,(function(e,t){t||-1!=R(l,e.history)||(ll(e.history,n),l.push(e.history)),tl(e,n,null,Do(e,n))}))},h=i.changes.length-1;h>=0;--h){var p=f(h);if(p)return p.v}}}}function el(e,t){if(0!=t&&(e.first+=t,e.sel=new no(Y(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){En(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Fn(e.cm,n,"gutter")}}function tl(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ai(e.cm,tl)(e,t,r,n);if(t.to.line<e.first)el(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);el(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ye(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ze(e,t.from,t.to),r||(r=co(e,t)),e.cm?rl(e.cm,t,n):mo(e,t,n),Go(e,r,U),e.cantEdit&&$o(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function rl(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=et(Zt(Ye(n,o.line))),n.iter(a,l.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&be(e),mo(n,t,r,Dn(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,(function(e){var t=or(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Lt(n,o.line),zi(e,400);var c=t.text.length-(l.line-o.line)-1;t.full?En(e):o.line!=l.line||1!=t.text.length||go(e.doc,t)?En(e,o.line,l.line+1,c):Fn(e,o.line,"text");var u=xe(e,"changes"),d=xe(e,"change");if(d||u){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};d&&Lr(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function nl(e,t,r,n,i){var o;n||(n=r),ot(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Zo(e,{from:r,to:n,text:t,origin:i})}function il(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ol(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)il(o.ranges[s].anchor,t,r,n),il(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var c=o.changes[a];if(r<c.from.line)c.from=it(c.from.line+n,c.from.ch),c.to=it(c.to.line+n,c.to.ch);else if(t<=c.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function ll(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ol(e.done,r,n,i),ol(e.undone,r,n,i)}function sl(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Ye(e,ut(e,t)):i=et(t),null==i?null:(n(o,i)&&e.cm&&Fn(e.cm,i,r),o)}function al(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function cl(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}io.prototype.from=function(){return ct(this.anchor,this.head)},io.prototype.to=function(){return at(this.anchor,this.head)},io.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},al.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,cr(i),Lr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},cl.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof al))){var s=[];this.collapse(s),this.children=[new al(s)],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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new al(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),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),r=new cl(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=R(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new cl(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var ul=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function dl(e,t,r){ir(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&oi(e,r)}function fl(e,t,r,n){var i=new ul(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),sl(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!rr(e,t)){var n=ir(t)<e.scrollTop;Qe(t,t.height+Br(i)),n&&oi(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Lr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}ul.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=et(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Br(this);Qe(r,Math.max(0,r.height-o)),e&&(Oi(e,(function(){dl(e,r,-o),Fn(e,n,"widget")})),Lr(e,"lineWidgetCleared",e,this,n))}},ul.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Br(this)-t;i&&(rr(this.doc,n)||Qe(n,n.height+i),r&&Oi(r,(function(){r.curOp.forceUpdate=!0,dl(r,n,i),Lr(r,"lineWidgetChanged",r,e,et(n))})))},we(ul);var hl=0,pl=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++hl};function gl(e,t,r,n,i){if(n&&n.shared)return vl(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ai(e.cm,gl)(e,t,r,n,i);var o=new pl(e,i),l=ot(t,r);if(n&&F(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Yt(e,t.line,t,r,o)||t.line!=r.line&&Yt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");At()}o.addToHistory&&So(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,c=e.cm;if(e.iter(a,r.line+1,(function(n){c&&o.collapsed&&!c.options.lineWrapping&&Zt(n)==c.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&Qe(n,0),Ht(n,new Dt(o,a==t.line?t.ch:null,a==r.line?r.ch:null),e.cm&&e.cm.curOp),++a})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){rr(e,t)&&Qe(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ot(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++hl,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)En(c,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=r.line;u++)Fn(c,u,"text");o.atomic&&Vo(c.doc),Lr(c,"markerAdded",c,o)}return o}pl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ci(e),xe(this,"clear")){var r=this.find();r&&Lr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=Wt(l.markedSpans,this);e&&!this.collapsed?Fn(e,et(l),"text"):e&&(null!=s.to&&(i=et(l)),null!=s.from&&(n=et(l))),l.markedSpans=zt(l.markedSpans,s),null==s.from&&this.collapsed&&!rr(this.doc,l)&&e&&Qe(l,Tn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var c=Zt(this.lines[a]),u=or(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&En(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vo(e.doc)),e&&Lr(e,"markerCleared",e,this,n,i),t&&ki(e),this.parent&&this.parent.clear()}},pl.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Wt(o.markedSpans,this);if(null!=l.from&&(r=it(t?o:et(o),l.from),-1==e))return r;if(null!=l.to&&(n=it(t?o:et(o),l.to),1==e))return n}return r&&{from:r,to:n}},pl.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Oi(n,(function(){var i=t.line,o=et(t.line),l=Qr(n,o);if(l&&(cn(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!rr(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=Br(r)-s;a&&Qe(i,i.height+a)}Lr(n,"markerChanged",n,e)}))},pl.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=R(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},pl.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(pl);var ml=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function vl(e,t,r,n,i){n=F(n),n.shared=!1;var o=[gl(e,t,r,n,i)],l=o[0],s=n.widgetNode;return vo(e,(function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(gl(e,dt(e,t),dt(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=q(o)})),new ml(o,l)}function yl(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function bl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(ot(o,l)){var s=gl(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function xl(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];vo(r.primary.doc,(function(e){return n.push(e)}));for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==R(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}ml.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Lr(this,"clear")}},ml.prototype.find=function(e,t){return this.primary.find(e,t)},we(ml);var wl=0,Cl=function(e,t,r,n,i){if(!(this instanceof Cl))return new Cl(e,t,r,n,i);null==r&&(r=0),cl.call(this,[new al([new sr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=it(r,0);this.sel=lo(o),this.history=new wo(null),this.id=++wl,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),mo(this,{from:o,to:o,text:e}),Bo(this,lo(o),U)};Cl.prototype=Q(cl.prototype,{constructor:Cl,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Je(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Wi((function(e){var t=it(this.first,0),r=this.first+this.size-1;Zo(this,{from:t,to:it(r,Ye(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),Bo(this,lo(t),U)})),replaceRange:function(e,t,r,n){t=dt(this,t),r=r?dt(this,r):t,nl(this,e,t,r,n)},getRange:function(e,t,r){var n=Ze(this,dt(this,e),dt(this,t));return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(rt(this,e))return Ye(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ye(this,e)),Zt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return dt(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||!1===e?r.to():r.from(),t},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wi((function(e,t,r){Po(this,dt(this,"number"==typeof e?it(e,t||0):e),null,r)})),setSelection:Wi((function(e,t,r){Po(this,dt(this,e),dt(this,t||e),r)})),extendSelection:Wi((function(e,t,r){Ho(this,dt(this,e),t&&dt(this,t),r)})),extendSelections:Wi((function(e,t){Eo(this,ht(this,e),t)})),extendSelectionsBy:Wi((function(e,t){var r=Y(this.sel.ranges,e);Eo(this,ht(this,r),t)})),setSelections:Wi((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new io(dt(this,e[i].anchor),dt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Bo(this,oo(this.cm,n,t),r)}})),addSelection:Wi((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new io(dt(this,e),dt(this,t||e))),Bo(this,oo(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Ze(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Ze(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Wi((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&fo(this,n,t),a=n.length-1;a>=0;a--)Zo(this,n[a]);s?Ro(this,s):this.cm&&li(this.cm)})),undo:Wi((function(){Qo(this,"undo")})),redo:Wi((function(){Qo(this,"redo")})),undoSelection:Wi((function(){Qo(this,"undo",!0)})),redoSelection:Wi((function(){Qo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new wo(this.history),vo(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:Wo(this.history.done),undone:Wo(this.history.undone)}},setHistory:function(e){var t=this.history=new wo(this.history);t.done=Wo(e.done.slice(0),null,!0),t.undone=Wo(e.undone.slice(0),null,!0)},setGutterMarker:Wi((function(e,t,r){return sl(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&ne(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:Wi((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&sl(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,ne(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!rt(this,e))return null;if(t=e,e=Ye(this,e),!e)return null}else if(t=et(e),null==t)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:Wi((function(e,t,r){return sl(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(_(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:Wi((function(e,t,r){return sl(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(_(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0}))})),addLineWidget:Wi((function(e,t,r){return fl(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return gl(this,dt(this,e),dt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=dt(this,e),gl(this,e,e,r,"bookmark")},findMarksAt:function(e){e=dt(this,e);var t=[],r=Ye(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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,r){e=dt(this,e),t=dt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r})),dt(this,it(r,t))},indexFromPos:function(e){e=dt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new Cl(Je(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,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Cl(Je(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],bl(n,yl(this)),n},unlinkDoc:function(e){if(e instanceof Es&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xl(yl(this));break}}if(e.history==this.history){var n=[e.id];vo(e,(function(e){return n.push(e.id)}),!0),e.history=new wo(null),e.history.done=Wo(this.history.done,n),e.history.undone=Wo(this.history.undone,n)}},iterLinkedDocs:function(e){vo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):We(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Wi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&xo(this.cm))}))}),Cl.prototype.eachLine=Cl.prototype.iter;var kl=0;function _l(e){var t=this;if(Ll(t),!ye(t,e)&&!Gr(t.display,e)){Ce(e),l&&(kl=+new Date);var r=zn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,a=function(){++s==i&&Ai(t,(function(){r=dt(t.doc,r);var e={from:r,to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Zo(t.doc,e),Ro(t.doc,lo(dt(t.doc,r),dt(t.doc,so(e))))}))()},c=function(e,r){if(t.options.allowDropFileTypes&&-1==R(t.options.allowDropFileTypes,e.type))a();else{var n=new FileReader;n.onerror=function(){return a()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),a()},n.readAsText(e)}},u=0;u<n.length;u++)c(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Go(t.doc,lo(r,r)),f)for(var h=0;h<f.length;++h)nl(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(p){}}}}function Sl(e,t){if(l&&(!e.state.draggingText||+new Date-kl<100))Se(t);else if(!ye(e,t)&&!Gr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=N("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}function Ml(e,t){var r=zn(e,t);if(r){var n=document.createDocumentFragment();Vn(e,r,n),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,n)}}function Ll(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Tl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var Nl=!1;function Ol(){Nl||(Al(),Nl=!0)}function Al(){var e;pe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Tl(Dl)}),100))})),pe(window,"blur",(function(){return Tl(Zn)}))}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Wl={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"},zl=0;zl<10;zl++)Wl[zl+48]=Wl[zl+96]=String(zl);for(var Hl=65;Hl<=90;Hl++)Wl[Hl]=String.fromCharCode(Hl);for(var El=1;El<=12;El++)Wl[El+111]=Wl[El+63235]="F"+El;var Fl={};function Pl(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Il(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Y(r.split(" "),Pl),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var c in t)e[c]=t[c];return e}function Rl(e,t,r,n){t=Vl(t);var i=t.call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Rl(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Rl(e,t.fallthrough[o],r,n);if(l)return l}}}function Bl(e){var t="string"==typeof e?e:Wl[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Gl(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ul(e,t){if(d&&34==e.keyCode&&e["char"])return!1;var r=Wl[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Gl(r,e,t))}function Vl(e){return"string"==typeof e?Fl[e]:e}function jl(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){var o=t(r[i]);while(n.length&&ot(o.from,q(n).to)<=0){var l=n.pop();if(ot(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Oi(e,(function(){for(var t=n.length-1;t>=0;t--)nl(e.doc,"",n[t].from,n[t].to,"+delete");li(e)}))}function Kl(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $l(e,t,r){var n=Kl(e,t.ch,r);return null==n?null:new it(t.line,n,r<0?"after":"before")}function Xl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(r,t.doc.direction);if(o){var l,s=i<0?q(o):o[0],a=i<0==(1==s.level),c=a?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=en(t,r);l=i<0?r.text.length-1:0;var d=tn(t,u,l).top;l=se((function(e){return tn(t,u,e).top==d}),i<0==(1==s.level)?s.from:s.to-1,l),"before"==c&&(l=Kl(r,l,1))}else l=i<0?s.to:s.from;return new it(n,l,c)}}return new it(n,i<0?r.text.length:0,i<0?"before":"after")}function ql(e,t,r,n){var i=fe(t,e.doc.direction);if(!i)return $l(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return $l(t,r,n);var s,a=function(e,r){return Kl(t,e instanceof it?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(s=s||en(e,t),kn(e,t,s,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var d=1==l.level==n<0,f=a(r,d?1:-1);if(null!=f&&(d?f<=l.to&&f<=u.end:f>=l.from&&f>=u.begin)){var h=d?"before":"after";return new it(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new it(r.line,a(e,1),"before"):new it(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),c=s?n.begin:a(n.end,-1);if(l.from<=c&&c<l.to)return o(c,s);if(c=s?l.from:a(l.to,-1),n.begin<=c&&c<n.end)return o(c,s)}},g=p(o+n,n,u);if(g)return g;var m=n>0?u.end:a(u.begin,-1);return null==m||n>0&&m==t.text.length||(g=p(n>0?0:i.length-1,n,c(m)),!g)?null:g}Fl.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"},Fl.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"},Fl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fl.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"]},Fl["default"]=y?Fl.macDefault:Fl.pcDefault;var Yl={selectAll:qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),U)},killLine:function(e){return jl(e,(function(t){if(t.empty()){var r=Ye(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return jl(e,(function(t){return{from:it(t.from().line,0),to:dt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return jl(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return jl(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}}))},delWrappedLineRight:function(e){return jl(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},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(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Zl(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Ql(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Jl(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),j)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),j)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Ql(e,t.head):n}),j)},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=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=P(e.getLine(o.line),o.ch,n);t.push(X(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Oi(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=Ye(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ye(e.doc,i.line-1).text;l&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),it(i.line-1,l.length-1),i,"+transpose"))}r.push(new io(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Oi(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);li(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Zl(e,t){var r=Ye(e.doc,t),n=Zt(r);return n!=r&&(t=et(n)),Xl(!0,e,n,t,1)}function Jl(e,t){var r=Ye(e.doc,t),n=Jt(r);return n!=r&&(t=et(n)),Xl(!0,e,r,t,-1)}function Ql(e,t){var r=Zl(e,t.line),n=Ye(e.doc,r.line),i=fe(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return it(r.line,l?0:o,r.sticky)}return r}function es(e,t,r){if("string"==typeof t&&(t=Yl[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=G}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ts(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Rl(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Rl(t,e.options.extraKeys,r,e)||Rl(t,e.options.keyMap,r,e)}var rs=new I;function ns(e,t,r,n){var i=e.state.keySeq;if(i){if(Bl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:rs.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),is(e,i+" "+t,r,n))return!0}return is(e,t,r,n)}function is(e,t,r,n){var i=ts(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Lr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(Ce(r),$n(e)),!!i}function os(e,t){var r=Ul(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ns(e,"Shift-"+r,t,(function(t){return es(e,t,!0)}))||ns(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return es(e,t)})):ns(e,r,t,(function(t){return es(e,t)})))}function ls(e,t,r){return ns(e,"'"+r+"'",t,(function(t){return es(e,t,!0)}))}var ss=null;function as(e){var t=this;if((!e.target||e.target==t.display.input.getField())&&(t.curOp.focus=D(),!ye(t,e))){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=os(t,e);d&&(ss=i?n:null,i||88!=n||He||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!y&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||cs(t)}}function cs(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(M(t,"CodeMirror-crosshair"),me(document,"keyup",r),me(document,"mouseover",r))}W(t,"CodeMirror-crosshair"),pe(document,"keyup",r),pe(document,"mouseover",r)}function us(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function ds(e){var t=this;if((!e.target||e.target==t.display.input.getField())&&!(Gr(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(d&&r==ss)return ss=null,void Ce(e);if(!d||e.which&&!(e.which<10)||!os(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(ls(t,e,i)||t.display.input.onKeyPress(e))}}}var fs,hs,ps=400,gs=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ms(e,t){var r=+new Date;return hs&&hs.compare(r,e,t)?(fs=hs=null,"triple"):fs&&fs.compare(r,e,t)?(hs=new gs(r,e,t),fs=null,"double"):(fs=new gs(r,e,t),hs=null,"single")}function vs(e){var t=this,r=t.display;if(!(ye(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,Gr(r,e))a||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!Ms(t,e)){var n=zn(t,e),i=Le(e),o=n?ms(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&ys(t,i,n,o,e)||(1==i?n?xs(t,n,o,e):Me(e)==r.scroller&&Ce(e):2==i?(n&&Ho(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(k?t.display.input.onContextMenu(e):qn(t)))}}function ys(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,ns(e,Gl(o,i),i,(function(t){if("string"==typeof t&&(t=Yl[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=G}finally{e.state.suppressEdits=!1}return n}))}function bs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey)),i}function xs(e,t,r,n){l?setTimeout(E(Xn,e),0):e.curOp.focus=D();var i,o=bs(e,r,n),s=e.doc.sel;e.options.dragDrop&&Oe&&!e.isReadOnly()&&"single"==r&&(i=s.contains(t))>-1&&(ot((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?ws(e,n,t,o):ks(e,n,t,o)}function ws(e,t,r,n){var i=e.display,o=!1,c=Ai(e,(function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:qn(e)),me(i.wrapper.ownerDocument,"mouseup",c),me(i.wrapper.ownerDocument,"mousemove",u),me(i.scroller,"dragstart",d),me(i.scroller,"drop",c),o||(Ce(t),n.addNew||Ho(e.doc,r,null,null,n.extend),a&&!f||l&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};a&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Cs(e,t,r){if("char"==r)return new io(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new io(it(t.line,0),dt(e.doc,it(t.line+1,0)));var n=r(e,t);return new io(n.from,n.to)}function ks(e,t,r,n){l&&qn(e);var i=e.display,o=e.doc;Ce(t);var s,a,c=o.sel,u=c.ranges;if(n.addNew&&!n.extend?(a=o.sel.contains(r),s=a>-1?u[a]:new io(r,r)):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new io(r,r)),r=zn(e,t,!0,!0),a=-1;else{var d=Cs(e,r,n.unit);s=n.extend?zo(s,d.anchor,d.head,n.extend):d}n.addNew?-1==a?(a=u.length,Bo(o,oo(e,u.concat([s]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&"char"==n.unit&&!n.extend?(Bo(o,oo(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Fo(o,a,s,V):(a=0,Bo(o,new no([s],0),V),c=o.sel);var f=r;function h(t){if(0!=ot(f,t))if(f=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,u=P(Ye(o,r.line).text,r.ch,l),d=P(Ye(o,t.line).text,t.ch,l),h=Math.min(u,d),p=Math.max(u,d),g=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=m;g++){var v=Ye(o,g).text,y=K(v,h,l);h==p?i.push(new io(it(g,y),it(g,y))):v.length>y&&i.push(new io(it(g,y),it(g,K(v,p,l))))}i.length||i.push(new io(r,r)),Bo(o,oo(e,c.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=s,w=Cs(e,t,n.unit),C=x.anchor;ot(w.anchor,C)>0?(b=w.head,C=ct(x.from(),w.anchor)):(b=w.anchor,C=at(x.to(),w.head));var k=c.ranges.slice(0);k[a]=_s(e,new io(dt(o,C),b)),Bo(o,oo(e,k,a),V)}}var p=i.wrapper.getBoundingClientRect(),g=0;function m(t){var r=++g,l=zn(e,t,!0,"rectangle"==n.unit);if(l)if(0!=ot(l,f)){e.curOp.focus=D(),h(l);var s=ei(i,o);(l.line>=s.to||l.line<s.from)&&setTimeout(Ai(e,(function(){g==r&&m(t)})),150)}else{var a=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;a&&setTimeout(Ai(e,(function(){g==r&&(i.scroller.scrollTop+=a,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(Ce(t),i.input.focus()),me(i.wrapper.ownerDocument,"mousemove",y),me(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ai(e,(function(e){0!==e.buttons&&Le(e)?m(e):v(e)})),b=Ai(e,v);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",y),pe(i.wrapper.ownerDocument,"mouseup",b)}function _s(e,t){var r=t.anchor,n=t.head,i=Ye(e.doc,r.line);if(0==ot(r,n)&&r.sticky==n.sticky)return t;var o=fe(i);if(!o)return t;var l=ue(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,c=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,n.ch,n.sticky),d=u-l||(n.ch-r.ch)*(1==s.level?-1:1);a=u==c-1||u==c?d<0:d>0}var f=o[c+(a?-1:0)],h=a==(1==f.level),p=h?f.from:f.to,g=h?"after":"before";return r.ch==p&&r.sticky==g?t:new io(new it(r.line,p,g),n)}function Ss(e,t,r,n){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(f){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ce(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!xe(e,r))return _e(t);o-=s.top-l.viewOffset;for(var a=0;a<e.display.gutterSpecs.length;++a){var c=l.gutters.childNodes[a];if(c&&c.getBoundingClientRect().right>=i){var u=tt(e.doc,o),d=e.display.gutterSpecs[a];return ve(e,r,e,u,d.className,t),_e(t)}}}function Ms(e,t){return Ss(e,t,"gutterClick",!0)}function Ls(e,t){Gr(e.display,t)||Ts(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ts(e,t){return!!xe(e,"gutterContextMenu")&&Ss(e,t,"gutterContextMenu",!1)}function Ns(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dn(e)}gs.prototype.compare=function(e,t,r){return this.time+ps>e&&0==ot(t,this.pos)&&r==this.button};var Os={toString:function(){return"CodeMirror.Init"}},As={},Ds={};function Ws(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Os&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Os,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,ho(e)}),!0),r("indentUnit",2,ho,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){po(e),dn(e),En(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=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,r.push(it(n,o))}n++}));for(var i=r.length-1;i>=0;i--)nl(e.doc,t,r[i],it(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Os&&e.refresh()})),r("specialCharPlaceholder",pr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Ns(e),Yi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Vl(t),i=r!=Os&&Vl(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Hs,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Xi(t,e.options.lineNumbers),Yi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?An(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),vi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Xi(e.options.gutters,t),Yi(e)}),!0),r("firstLineNumber",1,Yi,!0),r("lineNumberFormatter",(function(e){return e}),Yi,!0),r("showCursorWhenSelecting",!1,Gn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Zn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,zs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Gn,!0),r("singleCursorHeightPerLine",!0,Gn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,po,!0),r("addModeClass",!1,po,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,po,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function zs(e,t,r){var n=r&&r!=Os;if(!t!=!n){var i=e.display.dragFunctions,o=t?pe:me;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Hs(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),lr(e)),Wn(e),En(e),dn(e),setTimeout((function(){return vi(e)}),100)}function Es(e,t){var r=this;if(!(this instanceof Es))return new Es(e,t);this.options=t=t?F(t):{},F(As,t,!1);var n=t.value;"string"==typeof n?n=new Cl(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Es.inputStyles[t.inputStyle](this),o=this.display=new Zi(e,n,i,t);for(var c in o.wrapper.CodeMirror=this,Ns(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(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 I,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),l&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Fs(this),Ol(),Ci(this),this.curOp.forceUpdate=!0,yo(this,n),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Yn(r)}),20):Zn(this),Ds)Ds.hasOwnProperty(c)&&Ds[c](this,t[c],Os);$i(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ps.length;++u)Ps[u](this);ki(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Fs(e){var t=e.display;pe(t.scroller,"mousedown",Ai(e,vs)),pe(t.scroller,"dblclick",l&&s<11?Ai(e,(function(t){if(!ye(e,t)){var r=zn(e,t);if(r&&!Ms(e,t)&&!Gr(e.display,t)){Ce(t);var n=e.findWordAt(r);Ho(e.doc,n.anchor,n.head)}}})):function(t){return ye(e,t)||Ce(t)}),pe(t.scroller,"contextmenu",(function(t){return Ls(e,t)})),pe(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Ls(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),n=t.activeTouch,n.end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function a(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ms(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Gr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||a(n,n.prev)?new io(l,l):!n.prev.prev||a(n,n.prev.prev)?e.findWordAt(l):new io(it(l.line,0),dt(e.doc,it(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(r)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),hi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return ro(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return ro(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Se(t)},over:function(t){ye(e,t)||(Ml(e,t),Se(t))},start:function(t){return Sl(e,t)},drop:Ai(e,_l),leave:function(t){ye(e,t)||Ll(e)}};var c=t.input.getField();pe(c,"keyup",(function(t){return us.call(e,t)})),pe(c,"keydown",Ai(e,as)),pe(c,"keypress",Ai(e,ds)),pe(c,"focus",(function(t){return Yn(e,t)})),pe(c,"blur",(function(t){return Zn(e,t)}))}Es.defaults=As,Es.optionHandlers=Ds;var Ps=[];function Is(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=yt(e,t).state:r="prev");var l=e.options.tabSize,s=Ye(o,t),a=P(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&(c=o.mode.indent(i,s.text.slice(u.length),s.text),c==G||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?P(Ye(o,t-1).text,null,l):0:"add"==r?c=a+e.options.indentUnit:"subtract"==r?c=a-e.options.indentUnit:"number"==typeof r&&(c=a+r),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/l);h;--h)f+=l,d+="\t";if(f<c&&(d+=X(c-f)),d!=u)return nl(o,d,it(t,0),it(t,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<u.length){var m=it(t,u.length);Fo(o,p,new io(m,m));break}}}Es.defineInitHook=function(e){return Ps.push(e)};var Rs=null;function Bs(e){Rs=e}function Gs(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=+new Date-200,s="paste"==i||e.state.pasteIncoming>l,a=We(t),c=null;if(s&&n.ranges.length>1)if(Rs&&Rs.text.join("\n")==t){if(n.ranges.length%Rs.text.length==0){c=[];for(var u=0;u<Rs.text.length;u++)c.push(o.splitLines(Rs.text[u]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=Y(a,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],p=h.from(),g=h.to();h.empty()&&(r&&r>0?p=it(p.line,p.ch-r):e.state.overwrite&&!s?g=it(g.line,Math.min(Ye(o,g.line).text.length,g.ch+q(a).length)):s&&Rs&&Rs.lineWise&&Rs.text.join("\n")==a.join("\n")&&(p=g=it(p.line,0)));var m={from:p,to:g,text:c?c[f%c.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};Zo(e.doc,m),Lr(e,"inputRead",e,m)}t&&!s&&Vs(e,t),li(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Us(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Oi(t,(function(){return Gs(t,r,0,null,"paste")})),!0}function Vs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=Is(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ye(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Is(e,i.head.line,"smart"));l&&Lr(e,"electricInput",e,i.head.line)}}}function js(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:it(i,0),head:it(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ks(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function $s(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Ks(e),t}function Xs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Ai(this,t[e])(this,r,i),ve(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"](Vl(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Di((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");Z(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,En(this)})),removeOverlay:Di((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void En(this)}})),indentLine:Di((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),rt(this.doc,e)&&Is(this,e,t,r)})),indentSelection:Di((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Is(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&li(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<r;++a)Is(this,a,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&Fo(this.doc,n,new io(o,c[n].to()),U)}}})),getTokenAt:function(e,t){return kt(this,e,t)},getLineTokens:function(e,t){return kt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,r=vt(this,Ye(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var a=0;a<i._global.length;a++){var c=i._global[a];c.pred(o,this)&&-1==R(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return e=ut(r,null==e?r.first+r.size-1:e),yt(this,e+1,t).state},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?dt(this.doc,e):e?n.from():n.to(),yn(this,r,t||"page")},charCoords:function(e,t){return vn(this,dt(this.doc,e),t||"page")},coordsChar:function(e,t){return e=mn(this,e,t||"page"),wn(this,e.left,e.top)},lineAtHeight:function(e,t){return e=mn(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,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),n=Ye(this.doc,e)}else n=e;return gn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return Tn(this.display)},defaultCharWidth:function(){return Nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=yn(this,dt(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&ni(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:Di(as),triggerOnKeyPress:Di(ds),triggerOnKeyUp:us,triggerOnMouseDown:Di(vs),execCommand:function(e){if(Yl.hasOwnProperty(e))return Yl[e].call(null,this)},triggerElectric:Di((function(e){Vs(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),l=0;l<t;++l)if(o=qs(this.doc,o,i,r,n),o.hitSide)break;return o},moveH:Di((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?qs(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),j)})),deleteH:Di((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):jl(this,(function(r){var i=qs(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=dt(this.doc,e),s=0;s<t;++s){var a=yn(this,l,"div");if(null==o?o=a.left:a.left=o,l=Ys(this,a,i,r),l.hitSide)break}return l},moveV:Di((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(l){if(o)return e<0?l.from():l.to();var s=yn(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Ys(r,s,e,t);return"page"==t&&l==n.sel.primary()&&oi(r,vn(r,a,"div").top-s.top),a}),j),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]})),findWordAt:function(e){var t=this.doc,r=Ye(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;var l=r.charAt(n),s=re(l,o)?function(e){return re(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};while(n>0&&s(r.charAt(n-1)))--n;while(i<r.length&&s(r.charAt(i)))++i}return new io(it(e.line,n),it(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):M(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Di((function(e,t){si(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Kr(this)-this.display.barHeight,width:e.scrollWidth-Kr(this)-this.display.barWidth,clientHeight:Xr(this),clientWidth:$r(this)}},scrollIntoView:Di((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:it(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?ai(this,e):ui(this,e.from,e.to,e.margin)})),setSize:Di((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&un(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){Fn(r,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return Oi(this,e)},startOperation:function(){return Ci(this)},endOperation:function(){return ki(this)},refresh:Di((function(){var e=this.display.cachedTextHeight;En(this),this.curOp.forceUpdate=!0,dn(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),Vi(this.display),(null==e||Math.abs(e-Tn(this.display))>.5||this.options.lineWrapping)&&Wn(this),ve(this,"refresh",this)})),swapDoc:Di((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),yo(this,e),dn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Lr(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}},we(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function qs(e,t,r,n,i){var o=t,l=r,s=Ye(e,t.line),a=i&&"rtl"==e.direction?-r:r;function c(){var r=t.line+a;return!(r<e.first||r>=e.first+e.size)&&(t=new it(r,t.ch,t.sticky),s=Ye(e,r))}function u(o){var l;if("codepoint"==n){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(u))l=null;else{var d=r>0?u>=55296&&u<56320:u>=56320&&u<57343;l=new it(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(d?2:1))),-r)}}else l=i?ql(e.cm,s,t,r):$l(s,t,r);if(null==l){if(o||!c())return!1;t=Xl(i,e.cm,s,t.line,a)}else t=l;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var d=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(r<0&&!u(!p))break;var g=s.text.charAt(t.ch)||"\n",m=re(g,h)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||m||(m="s"),d&&d!=m){r<0&&(r=1,u(),t.sticky="after");break}if(m&&(d=m),r>0&&!u(!p))break}var v=$o(e,t,o,l,!0);return lt(o,v)&&(v.hitSide=!0),v}function Ys(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(a-.5*Tn(e.display),3);i=(r>0?t.bottom:t.top)+r*c}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;;){if(o=wn(e,s,i),!o.outside)break;if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Zs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Js(e,t){var r=Qr(e,t.line);if(!r||r.hidden)return null;var n=Ye(e.doc,t.line),i=Yr(r,n,t.line),o=fe(n,e.doc.direction),l="left";if(o){var s=ue(o,t.ch);l=s%2?"right":"left"}var a=on(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function Qs(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ea(e,t){return t&&(e.bad=!0),e}function ta(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator(),a=!1;function c(e){return function(t){return t.id==e}}function u(){l&&(o+=s,a&&(o+=s),l=a=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void d(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(it(n,0),it(i+1,0),c(+h));return void(p.length&&(o=p[0].find(0))&&d(Ze(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&u();for(var m=0;m<t.childNodes.length;m++)f(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(a=!0),g&&(l=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;;){if(f(t),t==r)break;t=t.nextSibling,a=!1}return o}function ra(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return ea(e.clipPos(it(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return na(o,t,r)}}function na(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!A(n,t))return ea(it(et(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?q(e.rest):e.line;return ea(it(et(o),o.text.length),i)}var l=3==t.nodeType?t:null,s=t;l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));while(s.parentNode!=n)s=s.parentNode;var a=e.measure,c=a.maps;function u(t,r,n){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?a.map:c[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var u=et(i<0?e.line:e.rest[i]),d=o[l]+n;return(n<0||s!=t)&&(d=o[l+(n?1:0)]),it(u,d)}}}var d=u(l,s,r);if(d)return ea(d,i);for(var f=s.nextSibling,h=l?l.nodeValue.length-r:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0),d)return ea(it(d.line,d.ch-h),i);h+=f.textContent.length}for(var p=s.previousSibling,g=r;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1),d)return ea(it(d.line,d.ch+g),i);g+=p.textContent.length}}Zs.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function l(e){if(o(e)&&!ye(n,e)){if(n.somethingSelected())Bs({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=js(n);Bs({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,U),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var l=Rs.text.join("\n");if(e.clipboardData.setData("Text",l),e.clipboardData.getData("Text")==l)return void e.preventDefault()}var s=$s(),a=s.firstChild;n.display.lineSpace.insertBefore(s,n.display.lineSpace.firstChild),a.value=Rs.text.join("\n");var c=D();H(a),setTimeout((function(){n.display.lineSpace.removeChild(s),c.focus(),c==i&&r.showPrimarySelection()}),50)}}i.contentEditable=!0,Ks(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),pe(i,"paste",(function(e){!o(e)||ye(n,e)||Us(e,n)||s<=11&&setTimeout(Ai(n,(function(){return t.updateFromDOM()})),20)})),pe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),pe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),pe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),pe(i,"touchstart",(function(){return r.forceCompositionEnd()})),pe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),pe(i,"copy",l),pe(i,"cut",l)},Zs.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Zs.prototype.prepareSelection=function(){var e=Un(this.cm,!1);return e.focus=D()==this.div,e},Zs.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Zs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Zs.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=ra(t,e.anchorNode,e.anchorOffset),s=ra(t,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=ot(ct(l,s),i)||0!=ot(at(l,s),o)){var a=t.display.view,c=i.line>=t.display.viewFrom&&Js(t,i)||{node:a[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Js(t,o);if(!u){var d=a[a.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=S(c.node,c.offset,u.offset,u.node)}catch(g){}h&&(!r&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Zs.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)},Zs.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Zs.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Zs.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return A(this.div,t)},Zs.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&D()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Zs.prototype.blur=function(){this.div.blur()},Zs.prototype.getField=function(){return this.div},Zs.prototype.supportsTouch=function(){return!0},Zs.prototype.receivedFocus=function(){var e=this;function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.selectionInEditor()?this.pollSelection():Oi(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},Zs.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Zs.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&u&&this.cm.display.gutterSpecs.length&&Qs(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=ra(t,e.anchorNode,e.anchorOffset),n=ra(t,e.focusNode,e.focusOffset);r&&n&&Oi(t,(function(){Bo(t.doc,lo(r,n),U),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Zs.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=it(l.line-1,Ye(n.doc,l.line-1).length)),s.ch==Ye(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=it(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Hn(n,l.line))?(t=et(i.view[0].line),r=i.view[0].node):(t=et(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,c,u=Hn(n,s.line);if(u==i.view.length-1?(a=i.viewTo-1,c=i.lineDiv.lastChild):(a=et(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!r)return!1;var d=n.doc.splitLines(ta(n,r,c,t,a)),f=Ze(n.doc,it(t,0),it(a,Ye(n.doc,a).text.length));while(d.length>1&&f.length>1)if(q(d)==q(f))d.pop(),f.pop(),a--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}var h=0,p=0,g=d[0],m=f[0],v=Math.min(g.length,m.length);while(h<v&&g.charCodeAt(h)==m.charCodeAt(h))++h;var y=q(d),b=q(f),x=Math.min(y.length-(1==d.length?h:0),b.length-(1==f.length?h:0));while(p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1))++p;if(1==d.length&&1==f.length&&t==l.line)while(h&&h>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1))h--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var w=it(t,h),C=it(a,f.length?q(f).length-p:0);return d.length>1||d[0]||ot(w,C)?(nl(n.doc,d,w,C,"+input"),!0):void 0},Zs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zs.prototype.reset=function(){this.forceCompositionEnd()},Zs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zs.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))},Zs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Oi(this.cm,(function(){return En(e.cm)}))},Zs.prototype.setUneditable=function(e){e.contentEditable="false"},Zs.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ai(this.cm,Gs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Zs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Zs.prototype.onContextMenu=function(){},Zs.prototype.resetPosition=function(){},Zs.prototype.needsContentAttribute=!0;var ia=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null};function oa(e,t){if(t=t?F(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=D();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(pe(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(a){}}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&&(me(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Es((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function la(e){e.off=me,e.on=pe,e.wheelEventPixels=to,e.Doc=Cl,e.splitLines=We,e.countColumn=P,e.findColumn=K,e.isWordChar=te,e.Pass=G,e.signal=ve,e.Line=sr,e.changeEnd=so,e.scrollbarModel=bi,e.Pos=it,e.cmpPos=ot,e.modes=Pe,e.mimeModes=Ie,e.resolveMode=Ge,e.getMode=Ue,e.modeExtensions=Ve,e.extendMode=je,e.copyState=Ke,e.startState=Xe,e.innerMode=$e,e.commands=Yl,e.keyMap=Fl,e.keyName=Ul,e.isModifierKey=Bl,e.lookupKey=Rl,e.normalizeKeyMap=Il,e.StringStream=qe,e.SharedTextMarker=ml,e.TextMarker=pl,e.LineWidget=ul,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Se,e.addClass=W,e.contains=A,e.rmClass=M,e.keyNames=Wl}ia.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(n,e)){if(n.somethingSelected())Bs({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=js(n);Bs({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,U):(r.prevInput="",i.value=t.text.join("\n"),H(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(i,"paste",(function(e){ye(n,e)||Us(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Gr(e,t)&&!ye(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Gr(e,t)||Ce(t)})),pe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},ia.prototype.createField=function(e){this.wrapper=$s(),this.textarea=this.wrapper.firstChild},ia.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ia.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Un(e);if(e.options.moveInputWithCursor){var i=yn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},ia.prototype.showSelection=function(e){var t=this.cm,r=t.display;T(r.cursorDiv,e.cursors),T(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ia.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&H(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},ia.prototype.getField=function(){return this.textarea},ia.prototype.supportsTouch=function(){return!1},ia.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},ia.prototype.blur=function(){this.textarea.blur()},ia.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ia.prototype.receivedFocus=function(){this.slowPoll()},ia.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ia.prototype.fastPoll=function(){var e=!1,t=this;function r(){var n=t.poll();n||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},ia.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ze(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\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||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}var a=0,c=Math.min(n.length,i.length);while(a<c&&n.charCodeAt(a)==i.charCodeAt(a))++a;return Oi(t,(function(){Gs(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.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},ia.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ia.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},ia.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=zn(r,e),c=n.scroller.scrollTop;if(o&&!d){var u=r.options.resetSelectionOnContextMenu;u&&-1==r.doc.sel.contains(o)&&Ai(r,Bo)(r.doc,lo(o),U);var f,h=i.style.cssText,p=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(f=window.scrollY),n.input.focus(),a&&window.scrollTo(null,f),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),k){Se(e);var m=function(){me(window,"mouseup",m),setTimeout(y,20)};pe(window,"mouseup",m)}else setTimeout(y,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=h,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=i.selectionStart)){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Ai(r,qo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},ia.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ia.prototype.setUneditable=function(){},ia.prototype.needsContentAttribute=!1,Ws(Es),Xs(Es);var sa="iter insert remove copy getEditor constructor".split(" ");for(var aa in Cl.prototype)Cl.prototype.hasOwnProperty(aa)&&R(sa,aa)<0&&(Es.prototype[aa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Cl.prototype[aa]));return we(Cl),Es.inputStyles={textarea:ia,contenteditable:Zs},Es.defineMode=function(e){Es.defaults.mode||"null"==e||(Es.defaults.mode=e),Re.apply(this,arguments)},Es.defineMIME=Be,Es.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Es.defineMIME("text/plain","null"),Es.defineExtension=function(e,t){Es.prototype[e]=t},Es.defineDocExtension=function(e,t){Cl.prototype[e]=t},Es.fromTextArea=oa,la(Es),Es.version="5.62.3",Es}))},"5e9d":function(e,t,r){var n=r("3d07");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=r("499e").default;i("95f33600",n,!0,{sourceMap:!1,shadowMode:!1})},"7a7a":function(e,t,r){var n=r("d6c4");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=r("499e").default;i("e49c6c14",n,!0,{sourceMap:!1,shadowMode:!1})},"8f94":function(e,t,r){!function(t,n){e.exports=n(r("56b3"))}(0,(function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=3)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){return e&&e.__esModule?e:{default:e}}(n),o=window.CodeMirror||i.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},writable:!0,configurable:!0}),t.default={name:"codemirror",data:function(){return{content:"",codemirror:null,cminstance:null}},props:{code:String,value:String,marker:Function,unseenLines:Array,name:{type:String,default:"codemirror"},placeholder:{type:String,default:""},merge:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},events:{type:Array,default:function(){return[]}},globalOptions:{type:Object,default:function(){return{}}},globalEvents:{type:Array,default:function(){return[]}}},watch:{options:{deep:!0,handler:function(e){for(var t in e)this.cminstance.setOption(t,e[t])}},merge:function(){this.$nextTick(this.switchMerge)},code:function(e){this.handerCodeChange(e)},value:function(e){this.handerCodeChange(e)}},methods:{initialize:function(){var e=this,t=Object.assign({},this.globalOptions,this.options);this.merge?(this.codemirror=o.MergeView(this.$refs.mergeview,t),this.cminstance=this.codemirror.edit):(this.codemirror=o.fromTextArea(this.$refs.textarea,t),this.cminstance=this.codemirror,this.cminstance.setValue(this.code||this.value||this.content)),this.cminstance.on("change",(function(t){e.content=t.getValue(),e.$emit&&e.$emit("input",e.content)}));var r={};["scroll","changes","beforeChange","cursorActivity","keyHandled","inputRead","electricInput","beforeSelectionChange","viewportChange","swapDoc","gutterClick","gutterContextMenu","focus","blur","refresh","optionChange","scrollCursorIntoView","update"].concat(this.events).concat(this.globalEvents).filter((function(e){return!r[e]&&(r[e]=!0)})).forEach((function(t){e.cminstance.on(t,(function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.$emit.apply(e,[t].concat(n));var o=t.replace(/([A-Z])/g,"-$1").toLowerCase();o!==t&&e.$emit.apply(e,[o].concat(n))}))})),this.$emit("ready",this.codemirror),this.unseenLineMarkers(),this.refresh()},refresh:function(){var e=this;this.$nextTick((function(){e.cminstance.refresh()}))},destroy:function(){var e=this.cminstance.doc.cm.getWrapperElement();e&&e.remove&&e.remove()},handerCodeChange:function(e){if(e!==this.cminstance.getValue()){var t=this.cminstance.getScrollInfo();this.cminstance.setValue(e),this.content=e,this.cminstance.scrollTo(t.left,t.top)}this.unseenLineMarkers()},unseenLineMarkers:function(){var e=this;void 0!==this.unseenLines&&void 0!==this.marker&&this.unseenLines.forEach((function(t){var r=e.cminstance.lineInfo(t);e.cminstance.setGutterMarker(t,"breakpoints",r.gutterMarkers?null:e.marker())}))},switchMerge:function(){var e=this.cminstance.doc.history,t=this.cminstance.doc.cleanGeneration;this.options.value=this.cminstance.getValue(),this.destroy(),this.initialize(),this.cminstance.doc.history=e,this.cminstance.doc.cleanGeneration=t}},mounted:function(){this.initialize()},beforeDestroy:function(){this.destroy()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r.n(n);for(var o in n)["default","default"].indexOf(o)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(o);var l=r(5),s=r(4),a=s(i.a,l.a,!1,null,null,null);t.default=a.exports},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.codemirror=t.CodeMirror=void 0;var i=r(0),o=n(i),l=r(2),s=n(l),a=window.CodeMirror||o.default,c=function(e,t){t&&(t.options&&(s.default.props.globalOptions.default=function(){return t.options}),t.events&&(s.default.props.globalEvents.default=function(){return t.events})),e.component(s.default.name,s.default)},u={CodeMirror:a,codemirror:s.default,install:c};t.default=u,t.CodeMirror=a,t.codemirror=s.default,t.install=c},function(e,t){e.exports=function(e,t,r,n,i,o){var l,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(l=e,s=e.default);var c,u="function"==typeof s?s.options:s;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId=i),o?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=c):n&&(c=n),c){var d=u.functional,f=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(e,t){return c.call(t),f(e,t)}):u.beforeCreate=f?[].concat(f,c):[c]}return{esModule:l,exports:s,options:u}}},function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"vue-codemirror",class:{merge:e.merge}},[e.merge?r("div",{ref:"mergeview"}):r("textarea",{ref:"textarea",attrs:{name:e.name,placeholder:e.placeholder}})])},i=[],o={render:n,staticRenderFns:i};t.a=o}])}))},"947f":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,'.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{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-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;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-type,.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:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.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:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline: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:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;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;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{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;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.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{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color: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:none}',""]),e.exports=t},"9c70":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ant-pro-footer-toolbar"},[r("div",{staticStyle:{float:"left"}},[e._t("extra",[e._v(e._s(e.extra))])],2),r("div",{staticStyle:{float:"right"}},[e._t("default")],2)])},i=[],o={name:"FooterToolBar",props:{prefixCls:{type:String,default:"ant-pro-footer-toolbar"},extra:{type:[String,Object],default:""}}},l=o,s=(r("11c6"),r("2877")),a=Object(s["a"])(l,n,i,!1,null,"89d7d506",null);t["a"]=a.exports},a002:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("codemirror",{attrs:{options:e.cmOptions},model:{value:e.current_value,callback:function(t){e.current_value=t},expression:"current_value"}})},i=[],o=r("8f94"),l=(r("a7be"),r("7a7a"),r("b2b9"),{name:"vue-itextarea",components:{codemirror:o["codemirror"]},props:{value:{}},model:{prop:"value",event:"changeValue"},watch:{value:function(){var e;this.current_value=null!==(e=this.value)&&void 0!==e?e:""},current_value:function(){this.$emit("changeValue",this.current_value)}},data:function(){var e;return{current_value:null!==(e=this.value)&&void 0!==e?e:"",cmOptions:{tabSize:4,mode:"text/x-nginx-conf",theme:"monokai",lineNumbers:!0,line:!0,highlightDifferences:!0,defaultTextHeight:1e3}}}}),s=l,a=(r("3905"),r("2877")),c=Object(a["a"])(s,n,i,!1,null,null,null);t["a"]=c.exports},a7be:function(e,t,r){var n=r("947f");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=r("499e").default;i("7ec400c8",n,!0,{sourceMap:!1,shadowMode:!1})},b2b9:function(e,t,r){(function(e){e(r("56b3"))})((function(e){"use strict";e.defineMode("nginx",(function(e){function t(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}var r,n=t("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),i=t("http mail events server types location upstream charset_map limit_except if geo map"),o=t("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),l=e.indentUnit;function s(e,t){return r=t,e}function a(e,t){e.eatWhile(/[\w\$_]/);var r=e.current();if(n.propertyIsEnumerable(r))return"keyword";if(i.propertyIsEnumerable(r))return"variable-2";if(o.propertyIsEnumerable(r))return"string-2";var l=e.next();return"@"==l?(e.eatWhile(/[\w\\\-]/),s("meta",e.current())):"/"==l&&e.eat("*")?(t.tokenize=c,c(e,t)):"<"==l&&e.eat("!")?(t.tokenize=u,u(e,t)):"="!=l?"~"!=l&&"|"!=l||!e.eat("=")?'"'==l||"'"==l?(t.tokenize=d(l),t.tokenize(e,t)):"#"==l?(e.skipToEnd(),s("comment","comment")):"!"==l?(e.match(/^\s*\w*/),s("keyword","important")):/\d/.test(l)?(e.eatWhile(/[\w.%]/),s("number","unit")):/[,.+>*\/]/.test(l)?s(null,"select-op"):/[;{}:\[\]]/.test(l)?s(null,l):(e.eatWhile(/[\w\\\-]/),s("variable","variable")):s(null,"compare"):void s(null,"compare")}function c(e,t){var r,n=!1;while(null!=(r=e.next())){if(n&&"/"==r){t.tokenize=a;break}n="*"==r}return s("comment","comment")}function u(e,t){var r,n=0;while(null!=(r=e.next())){if(n>=2&&">"==r){t.tokenize=a;break}n="-"==r?n+1:0}return s("comment","comment")}function d(e){return function(t,r){var n,i=!1;while(null!=(n=t.next())){if(n==e&&!i)break;i=!i&&"\\"==n}return i||(r.tokenize=a),s("string","string")}}return{startState:function(e){return{tokenize:a,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;r=null;var n=t.tokenize(e,t),i=t.stack[t.stack.length-1];return"hash"==r&&"rule"==i?n="atom":"variable"==n&&("rule"==i?n="number":i&&"@media{"!=i||(n="tag")),"rule"==i&&/^[\{\};]$/.test(r)&&t.stack.pop(),"{"==r?"@media"==i?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):"}"==r?t.stack.pop():"@media"==r?t.stack.push("@media"):"{"==i&&"comment"!=r&&t.stack.push("rule"),n},indent:function(e,t){var r=e.stack.length;return/^\}/.test(t)&&(r-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+r*l},electricChars:"}"}})),e.defineMIME("text/x-nginx-conf","nginx")}))},c2e8:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".cm-s-monokai{height:auto!important}",""]),e.exports=t},d6c4:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483e}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-comment.cm-attribute{color:#97b757}.cm-s-monokai span.cm-comment.cm-def{color:#bc9262}.cm-s-monokai span.cm-comment.cm-tag{color:#bc6283}.cm-s-monokai span.cm-comment.cm-type{color:#5998a6}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-type,.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}",""]),e.exports=t}}]);
|