12345678910111213141516171819202122232425262728 |
- var vu=Object.defineProperty;var Pl=Object.getOwnPropertySymbols;var bu=Object.prototype.hasOwnProperty,yu=Object.prototype.propertyIsEnumerable;var Hl=(Et,Mt,Ve)=>Mt in Et?vu(Et,Mt,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Et[Mt]=Ve,Fl=(Et,Mt)=>{for(var Ve in Mt||(Mt={}))bu.call(Mt,Ve)&&Hl(Et,Ve,Mt[Ve]);if(Pl)for(var Ve of Pl(Mt))yu.call(Mt,Ve)&&Hl(Et,Ve,Mt[Ve]);return Et};var pn=(Et,Mt,Ve)=>new Promise((Mi,Kn)=>{var Li=Rt=>{try{hn(Ve.next(Rt))}catch(mn){Kn(mn)}},fn=Rt=>{try{hn(Ve.throw(Rt))}catch(mn){Kn(mn)}},hn=Rt=>Rt.done?Mi(Rt.value):Promise.resolve(Rt.value).then(Li,fn);hn((Ve=Ve.apply(Et,Mt)).next())});import{c0 as Il,bX as ql,d as Co,r as xu,B as wu,bY as ku,j as Rl,p as Bl,a6 as _u,u as Vl,n as Cu,ah as Su,o as So,l as $l,A as Mu,aE as Lu,e as Tu,dn as Ou,c as Nu,ax as Ul,__tla as zu}from"./index-b5895273.js";import{u as Au,__tla as ju}from"./useWindowSizeFn-a59bee15.js";let Kl,Gl,Mr,Eu=Promise.all([(()=>{try{return zu}catch(Et){}})(),(()=>{try{return ju}catch(Et){}})()]).then(()=>pn(void 0,null,function*(){var Et={exports:{}},Mt;function Ve(){return Mt||(Mt=1,function(Ie,ot){(function(L,le){Ie.exports=le()})(Il,function(){var L=navigator.userAgent,le=navigator.platform,U=/gecko\/\d/i.test(L),fe=/MSIE \d/.test(L),F=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),D=/Edge\/(\d+)/.exec(L),w=fe||F||D,ee=w&&(fe?document.documentMode||6:+(D||F)[1]),P=!D&&/WebKit\//.test(L),j=P&&/Qt\/\d+\.\d+/.test(L),E=!D&&/Chrome\/(\d+)/.exec(L),Q=E&&+E[1],q=/Opera\//.test(L),K=/Apple Computer/.test(navigator.vendor),be=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),pe=/PhantomJS/.test(L),se=K&&(/Mobile\/\w+/.test(L)||navigator.maxTouchPoints>2),ce=/Android/.test(L),ue=se||ce||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),te=se||/Mac/.test(le),Ce=/\bCrOS\b/.test(L),Le=/win/i.test(le),xe=q&&L.match(/Version\/(\d*\.\d*)/);xe&&(xe=Number(xe[1])),xe&&xe>=15&&(q=!1,P=!0);var O=te&&(j||q&&(xe==null||xe<12.11)),k=U||w&&ee>=9;function p(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,t){var n=e.className,r=p(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 h(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function S(e,t){return h(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 H(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var R;document.createRange?R=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:R=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 oe(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 Oe(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 Ee(e,t){var n=e.className;p(t).test(n)||(e.className+=(n?" ":"")+t)}function Ye(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!p(n[r]).test(t)&&(t+=" "+n[r]);return t}var Je=function(e){e.select()};se?Je=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(Je=function(e){try{e.select()}catch(t){}});function $e(e){return e.display.wrapper.ownerDocument}function Fe(e){return Ae(e.display.wrapper)}function Ae(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function me(e){return $e(e).defaultView}function ye(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Y(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 ge(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 I=function(){this.id=null,this.f=null,this.time=0,this.handler=ye(this.onTimeout,this)};I.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},I.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function $(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Me=50,We={toString:function(){return"CodeMirror.Pass"}},re={scroll:!1},De={origin:"*mouse"},Ne={origin:"+move"};function qe(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 x(e){for(;v.length<=e;)v.push(J(v)+" ");return v[e]}function J(e){return e[e.length-1]}function He(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function G(){}function z(e,t){var n;return Object.create?n=Object.create(e):(G.prototype=e,n=new G),t&&Y(t,n),n}var je=/[\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()||je.test(e))}function Qe(e,t){return t?t.source.indexOf("\\w")>-1&&Ke(e)?!0:t.test(e):Ke(e)}function bt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var C=/[\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&&C.test(e)}function B(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 et(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 ut=null;function Ft(e,t,n){var r;ut=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:ut=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:ut=i)}return r!=null?r:ut}var Wt=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,f,g){this.level=c,this.from=f,this.to=g}return function(c,f){var g=f=="ltr"?"L":"R";if(c.length==0||f=="ltr"&&!r.test(c))return!1;for(var M=c.length,_=[],A=0;A<M;++A)_.push(n(c.charCodeAt(A)));for(var V=0,X=g;V<M;++V){var ne=_[V];ne=="m"?_[V]=X:X=ne}for(var de=0,ie=g;de<M;++de){var he=_[de];he=="1"&&ie=="r"?_[de]="n":o.test(he)&&(ie=he,he=="r"&&(_[de]="R"))}for(var ke=1,_e=_[0];ke<M-1;++ke){var Pe=_[ke];Pe=="+"&&_e=="1"&&_[ke+1]=="1"?_[ke]="1":Pe==","&&_e==_[ke+1]&&(_e=="1"||_e=="n")&&(_[ke]=_e),_e=Pe}for(var Ge=0;Ge<M;++Ge){var mt=_[Ge];if(mt==",")_[Ge]="N";else if(mt=="%"){var Xe=void 0;for(Xe=Ge+1;Xe<M&&_[Xe]=="%";++Xe);for(var Ht=Ge&&_[Ge-1]=="!"||Xe<M&&_[Xe]=="1"?"1":"N",zt=Ge;zt<Xe;++zt)_[zt]=Ht;Ge=Xe-1}}for(var lt=0,At=g;lt<M;++lt){var vt=_[lt];At=="L"&&vt=="1"?_[lt]="L":o.test(vt)&&(At=vt)}for(var ct=0;ct<M;++ct)if(i.test(_[ct])){var st=void 0;for(st=ct+1;st<M&&i.test(_[st]);++st);for(var it=(ct?_[ct-1]:g)=="L",jt=(st<M?_[st]:g)=="L",un=it==jt?it?"L":"R":g,Sr=ct;Sr<st;++Sr)_[Sr]=un;ct=st-1}for(var _t=[],ir,gt=0;gt<M;)if(a.test(_[gt])){var ko=gt;for(++gt;gt<M&&a.test(_[gt]);++gt);_t.push(new s(0,ko,gt))}else{var pr=gt,Wr=_t.length,Dr=f=="rtl"?1:0;for(++gt;gt<M&&_[gt]!="L";++gt);for(var St=pr;St<gt;)if(l.test(_[St])){pr<St&&(_t.splice(Wr,0,new s(1,pr,St)),Wr+=Dr);var dn=St;for(++St;St<gt&&l.test(_[St]);++St);_t.splice(Wr,0,new s(2,dn,St)),Wr+=Dr,pr=St}else++St;pr<gt&&_t.splice(Wr,0,new s(1,pr,gt))}return f=="ltr"&&(_t[0].level==1&&(ir=c.match(/^\s+/))&&(_t[0].from=ir[0].length,_t.unshift(new s(0,0,ir[0].length))),J(_t).level==1&&(ir=c.match(/\s+$/))&&(J(_t).to-=ir[0].length,_t.push(new s(0,M-ir[0].length,M)))),f=="rtl"?_t.reverse():_t}}();function Te(e,t){var n=e.order;return n==null&&(n=e.order=Wt(e.text,t)),n}var yt=[],Se=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 or(e,t){return e._handlers&&e._handlers[t]||yt}function xt(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=$(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function tt(e,t){var n=or(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 rt(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),tt(e,n||t.type,e,t),Lt(t)||t.codemirrorIgnore}function Bt(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)$(n,t[r])==-1&&n.push(t[r])}function Dt(e,t){return or(e,t).length>0}function $t(e){e.prototype.on=function(t,n){Se(this,t,n)},e.prototype.off=function(t,n){xt(this,t,n)}}function wt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Pr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Lt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function fr(e){wt(e),Pr(e)}function gn(e){return e.target||e.srcElement}function Ut(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),te&&e.ctrlKey&&t==1&&(t=3),t}var Ti=function(){if(w&&ee<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Hr;function Gn(e){if(Hr==null){var t=d("span","\u200B");S(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Hr=t.offsetWidth<=1&&t.offsetHeight>2&&!(w&&ee<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 vn;function hr(e){if(vn!=null)return vn;var t=S(e,document.createTextNode("A\u062EA")),n=R(t,0,1).getBoundingClientRect(),r=R(t,1,2).getBoundingClientRect();return h(e),!n||n.left==n.right?!1:vn=r.right-n.right<3}var Vt=`
- 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/)},mr=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},Qn=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Kt=null;function Oi(e){if(Kt!=null)return Kt;var t=S(e,d("span","x")),n=t.getBoundingClientRect(),r=R(t,0,1).getBoundingClientRect();return Kt=Math.abs(n.left-r.left)>1}var Fr={},Gt={};function Qt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fr[e]=t}function Ir(e,t){Gt[e]=t}function qr(e){if(typeof e=="string"&&Gt.hasOwnProperty(e))e=Gt[e];else if(e&&typeof e.name=="string"&&Gt.hasOwnProperty(e.name)){var t=Gt[e.name];typeof t=="string"&&(t={name:t}),e=z(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Rr(e,t){t=qr(t);var n=Fr[t.name];if(!n)return Rr(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[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 gr={};function Br(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};Y(t,n)}function er(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 bn(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 Vr(e,t,n){return e.startState?e.startState(t,n):!0}var nt=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};nt.prototype.eol=function(){return this.pos>=this.string.length},nt.prototype.sol=function(){return this.pos==this.lineStart},nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nt.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},nt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},nt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},nt.prototype.skipToEnd=function(){this.pos=this.string.length},nt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},nt.prototype.backUp=function(e){this.pos-=e},nt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},nt.prototype.indentation=function(){return ge(this.string,null,this.tabSize)-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},nt.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)}},nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},nt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},nt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},nt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ve(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 ar(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 yn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function It(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=$(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 m(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 W(e,t){return t>=e.first&&t<e.first+e.size}function Z(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function N(e,t,n){if(n===void 0&&(n=null),!(this instanceof N))return new N(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ae(e,t){return e.line-t.line||e.ch-t.ch}function Re(e,t){return e.sticky==t.sticky&&ae(e,t)==0}function dt(e){return N(e.line,e.ch)}function Tt(e,t){return ae(e,t)<0?t:e}function $r(e,t){return ae(e,t)<0?e:t}function Ho(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ze(e,t){if(t.line<e.first)return N(e.first,0);var n=e.first+e.size-1;return t.line>n?N(n,ve(e,n).text.length):bs(t,ve(e,t.line).text.length)}function bs(e,t){var n=e.ch;return n==null||n>t?N(e.line,t):n<0?N(e.line,0):e}function Fo(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ze(e,t[r]);return n}var Yn=function(e,t){this.state=e,this.lookAhead=t},tr=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};tr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},tr.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}},tr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},tr.fromSaved=function(e,t,n){return t instanceof Yn?new tr(e,er(e.mode,t.state),n,t.lookAhead):new tr(e,er(e.mode,t),n)},tr.prototype.save=function(e){var t=e!==!1?er(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Yn(t,this.maxLookAhead):t};function Io(e,t,n,r){var i=[e.state.modeGen],o={};Uo(e,t.text,e.doc.mode,n,function(c,f){return i.push(c,f)},o,r);for(var a=n.state,l=function(c){n.baseTokens=i;var f=e.state.overlays[c],g=1,M=0;n.state=!0,Uo(e,t.text,f.mode,n,function(_,A){for(var V=g;M<_;){var X=i[g];X>_&&i.splice(g,1,_,i[g+1],X),g+=2,M=Math.min(_,X)}if(A)if(f.opaque)i.splice(V,g-V,_,"overlay "+A),g=V+2;else for(;V<g;V+=2){var ne=i[V+1];i[V+1]=(ne?ne+" ":"")+"overlay "+A}},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 qo(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=xn(e,u(t)),i=t.text.length>e.options.maxHighlightLength&&er(e.doc.mode,r.state),o=Io(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 xn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new tr(r,!0,t);var o=ys(e,t,n),a=o>r.first&&ve(r,o-1).stateAfter,l=a?tr.fromSaved(r,a,o):new tr(r,Vr(r.mode),o);return r.iter(o,t,function(s){Ni(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 Ni(e,t,n,r){var i=e.doc.mode,o=new nt(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&Ro(i,n.state);!o.eol();)zi(i,o,n.state),o.start=o.pos}function Ro(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=bn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function zi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=bn(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 Bo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Vo(e,t,n,r){var i=e.doc,o=i.mode,a;t=ze(i,t);var l=ve(i,t.line),s=xn(e,t.line,n),c=new nt(l.text,e.options.tabSize,s),f;for(r&&(f=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,a=zi(o,c,s.state),r&&f.push(new Bo(c,a,er(i.mode,s.state)));return r?f:new Bo(c,a,s.state)}function $o(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 Uo(e,t,n,r,i,o,a){var l=n.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,c=null,f=new nt(t,e.options.tabSize,r),g,M=e.options.addModeClass&&[null];for(t==""&&$o(Ro(n,r.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(l=!1,a&&Ni(e,t,r,f.pos),f.pos=t.length,g=null):g=$o(zi(n,f,r.state,M),o),M){var _=M[0].name;_&&(g="m-"+(g?_+" "+g:_))}if(!l||c!=g){for(;s<f.start;)s=Math.min(f.start,s+5e3),i(s,c);c=g}f.start=f.pos}for(;s<f.pos;){var A=Math.min(f.pos,s+5e3);i(A,c),s=A}}function ys(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=ve(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof Yn?c.lookAhead:0)<=o.modeFrontier))return l;var f=ge(s.text,null,e.options.tabSize);(i==null||r>f)&&(i=l-1,r=f)}return i}function xs(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=ve(e,r).stateAfter;if(i&&(!(i instanceof Yn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Ko=!1,lr=!1;function ws(){Ko=!0}function ks(){lr=!0}function Zn(e,t,n){this.marker=e,this.from=t,this.to=n}function wn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function _s(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Cs(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 Ss(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 Zn(a,o.from,s?null:o.to))}}return r}function Ms(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 Zn(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function Ai(e,t){if(t.full)return null;var n=W(e,t.from.line)&&ve(e,t.from.line).markedSpans,r=W(e,t.to.line)&&ve(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=ae(t.from,t.to)==0,l=Ss(n,i,a),s=Ms(r,o,a),c=t.text.length==1,f=J(t.text).length+(c?i:0);if(l)for(var g=0;g<l.length;++g){var M=l[g];if(M.to==null){var _=wn(s,M.marker);_?c&&(M.to=_.to==null?null:_.to+f):M.to=i}}if(s)for(var A=0;A<s.length;++A){var V=s[A];if(V.to!=null&&(V.to+=f),V.from==null){var X=wn(l,V.marker);X||(V.from=f,c&&(l||(l=[])).push(V))}else V.from+=f,c&&(l||(l=[])).push(V)}l&&(l=Go(l)),s&&s!=l&&(s=Go(s));var ne=[l];if(!c){var de=t.text.length-2,ie;if(de>0&&l)for(var he=0;he<l.length;++he)l[he].to==null&&(ie||(ie=[])).push(new Zn(l[he].marker,null,null));for(var ke=0;ke<de;++ke)ne.push(ie);ne.push(s)}return ne}function Go(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 Ls(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(_){if(_.markedSpans)for(var A=0;A<_.markedSpans.length;++A){var V=_.markedSpans[A].marker;V.readOnly&&(!r||$(r,V)==-1)&&(r||(r=[])).push(V)}}),!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(!(ae(c.to,l.from)<0||ae(c.from,l.to)>0)){var f=[s,1],g=ae(c.from,l.from),M=ae(c.to,l.to);(g<0||!a.inclusiveLeft&&!g)&&f.push({from:c.from,to:l.from}),(M>0||!a.inclusiveRight&&!M)&&f.push({from:l.to,to:c.to}),i.splice.apply(i,f),s+=f.length-3}}return i}function Qo(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Yo(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Xn(e){return e.inclusiveLeft?-1:0}function Jn(e){return e.inclusiveRight?1:0}function ji(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=ae(r.from,i.from)||Xn(e)-Xn(t);if(o)return-o;var a=ae(r.to,i.to)||Jn(e)-Jn(t);return a||t.id-e.id}function Zo(e,t){var n=lr&&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||ji(r,i.marker)<0)&&(r=i.marker);return r}function Xo(e){return Zo(e,!0)}function ei(e){return Zo(e,!1)}function Ts(e,t){var n=lr&&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||ji(r,o.marker)<0)&&(r=o.marker)}return r}function Jo(e,t,n,r,i){var o=ve(e,t),a=lr&&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),f=ae(c.from,n)||Xn(s.marker)-Xn(i),g=ae(c.to,r)||Jn(s.marker)-Jn(i);if(!(f>=0&&g<=0||f<=0&&g>=0)&&(f<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ae(c.to,n)>=0:ae(c.to,n)>0)||f>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ae(c.from,r)<=0:ae(c.from,r)<0)))return!0}}}function Yt(e){for(var t;t=Xo(e);)e=t.find(-1,!0).line;return e}function Os(e){for(var t;t=ei(e);)e=t.find(1,!0).line;return e}function Ns(e){for(var t,n;t=ei(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ei(e,t){var n=ve(e,t),r=Yt(n);return n==r?t:u(r)}function ea(e,t){if(t>e.lastLine())return t;var n=ve(e,t),r;if(!vr(e,n))return t;for(;r=ei(n);)n=r.find(1,!0).line;return u(n)+1}function vr(e,t){var n=lr&&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&&Wi(e,t,r)))return!0}}function Wi(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Wi(e,r.line,wn(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)&&Wi(e,t,i))return!0}function sr(e){e=Yt(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 ti(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Xo(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=ei(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 Di(e){var t=e.display,n=e.doc;t.maxLine=ve(n,n.first),t.maxLineLength=ti(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=ti(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Ur=function(e,t,n){this.text=e,Yo(this,t),this.height=n?n(this):1};Ur.prototype.lineNo=function(){return u(this)},$t(Ur);function zs(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Qo(e),Yo(e,n);var i=r?r(e):1;i!=e.height&&It(e,i)}function As(e){e.parent=null,Qo(e)}var js={},Es={};function ta(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Es:js;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function ra(e,t){var n=H("span",null,null,P?"padding-right: .1px":null),r={pre:H("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=Ds,hr(e.display.measure)&&(a=Te(o,e.doc.direction))&&(r.addToken=Hs(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&u(o);Fs(o,r,qo(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=Ye(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=Ye(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Gn(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(P){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 tt(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ye(r.pre.className,r.textClass||"")),r}function Ws(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 Ds(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?Ps(t,e.trailingSpace):t,s=e.cm.state.specialChars,c=!1,f;if(!s.test(t))e.col+=t.length,f=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,f),w&&ee<9&&(c=!0),e.pos+=t.length;else{f=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var M=s.exec(t),_=M?M.index-g:t.length-g;if(_){var A=document.createTextNode(l.slice(g,g+_));w&&ee<9?f.appendChild(d("span",[A])):f.appendChild(A),e.map.push(e.pos,e.pos+_,A),e.col+=_,e.pos+=_}if(!M)break;g+=_+1;var V=void 0;if(M[0]==" "){var X=e.cm.options.tabSize,ne=X-e.col%X;V=f.appendChild(d("span",x(ne),"cm-tab")),V.setAttribute("role","presentation"),V.setAttribute("cm-text"," "),e.col+=ne}else M[0]=="\r"||M[0]==`
- `?(V=f.appendChild(d("span",M[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),V.setAttribute("cm-text",M[0]),e.col+=1):(V=e.cm.options.specialCharPlaceholder(M[0]),V.setAttribute("cm-text",M[0]),w&&ee<9?f.appendChild(d("span",[V])):f.appendChild(V),e.col+=1);e.map.push(e.pos,e.pos+1,V),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 ie=d("span",[f],de,o);if(a)for(var he in a)a.hasOwnProperty(he)&&he!="style"&&he!="class"&&ie.setAttribute(he,a[he]);return e.content.appendChild(ie)}e.content.appendChild(f)}}function Ps(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 Hs(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,f=c+r.length;;){for(var g=void 0,M=0;M<t.length&&(g=t[M],!(g.to>c&&g.from<=c));M++);if(g.to>=f)return e(n,r,i,o,a,l,s);e(n,r.slice(0,g.to-c),i,o,null,l,s),o=null,r=r.slice(g.to-c),c=g.to}}}function na(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 Fs(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]),ta(n[a+1],t.cm.options));return}for(var l=i.length,s=0,c=1,f="",g,M,_=0,A,V,X,ne,de;;){if(_==s){A=V=X=M="",de=null,ne=null,_=1/0;for(var ie=[],he=void 0,ke=0;ke<r.length;++ke){var _e=r[ke],Pe=_e.marker;if(Pe.type=="bookmark"&&_e.from==s&&Pe.widgetNode)ie.push(Pe);else if(_e.from<=s&&(_e.to==null||_e.to>s||Pe.collapsed&&_e.to==s&&_e.from==s)){if(_e.to!=null&&_e.to!=s&&_>_e.to&&(_=_e.to,V=""),Pe.className&&(A+=" "+Pe.className),Pe.css&&(M=(M?M+";":"")+Pe.css),Pe.startStyle&&_e.from==s&&(X+=" "+Pe.startStyle),Pe.endStyle&&_e.to==_&&(he||(he=[])).push(Pe.endStyle,_e.to),Pe.title&&((de||(de={})).title=Pe.title),Pe.attributes)for(var Ge in Pe.attributes)(de||(de={}))[Ge]=Pe.attributes[Ge];Pe.collapsed&&(!ne||ji(ne.marker,Pe)<0)&&(ne=_e)}else _e.from>s&&_>_e.from&&(_=_e.from)}if(he)for(var mt=0;mt<he.length;mt+=2)he[mt+1]==_&&(V+=" "+he[mt]);if(!ne||ne.from==s)for(var Xe=0;Xe<ie.length;++Xe)na(t,0,ie[Xe]);if(ne&&(ne.from||0)==s){if(na(t,(ne.to==null?l+1:ne.to)-s,ne.marker,ne.from==null),ne.to==null)return;ne.to==s&&(ne=!1)}}if(s>=l)break;for(var Ht=Math.min(l,_);;){if(f){var zt=s+f.length;if(!ne){var lt=zt>Ht?f.slice(0,Ht-s):f;t.addToken(t,lt,g?g+A:A,X,s+lt.length==_?V:"",M,de)}if(zt>=Ht){f=f.slice(Ht-s),s=Ht;break}s=zt,X=""}f=i.slice(o,o=n[c++]),g=ta(n[c++],t.cm.options)}}}function ia(e,t,n){this.line=t,this.rest=Ns(t),this.size=this.rest?u(J(this.rest))-n+1:1,this.node=this.text=null,this.hidden=vr(e,t)}function ri(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new ia(e.doc,ve(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Kr=null;function Is(e){Kr?Kr.ops.push(e):e.ownsGroup=Kr={ops:[e],delayedCallbacks:[]}}function qs(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 Rs(e,t){var n=e.ownsGroup;if(n)try{qs(n)}finally{Kr=null,t(n)}}var kn=null;function pt(e,t){var n=or(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Kr?i=Kr.delayedCallbacks:kn?i=kn:(i=kn=[],setTimeout(Bs,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function Bs(){var e=kn;kn=null;for(var t=0;t<e.length;++t)e[t]()}function oa(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?$s(e,t):o=="gutter"?la(e,t,n,r):o=="class"?Pi(e,t):o=="widget"&&Us(e,t,r)}t.changes=null}function _n(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),w&&ee<8&&(e.node.style.zIndex=2)),e.node}function Vs(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=_n(t);t.background=r.insertBefore(d("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function aa(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):ra(e,t)}function $s(e,t){var n=t.text.className,r=aa(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,Pi(e,t)):n&&(t.text.className=n)}function Pi(e,t){Vs(e,t),t.line.wrapClass?_n(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=_n(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=_n(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",Z(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,f=o.hasOwnProperty(c)&&o[c];f&&l.appendChild(d("div",[f],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Us(e,t,n){t.alignable&&(t.alignable=null);for(var r=p("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);sa(e,t,n)}function Ks(e,t,n,r){var i=aa(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Pi(e,t),la(e,t,n,r),sa(e,t,r),t.node}function sa(e,t,n){if(ca(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)ca(e,t.rest[r],t,n,!1)}function ca(e,t,n,r,i){if(t.widgets)for(var o=_n(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"),Gs(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),pt(s,"redraw")}}function Gs(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 Cn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!oe(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;"),S(t.display.measure,d("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function cr(e,t){for(var n=gn(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 ni(e){return e.lineSpace.offsetTop}function Hi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ua(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=S(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 rr(e){return Me-e.display.nativeBarWidth}function Lr(e){return e.display.scroller.clientWidth-rr(e)-e.display.barWidth}function Fi(e){return e.display.scroller.clientHeight-rr(e)-e.display.barHeight}function Qs(e,t,n){var r=e.options.lineWrapping,i=r&&Lr(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 da(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 Ys(e,t){t=Yt(t);var n=u(t),r=e.display.externalMeasured=new ia(e.doc,t,n);r.lineN=n;var i=r.built=ra(e,r);return r.text=i.pre,S(e.display.lineMeasure,i.pre),r}function pa(e,t,n,r){return nr(e,Gr(e,t),n,r)}function Ii(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Nr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Gr(e,t){var n=u(t),r=Ii(e,n);r&&!r.text?r=null:r&&r.changes&&(oa(e,r,n,$i(e)),e.curOp.forceUpdate=!0),r||(r=Ys(e,t));var i=da(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function nr(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||(Qs(e,t.view,t.rect),t.hasHeights=!0),a=Xs(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 fa={left:0,right:0,top:0,bottom:0};function ha(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 Zs(e,t){var n=fa;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 Xs(e,t,n,r){var i=ha(t.map,n,r),o=i.node,a=i.start,l=i.end,s=i.collapse,c;if(o.nodeType==3){for(var f=0;f<4;f++){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(w&&ee<9&&a==0&&l==i.coverEnd-i.coverStart?c=o.parentNode.getBoundingClientRect():c=Zs(R(o,a,l).getClientRects(),r),c.left||c.right||a==0)break;l=a,a=a-1,s="right"}w&&ee<11&&(c=Js(e.display.measure,c))}else{a>0&&(s=r="right");var g;e.options.lineWrapping&&(g=o.getClientRects()).length>1?c=g[r=="right"?g.length-1:0]:c=o.getBoundingClientRect()}if(w&&ee<9&&!a&&(!c||!c.left&&!c.right)){var M=o.parentNode.getClientRects()[0];M?c={left:M.left,right:M.left+Yr(e.display),top:M.top,bottom:M.bottom}:c=fa}for(var _=c.top-t.rect.top,A=c.bottom-t.rect.top,V=(_+A)/2,X=t.view.measure.heights,ne=0;ne<X.length-1&&!(V<X[ne]);ne++);var de=ne?X[ne-1]:0,ie=X[ne],he={left:(s=="right"?c.right:c.left)-t.rect.left,right:(s=="left"?c.left:c.right)-t.rect.left,top:de,bottom:ie};return!c.left&&!c.right&&(he.bogus=!0),e.options.singleCursorHeightPerLine||(he.rtop=_,he.rbottom=A),he}function Js(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Oi(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 ma(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 ga(e){e.display.externalMeasure=null,h(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ma(e.display.view[t])}function Sn(e){ga(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function va(e){return E&&ce?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function ba(e){return E&&ce?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function qi(e){var t=Yt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=Cn(n[i]));return r}function ii(e,t,n,r,i){if(!i){var o=qi(t);n.top+=o,n.bottom+=o}if(r=="line")return n;r||(r="local");var a=sr(t);if(r=="local"?a+=ni(e.display):a-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(r=="window"?0:ba($e(e)));var s=l.left+(r=="window"?0:va($e(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function ya(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=va($e(e)),i-=ba($e(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 oi(e,t,n,r,i){return r||(r=ve(e.doc,t.line)),ii(e,r,pa(e,r,t.ch,i),n)}function Zt(e,t,n,r,i,o){r=r||ve(e.doc,t.line),i||(i=Gr(e,r));function a(A,V){var X=nr(e,i,A,V?"right":"left",o);return V?X.left=X.right:X.right=X.left,ii(e,r,X,n)}var l=Te(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 f(A,V,X){var ne=l[V],de=ne.level==1;return a(X?A-1:A,de!=X)}var g=Ft(l,s,c),M=ut,_=f(s,g,c=="before");return M!=null&&(_.other=f(s,M,c!="before")),_}function xa(e,t){var n=0;t=ze(e.doc,t),e.options.lineWrapping||(n=Yr(e.display)*t.ch);var r=ve(e.doc,t.line),i=sr(r)+ni(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ri(e,t,n,r,i){var o=N(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Bi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ri(r.first,0,null,-1,-1);var i=m(r,n),o=r.first+r.size-1;if(i>o)return Ri(r.first+r.size-1,ve(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=ve(r,i);;){var l=ec(e,a,i,t,n),s=Ts(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=ve(r,i=c.line)}}function wa(e,t,n,r){r-=qi(t);var i=t.text.length,o=we(function(a){return nr(e,n,a-1).bottom<=r},i,0);return i=we(function(a){return nr(e,n,a).top>r},o,i),{begin:o,end:i}}function ka(e,t,n,r){n||(n=Gr(e,t));var i=ii(e,t,nr(e,n,r),"line").top;return wa(e,t,n,i)}function Vi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function ec(e,t,n,r,i){i-=sr(t);var o=Gr(e,t),a=qi(t),l=0,s=t.text.length,c=!0,f=Te(t,e.doc.direction);if(f){var g=(e.options.lineWrapping?rc:tc)(e,t,n,o,f,r,i);c=g.level!=1,l=c?g.from:g.to-1,s=c?g.to:g.from-1}var M=null,_=null,A=we(function(ke){var _e=nr(e,o,ke);return _e.top+=a,_e.bottom+=a,Vi(_e,r,i,!1)?(_e.top<=i&&_e.left<=r&&(M=ke,_=_e),!0):!1},l,s),V,X,ne=!1;if(_){var de=r-_.left<_.right-r,ie=de==c;A=M+(ie?0:1),X=ie?"after":"before",V=de?_.left:_.right}else{!c&&(A==s||A==l)&&A++,X=A==0?"after":A==t.text.length?"before":nr(e,o,A-(c?1:0)).bottom+a<=i==c?"after":"before";var he=Zt(e,N(n,A,X),"line",t,o);V=he.left,ne=i<he.top?-1:i>=he.bottom?1:0}return A=B(t.text,A,1),Ri(n,A,X,ne,r-V)}function tc(e,t,n,r,i,o,a){var l=we(function(g){var M=i[g],_=M.level!=1;return Vi(Zt(e,N(n,_?M.to:M.from,_?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=s.level!=1,f=Zt(e,N(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Vi(f,o,a,!0)&&f.top>a&&(s=i[l-1])}return s}function rc(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 f=null,g=null,M=0;M<i.length;M++){var _=i[M];if(!(_.from>=c||_.to<=s)){var A=_.level!=1,V=nr(e,r,A?Math.min(c,_.to)-1:Math.max(s,_.from)).right,X=V<o?o-V+1e9:V-o;(!f||g>X)&&(f=_,g=X)}}return f||(f=i[i.length-1]),f.from<s&&(f={from:s,to:f.to,level:f.level}),f.to>c&&(f={from:f.from,to:c,level:f.level}),f}var Tr;function Qr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Tr==null){Tr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Tr.appendChild(document.createTextNode("x")),Tr.appendChild(d("br"));Tr.appendChild(document.createTextNode("x"))}S(e.measure,Tr);var n=Tr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),h(e.measure),n||1}function Yr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");S(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function $i(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:Ui(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ui(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function _a(e){var t=Qr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Yr(e.display)-3);return function(i){if(vr(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 Ki(e){var t=e.doc,n=_a(e);t.iter(function(r){var i=n(r);i!=r.height&&It(r,i)})}function Or(e,t,n,r){var i=e.display;if(!n&&gn(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(g){return null}var s=Bi(e,o,a),c;if(r&&s.xRel>0&&(c=ve(e.doc,s.line).text).length==s.ch){var f=ge(c,c.length,e.options.tabSize)-c.length;s=N(s.line,Math.max(0,Math.round((o-ua(e.display).left)/Yr(e.display))-f))}return s}function Nr(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 Ot(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)lr&&Ei(e.doc,t)<i.viewTo&&yr(e);else if(n<=i.viewFrom)lr&&ea(e.doc,n+r)>i.viewFrom?yr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)yr(e);else if(t<=i.viewFrom){var o=ai(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):yr(e)}else if(n>=i.viewTo){var a=ai(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):yr(e)}else{var l=ai(e,t,t,-1),s=ai(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(ri(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):yr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function br(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[Nr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);$(a,n)==-1&&a.push(n)}}}function yr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ai(e,t,n,r){var i=Nr(e,t),o,a=e.display.view;if(!lr||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(;Ei(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 nc(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=ri(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=ri(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Nr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(ri(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Nr(e,n)))),r.viewTo=n}function Ca(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 Mn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Sa(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 f=a(e,s);f&&Gi(e,f,i)}else(c||e.options.showCursorWhenSelecting)&&Gi(e,s.head,i);c||ic(e,s,o)}}return r}function Gi(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=oi(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 li(e,t){return e.top-t.top||e.left-t.left}function ic(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=ua(e.display),l=a.left,s=Math.max(r.sizerWidth,Lr(e)-r.sizer.offsetLeft)-a.right,c=i.direction=="ltr";function f(ie,he,ke,_e){he<0&&(he=0),he=Math.round(he),_e=Math.round(_e),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+ie+`px;
- top: `+he+"px; width: "+(ke!=null?ke:s-ie)+`px;
- height: `+(_e-he)+"px"))}function g(ie,he,ke){var _e=ve(i,ie),Pe=_e.text.length,Ge,mt;function Xe(lt,At){return oi(e,N(ie,lt),"div",_e,At)}function Ht(lt,At,vt){var ct=ka(e,_e,null,lt),st=At=="ltr"==(vt=="after")?"left":"right",it=vt=="after"?ct.begin:ct.end-(/\s/.test(_e.text.charAt(ct.end-1))?2:1);return Xe(it,st)[st]}var zt=Te(_e,i.direction);return et(zt,he||0,ke!=null?ke:Pe,function(lt,At,vt,ct){var st=vt=="ltr",it=Xe(lt,st?"left":"right"),jt=Xe(At-1,st?"right":"left"),un=he==null&<==0,Sr=ke==null&&At==Pe,_t=ct==0,ir=!zt||ct==zt.length-1;if(jt.top-it.top<=3){var gt=(c?un:Sr)&&_t,ko=(c?Sr:un)&&ir,pr=gt?l:(st?it:jt).left,Wr=ko?s:(st?jt:it).right;f(pr,it.top,Wr-pr,it.bottom)}else{var Dr,St,dn,_o;st?(Dr=c&&un&&_t?l:it.left,St=c?s:Ht(lt,vt,"before"),dn=c?l:Ht(At,vt,"after"),_o=c&&Sr&&ir?s:jt.right):(Dr=c?Ht(lt,vt,"before"):l,St=!c&&un&&_t?s:it.right,dn=!c&&Sr&&ir?l:jt.left,_o=c?Ht(At,vt,"after"):s),f(Dr,it.top,St-Dr,it.bottom),it.bottom<jt.top&&f(l,it.bottom,null,jt.top),f(dn,jt.top,_o-dn,jt.bottom)}(!Ge||li(it,Ge)<0)&&(Ge=it),li(jt,Ge)<0&&(Ge=jt),(!mt||li(it,mt)<0)&&(mt=it),li(jt,mt)<0&&(mt=jt)}),{start:Ge,end:mt}}var M=t.from(),_=t.to();if(M.line==_.line)g(M.line,M.ch,_.ch);else{var A=ve(i,M.line),V=ve(i,_.line),X=Yt(A)==Yt(V),ne=g(M.line,M.ch,X?A.text.length+1:null).end,de=g(_.line,X?0:null,_.ch).start;X&&(ne.top<de.top-2?(f(ne.right,ne.top,null,ne.bottom),f(l,de.top,de.left,de.bottom)):f(ne.right,ne.top,de.left-ne.right,ne.bottom)),ne.bottom<de.top&&f(l,ne.bottom,null,de.top)}n.appendChild(o)}function Qi(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()||Zr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ma(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zi(e))}function Yi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zr(e))},100)}function Zi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(tt(e,"focus",e,t),e.state.focused=!0,Ee(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),P&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Qi(e))}function Zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(tt(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function si(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,f=0;if(!l.hidden){if(i+=l.line.height,w&&ee<8){var g=l.node.offsetTop+l.node.offsetHeight;c=g-n,n=g}else{var M=l.node.getBoundingClientRect();c=M.bottom-M.top,!s&&l.text.firstChild&&(f=l.text.firstChild.getBoundingClientRect().right-M.left-1)}var _=l.line.height-c;if((_>.005||_<-.005)&&(i<r&&(o-=_),It(l.line,c),La(l.line),l.rest))for(var A=0;A<l.rest.length;A++)La(l.rest[A]);if(f>e.display.sizerWidth){var V=Math.ceil(f/Yr(e.display));V>e.display.maxLineLength&&(e.display.maxLineLength=V,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function La(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 ci(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ni(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=m(t,r),a=m(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=m(t,sr(ve(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=m(t,sr(ve(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function oc(e,t){if(!rt(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&&!pe){var a=d("div","\u200B",null,`position: absolute;
- top: `+(t.top-n.viewOffset-ni(e.display))+`px;
- height: `+(t.bottom-t.top+rr(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 ac(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?N(t.line,t.ch+1,"before"):t,t=t.ch?N(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=Xi(e,i),f=e.doc.scrollTop,g=e.doc.scrollLeft;if(c.scrollTop!=null&&(Tn(e,c.scrollTop),Math.abs(e.doc.scrollTop-f)>1&&(a=!0)),c.scrollLeft!=null&&(zr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-g)>1&&(a=!0)),!a)break}return i}function lc(e,t){var n=Xi(e,t);n.scrollTop!=null&&Tn(e,n.scrollTop),n.scrollLeft!=null&&zr(e,n.scrollLeft)}function Xi(e,t){var n=e.display,r=Qr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Fi(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Hi(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 f=Math.min(t.top,(c?l:t.bottom)-o);f!=i&&(a.scrollTop=f)}var g=e.options.fixedGutter?0:n.gutters.offsetWidth,M=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-g,_=Lr(e)-n.gutters.offsetWidth,A=t.right-t.left>_;return A&&(t.right=t.left+_),t.left<10?a.scrollLeft=0:t.left<M?a.scrollLeft=Math.max(0,t.left+g-(A?0:10)):t.right>_+M-3&&(a.scrollLeft=t.right+(A?0:10)-_),a}function Ji(e,t){t!=null&&(ui(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xr(e){ui(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ln(e,t,n){(t!=null||n!=null)&&ui(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function sc(e,t){ui(e),e.curOp.scrollToPos=t}function ui(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=xa(e,t.from),r=xa(e,t.to);Ta(e,n,r,t.margin)}}function Ta(e,t,n,r){var i=Xi(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});Ln(e,i.scrollLeft,i.scrollTop)}function Tn(e,t){Math.abs(e.doc.scrollTop-t)<2||(U||to(e,{top:t}),Oa(e,t,!0),U&&to(e),zn(e,100))}function Oa(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 zr(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,Ea(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+Hi(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+rr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ar=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),Se(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Se(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&ee<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.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}},Ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ar.prototype.zeroWidthHack=function(){var e=te&&!be?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new I,this.disableVert=new I},Ar.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)},Ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Nn=function(){};Nn.prototype.update=function(){return{bottom:0,right:0}},Nn.prototype.setScrollLeft=function(){},Nn.prototype.setScrollTop=function(){},Nn.prototype.clear=function(){};function Jr(e,t){t||(t=On(e));var n=e.display.barWidth,r=e.display.barHeight;Na(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&si(e),Na(e,On(e)),n=e.display.barWidth,r=e.display.barHeight}function Na(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 za={native:Ar,null:Nn};function Aa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new za[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Se(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"?zr(e,t):Tn(e,t)},e),e.display.scrollbars.addClass&&Ee(e.display.wrapper,e.display.scrollbars.addClass)}var cc=0;function jr(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:++cc,markArrays:null},Is(e.curOp)}function Er(e){var t=e.curOp;t&&Rs(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;uc(n)})}function uc(e){for(var t=e.ops,n=0;n<t.length;n++)dc(t[n]);for(var r=0;r<t.length;r++)pc(t[r]);for(var i=0;i<t.length;i++)fc(t[i]);for(var o=0;o<t.length;o++)hc(t[o]);for(var a=0;a<t.length;a++)mc(t[a])}function dc(e){var t=e.cm,n=t.display;vc(t),e.updateMaxLine&&Di(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 di(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function pc(e){e.updatedDisplay=e.mustUpdate&&eo(e.cm,e.update)}function fc(e){var t=e.cm,n=t.display;e.updatedDisplay&&si(t),e.barMeasure=On(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=pa(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+rr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Lr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function hc(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&zr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==Oe(Fe(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Jr(t,e.barMeasure),e.updatedDisplay&&no(t,e.barMeasure),e.selectionChanged&&Qi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Ma(e.cm)}function mc(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&&Oa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&zr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=ac(t,ze(r,e.scrollToPos.from),ze(r,e.scrollToPos.to),e.scrollToPos.margin);oc(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||tt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&tt(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&tt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Pt(e,t){if(e.curOp)return t();jr(e);try{return t()}finally{Er(e)}}function ft(e,t){return function(){if(e.curOp)return t.apply(e,arguments);jr(e);try{return t.apply(e,arguments)}finally{Er(e)}}}function Ct(e){return function(){if(this.curOp)return e.apply(this,arguments);jr(this);try{return e.apply(this,arguments)}finally{Er(this)}}}function ht(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);jr(t);try{return e.apply(this,arguments)}finally{Er(t)}}}function zn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ye(gc,e))}function gc(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=xn(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?er(t.mode,r.state):null,s=Io(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var c=o.styleClasses,f=s.classes;f?o.styleClasses=f:c&&(o.styleClasses=null);for(var g=!a||a.length!=o.styles.length||c!=f&&(!c||!f||c.bgClass!=f.bgClass||c.textClass!=f.textClass),M=0;!g&&M<a.length;++M)g=a[M]!=o.styles[M];g&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Ni(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return zn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Pt(e,function(){for(var o=0;o<i.length;o++)br(e,i[o],"text")})}}var di=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ci(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Lr(e),this.force=n,this.dims=$i(e),this.events=[]};di.prototype.signal=function(e,t){Dt(e,t)&&this.events.push(arguments)},di.prototype.finish=function(){for(var e=0;e<this.events.length;e++)tt.apply(null,this.events[e])};function vc(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=rr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=rr(e)+"px",t.scrollbarsClipped=!0)}function bc(e){if(e.hasFocus())return null;var t=Oe(Fe(e));if(!t||!oe(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=me(e).getSelection();r.anchorNode&&r.extend&&oe(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function yc(e){if(!(!e||!e.activeElt||e.activeElt==Oe(Ae(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&oe(document.body,e.anchorNode)&&oe(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 eo(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return yr(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&&Ca(e)==0)return!1;Wa(e)&&(yr(e),t.dims=$i(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)),lr&&(o=Ei(e.doc,o),a=ea(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;nc(e,o,a),n.viewOffset=sr(ve(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Ca(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"),xc(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,yc(c),h(n.cursorDiv),h(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,zn(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==Lr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Hi(e.display)-Fi(e),n.top)}),t.visible=ci(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ci(e.display,e.doc,n));if(!eo(e,t))break;si(e);var i=On(e);Mn(e),Jr(e,i),no(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 to(e,t){var n=new di(e,t);if(eo(e,n)){si(e),ja(e,n);var r=On(e);Mn(e),Jr(e,r),no(e,r),n.finish()}}function xc(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(A){var V=A.nextSibling;return P&&te&&e.display.currentWheelTarget==A?A.style.display="none":A.parentNode.removeChild(A),V}for(var s=r.view,c=r.viewFrom,f=0;f<s.length;f++){var g=s[f];if(!g.hidden)if(!g.node||g.node.parentNode!=o){var M=Ks(e,g,c,n);o.insertBefore(M,a)}else{for(;a!=g.node;)a=l(a);var _=i&&t!=null&&t<=c&&g.lineNumber;g.changes&&($(g.changes,"gutter")>-1&&(_=!1),oa(e,g,c,n)),_&&(h(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(Z(e.options,c)))),a=g.node.nextSibling}c+=g.size}for(;a;)a=l(a)}function ro(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",pt(e,"gutterChanged",e)}function no(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+rr(e)+"px"}function Ea(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ui(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 Wa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Z(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",ro(e.display),!0}return!1}function io(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 Da(e){var t=e.gutters,n=e.gutterSpecs;h(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",ro(e)}function An(e){Da(e.display),Ot(e),Ea(e)}function wc(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=H("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=H("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=H("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: "+Me+"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"),w&&ee<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!P&&!(U&&ue)&&(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=io(r.gutters,r.lineNumbers),Da(i),n.init(i)}var pi=0,ur=null;w?ur=-.53:U?ur=15:E?ur=-.7:K&&(ur=-1/3);function Pa(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=Pa(e);return t.x*=ur,t.y*=ur,t}function Ha(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=Pa(t),r=n.x,i=n.y,o=ur;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&&te&&P){e:for(var f=t.target,g=a.view;f!=l;f=f.parentNode)for(var M=0;M<g.length;M++)if(g[M].node==f){e.display.currentWheelTarget=f;break e}}if(r&&!U&&!q&&o!=null){i&&c&&Tn(e,Math.max(0,l.scrollTop+i*o)),zr(e,Math.max(0,l.scrollLeft+r*o)),(!i||i&&c)&&wt(t),a.wheelStartX=null;return}if(i&&o!=null){var _=i*o,A=e.doc.scrollTop,V=A+a.wrapper.clientHeight;_<0?A=Math.max(0,A+_-50):V=Math.min(e.doc.height,V+_+50),to(e,{top:A,bottom:V})}pi<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 X=l.scrollLeft-a.wheelStartX,ne=l.scrollTop-a.wheelStartY,de=ne&&a.wheelDY&&ne/a.wheelDY||X&&a.wheelDX&&X/a.wheelDX;a.wheelStartX=a.wheelStartY=null,de&&(ur=(ur*pi+de)/(pi+1),++pi)}},200)):(a.wheelDX+=r,a.wheelDY+=i))}}var qt=function(e,t){this.ranges=e,this.primIndex=t};qt.prototype.primary=function(){return this.ranges[this.primIndex]},qt.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(!Re(n.anchor,r.anchor)||!Re(n.head,r.head))return!1}return!0},qt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Be(dt(this.ranges[t].anchor),dt(this.ranges[t].head));return new qt(e,this.primIndex)},qt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},qt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ae(t,r.from())>=0&&ae(e,r.to())<=0)return n}return-1};var Be=function(e,t){this.anchor=e,this.head=t};Be.prototype.from=function(){return $r(this.anchor,this.head)},Be.prototype.to=function(){return Tt(this.anchor,this.head)},Be.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Xt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(M,_){return ae(M.from(),_.from())}),n=$(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ae(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var c=$r(l.from(),a.from()),f=Tt(l.to(),a.to()),g=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Be(g?f:c,g?c:f))}}return new qt(t,n)}function xr(e,t){return new qt([new Be(e,t||e)],0)}function wr(e){return e.text?N(e.from.line+e.text.length-1,J(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Fa(e,t){if(ae(e,t.from)<0)return e;if(ae(e,t.to)<=0)return wr(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+=wr(t).ch-t.to.ch),N(n,r)}function oo(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Be(Fa(i.anchor,t),Fa(i.head,t)))}return Xt(e.cm,n,e.sel.primIndex)}function Ia(e,t,n){return e.line==t.line?N(n.line,e.ch-t.ch+n.ch):N(n.line+(e.line-t.line),e.ch)}function _c(e,t,n){for(var r=[],i=N(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ia(l.from,i,o),c=Ia(wr(l),i,o);if(i=l.to,o=c,n=="around"){var f=e.sel.ranges[a],g=ae(f.head,f.anchor)<0;r[a]=new Be(g?c:s,g?s:c)}else r[a]=new Be(s,s)}return new qt(r,e.sel.primIndex)}function ao(e){e.doc.mode=Rr(e.options,e.doc.modeOption),jn(e)}function jn(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,zn(e,100),e.state.modeGen++,e.curOp&&Ot(e)}function qa(e,t){return t.from.ch==0&&t.to.ch==0&&J(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function lo(e,t,n,r){function i(de){return n?n[de]:null}function o(de,ie,he){zs(de,ie,he,r),pt(de,"change",de,t)}function a(de,ie){for(var he=[],ke=de;ke<ie;++ke)he.push(new Ur(c[ke],i(ke),r));return he}var l=t.from,s=t.to,c=t.text,f=ve(e,l.line),g=ve(e,s.line),M=J(c),_=i(c.length-1),A=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(qa(e,t)){var V=a(0,c.length-1);o(g,g.text,_),A&&e.remove(l.line,A),V.length&&e.insert(l.line,V)}else if(f==g)if(c.length==1)o(f,f.text.slice(0,l.ch)+M+f.text.slice(s.ch),_);else{var X=a(1,c.length-1);X.push(new Ur(M+f.text.slice(s.ch),_,r)),o(f,f.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,X)}else if(c.length==1)o(f,f.text.slice(0,l.ch)+c[0]+g.text.slice(s.ch),i(0)),e.remove(l.line+1,A);else{o(f,f.text.slice(0,l.ch)+c[0],i(0)),o(g,M+g.text.slice(s.ch),_);var ne=a(1,c.length-1);A>1&&e.remove(l.line+1,A-1),e.insert(l.line+1,ne)}pt(e,"change",e,t)}function kr(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 Ra(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ki(e),ao(e),Ba(e),e.options.direction=t.direction,e.options.lineWrapping||Di(e),e.options.mode=t.modeOption,Ot(e)}function Ba(e){(e.doc.direction=="rtl"?Ee:b)(e.display.lineDiv,"CodeMirror-rtl")}function Cc(e){Pt(e,function(){Ba(e),Ot(e)})}function fi(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 so(e,t){var n={from:dt(t.from),to:wr(t),text:ar(e,t.from,t.to)};return Ua(e,n,t.from.line,t.to.line+1),kr(e,function(r){return Ua(r,n,t.from.line,t.to.line+1)},!0),n}function Va(e){for(;e.length;){var t=J(e);if(t.ranges)e.pop();else break}}function Sc(e,t){if(t)return Va(e.done),J(e.done);if(e.done.length&&!J(e.done).ranges)return J(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),J(e.done)}function $a(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=Sc(i,i.lastOp==r)))l=J(a.changes),ae(t.from,t.to)==0&&ae(t.from,l.to)==0?l.to=wr(t):a.changes.push(so(e,t));else{var s=J(i.done);for((!s||!s.ranges)&&hi(e.sel,i.done),a={changes:[so(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||tt(e,"historyAdded")}function Mc(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 Lc(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||Mc(e,o,J(i.done),t))?i.done[i.done.length-1]=t:hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&Va(i.undone)}function hi(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ua(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 Tc(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 Oc(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Tc(n[i]));return r}function Ka(e,t){var n=Oc(e,t),r=Ai(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 en(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?qt.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],f=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var g in c)(f=g.match(/^spans_(\d+)$/))&&$(t,Number(f[1]))>-1&&(J(l)[g]=c[g],delete c[g])}}return r}function co(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ae(t,i)<0;o!=ae(n,i)<0?(i=t,t=n):o!=ae(t,n)<0&&(t=n)}return new Be(i,t)}else return new Be(n||t,t)}function mi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),kt(e,new qt([co(e.sel.primary(),t,n,i)],0),r)}function Ga(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]=co(e.sel.ranges[o],t[o],null,i);var a=Xt(e.cm,r,e.sel.primIndex);kt(e,a,n)}function uo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,kt(e,Xt(e.cm,i,e.sel.primIndex),r)}function Qa(e,t,n,r){kt(e,xr(t,n),r)}function Nc(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 Be(ze(e,i[o].anchor),ze(e,i[o].head))},origin:n&&n.origin};return tt(e,"beforeSelectionChange",e,r),e.cm&&tt(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Xt(e.cm,r.ranges,r.ranges.length-1):t}function Ya(e,t,n){var r=e.history.done,i=J(r);i&&i.ranges?(r[r.length-1]=t,gi(e,t,n)):kt(e,t,n)}function kt(e,t,n){gi(e,t,n),Lc(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function gi(e,t,n){(Dt(e,"beforeSelectionChange")||e.cm&&Dt(e.cm,"beforeSelectionChange"))&&(t=Nc(e,t,n));var r=n&&n.bias||(ae(t.primary().head,e.sel.primary().head)<0?-1:1);Za(e,Ja(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Xr(e.cm)}function Za(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Bt(e.cm)),pt(e,"cursorActivity",e))}function Xa(e){Za(e,Ja(e,e.sel,null,!1))}function Ja(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=vi(e,a.anchor,l&&l.anchor,n,r),c=a.head==a.anchor?s:vi(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 Be(s,c))}return i?Xt(e.cm,i,t.primIndex):t}function tn(e,t,n,r,i){var o=ve(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,f="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(c?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(f?l.to>=t.ch:l.to>t.ch))){if(i&&(tt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(n){var g=s.find(r<0?1:-1),M=void 0;if((r<0?f:c)&&(g=el(e,g,-r,g&&g.line==t.line?o:null)),g&&g.line==t.line&&(M=ae(g,n))&&(r<0?M<0:M>0))return tn(e,g,t,r,i)}var _=s.find(r<0?-1:1);return(r<0?c:f)&&(_=el(e,_,r,_.line==t.line?o:null)),_?tn(e,_,t,r,i):null}}return t}function vi(e,t,n,r,i){var o=r||1,a=tn(e,t,n,o,i)||!i&&tn(e,t,n,o,!0)||tn(e,t,n,-o,i)||!i&&tn(e,t,n,-o,!0);return a||(e.cantEdit=!0,N(e.first,0))}function el(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?ze(e,N(t.line-1)):null:n>0&&t.ch==(r||ve(e,t.line)).text.length?t.line<e.first+e.size-1?N(t.line+1,0):null:new N(t.line,t.ch+n)}function tl(e){e.setSelection(N(e.firstLine(),0),N(e.lastLine()),re)}function rl(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=ze(e,i)),o&&(r.to=ze(e,o)),a&&(r.text=a),l!==void 0&&(r.origin=l)}),tt(e,"beforeChange",e,r),e.cm&&tt(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 rn(e,t,n){if(e.cm){if(!e.cm.curOp)return ft(e.cm,rn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Dt(e,"beforeChange")||e.cm&&Dt(e.cm,"beforeChange"))&&(t=rl(e,t,!0),!t))){var r=Ko&&!n&&Ls(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)nl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else nl(e,t)}}function nl(e,t){if(!(t.text.length==1&&t.text[0]==""&&ae(t.from,t.to)==0)){var n=oo(e,t);$a(e,t,n,e.cm?e.cm.curOp.id:NaN),En(e,t,n,Ai(e,t));var r=[];kr(e,function(i,o){!o&&$(r,i.history)==-1&&(ll(i.history,t),r.push(i.history)),En(i,t,null,Ai(i,t))})}}function bi(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(hi(o,s),n&&!o.equals(e.sel)){kt(e,o,{clearRedo:!1});return}a=o}else if(r){l.push(o);return}else break;var f=[];hi(a,s),s.push({changes:f,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var g=Dt(e,"beforeChange")||e.cm&&Dt(e.cm,"beforeChange"),M=function(V){var X=o.changes[V];if(X.origin=t,g&&!rl(e,X,!1))return l.length=0,{};f.push(so(e,X));var ne=V?oo(e,X):J(l);En(e,X,ne,Ka(e,X)),!V&&e.cm&&e.cm.scrollIntoView({from:X.from,to:wr(X)});var de=[];kr(e,function(ie,he){!he&&$(de,ie.history)==-1&&(ll(ie.history,X),de.push(ie.history)),En(ie,X,null,Ka(ie,X))})},_=o.changes.length-1;_>=0;--_){var A=M(_);if(A)return A.v}}}}function il(e,t){if(t!=0&&(e.first+=t,e.sel=new qt(He(e.sel.ranges,function(i){return new Be(N(i.anchor.line+t,i.anchor.ch),N(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Ot(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)br(e.cm,r,"gutter")}}function En(e,t,n,r){if(e.cm&&!e.cm.curOp)return ft(e.cm,En)(e,t,n,r);if(t.to.line<e.first){il(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);il(e,i),t={from:N(e.first,0),to:N(t.to.line+i,t.to.ch),text:[J(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:N(o,ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ar(e,t.from,t.to),n||(n=oo(e,t)),e.cm?zc(e.cm,t,r):lo(e,t,r),gi(e,n,re),e.cantEdit&&vi(e,N(e.firstLine(),0))&&(e.cantEdit=!1)}}function zc(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(Yt(ve(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&&Bt(e),lo(r,t,n,_a(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(_){var A=ti(_);A>i.maxLineLength&&(i.maxLine=_,i.maxLineLength=A,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),xs(r,o.line),zn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Ot(e):o.line==a.line&&t.text.length==1&&!qa(e.doc,t)?br(e,o.line,"text"):Ot(e,o.line,a.line+1,c);var f=Dt(e,"changes"),g=Dt(e,"change");if(g||f){var M={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};g&&pt(e,"change",e,M),f&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(M)}e.display.selForContextMenu=null}function nn(e,t,n,r,i){var o;r||(r=n),ae(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),rn(e,{from:n,to:r,text:t,origin:i})}function ol(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function al(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++)ol(o.ranges[l].anchor,t,n,r),ol(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=N(c.from.line+r,c.from.ch),c.to=N(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;al(e.done,n,r,i),al(e.undone,n,r,i)}function Wn(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=ve(e,Ho(e,t)):i=u(t),i==null?null:(r(o,i)&&e.cm&&br(e.cm,i,n),o)}function Dn(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}Dn.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,As(i),pt(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 Pn(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}Pn.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 Dn))){var l=[];this.collapse(l),this.children=[new Dn(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 Dn(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 Pn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=$(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Pn(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=Cn(this);It(n,Math.max(0,n.height-o)),e&&(Pt(e,function(){sl(e,n,-o),br(e,r,"widget")}),pt(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=Cn(this)-t;i&&(vr(this.doc,r)||It(r,r.height+i),n&&Pt(n,function(){n.curOp.forceUpdate=!0,sl(n,r,i),pt(n,"lineWidgetChanged",n,e,u(r))}))},$t(Hn);function sl(e,t,n){sr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ji(e,n)}function Ac(e,t,n,r){var i=new Hn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Wn(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&&!vr(e,a)){var s=sr(a)<e.scrollTop;It(a,a.height+Cn(i)),s&&Ji(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&pt(o,"lineWidgetAdded",o,i,typeof t=="number"?t:u(t)),i}var cl=0,_r=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++cl};_r.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&jr(e),Dt(this,"clear")){var n=this.find();n&&pt(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=wn(a.markedSpans,this);e&&!this.collapsed?br(e,u(a),"text"):e&&(l.to!=null&&(i=u(a)),l.from!=null&&(r=u(a))),a.markedSpans=_s(a.markedSpans,l),l.from==null&&this.collapsed&&!vr(this.doc,a)&&e&&It(a,Qr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Yt(this.lines[s]),f=ti(c);f>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=f,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Ot(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xa(e.doc)),e&&pt(e,"markerCleared",e,this,r,i),t&&Er(e),this.parent&&this.parent.clear()}},_r.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=wn(o.markedSpans,this);if(a.from!=null&&(n=N(t?o:u(o),a.from),e==-1))return n;if(a.to!=null&&(r=N(t?o:u(o),a.to),e==1))return r}return n&&{from:n,to:r}},_r.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||Pt(r,function(){var i=t.line,o=u(t.line),a=Ii(r,o);if(a&&(ma(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!vr(n.doc,i)&&n.height!=null){var l=n.height;n.height=null;var s=Cn(n)-l;s&&It(i,i.height+s)}pt(r,"markerChanged",r,e)})},_r.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||$(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},_r.prototype.detachLine=function(e){if(this.lines.splice($(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},$t(_r);function on(e,t,n,r,i){if(r&&r.shared)return jc(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ft(e.cm,on)(e,t,n,r,i);var o=new _r(e,i),a=ae(t,n);if(r&&Y(r,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=H("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Jo(e,t.line,t,n,o)||t.line!=n.line&&Jo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ks()}o.addToHistory&&$a(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(g){s&&o.collapsed&&!s.options.lineWrapping&&Yt(g)==s.display.maxLine&&(c=!0),o.collapsed&&l!=t.line&&It(g,0),Cs(g,new Zn(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(g){vr(e,g)&&It(g,0)}),o.clearOnEnter&&Se(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ws(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++cl,o.atomic=!0),s){if(c&&(s.curOp.updateMaxLine=!0),o.collapsed)Ot(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var f=t.line;f<=n.line;f++)br(s,f,"text");o.atomic&&Xa(s.doc),pt(s,"markerAdded",s,o)}return o}var Fn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Fn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();pt(this,"clear")}},Fn.prototype.find=function(e,t){return this.primary.find(e,t)},$t(Fn);function jc(e,t,n,r,i){r=Y(r),r.shared=!1;var o=[on(e,t,n,r,i)],a=o[0],l=r.widgetNode;return kr(e,function(s){l&&(r.widgetNode=l.cloneNode(!0)),o.push(on(s,ze(s,t),ze(s,n),r,i));for(var c=0;c<s.linked.length;++c)if(s.linked[c].isParent)return;a=J(o)}),new Fn(o,a)}function ul(e){return e.findMarks(N(e.first,0),e.clipPos(N(e.lastLine())),function(t){return t.parent})}function Ec(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(ae(o,a)){var l=on(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Wc(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];kr(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];$(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}var Dc=0,Nt=function(e,t,n,r,i){if(!(this instanceof Nt))return new Nt(e,t,n,r,i);n==null&&(n=0),Pn.call(this,[new Dn([new Ur("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=N(n,0);this.sel=xr(o),this.history=new fi(null),this.id=++Dc,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),lo(this,{from:o,to:o,text:e}),kt(this,xr(o),re)};Nt.prototype=z(Pn.prototype,{constructor:Nt,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=yn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:ht(function(e){var t=N(this.first,0),n=this.first+this.size-1;rn(this,{from:t,to:N(n,ve(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ln(this.cm,0,0),kt(this,xr(t),re)}),replaceRange:function(e,t,n,r){t=ze(this,t),n=n?ze(this,n):t,nn(this,e,t,n,r)},getRange:function(e,t,n){var r=ar(this,ze(this,e),ze(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(W(this,e))return ve(this,e)},getLineNumber:function(e){return u(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ve(this,e)),Yt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ze(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:ht(function(e,t,n){Qa(this,ze(this,typeof e=="number"?N(e,t||0):e),null,n)}),setSelection:ht(function(e,t,n){Qa(this,ze(this,e),ze(this,t||e),n)}),extendSelection:ht(function(e,t,n){mi(this,ze(this,e),t&&ze(this,t),n)}),extendSelections:ht(function(e,t){Ga(this,Fo(this,e),t)}),extendSelectionsBy:ht(function(e,t){var n=He(this.sel.ranges,e);Ga(this,Fo(this,n),t)}),setSelections:ht(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Be(ze(this,e[i].anchor),ze(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),kt(this,Xt(this.cm,r,t),n)}}),addSelection:ht(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Be(ze(this,e),ze(this,t||e))),kt(this,Xt(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=ar(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=ar(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:ht(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"&&_c(this,r,t),s=r.length-1;s>=0;s--)rn(this,r[s]);l?Ya(this,l):this.cm&&Xr(this.cm)}),undo:ht(function(){bi(this,"undo")}),redo:ht(function(){bi(this,"redo")}),undoSelection:ht(function(){bi(this,"undo",!0)}),redoSelection:ht(function(){bi(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 fi(this.history),kr(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:en(this.history.done),undone:en(this.history.undone)}},setHistory:function(e){var t=this.history=new fi(this.history);t.done=en(e.done.slice(0),null,!0),t.undone=en(e.undone.slice(0),null,!0)},setGutterMarker:ht(function(e,t,n){return Wn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&bt(i)&&(r.gutterMarkers=null),!0})}),clearGutter:ht(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Wn(t,n,"gutter",function(){return n.gutterMarkers[e]=null,bt(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!W(this,e)||(t=e,e=ve(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:ht(function(e,t,n){return Wn(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(p(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:ht(function(e,t,n){return Wn(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(p(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:ht(function(e,t,n){return Ac(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return on(this,ze(this,e),ze(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=ze(this,e),on(this,e,e,n,"bookmark")},findMarksAt:function(e){e=ze(this,e);var t=[],n=ve(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=ze(this,e),t=ze(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}),ze(this,N(n,t))},indexFromPos:function(e){e=ze(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 Nt(yn(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 Nt(yn(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}],Ec(r,ul(this)),r},unlinkDoc:function(e){if(e instanceof Ze&&(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),Wc(ul(this));break}}if(e.history==this.history){var r=[e.id];kr(e,function(i){return r.push(i.id)},!0),e.history=new fi(null),e.history.done=en(this.history.done,r),e.history.undone=en(this.history.undone,r)}},iterLinkedDocs:function(e){kr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Vt(e)},lineSeparator:function(){return this.lineSep||`
- `},setDirection:ht(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Cc(this.cm))})}),Nt.prototype.eachLine=Nt.prototype.iter;var dl=0;function Pc(e){var t=this;if(pl(t),!(rt(t,e)||cr(t.display,e))){wt(e),w&&(dl=+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&&ft(t,function(){n=ze(t.doc,n);var _={from:n,to:n,text:t.doc.splitLines(o.filter(function(A){return A!=null}).join(t.doc.lineSeparator())),origin:"paste"};rn(t.doc,_),Ya(t.doc,xr(ze(t.doc,n),ze(t.doc,wr(_))))})()},s=function(_,A){if(t.options.allowDropFileTypes&&$(t.options.allowDropFileTypes,_.type)==-1){l();return}var V=new FileReader;V.onerror=function(){return l()},V.onload=function(){var X=V.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(X)){l();return}o[A]=X,l()},V.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 f=e.dataTransfer.getData("Text");if(f){var g;if(t.state.draggingText&&!t.state.draggingText.copy&&(g=t.listSelections()),gi(t.doc,xr(n,n)),g)for(var M=0;M<g.length;++M)nn(t.doc,"",g[M].anchor,g[M].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(_){}}}}function Hc(e,t){if(w&&(!e.state.draggingText||+new Date-dl<100)){fr(t);return}if(!(rt(e,t)||cr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!K)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",q&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),q&&n.parentNode.removeChild(n)}}function Fc(e,t){var n=Or(e,t);if(n){var r=document.createDocumentFragment();Gi(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)),S(e.display.dragCursor,r)}}function pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function fl(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 hl=!1;function Ic(){hl||(qc(),hl=!0)}function qc(){var e;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,fl(Rc)},100))}),Se(window,"blur",function(){return fl(Zr)})}function Rc(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Cr={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"},In=0;In<10;In++)Cr[In+48]=Cr[In+96]=String(In);for(var yi=65;yi<=90;yi++)Cr[yi]=String.fromCharCode(yi);for(var qn=1;qn<=12;qn++)Cr[qn+111]=Cr[qn+63235]="F"+qn;var dr={};dr.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"},dr.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"},dr.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"},dr.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"]},dr.default=te?dr.macDefault:dr.pcDefault;function Bc(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 Vc(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=He(n.split(" "),Bc),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 an(e,t,n,r){t=xi(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 an(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=an(e,t.fallthrough[o],n,r);if(a)return a}}}function ml(e){var t=typeof e=="string"?e:Cr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function gl(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(O?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(O?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function vl(e,t){if(q&&e.keyCode==34&&e.char)return!1;var n=Cr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),gl(n,e,t))}function xi(e){return typeof e=="string"?dr[e]:e}function ln(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ae(o.from,J(r).to)<=0;){var a=r.pop();if(ae(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Pt(e,function(){for(var l=r.length-1;l>=0;l--)nn(e.doc,"",r[l].from,r[l].to,"+delete");Xr(e)})}function po(e,t,n){var r=B(e.text,t+n,n);return r<0||r>e.text.length?null:r}function fo(e,t,n){var r=po(e,t.ch,n);return r==null?null:new N(t.line,r,n<0?"after":"before")}function ho(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Te(n,t.doc.direction);if(o){var a=i<0?J(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",c;if(a.level>0||t.doc.direction=="rtl"){var f=Gr(t,n);c=i<0?n.text.length-1:0;var g=nr(t,f,c).top;c=we(function(M){return nr(t,f,M).top==g},i<0==(a.level==1)?a.from:a.to-1,c),s=="before"&&(c=po(n,c,1))}else c=i<0?a.to:a.from;return new N(r,c,s)}}return new N(r,i<0?n.text.length:0,i<0?"before":"after")}function $c(e,t,n,r){var i=Te(t,e.doc.direction);if(!i)return fo(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=Ft(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 fo(t,n,r);var l=function(ne,de){return po(t,ne instanceof N?ne.ch:ne,de)},s,c=function(ne){return e.options.lineWrapping?(s=s||Gr(e,t),ka(e,t,s,ne)):{begin:0,end:t.text.length}},f=c(n.sticky=="before"?l(n,-1):n.ch);if(e.doc.direction=="rtl"||a.level==1){var g=a.level==1==r<0,M=l(n,g?1:-1);if(M!=null&&(g?M<=a.to&&M<=f.end:M>=a.from&&M>=f.begin)){var _=g?"before":"after";return new N(n.line,M,_)}}var A=function(ne,de,ie){for(var he=function(Ge,mt){return mt?new N(n.line,l(Ge,1),"before"):new N(n.line,Ge,"after")};ne>=0&&ne<i.length;ne+=de){var ke=i[ne],_e=de>0==(ke.level!=1),Pe=_e?ie.begin:l(ie.end,-1);if(ke.from<=Pe&&Pe<ke.to||(Pe=_e?ke.from:l(ke.to,-1),ie.begin<=Pe&&Pe<ie.end))return he(Pe,_e)}},V=A(o+r,r,f);if(V)return V;var X=r>0?f.end:l(f.begin,-1);return X!=null&&!(r>0&&X==t.text.length)&&(V=A(r>0?0:i.length-1,r,c(X)),V)?V:null}var Rn={selectAll:tl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),re)},killLine:function(e){return ln(e,function(t){if(t.empty()){var n=ve(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:N(t.head.line+1,0)}:{from:t.head,to:N(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ln(e,function(t){return{from:N(t.from().line,0),to:ze(e.doc,N(t.to().line+1,0))}})},delLineLeft:function(e){return ln(e,function(t){return{from:N(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ln(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 ln(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(N(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(N(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return bl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return yl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Uc(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")},Ne)},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")},Ne)},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/)?yl(e,t.head):r},Ne)},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=ge(e.getLine(o.line),o.ch,r);t.push(x(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Pt(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=ve(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new N(i.line,i.ch-1)),i.ch>0)i=new N(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),N(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=ve(e.doc,i.line-1).text;a&&(i=new N(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),N(i.line-1,a.length-1),i,"+transpose"))}}n.push(new Be(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Pt(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);Xr(e)})},openLine:function(e){return e.replaceSelection(`
- `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function bl(e,t){var n=ve(e.doc,t),r=Yt(n);return r!=n&&(t=u(r)),ho(!0,e,r,t,1)}function Uc(e,t){var n=ve(e.doc,t),r=Os(n);return r!=n&&(t=u(r)),ho(!0,e,n,t,-1)}function yl(e,t){var n=bl(e,t.line),r=ve(e.doc,n.line),i=Te(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 N(n.line,a?0:o,n.sticky)}return n}function wi(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)!=We}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Kc(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=an(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&an(t,e.options.extraKeys,n,e)||an(t,e.options.keyMap,n,e)}var Gc=new I;function Bn(e,t,n,r){var i=e.state.keySeq;if(i){if(ml(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Gc.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),xl(e,i+" "+t,n,r))return!0}return xl(e,t,n,r)}function xl(e,t,n,r){var i=Kc(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&pt(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(wt(n),Qi(e)),!!i}function wl(e,t){var n=vl(t,!0);return n?t.shiftKey&&!e.state.keySeq?Bn(e,"Shift-"+n,t,function(r){return wi(e,r,!0)})||Bn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return wi(e,r)}):Bn(e,n,t,function(r){return wi(e,r)}):!1}function Qc(e,t,n){return Bn(e,"'"+n+"'",t,function(r){return wi(e,r,!0)})}var mo=null;function kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Oe(Fe(t)),!rt(t,e))){w&&ee<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=wl(t,e);q&&(mo=r?n:null,!r&&n==88&&!Qn&&(te?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),U&&!te&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Yc(t)}}function Yc(e){var t=e.display.lineDiv;Ee(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(b(t,"CodeMirror-crosshair"),xt(document,"keyup",n),xt(document,"mouseover",n))}Se(document,"keyup",n),Se(document,"mouseover",n)}function _l(e){e.keyCode==16&&(this.doc.sel.shift=!1),rt(this,e)}function Cl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(cr(t.display,e)||rt(t,e)||e.ctrlKey&&!e.altKey||te&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(q&&n==mo){mo=null,wt(e);return}if(!(q&&(!e.which||e.which<10)&&wl(t,e))){var i=String.fromCharCode(r!=null?r:n);i!="\b"&&(Qc(t,e,i)||t.display.input.onKeyPress(e))}}}var Zc=400,go=function(e,t,n){this.time=e,this.pos=t,this.button=n};go.prototype.compare=function(e,t,n){return this.time+Zc>e&&ae(t,this.pos)==0&&n==this.button};var Vn,$n;function Xc(e,t){var n=+new Date;return $n&&$n.compare(n,e,t)?(Vn=$n=null,"triple"):Vn&&Vn.compare(n,e,t)?($n=new go(n,e,t),Vn=null,"double"):(Vn=new go(n,e,t),$n=null,"single")}function Sl(e){var t=this,n=t.display;if(!(rt(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,cr(n,e)){P||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!vo(t,e)){var r=Or(t,e),i=Ut(e),o=r?Xc(r,i):"single";me(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Jc(t,i,r,o,e))&&(i==1?r?tu(t,r,o,e):gn(e)==n.scroller&&wt(e):i==2?(r&&mi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(k?t.display.input.onContextMenu(e):Yi(t)))}}}function Jc(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,Bn(e,gl(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)!=We}finally{e.state.suppressEdits=!1}return l})}function eu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ce?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=te?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(te?n.altKey:n.ctrlKey)),i}function tu(e,t,n,r){w?setTimeout(ye(Ma,e),0):e.curOp.focus=Oe(Fe(e));var i=eu(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&Ti&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(ae((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(ae(a.to(),t)>0||t.xRel<0)?ru(e,r,t,i):nu(e,r,t,i)}function ru(e,t,n,r){var i=e.display,o=!1,a=ft(e,function(c){P&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Yi(e)),xt(i.wrapper.ownerDocument,"mouseup",a),xt(i.wrapper.ownerDocument,"mousemove",l),xt(i.scroller,"dragstart",s),xt(i.scroller,"drop",a),o||(wt(c),r.addNew||mi(e.doc,n,null,null,r.extend),P&&!K||w&&ee==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};P&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,Se(i.wrapper.ownerDocument,"mouseup",a),Se(i.wrapper.ownerDocument,"mousemove",l),Se(i.scroller,"dragstart",s),Se(i.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ml(e,t,n){if(n=="char")return new Be(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Be(N(t.line,0),ze(e.doc,N(t.line+1,0)));var r=n(e,t);return new Be(r.from,r.to)}function nu(e,t,n,r){w&&Yi(e);var i=e.display,o=e.doc;wt(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 Be(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new Be(n,n)),n=Or(e,t,!0,!0),l=-1;else{var f=Ml(e,n,r.unit);r.extend?a=co(a,f.anchor,f.head,r.extend):a=f}r.addNew?l==-1?(l=c.length,kt(o,Xt(e,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&r.unit=="char"&&!r.extend?(kt(o,Xt(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):uo(o,l,a,De):(l=0,kt(o,new qt([a],0),De),s=o.sel);var g=n;function M(ie){if(ae(g,ie)!=0)if(g=ie,r.unit=="rectangle"){for(var he=[],ke=e.options.tabSize,_e=ge(ve(o,n.line).text,n.ch,ke),Pe=ge(ve(o,ie.line).text,ie.ch,ke),Ge=Math.min(_e,Pe),mt=Math.max(_e,Pe),Xe=Math.min(n.line,ie.line),Ht=Math.min(e.lastLine(),Math.max(n.line,ie.line));Xe<=Ht;Xe++){var zt=ve(o,Xe).text,lt=qe(zt,Ge,ke);Ge==mt?he.push(new Be(N(Xe,lt),N(Xe,lt))):zt.length>lt&&he.push(new Be(N(Xe,lt),N(Xe,qe(zt,mt,ke))))}he.length||he.push(new Be(n,n)),kt(o,Xt(e,s.ranges.slice(0,l).concat(he),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ie)}else{var At=a,vt=Ml(e,ie,r.unit),ct=At.anchor,st;ae(vt.anchor,ct)>0?(st=vt.head,ct=$r(At.from(),vt.anchor)):(st=vt.anchor,ct=Tt(At.to(),vt.head));var it=s.ranges.slice(0);it[l]=iu(e,new Be(ze(o,ct),st)),kt(o,Xt(e,it,l),De)}}var _=i.wrapper.getBoundingClientRect(),A=0;function V(ie){var he=++A,ke=Or(e,ie,!0,r.unit=="rectangle");if(ke)if(ae(ke,g)!=0){e.curOp.focus=Oe(Fe(e)),M(ke);var _e=ci(i,o);(ke.line>=_e.to||ke.line<_e.from)&&setTimeout(ft(e,function(){A==he&&V(ie)}),150)}else{var Pe=ie.clientY<_.top?-20:ie.clientY>_.bottom?20:0;Pe&&setTimeout(ft(e,function(){A==he&&(i.scroller.scrollTop+=Pe,V(ie))}),50)}}function X(ie){e.state.selectingText=!1,A=1/0,ie&&(wt(ie),i.input.focus()),xt(i.wrapper.ownerDocument,"mousemove",ne),xt(i.wrapper.ownerDocument,"mouseup",de),o.history.lastSelOrigin=null}var ne=ft(e,function(ie){ie.buttons===0||!Ut(ie)?X(ie):V(ie)}),de=ft(e,X);e.state.selectingText=de,Se(i.wrapper.ownerDocument,"mousemove",ne),Se(i.wrapper.ownerDocument,"mouseup",de)}function iu(e,t){var n=t.anchor,r=t.head,i=ve(e.doc,n.line);if(ae(n,r)==0&&n.sticky==r.sticky)return t;var o=Te(i);if(!o)return t;var a=Ft(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 f=Ft(o,r.ch,r.sticky),g=f-a||(r.ch-n.ch)*(l.level==1?-1:1);f==s-1||f==s?c=g<0:c=g>0}var M=o[s+(c?-1:0)],_=c==(M.level==1),A=_?M.from:M.to,V=_?"after":"before";return n.ch==A&&n.sticky==V?t:new Be(new N(n.line,A,V),r)}function Ll(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(M){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&wt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Dt(e,n))return Lt(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 f=m(e.doc,o),g=e.display.gutterSpecs[s];return tt(e,n,e,f,g.className,t),Lt(t)}}}function vo(e,t){return Ll(e,t,"gutterClick",!0)}function Tl(e,t){cr(e.display,t)||ou(e,t)||rt(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function ou(e,t){return Dt(e,"gutterContextMenu")?Ll(e,t,"gutterContextMenu",!1):!1}function Ol(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Sn(e)}var sn={toString:function(){return"CodeMirror.Init"}},Nl={},ki={};function au(e){var t=e.optionHandlers;function n(r,i,o,a){e.defaults[r]=i,o&&(t[r]=a?function(l,s,c){c!=sn&&o(l,s,c)}:o)}e.defineOption=n,e.Init=sn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,ao(r)},!0),n("indentUnit",2,ao,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){jn(r),Sn(r),Ot(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 f=s.text.indexOf(i,c);if(f==-1)break;c=f+i.length,o.push(N(a,f))}a++});for(var l=o.length-1;l>=0;l--)nn(r.doc,i,o[l],N(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!=sn&&r.refresh()}),n("specialCharPlaceholder",Ws,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",ue?"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",!Le),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Ol(r),An(r)},!0),n("keyMap","default",function(r,i,o){var a=xi(i),l=o!=sn&&xi(o);l&&l.detach&&l.detach(r,a),a.attach&&a.attach(r,l||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,su,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=io(i,r.options.lineNumbers),An(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ui(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Jr(r)},!0),n("scrollbarStyle","native",function(r){Aa(r),Jr(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=io(r.options.gutters,i),An(r)},!0),n("firstLineNumber",1,An,!0),n("lineNumberFormatter",function(r){return r},An,!0),n("showCursorWhenSelecting",!1,Mn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Zr(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,lu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Mn,!0),n("singleCursorHeightPerLine",!0,Mn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,jn,!0),n("addModeClass",!1,jn,!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,jn,!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 lu(e,t,n){var r=n&&n!=sn;if(!t!=!r){var i=e.display.dragFunctions,o=t?Se:xt;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 su(e){e.options.lineWrapping?(Ee(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),Di(e)),Ki(e),Ot(e),Sn(e),setTimeout(function(){return Jr(e)},100)}function Ze(e,t){var n=this;if(!(this instanceof Ze))return new Ze(e,t);this.options=t=t?Y(t):{},Y(Nl,t,!1);var r=t.value;typeof r=="string"?r=new Nt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ze.inputStyles[t.inputStyle](this),o=this.display=new wc(e,r,i,t);o.wrapper.CodeMirror=this,Ol(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Aa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new I,keySeq:null,specialChars:null},t.autofocus&&!ue&&o.input.focus(),w&&ee<11&&setTimeout(function(){return n.display.input.reset(!0)},20),cu(this),Ic(),jr(this),this.curOp.forceUpdate=!0,Ra(this,r),t.autofocus&&!ue||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Zi(n)},20):Zr(this);for(var a in ki)ki.hasOwnProperty(a)&&ki[a](this,t[a],sn);Wa(this),t.finishInit&&t.finishInit(this);for(var l=0;l<bo.length;++l)bo[l](this);Er(this),P&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Ze.defaults=Nl,Ze.optionHandlers=ki;function cu(e){var t=e.display;Se(t.scroller,"mousedown",ft(e,Sl)),w&&ee<11?Se(t.scroller,"dblclick",ft(e,function(s){if(!rt(e,s)){var c=Or(e,s);if(!(!c||vo(e,s)||cr(e.display,s))){wt(s);var f=e.findWordAt(c);mi(e.doc,f.anchor,f.head)}}})):Se(t.scroller,"dblclick",function(s){return rt(e,s)||wt(s)}),Se(t.scroller,"contextmenu",function(s){return Tl(e,s)}),Se(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Tl(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 f=c.left-s.left,g=c.top-s.top;return f*f+g*g>20*20}Se(t.scroller,"touchstart",function(s){if(!rt(e,s)&&!o(s)&&!vo(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)}}),Se(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Se(t.scroller,"touchend",function(s){var c=t.activeTouch;if(c&&!cr(t,s)&&c.left!=null&&!c.moved&&new Date-c.start<300){var f=e.coordsChar(t.activeTouch,"page"),g;!c.prev||a(c,c.prev)?g=new Be(f,f):!c.prev.prev||a(c,c.prev.prev)?g=e.findWordAt(f):g=new Be(N(f.line,0),ze(e.doc,N(f.line+1,0))),e.setSelection(g.anchor,g.head),e.focus(),wt(s)}i()}),Se(t.scroller,"touchcancel",i),Se(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Tn(e,t.scroller.scrollTop),zr(e,t.scroller.scrollLeft,!0),tt(e,"scroll",e))}),Se(t.scroller,"mousewheel",function(s){return Ha(e,s)}),Se(t.scroller,"DOMMouseScroll",function(s){return Ha(e,s)}),Se(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){rt(e,s)||fr(s)},over:function(s){rt(e,s)||(Fc(e,s),fr(s))},start:function(s){return Hc(e,s)},drop:ft(e,Pc),leave:function(s){rt(e,s)||pl(e)}};var l=t.input.getField();Se(l,"keyup",function(s){return _l.call(e,s)}),Se(l,"keydown",ft(e,kl)),Se(l,"keypress",ft(e,Cl)),Se(l,"focus",function(s){return Zi(e,s)}),Se(l,"blur",function(s){return Zr(e,s)})}var bo=[];Ze.defineInitHook=function(e){return bo.push(e)};function Un(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=xn(e,t).state:n="prev");var a=e.options.tabSize,l=ve(i,t),s=ge(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c=l.text.match(/^\s*/)[0],f;if(!r&&!/\S/.test(l.text))f=0,n="not";else if(n=="smart"&&(f=i.mode.indent(o,l.text.slice(c.length),l.text),f==We||f>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?f=ge(ve(i,t-1).text,null,a):f=0:n=="add"?f=s+e.options.indentUnit:n=="subtract"?f=s-e.options.indentUnit:typeof n=="number"&&(f=s+n),f=Math.max(0,f);var g="",M=0;if(e.options.indentWithTabs)for(var _=Math.floor(f/a);_;--_)M+=a,g+=" ";if(M<f&&(g+=x(f-M)),g!=c)return nn(i,g,N(t,0),N(t,c.length),"+input"),l.stateAfter=null,!0;for(var A=0;A<i.sel.ranges.length;A++){var V=i.sel.ranges[A];if(V.head.line==t&&V.head.ch<c.length){var X=N(t,c.length);uo(i,A,new Be(X,X));break}}}var Jt=null;function _i(e){Jt=e}function yo(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=Vt(t),c=null;if(l&&r.ranges.length>1)if(Jt&&Jt.text.join(`
- `)==t){if(r.ranges.length%Jt.text.length==0){c=[];for(var f=0;f<Jt.text.length;f++)c.push(o.splitLines(Jt.text[f]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=He(s,function(ne){return[ne]}));for(var g=e.curOp.updateInput,M=r.ranges.length-1;M>=0;M--){var _=r.ranges[M],A=_.from(),V=_.to();_.empty()&&(n&&n>0?A=N(A.line,A.ch-n):e.state.overwrite&&!l?V=N(V.line,Math.min(ve(o,V.line).text.length,V.ch+J(s).length)):l&&Jt&&Jt.lineWise&&Jt.text.join(`
- `)==s.join(`
- `)&&(A=V=N(A.line,0)));var X={from:A,to:V,text:c?c[M%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};rn(e.doc,X),pt(e,"inputRead",e,X)}t&&!l&&Al(e,t),Xr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=g),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Pt(t,function(){return yo(t,n,0,null,"paste")}),!0}function Al(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=Un(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Un(e,i.head.line,"smart"));a&&pt(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:N(i,0),head:N(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function xo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function El(){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 P?e.style.width="1000px":e.setAttribute("wrap","off"),se&&(e.style.border="1px solid black"),t}function uu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){me(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)&&ft(this,t[r])(this,i,a),tt(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"](xi(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:Ct(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");T(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,Ot(this)}),removeOverlay:Ct(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++,Ot(this);return}}}),indentLine:Ct(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),W(this.doc,r)&&Un(this,r,i,o)}),indentSelection:Ct(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&&(Un(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Xr(this));else{var s=l.from(),c=l.to(),f=Math.max(o,s.line);o=Math.min(this.lastLine(),c.line-(c.ch?0:1))+1;for(var g=f;g<o;++g)Un(this,g,r);var M=this.doc.sel.ranges;s.ch==0&&i.length==M.length&&M[a].from().ch>0&&uo(this.doc,a,new Be(s,M[a].to()),re)}}}),getTokenAt:function(r,i){return Vo(this,r,i)},getLineTokens:function(r,i){return Vo(this,N(r),i,!0)},getTokenTypeAt:function(r){r=ze(this.doc,r);var i=qo(this,ve(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 f=s?s.indexOf("overlay "):-1;return f<0?s:f==0?null:s.slice(0,f-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 f=0;f<a._global.length;f++){var g=a._global[f];g.pred(l,this)&&$(o,g.val)==-1&&o.push(g.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=Ho(o,r!=null?r:o.first+o.size-1),xn(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=ze(this.doc,r):o=r?a.from():a.to(),Zt(this,o,i||"page")},charCoords:function(r,i){return oi(this,ze(this.doc,r),i||"page")},coordsChar:function(r,i){return r=ya(this,r,i||"page"),Bi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=ya(this,{top:r,left:0},i||"page").top,m(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=ve(this.doc,r)}else l=r;return ii(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-sr(l):0)},defaultTextHeight:function(){return Qr(this.display)},defaultCharWidth:function(){return Yr(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,ze(this.doc,r));var c=r.bottom,f=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 g=Math.max(s.wrapper.clientHeight,this.doc.height),M=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>g)&&r.top>i.offsetHeight?c=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=g&&(c=r.bottom),f+i.offsetWidth>M&&(f=M-i.offsetWidth)}i.style.top=c+"px",i.style.left=i.style.right="",l=="right"?(f=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?f=0:l=="middle"&&(f=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=f+"px"),o&&lc(this,{left:f,top:c,right:f+i.offsetWidth,bottom:c+i.offsetHeight})},triggerOnKeyDown:Ct(kl),triggerOnKeyPress:Ct(Cl),triggerOnKeyUp:_l,triggerOnMouseDown:Ct(Sl),execCommand:function(r){if(Rn.hasOwnProperty(r))return Rn[r].call(null,this)},triggerElectric:Ct(function(r){Al(this,r)}),findPosH:function(r,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=ze(this.doc,r),c=0;c<i&&(s=wo(this.doc,s,l,o,a),!s.hitSide);++c);return s},moveH:Ct(function(r,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?wo(o.doc,a.head,r,i,o.options.rtlMoveVisually):r<0?a.from():a.to()},Ne)}),deleteH:Ct(function(r,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):ln(this,function(l){var s=wo(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=ze(this.doc,r),f=0;f<i;++f){var g=Zt(this,c,"div");if(s==null?s=g.left:g.left=s,c=Wl(this,g,l,o),c.hitSide)break}return c},moveV:Ct(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(f){if(s)return r<0?f.from():f.to();var g=Zt(o,f.head,"div");f.goalColumn!=null&&(g.left=f.goalColumn),l.push(g.left);var M=Wl(o,g,r,i);return i=="page"&&f==a.sel.primary()&&Ji(o,oi(o,M,"div").top-g.top),M},Ne),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=ve(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),f=Qe(c,s)?function(g){return Qe(g,s)}:/\s/.test(c)?function(g){return/\s/.test(g)}:function(g){return!/\s/.test(g)&&!Qe(g)};a>0&&f(o.charAt(a-1));)--a;for(;l<o.length&&f(o.charAt(l));)++l}return new Be(N(r.line,a),N(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ee(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),tt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Oe(Fe(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ct(function(r,i){Ln(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-rr(this)-this.display.barHeight,width:r.scrollWidth-rr(this)-this.display.barWidth,clientHeight:Fi(this),clientWidth:Lr(this)}},scrollIntoView:Ct(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:N(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?sc(this,r):Ta(this,r.from,r.to,r.margin)}),setSize:Ct(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&&ga(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){br(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,tt(this,"refresh",this)}),operation:function(r){return Pt(this,r)},startOperation:function(){return jr(this)},endOperation:function(){return Er(this)},refresh:Ct(function(){var r=this.display.cachedTextHeight;Ot(this),this.curOp.forceUpdate=!0,Sn(this),Ln(this,this.doc.scrollLeft,this.doc.scrollTop),ro(this.display),(r==null||Math.abs(r-Qr(this.display))>.5||this.options.lineWrapping)&&Ki(this),tt(this,"refresh",this)}),swapDoc:Ct(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ra(this,r),Sn(this),this.display.input.reset(),Ln(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,pt(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}},$t(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 wo(e,t,n,r,i){var o=t,a=n,l=ve(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 N(de,t.ch,t.sticky),l=ve(e,de))}function f(de){var ie;if(r=="codepoint"){var he=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(he))ie=null;else{var ke=n>0?he>=55296&&he<56320:he>=56320&&he<57343;ie=new N(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(ke?2:1))),-n)}}else i?ie=$c(e.cm,l,t,n):ie=fo(l,t,n);if(ie==null)if(!de&&c())t=ho(i,e.cm,l,t.line,s);else return!1;else t=ie;return!0}if(r=="char"||r=="codepoint")f();else if(r=="column")f(!0);else if(r=="word"||r=="group")for(var g=null,M=r=="group",_=e.cm&&e.cm.getHelper(t,"wordChars"),A=!0;!(n<0&&!f(!A));A=!1){var V=l.text.charAt(t.ch)||`
- `,X=Qe(V,_)?"w":M&&V==`
- `?"n":!M||/\s/.test(V)?null:"p";if(M&&!A&&!X&&(X="s"),g&&g!=X){n<0&&(n=1,f(),t.sticky="after");break}if(X&&(g=X),n>0&&!f(!A))break}var ne=vi(e,t,o,a,!0);return Re(o,ne)&&(ne.hitSide=!0),ne}function Wl(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,me(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(l-.5*Qr(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=Bi(e,o,a),!!c.outside;){if(n<0?a<=0:a>=i.height){c.hitSide=!0;break}a+=n*5}return c}var Ue=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ue.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,xo(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}Se(i,"paste",function(l){!o(l)||rt(r,l)||zl(l,r)||ee<=11&&setTimeout(ft(r,function(){return t.updateFromDOM()}),20)}),Se(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),Se(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),Se(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Se(i,"touchstart",function(){return n.forceCompositionEnd()}),Se(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||rt(r,l))){if(r.somethingSelected())_i({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=jl(r);_i({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,re),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var c=Jt.text.join(`
- `);if(l.clipboardData.setData("Text",c),l.clipboardData.getData("Text")==c){l.preventDefault();return}}var f=El(),g=f.firstChild;xo(g),r.display.lineSpace.insertBefore(f,r.display.lineSpace.firstChild),g.value=Jt.text.join(`
- `);var M=Oe(Ae(i));Je(g),setTimeout(function(){r.display.lineSpace.removeChild(f),M.focus(),M==i&&n.showPrimarySelection()},50)}}Se(i,"copy",a),Se(i,"cut",a)},Ue.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ue.prototype.prepareSelection=function(){var e=Sa(this.cm,!1);return e.focus=Oe(Ae(this.div))==this.div,e},Ue.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ue.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ue.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=Ci(t,e.anchorNode,e.anchorOffset),a=Ci(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&ae($r(o,a),r)==0&&ae(Tt(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Dl(t,r)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Dl(t,i);if(!c){var f=l[l.length-1].measure,g=f.maps?f.maps[f.maps.length-1]:f.map;c={node:g[g.length-1],offset:g[g.length-2]-g[g.length-3]}}if(!s||!c){e.removeAllRanges();return}var M=e.rangeCount&&e.getRangeAt(0),_;try{_=R(s.node,s.offset,c.offset,c.node)}catch(A){}_&&(!U&&t.state.focused?(e.collapse(s.node,s.offset),_.collapsed||(e.removeAllRanges(),e.addRange(_))):(e.removeAllRanges(),e.addRange(_)),M&&e.anchorNode==null?e.addRange(M):U&&this.startGracePeriod()),this.rememberSelection()}},Ue.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)},Ue.prototype.showMultipleSelections=function(e){S(this.cm.display.cursorDiv,e.cursors),S(this.cm.display.selectionDiv,e.selection)},Ue.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ue.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return oe(this.div,t)},Ue.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Oe(Ae(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ue.prototype.blur=function(){this.div.blur()},Ue.prototype.getField=function(){return this.div},Ue.prototype.supportsTouch=function(){return!0},Ue.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Pt(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)},Ue.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ue.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(ce&&E&&this.cm.display.gutterSpecs.length&&du(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=Ci(t,e.anchorNode,e.anchorOffset),r=Ci(t,e.focusNode,e.focusOffset);n&&r&&Pt(t,function(){kt(t.doc,xr(n,r),re),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ue.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=N(r.line-1,ve(e.doc,r.line-1).length)),i.ch==ve(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=N(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||(o=Nr(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=Nr(e,i.line),c,f;if(s==t.view.length-1?(c=t.viewTo-1,f=t.lineDiv.lastChild):(c=u(t.view[s+1].line)-1,f=t.view[s+1].node.previousSibling),!l)return!1;for(var g=e.doc.splitLines(pu(e,l,f,a,c)),M=ar(e.doc,N(a,0),N(c,ve(e.doc,c).text.length));g.length>1&&M.length>1;)if(J(g)==J(M))g.pop(),M.pop(),c--;else if(g[0]==M[0])g.shift(),M.shift(),a++;else break;for(var _=0,A=0,V=g[0],X=M[0],ne=Math.min(V.length,X.length);_<ne&&V.charCodeAt(_)==X.charCodeAt(_);)++_;for(var de=J(g),ie=J(M),he=Math.min(de.length-(g.length==1?_:0),ie.length-(M.length==1?_:0));A<he&&de.charCodeAt(de.length-A-1)==ie.charCodeAt(ie.length-A-1);)++A;if(g.length==1&&M.length==1&&a==r.line)for(;_&&_>r.ch&&de.charCodeAt(de.length-A-1)==ie.charCodeAt(ie.length-A-1);)_--,A++;g[g.length-1]=de.slice(0,de.length-A).replace(/^\u200b+/,""),g[0]=g[0].slice(_).replace(/\u200b+$/,"");var ke=N(a,_),_e=N(c,M.length?J(M).length-A:0);if(g.length>1||g[0]||ae(ke,_e))return nn(e.doc,g,ke,_e,"+input"),!0},Ue.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ue.prototype.reset=function(){this.forceCompositionEnd()},Ue.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ue.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))},Ue.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Pt(this.cm,function(){return Ot(e.cm)})},Ue.prototype.setUneditable=function(e){e.contentEditable="false"},Ue.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ft(this.cm,yo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ue.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ue.prototype.onContextMenu=function(){},Ue.prototype.resetPosition=function(){},Ue.prototype.needsContentAttribute=!0;function Dl(e,t){var n=Ii(e,t.line);if(!n||n.hidden)return null;var r=ve(e.doc,t.line),i=da(n,r,t.line),o=Te(r,e.doc.direction),a="left";if(o){var l=Ft(o,t.ch);a=l%2?"right":"left"}var s=ha(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function du(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function cn(e,t){return t&&(e.bad=!0),e}function pu(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(_){return function(A){return A.id==_}}function f(){a&&(o+=l,s&&(o+=l),a=s=!1)}function g(_){_&&(f(),o+=_)}function M(_){if(_.nodeType==1){var A=_.getAttribute("cm-text");if(A){g(A);return}var V=_.getAttribute("cm-marker"),X;if(V){var ne=e.findMarks(N(r,0),N(i+1,0),c(+V));ne.length&&(X=ne[0].find(0))&&g(ar(e.doc,X.from,X.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&&f();for(var ie=0;ie<_.childNodes.length;ie++)M(_.childNodes[ie]);/^(pre|p)$/i.test(_.nodeName)&&(s=!0),de&&(a=!0)}else _.nodeType==3&&g(_.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;M(t),t!=n;)t=t.nextSibling,s=!1;return o}function Ci(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return cn(e.clipPos(N(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 fu(o,t,n)}}function fu(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!oe(r,t))return cn(N(u(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?J(e.rest):e.line;return cn(N(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 f(X,ne,de){for(var ie=-1;ie<(c?c.length:0);ie++)for(var he=ie<0?s.map:c[ie],ke=0;ke<he.length;ke+=3){var _e=he[ke+2];if(_e==X||_e==ne){var Pe=u(ie<0?e.line:e.rest[ie]),Ge=he[ke]+de;return(de<0||_e!=X)&&(Ge=he[ke+(de?1:0)]),N(Pe,Ge)}}}var g=f(a,l,n);if(g)return cn(g,i);for(var M=l.nextSibling,_=a?a.nodeValue.length-n:0;M;M=M.nextSibling){if(g=f(M,M.firstChild,0),g)return cn(N(g.line,g.ch-_),i);_+=M.textContent.length}for(var A=l.previousSibling,V=n;A;A=A.previousSibling){if(g=f(A,A.firstChild,-1),g)return cn(N(g.line,g.ch+V),i);V+=A.textContent.length}}var at=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null,this.resetting=!1};at.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),se&&(i.style.width="0px"),Se(i,"input",function(){w&&ee>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Se(i,"paste",function(a){rt(r,a)||zl(a,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(a){if(!rt(r,a)){if(r.somethingSelected())_i({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=jl(r);_i({lineWise:!0,text:l.text}),a.type=="cut"?r.setSelections(l.ranges,null,re):(n.prevInput="",i.value=l.text.join(`
- `),Je(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}Se(i,"cut",o),Se(i,"copy",o),Se(e.scroller,"paste",function(a){if(!(cr(e,a)||rt(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)}}),Se(e.lineSpace,"selectstart",function(a){cr(e,a)||wt(a)}),Se(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"})}}),Se(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},at.prototype.createField=function(e){this.wrapper=El(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;xo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},at.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},at.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Sa(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},at.prototype.showSelection=function(e){var t=this.cm,n=t.display;S(n.cursorDiv,e.cursors),S(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},at.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&&Je(this.textarea),w&&ee>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",w&&ee>=9&&(this.hasSelection=null));this.resetting=!1}},at.prototype.getField=function(){return this.textarea},at.prototype.supportsTouch=function(){return!1},at.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ue||Oe(Ae(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},at.prototype.blur=function(){this.textarea.blur()},at.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},at.prototype.receivedFocus=function(){this.slowPoll()},at.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},at.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)},at.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||mr(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(w&&ee>=9&&this.hasSelection===i||te&&/[\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 Pt(t,function(){yo(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},at.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},at.prototype.onKeyPress=function(){w&&ee>=9&&(this.hasSelection=null),this.fastPoll()},at.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||q)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&ft(n,kt)(n.doc,xr(o),re);var s=i.style.cssText,c=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
- top: `+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+`px;
- z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var g;P&&(g=i.ownerDocument.defaultView.scrollY),r.input.focus(),P&&i.ownerDocument.defaultView.scrollTo(null,g),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=_,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function M(){if(i.selectionStart!=null){var V=n.somethingSelected(),X="\u200B"+(V?i.value:"");i.value="\u21DA",i.value=X,t.prevInput=V?"":"\u200B",i.selectionStart=1,i.selectionEnd=X.length,r.selForContextMenu=n.doc.sel}}function _(){if(t.contextMenuPending==_&&(t.contextMenuPending=!1,t.wrapper.style.cssText=c,i.style.cssText=s,w&&ee<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!w||w&&ee<9)&&M();var V=0,X=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?ft(n,tl)(n):V++<10?r.detectingSelectAll=setTimeout(X,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(X,200)}}if(w&&ee>=9&&M(),k){fr(e);var A=function(){xt(window,"mouseup",A),setTimeout(_,20)};Se(window,"mouseup",A)}else setTimeout(_,50)},at.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},at.prototype.setUneditable=function(){},at.prototype.needsContentAttribute=!1;function hu(e,t){if(t=t?Y(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=Oe(Ae(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(Se(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&&(xt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Ze(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function mu(e){e.off=xt,e.on=Se,e.wheelEventPixels=kc,e.Doc=Nt,e.splitLines=Vt,e.countColumn=ge,e.findColumn=qe,e.isWordChar=Ke,e.Pass=We,e.signal=tt,e.Line=Ur,e.changeEnd=wr,e.scrollbarModel=za,e.Pos=N,e.cmpPos=ae,e.modes=Fr,e.mimeModes=Gt,e.resolveMode=qr,e.getMode=Rr,e.modeExtensions=gr,e.extendMode=Br,e.copyState=er,e.startState=Vr,e.innerMode=bn,e.commands=Rn,e.keyMap=dr,e.keyName=vl,e.isModifierKey=ml,e.lookupKey=an,e.normalizeKeyMap=Vc,e.StringStream=nt,e.SharedTextMarker=Fn,e.TextMarker=_r,e.LineWidget=Hn,e.e_preventDefault=wt,e.e_stopPropagation=Pr,e.e_stop=fr,e.addClass=Ee,e.contains=oe,e.rmClass=b,e.keyNames=Cr}au(Ze),uu(Ze);var gu="iter insert remove copy getEditor constructor".split(" ");for(var Si in Nt.prototype)Nt.prototype.hasOwnProperty(Si)&&$(gu,Si)<0&&(Ze.prototype[Si]=function(e){return function(){return e.apply(this.doc,arguments)}}(Nt.prototype[Si]));return $t(Nt),Ze.inputStyles={textarea:at,contenteditable:Ue},Ze.defineMode=function(e){!Ze.defaults.mode&&e!="null"&&(Ze.defaults.mode=e),Qt.apply(this,arguments)},Ze.defineMIME=Ir,Ze.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ze.defineMIME("text/plain","null"),Ze.defineExtension=function(e,t){Ze.prototype[e]=t},Ze.defineDocExtension=function(e,t){Nt.prototype[e]=t},Ze.fromTextArea=hu,mu(Ze),Ze.version="5.65.16",Ze})}(Et)),Et.exports}var Mi=Ve();const Kn=ql(Mi);Mr=(Ie=>(Ie.JSON="application/json",Ie.HTML="htmlmixed",Ie.JS="javascript",Ie.SQL="text/x-mysql",Ie.VUE="vue",Ie))(Mr||{});var Li={exports:{}};(function(Ie,ot){(function(L){L(Ve())})(function(L){L.defineMode("javascript",function(le,U){var fe=le.indentUnit,F=U.statementIndent,D=U.jsonld,w=U.json||D,ee=U.trackScope!==!1,P=U.typescript,j=U.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function u(dt){return{type:dt,style:"keyword"}}var m=u("keyword a"),W=u("keyword b"),Z=u("keyword c"),N=u("keyword d"),ae=u("operator"),Re={type:"atom",style:"atom"};return{if:u("if"),while:m,with:m,else:W,do:W,try:W,finally:W,return:N,break:N,continue:N,new:u("new"),delete:Z,void:Z,throw:Z,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:ae,typeof:ae,instanceof:ae,true:Re,false:Re,null:Re,undefined:Re,NaN:Re,Infinity:Re,this:u("this"),class:u("class"),super:u("atom"),yield:Z,export:u("export"),import:u("import"),extends:Z,await:Z}}(),Q=/[+\-*&%=<>!?|~^@]/,q=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(u){for(var m=!1,W,Z=!1;(W=u.next())!=null;){if(!m){if(W=="/"&&!Z)return;W=="["?Z=!0:Z&&W=="]"&&(Z=!1)}m=!m&&W=="\\"}}var be,pe;function se(u,m,W){return be=u,pe=W,m}function ce(u,m){var W=u.next();if(W=='"'||W=="'")return m.tokenize=ue(W),m.tokenize(u,m);if(W=="."&&u.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return se("number","number");if(W=="."&&u.match(".."))return se("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(W))return se(W);if(W=="="&&u.eat(">"))return se("=>","operator");if(W=="0"&&u.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return se("number","number");if(/\d/.test(W))return u.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),se("number","number");if(W=="/")return u.eat("*")?(m.tokenize=te,te(u,m)):u.eat("/")?(u.skipToEnd(),se("comment","comment")):It(u,m,1)?(K(u),u.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),se("regexp","string-2")):(u.eat("="),se("operator","operator",u.current()));if(W=="`")return m.tokenize=Ce,Ce(u,m);if(W=="#"&&u.peek()=="!")return u.skipToEnd(),se("meta","meta");if(W=="#"&&u.eatWhile(j))return se("variable","property");if(W=="<"&&u.match("!--")||W=="-"&&u.match("->")&&!/\S/.test(u.string.slice(0,u.start)))return u.skipToEnd(),se("comment","comment");if(Q.test(W))return(W!=">"||!m.lexical||m.lexical.type!=">")&&(u.eat("=")?(W=="!"||W=="=")&&u.eat("="):/[<>*+\-|&?]/.test(W)&&(u.eat(W),W==">"&&u.eat(W))),W=="?"&&u.eat(".")?se("."):se("operator","operator",u.current());if(j.test(W)){u.eatWhile(j);var Z=u.current();if(m.lastType!="."){if(E.propertyIsEnumerable(Z)){var N=E[Z];return se(N.type,N.style,Z)}if(Z=="async"&&u.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return se("async","keyword",Z)}return se("variable","variable",Z)}}function ue(u){return function(m,W){var Z=!1,N;if(D&&m.peek()=="@"&&m.match(q))return W.tokenize=ce,se("jsonld-keyword","meta");for(;(N=m.next())!=null&&!(N==u&&!Z);)Z=!Z&&N=="\\";return Z||(W.tokenize=ce),se("string","string")}}function te(u,m){for(var W=!1,Z;Z=u.next();){if(Z=="/"&&W){m.tokenize=ce;break}W=Z=="*"}return se("comment","comment")}function Ce(u,m){for(var W=!1,Z;(Z=u.next())!=null;){if(!W&&(Z=="`"||Z=="$"&&u.eat("{"))){m.tokenize=ce;break}W=!W&&Z=="\\"}return se("quasi","string-2",u.current())}var Le="([{}])";function xe(u,m){m.fatArrowAt&&(m.fatArrowAt=null);var W=u.string.indexOf("=>",u.start);if(!(W<0)){if(P){var Z=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(u.string.slice(u.start,W));Z&&(W=Z.index)}for(var N=0,ae=!1,Re=W-1;Re>=0;--Re){var dt=u.string.charAt(Re),Tt=Le.indexOf(dt);if(Tt>=0&&Tt<3){if(!N){++Re;break}if(--N==0){dt=="("&&(ae=!0);break}}else if(Tt>=3&&Tt<6)++N;else if(j.test(dt))ae=!0;else if(/["'\/`]/.test(dt))for(;;--Re){if(Re==0)return;var $r=u.string.charAt(Re-1);if($r==dt&&u.string.charAt(Re-2)!="\\"){Re--;break}}else if(ae&&!N){++Re;break}}ae&&!N&&(m.fatArrowAt=Re)}}var O={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function k(u,m,W,Z,N,ae){this.indented=u,this.column=m,this.type=W,this.prev=N,this.info=ae,Z!=null&&(this.align=Z)}function p(u,m){if(!ee)return!1;for(var W=u.localVars;W;W=W.next)if(W.name==m)return!0;for(var Z=u.context;Z;Z=Z.prev)for(var W=Z.vars;W;W=W.next)if(W.name==m)return!0}function b(u,m,W,Z,N){var ae=u.cc;for(h.state=u,h.stream=N,h.marked=null,h.cc=ae,h.style=m,u.lexical.hasOwnProperty("align")||(u.lexical.align=!0);;){var Re=ae.length?ae.pop():w?$:ge;if(Re(W,Z)){for(;ae.length&&ae[ae.length-1].lex;)ae.pop()();return h.marked?h.marked:W=="variable"&&p(u,Z)?"variable-2":m}}}var h={state:null,column:null,marked:null,cc:null};function S(){for(var u=arguments.length-1;u>=0;u--)h.cc.push(arguments[u])}function d(){return S.apply(null,arguments),!0}function H(u,m){for(var W=m;W;W=W.next)if(W.name==u)return!0;return!1}function R(u){var m=h.state;if(h.marked="def",!!ee){if(m.context){if(m.lexical.info=="var"&&m.context&&m.context.block){var W=oe(u,m.context);if(W!=null){m.context=W;return}}else if(!H(u,m.localVars)){m.localVars=new Ye(u,m.localVars);return}}U.globalVars&&!H(u,m.globalVars)&&(m.globalVars=new Ye(u,m.globalVars))}}function oe(u,m){if(m)if(m.block){var W=oe(u,m.prev);return W?W==m.prev?m:new Ee(W,m.vars,!0):null}else return H(u,m.vars)?m:new Ee(m.prev,new Ye(u,m.vars),!1);else return null}function Oe(u){return u=="public"||u=="private"||u=="protected"||u=="abstract"||u=="readonly"}function Ee(u,m,W){this.prev=u,this.vars=m,this.block=W}function Ye(u,m){this.name=u,this.next=m}var Je=new Ye("this",new Ye("arguments",null));function $e(){h.state.context=new Ee(h.state.context,h.state.localVars,!1),h.state.localVars=Je}function Fe(){h.state.context=new Ee(h.state.context,h.state.localVars,!0),h.state.localVars=null}$e.lex=Fe.lex=!0;function Ae(){h.state.localVars=h.state.context.vars,h.state.context=h.state.context.prev}Ae.lex=!0;function me(u,m){var W=function(){var Z=h.state,N=Z.indented;if(Z.lexical.type=="stat")N=Z.lexical.indented;else for(var ae=Z.lexical;ae&&ae.type==")"&&ae.align;ae=ae.prev)N=ae.indented;Z.lexical=new k(N,h.stream.column(),u,null,Z.lexical,m)};return W.lex=!0,W}function ye(){var u=h.state;u.lexical.prev&&(u.lexical.type==")"&&(u.indented=u.lexical.indented),u.lexical=u.lexical.prev)}ye.lex=!0;function Y(u){function m(W){return W==u?d():u==";"||W=="}"||W==")"||W=="]"?S():d(m)}return m}function ge(u,m){return u=="var"?d(me("vardef",m),Pr,Y(";"),ye):u=="keyword a"?d(me("form"),We,ge,ye):u=="keyword b"?d(me("form"),ge,ye):u=="keyword d"?h.stream.match(/^\s*$/,!1)?d():d(me("stat"),De,Y(";"),ye):u=="debugger"?d(Y(";")):u=="{"?d(me("}"),Fe,we,ye,Ae):u==";"?d():u=="if"?(h.state.lexical.info=="else"&&h.state.cc[h.state.cc.length-1]==ye&&h.state.cc.pop()(),d(me("form"),We,ge,ye,Hr)):u=="function"?d(Vt):u=="for"?d(me("form"),Fe,Gn,ge,Ae,ye):u=="class"||P&&m=="interface"?(h.marked="keyword",d(me("form",u=="class"?u:m),Fr,ye)):u=="variable"?P&&m=="declare"?(h.marked="keyword",d(ge)):P&&(m=="module"||m=="enum"||m=="type")&&h.stream.match(/^\s*\w/,!1)?(h.marked="keyword",m=="enum"?d(ve):m=="type"?d(Qn,Y("operator"),Te,Y(";")):d(me("form"),Lt,Y("{"),me("}"),we,ye,ye)):P&&m=="namespace"?(h.marked="keyword",d(me("form"),$,ge,ye)):P&&m=="abstract"?(h.marked="keyword",d(ge)):d(me("stat"),je):u=="switch"?d(me("form"),We,Y("{"),me("}","switch"),Fe,we,ye,ye,Ae):u=="case"?d($,Y(":")):u=="default"?d(Y(":")):u=="catch"?d(me("form"),$e,I,ge,ye,Ae):u=="export"?d(me("stat"),qr,ye):u=="import"?d(me("stat"),gr,ye):u=="async"?d(ge):m=="@"?d($,ge):S(me("stat"),$,Y(";"),ye)}function I(u){if(u=="(")return d(Kt,Y(")"))}function $(u,m){return re(u,m,!1)}function Me(u,m){return re(u,m,!0)}function We(u){return u!="("?S():d(me(")"),De,Y(")"),ye)}function re(u,m,W){if(h.state.fatArrowAt==h.stream.start){var Z=W?He:J;if(u=="(")return d($e,me(")"),y(Kt,")"),ye,Y("=>"),Z,Ae);if(u=="variable")return S($e,Lt,Y("=>"),Z,Ae)}var N=W?qe:Ne;return O.hasOwnProperty(u)?d(N):u=="function"?d(Vt,N):u=="class"||P&&m=="interface"?(h.marked="keyword",d(me("form"),Oi,ye)):u=="keyword c"||u=="async"?d(W?Me:$):u=="("?d(me(")"),De,Y(")"),ye,N):u=="operator"||u=="spread"?d(W?Me:$):u=="["?d(me("]"),nt,ye,N):u=="{"?B(Qe,"}",null,N):u=="quasi"?S(v,N):u=="new"?d(T(W)):d()}function De(u){return u.match(/[;\}\)\],]/)?S():S($)}function Ne(u,m){return u==","?d(De):qe(u,m,!1)}function qe(u,m,W){var Z=W==!1?Ne:qe,N=W==!1?$:Me;if(u=="=>")return d($e,W?He:J,Ae);if(u=="operator")return/\+\+|--/.test(m)||P&&m=="!"?d(Z):P&&m=="<"&&h.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(me(">"),y(Te,">"),ye,Z):m=="?"?d($,Y(":"),N):d(N);if(u=="quasi")return S(v,Z);if(u!=";"){if(u=="(")return B(Me,")","call",Z);if(u==".")return d(Ke,Z);if(u=="[")return d(me("]"),De,Y("]"),ye,Z);if(P&&m=="as")return h.marked="keyword",d(Te,Z);if(u=="regexp")return h.state.lastType=h.marked="operator",h.stream.backUp(h.stream.pos-h.stream.start-1),d(N)}}function v(u,m){return u!="quasi"?S():m.slice(m.length-2)!="${"?d(v):d(De,x)}function x(u){if(u=="}")return h.marked="string-2",h.state.tokenize=Ce,d(v)}function J(u){return xe(h.stream,h.state),S(u=="{"?ge:$)}function He(u){return xe(h.stream,h.state),S(u=="{"?ge:Me)}function T(u){return function(m){return m=="."?d(u?z:G):m=="variable"&&P?d(Dt,u?qe:Ne):S(u?Me:$)}}function G(u,m){if(m=="target")return h.marked="keyword",d(Ne)}function z(u,m){if(m=="target")return h.marked="keyword",d(qe)}function je(u){return u==":"?d(ye,ge):S(Ne,Y(";"),ye)}function Ke(u){if(u=="variable")return h.marked="property",d()}function Qe(u,m){if(u=="async")return h.marked="property",d(Qe);if(u=="variable"||h.style=="keyword"){if(h.marked="property",m=="get"||m=="set")return d(bt);var W;return P&&h.state.fatArrowAt==h.stream.start&&(W=h.stream.match(/^\s*:\s*/,!1))&&(h.state.fatArrowAt=h.stream.pos+W[0].length),d(C)}else{if(u=="number"||u=="string")return h.marked=D?"property":h.style+" property",d(C);if(u=="jsonld-keyword")return d(C);if(P&&Oe(m))return h.marked="keyword",d(Qe);if(u=="[")return d($,et,Y("]"),C);if(u=="spread")return d(Me,C);if(m=="*")return h.marked="keyword",d(Qe);if(u==":")return S(C)}}function bt(u){return u!="variable"?S(C):(h.marked="property",d(Vt))}function C(u){if(u==":")return d(Me);if(u=="(")return S(Vt)}function y(u,m,W){function Z(N,ae){if(W?W.indexOf(N)>-1:N==","){var Re=h.state.lexical;return Re.info=="call"&&(Re.pos=(Re.pos||0)+1),d(function(dt,Tt){return dt==m||Tt==m?S():S(u)},Z)}return N==m||ae==m?d():W&&W.indexOf(";")>-1?S(u):d(Y(m))}return function(N,ae){return N==m||ae==m?d():S(u,Z)}}function B(u,m,W){for(var Z=3;Z<arguments.length;Z++)h.cc.push(arguments[Z]);return d(me(m,W),y(u,m),ye)}function we(u){return u=="}"?d():S(ge,we)}function et(u,m){if(P){if(u==":")return d(Te);if(m=="?")return d(et)}}function ut(u,m){if(P&&(u==":"||m=="in"))return d(Te)}function Ft(u){if(P&&u==":")return h.stream.match(/^\s*\w+\s+is\b/,!1)?d($,Wt,Te):d(Te)}function Wt(u,m){if(m=="is")return h.marked="keyword",d()}function Te(u,m){if(m=="keyof"||m=="typeof"||m=="infer"||m=="readonly")return h.marked="keyword",d(m=="typeof"?Me:Te);if(u=="variable"||m=="void")return h.marked="type",d(Bt);if(m=="|"||m=="&")return d(Te);if(u=="string"||u=="number"||u=="atom")return d(Bt);if(u=="[")return d(me("]"),y(Te,"]",","),ye,Bt);if(u=="{")return d(me("}"),Se,ye,Bt);if(u=="(")return d(y(rt,")"),yt,Bt);if(u=="<")return d(y(Te,">"),Te);if(u=="quasi")return S(xt,Bt)}function yt(u){if(u=="=>")return d(Te)}function Se(u){return u.match(/[\}\)\]]/)?d():u==","||u==";"?d(Se):S(or,Se)}function or(u,m){if(u=="variable"||h.style=="keyword")return h.marked="property",d(or);if(m=="?"||u=="number"||u=="string")return d(or);if(u==":")return d(Te);if(u=="[")return d(Y("variable"),ut,Y("]"),or);if(u=="(")return S(mr,or);if(!u.match(/[;\}\)\],]/))return d()}function xt(u,m){return u!="quasi"?S():m.slice(m.length-2)!="${"?d(xt):d(Te,tt)}function tt(u){if(u=="}")return h.marked="string-2",h.state.tokenize=Ce,d(xt)}function rt(u,m){return u=="variable"&&h.stream.match(/^\s*[?:]/,!1)||m=="?"?d(rt):u==":"?d(Te):u=="spread"?d(rt):S(Te)}function Bt(u,m){if(m=="<")return d(me(">"),y(Te,">"),ye,Bt);if(m=="|"||u=="."||m=="&")return d(Te);if(u=="[")return d(Te,Y("]"),Bt);if(m=="extends"||m=="implements")return h.marked="keyword",d(Te);if(m=="?")return d(Te,Y(":"),Te)}function Dt(u,m){if(m=="<")return d(me(">"),y(Te,">"),ye,Bt)}function $t(){return S(Te,wt)}function wt(u,m){if(m=="=")return d(Te)}function Pr(u,m){return m=="enum"?(h.marked="keyword",d(ve)):S(Lt,et,Ut,Ti)}function Lt(u,m){if(P&&Oe(m))return h.marked="keyword",d(Lt);if(u=="variable")return R(m),d();if(u=="spread")return d(Lt);if(u=="[")return B(gn,"]");if(u=="{")return B(fr,"}")}function fr(u,m){return u=="variable"&&!h.stream.match(/^\s*:/,!1)?(R(m),d(Ut)):(u=="variable"&&(h.marked="property"),u=="spread"?d(Lt):u=="}"?S():u=="["?d($,Y("]"),Y(":"),fr):d(Y(":"),Lt,Ut))}function gn(){return S(Lt,Ut)}function Ut(u,m){if(m=="=")return d(Me)}function Ti(u){if(u==",")return d(Pr)}function Hr(u,m){if(u=="keyword b"&&m=="else")return d(me("form","else"),ge,ye)}function Gn(u,m){if(m=="await")return d(Gn);if(u=="(")return d(me(")"),vn,ye)}function vn(u){return u=="var"?d(Pr,hr):u=="variable"?d(hr):S(hr)}function hr(u,m){return u==")"?d():u==";"?d(hr):m=="in"||m=="of"?(h.marked="keyword",d($,hr)):S($,hr)}function Vt(u,m){if(m=="*")return h.marked="keyword",d(Vt);if(u=="variable")return R(m),d(Vt);if(u=="(")return d($e,me(")"),y(Kt,")"),ye,Ft,ge,Ae);if(P&&m=="<")return d(me(">"),y($t,">"),ye,Vt)}function mr(u,m){if(m=="*")return h.marked="keyword",d(mr);if(u=="variable")return R(m),d(mr);if(u=="(")return d($e,me(")"),y(Kt,")"),ye,Ft,Ae);if(P&&m=="<")return d(me(">"),y($t,">"),ye,mr)}function Qn(u,m){if(u=="keyword"||u=="variable")return h.marked="type",d(Qn);if(m=="<")return d(me(">"),y($t,">"),ye)}function Kt(u,m){return m=="@"&&d($,Kt),u=="spread"?d(Kt):P&&Oe(m)?(h.marked="keyword",d(Kt)):P&&u=="this"?d(et,Ut):S(Lt,et,Ut)}function Oi(u,m){return u=="variable"?Fr(u,m):Gt(u,m)}function Fr(u,m){if(u=="variable")return R(m),d(Gt)}function Gt(u,m){if(m=="<")return d(me(">"),y($t,">"),ye,Gt);if(m=="extends"||m=="implements"||P&&u==",")return m=="implements"&&(h.marked="keyword"),d(P?Te:$,Gt);if(u=="{")return d(me("}"),Qt,ye)}function Qt(u,m){if(u=="async"||u=="variable"&&(m=="static"||m=="get"||m=="set"||P&&Oe(m))&&h.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return h.marked="keyword",d(Qt);if(u=="variable"||h.style=="keyword")return h.marked="property",d(Ir,Qt);if(u=="number"||u=="string")return d(Ir,Qt);if(u=="[")return d($,et,Y("]"),Ir,Qt);if(m=="*")return h.marked="keyword",d(Qt);if(P&&u=="(")return S(mr,Qt);if(u==";"||u==",")return d(Qt);if(u=="}")return d();if(m=="@")return d($,Qt)}function Ir(u,m){if(m=="!"||m=="?")return d(Ir);if(u==":")return d(Te,Ut);if(m=="=")return d(Me);var W=h.state.lexical.prev,Z=W&&W.info=="interface";return S(Z?mr:Vt)}function qr(u,m){return m=="*"?(h.marked="keyword",d(Vr,Y(";"))):m=="default"?(h.marked="keyword",d($,Y(";"))):u=="{"?d(y(Rr,"}"),Vr,Y(";")):S(ge)}function Rr(u,m){if(m=="as")return h.marked="keyword",d(Y("variable"));if(u=="variable")return S(Me,Rr)}function gr(u){return u=="string"?d():u=="("?S($):u=="."?S(Ne):S(Br,er,Vr)}function Br(u,m){return u=="{"?B(Br,"}"):(u=="variable"&&R(m),m=="*"&&(h.marked="keyword"),d(bn))}function er(u){if(u==",")return d(Br,er)}function bn(u,m){if(m=="as")return h.marked="keyword",d(Br)}function Vr(u,m){if(m=="from")return h.marked="keyword",d($)}function nt(u){return u=="]"?d():S(y(Me,"]"))}function ve(){return S(me("form"),Lt,Y("{"),me("}"),y(ar,"}"),ye,ye)}function ar(){return S(Lt,Ut)}function yn(u,m){return u.lastType=="operator"||u.lastType==","||Q.test(m.charAt(0))||/[,.]/.test(m.charAt(0))}function It(u,m,W){return m.tokenize==ce&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(m.lastType)||m.lastType=="quasi"&&/\{\s*$/.test(u.string.slice(0,u.pos-(W||0)))}return{startState:function(u){var m={tokenize:ce,lastType:"sof",cc:[],lexical:new k((u||0)-fe,0,"block",!1),localVars:U.localVars,context:U.localVars&&new Ee(null,null,!1),indented:u||0};return U.globalVars&&typeof U.globalVars=="object"&&(m.globalVars=U.globalVars),m},token:function(u,m){if(u.sol()&&(m.lexical.hasOwnProperty("align")||(m.lexical.align=!1),m.indented=u.indentation(),xe(u,m)),m.tokenize!=te&&u.eatSpace())return null;var W=m.tokenize(u,m);return be=="comment"?W:(m.lastType=be=="operator"&&(pe=="++"||pe=="--")?"incdec":be,b(m,W,be,pe,u))},indent:function(u,m){if(u.tokenize==te||u.tokenize==Ce)return L.Pass;if(u.tokenize!=ce)return 0;var W=m&&m.charAt(0),Z=u.lexical,N;if(!/^\s*else\b/.test(m))for(var ae=u.cc.length-1;ae>=0;--ae){var Re=u.cc[ae];if(Re==ye)Z=Z.prev;else if(Re!=Hr&&Re!=Ae)break}for(;(Z.type=="stat"||Z.type=="form")&&(W=="}"||(N=u.cc[u.cc.length-1])&&(N==Ne||N==qe)&&!/^[,\.=+\-*:?[\(]/.test(m));)Z=Z.prev;F&&Z.type==")"&&Z.prev.type=="stat"&&(Z=Z.prev);var dt=Z.type,Tt=W==dt;return dt=="vardef"?Z.indented+(u.lastType=="operator"||u.lastType==","?Z.info.length+1:0):dt=="form"&&W=="{"?Z.indented:dt=="form"?Z.indented+fe:dt=="stat"?Z.indented+(yn(u,m)?F||fe:0):Z.info=="switch"&&!Tt&&U.doubleIndentSwitch!=!1?Z.indented+(/^(?:case|default)\b/.test(m)?fe:2*fe):Z.align?Z.column+(Tt?0:1):Z.indented+(Tt?0:fe)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",blockCommentContinue:w?null:" * ",lineComment:w?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:w?"json":"javascript",jsonldMode:D,jsonMode:w,expressionAllowed:It,skipExpression:function(u){b(u,"atom","atom","true",new L.StringStream("",2,null))}}}),L.registerHelper("wordChars","javascript",/[\w$]/),L.defineMIME("text/javascript","javascript"),L.defineMIME("text/ecmascript","javascript"),L.defineMIME("application/javascript","javascript"),L.defineMIME("application/x-javascript","javascript"),L.defineMIME("application/ecmascript","javascript"),L.defineMIME("application/json",{name:"javascript",json:!0}),L.defineMIME("application/x-json",{name:"javascript",json:!0}),L.defineMIME("application/manifest+json",{name:"javascript",json:!0}),L.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),L.defineMIME("text/typescript",{name:"javascript",typescript:!0}),L.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var fn=Li.exports,hn={exports:{}};(function(Ie,ot){(function(L){L(Ve())})(function(L){L.defineMode("css",function(k,p){var b=p.inline;p.propertyKeywords||(p=L.resolveMode("text/css"));var h=k.indentUnit,S=p.tokenHooks,d=p.documentTypes||{},H=p.mediaTypes||{},R=p.mediaFeatures||{},oe=p.mediaValueKeywords||{},Oe=p.propertyKeywords||{},Ee=p.nonStandardPropertyKeywords||{},Ye=p.fontProperties||{},Je=p.counterDescriptors||{},$e=p.colorKeywords||{},Fe=p.valueKeywords||{},Ae=p.allowNested,me=p.lineComment,ye=p.supportsAtComponent===!0,Y=k.highlightNonStandardPropertyKeywords!==!1,ge,I;function $(T,G){return ge=G,T}function Me(T,G){var z=T.next();if(S[z]){var je=S[z](T,G);if(je!==!1)return je}if(z=="@")return T.eatWhile(/[\w\\\-]/),$("def",T.current());if(z=="="||(z=="~"||z=="|")&&T.eat("="))return $(null,"compare");if(z=='"'||z=="'")return G.tokenize=We(z),G.tokenize(T,G);if(z=="#")return T.eatWhile(/[\w\\\-]/),$("atom","hash");if(z=="!")return T.match(/^\s*\w*/),$("keyword","important");if(/\d/.test(z)||z=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),$("number","unit");if(z==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),$("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?$("variable-2","variable-definition"):$("variable-2","variable");if(T.match(/^\w+-/))return $("meta","meta")}else return/[,+>*\/]/.test(z)?$(null,"select-op"):z=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?$("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(z)?$(null,z):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(G.tokenize=re),$("variable callee","variable")):/[\w\\\-]/.test(z)?(T.eatWhile(/[\w\\\-]/),$("property","word")):$(null,null)}function We(T){return function(G,z){for(var je=!1,Ke;(Ke=G.next())!=null;){if(Ke==T&&!je){T==")"&&G.backUp(1);break}je=!je&&Ke=="\\"}return(Ke==T||!je&&T!=")")&&(z.tokenize=null),$("string","string")}}function re(T,G){return T.next(),T.match(/^\s*[\"\')]/,!1)?G.tokenize=null:G.tokenize=We(")"),$(null,"(")}function De(T,G,z){this.type=T,this.indent=G,this.prev=z}function Ne(T,G,z,je){return T.context=new De(z,G.indentation()+(je===!1?0:h),T.context),z}function qe(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function v(T,G,z){return He[z.context.type](T,G,z)}function x(T,G,z,je){for(var Ke=je||1;Ke>0;Ke--)z.context=z.context.prev;return v(T,G,z)}function J(T){var G=T.current().toLowerCase();Fe.hasOwnProperty(G)?I="atom":$e.hasOwnProperty(G)?I="keyword":I="variable"}var He={};return He.top=function(T,G,z){if(T=="{")return Ne(z,G,"block");if(T=="}"&&z.context.prev)return qe(z);if(ye&&/@component/i.test(T))return Ne(z,G,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return Ne(z,G,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return Ne(z,G,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return z.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return Ne(z,G,"at");if(T=="hash")I="builtin";else if(T=="word")I="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return Ne(z,G,"interpolation");if(T==":")return"pseudo";if(Ae&&T=="(")return Ne(z,G,"parens")}return z.context.type},He.block=function(T,G,z){if(T=="word"){var je=G.current().toLowerCase();return Oe.hasOwnProperty(je)?(I="property","maybeprop"):Ee.hasOwnProperty(je)?(I=Y?"string-2":"property","maybeprop"):Ae?(I=G.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(I+=" error","maybeprop")}else return T=="meta"?"block":!Ae&&(T=="hash"||T=="qualifier")?(I="error","block"):He.top(T,G,z)},He.maybeprop=function(T,G,z){return T==":"?Ne(z,G,"prop"):v(T,G,z)},He.prop=function(T,G,z){if(T==";")return qe(z);if(T=="{"&&Ae)return Ne(z,G,"propBlock");if(T=="}"||T=="{")return x(T,G,z);if(T=="(")return Ne(z,G,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(G.current()))I+=" error";else if(T=="word")J(G);else if(T=="interpolation")return Ne(z,G,"interpolation");return"prop"},He.propBlock=function(T,G,z){return T=="}"?qe(z):T=="word"?(I="property","maybeprop"):z.context.type},He.parens=function(T,G,z){return T=="{"||T=="}"?x(T,G,z):T==")"?qe(z):T=="("?Ne(z,G,"parens"):T=="interpolation"?Ne(z,G,"interpolation"):(T=="word"&&J(G),"parens")},He.pseudo=function(T,G,z){return T=="meta"?"pseudo":T=="word"?(I="variable-3",z.context.type):v(T,G,z)},He.documentTypes=function(T,G,z){return T=="word"&&d.hasOwnProperty(G.current())?(I="tag",z.context.type):He.atBlock(T,G,z)},He.atBlock=function(T,G,z){if(T=="(")return Ne(z,G,"atBlock_parens");if(T=="}"||T==";")return x(T,G,z);if(T=="{")return qe(z)&&Ne(z,G,Ae?"block":"top");if(T=="interpolation")return Ne(z,G,"interpolation");if(T=="word"){var je=G.current().toLowerCase();je=="only"||je=="not"||je=="and"||je=="or"?I="keyword":H.hasOwnProperty(je)?I="attribute":R.hasOwnProperty(je)?I="property":oe.hasOwnProperty(je)?I="keyword":Oe.hasOwnProperty(je)?I="property":Ee.hasOwnProperty(je)?I=Y?"string-2":"property":Fe.hasOwnProperty(je)?I="atom":$e.hasOwnProperty(je)?I="keyword":I="error"}return z.context.type},He.atComponentBlock=function(T,G,z){return T=="}"?x(T,G,z):T=="{"?qe(z)&&Ne(z,G,Ae?"block":"top",!1):(T=="word"&&(I="error"),z.context.type)},He.atBlock_parens=function(T,G,z){return T==")"?qe(z):T=="{"||T=="}"?x(T,G,z,2):He.atBlock(T,G,z)},He.restricted_atBlock_before=function(T,G,z){return T=="{"?Ne(z,G,"restricted_atBlock"):T=="word"&&z.stateArg=="@counter-style"?(I="variable","restricted_atBlock_before"):v(T,G,z)},He.restricted_atBlock=function(T,G,z){return T=="}"?(z.stateArg=null,qe(z)):T=="word"?(z.stateArg=="@font-face"&&!Ye.hasOwnProperty(G.current().toLowerCase())||z.stateArg=="@counter-style"&&!Je.hasOwnProperty(G.current().toLowerCase())?I="error":I="property","maybeprop"):"restricted_atBlock"},He.keyframes=function(T,G,z){return T=="word"?(I="variable","keyframes"):T=="{"?Ne(z,G,"top"):v(T,G,z)},He.at=function(T,G,z){return T==";"?qe(z):T=="{"||T=="}"?x(T,G,z):(T=="word"?I="tag":T=="hash"&&(I="builtin"),"at")},He.interpolation=function(T,G,z){return T=="}"?qe(z):T=="{"||T==";"?x(T,G,z):(T=="word"?I="variable":T!="variable"&&T!="("&&T!=")"&&(I="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:b?"block":"top",stateArg:null,context:new De(b?"block":"top",T||0,null)}},token:function(T,G){if(!G.tokenize&&T.eatSpace())return null;var z=(G.tokenize||Me)(T,G);return z&&typeof z=="object"&&(ge=z[1],z=z[0]),I=z,ge!="comment"&&(G.state=He[G.state](ge,T,G)),I},indent:function(T,G){var z=T.context,je=G&&G.charAt(0),Ke=z.indent;return z.type=="prop"&&(je=="}"||je==")")&&(z=z.prev),z.prev&&(je=="}"&&(z.type=="block"||z.type=="top"||z.type=="interpolation"||z.type=="restricted_atBlock")?(z=z.prev,Ke=z.indent):(je==")"&&(z.type=="parens"||z.type=="atBlock_parens")||je=="{"&&(z.type=="at"||z.type=="atBlock"))&&(Ke=Math.max(0,z.indent-h))),Ke},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:me,fold:"brace"}});function le(k){for(var p={},b=0;b<k.length;++b)p[k[b].toLowerCase()]=!0;return p}var U=["domain","regexp","url","url-prefix"],fe=le(U),F=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],D=le(F),w=["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"],ee=le(w),P=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],j=le(P),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=le(E),q=["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"],K=le(q),be=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],pe=le(be),se=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],ce=le(se),ue=["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"],te=le(ue),Ce=["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"],Le=le(Ce),xe=U.concat(F).concat(w).concat(P).concat(E).concat(q).concat(ue).concat(Ce);L.registerHelper("hintWords","css",xe);function O(k,p){for(var b=!1,h;(h=k.next())!=null;){if(b&&h=="/"){p.tokenize=null;break}b=h=="*"}return["comment","comment"]}L.defineMIME("text/css",{documentTypes:fe,mediaTypes:D,mediaFeatures:ee,mediaValueKeywords:j,propertyKeywords:Q,nonStandardPropertyKeywords:K,fontProperties:pe,counterDescriptors:ce,colorKeywords:te,valueKeywords:Le,tokenHooks:{"/":function(k,p){return k.eat("*")?(p.tokenize=O,O(k,p)):!1}},name:"css"}),L.defineMIME("text/x-scss",{mediaTypes:D,mediaFeatures:ee,mediaValueKeywords:j,propertyKeywords:Q,nonStandardPropertyKeywords:K,colorKeywords:te,valueKeywords:Le,fontProperties:pe,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(k,p){return k.eat("/")?(k.skipToEnd(),["comment","comment"]):k.eat("*")?(p.tokenize=O,O(k,p)):["operator","operator"]},":":function(k){return k.match(/^\s*\{/,!1)?[null,null]:!1},$:function(k){return k.match(/^[\w-]+/),k.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(k){return k.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),L.defineMIME("text/x-less",{mediaTypes:D,mediaFeatures:ee,mediaValueKeywords:j,propertyKeywords:Q,nonStandardPropertyKeywords:K,colorKeywords:te,valueKeywords:Le,fontProperties:pe,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(k,p){return k.eat("/")?(k.skipToEnd(),["comment","comment"]):k.eat("*")?(p.tokenize=O,O(k,p)):["operator","operator"]},"@":function(k){return k.eat("{")?[null,"interpolation"]:k.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(k.eatWhile(/[\w\\\-]/),k.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),L.defineMIME("text/x-gss",{documentTypes:fe,mediaTypes:D,mediaFeatures:ee,propertyKeywords:Q,nonStandardPropertyKeywords:K,fontProperties:pe,counterDescriptors:ce,colorKeywords:te,valueKeywords:Le,supportsAtComponent:!0,tokenHooks:{"/":function(k,p){return k.eat("*")?(p.tokenize=O,O(k,p)):!1}},name:"css",helperType:"gss"})})})();var Rt=hn.exports,mn={exports:{}},Ql={exports:{}},Mo;function Lo(){return Mo||(Mo=1,function(Ie,ot){(function(L){L(Ve())})(function(L){var le={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},U={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(fe,F){var D=fe.indentUnit,w={},ee=F.htmlMode?le:U;for(var P in ee)w[P]=ee[P];for(var P in F)w[P]=F[P];var j,E;function Q(d,H){function R(Ee){return H.tokenize=Ee,Ee(d,H)}var oe=d.next();if(oe=="<")return d.eat("!")?d.eat("[")?d.match("CDATA[")?R(be("atom","]]>")):null:d.match("--")?R(be("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),R(pe(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),H.tokenize=be("meta","?>"),"meta"):(j=d.eat("/")?"closeTag":"openTag",H.tokenize=q,"tag bracket");if(oe=="&"){var Oe;return d.eat("#")?d.eat("x")?Oe=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):Oe=d.eatWhile(/[\d]/)&&d.eat(";"):Oe=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),Oe?"atom":"error"}else return d.eatWhile(/[^&<]/),null}Q.isInText=!0;function q(d,H){var R=d.next();if(R==">"||R=="/"&&d.eat(">"))return H.tokenize=Q,j=R==">"?"endTag":"selfcloseTag","tag bracket";if(R=="=")return j="equals",null;if(R=="<"){H.tokenize=Q,H.state=Ce,H.tagName=H.tagStart=null;var oe=H.tokenize(d,H);return oe?oe+" tag error":"tag error"}else return/[\'\"]/.test(R)?(H.tokenize=K(R),H.stringStartCol=d.column(),H.tokenize(d,H)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function K(d){var H=function(R,oe){for(;!R.eol();)if(R.next()==d){oe.tokenize=q;break}return"string"};return H.isInAttribute=!0,H}function be(d,H){return function(R,oe){for(;!R.eol();){if(R.match(H)){oe.tokenize=Q;break}R.next()}return d}}function pe(d){return function(H,R){for(var oe;(oe=H.next())!=null;){if(oe=="<")return R.tokenize=pe(d+1),R.tokenize(H,R);if(oe==">")if(d==1){R.tokenize=Q;break}else return R.tokenize=pe(d-1),R.tokenize(H,R)}return"meta"}}function se(d){return d&&d.toLowerCase()}function ce(d,H,R){this.prev=d.context,this.tagName=H||"",this.indent=d.indented,this.startOfLine=R,(w.doNotIndent.hasOwnProperty(H)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function ue(d){d.context&&(d.context=d.context.prev)}function te(d,H){for(var R;;){if(!d.context||(R=d.context.tagName,!w.contextGrabbers.hasOwnProperty(se(R))||!w.contextGrabbers[se(R)].hasOwnProperty(se(H))))return;ue(d)}}function Ce(d,H,R){return d=="openTag"?(R.tagStart=H.column(),Le):d=="closeTag"?xe:Ce}function Le(d,H,R){return d=="word"?(R.tagName=H.current(),E="tag",p):w.allowMissingTagName&&d=="endTag"?(E="tag bracket",p(d,H,R)):(E="error",Le)}function xe(d,H,R){if(d=="word"){var oe=H.current();return R.context&&R.context.tagName!=oe&&w.implicitlyClosed.hasOwnProperty(se(R.context.tagName))&&ue(R),R.context&&R.context.tagName==oe||w.matchClosing===!1?(E="tag",O):(E="tag error",k)}else return w.allowMissingTagName&&d=="endTag"?(E="tag bracket",O(d,H,R)):(E="error",k)}function O(d,H,R){return d!="endTag"?(E="error",O):(ue(R),Ce)}function k(d,H,R){return E="error",O(d,H,R)}function p(d,H,R){if(d=="word")return E="attribute",b;if(d=="endTag"||d=="selfcloseTag"){var oe=R.tagName,Oe=R.tagStart;return R.tagName=R.tagStart=null,d=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(se(oe))?te(R,oe):(te(R,oe),R.context=new ce(R,oe,Oe==R.indented)),Ce}return E="error",p}function b(d,H,R){return d=="equals"?h:(w.allowMissing||(E="error"),p(d,H,R))}function h(d,H,R){return d=="string"?S:d=="word"&&w.allowUnquoted?(E="string",p):(E="error",p(d,H,R))}function S(d,H,R){return d=="string"?S:p(d,H,R)}return{startState:function(d){var H={tokenize:Q,state:Ce,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(H.baseIndent=d),H},token:function(d,H){if(!H.tagName&&d.sol()&&(H.indented=d.indentation()),d.eatSpace())return null;j=null;var R=H.tokenize(d,H);return(R||j)&&R!="comment"&&(E=null,H.state=H.state(j||R,d,H),E&&(R=E=="error"?R+" error":E)),R},indent:function(d,H,R){var oe=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+D;if(oe&&oe.noIndent)return L.Pass;if(d.tokenize!=q&&d.tokenize!=Q)return R?R.match(/^(\s*)/)[0].length:0;if(d.tagName)return w.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+D*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(H))return 0;var Oe=H&&/^<(\/)?([\w_:\.-]*)/.exec(H);if(Oe&&Oe[1])for(;oe;)if(oe.tagName==Oe[2]){oe=oe.prev;break}else if(w.implicitlyClosed.hasOwnProperty(se(oe.tagName)))oe=oe.prev;else break;else if(Oe)for(;oe;){var Ee=w.contextGrabbers[se(oe.tagName)];if(Ee&&Ee.hasOwnProperty(se(Oe[2])))oe=oe.prev;else break}for(;oe&&oe.prev&&!oe.startOfLine;)oe=oe.prev;return oe?oe.indent+D:d.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(d){d.state==h&&(d.state=p)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var H=[],R=d.context;R;R=R.prev)H.push(R.tagName);return H.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),Ql.exports}(function(Ie,ot){(function(L){L(Ve(),Lo(),fn,Rt)})(function(L){var le={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 U(j,E,Q){var q=j.current(),K=q.search(E);return K>-1?j.backUp(q.length-K):q.match(/<\/?$/)&&(j.backUp(q.length),j.match(E,!1)||j.match(q)),Q}var fe={};function F(j){var E=fe[j];return E||(fe[j]=new RegExp("\\s+"+j+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function D(j,E){var Q=j.match(F(E));return Q?/^\s*(.*?)\s*$/.exec(Q[2])[1]:""}function w(j,E){return new RegExp((E?"^":"")+"</\\s*"+j+"\\s*>","i")}function ee(j,E){for(var Q in j)for(var q=E[Q]||(E[Q]=[]),K=j[Q],be=K.length-1;be>=0;be--)q.unshift(K[be])}function P(j,E){for(var Q=0;Q<j.length;Q++){var q=j[Q];if(!q[0]||q[1].test(D(E,q[0])))return q[2]}}L.defineMode("htmlmixed",function(j,E){var Q=L.getMode(j,{name:"xml",htmlMode:!0,multilineTagIndentFactor:E.multilineTagIndentFactor,multilineTagIndentPastTag:E.multilineTagIndentPastTag,allowMissingTagName:E.allowMissingTagName}),q={},K=E&&E.tags,be=E&&E.scriptTypes;if(ee(le,q),K&&ee(K,q),be)for(var pe=be.length-1;pe>=0;pe--)q.script.unshift(["type",be[pe].matches,be[pe].mode]);function se(ce,ue){var te=Q.token(ce,ue.htmlState),Ce=/\btag\b/.test(te),Le;if(Ce&&!/[<>\s\/]/.test(ce.current())&&(Le=ue.htmlState.tagName&&ue.htmlState.tagName.toLowerCase())&&q.hasOwnProperty(Le))ue.inTag=Le+" ";else if(ue.inTag&&Ce&&/>$/.test(ce.current())){var xe=/^([\S]+) (.*)/.exec(ue.inTag);ue.inTag=null;var O=ce.current()==">"&&P(q[xe[1]],xe[2]),k=L.getMode(j,O),p=w(xe[1],!0),b=w(xe[1],!1);ue.token=function(h,S){return h.match(p,!1)?(S.token=se,S.localState=S.localMode=null,null):U(h,b,S.localMode.token(h,S.localState))},ue.localMode=k,ue.localState=L.startState(k,Q.indent(ue.htmlState,"",""))}else ue.inTag&&(ue.inTag+=ce.current(),ce.eol()&&(ue.inTag+=" "));return te}return{startState:function(){var ce=L.startState(Q);return{token:se,inTag:null,localMode:null,localState:null,htmlState:ce}},copyState:function(ce){var ue;return ce.localState&&(ue=L.copyState(ce.localMode,ce.localState)),{token:ce.token,inTag:ce.inTag,localMode:ce.localMode,localState:ue,htmlState:L.copyState(Q,ce.htmlState)}},token:function(ce,ue){return ue.token(ce,ue)},indent:function(ce,ue,te){return!ce.localMode||/^\s*<\//.test(ue)?Q.indent(ce.htmlState,ue,te):ce.localMode.indent?ce.localMode.indent(ce.localState,ue,te):L.Pass},innerMode:function(ce){return{state:ce.localState||ce.htmlState,mode:ce.localMode||Q}}}},"xml","javascript","css"),L.defineMIME("text/html","htmlmixed")})})();var Yl=mn.exports;(function(Ie,ot){(function(L){L(Ve())})(function(L){L.defineMode("sql",function(P,j){var E=j.client||{},Q=j.atoms||{false:!0,true:!0,null:!0},q=j.builtin||w(ee),K=j.keywords||w(D),be=j.operatorChars||/^[*+\-%<>!=&|~^\/]/,pe=j.support||{},se=j.hooks||{},ce=j.dateSQL||{date:!0,time:!0,timestamp:!0},ue=j.backslashStringEscapes!==!1,te=j.brackets||/^[\{}\(\)\[\]]/,Ce=j.punctuation||/^[;.,:]/;function Le(b,h){var S=b.next();if(se[S]){var d=se[S](b,h);if(d!==!1)return d}if(pe.hexNumber&&(S=="0"&&b.match(/^[xX][0-9a-fA-F]+/)||(S=="x"||S=="X")&&b.match(/^'[0-9a-fA-F]*'/))||pe.binaryNumber&&((S=="b"||S=="B")&&b.match(/^'[01]*'/)||S=="0"&&b.match(/^b[01]+/)))return"number";if(S.charCodeAt(0)>47&&S.charCodeAt(0)<58)return b.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),pe.decimallessFloat&&b.match(/^\.(?!\.)/),"number";if(S=="?"&&(b.eatSpace()||b.eol()||b.eat(";")))return"variable-3";if(S=="'"||S=='"'&&pe.doubleQuote)return h.tokenize=xe(S),h.tokenize(b,h);if((pe.nCharCast&&(S=="n"||S=="N")||pe.charsetCast&&S=="_"&&b.match(/[a-z][a-z0-9]*/i))&&(b.peek()=="'"||b.peek()=='"'))return"keyword";if(pe.escapeConstant&&(S=="e"||S=="E")&&(b.peek()=="'"||b.peek()=='"'&&pe.doubleQuote))return h.tokenize=function(R,oe){return(oe.tokenize=xe(R.next(),!0))(R,oe)},"keyword";if(pe.commentSlashSlash&&S=="/"&&b.eat("/")||pe.commentHash&&S=="#"||S=="-"&&b.eat("-")&&(!pe.commentSpaceRequired||b.eat(" ")))return b.skipToEnd(),"comment";if(S=="/"&&b.eat("*"))return h.tokenize=O(1),h.tokenize(b,h);if(S=="."){if(pe.zerolessFloat&&b.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(b.match(/^\.+/))return null;if(b.match(/^[\w\d_$#]+/))return"variable-2"}else{if(be.test(S))return b.eatWhile(be),"operator";if(te.test(S))return"bracket";if(Ce.test(S))return b.eatWhile(Ce),"punctuation";if(S=="{"&&(b.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||b.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";b.eatWhile(/^[_\w\d]/);var H=b.current().toLowerCase();return ce.hasOwnProperty(H)&&(b.match(/^( )+'[^']*'/)||b.match(/^( )+"[^"]*"/))?"number":Q.hasOwnProperty(H)?"atom":q.hasOwnProperty(H)?"type":K.hasOwnProperty(H)?"keyword":E.hasOwnProperty(H)?"builtin":null}}function xe(b,h){return function(S,d){for(var H=!1,R;(R=S.next())!=null;){if(R==b&&!H){d.tokenize=Le;break}H=(ue||h)&&!H&&R=="\\"}return"string"}}function O(b){return function(h,S){var d=h.match(/^.*?(\/\*|\*\/)/);return d?d[1]=="/*"?S.tokenize=O(b+1):b>1?S.tokenize=O(b-1):S.tokenize=Le:h.skipToEnd(),"comment"}}function k(b,h,S){h.context={prev:h.context,indent:b.indentation(),col:b.column(),type:S}}function p(b){b.indent=b.context.indent,b.context=b.context.prev}return{startState:function(){return{tokenize:Le,context:null}},token:function(b,h){if(b.sol()&&h.context&&h.context.align==null&&(h.context.align=!1),h.tokenize==Le&&b.eatSpace())return null;var S=h.tokenize(b,h);if(S=="comment")return S;h.context&&h.context.align==null&&(h.context.align=!0);var d=b.current();return d=="("?k(b,h,")"):d=="["?k(b,h,"]"):h.context&&h.context.type==d&&p(h),S},indent:function(b,h){var S=b.context;if(!S)return L.Pass;var d=h.charAt(0)==S.type;return S.align?S.col+(d?0:1):S.indent+(d?0:P.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:pe.commentSlashSlash?"//":pe.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:j}});function le(P){for(var j;(j=P.next())!=null;)if(j=="`"&&!P.eat("`"))return"variable-2";return P.backUp(P.current().length-1),P.eatWhile(/\w/)?"variable-2":null}function U(P){for(var j;(j=P.next())!=null;)if(j=='"'&&!P.eat('"'))return"variable-2";return P.backUp(P.current().length-1),P.eatWhile(/\w/)?"variable-2":null}function fe(P){return P.eat("@")&&(P.match("session."),P.match("local."),P.match("global.")),P.eat("'")?(P.match(/^.*'/),"variable-2"):P.eat('"')?(P.match(/^.*"/),"variable-2"):P.eat("`")?(P.match(/^.*`/),"variable-2"):P.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function F(P){return P.eat("N")?"atom":P.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var D="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 w(P){for(var j={},E=P.split(" "),Q=0;Q<E.length;++Q)j[E[Q]]=!0;return j}var ee="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";L.defineMIME("text/x-sql",{name:"sql",keywords:w(D+"begin"),builtin:w(ee),atoms:w("false true null unknown"),dateSQL:w("date time timestamp"),support:w("doubleQuote binaryNumber hexNumber")}),L.defineMIME("text/x-mssql",{name:"sql",client:w("$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:w(D+"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:w("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:w("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:w("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":fe}}),L.defineMIME("text/x-mysql",{name:"sql",client:w("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:w(D+"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:w("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:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:w("date time timestamp"),support:w("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":fe,"`":le,"\\":F}}),L.defineMIME("text/x-mariadb",{name:"sql",client:w("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:w(D+"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:w("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:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:w("date time timestamp"),support:w("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":fe,"`":le,"\\":F}}),L.defineMIME("text/x-sqlite",{name:"sql",client:w("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:w(D+"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:w("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:w("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:w("date time timestamp datetime"),support:w("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":fe,":":fe,"?":fe,$:fe,'"':U,"`":le}}),L.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:w("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:w("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:w("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:w("commentSlashSlash decimallessFloat"),hooks:{}}),L.defineMIME("text/x-plsql",{name:"sql",client:w("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:w("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:w("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:w("date time timestamp"),support:w("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),L.defineMIME("text/x-hive",{name:"sql",keywords:w("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:w("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:w("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:w("date timestamp"),support:w("doubleQuote binaryNumber hexNumber")}),L.defineMIME("text/x-pgsql",{name:"sql",client:w("source"),keywords:w(D+"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:w("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:w("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:w("date time timestamp"),support:w("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),L.defineMIME("text/x-gql",{name:"sql",keywords:w("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:w("false true"),builtin:w("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),L.defineMIME("text/x-gpsql",{name:"sql",client:w("source"),keywords:w("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:w("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:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:w("date time timestamp"),support:w("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),L.defineMIME("text/x-sparksql",{name:"sql",keywords:w("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:w("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:w("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:w("date time timestamp"),support:w("doubleQuote zerolessFloat")}),L.defineMIME("text/x-esper",{name:"sql",client:w("source"),keywords:w("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:w("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:w("time"),support:w("decimallessFloat zerolessFloat binaryNumber hexNumber")}),L.defineMIME("text/x-trino",{name:"sql",keywords:w("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:w("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:w("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:w("date time timestamp zone"),support:w("decimallessFloat zerolessFloat hexNumber")})})})();var Zl={exports:{}},To;function Xl(){return To||(To=1,function(Ie,ot){(function(L){L(Ve())})(function(L){L.overlayMode=function(le,U,fe){return{startState:function(){return{base:L.startState(le),overlay:L.startState(U),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(F){return{base:L.copyState(le,F.base),overlay:L.copyState(U,F.overlay),basePos:F.basePos,baseCur:null,overlayPos:F.overlayPos,overlayCur:null}},token:function(F,D){return(F!=D.streamSeen||Math.min(D.basePos,D.overlayPos)<F.start)&&(D.streamSeen=F,D.basePos=D.overlayPos=F.start),F.start==D.basePos&&(D.baseCur=le.token(F,D.base),D.basePos=F.pos),F.start==D.overlayPos&&(F.pos=F.start,D.overlayCur=U.token(F,D.overlay),D.overlayPos=F.pos),F.pos=Math.min(D.basePos,D.overlayPos),D.overlayCur==null?D.baseCur:D.baseCur!=null&&D.overlay.combineTokens||fe&&D.overlay.combineTokens==null?D.baseCur+" "+D.overlayCur:D.overlayCur},indent:le.indent&&function(F,D,w){return le.indent(F.base,D,w)},electricChars:le.electricChars,innerMode:function(F){return{state:F.base,mode:le}},blankLine:function(F){var D,w;return le.blankLine&&(D=le.blankLine(F.base)),U.blankLine&&(w=U.blankLine(F.overlay)),w==null?D:fe&&D!=null?D+" "+w:w}}}})}()),Zl.exports}var Jl={exports:{}},Oo;function es(){return Oo||(Oo=1,function(Ie,ot){(function(L){L(Ve())})(function(L){L.defineMode("coffeescript",function(le,U){var fe="error";function F(k){return new RegExp("^(("+k.join(")|(")+"))\\b")}var D=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,w=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,ee=/^[_A-Za-z$][_A-Za-z$0-9]*/,P=/^@[_A-Za-z$][_A-Za-z$0-9]*/,j=F(["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"],q=F(E.concat(Q));E=F(E);var K=/^('{3}|\"{3}|['\"])/,be=/^(\/{3}|\/)/,pe=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],se=F(pe);function ce(k,p){if(k.sol()){p.scope.align===null&&(p.scope.align=!1);var b=p.scope.offset;if(k.eatSpace()){var h=k.indentation();return h>b&&p.scope.type=="coffee"?"indent":h<b?"dedent":null}else b>0&&Le(k,p)}if(k.eatSpace())return null;var S=k.peek();if(k.match("####"))return k.skipToEnd(),"comment";if(k.match("###"))return p.tokenize=te,p.tokenize(k,p);if(S==="#")return k.skipToEnd(),"comment";if(k.match(/^-?[0-9\.]/,!1)){var d=!1;if(k.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(d=!0),k.match(/^-?\d+\.\d*/)&&(d=!0),k.match(/^-?\.\d+/)&&(d=!0),d)return k.peek()=="."&&k.backUp(1),"number";var H=!1;if(k.match(/^-?0x[0-9a-f]+/i)&&(H=!0),k.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(H=!0),k.match(/^-?0(?![\dx])/i)&&(H=!0),H)return"number"}if(k.match(K))return p.tokenize=ue(k.current(),!1,"string"),p.tokenize(k,p);if(k.match(be)){if(k.current()!="/"||k.match(/^.*\//,!1))return p.tokenize=ue(k.current(),!0,"string-2"),p.tokenize(k,p);k.backUp(1)}return k.match(D)||k.match(j)?"operator":k.match(w)?"punctuation":k.match(se)?"atom":k.match(P)||p.prop&&k.match(ee)?"property":k.match(q)?"keyword":k.match(ee)?"variable":(k.next(),fe)}function ue(k,p,b){return function(h,S){for(;!h.eol();)if(h.eatWhile(/[^'"\/\\]/),h.eat("\\")){if(h.next(),p&&h.eol())return b}else{if(h.match(k))return S.tokenize=ce,b;h.eat(/['"\/]/)}return p&&(U.singleLineStringErrors?b=fe:S.tokenize=ce),b}}function te(k,p){for(;!k.eol();){if(k.eatWhile(/[^#]/),k.match("###")){p.tokenize=ce;break}k.eatWhile("#")}return"comment"}function Ce(k,p,b){b=b||"coffee";for(var h=0,S=!1,d=null,H=p.scope;H;H=H.prev)if(H.type==="coffee"||H.type=="}"){h=H.offset+le.indentUnit;break}b!=="coffee"?(S=null,d=k.column()+k.current().length):p.scope.align&&(p.scope.align=!1),p.scope={offset:h,type:b,prev:p.scope,align:S,alignOffset:d}}function Le(k,p){if(p.scope.prev)if(p.scope.type==="coffee"){for(var b=k.indentation(),h=!1,S=p.scope;S;S=S.prev)if(b===S.offset){h=!0;break}if(!h)return!0;for(;p.scope.prev&&p.scope.offset!==b;)p.scope=p.scope.prev;return!1}else return p.scope=p.scope.prev,!1}function xe(k,p){var b=p.tokenize(k,p),h=k.current();h==="return"&&(p.dedent=!0),((h==="->"||h==="=>")&&k.eol()||b==="indent")&&Ce(k,p);var S="[({".indexOf(h);if(S!==-1&&Ce(k,p,"])}".slice(S,S+1)),E.exec(h)&&Ce(k,p),h=="then"&&Le(k,p),b==="dedent"&&Le(k,p))return fe;if(S="])}".indexOf(h),S!==-1){for(;p.scope.type=="coffee"&&p.scope.prev;)p.scope=p.scope.prev;p.scope.type==h&&(p.scope=p.scope.prev)}return p.dedent&&k.eol()&&(p.scope.type=="coffee"&&p.scope.prev&&(p.scope=p.scope.prev),p.dedent=!1),b}var O={startState:function(k){return{tokenize:ce,scope:{offset:k||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(k,p){var b=p.scope.align===null&&p.scope;b&&k.sol()&&(b.align=!1);var h=xe(k,p);return h&&h!="comment"&&(b&&(b.align=!0),p.prop=h=="punctuation"&&k.current()=="."),h},indent:function(k,p){if(k.tokenize!=ce)return 0;var b=k.scope,h=p&&"])}".indexOf(p.charAt(0))>-1;if(h)for(;b.type=="coffee"&&b.prev;)b=b.prev;var S=h&&b.type===p.charAt(0);return b.align?b.alignOffset-(S?1:0):(S?b.prev:b).offset},lineComment:"#",fold:"indent"};return O}),L.defineMIME("application/vnd.coffeescript","coffeescript"),L.defineMIME("text/x-coffeescript","coffeescript"),L.defineMIME("text/coffeescript","coffeescript")})}()),Jl.exports}var ts={exports:{}},No;function rs(){return No||(No=1,function(Ie,ot){(function(L){L(Ve(),Rt)})(function(L){L.defineMode("sass",function(le){var U=L.mimeModes["text/css"],fe=U.propertyKeywords||{},F=U.colorKeywords||{},D=U.valueKeywords||{},w=U.fontProperties||{};function ee(O){return new RegExp("^"+O.join("|"))}var P=["true","false","null","auto"],j=new RegExp("^"+P.join("|")),E=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],Q=ee(E),q=/^::?[a-zA-Z_][\w\-]*/,K;function be(O){return!O.peek()||O.match(/\s+$/,!1)}function pe(O,k){var p=O.peek();return p===")"?(O.next(),k.tokenizer=Le,"operator"):p==="("?(O.next(),O.eatSpace(),"operator"):p==="'"||p==='"'?(k.tokenizer=ce(O.next()),"string"):(k.tokenizer=ce(")",!1),"string")}function se(O,k){return function(p,b){return p.sol()&&p.indentation()<=O?(b.tokenizer=Le,Le(p,b)):(k&&p.skipTo("*/")?(p.next(),p.next(),b.tokenizer=Le):p.skipToEnd(),"comment")}}function ce(O,k){k==null&&(k=!0);function p(b,h){var S=b.next(),d=b.peek(),H=b.string.charAt(b.pos-2),R=S!=="\\"&&d===O||S===O&&H!=="\\";return R?(S!==O&&k&&b.next(),be(b)&&(h.cursorHalf=0),h.tokenizer=Le,"string"):S==="#"&&d==="{"?(h.tokenizer=ue(p),b.next(),"operator"):"string"}return p}function ue(O){return function(k,p){return k.peek()==="}"?(k.next(),p.tokenizer=O,"operator"):Le(k,p)}}function te(O){if(O.indentCount==0){O.indentCount++;var k=O.scopes[0].offset,p=k+le.indentUnit;O.scopes.unshift({offset:p})}}function Ce(O){O.scopes.length!=1&&O.scopes.shift()}function Le(O,k){var p=O.peek();if(O.match("/*"))return k.tokenizer=se(O.indentation(),!0),k.tokenizer(O,k);if(O.match("//"))return k.tokenizer=se(O.indentation(),!1),k.tokenizer(O,k);if(O.match("#{"))return k.tokenizer=ue(Le),"operator";if(p==='"'||p==="'")return O.next(),k.tokenizer=ce(p),"string";if(k.cursorHalf){if(p==="#"&&(O.next(),O.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||O.match(/^-?[0-9\.]+/))return be(O)&&(k.cursorHalf=0),"number";if(O.match(/^(px|em|in)\b/))return be(O)&&(k.cursorHalf=0),"unit";if(O.match(j))return be(O)&&(k.cursorHalf=0),"keyword";if(O.match(/^url/)&&O.peek()==="(")return k.tokenizer=pe,be(O)&&(k.cursorHalf=0),"atom";if(p==="$")return O.next(),O.eatWhile(/[\w-]/),be(O)&&(k.cursorHalf=0),"variable-2";if(p==="!")return O.next(),k.cursorHalf=0,O.match(/^[\w]+/)?"keyword":"operator";if(O.match(Q))return be(O)&&(k.cursorHalf=0),"operator";if(O.eatWhile(/[\w-]/))return be(O)&&(k.cursorHalf=0),K=O.current().toLowerCase(),D.hasOwnProperty(K)?"atom":F.hasOwnProperty(K)?"keyword":fe.hasOwnProperty(K)?(k.prevProp=O.current().toLowerCase(),"property"):"tag";if(be(O))return k.cursorHalf=0,null}else{if(p==="-"&&O.match(/^-\w+-/))return"meta";if(p==="."){if(O.next(),O.match(/^[\w-]+/))return te(k),"qualifier";if(O.peek()==="#")return te(k),"tag"}if(p==="#"){if(O.next(),O.match(/^[\w-]+/))return te(k),"builtin";if(O.peek()==="#")return te(k),"tag"}if(p==="$")return O.next(),O.eatWhile(/[\w-]/),"variable-2";if(O.match(/^-?[0-9\.]+/))return"number";if(O.match(/^(px|em|in)\b/))return"unit";if(O.match(j))return"keyword";if(O.match(/^url/)&&O.peek()==="(")return k.tokenizer=pe,"atom";if(p==="="&&O.match(/^=[\w-]+/))return te(k),"meta";if(p==="+"&&O.match(/^\+[\w-]+/))return"variable-3";if(p==="@"&&O.match("@extend")&&(O.match(/\s*[\w]/)||Ce(k)),O.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return te(k),"def";if(p==="@")return O.next(),O.eatWhile(/[\w-]/),"def";if(O.eatWhile(/[\w-]/))if(O.match(/ *: *[\w-\+\$#!\("']/,!1)){K=O.current().toLowerCase();var b=k.prevProp+"-"+K;return fe.hasOwnProperty(b)?"property":fe.hasOwnProperty(K)?(k.prevProp=K,"property"):w.hasOwnProperty(K)?"property":"tag"}else return O.match(/ *:/,!1)?(te(k),k.cursorHalf=1,k.prevProp=O.current().toLowerCase(),"property"):(O.match(/ *,/,!1)||te(k),"tag");if(p===":")return O.match(q)?"variable-3":(O.next(),k.cursorHalf=1,"operator")}return O.match(Q)?"operator":(O.next(),null)}function xe(O,k){O.sol()&&(k.indentCount=0);var p=k.tokenizer(O,k),b=O.current();if((b==="@return"||b==="}")&&Ce(k),p!==null){for(var h=O.pos-b.length,S=h+le.indentUnit*k.indentCount,d=[],H=0;H<k.scopes.length;H++){var R=k.scopes[H];R.offset<=S&&d.push(R)}k.scopes=d}return p}return{startState:function(){return{tokenizer:Le,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(O,k){var p=xe(O,k);return k.lastToken={style:p,content:O.current()},p},indent:function(O){return O.scopes[0].offset},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"indent"}},"css"),L.defineMIME("text/x-sass","sass")})}()),ts.exports}var ns={exports:{}},zo;function is(){return zo||(zo=1,function(Ie,ot){(function(L){L(Ve())})(function(L){L.defineMode("stylus",function(ue){for(var te=ue.indentUnit,Ce="",Le=se(le),xe=/^(a|b|i|s|col|em)$/i,O=se(D),k=se(w),p=se(j),b=se(P),h=se(U),S=pe(U),d=se(F),H=se(fe),R=se(ee),oe=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,Oe=pe(E),Ee=se(Q),Ye=new RegExp(/^\-(moz|ms|o|webkit)-/i),Je=se(q),$e="",Fe={},Ae,me,ye,Y;Ce.length<te;)Ce+=" ";function ge(C,y){if($e=C.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),y.context.line.firstWord=$e?$e[0].replace(/^\s*/,""):"",y.context.line.indent=C.indentation(),Ae=C.peek(),C.match("//"))return C.skipToEnd(),["comment","comment"];if(C.match("/*"))return y.tokenize=I,I(C,y);if(Ae=='"'||Ae=="'")return C.next(),y.tokenize=$(Ae),y.tokenize(C,y);if(Ae=="@")return C.next(),C.eatWhile(/[\w\\-]/),["def",C.current()];if(Ae=="#"){if(C.next(),C.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(C.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return C.match(Ye)?["meta","vendor-prefixes"]:C.match(/^-?[0-9]?\.?[0-9]/)?(C.eatWhile(/[a-z%]/i),["number","unit"]):Ae=="!"?(C.next(),[C.match(/^(important|optional)/i)?"keyword":"operator","important"]):Ae=="."&&C.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:C.match(S)?(C.peek()=="("&&(y.tokenize=Me),["property","word"]):C.match(/^[a-z][\w-]*\(/i)?(C.backUp(1),["keyword","mixin"]):C.match(/^(\+|-)[a-z][\w-]*\(/i)?(C.backUp(1),["keyword","block-mixin"]):C.string.match(/^\s*&/)&&C.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:C.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(C.backUp(1),["variable-3","reference"]):C.match(/^&{1}\s*$/)?["variable-3","reference"]:C.match(Oe)?["operator","operator"]:C.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?C.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!v(C.current())?(C.match("."),["variable-2","variable-name"]):["variable-2","word"]:C.match(oe)?["operator",C.current()]:/[:;,{}\[\]\(\)]/.test(Ae)?(C.next(),[null,Ae]):(C.next(),[null,null])}function I(C,y){for(var B=!1,we;(we=C.next())!=null;){if(B&&we=="/"){y.tokenize=null;break}B=we=="*"}return["comment","comment"]}function $(C){return function(y,B){for(var we=!1,et;(et=y.next())!=null;){if(et==C&&!we){C==")"&&y.backUp(1);break}we=!we&&et=="\\"}return(et==C||!we&&C!=")")&&(B.tokenize=null),["string","string"]}}function Me(C,y){return C.next(),C.match(/\s*[\"\')]/,!1)?y.tokenize=null:y.tokenize=$(")"),[null,"("]}function We(C,y,B,we){this.type=C,this.indent=y,this.prev=B,this.line=we||{firstWord:"",indent:0}}function re(C,y,B,we){return we=we>=0?we:te,C.context=new We(B,y.indentation()+we,C.context),B}function De(C,y){var B=C.context.indent-te;return y=y||!1,C.context=C.context.prev,y&&(C.context.indent=B),C.context.type}function Ne(C,y,B){return Fe[B.context.type](C,y,B)}function qe(C,y,B,we){for(var et=we||1;et>0;et--)B.context=B.context.prev;return Ne(C,y,B)}function v(C){return C.toLowerCase()in Le}function x(C){return C=C.toLowerCase(),C in O||C in R}function J(C){return C.toLowerCase()in Ee}function He(C){return C.toLowerCase().match(Ye)}function T(C){var y=C.toLowerCase(),B="variable-2";return v(C)?B="tag":J(C)?B="block-keyword":x(C)?B="property":y in p||y in Je?B="atom":y=="return"||y in b?B="keyword":C.match(/^[A-Z]/)&&(B="string"),B}function G(C,y){return Qe(y)&&(C=="{"||C=="]"||C=="hash"||C=="qualifier")||C=="block-mixin"}function z(C,y){return C=="{"&&y.match(/^\s*\$?[\w-]+/i,!1)}function je(C,y){return C==":"&&y.match(/^[a-z-]+/,!1)}function Ke(C){return C.sol()||C.string.match(new RegExp("^\\s*"+ce(C.current())))}function Qe(C){return C.eol()||C.match(/^\s*$/,!1)}function bt(C){var y=/^\s*[-_]*[a-z0-9]+[\w-]*/i,B=typeof C=="string"?C.match(y):C.string.match(y);return B?B[0].replace(/^\s*/,""):""}return Fe.block=function(C,y,B){if(C=="comment"&&Ke(y)||C==","&&Qe(y)||C=="mixin")return re(B,y,"block",0);if(z(C,y))return re(B,y,"interpolation");if(Qe(y)&&C=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(y.string)&&!v(bt(y)))return re(B,y,"block",0);if(G(C,y))return re(B,y,"block");if(C=="}"&&Qe(y))return re(B,y,"block",0);if(C=="variable-name")return y.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||J(bt(y))?re(B,y,"variableName"):re(B,y,"variableName",0);if(C=="=")return!Qe(y)&&!J(bt(y))?re(B,y,"block",0):re(B,y,"block");if(C=="*"&&(Qe(y)||y.match(/\s*(,|\.|#|\[|:|{)/,!1)))return Y="tag",re(B,y,"block");if(je(C,y))return re(B,y,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(C))return re(B,y,Qe(y)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(C))return re(B,y,"keyframes");if(/@extends?/.test(C))return re(B,y,"extend",0);if(C&&C.charAt(0)=="@")return y.indentation()>0&&x(y.current().slice(1))?(Y="variable-2","block"):/(@import|@require|@charset)/.test(C)?re(B,y,"block",0):re(B,y,"block");if(C=="reference"&&Qe(y))return re(B,y,"block");if(C=="(")return re(B,y,"parens");if(C=="vendor-prefixes")return re(B,y,"vendorPrefixes");if(C=="word"){var we=y.current();if(Y=T(we),Y=="property")return Ke(y)?re(B,y,"block",0):(Y="atom","block");if(Y=="tag"){if(/embed|menu|pre|progress|sub|table/.test(we)&&x(bt(y))||y.string.match(new RegExp("\\[\\s*"+we+"|"+we+"\\s*\\]")))return Y="atom","block";if(xe.test(we)&&(Ke(y)&&y.string.match(/=/)||!Ke(y)&&!y.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!v(bt(y))))return Y="variable-2",J(bt(y))?"block":re(B,y,"block",0);if(Qe(y))return re(B,y,"block")}if(Y=="block-keyword")return Y="keyword",y.current(/(if|unless)/)&&!Ke(y)?"block":re(B,y,"block");if(we=="return")return re(B,y,"block",0);if(Y=="variable-2"&&y.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return re(B,y,"block")}return B.context.type},Fe.parens=function(C,y,B){if(C=="(")return re(B,y,"parens");if(C==")")return B.context.prev.type=="parens"?De(B):y.string.match(/^[a-z][\w-]*\(/i)&&Qe(y)||J(bt(y))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(bt(y))||!y.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&v(bt(y))?re(B,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)?re(B,y,"block",0):Qe(y)?re(B,y,"block"):re(B,y,"block",0);if(C&&C.charAt(0)=="@"&&x(y.current().slice(1))&&(Y="variable-2"),C=="word"){var we=y.current();Y=T(we),Y=="tag"&&xe.test(we)&&(Y="variable-2"),(Y=="property"||we=="to")&&(Y="atom")}return C=="variable-name"?re(B,y,"variableName"):je(C,y)?re(B,y,"pseudo"):B.context.type},Fe.vendorPrefixes=function(C,y,B){return C=="word"?(Y="property",re(B,y,"block",0)):De(B)},Fe.pseudo=function(C,y,B){return x(bt(y.string))?qe(C,y,B):(y.match(/^[a-z-]+/),Y="variable-3",Qe(y)?re(B,y,"block"):De(B))},Fe.atBlock=function(C,y,B){if(C=="(")return re(B,y,"atBlock_parens");if(G(C,y))return re(B,y,"block");if(z(C,y))return re(B,y,"interpolation");if(C=="word"){var we=y.current().toLowerCase();if(/^(only|not|and|or)$/.test(we)?Y="keyword":h.hasOwnProperty(we)?Y="tag":H.hasOwnProperty(we)?Y="attribute":d.hasOwnProperty(we)?Y="property":k.hasOwnProperty(we)?Y="string-2":Y=T(y.current()),Y=="tag"&&Qe(y))return re(B,y,"block")}return C=="operator"&&/^(not|and|or)$/.test(y.current())&&(Y="keyword"),B.context.type},Fe.atBlock_parens=function(C,y,B){if(C=="{"||C=="}")return B.context.type;if(C==")")return Qe(y)?re(B,y,"block"):re(B,y,"atBlock");if(C=="word"){var we=y.current().toLowerCase();return Y=T(we),/^(max|min)/.test(we)&&(Y="property"),Y=="tag"&&(xe.test(we)?Y="variable-2":Y="atom"),B.context.type}return Fe.atBlock(C,y,B)},Fe.keyframes=function(C,y,B){return y.indentation()=="0"&&(C=="}"&&Ke(y)||C=="]"||C=="hash"||C=="qualifier"||v(y.current()))?qe(C,y,B):C=="{"?re(B,y,"keyframes"):C=="}"?Ke(y)?De(B,!0):re(B,y,"keyframes"):C=="unit"&&/^[0-9]+\%$/.test(y.current())?re(B,y,"keyframes"):C=="word"&&(Y=T(y.current()),Y=="block-keyword")?(Y="keyword",re(B,y,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(C)?re(B,y,Qe(y)?"block":"atBlock"):C=="mixin"?re(B,y,"block",0):B.context.type},Fe.interpolation=function(C,y,B){return C=="{"&&De(B)&&re(B,y,"block"),C=="}"?y.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||y.string.match(/^\s*[a-z]/i)&&v(bt(y))?re(B,y,"block"):!y.string.match(/^(\{|\s*\&)/)||y.match(/\s*[\w-]/,!1)?re(B,y,"block",0):re(B,y,"block"):C=="variable-name"?re(B,y,"variableName",0):(C=="word"&&(Y=T(y.current()),Y=="tag"&&(Y="atom")),B.context.type)},Fe.extend=function(C,y,B){return C=="["||C=="="?"extend":C=="]"?De(B):C=="word"?(Y=T(y.current()),"extend"):De(B)},Fe.variableName=function(C,y,B){return C=="string"||C=="["||C=="]"||y.current().match(/^(\.|\$)/)?(y.current().match(/^\.[\w-]+/i)&&(Y="variable-2"),"variableName"):qe(C,y,B)},{startState:function(C){return{tokenize:null,state:"block",context:new We("block",C||0,null)}},token:function(C,y){return!y.tokenize&&C.eatSpace()?null:(me=(y.tokenize||ge)(C,y),me&&typeof me=="object"&&(ye=me[1],me=me[0]),Y=me,y.state=Fe[y.state](ye,C,y),Y)},indent:function(C,y,B){var we=C.context,et=y&&y.charAt(0),ut=we.indent,Ft=bt(y),Wt=B.match(/^\s*/)[0].replace(/\t/g,Ce).length,Te=C.context.prev?C.context.prev.line.firstWord:"",yt=C.context.prev?C.context.prev.line.indent:Wt;return we.prev&&(et=="}"&&(we.type=="block"||we.type=="atBlock"||we.type=="keyframes")||et==")"&&(we.type=="parens"||we.type=="atBlock_parens")||et=="{"&&we.type=="at")?ut=we.indent-te:/(\})/.test(et)||(/@|\$|\d/.test(et)||/^\{/.test(y)||/^\s*\/(\/|\*)/.test(y)||/^\s*\/\*/.test(Te)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(y)||/^(\+|-)?[a-z][\w-]*\(/i.test(y)||/^return/.test(y)||J(Ft)?ut=Wt:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(et)||v(Ft)?/\,\s*$/.test(Te)?ut=yt:/^\s+/.test(B)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Te)||v(Te))?ut=Wt<=yt?yt:yt+te:ut=Wt:!/,\s*$/.test(B)&&(He(Ft)||x(Ft))&&(J(Te)?ut=Wt<=yt?yt:yt+te:/^\{/.test(Te)?ut=Wt<=yt?Wt:yt+te:He(Te)||x(Te)?ut=Wt>=yt?yt:Wt:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(Te)||/=\s*$/.test(Te)||v(Te)||/^\$[\w-\.\[\]\'\"]/.test(Te)?ut=yt+te:ut=Wt)),ut},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}});var le=["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"],U=["domain","regexp","url-prefix","url"],fe=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],F=["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"],D=["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"],w=["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"],ee=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],P=["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"],j=["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"],q=["null","true","false","href","title","type","not-allowed","readonly","disabled"],K=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],be=le.concat(U,fe,F,D,w,P,j,ee,E,Q,q,K);function pe(ue){return ue=ue.sort(function(te,Ce){return Ce>te}),new RegExp("^(("+ue.join(")|(")+"))\\b")}function se(ue){for(var te={},Ce=0;Ce<ue.length;++Ce)te[ue[Ce]]=!0;return te}function ce(ue){return ue.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}L.registerHelper("hintWords","stylus",be),L.defineMIME("text/x-styl","stylus")})}()),ns.exports}var os={exports:{}},Ao;function as(){return Ao||(Ao=1,function(Ie,ot){(function(L){L(Ve(),fn,Rt,Yl)})(function(L){L.defineMode("pug",function(le){var U="keyword",fe="meta",F="builtin",D="qualifier",w={"{":"}","(":")","[":"]"},ee=L.getMode(le,"javascript");function P(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=L.startState(ee),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}P.prototype.copy=function(){var v=new P;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=L.copyState(ee,this.jsState),v.innerMode=this.innerMode,this.innerMode&&this.innerState&&(v.innerState=L.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 j(v,x){if(v.sol()&&(x.javaScriptLine=!1,x.javaScriptLineExcludesColon=!1),x.javaScriptLine){if(x.javaScriptLineExcludesColon&&v.peek()===":"){x.javaScriptLine=!1,x.javaScriptLineExcludesColon=!1;return}var J=ee.token(v,x.jsState);return v.eol()&&(x.javaScriptLine=!1),J||!0}}function E(v,x){if(x.javaScriptArguments){if(x.javaScriptArgumentsDepth===0&&v.peek()!=="("){x.javaScriptArguments=!1;return}if(v.peek()==="("?x.javaScriptArgumentsDepth++:v.peek()===")"&&x.javaScriptArgumentsDepth--,x.javaScriptArgumentsDepth===0){x.javaScriptArguments=!1;return}var J=ee.token(v,x.jsState);return J||!0}}function Q(v){if(v.match(/^yield\b/))return"keyword"}function q(v){if(v.match(/^(?:doctype) *([^\n]+)?/))return fe}function K(v,x){if(v.match("#{"))return x.isInterpolating=!0,x.interpolationNesting=0,"punctuation"}function be(v,x){if(x.isInterpolating){if(v.peek()==="}"){if(x.interpolationNesting--,x.interpolationNesting<0)return v.next(),x.isInterpolating=!1,"punctuation"}else v.peek()==="{"&&x.interpolationNesting++;return ee.token(v,x.jsState)||!0}}function pe(v,x){if(v.match(/^case\b/))return x.javaScriptLine=!0,U}function se(v,x){if(v.match(/^when\b/))return x.javaScriptLine=!0,x.javaScriptLineExcludesColon=!0,U}function ce(v){if(v.match(/^default\b/))return U}function ue(v,x){if(v.match(/^extends?\b/))return x.restOfLine="string",U}function te(v,x){if(v.match(/^append\b/))return x.restOfLine="variable",U}function Ce(v,x){if(v.match(/^prepend\b/))return x.restOfLine="variable",U}function Le(v,x){if(v.match(/^block\b *(?:(prepend|append)\b)?/))return x.restOfLine="variable",U}function xe(v,x){if(v.match(/^include\b/))return x.restOfLine="string",U}function O(v,x){if(v.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&v.match("include"))return x.isIncludeFiltered=!0,U}function k(v,x){if(x.isIncludeFiltered){var J=Oe(v,x);return x.isIncludeFiltered=!1,x.restOfLine="string",J}}function p(v,x){if(v.match(/^mixin\b/))return x.javaScriptLine=!0,U}function b(v,x){if(v.match(/^\+([-\w]+)/))return v.match(/^\( *[-\w]+ *=/,!1)||(x.javaScriptArguments=!0,x.javaScriptArgumentsDepth=0),"variable";if(v.match("+#{",!1))return v.next(),x.mixinCallAfter=!0,K(v,x)}function h(v,x){if(x.mixinCallAfter)return x.mixinCallAfter=!1,v.match(/^\( *[-\w]+ *=/,!1)||(x.javaScriptArguments=!0,x.javaScriptArgumentsDepth=0),!0}function S(v,x){if(v.match(/^(if|unless|else if|else)\b/))return x.javaScriptLine=!0,U}function d(v,x){if(v.match(/^(- *)?(each|for)\b/))return x.isEach=!0,U}function H(v,x){if(x.isEach){if(v.match(/^ in\b/))return x.javaScriptLine=!0,x.isEach=!1,U;if(v.sol()||v.eol())x.isEach=!1;else if(v.next()){for(;!v.match(/^ in\b/,!1)&&v.next(););return"variable"}}}function R(v,x){if(v.match(/^while\b/))return x.javaScriptLine=!0,U}function oe(v,x){var J;if(J=v.match(/^(\w(?:[-:\w]*\w)?)\/?/))return x.lastTag=J[1].toLowerCase(),x.lastTag==="script"&&(x.scriptType="application/javascript"),"tag"}function Oe(v,x){if(v.match(/^:([\w\-]+)/)){var J;return le&&le.innerModes&&(J=le.innerModes(v.current().substring(1))),J||(J=v.current().substring(1)),typeof J=="string"&&(J=L.getMode(le,J)),Me(v,x,J),"atom"}}function Ee(v,x){if(v.match(/^(!?=|-)/))return x.javaScriptLine=!0,"punctuation"}function Ye(v){if(v.match(/^#([\w-]+)/))return F}function Je(v){if(v.match(/^\.([\w-]+)/))return D}function $e(v,x){if(v.peek()=="(")return v.next(),x.isAttrs=!0,x.attrsNest=[],x.inAttributeName=!0,x.attrValue="",x.attributeIsType=!1,"punctuation"}function Fe(v,x){if(x.isAttrs){if(w[v.peek()]&&x.attrsNest.push(w[v.peek()]),x.attrsNest[x.attrsNest.length-1]===v.peek())x.attrsNest.pop();else if(v.eat(")"))return x.isAttrs=!1,"punctuation";if(x.inAttributeName&&v.match(/^[^=,\)!]+/))return(v.peek()==="="||v.peek()==="!")&&(x.inAttributeName=!1,x.jsState=L.startState(ee),x.lastTag==="script"&&v.current().trim().toLowerCase()==="type"?x.attributeIsType=!0:x.attributeIsType=!1),"attribute";var J=ee.token(v,x.jsState);if(x.attributeIsType&&J==="string"&&(x.scriptType=v.current().toString()),x.attrsNest.length===0&&(J==="string"||J==="variable"||J==="keyword"))try{return Function("","var x "+x.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),x.inAttributeName=!0,x.attrValue="",v.backUp(v.current().length),Fe(v,x)}catch(He){}return x.attrValue+=v.current(),J||!0}}function Ae(v,x){if(v.match(/^&attributes\b/))return x.javaScriptArguments=!0,x.javaScriptArgumentsDepth=0,"keyword"}function me(v){if(v.sol()&&v.eatSpace())return"indent"}function ye(v,x){if(v.match(/^ *\/\/(-)?([^\n]*)/))return x.indentOf=v.indentation(),x.indentToken="comment","comment"}function Y(v){if(v.match(/^: */))return"colon"}function ge(v,x){if(v.match(/^(?:\| ?| )([^\n]+)/))return"string";if(v.match(/^(<[^\n]*)/,!1))return Me(v,x,"htmlmixed"),x.innerModeForLine=!0,We(v,x,!0)}function I(v,x){if(v.eat(".")){var J=null;return x.lastTag==="script"&&x.scriptType.toLowerCase().indexOf("javascript")!=-1?J=x.scriptType.toLowerCase().replace(/"|'/g,""):x.lastTag==="style"&&(J="css"),Me(v,x,J),"dot"}}function $(v){return v.next(),null}function Me(v,x,J){J=L.mimeModes[J]||J,J=le.innerModes&&le.innerModes(J)||J,J=L.mimeModes[J]||J,J=L.getMode(le,J),x.indentOf=v.indentation(),J&&J.name!=="null"?x.innerMode=J:x.indentToken="string"}function We(v,x,J){if(v.indentation()>x.indentOf||x.innerModeForLine&&!v.sol()||J)return x.innerMode?(x.innerState||(x.innerState=x.innerMode.startState?L.startState(x.innerMode,v.indentation()):{}),v.hideFirstChars(x.indentOf+2,function(){return x.innerMode.token(v,x.innerState)||!0})):(v.skipToEnd(),x.indentToken);v.sol()&&(x.indentOf=1/0,x.indentToken=null,x.innerMode=null,x.innerState=null)}function re(v,x){if(v.sol()&&(x.restOfLine=""),x.restOfLine){v.skipToEnd();var J=x.restOfLine;return x.restOfLine="",J}}function De(){return new P}function Ne(v){return v.copy()}function qe(v,x){var J=We(v,x)||re(v,x)||be(v,x)||k(v,x)||H(v,x)||Fe(v,x)||j(v,x)||E(v,x)||h(v,x)||Q(v)||q(v)||K(v,x)||pe(v,x)||se(v,x)||ce(v)||ue(v,x)||te(v,x)||Ce(v,x)||Le(v,x)||xe(v,x)||O(v,x)||p(v,x)||b(v,x)||S(v,x)||d(v,x)||R(v,x)||oe(v,x)||Oe(v,x)||Ee(v,x)||Ye(v)||Je(v)||$e(v,x)||Ae(v,x)||me(v)||ge(v,x)||ye(v,x)||Y(v)||I(v,x)||$(v);return J===!0?null:J}return{startState:De,copyState:Ne,token:qe}},"javascript","css","htmlmixed"),L.defineMIME("text/x-pug","pug"),L.defineMIME("text/x-jade","pug")})}()),os.exports}var ls={exports:{}},ss={exports:{}},jo;function cs(){return jo||(jo=1,function(Ie,ot){(function(L){L(Ve())})(function(L){L.defineSimpleMode=function(E,Q){L.defineMode(E,function(q){return L.simpleMode(q,Q)})},L.simpleMode=function(E,Q){le(Q,"start");var q={},K=Q.meta||{},be=!1;for(var pe in Q)if(pe!=K&&Q.hasOwnProperty(pe))for(var se=q[pe]=[],ce=Q[pe],ue=0;ue<ce.length;ue++){var te=ce[ue];se.push(new F(te,Q)),(te.indent||te.dedent)&&(be=!0)}var Ce={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:be?[]:null}},copyState:function(xe){var O={state:xe.state,pending:xe.pending,local:xe.local,localState:null,indent:xe.indent&&xe.indent.slice(0)};xe.localState&&(O.localState=L.copyState(xe.local.mode,xe.localState)),xe.stack&&(O.stack=xe.stack.slice(0));for(var k=xe.persistentStates;k;k=k.next)O.persistentStates={mode:k.mode,spec:k.spec,state:k.state==xe.localState?O.localState:L.copyState(k.mode,k.state),next:O.persistentStates};return O},token:D(q,E),innerMode:function(xe){return xe.local&&{mode:xe.local.mode,state:xe.localState}},indent:j(q,K)};if(K)for(var Le in K)K.hasOwnProperty(Le)&&(Ce[Le]=K[Le]);return Ce};function le(E,Q){if(!E.hasOwnProperty(Q))throw new Error("Undefined state "+Q+" in simple mode")}function U(E,Q){if(!E)return/(?:)/;var q="";return E instanceof RegExp?(E.ignoreCase&&(q="i"),E.unicode&&(q+="u"),E=E.source):E=String(E),new RegExp((Q===!1?"":"^")+"(?:"+E+")",q)}function fe(E){if(!E)return null;if(E.apply)return E;if(typeof E=="string")return E.replace(/\./g," ");for(var Q=[],q=0;q<E.length;q++)Q.push(E[q]&&E[q].replace(/\./g," "));return Q}function F(E,Q){(E.next||E.push)&&le(Q,E.next||E.push),this.regex=U(E.regex),this.token=fe(E.token),this.data=E}function D(E,Q){return function(q,K){if(K.pending){var be=K.pending.shift();return K.pending.length==0&&(K.pending=null),q.pos+=be.text.length,be.token}if(K.local)if(K.local.end&&q.match(K.local.end)){var pe=K.local.endToken||null;return K.local=K.localState=null,pe}else{var pe=K.local.mode.token(q,K.localState),se;return K.local.endScan&&(se=K.local.endScan.exec(q.current()))&&(q.pos=q.start+se.index),pe}for(var ce=E[K.state],ue=0;ue<ce.length;ue++){var te=ce[ue],Ce=(!te.data.sol||q.sol())&&q.match(te.regex);if(Ce){te.data.next?K.state=te.data.next:te.data.push?((K.stack||(K.stack=[])).push(K.state),K.state=te.data.push):te.data.pop&&K.stack&&K.stack.length&&(K.state=K.stack.pop()),te.data.mode&&ee(Q,K,te.data.mode,te.token),te.data.indent&&K.indent.push(q.indentation()+Q.indentUnit),te.data.dedent&&K.indent.pop();var Le=te.token;if(Le&&Le.apply&&(Le=Le(Ce)),Ce.length>2&&te.token&&typeof te.token!="string"){for(var xe=2;xe<Ce.length;xe++)Ce[xe]&&(K.pending||(K.pending=[])).push({text:Ce[xe],token:te.token[xe-1]});return q.backUp(Ce[0].length-(Ce[1]?Ce[1].length:0)),Le[0]}else return Le&&Le.join?Le[0]:Le}}return q.next(),null}}function w(E,Q){if(E===Q)return!0;if(!E||typeof E!="object"||!Q||typeof Q!="object")return!1;var q=0;for(var K in E)if(E.hasOwnProperty(K)){if(!Q.hasOwnProperty(K)||!w(E[K],Q[K]))return!1;q++}for(var K in Q)Q.hasOwnProperty(K)&&q--;return q==0}function ee(E,Q,q,K){var be;if(q.persistent)for(var pe=Q.persistentStates;pe&&!be;pe=pe.next)(q.spec?w(q.spec,pe.spec):q.mode==pe.mode)&&(be=pe);var se=be?be.mode:q.mode||L.getMode(E,q.spec),ce=be?be.state:L.startState(se);q.persistent&&!be&&(Q.persistentStates={mode:se,spec:q.spec,state:ce,next:Q.persistentStates}),Q.localState=ce,Q.local={mode:se,end:q.end&&U(q.end),endScan:q.end&&q.forceEnd!==!1&&U(q.end,!1),endToken:K&&K.join?K[K.length-1]:K}}function P(E,Q){for(var q=0;q<Q.length;q++)if(Q[q]===E)return!0}function j(E,Q){return function(q,K,be){if(q.local&&q.local.mode.indent)return q.local.mode.indent(q.localState,K,be);if(q.indent==null||q.local||Q.dontIndentStates&&P(q.state,Q.dontIndentStates)>-1)return L.Pass;var pe=q.indent.length-1,se=E[q.state];e:for(;;){for(var ce=0;ce<se.length;ce++){var ue=se[ce];if(ue.data.dedent&&ue.data.dedentIfLineStart!==!1){var te=ue.regex.exec(K);if(te&&te[0]){pe--,(ue.next||ue.push)&&(se=E[ue.next||ue.push]),K=K.slice(te[0].length);continue e}}}break}return pe<0?0:q.indent[pe]}}})}()),ss.exports}var us={exports:{}},Eo;function ds(){return Eo||(Eo=1,function(Ie,ot){(function(L){L(Ve())})(function(L){L.multiplexingMode=function(le){var U=Array.prototype.slice.call(arguments,1);function fe(F,D,w,ee){if(typeof D=="string"){var P=F.indexOf(D,w);return ee&&P>-1?P+D.length:P}var j=D.exec(w?F.slice(w):F);return j?j.index+w+(ee?j[0].length:0):-1}return{startState:function(){return{outer:L.startState(le),innerActive:null,inner:null,startingInner:!1}},copyState:function(F){return{outer:L.copyState(le,F.outer),innerActive:F.innerActive,inner:F.innerActive&&L.copyState(F.innerActive.mode,F.inner),startingInner:F.startingInner}},token:function(F,D){if(D.innerActive){var w=D.innerActive,ee=F.string;if(!w.close&&F.sol())return D.innerActive=D.inner=null,this.token(F,D);var P=w.close&&!D.startingInner?fe(ee,w.close,F.pos,w.parseDelimiters):-1;if(P==F.pos&&!w.parseDelimiters)return F.match(w.close),D.innerActive=D.inner=null,w.delimStyle&&w.delimStyle+" "+w.delimStyle+"-close";P>-1&&(F.string=ee.slice(0,P));var j=w.mode.token(F,D.inner);return P>-1?F.string=ee:F.pos>F.start&&(D.startingInner=!1),P==F.pos&&w.parseDelimiters&&(D.innerActive=D.inner=null),w.innerStyle&&(j?j=j+" "+w.innerStyle:j=w.innerStyle),j}else{for(var E=1/0,ee=F.string,Q=0;Q<U.length;++Q){var q=U[Q],P=fe(ee,q.open,F.pos);if(P==F.pos){q.parseDelimiters||F.match(q.open),D.startingInner=!!q.parseDelimiters,D.innerActive=q;var K=0;if(le.indent){var be=le.indent(D.outer,"","");be!==L.Pass&&(K=be)}return D.inner=L.startState(q.mode,K),q.delimStyle&&q.delimStyle+" "+q.delimStyle+"-open"}else P!=-1&&P<E&&(E=P)}E!=1/0&&(F.string=ee.slice(0,E));var pe=le.token(F,D.outer);return E!=1/0&&(F.string=ee),pe}},indent:function(F,D,w){var ee=F.innerActive?F.innerActive.mode:le;return ee.indent?ee.indent(F.innerActive?F.inner:F.outer,D,w):L.Pass},blankLine:function(F){var D=F.innerActive?F.innerActive.mode:le;if(D.blankLine&&D.blankLine(F.innerActive?F.inner:F.outer),F.innerActive)F.innerActive.close===`
- `&&(F.innerActive=F.inner=null);else for(var w=0;w<U.length;++w){var ee=U[w];ee.open===`
- `&&(F.innerActive=ee,F.inner=L.startState(ee.mode,D.indent?D.indent(F.outer,"",""):0))}},electricChars:le.electricChars,innerMode:function(F){return F.inner?{state:F.inner,mode:F.innerActive.mode}:{state:F.outer,mode:le}}}}})}()),us.exports}var Wo;function ps(){return Wo||(Wo=1,function(Ie,ot){(function(L){L(Ve(),cs(),ds())})(function(L){L.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:"--}}"}}),L.defineMode("handlebars",function(le,U){var fe=L.getMode(le,"handlebars-tags");return!U||!U.base?fe:L.multiplexingMode(L.getMode(le,U.base),{open:"{{",close:/\}\}\}?/,mode:fe,parseDelimiters:!0})}),L.defineMIME("text/x-handlebars-template","handlebars")})}()),ls.exports}(function(Ie,ot){(function(L){L(Ve(),Xl(),Lo(),fn,es(),Rt,rs(),is(),as(),ps())})(function(L){var le={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"]]};L.defineMode("vue-template",function(U,fe){var F={token:function(D){if(D.match(/^\{\{.*?\}\}/))return"meta mustache";for(;D.next()&&!D.match("{{",!1););return null}};return L.overlayMode(L.getMode(U,fe.backdrop||"text/html"),F)}),L.defineMode("vue",function(U){return L.getMode(U,{name:"htmlmixed",tags:le})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),L.defineMIME("script/x-vue","vue"),L.defineMIME("text/x-vue","vue")})})();const fs=Co({__name:"CodeMirror",props:{mode:{type:String,default:Mr.JSON,validator(Ie){return Object.values(Mr).includes(Ie)}},value:{type:String,default:""},readonly:{type:Boolean,default:!1}},emits:["change"],setup(Ie,{emit:ot}){const L=Ie,le=xu();let U;const fe=wu(w,100),F=ku();Rl(()=>L.value,P=>pn(this,null,function*(){yield Bl();const j=U==null?void 0:U.getValue();P!==j&&(U==null||U.setValue(P||""))}),{flush:"post"}),_u(()=>{U==null||U.setOption("mode",L.mode)}),Rl(()=>F.getDarkMode,()=>pn(this,null,function*(){D()}),{immediate:!0});function D(){var P;(P=Vl(U))==null||P.setOption("theme",F.getDarkMode==="light"?"idea":"material-palenight")}function w(){U==null||U.refresh()}function ee(){return pn(this,null,function*(){const P={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers"]};U=Kn(le.value,Fl({value:"",mode:L.mode,readOnly:L.readonly,tabSize:2,theme:"material-palenight",lineWrapping:!0,lineNumbers:!0},P)),U==null||U.setValue(L.value),D(),U==null||U.on("change",()=>{ot("change",U==null?void 0:U.getValue())})})}return Cu(()=>pn(this,null,function*(){yield Bl(),ee(),Au(fe)})),Su(()=>{U=null}),(P,j)=>(So(),$l("div",{class:"relative !h-full w-full overflow-hidden",ref_key:"el",ref:le},null,512))}}),hs={class:"h-full"},ms=Co({__name:"CodeEditor",props:{value:{type:[Object,String]},mode:{type:String,default:Mr.JSON,validator(Ie){return Object.values(Mr).includes(Ie)}},readonly:{type:Boolean},autoFormat:{type:Boolean,default:!0}},emits:["change","update:value","format-error"],setup(Ie,{emit:ot}){const L=Ie,le=Mu(()=>{const{value:fe,mode:F,autoFormat:D}=L;if(!D||F!==Mr.JSON)return fe;let w=fe;if(Lu(fe))try{w=JSON.parse(fe)}catch(ee){return ot("format-error",fe),fe}return JSON.stringify(w,null,2)});function U(fe){ot("update:value",fe),ot("change",fe)}return(fe,F)=>(So(),$l("div",hs,[Tu(fs,{value:le.value,onChange:U,mode:Ie.mode,readonly:Ie.readonly},null,8,["value","mode","readonly"])]))}});var Do={exports:{}};(function(Ie,ot){(function(L,le){Ie.exports=le(Ou)})(Il,function(L){return function(){var le={789:function(D){D.exports=L}},U={};function fe(D){var w=U[D];if(w!==void 0)return w.exports;var ee=U[D]={exports:{}};return le[D](ee,ee.exports,fe),ee.exports}fe.d=function(D,w){for(var ee in w)fe.o(w,ee)&&!fe.o(D,ee)&&Object.defineProperty(D,ee,{enumerable:!0,get:w[ee]})},fe.o=function(D,w){return Object.prototype.hasOwnProperty.call(D,w)},fe.r=function(D){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})};var F={};return function(){function D(p,b){(b==null||b>p.length)&&(b=p.length);for(var h=0,S=new Array(b);h<b;h++)S[h]=p[h];return S}function w(p,b){if(p){if(typeof p=="string")return D(p,b);var h=Object.prototype.toString.call(p).slice(8,-1);return h==="Object"&&p.constructor&&(h=p.constructor.name),h==="Map"||h==="Set"?Array.from(p):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?D(p,b):void 0}}function ee(p){return function(b){if(Array.isArray(b))return D(b)}(p)||function(b){if(typeof Symbol<"u"&&b[Symbol.iterator]!=null||b["@@iterator"]!=null)return Array.from(b)}(p)||w(p)||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 P(p,b,h){return b in p?Object.defineProperty(p,b,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[b]=h,p}fe.r(F),fe.d(F,{default:function(){return k}});var j=fe(789),E=(0,j.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var p=this.data,b=this.onClick;return(0,j.createVNode)("span",{class:"vjs-tree-brackets",onClick:b},[p])}}),Q=(0,j.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(p,b){var h=b.emit;return{uiType:(0,j.computed)(function(){return p.isMultiple?"checkbox":"radio"}),model:(0,j.computed)({get:function(){return p.checked},set:function(S){return h("update:modelValue",S)}})}},render:function(){var p=this.uiType,b=this.model,h=this.$emit;return(0,j.createVNode)("label",{class:["vjs-check-controller",b?"is-checked":""],onClick:function(S){return S.stopPropagation()}},[(0,j.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(p)},null),(0,j.createVNode)("input",{checked:b,class:"vjs-check-controller-original is-".concat(p),type:p,onChange:function(){return h("change",b)}},null)])}}),q=(0,j.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var p=this.nodeType,b=this.onClick,h=p==="objectStart"||p==="arrayStart";return h||p==="objectCollapsed"||p==="arrayCollapsed"?(0,j.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(h?"open":"close"),onClick:b},[(0,j.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,j.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}});function K(p){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},K(p)}function be(p){return Object.prototype.toString.call(p).slice(8,-1).toLowerCase()}function pe(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,S=arguments.length>3?arguments[3]:void 0,d=S||{},H=d.key,R=d.index,oe=d.type,Oe=oe===void 0?"content":oe,Ee=d.showComma,Ye=Ee!==void 0&&Ee,Je=d.length,$e=Je===void 0?1:Je,Fe=be(p);if(Fe==="array"){var Ae=se(p.map(function(Y,ge,I){return pe(Y,"".concat(b,"[").concat(ge,"]"),h+1,{index:ge,showComma:ge!==I.length-1,length:$e,type:Oe})}));return[pe("[",b,h,{showComma:!1,key:H,length:p.length,type:"arrayStart"})[0]].concat(Ae,pe("]",b,h,{showComma:Ye,length:p.length,type:"arrayEnd"})[0])}if(Fe==="object"){var me=Object.keys(p),ye=se(me.map(function(Y,ge,I){return pe(p[Y],/^[a-zA-Z_]\w*$/.test(Y)?"".concat(b,".").concat(Y):"".concat(b,'["').concat(Y,'"]'),h+1,{key:Y,showComma:ge!==I.length-1,length:$e,type:Oe})}));return[pe("{",b,h,{showComma:!1,key:H,index:R,length:me.length,type:"objectStart"})[0]].concat(ye,pe("}",b,h,{showComma:Ye,length:me.length,type:"objectEnd"})[0])}return[{content:p,level:h,key:H,index:R,path:b,showComma:Ye,length:$e,type:Oe}]}function se(p){if(typeof Array.prototype.flat=="function")return p.flat();for(var b=ee(p),h=[];b.length;){var S=b.shift();Array.isArray(S)?b.unshift.apply(b,ee(S)):h.push(S)}return h}function ce(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(p==null)return p;if(p instanceof Date)return new Date(p);if(p instanceof RegExp)return new RegExp(p);if(K(p)!=="object")return p;if(b.get(p))return b.get(p);if(Array.isArray(p)){var h=p.map(function(H){return ce(H,b)});return b.set(p,h),h}var S={};for(var d in p)S[d]=ce(p[d],b);return b.set(p,S),S}function ue(p,b){var h=Object.keys(p);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(p);b&&(S=S.filter(function(d){return Object.getOwnPropertyDescriptor(p,d).enumerable})),h.push.apply(h,S)}return h}function te(p){for(var b=1;b<arguments.length;b++){var h=arguments[b]!=null?arguments[b]:{};b%2?ue(Object(h),!0).forEach(function(S){P(p,S,h[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(h)):ue(Object(h)).forEach(function(S){Object.defineProperty(p,S,Object.getOwnPropertyDescriptor(h,S))})}return p}var Ce={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},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}},Le=(0,j.defineComponent)({name:"TreeNode",props:te(te({},Ce),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(p,b){var h=b.emit,S=(0,j.computed)(function(){return be(p.node.content)}),d=(0,j.computed)(function(){return"vjs-value vjs-value-".concat(S.value)}),H=(0,j.computed)(function(){return p.showDoubleQuotes?'"'.concat(p.node.key,'"'):p.node.key}),R=(0,j.computed)(function(){return p.selectableType==="multiple"}),oe=(0,j.computed)(function(){return p.selectableType==="single"}),Oe=(0,j.computed)(function(){return p.nodeSelectable(p.node)&&(R.value||oe.value)}),Ee=(0,j.reactive)({editing:!1}),Ye=function(ge){var I,$,Me=($=(I=ge.target)===null||I===void 0?void 0:I.value)==="null"?null:$==="undefined"?void 0:$==="true"||$!=="false"&&($[0]+$[$.length-1]==='""'||$[0]+$[$.length-1]==="''"?$.slice(1,-1):typeof Number($)=="number"&&!isNaN(Number($))||$==="NaN"?Number($):$);h("valueChange",Me,p.node.path)},Je=(0,j.computed)(function(){var ge,I=(ge=p.node)===null||ge===void 0?void 0:ge.content;return I===null?I="null":I===void 0&&(I="undefined"),S.value==="string"?'"'.concat(I,'"'):I+""}),$e=function(){var ge=p.renderNodeValue;return ge?ge({node:p.node,defaultValue:Je.value}):Je.value},Fe=function(){h("bracketsClick",!p.collapsed,p.node.path)},Ae=function(){h("iconClick",!p.collapsed,p.node.path)},me=function(){h("selectedChange",p.node)},ye=function(){h("nodeClick",p.node),Oe.value&&p.selectOnClickNode&&h("selectedChange",p.node)},Y=function(ge){if(p.editable&&!Ee.editing){Ee.editing=!0;var I=function $(Me){var We;Me.target!==ge.target&&((We=Me.target)===null||We===void 0?void 0:We.parentElement)!==ge.target&&(Ee.editing=!1,document.removeEventListener("click",$))};document.removeEventListener("click",I),document.addEventListener("click",I)}};return function(){var ge,I=p.node;return(0,j.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":p.showSelectController,"has-carets":p.showIcon,"is-highlight":p.highlightSelectedNode&&p.checked},onClick:ye,style:p.style},[p.showLineNumber&&(0,j.createVNode)("span",{class:"vjs-node-index"},[I.id+1]),p.showSelectController&&Oe.value&&I.type!=="objectEnd"&&I.type!=="arrayEnd"&&(0,j.createVNode)(Q,{isMultiple:R.value,checked:p.checked,onChange:me},null),(0,j.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(I.level)).map(function($,Me){return(0,j.createVNode)("div",{key:Me,class:{"vjs-indent-unit":!0,"has-line":p.showLine}},null)}),p.showIcon&&(0,j.createVNode)(q,{nodeType:I.type,onClick:Ae},null)]),I.key&&(0,j.createVNode)("span",{class:"vjs-key"},[(ge=p.renderNodeKey,ge?ge({node:p.node,defaultKey:H.value||""}):H.value),(0,j.createVNode)("span",{class:"vjs-colon"},[":".concat(p.showKeyValueSpace?" ":"")])]),(0,j.createVNode)("span",null,[I.type!=="content"&&I.content?(0,j.createVNode)(E,{data:I.content.toString(),onClick:Fe},null):(0,j.createVNode)("span",{class:d.value,onClick:!p.editable||p.editableTrigger&&p.editableTrigger!=="click"?void 0:Y,onDblclick:p.editable&&p.editableTrigger==="dblclick"?Y:void 0},[p.editable&&Ee.editing?(0,j.createVNode)("input",{value:Je.value,onChange:Ye,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):$e()]),I.showComma&&(0,j.createVNode)("span",null,[","]),p.showLength&&p.collapsed&&(0,j.createVNode)("span",{class:"vjs-comment"},[(0,j.createTextVNode)(" // "),I.length,(0,j.createTextVNode)(" items ")])])])}}});function xe(p,b){var h=Object.keys(p);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(p);b&&(S=S.filter(function(d){return Object.getOwnPropertyDescriptor(p,d).enumerable})),h.push.apply(h,S)}return h}function O(p){for(var b=1;b<arguments.length;b++){var h=arguments[b]!=null?arguments[b]:{};b%2?xe(Object(h),!0).forEach(function(S){P(p,S,h[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(h)):xe(Object(h)).forEach(function(S){Object.defineProperty(p,S,Object.getOwnPropertyDescriptor(h,S))})}return p}var k=(0,j.defineComponent)({name:"Tree",props:O(O({},Ce),{},{data:{type:[String,Number,Boolean,Array,Object],default:null},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}}),slots:["renderNodeKey","renderNodeValue"],emits:["nodeClick","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(p,b){var h=b.emit,S=b.slots,d=(0,j.ref)(),H=(0,j.computed)(function(){return pe(p.data,p.rootPath)}),R=function(I){return H.value.reduce(function($,Me){var We,re=Me.level>=I,De=(We=p.pathCollapsible)===null||We===void 0?void 0:We.call(p,Me);return Me.type!=="objectStart"&&Me.type!=="arrayStart"||!re&&!De?$:O(O({},$),{},P({},Me.path,1))},{})},oe=(0,j.reactive)({translateY:0,visibleData:null,hiddenPaths:R(p.deep)}),Oe=(0,j.computed)(function(){for(var I=null,$=[],Me=H.value.length,We=0;We<Me;We++){var re=O(O({},H.value[We]),{},{id:We}),De=oe.hiddenPaths[re.path];if(I&&I.path===re.path){var Ne=I.type==="objectStart",qe=O(O(O({},re),I),{},{showComma:re.showComma,content:Ne?"{...}":"[...]",type:Ne?"objectCollapsed":"arrayCollapsed"});I=null,$.push(qe)}else{if(De&&!I){I=re;continue}if(I)continue;$.push(re)}}return $}),Ee=(0,j.computed)(function(){var I=p.selectedValue;return I&&p.selectableType==="multiple"&&Array.isArray(I)?I:[I]}),Ye=(0,j.computed)(function(){return!p.selectableType||p.selectOnClickNode||p.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),Je=function(){var I=Oe.value;if(p.virtual){var $,Me=p.height/p.itemHeight,We=(($=d.value)===null||$===void 0?void 0:$.scrollTop)||0,re=Math.floor(We/p.itemHeight),De=re<0?0:re+Me>I.length?I.length-Me:re;De<0&&(De=0);var Ne=De+Me;oe.translateY=De*p.itemHeight,oe.visibleData=I.filter(function(qe,v){return v>=De&&v<Ne})}else oe.visibleData=I},$e=function(){Je()},Fe=function(I){var $,Me,We=I.path,re=p.selectableType;if(re==="multiple"){var De=Ee.value.findIndex(function(x){return x===We}),Ne=ee(Ee.value);De!==-1?Ne.splice(De,1):Ne.push(We),h("update:selectedValue",Ne),h("selectedChange",Ne,ee(Ee.value))}else if(re==="single"&&Ee.value[0]!==We){var qe=($=Ee.value,Me=1,function(x){if(Array.isArray(x))return x}($)||function(x,J){var He=x==null?null:typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(He!=null){var T,G,z=[],je=!0,Ke=!1;try{for(He=He.call(x);!(je=(T=He.next()).done)&&(z.push(T.value),!J||z.length!==J);je=!0);}catch(Qe){Ke=!0,G=Qe}finally{try{je||He.return==null||He.return()}finally{if(Ke)throw G}}return z}}($,Me)||w($,Me)||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],v=We;h("update:selectedValue",v),h("selectedChange",v,qe)}},Ae=function(I){h("nodeClick",I)},me=function(I,$){if(I)oe.hiddenPaths=O(O({},oe.hiddenPaths),{},P({},$,1));else{var Me=O({},oe.hiddenPaths);delete Me[$],oe.hiddenPaths=Me}},ye=function(I,$){p.collapsedOnClickBrackets&&me(I,$),h("bracketsClick",I)},Y=function(I,$){me(I,$),h("iconClick",I)},ge=function(I,$){var Me=ce(p.data),We=p.rootPath;new Function("data","val","data".concat($.slice(We.length),"=val"))(Me,I),h("update:data",Me)};return(0,j.watchEffect)(function(){Ye.value&&function(I){throw new Error("[VueJSONPretty] ".concat(I))}(Ye.value)}),(0,j.watchEffect)(function(){Oe.value&&Je()}),(0,j.watch)(function(){return p.deep},function(I){I&&(oe.hiddenPaths=R(I))}),function(){var I,$,Me=(I=p.renderNodeKey)!==null&&I!==void 0?I:S.renderNodeKey,We=($=p.renderNodeValue)!==null&&$!==void 0?$:S.renderNodeValue,re=oe.visibleData&&oe.visibleData.map(function(De){return(0,j.createVNode)(Le,{key:De.id,node:De,collapsed:!!oe.hiddenPaths[De.path],showDoubleQuotes:p.showDoubleQuotes,showLength:p.showLength,checked:Ee.value.includes(De.path),selectableType:p.selectableType,showLine:p.showLine,showLineNumber:p.showLineNumber,showSelectController:p.showSelectController,selectOnClickNode:p.selectOnClickNode,nodeSelectable:p.nodeSelectable,highlightSelectedNode:p.highlightSelectedNode,editable:p.editable,editableTrigger:p.editableTrigger,showIcon:p.showIcon,showKeyValueSpace:p.showKeyValueSpace,renderNodeKey:Me,renderNodeValue:We,onNodeClick:Ae,onBracketsClick:ye,onIconClick:Y,onSelectedChange:Fe,onValueChange:ge,style:p.itemHeight&&p.itemHeight!==20?{lineHeight:"".concat(p.itemHeight,"px")}:{}},null)});return(0,j.createVNode)("div",{ref:d,class:{"vjs-tree":!0,"is-virtual":p.virtual},onScroll:p.virtual?$e:void 0,style:p.showLineNumber?O({paddingLeft:"".concat(12*Number(H.value.length.toString().length),"px")},p.style):p.style},[p.virtual?(0,j.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(p.height,"px")}},[(0,j.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(Oe.value.length*p.itemHeight,"px")}},[(0,j.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(oe.translateY,"px)")}},[re])])]):re])}}})}(),F}()})})(Do);var gs=Do.exports;const vs=ql(gs);let Po;Po=Co({__name:"JsonPreview",props:{data:Object},setup(Ie){return(ot,L)=>(So(),Nu(Vl(vs),{path:"res",deep:3,showLength:!0,data:Ie.data},null,8,["data"]))}}),Kl=Ul(ms),Gl=Ul(Po)}));export{Kl as C,Gl as J,Mr as M,Eu as __tla};
|