import{q as _u}from"./defaultSettingsView-BEpdCv1S.js";var vi={exports:{}},Ru=vi.exports,ha;function Nt(){return ha||(ha=1,(function(At,Ot){(function(C,De){At.exports=De()})(Ru,(function(){var C=navigator.userAgent,De=navigator.platform,P=/gecko\/\d/i.test(C),fe=/MSIE \d/.test(C),Se=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),le=/Edge\/(\d+)/.exec(C),b=fe||Se||le,W=b&&(fe?document.documentMode||6:+(le||Se)[1]),j=!le&&/WebKit\//.test(C),oe=j&&/Qt\/\d+\.\d+/.test(C),w=!le&&/Chrome\/(\d+)/.exec(C),B=w&&+w[1],A=/Opera\//.test(C),K=/Apple Computer/.test(navigator.vendor),ae=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),F=/PhantomJS/.test(C),N=K&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),R=/Android/.test(C),_=N||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),Y=N||/Mac/.test(De),ce=/\bCrOS\b/.test(C),$=/win/i.test(De),ee=A&&C.match(/Version\/(\d*\.\d*)/);ee&&(ee=Number(ee[1])),ee&&ee>=15&&(A=!1,j=!0);var Ae=Y&&(oe||A&&(ee==null||ee<12.11)),se=P||b&&W>=9;function q(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Fe=function(e,t){var n=e.className,r=q(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return M(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var we=function(){this.id=null,this.f=null,this.time=0,this.handler=pe(this.onTimeout,this)};we.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},we.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(xe(Ue)+" ");return Ue[e]}function xe(e){return e[e.length-1]}function Ie(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ze.test(e))}function Le(e,t){return t?t.source.indexOf("\\w")>-1&&he(e)?!0:t.test(e):he(e)}function ve(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\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 Ee(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Tt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=(function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,y=[],E=0;E-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Bt(e){e.prototype.on=function(t,n){ye(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Y&&e.ctrlKey&&t==1&&(t=3),t}var xi=(function(){if(b&&W<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e})(),Or;function Wn(e){if(Or==null){var t=d("span","​");G(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&W<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=G(e,document.createTextNode("AخA")),n=L(t,0,1).getBoundingClientRect(),r=L(t,1,2).getBoundingClientRect();return M(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var zt=` b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` `,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Hn=(function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),Ht=null;function yi(e){if(Ht!=null)return Ht;var t=G(e,d("span","x")),n=t.getBoundingClientRect(),r=L(t,0,1).getBoundingClientRect();return Ht=Math.abs(n.left-r.left)>1}var Pr={},_t={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){_t[e]=t}function Ir(e){if(typeof e=="string"&&_t.hasOwnProperty(e))e=_t[e];else if(e&&typeof e.name=="string"&&_t.hasOwnProperty(e.name)){var t=_t[e.name];typeof t=="string"&&(t={name:t}),e=O(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.post},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ge(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?D(n,ge(e,n).text.length):Ra(t,ge(e,t.line).text.length)}function Ra(e,t){var n=e.ch;return n==null||n>t?D(e.line,t):n<0?D(e.line,0):e}function go(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof _n?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new _n(t,this.maxLookAhead):t};function vo(e,t,n,r){var i=[e.state.modeGen],o={};wo(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,k=0;n.state=!0,wo(e,t.text,h.mode,n,function(y,E){for(var H=v;ky&&i.splice(v,1,y,i[v+1],Z),v+=2,k=Math.min(y,Z)}if(E)if(h.opaque)i.splice(H,v-H,y,"overlay "+E),v=H+2;else for(;He.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=vo(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=qa(e,t,n),l=o>r.first&&ge(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Wr(r.mode),o);return r.iter(o,t,function(s){bi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var yo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bo(e,t,n,r){var i=e.doc,o=i.mode,l;t=Me(i,t);var a=ge(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&bi(e,t,r,h.pos),h.pos=t.length,v=null):v=ko(ki(n,h,r.state,k),o),k){var y=k[0].name;y&&(v="m-"+(v?y+" "+v:y))}if(!a||u!=v){for(;sl;--a){if(a<=o.first)return o.first;var s=ge(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof _n?u.lookAhead:0)<=o.modeFrontier))return a;var h=Ce(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function ja(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ge(e,r).stateAfter;if(i&&(!(i instanceof _n)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Rn(l,o.from,s?null:o.to))}}return r}function Za(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var ue=0;ue0)){var h=[s,1],v=re(u.from,a.from),k=re(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&h.push({from:u.from,to:a.from}),(k>0||!l.inclusiveRight&&!k)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function To(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||Si(r,o.marker)<0)&&(r=o.marker)}return r}function Ao(e,t,n,r,i){var o=ge(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?re(u.to,n)>=0:re(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?re(u.from,r)<=0:re(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Mo(e);)e=t.find(-1,!0).line;return e}function Va(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function $a(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Li(e,t){var n=ge(e,t),r=qt(n);return n==r?t:f(r)}function Fo(e,t){if(t>e.lastLine())return t;var n=ge(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var _r=function(e,t,n){this.text=e,Co(this,t),this.height=n?n(this):1};_r.prototype.lineNo=function(){return f(this)},Bt(_r);function es(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),To(e),Co(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function ts(e){e.parent=null,To(e)}var rs={},ns={};function Eo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ns:rs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function No(e,t){var n=S("span",null,null,j?"padding-right: .1px":null),r={pre:S("pre",[n],"CodeMirror-line"),content:n,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;r.pos=0,r.addToken=os,sr(e.display.measure)&&(l=We(o,e.doc.direction))&&(r.addToken=as(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);ss(o,r,mo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=ne(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=ne(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Wn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(j){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=ne(r.pre.className,r.textClass||"")),r}function is(e){var t=d("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function os(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?ls(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),b&&W<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var k=s.exec(t),y=k?k.index-v:t.length-v;if(y){var E=document.createTextNode(a.slice(v,v+y));b&&W<9?h.appendChild(d("span",[E])):h.appendChild(E),e.map.push(e.pos,e.pos+y,E),e.col+=y,e.pos+=y}if(!k)break;v+=y+1;var H=void 0;if(k[0]==" "){var Z=e.cm.options.tabSize,Q=Z-e.col%Z;H=h.appendChild(d("span",et(Q),"cm-tab")),H.setAttribute("role","presentation"),H.setAttribute("cm-text"," "),e.col+=Q}else k[0]=="\r"||k[0]==` `?(H=h.appendChild(d("span",k[0]=="\r"?"␍":"␤","cm-invalidchar")),H.setAttribute("cm-text",k[0]),e.col+=1):(H=e.cm.options.specialCharPlaceholder(k[0]),H.setAttribute("cm-text",k[0]),b&&W<9?h.appendChild(d("span",[H])):h.appendChild(H),e.col+=1);e.map.push(e.pos,e.pos+1,H),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var ie=n||"";r&&(ie+=r),i&&(ie+=i);var V=d("span",[h],ie,o);if(l)for(var ue in l)l.hasOwnProperty(ue)&&ue!="style"&&ue!="class"&&V.setAttribute(ue,l[ue]);return e.content.appendChild(V)}e.content.appendChild(h)}}function ls(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ss(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;ls||Ne.collapsed&&me.to==s&&me.from==s)){if(me.to!=null&&me.to!=s&&y>me.to&&(y=me.to,H=""),Ne.className&&(E+=" "+Ne.className),Ne.css&&(k=(k?k+";":"")+Ne.css),Ne.startStyle&&me.from==s&&(Z+=" "+Ne.startStyle),Ne.endStyle&&me.to==y&&(ue||(ue=[])).push(Ne.endStyle,me.to),Ne.title&&((ie||(ie={})).title=Ne.title),Ne.attributes)for(var Ke in Ne.attributes)(ie||(ie={}))[Ke]=Ne.attributes[Ke];Ne.collapsed&&(!Q||Si(Q.marker,Ne)<0)&&(Q=me)}else me.from>s&&y>me.from&&(y=me.from)}if(ue)for(var st=0;st=a)break;for(var Mt=Math.min(a,y);;){if(h){var wt=s+h.length;if(!Q){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+E:E,Z,s+tt.length==y?H:"",k,ie)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,Z=""}h=i.slice(o,o=n[u++]),v=Eo(n[u++],t.cm.options)}}}function Po(e,t,n){this.line=t,this.rest=$a(t),this.size=this.rest?f(xe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ro(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ys(e,t){t=qt(t);var n=f(t),r=e.display.externalMeasured=new Po(e.doc,t,n);r.lineN=n;var i=r.built=No(e,r);return r.text=i.pre,G(e.display.lineMeasure,i.pre),r}function qo(e,t,n,r){return Zt(e,qr(e,t),n,r)}function Fi(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function ks(e,t,n,r){var i=Ko(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&Ee(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(b&&W<9&&!l&&(!u||!u.left&&!u.right)){var k=o.parentNode.getClientRects()[0];k?u={left:k.left,right:k.left+Kr(e.display),top:k.top,bottom:k.bottom}:u=jo}for(var y=u.top-t.rect.top,E=u.bottom-t.rect.top,H=(y+E)/2,Z=t.view.measure.heights,Q=0;Q=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function h(E,H,Z){var Q=a[H],ie=Q.level==1;return l(Z?E-1:E,ie!=Z)}var v=lr(a,s,u),k=br,y=h(s,v,u=="before");return k!=null&&(y.other=h(s,k,u!="before")),y}function Jo(e,t){var n=0;t=Me(e.doc,t),e.options.lineWrapping||(n=Kr(e.display)*t.ch);var r=ge(e.doc,t.line),i=er(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ni(e,t,n,r,i){var o=D(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Oi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ni(r.first,0,null,-1,-1);var i=g(r,n),o=r.first+r.size-1;if(i>o)return Ni(r.first+r.size-1,ge(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=ge(r,i);;){var a=Ss(e,l,i,t,n),s=Qa(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=ge(r,i=u.line)}}function Qo(e,t,n,r){r-=Ei(t);var i=t.text.length,o=Pt(function(l){return Zt(e,n,l-1).bottom<=r},i,0);return i=Pt(function(l){return Zt(e,n,l).top>r},o,i),{begin:o,end:i}}function Vo(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Zt(e,n,r),"line").top;return Qo(e,t,n,i)}function Pi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Ss(e,t,n,r,i){i-=er(t);var o=qr(e,t),l=Ei(t),a=0,s=t.text.length,u=!0,h=We(t,e.doc.direction);if(h){var v=(e.options.lineWrapping?Ts:Ls)(e,t,n,o,h,r,i);u=v.level!=1,a=u?v.from:v.to-1,s=u?v.to:v.from-1}var k=null,y=null,E=Pt(function(be){var me=Zt(e,o,be);return me.top+=l,me.bottom+=l,Pi(me,r,i,!1)?(me.top<=i&&me.left<=r&&(k=be,y=me),!0):!1},a,s),H,Z,Q=!1;if(y){var ie=r-y.left=ue.bottom?1:0}return E=Tt(t.text,E,1),Ni(n,E,Z,Q,r-H)}function Ls(e,t,n,r,i,o,l){var a=Pt(function(v){var k=i[v],y=k.level!=1;return Pi(jt(e,D(n,y?k.to:k.from,y?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,h=jt(e,D(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Pi(h,o,l,!0)&&h.top>l&&(s=i[a-1])}return s}function Ts(e,t,n,r,i,o,l){var a=Qo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,v=null,k=0;k=u||y.to<=s)){var E=y.level!=1,H=Zt(e,r,E?Math.min(u,y.to)-1:Math.max(s,y.from)).right,Z=HZ)&&(h=y,v=Z)}}return h||(h=i[i.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}var Sr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sr==null){Sr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sr.appendChild(document.createTextNode("x")),Sr.appendChild(d("br"));Sr.appendChild(document.createTextNode("x"))}G(e.measure,Sr);var n=Sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function Kr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");G(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ii(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:zi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function zi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function $o(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Kr(e.display)-3);return function(i){if(cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(u=ge(e.doc,s.line).text).length==s.ch){var h=Ce(u,u.length,e.options.tabSize)-u.length;s=D(s.line,Math.max(0,Math.round((o-_o(e.display).left)/Kr(e.display))-h))}return s}function Tr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&Li(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Jn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Jn(e,t,t,-1),s=Jn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Gn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Tr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);de(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,n,r){var i=Tr(e,t),o,l=e.display.view;if(!$t||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Li(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Cs(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Gn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Gn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Tr(e,n)))),r.viewTo=n}function el(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(d("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function Ds(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_o(e.display),a=l.left,s=Math.max(r.sizerWidth,wr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function h(V,ue,be,me){ue<0&&(ue=0),ue=Math.round(ue),me=Math.round(me),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+V+`px; top: `+ue+"px; width: "+(be??s-V)+`px; height: `+(me-ue)+"px"))}function v(V,ue,be){var me=ge(i,V),Ne=me.text.length,Ke,st;function Xe(tt,St){return Zn(e,D(V,tt),"div",me,St)}function Mt(tt,St,ft){var nt=Vo(e,me,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(me.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(me,i.direction);return or(wt,ue||0,be??Ne,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Lt=Xe(St-1,rt?"right":"left"),nn=ue==null&&tt==0,yr=be==null&&St==Ne,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Lt.top-Qe.top<=3){var ut=(u?nn:yr)&>,co=(u?yr:nn)&&Jt,ir=ut?a:(rt?Qe:Lt).left,Fr=co?s:(rt?Lt:Qe).right;h(ir,Qe.top,Fr-ir,Qe.bottom)}else{var Er,mt,on,ho;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),ho=u&&yr&&Jt?s:Lt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&yr&&Jt?a:Lt.left,ho=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function rl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),j&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Hi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Fe(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||y<-.005)&&(ie.display.sizerWidth){var H=Math.ceil(h/Kr(e.display));H>e.display.maxLineLength&&(e.display.maxLineLength=H,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nl(e){if(e.widgets)for(var t=0;t=l&&(o=g(t,er(ge(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Ms(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!F){var l=d("div","​",null,`position: absolute; top: `+(t.top-n.viewOffset-Xn(e.display))+`px; height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function As(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?D(t.line,t.ch+1,"before"):t,t=t.ch?D(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(xn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function Fs(e,t){var n=qi(e,t);n.scrollTop!=null&&xn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Ai(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.topa-r;if(t.topi+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,y=wr(e)-n.gutters.offsetWidth,E=t.right-t.left>y;return E&&(t.right=t.left+y),t.left<10?l.scrollLeft=0:t.lefty+k-3&&(l.scrollLeft=t.right+(E?0:10)-y),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Es(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);il(e,n,r,t.margin)}}function il(e,t,n,r){var i=qi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function xn(e,t){Math.abs(e.doc.scrollTop-t)<2||(P||Ui(e,{top:t}),ol(e,t,!0),P&&Ui(e),kn(e,100))}function ol(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,fl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ye(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ye(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var e=Y&&!ae?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new we,this.disableVert=new we},Dr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function Xr(e,t){t||(t=yn(e));var n=e.display.barWidth,r=e.display.barHeight;ll(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),ll(e,yn(e)),n=e.display.barWidth,r=e.display.barHeight}function ll(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var al={native:Dr,null:bn};function sl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Fe(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new al[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ye(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Cr(e,t):xn(e,t)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Ns=0;function Mr(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:++Ns,markArrays:null},us(e.curOp)}function Ar(e){var t=e.curOp;t&&cs(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Is(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function zs(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=yn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qo(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Bs(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=fn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Gt(t.mode,r.state):null,s=vo(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var v=!l||l.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),k=0;!v&&kn)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Dt(e,function(){for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&el(e)==0)return!1;cl(e)&&(hr(e),t.dims=Ii(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),$t&&(o=Li(e.doc,o),l=Fo(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Cs(e,o,l),n.viewOffset=er(ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=el(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=Rs(e);return s>4&&(n.lineDiv.style.display="none"),js(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,qs(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function ul(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Mi(e.display)-Ai(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!Ki(e,t))break;Vn(e);var i=yn(e);vn(e),Xr(e,i),Xi(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 Ui(e,t){var n=new ti(e,t);if(Ki(e,n)){Vn(e),ul(e,n);var r=yn(e);vn(e),Xr(e,r),Xi(e,r),n.finish()}}function js(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(E){var H=E.nextSibling;return j&&Y&&e.display.currentWheelTarget==E?E.style.display="none":E.parentNode.removeChild(E),H}for(var s=r.view,u=r.viewFrom,h=0;h-1&&(y=!1),Io(e,v,u,n)),y&&(M(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(X(e.options,u)))),l=v.node.nextSibling}u+=v.size}for(;l;)l=a(l)}function Gi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ot(e,"gutterChanged",e)}function Xi(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+Yt(e)+"px"}function fl(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=zi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&W<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!j&&!(P&&_)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Yi(r.gutters,r.lineNumbers),dl(i),n.init(i)}var ri=0,rr=null;b?rr=-.53:P?rr=15:w?rr=-.7:K&&(rr=-1/3);function hl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function Us(e){var t=hl(e);return t.x*=rr,t.y*=rr,t}function pl(e,t){w&&B==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=hl(t),r=n.x,i=n.y,o=rr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&Y&&j){e:for(var h=t.target,v=l.view;h!=a;h=h.parentNode)for(var k=0;k=0&&re(e,r.to())<=0)return n}return-1};var _e=function(e,t){this.anchor=e,this.head=t};_e.prototype.from=function(){return Hr(this.anchor,this.head)},_e.prototype.to=function(){return yt(this.anchor,this.head)},_e.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(k,y){return re(k.from(),y.from())}),n=de(t,i);for(var o=1;o0:s>=0){var u=Hr(a.from(),l.from()),h=yt(a.to(),l.to()),v=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new _e(v?h:u,v?u:h))}}return new Et(t,n)}function pr(e,t){return new Et([new _e(e,t||e)],0)}function gr(e){return e.text?D(e.from.line+e.text.length-1,xe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function gl(e,t){if(re(e,t.from)<0)return e;if(re(e,t.to)<=0)return gr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=gr(t).ch-t.to.ch),D(n,r)}function Zi(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,E-1),e.insert(a.line+1,Q)}ot(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),xe(e.done)}function kl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ys(i,i.lastOp==r)))a=xe(l.changes),re(t.from,t.to)==0&&re(t.from,a.to)==0?a.to=gr(t):l.changes.push(Vi(e,t));else{var s=xe(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Vi(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ye(e,"historyAdded")}function Zs(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Js(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Zs(e,o,xe(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&bl(i.undone)}function ii(e,t){var n=xe(t);n&&n.ranges&&n.equals(e)||t.push(e)}function wl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Qs(e){if(!e)return null;for(var t,n=0;n-1&&(xe(a)[v]=u[v],delete u[v])}}return r}function $i(e,t,n,r){if(r){var i=e.anchor;if(n){var o=re(t,i)<0;o!=re(n,i)<0?(i=t,t=n):o!=re(t,n)<0&&(t=n)}return new _e(i,t)}else return new _e(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),pt(e,new Et([$i(e.sel.primary(),t,n,i)],0),r)}function Ll(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ye(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),k=void 0;if((r<0?h:u)&&(v=Fl(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(k=re(v,n))&&(r<0?k<0:k>0))return Zr(e,v,t,r,i)}var y=s.find(r<0?-1:1);return(r<0?u:h)&&(y=Fl(e,y,r,y.line==t.line?o:null)),y?Zr(e,y,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Zr(e,t,n,o,i)||!i&&Zr(e,t,n,o,!0)||Zr(e,t,n,-o,i)||!i&&Zr(e,t,n,-o,!0);return l||(e.cantEdit=!0,D(e.first,0))}function Fl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Me(e,D(t.line-1)):null:n>0&&t.ch==(r||ge(e,t.line)).text.length?t.line=0;--i)Ol(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Ol(e,t)}}function Ol(e,t){if(!(t.text.length==1&&t.text[0]==""&&re(t.from,t.to)==0)){var n=Zi(e,t);kl(e,t,n,e.cm?e.cm.curOp.id:NaN),Ln(e,t,n,wi(e,t));var r=[];vr(e,function(i,o){!o&&de(r,i.history)==-1&&(Bl(i.history,t),r.push(i.history)),Ln(i,t,null,wi(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u=0;--y){var E=k(y);if(E)return E.v}}}}function Pl(e,t){if(t!=0&&(e.first+=t,e.sel=new Et(Ie(e.sel.ranges,function(i){return new _e(D(i.anchor.line+t,i.anchor.ch),D(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:D(o,ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),n||(n=Zi(e,t)),e.cm?eu(e.cm,t,r):Qi(e,t,r),li(e,n,Ve),e.cantEdit&&ai(e,D(e.firstLine(),0))&&(e.cantEdit=!1)}}function eu(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(qt(ge(r,o.line))),r.iter(s,l.line+1,function(y){if(y==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&It(e),Qi(r,t,n,$o(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(y){var E=Un(y);E>i.maxLineLength&&(i.maxLine=y,i.maxLineLength=E,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),ja(r,o.line),kn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?bt(e):o.line==l.line&&t.text.length==1&&!ml(e.doc,t)?dr(e,o.line,"text"):bt(e,o.line,l.line+1,u);var h=Ct(e,"changes"),v=Ct(e,"change");if(v||h){var k={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};v&&ot(e,"change",e,k),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(k)}e.display.selForContextMenu=null}function Qr(e,t,n,r,i){var o;r||(r=n),re(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Jr(e,{from:n,to:r,text:t,origin:i})}function Il(e,t,n,r){n1||!(this.children[0]instanceof Cn))){var a=[];this.collapse(a),this.children=[new Cn(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&bt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ml(e.doc)),e&&ot(e,"markerCleared",e,this,r,i),t&&Ar(e),this.parent&&this.parent.clear()}},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=S("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ao(e,t.line,t,n,o)||t.line!=n.line&&Ao(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ua()}o.addToHistory&&kl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&qt(v)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Ft(v,0),Xa(v,new Rn(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(v){cr(e,v)&&Ft(v,0)}),o.clearOnEnter&&ye(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ka(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Hl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)bt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)dr(s,h,"text");o.atomic&&Ml(s.doc),ot(s,"markerAdded",s,o)}return o}var An=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;s--)Jr(this,r[s]);a?Cl(this,a):this.cm&&Gr(this.cm)}),undo:at(function(){si(this,"undo")}),redo:at(function(){si(this,"redo")}),undoSelection:at(function(){si(this,"undo",!0)}),redoSelection:at(function(){si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Me(this,e),t=Me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),Me(this,D(n,t))},indexFromPos:function(e){e=Me(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k=0;a--)Qr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function to(e,t,n){var r=Tt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ro(e,t,n){var r=to(e,t.ch,n);return r==null?null:new D(t.line,r,n<0?"after":"before")}function no(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=We(n,t.doc.direction);if(o){var l=i<0?xe(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var h=qr(t,n);u=i<0?n.text.length-1:0;var v=Zt(t,h,u).top;u=Pt(function(k){return Zt(t,h,k).top==v},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=to(n,u,1))}else u=i<0?l.to:l.from;return new D(r,u,s)}}return new D(r,i<0?n.text.length:0,i<0?"before":"after")}function pu(e,t,n,r){var i=We(t,e.doc.direction);if(!i)return ro(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lr(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&k>=h.begin)){var y=v?"before":"after";return new D(n.line,k,y)}}var E=function(Q,ie,V){for(var ue=function(Ke,st){return st?new D(n.line,a(Ke,1),"before"):new D(n.line,Ke,"after")};Q>=0&&Q0==(be.level!=1),Ne=me?V.begin:a(V.end,-1);if(be.from<=Ne&&Ne0?h.end:a(h.begin,-1);return Z!=null&&!(r>0&&Z==t.text.length)&&(H=E(r>0?0:i.length-1,r,u(Z)),H)?H:null}var Nn={selectAll:El,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return en(e,function(t){if(t.empty()){var n=ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ge(e.doc,i.line-1).text;l&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),D(i.line-1,l.length-1),i,"+transpose"))}}n.push(new _e(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Dt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&re(t,this.pos)==0&&n==this.button};var Pn,In;function ku(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ta(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){j||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Lr(t,e),i=Wt(e),o=r?ku(r,i):"single";J(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&wu(t,i,r,o,e))&&(i==1?r?Lu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(se?t.display.input.onContextMenu(e):_i(t)))}}}function wu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function Su(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=ce?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=Y?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(Y?n.altKey:n.ctrlKey)),i}function Lu(e,t,n,r){b?setTimeout(pe(rl,e),0):e.curOp.focus=x(te(e));var i=Su(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&xi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(re((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(re(l.to(),t)>0||t.xRel<0)?Tu(e,r,t,i):Cu(e,r,t,i)}function Tu(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){j&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_i(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.addNew||oi(e.doc,n,null,null,r.extend),j&&!K||b&&W==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};j&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,ye(i.wrapper.ownerDocument,"mouseup",l),ye(i.wrapper.ownerDocument,"mousemove",a),ye(i.scroller,"dragstart",s),ye(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ra(e,t,n){if(n=="char")return new _e(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new _e(D(t.line,0),Me(e.doc,D(t.line+1,0)));var r=n(e,t);return new _e(r.from,r.to)}function Cu(e,t,n,r){b&&_i(e);var i=e.display,o=e.doc;ht(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new _e(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new _e(n,n)),n=Lr(e,t,!0,!0),a=-1;else{var h=ra(e,n,r.unit);r.extend?l=$i(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=u.length,pt(o,Kt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(pt(o,Kt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):eo(o,a,l,ct):(a=0,pt(o,new Et([l],0),ct),s=o.sel);var v=n;function k(V){if(re(v,V)!=0)if(v=V,r.unit=="rectangle"){for(var ue=[],be=e.options.tabSize,me=Ce(ge(o,n.line).text,n.ch,be),Ne=Ce(ge(o,V.line).text,V.ch,be),Ke=Math.min(me,Ne),st=Math.max(me,Ne),Xe=Math.min(n.line,V.line),Mt=Math.min(e.lastLine(),Math.max(n.line,V.line));Xe<=Mt;Xe++){var wt=ge(o,Xe).text,tt=Re(wt,Ke,be);Ke==st?ue.push(new _e(D(Xe,tt),D(Xe,tt))):wt.length>tt&&ue.push(new _e(D(Xe,tt),D(Xe,Re(wt,st,be))))}ue.length||ue.push(new _e(n,n)),pt(o,Kt(e,s.ranges.slice(0,a).concat(ue),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(V)}else{var St=l,ft=ra(e,V,r.unit),nt=St.anchor,rt;re(ft.anchor,nt)>0?(rt=ft.head,nt=Hr(St.from(),ft.anchor)):(rt=ft.anchor,nt=yt(St.to(),ft.head));var Qe=s.ranges.slice(0);Qe[a]=Du(e,new _e(Me(o,nt),rt)),pt(o,Kt(e,Qe,a),ct)}}var y=i.wrapper.getBoundingClientRect(),E=0;function H(V){var ue=++E,be=Lr(e,V,!0,r.unit=="rectangle");if(be)if(re(be,v)!=0){e.curOp.focus=x(te(e)),k(be);var me=$n(i,o);(be.line>=me.to||be.liney.bottom?20:0;Ne&&setTimeout(lt(e,function(){E==ue&&(i.scroller.scrollTop+=Ne,H(V))}),50)}}function Z(V){e.state.selectingText=!1,E=1/0,V&&(ht(V),i.input.focus()),dt(i.wrapper.ownerDocument,"mousemove",Q),dt(i.wrapper.ownerDocument,"mouseup",ie),o.history.lastSelOrigin=null}var Q=lt(e,function(V){V.buttons===0||!Wt(V)?Z(V):H(V)}),ie=lt(e,Z);e.state.selectingText=ie,ye(i.wrapper.ownerDocument,"mousemove",Q),ye(i.wrapper.ownerDocument,"mouseup",ie)}function Du(e,t){var n=t.anchor,r=t.head,i=ge(e.doc,n.line);if(re(n,r)==0&&n.sticky==r.sticky)return t;var o=We(i);if(!o)return t;var l=lr(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=lr(o,r.ch,r.sticky),v=h-l||(r.ch-n.ch)*(a.level==1?-1:1);h==s-1||h==s?u=v<0:u=v>0}var k=o[s+(u?-1:0)],y=u==(k.level==1),E=y?k.from:k.to,H=y?"after":"before";return n.ch==E&&n.sticky==H?t:new _e(new D(n.line,E,H),r)}function na(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ht(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ct(e,n))return xt(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var h=g(e.doc,o),v=e.display.gutterSpecs[s];return Ye(e,n,e,h,v.className,t),xt(t)}}}function lo(e,t){return na(e,t,"gutterClick",!0)}function ia(e,t){tr(e.display,t)||Mu(e,t)||Ze(e,t,"contextmenu")||se||e.display.input.onContextMenu(t)}function Mu(e,t){return Ct(e,"gutterContextMenu")?na(e,t,"gutterContextMenu",!1):!1}function oa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}var tn={toString:function(){return"CodeMirror.Init"}},la={},di={};function Au(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=tn&&o(a,s,u)}:o)}e.defineOption=n,e.Init=tn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Ji(r)},!0),n("indentUnit",2,Ji,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Sn(r),gn(r),bt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(D(l,h))}l++});for(var a=o.length-1;a>=0;a--)Qr(r.doc,i,o[a],D(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=tn&&r.refresh()}),n("specialCharPlaceholder",is,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",_?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!$),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){oa(r),wn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=tn&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Eu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Yi(i,r.options.lineNumbers),wn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?zi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Xr(r)},!0),n("scrollbarStyle","native",function(r){sl(r),Xr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Yi(r.options.gutters,i),wn(r)},!0),n("firstLineNumber",1,wn,!0),n("lineNumberFormatter",function(r){return r},wn,!0),n("showCursorWhenSelecting",!1,vn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Ur(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Fu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sn,!0),n("addModeClass",!1,Sn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Sn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Fu(e,t,n){var r=n&&n!=tn;if(!t!=!r){var i=e.display.dragFunctions,o=t?ye:dt;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 Eu(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Fe(e.display.wrapper,"CodeMirror-wrap"),Ci(e)),Bi(e),bt(e),gn(e),setTimeout(function(){return Xr(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?Te(t):{},Te(la,t,!1);var r=t.value;typeof r=="string"?r=new kt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ge.inputStyles[t.inputStyle](this),o=this.display=new Ks(e,r,i,t);o.wrapper.CodeMirror=this,oa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),sl(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 we,keySeq:null,specialChars:null},t.autofocus&&!_&&o.input.focus(),b&&W<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Nu(this),uu(),Mr(this),this.curOp.forceUpdate=!0,xl(this,r),t.autofocus&&!_||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Ri(n)},20):Ur(this);for(var l in di)di.hasOwnProperty(l)&&di[l](this,t[l],tn);cl(this),t.finishInit&&t.finishInit(this);for(var a=0;a400}ye(t.scroller,"touchstart",function(s){if(!Ze(e,s)&&!o(s)&&!lo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),ye(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ye(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),v;!u.prev||l(u,u.prev)?v=new _e(h,h):!u.prev.prev||l(u,u.prev.prev)?v=e.findWordAt(h):v=new _e(D(h.line,0),Me(e.doc,D(h.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),ht(s)}i()}),ye(t.scroller,"touchcancel",i),ye(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),ye(t.scroller,"mousewheel",function(s){return pl(e,s)}),ye(t.scroller,"DOMMouseScroll",function(s){return pl(e,s)}),ye(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Ze(e,s)||ar(s)},over:function(s){Ze(e,s)||(su(e,s),ar(s))},start:function(s){return au(e,s)},drop:lt(e,lu),leave:function(s){Ze(e,s)||ql(e)}};var a=t.input.getField();ye(a,"keyup",function(s){return $l.call(e,s)}),ye(a,"keydown",lt(e,Vl)),ye(a,"keypress",lt(e,ea)),ye(a,"focus",function(s){return Ri(e,s)}),ye(a,"blur",function(s){return Ur(e,s)})}var ao=[];Ge.defineInitHook=function(e){return ao.push(e)};function zn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=fn(e,t).state:n="prev");var l=e.options.tabSize,a=ge(i,t),s=Ce(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,a.text.slice(u.length),a.text),h==qe||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Ce(ge(i,t-1).text,null,l):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var v="",k=0;if(e.options.indentWithTabs)for(var y=Math.floor(h/l);y;--y)k+=l,v+=" ";if(kl,s=zt(t),u=null;if(a&&r.ranges.length>1)if(Ut&&Ut.text.join(` `)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h=0;k--){var y=r.ranges[k],E=y.from(),H=y.to();y.empty()&&(n&&n>0?E=D(E.line,E.ch-n):e.state.overwrite&&!a?H=D(H.line,Math.min(ge(o,H.line).text.length,H.ch+xe(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(` `)==s.join(` `)&&(E=H=D(E.line,0)));var Z={from:E,to:H,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,Z),ot(e,"inputRead",e,Z)}t&&!a&&sa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return so(t,n,0,null,"paste")}),!0}function sa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function ua(e){for(var t=[],n=[],r=0;ro&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v0&&eo(this.doc,l,new _e(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return bo(this,r,i)},getLineTokens:function(r,i){return bo(this,D(r),i,!0)},getTokenTypeAt:function(r){r=Me(this.doc,r);var i=mo(this,ge(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]s&&(r=s,l=!0),a=ge(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-er(a):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=jt(this,Me(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),k=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),h+i.offsetWidth>k&&(h=k-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&Fs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:vt(Vl),triggerOnKeyPress:vt(ea),triggerOnKeyUp:$l,triggerOnMouseDown:vt(ta),execCommand:function(r){if(Nn.hasOwnProperty(r))return Nn[r].call(null,this)},triggerElectric:vt(function(r){sa(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=Me(this.doc,r),u=0;u0&&h(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&Bi(this),Ye(this,"refresh",this)}),swapDoc:vt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),xl(this,r),gn(this),this.display.input.reset(),mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ot(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},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}},Bt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function fo(e,t,n,r,i){var o=t,l=n,a=ge(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var ie=t.line+s;return ie=e.first+e.size?!1:(t=new D(ie,t.ch,t.sticky),a=ge(e,ie))}function h(ie){var V;if(r=="codepoint"){var ue=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ue))V=null;else{var be=n>0?ue>=55296&&ue<56320:ue>=56320&&ue<57343;V=new D(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(be?2:1))),-n)}}else i?V=pu(e.cm,a,t,n):V=ro(a,t,n);if(V==null)if(!ie&&u())t=no(i,e.cm,a,t.line,s);else return!1;else t=V;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var v=null,k=r=="group",y=e.cm&&e.cm.getHelper(t,"wordChars"),E=!0;!(n<0&&!h(!E));E=!1){var H=a.text.charAt(t.ch)||` `,Z=Le(H,y)?"w":k&&H==` `?"n":!k||/\s/.test(H)?null:"p";if(k&&!E&&!Z&&(Z="s"),v&&v!=Z){n<0&&(n=1,h(),t.sticky="after");break}if(Z&&(v=Z),n>0&&!h(!E))break}var Q=ai(e,t,o,l,!0);return He(o,Q)&&(Q.hitSide=!0),Q}function ca(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,J(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new we,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ye(i,"paste",function(a){!o(a)||Ze(r,a)||aa(a,r)||W<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ye(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ye(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ye(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ye(i,"touchstart",function(){return n.forceCompositionEnd()}),ye(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ua(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(` `);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=fa(),v=h.firstChild;uo(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(` `);var k=x(ke(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ye(i,"copy",l),ye(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=tl(this.cm,!1);return e.focus=x(ke(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&da(t,r)||{node:a[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(r=D(r.line-1,ge(e.doc,r.line-1).length)),i.ch==ge(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Tr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Tr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(Iu(e,a,h,l,u)),k=Vt(e.doc,D(l,0),D(u,ge(e.doc,u).text.length));v.length>1&&k.length>1;)if(xe(v)==xe(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var y=0,E=0,H=v[0],Z=k[0],Q=Math.min(H.length,Z.length);yr.ch&&ie.charCodeAt(ie.length-E-1)==V.charCodeAt(V.length-E-1);)y--,E++;v[v.length-1]=ie.slice(0,ie.length-E).replace(/^\u200b+/,""),v[0]=v[0].slice(y).replace(/\u200b+$/,"");var be=D(l,y),me=D(u,k.length?xe(k).length-E:0);if(v.length>1||v[0]||re(be,me))return Qr(e.doc,v,be,me,"+input"),!0},je.prototype.ensurePolled=function(){this.forceCompositionEnd()},je.prototype.reset=function(){this.forceCompositionEnd()},je.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},je.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},je.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Dt(this.cm,function(){return bt(e.cm)})},je.prototype.setUneditable=function(e){e.contentEditable="false"},je.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||lt(this.cm,so)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},je.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},je.prototype.onContextMenu=function(){},je.prototype.resetPosition=function(){},je.prototype.needsContentAttribute=!0;function da(e,t){var n=Fi(e,t.line);if(!n||n.hidden)return null;var r=ge(e.doc,t.line),i=Ro(n,r,t.line),o=We(r,e.doc.direction),l="left";if(o){var a=lr(o,t.ch);l=a%2?"right":"left"}var s=Ko(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function Pu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rn(e,t){return t&&(e.bad=!0),e}function Iu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(y){return function(E){return E.id==y}}function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}function v(y){y&&(h(),o+=y)}function k(y){if(y.nodeType==1){var E=y.getAttribute("cm-text");if(E){v(E);return}var H=y.getAttribute("cm-marker"),Z;if(H){var Q=e.findMarks(D(r,0),D(i+1,0),u(+H));Q.length&&(Z=Q[0].find(0))&&v(Vt(e.doc,Z.from,Z.to).join(a));return}if(y.getAttribute("contenteditable")=="false")return;var ie=/^(pre|div|p|li|table|br)$/i.test(y.nodeName);if(!/^br$/i.test(y.nodeName)&&y.textContent.length==0)return;ie&&h();for(var V=0;V=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ye(i,"paste",function(l){Ze(r,l)||aa(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!Ze(r,l)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=ua(r);hi({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ve):(n.prevInput="",i.value=a.text.join(` `),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ye(i,"cut",o),ye(i,"copy",o),ye(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ye(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ye(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ye(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=fa(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=tl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;G(n.cursorDiv,e.cursors),G(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&W>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&W>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!_||x(ke(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&W>=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(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l1e3||i.indexOf(` `)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&W>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Lr(n,e),l=r.scroller.scrollTop;if(!o||A)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px; z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;j&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),j&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var H=n.somethingSelected(),Z="​"+(H?i.value:"");i.value="⇚",i.value=Z,t.prevInput=H?"":"​",i.selectionStart=1,i.selectionEnd=Z.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&W<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&W<9)&&k();var H=0,Z=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?lt(n,El)(n):H++<10?r.detectingSelectAll=setTimeout(Z,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(Z,200)}}if(b&&W>=9&&k(),se){ar(e);var E=function(){dt(window,"mouseup",E),setTimeout(y,20)};ye(window,"mouseup",E)}else setTimeout(y,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Bu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=x(ke(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ye(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function Wu(e){e.off=dt,e.on=ye,e.wheelEventPixels=Us,e.Doc=kt,e.splitLines=zt,e.countColumn=Ce,e.findColumn=Re,e.isWordChar=he,e.Pass=qe,e.signal=Ye,e.Line=_r,e.changeEnd=gr,e.scrollbarModel=al,e.Pos=D,e.cmpPos=re,e.modes=Pr,e.mimeModes=_t,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Xl,e.isModifierKey=Ul,e.lookupKey=$r,e.normalizeKeyMap=hu,e.StringStream=Je,e.SharedTextMarker=An,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=z,e.contains=m,e.rmClass=Fe,e.keyNames=xr}Au(Ge),Ou(Ge);var Hu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&de(Hu,gi)<0&&(Ge.prototype[gi]=(function(e){return function(){return e.apply(this.doc,arguments)}})(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=Bu,Wu(Ge),Ge.version="5.65.18",Ge}))})(vi)),vi.exports}var qu=Nt();const $u=_u(qu);var pa={exports:{}},ga;function Wa(){return ga||(ga=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineMode("css",function(se,q){var Fe=q.inline;q.propertyKeywords||(q=C.resolveMode("text/css"));var M=se.indentUnit,G=q.tokenHooks,d=q.documentTypes||{},S=q.mediaTypes||{},L=q.mediaFeatures||{},m=q.mediaValueKeywords||{},x=q.propertyKeywords||{},z=q.nonStandardPropertyKeywords||{},ne=q.fontProperties||{},p=q.counterDescriptors||{},c=q.colorKeywords||{},te=q.valueKeywords||{},ke=q.allowNested,J=q.lineComment,pe=q.supportsAtComponent===!0,Te=se.highlightNonStandardPropertyKeywords!==!1,Ce,we;function de(T,U){return Ce=U,T}function Oe(T,U){var O=T.next();if(G[O]){var ze=G[O](T,U);if(ze!==!1)return ze}if(O=="@")return T.eatWhile(/[\w\\\-]/),de("def",T.current());if(O=="="||(O=="~"||O=="|")&&T.eat("="))return de(null,"compare");if(O=='"'||O=="'")return U.tokenize=qe(O),U.tokenize(T,U);if(O=="#")return T.eatWhile(/[\w\\\-]/),de("atom","hash");if(O=="!")return T.match(/^\s*\w*/),de("keyword","important");if(/\d/.test(O)||O=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),de("number","unit");if(O==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),de("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?de("variable-2","variable-definition"):de("variable-2","variable");if(T.match(/^\w+-/))return de("meta","meta")}else return/[,+>*\/]/.test(O)?de(null,"select-op"):O=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?de("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(O)?de(null,O):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(U.tokenize=Ve),de("variable callee","variable")):/[\w\\\-]/.test(O)?(T.eatWhile(/[\w\\\-]/),de("property","word")):de(null,null)}function qe(T){return function(U,O){for(var ze=!1,he;(he=U.next())!=null;){if(he==T&&!ze){T==")"&&U.backUp(1);break}ze=!ze&&he=="\\"}return(he==T||!ze&&T!=")")&&(O.tokenize=null),de("string","string")}}function Ve(T,U){return T.next(),T.match(/^\s*[\"\')]/,!1)?U.tokenize=null:U.tokenize=qe(")"),de(null,"(")}function ct(T,U,O){this.type=T,this.indent=U,this.prev=O}function Pe(T,U,O,ze){return T.context=new ct(O,U.indentation()+(ze===!1?0:M),T.context),O}function Re(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function Ue(T,U,O){return Ie[O.context.type](T,U,O)}function et(T,U,O,ze){for(var he=ze||1;he>0;he--)O.context=O.context.prev;return Ue(T,U,O)}function xe(T){var U=T.current().toLowerCase();te.hasOwnProperty(U)?we="atom":c.hasOwnProperty(U)?we="keyword":we="variable"}var Ie={};return Ie.top=function(T,U,O){if(T=="{")return Pe(O,U,"block");if(T=="}"&&O.context.prev)return Re(O);if(pe&&/@component/i.test(T))return Pe(O,U,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return Pe(O,U,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return Pe(O,U,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return O.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return Pe(O,U,"at");if(T=="hash")we="builtin";else if(T=="word")we="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return Pe(O,U,"interpolation");if(T==":")return"pseudo";if(ke&&T=="(")return Pe(O,U,"parens")}return O.context.type},Ie.block=function(T,U,O){if(T=="word"){var ze=U.current().toLowerCase();return x.hasOwnProperty(ze)?(we="property","maybeprop"):z.hasOwnProperty(ze)?(we=Te?"string-2":"property","maybeprop"):ke?(we=U.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(we+=" error","maybeprop")}else return T=="meta"?"block":!ke&&(T=="hash"||T=="qualifier")?(we="error","block"):Ie.top(T,U,O)},Ie.maybeprop=function(T,U,O){return T==":"?Pe(O,U,"prop"):Ue(T,U,O)},Ie.prop=function(T,U,O){if(T==";")return Re(O);if(T=="{"&&ke)return Pe(O,U,"propBlock");if(T=="}"||T=="{")return et(T,U,O);if(T=="(")return Pe(O,U,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(U.current()))we+=" error";else if(T=="word")xe(U);else if(T=="interpolation")return Pe(O,U,"interpolation");return"prop"},Ie.propBlock=function(T,U,O){return T=="}"?Re(O):T=="word"?(we="property","maybeprop"):O.context.type},Ie.parens=function(T,U,O){return T=="{"||T=="}"?et(T,U,O):T==")"?Re(O):T=="("?Pe(O,U,"parens"):T=="interpolation"?Pe(O,U,"interpolation"):(T=="word"&&xe(U),"parens")},Ie.pseudo=function(T,U,O){return T=="meta"?"pseudo":T=="word"?(we="variable-3",O.context.type):Ue(T,U,O)},Ie.documentTypes=function(T,U,O){return T=="word"&&d.hasOwnProperty(U.current())?(we="tag",O.context.type):Ie.atBlock(T,U,O)},Ie.atBlock=function(T,U,O){if(T=="(")return Pe(O,U,"atBlock_parens");if(T=="}"||T==";")return et(T,U,O);if(T=="{")return Re(O)&&Pe(O,U,ke?"block":"top");if(T=="interpolation")return Pe(O,U,"interpolation");if(T=="word"){var ze=U.current().toLowerCase();ze=="only"||ze=="not"||ze=="and"||ze=="or"?we="keyword":S.hasOwnProperty(ze)?we="attribute":L.hasOwnProperty(ze)?we="property":m.hasOwnProperty(ze)?we="keyword":x.hasOwnProperty(ze)?we="property":z.hasOwnProperty(ze)?we=Te?"string-2":"property":te.hasOwnProperty(ze)?we="atom":c.hasOwnProperty(ze)?we="keyword":we="error"}return O.context.type},Ie.atComponentBlock=function(T,U,O){return T=="}"?et(T,U,O):T=="{"?Re(O)&&Pe(O,U,ke?"block":"top",!1):(T=="word"&&(we="error"),O.context.type)},Ie.atBlock_parens=function(T,U,O){return T==")"?Re(O):T=="{"||T=="}"?et(T,U,O,2):Ie.atBlock(T,U,O)},Ie.restricted_atBlock_before=function(T,U,O){return T=="{"?Pe(O,U,"restricted_atBlock"):T=="word"&&O.stateArg=="@counter-style"?(we="variable","restricted_atBlock_before"):Ue(T,U,O)},Ie.restricted_atBlock=function(T,U,O){return T=="}"?(O.stateArg=null,Re(O)):T=="word"?(O.stateArg=="@font-face"&&!ne.hasOwnProperty(U.current().toLowerCase())||O.stateArg=="@counter-style"&&!p.hasOwnProperty(U.current().toLowerCase())?we="error":we="property","maybeprop"):"restricted_atBlock"},Ie.keyframes=function(T,U,O){return T=="word"?(we="variable","keyframes"):T=="{"?Pe(O,U,"top"):Ue(T,U,O)},Ie.at=function(T,U,O){return T==";"?Re(O):T=="{"||T=="}"?et(T,U,O):(T=="word"?we="tag":T=="hash"&&(we="builtin"),"at")},Ie.interpolation=function(T,U,O){return T=="}"?Re(O):T=="{"||T==";"?et(T,U,O):(T=="word"?we="variable":T!="variable"&&T!="("&&T!=")"&&(we="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Fe?"block":"top",stateArg:null,context:new ct(Fe?"block":"top",T||0,null)}},token:function(T,U){if(!U.tokenize&&T.eatSpace())return null;var O=(U.tokenize||Oe)(T,U);return O&&typeof O=="object"&&(Ce=O[1],O=O[0]),we=O,Ce!="comment"&&(U.state=Ie[U.state](Ce,T,U)),we},indent:function(T,U){var O=T.context,ze=U&&U.charAt(0),he=O.indent;return O.type=="prop"&&(ze=="}"||ze==")")&&(O=O.prev),O.prev&&(ze=="}"&&(O.type=="block"||O.type=="top"||O.type=="interpolation"||O.type=="restricted_atBlock")?(O=O.prev,he=O.indent):(ze==")"&&(O.type=="parens"||O.type=="atBlock_parens")||ze=="{"&&(O.type=="at"||O.type=="atBlock"))&&(he=Math.max(0,O.indent-M))),he},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:J,fold:"brace"}});function De(se){for(var q={},Fe=0;Fe")):null:d.match("--")?L(ae("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),L(F(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),S.tokenize=ae("meta","?>"),"meta"):(oe=d.eat("/")?"closeTag":"openTag",S.tokenize=A,"tag bracket");if(m=="&"){var x;return d.eat("#")?d.eat("x")?x=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):x=d.eatWhile(/[\d]/)&&d.eat(";"):x=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),x?"atom":"error"}else return d.eatWhile(/[^&<]/),null}B.isInText=!0;function A(d,S){var L=d.next();if(L==">"||L=="/"&&d.eat(">"))return S.tokenize=B,oe=L==">"?"endTag":"selfcloseTag","tag bracket";if(L=="=")return oe="equals",null;if(L=="<"){S.tokenize=B,S.state=ce,S.tagName=S.tagStart=null;var m=S.tokenize(d,S);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(L)?(S.tokenize=K(L),S.stringStartCol=d.column(),S.tokenize(d,S)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function K(d){var S=function(L,m){for(;!L.eol();)if(L.next()==d){m.tokenize=A;break}return"string"};return S.isInAttribute=!0,S}function ae(d,S){return function(L,m){for(;!L.eol();){if(L.match(S)){m.tokenize=B;break}L.next()}return d}}function F(d){return function(S,L){for(var m;(m=S.next())!=null;){if(m=="<")return L.tokenize=F(d+1),L.tokenize(S,L);if(m==">")if(d==1){L.tokenize=B;break}else return L.tokenize=F(d-1),L.tokenize(S,L)}return"meta"}}function N(d){return d&&d.toLowerCase()}function R(d,S,L){this.prev=d.context,this.tagName=S||"",this.indent=d.indented,this.startOfLine=L,(b.doNotIndent.hasOwnProperty(S)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function _(d){d.context&&(d.context=d.context.prev)}function Y(d,S){for(var L;;){if(!d.context||(L=d.context.tagName,!b.contextGrabbers.hasOwnProperty(N(L))||!b.contextGrabbers[N(L)].hasOwnProperty(N(S))))return;_(d)}}function ce(d,S,L){return d=="openTag"?(L.tagStart=S.column(),$):d=="closeTag"?ee:ce}function $(d,S,L){return d=="word"?(L.tagName=S.current(),w="tag",q):b.allowMissingTagName&&d=="endTag"?(w="tag bracket",q(d,S,L)):(w="error",$)}function ee(d,S,L){if(d=="word"){var m=S.current();return L.context&&L.context.tagName!=m&&b.implicitlyClosed.hasOwnProperty(N(L.context.tagName))&&_(L),L.context&&L.context.tagName==m||b.matchClosing===!1?(w="tag",Ae):(w="tag error",se)}else return b.allowMissingTagName&&d=="endTag"?(w="tag bracket",Ae(d,S,L)):(w="error",se)}function Ae(d,S,L){return d!="endTag"?(w="error",Ae):(_(L),ce)}function se(d,S,L){return w="error",Ae(d,S,L)}function q(d,S,L){if(d=="word")return w="attribute",Fe;if(d=="endTag"||d=="selfcloseTag"){var m=L.tagName,x=L.tagStart;return L.tagName=L.tagStart=null,d=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(N(m))?Y(L,m):(Y(L,m),L.context=new R(L,m,x==L.indented)),ce}return w="error",q}function Fe(d,S,L){return d=="equals"?M:(b.allowMissing||(w="error"),q(d,S,L))}function M(d,S,L){return d=="string"?G:d=="word"&&b.allowUnquoted?(w="string",q):(w="error",q(d,S,L))}function G(d,S,L){return d=="string"?G:q(d,S,L)}return{startState:function(d){var S={tokenize:B,state:ce,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(S.baseIndent=d),S},token:function(d,S){if(!S.tagName&&d.sol()&&(S.indented=d.indentation()),d.eatSpace())return null;oe=null;var L=S.tokenize(d,S);return(L||oe)&&L!="comment"&&(w=null,S.state=S.state(oe||L,d,S),w&&(L=w=="error"?L+" error":w)),L},indent:function(d,S,L){var m=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+le;if(m&&m.noIndent)return C.Pass;if(d.tokenize!=A&&d.tokenize!=B)return L?L.match(/^(\s*)/)[0].length:0;if(d.tagName)return b.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+le*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(d){d.state==M&&(d.state=q)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var S=[],L=d.context;L;L=L.prev)S.push(L.tagName);return S.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})})()),ma.exports}var ya={exports:{}},ba;function _a(){return ba||(ba=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineMode("javascript",function(De,P){var fe=De.indentUnit,Se=P.statementIndent,le=P.jsonld,b=P.json||le,W=P.trackScope!==!1,j=P.typescript,oe=P.wordCharacters||/[\w$\xa1-\uffff]/,w=(function(){function f(it){return{type:it,style:"keyword"}}var g=f("keyword a"),I=f("keyword b"),X=f("keyword c"),D=f("keyword d"),re=f("operator"),He={type:"atom",style:"atom"};return{if:f("if"),while:g,with:g,else:I,do:I,try:I,finally:I,return:D,break:D,continue:D,new:f("new"),delete:X,void:X,throw:X,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:re,typeof:re,instanceof:re,true:He,false:He,null:He,undefined:He,NaN:He,Infinity:He,this:f("this"),class:f("class"),super:f("atom"),yield:X,export:f("export"),import:f("import"),extends:X,await:X}})(),B=/[+\-*&%=<>!?|~^@]/,A=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(f){for(var g=!1,I,X=!1;(I=f.next())!=null;){if(!g){if(I=="/"&&!X)return;I=="["?X=!0:X&&I=="]"&&(X=!1)}g=!g&&I=="\\"}}var ae,F;function N(f,g,I){return ae=f,F=I,g}function R(f,g){var I=f.next();if(I=='"'||I=="'")return g.tokenize=_(I),g.tokenize(f,g);if(I=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return N("number","number");if(I=="."&&f.match(".."))return N("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(I))return N(I);if(I=="="&&f.eat(">"))return N("=>","operator");if(I=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return N("number","number");if(/\d/.test(I))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),N("number","number");if(I=="/")return f.eat("*")?(g.tokenize=Y,Y(f,g)):f.eat("/")?(f.skipToEnd(),N("comment","comment")):Ft(f,g,1)?(K(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),N("regexp","string-2")):(f.eat("="),N("operator","operator",f.current()));if(I=="`")return g.tokenize=ce,ce(f,g);if(I=="#"&&f.peek()=="!")return f.skipToEnd(),N("meta","meta");if(I=="#"&&f.eatWhile(oe))return N("variable","property");if(I=="<"&&f.match("!--")||I=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),N("comment","comment");if(B.test(I))return(I!=">"||!g.lexical||g.lexical.type!=">")&&(f.eat("=")?(I=="!"||I=="=")&&f.eat("="):/[<>*+\-|&?]/.test(I)&&(f.eat(I),I==">"&&f.eat(I))),I=="?"&&f.eat(".")?N("."):N("operator","operator",f.current());if(oe.test(I)){f.eatWhile(oe);var X=f.current();if(g.lastType!="."){if(w.propertyIsEnumerable(X)){var D=w[X];return N(D.type,D.style,X)}if(X=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return N("async","keyword",X)}return N("variable","variable",X)}}function _(f){return function(g,I){var X=!1,D;if(le&&g.peek()=="@"&&g.match(A))return I.tokenize=R,N("jsonld-keyword","meta");for(;(D=g.next())!=null&&!(D==f&&!X);)X=!X&&D=="\\";return X||(I.tokenize=R),N("string","string")}}function Y(f,g){for(var I=!1,X;X=f.next();){if(X=="/"&&I){g.tokenize=R;break}I=X=="*"}return N("comment","comment")}function ce(f,g){for(var I=!1,X;(X=f.next())!=null;){if(!I&&(X=="`"||X=="$"&&f.eat("{"))){g.tokenize=R;break}I=!I&&X=="\\"}return N("quasi","string-2",f.current())}var $="([{}])";function ee(f,g){g.fatArrowAt&&(g.fatArrowAt=null);var I=f.string.indexOf("=>",f.start);if(!(I<0)){if(j){var X=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,I));X&&(I=X.index)}for(var D=0,re=!1,He=I-1;He>=0;--He){var it=f.string.charAt(He),yt=$.indexOf(it);if(yt>=0&&yt<3){if(!D){++He;break}if(--D==0){it=="("&&(re=!0);break}}else if(yt>=3&&yt<6)++D;else if(oe.test(it))re=!0;else if(/["'\/`]/.test(it))for(;;--He){if(He==0)return;var Hr=f.string.charAt(He-1);if(Hr==it&&f.string.charAt(He-2)!="\\"){He--;break}}else if(re&&!D){++He;break}}re&&!D&&(g.fatArrowAt=He)}}var Ae={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function se(f,g,I,X,D,re){this.indented=f,this.column=g,this.type=I,this.prev=D,this.info=re,X!=null&&(this.align=X)}function q(f,g){if(!W)return!1;for(var I=f.localVars;I;I=I.next)if(I.name==g)return!0;for(var X=f.context;X;X=X.prev)for(var I=X.vars;I;I=I.next)if(I.name==g)return!0}function Fe(f,g,I,X,D){var re=f.cc;for(M.state=f,M.stream=D,M.marked=null,M.cc=re,M.style=g,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var He=re.length?re.pop():b?de:Ce;if(He(I,X)){for(;re.length&&re[re.length-1].lex;)re.pop()();return M.marked?M.marked:I=="variable"&&q(f,X)?"variable-2":g}}}var M={state:null,marked:null,cc:null};function G(){for(var f=arguments.length-1;f>=0;f--)M.cc.push(arguments[f])}function d(){return G.apply(null,arguments),!0}function S(f,g){for(var I=g;I;I=I.next)if(I.name==f)return!0;return!1}function L(f){var g=M.state;if(M.marked="def",!!W){if(g.context){if(g.lexical.info=="var"&&g.context&&g.context.block){var I=m(f,g.context);if(I!=null){g.context=I;return}}else if(!S(f,g.localVars)){g.localVars=new ne(f,g.localVars);return}}P.globalVars&&!S(f,g.globalVars)&&(g.globalVars=new ne(f,g.globalVars))}}function m(f,g){if(g)if(g.block){var I=m(f,g.prev);return I?I==g.prev?g:new z(I,g.vars,!0):null}else return S(f,g.vars)?g:new z(g.prev,new ne(f,g.vars),!1);else return null}function x(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function z(f,g,I){this.prev=f,this.vars=g,this.block=I}function ne(f,g){this.name=f,this.next=g}var p=new ne("this",new ne("arguments",null));function c(){M.state.context=new z(M.state.context,M.state.localVars,!1),M.state.localVars=p}function te(){M.state.context=new z(M.state.context,M.state.localVars,!0),M.state.localVars=null}c.lex=te.lex=!0;function ke(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}ke.lex=!0;function J(f,g){var I=function(){var X=M.state,D=X.indented;if(X.lexical.type=="stat")D=X.lexical.indented;else for(var re=X.lexical;re&&re.type==")"&&re.align;re=re.prev)D=re.indented;X.lexical=new se(D,M.stream.column(),f,null,X.lexical,g)};return I.lex=!0,I}function pe(){var f=M.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}pe.lex=!0;function Te(f){function g(I){return I==f?d():f==";"||I=="}"||I==")"||I=="]"?G():d(g)}return g}function Ce(f,g){return f=="var"?d(J("vardef",g),Nr,Te(";"),pe):f=="keyword a"?d(J("form"),qe,Ce,pe):f=="keyword b"?d(J("form"),Ce,pe):f=="keyword d"?M.stream.match(/^\s*$/,!1)?d():d(J("stat"),ct,Te(";"),pe):f=="debugger"?d(Te(";")):f=="{"?d(J("}"),te,Pt,pe,ke):f==";"?d():f=="if"?(M.state.lexical.info=="else"&&M.state.cc[M.state.cc.length-1]==pe&&M.state.cc.pop()(),d(J("form"),qe,Ce,pe,Or)):f=="function"?d(zt):f=="for"?d(J("form"),te,Wn,Ce,ke,pe):f=="class"||j&&g=="interface"?(M.marked="keyword",d(J("form",f=="class"?f:g),Pr,pe)):f=="variable"?j&&g=="declare"?(M.marked="keyword",d(Ce)):j&&(g=="module"||g=="enum"||g=="type")&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword",g=="enum"?d(ge):g=="type"?d(Hn,Te("operator"),We,Te(";")):d(J("form"),xt,Te("{"),J("}"),Pt,pe,pe)):j&&g=="namespace"?(M.marked="keyword",d(J("form"),de,Ce,pe)):j&&g=="abstract"?(M.marked="keyword",d(Ce)):d(J("stat"),ze):f=="switch"?d(J("form"),qe,Te("{"),J("}","switch"),te,Pt,pe,pe,ke):f=="case"?d(de,Te(":")):f=="default"?d(Te(":")):f=="catch"?d(J("form"),c,we,Ce,pe,ke):f=="export"?d(J("stat"),Ir,pe):f=="import"?d(J("stat"),fr,pe):f=="async"?d(Ce):g=="@"?d(de,Ce):G(J("stat"),de,Te(";"),pe)}function we(f){if(f=="(")return d(Ht,Te(")"))}function de(f,g){return Ve(f,g,!1)}function Oe(f,g){return Ve(f,g,!0)}function qe(f){return f!="("?G():d(J(")"),ct,Te(")"),pe)}function Ve(f,g,I){if(M.state.fatArrowAt==M.stream.start){var X=I?Ie:xe;if(f=="(")return d(c,J(")"),Ee(Ht,")"),pe,Te("=>"),X,ke);if(f=="variable")return G(c,xt,Te("=>"),X,ke)}var D=I?Re:Pe;return Ae.hasOwnProperty(f)?d(D):f=="function"?d(zt,D):f=="class"||j&&g=="interface"?(M.marked="keyword",d(J("form"),yi,pe)):f=="keyword c"||f=="async"?d(I?Oe:de):f=="("?d(J(")"),ct,Te(")"),pe,D):f=="operator"||f=="spread"?d(I?Oe:de):f=="["?d(J("]"),Je,pe,D):f=="{"?Tt(Le,"}",null,D):f=="quasi"?G(Ue,D):f=="new"?d(T(I)):d()}function ct(f){return f.match(/[;\}\)\],]/)?G():G(de)}function Pe(f,g){return f==","?d(ct):Re(f,g,!1)}function Re(f,g,I){var X=I==!1?Pe:Re,D=I==!1?de:Oe;if(f=="=>")return d(c,I?Ie:xe,ke);if(f=="operator")return/\+\+|--/.test(g)||j&&g=="!"?d(X):j&&g=="<"&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(J(">"),Ee(We,">"),pe,X):g=="?"?d(de,Te(":"),D):d(D);if(f=="quasi")return G(Ue,X);if(f!=";"){if(f=="(")return Tt(Oe,")","call",X);if(f==".")return d(he,X);if(f=="[")return d(J("]"),ct,Te("]"),pe,X);if(j&&g=="as")return M.marked="keyword",d(We,X);if(f=="regexp")return M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),d(D)}}function Ue(f,g){return f!="quasi"?G():g.slice(g.length-2)!="${"?d(Ue):d(ct,et)}function et(f){if(f=="}")return M.marked="string-2",M.state.tokenize=ce,d(Ue)}function xe(f){return ee(M.stream,M.state),G(f=="{"?Ce:de)}function Ie(f){return ee(M.stream,M.state),G(f=="{"?Ce:Oe)}function T(f){return function(g){return g=="."?d(f?O:U):g=="variable"&&j?d(Ct,f?Re:Pe):G(f?Oe:de)}}function U(f,g){if(g=="target")return M.marked="keyword",d(Pe)}function O(f,g){if(g=="target")return M.marked="keyword",d(Re)}function ze(f){return f==":"?d(pe,Ce):G(Pe,Te(";"),pe)}function he(f){if(f=="variable")return M.marked="property",d()}function Le(f,g){if(f=="async")return M.marked="property",d(Le);if(f=="variable"||M.style=="keyword"){if(M.marked="property",g=="get"||g=="set")return d(ve);var I;return j&&M.state.fatArrowAt==M.stream.start&&(I=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+I[0].length),d(Be)}else{if(f=="number"||f=="string")return M.marked=le?"property":M.style+" property",d(Be);if(f=="jsonld-keyword")return d(Be);if(j&&x(g))return M.marked="keyword",d(Le);if(f=="[")return d(de,or,Te("]"),Be);if(f=="spread")return d(Oe,Be);if(g=="*")return M.marked="keyword",d(Le);if(f==":")return G(Be)}}function ve(f){return f!="variable"?G(Be):(M.marked="property",d(zt))}function Be(f){if(f==":")return d(Oe);if(f=="(")return G(zt)}function Ee(f,g,I){function X(D,re){if(I?I.indexOf(D)>-1:D==","){var He=M.state.lexical;return He.info=="call"&&(He.pos=(He.pos||0)+1),d(function(it,yt){return it==g||yt==g?G():G(f)},X)}return D==g||re==g?d():I&&I.indexOf(";")>-1?G(f):d(Te(g))}return function(D,re){return D==g||re==g?d():G(f,X)}}function Tt(f,g,I){for(var X=3;X"),We);if(f=="quasi")return G(dt,It)}function Bn(f){if(f=="=>")return d(We)}function ye(f){return f.match(/[\}\)\]]/)?d():f==","||f==";"?d(ye):G(Qt,ye)}function Qt(f,g){if(f=="variable"||M.style=="keyword")return M.marked="property",d(Qt);if(g=="?"||f=="number"||f=="string")return d(Qt);if(f==":")return d(We);if(f=="[")return d(Te("variable"),br,Te("]"),Qt);if(f=="(")return G(ur,Qt);if(!f.match(/[;\}\)\],]/))return d()}function dt(f,g){return f!="quasi"?G():g.slice(g.length-2)!="${"?d(dt):d(We,Ye)}function Ye(f){if(f=="}")return M.marked="string-2",M.state.tokenize=ce,d(dt)}function Ze(f,g){return f=="variable"&&M.stream.match(/^\s*[?:]/,!1)||g=="?"?d(Ze):f==":"?d(We):f=="spread"?d(Ze):G(We)}function It(f,g){if(g=="<")return d(J(">"),Ee(We,">"),pe,It);if(g=="|"||f=="."||g=="&")return d(We);if(f=="[")return d(We,Te("]"),It);if(g=="extends"||g=="implements")return M.marked="keyword",d(We);if(g=="?")return d(We,Te(":"),We)}function Ct(f,g){if(g=="<")return d(J(">"),Ee(We,">"),pe,It)}function Bt(){return G(We,ht)}function ht(f,g){if(g=="=")return d(We)}function Nr(f,g){return g=="enum"?(M.marked="keyword",d(ge)):G(xt,or,Wt,xi)}function xt(f,g){if(j&&x(g))return M.marked="keyword",d(xt);if(f=="variable")return L(g),d();if(f=="spread")return d(xt);if(f=="[")return Tt(ln,"]");if(f=="{")return Tt(ar,"}")}function ar(f,g){return f=="variable"&&!M.stream.match(/^\s*:/,!1)?(L(g),d(Wt)):(f=="variable"&&(M.marked="property"),f=="spread"?d(xt):f=="}"?G():f=="["?d(de,Te("]"),Te(":"),ar):d(Te(":"),xt,Wt))}function ln(){return G(xt,Wt)}function Wt(f,g){if(g=="=")return d(Oe)}function xi(f){if(f==",")return d(Nr)}function Or(f,g){if(f=="keyword b"&&g=="else")return d(J("form","else"),Ce,pe)}function Wn(f,g){if(g=="await")return d(Wn);if(f=="(")return d(J(")"),an,pe)}function an(f){return f=="var"?d(Nr,sr):f=="variable"?d(sr):G(sr)}function sr(f,g){return f==")"?d():f==";"?d(sr):g=="in"||g=="of"?(M.marked="keyword",d(de,sr)):G(de,sr)}function zt(f,g){if(g=="*")return M.marked="keyword",d(zt);if(f=="variable")return L(g),d(zt);if(f=="(")return d(c,J(")"),Ee(Ht,")"),pe,lr,Ce,ke);if(j&&g=="<")return d(J(">"),Ee(Bt,">"),pe,zt)}function ur(f,g){if(g=="*")return M.marked="keyword",d(ur);if(f=="variable")return L(g),d(ur);if(f=="(")return d(c,J(")"),Ee(Ht,")"),pe,lr,ke);if(j&&g=="<")return d(J(">"),Ee(Bt,">"),pe,ur)}function Hn(f,g){if(f=="keyword"||f=="variable")return M.marked="type",d(Hn);if(g=="<")return d(J(">"),Ee(Bt,">"),pe)}function Ht(f,g){return g=="@"&&d(de,Ht),f=="spread"?d(Ht):j&&x(g)?(M.marked="keyword",d(Ht)):j&&f=="this"?d(or,Wt):G(xt,or,Wt)}function yi(f,g){return f=="variable"?Pr(f,g):_t(f,g)}function Pr(f,g){if(f=="variable")return L(g),d(_t)}function _t(f,g){if(g=="<")return d(J(">"),Ee(Bt,">"),pe,_t);if(g=="extends"||g=="implements"||j&&f==",")return g=="implements"&&(M.marked="keyword"),d(j?We:de,_t);if(f=="{")return d(J("}"),Rt,pe)}function Rt(f,g){if(f=="async"||f=="variable"&&(g=="static"||g=="get"||g=="set"||j&&x(g))&&M.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return M.marked="keyword",d(Rt);if(f=="variable"||M.style=="keyword")return M.marked="property",d(kr,Rt);if(f=="number"||f=="string")return d(kr,Rt);if(f=="[")return d(de,or,Te("]"),kr,Rt);if(g=="*")return M.marked="keyword",d(Rt);if(j&&f=="(")return G(ur,Rt);if(f==";"||f==",")return d(Rt);if(f=="}")return d();if(g=="@")return d(de,Rt)}function kr(f,g){if(g=="!"||g=="?")return d(kr);if(f==":")return d(We,Wt);if(g=="=")return d(Oe);var I=M.state.lexical.prev,X=I&&I.info=="interface";return G(X?ur:zt)}function Ir(f,g){return g=="*"?(M.marked="keyword",d(Wr,Te(";"))):g=="default"?(M.marked="keyword",d(de,Te(";"))):f=="{"?d(Ee(zr,"}"),Wr,Te(";")):G(Ce)}function zr(f,g){if(g=="as")return M.marked="keyword",d(Te("variable"));if(f=="variable")return G(Oe,zr)}function fr(f){return f=="string"?d():f=="("?G(de):f=="."?G(Pe):G(Br,Gt,Wr)}function Br(f,g){return f=="{"?Tt(Br,"}"):(f=="variable"&&L(g),g=="*"&&(M.marked="keyword"),d(sn))}function Gt(f){if(f==",")return d(Br,Gt)}function sn(f,g){if(g=="as")return M.marked="keyword",d(Br)}function Wr(f,g){if(g=="from")return M.marked="keyword",d(de)}function Je(f){return f=="]"?d():G(Ee(Oe,"]"))}function ge(){return G(J("form"),xt,Te("{"),J("}"),Ee(Vt,"}"),pe,pe)}function Vt(){return G(xt,Wt)}function un(f,g){return f.lastType=="operator"||f.lastType==","||B.test(g.charAt(0))||/[,.]/.test(g.charAt(0))}function Ft(f,g,I){return g.tokenize==R&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||g.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(I||0)))}return{startState:function(f){var g={tokenize:R,lastType:"sof",cc:[],lexical:new se((f||0)-fe,0,"block",!1),localVars:P.localVars,context:P.localVars&&new z(null,null,!1),indented:f||0};return P.globalVars&&typeof P.globalVars=="object"&&(g.globalVars=P.globalVars),g},token:function(f,g){if(f.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=f.indentation(),ee(f,g)),g.tokenize!=Y&&f.eatSpace())return null;var I=g.tokenize(f,g);return ae=="comment"?I:(g.lastType=ae=="operator"&&(F=="++"||F=="--")?"incdec":ae,Fe(g,I,ae,F,f))},indent:function(f,g){if(f.tokenize==Y||f.tokenize==ce)return C.Pass;if(f.tokenize!=R)return 0;var I=g&&g.charAt(0),X=f.lexical,D;if(!/^\s*else\b/.test(g))for(var re=f.cc.length-1;re>=0;--re){var He=f.cc[re];if(He==pe)X=X.prev;else if(He!=Or&&He!=ke)break}for(;(X.type=="stat"||X.type=="form")&&(I=="}"||(D=f.cc[f.cc.length-1])&&(D==Pe||D==Re)&&!/^[,\.=+\-*:?[\(]/.test(g));)X=X.prev;Se&&X.type==")"&&X.prev.type=="stat"&&(X=X.prev);var it=X.type,yt=I==it;return it=="vardef"?X.indented+(f.lastType=="operator"||f.lastType==","?X.info.length+1:0):it=="form"&&I=="{"?X.indented:it=="form"?X.indented+fe:it=="stat"?X.indented+(un(f,g)?Se||fe:0):X.info=="switch"&&!yt&&P.doubleIndentSwitch!=!1?X.indented+(/^(?:case|default)\b/.test(g)?fe:2*fe):X.align?X.column+(yt?0:1):X.indented+(yt?0:fe)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:le,jsonMode:b,expressionAllowed:Ft,skipExpression:function(f){Fe(f,"atom","atom","true",new C.StringStream("",2,null))}}}),C.registerHelper("wordChars","javascript",/[\w$]/),C.defineMIME("text/javascript","javascript"),C.defineMIME("text/ecmascript","javascript"),C.defineMIME("application/javascript","javascript"),C.defineMIME("application/x-javascript","javascript"),C.defineMIME("application/ecmascript","javascript"),C.defineMIME("application/json",{name:"javascript",json:!0}),C.defineMIME("application/x-json",{name:"javascript",json:!0}),C.defineMIME("application/manifest+json",{name:"javascript",json:!0}),C.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),C.defineMIME("text/typescript",{name:"javascript",typescript:!0}),C.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})()),ya.exports}var ka;function ju(){return ka||(ka=1,(function(At,Ot){(function(C){C(Nt(),Ha(),_a(),Wa())})(function(C){var De={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function P(oe,w,B){var A=oe.current(),K=A.search(w);return K>-1?oe.backUp(A.length-K):A.match(/<\/?$/)&&(oe.backUp(A.length),oe.match(w,!1)||oe.match(A)),B}var fe={};function Se(oe){var w=fe[oe];return w||(fe[oe]=new RegExp("\\s+"+oe+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function le(oe,w){var B=oe.match(Se(w));return B?/^\s*(.*?)\s*$/.exec(B[2])[1]:""}function b(oe,w){return new RegExp((w?"^":"")+"","i")}function W(oe,w){for(var B in oe)for(var A=w[B]||(w[B]=[]),K=oe[B],ae=K.length-1;ae>=0;ae--)A.unshift(K[ae])}function j(oe,w){for(var B=0;B=0;F--)A.script.unshift(["type",ae[F].matches,ae[F].mode]);function N(R,_){var Y=B.token(R,_.htmlState),ce=/\btag\b/.test(Y),$;if(ce&&!/[<>\s\/]/.test(R.current())&&($=_.htmlState.tagName&&_.htmlState.tagName.toLowerCase())&&A.hasOwnProperty($))_.inTag=$+" ";else if(_.inTag&&ce&&/>$/.test(R.current())){var ee=/^([\S]+) (.*)/.exec(_.inTag);_.inTag=null;var Ae=R.current()==">"&&j(A[ee[1]],ee[2]),se=C.getMode(oe,Ae),q=b(ee[1],!0),Fe=b(ee[1],!1);_.token=function(M,G){return M.match(q,!1)?(G.token=N,G.localState=G.localMode=null,null):P(M,Fe,G.localMode.token(M,G.localState))},_.localMode=se,_.localState=C.startState(se,B.indent(_.htmlState,"",""))}else _.inTag&&(_.inTag+=R.current(),R.eol()&&(_.inTag+=" "));return Y}return{startState:function(){var R=C.startState(B);return{token:N,inTag:null,localMode:null,localState:null,htmlState:R}},copyState:function(R){var _;return R.localState&&(_=C.copyState(R.localMode,R.localState)),{token:R.token,inTag:R.inTag,localMode:R.localMode,localState:_,htmlState:C.copyState(B,R.htmlState)}},token:function(R,_){return _.token(R,_)},indent:function(R,_,Y){return!R.localMode||/^\s*<\//.test(_)?B.indent(R.htmlState,_,Y):R.localMode.indent?R.localMode.indent(R.localState,_,Y):C.Pass},innerMode:function(R){return{state:R.localState||R.htmlState,mode:R.localMode||B}}}},"xml","javascript","css"),C.defineMIME("text/html","htmlmixed")})})()),va.exports}ju();_a();var wa={exports:{}},Sa;function Ku(){return Sa||(Sa=1,(function(At,Ot){(function(C){C(Nt())})(function(C){function De(W){return new RegExp("^(("+W.join(")|(")+"))\\b")}var P=De(["and","or","not","is"]),fe=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],Se=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];C.registerHelper("hintWords","python",fe.concat(Se).concat(["exec","print"]));function le(W){return W.scopes[W.scopes.length-1]}C.defineMode("python",function(W,j){for(var oe="error",w=j.delimiters||j.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,B=[j.singleOperators,j.doubleOperators,j.doubleDelimiters,j.tripleDelimiters,j.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],A=0;Ax?q(L):z0&&M(S,L)&&(ne+=" "+oe),ne}}return ee(S,L)}function ee(S,L,m){if(S.eatSpace())return null;if(!m&&S.match(/^#.*/))return"comment";if(S.match(/^[0-9\.]/,!1)){var x=!1;if(S.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(x=!0),S.match(/^[\d_]+\.\d*/)&&(x=!0),S.match(/^\.\d+/)&&(x=!0),x)return S.eat(/J/i),"number";var z=!1;if(S.match(/^0x[0-9a-f_]+/i)&&(z=!0),S.match(/^0b[01_]+/i)&&(z=!0),S.match(/^0o[0-7_]+/i)&&(z=!0),S.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(S.eat(/J/i),z=!0),S.match(/^0(?![\dx])/i)&&(z=!0),z)return S.eat(/L/i),"number"}if(S.match(_)){var ne=S.current().toLowerCase().indexOf("f")!==-1;return ne?(L.tokenize=Ae(S.current(),L.tokenize),L.tokenize(S,L)):(L.tokenize=se(S.current(),L.tokenize),L.tokenize(S,L))}for(var p=0;p=0;)S=S.substr(1);var m=S.length==1,x="string";function z(p){return function(c,te){var ke=ee(c,te,!0);return ke=="punctuation"&&(c.current()=="{"?te.tokenize=z(p+1):c.current()=="}"&&(p>1?te.tokenize=z(p-1):te.tokenize=ne)),ke}}function ne(p,c){for(;!p.eol();)if(p.eatWhile(/[^'"\{\}\\]/),p.eat("\\")){if(p.next(),m&&p.eol())return x}else{if(p.match(S))return c.tokenize=L,x;if(p.match("{{"))return x;if(p.match("{",!1))return c.tokenize=z(0),p.current()?x:c.tokenize(p,c);if(p.match("}}"))return x;if(p.match("}"))return oe;p.eat(/['"]/)}if(m){if(j.singleLineStringErrors)return oe;c.tokenize=L}return x}return ne.isString=!0,ne}function se(S,L){for(;"rubf".indexOf(S.charAt(0).toLowerCase())>=0;)S=S.substr(1);var m=S.length==1,x="string";function z(ne,p){for(;!ne.eol();)if(ne.eatWhile(/[^'"\\]/),ne.eat("\\")){if(ne.next(),m&&ne.eol())return x}else{if(ne.match(S))return p.tokenize=L,x;ne.eat(/['"]/)}if(m){if(j.singleLineStringErrors)return oe;p.tokenize=L}return x}return z.isString=!0,z}function q(S){for(;le(S).type!="py";)S.scopes.pop();S.scopes.push({offset:le(S).offset+W.indentUnit,type:"py",align:null})}function Fe(S,L,m){var x=S.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:S.column()+1;L.scopes.push({offset:L.indent+K,type:m,align:x})}function M(S,L){for(var m=S.indentation();L.scopes.length>1&&le(L).offset>m;){if(le(L).type!="py")return!0;L.scopes.pop()}return le(L).offset!=m}function G(S,L){S.sol()&&(L.beginningOfLine=!0,L.dedent=!1);var m=L.tokenize(S,L),x=S.current();if(L.beginningOfLine&&x=="@")return S.match(R,!1)?"meta":N?"operator":oe;if(/\S/.test(x)&&(L.beginningOfLine=!1),(m=="variable"||m=="builtin")&&L.lastToken=="meta"&&(m="meta"),(x=="pass"||x=="return")&&(L.dedent=!0),x=="lambda"&&(L.lambda=!0),x==":"&&!L.lambda&&le(L).type=="py"&&S.match(/^\s*(?:#|$)/,!1)&&q(L),x.length==1&&!/string|comment/.test(m)){var z="[({".indexOf(x);if(z!=-1&&Fe(S,L,"])}".slice(z,z+1)),z="])}".indexOf(x),z!=-1)if(le(L).type==x)L.indent=L.scopes.pop().offset-K;else return oe}return L.dedent&&S.eol()&&le(L).type=="py"&&L.scopes.length>1&&L.scopes.pop(),m}var d={startState:function(S){return{tokenize:$,scopes:[{offset:S||0,type:"py",align:null}],indent:S||0,lastToken:null,lambda:!1,dedent:0}},token:function(S,L){var m=L.errorToken;m&&(L.errorToken=!1);var x=G(S,L);return x&&x!="comment"&&(L.lastToken=x=="keyword"||x=="punctuation"?S.current():x),x=="punctuation"&&(x=null),S.eol()&&L.lambda&&(L.lambda=!1),m?x+" "+oe:x},indent:function(S,L){if(S.tokenize!=$)return S.tokenize.isString?C.Pass:0;var m=le(S),x=m.type==L.charAt(0)||m.type=="py"&&!S.dedent&&/^(else:|elif |except |finally:)/.test(L);return m.align!=null?m.align-(x?1:0):m.offset-(x?K:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return d}),C.defineMIME("text/x-python","python");var b=function(W){return W.split(" ")};C.defineMIME("text/x-cython",{name:"python",extra_keywords:b("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})})()),wa.exports}Ku();var La={exports:{}},Ta;function Uu(){return Ta||(Ta=1,(function(At,Ot){(function(C){C(Nt())})(function(C){function De(m,x,z,ne,p,c){this.indented=m,this.column=x,this.type=z,this.info=ne,this.align=p,this.prev=c}function P(m,x,z,ne){var p=m.indented;return m.context&&m.context.type=="statement"&&z!="statement"&&(p=m.context.indented),m.context=new De(p,x,z,ne,null,m.context)}function fe(m){var x=m.context.type;return(x==")"||x=="]"||x=="}")&&(m.indented=m.context.indented),m.context=m.context.prev}function Se(m,x,z){if(x.prevToken=="variable"||x.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(m.string.slice(0,z))||x.typeAtEndOfLine&&m.column()==m.indentation())return!0}function le(m){for(;;){if(!m||m.type=="top")return!0;if(m.type=="}"&&m.prev.info!="namespace")return!1;m=m.prev}}C.defineMode("clike",function(m,x){var z=m.indentUnit,ne=x.statementIndentUnit||z,p=x.dontAlignCalls,c=x.keywords||{},te=x.types||{},ke=x.builtin||{},J=x.blockKeywords||{},pe=x.defKeywords||{},Te=x.atoms||{},Ce=x.hooks||{},we=x.multiLineStrings,de=x.indentStatements!==!1,Oe=x.indentSwitch!==!1,qe=x.namespaceSeparator,Ve=x.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ct=x.numberStart||/[\d\.]/,Pe=x.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Re=x.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ue=x.isIdentifierChar||/[\w\$_\xa1-\uffff]/,et=x.isReservedIdentifier||!1,xe,Ie;function T(he,Le){var ve=he.next();if(Ce[ve]){var Be=Ce[ve](he,Le);if(Be!==!1)return Be}if(ve=='"'||ve=="'")return Le.tokenize=U(ve),Le.tokenize(he,Le);if(ct.test(ve)){if(he.backUp(1),he.match(Pe))return"number";he.next()}if(Ve.test(ve))return xe=ve,null;if(ve=="/"){if(he.eat("*"))return Le.tokenize=O,O(he,Le);if(he.eat("/"))return he.skipToEnd(),"comment"}if(Re.test(ve)){for(;!he.match(/^\/[\/*]/,!1)&&he.eat(Re););return"operator"}if(he.eatWhile(Ue),qe)for(;he.match(qe);)he.eatWhile(Ue);var Ee=he.current();return W(c,Ee)?(W(J,Ee)&&(xe="newstatement"),W(pe,Ee)&&(Ie=!0),"keyword"):W(te,Ee)?"type":W(ke,Ee)||et&&et(Ee)?(W(J,Ee)&&(xe="newstatement"),"builtin"):W(Te,Ee)?"atom":"variable"}function U(he){return function(Le,ve){for(var Be=!1,Ee,Tt=!1;(Ee=Le.next())!=null;){if(Ee==he&&!Be){Tt=!0;break}Be=!Be&&Ee=="\\"}return(Tt||!(Be||we))&&(ve.tokenize=null),"string"}}function O(he,Le){for(var ve=!1,Be;Be=he.next();){if(Be=="/"&&ve){Le.tokenize=null;break}ve=Be=="*"}return"comment"}function ze(he,Le){x.typeFirstDefinitions&&he.eol()&&le(Le.context)&&(Le.typeAtEndOfLine=Se(he,Le,he.pos))}return{startState:function(he){return{tokenize:null,context:new De((he||0)-z,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(he,Le){var ve=Le.context;if(he.sol()&&(ve.align==null&&(ve.align=!1),Le.indented=he.indentation(),Le.startOfLine=!0),he.eatSpace())return ze(he,Le),null;xe=Ie=null;var Be=(Le.tokenize||T)(he,Le);if(Be=="comment"||Be=="meta")return Be;if(ve.align==null&&(ve.align=!0),xe==";"||xe==":"||xe==","&&he.match(/^\s*(?:\/\/.*)?$/,!1))for(;Le.context.type=="statement";)fe(Le);else if(xe=="{")P(Le,he.column(),"}");else if(xe=="[")P(Le,he.column(),"]");else if(xe=="(")P(Le,he.column(),")");else if(xe=="}"){for(;ve.type=="statement";)ve=fe(Le);for(ve.type=="}"&&(ve=fe(Le));ve.type=="statement";)ve=fe(Le)}else xe==ve.type?fe(Le):de&&((ve.type=="}"||ve.type=="top")&&xe!=";"||ve.type=="statement"&&xe=="newstatement")&&P(Le,he.column(),"statement",he.current());if(Be=="variable"&&(Le.prevToken=="def"||x.typeFirstDefinitions&&Se(he,Le,he.start)&&le(Le.context)&&he.match(/^\s*\(/,!1))&&(Be="def"),Ce.token){var Ee=Ce.token(he,Le,Be);Ee!==void 0&&(Be=Ee)}return Be=="def"&&x.styleDefs===!1&&(Be="variable"),Le.startOfLine=!1,Le.prevToken=Ie?"def":Be||xe,ze(he,Le),Be},indent:function(he,Le){if(he.tokenize!=T&&he.tokenize!=null||he.typeAtEndOfLine&&le(he.context))return C.Pass;var ve=he.context,Be=Le&&Le.charAt(0),Ee=Be==ve.type;if(ve.type=="statement"&&Be=="}"&&(ve=ve.prev),x.dontIndentStatements)for(;ve.type=="statement"&&x.dontIndentStatements.test(ve.info);)ve=ve.prev;if(Ce.indent){var Tt=Ce.indent(he,ve,Le,z);if(typeof Tt=="number")return Tt}var Pt=ve.prev&&ve.prev.info=="switch";if(x.allmanIndentation&&/[{(]/.test(Be)){for(;ve.type!="top"&&ve.type!="}";)ve=ve.prev;return ve.indented}return ve.type=="statement"?ve.indented+(Be=="{"?0:ne):ve.align&&(!p||ve.type!=")")?ve.column+(Ee?0:1):ve.type==")"&&!Ee?ve.indented+ne:ve.indented+(Ee?0:z)+(!Ee&&Pt&&!/^(?:case|default)\b/.test(Le)?z:0)},electricInput:Oe?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function b(m){for(var x={},z=m.split(" "),ne=0;ne!?|\/#:@]/,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,x){return m.match('""')?(x.tokenize=M,x.tokenize(m,x)):!1},"'":function(m){return m.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(m,x){var z=x.context;return z.type=="}"&&z.align&&m.eat(">")?(x.context=new De(z.indented,z.column,z.type,z.info,null,z.prev),"operator"):!1},"/":function(m,x){return m.eat("*")?(x.tokenize=G(1),x.tokenize(m,x)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function d(m){return function(x,z){for(var ne=!1,p,c=!1;!x.eol();){if(!m&&!ne&&x.match('"')){c=!0;break}if(m&&x.match('"""')){c=!0;break}p=x.next(),!ne&&p=="$"&&x.match("{")&&x.skipTo("}"),ne=!ne&&p=="\\"&&!m}return(c||!m)&&(z.tokenize=null),"string"}}Fe("text/x-kotlin",{name:"clike",keywords:b("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:b("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:b("catch class do else finally for if where try while enum"),defKeywords:b("class val var object interface fun"),atoms:b("true false null this"),hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},"*":function(m,x){return x.prevToken=="."?"variable":"operator"},'"':function(m,x){return x.tokenize=d(m.match('""')),x.tokenize(m,x)},"/":function(m,x){return m.eat("*")?(x.tokenize=G(1),x.tokenize(m,x)):!1},indent:function(m,x,z,ne){var p=z&&z.charAt(0);if((m.prevToken=="}"||m.prevToken==")")&&z=="")return m.indented;if(m.prevToken=="operator"&&z!="}"&&m.context.type!="}"||m.prevToken=="variable"&&p=="."||(m.prevToken=="}"||m.prevToken==")")&&p==".")return ne*2+x.indented;if(x.align&&x.type=="}")return x.indented+(m.context.type==(z||"").charAt(0)?0:ne)}},modeProps:{closeBrackets:{triples:'"'}}}),Fe(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":_},modeProps:{fold:["brace","include"]}}),Fe("text/x-nesc",{name:"clike",keywords:b(j+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:ae,blockKeywords:b(N),atoms:b("null true false"),hooks:{"#":_},modeProps:{fold:["brace","include"]}}),Fe("text/x-objectivec",{name:"clike",keywords:b(j+" "+w),types:F,builtin:b(B),blockKeywords:b(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:b(R+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:ce,hooks:{"#":_,"*":Y},modeProps:{fold:["brace","include"]}}),Fe("text/x-objectivec++",{name:"clike",keywords:b(j+" "+w+" "+oe),types:F,builtin:b(B),blockKeywords:b(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:b(R+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:ce,hooks:{"#":_,"*":Y,u:ee,U:ee,L:ee,R:ee,0:$,1:$,2:$,3:$,4:$,5:$,6:$,7:$,8:$,9:$,token:function(m,x,z){if(z=="variable"&&m.peek()=="("&&(x.prevToken==";"||x.prevToken==null||x.prevToken=="}")&&Ae(m.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Fe("text/x-squirrel",{name:"clike",keywords:b("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ae,blockKeywords:b("case catch class else for foreach if switch try while"),defKeywords:b("function local class"),typeFirstDefinitions:!0,atoms:b("true false null"),hooks:{"#":_},modeProps:{fold:["brace","include"]}});var S=null;function L(m){return function(x,z){for(var ne=!1,p,c=!1;!x.eol();){if(!ne&&x.match('"')&&(m=="single"||x.match('""'))){c=!0;break}if(!ne&&x.match("``")){S=L(m),c=!0;break}p=x.next(),ne=m=="single"&&!ne&&p=="\\"}return c&&(z.tokenize=null),"string"}}Fe("text/x-ceylon",{name:"clike",keywords:b("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(m){var x=m.charAt(0);return x===x.toUpperCase()&&x!==x.toLowerCase()},blockKeywords:b("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:b("class dynamic function interface module object package value"),builtin:b("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:b("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,x){return x.tokenize=L(m.match('""')?"triple":"single"),x.tokenize(m,x)},"`":function(m,x){return!S||!m.match("`")?!1:(x.tokenize=S,S=null,x.tokenize(m,x))},"'":function(m){return m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(m,x,z){if((z=="variable"||z=="type")&&x.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})()),La.exports}Uu();var Ca={exports:{}},Da={exports:{}},Ma;function Gu(){return Ma||(Ma=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var De=0;De-1&&fe.substring(b+1,fe.length);if(W)return C.findModeByExtension(W)},C.findModeByName=function(fe){fe=fe.toLowerCase();for(var Se=0;Se` "'(~:]+/,ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,F=/^\s*\[[^\]]+?\]:.*$/,N=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,R=" ";function _(p,c,te){return c.f=c.inline=te,te(p,c)}function Y(p,c,te){return c.f=c.block=te,te(p,c)}function ce(p){return!p||!/\S/.test(p.string)}function $(p){if(p.linkTitle=!1,p.linkHref=!1,p.linkText=!1,p.em=!1,p.strong=!1,p.strikethrough=!1,p.quote=0,p.indentedCode=!1,p.f==Ae){var c=Se;if(!c){var te=C.innerMode(fe,p.htmlState);c=te.mode.name=="xml"&&te.state.tagStart===null&&!te.state.context&&te.state.tokenize.isInText}c&&(p.f=M,p.block=ee,p.htmlState=null)}return p.trailingSpace=0,p.trailingSpaceNewLine=!1,p.prevLine=p.thisLine,p.thisLine={stream:null},null}function ee(p,c){var te=p.column()===c.indentation,ke=ce(c.prevLine.stream),J=c.indentedCode,pe=c.prevLine.hr,Te=c.list!==!1,Ce=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var we=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Te)){for(c.list=null;we=4&&(J||c.prevLine.fencedCodeEnd||c.prevLine.header||ke))return p.skipToEnd(),c.indentedCode=!0,b.code;if(p.eatSpace())return null;if(te&&c.indentation<=Ce&&(qe=p.match(B))&&qe[1].length<=6)return c.quote=0,c.header=qe[1].length,c.thisLine.header=!0,P.highlightFormatting&&(c.formatting="header"),c.f=c.inline,q(c);if(c.indentation<=Ce&&p.eat(">"))return c.quote=te?1:c.quote+1,P.highlightFormatting&&(c.formatting="quote"),p.eatSpace(),q(c);if(!Oe&&!c.setext&&te&&c.indentation<=Ce&&(qe=p.match(oe))){var Ve=qe[1]?"ol":"ul";return c.indentation=we+p.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,P.taskLists&&p.match(w,!1)&&(c.taskList=!0),c.f=c.inline,P.highlightFormatting&&(c.formatting=["list","list-"+Ve]),q(c)}else{if(te&&c.indentation<=Ce&&(qe=p.match(ae,!0)))return c.quote=0,c.fencedEndRE=new RegExp(qe[1]+"+ *$"),c.localMode=P.fencedCodeBlockHighlighting&&le(qe[2]||P.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=C.startState(c.localMode)),c.f=c.block=se,P.highlightFormatting&&(c.formatting="code-block"),c.code=-1,q(c);if(c.setext||(!de||!Te)&&!c.quote&&c.list===!1&&!c.code&&!Oe&&!F.test(p.string)&&(qe=p.lookAhead(1))&&(qe=qe.match(A)))return c.setext?(c.header=c.setext,c.setext=0,p.skipToEnd(),P.highlightFormatting&&(c.formatting="header")):(c.header=qe[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,q(c);if(Oe)return p.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,b.hr;if(p.peek()==="[")return _(p,c,m)}return _(p,c,c.inline)}function Ae(p,c){var te=fe.token(p,c.htmlState);if(!Se){var ke=C.innerMode(fe,c.htmlState);(ke.mode.name=="xml"&&ke.state.tagStart===null&&!ke.state.context&&ke.state.tokenize.isInText||c.md_inside&&p.current().indexOf(">")>-1)&&(c.f=M,c.block=ee,c.htmlState=null)}return te}function se(p,c){var te=c.listStack[c.listStack.length-1]||0,ke=c.indentation=p.quote?c.push(b.formatting+"-"+p.formatting[te]+"-"+p.quote):c.push("error"))}if(p.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(p.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(p.linkHref?c.push(b.linkHref,"url"):(p.strong&&c.push(b.strong),p.em&&c.push(b.em),p.strikethrough&&c.push(b.strikethrough),p.emoji&&c.push(b.emoji),p.linkText&&c.push(b.linkText),p.code&&c.push(b.code),p.image&&c.push(b.image),p.imageAltText&&c.push(b.imageAltText,"link"),p.imageMarker&&c.push(b.imageMarker)),p.header&&c.push(b.header,b.header+"-"+p.header),p.quote&&(c.push(b.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=p.quote?c.push(b.quote+"-"+p.quote):c.push(b.quote+"-"+P.maxBlockquoteDepth)),p.list!==!1){var ke=(p.listStack.length-1)%3;ke?ke===1?c.push(b.list2):c.push(b.list3):c.push(b.list1)}return p.trailingSpaceNewLine?c.push("trailing-space-new-line"):p.trailingSpace&&c.push("trailing-space-"+(p.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Fe(p,c){if(p.match(K,!0))return q(c)}function M(p,c){var te=c.text(p,c);if(typeof te<"u")return te;if(c.list)return c.list=null,q(c);if(c.taskList){var ke=p.match(w,!0)[1]===" ";return ke?c.taskOpen=!0:c.taskClosed=!0,P.highlightFormatting&&(c.formatting="task"),c.taskList=!1,q(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&p.match(/^#+$/,!0))return P.highlightFormatting&&(c.formatting="header"),q(c);var J=p.next();if(c.linkTitle){c.linkTitle=!1;var pe=J;J==="("&&(pe=")"),pe=(pe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+pe+"\\\\]+|\\\\\\\\|\\\\.)"+pe;if(p.match(new RegExp(Te),!0))return b.linkHref}if(J==="`"){var Ce=c.formatting;P.highlightFormatting&&(c.formatting="code"),p.eatWhile("`");var we=p.current().length;if(c.code==0&&(!c.quote||we==1))return c.code=we,q(c);if(we==c.code){var de=q(c);return c.code=0,de}else return c.formatting=Ce,q(c)}else if(c.code)return q(c);if(J==="\\"&&(p.next(),P.highlightFormatting)){var Oe=q(c),qe=b.formatting+"-escape";return Oe?Oe+" "+qe:qe}if(J==="!"&&p.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,P.highlightFormatting&&(c.formatting="image"),q(c);if(J==="["&&c.imageMarker&&p.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,P.highlightFormatting&&(c.formatting="image"),q(c);if(J==="]"&&c.imageAltText){P.highlightFormatting&&(c.formatting="image");var Oe=q(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=d,Oe}if(J==="["&&!c.image)return c.linkText&&p.match(/^.*?\]/)||(c.linkText=!0,P.highlightFormatting&&(c.formatting="link")),q(c);if(J==="]"&&c.linkText){P.highlightFormatting&&(c.formatting="link");var Oe=q(c);return c.linkText=!1,c.inline=c.f=p.match(/\(.*?\)| ?\[.*?\]/,!1)?d:M,Oe}if(J==="<"&&p.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=G,P.highlightFormatting&&(c.formatting="link");var Oe=q(c);return Oe?Oe+=" ":Oe="",Oe+b.linkInline}if(J==="<"&&p.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=G,P.highlightFormatting&&(c.formatting="link");var Oe=q(c);return Oe?Oe+=" ":Oe="",Oe+b.linkEmail}if(P.xml&&J==="<"&&p.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=p.string.indexOf(">",p.pos);if(Ve!=-1){var ct=p.string.substring(p.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ct)&&(c.md_inside=!0)}return p.backUp(1),c.htmlState=C.startState(fe),Y(p,c,Ae)}if(P.xml&&J==="<"&&p.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(J==="*"||J==="_"){for(var Pe=1,Re=p.pos==1?" ":p.string.charAt(p.pos-2);Pe<3&&p.eat(J);)Pe++;var Ue=p.peek()||" ",et=!/\s/.test(Ue)&&(!N.test(Ue)||/\s/.test(Re)||N.test(Re)),xe=!/\s/.test(Re)&&(!N.test(Re)||/\s/.test(Ue)||N.test(Ue)),Ie=null,T=null;if(Pe%2&&(!c.em&&et&&(J==="*"||!xe||N.test(Re))?Ie=!0:c.em==J&&xe&&(J==="*"||!et||N.test(Ue))&&(Ie=!1)),Pe>1&&(!c.strong&&et&&(J==="*"||!xe||N.test(Re))?T=!0:c.strong==J&&xe&&(J==="*"||!et||N.test(Ue))&&(T=!1)),T!=null||Ie!=null){P.highlightFormatting&&(c.formatting=Ie==null?"strong":T==null?"em":"strong em"),Ie===!0&&(c.em=J),T===!0&&(c.strong=J);var de=q(c);return Ie===!1&&(c.em=!1),T===!1&&(c.strong=!1),de}}else if(J===" "&&(p.eat("*")||p.eat("_"))){if(p.peek()===" ")return q(c);p.backUp(1)}if(P.strikethrough){if(J==="~"&&p.eatWhile(J)){if(c.strikethrough){P.highlightFormatting&&(c.formatting="strikethrough");var de=q(c);return c.strikethrough=!1,de}else if(p.match(/^[^\s]/,!1))return c.strikethrough=!0,P.highlightFormatting&&(c.formatting="strikethrough"),q(c)}else if(J===" "&&p.match("~~",!0)){if(p.peek()===" ")return q(c);p.backUp(2)}}if(P.emoji&&J===":"&&p.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,P.highlightFormatting&&(c.formatting="emoji");var U=q(c);return c.emoji=!1,U}return J===" "&&(p.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),q(c)}function G(p,c){var te=p.next();if(te===">"){c.f=c.inline=M,P.highlightFormatting&&(c.formatting="link");var ke=q(c);return ke?ke+=" ":ke="",ke+b.linkInline}return p.match(/^[^>]+/,!0),b.linkInline}function d(p,c){if(p.eatSpace())return null;var te=p.next();return te==="("||te==="["?(c.f=c.inline=L(te==="("?")":"]"),P.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,q(c)):"error"}var S={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(p){return function(c,te){var ke=c.next();if(ke===p){te.f=te.inline=M,P.highlightFormatting&&(te.formatting="link-string");var J=q(te);return te.linkHref=!1,J}return c.match(S[p]),te.linkHref=!0,q(te)}}function m(p,c){return p.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=x,p.next(),P.highlightFormatting&&(c.formatting="link"),c.linkText=!0,q(c)):_(p,c,M)}function x(p,c){if(p.match("]:",!0)){c.f=c.inline=z,P.highlightFormatting&&(c.formatting="link");var te=q(c);return c.linkText=!1,te}return p.match(/^([^\]\\]|\\.)+/,!0),b.linkText}function z(p,c){return p.eatSpace()?null:(p.match(/^[^\s]+/,!0),p.peek()===void 0?c.linkTitle=!0:p.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=M,b.linkHref+" url")}var ne={startState:function(){return{f:ee,prevLine:{stream:null},thisLine:{stream:null},block:ee,htmlState:null,indentation:0,inline:M,text:Fe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(p){return{f:p.f,prevLine:p.prevLine,thisLine:p.thisLine,block:p.block,htmlState:p.htmlState&&C.copyState(fe,p.htmlState),indentation:p.indentation,localMode:p.localMode,localState:p.localMode?C.copyState(p.localMode,p.localState):null,inline:p.inline,text:p.text,formatting:!1,linkText:p.linkText,linkTitle:p.linkTitle,linkHref:p.linkHref,code:p.code,em:p.em,strong:p.strong,strikethrough:p.strikethrough,emoji:p.emoji,header:p.header,setext:p.setext,hr:p.hr,taskList:p.taskList,list:p.list,listStack:p.listStack.slice(0),quote:p.quote,indentedCode:p.indentedCode,trailingSpace:p.trailingSpace,trailingSpaceNewLine:p.trailingSpaceNewLine,md_inside:p.md_inside,fencedEndRE:p.fencedEndRE}},token:function(p,c){if(c.formatting=!1,p!=c.thisLine.stream){if(c.header=0,c.hr=!1,p.match(/^\s*$/,!0))return $(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:p},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=Ae)){var te=p.match(/^\s*/,!0)[0].replace(/\t/g,R).length;if(c.indentation=te,c.indentationDiff=null,te>0)return null}}return c.f(p,c)},innerMode:function(p){return p.block==Ae?{state:p.htmlState,mode:fe}:p.localState?{state:p.localState,mode:p.localMode}:{state:p,mode:ne}},indent:function(p,c,te){return p.block==Ae&&fe.indent?fe.indent(p.htmlState,c,te):p.localState&&p.localMode.indent?p.localMode.indent(p.localState,c,te):C.Pass},blankLine:$,getType:q,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ne},"xml"),C.defineMIME("text/markdown","markdown"),C.defineMIME("text/x-markdown","markdown")})})()),Ca.exports}Xu();var Fa={exports:{}},Ea;function Yu(){return Ea||(Ea=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineOption("placeholder","",function(W,j,oe){var w=oe&&oe!=C.Init;if(j&&!w)W.on("blur",Se),W.on("change",le),W.on("swapDoc",le),C.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){fe(W)}),le(W);else if(!j&&w){W.off("blur",Se),W.off("change",le),W.off("swapDoc",le),C.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),De(W);var B=W.getWrapperElement();B.className=B.className.replace(" CodeMirror-empty","")}j&&!W.hasFocus()&&Se(W)});function De(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function P(W){De(W);var j=W.state.placeholder=document.createElement("pre");j.style.cssText="height: 0; overflow: visible",j.style.direction=W.getOption("direction"),j.className="CodeMirror-placeholder CodeMirror-line-like";var oe=W.getOption("placeholder");typeof oe=="string"&&(oe=document.createTextNode(oe)),j.appendChild(oe),W.display.lineSpace.insertBefore(j,W.display.lineSpace.firstChild)}function fe(W){setTimeout(function(){var j=!1;if(W.lineCount()==1){var oe=W.getInputField();j=oe.nodeName=="TEXTAREA"?!W.getLine(0).length:!/[^\u200b]/.test(oe.querySelector(".CodeMirror-line").textContent)}j?P(W):De(W)},20)}function Se(W){b(W)&&P(W)}function le(W){var j=W.getWrapperElement(),oe=b(W);j.className=j.className.replace(" CodeMirror-empty","")+(oe?" CodeMirror-empty":""),oe?P(W):De(W)}function b(W){return W.lineCount()===1&&W.getLine(0)===""}})})()),Fa.exports}Yu();var Na={exports:{}},Oa;function Zu(){return Oa||(Oa=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineSimpleMode=function(w,B){C.defineMode(w,function(A){return C.simpleMode(A,B)})},C.simpleMode=function(w,B){De(B,"start");var A={},K=B.meta||{},ae=!1;for(var F in B)if(F!=K&&B.hasOwnProperty(F))for(var N=A[F]=[],R=B[F],_=0;_2&&Y.token&&typeof Y.token!="string"){for(var ee=2;ee-1)return C.Pass;var F=A.indent.length-1,N=w[A.state];e:for(;;){for(var R=0;R",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function Se(w){return w&&w.bracketRegex||/[(){}[\]]/}function le(w,B,A){var K=w.getLineHandle(B.line),ae=B.ch-1,F=A&&A.afterCursor;F==null&&(F=/(^| )cm-fat-cursor($| )/.test(w.getWrapperElement().className));var N=Se(A),R=!F&&ae>=0&&N.test(K.text.charAt(ae))&&fe[K.text.charAt(ae)]||N.test(K.text.charAt(ae+1))&&fe[K.text.charAt(++ae)];if(!R)return null;var _=R.charAt(1)==">"?1:-1;if(A&&A.strict&&_>0!=(ae==B.ch))return null;var Y=w.getTokenTypeAt(P(B.line,ae+1)),ce=b(w,P(B.line,ae+(_>0?1:0)),_,Y,A);return ce==null?null:{from:P(B.line,ae),to:ce&&ce.pos,match:ce&&ce.ch==R.charAt(0),forward:_>0}}function b(w,B,A,K,ae){for(var F=ae&&ae.maxScanLineLength||1e4,N=ae&&ae.maxScanLines||1e3,R=[],_=Se(ae),Y=A>0?Math.min(B.line+N,w.lastLine()+1):Math.max(w.firstLine()-1,B.line-N),ce=B.line;ce!=Y;ce+=A){var $=w.getLine(ce);if($){var ee=A>0?0:$.length-1,Ae=A>0?$.length:-1;if(!($.length>F))for(ce==B.line&&(ee=B.ch-(A<0?1:0));ee!=Ae;ee+=A){var se=$.charAt(ee);if(_.test(se)&&(K===void 0||(w.getTokenTypeAt(P(ce,ee+1))||"")==(K||""))){var q=fe[se];if(q&&q.charAt(1)==">"==A>0)R.push(se);else if(R.length)R.pop();else return{pos:P(ce,ee),ch:se}}}}}return ce-A==(A>0?w.lastLine():w.firstLine())?!1:null}function W(w,B,A){for(var K=w.state.matchBrackets.maxHighlightLineLength||1e3,ae=A&&A.highlightNonMatching,F=[],N=w.listSelections(),R=0;R`,triples:"",explode:"[]{}"},P=C.Pos;C.defineOption("autoCloseBrackets",!1,function(F,N,R){R&&R!=C.Init&&(F.removeKeyMap(Se),F.state.closeBrackets=null),N&&(le(fe(N,"pairs")),F.state.closeBrackets=N,F.addKeyMap(Se))});function fe(F,N){return N=="pairs"&&typeof F=="string"?F:typeof F=="object"&&F[N]!=null?F[N]:De[N]}var Se={Backspace:j,Enter:oe};function le(F){for(var N=0;N=0;Y--){var $=_[Y].head;F.replaceRange("",P($.line,$.ch-1),P($.line,$.ch+1),"+delete")}}function oe(F){var N=W(F),R=N&&fe(N,"explode");if(!R||F.getOption("disableInput"))return C.Pass;for(var _=F.listSelections(),Y=0;Y<_.length;Y++){if(!_[Y].empty())return C.Pass;var ce=K(F,_[Y].head);if(!ce||R.indexOf(ce)%2!=0)return C.Pass}F.operation(function(){var $=F.lineSeparator()||` `;F.replaceSelection($+$,null),w(F,-1),_=F.listSelections();for(var ee=0;ee<_.length;ee++){var Ae=_[ee].head.line;F.indentLine(Ae,null,!0),F.indentLine(Ae+1,null,!0)}})}function w(F,N){for(var R=[],_=F.listSelections(),Y=0,ce=0;ce<_.length;ce++){var $=_[ce];$.head==F.getCursor()&&(Y=ce);var ee=$.head.ch||N>0?{line:$.head.line,ch:$.head.ch+N}:{line:$.head.line-1};R.push({anchor:ee,head:ee})}F.setSelections(R,Y)}function B(F){var N=C.cmpPos(F.anchor,F.head)>0;return{anchor:new P(F.anchor.line,F.anchor.ch+(N?-1:1)),head:new P(F.head.line,F.head.ch+(N?1:-1))}}function A(F,N){var R=W(F);if(!R||F.getOption("disableInput"))return C.Pass;var _=fe(R,"pairs"),Y=_.indexOf(N);if(Y==-1)return C.Pass;for(var ce=fe(R,"closeBefore"),$=fe(R,"triples"),ee=_.charAt(Y+1)==N,Ae=F.listSelections(),se=Y%2==0,q,Fe=0;Fe=0&&F.getRange(G,P(G.line,G.ch+3))==N+N+N?d="skipThree":d="skip";else if(ee&&G.ch>1&&$.indexOf(N)>=0&&F.getRange(P(G.line,G.ch-2),G)==N+N){if(G.ch>2&&/\bstring/.test(F.getTokenTypeAt(P(G.line,G.ch-2))))return C.Pass;d="addFour"}else if(ee){var L=G.ch==0?" ":F.getRange(P(G.line,G.ch-1),G);if(!C.isWordChar(S)&&L!=N&&!C.isWordChar(L))d="both";else return C.Pass}else if(se&&(S.length===0||/\s/.test(S)||ce.indexOf(S)>-1))d="both";else return C.Pass;if(!q)q=d;else if(q!=d)return C.Pass}var m=Y%2?_.charAt(Y-1):N,x=Y%2?N:_.charAt(Y+1);F.operation(function(){if(q=="skip")w(F,1);else if(q=="skipThree")w(F,3);else if(q=="surround"){for(var z=F.getSelections(),ne=0;ne