12345678910111213141516171819202122232425262728 |
- var Hu=Object.defineProperty;var rs=Object.getOwnPropertySymbols;var Bu=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable;var ns=(jt,Lt,We)=>Lt in jt?Hu(jt,Lt,{enumerable:!0,configurable:!0,writable:!0,value:We}):jt[Lt]=We,is=(jt,Lt)=>{for(var We in Lt||(Lt={}))Bu.call(Lt,We)&&ns(jt,We,Lt[We]);if(rs)for(var We of rs(Lt))Vu.call(Lt,We)&&ns(jt,We,Lt[We]);return jt};var mn=(jt,Lt,We)=>new Promise((Pi,Qn)=>{var ji=$t=>{try{vn(We.next($t))}catch(yn){Qn(yn)}},gn=$t=>{try{vn(We.throw($t))}catch(yn){Qn(yn)}},vn=$t=>$t.done?Pi($t.value):Promise.resolve($t.value).then(ji,gn);vn((We=We.apply(jt,Lt)).next())});import{c0 as $u,bX as Ru,d as Oi,r as os,B as Ku,bY as Uu,j as Eo,p as as,a6 as ls,u as ss,n as Gu,ah as Yu,o as Do,l as cs,A as us,aE as Qu,e as ds,b as Xu,f as Ju,c as Zu,ax as ps,__tla as ed}from"./index-fd0fd824.js";import{u as td,__tla as rd}from"./useWindowSizeFn-0280681a.js";let fs,hs,Mr,nd=Promise.all([(()=>{try{return ed}catch(jt){}})(),(()=>{try{return rd}catch(jt){}})()]).then(()=>mn(void 0,null,function*(){var jt={exports:{}},Lt;function We(){return Lt||(Lt=1,function(g,X){(function(m,R){g.exports=R()})($u,function(){var m=navigator.userAgent,R=navigator.platform,W=/gecko\/\d/i.test(m),pe=/MSIE \d/.test(m),D=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(m),q=/Edge\/(\d+)/.exec(m),x=pe||D||q,re=x&&(pe?document.documentMode||6:+(q||D)[1]),I=!q&&/WebKit\//.test(m),ne=I&&/Qt\/\d+\.\d+/.test(m),E=!q&&/Chrome\/(\d+)/.exec(m),Q=E&&+E[1],H=/Opera\//.test(m),Y=/Apple Computer/.test(navigator.vendor),ye=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(m),ue=/PhantomJS/.test(m),J=Y&&(/Mobile\/\w+/.test(m)||navigator.maxTouchPoints>2),N=/Android/.test(m),B=J||N||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(m),G=J||/Mac/.test(R),se=/\bCrOS\b/.test(m),he=/win/i.test(R),fe=H&&m.match(/Version\/(\d*\.\d*)/);fe&&(fe=Number(fe[1])),fe&&fe>=15&&(H=!1,I=!0);var A=G&&(ne||H&&(fe==null||fe<12.11)),w=W||x&&re>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T=function(e,t){var n=e.className,r=L(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 b(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function M(e,t){return b(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.length;++o)i.appendChild(t[o]);return i}function U(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var K;document.createRange?K=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:K=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function ve(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function Ae(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch(r){n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function Ve(e,t){var n=e.className;L(t).test(n)||(e.className+=(n?" ":"")+t)}function _t(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!L(n[r]).test(t)&&(t+=" "+n[r]);return t}var Wt=function(e){e.select()};J?Wt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:x&&(Wt=function(e){try{e.select()}catch(t){}});function nt(e){return e.display.wrapper.ownerDocument}function He(e){return je(e.display.wrapper)}function je(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function Se(e){return nt(e).defaultView}function Le(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function oe(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Pe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}var Ne=function(){this.id=null,this.f=null,this.time=0,this.handler=Le(this.onTimeout,this)};Ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ne.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function be(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ye=50,gt={toString:function(){return"CodeMirror.Pass"}},ge={scroll:!1},Xe={origin:"*mouse"},De={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var v=[""];function k(e){for(;v.length<=e;)v.push(ie(v)+" ");return v[e]}function ie(e){return e[e.length-1]}function qe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function z(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function Z(){}function j(e,t){var n;return Object.create?n=Object.create(e):(Z.prototype=e,n=new Z),t&&oe(t,n),n}var Ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ke(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ee.test(e))}function Ue(e,t){return t?t.source.indexOf("\\w")>-1&&Ke(e)?!0:t.test(e):Ke(e)}function vt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var S=/[\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 y(e){return e.charCodeAt(0)>=768&&S.test(e)}function V(e,t,n){for(;(n<0?t>0:t<e.length)&&y(e.charAt(t));)t+=n;return t}function we(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function Je(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),a.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var st=null;function Ht(e,t,n){var r;st=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:st=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:st=i)}return r!=null?r:st}var Et=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(c){return c<=247?e.charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?t.charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":c==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(c,p,h){this.level=c,this.from=p,this.to=h}return function(c,p){var h=p=="ltr"?"L":"R";if(c.length==0||p=="ltr"&&!r.test(c))return!1;for(var C=c.length,_=[],P=0;P<C;++P)_.push(n(c.charCodeAt(P)));for(var $=0,te=h;$<C;++$){var ae=_[$];ae=="m"?_[$]=te:te=ae}for(var de=0,le=h;de<C;++de){var me=_[de];me=="1"&&le=="r"?_[de]="n":o.test(me)&&(le=me,me=="r"&&(_[de]="R"))}for(var ke=1,_e=_[0];ke<C-1;++ke){var Oe=_[ke];Oe=="+"&&_e=="1"&&_[ke+1]=="1"?_[ke]="1":Oe==","&&_e==_[ke+1]&&(_e=="1"||_e=="n")&&(_[ke]=_e),_e=Oe}for(var $e=0;$e<C;++$e){var ft=_[$e];if(ft==",")_[$e]="N";else if(ft=="%"){var Qe=void 0;for(Qe=$e+1;Qe<C&&_[Qe]=="%";++Qe);for(var It=$e&&_[$e-1]=="!"||Qe<C&&_[Qe]=="1"?"1":"N",At=$e;At<Qe;++At)_[At]=It;$e=Qe-1}}for(var ot=0,Ot=h;ot<C;++ot){var mt=_[ot];Ot=="L"&&mt=="1"?_[ot]="L":o.test(mt)&&(Ot=mt)}for(var lt=0;lt<C;++lt)if(i.test(_[lt])){var at=void 0;for(at=lt+1;at<C&&i.test(_[at]);++at);for(var rt=(lt?_[lt-1]:h)=="L",Pt=(at<C?_[at]:h)=="L",fn=rt==Pt?rt?"L":"R":h,zr=lt;zr<at;++zr)_[zr]=fn;lt=at-1}for(var kt=[],ar,ht=0;ht<C;)if(a.test(_[ht])){var Po=ht;for(++ht;ht<C&&a.test(_[ht]);++ht);kt.push(new s(0,Po,ht))}else{var hr=ht,Ir=kt.length,Fr=p=="rtl"?1:0;for(++ht;ht<C&&_[ht]!="L";++ht);for(var Ct=hr;Ct<ht;)if(l.test(_[Ct])){hr<Ct&&(kt.splice(Ir,0,new s(1,hr,Ct)),Ir+=Fr);var hn=Ct;for(++Ct;Ct<ht&&l.test(_[Ct]);++Ct);kt.splice(Ir,0,new s(2,hn,Ct)),Ir+=Fr,hr=Ct}else++Ct;hr<ht&&kt.splice(Ir,0,new s(1,hr,ht))}return p=="ltr"&&(kt[0].level==1&&(ar=c.match(/^\s+/))&&(kt[0].from=ar[0].length,kt.unshift(new s(0,0,ar[0].length))),ie(kt).level==1&&(ar=c.match(/\s+$/))&&(ie(kt).to-=ar[0].length,kt.push(new s(0,C-ar[0].length,C)))),p=="rtl"?kt.reverse():kt}}();function Me(e,t){var n=e.order;return n==null&&(n=e.order=Et(e.text,t)),n}var yt=[],Ce=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||yt).concat(n)}};function lr(e,t){return e._handlers&&e._handlers[t]||yt}function bt(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=be(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ze(e,t){var n=lr(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function et(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,n||t.type,e,t),zt(t)||t.codemirrorIgnore}function Rt(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)be(n,t[r])==-1&&n.push(t[r])}function Dt(e,t){return lr(e,t).length>0}function Ut(e){e.prototype.on=function(t,n){Ce(this,t,n)},e.prototype.off=function(t,n){bt(this,t,n)}}function xt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Wr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function mr(e){xt(e),Wr(e)}function bn(e){return e.target||e.srcElement}function Gt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),G&&e.ctrlKey&&t==1&&(t=3),t}var Fi=function(){if(x&&re<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Hr;function ei(e){if(Hr==null){var t=d("span","\u200B");M(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Hr=t.offsetWidth<=1&&t.offsetHeight>2&&!(x&&re<8))}var n=Hr?d("span","\u200B"):d("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var xn;function gr(e){if(xn!=null)return xn;var t=M(e,document.createTextNode("A\u062EA")),n=K(t,0,1).getBoundingClientRect(),r=K(t,1,2).getBoundingClientRect();return b(e),!n||n.left==n.right?!1:xn=r.right-n.right<3}var Kt=`
- 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),a=o.indexOf("\r");a!=-1?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},vr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Yt=null;function Wi(e){if(Yt!=null)return Yt;var t=M(e,d("span","x")),n=t.getBoundingClientRect(),r=K(t,0,1).getBoundingClientRect();return Yt=Math.abs(n.left-r.left)>1}var Br={},Qt={};function Xt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Br[e]=t}function Vr(e,t){Qt[e]=t}function $r(e){if(typeof e=="string"&&Qt.hasOwnProperty(e))e=Qt[e];else if(e&&typeof e.name=="string"&&Qt.hasOwnProperty(e.name)){var t=Qt[e.name];typeof t=="string"&&(t={name:t}),e=j(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return $r("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return $r("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Rr(e,t){t=$r(t);var n=Br[t.name];if(!n)return Rr(e,"text/plain");var r=n(e,t);if(yr.hasOwnProperty(t.name)){var i=yr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var yr={};function Kr(e,t){var n=yr.hasOwnProperty(e)?yr[e]:yr[e]={};oe(t,n)}function rr(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 wn(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 Ur(e,t,n){return e.startState?e.startState(t,n):!0}var tt=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};tt.prototype.eol=function(){return this.pos>=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},tt.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},tt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},tt.prototype.indentation=function(){return Pe(this.string,null,this.tabSize)-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},tt.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(a){return n?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function xe(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<o){n=i;break}t-=o}return n.lines[t]}function sr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var a=o.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function kn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Bt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function u(e){if(e.parent==null)return null;for(var t=e.parent,n=be(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function f(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return n+a}function F(e,t){return t>=e.first&&t<e.first+e.size}function ee(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function O(e,t,n){if(n===void 0&&(n=null),!(this instanceof O))return new O(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ce(e,t){return e.line-t.line||e.ch-t.ch}function Ie(e,t){return e.sticky==t.sticky&&ce(e,t)==0}function ct(e){return O(e.line,e.ch)}function Mt(e,t){return ce(e,t)<0?t:e}function Gr(e,t){return ce(e,t)<0?e:t}function na(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Te(e,t){if(t.line<e.first)return O(e.first,0);var n=e.first+e.size-1;return t.line>n?O(n,xe(e,n).text.length):Bs(t,xe(e,t.line).text.length)}function Bs(e,t){var n=e.ch;return n==null||n>t?O(e.line,t):n<0?O(e.line,0):e}function ia(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Te(e,t[r]);return n}var ri=function(e,t){this.state=e,this.lookAhead=t},nr=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};nr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},nr.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}},nr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},nr.fromSaved=function(e,t,n){return t instanceof ri?new nr(e,rr(e.mode,t.state),n,t.lookAhead):new nr(e,rr(e.mode,t),n)},nr.prototype.save=function(e){var t=e!==!1?rr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ri(t,this.maxLookAhead):t};function oa(e,t,n,r){var i=[e.state.modeGen],o={};da(e,t.text,e.doc.mode,n,function(c,p){return i.push(c,p)},o,r);for(var a=n.state,l=function(c){n.baseTokens=i;var p=e.state.overlays[c],h=1,C=0;n.state=!0,da(e,t.text,p.mode,n,function(_,P){for(var $=h;C<_;){var te=i[h];te>_&&i.splice(h,1,_,i[h+1],te),h+=2,C=Math.min(_,te)}if(P)if(p.opaque)i.splice($,h-$,_,"overlay "+P),h=$+2;else for(;$<h;$+=2){var ae=i[$+1];i[$+1]=(ae?ae+" ":"")+"overlay "+P}},o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function aa(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=_n(e,u(t)),i=t.text.length>e.options.maxHighlightLength&&rr(e.doc.mode,r.state),o=oa(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 _n(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new nr(r,!0,t);var o=Vs(e,t,n),a=o>r.first&&xe(r,o-1).stateAfter,l=a?nr.fromSaved(r,a,o):new nr(r,Ur(r.mode),o);return r.iter(o,t,function(s){Hi(e,s.text,l);var c=l.line;s.stateAfter=c==t-1||c%5==0||c>=i.viewFrom&&c<i.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function Hi(e,t,n,r){var i=e.doc.mode,o=new tt(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&la(i,n.state);!o.eol();)Bi(i,o,n.state),o.start=o.pos}function la(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=wn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Bi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=wn(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var sa=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ca(e,t,n,r){var i=e.doc,o=i.mode,a;t=Te(i,t);var l=xe(i,t.line),s=_n(e,t.line,n),c=new tt(l.text,e.options.tabSize,s),p;for(r&&(p=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,a=Bi(o,c,s.state),r&&p.push(new sa(c,a,rr(i.mode,s.state)));return r?p:new sa(c,a,s.state)}function ua(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function da(e,t,n,r,i,o,a){var l=n.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,c=null,p=new tt(t,e.options.tabSize,r),h,C=e.options.addModeClass&&[null];for(t==""&&ua(la(n,r.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,a&&Hi(e,t,r,p.pos),p.pos=t.length,h=null):h=ua(Bi(n,p,r.state,C),o),C){var _=C[0].name;_&&(h="m-"+(h?_+" "+h:_))}if(!l||c!=h){for(;s<p.start;)s=Math.min(p.start,s+5e3),i(s,c);c=h}p.start=p.pos}for(;s<p.pos;){var P=Math.min(p.pos,s+5e3);i(P,c),s=P}}function Vs(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=xe(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof ri?c.lookAhead:0)<=o.modeFrontier))return l;var p=Pe(s.text,null,e.options.tabSize);(i==null||r>p)&&(i=l-1,r=p)}return i}function $s(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=xe(e,r).stateAfter;if(i&&(!(i instanceof ri)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var pa=!1,cr=!1;function Rs(){pa=!0}function Ks(){cr=!0}function ni(e,t,n){this.marker=e,this.from=t,this.to=n}function Sn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Us(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Gs(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ys(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new ni(a,o.from,s?null:o.to))}}return r}function Qs(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new ni(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function Vi(e,t){if(t.full)return null;var n=F(e,t.from.line)&&xe(e,t.from.line).markedSpans,r=F(e,t.to.line)&&xe(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=ce(t.from,t.to)==0,l=Ys(n,i,a),s=Qs(r,o,a),c=t.text.length==1,p=ie(t.text).length+(c?i:0);if(l)for(var h=0;h<l.length;++h){var C=l[h];if(C.to==null){var _=Sn(s,C.marker);_?c&&(C.to=_.to==null?null:_.to+p):C.to=i}}if(s)for(var P=0;P<s.length;++P){var $=s[P];if($.to!=null&&($.to+=p),$.from==null){var te=Sn(l,$.marker);te||($.from=p,c&&(l||(l=[])).push($))}else $.from+=p,c&&(l||(l=[])).push($)}l&&(l=fa(l)),s&&s!=l&&(s=fa(s));var ae=[l];if(!c){var de=t.text.length-2,le;if(de>0&&l)for(var me=0;me<l.length;++me)l[me].to==null&&(le||(le=[])).push(new ni(l[me].marker,null,null));for(var ke=0;ke<de;++ke)ae.push(le);ae.push(s)}return ae}function fa(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Xs(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(_){if(_.markedSpans)for(var P=0;P<_.markedSpans.length;++P){var $=_.markedSpans[P].marker;$.readOnly&&(!r||be(r,$)==-1)&&(r||(r=[])).push($)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(ce(c.to,l.from)<0||ce(c.from,l.to)>0)){var p=[s,1],h=ce(c.from,l.from),C=ce(c.to,l.to);(h<0||!a.inclusiveLeft&&!h)&&p.push({from:c.from,to:l.from}),(C>0||!a.inclusiveRight&&!C)&&p.push({from:l.to,to:c.to}),i.splice.apply(i,p),s+=p.length-3}}return i}function ha(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ma(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function ii(e){return e.inclusiveLeft?-1:0}function oi(e){return e.inclusiveRight?1:0}function $i(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=ce(r.from,i.from)||ii(e)-ii(t);if(o)return-o;var a=ce(r.to,i.to)||oi(e)-oi(t);return a||t.id-e.id}function ga(e,t){var n=cr&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||$i(r,i.marker)<0)&&(r=i.marker);return r}function va(e){return ga(e,!0)}function ai(e){return ga(e,!1)}function Js(e,t){var n=cr&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||$i(r,o.marker)<0)&&(r=o.marker)}return r}function ya(e,t,n,r,i){var o=xe(e,t),a=cr&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),p=ce(c.from,n)||ii(s.marker)-ii(i),h=ce(c.to,r)||oi(s.marker)-oi(i);if(!(p>=0&&h<=0||p<=0&&h>=0)&&(p<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ce(c.to,n)>=0:ce(c.to,n)>0)||p>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ce(c.from,r)<=0:ce(c.from,r)<0)))return!0}}}function Jt(e){for(var t;t=va(e);)e=t.find(-1,!0).line;return e}function Zs(e){for(var t;t=ai(e);)e=t.find(1,!0).line;return e}function ec(e){for(var t,n;t=ai(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ri(e,t){var n=xe(e,t),r=Jt(n);return n==r?t:u(r)}function ba(e,t){if(t>e.lastLine())return t;var n=xe(e,t),r;if(!br(e,n))return t;for(;r=ai(n);)n=r.find(1,!0).line;return u(n)+1}function br(e,t){var n=cr&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed&&(r.from==null||!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Ki(e,t,r)))return!0}}function Ki(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Ki(e,r.line,Sn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ki(e,t,i))return!0}function ur(e){e=Jt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function li(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=va(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=ai(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function Ui(e){var t=e.display,n=e.doc;t.maxLine=xe(n,n.first),t.maxLineLength=li(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=li(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Yr=function(e,t,n){this.text=e,ma(this,t),this.height=n?n(this):1};Yr.prototype.lineNo=function(){return u(this)},Ut(Yr);function tc(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ha(e),ma(e,n);var i=r?r(e):1;i!=e.height&&Bt(e,i)}function rc(e){e.parent=null,ha(e)}var nc={},ic={};function xa(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ic:nc;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function wa(e,t){var n=U("span",null,null,I?"padding-right: .1px":null),r={pre:U("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,a=void 0;r.pos=0,r.addToken=ac,gr(e.display.measure)&&(a=Me(o,e.doc.direction))&&(r.addToken=sc(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&u(o);cc(o,r,aa(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_t(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_t(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ei(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(I){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 Ze(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=_t(r.pre.className,r.textClass||"")),r}function oc(e){var t=d("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ac(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?lc(t,e.trailingSpace):t,s=e.cm.state.specialChars,c=!1,p;if(!s.test(t))e.col+=t.length,p=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,p),x&&re<9&&(c=!0),e.pos+=t.length;else{p=document.createDocumentFragment();for(var h=0;;){s.lastIndex=h;var C=s.exec(t),_=C?C.index-h:t.length-h;if(_){var P=document.createTextNode(l.slice(h,h+_));x&&re<9?p.appendChild(d("span",[P])):p.appendChild(P),e.map.push(e.pos,e.pos+_,P),e.col+=_,e.pos+=_}if(!C)break;h+=_+1;var $=void 0;if(C[0]==" "){var te=e.cm.options.tabSize,ae=te-e.col%te;$=p.appendChild(d("span",k(ae),"cm-tab")),$.setAttribute("role","presentation"),$.setAttribute("cm-text"," "),e.col+=ae}else C[0]=="\r"||C[0]==`
- `?($=p.appendChild(d("span",C[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$.setAttribute("cm-text",C[0]),e.col+=1):($=e.cm.options.specialCharPlaceholder(C[0]),$.setAttribute("cm-text",C[0]),x&&re<9?p.appendChild(d("span",[$])):p.appendChild($),e.col+=1);e.map.push(e.pos,e.pos+1,$),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||c||o||a){var de=n||"";r&&(de+=r),i&&(de+=i);var le=d("span",[p],de,o);if(a)for(var me in a)a.hasOwnProperty(me)&&me!="style"&&me!="class"&&le.setAttribute(me,a[me]);return e.content.appendChild(le)}e.content.appendChild(p)}}function lc(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),r+=o,n=o==" "}return r}function sc(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,p=c+r.length;;){for(var h=void 0,C=0;C<t.length&&(h=t[C],!(h.to>c&&h.from<=c));C++);if(h.to>=p)return e(n,r,i,o,a,l,s);e(n,r.slice(0,h.to-c),i,o,null,l,s),o=null,r=r.slice(h.to-c),c=h.to}}}function ka(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 cc(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var a=1;a<n.length;a+=2)t.addToken(t,i.slice(o,o=n[a]),xa(n[a+1],t.cm.options));return}for(var l=i.length,s=0,c=1,p="",h,C,_=0,P,$,te,ae,de;;){if(_==s){P=$=te=C="",de=null,ae=null,_=1/0;for(var le=[],me=void 0,ke=0;ke<r.length;++ke){var _e=r[ke],Oe=_e.marker;if(Oe.type=="bookmark"&&_e.from==s&&Oe.widgetNode)le.push(Oe);else if(_e.from<=s&&(_e.to==null||_e.to>s||Oe.collapsed&&_e.to==s&&_e.from==s)){if(_e.to!=null&&_e.to!=s&&_>_e.to&&(_=_e.to,$=""),Oe.className&&(P+=" "+Oe.className),Oe.css&&(C=(C?C+";":"")+Oe.css),Oe.startStyle&&_e.from==s&&(te+=" "+Oe.startStyle),Oe.endStyle&&_e.to==_&&(me||(me=[])).push(Oe.endStyle,_e.to),Oe.title&&((de||(de={})).title=Oe.title),Oe.attributes)for(var $e in Oe.attributes)(de||(de={}))[$e]=Oe.attributes[$e];Oe.collapsed&&(!ae||$i(ae.marker,Oe)<0)&&(ae=_e)}else _e.from>s&&_>_e.from&&(_=_e.from)}if(me)for(var ft=0;ft<me.length;ft+=2)me[ft+1]==_&&($+=" "+me[ft]);if(!ae||ae.from==s)for(var Qe=0;Qe<le.length;++Qe)ka(t,0,le[Qe]);if(ae&&(ae.from||0)==s){if(ka(t,(ae.to==null?l+1:ae.to)-s,ae.marker,ae.from==null),ae.to==null)return;ae.to==s&&(ae=!1)}}if(s>=l)break;for(var It=Math.min(l,_);;){if(p){var At=s+p.length;if(!ae){var ot=At>It?p.slice(0,It-s):p;t.addToken(t,ot,h?h+P:P,te,s+ot.length==_?$:"",C,de)}if(At>=It){p=p.slice(It-s),s=It;break}s=At,te=""}p=i.slice(o,o=n[c++]),h=xa(n[c++],t.cm.options)}}}function _a(e,t,n){this.line=t,this.rest=ec(t),this.size=this.rest?u(ie(this.rest))-n+1:1,this.node=this.text=null,this.hidden=br(e,t)}function si(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new _a(e.doc,xe(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Qr=null;function uc(e){Qr?Qr.ops.push(e):e.ownsGroup=Qr={ops:[e],delayedCallbacks:[]}}function dc(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function pc(e,t){var n=e.ownsGroup;if(n)try{dc(n)}finally{Qr=null,t(n)}}var Cn=null;function ut(e,t){var n=lr(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Qr?i=Qr.delayedCallbacks:Cn?i=Cn:(i=Cn=[],setTimeout(fc,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function fc(){var e=Cn;Cn=null;for(var t=0;t<e.length;++t)e[t]()}function Sa(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?mc(e,t):o=="gutter"?La(e,t,n,r):o=="class"?Gi(e,t):o=="widget"&&gc(e,t,r)}t.changes=null}function Ln(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),x&&re<8&&(e.node.style.zIndex=2)),e.node}function hc(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Ln(t);t.background=r.insertBefore(d("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Ca(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):wa(e,t)}function mc(e,t){var n=t.text.className,r=Ca(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Gi(e,t)):n&&(t.text.className=n)}function Gi(e,t){hc(e,t),t.line.wrapClass?Ln(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function La(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Ln(t);t.gutterBackground=d("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=Ln(t),l=t.gutter=d("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(d("div",ee(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,p=o.hasOwnProperty(c)&&o[c];p&&l.appendChild(d("div",[p],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gc(e,t,n){t.alignable&&(t.alignable=null);for(var r=L("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);za(e,t,n)}function vc(e,t,n,r){var i=Ca(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Gi(e,t),La(e,t,n,r),za(e,t,r),t.node}function za(e,t,n){if(Ma(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Ma(e,t.rest[r],t,n,!1)}function Ma(e,t,n,r,i){if(t.widgets)for(var o=Ln(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=d("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),yc(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ut(s,"redraw")}}function yc(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function zn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!ve(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),M(t.display.measure,d("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function dr(e,t){for(var n=bn(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function ci(e){return e.lineSpace.offsetTop}function Yi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Na(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=M(e.measure,d("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function ir(e){return Ye-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-ir(e)-e.display.barWidth}function Qi(e){return e.display.scroller.clientHeight-ir(e)-e.display.barHeight}function bc(e,t,n){var r=e.options.lineWrapping,i=r&&Tr(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ta(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(u(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function xc(e,t){t=Jt(t);var n=u(t),r=e.display.externalMeasured=new _a(e.doc,t,n);r.lineN=n;var i=r.built=wa(e,r);return r.text=i.pre,M(e.display.lineMeasure,i.pre),r}function Aa(e,t,n,r){return or(e,Xr(e,t),n,r)}function Xi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Pr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Xr(e,t){var n=u(t),r=Xi(e,n);r&&!r.text?r=null:r&&r.changes&&(Sa(e,r,n,ro(e)),e.curOp.forceUpdate=!0),r||(r=xc(e,t));var i=Ta(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function or(e,t,n,r,i){t.before&&(n=-1);var o=n+(r||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(bc(e,t.view,t.rect),t.hasHeights=!0),a=kc(e,t,n,r),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var Oa={left:0,right:0,top:0,bottom:0};function Pa(e,t,n){for(var r,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),n=="left"&&i==0)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[(c-=3)+2],a="left";if(n=="right"&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function wc(e,t){var n=Oa;if(t=="left")for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function kc(e,t,n,r){var i=Pa(t.map,n,r),o=i.node,a=i.start,l=i.end,s=i.collapse,c;if(o.nodeType==3){for(var p=0;p<4;p++){for(;a&&y(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&y(t.line.text.charAt(i.coverStart+l));)++l;if(x&&re<9&&a==0&&l==i.coverEnd-i.coverStart?c=o.parentNode.getBoundingClientRect():c=wc(K(o,a,l).getClientRects(),r),c.left||c.right||a==0)break;l=a,a=a-1,s="right"}x&&re<11&&(c=_c(e.display.measure,c))}else{a>0&&(s=r="right");var h;e.options.lineWrapping&&(h=o.getClientRects()).length>1?c=h[r=="right"?h.length-1:0]:c=o.getBoundingClientRect()}if(x&&re<9&&!a&&(!c||!c.left&&!c.right)){var C=o.parentNode.getClientRects()[0];C?c={left:C.left,right:C.left+Zr(e.display),top:C.top,bottom:C.bottom}:c=Oa}for(var _=c.top-t.rect.top,P=c.bottom-t.rect.top,$=(_+P)/2,te=t.view.measure.heights,ae=0;ae<te.length-1&&!($<te[ae]);ae++);var de=ae?te[ae-1]:0,le=te[ae],me={left:(s=="right"?c.right:c.left)-t.rect.left,right:(s=="left"?c.left:c.right)-t.rect.left,top:de,bottom:le};return!c.left&&!c.right&&(me.bogus=!0),e.options.singleCursorHeightPerLine||(me.rtop=_,me.rbottom=P),me}function _c(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Wi(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function ja(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Ea(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ja(e.display.view[t])}function Mn(e){Ea(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Da(e){return E&&N?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function qa(e){return E&&N?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Ji(e){var t=Jt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=zn(n[i]));return r}function ui(e,t,n,r,i){if(!i){var o=Ji(t);n.top+=o,n.bottom+=o}if(r=="line")return n;r||(r="local");var a=ur(t);if(r=="local"?a+=ci(e.display):a-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(r=="window"?0:qa(nt(e)));var s=l.left+(r=="window"?0:Da(nt(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Ia(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=Da(nt(e)),i-=qa(nt(e));else if(n=="local"||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function di(e,t,n,r,i){return r||(r=xe(e.doc,t.line)),ui(e,r,Aa(e,r,t.ch,i),n)}function Zt(e,t,n,r,i,o){r=r||xe(e.doc,t.line),i||(i=Xr(e,r));function a(P,$){var te=or(e,i,P,$?"right":"left",o);return $?te.left=te.right:te.right=te.left,ui(e,r,te,n)}var l=Me(r,e.doc.direction),s=t.ch,c=t.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a(c=="before"?s-1:s,c=="before");function p(P,$,te){var ae=l[$],de=ae.level==1;return a(te?P-1:P,de!=te)}var h=Ht(l,s,c),C=st,_=p(s,h,c=="before");return C!=null&&(_.other=p(s,C,c!="before")),_}function Fa(e,t){var n=0;t=Te(e.doc,t),e.options.lineWrapping||(n=Zr(e.display)*t.ch);var r=xe(e.doc,t.line),i=ur(r)+ci(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Zi(e,t,n,r,i){var o=O(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function eo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Zi(r.first,0,null,-1,-1);var i=f(r,n),o=r.first+r.size-1;if(i>o)return Zi(r.first+r.size-1,xe(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=xe(r,i);;){var l=Sc(e,a,i,t,n),s=Js(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=xe(r,i=c.line)}}function Wa(e,t,n,r){r-=Ji(t);var i=t.text.length,o=we(function(a){return or(e,n,a-1).bottom<=r},i,0);return i=we(function(a){return or(e,n,a).top>r},o,i),{begin:o,end:i}}function Ha(e,t,n,r){n||(n=Xr(e,t));var i=ui(e,t,or(e,n,r),"line").top;return Wa(e,t,n,i)}function to(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Sc(e,t,n,r,i){i-=ur(t);var o=Xr(e,t),a=Ji(t),l=0,s=t.text.length,c=!0,p=Me(t,e.doc.direction);if(p){var h=(e.options.lineWrapping?Lc:Cc)(e,t,n,o,p,r,i);c=h.level!=1,l=c?h.from:h.to-1,s=c?h.to:h.from-1}var C=null,_=null,P=we(function(ke){var _e=or(e,o,ke);return _e.top+=a,_e.bottom+=a,to(_e,r,i,!1)?(_e.top<=i&&_e.left<=r&&(C=ke,_=_e),!0):!1},l,s),$,te,ae=!1;if(_){var de=r-_.left<_.right-r,le=de==c;P=C+(le?0:1),te=le?"after":"before",$=de?_.left:_.right}else{!c&&(P==s||P==l)&&P++,te=P==0?"after":P==t.text.length?"before":or(e,o,P-(c?1:0)).bottom+a<=i==c?"after":"before";var me=Zt(e,O(n,P,te),"line",t,o);$=me.left,ae=i<me.top?-1:i>=me.bottom?1:0}return P=V(t.text,P,1),Zi(n,P,te,ae,r-$)}function Cc(e,t,n,r,i,o,a){var l=we(function(h){var C=i[h],_=C.level!=1;return to(Zt(e,O(n,_?C.to:C.from,_?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=s.level!=1,p=Zt(e,O(n,c?s.from:s.to,c?"after":"before"),"line",t,r);to(p,o,a,!0)&&p.top>a&&(s=i[l-1])}return s}function Lc(e,t,n,r,i,o,a){var l=Wa(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var p=null,h=null,C=0;C<i.length;C++){var _=i[C];if(!(_.from>=c||_.to<=s)){var P=_.level!=1,$=or(e,r,P?Math.min(c,_.to)-1:Math.max(s,_.from)).right,te=$<o?o-$+1e9:$-o;(!p||h>te)&&(p=_,h=te)}}return p||(p=i[i.length-1]),p.from<s&&(p={from:s,to:p.to,level:p.level}),p.to>c&&(p={from:p.from,to:c,level:p.level}),p}var Ar;function Jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Ar==null){Ar=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Ar.appendChild(document.createTextNode("x")),Ar.appendChild(d("br"));Ar.appendChild(document.createTextNode("x"))}M(e.measure,Ar);var n=Ar.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),b(e.measure),n||1}function Zr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");M(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ro(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:no(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function no(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ba(e){var t=Jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Zr(e.display)-3);return function(i){if(br(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function io(e){var t=e.doc,n=Ba(e);t.iter(function(r){var i=n(r);i!=r.height&&Bt(r,i)})}function Or(e,t,n,r){var i=e.display;if(!n&&bn(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(h){return null}var s=eo(e,o,a),c;if(r&&s.xRel>0&&(c=xe(e.doc,s.line).text).length==s.ch){var p=Pe(c,c.length,e.options.tabSize)-c.length;s=O(s.line,Math.max(0,Math.round((o-Na(e.display).left)/Zr(e.display))-p))}return s}function Pr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Nt(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)cr&&Ri(e.doc,t)<i.viewTo&&wr(e);else if(n<=i.viewFrom)cr&&ba(e.doc,n+r)>i.viewFrom?wr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)wr(e);else if(t<=i.viewFrom){var o=pi(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):wr(e)}else if(n>=i.viewTo){var a=pi(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):wr(e)}else{var l=pi(e,t,t,-1),s=pi(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(si(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):wr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function xr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Pr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);be(a,n)==-1&&a.push(n)}}}function wr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pi(e,t,n,r){var i=Pr(e,t),o,a=e.display.view;if(!cr||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(r>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;Ri(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function zc(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=si(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=si(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Pr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(si(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Pr(e,n)))),r.viewTo=n}function Va(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function Nn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function $a(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var l=0;l<n.sel.ranges.length;l++)if(!(!t&&l==n.sel.primIndex)){var s=n.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();if(a){var p=a(e,s);p&&oo(e,p,i)}else(c||e.options.showCursorWhenSelecting)&&oo(e,s.head,i);c||Mc(e,s,o)}}return r}function oo(e,t,n){var r=Zt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(d("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=di(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var l=n.appendChild(d("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=r.other.left+"px",l.style.top=r.other.top+"px",l.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function fi(e,t){return e.top-t.top||e.left-t.left}function Mc(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Na(e.display),l=a.left,s=Math.max(r.sizerWidth,Tr(e)-r.sizer.offsetLeft)-a.right,c=i.direction=="ltr";function p(le,me,ke,_e){me<0&&(me=0),me=Math.round(me),_e=Math.round(_e),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+le+`px;
- top: `+me+"px; width: "+(ke!=null?ke:s-le)+`px;
- height: `+(_e-me)+"px"))}function h(le,me,ke){var _e=xe(i,le),Oe=_e.text.length,$e,ft;function Qe(ot,Ot){return di(e,O(le,ot),"div",_e,Ot)}function It(ot,Ot,mt){var lt=Ha(e,_e,null,ot),at=Ot=="ltr"==(mt=="after")?"left":"right",rt=mt=="after"?lt.begin:lt.end-(/\s/.test(_e.text.charAt(lt.end-1))?2:1);return Qe(rt,at)[at]}var At=Me(_e,i.direction);return Je(At,me||0,ke!=null?ke:Oe,function(ot,Ot,mt,lt){var at=mt=="ltr",rt=Qe(ot,at?"left":"right"),Pt=Qe(Ot-1,at?"right":"left"),fn=me==null&&ot==0,zr=ke==null&&Ot==Oe,kt=lt==0,ar=!At||lt==At.length-1;if(Pt.top-rt.top<=3){var ht=(c?fn:zr)&&kt,Po=(c?zr:fn)&&ar,hr=ht?l:(at?rt:Pt).left,Ir=Po?s:(at?Pt:rt).right;p(hr,rt.top,Ir-hr,rt.bottom)}else{var Fr,Ct,hn,jo;at?(Fr=c&&fn&&kt?l:rt.left,Ct=c?s:It(ot,mt,"before"),hn=c?l:It(Ot,mt,"after"),jo=c&&zr&&ar?s:Pt.right):(Fr=c?It(ot,mt,"before"):l,Ct=!c&&fn&&kt?s:rt.right,hn=!c&&zr&&ar?l:Pt.left,jo=c?It(Ot,mt,"after"):s),p(Fr,rt.top,Ct-Fr,rt.bottom),rt.bottom<Pt.top&&p(l,rt.bottom,null,Pt.top),p(hn,Pt.top,jo-hn,Pt.bottom)}(!$e||fi(rt,$e)<0)&&($e=rt),fi(Pt,$e)<0&&($e=Pt),(!ft||fi(rt,ft)<0)&&(ft=rt),fi(Pt,ft)<0&&(ft=Pt)}),{start:$e,end:ft}}var C=t.from(),_=t.to();if(C.line==_.line)h(C.line,C.ch,_.ch);else{var P=xe(i,C.line),$=xe(i,_.line),te=Jt(P)==Jt($),ae=h(C.line,C.ch,te?P.text.length+1:null).end,de=h(_.line,te?0:null,_.ch).start;te&&(ae.top<de.top-2?(p(ae.right,ae.top,null,ae.bottom),p(l,de.top,de.left,de.bottom)):p(ae.right,ae.top,de.left-ae.right,ae.bottom)),ae.bottom<de.top&&p(l,ae.bottom,null,de.top)}n.appendChild(o)}function ao(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||en(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ra(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||so(e))}function lo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&en(e))},100)}function so(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ze(e,"focus",e,t),e.state.focused=!0,Ve(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),I&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ao(e))}function en(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ze(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function hi(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,a=0;a<t.view.length;a++){var l=t.view[a],s=e.options.lineWrapping,c=void 0,p=0;if(!l.hidden){if(i+=l.line.height,x&&re<8){var h=l.node.offsetTop+l.node.offsetHeight;c=h-n,n=h}else{var C=l.node.getBoundingClientRect();c=C.bottom-C.top,!s&&l.text.firstChild&&(p=l.text.firstChild.getBoundingClientRect().right-C.left-1)}var _=l.line.height-c;if((_>.005||_<-.005)&&(i<r&&(o-=_),Bt(l.line,c),Ka(l.line),l.rest))for(var P=0;P<l.rest.length;P++)Ka(l.rest[P]);if(p>e.display.sizerWidth){var $=Math.ceil(p/Zr(e.display));$>e.display.maxLineLength&&(e.display.maxLineLength=$,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Ka(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function mi(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ci(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=f(t,r),a=f(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=f(t,ur(xe(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=f(t,ur(xe(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Nc(e,t){if(!et(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&&!ue){var a=d("div","\u200B",null,`position: absolute;
- top: `+(t.top-n.viewOffset-ci(e.display))+`px;
- height: `+(t.bottom-t.top+ir(e)+n.barHeight)+`px;
- left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function Tc(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?O(t.line,t.ch+1,"before"):t,t=t.ch?O(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Zt(e,t),s=!n||n==t?l:Zt(e,n);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r};var c=co(e,i),p=e.doc.scrollTop,h=e.doc.scrollLeft;if(c.scrollTop!=null&&(An(e,c.scrollTop),Math.abs(e.doc.scrollTop-p)>1&&(a=!0)),c.scrollLeft!=null&&(jr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}function Ac(e,t){var n=co(e,t);n.scrollTop!=null&&An(e,n.scrollTop),n.scrollLeft!=null&&jr(e,n.scrollLeft)}function co(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=Qi(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Yi(n),s=t.top<r,c=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var p=Math.min(t.top,(c?l:t.bottom)-o);p!=i&&(a.scrollTop=p)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,C=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-h,_=Tr(e)-n.gutters.offsetWidth,P=t.right-t.left>_;return P&&(t.right=t.left+_),t.left<10?a.scrollLeft=0:t.left<C?a.scrollLeft=Math.max(0,t.left+h-(P?0:10)):t.right>_+C-3&&(a.scrollLeft=t.right+(P?0:10)-_),a}function uo(e,t){t!=null&&(gi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function tn(e){gi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Tn(e,t,n){(t!=null||n!=null)&&gi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Oc(e,t){gi(e),e.curOp.scrollToPos=t}function gi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Fa(e,t.from),r=Fa(e,t.to);Ua(e,n,r,t.margin)}}function Ua(e,t,n,r){var i=co(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});Tn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(W||fo(e,{top:t}),Ga(e,t,!0),W&&fo(e),jn(e,100))}function Ga(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 jr(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,Za(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function On(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Yi(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+ir(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Er=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),Ce(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ce(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&re<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Er.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}},Er.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Er.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Er.prototype.zeroWidthHack=function(){var e=G&&!ye?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ne,this.disableVert=new Ne},Er.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)},Er.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};function rn(e,t){t||(t=On(e));var n=e.display.barWidth,r=e.display.barHeight;Ya(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&hi(e),Ya(e,On(e)),n=e.display.barWidth,r=e.display.barHeight}function Ya(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 Qa={native:Er,null:Pn};function Xa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Qa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(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"?jr(e,t):An(e,t)},e),e.display.scrollbars.addClass&&Ve(e.display.wrapper,e.display.scrollbars.addClass)}var Pc=0;function Dr(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:++Pc,markArrays:null},uc(e.curOp)}function qr(e){var t=e.curOp;t&&pc(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;jc(n)})}function jc(e){for(var t=e.ops,n=0;n<t.length;n++)Ec(t[n]);for(var r=0;r<t.length;r++)Dc(t[r]);for(var i=0;i<t.length;i++)qc(t[i]);for(var o=0;o<t.length;o++)Ic(t[o]);for(var a=0;a<t.length;a++)Fc(t[a])}function Ec(e){var t=e.cm,n=t.display;Hc(t),e.updateMaxLine&&Ui(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new vi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Dc(e){e.updatedDisplay=e.mustUpdate&&po(e.cm,e.update)}function qc(e){var t=e.cm,n=t.display;e.updatedDisplay&&hi(t),e.barMeasure=On(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Aa(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+ir(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ic(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&jr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==Ae(He(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&rn(t,e.barMeasure),e.updatedDisplay&&mo(t,e.barMeasure),e.selectionChanged&&ao(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Ra(e.cm)}function Fc(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Ja(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&Ga(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&jr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Tc(t,Te(r,e.scrollToPos.from),Te(r,e.scrollToPos.to),e.scrollToPos.margin);Nc(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Ze(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Ze(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ze(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function qt(e,t){if(e.curOp)return t();Dr(e);try{return t()}finally{qr(e)}}function dt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Dr(e);try{return t.apply(e,arguments)}finally{qr(e)}}}function St(e){return function(){if(this.curOp)return e.apply(this,arguments);Dr(this);try{return e.apply(this,arguments)}finally{qr(this)}}}function pt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Dr(t);try{return e.apply(this,arguments)}finally{qr(t)}}}function jn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Le(Wc,e))}function Wc(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=_n(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?rr(t.mode,r.state):null,s=oa(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var c=o.styleClasses,p=s.classes;p?o.styleClasses=p:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=p&&(!c||!p||c.bgClass!=p.bgClass||c.textClass!=p.textClass),C=0;!h&&C<a.length;++C)h=a[C]!=o.styles[C];h&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Hi(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return jn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&qt(e,function(){for(var o=0;o<i.length;o++)xr(e,i[o],"text")})}}var vi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=mi(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=n,this.dims=ro(e),this.events=[]};vi.prototype.signal=function(e,t){Dt(e,t)&&this.events.push(arguments)},vi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function Hc(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=ir(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=ir(e)+"px",t.scrollbarsClipped=!0)}function Bc(e){if(e.hasFocus())return null;var t=Ae(He(e));if(!t||!ve(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=Se(e).getSelection();r.anchorNode&&r.extend&&ve(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Vc(e){if(!(!e||!e.activeElt||e.activeElt==Ae(je(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&ve(document.body,e.anchorNode)&&ve(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function po(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return wr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Va(e)==0)return!1;el(e)&&(wr(e),t.dims=ro(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),cr&&(o=Ri(e.doc,o),a=ba(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;zc(e,o,a),n.viewOffset=ur(xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Va(e);if(!l&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var c=Bc(e);return s>4&&(n.lineDiv.style.display="none"),$c(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Vc(c),b(n.cursorDiv),b(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,jn(e,400)),n.updateLineNumbers=null,!0}function Ja(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Tr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Yi(e.display)-Qi(e),n.top)}),t.visible=mi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=mi(e.display,e.doc,n));if(!po(e,t))break;hi(e);var i=On(e);Nn(e),rn(e,i),mo(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 fo(e,t){var n=new vi(e,t);if(po(e,n)){hi(e),Ja(e,n);var r=On(e);Nn(e),rn(e,r),mo(e,r),n.finish()}}function $c(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(P){var $=P.nextSibling;return I&&G&&e.display.currentWheelTarget==P?P.style.display="none":P.parentNode.removeChild(P),$}for(var s=r.view,c=r.viewFrom,p=0;p<s.length;p++){var h=s[p];if(!h.hidden)if(!h.node||h.node.parentNode!=o){var C=vc(e,h,c,n);o.insertBefore(C,a)}else{for(;a!=h.node;)a=l(a);var _=i&&t!=null&&t<=c&&h.lineNumber;h.changes&&(be(h.changes,"gutter")>-1&&(_=!1),Sa(e,h,c,n)),_&&(b(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(ee(e.options,c)))),a=h.node.nextSibling}c+=h.size}for(;a;)a=l(a)}function ho(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ut(e,"gutterChanged",e)}function mo(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+ir(e)+"px"}function Za(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=no(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function el(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ee(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(d("div",[d("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ho(e.display),!0}return!1}function go(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function tl(e){var t=e.gutters,n=e.gutterSpecs;b(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(d("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ho(e)}function En(e){tl(e.display),Nt(e),Za(e)}function Rc(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=d("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=d("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=U("div",null,"CodeMirror-code"),i.selectionDiv=d("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=d("div",null,"CodeMirror-cursors"),i.measure=d("div",null,"CodeMirror-measure"),i.lineMeasure=d("div",null,"CodeMirror-measure"),i.lineSpace=U("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=U("div",[i.lineSpace],"CodeMirror-lines");i.mover=d("div",[o],null,"position: relative"),i.sizer=d("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=d("div",null,null,"position: absolute; height: "+Ye+"px; width: 1px;"),i.gutters=d("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=d("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=d("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),E&&Q>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),x&&re<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!I&&!(W&&B)&&(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=go(r.gutters,r.lineNumbers),tl(i),n.init(i)}var yi=0,pr=null;x?pr=-.53:W?pr=15:E?pr=-.7:Y&&(pr=-1/3);function rl(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 Kc(e){var t=rl(e);return t.x*=pr,t.y*=pr,t}function nl(e,t){E&&Q==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=rl(t),r=n.x,i=n.y,o=pr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var a=e.display,l=a.scroller,s=l.scrollWidth>l.clientWidth,c=l.scrollHeight>l.clientHeight;if(r&&s||i&&c){if(i&&G&&I){e:for(var p=t.target,h=a.view;p!=l;p=p.parentNode)for(var C=0;C<h.length;C++)if(h[C].node==p){e.display.currentWheelTarget=p;break e}}if(r&&!W&&!H&&o!=null){i&&c&&An(e,Math.max(0,l.scrollTop+i*o)),jr(e,Math.max(0,l.scrollLeft+r*o)),(!i||i&&c)&&xt(t),a.wheelStartX=null;return}if(i&&o!=null){var _=i*o,P=e.doc.scrollTop,$=P+a.wrapper.clientHeight;_<0?P=Math.max(0,P+_-50):$=Math.min(e.doc.height,$+_+50),fo(e,{top:P,bottom:$})}yi<20&&t.deltaMode!==0&&(a.wheelStartX==null?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=r,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX!=null){var te=l.scrollLeft-a.wheelStartX,ae=l.scrollTop-a.wheelStartY,de=ae&&a.wheelDY&&ae/a.wheelDY||te&&a.wheelDX&&te/a.wheelDX;a.wheelStartX=a.wheelStartY=null,de&&(pr=(pr*yi+de)/(yi+1),++yi)}},200)):(a.wheelDX+=r,a.wheelDY+=i))}}var Vt=function(e,t){this.ranges=e,this.primIndex=t};Vt.prototype.primary=function(){return this.ranges[this.primIndex]},Vt.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!Ie(n.anchor,r.anchor)||!Ie(n.head,r.head))return!1}return!0},Vt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Fe(ct(this.ranges[t].anchor),ct(this.ranges[t].head));return new Vt(e,this.primIndex)},Vt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Vt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ce(t,r.from())>=0&&ce(e,r.to())<=0)return n}return-1};var Fe=function(e,t){this.anchor=e,this.head=t};Fe.prototype.from=function(){return Gr(this.anchor,this.head)},Fe.prototype.to=function(){return Mt(this.anchor,this.head)},Fe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function er(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(C,_){return ce(C.from(),_.from())}),n=be(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ce(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var c=Gr(l.from(),a.from()),p=Mt(l.to(),a.to()),h=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Fe(h?p:c,h?c:p))}}return new Vt(t,n)}function kr(e,t){return new Vt([new Fe(e,t||e)],0)}function _r(e){return e.text?O(e.from.line+e.text.length-1,ie(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function il(e,t){if(ce(e,t.from)<0)return e;if(ce(e,t.to)<=0)return _r(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+=_r(t).ch-t.to.ch),O(n,r)}function vo(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Fe(il(i.anchor,t),il(i.head,t)))}return er(e.cm,n,e.sel.primIndex)}function ol(e,t,n){return e.line==t.line?O(n.line,e.ch-t.ch+n.ch):O(n.line+(e.line-t.line),e.ch)}function Uc(e,t,n){for(var r=[],i=O(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=ol(l.from,i,o),c=ol(_r(l),i,o);if(i=l.to,o=c,n=="around"){var p=e.sel.ranges[a],h=ce(p.head,p.anchor)<0;r[a]=new Fe(h?c:s,h?s:c)}else r[a]=new Fe(s,s)}return new Vt(r,e.sel.primIndex)}function yo(e){e.doc.mode=Rr(e.options,e.doc.modeOption),Dn(e)}function Dn(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,jn(e,100),e.state.modeGen++,e.curOp&&Nt(e)}function al(e,t){return t.from.ch==0&&t.to.ch==0&&ie(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function bo(e,t,n,r){function i(de){return n?n[de]:null}function o(de,le,me){tc(de,le,me,r),ut(de,"change",de,t)}function a(de,le){for(var me=[],ke=de;ke<le;++ke)me.push(new Yr(c[ke],i(ke),r));return me}var l=t.from,s=t.to,c=t.text,p=xe(e,l.line),h=xe(e,s.line),C=ie(c),_=i(c.length-1),P=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(al(e,t)){var $=a(0,c.length-1);o(h,h.text,_),P&&e.remove(l.line,P),$.length&&e.insert(l.line,$)}else if(p==h)if(c.length==1)o(p,p.text.slice(0,l.ch)+C+p.text.slice(s.ch),_);else{var te=a(1,c.length-1);te.push(new Yr(C+p.text.slice(s.ch),_,r)),o(p,p.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,te)}else if(c.length==1)o(p,p.text.slice(0,l.ch)+c[0]+h.text.slice(s.ch),i(0)),e.remove(l.line+1,P);else{o(p,p.text.slice(0,l.ch)+c[0],i(0)),o(h,C+h.text.slice(s.ch),_);var ae=a(1,c.length-1);P>1&&e.remove(l.line+1,P-1),e.insert(l.line+1,ae)}ut(e,"change",e,t)}function Sr(e,t,n){function r(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var c=a&&s.sharedHist;n&&!c||(t(s.doc,c),r(s.doc,i,c))}}}r(e,null,!0)}function ll(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,io(e),yo(e),sl(e),e.options.direction=t.direction,e.options.lineWrapping||Ui(e),e.options.mode=t.modeOption,Nt(e)}function sl(e){(e.doc.direction=="rtl"?Ve:T)(e.display.lineDiv,"CodeMirror-rtl")}function Gc(e){qt(e,function(){sl(e),Nt(e)})}function bi(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function xo(e,t){var n={from:ct(t.from),to:_r(t),text:sr(e,t.from,t.to)};return dl(e,n,t.from.line,t.to.line+1),Sr(e,function(r){return dl(r,n,t.from.line,t.to.line+1)},!0),n}function cl(e){for(;e.length;){var t=ie(e);if(t.ranges)e.pop();else break}}function Yc(e,t){if(t)return cl(e.done),ie(e.done);if(e.done.length&&!ie(e.done).ranges)return ie(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ie(e.done)}function ul(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,a,l;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)=="*"))&&(a=Yc(i,i.lastOp==r)))l=ie(a.changes),ce(t.from,t.to)==0&&ce(t.from,l.to)==0?l.to=_r(t):a.changes.push(xo(e,t));else{var s=ie(i.done);for((!s||!s.ranges)&&xi(e.sel,i.done),a={changes:[xo(e,t)],generation:i.generation},i.done.push(a);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,l||Ze(e,"historyAdded")}function Qc(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 Xc(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||Qc(e,o,ie(i.done),t))?i.done[i.done.length-1]=t:xi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&cl(i.undone)}function xi(e,t){var n=ie(t);n&&n.ranges&&n.equals(e)||t.push(e)}function dl(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(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function Jc(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Zc(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Jc(n[i]));return r}function pl(e,t){var n=Zc(e,t),r=Vi(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function nn(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?Vt.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],p=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var h in c)(p=h.match(/^spans_(\d+)$/))&&be(t,Number(p[1]))>-1&&(ie(l)[h]=c[h],delete c[h])}}return r}function wo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ce(t,i)<0;o!=ce(n,i)<0?(i=t,t=n):o!=ce(t,n)<0&&(t=n)}return new Fe(i,t)}else return new Fe(n||t,t)}function wi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),wt(e,new Vt([wo(e.sel.primary(),t,n,i)],0),r)}function fl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=wo(e.sel.ranges[o],t[o],null,i);var a=er(e.cm,r,e.sel.primIndex);wt(e,a,n)}function ko(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,wt(e,er(e.cm,i,e.sel.primIndex),r)}function hl(e,t,n,r){wt(e,kr(t,n),r)}function eu(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new Fe(Te(e,i[o].anchor),Te(e,i[o].head))},origin:n&&n.origin};return Ze(e,"beforeSelectionChange",e,r),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?er(e.cm,r.ranges,r.ranges.length-1):t}function ml(e,t,n){var r=e.history.done,i=ie(r);i&&i.ranges?(r[r.length-1]=t,ki(e,t,n)):wt(e,t,n)}function wt(e,t,n){ki(e,t,n),Xc(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ki(e,t,n){(Dt(e,"beforeSelectionChange")||e.cm&&Dt(e.cm,"beforeSelectionChange"))&&(t=eu(e,t,n));var r=n&&n.bias||(ce(t.primary().head,e.sel.primary().head)<0?-1:1);gl(e,yl(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&tn(e.cm)}function gl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Rt(e.cm)),ut(e,"cursorActivity",e))}function vl(e){gl(e,yl(e,e.sel,null,!1))}function yl(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=_i(e,a.anchor,l&&l.anchor,n,r),c=a.head==a.anchor?s:_i(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Fe(s,c))}return i?er(e.cm,i,t.primIndex):t}function on(e,t,n,r,i){var o=xe(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,p="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(c?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(p?l.to>=t.ch:l.to>t.ch))){if(i&&(Ze(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(n){var h=s.find(r<0?1:-1),C=void 0;if((r<0?p:c)&&(h=bl(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(C=ce(h,n))&&(r<0?C<0:C>0))return on(e,h,t,r,i)}var _=s.find(r<0?-1:1);return(r<0?c:p)&&(_=bl(e,_,r,_.line==t.line?o:null)),_?on(e,_,t,r,i):null}}return t}function _i(e,t,n,r,i){var o=r||1,a=on(e,t,n,o,i)||!i&&on(e,t,n,o,!0)||on(e,t,n,-o,i)||!i&&on(e,t,n,-o,!0);return a||(e.cantEdit=!0,O(e.first,0))}function bl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Te(e,O(t.line-1)):null:n>0&&t.ch==(r||xe(e,t.line)).text.length?t.line<e.first+e.size-1?O(t.line+1,0):null:new O(t.line,t.ch+n)}function xl(e){e.setSelection(O(e.firstLine(),0),O(e.lastLine()),ge)}function wl(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,o,a,l){i&&(r.from=Te(e,i)),o&&(r.to=Te(e,o)),a&&(r.text=a),l!==void 0&&(r.origin=l)}),Ze(e,"beforeChange",e,r),e.cm&&Ze(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function an(e,t,n){if(e.cm){if(!e.cm.curOp)return dt(e.cm,an)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Dt(e,"beforeChange")||e.cm&&Dt(e.cm,"beforeChange"))&&(t=wl(e,t,!0),!t))){var r=pa&&!n&&Xs(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)kl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else kl(e,t)}}function kl(e,t){if(!(t.text.length==1&&t.text[0]==""&&ce(t.from,t.to)==0)){var n=vo(e,t);ul(e,t,n,e.cm?e.cm.curOp.id:NaN),qn(e,t,n,Vi(e,t));var r=[];Sr(e,function(i,o){!o&&be(r,i.history)==-1&&(Ll(i.history,t),r.push(i.history)),qn(i,t,null,Vi(i,t))})}}function Si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,c=0;c<l.length&&(o=l[c],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));c++);if(c!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(xi(o,s),n&&!o.equals(e.sel)){wt(e,o,{clearRedo:!1});return}a=o}else if(r){l.push(o);return}else break;var p=[];xi(a,s),s.push({changes:p,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var h=Dt(e,"beforeChange")||e.cm&&Dt(e.cm,"beforeChange"),C=function($){var te=o.changes[$];if(te.origin=t,h&&!wl(e,te,!1))return l.length=0,{};p.push(xo(e,te));var ae=$?vo(e,te):ie(l);qn(e,te,ae,pl(e,te)),!$&&e.cm&&e.cm.scrollIntoView({from:te.from,to:_r(te)});var de=[];Sr(e,function(le,me){!me&&be(de,le.history)==-1&&(Ll(le.history,te),de.push(le.history)),qn(le,te,null,pl(le,te))})},_=o.changes.length-1;_>=0;--_){var P=C(_);if(P)return P.v}}}}function _l(e,t){if(t!=0&&(e.first+=t,e.sel=new Vt(qe(e.sel.ranges,function(i){return new Fe(O(i.anchor.line+t,i.anchor.ch),O(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Nt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)xr(e.cm,r,"gutter")}}function qn(e,t,n,r){if(e.cm&&!e.cm.curOp)return dt(e.cm,qn)(e,t,n,r);if(t.to.line<e.first){_l(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);_l(e,i),t={from:O(e.first,0),to:O(t.to.line+i,t.to.ch),text:[ie(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:O(o,xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=sr(e,t.from,t.to),n||(n=vo(e,t)),e.cm?tu(e.cm,t,r):bo(e,t,r),ki(e,n,ge),e.cantEdit&&_i(e,O(e.firstLine(),0))&&(e.cantEdit=!1)}}function tu(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=u(Jt(xe(r,o.line))),r.iter(s,a.line+1,function(_){if(_==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Rt(e),bo(r,t,n,Ba(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(_){var P=li(_);P>i.maxLineLength&&(i.maxLine=_,i.maxLineLength=P,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),$s(r,o.line),jn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Nt(e):o.line==a.line&&t.text.length==1&&!al(e.doc,t)?xr(e,o.line,"text"):Nt(e,o.line,a.line+1,c);var p=Dt(e,"changes"),h=Dt(e,"change");if(h||p){var C={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};h&&ut(e,"change",e,C),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(C)}e.display.selForContextMenu=null}function ln(e,t,n,r,i){var o;r||(r=n),ce(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),an(e,{from:n,to:r,text:t,origin:i})}function Sl(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Cl(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Sl(o.ranges[l].anchor,t,n,r),Sl(o.ranges[l].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=O(c.from.line+r,c.from.ch),c.to=O(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function Ll(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Cl(e.done,n,r,i),Cl(e.undone,n,r,i)}function In(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=xe(e,na(e,t)):i=u(t),i==null?null:(r(o,i)&&e.cm&&xr(e.cm,i,n),o)}function Fn(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}Fn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,rc(i),ut(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function Wn(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Wn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Fn))){var l=[];this.collapse(l),this.children=[new Fn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Fn(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Wn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=be(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Wn(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var Hn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Hn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=u(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=zn(this);Bt(n,Math.max(0,n.height-o)),e&&(qt(e,function(){zl(e,n,-o),xr(e,r,"widget")}),ut(e,"lineWidgetCleared",e,this,r))}},Hn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=zn(this)-t;i&&(br(this.doc,r)||Bt(r,r.height+i),n&&qt(n,function(){n.curOp.forceUpdate=!0,zl(n,r,i),ut(n,"lineWidgetChanged",n,e,u(r))}))},Ut(Hn);function zl(e,t,n){ur(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&uo(e,n)}function ru(e,t,n,r){var i=new Hn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),In(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!br(e,a)){var s=ur(a)<e.scrollTop;Bt(a,a.height+zn(i)),s&&uo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ut(o,"lineWidgetAdded",o,i,typeof t=="number"?t:u(t)),i}var Ml=0,Cr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ml};Cr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Dr(e),Dt(this,"clear")){var n=this.find();n&&ut(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Sn(a.markedSpans,this);e&&!this.collapsed?xr(e,u(a),"text"):e&&(l.to!=null&&(i=u(a)),l.from!=null&&(r=u(a))),a.markedSpans=Us(a.markedSpans,l),l.from==null&&this.collapsed&&!br(this.doc,a)&&e&&Bt(a,Jr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Jt(this.lines[s]),p=li(c);p>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Nt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&vl(e.doc)),e&&ut(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},Cr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Sn(o.markedSpans,this);if(a.from!=null&&(n=O(t?o:u(o),a.from),e==-1))return n;if(a.to!=null&&(r=O(t?o:u(o),a.to),e==1))return r}return n&&{from:n,to:r}},Cr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||qt(r,function(){var i=t.line,o=u(t.line),a=Xi(r,o);if(a&&(ja(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!br(n.doc,i)&&n.height!=null){var l=n.height;n.height=null;var s=zn(n)-l;s&&Bt(i,i.height+s)}ut(r,"markerChanged",r,e)})},Cr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||be(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Cr.prototype.detachLine=function(e){if(this.lines.splice(be(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ut(Cr);function sn(e,t,n,r,i){if(r&&r.shared)return nu(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return dt(e.cm,sn)(e,t,n,r,i);var o=new Cr(e,i),a=ce(t,n);if(r&&oe(r,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=U("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(ya(e,t.line,t,n,o)||t.line!=n.line&&ya(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ks()}o.addToHistory&&ul(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,c;if(e.iter(l,n.line+1,function(h){s&&o.collapsed&&!s.options.lineWrapping&&Jt(h)==s.display.maxLine&&(c=!0),o.collapsed&&l!=t.line&&Bt(h,0),Gs(h,new ni(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(h){br(e,h)&&Bt(h,0)}),o.clearOnEnter&&Ce(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Rs(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ml,o.atomic=!0),s){if(c&&(s.curOp.updateMaxLine=!0),o.collapsed)Nt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var p=t.line;p<=n.line;p++)xr(s,p,"text");o.atomic&&vl(s.doc),ut(s,"markerAdded",s,o)}return o}var Bn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Bn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ut(this,"clear")}},Bn.prototype.find=function(e,t){return this.primary.find(e,t)},Ut(Bn);function nu(e,t,n,r,i){r=oe(r),r.shared=!1;var o=[sn(e,t,n,r,i)],a=o[0],l=r.widgetNode;return Sr(e,function(s){l&&(r.widgetNode=l.cloneNode(!0)),o.push(sn(s,Te(s,t),Te(s,n),r,i));for(var c=0;c<s.linked.length;++c)if(s.linked[c].isParent)return;a=ie(o)}),new Bn(o,a)}function Nl(e){return e.findMarks(O(e.first,0),e.clipPos(O(e.lastLine())),function(t){return t.parent})}function iu(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ce(o,a)){var l=sn(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function ou(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];Sr(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];be(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}var au=0,Tt=function(e,t,n,r,i){if(!(this instanceof Tt))return new Tt(e,t,n,r,i);n==null&&(n=0),Wn.call(this,[new Fn([new Yr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=O(n,0);this.sel=kr(o),this.history=new bi(null),this.id=++au,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),bo(this,{from:o,to:o,text:e}),wt(this,kr(o),ge)};Tt.prototype=j(Wn.prototype,{constructor:Tt,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=kn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:pt(function(e){var t=O(this.first,0),n=this.first+this.size-1;an(this,{from:t,to:O(n,xe(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Tn(this.cm,0,0),wt(this,kr(t),ge)}),replaceRange:function(e,t,n,r){t=Te(this,t),n=n?Te(this,n):t,ln(this,e,t,n,r)},getRange:function(e,t,n){var r=sr(this,Te(this,e),Te(this,t));return n===!1?r:n===""?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(F(this,e))return xe(this,e)},getLineNumber:function(e){return u(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=xe(this,e)),Jt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Te(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pt(function(e,t,n){hl(this,Te(this,typeof e=="number"?O(e,t||0):e),null,n)}),setSelection:pt(function(e,t,n){hl(this,Te(this,e),Te(this,t||e),n)}),extendSelection:pt(function(e,t,n){wi(this,Te(this,e),t&&Te(this,t),n)}),extendSelections:pt(function(e,t){fl(this,ia(this,e),t)}),extendSelectionsBy:pt(function(e,t){var n=qe(this.sel.ranges,e);fl(this,ia(this,n),t)}),setSelections:pt(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Fe(Te(this,e[i].anchor),Te(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),wt(this,er(this.cm,r,t),n)}}),addSelection:pt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Fe(Te(this,e),Te(this,t||e))),wt(this,er(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=sr(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=sr(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:pt(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&t!="end"&&Uc(this,r,t),s=r.length-1;s>=0;s--)an(this,r[s]);l?ml(this,l):this.cm&&tn(this.cm)}),undo:pt(function(){Si(this,"undo")}),redo:pt(function(){Si(this,"redo")}),undoSelection:pt(function(){Si(this,"undo",!0)}),redoSelection:pt(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.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new bi(this.history),Sr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:nn(this.history.done),undone:nn(this.history.undone)}},setHistory:function(e){var t=this.history=new bi(this.history);t.done=nn(e.done.slice(0),null,!0),t.undone=nn(e.undone.slice(0),null,!0)},setGutterMarker:pt(function(e,t,n){return In(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&vt(i)&&(r.gutterMarkers=null),!0})}),clearGutter:pt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&In(t,n,"gutter",function(){return n.gutterMarkers[e]=null,vt(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!F(this,e)||(t=e,e=xe(this,e),!e))return null}else if(t=u(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:pt(function(e,t,n){return In(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(L(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:pt(function(e,t,n){return In(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[i];if(o)if(n==null)r[i]=null;else{var a=o.match(L(n));if(!a)return!1;var l=a.index+a[0].length;r[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:pt(function(e,t,n){return ru(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return sn(this,Te(this,e),Te(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Te(this,e),sn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Te(this,e);var t=[],n=xe(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Te(this,e),t=Te(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];!(s.to!=null&&i==e.line&&e.ch>=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;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),Te(this,O(n,t))},indexFromPos:function(e){e=Te(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new Tt(kn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Tt(kn(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],iu(r,Nl(this)),r},unlinkDoc:function(e){if(e instanceof Ge&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),ou(Nl(this));break}}if(e.history==this.history){var r=[e.id];Sr(e,function(i){return r.push(i.id)},!0),e.history=new bi(null),e.history.done=nn(this.history.done,r),e.history.undone=nn(this.history.undone,r)}},iterLinkedDocs:function(e){Sr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Kt(e)},lineSeparator:function(){return this.lineSep||`
- `},setDirection:pt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Gc(this.cm))})}),Tt.prototype.eachLine=Tt.prototype.iter;var Tl=0;function lu(e){var t=this;if(Al(t),!(et(t,e)||dr(t.display,e))){xt(e),x&&(Tl=+new Date);var n=Or(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&dt(t,function(){n=Te(t.doc,n);var _={from:n,to:n,text:t.doc.splitLines(o.filter(function(P){return P!=null}).join(t.doc.lineSeparator())),origin:"paste"};an(t.doc,_),ml(t.doc,kr(Te(t.doc,n),Te(t.doc,_r(_))))})()},s=function(_,P){if(t.options.allowDropFileTypes&&be(t.options.allowDropFileTypes,_.type)==-1){l();return}var $=new FileReader;$.onerror=function(){return l()},$.onload=function(){var te=$.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(te)){l();return}o[P]=te,l()},$.readAsText(_)},c=0;c<r.length;c++)s(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var p=e.dataTransfer.getData("Text");if(p){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),ki(t.doc,kr(n,n)),h)for(var C=0;C<h.length;++C)ln(t.doc,"",h[C].anchor,h[C].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(_){}}}}function su(e,t){if(x&&(!e.state.draggingText||+new Date-Tl<100)){mr(t);return}if(!(et(e,t)||dr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Y)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",H&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),H&&n.parentNode.removeChild(n)}}function cu(e,t){var n=Or(e,t);if(n){var r=document.createDocumentFragment();oo(e,n,r),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),M(e.display.dragCursor,r)}}function Al(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ol(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var Pl=!1;function uu(){Pl||(du(),Pl=!0)}function du(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ol(pu)},100))}),Ce(window,"blur",function(){return Ol(en)})}function pu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Lr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Vn=0;Vn<10;Vn++)Lr[Vn+48]=Lr[Vn+96]=String(Vn);for(var Ci=65;Ci<=90;Ci++)Lr[Ci]=String.fromCharCode(Ci);for(var $n=1;$n<=12;$n++)Lr[$n+111]=Lr[$n+63235]="F"+$n;var fr={};fr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},fr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},fr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},fr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},fr.default=G?fr.macDefault:fr.pcDefault;function fu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function hu(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var i=qe(n.split(" "),fu),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=r):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(!s)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[n]}for(var c in t)e[c]=t[c];return e}function cn(e,t,n,r){t=Li(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&n(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return cn(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=cn(e,t.fallthrough[o],n,r);if(a)return a}}}function jl(e){var t=typeof e=="string"?e:Lr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function El(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(A?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(A?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Dl(e,t){if(H&&e.keyCode==34&&e.char)return!1;var n=Lr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),El(n,e,t))}function Li(e){return typeof e=="string"?fr[e]:e}function un(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ce(o.from,ie(r).to)<=0;){var a=r.pop();if(ce(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}qt(e,function(){for(var l=r.length-1;l>=0;l--)ln(e.doc,"",r[l].from,r[l].to,"+delete");tn(e)})}function _o(e,t,n){var r=V(e.text,t+n,n);return r<0||r>e.text.length?null:r}function So(e,t,n){var r=_o(e,t.ch,n);return r==null?null:new O(t.line,r,n<0?"after":"before")}function Co(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Me(n,t.doc.direction);if(o){var a=i<0?ie(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",c;if(a.level>0||t.doc.direction=="rtl"){var p=Xr(t,n);c=i<0?n.text.length-1:0;var h=or(t,p,c).top;c=we(function(C){return or(t,p,C).top==h},i<0==(a.level==1)?a.from:a.to-1,c),s=="before"&&(c=_o(n,c,1))}else c=i<0?a.to:a.from;return new O(r,c,s)}}return new O(r,i<0?n.text.length:0,i<0?"before":"after")}function mu(e,t,n,r){var i=Me(t,e.doc.direction);if(!i)return So(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=Ht(i,n.ch,n.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return So(t,n,r);var l=function(ae,de){return _o(t,ae instanceof O?ae.ch:ae,de)},s,c=function(ae){return e.options.lineWrapping?(s=s||Xr(e,t),Ha(e,t,s,ae)):{begin:0,end:t.text.length}},p=c(n.sticky=="before"?l(n,-1):n.ch);if(e.doc.direction=="rtl"||a.level==1){var h=a.level==1==r<0,C=l(n,h?1:-1);if(C!=null&&(h?C<=a.to&&C<=p.end:C>=a.from&&C>=p.begin)){var _=h?"before":"after";return new O(n.line,C,_)}}var P=function(ae,de,le){for(var me=function($e,ft){return ft?new O(n.line,l($e,1),"before"):new O(n.line,$e,"after")};ae>=0&&ae<i.length;ae+=de){var ke=i[ae],_e=de>0==(ke.level!=1),Oe=_e?le.begin:l(le.end,-1);if(ke.from<=Oe&&Oe<ke.to||(Oe=_e?ke.from:l(ke.to,-1),le.begin<=Oe&&Oe<le.end))return me(Oe,_e)}},$=P(o+r,r,p);if($)return $;var te=r>0?p.end:l(p.begin,-1);return te!=null&&!(r>0&&te==t.text.length)&&($=P(r>0?0:i.length-1,r,c(te)),$)?$:null}var Rn={selectAll:xl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return un(e,function(t){if(t.empty()){var n=xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:O(t.head.line+1,0)}:{from:t.head,to:O(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return un(e,function(t){return{from:O(t.from().line,0),to:Te(e.doc,O(t.to().line+1,0))}})},delLineLeft:function(e){return un(e,function(t){return{from:O(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return un(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return un(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(O(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(O(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ql(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Il(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return gu(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},De)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},De)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Il(e,t.head):r},De)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=Pe(e.getLine(o.line),o.ch,r);t.push(k(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return qt(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=xe(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new O(i.line,i.ch-1)),i.ch>0)i=new O(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),O(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=xe(e.doc,i.line-1).text;a&&(i=new O(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),O(i.line-1,a.length-1),i,"+transpose"))}}n.push(new Fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return qt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);tn(e)})},openLine:function(e){return e.replaceSelection(`
- `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ql(e,t){var n=xe(e.doc,t),r=Jt(n);return r!=n&&(t=u(r)),Co(!0,e,r,t,1)}function gu(e,t){var n=xe(e.doc,t),r=Zs(n);return r!=n&&(t=u(r)),Co(!0,e,n,t,-1)}function Il(e,t){var n=ql(e,t.line),r=xe(e.doc,n.line),i=Me(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return O(n.line,a?0:o,n.sticky)}return n}function zi(e,t,n){if(typeof t=="string"&&(t=Rn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=gt}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function vu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=cn(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&cn(t,e.options.extraKeys,n,e)||cn(t,e.options.keyMap,n,e)}var yu=new Ne;function Kn(e,t,n,r){var i=e.state.keySeq;if(i){if(jl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:yu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Fl(e,i+" "+t,n,r))return!0}return Fl(e,t,n,r)}function Fl(e,t,n,r){var i=vu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ut(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(xt(n),ao(e)),!!i}function Wl(e,t){var n=Dl(t,!0);return n?t.shiftKey&&!e.state.keySeq?Kn(e,"Shift-"+n,t,function(r){return zi(e,r,!0)})||Kn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return zi(e,r)}):Kn(e,n,t,function(r){return zi(e,r)}):!1}function bu(e,t,n){return Kn(e,"'"+n+"'",t,function(r){return zi(e,r,!0)})}var Lo=null;function Hl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Ae(He(t)),!et(t,e))){x&&re<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Wl(t,e);H&&(Lo=r?n:null,!r&&n==88&&!ti&&(G?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),W&&!G&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&xu(t)}}function xu(e){var t=e.display.lineDiv;Ve(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(T(t,"CodeMirror-crosshair"),bt(document,"keyup",n),bt(document,"mouseover",n))}Ce(document,"keyup",n),Ce(document,"mouseover",n)}function Bl(e){e.keyCode==16&&(this.doc.sel.shift=!1),et(this,e)}function Vl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(dr(t.display,e)||et(t,e)||e.ctrlKey&&!e.altKey||G&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(H&&n==Lo){Lo=null,xt(e);return}if(!(H&&(!e.which||e.which<10)&&Wl(t,e))){var i=String.fromCharCode(r!=null?r:n);i!="\b"&&(bu(t,e,i)||t.display.input.onKeyPress(e))}}}var wu=400,zo=function(e,t,n){this.time=e,this.pos=t,this.button=n};zo.prototype.compare=function(e,t,n){return this.time+wu>e&&ce(t,this.pos)==0&&n==this.button};var Un,Gn;function ku(e,t){var n=+new Date;return Gn&&Gn.compare(n,e,t)?(Un=Gn=null,"triple"):Un&&Un.compare(n,e,t)?(Gn=new zo(n,e,t),Un=null,"double"):(Un=new zo(n,e,t),Gn=null,"single")}function $l(e){var t=this,n=t.display;if(!(et(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,dr(n,e)){I||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Mo(t,e)){var r=Or(t,e),i=Gt(e),o=r?ku(r,i):"single";Se(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&_u(t,i,r,o,e))&&(i==1?r?Cu(t,r,o,e):bn(e)==n.scroller&&xt(e):i==2?(r&&wi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(w?t.display.input.onContextMenu(e):lo(t)))}}}function _u(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,Kn(e,El(o,i),i,function(a){if(typeof a=="string"&&(a=Rn[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=gt}finally{e.state.suppressEdits=!1}return l})}function Su(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=se?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=G?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(G?n.altKey:n.ctrlKey)),i}function Cu(e,t,n,r){x?setTimeout(Le(Ra,e),0):e.curOp.focus=Ae(He(e));var i=Su(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&Fi&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(ce((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(ce(a.to(),t)>0||t.xRel<0)?Lu(e,r,t,i):zu(e,r,t,i)}function Lu(e,t,n,r){var i=e.display,o=!1,a=dt(e,function(c){I&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:lo(e)),bt(i.wrapper.ownerDocument,"mouseup",a),bt(i.wrapper.ownerDocument,"mousemove",l),bt(i.scroller,"dragstart",s),bt(i.scroller,"drop",a),o||(xt(c),r.addNew||wi(e.doc,n,null,null,r.extend),I&&!Y||x&&re==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(c){o=o||Math.abs(t.clientX-c.clientX)+Math.abs(t.clientY-c.clientY)>=10},s=function(){return o=!0};I&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,Ce(i.wrapper.ownerDocument,"mouseup",a),Ce(i.wrapper.ownerDocument,"mousemove",l),Ce(i.scroller,"dragstart",s),Ce(i.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Rl(e,t,n){if(n=="char")return new Fe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Fe(O(t.line,0),Te(e.doc,O(t.line+1,0)));var r=n(e,t);return new Fe(r.from,r.to)}function zu(e,t,n,r){x&&lo(e);var i=e.display,o=e.doc;xt(t);var a,l,s=o.sel,c=s.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),l>-1?a=c[l]:a=new Fe(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new Fe(n,n)),n=Or(e,t,!0,!0),l=-1;else{var p=Rl(e,n,r.unit);r.extend?a=wo(a,p.anchor,p.head,r.extend):a=p}r.addNew?l==-1?(l=c.length,wt(o,er(e,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&r.unit=="char"&&!r.extend?(wt(o,er(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ko(o,l,a,Xe):(l=0,wt(o,new Vt([a],0),Xe),s=o.sel);var h=n;function C(le){if(ce(h,le)!=0)if(h=le,r.unit=="rectangle"){for(var me=[],ke=e.options.tabSize,_e=Pe(xe(o,n.line).text,n.ch,ke),Oe=Pe(xe(o,le.line).text,le.ch,ke),$e=Math.min(_e,Oe),ft=Math.max(_e,Oe),Qe=Math.min(n.line,le.line),It=Math.min(e.lastLine(),Math.max(n.line,le.line));Qe<=It;Qe++){var At=xe(o,Qe).text,ot=Re(At,$e,ke);$e==ft?me.push(new Fe(O(Qe,ot),O(Qe,ot))):At.length>ot&&me.push(new Fe(O(Qe,ot),O(Qe,Re(At,ft,ke))))}me.length||me.push(new Fe(n,n)),wt(o,er(e,s.ranges.slice(0,l).concat(me),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(le)}else{var Ot=a,mt=Rl(e,le,r.unit),lt=Ot.anchor,at;ce(mt.anchor,lt)>0?(at=mt.head,lt=Gr(Ot.from(),mt.anchor)):(at=mt.anchor,lt=Mt(Ot.to(),mt.head));var rt=s.ranges.slice(0);rt[l]=Mu(e,new Fe(Te(o,lt),at)),wt(o,er(e,rt,l),Xe)}}var _=i.wrapper.getBoundingClientRect(),P=0;function $(le){var me=++P,ke=Or(e,le,!0,r.unit=="rectangle");if(ke)if(ce(ke,h)!=0){e.curOp.focus=Ae(He(e)),C(ke);var _e=mi(i,o);(ke.line>=_e.to||ke.line<_e.from)&&setTimeout(dt(e,function(){P==me&&$(le)}),150)}else{var Oe=le.clientY<_.top?-20:le.clientY>_.bottom?20:0;Oe&&setTimeout(dt(e,function(){P==me&&(i.scroller.scrollTop+=Oe,$(le))}),50)}}function te(le){e.state.selectingText=!1,P=1/0,le&&(xt(le),i.input.focus()),bt(i.wrapper.ownerDocument,"mousemove",ae),bt(i.wrapper.ownerDocument,"mouseup",de),o.history.lastSelOrigin=null}var ae=dt(e,function(le){le.buttons===0||!Gt(le)?te(le):$(le)}),de=dt(e,te);e.state.selectingText=de,Ce(i.wrapper.ownerDocument,"mousemove",ae),Ce(i.wrapper.ownerDocument,"mouseup",de)}function Mu(e,t){var n=t.anchor,r=t.head,i=xe(e.doc,n.line);if(ce(n,r)==0&&n.sticky==r.sticky)return t;var o=Me(i);if(!o)return t;var a=Ht(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s=a+(l.from==n.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var c;if(r.line!=n.line)c=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var p=Ht(o,r.ch,r.sticky),h=p-a||(r.ch-n.ch)*(l.level==1?-1:1);p==s-1||p==s?c=h<0:c=h>0}var C=o[s+(c?-1:0)],_=c==(C.level==1),P=_?C.from:C.to,$=_?"after":"before";return n.ch==P&&n.sticky==$?t:new Fe(new O(n.line,P,$),r)}function Kl(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(C){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&xt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Dt(e,n))return zt(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var p=f(e.doc,o),h=e.display.gutterSpecs[s];return Ze(e,n,e,p,h.className,t),zt(t)}}}function Mo(e,t){return Kl(e,t,"gutterClick",!0)}function Ul(e,t){dr(e.display,t)||Nu(e,t)||et(e,t,"contextmenu")||w||e.display.input.onContextMenu(t)}function Nu(e,t){return Dt(e,"gutterContextMenu")?Kl(e,t,"gutterContextMenu",!1):!1}function Gl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Mn(e)}var dn={toString:function(){return"CodeMirror.Init"}},Yl={},Mi={};function Tu(e){var t=e.optionHandlers;function n(r,i,o,a){e.defaults[r]=i,o&&(t[r]=a?function(l,s,c){c!=dn&&o(l,s,c)}:o)}e.defineOption=n,e.Init=dn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,yo(r)},!0),n("indentUnit",2,yo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Dn(r),Mn(r),Nt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],a=r.doc.first;r.doc.iter(function(s){for(var c=0;;){var p=s.text.indexOf(i,c);if(p==-1)break;c=p+i.length,o.push(O(a,p))}a++});for(var l=o.length-1;l>=0;l--)ln(r.doc,i,o[l],O(o[l].line,o[l].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!=dn&&r.refresh()}),n("specialCharPlaceholder",oc,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",B?"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",!he),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Gl(r),En(r)},!0),n("keyMap","default",function(r,i,o){var a=Li(i),l=o!=dn&&Li(o);l&&l.detach&&l.detach(r,a),a.attach&&a.attach(r,l||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ou,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=go(i,r.options.lineNumbers),En(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?no(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return rn(r)},!0),n("scrollbarStyle","native",function(r){Xa(r),rn(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=go(r.options.gutters,i),En(r)},!0),n("firstLineNumber",1,En,!0),n("lineNumberFormatter",function(r){return r},En,!0),n("showCursorWhenSelecting",!1,Nn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(en(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,Au),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Nn,!0),n("singleCursorHeightPerLine",!0,Nn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Dn,!0),n("addModeClass",!1,Dn,!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,Dn,!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 Au(e,t,n){var r=n&&n!=dn;if(!t!=!r){var i=e.display.dragFunctions,o=t?Ce:bt;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 Ou(e){e.options.lineWrapping?(Ve(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Ui(e)),io(e),Nt(e),Mn(e),setTimeout(function(){return rn(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?oe(t):{},oe(Yl,t,!1);var r=t.value;typeof r=="string"?r=new Tt(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 Rc(e,r,i,t);o.wrapper.CodeMirror=this,Gl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Xa(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 Ne,keySeq:null,specialChars:null},t.autofocus&&!B&&o.input.focus(),x&&re<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Pu(this),uu(),Dr(this),this.curOp.forceUpdate=!0,ll(this,r),t.autofocus&&!B||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&so(n)},20):en(this);for(var a in Mi)Mi.hasOwnProperty(a)&&Mi[a](this,t[a],dn);el(this),t.finishInit&&t.finishInit(this);for(var l=0;l<No.length;++l)No[l](this);qr(this),I&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Ge.defaults=Yl,Ge.optionHandlers=Mi;function Pu(e){var t=e.display;Ce(t.scroller,"mousedown",dt(e,$l)),x&&re<11?Ce(t.scroller,"dblclick",dt(e,function(s){if(!et(e,s)){var c=Or(e,s);if(!(!c||Mo(e,s)||dr(e.display,s))){xt(s);var p=e.findWordAt(c);wi(e.doc,p.anchor,p.head)}}})):Ce(t.scroller,"dblclick",function(s){return et(e,s)||xt(s)}),Ce(t.scroller,"contextmenu",function(s){return Ul(e,s)}),Ce(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Ul(e,s)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var c=s.touches[0];return c.radiusX<=1&&c.radiusY<=1}function a(s,c){if(c.left==null)return!0;var p=c.left-s.left,h=c.top-s.top;return p*p+h*h>20*20}Ce(t.scroller,"touchstart",function(s){if(!et(e,s)&&!o(s)&&!Mo(e,s)){t.input.ensurePolled(),clearTimeout(n);var c=+new Date;t.activeTouch={start:c,moved:!1,prev:c-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(s){var c=t.activeTouch;if(c&&!dr(t,s)&&c.left!=null&&!c.moved&&new Date-c.start<300){var p=e.coordsChar(t.activeTouch,"page"),h;!c.prev||a(c,c.prev)?h=new Fe(p,p):!c.prev.prev||a(c,c.prev.prev)?h=e.findWordAt(p):h=new Fe(O(p.line,0),Te(e.doc,O(p.line+1,0))),e.setSelection(h.anchor,h.head),e.focus(),xt(s)}i()}),Ce(t.scroller,"touchcancel",i),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),jr(e,t.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(s){return nl(e,s)}),Ce(t.scroller,"DOMMouseScroll",function(s){return nl(e,s)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){et(e,s)||mr(s)},over:function(s){et(e,s)||(cu(e,s),mr(s))},start:function(s){return su(e,s)},drop:dt(e,lu),leave:function(s){et(e,s)||Al(e)}};var l=t.input.getField();Ce(l,"keyup",function(s){return Bl.call(e,s)}),Ce(l,"keydown",dt(e,Hl)),Ce(l,"keypress",dt(e,Vl)),Ce(l,"focus",function(s){return so(e,s)}),Ce(l,"blur",function(s){return en(e,s)})}var No=[];Ge.defineInitHook=function(e){return No.push(e)};function Yn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=_n(e,t).state:n="prev");var a=e.options.tabSize,l=xe(i,t),s=Pe(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c=l.text.match(/^\s*/)[0],p;if(!r&&!/\S/.test(l.text))p=0,n="not";else if(n=="smart"&&(p=i.mode.indent(o,l.text.slice(c.length),l.text),p==gt||p>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?p=Pe(xe(i,t-1).text,null,a):p=0:n=="add"?p=s+e.options.indentUnit:n=="subtract"?p=s-e.options.indentUnit:typeof n=="number"&&(p=s+n),p=Math.max(0,p);var h="",C=0;if(e.options.indentWithTabs)for(var _=Math.floor(p/a);_;--_)C+=a,h+=" ";if(C<p&&(h+=k(p-C)),h!=c)return ln(i,h,O(t,0),O(t,c.length),"+input"),l.stateAfter=null,!0;for(var P=0;P<i.sel.ranges.length;P++){var $=i.sel.ranges[P];if($.head.line==t&&$.head.ch<c.length){var te=O(t,c.length);ko(i,P,new Fe(te,te));break}}}var tr=null;function Ni(e){tr=e}function To(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=Kt(t),c=null;if(l&&r.ranges.length>1)if(tr&&tr.text.join(`
- `)==t){if(r.ranges.length%tr.text.length==0){c=[];for(var p=0;p<tr.text.length;p++)c.push(o.splitLines(tr.text[p]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=qe(s,function(ae){return[ae]}));for(var h=e.curOp.updateInput,C=r.ranges.length-1;C>=0;C--){var _=r.ranges[C],P=_.from(),$=_.to();_.empty()&&(n&&n>0?P=O(P.line,P.ch-n):e.state.overwrite&&!l?$=O($.line,Math.min(xe(o,$.line).text.length,$.ch+ie(s).length)):l&&tr&&tr.lineWise&&tr.text.join(`
- `)==s.join(`
- `)&&(P=$=O(P.line,0)));var te={from:P,to:$,text:c?c[C%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};an(e.doc,te),ut(e,"inputRead",e,te)}t&&!l&&Xl(e,t),tn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ql(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&qt(t,function(){return To(t,n,0,null,"paste")}),!0}function Xl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Yn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Yn(e,i.head.line,"smart"));a&&ut(e,"electricInput",e,i.head.line)}}}function Jl(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:O(i,0),head:O(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Ao(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function Zl(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return I?e.style.width="1000px":e.setAttribute("wrap","off"),J&&(e.style.border="1px solid black"),t}function ju(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){Se(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,a=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&&dt(this,t[r])(this,i,a),Ze(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](Li(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:St(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");z(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,Nt(this)}),removeOverlay:St(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==r||typeof r=="string"&&a.name==r){i.splice(o,1),this.state.modeGen++,Nt(this);return}}}),indentLine:St(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),F(this.doc,r)&&Yn(this,r,i,o)}),indentSelection:St(function(r){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(Yn(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&tn(this));else{var s=l.from(),c=l.to(),p=Math.max(o,s.line);o=Math.min(this.lastLine(),c.line-(c.ch?0:1))+1;for(var h=p;h<o;++h)Yn(this,h,r);var C=this.doc.sel.ranges;s.ch==0&&i.length==C.length&&C[a].from().ch>0&&ko(this.doc,a,new Fe(s,C[a].to()),ge)}}}),getTokenAt:function(r,i){return ca(this,r,i)},getLineTokens:function(r,i){return ca(this,O(r),i,!0)},getTokenTypeAt:function(r){r=Te(this.doc,r);var i=aa(this,xe(this.doc,r.line)),o=0,a=(i.length-1)/2,l=r.ch,s;if(l==0)s=i[2];else for(;;){var c=o+a>>1;if((c?i[c*2-1]:0)>=l)a=c;else if(i[c*2+1]<l)o=c+1;else{s=i[c*2+2];break}}var p=s?s.indexOf("overlay "):-1;return p<0?s:p==0?null:s.slice(0,p-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var a=n[i],l=this.getModeAt(r);if(typeof l[i]=="string")a[l[i]]&&o.push(a[l[i]]);else if(l[i])for(var s=0;s<l[i].length;s++){var c=a[l[i][s]];c&&o.push(c)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var p=0;p<a._global.length;p++){var h=a._global[p];h.pred(l,this)&&be(o,h.val)==-1&&o.push(h.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=na(o,r!=null?r:o.first+o.size-1),_n(this,r+1,i).state},cursorCoords:function(r,i){var o,a=this.doc.sel.primary();return r==null?o=a.head:typeof r=="object"?o=Te(this.doc,r):o=r?a.from():a.to(),Zt(this,o,i||"page")},charCoords:function(r,i){return di(this,Te(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Ia(this,r,i||"page"),eo(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Ia(this,{top:r,left:0},i||"page").top,f(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var a=!1,l;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,a=!0),l=xe(this.doc,r)}else l=r;return ui(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-ur(l):0)},defaultTextHeight:function(){return Jr(this.display)},defaultCharWidth:function(){return Zr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,a,l){var s=this.display;r=Zt(this,Te(this.doc,r));var c=r.bottom,p=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")c=r.top;else if(a=="above"||a=="near"){var h=Math.max(s.wrapper.clientHeight,this.doc.height),C=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>h)&&r.top>i.offsetHeight?c=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=h&&(c=r.bottom),p+i.offsetWidth>C&&(p=C-i.offsetWidth)}i.style.top=c+"px",i.style.left=i.style.right="",l=="right"?(p=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?p=0:l=="middle"&&(p=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=p+"px"),o&&Ac(this,{left:p,top:c,right:p+i.offsetWidth,bottom:c+i.offsetHeight})},triggerOnKeyDown:St(Hl),triggerOnKeyPress:St(Vl),triggerOnKeyUp:Bl,triggerOnMouseDown:St($l),execCommand:function(r){if(Rn.hasOwnProperty(r))return Rn[r].call(null,this)},triggerElectric:St(function(r){Xl(this,r)}),findPosH:function(r,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Te(this.doc,r),c=0;c<i&&(s=Oo(this.doc,s,l,o,a),!s.hitSide);++c);return s},moveH:St(function(r,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?Oo(o.doc,a.head,r,i,o.options.rtlMoveVisually):r<0?a.from():a.to()},De)}),deleteH:St(function(r,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):un(this,function(l){var s=Oo(a,l.head,r,i,!1);return r<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(r,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var c=Te(this.doc,r),p=0;p<i;++p){var h=Zt(this,c,"div");if(s==null?s=h.left:h.left=s,c=es(this,h,l,o),c.hitSide)break}return c},moveV:St(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(p){if(s)return r<0?p.from():p.to();var h=Zt(o,p.head,"div");p.goalColumn!=null&&(h.left=p.goalColumn),l.push(h.left);var C=es(o,h,r,i);return i=="page"&&p==a.sel.primary()&&uo(o,di(o,C,"div").top-h.top),C},De),l.length)for(var c=0;c<a.sel.ranges.length;c++)a.sel.ranges[c].goalColumn=l[c]}),findWordAt:function(r){var i=this.doc,o=xe(i,r.line).text,a=r.ch,l=r.ch;if(o){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||l==o.length)&&a?--a:++l;for(var c=o.charAt(a),p=Ue(c,s)?function(h){return Ue(h,s)}:/\s/.test(c)?function(h){return/\s/.test(h)}:function(h){return!/\s/.test(h)&&!Ue(h)};a>0&&p(o.charAt(a-1));)--a;for(;l<o.length&&p(o.charAt(l));)++l}return new Fe(O(r.line,a),O(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ve(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ae(He(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:St(function(r,i){Tn(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-ir(this)-this.display.barHeight,width:r.scrollWidth-ir(this)-this.display.barWidth,clientHeight:Qi(this),clientWidth:Tr(this)}},scrollIntoView:St(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:O(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?Oc(this,r):Ua(this,r.from,r.to,r.margin)}),setSize:St(function(r,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=a(r)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&Ea(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var c=0;c<s.widgets.length;c++)if(s.widgets[c].noHScroll){xr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(r){return qt(this,r)},startOperation:function(){return Dr(this)},endOperation:function(){return qr(this)},refresh:St(function(){var r=this.display.cachedTextHeight;Nt(this),this.curOp.forceUpdate=!0,Mn(this),Tn(this,this.doc.scrollLeft,this.doc.scrollTop),ho(this.display),(r==null||Math.abs(r-Jr(this.display))>.5||this.options.lineWrapping)&&io(this),Ze(this,"refresh",this)}),swapDoc:St(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ll(this,r),Mn(this),this.display.input.reset(),Tn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ut(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}},Ut(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,a){e.registerHelper(r,i,a),n[r]._global.push({pred:o,val:a})}}function Oo(e,t,n,r,i){var o=t,a=n,l=xe(e,t.line),s=i&&e.direction=="rtl"?-n:n;function c(){var de=t.line+s;return de<e.first||de>=e.first+e.size?!1:(t=new O(de,t.ch,t.sticky),l=xe(e,de))}function p(de){var le;if(r=="codepoint"){var me=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(me))le=null;else{var ke=n>0?me>=55296&&me<56320:me>=56320&&me<57343;le=new O(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(ke?2:1))),-n)}}else i?le=mu(e.cm,l,t,n):le=So(l,t,n);if(le==null)if(!de&&c())t=Co(i,e.cm,l,t.line,s);else return!1;else t=le;return!0}if(r=="char"||r=="codepoint")p();else if(r=="column")p(!0);else if(r=="word"||r=="group")for(var h=null,C=r=="group",_=e.cm&&e.cm.getHelper(t,"wordChars"),P=!0;!(n<0&&!p(!P));P=!1){var $=l.text.charAt(t.ch)||`
- `,te=Ue($,_)?"w":C&&$==`
- `?"n":!C||/\s/.test($)?null:"p";if(C&&!P&&!te&&(te="s"),h&&h!=te){n<0&&(n=1,p(),t.sticky="after");break}if(te&&(h=te),n>0&&!p(!P))break}var ae=_i(e,t,o,a,!0);return Ie(o,ae)&&(ae.hitSide=!0),ae}function es(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,Se(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(l-.5*Jr(e.display),3);a=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(a=n>0?t.bottom+3:t.top-3);for(var c;c=eo(e,o,a),!!c.outside;){if(n<0?a<=0:a>=i.height){c.hitSide=!0;break}a+=n*5}return c}var Be=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Be.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Ao(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}Ce(i,"paste",function(l){!o(l)||et(r,l)||Ql(l,r)||re<=11&&setTimeout(dt(r,function(){return t.updateFromDOM()}),20)}),Ce(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),Ce(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),Ce(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(i,"touchstart",function(){return n.forceCompositionEnd()}),Ce(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||et(r,l))){if(r.somethingSelected())Ni({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=Jl(r);Ni({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,ge),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var c=tr.text.join(`
- `);if(l.clipboardData.setData("Text",c),l.clipboardData.getData("Text")==c){l.preventDefault();return}}var p=Zl(),h=p.firstChild;Ao(h),r.display.lineSpace.insertBefore(p,r.display.lineSpace.firstChild),h.value=tr.text.join(`
- `);var C=Ae(je(i));Wt(h),setTimeout(function(){r.display.lineSpace.removeChild(p),C.focus(),C==i&&n.showPrimarySelection()},50)}}Ce(i,"copy",a),Ce(i,"cut",a)},Be.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Be.prototype.prepareSelection=function(){var e=$a(this.cm,!1);return e.focus=Ae(je(this.div))==this.div,e},Be.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Be.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Be.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){e.removeAllRanges();return}var o=Ti(t,e.anchorNode,e.anchorOffset),a=Ti(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&ce(Gr(o,a),r)==0&&ce(Mt(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&ts(t,r)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&ts(t,i);if(!c){var p=l[l.length-1].measure,h=p.maps?p.maps[p.maps.length-1]:p.map;c={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(!s||!c){e.removeAllRanges();return}var C=e.rangeCount&&e.getRangeAt(0),_;try{_=K(s.node,s.offset,c.offset,c.node)}catch(P){}_&&(!W&&t.state.focused?(e.collapse(s.node,s.offset),_.collapsed||(e.removeAllRanges(),e.addRange(_))):(e.removeAllRanges(),e.addRange(_)),C&&e.anchorNode==null?e.addRange(C):W&&this.startGracePeriod()),this.rememberSelection()}},Be.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Be.prototype.showMultipleSelections=function(e){M(this.cm.display.cursorDiv,e.cursors),M(this.cm.display.selectionDiv,e.selection)},Be.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Be.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ve(this.div,t)},Be.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Ae(je(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Be.prototype.blur=function(){this.div.blur()},Be.prototype.getField=function(){return this.div},Be.prototype.supportsTouch=function(){return!0},Be.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):qt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},Be.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Be.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(N&&E&&this.cm.display.gutterSpecs.length&&Eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=Ti(t,e.anchorNode,e.anchorOffset),r=Ti(t,e.focusNode,e.focusOffset);n&&r&&qt(t,function(){wt(t.doc,kr(n,r),ge),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Be.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=O(r.line-1,xe(e.doc,r.line-1).length)),i.ch==xe(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=O(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||(o=Pr(e,r.line))==0?(a=u(t.view[0].line),l=t.view[0].node):(a=u(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=Pr(e,i.line),c,p;if(s==t.view.length-1?(c=t.viewTo-1,p=t.lineDiv.lastChild):(c=u(t.view[s+1].line)-1,p=t.view[s+1].node.previousSibling),!l)return!1;for(var h=e.doc.splitLines(Du(e,l,p,a,c)),C=sr(e.doc,O(a,0),O(c,xe(e.doc,c).text.length));h.length>1&&C.length>1;)if(ie(h)==ie(C))h.pop(),C.pop(),c--;else if(h[0]==C[0])h.shift(),C.shift(),a++;else break;for(var _=0,P=0,$=h[0],te=C[0],ae=Math.min($.length,te.length);_<ae&&$.charCodeAt(_)==te.charCodeAt(_);)++_;for(var de=ie(h),le=ie(C),me=Math.min(de.length-(h.length==1?_:0),le.length-(C.length==1?_:0));P<me&&de.charCodeAt(de.length-P-1)==le.charCodeAt(le.length-P-1);)++P;if(h.length==1&&C.length==1&&a==r.line)for(;_&&_>r.ch&&de.charCodeAt(de.length-P-1)==le.charCodeAt(le.length-P-1);)_--,P++;h[h.length-1]=de.slice(0,de.length-P).replace(/^\u200b+/,""),h[0]=h[0].slice(_).replace(/\u200b+$/,"");var ke=O(a,_),_e=O(c,C.length?ie(C).length-P:0);if(h.length>1||h[0]||ce(ke,_e))return ln(e.doc,h,ke,_e,"+input"),!0},Be.prototype.ensurePolled=function(){this.forceCompositionEnd()},Be.prototype.reset=function(){this.forceCompositionEnd()},Be.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Be.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))},Be.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&qt(this.cm,function(){return Nt(e.cm)})},Be.prototype.setUneditable=function(e){e.contentEditable="false"},Be.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||dt(this.cm,To)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Be.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Be.prototype.onContextMenu=function(){},Be.prototype.resetPosition=function(){},Be.prototype.needsContentAttribute=!0;function ts(e,t){var n=Xi(e,t.line);if(!n||n.hidden)return null;var r=xe(e.doc,t.line),i=Ta(n,r,t.line),o=Me(r,e.doc.direction),a="left";if(o){var l=Ht(o,t.ch);a=l%2?"right":"left"}var s=Pa(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function pn(e,t){return t&&(e.bad=!0),e}function Du(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(_){return function(P){return P.id==_}}function p(){a&&(o+=l,s&&(o+=l),a=s=!1)}function h(_){_&&(p(),o+=_)}function C(_){if(_.nodeType==1){var P=_.getAttribute("cm-text");if(P){h(P);return}var $=_.getAttribute("cm-marker"),te;if($){var ae=e.findMarks(O(r,0),O(i+1,0),c(+$));ae.length&&(te=ae[0].find(0))&&h(sr(e.doc,te.from,te.to).join(l));return}if(_.getAttribute("contenteditable")=="false")return;var de=/^(pre|div|p|li|table|br)$/i.test(_.nodeName);if(!/^br$/i.test(_.nodeName)&&_.textContent.length==0)return;de&&p();for(var le=0;le<_.childNodes.length;le++)C(_.childNodes[le]);/^(pre|p)$/i.test(_.nodeName)&&(s=!0),de&&(a=!0)}else _.nodeType==3&&h(_.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;C(t),t!=n;)t=t.nextSibling,s=!1;return o}function Ti(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return pn(e.clipPos(O(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return qu(o,t,n)}}function qu(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!ve(r,t))return pn(O(u(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?ie(e.rest):e.line;return pn(O(u(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=e.measure,c=s.maps;function p(te,ae,de){for(var le=-1;le<(c?c.length:0);le++)for(var me=le<0?s.map:c[le],ke=0;ke<me.length;ke+=3){var _e=me[ke+2];if(_e==te||_e==ae){var Oe=u(le<0?e.line:e.rest[le]),$e=me[ke]+de;return(de<0||_e!=te)&&($e=me[ke+(de?1:0)]),O(Oe,$e)}}}var h=p(a,l,n);if(h)return pn(h,i);for(var C=l.nextSibling,_=a?a.nodeValue.length-n:0;C;C=C.nextSibling){if(h=p(C,C.firstChild,0),h)return pn(O(h.line,h.ch-_),i);_+=C.textContent.length}for(var P=l.previousSibling,$=n;P;P=P.previousSibling){if(h=p(P,P.firstChild,-1),h)return pn(O(h.line,h.ch+$),i);$+=P.textContent.length}}var it=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ne,this.hasSelection=!1,this.composing=null,this.resetting=!1};it.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),J&&(i.style.width="0px"),Ce(i,"input",function(){x&&re>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Ce(i,"paste",function(a){et(r,a)||Ql(a,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(a){if(!et(r,a)){if(r.somethingSelected())Ni({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=Jl(r);Ni({lineWise:!0,text:l.text}),a.type=="cut"?r.setSelections(l.ranges,null,ge):(n.prevInput="",i.value=l.text.join(`
- `),Wt(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ce(i,"cut",o),Ce(i,"copy",o),Ce(e.scroller,"paste",function(a){if(!(dr(e,a)||et(r,a))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),Ce(e.lineSpace,"selectstart",function(a){dr(e,a)||xt(a)}),Ce(i,"compositionstart",function(){var a=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:a,range:r.markText(a,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},it.prototype.createField=function(e){this.wrapper=Zl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ao(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},it.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},it.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=$a(e);if(e.options.moveInputWithCursor){var i=Zt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},it.prototype.showSelection=function(e){var t=this.cm,n=t.display;M(n.cursorDiv,e.cursors),M(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},it.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&&Wt(this.textarea),x&&re>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",x&&re>=9&&(this.hasSelection=null));this.resetting=!1}},it.prototype.getField=function(){return this.textarea},it.prototype.supportsTouch=function(){return!1},it.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!B||Ae(je(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},it.prototype.blur=function(){this.textarea.blur()},it.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},it.prototype.receivedFocus=function(){this.slowPoll()},it.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},it.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)},it.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||vr(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(x&&re>=9&&this.hasSelection===i||G&&/[\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="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return qt(t,function(){To(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||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},it.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},it.prototype.onKeyPress=function(){x&&re>=9&&(this.hasSelection=null),this.fastPoll()},it.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Or(n,e),a=r.scroller.scrollTop;if(!o||H)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&dt(n,wt)(n.doc,kr(o),ge);var s=i.style.cssText,c=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
- top: `+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+`px;
- z-index: 1000; background: `+(x?"rgba(255, 255, 255, .05)":"transparent")+`;
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var h;I&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),I&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=_,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function C(){if(i.selectionStart!=null){var $=n.somethingSelected(),te="\u200B"+($?i.value:"");i.value="\u21DA",i.value=te,t.prevInput=$?"":"\u200B",i.selectionStart=1,i.selectionEnd=te.length,r.selForContextMenu=n.doc.sel}}function _(){if(t.contextMenuPending==_&&(t.contextMenuPending=!1,t.wrapper.style.cssText=c,i.style.cssText=s,x&&re<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!x||x&&re<9)&&C();var $=0,te=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?dt(n,xl)(n):$++<10?r.detectingSelectAll=setTimeout(te,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(te,200)}}if(x&&re>=9&&C(),w){mr(e);var P=function(){bt(window,"mouseup",P),setTimeout(_,20)};Ce(window,"mouseup",P)}else setTimeout(_,50)},it.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},it.prototype.setUneditable=function(){},it.prototype.needsContentAttribute=!1;function Iu(e,t){if(t=t?oe(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=Ae(je(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(Ce(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}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&&(bt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function Fu(e){e.off=bt,e.on=Ce,e.wheelEventPixels=Kc,e.Doc=Tt,e.splitLines=Kt,e.countColumn=Pe,e.findColumn=Re,e.isWordChar=Ke,e.Pass=gt,e.signal=Ze,e.Line=Yr,e.changeEnd=_r,e.scrollbarModel=Qa,e.Pos=O,e.cmpPos=ce,e.modes=Br,e.mimeModes=Qt,e.resolveMode=$r,e.getMode=Rr,e.modeExtensions=yr,e.extendMode=Kr,e.copyState=rr,e.startState=Ur,e.innerMode=wn,e.commands=Rn,e.keyMap=fr,e.keyName=Dl,e.isModifierKey=jl,e.lookupKey=cn,e.normalizeKeyMap=hu,e.StringStream=tt,e.SharedTextMarker=Bn,e.TextMarker=Cr,e.LineWidget=Hn,e.e_preventDefault=xt,e.e_stopPropagation=Wr,e.e_stop=mr,e.addClass=Ve,e.contains=ve,e.rmClass=T,e.keyNames=Lr}Tu(Ge),ju(Ge);var Wu="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Tt.prototype)Tt.prototype.hasOwnProperty(Ai)&&be(Wu,Ai)<0&&(Ge.prototype[Ai]=function(e){return function(){return e.apply(this.doc,arguments)}}(Tt.prototype[Ai]));return Ut(Tt),Ge.inputStyles={textarea:it,contenteditable:Be},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Xt.apply(this,arguments)},Ge.defineMIME=Vr,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){Tt.prototype[e]=t},Ge.fromTextArea=Iu,Fu(Ge),Ge.version="5.65.16",Ge})}(jt)),jt.exports}var Pi=We();const Qn=Ru(Pi);Mr=(g=>(g.JSON="application/json",g.HTML="htmlmixed",g.JS="javascript",g.SQL="text/x-mysql",g.VUE="vue",g))(Mr||{});var ji={exports:{}};(function(g,X){(function(m){m(We())})(function(m){m.defineMode("javascript",function(R,W){var pe=R.indentUnit,D=W.statementIndent,q=W.jsonld,x=W.json||q,re=W.trackScope!==!1,I=W.typescript,ne=W.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function u(ct){return{type:ct,style:"keyword"}}var f=u("keyword a"),F=u("keyword b"),ee=u("keyword c"),O=u("keyword d"),ce=u("operator"),Ie={type:"atom",style:"atom"};return{if:u("if"),while:f,with:f,else:F,do:F,try:F,finally:F,return:O,break:O,continue:O,new:u("new"),delete:ee,void:ee,throw:ee,debugger:u("debugger"),var:u("var"),const:u("var"),let:u("var"),function:u("function"),catch:u("catch"),for:u("for"),switch:u("switch"),case:u("case"),default:u("default"),in:ce,typeof:ce,instanceof:ce,true:Ie,false:Ie,null:Ie,undefined:Ie,NaN:Ie,Infinity:Ie,this:u("this"),class:u("class"),super:u("atom"),yield:ee,export:u("export"),import:u("import"),extends:ee,await:ee}}(),Q=/[+\-*&%=<>!?|~^@]/,H=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Y(u){for(var f=!1,F,ee=!1;(F=u.next())!=null;){if(!f){if(F=="/"&&!ee)return;F=="["?ee=!0:ee&&F=="]"&&(ee=!1)}f=!f&&F=="\\"}}var ye,ue;function J(u,f,F){return ye=u,ue=F,f}function N(u,f){var F=u.next();if(F=='"'||F=="'")return f.tokenize=B(F),f.tokenize(u,f);if(F=="."&&u.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return J("number","number");if(F=="."&&u.match(".."))return J("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(F))return J(F);if(F=="="&&u.eat(">"))return J("=>","operator");if(F=="0"&&u.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return J("number","number");if(/\d/.test(F))return u.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),J("number","number");if(F=="/")return u.eat("*")?(f.tokenize=G,G(u,f)):u.eat("/")?(u.skipToEnd(),J("comment","comment")):Bt(u,f,1)?(Y(u),u.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),J("regexp","string-2")):(u.eat("="),J("operator","operator",u.current()));if(F=="`")return f.tokenize=se,se(u,f);if(F=="#"&&u.peek()=="!")return u.skipToEnd(),J("meta","meta");if(F=="#"&&u.eatWhile(ne))return J("variable","property");if(F=="<"&&u.match("!--")||F=="-"&&u.match("->")&&!/\S/.test(u.string.slice(0,u.start)))return u.skipToEnd(),J("comment","comment");if(Q.test(F))return(F!=">"||!f.lexical||f.lexical.type!=">")&&(u.eat("=")?(F=="!"||F=="=")&&u.eat("="):/[<>*+\-|&?]/.test(F)&&(u.eat(F),F==">"&&u.eat(F))),F=="?"&&u.eat(".")?J("."):J("operator","operator",u.current());if(ne.test(F)){u.eatWhile(ne);var ee=u.current();if(f.lastType!="."){if(E.propertyIsEnumerable(ee)){var O=E[ee];return J(O.type,O.style,ee)}if(ee=="async"&&u.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return J("async","keyword",ee)}return J("variable","variable",ee)}}function B(u){return function(f,F){var ee=!1,O;if(q&&f.peek()=="@"&&f.match(H))return F.tokenize=N,J("jsonld-keyword","meta");for(;(O=f.next())!=null&&!(O==u&&!ee);)ee=!ee&&O=="\\";return ee||(F.tokenize=N),J("string","string")}}function G(u,f){for(var F=!1,ee;ee=u.next();){if(ee=="/"&&F){f.tokenize=N;break}F=ee=="*"}return J("comment","comment")}function se(u,f){for(var F=!1,ee;(ee=u.next())!=null;){if(!F&&(ee=="`"||ee=="$"&&u.eat("{"))){f.tokenize=N;break}F=!F&&ee=="\\"}return J("quasi","string-2",u.current())}var he="([{}])";function fe(u,f){f.fatArrowAt&&(f.fatArrowAt=null);var F=u.string.indexOf("=>",u.start);if(!(F<0)){if(I){var ee=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(u.string.slice(u.start,F));ee&&(F=ee.index)}for(var O=0,ce=!1,Ie=F-1;Ie>=0;--Ie){var ct=u.string.charAt(Ie),Mt=he.indexOf(ct);if(Mt>=0&&Mt<3){if(!O){++Ie;break}if(--O==0){ct=="("&&(ce=!0);break}}else if(Mt>=3&&Mt<6)++O;else if(ne.test(ct))ce=!0;else if(/["'\/`]/.test(ct))for(;;--Ie){if(Ie==0)return;var Gr=u.string.charAt(Ie-1);if(Gr==ct&&u.string.charAt(Ie-2)!="\\"){Ie--;break}}else if(ce&&!O){++Ie;break}}ce&&!O&&(f.fatArrowAt=Ie)}}var A={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(u,f,F,ee,O,ce){this.indented=u,this.column=f,this.type=F,this.prev=O,this.info=ce,ee!=null&&(this.align=ee)}function L(u,f){if(!re)return!1;for(var F=u.localVars;F;F=F.next)if(F.name==f)return!0;for(var ee=u.context;ee;ee=ee.prev)for(var F=ee.vars;F;F=F.next)if(F.name==f)return!0}function T(u,f,F,ee,O){var ce=u.cc;for(b.state=u,b.stream=O,b.marked=null,b.cc=ce,b.style=f,u.lexical.hasOwnProperty("align")||(u.lexical.align=!0);;){var Ie=ce.length?ce.pop():x?be:Pe;if(Ie(F,ee)){for(;ce.length&&ce[ce.length-1].lex;)ce.pop()();return b.marked?b.marked:F=="variable"&&L(u,ee)?"variable-2":f}}}var b={state:null,column:null,marked:null,cc:null};function M(){for(var u=arguments.length-1;u>=0;u--)b.cc.push(arguments[u])}function d(){return M.apply(null,arguments),!0}function U(u,f){for(var F=f;F;F=F.next)if(F.name==u)return!0;return!1}function K(u){var f=b.state;if(b.marked="def",!!re){if(f.context){if(f.lexical.info=="var"&&f.context&&f.context.block){var F=ve(u,f.context);if(F!=null){f.context=F;return}}else if(!U(u,f.localVars)){f.localVars=new _t(u,f.localVars);return}}W.globalVars&&!U(u,f.globalVars)&&(f.globalVars=new _t(u,f.globalVars))}}function ve(u,f){if(f)if(f.block){var F=ve(u,f.prev);return F?F==f.prev?f:new Ve(F,f.vars,!0):null}else return U(u,f.vars)?f:new Ve(f.prev,new _t(u,f.vars),!1);else return null}function Ae(u){return u=="public"||u=="private"||u=="protected"||u=="abstract"||u=="readonly"}function Ve(u,f,F){this.prev=u,this.vars=f,this.block=F}function _t(u,f){this.name=u,this.next=f}var Wt=new _t("this",new _t("arguments",null));function nt(){b.state.context=new Ve(b.state.context,b.state.localVars,!1),b.state.localVars=Wt}function He(){b.state.context=new Ve(b.state.context,b.state.localVars,!0),b.state.localVars=null}nt.lex=He.lex=!0;function je(){b.state.localVars=b.state.context.vars,b.state.context=b.state.context.prev}je.lex=!0;function Se(u,f){var F=function(){var ee=b.state,O=ee.indented;if(ee.lexical.type=="stat")O=ee.lexical.indented;else for(var ce=ee.lexical;ce&&ce.type==")"&&ce.align;ce=ce.prev)O=ce.indented;ee.lexical=new w(O,b.stream.column(),u,null,ee.lexical,f)};return F.lex=!0,F}function Le(){var u=b.state;u.lexical.prev&&(u.lexical.type==")"&&(u.indented=u.lexical.indented),u.lexical=u.lexical.prev)}Le.lex=!0;function oe(u){function f(F){return F==u?d():u==";"||F=="}"||F==")"||F=="]"?M():d(f)}return f}function Pe(u,f){return u=="var"?d(Se("vardef",f),Wr,oe(";"),Le):u=="keyword a"?d(Se("form"),gt,Pe,Le):u=="keyword b"?d(Se("form"),Pe,Le):u=="keyword d"?b.stream.match(/^\s*$/,!1)?d():d(Se("stat"),Xe,oe(";"),Le):u=="debugger"?d(oe(";")):u=="{"?d(Se("}"),He,we,Le,je):u==";"?d():u=="if"?(b.state.lexical.info=="else"&&b.state.cc[b.state.cc.length-1]==Le&&b.state.cc.pop()(),d(Se("form"),gt,Pe,Le,Hr)):u=="function"?d(Kt):u=="for"?d(Se("form"),He,ei,Pe,je,Le):u=="class"||I&&f=="interface"?(b.marked="keyword",d(Se("form",u=="class"?u:f),Br,Le)):u=="variable"?I&&f=="declare"?(b.marked="keyword",d(Pe)):I&&(f=="module"||f=="enum"||f=="type")&&b.stream.match(/^\s*\w/,!1)?(b.marked="keyword",f=="enum"?d(xe):f=="type"?d(ti,oe("operator"),Me,oe(";")):d(Se("form"),zt,oe("{"),Se("}"),we,Le,Le)):I&&f=="namespace"?(b.marked="keyword",d(Se("form"),be,Pe,Le)):I&&f=="abstract"?(b.marked="keyword",d(Pe)):d(Se("stat"),Ee):u=="switch"?d(Se("form"),gt,oe("{"),Se("}","switch"),He,we,Le,Le,je):u=="case"?d(be,oe(":")):u=="default"?d(oe(":")):u=="catch"?d(Se("form"),nt,Ne,Pe,Le,je):u=="export"?d(Se("stat"),$r,Le):u=="import"?d(Se("stat"),yr,Le):u=="async"?d(Pe):f=="@"?d(be,Pe):M(Se("stat"),be,oe(";"),Le)}function Ne(u){if(u=="(")return d(Yt,oe(")"))}function be(u,f){return ge(u,f,!1)}function Ye(u,f){return ge(u,f,!0)}function gt(u){return u!="("?M():d(Se(")"),Xe,oe(")"),Le)}function ge(u,f,F){if(b.state.fatArrowAt==b.stream.start){var ee=F?qe:ie;if(u=="(")return d(nt,Se(")"),y(Yt,")"),Le,oe("=>"),ee,je);if(u=="variable")return M(nt,zt,oe("=>"),ee,je)}var O=F?Re:De;return A.hasOwnProperty(u)?d(O):u=="function"?d(Kt,O):u=="class"||I&&f=="interface"?(b.marked="keyword",d(Se("form"),Wi,Le)):u=="keyword c"||u=="async"?d(F?Ye:be):u=="("?d(Se(")"),Xe,oe(")"),Le,O):u=="operator"||u=="spread"?d(F?Ye:be):u=="["?d(Se("]"),tt,Le,O):u=="{"?V(Ue,"}",null,O):u=="quasi"?M(v,O):u=="new"?d(z(F)):d()}function Xe(u){return u.match(/[;\}\)\],]/)?M():M(be)}function De(u,f){return u==","?d(Xe):Re(u,f,!1)}function Re(u,f,F){var ee=F==!1?De:Re,O=F==!1?be:Ye;if(u=="=>")return d(nt,F?qe:ie,je);if(u=="operator")return/\+\+|--/.test(f)||I&&f=="!"?d(ee):I&&f=="<"&&b.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(Se(">"),y(Me,">"),Le,ee):f=="?"?d(be,oe(":"),O):d(O);if(u=="quasi")return M(v,ee);if(u!=";"){if(u=="(")return V(Ye,")","call",ee);if(u==".")return d(Ke,ee);if(u=="[")return d(Se("]"),Xe,oe("]"),Le,ee);if(I&&f=="as")return b.marked="keyword",d(Me,ee);if(u=="regexp")return b.state.lastType=b.marked="operator",b.stream.backUp(b.stream.pos-b.stream.start-1),d(O)}}function v(u,f){return u!="quasi"?M():f.slice(f.length-2)!="${"?d(v):d(Xe,k)}function k(u){if(u=="}")return b.marked="string-2",b.state.tokenize=se,d(v)}function ie(u){return fe(b.stream,b.state),M(u=="{"?Pe:be)}function qe(u){return fe(b.stream,b.state),M(u=="{"?Pe:Ye)}function z(u){return function(f){return f=="."?d(u?j:Z):f=="variable"&&I?d(Dt,u?Re:De):M(u?Ye:be)}}function Z(u,f){if(f=="target")return b.marked="keyword",d(De)}function j(u,f){if(f=="target")return b.marked="keyword",d(Re)}function Ee(u){return u==":"?d(Le,Pe):M(De,oe(";"),Le)}function Ke(u){if(u=="variable")return b.marked="property",d()}function Ue(u,f){if(u=="async")return b.marked="property",d(Ue);if(u=="variable"||b.style=="keyword"){if(b.marked="property",f=="get"||f=="set")return d(vt);var F;return I&&b.state.fatArrowAt==b.stream.start&&(F=b.stream.match(/^\s*:\s*/,!1))&&(b.state.fatArrowAt=b.stream.pos+F[0].length),d(S)}else{if(u=="number"||u=="string")return b.marked=q?"property":b.style+" property",d(S);if(u=="jsonld-keyword")return d(S);if(I&&Ae(f))return b.marked="keyword",d(Ue);if(u=="[")return d(be,Je,oe("]"),S);if(u=="spread")return d(Ye,S);if(f=="*")return b.marked="keyword",d(Ue);if(u==":")return M(S)}}function vt(u){return u!="variable"?M(S):(b.marked="property",d(Kt))}function S(u){if(u==":")return d(Ye);if(u=="(")return M(Kt)}function y(u,f,F){function ee(O,ce){if(F?F.indexOf(O)>-1:O==","){var Ie=b.state.lexical;return Ie.info=="call"&&(Ie.pos=(Ie.pos||0)+1),d(function(ct,Mt){return ct==f||Mt==f?M():M(u)},ee)}return O==f||ce==f?d():F&&F.indexOf(";")>-1?M(u):d(oe(f))}return function(O,ce){return O==f||ce==f?d():M(u,ee)}}function V(u,f,F){for(var ee=3;ee<arguments.length;ee++)b.cc.push(arguments[ee]);return d(Se(f,F),y(u,f),Le)}function we(u){return u=="}"?d():M(Pe,we)}function Je(u,f){if(I){if(u==":")return d(Me);if(f=="?")return d(Je)}}function st(u,f){if(I&&(u==":"||f=="in"))return d(Me)}function Ht(u){if(I&&u==":")return b.stream.match(/^\s*\w+\s+is\b/,!1)?d(be,Et,Me):d(Me)}function Et(u,f){if(f=="is")return b.marked="keyword",d()}function Me(u,f){if(f=="keyof"||f=="typeof"||f=="infer"||f=="readonly")return b.marked="keyword",d(f=="typeof"?Ye:Me);if(u=="variable"||f=="void")return b.marked="type",d(Rt);if(f=="|"||f=="&")return d(Me);if(u=="string"||u=="number"||u=="atom")return d(Rt);if(u=="[")return d(Se("]"),y(Me,"]",","),Le,Rt);if(u=="{")return d(Se("}"),Ce,Le,Rt);if(u=="(")return d(y(et,")"),yt,Rt);if(u=="<")return d(y(Me,">"),Me);if(u=="quasi")return M(bt,Rt)}function yt(u){if(u=="=>")return d(Me)}function Ce(u){return u.match(/[\}\)\]]/)?d():u==","||u==";"?d(Ce):M(lr,Ce)}function lr(u,f){if(u=="variable"||b.style=="keyword")return b.marked="property",d(lr);if(f=="?"||u=="number"||u=="string")return d(lr);if(u==":")return d(Me);if(u=="[")return d(oe("variable"),st,oe("]"),lr);if(u=="(")return M(vr,lr);if(!u.match(/[;\}\)\],]/))return d()}function bt(u,f){return u!="quasi"?M():f.slice(f.length-2)!="${"?d(bt):d(Me,Ze)}function Ze(u){if(u=="}")return b.marked="string-2",b.state.tokenize=se,d(bt)}function et(u,f){return u=="variable"&&b.stream.match(/^\s*[?:]/,!1)||f=="?"?d(et):u==":"?d(Me):u=="spread"?d(et):M(Me)}function Rt(u,f){if(f=="<")return d(Se(">"),y(Me,">"),Le,Rt);if(f=="|"||u=="."||f=="&")return d(Me);if(u=="[")return d(Me,oe("]"),Rt);if(f=="extends"||f=="implements")return b.marked="keyword",d(Me);if(f=="?")return d(Me,oe(":"),Me)}function Dt(u,f){if(f=="<")return d(Se(">"),y(Me,">"),Le,Rt)}function Ut(){return M(Me,xt)}function xt(u,f){if(f=="=")return d(Me)}function Wr(u,f){return f=="enum"?(b.marked="keyword",d(xe)):M(zt,Je,Gt,Fi)}function zt(u,f){if(I&&Ae(f))return b.marked="keyword",d(zt);if(u=="variable")return K(f),d();if(u=="spread")return d(zt);if(u=="[")return V(bn,"]");if(u=="{")return V(mr,"}")}function mr(u,f){return u=="variable"&&!b.stream.match(/^\s*:/,!1)?(K(f),d(Gt)):(u=="variable"&&(b.marked="property"),u=="spread"?d(zt):u=="}"?M():u=="["?d(be,oe("]"),oe(":"),mr):d(oe(":"),zt,Gt))}function bn(){return M(zt,Gt)}function Gt(u,f){if(f=="=")return d(Ye)}function Fi(u){if(u==",")return d(Wr)}function Hr(u,f){if(u=="keyword b"&&f=="else")return d(Se("form","else"),Pe,Le)}function ei(u,f){if(f=="await")return d(ei);if(u=="(")return d(Se(")"),xn,Le)}function xn(u){return u=="var"?d(Wr,gr):u=="variable"?d(gr):M(gr)}function gr(u,f){return u==")"?d():u==";"?d(gr):f=="in"||f=="of"?(b.marked="keyword",d(be,gr)):M(be,gr)}function Kt(u,f){if(f=="*")return b.marked="keyword",d(Kt);if(u=="variable")return K(f),d(Kt);if(u=="(")return d(nt,Se(")"),y(Yt,")"),Le,Ht,Pe,je);if(I&&f=="<")return d(Se(">"),y(Ut,">"),Le,Kt)}function vr(u,f){if(f=="*")return b.marked="keyword",d(vr);if(u=="variable")return K(f),d(vr);if(u=="(")return d(nt,Se(")"),y(Yt,")"),Le,Ht,je);if(I&&f=="<")return d(Se(">"),y(Ut,">"),Le,vr)}function ti(u,f){if(u=="keyword"||u=="variable")return b.marked="type",d(ti);if(f=="<")return d(Se(">"),y(Ut,">"),Le)}function Yt(u,f){return f=="@"&&d(be,Yt),u=="spread"?d(Yt):I&&Ae(f)?(b.marked="keyword",d(Yt)):I&&u=="this"?d(Je,Gt):M(zt,Je,Gt)}function Wi(u,f){return u=="variable"?Br(u,f):Qt(u,f)}function Br(u,f){if(u=="variable")return K(f),d(Qt)}function Qt(u,f){if(f=="<")return d(Se(">"),y(Ut,">"),Le,Qt);if(f=="extends"||f=="implements"||I&&u==",")return f=="implements"&&(b.marked="keyword"),d(I?Me:be,Qt);if(u=="{")return d(Se("}"),Xt,Le)}function Xt(u,f){if(u=="async"||u=="variable"&&(f=="static"||f=="get"||f=="set"||I&&Ae(f))&&b.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return b.marked="keyword",d(Xt);if(u=="variable"||b.style=="keyword")return b.marked="property",d(Vr,Xt);if(u=="number"||u=="string")return d(Vr,Xt);if(u=="[")return d(be,Je,oe("]"),Vr,Xt);if(f=="*")return b.marked="keyword",d(Xt);if(I&&u=="(")return M(vr,Xt);if(u==";"||u==",")return d(Xt);if(u=="}")return d();if(f=="@")return d(be,Xt)}function Vr(u,f){if(f=="!"||f=="?")return d(Vr);if(u==":")return d(Me,Gt);if(f=="=")return d(Ye);var F=b.state.lexical.prev,ee=F&&F.info=="interface";return M(ee?vr:Kt)}function $r(u,f){return f=="*"?(b.marked="keyword",d(Ur,oe(";"))):f=="default"?(b.marked="keyword",d(be,oe(";"))):u=="{"?d(y(Rr,"}"),Ur,oe(";")):M(Pe)}function Rr(u,f){if(f=="as")return b.marked="keyword",d(oe("variable"));if(u=="variable")return M(Ye,Rr)}function yr(u){return u=="string"?d():u=="("?M(be):u=="."?M(De):M(Kr,rr,Ur)}function Kr(u,f){return u=="{"?V(Kr,"}"):(u=="variable"&&K(f),f=="*"&&(b.marked="keyword"),d(wn))}function rr(u){if(u==",")return d(Kr,rr)}function wn(u,f){if(f=="as")return b.marked="keyword",d(Kr)}function Ur(u,f){if(f=="from")return b.marked="keyword",d(be)}function tt(u){return u=="]"?d():M(y(Ye,"]"))}function xe(){return M(Se("form"),zt,oe("{"),Se("}"),y(sr,"}"),Le,Le)}function sr(){return M(zt,Gt)}function kn(u,f){return u.lastType=="operator"||u.lastType==","||Q.test(f.charAt(0))||/[,.]/.test(f.charAt(0))}function Bt(u,f,F){return f.tokenize==N&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(f.lastType)||f.lastType=="quasi"&&/\{\s*$/.test(u.string.slice(0,u.pos-(F||0)))}return{startState:function(u){var f={tokenize:N,lastType:"sof",cc:[],lexical:new w((u||0)-pe,0,"block",!1),localVars:W.localVars,context:W.localVars&&new Ve(null,null,!1),indented:u||0};return W.globalVars&&typeof W.globalVars=="object"&&(f.globalVars=W.globalVars),f},token:function(u,f){if(u.sol()&&(f.lexical.hasOwnProperty("align")||(f.lexical.align=!1),f.indented=u.indentation(),fe(u,f)),f.tokenize!=G&&u.eatSpace())return null;var F=f.tokenize(u,f);return ye=="comment"?F:(f.lastType=ye=="operator"&&(ue=="++"||ue=="--")?"incdec":ye,T(f,F,ye,ue,u))},indent:function(u,f){if(u.tokenize==G||u.tokenize==se)return m.Pass;if(u.tokenize!=N)return 0;var F=f&&f.charAt(0),ee=u.lexical,O;if(!/^\s*else\b/.test(f))for(var ce=u.cc.length-1;ce>=0;--ce){var Ie=u.cc[ce];if(Ie==Le)ee=ee.prev;else if(Ie!=Hr&&Ie!=je)break}for(;(ee.type=="stat"||ee.type=="form")&&(F=="}"||(O=u.cc[u.cc.length-1])&&(O==De||O==Re)&&!/^[,\.=+\-*:?[\(]/.test(f));)ee=ee.prev;D&&ee.type==")"&&ee.prev.type=="stat"&&(ee=ee.prev);var ct=ee.type,Mt=F==ct;return ct=="vardef"?ee.indented+(u.lastType=="operator"||u.lastType==","?ee.info.length+1:0):ct=="form"&&F=="{"?ee.indented:ct=="form"?ee.indented+pe:ct=="stat"?ee.indented+(kn(u,f)?D||pe:0):ee.info=="switch"&&!Mt&&W.doubleIndentSwitch!=!1?ee.indented+(/^(?:case|default)\b/.test(f)?pe:2*pe):ee.align?ee.column+(Mt?0:1):ee.indented+(Mt?0:pe)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:x?null:"/*",blockCommentEnd:x?null:"*/",blockCommentContinue:x?null:" * ",lineComment:x?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:x?"json":"javascript",jsonldMode:q,jsonMode:x,expressionAllowed:Bt,skipExpression:function(u){T(u,"atom","atom","true",new m.StringStream("",2,null))}}}),m.registerHelper("wordChars","javascript",/[\w$]/),m.defineMIME("text/javascript","javascript"),m.defineMIME("text/ecmascript","javascript"),m.defineMIME("application/javascript","javascript"),m.defineMIME("application/x-javascript","javascript"),m.defineMIME("application/ecmascript","javascript"),m.defineMIME("application/json",{name:"javascript",json:!0}),m.defineMIME("application/x-json",{name:"javascript",json:!0}),m.defineMIME("application/manifest+json",{name:"javascript",json:!0}),m.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),m.defineMIME("text/typescript",{name:"javascript",typescript:!0}),m.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var gn=ji.exports,vn={exports:{}};(function(g,X){(function(m){m(We())})(function(m){m.defineMode("css",function(w,L){var T=L.inline;L.propertyKeywords||(L=m.resolveMode("text/css"));var b=w.indentUnit,M=L.tokenHooks,d=L.documentTypes||{},U=L.mediaTypes||{},K=L.mediaFeatures||{},ve=L.mediaValueKeywords||{},Ae=L.propertyKeywords||{},Ve=L.nonStandardPropertyKeywords||{},_t=L.fontProperties||{},Wt=L.counterDescriptors||{},nt=L.colorKeywords||{},He=L.valueKeywords||{},je=L.allowNested,Se=L.lineComment,Le=L.supportsAtComponent===!0,oe=w.highlightNonStandardPropertyKeywords!==!1,Pe,Ne;function be(z,Z){return Pe=Z,z}function Ye(z,Z){var j=z.next();if(M[j]){var Ee=M[j](z,Z);if(Ee!==!1)return Ee}if(j=="@")return z.eatWhile(/[\w\\\-]/),be("def",z.current());if(j=="="||(j=="~"||j=="|")&&z.eat("="))return be(null,"compare");if(j=='"'||j=="'")return Z.tokenize=gt(j),Z.tokenize(z,Z);if(j=="#")return z.eatWhile(/[\w\\\-]/),be("atom","hash");if(j=="!")return z.match(/^\s*\w*/),be("keyword","important");if(/\d/.test(j)||j=="."&&z.eat(/\d/))return z.eatWhile(/[\w.%]/),be("number","unit");if(j==="-"){if(/[\d.]/.test(z.peek()))return z.eatWhile(/[\w.%]/),be("number","unit");if(z.match(/^-[\w\\\-]*/))return z.eatWhile(/[\w\\\-]/),z.match(/^\s*:/,!1)?be("variable-2","variable-definition"):be("variable-2","variable");if(z.match(/^\w+-/))return be("meta","meta")}else return/[,+>*\/]/.test(j)?be(null,"select-op"):j=="."&&z.match(/^-?[_a-z][_a-z0-9-]*/i)?be("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(j)?be(null,j):z.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(z.current())&&(Z.tokenize=ge),be("variable callee","variable")):/[\w\\\-]/.test(j)?(z.eatWhile(/[\w\\\-]/),be("property","word")):be(null,null)}function gt(z){return function(Z,j){for(var Ee=!1,Ke;(Ke=Z.next())!=null;){if(Ke==z&&!Ee){z==")"&&Z.backUp(1);break}Ee=!Ee&&Ke=="\\"}return(Ke==z||!Ee&&z!=")")&&(j.tokenize=null),be("string","string")}}function ge(z,Z){return z.next(),z.match(/^\s*[\"\')]/,!1)?Z.tokenize=null:Z.tokenize=gt(")"),be(null,"(")}function Xe(z,Z,j){this.type=z,this.indent=Z,this.prev=j}function De(z,Z,j,Ee){return z.context=new Xe(j,Z.indentation()+(Ee===!1?0:b),z.context),j}function Re(z){return z.context.prev&&(z.context=z.context.prev),z.context.type}function v(z,Z,j){return qe[j.context.type](z,Z,j)}function k(z,Z,j,Ee){for(var Ke=Ee||1;Ke>0;Ke--)j.context=j.context.prev;return v(z,Z,j)}function ie(z){var Z=z.current().toLowerCase();He.hasOwnProperty(Z)?Ne="atom":nt.hasOwnProperty(Z)?Ne="keyword":Ne="variable"}var qe={};return qe.top=function(z,Z,j){if(z=="{")return De(j,Z,"block");if(z=="}"&&j.context.prev)return Re(j);if(Le&&/@component/i.test(z))return De(j,Z,"atComponentBlock");if(/^@(-moz-)?document$/i.test(z))return De(j,Z,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(z))return De(j,Z,"atBlock");if(/^@(font-face|counter-style)/i.test(z))return j.stateArg=z,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(z))return"keyframes";if(z&&z.charAt(0)=="@")return De(j,Z,"at");if(z=="hash")Ne="builtin";else if(z=="word")Ne="tag";else{if(z=="variable-definition")return"maybeprop";if(z=="interpolation")return De(j,Z,"interpolation");if(z==":")return"pseudo";if(je&&z=="(")return De(j,Z,"parens")}return j.context.type},qe.block=function(z,Z,j){if(z=="word"){var Ee=Z.current().toLowerCase();return Ae.hasOwnProperty(Ee)?(Ne="property","maybeprop"):Ve.hasOwnProperty(Ee)?(Ne=oe?"string-2":"property","maybeprop"):je?(Ne=Z.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Ne+=" error","maybeprop")}else return z=="meta"?"block":!je&&(z=="hash"||z=="qualifier")?(Ne="error","block"):qe.top(z,Z,j)},qe.maybeprop=function(z,Z,j){return z==":"?De(j,Z,"prop"):v(z,Z,j)},qe.prop=function(z,Z,j){if(z==";")return Re(j);if(z=="{"&&je)return De(j,Z,"propBlock");if(z=="}"||z=="{")return k(z,Z,j);if(z=="(")return De(j,Z,"parens");if(z=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(Z.current()))Ne+=" error";else if(z=="word")ie(Z);else if(z=="interpolation")return De(j,Z,"interpolation");return"prop"},qe.propBlock=function(z,Z,j){return z=="}"?Re(j):z=="word"?(Ne="property","maybeprop"):j.context.type},qe.parens=function(z,Z,j){return z=="{"||z=="}"?k(z,Z,j):z==")"?Re(j):z=="("?De(j,Z,"parens"):z=="interpolation"?De(j,Z,"interpolation"):(z=="word"&&ie(Z),"parens")},qe.pseudo=function(z,Z,j){return z=="meta"?"pseudo":z=="word"?(Ne="variable-3",j.context.type):v(z,Z,j)},qe.documentTypes=function(z,Z,j){return z=="word"&&d.hasOwnProperty(Z.current())?(Ne="tag",j.context.type):qe.atBlock(z,Z,j)},qe.atBlock=function(z,Z,j){if(z=="(")return De(j,Z,"atBlock_parens");if(z=="}"||z==";")return k(z,Z,j);if(z=="{")return Re(j)&&De(j,Z,je?"block":"top");if(z=="interpolation")return De(j,Z,"interpolation");if(z=="word"){var Ee=Z.current().toLowerCase();Ee=="only"||Ee=="not"||Ee=="and"||Ee=="or"?Ne="keyword":U.hasOwnProperty(Ee)?Ne="attribute":K.hasOwnProperty(Ee)?Ne="property":ve.hasOwnProperty(Ee)?Ne="keyword":Ae.hasOwnProperty(Ee)?Ne="property":Ve.hasOwnProperty(Ee)?Ne=oe?"string-2":"property":He.hasOwnProperty(Ee)?Ne="atom":nt.hasOwnProperty(Ee)?Ne="keyword":Ne="error"}return j.context.type},qe.atComponentBlock=function(z,Z,j){return z=="}"?k(z,Z,j):z=="{"?Re(j)&&De(j,Z,je?"block":"top",!1):(z=="word"&&(Ne="error"),j.context.type)},qe.atBlock_parens=function(z,Z,j){return z==")"?Re(j):z=="{"||z=="}"?k(z,Z,j,2):qe.atBlock(z,Z,j)},qe.restricted_atBlock_before=function(z,Z,j){return z=="{"?De(j,Z,"restricted_atBlock"):z=="word"&&j.stateArg=="@counter-style"?(Ne="variable","restricted_atBlock_before"):v(z,Z,j)},qe.restricted_atBlock=function(z,Z,j){return z=="}"?(j.stateArg=null,Re(j)):z=="word"?(j.stateArg=="@font-face"&&!_t.hasOwnProperty(Z.current().toLowerCase())||j.stateArg=="@counter-style"&&!Wt.hasOwnProperty(Z.current().toLowerCase())?Ne="error":Ne="property","maybeprop"):"restricted_atBlock"},qe.keyframes=function(z,Z,j){return z=="word"?(Ne="variable","keyframes"):z=="{"?De(j,Z,"top"):v(z,Z,j)},qe.at=function(z,Z,j){return z==";"?Re(j):z=="{"||z=="}"?k(z,Z,j):(z=="word"?Ne="tag":z=="hash"&&(Ne="builtin"),"at")},qe.interpolation=function(z,Z,j){return z=="}"?Re(j):z=="{"||z==";"?k(z,Z,j):(z=="word"?Ne="variable":z!="variable"&&z!="("&&z!=")"&&(Ne="error"),"interpolation")},{startState:function(z){return{tokenize:null,state:T?"block":"top",stateArg:null,context:new Xe(T?"block":"top",z||0,null)}},token:function(z,Z){if(!Z.tokenize&&z.eatSpace())return null;var j=(Z.tokenize||Ye)(z,Z);return j&&typeof j=="object"&&(Pe=j[1],j=j[0]),Ne=j,Pe!="comment"&&(Z.state=qe[Z.state](Pe,z,Z)),Ne},indent:function(z,Z){var j=z.context,Ee=Z&&Z.charAt(0),Ke=j.indent;return j.type=="prop"&&(Ee=="}"||Ee==")")&&(j=j.prev),j.prev&&(Ee=="}"&&(j.type=="block"||j.type=="top"||j.type=="interpolation"||j.type=="restricted_atBlock")?(j=j.prev,Ke=j.indent):(Ee==")"&&(j.type=="parens"||j.type=="atBlock_parens")||Ee=="{"&&(j.type=="at"||j.type=="atBlock"))&&(Ke=Math.max(0,j.indent-b))),Ke},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Se,fold:"brace"}});function R(w){for(var L={},T=0;T<w.length;++T)L[w[T].toLowerCase()]=!0;return L}var W=["domain","regexp","url","url-prefix"],pe=R(W),D=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],q=R(D),x=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],re=R(x),I=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],ne=R(I),E=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],Q=R(E),H=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],Y=R(H),ye=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],ue=R(ye),J=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],N=R(J),B=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],G=R(B),se=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],he=R(se),fe=W.concat(D).concat(x).concat(I).concat(E).concat(H).concat(B).concat(se);m.registerHelper("hintWords","css",fe);function A(w,L){for(var T=!1,b;(b=w.next())!=null;){if(T&&b=="/"){L.tokenize=null;break}T=b=="*"}return["comment","comment"]}m.defineMIME("text/css",{documentTypes:pe,mediaTypes:q,mediaFeatures:re,mediaValueKeywords:ne,propertyKeywords:Q,nonStandardPropertyKeywords:Y,fontProperties:ue,counterDescriptors:N,colorKeywords:G,valueKeywords:he,tokenHooks:{"/":function(w,L){return w.eat("*")?(L.tokenize=A,A(w,L)):!1}},name:"css"}),m.defineMIME("text/x-scss",{mediaTypes:q,mediaFeatures:re,mediaValueKeywords:ne,propertyKeywords:Q,nonStandardPropertyKeywords:Y,colorKeywords:G,valueKeywords:he,fontProperties:ue,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(w,L){return w.eat("/")?(w.skipToEnd(),["comment","comment"]):w.eat("*")?(L.tokenize=A,A(w,L)):["operator","operator"]},":":function(w){return w.match(/^\s*\{/,!1)?[null,null]:!1},$:function(w){return w.match(/^[\w-]+/),w.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(w){return w.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),m.defineMIME("text/x-less",{mediaTypes:q,mediaFeatures:re,mediaValueKeywords:ne,propertyKeywords:Q,nonStandardPropertyKeywords:Y,colorKeywords:G,valueKeywords:he,fontProperties:ue,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(w,L){return w.eat("/")?(w.skipToEnd(),["comment","comment"]):w.eat("*")?(L.tokenize=A,A(w,L)):["operator","operator"]},"@":function(w){return w.eat("{")?[null,"interpolation"]:w.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(w.eatWhile(/[\w\\\-]/),w.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),m.defineMIME("text/x-gss",{documentTypes:pe,mediaTypes:q,mediaFeatures:re,propertyKeywords:Q,nonStandardPropertyKeywords:Y,fontProperties:ue,counterDescriptors:N,colorKeywords:G,valueKeywords:he,supportsAtComponent:!0,tokenHooks:{"/":function(w,L){return w.eat("*")?(L.tokenize=A,A(w,L)):!1}},name:"css",helperType:"gss"})})})();var $t=vn.exports,yn={exports:{}},ms={exports:{}},qo;function Io(){return qo||(qo=1,function(g,X){(function(m){m(We())})(function(m){var R={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},W={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};m.defineMode("xml",function(pe,D){var q=pe.indentUnit,x={},re=D.htmlMode?R:W;for(var I in re)x[I]=re[I];for(var I in D)x[I]=D[I];var ne,E;function Q(d,U){function K(Ve){return U.tokenize=Ve,Ve(d,U)}var ve=d.next();if(ve=="<")return d.eat("!")?d.eat("[")?d.match("CDATA[")?K(ye("atom","]]>")):null:d.match("--")?K(ye("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),K(ue(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),U.tokenize=ye("meta","?>"),"meta"):(ne=d.eat("/")?"closeTag":"openTag",U.tokenize=H,"tag bracket");if(ve=="&"){var Ae;return d.eat("#")?d.eat("x")?Ae=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):Ae=d.eatWhile(/[\d]/)&&d.eat(";"):Ae=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),Ae?"atom":"error"}else return d.eatWhile(/[^&<]/),null}Q.isInText=!0;function H(d,U){var K=d.next();if(K==">"||K=="/"&&d.eat(">"))return U.tokenize=Q,ne=K==">"?"endTag":"selfcloseTag","tag bracket";if(K=="=")return ne="equals",null;if(K=="<"){U.tokenize=Q,U.state=se,U.tagName=U.tagStart=null;var ve=U.tokenize(d,U);return ve?ve+" tag error":"tag error"}else return/[\'\"]/.test(K)?(U.tokenize=Y(K),U.stringStartCol=d.column(),U.tokenize(d,U)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Y(d){var U=function(K,ve){for(;!K.eol();)if(K.next()==d){ve.tokenize=H;break}return"string"};return U.isInAttribute=!0,U}function ye(d,U){return function(K,ve){for(;!K.eol();){if(K.match(U)){ve.tokenize=Q;break}K.next()}return d}}function ue(d){return function(U,K){for(var ve;(ve=U.next())!=null;){if(ve=="<")return K.tokenize=ue(d+1),K.tokenize(U,K);if(ve==">")if(d==1){K.tokenize=Q;break}else return K.tokenize=ue(d-1),K.tokenize(U,K)}return"meta"}}function J(d){return d&&d.toLowerCase()}function N(d,U,K){this.prev=d.context,this.tagName=U||"",this.indent=d.indented,this.startOfLine=K,(x.doNotIndent.hasOwnProperty(U)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function B(d){d.context&&(d.context=d.context.prev)}function G(d,U){for(var K;;){if(!d.context||(K=d.context.tagName,!x.contextGrabbers.hasOwnProperty(J(K))||!x.contextGrabbers[J(K)].hasOwnProperty(J(U))))return;B(d)}}function se(d,U,K){return d=="openTag"?(K.tagStart=U.column(),he):d=="closeTag"?fe:se}function he(d,U,K){return d=="word"?(K.tagName=U.current(),E="tag",L):x.allowMissingTagName&&d=="endTag"?(E="tag bracket",L(d,U,K)):(E="error",he)}function fe(d,U,K){if(d=="word"){var ve=U.current();return K.context&&K.context.tagName!=ve&&x.implicitlyClosed.hasOwnProperty(J(K.context.tagName))&&B(K),K.context&&K.context.tagName==ve||x.matchClosing===!1?(E="tag",A):(E="tag error",w)}else return x.allowMissingTagName&&d=="endTag"?(E="tag bracket",A(d,U,K)):(E="error",w)}function A(d,U,K){return d!="endTag"?(E="error",A):(B(K),se)}function w(d,U,K){return E="error",A(d,U,K)}function L(d,U,K){if(d=="word")return E="attribute",T;if(d=="endTag"||d=="selfcloseTag"){var ve=K.tagName,Ae=K.tagStart;return K.tagName=K.tagStart=null,d=="selfcloseTag"||x.autoSelfClosers.hasOwnProperty(J(ve))?G(K,ve):(G(K,ve),K.context=new N(K,ve,Ae==K.indented)),se}return E="error",L}function T(d,U,K){return d=="equals"?b:(x.allowMissing||(E="error"),L(d,U,K))}function b(d,U,K){return d=="string"?M:d=="word"&&x.allowUnquoted?(E="string",L):(E="error",L(d,U,K))}function M(d,U,K){return d=="string"?M:L(d,U,K)}return{startState:function(d){var U={tokenize:Q,state:se,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(U.baseIndent=d),U},token:function(d,U){if(!U.tagName&&d.sol()&&(U.indented=d.indentation()),d.eatSpace())return null;ne=null;var K=U.tokenize(d,U);return(K||ne)&&K!="comment"&&(E=null,U.state=U.state(ne||K,d,U),E&&(K=E=="error"?K+" error":E)),K},indent:function(d,U,K){var ve=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+q;if(ve&&ve.noIndent)return m.Pass;if(d.tokenize!=H&&d.tokenize!=Q)return K?K.match(/^(\s*)/)[0].length:0;if(d.tagName)return x.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+q*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(U))return 0;var Ae=U&&/^<(\/)?([\w_:\.-]*)/.exec(U);if(Ae&&Ae[1])for(;ve;)if(ve.tagName==Ae[2]){ve=ve.prev;break}else if(x.implicitlyClosed.hasOwnProperty(J(ve.tagName)))ve=ve.prev;else break;else if(Ae)for(;ve;){var Ve=x.contextGrabbers[J(ve.tagName)];if(Ve&&Ve.hasOwnProperty(J(Ae[2])))ve=ve.prev;else break}for(;ve&&ve.prev&&!ve.startOfLine;)ve=ve.prev;return ve?ve.indent+q:d.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(d){d.state==b&&(d.state=L)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var U=[],K=d.context;K;K=K.prev)U.push(K.tagName);return U.reverse()}}}),m.defineMIME("text/xml","xml"),m.defineMIME("application/xml","xml"),m.mimeModes.hasOwnProperty("text/html")||m.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),ms.exports}(function(g,X){(function(m){m(We(),Io(),gn,$t)})(function(m){var R={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 W(ne,E,Q){var H=ne.current(),Y=H.search(E);return Y>-1?ne.backUp(H.length-Y):H.match(/<\/?$/)&&(ne.backUp(H.length),ne.match(E,!1)||ne.match(H)),Q}var pe={};function D(ne){var E=pe[ne];return E||(pe[ne]=new RegExp("\\s+"+ne+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function q(ne,E){var Q=ne.match(D(E));return Q?/^\s*(.*?)\s*$/.exec(Q[2])[1]:""}function x(ne,E){return new RegExp((E?"^":"")+"</\\s*"+ne+"\\s*>","i")}function re(ne,E){for(var Q in ne)for(var H=E[Q]||(E[Q]=[]),Y=ne[Q],ye=Y.length-1;ye>=0;ye--)H.unshift(Y[ye])}function I(ne,E){for(var Q=0;Q<ne.length;Q++){var H=ne[Q];if(!H[0]||H[1].test(q(E,H[0])))return H[2]}}m.defineMode("htmlmixed",function(ne,E){var Q=m.getMode(ne,{name:"xml",htmlMode:!0,multilineTagIndentFactor:E.multilineTagIndentFactor,multilineTagIndentPastTag:E.multilineTagIndentPastTag,allowMissingTagName:E.allowMissingTagName}),H={},Y=E&&E.tags,ye=E&&E.scriptTypes;if(re(R,H),Y&&re(Y,H),ye)for(var ue=ye.length-1;ue>=0;ue--)H.script.unshift(["type",ye[ue].matches,ye[ue].mode]);function J(N,B){var G=Q.token(N,B.htmlState),se=/\btag\b/.test(G),he;if(se&&!/[<>\s\/]/.test(N.current())&&(he=B.htmlState.tagName&&B.htmlState.tagName.toLowerCase())&&H.hasOwnProperty(he))B.inTag=he+" ";else if(B.inTag&&se&&/>$/.test(N.current())){var fe=/^([\S]+) (.*)/.exec(B.inTag);B.inTag=null;var A=N.current()==">"&&I(H[fe[1]],fe[2]),w=m.getMode(ne,A),L=x(fe[1],!0),T=x(fe[1],!1);B.token=function(b,M){return b.match(L,!1)?(M.token=J,M.localState=M.localMode=null,null):W(b,T,M.localMode.token(b,M.localState))},B.localMode=w,B.localState=m.startState(w,Q.indent(B.htmlState,"",""))}else B.inTag&&(B.inTag+=N.current(),N.eol()&&(B.inTag+=" "));return G}return{startState:function(){var N=m.startState(Q);return{token:J,inTag:null,localMode:null,localState:null,htmlState:N}},copyState:function(N){var B;return N.localState&&(B=m.copyState(N.localMode,N.localState)),{token:N.token,inTag:N.inTag,localMode:N.localMode,localState:B,htmlState:m.copyState(Q,N.htmlState)}},token:function(N,B){return B.token(N,B)},indent:function(N,B,G){return!N.localMode||/^\s*<\//.test(B)?Q.indent(N.htmlState,B,G):N.localMode.indent?N.localMode.indent(N.localState,B,G):m.Pass},innerMode:function(N){return{state:N.localState||N.htmlState,mode:N.localMode||Q}}}},"xml","javascript","css"),m.defineMIME("text/html","htmlmixed")})})();var gs=yn.exports;(function(g,X){(function(m){m(We())})(function(m){m.defineMode("sql",function(I,ne){var E=ne.client||{},Q=ne.atoms||{false:!0,true:!0,null:!0},H=ne.builtin||x(re),Y=ne.keywords||x(q),ye=ne.operatorChars||/^[*+\-%<>!=&|~^\/]/,ue=ne.support||{},J=ne.hooks||{},N=ne.dateSQL||{date:!0,time:!0,timestamp:!0},B=ne.backslashStringEscapes!==!1,G=ne.brackets||/^[\{}\(\)\[\]]/,se=ne.punctuation||/^[;.,:]/;function he(T,b){var M=T.next();if(J[M]){var d=J[M](T,b);if(d!==!1)return d}if(ue.hexNumber&&(M=="0"&&T.match(/^[xX][0-9a-fA-F]+/)||(M=="x"||M=="X")&&T.match(/^'[0-9a-fA-F]*'/))||ue.binaryNumber&&((M=="b"||M=="B")&&T.match(/^'[01]*'/)||M=="0"&&T.match(/^b[01]+/)))return"number";if(M.charCodeAt(0)>47&&M.charCodeAt(0)<58)return T.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),ue.decimallessFloat&&T.match(/^\.(?!\.)/),"number";if(M=="?"&&(T.eatSpace()||T.eol()||T.eat(";")))return"variable-3";if(M=="'"||M=='"'&&ue.doubleQuote)return b.tokenize=fe(M),b.tokenize(T,b);if((ue.nCharCast&&(M=="n"||M=="N")||ue.charsetCast&&M=="_"&&T.match(/[a-z][a-z0-9]*/i))&&(T.peek()=="'"||T.peek()=='"'))return"keyword";if(ue.escapeConstant&&(M=="e"||M=="E")&&(T.peek()=="'"||T.peek()=='"'&&ue.doubleQuote))return b.tokenize=function(K,ve){return(ve.tokenize=fe(K.next(),!0))(K,ve)},"keyword";if(ue.commentSlashSlash&&M=="/"&&T.eat("/")||ue.commentHash&&M=="#"||M=="-"&&T.eat("-")&&(!ue.commentSpaceRequired||T.eat(" ")))return T.skipToEnd(),"comment";if(M=="/"&&T.eat("*"))return b.tokenize=A(1),b.tokenize(T,b);if(M=="."){if(ue.zerolessFloat&&T.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(T.match(/^\.+/))return null;if(T.match(/^[\w\d_$#]+/))return"variable-2"}else{if(ye.test(M))return T.eatWhile(ye),"operator";if(G.test(M))return"bracket";if(se.test(M))return T.eatWhile(se),"punctuation";if(M=="{"&&(T.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||T.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";T.eatWhile(/^[_\w\d]/);var U=T.current().toLowerCase();return N.hasOwnProperty(U)&&(T.match(/^( )+'[^']*'/)||T.match(/^( )+"[^"]*"/))?"number":Q.hasOwnProperty(U)?"atom":H.hasOwnProperty(U)?"type":Y.hasOwnProperty(U)?"keyword":E.hasOwnProperty(U)?"builtin":null}}function fe(T,b){return function(M,d){for(var U=!1,K;(K=M.next())!=null;){if(K==T&&!U){d.tokenize=he;break}U=(B||b)&&!U&&K=="\\"}return"string"}}function A(T){return function(b,M){var d=b.match(/^.*?(\/\*|\*\/)/);return d?d[1]=="/*"?M.tokenize=A(T+1):T>1?M.tokenize=A(T-1):M.tokenize=he:b.skipToEnd(),"comment"}}function w(T,b,M){b.context={prev:b.context,indent:T.indentation(),col:T.column(),type:M}}function L(T){T.indent=T.context.indent,T.context=T.context.prev}return{startState:function(){return{tokenize:he,context:null}},token:function(T,b){if(T.sol()&&b.context&&b.context.align==null&&(b.context.align=!1),b.tokenize==he&&T.eatSpace())return null;var M=b.tokenize(T,b);if(M=="comment")return M;b.context&&b.context.align==null&&(b.context.align=!0);var d=T.current();return d=="("?w(T,b,")"):d=="["?w(T,b,"]"):b.context&&b.context.type==d&&L(b),M},indent:function(T,b){var M=T.context;if(!M)return m.Pass;var d=b.charAt(0)==M.type;return M.align?M.col+(d?0:1):M.indent+(d?0:I.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:ue.commentSlashSlash?"//":ue.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:ne}});function R(I){for(var ne;(ne=I.next())!=null;)if(ne=="`"&&!I.eat("`"))return"variable-2";return I.backUp(I.current().length-1),I.eatWhile(/\w/)?"variable-2":null}function W(I){for(var ne;(ne=I.next())!=null;)if(ne=='"'&&!I.eat('"'))return"variable-2";return I.backUp(I.current().length-1),I.eatWhile(/\w/)?"variable-2":null}function pe(I){return I.eat("@")&&(I.match("session."),I.match("local."),I.match("global.")),I.eat("'")?(I.match(/^.*'/),"variable-2"):I.eat('"')?(I.match(/^.*"/),"variable-2"):I.eat("`")?(I.match(/^.*`/),"variable-2"):I.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function D(I){return I.eat("N")?"atom":I.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var q="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function x(I){for(var ne={},E=I.split(" "),Q=0;Q<E.length;++Q)ne[E[Q]]=!0;return ne}var re="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";m.defineMIME("text/x-sql",{name:"sql",keywords:x(q+"begin"),builtin:x(re),atoms:x("false true null unknown"),dateSQL:x("date time timestamp"),support:x("doubleQuote binaryNumber hexNumber")}),m.defineMIME("text/x-mssql",{name:"sql",client:x("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:x(q+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:x("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:x("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:x("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":pe}}),m.defineMIME("text/x-mysql",{name:"sql",client:x("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:x(q+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:x("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:x("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:x("date time timestamp"),support:x("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":pe,"`":R,"\\":D}}),m.defineMIME("text/x-mariadb",{name:"sql",client:x("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:x(q+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:x("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:x("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:x("date time timestamp"),support:x("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":pe,"`":R,"\\":D}}),m.defineMIME("text/x-sqlite",{name:"sql",client:x("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:x(q+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:x("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:x("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:x("date time timestamp datetime"),support:x("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":pe,":":pe,"?":pe,$:pe,'"':W,"`":R}}),m.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:x("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:x("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:x("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:x("commentSlashSlash decimallessFloat"),hooks:{}}),m.defineMIME("text/x-plsql",{name:"sql",client:x("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:x("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:x("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:x("date time timestamp"),support:x("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),m.defineMIME("text/x-hive",{name:"sql",keywords:x("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:x("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:x("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:x("date timestamp"),support:x("doubleQuote binaryNumber hexNumber")}),m.defineMIME("text/x-pgsql",{name:"sql",client:x("source"),keywords:x(q+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:x("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:x("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:x("date time timestamp"),support:x("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),m.defineMIME("text/x-gql",{name:"sql",keywords:x("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:x("false true"),builtin:x("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),m.defineMIME("text/x-gpsql",{name:"sql",client:x("source"),keywords:x("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:x("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:x("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:x("date time timestamp"),support:x("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),m.defineMIME("text/x-sparksql",{name:"sql",keywords:x("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:x("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:x("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:x("date time timestamp"),support:x("doubleQuote zerolessFloat")}),m.defineMIME("text/x-esper",{name:"sql",client:x("source"),keywords:x("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:x("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:x("time"),support:x("decimallessFloat zerolessFloat binaryNumber hexNumber")}),m.defineMIME("text/x-trino",{name:"sql",keywords:x("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:x("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:x("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:x("date time timestamp zone"),support:x("decimallessFloat zerolessFloat hexNumber")})})})();var vs={exports:{}},Fo;function ys(){return Fo||(Fo=1,function(g,X){(function(m){m(We())})(function(m){m.overlayMode=function(R,W,pe){return{startState:function(){return{base:m.startState(R),overlay:m.startState(W),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(D){return{base:m.copyState(R,D.base),overlay:m.copyState(W,D.overlay),basePos:D.basePos,baseCur:null,overlayPos:D.overlayPos,overlayCur:null}},token:function(D,q){return(D!=q.streamSeen||Math.min(q.basePos,q.overlayPos)<D.start)&&(q.streamSeen=D,q.basePos=q.overlayPos=D.start),D.start==q.basePos&&(q.baseCur=R.token(D,q.base),q.basePos=D.pos),D.start==q.overlayPos&&(D.pos=D.start,q.overlayCur=W.token(D,q.overlay),q.overlayPos=D.pos),D.pos=Math.min(q.basePos,q.overlayPos),q.overlayCur==null?q.baseCur:q.baseCur!=null&&q.overlay.combineTokens||pe&&q.overlay.combineTokens==null?q.baseCur+" "+q.overlayCur:q.overlayCur},indent:R.indent&&function(D,q,x){return R.indent(D.base,q,x)},electricChars:R.electricChars,innerMode:function(D){return{state:D.base,mode:R}},blankLine:function(D){var q,x;return R.blankLine&&(q=R.blankLine(D.base)),W.blankLine&&(x=W.blankLine(D.overlay)),x==null?q:pe&&q!=null?q+" "+x:x}}}})}()),vs.exports}var bs={exports:{}},Wo;function xs(){return Wo||(Wo=1,function(g,X){(function(m){m(We())})(function(m){m.defineMode("coffeescript",function(R,W){var pe="error";function D(w){return new RegExp("^(("+w.join(")|(")+"))\\b")}var q=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,x=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,re=/^[_A-Za-z$][_A-Za-z$0-9]*/,I=/^@[_A-Za-z$][_A-Za-z$0-9]*/,ne=D(["and","or","not","is","isnt","in","instanceof","typeof"]),E=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],Q=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],H=D(E.concat(Q));E=D(E);var Y=/^('{3}|\"{3}|['\"])/,ye=/^(\/{3}|\/)/,ue=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],J=D(ue);function N(w,L){if(w.sol()){L.scope.align===null&&(L.scope.align=!1);var T=L.scope.offset;if(w.eatSpace()){var b=w.indentation();return b>T&&L.scope.type=="coffee"?"indent":b<T?"dedent":null}else T>0&&he(w,L)}if(w.eatSpace())return null;var M=w.peek();if(w.match("####"))return w.skipToEnd(),"comment";if(w.match("###"))return L.tokenize=G,L.tokenize(w,L);if(M==="#")return w.skipToEnd(),"comment";if(w.match(/^-?[0-9\.]/,!1)){var d=!1;if(w.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(d=!0),w.match(/^-?\d+\.\d*/)&&(d=!0),w.match(/^-?\.\d+/)&&(d=!0),d)return w.peek()=="."&&w.backUp(1),"number";var U=!1;if(w.match(/^-?0x[0-9a-f]+/i)&&(U=!0),w.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(U=!0),w.match(/^-?0(?![\dx])/i)&&(U=!0),U)return"number"}if(w.match(Y))return L.tokenize=B(w.current(),!1,"string"),L.tokenize(w,L);if(w.match(ye)){if(w.current()!="/"||w.match(/^.*\//,!1))return L.tokenize=B(w.current(),!0,"string-2"),L.tokenize(w,L);w.backUp(1)}return w.match(q)||w.match(ne)?"operator":w.match(x)?"punctuation":w.match(J)?"atom":w.match(I)||L.prop&&w.match(re)?"property":w.match(H)?"keyword":w.match(re)?"variable":(w.next(),pe)}function B(w,L,T){return function(b,M){for(;!b.eol();)if(b.eatWhile(/[^'"\/\\]/),b.eat("\\")){if(b.next(),L&&b.eol())return T}else{if(b.match(w))return M.tokenize=N,T;b.eat(/['"\/]/)}return L&&(W.singleLineStringErrors?T=pe:M.tokenize=N),T}}function G(w,L){for(;!w.eol();){if(w.eatWhile(/[^#]/),w.match("###")){L.tokenize=N;break}w.eatWhile("#")}return"comment"}function se(w,L,T){T=T||"coffee";for(var b=0,M=!1,d=null,U=L.scope;U;U=U.prev)if(U.type==="coffee"||U.type=="}"){b=U.offset+R.indentUnit;break}T!=="coffee"?(M=null,d=w.column()+w.current().length):L.scope.align&&(L.scope.align=!1),L.scope={offset:b,type:T,prev:L.scope,align:M,alignOffset:d}}function he(w,L){if(L.scope.prev)if(L.scope.type==="coffee"){for(var T=w.indentation(),b=!1,M=L.scope;M;M=M.prev)if(T===M.offset){b=!0;break}if(!b)return!0;for(;L.scope.prev&&L.scope.offset!==T;)L.scope=L.scope.prev;return!1}else return L.scope=L.scope.prev,!1}function fe(w,L){var T=L.tokenize(w,L),b=w.current();b==="return"&&(L.dedent=!0),((b==="->"||b==="=>")&&w.eol()||T==="indent")&&se(w,L);var M="[({".indexOf(b);if(M!==-1&&se(w,L,"])}".slice(M,M+1)),E.exec(b)&&se(w,L),b=="then"&&he(w,L),T==="dedent"&&he(w,L))return pe;if(M="])}".indexOf(b),M!==-1){for(;L.scope.type=="coffee"&&L.scope.prev;)L.scope=L.scope.prev;L.scope.type==b&&(L.scope=L.scope.prev)}return L.dedent&&w.eol()&&(L.scope.type=="coffee"&&L.scope.prev&&(L.scope=L.scope.prev),L.dedent=!1),T}var A={startState:function(w){return{tokenize:N,scope:{offset:w||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(w,L){var T=L.scope.align===null&&L.scope;T&&w.sol()&&(T.align=!1);var b=fe(w,L);return b&&b!="comment"&&(T&&(T.align=!0),L.prop=b=="punctuation"&&w.current()=="."),b},indent:function(w,L){if(w.tokenize!=N)return 0;var T=w.scope,b=L&&"])}".indexOf(L.charAt(0))>-1;if(b)for(;T.type=="coffee"&&T.prev;)T=T.prev;var M=b&&T.type===L.charAt(0);return T.align?T.alignOffset-(M?1:0):(M?T.prev:T).offset},lineComment:"#",fold:"indent"};return A}),m.defineMIME("application/vnd.coffeescript","coffeescript"),m.defineMIME("text/x-coffeescript","coffeescript"),m.defineMIME("text/coffeescript","coffeescript")})}()),bs.exports}var ws={exports:{}},Ho;function ks(){return Ho||(Ho=1,function(g,X){(function(m){m(We(),$t)})(function(m){m.defineMode("sass",function(R){var W=m.mimeModes["text/css"],pe=W.propertyKeywords||{},D=W.colorKeywords||{},q=W.valueKeywords||{},x=W.fontProperties||{};function re(A){return new RegExp("^"+A.join("|"))}var I=["true","false","null","auto"],ne=new RegExp("^"+I.join("|")),E=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],Q=re(E),H=/^::?[a-zA-Z_][\w\-]*/,Y;function ye(A){return!A.peek()||A.match(/\s+$/,!1)}function ue(A,w){var L=A.peek();return L===")"?(A.next(),w.tokenizer=he,"operator"):L==="("?(A.next(),A.eatSpace(),"operator"):L==="'"||L==='"'?(w.tokenizer=N(A.next()),"string"):(w.tokenizer=N(")",!1),"string")}function J(A,w){return function(L,T){return L.sol()&&L.indentation()<=A?(T.tokenizer=he,he(L,T)):(w&&L.skipTo("*/")?(L.next(),L.next(),T.tokenizer=he):L.skipToEnd(),"comment")}}function N(A,w){w==null&&(w=!0);function L(T,b){var M=T.next(),d=T.peek(),U=T.string.charAt(T.pos-2),K=M!=="\\"&&d===A||M===A&&U!=="\\";return K?(M!==A&&w&&T.next(),ye(T)&&(b.cursorHalf=0),b.tokenizer=he,"string"):M==="#"&&d==="{"?(b.tokenizer=B(L),T.next(),"operator"):"string"}return L}function B(A){return function(w,L){return w.peek()==="}"?(w.next(),L.tokenizer=A,"operator"):he(w,L)}}function G(A){if(A.indentCount==0){A.indentCount++;var w=A.scopes[0].offset,L=w+R.indentUnit;A.scopes.unshift({offset:L})}}function se(A){A.scopes.length!=1&&A.scopes.shift()}function he(A,w){var L=A.peek();if(A.match("/*"))return w.tokenizer=J(A.indentation(),!0),w.tokenizer(A,w);if(A.match("//"))return w.tokenizer=J(A.indentation(),!1),w.tokenizer(A,w);if(A.match("#{"))return w.tokenizer=B(he),"operator";if(L==='"'||L==="'")return A.next(),w.tokenizer=N(L),"string";if(w.cursorHalf){if(L==="#"&&(A.next(),A.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||A.match(/^-?[0-9\.]+/))return ye(A)&&(w.cursorHalf=0),"number";if(A.match(/^(px|em|in)\b/))return ye(A)&&(w.cursorHalf=0),"unit";if(A.match(ne))return ye(A)&&(w.cursorHalf=0),"keyword";if(A.match(/^url/)&&A.peek()==="(")return w.tokenizer=ue,ye(A)&&(w.cursorHalf=0),"atom";if(L==="$")return A.next(),A.eatWhile(/[\w-]/),ye(A)&&(w.cursorHalf=0),"variable-2";if(L==="!")return A.next(),w.cursorHalf=0,A.match(/^[\w]+/)?"keyword":"operator";if(A.match(Q))return ye(A)&&(w.cursorHalf=0),"operator";if(A.eatWhile(/[\w-]/))return ye(A)&&(w.cursorHalf=0),Y=A.current().toLowerCase(),q.hasOwnProperty(Y)?"atom":D.hasOwnProperty(Y)?"keyword":pe.hasOwnProperty(Y)?(w.prevProp=A.current().toLowerCase(),"property"):"tag";if(ye(A))return w.cursorHalf=0,null}else{if(L==="-"&&A.match(/^-\w+-/))return"meta";if(L==="."){if(A.next(),A.match(/^[\w-]+/))return G(w),"qualifier";if(A.peek()==="#")return G(w),"tag"}if(L==="#"){if(A.next(),A.match(/^[\w-]+/))return G(w),"builtin";if(A.peek()==="#")return G(w),"tag"}if(L==="$")return A.next(),A.eatWhile(/[\w-]/),"variable-2";if(A.match(/^-?[0-9\.]+/))return"number";if(A.match(/^(px|em|in)\b/))return"unit";if(A.match(ne))return"keyword";if(A.match(/^url/)&&A.peek()==="(")return w.tokenizer=ue,"atom";if(L==="="&&A.match(/^=[\w-]+/))return G(w),"meta";if(L==="+"&&A.match(/^\+[\w-]+/))return"variable-3";if(L==="@"&&A.match("@extend")&&(A.match(/\s*[\w]/)||se(w)),A.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return G(w),"def";if(L==="@")return A.next(),A.eatWhile(/[\w-]/),"def";if(A.eatWhile(/[\w-]/))if(A.match(/ *: *[\w-\+\$#!\("']/,!1)){Y=A.current().toLowerCase();var T=w.prevProp+"-"+Y;return pe.hasOwnProperty(T)?"property":pe.hasOwnProperty(Y)?(w.prevProp=Y,"property"):x.hasOwnProperty(Y)?"property":"tag"}else return A.match(/ *:/,!1)?(G(w),w.cursorHalf=1,w.prevProp=A.current().toLowerCase(),"property"):(A.match(/ *,/,!1)||G(w),"tag");if(L===":")return A.match(H)?"variable-3":(A.next(),w.cursorHalf=1,"operator")}return A.match(Q)?"operator":(A.next(),null)}function fe(A,w){A.sol()&&(w.indentCount=0);var L=w.tokenizer(A,w),T=A.current();if((T==="@return"||T==="}")&&se(w),L!==null){for(var b=A.pos-T.length,M=b+R.indentUnit*w.indentCount,d=[],U=0;U<w.scopes.length;U++){var K=w.scopes[U];K.offset<=M&&d.push(K)}w.scopes=d}return L}return{startState:function(){return{tokenizer:he,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(A,w){var L=fe(A,w);return w.lastToken={style:L,content:A.current()},L},indent:function(A){return A.scopes[0].offset},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"indent"}},"css"),m.defineMIME("text/x-sass","sass")})}()),ws.exports}var _s={exports:{}},Bo;function Ss(){return Bo||(Bo=1,function(g,X){(function(m){m(We())})(function(m){m.defineMode("stylus",function(B){for(var G=B.indentUnit,se="",he=J(R),fe=/^(a|b|i|s|col|em)$/i,A=J(q),w=J(x),L=J(ne),T=J(I),b=J(W),M=ue(W),d=J(D),U=J(pe),K=J(re),ve=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,Ae=ue(E),Ve=J(Q),_t=new RegExp(/^\-(moz|ms|o|webkit)-/i),Wt=J(H),nt="",He={},je,Se,Le,oe;se.length<G;)se+=" ";function Pe(S,y){if(nt=S.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),y.context.line.firstWord=nt?nt[0].replace(/^\s*/,""):"",y.context.line.indent=S.indentation(),je=S.peek(),S.match("//"))return S.skipToEnd(),["comment","comment"];if(S.match("/*"))return y.tokenize=Ne,Ne(S,y);if(je=='"'||je=="'")return S.next(),y.tokenize=be(je),y.tokenize(S,y);if(je=="@")return S.next(),S.eatWhile(/[\w\\-]/),["def",S.current()];if(je=="#"){if(S.next(),S.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(S.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return S.match(_t)?["meta","vendor-prefixes"]:S.match(/^-?[0-9]?\.?[0-9]/)?(S.eatWhile(/[a-z%]/i),["number","unit"]):je=="!"?(S.next(),[S.match(/^(important|optional)/i)?"keyword":"operator","important"]):je=="."&&S.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:S.match(M)?(S.peek()=="("&&(y.tokenize=Ye),["property","word"]):S.match(/^[a-z][\w-]*\(/i)?(S.backUp(1),["keyword","mixin"]):S.match(/^(\+|-)[a-z][\w-]*\(/i)?(S.backUp(1),["keyword","block-mixin"]):S.string.match(/^\s*&/)&&S.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:S.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(S.backUp(1),["variable-3","reference"]):S.match(/^&{1}\s*$/)?["variable-3","reference"]:S.match(Ae)?["operator","operator"]:S.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?S.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!v(S.current())?(S.match("."),["variable-2","variable-name"]):["variable-2","word"]:S.match(ve)?["operator",S.current()]:/[:;,{}\[\]\(\)]/.test(je)?(S.next(),[null,je]):(S.next(),[null,null])}function Ne(S,y){for(var V=!1,we;(we=S.next())!=null;){if(V&&we=="/"){y.tokenize=null;break}V=we=="*"}return["comment","comment"]}function be(S){return function(y,V){for(var we=!1,Je;(Je=y.next())!=null;){if(Je==S&&!we){S==")"&&y.backUp(1);break}we=!we&&Je=="\\"}return(Je==S||!we&&S!=")")&&(V.tokenize=null),["string","string"]}}function Ye(S,y){return S.next(),S.match(/\s*[\"\')]/,!1)?y.tokenize=null:y.tokenize=be(")"),[null,"("]}function gt(S,y,V,we){this.type=S,this.indent=y,this.prev=V,this.line=we||{firstWord:"",indent:0}}function ge(S,y,V,we){return we=we>=0?we:G,S.context=new gt(V,y.indentation()+we,S.context),V}function Xe(S,y){var V=S.context.indent-G;return y=y||!1,S.context=S.context.prev,y&&(S.context.indent=V),S.context.type}function De(S,y,V){return He[V.context.type](S,y,V)}function Re(S,y,V,we){for(var Je=we||1;Je>0;Je--)V.context=V.context.prev;return De(S,y,V)}function v(S){return S.toLowerCase()in he}function k(S){return S=S.toLowerCase(),S in A||S in K}function ie(S){return S.toLowerCase()in Ve}function qe(S){return S.toLowerCase().match(_t)}function z(S){var y=S.toLowerCase(),V="variable-2";return v(S)?V="tag":ie(S)?V="block-keyword":k(S)?V="property":y in L||y in Wt?V="atom":y=="return"||y in T?V="keyword":S.match(/^[A-Z]/)&&(V="string"),V}function Z(S,y){return Ue(y)&&(S=="{"||S=="]"||S=="hash"||S=="qualifier")||S=="block-mixin"}function j(S,y){return S=="{"&&y.match(/^\s*\$?[\w-]+/i,!1)}function Ee(S,y){return S==":"&&y.match(/^[a-z-]+/,!1)}function Ke(S){return S.sol()||S.string.match(new RegExp("^\\s*"+N(S.current())))}function Ue(S){return S.eol()||S.match(/^\s*$/,!1)}function vt(S){var y=/^\s*[-_]*[a-z0-9]+[\w-]*/i,V=typeof S=="string"?S.match(y):S.string.match(y);return V?V[0].replace(/^\s*/,""):""}return He.block=function(S,y,V){if(S=="comment"&&Ke(y)||S==","&&Ue(y)||S=="mixin")return ge(V,y,"block",0);if(j(S,y))return ge(V,y,"interpolation");if(Ue(y)&&S=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(y.string)&&!v(vt(y)))return ge(V,y,"block",0);if(Z(S,y))return ge(V,y,"block");if(S=="}"&&Ue(y))return ge(V,y,"block",0);if(S=="variable-name")return y.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||ie(vt(y))?ge(V,y,"variableName"):ge(V,y,"variableName",0);if(S=="=")return!Ue(y)&&!ie(vt(y))?ge(V,y,"block",0):ge(V,y,"block");if(S=="*"&&(Ue(y)||y.match(/\s*(,|\.|#|\[|:|{)/,!1)))return oe="tag",ge(V,y,"block");if(Ee(S,y))return ge(V,y,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(S))return ge(V,y,Ue(y)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(S))return ge(V,y,"keyframes");if(/@extends?/.test(S))return ge(V,y,"extend",0);if(S&&S.charAt(0)=="@")return y.indentation()>0&&k(y.current().slice(1))?(oe="variable-2","block"):/(@import|@require|@charset)/.test(S)?ge(V,y,"block",0):ge(V,y,"block");if(S=="reference"&&Ue(y))return ge(V,y,"block");if(S=="(")return ge(V,y,"parens");if(S=="vendor-prefixes")return ge(V,y,"vendorPrefixes");if(S=="word"){var we=y.current();if(oe=z(we),oe=="property")return Ke(y)?ge(V,y,"block",0):(oe="atom","block");if(oe=="tag"){if(/embed|menu|pre|progress|sub|table/.test(we)&&k(vt(y))||y.string.match(new RegExp("\\[\\s*"+we+"|"+we+"\\s*\\]")))return oe="atom","block";if(fe.test(we)&&(Ke(y)&&y.string.match(/=/)||!Ke(y)&&!y.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!v(vt(y))))return oe="variable-2",ie(vt(y))?"block":ge(V,y,"block",0);if(Ue(y))return ge(V,y,"block")}if(oe=="block-keyword")return oe="keyword",y.current(/(if|unless)/)&&!Ke(y)?"block":ge(V,y,"block");if(we=="return")return ge(V,y,"block",0);if(oe=="variable-2"&&y.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return ge(V,y,"block")}return V.context.type},He.parens=function(S,y,V){if(S=="(")return ge(V,y,"parens");if(S==")")return V.context.prev.type=="parens"?Xe(V):y.string.match(/^[a-z][\w-]*\(/i)&&Ue(y)||ie(vt(y))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(vt(y))||!y.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&v(vt(y))?ge(V,y,"block"):y.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||y.string.match(/^\s*(\(|\)|[0-9])/)||y.string.match(/^\s+[a-z][\w-]*\(/i)||y.string.match(/^\s+[\$-]?[a-z]/i)?ge(V,y,"block",0):Ue(y)?ge(V,y,"block"):ge(V,y,"block",0);if(S&&S.charAt(0)=="@"&&k(y.current().slice(1))&&(oe="variable-2"),S=="word"){var we=y.current();oe=z(we),oe=="tag"&&fe.test(we)&&(oe="variable-2"),(oe=="property"||we=="to")&&(oe="atom")}return S=="variable-name"?ge(V,y,"variableName"):Ee(S,y)?ge(V,y,"pseudo"):V.context.type},He.vendorPrefixes=function(S,y,V){return S=="word"?(oe="property",ge(V,y,"block",0)):Xe(V)},He.pseudo=function(S,y,V){return k(vt(y.string))?Re(S,y,V):(y.match(/^[a-z-]+/),oe="variable-3",Ue(y)?ge(V,y,"block"):Xe(V))},He.atBlock=function(S,y,V){if(S=="(")return ge(V,y,"atBlock_parens");if(Z(S,y))return ge(V,y,"block");if(j(S,y))return ge(V,y,"interpolation");if(S=="word"){var we=y.current().toLowerCase();if(/^(only|not|and|or)$/.test(we)?oe="keyword":b.hasOwnProperty(we)?oe="tag":U.hasOwnProperty(we)?oe="attribute":d.hasOwnProperty(we)?oe="property":w.hasOwnProperty(we)?oe="string-2":oe=z(y.current()),oe=="tag"&&Ue(y))return ge(V,y,"block")}return S=="operator"&&/^(not|and|or)$/.test(y.current())&&(oe="keyword"),V.context.type},He.atBlock_parens=function(S,y,V){if(S=="{"||S=="}")return V.context.type;if(S==")")return Ue(y)?ge(V,y,"block"):ge(V,y,"atBlock");if(S=="word"){var we=y.current().toLowerCase();return oe=z(we),/^(max|min)/.test(we)&&(oe="property"),oe=="tag"&&(fe.test(we)?oe="variable-2":oe="atom"),V.context.type}return He.atBlock(S,y,V)},He.keyframes=function(S,y,V){return y.indentation()=="0"&&(S=="}"&&Ke(y)||S=="]"||S=="hash"||S=="qualifier"||v(y.current()))?Re(S,y,V):S=="{"?ge(V,y,"keyframes"):S=="}"?Ke(y)?Xe(V,!0):ge(V,y,"keyframes"):S=="unit"&&/^[0-9]+\%$/.test(y.current())?ge(V,y,"keyframes"):S=="word"&&(oe=z(y.current()),oe=="block-keyword")?(oe="keyword",ge(V,y,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(S)?ge(V,y,Ue(y)?"block":"atBlock"):S=="mixin"?ge(V,y,"block",0):V.context.type},He.interpolation=function(S,y,V){return S=="{"&&Xe(V)&&ge(V,y,"block"),S=="}"?y.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||y.string.match(/^\s*[a-z]/i)&&v(vt(y))?ge(V,y,"block"):!y.string.match(/^(\{|\s*\&)/)||y.match(/\s*[\w-]/,!1)?ge(V,y,"block",0):ge(V,y,"block"):S=="variable-name"?ge(V,y,"variableName",0):(S=="word"&&(oe=z(y.current()),oe=="tag"&&(oe="atom")),V.context.type)},He.extend=function(S,y,V){return S=="["||S=="="?"extend":S=="]"?Xe(V):S=="word"?(oe=z(y.current()),"extend"):Xe(V)},He.variableName=function(S,y,V){return S=="string"||S=="["||S=="]"||y.current().match(/^(\.|\$)/)?(y.current().match(/^\.[\w-]+/i)&&(oe="variable-2"),"variableName"):Re(S,y,V)},{startState:function(S){return{tokenize:null,state:"block",context:new gt("block",S||0,null)}},token:function(S,y){return!y.tokenize&&S.eatSpace()?null:(Se=(y.tokenize||Pe)(S,y),Se&&typeof Se=="object"&&(Le=Se[1],Se=Se[0]),oe=Se,y.state=He[y.state](Le,S,y),oe)},indent:function(S,y,V){var we=S.context,Je=y&&y.charAt(0),st=we.indent,Ht=vt(y),Et=V.match(/^\s*/)[0].replace(/\t/g,se).length,Me=S.context.prev?S.context.prev.line.firstWord:"",yt=S.context.prev?S.context.prev.line.indent:Et;return we.prev&&(Je=="}"&&(we.type=="block"||we.type=="atBlock"||we.type=="keyframes")||Je==")"&&(we.type=="parens"||we.type=="atBlock_parens")||Je=="{"&&we.type=="at")?st=we.indent-G:/(\})/.test(Je)||(/@|\$|\d/.test(Je)||/^\{/.test(y)||/^\s*\/(\/|\*)/.test(y)||/^\s*\/\*/.test(Me)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(y)||/^(\+|-)?[a-z][\w-]*\(/i.test(y)||/^return/.test(y)||ie(Ht)?st=Et:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Je)||v(Ht)?/\,\s*$/.test(Me)?st=yt:/^\s+/.test(V)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Me)||v(Me))?st=Et<=yt?yt:yt+G:st=Et:!/,\s*$/.test(V)&&(qe(Ht)||k(Ht))&&(ie(Me)?st=Et<=yt?yt:yt+G:/^\{/.test(Me)?st=Et<=yt?Et:yt+G:qe(Me)||k(Me)?st=Et>=yt?yt:Et:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(Me)||/=\s*$/.test(Me)||v(Me)||/^\$[\w-\.\[\]\'\"]/.test(Me)?st=yt+G:st=Et)),st},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}});var R=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],W=["domain","regexp","url-prefix","url"],pe=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],D=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],q=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],x=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],re=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],I=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],ne=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],E=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],Q=["for","if","else","unless","from","to"],H=["null","true","false","href","title","type","not-allowed","readonly","disabled"],Y=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],ye=R.concat(W,pe,D,q,x,I,ne,re,E,Q,H,Y);function ue(B){return B=B.sort(function(G,se){return se>G}),new RegExp("^(("+B.join(")|(")+"))\\b")}function J(B){for(var G={},se=0;se<B.length;++se)G[B[se]]=!0;return G}function N(B){return B.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}m.registerHelper("hintWords","stylus",ye),m.defineMIME("text/x-styl","stylus")})}()),_s.exports}var Cs={exports:{}},Vo;function Ls(){return Vo||(Vo=1,function(g,X){(function(m){m(We(),gn,$t,gs)})(function(m){m.defineMode("pug",function(R){var W="keyword",pe="meta",D="builtin",q="qualifier",x={"{":"}","(":")","[":"]"},re=m.getMode(R,"javascript");function I(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=m.startState(re),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}I.prototype.copy=function(){var v=new I;return v.javaScriptLine=this.javaScriptLine,v.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,v.javaScriptArguments=this.javaScriptArguments,v.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,v.isInterpolating=this.isInterpolating,v.interpolationNesting=this.interpolationNesting,v.jsState=m.copyState(re,this.jsState),v.innerMode=this.innerMode,this.innerMode&&this.innerState&&(v.innerState=m.copyState(this.innerMode,this.innerState)),v.restOfLine=this.restOfLine,v.isIncludeFiltered=this.isIncludeFiltered,v.isEach=this.isEach,v.lastTag=this.lastTag,v.scriptType=this.scriptType,v.isAttrs=this.isAttrs,v.attrsNest=this.attrsNest.slice(),v.inAttributeName=this.inAttributeName,v.attributeIsType=this.attributeIsType,v.attrValue=this.attrValue,v.indentOf=this.indentOf,v.indentToken=this.indentToken,v.innerModeForLine=this.innerModeForLine,v};function ne(v,k){if(v.sol()&&(k.javaScriptLine=!1,k.javaScriptLineExcludesColon=!1),k.javaScriptLine){if(k.javaScriptLineExcludesColon&&v.peek()===":"){k.javaScriptLine=!1,k.javaScriptLineExcludesColon=!1;return}var ie=re.token(v,k.jsState);return v.eol()&&(k.javaScriptLine=!1),ie||!0}}function E(v,k){if(k.javaScriptArguments){if(k.javaScriptArgumentsDepth===0&&v.peek()!=="("){k.javaScriptArguments=!1;return}if(v.peek()==="("?k.javaScriptArgumentsDepth++:v.peek()===")"&&k.javaScriptArgumentsDepth--,k.javaScriptArgumentsDepth===0){k.javaScriptArguments=!1;return}var ie=re.token(v,k.jsState);return ie||!0}}function Q(v){if(v.match(/^yield\b/))return"keyword"}function H(v){if(v.match(/^(?:doctype) *([^\n]+)?/))return pe}function Y(v,k){if(v.match("#{"))return k.isInterpolating=!0,k.interpolationNesting=0,"punctuation"}function ye(v,k){if(k.isInterpolating){if(v.peek()==="}"){if(k.interpolationNesting--,k.interpolationNesting<0)return v.next(),k.isInterpolating=!1,"punctuation"}else v.peek()==="{"&&k.interpolationNesting++;return re.token(v,k.jsState)||!0}}function ue(v,k){if(v.match(/^case\b/))return k.javaScriptLine=!0,W}function J(v,k){if(v.match(/^when\b/))return k.javaScriptLine=!0,k.javaScriptLineExcludesColon=!0,W}function N(v){if(v.match(/^default\b/))return W}function B(v,k){if(v.match(/^extends?\b/))return k.restOfLine="string",W}function G(v,k){if(v.match(/^append\b/))return k.restOfLine="variable",W}function se(v,k){if(v.match(/^prepend\b/))return k.restOfLine="variable",W}function he(v,k){if(v.match(/^block\b *(?:(prepend|append)\b)?/))return k.restOfLine="variable",W}function fe(v,k){if(v.match(/^include\b/))return k.restOfLine="string",W}function A(v,k){if(v.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&v.match("include"))return k.isIncludeFiltered=!0,W}function w(v,k){if(k.isIncludeFiltered){var ie=Ae(v,k);return k.isIncludeFiltered=!1,k.restOfLine="string",ie}}function L(v,k){if(v.match(/^mixin\b/))return k.javaScriptLine=!0,W}function T(v,k){if(v.match(/^\+([-\w]+)/))return v.match(/^\( *[-\w]+ *=/,!1)||(k.javaScriptArguments=!0,k.javaScriptArgumentsDepth=0),"variable";if(v.match("+#{",!1))return v.next(),k.mixinCallAfter=!0,Y(v,k)}function b(v,k){if(k.mixinCallAfter)return k.mixinCallAfter=!1,v.match(/^\( *[-\w]+ *=/,!1)||(k.javaScriptArguments=!0,k.javaScriptArgumentsDepth=0),!0}function M(v,k){if(v.match(/^(if|unless|else if|else)\b/))return k.javaScriptLine=!0,W}function d(v,k){if(v.match(/^(- *)?(each|for)\b/))return k.isEach=!0,W}function U(v,k){if(k.isEach){if(v.match(/^ in\b/))return k.javaScriptLine=!0,k.isEach=!1,W;if(v.sol()||v.eol())k.isEach=!1;else if(v.next()){for(;!v.match(/^ in\b/,!1)&&v.next(););return"variable"}}}function K(v,k){if(v.match(/^while\b/))return k.javaScriptLine=!0,W}function ve(v,k){var ie;if(ie=v.match(/^(\w(?:[-:\w]*\w)?)\/?/))return k.lastTag=ie[1].toLowerCase(),k.lastTag==="script"&&(k.scriptType="application/javascript"),"tag"}function Ae(v,k){if(v.match(/^:([\w\-]+)/)){var ie;return R&&R.innerModes&&(ie=R.innerModes(v.current().substring(1))),ie||(ie=v.current().substring(1)),typeof ie=="string"&&(ie=m.getMode(R,ie)),Ye(v,k,ie),"atom"}}function Ve(v,k){if(v.match(/^(!?=|-)/))return k.javaScriptLine=!0,"punctuation"}function _t(v){if(v.match(/^#([\w-]+)/))return D}function Wt(v){if(v.match(/^\.([\w-]+)/))return q}function nt(v,k){if(v.peek()=="(")return v.next(),k.isAttrs=!0,k.attrsNest=[],k.inAttributeName=!0,k.attrValue="",k.attributeIsType=!1,"punctuation"}function He(v,k){if(k.isAttrs){if(x[v.peek()]&&k.attrsNest.push(x[v.peek()]),k.attrsNest[k.attrsNest.length-1]===v.peek())k.attrsNest.pop();else if(v.eat(")"))return k.isAttrs=!1,"punctuation";if(k.inAttributeName&&v.match(/^[^=,\)!]+/))return(v.peek()==="="||v.peek()==="!")&&(k.inAttributeName=!1,k.jsState=m.startState(re),k.lastTag==="script"&&v.current().trim().toLowerCase()==="type"?k.attributeIsType=!0:k.attributeIsType=!1),"attribute";var ie=re.token(v,k.jsState);if(k.attributeIsType&&ie==="string"&&(k.scriptType=v.current().toString()),k.attrsNest.length===0&&(ie==="string"||ie==="variable"||ie==="keyword"))try{return Function("","var x "+k.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),k.inAttributeName=!0,k.attrValue="",v.backUp(v.current().length),He(v,k)}catch(qe){}return k.attrValue+=v.current(),ie||!0}}function je(v,k){if(v.match(/^&attributes\b/))return k.javaScriptArguments=!0,k.javaScriptArgumentsDepth=0,"keyword"}function Se(v){if(v.sol()&&v.eatSpace())return"indent"}function Le(v,k){if(v.match(/^ *\/\/(-)?([^\n]*)/))return k.indentOf=v.indentation(),k.indentToken="comment","comment"}function oe(v){if(v.match(/^: */))return"colon"}function Pe(v,k){if(v.match(/^(?:\| ?| )([^\n]+)/))return"string";if(v.match(/^(<[^\n]*)/,!1))return Ye(v,k,"htmlmixed"),k.innerModeForLine=!0,gt(v,k,!0)}function Ne(v,k){if(v.eat(".")){var ie=null;return k.lastTag==="script"&&k.scriptType.toLowerCase().indexOf("javascript")!=-1?ie=k.scriptType.toLowerCase().replace(/"|'/g,""):k.lastTag==="style"&&(ie="css"),Ye(v,k,ie),"dot"}}function be(v){return v.next(),null}function Ye(v,k,ie){ie=m.mimeModes[ie]||ie,ie=R.innerModes&&R.innerModes(ie)||ie,ie=m.mimeModes[ie]||ie,ie=m.getMode(R,ie),k.indentOf=v.indentation(),ie&&ie.name!=="null"?k.innerMode=ie:k.indentToken="string"}function gt(v,k,ie){if(v.indentation()>k.indentOf||k.innerModeForLine&&!v.sol()||ie)return k.innerMode?(k.innerState||(k.innerState=k.innerMode.startState?m.startState(k.innerMode,v.indentation()):{}),v.hideFirstChars(k.indentOf+2,function(){return k.innerMode.token(v,k.innerState)||!0})):(v.skipToEnd(),k.indentToken);v.sol()&&(k.indentOf=1/0,k.indentToken=null,k.innerMode=null,k.innerState=null)}function ge(v,k){if(v.sol()&&(k.restOfLine=""),k.restOfLine){v.skipToEnd();var ie=k.restOfLine;return k.restOfLine="",ie}}function Xe(){return new I}function De(v){return v.copy()}function Re(v,k){var ie=gt(v,k)||ge(v,k)||ye(v,k)||w(v,k)||U(v,k)||He(v,k)||ne(v,k)||E(v,k)||b(v,k)||Q(v)||H(v)||Y(v,k)||ue(v,k)||J(v,k)||N(v)||B(v,k)||G(v,k)||se(v,k)||he(v,k)||fe(v,k)||A(v,k)||L(v,k)||T(v,k)||M(v,k)||d(v,k)||K(v,k)||ve(v,k)||Ae(v,k)||Ve(v,k)||_t(v)||Wt(v)||nt(v,k)||je(v,k)||Se(v)||Pe(v,k)||Le(v,k)||oe(v)||Ne(v,k)||be(v);return ie===!0?null:ie}return{startState:Xe,copyState:De,token:Re}},"javascript","css","htmlmixed"),m.defineMIME("text/x-pug","pug"),m.defineMIME("text/x-jade","pug")})}()),Cs.exports}var zs={exports:{}},Ms={exports:{}},$o;function Ns(){return $o||($o=1,function(g,X){(function(m){m(We())})(function(m){m.defineSimpleMode=function(E,Q){m.defineMode(E,function(H){return m.simpleMode(H,Q)})},m.simpleMode=function(E,Q){R(Q,"start");var H={},Y=Q.meta||{},ye=!1;for(var ue in Q)if(ue!=Y&&Q.hasOwnProperty(ue))for(var J=H[ue]=[],N=Q[ue],B=0;B<N.length;B++){var G=N[B];J.push(new D(G,Q)),(G.indent||G.dedent)&&(ye=!0)}var se={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:ye?[]:null}},copyState:function(fe){var A={state:fe.state,pending:fe.pending,local:fe.local,localState:null,indent:fe.indent&&fe.indent.slice(0)};fe.localState&&(A.localState=m.copyState(fe.local.mode,fe.localState)),fe.stack&&(A.stack=fe.stack.slice(0));for(var w=fe.persistentStates;w;w=w.next)A.persistentStates={mode:w.mode,spec:w.spec,state:w.state==fe.localState?A.localState:m.copyState(w.mode,w.state),next:A.persistentStates};return A},token:q(H,E),innerMode:function(fe){return fe.local&&{mode:fe.local.mode,state:fe.localState}},indent:ne(H,Y)};if(Y)for(var he in Y)Y.hasOwnProperty(he)&&(se[he]=Y[he]);return se};function R(E,Q){if(!E.hasOwnProperty(Q))throw new Error("Undefined state "+Q+" in simple mode")}function W(E,Q){if(!E)return/(?:)/;var H="";return E instanceof RegExp?(E.ignoreCase&&(H="i"),E.unicode&&(H+="u"),E=E.source):E=String(E),new RegExp((Q===!1?"":"^")+"(?:"+E+")",H)}function pe(E){if(!E)return null;if(E.apply)return E;if(typeof E=="string")return E.replace(/\./g," ");for(var Q=[],H=0;H<E.length;H++)Q.push(E[H]&&E[H].replace(/\./g," "));return Q}function D(E,Q){(E.next||E.push)&&R(Q,E.next||E.push),this.regex=W(E.regex),this.token=pe(E.token),this.data=E}function q(E,Q){return function(H,Y){if(Y.pending){var ye=Y.pending.shift();return Y.pending.length==0&&(Y.pending=null),H.pos+=ye.text.length,ye.token}if(Y.local)if(Y.local.end&&H.match(Y.local.end)){var ue=Y.local.endToken||null;return Y.local=Y.localState=null,ue}else{var ue=Y.local.mode.token(H,Y.localState),J;return Y.local.endScan&&(J=Y.local.endScan.exec(H.current()))&&(H.pos=H.start+J.index),ue}for(var N=E[Y.state],B=0;B<N.length;B++){var G=N[B],se=(!G.data.sol||H.sol())&&H.match(G.regex);if(se){G.data.next?Y.state=G.data.next:G.data.push?((Y.stack||(Y.stack=[])).push(Y.state),Y.state=G.data.push):G.data.pop&&Y.stack&&Y.stack.length&&(Y.state=Y.stack.pop()),G.data.mode&&re(Q,Y,G.data.mode,G.token),G.data.indent&&Y.indent.push(H.indentation()+Q.indentUnit),G.data.dedent&&Y.indent.pop();var he=G.token;if(he&&he.apply&&(he=he(se)),se.length>2&&G.token&&typeof G.token!="string"){for(var fe=2;fe<se.length;fe++)se[fe]&&(Y.pending||(Y.pending=[])).push({text:se[fe],token:G.token[fe-1]});return H.backUp(se[0].length-(se[1]?se[1].length:0)),he[0]}else return he&&he.join?he[0]:he}}return H.next(),null}}function x(E,Q){if(E===Q)return!0;if(!E||typeof E!="object"||!Q||typeof Q!="object")return!1;var H=0;for(var Y in E)if(E.hasOwnProperty(Y)){if(!Q.hasOwnProperty(Y)||!x(E[Y],Q[Y]))return!1;H++}for(var Y in Q)Q.hasOwnProperty(Y)&&H--;return H==0}function re(E,Q,H,Y){var ye;if(H.persistent)for(var ue=Q.persistentStates;ue&&!ye;ue=ue.next)(H.spec?x(H.spec,ue.spec):H.mode==ue.mode)&&(ye=ue);var J=ye?ye.mode:H.mode||m.getMode(E,H.spec),N=ye?ye.state:m.startState(J);H.persistent&&!ye&&(Q.persistentStates={mode:J,spec:H.spec,state:N,next:Q.persistentStates}),Q.localState=N,Q.local={mode:J,end:H.end&&W(H.end),endScan:H.end&&H.forceEnd!==!1&&W(H.end,!1),endToken:Y&&Y.join?Y[Y.length-1]:Y}}function I(E,Q){for(var H=0;H<Q.length;H++)if(Q[H]===E)return!0}function ne(E,Q){return function(H,Y,ye){if(H.local&&H.local.mode.indent)return H.local.mode.indent(H.localState,Y,ye);if(H.indent==null||H.local||Q.dontIndentStates&&I(H.state,Q.dontIndentStates)>-1)return m.Pass;var ue=H.indent.length-1,J=E[H.state];e:for(;;){for(var N=0;N<J.length;N++){var B=J[N];if(B.data.dedent&&B.data.dedentIfLineStart!==!1){var G=B.regex.exec(Y);if(G&&G[0]){ue--,(B.next||B.push)&&(J=E[B.next||B.push]),Y=Y.slice(G[0].length);continue e}}}break}return ue<0?0:H.indent[ue]}}})}()),Ms.exports}var Ts={exports:{}},Ro;function As(){return Ro||(Ro=1,function(g,X){(function(m){m(We())})(function(m){m.multiplexingMode=function(R){var W=Array.prototype.slice.call(arguments,1);function pe(D,q,x,re){if(typeof q=="string"){var I=D.indexOf(q,x);return re&&I>-1?I+q.length:I}var ne=q.exec(x?D.slice(x):D);return ne?ne.index+x+(re?ne[0].length:0):-1}return{startState:function(){return{outer:m.startState(R),innerActive:null,inner:null,startingInner:!1}},copyState:function(D){return{outer:m.copyState(R,D.outer),innerActive:D.innerActive,inner:D.innerActive&&m.copyState(D.innerActive.mode,D.inner),startingInner:D.startingInner}},token:function(D,q){if(q.innerActive){var x=q.innerActive,re=D.string;if(!x.close&&D.sol())return q.innerActive=q.inner=null,this.token(D,q);var I=x.close&&!q.startingInner?pe(re,x.close,D.pos,x.parseDelimiters):-1;if(I==D.pos&&!x.parseDelimiters)return D.match(x.close),q.innerActive=q.inner=null,x.delimStyle&&x.delimStyle+" "+x.delimStyle+"-close";I>-1&&(D.string=re.slice(0,I));var ne=x.mode.token(D,q.inner);return I>-1?D.string=re:D.pos>D.start&&(q.startingInner=!1),I==D.pos&&x.parseDelimiters&&(q.innerActive=q.inner=null),x.innerStyle&&(ne?ne=ne+" "+x.innerStyle:ne=x.innerStyle),ne}else{for(var E=1/0,re=D.string,Q=0;Q<W.length;++Q){var H=W[Q],I=pe(re,H.open,D.pos);if(I==D.pos){H.parseDelimiters||D.match(H.open),q.startingInner=!!H.parseDelimiters,q.innerActive=H;var Y=0;if(R.indent){var ye=R.indent(q.outer,"","");ye!==m.Pass&&(Y=ye)}return q.inner=m.startState(H.mode,Y),H.delimStyle&&H.delimStyle+" "+H.delimStyle+"-open"}else I!=-1&&I<E&&(E=I)}E!=1/0&&(D.string=re.slice(0,E));var ue=R.token(D,q.outer);return E!=1/0&&(D.string=re),ue}},indent:function(D,q,x){var re=D.innerActive?D.innerActive.mode:R;return re.indent?re.indent(D.innerActive?D.inner:D.outer,q,x):m.Pass},blankLine:function(D){var q=D.innerActive?D.innerActive.mode:R;if(q.blankLine&&q.blankLine(D.innerActive?D.inner:D.outer),D.innerActive)D.innerActive.close===`
- `&&(D.innerActive=D.inner=null);else for(var x=0;x<W.length;++x){var re=W[x];re.open===`
- `&&(D.innerActive=re,D.inner=m.startState(re.mode,q.indent?q.indent(D.outer,"",""):0))}},electricChars:R.electricChars,innerMode:function(D){return D.inner?{state:D.inner,mode:D.innerActive.mode}:{state:D.outer,mode:R}}}}})}()),Ts.exports}var Ko;function Os(){return Ko||(Ko=1,function(g,X){(function(m){m(We(),Ns(),As())})(function(m){m.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),m.defineMode("handlebars",function(R,W){var pe=m.getMode(R,"handlebars-tags");return!W||!W.base?pe:m.multiplexingMode(m.getMode(R,W.base),{open:"{{",close:/\}\}\}?/,mode:pe,parseDelimiters:!0})}),m.defineMIME("text/x-handlebars-template","handlebars")})}()),zs.exports}(function(g,X){(function(m){m(We(),ys(),Io(),gn,xs(),$t,ks(),Ss(),Ls(),Os())})(function(m){var R={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};m.defineMode("vue-template",function(W,pe){var D={token:function(q){if(q.match(/^\{\{.*?\}\}/))return"meta mustache";for(;q.next()&&!q.match("{{",!1););return null}};return m.overlayMode(m.getMode(W,pe.backdrop||"text/html"),D)}),m.defineMode("vue",function(W){return m.getMode(W,{name:"htmlmixed",tags:R})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),m.defineMIME("script/x-vue","vue"),m.defineMIME("text/x-vue","vue")})})();const Ps=Oi({__name:"CodeMirror",props:{mode:{type:String,default:Mr.JSON,validator(g){return Object.values(Mr).includes(g)}},value:{type:String,default:""},readonly:{type:Boolean,default:!1}},emits:["change"],setup(g,{emit:X}){const m=g,R=os();let W;const pe=Ku(x,100),D=Uu();Eo(()=>m.value,I=>mn(this,null,function*(){yield as();const ne=W==null?void 0:W.getValue();I!==ne&&(W==null||W.setValue(I||""))}),{flush:"post"}),ls(()=>{W==null||W.setOption("mode",m.mode)}),Eo(()=>D.getDarkMode,()=>mn(this,null,function*(){q()}),{immediate:!0});function q(){var I;(I=ss(W))==null||I.setOption("theme",D.getDarkMode==="light"?"idea":"material-palenight")}function x(){W==null||W.refresh()}function re(){return mn(this,null,function*(){const I={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers"]};W=Qn(R.value,is({value:"",mode:m.mode,readOnly:m.readonly,tabSize:2,theme:"material-palenight",lineWrapping:!0,lineNumbers:!0},I)),W==null||W.setValue(m.value),q(),W==null||W.on("change",()=>{X("change",W==null?void 0:W.getValue())})})}return Gu(()=>mn(this,null,function*(){yield as(),re(),td(pe)})),Yu(()=>{W=null}),(I,ne)=>(Do(),cs("div",{class:"relative !h-full w-full overflow-hidden",ref_key:"el",ref:R},null,512))}}),js={class:"h-full"},Es=Oi({__name:"CodeEditor",props:{value:{type:[Object,String]},mode:{type:String,default:Mr.JSON,validator(g){return Object.values(Mr).includes(g)}},readonly:{type:Boolean},autoFormat:{type:Boolean,default:!0}},emits:["change","update:value","format-error"],setup(g,{emit:X}){const m=g,R=us(()=>{const{value:pe,mode:D,autoFormat:q}=m;if(!q||D!==Mr.JSON)return pe;let x=pe;if(Qu(pe))try{x=JSON.parse(pe)}catch(re){return X("format-error",pe),pe}return JSON.stringify(x,null,2)});function W(pe){X("update:value",pe),X("change",pe)}return(pe,D)=>(Do(),cs("div",js,[ds(Ps,{value:R.value,onChange:W,mode:g.mode,readonly:g.readonly},null,8,["value","mode","readonly"])]))}});var Xn={d:(g,X)=>{for(var m in X)Xn.o(X,m)&&!Xn.o(g,m)&&Object.defineProperty(g,m,{enumerable:!0,get:X[m]})},o:(g,X)=>Object.prototype.hasOwnProperty.call(g,X)},Uo={};function Ei(g,X){(X==null||X>g.length)&&(X=g.length);for(var m=0,R=new Array(X);m<X;m++)R[m]=g[m];return R}function Go(g,X){if(g){if(typeof g=="string")return Ei(g,X);var m=Object.prototype.toString.call(g).slice(8,-1);return m==="Object"&&g.constructor&&(m=g.constructor.name),m==="Map"||m==="Set"?Array.from(g):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?Ei(g,X):void 0}}function Jn(g){return function(X){if(Array.isArray(X))return Ei(X)}(g)||function(X){if(typeof Symbol<"u"&&X[Symbol.iterator]!=null||X["@@iterator"]!=null)return Array.from(X)}(g)||Go(g)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Zn(g,X,m){return X in g?Object.defineProperty(g,X,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[X]=m,g}Xn.d(Uo,{Z:()=>Ws});const ze=(Yo={computed:()=>us,createTextVNode:()=>Xu,createVNode:()=>ds,defineComponent:()=>Oi,reactive:()=>Ju,ref:()=>os,watch:()=>Eo,watchEffect:()=>ls},Di={},Xn.d(Di,Yo),Di),Ds=(0,ze.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var g=this.data,X=this.onClick;return(0,ze.createVNode)("span",{class:"vjs-tree-brackets",onClick:X},[g])}}),qs=(0,ze.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(g,X){var m=X.emit;return{uiType:(0,ze.computed)(function(){return g.isMultiple?"checkbox":"radio"}),model:(0,ze.computed)({get:function(){return g.checked},set:function(R){return m("update:modelValue",R)}})}},render:function(){var g=this.uiType,X=this.model,m=this.$emit;return(0,ze.createVNode)("label",{class:["vjs-check-controller",X?"is-checked":""],onClick:function(R){return R.stopPropagation()}},[(0,ze.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(g)},null),(0,ze.createVNode)("input",{checked:X,class:"vjs-check-controller-original is-".concat(g),type:g,onChange:function(){return m("change",X)}},null)])}}),Is=(0,ze.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var g=this.nodeType,X=this.onClick,m=g==="objectStart"||g==="arrayStart";return m||g==="objectCollapsed"||g==="arrayCollapsed"?(0,ze.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(m?"open":"close"),onClick:X},[(0,ze.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,ze.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var Yo,Di;function qi(g){return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},qi(g)}function Qo(g){return Object.prototype.toString.call(g).slice(8,-1).toLowerCase()}function Nr(g){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,R=arguments.length>3?arguments[3]:void 0,W=R||{},pe=W.key,D=W.index,q=W.type,x=q===void 0?"content":q,re=W.showComma,I=re!==void 0&&re,ne=W.length,E=ne===void 0?1:ne,Q=Qo(g);if(Q==="array"){var H=Xo(g.map(function(ue,J,N){return Nr(ue,"".concat(X,"[").concat(J,"]"),m+1,{index:J,showComma:J!==N.length-1,length:E,type:x})}));return[Nr("[",X,m,{showComma:!1,key:pe,length:g.length,type:"arrayStart"})[0]].concat(H,Nr("]",X,m,{showComma:I,length:g.length,type:"arrayEnd"})[0])}if(Q==="object"){var Y=Object.keys(g),ye=Xo(Y.map(function(ue,J,N){return Nr(g[ue],/^[a-zA-Z_]\w*$/.test(ue)?"".concat(X,".").concat(ue):"".concat(X,'["').concat(ue,'"]'),m+1,{key:ue,showComma:J!==N.length-1,length:E,type:x})}));return[Nr("{",X,m,{showComma:!1,key:pe,index:D,length:Y.length,type:"objectStart"})[0]].concat(ye,Nr("}",X,m,{showComma:I,length:Y.length,type:"objectEnd"})[0])}return[{content:g,level:m,key:pe,index:D,path:X,showComma:I,length:E,type:x}]}function Xo(g){if(typeof Array.prototype.flat=="function")return g.flat();for(var X=Jn(g),m=[];X.length;){var R=X.shift();Array.isArray(R)?X.unshift.apply(X,Jn(R)):m.push(R)}return m}function Ii(g){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(g==null)return g;if(g instanceof Date)return new Date(g);if(g instanceof RegExp)return new RegExp(g);if(qi(g)!=="object")return g;if(X.get(g))return X.get(g);if(Array.isArray(g)){var m=g.map(function(pe){return Ii(pe,X)});return X.set(g,m),m}var R={};for(var W in g)R[W]=Ii(g[W],X);return X.set(g,R),R}function Jo(g,X){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(g);X&&(R=R.filter(function(W){return Object.getOwnPropertyDescriptor(g,W).enumerable})),m.push.apply(m,R)}return m}function Zo(g){for(var X=1;X<arguments.length;X++){var m=arguments[X]!=null?arguments[X]:{};X%2?Jo(Object(m),!0).forEach(function(R){Zn(g,R,m[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):Jo(Object(m)).forEach(function(R){Object.defineProperty(g,R,Object.getOwnPropertyDescriptor(m,R))})}return g}var ea={showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},theme:{type:String,default:"light"},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}};const Fs=(0,ze.defineComponent)({name:"TreeNode",props:Zo(Zo({},ea),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(g,X){var m=X.emit,R=(0,ze.computed)(function(){return Qo(g.node.content)}),W=(0,ze.computed)(function(){return"vjs-value vjs-value-".concat(R.value)}),pe=(0,ze.computed)(function(){return g.showDoubleQuotes?'"'.concat(g.node.key,'"'):g.node.key}),D=(0,ze.computed)(function(){return g.selectableType==="multiple"}),q=(0,ze.computed)(function(){return g.selectableType==="single"}),x=(0,ze.computed)(function(){return g.nodeSelectable(g.node)&&(D.value||q.value)}),re=(0,ze.reactive)({editing:!1}),I=function(J){var N,B,G=(B=(N=J.target)===null||N===void 0?void 0:N.value)==="null"?null:B==="undefined"?void 0:B==="true"||B!=="false"&&(B[0]+B[B.length-1]==='""'||B[0]+B[B.length-1]==="''"?B.slice(1,-1):typeof Number(B)=="number"&&!isNaN(Number(B))||B==="NaN"?Number(B):B);m("valueChange",G,g.node.path)},ne=(0,ze.computed)(function(){var J,N=(J=g.node)===null||J===void 0?void 0:J.content;return N===null?N="null":N===void 0&&(N="undefined"),R.value==="string"?'"'.concat(N,'"'):N+""}),E=function(){var J=g.renderNodeValue;return J?J({node:g.node,defaultValue:ne.value}):ne.value},Q=function(){m("bracketsClick",!g.collapsed,g.node)},H=function(){m("iconClick",!g.collapsed,g.node)},Y=function(){m("selectedChange",g.node)},ye=function(){m("nodeClick",g.node),x.value&&g.selectOnClickNode&&m("selectedChange",g.node)},ue=function(J){if(g.editable&&!re.editing){re.editing=!0;var N=function B(G){var se;G.target!==J.target&&((se=G.target)===null||se===void 0?void 0:se.parentElement)!==J.target&&(re.editing=!1,document.removeEventListener("click",B))};document.removeEventListener("click",N),document.addEventListener("click",N)}};return function(){var J,N=g.node;return(0,ze.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":g.showSelectController,"has-carets":g.showIcon,"is-highlight":g.highlightSelectedNode&&g.checked,dark:g.theme==="dark"},onClick:ye,style:g.style},[g.showLineNumber&&(0,ze.createVNode)("span",{class:"vjs-node-index"},[N.id+1]),g.showSelectController&&x.value&&N.type!=="objectEnd"&&N.type!=="arrayEnd"&&(0,ze.createVNode)(qs,{isMultiple:D.value,checked:g.checked,onChange:Y},null),(0,ze.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(N.level)).map(function(B,G){return(0,ze.createVNode)("div",{key:G,class:{"vjs-indent-unit":!0,"has-line":g.showLine}},null)}),g.showIcon&&(0,ze.createVNode)(Is,{nodeType:N.type,onClick:H},null)]),N.key&&(0,ze.createVNode)("span",{class:"vjs-key"},[(J=g.renderNodeKey,J?J({node:g.node,defaultKey:pe.value||""}):pe.value),(0,ze.createVNode)("span",{class:"vjs-colon"},[":".concat(g.showKeyValueSpace?" ":"")])]),(0,ze.createVNode)("span",null,[N.type!=="content"&&N.content?(0,ze.createVNode)(Ds,{data:N.content.toString(),onClick:Q},null):(0,ze.createVNode)("span",{class:W.value,onClick:!g.editable||g.editableTrigger&&g.editableTrigger!=="click"?void 0:ue,onDblclick:g.editable&&g.editableTrigger==="dblclick"?ue:void 0},[g.editable&&re.editing?(0,ze.createVNode)("input",{value:ne.value,onChange:I,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):E()]),N.showComma&&(0,ze.createVNode)("span",null,[","]),g.showLength&&g.collapsed&&(0,ze.createVNode)("span",{class:"vjs-comment"},[(0,ze.createTextVNode)(" // "),N.length,(0,ze.createTextVNode)(" items ")])])])}}});function ta(g,X){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(g);X&&(R=R.filter(function(W){return Object.getOwnPropertyDescriptor(g,W).enumerable})),m.push.apply(m,R)}return m}function Ft(g){for(var X=1;X<arguments.length;X++){var m=arguments[X]!=null?arguments[X]:{};X%2?ta(Object(m),!0).forEach(function(R){Zn(g,R,m[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):ta(Object(m)).forEach(function(R){Object.defineProperty(g,R,Object.getOwnPropertyDescriptor(m,R))})}return g}const Ws=(0,ze.defineComponent)({name:"Tree",props:Ft(Ft({},ea),{},{data:{type:[String,Number,Boolean,Array,Object],default:null},collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},rootPath:{type:String,default:"root"},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function},theme:{type:String,default:"light"}}),slots:["renderNodeKey","renderNodeValue"],emits:["nodeClick","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(g,X){var m=X.emit,R=X.slots,W=(0,ze.ref)(),pe=(0,ze.computed)(function(){return Nr(g.data,g.rootPath)}),D=function(N,B){return pe.value.reduce(function(G,se){var he,fe=se.level>=N||se.length>=B,A=(he=g.pathCollapsible)===null||he===void 0?void 0:he.call(g,se);return se.type!=="objectStart"&&se.type!=="arrayStart"||!fe&&!A?G:Ft(Ft({},G),{},Zn({},se.path,1))},{})},q=(0,ze.reactive)({translateY:0,visibleData:null,hiddenPaths:D(g.deep,g.collapsedNodeLength)}),x=(0,ze.computed)(function(){for(var N=null,B=[],G=pe.value.length,se=0;se<G;se++){var he=Ft(Ft({},pe.value[se]),{},{id:se}),fe=q.hiddenPaths[he.path];if(N&&N.path===he.path){var A=N.type==="objectStart",w=Ft(Ft(Ft({},he),N),{},{showComma:he.showComma,content:A?"{...}":"[...]",type:A?"objectCollapsed":"arrayCollapsed"});N=null,B.push(w)}else{if(fe&&!N){N=he;continue}if(N)continue;B.push(he)}}return B}),re=(0,ze.computed)(function(){var N=g.selectedValue;return N&&g.selectableType==="multiple"&&Array.isArray(N)?N:[N]}),I=(0,ze.computed)(function(){return!g.selectableType||g.selectOnClickNode||g.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),ne=function(){var N=x.value;if(g.virtual){var B,G=g.height/g.itemHeight,se=((B=W.value)===null||B===void 0?void 0:B.scrollTop)||0,he=Math.floor(se/g.itemHeight),fe=he<0?0:he+G>N.length?N.length-G:he;fe<0&&(fe=0);var A=fe+G;q.translateY=fe*g.itemHeight,q.visibleData=N.filter(function(w,L){return L>=fe&&L<A})}else q.visibleData=N},E=function(){ne()},Q=function(N){var B,G,se=N.path,he=g.selectableType;if(he==="multiple"){var fe=re.value.findIndex(function(T){return T===se}),A=Jn(re.value);fe!==-1?A.splice(fe,1):A.push(se),m("update:selectedValue",A),m("selectedChange",A,Jn(re.value))}else if(he==="single"&&re.value[0]!==se){var w=(B=re.value,G=1,function(T){if(Array.isArray(T))return T}(B)||function(T,b){var M=T==null?null:typeof Symbol<"u"&&T[Symbol.iterator]||T["@@iterator"];if(M!=null){var d,U,K=[],ve=!0,Ae=!1;try{for(M=M.call(T);!(ve=(d=M.next()).done)&&(K.push(d.value),!b||K.length!==b);ve=!0);}catch(Ve){Ae=!0,U=Ve}finally{try{ve||M.return==null||M.return()}finally{if(Ae)throw U}}return K}}(B,G)||Go(B,G)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())[0],L=se;m("update:selectedValue",L),m("selectedChange",L,w)}},H=function(N){m("nodeClick",N)},Y=function(N,B){if(N)q.hiddenPaths=Ft(Ft({},q.hiddenPaths),{},Zn({},B,1));else{var G=Ft({},q.hiddenPaths);delete G[B],q.hiddenPaths=G}},ye=function(N,B){g.collapsedOnClickBrackets&&Y(N,B.path),m("bracketsClick",N,B)},ue=function(N,B){Y(N,B.path),m("iconClick",N,B)},J=function(N,B){var G=Ii(g.data),se=g.rootPath;new Function("data","val","data".concat(B.slice(se.length),"=val"))(G,N),m("update:data",G)};return(0,ze.watchEffect)(function(){I.value&&function(N){throw new Error("[VueJSONPretty] ".concat(N))}(I.value)}),(0,ze.watchEffect)(function(){x.value&&ne()}),(0,ze.watch)(function(){return g.deep},function(N){N&&(q.hiddenPaths=D(N,g.collapsedNodeLength))}),(0,ze.watch)(function(){return g.collapsedNodeLength},function(N){N&&(q.hiddenPaths=D(g.deep,N))}),function(){var N,B,G=(N=g.renderNodeKey)!==null&&N!==void 0?N:R.renderNodeKey,se=(B=g.renderNodeValue)!==null&&B!==void 0?B:R.renderNodeValue,he=q.visibleData&&q.visibleData.map(function(fe){return(0,ze.createVNode)(Fs,{key:fe.id,node:fe,collapsed:!!q.hiddenPaths[fe.path],theme:g.theme,showDoubleQuotes:g.showDoubleQuotes,showLength:g.showLength,checked:re.value.includes(fe.path),selectableType:g.selectableType,showLine:g.showLine,showLineNumber:g.showLineNumber,showSelectController:g.showSelectController,selectOnClickNode:g.selectOnClickNode,nodeSelectable:g.nodeSelectable,highlightSelectedNode:g.highlightSelectedNode,editable:g.editable,editableTrigger:g.editableTrigger,showIcon:g.showIcon,showKeyValueSpace:g.showKeyValueSpace,renderNodeKey:G,renderNodeValue:se,onNodeClick:H,onBracketsClick:ye,onIconClick:ue,onSelectedChange:Q,onValueChange:J,style:g.itemHeight&&g.itemHeight!==20?{lineHeight:"".concat(g.itemHeight,"px")}:{}},null)});return(0,ze.createVNode)("div",{ref:W,class:{"vjs-tree":!0,"is-virtual":g.virtual,dark:g.theme==="dark"},onScroll:g.virtual?E:void 0,style:g.showLineNumber?Ft({paddingLeft:"".concat(12*Number(pe.value.length.toString().length),"px")},g.style):g.style},[g.virtual?(0,ze.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(g.height,"px")}},[(0,ze.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(x.value.length*g.itemHeight,"px")}},[(0,ze.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(q.translateY,"px)")}},[he])])]):he])}}});var Hs=Uo.Z;let ra;ra=Oi({__name:"JsonPreview",props:{data:Object},setup(g){return(X,m)=>(Do(),Zu(ss(Hs),{path:"res",deep:3,showLength:!0,data:g.data},null,8,["data"]))}}),fs=ps(Es),hs=ps(ra)}));export{fs as C,hs as J,Mr as M,nd as __tla};
|