You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
363 KiB
JavaScript

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

var pc=Object.defineProperty;var Ol=Object.getOwnPropertySymbols;var gc=Object.prototype.hasOwnProperty,vc=Object.prototype.propertyIsEnumerable;var Al=(b,V,h)=>V in b?pc(b,V,{enumerable:!0,configurable:!0,writable:!0,value:h}):b[V]=h,Pl=(b,V)=>{for(var h in V||(V={}))gc.call(V,h)&&Al(b,h,V[h]);if(Ol)for(var h of Ol(V))vc.call(V,h)&&Al(b,h,V[h]);return b};var Rn=(b,V,h)=>new Promise((R,$)=>{var oe=p=>{try{j(h.next(p))}catch(Z){$(Z)}},I=p=>{try{j(h.throw(p))}catch(Z){$(Z)}},j=p=>p.done?R(p.value):Promise.resolve(p.value).then(oe,I);j((h=h.apply(b,V)).next())});import{r as mc,K as bc,aC as os}from"./entry/index-CruxN-Hs-1723019140439.js";import{c as yc,b as xc,l as wc}from"./antd-BY-1PcYE.js";import{d as Ti,f as as,w as ki,y as Dl,u as ls,o as kc,b as _c,_ as zo,$ as ss,a2 as Sc,c as us,k as cs,G as Cc,r as Tc,h as Lc,a8 as Nc}from"./vue-aEZWZQSa.js";import{u as zc}from"./useWindowSizeFn--jCT5E3A.js";var So={exports:{}},El;function Tt(){return El||(El=1,function(b,V){(function(h,R){b.exports=R()})(yc,function(){var h=navigator.userAgent,R=navigator.platform,$=/gecko\/\d/i.test(h),oe=/MSIE \d/.test(h),I=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(h),j=/Edge\/(\d+)/.exec(h),p=oe||I||j,Z=p&&(oe?document.documentMode||6:+(j||I)[1]),K=!j&&/WebKit\//.test(h),J=K&&/Qt\/\d+\.\d+/.test(h),E=!j&&/Chrome\/(\d+)/.exec(h),te=E&&+E[1],U=/Opera\//.test(h),re=/Apple Computer/.test(navigator.vendor),ge=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(h),fe=/PhantomJS/.test(h),ne=re&&(/Mobile\/\w+/.test(h)||navigator.maxTouchPoints>2),A=/Android/.test(h),H=ne||A||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(h),Q=ne||/Mac/.test(R),de=/\bCrOS\b/.test(h),ue=/win/i.test(R),ve=U&&h.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(U=!1,K=!0);var P=Q&&(J||U&&(ve==null||ve<12.11)),k=$||p&&Z>=9;function N(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M=function(e,t){var n=e.className,r=N(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 _(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return _(e).appendChild(t)}function f(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 Y(e,t,n,r){var i=f(e,t,n,r);return i.setAttribute("role","presentation"),i}var G;document.createRange?G=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:G=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 x(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 T(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 se(e,t){var n=e.className;N(t).test(n)||(e.className+=(n?" ":"")+t)}function Ae(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!N(n[r]).test(t)&&(t+=" "+n[r]);return t}var Ue=function(e){e.select()};ne?Ue=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(Ue=function(e){try{e.select()}catch(t){}});function Be(e){return e.display.wrapper.ownerDocument}function Ke(e){return He(e.display.wrapper)}function He(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function Te(e){return Be(e).defaultView}function ze(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ce(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 Ie(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 De=function(){this.id=null,this.f=null,this.time=0,this.handler=ze(this.onTimeout,this)};De.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},De.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 Se(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ze=50,ut={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},Je={origin:"*mouse"},qe={origin:"+move"};function Ye(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 w=[""];function S(e){for(;w.length<=e;)w.push(ee(w)+" ");return w[e]}function ee(e){return e[e.length-1]}function Re(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function z(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function ie(){}function W(e,t){var n;return Object.create?n=Object.create(e):(ie.prototype=e,n=new ie),t&&ce(t,n),n}var We=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ye(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||We.test(e))}function _e(e,t){return t?t.source.indexOf("\\w")>-1&&ye(e)?!0:t.test(e):ye(e)}function xe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var y=/[\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 m(e){return e.charCodeAt(0)>=768&&y.test(e)}function B(e,t,n){for(;(n<0?t>0:t<e.length)&&m(e.charAt(t));)t+=n;return t}function Le(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 tt(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 ft=null;function Wt(e,t,n){var r;ft=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:ft=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:ft=i)}return r!=null?r:ft}var Dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(u,d,v){this.level=u,this.from=d,this.to=v}return function(u,d){var v=d=="ltr"?"L":"R";if(u.length==0||d=="ltr"&&!r.test(u))return!1;for(var L=u.length,C=[],F=0;F<L;++F)C.push(n(u.charCodeAt(F)));for(var X=0,le=v;X<L;++X){var he=C[X];he=="m"?C[X]=le:le=he}for(var be=0,pe=v;be<L;++be){var we=C[be];we=="1"&&pe=="r"?C[be]="n":o.test(we)&&(pe=we,we=="r"&&(C[be]="R"))}for(var Oe=1,Ne=C[0];Oe<L-1;++Oe){var je=C[Oe];je=="+"&&Ne=="1"&&C[Oe+1]=="1"?C[Oe]="1":je==","&&Ne==C[Oe+1]&&(Ne=="1"||Ne=="n")&&(C[Oe]=Ne),Ne=je}for(var Qe=0;Qe<L;++Qe){var vt=C[Qe];if(vt==",")C[Qe]="N";else if(vt=="%"){var et=void 0;for(et=Qe+1;et<L&&C[et]=="%";++et);for(var Ft=Qe&&C[Qe-1]=="!"||et<L&&C[et]=="1"?"1":"N",Ot=Qe;Ot<et;++Ot)C[Ot]=Ft;Qe=et-1}}for(var lt=0,At=v;lt<L;++lt){var bt=C[lt];At=="L"&&bt=="1"?C[lt]="L":o.test(bt)&&(At=bt)}for(var ct=0;ct<L;++ct)if(i.test(C[ct])){var st=void 0;for(st=ct+1;st<L&&i.test(C[st]);++st);for(var ot=(ct?C[ct-1]:v)=="L",Pt=(st<L?C[st]:v)=="L",un=ot==Pt?ot?"L":"R":v,Sr=ct;Sr<st;++Sr)C[Sr]=un;ct=st-1}for(var _t=[],nr,mt=0;mt<L;)if(a.test(C[mt])){var ko=mt;for(++mt;mt<L&&a.test(C[mt]);++mt);_t.push(new s(0,ko,mt))}else{var fr=mt,Dr=_t.length,Er=d=="rtl"?1:0;for(++mt;mt<L&&C[mt]!="L";++mt);for(var Ct=fr;Ct<mt;)if(l.test(C[Ct])){fr<Ct&&(_t.splice(Dr,0,new s(1,fr,Ct)),Dr+=Er);var cn=Ct;for(++Ct;Ct<mt&&l.test(C[Ct]);++Ct);_t.splice(Dr,0,new s(2,cn,Ct)),Dr+=Er,fr=Ct}else++Ct;fr<mt&&_t.splice(Dr,0,new s(1,fr,mt))}return d=="ltr"&&(_t[0].level==1&&(nr=u.match(/^\s+/))&&(_t[0].from=nr[0].length,_t.unshift(new s(0,0,nr[0].length))),ee(_t).level==1&&(nr=u.match(/\s+$/))&&(ee(_t).to-=nr[0].length,_t.push(new s(0,L-nr[0].length,L)))),d=="rtl"?_t.reverse():_t}}();function Ee(e,t){var n=e.order;return n==null&&(n=e.order=Dt(e.text,t)),n}var yt=[],Me=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 ir(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=Se(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function rt(e,t){var n=ir(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 nt(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),rt(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)Se(n,t[r])==-1&&n.push(t[r])}function Et(e,t){return ir(e,t).length>0}function Kt(e){e.prototype.on=function(t,n){Me(this,t,n)},e.prototype.off=function(t,n){xt(this,t,n)}}function wt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Lt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function dr(e){wt(e),Fr(e)}function dn(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)),Q&&e.ctrlKey&&t==1&&(t=3),t}var Ni=function(){if(p&&Z<9)return!1;var e=f("div");return"draggable"in e||"dragDrop"in e}(),Wr;function Kn(e){if(Wr==null){var t=f("span","");O(e,f("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Wr=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&Z<8))}var n=Wr?f("span",""):f("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var hn;function hr(e){if(hn!=null)return hn;var t=O(e,document.createTextNode("AخA")),n=G(t,0,1).getBoundingClientRect(),r=G(t,1,2).getBoundingClientRect();return _(e),!n||n.left==n.right?!1:hn=r.right-n.right<3}var Rt=`
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/)},pr=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},Un=function(){var e=f("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Gt=null;function zi(e){if(Gt!=null)return Gt;var t=O(e,f("span","x")),n=t.getBoundingClientRect(),r=G(t,0,1).getBoundingClientRect();return Gt=Math.abs(n.left-r.left)>1}var jr={},Xt={};function Yt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),jr[e]=t}function Cr(e,t){Xt[e]=t}function Hr(e){if(typeof e=="string"&&Xt.hasOwnProperty(e))e=Xt[e];else if(e&&typeof e.name=="string"&&Xt.hasOwnProperty(e.name)){var t=Xt[e.name];typeof t=="string"&&(t={name:t}),e=W(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function qr(e,t){t=Hr(t);var n=jr[t.name];if(!n)return qr(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]={};ce(t,n)}function $t(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 pn(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 Rr(e,t,n){return e.startState?e.startState(t,n):!0}var it=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};it.prototype.eol=function(){return this.pos>=this.string.length},it.prototype.sol=function(){return this.pos==this.lineStart},it.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},it.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},it.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},it.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},it.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},it.prototype.skipToEnd=function(){this.pos=this.string.length},it.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},it.prototype.backUp=function(e){this.pos-=e},it.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ie(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ie(this.string,this.lineStart,this.tabSize):0)},it.prototype.indentation=function(){return Ie(this.string,null,this.tabSize)-(this.lineStart?Ie(this.string,this.lineStart,this.tabSize):0)},it.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)}},it.prototype.current=function(){return this.string.slice(this.start,this.pos)},it.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},it.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},it.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ce(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 or(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 gn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function jt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function c(e){if(e.parent==null)return null;for(var t=e.parent,n=Se(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 g(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 q(e,t){return t>=e.first&&t<e.first+e.size}function ae(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function D(e,t,n){if(n===void 0&&(n=null),!(this instanceof D))return new D(e,t,n);this.line=e,this.ch=t,this.sticky=n}function me(e,t){return e.line-t.line||e.ch-t.ch}function Ge(e,t){return e.sticky==t.sticky&&me(e,t)==0}function dt(e){return D(e.line,e.ch)}function Nt(e,t){return me(e,t)<0?t:e}function Kr(e,t){return me(e,t)<0?e:t}function Ao(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Fe(e,t){if(t.line<e.first)return D(e.first,0);var n=e.first+e.size-1;return t.line>n?D(n,Ce(e,n).text.length):gs(t,Ce(e,t.line).text.length)}function gs(e,t){var n=e.ch;return n==null||n>t?D(e.line,t):n<0?D(e.line,0):e}function Po(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Fe(e,t[r]);return n}var Gn=function(e,t){this.state=e,this.lookAhead=t},er=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};er.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},er.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}},er.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},er.fromSaved=function(e,t,n){return t instanceof Gn?new er(e,$t(e.mode,t.state),n,t.lookAhead):new er(e,$t(e.mode,t),n)},er.prototype.save=function(e){var t=e!==!1?$t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Gn(t,this.maxLookAhead):t};function Do(e,t,n,r){var i=[e.state.modeGen],o={};Ho(e,t.text,e.doc.mode,n,function(u,d){return i.push(u,d)},o,r);for(var a=n.state,l=function(u){n.baseTokens=i;var d=e.state.overlays[u],v=1,L=0;n.state=!0,Ho(e,t.text,d.mode,n,function(C,F){for(var X=v;L<C;){var le=i[v];le>C&&i.splice(v,1,C,i[v+1],le),v+=2,L=Math.min(C,le)}if(F)if(d.opaque)i.splice(X,v-X,C,"overlay "+F),v=X+2;else for(;X<v;X+=2){var he=i[X+1];i[X+1]=(he?he+" ":"")+"overlay "+F}},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 Eo(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=vn(e,c(t)),i=t.text.length>e.options.maxHighlightLength&&$t(e.doc.mode,r.state),o=Do(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 vn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new er(r,!0,t);var o=vs(e,t,n),a=o>r.first&&Ce(r,o-1).stateAfter,l=a?er.fromSaved(r,a,o):new er(r,Rr(r.mode),o);return r.iter(o,t,function(s){Mi(e,s.text,l);var u=l.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function Mi(e,t,n,r){var i=e.doc.mode,o=new it(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&Io(i,n.state);!o.eol();)Oi(i,o,n.state),o.start=o.pos}function Io(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=pn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Oi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=pn(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 Fo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Wo(e,t,n,r){var i=e.doc,o=i.mode,a;t=Fe(i,t);var l=Ce(i,t.line),s=vn(e,t.line,n),u=new it(l.text,e.options.tabSize,s),d;for(r&&(d=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Oi(o,u,s.state),r&&d.push(new Fo(u,a,$t(i.mode,s.state)));return r?d:new Fo(u,a,s.state)}function jo(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 Ho(e,t,n,r,i,o,a){var l=n.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,d=new it(t,e.options.tabSize,r),v,L=e.options.addModeClass&&[null];for(t==""&&jo(Io(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&Mi(e,t,r,d.pos),d.pos=t.length,v=null):v=jo(Oi(n,d,r.state,L),o),L){var C=L[0].name;C&&(v="m-"+(v?C+" "+v:C))}if(!l||u!=v){for(;s<d.start;)s=Math.min(d.start,s+5e3),i(s,u);u=v}d.start=d.pos}for(;s<d.pos;){var F=Math.min(d.pos,s+5e3);i(F,u),s=F}}function vs(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=Ce(o,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof Gn?u.lookAhead:0)<=o.modeFrontier))return l;var d=Ie(s.text,null,e.options.tabSize);(i==null||r>d)&&(i=l-1,r=d)}return i}function ms(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=Ce(e,r).stateAfter;if(i&&(!(i instanceof Gn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var qo=!1,ar=!1;function bs(){qo=!0}function ys(){ar=!0}function Xn(e,t,n){this.marker=e,this.from=t,this.to=n}function mn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function xs(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function ws(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 ks(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 Xn(a,o.from,s?null:o.to))}}return r}function _s(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 Xn(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=q(e,t.from.line)&&Ce(e,t.from.line).markedSpans,r=q(e,t.to.line)&&Ce(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=me(t.from,t.to)==0,l=ks(n,i,a),s=_s(r,o,a),u=t.text.length==1,d=ee(t.text).length+(u?i:0);if(l)for(var v=0;v<l.length;++v){var L=l[v];if(L.to==null){var C=mn(s,L.marker);C?u&&(L.to=C.to==null?null:C.to+d):L.to=i}}if(s)for(var F=0;F<s.length;++F){var X=s[F];if(X.to!=null&&(X.to+=d),X.from==null){var le=mn(l,X.marker);le||(X.from=d,u&&(l||(l=[])).push(X))}else X.from+=d,u&&(l||(l=[])).push(X)}l&&(l=Bo(l)),s&&s!=l&&(s=Bo(s));var he=[l];if(!u){var be=t.text.length-2,pe;if(be>0&&l)for(var we=0;we<l.length;++we)l[we].to==null&&(pe||(pe=[])).push(new Xn(l[we].marker,null,null));for(var Oe=0;Oe<be;++Oe)he.push(pe);he.push(s)}return he}function Bo(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 Ss(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(C){if(C.markedSpans)for(var F=0;F<C.markedSpans.length;++F){var X=C.markedSpans[F].marker;X.readOnly&&(!r||Se(r,X)==-1)&&(r||(r=[])).push(X)}}),!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 u=i[s];if(!(me(u.to,l.from)<0||me(u.from,l.to)>0)){var d=[s,1],v=me(u.from,l.from),L=me(u.to,l.to);(v<0||!a.inclusiveLeft&&!v)&&d.push({from:u.from,to:l.from}),(L>0||!a.inclusiveRight&&!L)&&d.push({from:l.to,to:u.to}),i.splice.apply(i,d),s+=d.length-3}}return i}function Ro(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ko(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Yn(e){return e.inclusiveLeft?-1:0}function Vn(e){return e.inclusiveRight?1:0}function Pi(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=me(r.from,i.from)||Yn(e)-Yn(t);if(o)return-o;var a=me(r.to,i.to)||Vn(e)-Vn(t);return a||t.id-e.id}function Uo(e,t){var n=ar&&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||Pi(r,i.marker)<0)&&(r=i.marker);return r}function Go(e){return Uo(e,!0)}function Qn(e){return Uo(e,!1)}function Cs(e,t){var n=ar&&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||Pi(r,o.marker)<0)&&(r=o.marker)}return r}function Xo(e,t,n,r,i){var o=Ce(e,t),a=ar&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),d=me(u.from,n)||Yn(s.marker)-Yn(i),v=me(u.to,r)||Vn(s.marker)-Vn(i);if(!(d>=0&&v<=0||d<=0&&v>=0)&&(d<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,n)>=0:me(u.to,n)>0)||d>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,r)<=0:me(u.from,r)<0)))return!0}}}function Vt(e){for(var t;t=Go(e);)e=t.find(-1,!0).line;return e}function Ts(e){for(var t;t=Qn(e);)e=t.find(1,!0).line;return e}function Ls(e){for(var t,n;t=Qn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Di(e,t){var n=Ce(e,t),r=Vt(n);return n==r?t:c(r)}function Yo(e,t){if(t>e.lastLine())return t;var n=Ce(e,t),r;if(!vr(e,n))return t;for(;r=Qn(n);)n=r.find(1,!0).line;return c(n)+1}function vr(e,t){var n=ar&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Ei(e,t,r))return!0}}}function Ei(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Ei(e,r.line,mn(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)&&Ei(e,t,i))return!0}function lr(e){e=Vt(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 Zn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Go(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Qn(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 Ii(e){var t=e.display,n=e.doc;t.maxLine=Ce(n,n.first),t.maxLineLength=Zn(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Zn(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Ur=function(e,t,n){this.text=e,Ko(this,t),this.height=n?n(this):1};Ur.prototype.lineNo=function(){return c(this)},Kt(Ur);function Ns(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ro(e),Ko(e,n);var i=r?r(e):1;i!=e.height&&jt(e,i)}function zs(e){e.parent=null,Ro(e)}var Ms={},Os={};function Vo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Os:Ms;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qo(e,t){var n=Y("span",null,null,K?"padding-right: .1px":null),r={pre:Y("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=Ps,hr(e.display.measure)&&(a=Ee(o,e.doc.direction))&&(r.addToken=Es(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&c(o);Is(o,r,Eo(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=Ae(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=Ae(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Kn(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(K){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 rt(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ae(r.pre.className,r.textClass||"")),r}function As(e){var t=f("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ps(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?Ds(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,d;if(!s.test(t))e.col+=t.length,d=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,d),p&&Z<9&&(u=!0),e.pos+=t.length;else{d=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var L=s.exec(t),C=L?L.index-v:t.length-v;if(C){var F=document.createTextNode(l.slice(v,v+C));p&&Z<9?d.appendChild(f("span",[F])):d.appendChild(F),e.map.push(e.pos,e.pos+C,F),e.col+=C,e.pos+=C}if(!L)break;v+=C+1;var X=void 0;if(L[0]==" "){var le=e.cm.options.tabSize,he=le-e.col%le;X=d.appendChild(f("span",S(he),"cm-tab")),X.setAttribute("role","presentation"),X.setAttribute("cm-text"," "),e.col+=he}else L[0]=="\r"||L[0]==`
`?(X=d.appendChild(f("span",L[0]=="\r"?"␍":"␤","cm-invalidchar")),X.setAttribute("cm-text",L[0]),e.col+=1):(X=e.cm.options.specialCharPlaceholder(L[0]),X.setAttribute("cm-text",L[0]),p&&Z<9?d.appendChild(f("span",[X])):d.appendChild(X),e.col+=1);e.map.push(e.pos,e.pos+1,X),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||u||o||a){var be=n||"";r&&(be+=r),i&&(be+=i);var pe=f("span",[d],be,o);if(a)for(var we in a)a.hasOwnProperty(we)&&we!="style"&&we!="class"&&pe.setAttribute(we,a[we]);return e.content.appendChild(pe)}e.content.appendChild(d)}}function Ds(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=" "),r+=o,n=o==" "}return r}function Es(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,d=u+r.length;;){for(var v=void 0,L=0;L<t.length&&(v=t[L],!(v.to>u&&v.from<=u));L++);if(v.to>=d)return e(n,r,i,o,a,l,s);e(n,r.slice(0,v.to-u),i,o,null,l,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Zo(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 Is(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]),Vo(n[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,d="",v,L,C=0,F,X,le,he,be;;){if(C==s){F=X=le=L="",be=null,he=null,C=1/0;for(var pe=[],we=void 0,Oe=0;Oe<r.length;++Oe){var Ne=r[Oe],je=Ne.marker;if(je.type=="bookmark"&&Ne.from==s&&je.widgetNode)pe.push(je);else if(Ne.from<=s&&(Ne.to==null||Ne.to>s||je.collapsed&&Ne.to==s&&Ne.from==s)){if(Ne.to!=null&&Ne.to!=s&&C>Ne.to&&(C=Ne.to,X=""),je.className&&(F+=" "+je.className),je.css&&(L=(L?L+";":"")+je.css),je.startStyle&&Ne.from==s&&(le+=" "+je.startStyle),je.endStyle&&Ne.to==C&&(we||(we=[])).push(je.endStyle,Ne.to),je.title&&((be||(be={})).title=je.title),je.attributes)for(var Qe in je.attributes)(be||(be={}))[Qe]=je.attributes[Qe];je.collapsed&&(!he||Pi(he.marker,je)<0)&&(he=Ne)}else Ne.from>s&&C>Ne.from&&(C=Ne.from)}if(we)for(var vt=0;vt<we.length;vt+=2)we[vt+1]==C&&(X+=" "+we[vt]);if(!he||he.from==s)for(var et=0;et<pe.length;++et)Zo(t,0,pe[et]);if(he&&(he.from||0)==s){if(Zo(t,(he.to==null?l+1:he.to)-s,he.marker,he.from==null),he.to==null)return;he.to==s&&(he=!1)}}if(s>=l)break;for(var Ft=Math.min(l,C);;){if(d){var Ot=s+d.length;if(!he){var lt=Ot>Ft?d.slice(0,Ft-s):d;t.addToken(t,lt,v?v+F:F,le,s+lt.length==C?X:"",L,be)}if(Ot>=Ft){d=d.slice(Ft-s),s=Ft;break}s=Ot,le=""}d=i.slice(o,o=n[u++]),v=Vo(n[u++],t.cm.options)}}}function Jo(e,t,n){this.line=t,this.rest=Ls(t),this.size=this.rest?c(ee(this.rest))-n+1:1,this.node=this.text=null,this.hidden=vr(e,t)}function Jn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new Jo(e.doc,Ce(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Gr=null;function Fs(e){Gr?Gr.ops.push(e):e.ownsGroup=Gr={ops:[e],delayedCallbacks:[]}}function Ws(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 js(e,t){var n=e.ownsGroup;if(n)try{Ws(n)}finally{Gr=null,t(n)}}var bn=null;function ht(e,t){var n=ir(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Gr?i=Gr.delayedCallbacks:bn?i=bn:(i=bn=[],setTimeout(Hs,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function Hs(){var e=bn;bn=null;for(var t=0;t<e.length;++t)e[t]()}function $o(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Bs(e,t):o=="gutter"?ta(e,t,n,r):o=="class"?Fi(e,t):o=="widget"&&Rs(e,t,r)}t.changes=null}function yn(e){return e.node==e.text&&(e.node=f("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),p&&Z<8&&(e.node.style.zIndex=2)),e.node}function qs(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=yn(t);t.background=r.insertBefore(f("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function ea(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Qo(e,t)}function Bs(e,t){var n=t.text.className,r=ea(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,Fi(e,t)):n&&(t.text.className=n)}function Fi(e,t){qs(e,t),t.line.wrapClass?yn(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 ta(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=yn(t);t.gutterBackground=f("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=yn(t),l=t.gutter=f("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(f("div",ae(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 u=e.display.gutterSpecs[s].className,d=o.hasOwnProperty(u)&&o[u];d&&l.appendChild(f("div",[d],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Rs(e,t,n){t.alignable&&(t.alignable=null);for(var r=N("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);ra(e,t,n)}function Ks(e,t,n,r){var i=ea(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Fi(e,t),ta(e,t,n,r),ra(e,t,r),t.node}function ra(e,t,n){if(na(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)na(e,t.rest[r],t,n,!1)}function na(e,t,n,r,i){if(t.widgets)for(var o=yn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=f("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Us(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),ht(s,"redraw")}}function Us(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 xn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!x(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;"),O(t.display.measure,f("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function sr(e,t){for(var n=dn(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 $n(e){return e.lineSpace.offsetTop}function Wi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ia(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,f("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 tr(e){return Ze-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-tr(e)-e.display.barWidth}function ji(e){return e.display.scroller.clientHeight-tr(e)-e.display.barHeight}function Gs(e,t,n){var r=e.options.lineWrapping,i=r&&Tr(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function oa(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(c(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Xs(e,t){t=Vt(t);var n=c(t),r=e.display.externalMeasured=new Jo(e.doc,t,n);r.lineN=n;var i=r.built=Qo(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}function aa(e,t,n,r){return rr(e,Xr(e,t),n,r)}function Hi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[zr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Xr(e,t){var n=c(t),r=Hi(e,n);r&&!r.text?r=null:r&&r.changes&&($o(e,r,n,Ui(e)),e.curOp.forceUpdate=!0),r||(r=Xs(e,t));var i=oa(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function rr(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||(Gs(e,t.view,t.rect),t.hasHeights=!0),a=Vs(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 la={left:0,right:0,top:0,bottom:0};function sa(e,t,n){for(var r,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(r=e[u+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],a="left";if(n=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Ys(e,t){var n=la;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 Vs(e,t,n,r){var i=sa(t.map,n,r),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var d=0;d<4;d++){for(;a&&m(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&m(t.line.text.charAt(i.coverStart+l));)++l;if(p&&Z<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Ys(G(o,a,l).getClientRects(),r),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}p&&Z<11&&(u=Qs(e.display.measure,u))}else{a>0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(p&&Z<9&&!a&&(!u||!u.left&&!u.right)){var L=o.parentNode.getClientRects()[0];L?u={left:L.left,right:L.left+Vr(e.display),top:L.top,bottom:L.bottom}:u=la}for(var C=u.top-t.rect.top,F=u.bottom-t.rect.top,X=(C+F)/2,le=t.view.measure.heights,he=0;he<le.length-1&&!(X<le[he]);he++);var be=he?le[he-1]:0,pe=le[he],we={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:be,bottom:pe};return!u.left&&!u.right&&(we.bogus=!0),e.options.singleCursorHeightPerLine||(we.rtop=C,we.rbottom=F),we}function Qs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zi(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 ua(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 ca(e){e.display.externalMeasure=null,_(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ua(e.display.view[t])}function wn(e){ca(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fa(e){return E&&A?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function da(e){return E&&A?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function qi(e){var t=Vt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=xn(n[i]));return r}function ei(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=lr(t);if(r=="local"?a+=$n(e.display):a-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(r=="window"?0:da(Be(e)));var s=l.left+(r=="window"?0:fa(Be(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function ha(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=fa(Be(e)),i-=da(Be(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 ti(e,t,n,r,i){return r||(r=Ce(e.doc,t.line)),ei(e,r,aa(e,r,t.ch,i),n)}function Qt(e,t,n,r,i,o){r=r||Ce(e.doc,t.line),i||(i=Xr(e,r));function a(F,X){var le=rr(e,i,F,X?"right":"left",o);return X?le.left=le.right:le.right=le.left,ei(e,r,le,n)}var l=Ee(r,e.doc.direction),s=t.ch,u=t.sticky;if(s>=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a(u=="before"?s-1:s,u=="before");function d(F,X,le){var he=l[X],be=he.level==1;return a(le?F-1:F,be!=le)}var v=Wt(l,s,u),L=ft,C=d(s,v,u=="before");return L!=null&&(C.other=d(s,L,u!="before")),C}function pa(e,t){var n=0;t=Fe(e.doc,t),e.options.lineWrapping||(n=Vr(e.display)*t.ch);var r=Ce(e.doc,t.line),i=lr(r)+$n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Bi(e,t,n,r,i){var o=D(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Ri(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Bi(r.first,0,null,-1,-1);var i=g(r,n),o=r.first+r.size-1;if(i>o)return Bi(r.first+r.size-1,Ce(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ce(r,i);;){var l=Zs(e,a,i,t,n),s=Cs(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=Ce(r,i=u.line)}}function ga(e,t,n,r){r-=qi(t);var i=t.text.length,o=Le(function(a){return rr(e,n,a-1).bottom<=r},i,0);return i=Le(function(a){return rr(e,n,a).top>r},o,i),{begin:o,end:i}}function va(e,t,n,r){n||(n=Xr(e,t));var i=ei(e,t,rr(e,n,r),"line").top;return ga(e,t,n,i)}function Ki(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Zs(e,t,n,r,i){i-=lr(t);var o=Xr(e,t),a=qi(t),l=0,s=t.text.length,u=!0,d=Ee(t,e.doc.direction);if(d){var v=(e.options.lineWrapping?$s:Js)(e,t,n,o,d,r,i);u=v.level!=1,l=u?v.from:v.to-1,s=u?v.to:v.from-1}var L=null,C=null,F=Le(function(Oe){var Ne=rr(e,o,Oe);return Ne.top+=a,Ne.bottom+=a,Ki(Ne,r,i,!1)?(Ne.top<=i&&Ne.left<=r&&(L=Oe,C=Ne),!0):!1},l,s),X,le,he=!1;if(C){var be=r-C.left<C.right-r,pe=be==u;F=L+(pe?0:1),le=pe?"after":"before",X=be?C.left:C.right}else{!u&&(F==s||F==l)&&F++,le=F==0?"after":F==t.text.length?"before":rr(e,o,F-(u?1:0)).bottom+a<=i==u?"after":"before";var we=Qt(e,D(n,F,le),"line",t,o);X=we.left,he=i<we.top?-1:i>=we.bottom?1:0}return F=B(t.text,F,1),Bi(n,F,le,he,r-X)}function Js(e,t,n,r,i,o,a){var l=Le(function(v){var L=i[v],C=L.level!=1;return Ki(Qt(e,D(n,C?L.to:L.from,C?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,d=Qt(e,D(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ki(d,o,a,!0)&&d.top>a&&(s=i[l-1])}return s}function $s(e,t,n,r,i,o,a){var l=ga(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var d=null,v=null,L=0;L<i.length;L++){var C=i[L];if(!(C.from>=u||C.to<=s)){var F=C.level!=1,X=rr(e,r,F?Math.min(u,C.to)-1:Math.max(s,C.from)).right,le=X<o?o-X+1e9:X-o;(!d||v>le)&&(d=C,v=le)}}return d||(d=i[i.length-1]),d.from<s&&(d={from:s,to:d.to,level:d.level}),d.to>u&&(d={from:d.from,to:u,level:d.level}),d}var Lr;function Yr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Lr==null){Lr=f("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Lr.appendChild(document.createTextNode("x")),Lr.appendChild(f("br"));Lr.appendChild(document.createTextNode("x"))}O(e.measure,Lr);var n=Lr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),_(e.measure),n||1}function Vr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=f("span","xxxxxxxxxx"),n=f("pre",[t],"CodeMirror-line-like");O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ui(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:Gi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Gi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ma(e){var t=Yr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Vr(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 Xi(e){var t=e.doc,n=ma(e);t.iter(function(r){var i=n(r);i!=r.height&&jt(r,i)})}function Nr(e,t,n,r){var i=e.display;if(!n&&dn(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(v){return null}var s=Ri(e,o,a),u;if(r&&s.xRel>0&&(u=Ce(e.doc,s.line).text).length==s.ch){var d=Ie(u,u.length,e.options.tabSize)-u.length;s=D(s.line,Math.max(0,Math.round((o-ia(e.display).left)/Vr(e.display))-d))}return s}function zr(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 zt(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)ar&&Di(e.doc,t)<i.viewTo&&br(e);else if(n<=i.viewFrom)ar&&Yo(e.doc,n+r)>i.viewFrom?br(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)br(e);else if(t<=i.viewFrom){var o=ri(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):br(e)}else if(n>=i.viewTo){var a=ri(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):br(e)}else{var l=ri(e,t,t,-1),s=ri(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Jn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):br(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function mr(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[zr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);Se(a,n)==-1&&a.push(n)}}}function br(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ri(e,t,n,r){var i=zr(e,t),o,a=e.display.view;if(!ar||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(;Di(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 eu(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Jn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Jn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(zr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Jn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,zr(e,n)))),r.viewTo=n}function ba(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 kn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ya(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 u=s.empty();if(a){var d=a(e,s);d&&Yi(e,d,i)}else(u||e.options.showCursorWhenSelecting)&&Yi(e,s.head,i);u||tu(e,s,o)}}return r}function Yi(e,t,n){var r=Qt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(f("div"," ","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=ti(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(f("div"," ","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 ni(e,t){return e.top-t.top||e.left-t.left}function tu(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=ia(e.display),l=a.left,s=Math.max(r.sizerWidth,Tr(e)-r.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function d(pe,we,Oe,Ne){we<0&&(we=0),we=Math.round(we),Ne=Math.round(Ne),o.appendChild(f("div",null,"CodeMirror-selected","position: absolute; left: "+pe+`px;
top: `+we+"px; width: "+(Oe==null?s-pe:Oe)+`px;
height: `+(Ne-we)+"px"))}function v(pe,we,Oe){var Ne=Ce(i,pe),je=Ne.text.length,Qe,vt;function et(lt,At){return ti(e,D(pe,lt),"div",Ne,At)}function Ft(lt,At,bt){var ct=va(e,Ne,null,lt),st=At=="ltr"==(bt=="after")?"left":"right",ot=bt=="after"?ct.begin:ct.end-(/\s/.test(Ne.text.charAt(ct.end-1))?2:1);return et(ot,st)[st]}var Ot=Ee(Ne,i.direction);return tt(Ot,we||0,Oe==null?je:Oe,function(lt,At,bt,ct){var st=bt=="ltr",ot=et(lt,st?"left":"right"),Pt=et(At-1,st?"right":"left"),un=we==null&&lt==0,Sr=Oe==null&&At==je,_t=ct==0,nr=!Ot||ct==Ot.length-1;if(Pt.top-ot.top<=3){var mt=(u?un:Sr)&&_t,ko=(u?Sr:un)&&nr,fr=mt?l:(st?ot:Pt).left,Dr=ko?s:(st?Pt:ot).right;d(fr,ot.top,Dr-fr,ot.bottom)}else{var Er,Ct,cn,_o;st?(Er=u&&un&&_t?l:ot.left,Ct=u?s:Ft(lt,bt,"before"),cn=u?l:Ft(At,bt,"after"),_o=u&&Sr&&nr?s:Pt.right):(Er=u?Ft(lt,bt,"before"):l,Ct=!u&&un&&_t?s:ot.right,cn=!u&&Sr&&nr?l:Pt.left,_o=u?Ft(At,bt,"after"):s),d(Er,ot.top,Ct-Er,ot.bottom),ot.bottom<Pt.top&&d(l,ot.bottom,null,Pt.top),d(cn,Pt.top,_o-cn,Pt.bottom)}(!Qe||ni(ot,Qe)<0)&&(Qe=ot),ni(Pt,Qe)<0&&(Qe=Pt),(!vt||ni(ot,vt)<0)&&(vt=ot),ni(Pt,vt)<0&&(vt=Pt)}),{start:Qe,end:vt}}var L=t.from(),C=t.to();if(L.line==C.line)v(L.line,L.ch,C.ch);else{var F=Ce(i,L.line),X=Ce(i,C.line),le=Vt(F)==Vt(X),he=v(L.line,L.ch,le?F.text.length+1:null).end,be=v(C.line,le?0:null,C.ch).start;le&&(he.top<be.top-2?(d(he.right,he.top,null,he.bottom),d(l,be.top,be.left,be.bottom)):d(he.right,he.top,be.left-he.right,he.bottom)),he.bottom<be.top&&d(l,he.bottom,null,be.top)}n.appendChild(o)}function Vi(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()||Qr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zi(e))}function Qi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Qr(e))},100)}function Zi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(rt(e,"focus",e,t),e.state.focused=!0,se(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),K&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Vi(e))}function Qr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(rt(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ii(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,u=void 0,d=0;if(!l.hidden){if(i+=l.line.height,p&&Z<8){var v=l.node.offsetTop+l.node.offsetHeight;u=v-n,n=v}else{var L=l.node.getBoundingClientRect();u=L.bottom-L.top,!s&&l.text.firstChild&&(d=l.text.firstChild.getBoundingClientRect().right-L.left-1)}var C=l.line.height-u;if((C>.005||C<-.005)&&(i<r&&(o-=C),jt(l.line,u),wa(l.line),l.rest))for(var F=0;F<l.rest.length;F++)wa(l.rest[F]);if(d>e.display.sizerWidth){var X=Math.ceil(d/Vr(e.display));X>e.display.maxLineLength&&(e.display.maxLineLength=X,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function wa(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 oi(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-$n(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=g(t,r),a=g(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=g(t,lr(Ce(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=g(t,lr(Ce(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function ru(e,t){if(!nt(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&&!fe){var a=f("div","",null,`position: absolute;
top: `+(t.top-n.viewOffset-$n(e.display))+`px;
height: `+(t.bottom-t.top+tr(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 nu(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?D(t.line,t.ch+1,"before"):t,t=t.ch?D(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Qt(e,t),s=!n||n==t?l:Qt(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 u=Ji(e,i),d=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(Sn(e,u.scrollTop),Math.abs(e.doc.scrollTop-d)>1&&(a=!0)),u.scrollLeft!=null&&(Mr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(a=!0)),!a)break}return i}function iu(e,t){var n=Ji(e,t);n.scrollTop!=null&&Sn(e,n.scrollTop),n.scrollLeft!=null&&Mr(e,n.scrollLeft)}function Ji(e,t){var n=e.display,r=Yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=ji(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Wi(n),s=t.top<r,u=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var d=Math.min(t.top,(u?l:t.bottom)-o);d!=i&&(a.scrollTop=d)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,L=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,C=Tr(e)-n.gutters.offsetWidth,F=t.right-t.left>C;return F&&(t.right=t.left+C),t.left<10?a.scrollLeft=0:t.left<L?a.scrollLeft=Math.max(0,t.left+v-(F?0:10)):t.right>C+L-3&&(a.scrollLeft=t.right+(F?0:10)-C),a}function $i(e,t){t!=null&&(ai(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Zr(e){ai(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _n(e,t,n){(t!=null||n!=null)&&ai(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function ou(e,t){ai(e),e.curOp.scrollToPos=t}function ai(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=pa(e,t.from),r=pa(e,t.to);ka(e,n,r,t.margin)}}function ka(e,t,n,r){var i=Ji(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});_n(e,i.scrollLeft,i.scrollTop)}function Sn(e,t){Math.abs(e.doc.scrollTop-t)<2||($||to(e,{top:t}),_a(e,t,!0),$&&to(e),Ln(e,100))}function _a(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 Mr(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,Na(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Cn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Wi(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+tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Or=function(e,t,n){this.cm=n;var r=this.vert=f("div",[f("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=f("div",[f("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Me(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Me(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&Z<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Or.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.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}},Or.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Or.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Or.prototype.zeroWidthHack=function(){var e=Q&&!ge?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new De,this.disableVert=new De},Or.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)},Or.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Tn=function(){};Tn.prototype.update=function(){return{bottom:0,right:0}},Tn.prototype.setScrollLeft=function(){},Tn.prototype.setScrollTop=function(){},Tn.prototype.clear=function(){};function Jr(e,t){t||(t=Cn(e));var n=e.display.barWidth,r=e.display.barHeight;Sa(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ii(e),Sa(e,Cn(e)),n=e.display.barWidth,r=e.display.barHeight}function Sa(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 Ca={native:Or,null:Tn};function Ta(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ca[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Me(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"?Mr(e,t):Sn(e,t)},e),e.display.scrollbars.addClass&&se(e.display.wrapper,e.display.scrollbars.addClass)}var au=0;function Ar(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:++au,markArrays:null},Fs(e.curOp)}function Pr(e){var t=e.curOp;t&&js(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;lu(n)})}function lu(e){for(var t=e.ops,n=0;n<t.length;n++)su(t[n]);for(var r=0;r<t.length;r++)uu(t[r]);for(var i=0;i<t.length;i++)cu(t[i]);for(var o=0;o<t.length;o++)fu(t[o]);for(var a=0;a<t.length;a++)du(t[a])}function su(e){var t=e.cm,n=t.display;pu(t),e.updateMaxLine&&Ii(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 li(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function uu(e){e.updatedDisplay=e.mustUpdate&&eo(e.cm,e.update)}function cu(e){var t=e.cm,n=t.display;e.updatedDisplay&&ii(t),e.barMeasure=Cn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=aa(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function fu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Mr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==T(Ke(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&&Vi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&xa(e.cm)}function du(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&La(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&_a(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Mr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=nu(t,Fe(r,e.scrollToPos.from),Fe(r,e.scrollToPos.to),e.scrollToPos.margin);ru(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||rt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&rt(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&rt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function It(e,t){if(e.curOp)return t();Ar(e);try{return t()}finally{Pr(e)}}function pt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ar(e);try{return t.apply(e,arguments)}finally{Pr(e)}}}function St(e){return function(){if(this.curOp)return e.apply(this,arguments);Ar(this);try{return e.apply(this,arguments)}finally{Pr(this)}}}function gt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ar(t);try{return e.apply(this,arguments)}finally{Pr(t)}}}function Ln(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ze(hu,e))}function hu(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=vn(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?$t(t.mode,r.state):null,s=Do(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var u=o.styleClasses,d=s.classes;d?o.styleClasses=d:u&&(o.styleClasses=null);for(var v=!a||a.length!=o.styles.length||u!=d&&(!u||!d||u.bgClass!=d.bgClass||u.textClass!=d.textClass),L=0;!v&&L<a.length;++L)v=a[L]!=o.styles[L];v&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Mi(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Ln(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&It(e,function(){for(var o=0;o<i.length;o++)mr(e,i[o],"text")})}}var li=function(e,t,n){var r=e.display;this.viewport=t,this.visible=oi(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=n,this.dims=Ui(e),this.events=[]};li.prototype.signal=function(e,t){Et(e,t)&&this.events.push(arguments)},li.prototype.finish=function(){for(var e=0;e<this.events.length;e++)rt.apply(null,this.events[e])};function pu(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=tr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=tr(e)+"px",t.scrollbarsClipped=!0)}function gu(e){if(e.hasFocus())return null;var t=T(Ke(e));if(!t||!x(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=Te(e).getSelection();r.anchorNode&&r.extend&&x(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function vu(e){if(!(!e||!e.activeElt||e.activeElt==T(He(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&x(document.body,e.anchorNode)&&x(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 br(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&&ba(e)==0)return!1;za(e)&&(br(e),t.dims=Ui(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)),ar&&(o=Di(e.doc,o),a=Yo(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;eu(e,o,a),n.viewOffset=lr(Ce(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=ba(e);if(!l&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=gu(e);return s>4&&(n.lineDiv.style.display="none"),mu(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,vu(u),_(n.cursorDiv),_(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ln(e,400)),n.updateLineNumbers=null,!0}function La(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Tr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Wi(e.display)-ji(e),n.top)}),t.visible=oi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=oi(e.display,e.doc,n));if(!eo(e,t))break;ii(e);var i=Cn(e);kn(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 li(e,t);if(eo(e,n)){ii(e),La(e,n);var r=Cn(e);kn(e),Jr(e,r),no(e,r),n.finish()}}function mu(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(F){var X=F.nextSibling;return K&&Q&&e.display.currentWheelTarget==F?F.style.display="none":F.parentNode.removeChild(F),X}for(var s=r.view,u=r.viewFrom,d=0;d<s.length;d++){var v=s[d];if(!v.hidden)if(!v.node||v.node.parentNode!=o){var L=Ks(e,v,u,n);o.insertBefore(L,a)}else{for(;a!=v.node;)a=l(a);var C=i&&t!=null&&t<=u&&v.lineNumber;v.changes&&(Se(v.changes,"gutter")>-1&&(C=!1),$o(e,v,u,n)),C&&(_(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(ae(e.options,u)))),a=v.node.nextSibling}u+=v.size}for(;a;)a=l(a)}function ro(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ht(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+tr(e)+"px"}function Na(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Gi(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 za(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ae(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(f("div",[f("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 Ma(e){var t=e.gutters,n=e.gutterSpecs;_(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(f("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 Nn(e){Ma(e.display),zt(e),Na(e)}function bu(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=f("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=f("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Y("div",null,"CodeMirror-code"),i.selectionDiv=f("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=f("div",null,"CodeMirror-cursors"),i.measure=f("div",null,"CodeMirror-measure"),i.lineMeasure=f("div",null,"CodeMirror-measure"),i.lineSpace=Y("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=Y("div",[i.lineSpace],"CodeMirror-lines");i.mover=f("div",[o],null,"position: relative"),i.sizer=f("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=f("div",null,null,"position: absolute; height: "+Ze+"px; width: 1px;"),i.gutters=f("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=f("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=f("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),E&&te>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),p&&Z<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!K&&!($&&H)&&(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),Ma(i),n.init(i)}var si=0,ur=null;p?ur=-.53:$?ur=15:E?ur=-.7:re&&(ur=-1/3);function Oa(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 yu(e){var t=Oa(e);return t.x*=ur,t.y*=ur,t}function Aa(e,t){E&&te==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=Oa(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,u=l.scrollHeight>l.clientHeight;if(r&&s||i&&u){if(i&&Q&&K){e:for(var d=t.target,v=a.view;d!=l;d=d.parentNode)for(var L=0;L<v.length;L++)if(v[L].node==d){e.display.currentWheelTarget=d;break e}}if(r&&!$&&!U&&o!=null){i&&u&&Sn(e,Math.max(0,l.scrollTop+i*o)),Mr(e,Math.max(0,l.scrollLeft+r*o)),(!i||i&&u)&&wt(t),a.wheelStartX=null;return}if(i&&o!=null){var C=i*o,F=e.doc.scrollTop,X=F+a.wrapper.clientHeight;C<0?F=Math.max(0,F+C-50):X=Math.min(e.doc.height,X+C+50),to(e,{top:F,bottom:X})}si<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 le=l.scrollLeft-a.wheelStartX,he=l.scrollTop-a.wheelStartY,be=he&&a.wheelDY&&he/a.wheelDY||le&&a.wheelDX&&le/a.wheelDX;a.wheelStartX=a.wheelStartY=null,be&&(ur=(ur*si+be)/(si+1),++si)}},200)):(a.wheelDX+=r,a.wheelDY+=i))}}var Ht=function(e,t){this.ranges=e,this.primIndex=t};Ht.prototype.primary=function(){return this.ranges[this.primIndex]},Ht.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(!Ge(n.anchor,r.anchor)||!Ge(n.head,r.head))return!1}return!0},Ht.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Xe(dt(this.ranges[t].anchor),dt(this.ranges[t].head));return new Ht(e,this.primIndex)},Ht.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ht.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(me(t,r.from())>=0&&me(e,r.to())<=0)return n}return-1};var Xe=function(e,t){this.anchor=e,this.head=t};Xe.prototype.from=function(){return Kr(this.anchor,this.head)},Xe.prototype.to=function(){return Nt(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Zt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(L,C){return me(L.from(),C.from())}),n=Se(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=me(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var u=Kr(l.from(),a.from()),d=Nt(l.to(),a.to()),v=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Xe(v?d:u,v?u:d))}}return new Ht(t,n)}function yr(e,t){return new Ht([new Xe(e,t||e)],0)}function xr(e){return e.text?D(e.from.line+e.text.length-1,ee(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Pa(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return xr(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+=xr(t).ch-t.to.ch),D(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 Xe(Pa(i.anchor,t),Pa(i.head,t)))}return Zt(e.cm,n,e.sel.primIndex)}function Da(e,t,n){return e.line==t.line?D(n.line,e.ch-t.ch+n.ch):D(n.line+(e.line-t.line),e.ch)}function xu(e,t,n){for(var r=[],i=D(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Da(l.from,i,o),u=Da(xr(l),i,o);if(i=l.to,o=u,n=="around"){var d=e.sel.ranges[a],v=me(d.head,d.anchor)<0;r[a]=new Xe(v?u:s,v?s:u)}else r[a]=new Xe(s,s)}return new Ht(r,e.sel.primIndex)}function ao(e){e.doc.mode=qr(e.options,e.doc.modeOption),zn(e)}function zn(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,Ln(e,100),e.state.modeGen++,e.curOp&&zt(e)}function Ea(e,t){return t.from.ch==0&&t.to.ch==0&&ee(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function lo(e,t,n,r){function i(be){return n?n[be]:null}function o(be,pe,we){Ns(be,pe,we,r),ht(be,"change",be,t)}function a(be,pe){for(var we=[],Oe=be;Oe<pe;++Oe)we.push(new Ur(u[Oe],i(Oe),r));return we}var l=t.from,s=t.to,u=t.text,d=Ce(e,l.line),v=Ce(e,s.line),L=ee(u),C=i(u.length-1),F=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Ea(e,t)){var X=a(0,u.length-1);o(v,v.text,C),F&&e.remove(l.line,F),X.length&&e.insert(l.line,X)}else if(d==v)if(u.length==1)o(d,d.text.slice(0,l.ch)+L+d.text.slice(s.ch),C);else{var le=a(1,u.length-1);le.push(new Ur(L+d.text.slice(s.ch),C,r)),o(d,d.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,le)}else if(u.length==1)o(d,d.text.slice(0,l.ch)+u[0]+v.text.slice(s.ch),i(0)),e.remove(l.line+1,F);else{o(d,d.text.slice(0,l.ch)+u[0],i(0)),o(v,L+v.text.slice(s.ch),C);var he=a(1,u.length-1);F>1&&e.remove(l.line+1,F-1),e.insert(l.line+1,he)}ht(e,"change",e,t)}function wr(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 u=a&&s.sharedHist;n&&!u||(t(s.doc,u),r(s.doc,i,u))}}}r(e,null,!0)}function Ia(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Xi(e),ao(e),Fa(e),e.options.direction=t.direction,e.options.lineWrapping||Ii(e),e.options.mode=t.modeOption,zt(e)}function Fa(e){(e.doc.direction=="rtl"?se:M)(e.display.lineDiv,"CodeMirror-rtl")}function wu(e){It(e,function(){Fa(e),zt(e)})}function ui(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:xr(t),text:or(e,t.from,t.to)};return Ha(e,n,t.from.line,t.to.line+1),wr(e,function(r){return Ha(r,n,t.from.line,t.to.line+1)},!0),n}function Wa(e){for(;e.length;){var t=ee(e);if(t.ranges)e.pop();else break}}function ku(e,t){if(t)return Wa(e.done),ee(e.done);if(e.done.length&&!ee(e.done).ranges)return ee(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ee(e.done)}function ja(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=ku(i,i.lastOp==r)))l=ee(a.changes),me(t.from,t.to)==0&&me(t.from,l.to)==0?l.to=xr(t):a.changes.push(so(e,t));else{var s=ee(i.done);for((!s||!s.ranges)&&ci(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||rt(e,"historyAdded")}function _u(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 Su(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||_u(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:ci(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&Wa(i.undone)}function ci(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ha(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 Cu(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 Tu(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Cu(n[i]));return r}function qa(e,t){var n=Tu(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],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function $r(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?Ht.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],d=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var v in u)(d=v.match(/^spans_(\d+)$/))&&Se(t,Number(d[1]))>-1&&(ee(l)[v]=u[v],delete u[v])}}return r}function uo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=me(t,i)<0;o!=me(n,i)<0?(i=t,t=n):o!=me(t,n)<0&&(t=n)}return new Xe(i,t)}else return new Xe(n||t,t)}function fi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),kt(e,new Ht([uo(e.sel.primary(),t,n,i)],0),r)}function Ba(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]=uo(e.sel.ranges[o],t[o],null,i);var a=Zt(e.cm,r,e.sel.primIndex);kt(e,a,n)}function co(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,kt(e,Zt(e.cm,i,e.sel.primIndex),r)}function Ra(e,t,n,r){kt(e,yr(t,n),r)}function Lu(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 Xe(Fe(e,i[o].anchor),Fe(e,i[o].head))},origin:n&&n.origin};return rt(e,"beforeSelectionChange",e,r),e.cm&&rt(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Zt(e.cm,r.ranges,r.ranges.length-1):t}function Ka(e,t,n){var r=e.history.done,i=ee(r);i&&i.ranges?(r[r.length-1]=t,di(e,t,n)):kt(e,t,n)}function kt(e,t,n){di(e,t,n),Su(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function di(e,t,n){(Et(e,"beforeSelectionChange")||e.cm&&Et(e.cm,"beforeSelectionChange"))&&(t=Lu(e,t,n));var r=n&&n.bias||(me(t.primary().head,e.sel.primary().head)<0?-1:1);Ua(e,Xa(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Zr(e.cm)}function Ua(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Bt(e.cm)),ht(e,"cursorActivity",e))}function Ga(e){Ua(e,Xa(e,e.sel,null,!1))}function Xa(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=hi(e,a.anchor,l&&l.anchor,n,r),u=a.head==a.anchor?s:hi(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Xe(s,u))}return i?Zt(e.cm,i,t.primIndex):t}function en(e,t,n,r,i){var o=Ce(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,d="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(d?l.to>=t.ch:l.to>t.ch))){if(i&&(rt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),L=void 0;if((r<0?d:u)&&(v=Ya(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(L=me(v,n))&&(r<0?L<0:L>0))return en(e,v,t,r,i)}var C=s.find(r<0?-1:1);return(r<0?u:d)&&(C=Ya(e,C,r,C.line==t.line?o:null)),C?en(e,C,t,r,i):null}}return t}function hi(e,t,n,r,i){var o=r||1,a=en(e,t,n,o,i)||!i&&en(e,t,n,o,!0)||en(e,t,n,-o,i)||!i&&en(e,t,n,-o,!0);return a||(e.cantEdit=!0,D(e.first,0))}function Ya(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Fe(e,D(t.line-1)):null:n>0&&t.ch==(r||Ce(e,t.line)).text.length?t.line<e.first+e.size-1?D(t.line+1,0):null:new D(t.line,t.ch+n)}function Va(e){e.setSelection(D(e.firstLine(),0),D(e.lastLine()),ke)}function Qa(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=Fe(e,i)),o&&(r.to=Fe(e,o)),a&&(r.text=a),l!==void 0&&(r.origin=l)}),rt(e,"beforeChange",e,r),e.cm&&rt(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 tn(e,t,n){if(e.cm){if(!e.cm.curOp)return pt(e.cm,tn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Et(e,"beforeChange")||e.cm&&Et(e.cm,"beforeChange"))&&(t=Qa(e,t,!0),!t))){var r=qo&&!n&&Ss(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Za(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Za(e,t)}}function Za(e,t){if(!(t.text.length==1&&t.text[0]==""&&me(t.from,t.to)==0)){var n=oo(e,t);ja(e,t,n,e.cm?e.cm.curOp.id:NaN),Mn(e,t,n,Ai(e,t));var r=[];wr(e,function(i,o){!o&&Se(r,i.history)==-1&&(tl(i.history,t),r.push(i.history)),Mn(i,t,null,Ai(i,t))})}}function pi(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,u=0;u<l.length&&(o=l[u],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(ci(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 d=[];ci(a,s),s.push({changes:d,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var v=Et(e,"beforeChange")||e.cm&&Et(e.cm,"beforeChange"),L=function(X){var le=o.changes[X];if(le.origin=t,v&&!Qa(e,le,!1))return l.length=0,{};d.push(so(e,le));var he=X?oo(e,le):ee(l);Mn(e,le,he,qa(e,le)),!X&&e.cm&&e.cm.scrollIntoView({from:le.from,to:xr(le)});var be=[];wr(e,function(pe,we){!we&&Se(be,pe.history)==-1&&(tl(pe.history,le),be.push(pe.history)),Mn(pe,le,null,qa(pe,le))})},C=o.changes.length-1;C>=0;--C){var F=L(C);if(F)return F.v}}}}function Ja(e,t){if(t!=0&&(e.first+=t,e.sel=new Ht(Re(e.sel.ranges,function(i){return new Xe(D(i.anchor.line+t,i.anchor.ch),D(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){zt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)mr(e.cm,r,"gutter")}}function Mn(e,t,n,r){if(e.cm&&!e.cm.curOp)return pt(e.cm,Mn)(e,t,n,r);if(t.to.line<e.first){Ja(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);Ja(e,i),t={from:D(e.first,0),to:D(t.to.line+i,t.to.ch),text:[ee(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:D(o,Ce(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=or(e,t.from,t.to),n||(n=oo(e,t)),e.cm?Nu(e.cm,t,r):lo(e,t,r),di(e,n,ke),e.cantEdit&&hi(e,D(e.firstLine(),0))&&(e.cantEdit=!1)}}function Nu(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=c(Vt(Ce(r,o.line))),r.iter(s,a.line+1,function(C){if(C==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Bt(e),lo(r,t,n,ma(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(C){var F=Zn(C);F>i.maxLineLength&&(i.maxLine=C,i.maxLineLength=F,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),ms(r,o.line),Ln(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?zt(e):o.line==a.line&&t.text.length==1&&!Ea(e.doc,t)?mr(e,o.line,"text"):zt(e,o.line,a.line+1,u);var d=Et(e,"changes"),v=Et(e,"change");if(v||d){var L={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};v&&ht(e,"change",e,L),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(L)}e.display.selForContextMenu=null}function rn(e,t,n,r,i){var o;r||(r=n),me(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),tn(e,{from:n,to:r,text:t,origin:i})}function $a(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function el(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++)$a(o.ranges[l].anchor,t,n,r),$a(o.ranges[l].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=D(u.from.line+r,u.from.ch),u.to=D(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function tl(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;el(e.done,n,r,i),el(e.undone,n,r,i)}function On(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=Ce(e,Ao(e,t)):i=c(t),i==null?null:(r(o,i)&&e.cm&&mr(e.cm,i,n),o)}function An(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}An.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,zs(i),ht(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 An))){var l=[];this.collapse(l),this.children=[new An(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 An(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 i=Se(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new Pn(e.children);r.parent=e,e.children=[r,n],e=r}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 Dn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Dn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=c(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=xn(this);jt(n,Math.max(0,n.height-o)),e&&(It(e,function(){rl(e,n,-o),mr(e,r,"widget")}),ht(e,"lineWidgetCleared",e,this,r))}},Dn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=xn(this)-t;i&&(vr(this.doc,r)||jt(r,r.height+i),n&&It(n,function(){n.curOp.forceUpdate=!0,rl(n,r,i),ht(n,"lineWidgetChanged",n,e,c(r))}))},Kt(Dn);function rl(e,t,n){lr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&$i(e,n)}function zu(e,t,n,r){var i=new Dn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),On(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=lr(a)<e.scrollTop;jt(a,a.height+xn(i)),s&&$i(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ht(o,"lineWidgetAdded",o,i,typeof t=="number"?t:c(t)),i}var nl=0,kr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++nl};kr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ar(e),Et(this,"clear")){var n=this.find();n&&ht(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=mn(a.markedSpans,this);e&&!this.collapsed?mr(e,c(a),"text"):e&&(l.to!=null&&(i=c(a)),l.from!=null&&(r=c(a))),a.markedSpans=xs(a.markedSpans,l),l.from==null&&this.collapsed&&!vr(this.doc,a)&&e&&jt(a,Yr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=Vt(this.lines[s]),d=Zn(u);d>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&zt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ga(e.doc)),e&&ht(e,"markerCleared",e,this,r,i),t&&Pr(e),this.parent&&this.parent.clear()}},kr.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=mn(o.markedSpans,this);if(a.from!=null&&(n=D(t?o:c(o),a.from),e==-1))return n;if(a.to!=null&&(r=D(t?o:c(o),a.to),e==1))return r}return n&&{from:n,to:r}},kr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||It(r,function(){var i=t.line,o=c(t.line),a=Hi(r,o);if(a&&(ua(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=xn(n)-l;s&&jt(i,i.height+s)}ht(r,"markerChanged",r,e)})},kr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Se(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},kr.prototype.detachLine=function(e){if(this.lines.splice(Se(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Kt(kr);function nn(e,t,n,r,i){if(r&&r.shared)return Mu(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return pt(e.cm,nn)(e,t,n,r,i);var o=new kr(e,i),a=me(t,n);if(r&&ce(r,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Y("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Xo(e,t.line,t,n,o)||t.line!=n.line&&Xo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ys()}o.addToHistory&&ja(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&Vt(v)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&jt(v,0),ws(v,new Xn(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(v){vr(e,v)&&jt(v,0)}),o.clearOnEnter&&Me(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(bs(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++nl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)zt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var d=t.line;d<=n.line;d++)mr(s,d,"text");o.atomic&&Ga(s.doc),ht(s,"markerAdded",s,o)}return o}var En=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};En.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ht(this,"clear")}},En.prototype.find=function(e,t){return this.primary.find(e,t)},Kt(En);function Mu(e,t,n,r,i){r=ce(r),r.shared=!1;var o=[nn(e,t,n,r,i)],a=o[0],l=r.widgetNode;return wr(e,function(s){l&&(r.widgetNode=l.cloneNode(!0)),o.push(nn(s,Fe(s,t),Fe(s,n),r,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=ee(o)}),new En(o,a)}function il(e){return e.findMarks(D(e.first,0),e.clipPos(D(e.lastLine())),function(t){return t.parent})}function Ou(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(me(o,a)){var l=nn(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Au(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];wr(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];Se(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}var Pu=0,Mt=function(e,t,n,r,i){if(!(this instanceof Mt))return new Mt(e,t,n,r,i);n==null&&(n=0),Pn.call(this,[new An([new Ur("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=D(n,0);this.sel=yr(o),this.history=new ui(null),this.id=++Pu,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,yr(o),ke)};Mt.prototype=W(Pn.prototype,{constructor:Mt,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=gn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:gt(function(e){var t=D(this.first,0),n=this.first+this.size-1;tn(this,{from:t,to:D(n,Ce(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&_n(this.cm,0,0),kt(this,yr(t),ke)}),replaceRange:function(e,t,n,r){t=Fe(this,t),n=n?Fe(this,n):t,rn(this,e,t,n,r)},getRange:function(e,t,n){var r=or(this,Fe(this,e),Fe(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(q(this,e))return Ce(this,e)},getLineNumber:function(e){return c(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ce(this,e)),Vt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Fe(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:gt(function(e,t,n){Ra(this,Fe(this,typeof e=="number"?D(e,t||0):e),null,n)}),setSelection:gt(function(e,t,n){Ra(this,Fe(this,e),Fe(this,t||e),n)}),extendSelection:gt(function(e,t,n){fi(this,Fe(this,e),t&&Fe(this,t),n)}),extendSelections:gt(function(e,t){Ba(this,Po(this,e),t)}),extendSelectionsBy:gt(function(e,t){var n=Re(this.sel.ranges,e);Ba(this,Po(this,n),t)}),setSelections:gt(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Xe(Fe(this,e[i].anchor),Fe(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),kt(this,Zt(this.cm,r,t),n)}}),addSelection:gt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Xe(Fe(this,e),Fe(this,t||e))),kt(this,Zt(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=or(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=or(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:gt(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"&&xu(this,r,t),s=r.length-1;s>=0;s--)tn(this,r[s]);l?Ka(this,l):this.cm&&Zr(this.cm)}),undo:gt(function(){pi(this,"undo")}),redo:gt(function(){pi(this,"redo")}),undoSelection:gt(function(){pi(this,"undo",!0)}),redoSelection:gt(function(){pi(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 ui(this.history),wr(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:$r(this.history.done),undone:$r(this.history.undone)}},setHistory:function(e){var t=this.history=new ui(this.history);t.done=$r(e.done.slice(0),null,!0),t.undone=$r(e.undone.slice(0),null,!0)},setGutterMarker:gt(function(e,t,n){return On(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&xe(i)&&(r.gutterMarkers=null),!0})}),clearGutter:gt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&On(t,n,"gutter",function(){return n.gutterMarkers[e]=null,xe(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!q(this,e)||(t=e,e=Ce(this,e),!e))return null}else if(t=c(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:gt(function(e,t,n){return On(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(N(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:gt(function(e,t,n){return On(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(N(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:gt(function(e,t,n){return zu(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return nn(this,Fe(this,e),Fe(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=Fe(this,e),nn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Fe(this,e);var t=[],n=Ce(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=Fe(this,e),t=Fe(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}),Fe(this,D(n,t))},indexFromPos:function(e){e=Fe(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 Mt(gn(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 Mt(gn(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}],Ou(r,il(this)),r},unlinkDoc:function(e){if(e instanceof $e&&(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),Au(il(this));break}}if(e.history==this.history){var r=[e.id];wr(e,function(i){return r.push(i.id)},!0),e.history=new ui(null),e.history.done=$r(this.history.done,r),e.history.undone=$r(this.history.undone,r)}},iterLinkedDocs:function(e){wr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Rt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:gt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&wu(this.cm))})}),Mt.prototype.eachLine=Mt.prototype.iter;var ol=0;function Du(e){var t=this;if(al(t),!(nt(t,e)||sr(t.display,e))){wt(e),p&&(ol=+new Date);var n=Nr(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&&pt(t,function(){n=Fe(t.doc,n);var C={from:n,to:n,text:t.doc.splitLines(o.filter(function(F){return F!=null}).join(t.doc.lineSeparator())),origin:"paste"};tn(t.doc,C),Ka(t.doc,yr(Fe(t.doc,n),Fe(t.doc,xr(C))))})()},s=function(C,F){if(t.options.allowDropFileTypes&&Se(t.options.allowDropFileTypes,C.type)==-1){l();return}var X=new FileReader;X.onerror=function(){return l()},X.onload=function(){var le=X.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(le)){l();return}o[F]=le,l()},X.readAsText(C)},u=0;u<r.length;u++)s(r[u],u);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 d=e.dataTransfer.getData("Text");if(d){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),di(t.doc,yr(n,n)),v)for(var L=0;L<v.length;++L)rn(t.doc,"",v[L].anchor,v[L].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(C){}}}}function Eu(e,t){if(p&&(!e.state.draggingText||+new Date-ol<100)){dr(t);return}if(!(nt(e,t)||sr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!re)){var n=f("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",U&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),U&&n.parentNode.removeChild(n)}}function Iu(e,t){var n=Nr(e,t);if(n){var r=document.createDocumentFragment();Yi(e,n,r),e.display.dragCursor||(e.display.dragCursor=f("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}function al(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ll(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 sl=!1;function Fu(){sl||(Wu(),sl=!0)}function Wu(){var e;Me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ll(ju)},100))}),Me(window,"blur",function(){return ll(Qr)})}function ju(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var _r={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++)_r[In+48]=_r[In+96]=String(In);for(var gi=65;gi<=90;gi++)_r[gi]=String.fromCharCode(gi);for(var Fn=1;Fn<=12;Fn++)_r[Fn+111]=_r[Fn+63235]="F"+Fn;var cr={};cr.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"},cr.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"},cr.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"},cr.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"]},cr.default=Q?cr.macDefault:cr.pcDefault;function Hu(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 qu(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=Re(n.split(" "),Hu),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 u in t)e[u]=t[u];return e}function on(e,t,n,r){t=vi(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 on(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=on(e,t.fallthrough[o],n,r);if(a)return a}}}function ul(e){var t=typeof e=="string"?e:_r[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function cl(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(P?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(P?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function fl(e,t){if(U&&e.keyCode==34&&e.char)return!1;var n=_r[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),cl(n,e,t))}function vi(e){return typeof e=="string"?cr[e]:e}function an(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&me(o.from,ee(r).to)<=0;){var a=r.pop();if(me(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}It(e,function(){for(var l=r.length-1;l>=0;l--)rn(e.doc,"",r[l].from,r[l].to,"+delete");Zr(e)})}function fo(e,t,n){var r=B(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ho(e,t,n){var r=fo(e,t.ch,n);return r==null?null:new D(t.line,r,n<0?"after":"before")}function po(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Ee(n,t.doc.direction);if(o){var a=i<0?ee(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var d=Xr(t,n);u=i<0?n.text.length-1:0;var v=rr(t,d,u).top;u=Le(function(L){return rr(t,d,L).top==v},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=fo(n,u,1))}else u=i<0?a.to:a.from;return new D(r,u,s)}}return new D(r,i<0?n.text.length:0,i<0?"before":"after")}function Bu(e,t,n,r){var i=Ee(t,e.doc.direction);if(!i)return ho(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=Wt(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 ho(t,n,r);var l=function(he,be){return fo(t,he instanceof D?he.ch:he,be)},s,u=function(he){return e.options.lineWrapping?(s=s||Xr(e,t),va(e,t,s,he)):{begin:0,end:t.text.length}},d=u(n.sticky=="before"?l(n,-1):n.ch);if(e.doc.direction=="rtl"||a.level==1){var v=a.level==1==r<0,L=l(n,v?1:-1);if(L!=null&&(v?L<=a.to&&L<=d.end:L>=a.from&&L>=d.begin)){var C=v?"before":"after";return new D(n.line,L,C)}}var F=function(he,be,pe){for(var we=function(Qe,vt){return vt?new D(n.line,l(Qe,1),"before"):new D(n.line,Qe,"after")};he>=0&&he<i.length;he+=be){var Oe=i[he],Ne=be>0==(Oe.level!=1),je=Ne?pe.begin:l(pe.end,-1);if(Oe.from<=je&&je<Oe.to||(je=Ne?Oe.from:l(Oe.to,-1),pe.begin<=je&&je<pe.end))return we(je,Ne)}},X=F(o+r,r,d);if(X)return X;var le=r>0?d.end:l(d.begin,-1);return le!=null&&!(r>0&&le==t.text.length)&&(X=F(r>0?0:i.length-1,r,u(le)),X)?X:null}var Wn={selectAll:Va,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return an(e,function(t){if(t.empty()){var n=Ce(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:D(t.head.line+1,0)}:{from:t.head,to:D(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return an(e,function(t){return{from:D(t.from().line,0),to:Fe(e.doc,D(t.to().line+1,0))}})},delLineLeft:function(e){return an(e,function(t){return{from:D(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return an(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 an(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(D(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(D(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return dl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return hl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ru(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")},qe)},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")},qe)},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/)?hl(e,t.head):r},qe)},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=Ie(e.getLine(o.line),o.ch,r);t.push(S(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return It(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ce(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new D(i.line,i.ch-1)),i.ch>0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ce(e.doc,i.line-1).text;a&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),D(i.line-1,a.length-1),i,"+transpose"))}}n.push(new Xe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return It(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);Zr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function dl(e,t){var n=Ce(e.doc,t),r=Vt(n);return r!=n&&(t=c(r)),po(!0,e,r,t,1)}function Ru(e,t){var n=Ce(e.doc,t),r=Ts(n);return r!=n&&(t=c(r)),po(!0,e,n,t,-1)}function hl(e,t){var n=dl(e,t.line),r=Ce(e.doc,n.line),i=Ee(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 D(n.line,a?0:o,n.sticky)}return n}function mi(e,t,n){if(typeof t=="string"&&(t=Wn[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)!=ut}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Ku(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=on(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&on(t,e.options.extraKeys,n,e)||on(t,e.options.keyMap,n,e)}var Uu=new De;function jn(e,t,n,r){var i=e.state.keySeq;if(i){if(ul(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Uu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),pl(e,i+" "+t,n,r))return!0}return pl(e,t,n,r)}function pl(e,t,n,r){var i=Ku(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ht(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(wt(n),Vi(e)),!!i}function gl(e,t){var n=fl(t,!0);return n?t.shiftKey&&!e.state.keySeq?jn(e,"Shift-"+n,t,function(r){return mi(e,r,!0)})||jn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return mi(e,r)}):jn(e,n,t,function(r){return mi(e,r)}):!1}function Gu(e,t,n){return jn(e,"'"+n+"'",t,function(r){return mi(e,r,!0)})}var go=null;function vl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=T(Ke(t)),!nt(t,e))){p&&Z<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=gl(t,e);U&&(go=r?n:null,!r&&n==88&&!Un&&(Q?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),$&&!Q&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Xu(t)}}function Xu(e){var t=e.display.lineDiv;se(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(M(t,"CodeMirror-crosshair"),xt(document,"keyup",n),xt(document,"mouseover",n))}Me(document,"keyup",n),Me(document,"mouseover",n)}function ml(e){e.keyCode==16&&(this.doc.sel.shift=!1),nt(this,e)}function bl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(sr(t.display,e)||nt(t,e)||e.ctrlKey&&!e.altKey||Q&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(U&&n==go){go=null,wt(e);return}if(!(U&&(!e.which||e.which<10)&&gl(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(Gu(t,e,i)||t.display.input.onKeyPress(e))}}}var Yu=400,vo=function(e,t,n){this.time=e,this.pos=t,this.button=n};vo.prototype.compare=function(e,t,n){return this.time+Yu>e&&me(t,this.pos)==0&&n==this.button};var Hn,qn;function Vu(e,t){var n=+new Date;return qn&&qn.compare(n,e,t)?(Hn=qn=null,"triple"):Hn&&Hn.compare(n,e,t)?(qn=new vo(n,e,t),Hn=null,"double"):(Hn=new vo(n,e,t),qn=null,"single")}function yl(e){var t=this,n=t.display;if(!(nt(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,sr(n,e)){K||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!mo(t,e)){var r=Nr(t,e),i=Ut(e),o=r?Vu(r,i):"single";Te(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Qu(t,i,r,o,e))&&(i==1?r?Ju(t,r,o,e):dn(e)==n.scroller&&wt(e):i==2?(r&&fi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(k?t.display.input.onContextMenu(e):Qi(t)))}}}function Qu(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,jn(e,cl(o,i),i,function(a){if(typeof a=="string"&&(a=Wn[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=ut}finally{e.state.suppressEdits=!1}return l})}function Zu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=de?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=Q?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(Q?n.altKey:n.ctrlKey)),i}function Ju(e,t,n,r){p?setTimeout(ze(xa,e),0):e.curOp.focus=T(Ke(e));var i=Zu(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&Ni&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(me((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(me(a.to(),t)>0||t.xRel<0)?$u(e,r,t,i):ec(e,r,t,i)}function $u(e,t,n,r){var i=e.display,o=!1,a=pt(e,function(u){K&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Qi(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(u),r.addNew||fi(e.doc,n,null,null,r.extend),K&&!re||p&&Z==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};K&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,Me(i.wrapper.ownerDocument,"mouseup",a),Me(i.wrapper.ownerDocument,"mousemove",l),Me(i.scroller,"dragstart",s),Me(i.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function xl(e,t,n){if(n=="char")return new Xe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Xe(D(t.line,0),Fe(e.doc,D(t.line+1,0)));var r=n(e,t);return new Xe(r.from,r.to)}function ec(e,t,n,r){p&&Qi(e);var i=e.display,o=e.doc;wt(t);var a,l,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),l>-1?a=u[l]:a=new Xe(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new Xe(n,n)),n=Nr(e,t,!0,!0),l=-1;else{var d=xl(e,n,r.unit);r.extend?a=uo(a,d.anchor,d.head,r.extend):a=d}r.addNew?l==-1?(l=u.length,kt(o,Zt(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&r.unit=="char"&&!r.extend?(kt(o,Zt(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):co(o,l,a,Je):(l=0,kt(o,new Ht([a],0),Je),s=o.sel);var v=n;function L(pe){if(me(v,pe)!=0)if(v=pe,r.unit=="rectangle"){for(var we=[],Oe=e.options.tabSize,Ne=Ie(Ce(o,n.line).text,n.ch,Oe),je=Ie(Ce(o,pe.line).text,pe.ch,Oe),Qe=Math.min(Ne,je),vt=Math.max(Ne,je),et=Math.min(n.line,pe.line),Ft=Math.min(e.lastLine(),Math.max(n.line,pe.line));et<=Ft;et++){var Ot=Ce(o,et).text,lt=Ye(Ot,Qe,Oe);Qe==vt?we.push(new Xe(D(et,lt),D(et,lt))):Ot.length>lt&&we.push(new Xe(D(et,lt),D(et,Ye(Ot,vt,Oe))))}we.length||we.push(new Xe(n,n)),kt(o,Zt(e,s.ranges.slice(0,l).concat(we),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pe)}else{var At=a,bt=xl(e,pe,r.unit),ct=At.anchor,st;me(bt.anchor,ct)>0?(st=bt.head,ct=Kr(At.from(),bt.anchor)):(st=bt.anchor,ct=Nt(At.to(),bt.head));var ot=s.ranges.slice(0);ot[l]=tc(e,new Xe(Fe(o,ct),st)),kt(o,Zt(e,ot,l),Je)}}var C=i.wrapper.getBoundingClientRect(),F=0;function X(pe){var we=++F,Oe=Nr(e,pe,!0,r.unit=="rectangle");if(Oe)if(me(Oe,v)!=0){e.curOp.focus=T(Ke(e)),L(Oe);var Ne=oi(i,o);(Oe.line>=Ne.to||Oe.line<Ne.from)&&setTimeout(pt(e,function(){F==we&&X(pe)}),150)}else{var je=pe.clientY<C.top?-20:pe.clientY>C.bottom?20:0;je&&setTimeout(pt(e,function(){F==we&&(i.scroller.scrollTop+=je,X(pe))}),50)}}function le(pe){e.state.selectingText=!1,F=1/0,pe&&(wt(pe),i.input.focus()),xt(i.wrapper.ownerDocument,"mousemove",he),xt(i.wrapper.ownerDocument,"mouseup",be),o.history.lastSelOrigin=null}var he=pt(e,function(pe){pe.buttons===0||!Ut(pe)?le(pe):X(pe)}),be=pt(e,le);e.state.selectingText=be,Me(i.wrapper.ownerDocument,"mousemove",he),Me(i.wrapper.ownerDocument,"mouseup",be)}function tc(e,t){var n=t.anchor,r=t.head,i=Ce(e.doc,n.line);if(me(n,r)==0&&n.sticky==r.sticky)return t;var o=Ee(i);if(!o)return t;var a=Wt(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 u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var d=Wt(o,r.ch,r.sticky),v=d-a||(r.ch-n.ch)*(l.level==1?-1:1);d==s-1||d==s?u=v<0:u=v>0}var L=o[s+(u?-1:0)],C=u==(L.level==1),F=C?L.from:L.to,X=C?"after":"before";return n.ch==F&&n.sticky==X?t:new Xe(new D(n.line,F,X),r)}function wl(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(L){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||!Et(e,n))return Lt(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var d=g(e.doc,o),v=e.display.gutterSpecs[s];return rt(e,n,e,d,v.className,t),Lt(t)}}}function mo(e,t){return wl(e,t,"gutterClick",!0)}function kl(e,t){sr(e.display,t)||rc(e,t)||nt(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function rc(e,t){return Et(e,"gutterContextMenu")?wl(e,t,"gutterContextMenu",!1):!1}function _l(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wn(e)}var ln={toString:function(){return"CodeMirror.Init"}},Sl={},bi={};function nc(e){var t=e.optionHandlers;function n(r,i,o,a){e.defaults[r]=i,o&&(t[r]=a?function(l,s,u){u!=ln&&o(l,s,u)}:o)}e.defineOption=n,e.Init=ln,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){zn(r),wn(r),zt(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 u=0;;){var d=s.text.indexOf(i,u);if(d==-1)break;u=d+i.length,o.push(D(a,d))}a++});for(var l=o.length-1;l>=0;l--)rn(r.doc,i,o[l],D(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!=ln&&r.refresh()}),n("specialCharPlaceholder",As,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",H?"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",!ue),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){_l(r),Nn(r)},!0),n("keyMap","default",function(r,i,o){var a=vi(i),l=o!=ln&&vi(o);l&&l.detach&&l.detach(r,a),a.attach&&a.attach(r,l||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,oc,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=io(i,r.options.lineNumbers),Nn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Gi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Jr(r)},!0),n("scrollbarStyle","native",function(r){Ta(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),Nn(r)},!0),n("firstLineNumber",1,Nn,!0),n("lineNumberFormatter",function(r){return r},Nn,!0),n("showCursorWhenSelecting",!1,kn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Qr(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,ic),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,kn,!0),n("singleCursorHeightPerLine",!0,kn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,zn,!0),n("addModeClass",!1,zn,!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,zn,!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 ic(e,t,n){var r=n&&n!=ln;if(!t!=!r){var i=e.display.dragFunctions,o=t?Me: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 oc(e){e.options.lineWrapping?(se(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),Ii(e)),Xi(e),zt(e),wn(e),setTimeout(function(){return Jr(e)},100)}function $e(e,t){var n=this;if(!(this instanceof $e))return new $e(e,t);this.options=t=t?ce(t):{},ce(Sl,t,!1);var r=t.value;typeof r=="string"?r=new Mt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new $e.inputStyles[t.inputStyle](this),o=this.display=new bu(e,r,i,t);o.wrapper.CodeMirror=this,_l(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ta(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 De,keySeq:null,specialChars:null},t.autofocus&&!H&&o.input.focus(),p&&Z<11&&setTimeout(function(){return n.display.input.reset(!0)},20),ac(this),Fu(),Ar(this),this.curOp.forceUpdate=!0,Ia(this,r),t.autofocus&&!H||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Zi(n)},20):Qr(this);for(var a in bi)bi.hasOwnProperty(a)&&bi[a](this,t[a],ln);za(this),t.finishInit&&t.finishInit(this);for(var l=0;l<bo.length;++l)bo[l](this);Pr(this),K&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}$e.defaults=Sl,$e.optionHandlers=bi;function ac(e){var t=e.display;Me(t.scroller,"mousedown",pt(e,yl)),p&&Z<11?Me(t.scroller,"dblclick",pt(e,function(s){if(!nt(e,s)){var u=Nr(e,s);if(!(!u||mo(e,s)||sr(e.display,s))){wt(s);var d=e.findWordAt(u);fi(e.doc,d.anchor,d.head)}}})):Me(t.scroller,"dblclick",function(s){return nt(e,s)||wt(s)}),Me(t.scroller,"contextmenu",function(s){return kl(e,s)}),Me(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||kl(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 u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function a(s,u){if(u.left==null)return!0;var d=u.left-s.left,v=u.top-s.top;return d*d+v*v>20*20}Me(t.scroller,"touchstart",function(s){if(!nt(e,s)&&!o(s)&&!mo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),Me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Me(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!sr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var d=e.coordsChar(t.activeTouch,"page"),v;!u.prev||a(u,u.prev)?v=new Xe(d,d):!u.prev.prev||a(u,u.prev.prev)?v=e.findWordAt(d):v=new Xe(D(d.line,0),Fe(e.doc,D(d.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),wt(s)}i()}),Me(t.scroller,"touchcancel",i),Me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Sn(e,t.scroller.scrollTop),Mr(e,t.scroller.scrollLeft,!0),rt(e,"scroll",e))}),Me(t.scroller,"mousewheel",function(s){return Aa(e,s)}),Me(t.scroller,"DOMMouseScroll",function(s){return Aa(e,s)}),Me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){nt(e,s)||dr(s)},over:function(s){nt(e,s)||(Iu(e,s),dr(s))},start:function(s){return Eu(e,s)},drop:pt(e,Du),leave:function(s){nt(e,s)||al(e)}};var l=t.input.getField();Me(l,"keyup",function(s){return ml.call(e,s)}),Me(l,"keydown",pt(e,vl)),Me(l,"keypress",pt(e,bl)),Me(l,"focus",function(s){return Zi(e,s)}),Me(l,"blur",function(s){return Qr(e,s)})}var bo=[];$e.defineInitHook=function(e){return bo.push(e)};function Bn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=vn(e,t).state:n="prev");var a=e.options.tabSize,l=Ce(i,t),s=Ie(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],d;if(!r&&!/\S/.test(l.text))d=0,n="not";else if(n=="smart"&&(d=i.mode.indent(o,l.text.slice(u.length),l.text),d==ut||d>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?d=Ie(Ce(i,t-1).text,null,a):d=0:n=="add"?d=s+e.options.indentUnit:n=="subtract"?d=s-e.options.indentUnit:typeof n=="number"&&(d=s+n),d=Math.max(0,d);var v="",L=0;if(e.options.indentWithTabs)for(var C=Math.floor(d/a);C;--C)L+=a,v+=" ";if(L<d&&(v+=S(d-L)),v!=u)return rn(i,v,D(t,0),D(t,u.length),"+input"),l.stateAfter=null,!0;for(var F=0;F<i.sel.ranges.length;F++){var X=i.sel.ranges[F];if(X.head.line==t&&X.head.ch<u.length){var le=D(t,u.length);co(i,F,new Xe(le,le));break}}}var Jt=null;function yi(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=Rt(t),u=null;if(l&&r.ranges.length>1)if(Jt&&Jt.text.join(`
`)==t){if(r.ranges.length%Jt.text.length==0){u=[];for(var d=0;d<Jt.text.length;d++)u.push(o.splitLines(Jt.text[d]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Re(s,function(he){return[he]}));for(var v=e.curOp.updateInput,L=r.ranges.length-1;L>=0;L--){var C=r.ranges[L],F=C.from(),X=C.to();C.empty()&&(n&&n>0?F=D(F.line,F.ch-n):e.state.overwrite&&!l?X=D(X.line,Math.min(Ce(o,X.line).text.length,X.ch+ee(s).length)):l&&Jt&&Jt.lineWise&&Jt.text.join(`
`)==s.join(`
`)&&(F=X=D(F.line,0)));var le={from:F,to:X,text:u?u[L%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};tn(e.doc,le),ht(e,"inputRead",e,le)}t&&!l&&Tl(e,t),Zr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Cl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&It(t,function(){return yo(t,n,0,null,"paste")}),!0}function Tl(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=Bn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Bn(e,i.head.line,"smart"));a&&ht(e,"electricInput",e,i.head.line)}}}function Ll(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:D(i,0),head:D(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 Nl(){var e=f("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=f("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return K?e.style.width="1000px":e.setAttribute("wrap","off"),ne&&(e.style.border="1px solid black"),t}function lc(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){Te(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)&&pt(this,t[r])(this,i,a),rt(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"](vi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:St(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");z(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,zt(this)}),removeOverlay:St(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==r||typeof r=="string"&&a.name==r){i.splice(o,1),this.state.modeGen++,zt(this);return}}}),indentLine:St(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),q(this.doc,r)&&Bn(this,r,i,o)}),indentSelection:St(function(r){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(Bn(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Zr(this));else{var s=l.from(),u=l.to(),d=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=d;v<o;++v)Bn(this,v,r);var L=this.doc.sel.ranges;s.ch==0&&i.length==L.length&&L[a].from().ch>0&&co(this.doc,a,new Xe(s,L[a].to()),ke)}}}),getTokenAt:function(r,i){return Wo(this,r,i)},getLineTokens:function(r,i){return Wo(this,D(r),i,!0)},getTokenTypeAt:function(r){r=Fe(this.doc,r);var i=Eo(this,Ce(this.doc,r.line)),o=0,a=(i.length-1)/2,l=r.ch,s;if(l==0)s=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=l)a=u;else if(i[u*2+1]<l)o=u+1;else{s=i[u*2+2];break}}var d=s?s.indexOf("overlay "):-1;return d<0?s:d==0?null:s.slice(0,d-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 u=a[l[i][s]];u&&o.push(u)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var d=0;d<a._global.length;d++){var v=a._global[d];v.pred(l,this)&&Se(o,v.val)==-1&&o.push(v.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=Ao(o,r==null?o.first+o.size-1:r),vn(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=Fe(this.doc,r):o=r?a.from():a.to(),Qt(this,o,i||"page")},charCoords:function(r,i){return ti(this,Fe(this.doc,r),i||"page")},coordsChar:function(r,i){return r=ha(this,r,i||"page"),Ri(this,r.left,r.top)},lineAtHeight:function(r,i){return r=ha(this,{top:r,left:0},i||"page").top,g(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=Ce(this.doc,r)}else l=r;return ei(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-lr(l):0)},defaultTextHeight:function(){return Yr(this.display)},defaultCharWidth:function(){return Vr(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=Qt(this,Fe(this.doc,r));var u=r.bottom,d=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=r.top;else if(a=="above"||a=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),L=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),d+i.offsetWidth>L&&(d=L-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(d=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?d=0:l=="middle"&&(d=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=d+"px"),o&&iu(this,{left:d,top:u,right:d+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:St(vl),triggerOnKeyPress:St(bl),triggerOnKeyUp:ml,triggerOnMouseDown:St(yl),execCommand:function(r){if(Wn.hasOwnProperty(r))return Wn[r].call(null,this)},triggerElectric:St(function(r){Tl(this,r)}),findPosH:function(r,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Fe(this.doc,r),u=0;u<i&&(s=wo(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:St(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()},qe)}),deleteH:St(function(r,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):an(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 u=Fe(this.doc,r),d=0;d<i;++d){var v=Qt(this,u,"div");if(s==null?s=v.left:v.left=s,u=zl(this,v,l,o),u.hitSide)break}return u},moveV:St(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(d){if(s)return r<0?d.from():d.to();var v=Qt(o,d.head,"div");d.goalColumn!=null&&(v.left=d.goalColumn),l.push(v.left);var L=zl(o,v,r,i);return i=="page"&&d==a.sel.primary()&&$i(o,ti(o,L,"div").top-v.top),L},qe),l.length)for(var u=0;u<a.sel.ranges.length;u++)a.sel.ranges[u].goalColumn=l[u]}),findWordAt:function(r){var i=this.doc,o=Ce(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 u=o.charAt(a),d=_e(u,s)?function(v){return _e(v,s)}:/\s/.test(u)?function(v){return/\s/.test(v)}:function(v){return!/\s/.test(v)&&!_e(v)};a>0&&d(o.charAt(a-1));)--a;for(;l<o.length&&d(o.charAt(l));)++l}return new Xe(D(r.line,a),D(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?se(this.display.cursorDiv,"CodeMirror-overwrite"):M(this.display.cursorDiv,"CodeMirror-overwrite"),rt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==T(Ke(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:St(function(r,i){_n(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-tr(this)-this.display.barHeight,width:r.scrollWidth-tr(this)-this.display.barWidth,clientHeight:ji(this),clientWidth:Tr(this)}},scrollIntoView:St(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:D(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?ou(this,r):ka(this,r.from,r.to,r.margin)}),setSize:St(function(r,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=a(r)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&ca(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){mr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,rt(this,"refresh",this)}),operation:function(r){return It(this,r)},startOperation:function(){return Ar(this)},endOperation:function(){return Pr(this)},refresh:St(function(){var r=this.display.cachedTextHeight;zt(this),this.curOp.forceUpdate=!0,wn(this),_n(this,this.doc.scrollLeft,this.doc.scrollTop),ro(this.display),(r==null||Math.abs(r-Yr(this.display))>.5||this.options.lineWrapping)&&Xi(this),rt(this,"refresh",this)}),swapDoc:St(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ia(this,r),wn(this),this.display.input.reset(),_n(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ht(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}},Kt(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=Ce(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var be=t.line+s;return be<e.first||be>=e.first+e.size?!1:(t=new D(be,t.ch,t.sticky),l=Ce(e,be))}function d(be){var pe;if(r=="codepoint"){var we=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(we))pe=null;else{var Oe=n>0?we>=55296&&we<56320:we>=56320&&we<57343;pe=new D(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(Oe?2:1))),-n)}}else i?pe=Bu(e.cm,l,t,n):pe=ho(l,t,n);if(pe==null)if(!be&&u())t=po(i,e.cm,l,t.line,s);else return!1;else t=pe;return!0}if(r=="char"||r=="codepoint")d();else if(r=="column")d(!0);else if(r=="word"||r=="group")for(var v=null,L=r=="group",C=e.cm&&e.cm.getHelper(t,"wordChars"),F=!0;!(n<0&&!d(!F));F=!1){var X=l.text.charAt(t.ch)||`
`,le=_e(X,C)?"w":L&&X==`
`?"n":!L||/\s/.test(X)?null:"p";if(L&&!F&&!le&&(le="s"),v&&v!=le){n<0&&(n=1,d(),t.sticky="after");break}if(le&&(v=le),n>0&&!d(!F))break}var he=hi(e,t,o,a,!0);return Ge(o,he)&&(he.hitSide=!0),he}function zl(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,Te(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(l-.5*Yr(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 u;u=Ri(e,o,a),!!u.outside;){if(n<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=n*5}return u}var Ve=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new De,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ve.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}Me(i,"paste",function(l){!o(l)||nt(r,l)||Cl(l,r)||Z<=11&&setTimeout(pt(r,function(){return t.updateFromDOM()}),20)}),Me(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),Me(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),Me(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Me(i,"touchstart",function(){return n.forceCompositionEnd()}),Me(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||nt(r,l))){if(r.somethingSelected())yi({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=Ll(r);yi({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,ke),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Jt.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var d=Nl(),v=d.firstChild;xo(v),r.display.lineSpace.insertBefore(d,r.display.lineSpace.firstChild),v.value=Jt.text.join(`
`);var L=T(He(i));Ue(v),setTimeout(function(){r.display.lineSpace.removeChild(d),L.focus(),L==i&&n.showPrimarySelection()},50)}}Me(i,"copy",a),Me(i,"cut",a)},Ve.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ve.prototype.prepareSelection=function(){var e=ya(this.cm,!1);return e.focus=T(He(this.div))==this.div,e},Ve.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ve.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ve.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=xi(t,e.anchorNode,e.anchorOffset),a=xi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&me(Kr(o,a),r)==0&&me(Nt(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Ml(t,r)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Ml(t,i);if(!u){var d=l[l.length-1].measure,v=d.maps?d.maps[d.maps.length-1]:d.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var L=e.rangeCount&&e.getRangeAt(0),C;try{C=G(s.node,s.offset,u.offset,u.node)}catch(F){}C&&(!$&&t.state.focused?(e.collapse(s.node,s.offset),C.collapsed||(e.removeAllRanges(),e.addRange(C))):(e.removeAllRanges(),e.addRange(C)),L&&e.anchorNode==null?e.addRange(L):$&&this.startGracePeriod()),this.rememberSelection()}},Ve.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)},Ve.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},Ve.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ve.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},Ve.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||T(He(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ve.prototype.blur=function(){this.div.blur()},Ve.prototype.getField=function(){return this.div},Ve.prototype.supportsTouch=function(){return!0},Ve.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):It(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)},Ve.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ve.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(A&&E&&this.cm.display.gutterSpecs.length&&sc(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=xi(t,e.anchorNode,e.anchorOffset),r=xi(t,e.focusNode,e.focusOffset);n&&r&&It(t,function(){kt(t.doc,yr(n,r),ke),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ve.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=D(r.line-1,Ce(e.doc,r.line-1).length)),i.ch==Ce(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=D(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||(o=zr(e,r.line))==0?(a=c(t.view[0].line),l=t.view[0].node):(a=c(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=zr(e,i.line),u,d;if(s==t.view.length-1?(u=t.viewTo-1,d=t.lineDiv.lastChild):(u=c(t.view[s+1].line)-1,d=t.view[s+1].node.previousSibling),!l)return!1;for(var v=e.doc.splitLines(uc(e,l,d,a,u)),L=or(e.doc,D(a,0),D(u,Ce(e.doc,u).text.length));v.length>1&&L.length>1;)if(ee(v)==ee(L))v.pop(),L.pop(),u--;else if(v[0]==L[0])v.shift(),L.shift(),a++;else break;for(var C=0,F=0,X=v[0],le=L[0],he=Math.min(X.length,le.length);C<he&&X.charCodeAt(C)==le.charCodeAt(C);)++C;for(var be=ee(v),pe=ee(L),we=Math.min(be.length-(v.length==1?C:0),pe.length-(L.length==1?C:0));F<we&&be.charCodeAt(be.length-F-1)==pe.charCodeAt(pe.length-F-1);)++F;if(v.length==1&&L.length==1&&a==r.line)for(;C&&C>r.ch&&be.charCodeAt(be.length-F-1)==pe.charCodeAt(pe.length-F-1);)C--,F++;v[v.length-1]=be.slice(0,be.length-F).replace(/^\u200b+/,""),v[0]=v[0].slice(C).replace(/\u200b+$/,"");var Oe=D(a,C),Ne=D(u,L.length?ee(L).length-F:0);if(v.length>1||v[0]||me(Oe,Ne))return rn(e.doc,v,Oe,Ne,"+input"),!0},Ve.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ve.prototype.reset=function(){this.forceCompositionEnd()},Ve.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ve.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))},Ve.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&It(this.cm,function(){return zt(e.cm)})},Ve.prototype.setUneditable=function(e){e.contentEditable="false"},Ve.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||pt(this.cm,yo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ve.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ve.prototype.onContextMenu=function(){},Ve.prototype.resetPosition=function(){},Ve.prototype.needsContentAttribute=!0;function Ml(e,t){var n=Hi(e,t.line);if(!n||n.hidden)return null;var r=Ce(e.doc,t.line),i=oa(n,r,t.line),o=Ee(r,e.doc.direction),a="left";if(o){var l=Wt(o,t.ch);a=l%2?"right":"left"}var s=sa(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function sc(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sn(e,t){return t&&(e.bad=!0),e}function uc(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(C){return function(F){return F.id==C}}function d(){a&&(o+=l,s&&(o+=l),a=s=!1)}function v(C){C&&(d(),o+=C)}function L(C){if(C.nodeType==1){var F=C.getAttribute("cm-text");if(F){v(F);return}var X=C.getAttribute("cm-marker"),le;if(X){var he=e.findMarks(D(r,0),D(i+1,0),u(+X));he.length&&(le=he[0].find(0))&&v(or(e.doc,le.from,le.to).join(l));return}if(C.getAttribute("contenteditable")=="false")return;var be=/^(pre|div|p|li|table|br)$/i.test(C.nodeName);if(!/^br$/i.test(C.nodeName)&&C.textContent.length==0)return;be&&d();for(var pe=0;pe<C.childNodes.length;pe++)L(C.childNodes[pe]);/^(pre|p)$/i.test(C.nodeName)&&(s=!0),be&&(a=!0)}else C.nodeType==3&&v(C.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;L(t),t!=n;)t=t.nextSibling,s=!1;return o}function xi(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return sn(e.clipPos(D(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 cc(o,t,n)}}function cc(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!x(r,t))return sn(D(c(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?ee(e.rest):e.line;return sn(D(c(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,u=s.maps;function d(le,he,be){for(var pe=-1;pe<(u?u.length:0);pe++)for(var we=pe<0?s.map:u[pe],Oe=0;Oe<we.length;Oe+=3){var Ne=we[Oe+2];if(Ne==le||Ne==he){var je=c(pe<0?e.line:e.rest[pe]),Qe=we[Oe]+be;return(be<0||Ne!=le)&&(Qe=we[Oe+(be?1:0)]),D(je,Qe)}}}var v=d(a,l,n);if(v)return sn(v,i);for(var L=l.nextSibling,C=a?a.nodeValue.length-n:0;L;L=L.nextSibling){if(v=d(L,L.firstChild,0),v)return sn(D(v.line,v.ch-C),i);C+=L.textContent.length}for(var F=l.previousSibling,X=n;F;F=F.previousSibling){if(v=d(F,F.firstChild,-1),v)return sn(D(v.line,v.ch+X),i);X+=F.textContent.length}}var at=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new De,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),ne&&(i.style.width="0px"),Me(i,"input",function(){p&&Z>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Me(i,"paste",function(a){nt(r,a)||Cl(a,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(a){if(!nt(r,a)){if(r.somethingSelected())yi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=Ll(r);yi({lineWise:!0,text:l.text}),a.type=="cut"?r.setSelections(l.ranges,null,ke):(n.prevInput="",i.value=l.text.join(`
`),Ue(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}Me(i,"cut",o),Me(i,"copy",o),Me(e.scroller,"paste",function(a){if(!(sr(e,a)||nt(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)}}),Me(e.lineSpace,"selectstart",function(a){sr(e,a)||wt(a)}),Me(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"})}}),Me(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},at.prototype.createField=function(e){this.wrapper=Nl(),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=ya(e);if(e.options.moveInputWithCursor){var i=Qt(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;O(n.cursorDiv,e.cursors),O(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&&Ue(this.textarea),p&&Z>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",p&&Z>=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"&&(!H||T(He(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||pr(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(p&&Z>=9&&this.hasSelection===i||Q&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r=""),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return It(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(){p&&Z>=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=Nr(n,e),a=r.scroller.scrollTop;if(!o||U)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&pt(n,kt)(n.doc,yr(o),ke);var s=i.style.cssText,u=t.wrapper.style.cssText,d=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+`px;
z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;K&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),K&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=C,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function L(){if(i.selectionStart!=null){var X=n.somethingSelected(),le=""+(X?i.value:"");i.value="⇚",i.value=le,t.prevInput=X?"":"",i.selectionStart=1,i.selectionEnd=le.length,r.selForContextMenu=n.doc.sel}}function C(){if(t.contextMenuPending==C&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,p&&Z<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!p||p&&Z<9)&&L();var X=0,le=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?pt(n,Va)(n):X++<10?r.detectingSelectAll=setTimeout(le,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(le,200)}}if(p&&Z>=9&&L(),k){dr(e);var F=function(){xt(window,"mouseup",F),setTimeout(C,20)};Me(window,"mouseup",F)}else setTimeout(C,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 fc(e,t){if(t=t?ce(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=T(He(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(Me(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=$e(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function dc(e){e.off=xt,e.on=Me,e.wheelEventPixels=yu,e.Doc=Mt,e.splitLines=Rt,e.countColumn=Ie,e.findColumn=Ye,e.isWordChar=ye,e.Pass=ut,e.signal=rt,e.Line=Ur,e.changeEnd=xr,e.scrollbarModel=Ca,e.Pos=D,e.cmpPos=me,e.modes=jr,e.mimeModes=Xt,e.resolveMode=Hr,e.getMode=qr,e.modeExtensions=gr,e.extendMode=Br,e.copyState=$t,e.startState=Rr,e.innerMode=pn,e.commands=Wn,e.keyMap=cr,e.keyName=fl,e.isModifierKey=ul,e.lookupKey=on,e.normalizeKeyMap=qu,e.StringStream=it,e.SharedTextMarker=En,e.TextMarker=kr,e.LineWidget=Dn,e.e_preventDefault=wt,e.e_stopPropagation=Fr,e.e_stop=dr,e.addClass=se,e.contains=x,e.rmClass=M,e.keyNames=_r}nc($e),lc($e);var hc="iter insert remove copy getEditor constructor".split(" ");for(var wi in Mt.prototype)Mt.prototype.hasOwnProperty(wi)&&Se(hc,wi)<0&&($e.prototype[wi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mt.prototype[wi]));return Kt(Mt),$e.inputStyles={textarea:at,contenteditable:Ve},$e.defineMode=function(e){!$e.defaults.mode&&e!="null"&&($e.defaults.mode=e),Yt.apply(this,arguments)},$e.defineMIME=Cr,$e.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),$e.defineMIME("text/plain","null"),$e.defineExtension=function(e,t){$e.prototype[e]=t},$e.defineDocExtension=function(e,t){Mt.prototype[e]=t},$e.fromTextArea=fc,dc($e),$e.version="5.65.16",$e})}(So)),So.exports}var Mc=Tt();const Oc=xc(Mc);var fn=(b=>(b.JSON="application/json",b.HTML="htmlmixed",b.JS="javascript",b.XML="text/html",b.JAVA="text/x-java",b.SQL="text/x-sql",b.TYPESCRIPT="text/typescript",b.VUE="vue",b))(fn||{}),Ac={exports:{}};(function(b,V){(function(h){h(Tt())})(function(h){h.defineMode("javascript",function(R,$){var oe=R.indentUnit,I=$.statementIndent,j=$.jsonld,p=$.json||j,Z=$.trackScope!==!1,K=$.typescript,J=$.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function c(dt){return{type:dt,style:"keyword"}}var g=c("keyword a"),q=c("keyword b"),ae=c("keyword c"),D=c("keyword d"),me=c("operator"),Ge={type:"atom",style:"atom"};return{if:c("if"),while:g,with:g,else:q,do:q,try:q,finally:q,return:D,break:D,continue:D,new:c("new"),delete:ae,void:ae,throw:ae,debugger:c("debugger"),var:c("var"),const:c("var"),let:c("var"),function:c("function"),catch:c("catch"),for:c("for"),switch:c("switch"),case:c("case"),default:c("default"),in:me,typeof:me,instanceof:me,true:Ge,false:Ge,null:Ge,undefined:Ge,NaN:Ge,Infinity:Ge,this:c("this"),class:c("class"),super:c("atom"),yield:ae,export:c("export"),import:c("import"),extends:ae,await:ae}}(),te=/[+\-*&%=<>!?|~^@]/,U=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function re(c){for(var g=!1,q,ae=!1;(q=c.next())!=null;){if(!g){if(q=="/"&&!ae)return;q=="["?ae=!0:ae&&q=="]"&&(ae=!1)}g=!g&&q=="\\"}}var ge,fe;function ne(c,g,q){return ge=c,fe=q,g}function A(c,g){var q=c.next();if(q=='"'||q=="'")return g.tokenize=H(q),g.tokenize(c,g);if(q=="."&&c.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return ne("number","number");if(q=="."&&c.match(".."))return ne("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(q))return ne(q);if(q=="="&&c.eat(">"))return ne("=>","operator");if(q=="0"&&c.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return ne("number","number");if(/\d/.test(q))return c.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),ne("number","number");if(q=="/")return c.eat("*")?(g.tokenize=Q,Q(c,g)):c.eat("/")?(c.skipToEnd(),ne("comment","comment")):jt(c,g,1)?(re(c),c.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),ne("regexp","string-2")):(c.eat("="),ne("operator","operator",c.current()));if(q=="`")return g.tokenize=de,de(c,g);if(q=="#"&&c.peek()=="!")return c.skipToEnd(),ne("meta","meta");if(q=="#"&&c.eatWhile(J))return ne("variable","property");if(q=="<"&&c.match("!--")||q=="-"&&c.match("->")&&!/\S/.test(c.string.slice(0,c.start)))return c.skipToEnd(),ne("comment","comment");if(te.test(q))return(q!=">"||!g.lexical||g.lexical.type!=">")&&(c.eat("=")?(q=="!"||q=="=")&&c.eat("="):/[<>*+\-|&?]/.test(q)&&(c.eat(q),q==">"&&c.eat(q))),q=="?"&&c.eat(".")?ne("."):ne("operator","operator",c.current());if(J.test(q)){c.eatWhile(J);var ae=c.current();if(g.lastType!="."){if(E.propertyIsEnumerable(ae)){var D=E[ae];return ne(D.type,D.style,ae)}if(ae=="async"&&c.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return ne("async","keyword",ae)}return ne("variable","variable",ae)}}function H(c){return function(g,q){var ae=!1,D;if(j&&g.peek()=="@"&&g.match(U))return q.tokenize=A,ne("jsonld-keyword","meta");for(;(D=g.next())!=null&&!(D==c&&!ae);)ae=!ae&&D=="\\";return ae||(q.tokenize=A),ne("string","string")}}function Q(c,g){for(var q=!1,ae;ae=c.next();){if(ae=="/"&&q){g.tokenize=A;break}q=ae=="*"}return ne("comment","comment")}function de(c,g){for(var q=!1,ae;(ae=c.next())!=null;){if(!q&&(ae=="`"||ae=="$"&&c.eat("{"))){g.tokenize=A;break}q=!q&&ae=="\\"}return ne("quasi","string-2",c.current())}var ue="([{}])";function ve(c,g){g.fatArrowAt&&(g.fatArrowAt=null);var q=c.string.indexOf("=>",c.start);if(!(q<0)){if(K){var ae=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(c.string.slice(c.start,q));ae&&(q=ae.index)}for(var D=0,me=!1,Ge=q-1;Ge>=0;--Ge){var dt=c.string.charAt(Ge),Nt=ue.indexOf(dt);if(Nt>=0&&Nt<3){if(!D){++Ge;break}if(--D==0){dt=="("&&(me=!0);break}}else if(Nt>=3&&Nt<6)++D;else if(J.test(dt))me=!0;else if(/["'\/`]/.test(dt))for(;;--Ge){if(Ge==0)return;var Kr=c.string.charAt(Ge-1);if(Kr==dt&&c.string.charAt(Ge-2)!="\\"){Ge--;break}}else if(me&&!D){++Ge;break}}me&&!D&&(g.fatArrowAt=Ge)}}var P={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function k(c,g,q,ae,D,me){this.indented=c,this.column=g,this.type=q,this.prev=D,this.info=me,ae!=null&&(this.align=ae)}function N(c,g){if(!Z)return!1;for(var q=c.localVars;q;q=q.next)if(q.name==g)return!0;for(var ae=c.context;ae;ae=ae.prev)for(var q=ae.vars;q;q=q.next)if(q.name==g)return!0}function M(c,g,q,ae,D){var me=c.cc;for(_.state=c,_.stream=D,_.marked=null,_.cc=me,_.style=g,c.lexical.hasOwnProperty("align")||(c.lexical.align=!0);;){var Ge=me.length?me.pop():p?Se:Ie;if(Ge(q,ae)){for(;me.length&&me[me.length-1].lex;)me.pop()();return _.marked?_.marked:q=="variable"&&N(c,ae)?"variable-2":g}}}var _={state:null,column:null,marked:null,cc:null};function O(){for(var c=arguments.length-1;c>=0;c--)_.cc.push(arguments[c])}function f(){return O.apply(null,arguments),!0}function Y(c,g){for(var q=g;q;q=q.next)if(q.name==c)return!0;return!1}function G(c){var g=_.state;if(_.marked="def",!!Z){if(g.context){if(g.lexical.info=="var"&&g.context&&g.context.block){var q=x(c,g.context);if(q!=null){g.context=q;return}}else if(!Y(c,g.localVars)){g.localVars=new Ae(c,g.localVars);return}}$.globalVars&&!Y(c,g.globalVars)&&(g.globalVars=new Ae(c,g.globalVars))}}function x(c,g){if(g)if(g.block){var q=x(c,g.prev);return q?q==g.prev?g:new se(q,g.vars,!0):null}else return Y(c,g.vars)?g:new se(g.prev,new Ae(c,g.vars),!1);else return null}function T(c){return c=="public"||c=="private"||c=="protected"||c=="abstract"||c=="readonly"}function se(c,g,q){this.prev=c,this.vars=g,this.block=q}function Ae(c,g){this.name=c,this.next=g}var Ue=new Ae("this",new Ae("arguments",null));function Be(){_.state.context=new se(_.state.context,_.state.localVars,!1),_.state.localVars=Ue}function Ke(){_.state.context=new se(_.state.context,_.state.localVars,!0),_.state.localVars=null}Be.lex=Ke.lex=!0;function He(){_.state.localVars=_.state.context.vars,_.state.context=_.state.context.prev}He.lex=!0;function Te(c,g){var q=function(){var ae=_.state,D=ae.indented;if(ae.lexical.type=="stat")D=ae.lexical.indented;else for(var me=ae.lexical;me&&me.type==")"&&me.align;me=me.prev)D=me.indented;ae.lexical=new k(D,_.stream.column(),c,null,ae.lexical,g)};return q.lex=!0,q}function ze(){var c=_.state;c.lexical.prev&&(c.lexical.type==")"&&(c.indented=c.lexical.indented),c.lexical=c.lexical.prev)}ze.lex=!0;function ce(c){function g(q){return q==c?f():c==";"||q=="}"||q==")"||q=="]"?O():f(g)}return g}function Ie(c,g){return c=="var"?f(Te("vardef",g),Fr,ce(";"),ze):c=="keyword a"?f(Te("form"),ut,Ie,ze):c=="keyword b"?f(Te("form"),Ie,ze):c=="keyword d"?_.stream.match(/^\s*$/,!1)?f():f(Te("stat"),Je,ce(";"),ze):c=="debugger"?f(ce(";")):c=="{"?f(Te("}"),Ke,Le,ze,He):c==";"?f():c=="if"?(_.state.lexical.info=="else"&&_.state.cc[_.state.cc.length-1]==ze&&_.state.cc.pop()(),f(Te("form"),ut,Ie,ze,Wr)):c=="function"?f(Rt):c=="for"?f(Te("form"),Ke,Kn,Ie,He,ze):c=="class"||K&&g=="interface"?(_.marked="keyword",f(Te("form",c=="class"?c:g),jr,ze)):c=="variable"?K&&g=="declare"?(_.marked="keyword",f(Ie)):K&&(g=="module"||g=="enum"||g=="type")&&_.stream.match(/^\s*\w/,!1)?(_.marked="keyword",g=="enum"?f(Ce):g=="type"?f(Un,ce("operator"),Ee,ce(";")):f(Te("form"),Lt,ce("{"),Te("}"),Le,ze,ze)):K&&g=="namespace"?(_.marked="keyword",f(Te("form"),Se,Ie,ze)):K&&g=="abstract"?(_.marked="keyword",f(Ie)):f(Te("stat"),We):c=="switch"?f(Te("form"),ut,ce("{"),Te("}","switch"),Ke,Le,ze,ze,He):c=="case"?f(Se,ce(":")):c=="default"?f(ce(":")):c=="catch"?f(Te("form"),Be,De,Ie,ze,He):c=="export"?f(Te("stat"),Hr,ze):c=="import"?f(Te("stat"),gr,ze):c=="async"?f(Ie):g=="@"?f(Se,Ie):O(Te("stat"),Se,ce(";"),ze)}function De(c){if(c=="(")return f(Gt,ce(")"))}function Se(c,g){return ke(c,g,!1)}function Ze(c,g){return ke(c,g,!0)}function ut(c){return c!="("?O():f(Te(")"),Je,ce(")"),ze)}function ke(c,g,q){if(_.state.fatArrowAt==_.stream.start){var ae=q?Re:ee;if(c=="(")return f(Be,Te(")"),m(Gt,")"),ze,ce("=>"),ae,He);if(c=="variable")return O(Be,Lt,ce("=>"),ae,He)}var D=q?Ye:qe;return P.hasOwnProperty(c)?f(D):c=="function"?f(Rt,D):c=="class"||K&&g=="interface"?(_.marked="keyword",f(Te("form"),zi,ze)):c=="keyword c"||c=="async"?f(q?Ze:Se):c=="("?f(Te(")"),Je,ce(")"),ze,D):c=="operator"||c=="spread"?f(q?Ze:Se):c=="["?f(Te("]"),it,ze,D):c=="{"?B(_e,"}",null,D):c=="quasi"?O(w,D):c=="new"?f(z(q)):f()}function Je(c){return c.match(/[;\}\)\],]/)?O():O(Se)}function qe(c,g){return c==","?f(Je):Ye(c,g,!1)}function Ye(c,g,q){var ae=q==!1?qe:Ye,D=q==!1?Se:Ze;if(c=="=>")return f(Be,q?Re:ee,He);if(c=="operator")return/\+\+|--/.test(g)||K&&g=="!"?f(ae):K&&g=="<"&&_.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?f(Te(">"),m(Ee,">"),ze,ae):g=="?"?f(Se,ce(":"),D):f(D);if(c=="quasi")return O(w,ae);if(c!=";"){if(c=="(")return B(Ze,")","call",ae);if(c==".")return f(ye,ae);if(c=="[")return f(Te("]"),Je,ce("]"),ze,ae);if(K&&g=="as")return _.marked="keyword",f(Ee,ae);if(c=="regexp")return _.state.lastType=_.marked="operator",_.stream.backUp(_.stream.pos-_.stream.start-1),f(D)}}function w(c,g){return c!="quasi"?O():g.slice(g.length-2)!="${"?f(w):f(Je,S)}function S(c){if(c=="}")return _.marked="string-2",_.state.tokenize=de,f(w)}function ee(c){return ve(_.stream,_.state),O(c=="{"?Ie:Se)}function Re(c){return ve(_.stream,_.state),O(c=="{"?Ie:Ze)}function z(c){return function(g){return g=="."?f(c?W:ie):g=="variable"&&K?f(Et,c?Ye:qe):O(c?Ze:Se)}}function ie(c,g){if(g=="target")return _.marked="keyword",f(qe)}function W(c,g){if(g=="target")return _.marked="keyword",f(Ye)}function We(c){return c==":"?f(ze,Ie):O(qe,ce(";"),ze)}function ye(c){if(c=="variable")return _.marked="property",f()}function _e(c,g){if(c=="async")return _.marked="property",f(_e);if(c=="variable"||_.style=="keyword"){if(_.marked="property",g=="get"||g=="set")return f(xe);var q;return K&&_.state.fatArrowAt==_.stream.start&&(q=_.stream.match(/^\s*:\s*/,!1))&&(_.state.fatArrowAt=_.stream.pos+q[0].length),f(y)}else{if(c=="number"||c=="string")return _.marked=j?"property":_.style+" property",f(y);if(c=="jsonld-keyword")return f(y);if(K&&T(g))return _.marked="keyword",f(_e);if(c=="[")return f(Se,tt,ce("]"),y);if(c=="spread")return f(Ze,y);if(g=="*")return _.marked="keyword",f(_e);if(c==":")return O(y)}}function xe(c){return c!="variable"?O(y):(_.marked="property",f(Rt))}function y(c){if(c==":")return f(Ze);if(c=="(")return O(Rt)}function m(c,g,q){function ae(D,me){if(q?q.indexOf(D)>-1:D==","){var Ge=_.state.lexical;return Ge.info=="call"&&(Ge.pos=(Ge.pos||0)+1),f(function(dt,Nt){return dt==g||Nt==g?O():O(c)},ae)}return D==g||me==g?f():q&&q.indexOf(";")>-1?O(c):f(ce(g))}return function(D,me){return D==g||me==g?f():O(c,ae)}}function B(c,g,q){for(var ae=3;ae<arguments.length;ae++)_.cc.push(arguments[ae]);return f(Te(g,q),m(c,g),ze)}function Le(c){return c=="}"?f():O(Ie,Le)}function tt(c,g){if(K){if(c==":")return f(Ee);if(g=="?")return f(tt)}}function ft(c,g){if(K&&(c==":"||g=="in"))return f(Ee)}function Wt(c){if(K&&c==":")return _.stream.match(/^\s*\w+\s+is\b/,!1)?f(Se,Dt,Ee):f(Ee)}function Dt(c,g){if(g=="is")return _.marked="keyword",f()}function Ee(c,g){if(g=="keyof"||g=="typeof"||g=="infer"||g=="readonly")return _.marked="keyword",f(g=="typeof"?Ze:Ee);if(c=="variable"||g=="void")return _.marked="type",f(Bt);if(g=="|"||g=="&")return f(Ee);if(c=="string"||c=="number"||c=="atom")return f(Bt);if(c=="[")return f(Te("]"),m(Ee,"]",","),ze,Bt);if(c=="{")return f(Te("}"),Me,ze,Bt);if(c=="(")return f(m(nt,")"),yt,Bt);if(c=="<")return f(m(Ee,">"),Ee);if(c=="quasi")return O(xt,Bt)}function yt(c){if(c=="=>")return f(Ee)}function Me(c){return c.match(/[\}\)\]]/)?f():c==","||c==";"?f(Me):O(ir,Me)}function ir(c,g){if(c=="variable"||_.style=="keyword")return _.marked="property",f(ir);if(g=="?"||c=="number"||c=="string")return f(ir);if(c==":")return f(Ee);if(c=="[")return f(ce("variable"),ft,ce("]"),ir);if(c=="(")return O(pr,ir);if(!c.match(/[;\}\)\],]/))return f()}function xt(c,g){return c!="quasi"?O():g.slice(g.length-2)!="${"?f(xt):f(Ee,rt)}function rt(c){if(c=="}")return _.marked="string-2",_.state.tokenize=de,f(xt)}function nt(c,g){return c=="variable"&&_.stream.match(/^\s*[?:]/,!1)||g=="?"?f(nt):c==":"?f(Ee):c=="spread"?f(nt):O(Ee)}function Bt(c,g){if(g=="<")return f(Te(">"),m(Ee,">"),ze,Bt);if(g=="|"||c=="."||g=="&")return f(Ee);if(c=="[")return f(Ee,ce("]"),Bt);if(g=="extends"||g=="implements")return _.marked="keyword",f(Ee);if(g=="?")return f(Ee,ce(":"),Ee)}function Et(c,g){if(g=="<")return f(Te(">"),m(Ee,">"),ze,Bt)}function Kt(){return O(Ee,wt)}function wt(c,g){if(g=="=")return f(Ee)}function Fr(c,g){return g=="enum"?(_.marked="keyword",f(Ce)):O(Lt,tt,Ut,Ni)}function Lt(c,g){if(K&&T(g))return _.marked="keyword",f(Lt);if(c=="variable")return G(g),f();if(c=="spread")return f(Lt);if(c=="[")return B(dn,"]");if(c=="{")return B(dr,"}")}function dr(c,g){return c=="variable"&&!_.stream.match(/^\s*:/,!1)?(G(g),f(Ut)):(c=="variable"&&(_.marked="property"),c=="spread"?f(Lt):c=="}"?O():c=="["?f(Se,ce("]"),ce(":"),dr):f(ce(":"),Lt,Ut))}function dn(){return O(Lt,Ut)}function Ut(c,g){if(g=="=")return f(Ze)}function Ni(c){if(c==",")return f(Fr)}function Wr(c,g){if(c=="keyword b"&&g=="else")return f(Te("form","else"),Ie,ze)}function Kn(c,g){if(g=="await")return f(Kn);if(c=="(")return f(Te(")"),hn,ze)}function hn(c){return c=="var"?f(Fr,hr):c=="variable"?f(hr):O(hr)}function hr(c,g){return c==")"?f():c==";"?f(hr):g=="in"||g=="of"?(_.marked="keyword",f(Se,hr)):O(Se,hr)}function Rt(c,g){if(g=="*")return _.marked="keyword",f(Rt);if(c=="variable")return G(g),f(Rt);if(c=="(")return f(Be,Te(")"),m(Gt,")"),ze,Wt,Ie,He);if(K&&g=="<")return f(Te(">"),m(Kt,">"),ze,Rt)}function pr(c,g){if(g=="*")return _.marked="keyword",f(pr);if(c=="variable")return G(g),f(pr);if(c=="(")return f(Be,Te(")"),m(Gt,")"),ze,Wt,He);if(K&&g=="<")return f(Te(">"),m(Kt,">"),ze,pr)}function Un(c,g){if(c=="keyword"||c=="variable")return _.marked="type",f(Un);if(g=="<")return f(Te(">"),m(Kt,">"),ze)}function Gt(c,g){return g=="@"&&f(Se,Gt),c=="spread"?f(Gt):K&&T(g)?(_.marked="keyword",f(Gt)):K&&c=="this"?f(tt,Ut):O(Lt,tt,Ut)}function zi(c,g){return c=="variable"?jr(c,g):Xt(c,g)}function jr(c,g){if(c=="variable")return G(g),f(Xt)}function Xt(c,g){if(g=="<")return f(Te(">"),m(Kt,">"),ze,Xt);if(g=="extends"||g=="implements"||K&&c==",")return g=="implements"&&(_.marked="keyword"),f(K?Ee:Se,Xt);if(c=="{")return f(Te("}"),Yt,ze)}function Yt(c,g){if(c=="async"||c=="variable"&&(g=="static"||g=="get"||g=="set"||K&&T(g))&&_.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return _.marked="keyword",f(Yt);if(c=="variable"||_.style=="keyword")return _.marked="property",f(Cr,Yt);if(c=="number"||c=="string")return f(Cr,Yt);if(c=="[")return f(Se,tt,ce("]"),Cr,Yt);if(g=="*")return _.marked="keyword",f(Yt);if(K&&c=="(")return O(pr,Yt);if(c==";"||c==",")return f(Yt);if(c=="}")return f();if(g=="@")return f(Se,Yt)}function Cr(c,g){if(g=="!"||g=="?")return f(Cr);if(c==":")return f(Ee,Ut);if(g=="=")return f(Ze);var q=_.state.lexical.prev,ae=q&&q.info=="interface";return O(ae?pr:Rt)}function Hr(c,g){return g=="*"?(_.marked="keyword",f(Rr,ce(";"))):g=="default"?(_.marked="keyword",f(Se,ce(";"))):c=="{"?f(m(qr,"}"),Rr,ce(";")):O(Ie)}function qr(c,g){if(g=="as")return _.marked="keyword",f(ce("variable"));if(c=="variable")return O(Ze,qr)}function gr(c){return c=="string"?f():c=="("?O(Se):c=="."?O(qe):O(Br,$t,Rr)}function Br(c,g){return c=="{"?B(Br,"}"):(c=="variable"&&G(g),g=="*"&&(_.marked="keyword"),f(pn))}function $t(c){if(c==",")return f(Br,$t)}function pn(c,g){if(g=="as")return _.marked="keyword",f(Br)}function Rr(c,g){if(g=="from")return _.marked="keyword",f(Se)}function it(c){return c=="]"?f():O(m(Ze,"]"))}function Ce(){return O(Te("form"),Lt,ce("{"),Te("}"),m(or,"}"),ze,ze)}function or(){return O(Lt,Ut)}function gn(c,g){return c.lastType=="operator"||c.lastType==","||te.test(g.charAt(0))||/[,.]/.test(g.charAt(0))}function jt(c,g,q){return g.tokenize==A&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||g.lastType=="quasi"&&/\{\s*$/.test(c.string.slice(0,c.pos-(q||0)))}return{startState:function(c){var g={tokenize:A,lastType:"sof",cc:[],lexical:new k((c||0)-oe,0,"block",!1),localVars:$.localVars,context:$.localVars&&new se(null,null,!1),indented:c||0};return $.globalVars&&typeof $.globalVars=="object"&&(g.globalVars=$.globalVars),g},token:function(c,g){if(c.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=c.indentation(),ve(c,g)),g.tokenize!=Q&&c.eatSpace())return null;var q=g.tokenize(c,g);return ge=="comment"?q:(g.lastType=ge=="operator"&&(fe=="++"||fe=="--")?"incdec":ge,M(g,q,ge,fe,c))},indent:function(c,g){if(c.tokenize==Q||c.tokenize==de)return h.Pass;if(c.tokenize!=A)return 0;var q=g&&g.charAt(0),ae=c.lexical,D;if(!/^\s*else\b/.test(g))for(var me=c.cc.length-1;me>=0;--me){var Ge=c.cc[me];if(Ge==ze)ae=ae.prev;else if(Ge!=Wr&&Ge!=He)break}for(;(ae.type=="stat"||ae.type=="form")&&(q=="}"||(D=c.cc[c.cc.length-1])&&(D==qe||D==Ye)&&!/^[,\.=+\-*:?[\(]/.test(g));)ae=ae.prev;I&&ae.type==")"&&ae.prev.type=="stat"&&(ae=ae.prev);var dt=ae.type,Nt=q==dt;return dt=="vardef"?ae.indented+(c.lastType=="operator"||c.lastType==","?ae.info.length+1:0):dt=="form"&&q=="{"?ae.indented:dt=="form"?ae.indented+oe:dt=="stat"?ae.indented+(gn(c,g)?I||oe:0):ae.info=="switch"&&!Nt&&$.doubleIndentSwitch!=!1?ae.indented+(/^(?:case|default)\b/.test(g)?oe:2*oe):ae.align?ae.column+(Nt?0:1):ae.indented+(Nt?0:oe)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:p?null:"/*",blockCommentEnd:p?null:"*/",blockCommentContinue:p?null:" * ",lineComment:p?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:p?"json":"javascript",jsonldMode:j,jsonMode:p,expressionAllowed:jt,skipExpression:function(c){M(c,"atom","atom","true",new h.StringStream("",2,null))}}}),h.registerHelper("wordChars","javascript",/[\w$]/),h.defineMIME("text/javascript","javascript"),h.defineMIME("text/ecmascript","javascript"),h.defineMIME("application/javascript","javascript"),h.defineMIME("application/x-javascript","javascript"),h.defineMIME("application/ecmascript","javascript"),h.defineMIME("application/json",{name:"javascript",json:!0}),h.defineMIME("application/x-json",{name:"javascript",json:!0}),h.defineMIME("application/manifest+json",{name:"javascript",json:!0}),h.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),h.defineMIME("text/typescript",{name:"javascript",typescript:!0}),h.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Mo=Ac.exports,Pc={exports:{}};(function(b,V){(function(h){h(Tt())})(function(h){h.defineMode("css",function(k,N){var M=N.inline;N.propertyKeywords||(N=h.resolveMode("text/css"));var _=k.indentUnit,O=N.tokenHooks,f=N.documentTypes||{},Y=N.mediaTypes||{},G=N.mediaFeatures||{},x=N.mediaValueKeywords||{},T=N.propertyKeywords||{},se=N.nonStandardPropertyKeywords||{},Ae=N.fontProperties||{},Ue=N.counterDescriptors||{},Be=N.colorKeywords||{},Ke=N.valueKeywords||{},He=N.allowNested,Te=N.lineComment,ze=N.supportsAtComponent===!0,ce=k.highlightNonStandardPropertyKeywords!==!1,Ie,De;function Se(z,ie){return Ie=ie,z}function Ze(z,ie){var W=z.next();if(O[W]){var We=O[W](z,ie);if(We!==!1)return We}if(W=="@")return z.eatWhile(/[\w\\\-]/),Se("def",z.current());if(W=="="||(W=="~"||W=="|")&&z.eat("="))return Se(null,"compare");if(W=='"'||W=="'")return ie.tokenize=ut(W),ie.tokenize(z,ie);if(W=="#")return z.eatWhile(/[\w\\\-]/),Se("atom","hash");if(W=="!")return z.match(/^\s*\w*/),Se("keyword","important");if(/\d/.test(W)||W=="."&&z.eat(/\d/))return z.eatWhile(/[\w.%]/),Se("number","unit");if(W==="-"){if(/[\d.]/.test(z.peek()))return z.eatWhile(/[\w.%]/),Se("number","unit");if(z.match(/^-[\w\\\-]*/))return z.eatWhile(/[\w\\\-]/),z.match(/^\s*:/,!1)?Se("variable-2","variable-definition"):Se("variable-2","variable");if(z.match(/^\w+-/))return Se("meta","meta")}else return/[,+>*\/]/.test(W)?Se(null,"select-op"):W=="."&&z.match(/^-?[_a-z][_a-z0-9-]*/i)?Se("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(W)?Se(null,W):z.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(z.current())&&(ie.tokenize=ke),Se("variable callee","variable")):/[\w\\\-]/.test(W)?(z.eatWhile(/[\w\\\-]/),Se("property","word")):Se(null,null)}function ut(z){return function(ie,W){for(var We=!1,ye;(ye=ie.next())!=null;){if(ye==z&&!We){z==")"&&ie.backUp(1);break}We=!We&&ye=="\\"}return(ye==z||!We&&z!=")")&&(W.tokenize=null),Se("string","string")}}function ke(z,ie){return z.next(),z.match(/^\s*[\"\')]/,!1)?ie.tokenize=null:ie.tokenize=ut(")"),Se(null,"(")}function Je(z,ie,W){this.type=z,this.indent=ie,this.prev=W}function qe(z,ie,W,We){return z.context=new Je(W,ie.indentation()+(We===!1?0:_),z.context),W}function Ye(z){return z.context.prev&&(z.context=z.context.prev),z.context.type}function w(z,ie,W){return Re[W.context.type](z,ie,W)}function S(z,ie,W,We){for(var ye=We||1;ye>0;ye--)W.context=W.context.prev;return w(z,ie,W)}function ee(z){var ie=z.current().toLowerCase();Ke.hasOwnProperty(ie)?De="atom":Be.hasOwnProperty(ie)?De="keyword":De="variable"}var Re={};return Re.top=function(z,ie,W){if(z=="{")return qe(W,ie,"block");if(z=="}"&&W.context.prev)return Ye(W);if(ze&&/@component/i.test(z))return qe(W,ie,"atComponentBlock");if(/^@(-moz-)?document$/i.test(z))return qe(W,ie,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(z))return qe(W,ie,"atBlock");if(/^@(font-face|counter-style)/i.test(z))return W.stateArg=z,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(z))return"keyframes";if(z&&z.charAt(0)=="@")return qe(W,ie,"at");if(z=="hash")De="builtin";else if(z=="word")De="tag";else{if(z=="variable-definition")return"maybeprop";if(z=="interpolation")return qe(W,ie,"interpolation");if(z==":")return"pseudo";if(He&&z=="(")return qe(W,ie,"parens")}return W.context.type},Re.block=function(z,ie,W){if(z=="word"){var We=ie.current().toLowerCase();return T.hasOwnProperty(We)?(De="property","maybeprop"):se.hasOwnProperty(We)?(De=ce?"string-2":"property","maybeprop"):He?(De=ie.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(De+=" error","maybeprop")}else return z=="meta"?"block":!He&&(z=="hash"||z=="qualifier")?(De="error","block"):Re.top(z,ie,W)},Re.maybeprop=function(z,ie,W){return z==":"?qe(W,ie,"prop"):w(z,ie,W)},Re.prop=function(z,ie,W){if(z==";")return Ye(W);if(z=="{"&&He)return qe(W,ie,"propBlock");if(z=="}"||z=="{")return S(z,ie,W);if(z=="(")return qe(W,ie,"parens");if(z=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(ie.current()))De+=" error";else if(z=="word")ee(ie);else if(z=="interpolation")return qe(W,ie,"interpolation");return"prop"},Re.propBlock=function(z,ie,W){return z=="}"?Ye(W):z=="word"?(De="property","maybeprop"):W.context.type},Re.parens=function(z,ie,W){return z=="{"||z=="}"?S(z,ie,W):z==")"?Ye(W):z=="("?qe(W,ie,"parens"):z=="interpolation"?qe(W,ie,"interpolation"):(z=="word"&&ee(ie),"parens")},Re.pseudo=function(z,ie,W){return z=="meta"?"pseudo":z=="word"?(De="variable-3",W.context.type):w(z,ie,W)},Re.documentTypes=function(z,ie,W){return z=="word"&&f.hasOwnProperty(ie.current())?(De="tag",W.context.type):Re.atBlock(z,ie,W)},Re.atBlock=function(z,ie,W){if(z=="(")return qe(W,ie,"atBlock_parens");if(z=="}"||z==";")return S(z,ie,W);if(z=="{")return Ye(W)&&qe(W,ie,He?"block":"top");if(z=="interpolation")return qe(W,ie,"interpolation");if(z=="word"){var We=ie.current().toLowerCase();We=="only"||We=="not"||We=="and"||We=="or"?De="keyword":Y.hasOwnProperty(We)?De="attribute":G.hasOwnProperty(We)?De="property":x.hasOwnProperty(We)?De="keyword":T.hasOwnProperty(We)?De="property":se.hasOwnProperty(We)?De=ce?"string-2":"property":Ke.hasOwnProperty(We)?De="atom":Be.hasOwnProperty(We)?De="keyword":De="error"}return W.context.type},Re.atComponentBlock=function(z,ie,W){return z=="}"?S(z,ie,W):z=="{"?Ye(W)&&qe(W,ie,He?"block":"top",!1):(z=="word"&&(De="error"),W.context.type)},Re.atBlock_parens=function(z,ie,W){return z==")"?Ye(W):z=="{"||z=="}"?S(z,ie,W,2):Re.atBlock(z,ie,W)},Re.restricted_atBlock_before=function(z,ie,W){return z=="{"?qe(W,ie,"restricted_atBlock"):z=="word"&&W.stateArg=="@counter-style"?(De="variable","restricted_atBlock_before"):w(z,ie,W)},Re.restricted_atBlock=function(z,ie,W){return z=="}"?(W.stateArg=null,Ye(W)):z=="word"?(W.stateArg=="@font-face"&&!Ae.hasOwnProperty(ie.current().toLowerCase())||W.stateArg=="@counter-style"&&!Ue.hasOwnProperty(ie.current().toLowerCase())?De="error":De="property","maybeprop"):"restricted_atBlock"},Re.keyframes=function(z,ie,W){return z=="word"?(De="variable","keyframes"):z=="{"?qe(W,ie,"top"):w(z,ie,W)},Re.at=function(z,ie,W){return z==";"?Ye(W):z=="{"||z=="}"?S(z,ie,W):(z=="word"?De="tag":z=="hash"&&(De="builtin"),"at")},Re.interpolation=function(z,ie,W){return z=="}"?Ye(W):z=="{"||z==";"?S(z,ie,W):(z=="word"?De="variable":z!="variable"&&z!="("&&z!=")"&&(De="error"),"interpolation")},{startState:function(z){return{tokenize:null,state:M?"block":"top",stateArg:null,context:new Je(M?"block":"top",z||0,null)}},token:function(z,ie){if(!ie.tokenize&&z.eatSpace())return null;var W=(ie.tokenize||Ze)(z,ie);return W&&typeof W=="object"&&(Ie=W[1],W=W[0]),De=W,Ie!="comment"&&(ie.state=Re[ie.state](Ie,z,ie)),De},indent:function(z,ie){var W=z.context,We=ie&&ie.charAt(0),ye=W.indent;return W.type=="prop"&&(We=="}"||We==")")&&(W=W.prev),W.prev&&(We=="}"&&(W.type=="block"||W.type=="top"||W.type=="interpolation"||W.type=="restricted_atBlock")?(W=W.prev,ye=W.indent):(We==")"&&(W.type=="parens"||W.type=="atBlock_parens")||We=="{"&&(W.type=="at"||W.type=="atBlock"))&&(ye=Math.max(0,W.indent-_))),ye},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Te,fold:"brace"}});function R(k){for(var N={},M=0;M<k.length;++M)N[k[M].toLowerCase()]=!0;return N}var $=["domain","regexp","url","url-prefix"],oe=R($),I=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],j=R(I),p=["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"],Z=R(p),K=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],J=R(K),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"],te=R(E),U=["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"],re=R(U),ge=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],fe=R(ge),ne=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],A=R(ne),H=["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"],Q=R(H),de=["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"],ue=R(de),ve=$.concat(I).concat(p).concat(K).concat(E).concat(U).concat(H).concat(de);h.registerHelper("hintWords","css",ve);function P(k,N){for(var M=!1,_;(_=k.next())!=null;){if(M&&_=="/"){N.tokenize=null;break}M=_=="*"}return["comment","comment"]}h.defineMIME("text/css",{documentTypes:oe,mediaTypes:j,mediaFeatures:Z,mediaValueKeywords:J,propertyKeywords:te,nonStandardPropertyKeywords:re,fontProperties:fe,counterDescriptors:A,colorKeywords:Q,valueKeywords:ue,tokenHooks:{"/":function(k,N){return k.eat("*")?(N.tokenize=P,P(k,N)):!1}},name:"css"}),h.defineMIME("text/x-scss",{mediaTypes:j,mediaFeatures:Z,mediaValueKeywords:J,propertyKeywords:te,nonStandardPropertyKeywords:re,colorKeywords:Q,valueKeywords:ue,fontProperties:fe,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(k,N){return k.eat("/")?(k.skipToEnd(),["comment","comment"]):k.eat("*")?(N.tokenize=P,P(k,N)):["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"}),h.defineMIME("text/x-less",{mediaTypes:j,mediaFeatures:Z,mediaValueKeywords:J,propertyKeywords:te,nonStandardPropertyKeywords:re,colorKeywords:Q,valueKeywords:ue,fontProperties:fe,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(k,N){return k.eat("/")?(k.skipToEnd(),["comment","comment"]):k.eat("*")?(N.tokenize=P,P(k,N)):["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"}),h.defineMIME("text/x-gss",{documentTypes:oe,mediaTypes:j,mediaFeatures:Z,propertyKeywords:te,nonStandardPropertyKeywords:re,fontProperties:fe,counterDescriptors:A,colorKeywords:Q,valueKeywords:ue,supportsAtComponent:!0,tokenHooks:{"/":function(k,N){return k.eat("*")?(N.tokenize=P,P(k,N)):!1}},name:"css",helperType:"gss"})})})();var Li=Pc.exports,Dc={exports:{}},Il={exports:{}},Fl;function Oo(){return Fl||(Fl=1,function(b,V){(function(h){h(Tt())})(function(h){var R={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},$={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};h.defineMode("xml",function(oe,I){var j=oe.indentUnit,p={},Z=I.htmlMode?R:$;for(var K in Z)p[K]=Z[K];for(var K in I)p[K]=I[K];var J,E;function te(f,Y){function G(se){return Y.tokenize=se,se(f,Y)}var x=f.next();if(x=="<")return f.eat("!")?f.eat("[")?f.match("CDATA[")?G(ge("atom","]]>")):null:f.match("--")?G(ge("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),G(fe(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),Y.tokenize=ge("meta","?>"),"meta"):(J=f.eat("/")?"closeTag":"openTag",Y.tokenize=U,"tag bracket");if(x=="&"){var T;return f.eat("#")?f.eat("x")?T=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):T=f.eatWhile(/[\d]/)&&f.eat(";"):T=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),T?"atom":"error"}else return f.eatWhile(/[^&<]/),null}te.isInText=!0;function U(f,Y){var G=f.next();if(G==">"||G=="/"&&f.eat(">"))return Y.tokenize=te,J=G==">"?"endTag":"selfcloseTag","tag bracket";if(G=="=")return J="equals",null;if(G=="<"){Y.tokenize=te,Y.state=de,Y.tagName=Y.tagStart=null;var x=Y.tokenize(f,Y);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(G)?(Y.tokenize=re(G),Y.stringStartCol=f.column(),Y.tokenize(f,Y)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(f){var Y=function(G,x){for(;!G.eol();)if(G.next()==f){x.tokenize=U;break}return"string"};return Y.isInAttribute=!0,Y}function ge(f,Y){return function(G,x){for(;!G.eol();){if(G.match(Y)){x.tokenize=te;break}G.next()}return f}}function fe(f){return function(Y,G){for(var x;(x=Y.next())!=null;){if(x=="<")return G.tokenize=fe(f+1),G.tokenize(Y,G);if(x==">")if(f==1){G.tokenize=te;break}else return G.tokenize=fe(f-1),G.tokenize(Y,G)}return"meta"}}function ne(f){return f&&f.toLowerCase()}function A(f,Y,G){this.prev=f.context,this.tagName=Y||"",this.indent=f.indented,this.startOfLine=G,(p.doNotIndent.hasOwnProperty(Y)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function H(f){f.context&&(f.context=f.context.prev)}function Q(f,Y){for(var G;;){if(!f.context||(G=f.context.tagName,!p.contextGrabbers.hasOwnProperty(ne(G))||!p.contextGrabbers[ne(G)].hasOwnProperty(ne(Y))))return;H(f)}}function de(f,Y,G){return f=="openTag"?(G.tagStart=Y.column(),ue):f=="closeTag"?ve:de}function ue(f,Y,G){return f=="word"?(G.tagName=Y.current(),E="tag",N):p.allowMissingTagName&&f=="endTag"?(E="tag bracket",N(f,Y,G)):(E="error",ue)}function ve(f,Y,G){if(f=="word"){var x=Y.current();return G.context&&G.context.tagName!=x&&p.implicitlyClosed.hasOwnProperty(ne(G.context.tagName))&&H(G),G.context&&G.context.tagName==x||p.matchClosing===!1?(E="tag",P):(E="tag error",k)}else return p.allowMissingTagName&&f=="endTag"?(E="tag bracket",P(f,Y,G)):(E="error",k)}function P(f,Y,G){return f!="endTag"?(E="error",P):(H(G),de)}function k(f,Y,G){return E="error",P(f,Y,G)}function N(f,Y,G){if(f=="word")return E="attribute",M;if(f=="endTag"||f=="selfcloseTag"){var x=G.tagName,T=G.tagStart;return G.tagName=G.tagStart=null,f=="selfcloseTag"||p.autoSelfClosers.hasOwnProperty(ne(x))?Q(G,x):(Q(G,x),G.context=new A(G,x,T==G.indented)),de}return E="error",N}function M(f,Y,G){return f=="equals"?_:(p.allowMissing||(E="error"),N(f,Y,G))}function _(f,Y,G){return f=="string"?O:f=="word"&&p.allowUnquoted?(E="string",N):(E="error",N(f,Y,G))}function O(f,Y,G){return f=="string"?O:N(f,Y,G)}return{startState:function(f){var Y={tokenize:te,state:de,indented:f||0,tagName:null,tagStart:null,context:null};return f!=null&&(Y.baseIndent=f),Y},token:function(f,Y){if(!Y.tagName&&f.sol()&&(Y.indented=f.indentation()),f.eatSpace())return null;J=null;var G=Y.tokenize(f,Y);return(G||J)&&G!="comment"&&(E=null,Y.state=Y.state(J||G,f,Y),E&&(G=E=="error"?G+" error":E)),G},indent:function(f,Y,G){var x=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+j;if(x&&x.noIndent)return h.Pass;if(f.tokenize!=U&&f.tokenize!=te)return G?G.match(/^(\s*)/)[0].length:0;if(f.tagName)return p.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+j*(p.multilineTagIndentFactor||1);if(p.alignCDATA&&/<!\[CDATA\[/.test(Y))return 0;var T=Y&&/^<(\/)?([\w_:\.-]*)/.exec(Y);if(T&&T[1])for(;x;)if(x.tagName==T[2]){x=x.prev;break}else if(p.implicitlyClosed.hasOwnProperty(ne(x.tagName)))x=x.prev;else break;else if(T)for(;x;){var se=p.contextGrabbers[ne(x.tagName)];if(se&&se.hasOwnProperty(ne(T[2])))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+j:f.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:p.htmlMode?"html":"xml",helperType:p.htmlMode?"html":"xml",skipAttribute:function(f){f.state==_&&(f.state=N)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var Y=[],G=f.context;G;G=G.prev)Y.push(G.tagName);return Y.reverse()}}}),h.defineMIME("text/xml","xml"),h.defineMIME("application/xml","xml"),h.mimeModes.hasOwnProperty("text/html")||h.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),Il.exports}(function(b,V){(function(h){h(Tt(),Oo(),Mo,Li)})(function(h){var R={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function $(J,E,te){var U=J.current(),re=U.search(E);return re>-1?J.backUp(U.length-re):U.match(/<\/?$/)&&(J.backUp(U.length),J.match(E,!1)||J.match(U)),te}var oe={};function I(J){var E=oe[J];return E||(oe[J]=new RegExp("\\s+"+J+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function j(J,E){var te=J.match(I(E));return te?/^\s*(.*?)\s*$/.exec(te[2])[1]:""}function p(J,E){return new RegExp((E?"^":"")+"</\\s*"+J+"\\s*>","i")}function Z(J,E){for(var te in J)for(var U=E[te]||(E[te]=[]),re=J[te],ge=re.length-1;ge>=0;ge--)U.unshift(re[ge])}function K(J,E){for(var te=0;te<J.length;te++){var U=J[te];if(!U[0]||U[1].test(j(E,U[0])))return U[2]}}h.defineMode("htmlmixed",function(J,E){var te=h.getMode(J,{name:"xml",htmlMode:!0,multilineTagIndentFactor:E.multilineTagIndentFactor,multilineTagIndentPastTag:E.multilineTagIndentPastTag,allowMissingTagName:E.allowMissingTagName}),U={},re=E&&E.tags,ge=E&&E.scriptTypes;if(Z(R,U),re&&Z(re,U),ge)for(var fe=ge.length-1;fe>=0;fe--)U.script.unshift(["type",ge[fe].matches,ge[fe].mode]);function ne(A,H){var Q=te.token(A,H.htmlState),de=/\btag\b/.test(Q),ue;if(de&&!/[<>\s\/]/.test(A.current())&&(ue=H.htmlState.tagName&&H.htmlState.tagName.toLowerCase())&&U.hasOwnProperty(ue))H.inTag=ue+" ";else if(H.inTag&&de&&/>$/.test(A.current())){var ve=/^([\S]+) (.*)/.exec(H.inTag);H.inTag=null;var P=A.current()==">"&&K(U[ve[1]],ve[2]),k=h.getMode(J,P),N=p(ve[1],!0),M=p(ve[1],!1);H.token=function(_,O){return _.match(N,!1)?(O.token=ne,O.localState=O.localMode=null,null):$(_,M,O.localMode.token(_,O.localState))},H.localMode=k,H.localState=h.startState(k,te.indent(H.htmlState,"",""))}else H.inTag&&(H.inTag+=A.current(),A.eol()&&(H.inTag+=" "));return Q}return{startState:function(){var A=h.startState(te);return{token:ne,inTag:null,localMode:null,localState:null,htmlState:A}},copyState:function(A){var H;return A.localState&&(H=h.copyState(A.localMode,A.localState)),{token:A.token,inTag:A.inTag,localMode:A.localMode,localState:H,htmlState:h.copyState(te,A.htmlState)}},token:function(A,H){return H.token(A,H)},indent:function(A,H,Q){return!A.localMode||/^\s*<\//.test(H)?te.indent(A.htmlState,H,Q):A.localMode.indent?A.localMode.indent(A.localState,H,Q):h.Pass},innerMode:function(A){return{state:A.localState||A.htmlState,mode:A.localMode||te}}}},"xml","javascript","css"),h.defineMIME("text/html","htmlmixed")})})();var Ec=Dc.exports;Oo();(function(b,V){(function(h){h(Tt())})(function(h){h.defineMode("sql",function(K,J){var E=J.client||{},te=J.atoms||{false:!0,true:!0,null:!0},U=J.builtin||p(Z),re=J.keywords||p(j),ge=J.operatorChars||/^[*+\-%<>!=&|~^\/]/,fe=J.support||{},ne=J.hooks||{},A=J.dateSQL||{date:!0,time:!0,timestamp:!0},H=J.backslashStringEscapes!==!1,Q=J.brackets||/^[\{}\(\)\[\]]/,de=J.punctuation||/^[;.,:]/;function ue(M,_){var O=M.next();if(ne[O]){var f=ne[O](M,_);if(f!==!1)return f}if(fe.hexNumber&&(O=="0"&&M.match(/^[xX][0-9a-fA-F]+/)||(O=="x"||O=="X")&&M.match(/^'[0-9a-fA-F]*'/)))return"number";if(fe.binaryNumber&&((O=="b"||O=="B")&&M.match(/^'[01]*'/)||O=="0"&&M.match(/^b[01]+/)))return"number";if(O.charCodeAt(0)>47&&O.charCodeAt(0)<58)return M.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),fe.decimallessFloat&&M.match(/^\.(?!\.)/),"number";if(O=="?"&&(M.eatSpace()||M.eol()||M.eat(";")))return"variable-3";if(O=="'"||O=='"'&&fe.doubleQuote)return _.tokenize=ve(O),_.tokenize(M,_);if((fe.nCharCast&&(O=="n"||O=="N")||fe.charsetCast&&O=="_"&&M.match(/[a-z][a-z0-9]*/i))&&(M.peek()=="'"||M.peek()=='"'))return"keyword";if(fe.escapeConstant&&(O=="e"||O=="E")&&(M.peek()=="'"||M.peek()=='"'&&fe.doubleQuote))return _.tokenize=function(G,x){return(x.tokenize=ve(G.next(),!0))(G,x)},"keyword";if(fe.commentSlashSlash&&O=="/"&&M.eat("/"))return M.skipToEnd(),"comment";if(fe.commentHash&&O=="#"||O=="-"&&M.eat("-")&&(!fe.commentSpaceRequired||M.eat(" ")))return M.skipToEnd(),"comment";if(O=="/"&&M.eat("*"))return _.tokenize=P(1),_.tokenize(M,_);if(O=="."){if(fe.zerolessFloat&&M.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(M.match(/^\.+/))return null;if(M.match(/^[\w\d_$#]+/))return"variable-2"}else{if(ge.test(O))return M.eatWhile(ge),"operator";if(Q.test(O))return"bracket";if(de.test(O))return M.eatWhile(de),"punctuation";if(O=="{"&&(M.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||M.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";M.eatWhile(/^[_\w\d]/);var Y=M.current().toLowerCase();return A.hasOwnProperty(Y)&&(M.match(/^( )+'[^']*'/)||M.match(/^( )+"[^"]*"/))?"number":te.hasOwnProperty(Y)?"atom":U.hasOwnProperty(Y)?"type":re.hasOwnProperty(Y)?"keyword":E.hasOwnProperty(Y)?"builtin":null}}function ve(M,_){return function(O,f){for(var Y=!1,G;(G=O.next())!=null;){if(G==M&&!Y){f.tokenize=ue;break}Y=(H||_)&&!Y&&G=="\\"}return"string"}}function P(M){return function(_,O){var f=_.match(/^.*?(\/\*|\*\/)/);return f?f[1]=="/*"?O.tokenize=P(M+1):M>1?O.tokenize=P(M-1):O.tokenize=ue:_.skipToEnd(),"comment"}}function k(M,_,O){_.context={prev:_.context,indent:M.indentation(),col:M.column(),type:O}}function N(M){M.indent=M.context.indent,M.context=M.context.prev}return{startState:function(){return{tokenize:ue,context:null}},token:function(M,_){if(M.sol()&&_.context&&_.context.align==null&&(_.context.align=!1),_.tokenize==ue&&M.eatSpace())return null;var O=_.tokenize(M,_);if(O=="comment")return O;_.context&&_.context.align==null&&(_.context.align=!0);var f=M.current();return f=="("?k(M,_,")"):f=="["?k(M,_,"]"):_.context&&_.context.type==f&&N(_),O},indent:function(M,_){var O=M.context;if(!O)return h.Pass;var f=_.charAt(0)==O.type;return O.align?O.col+(f?0:1):O.indent+(f?0:K.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:fe.commentSlashSlash?"//":fe.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:J}});function R(K){for(var J;(J=K.next())!=null;)if(J=="`"&&!K.eat("`"))return"variable-2";return K.backUp(K.current().length-1),K.eatWhile(/\w/)?"variable-2":null}function $(K){for(var J;(J=K.next())!=null;)if(J=='"'&&!K.eat('"'))return"variable-2";return K.backUp(K.current().length-1),K.eatWhile(/\w/)?"variable-2":null}function oe(K){return K.eat("@")&&(K.match("session."),K.match("local."),K.match("global.")),K.eat("'")?(K.match(/^.*'/),"variable-2"):K.eat('"')?(K.match(/^.*"/),"variable-2"):K.eat("`")?(K.match(/^.*`/),"variable-2"):K.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function I(K){return K.eat("N")?"atom":K.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var j="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 p(K){for(var J={},E=K.split(" "),te=0;te<E.length;++te)J[E[te]]=!0;return J}var Z="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";h.defineMIME("text/x-sql",{name:"sql",keywords:p(j+"begin"),builtin:p(Z),atoms:p("false true null unknown"),dateSQL:p("date time timestamp"),support:p("doubleQuote binaryNumber hexNumber")}),h.defineMIME("text/x-mssql",{name:"sql",client:p("$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:p(j+"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:p("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:p("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:p("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":oe}}),h.defineMIME("text/x-mysql",{name:"sql",client:p("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:p(j+"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:p("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:p("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:p("date time timestamp"),support:p("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":oe,"`":R,"\\":I}}),h.defineMIME("text/x-mariadb",{name:"sql",client:p("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:p(j+"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:p("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:p("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:p("date time timestamp"),support:p("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":oe,"`":R,"\\":I}}),h.defineMIME("text/x-sqlite",{name:"sql",client:p("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:p(j+"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:p("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:p("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:p("date time timestamp datetime"),support:p("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":oe,":":oe,"?":oe,$:oe,'"':$,"`":R}}),h.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:p("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:p("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:p("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:p("commentSlashSlash decimallessFloat"),hooks:{}}),h.defineMIME("text/x-plsql",{name:"sql",client:p("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:p("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:p("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:p("date time timestamp"),support:p("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),h.defineMIME("text/x-hive",{name:"sql",keywords:p("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:p("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:p("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:p("date timestamp"),support:p("doubleQuote binaryNumber hexNumber")}),h.defineMIME("text/x-pgsql",{name:"sql",client:p("source"),keywords:p(j+"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:p("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:p("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:p("date time timestamp"),support:p("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),h.defineMIME("text/x-gql",{name:"sql",keywords:p("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:p("false true"),builtin:p("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),h.defineMIME("text/x-gpsql",{name:"sql",client:p("source"),keywords:p("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:p("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:p("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:p("date time timestamp"),support:p("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),h.defineMIME("text/x-sparksql",{name:"sql",keywords:p("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:p("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:p("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:p("date time timestamp"),support:p("doubleQuote zerolessFloat")}),h.defineMIME("text/x-esper",{name:"sql",client:p("source"),keywords:p("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:p("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:p("time"),support:p("decimallessFloat zerolessFloat binaryNumber hexNumber")}),h.defineMIME("text/x-trino",{name:"sql",keywords:p("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:p("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:p("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:p("date time timestamp zone"),support:p("decimallessFloat zerolessFloat hexNumber")})})})();(function(b,V){(function(h){h(Tt())})(function(h){function R(x,T,se,Ae,Ue,Be){this.indented=x,this.column=T,this.type=se,this.info=Ae,this.align=Ue,this.prev=Be}function $(x,T,se,Ae){var Ue=x.indented;return x.context&&x.context.type=="statement"&&se!="statement"&&(Ue=x.context.indented),x.context=new R(Ue,T,se,Ae,null,x.context)}function oe(x){var T=x.context.type;return(T==")"||T=="]"||T=="}")&&(x.indented=x.context.indented),x.context=x.context.prev}function I(x,T,se){if(T.prevToken=="variable"||T.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(x.string.slice(0,se))||T.typeAtEndOfLine&&x.column()==x.indentation())return!0}function j(x){for(;;){if(!x||x.type=="top")return!0;if(x.type=="}"&&x.prev.info!="namespace")return!1;x=x.prev}}h.defineMode("clike",function(x,T){var se=x.indentUnit,Ae=T.statementIndentUnit||se,Ue=T.dontAlignCalls,Be=T.keywords||{},Ke=T.types||{},He=T.builtin||{},Te=T.blockKeywords||{},ze=T.defKeywords||{},ce=T.atoms||{},Ie=T.hooks||{},De=T.multiLineStrings,Se=T.indentStatements!==!1,Ze=T.indentSwitch!==!1,ut=T.namespaceSeparator,ke=T.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=T.numberStart||/[\d\.]/,qe=T.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Ye=T.isOperatorChar||/[+\-*&%=<>!?|\/]/,w=T.isIdentifierChar||/[\w\$_\xa1-\uffff]/,S=T.isReservedIdentifier||!1,ee,Re;function z(ye,_e){var xe=ye.next();if(Ie[xe]){var y=Ie[xe](ye,_e);if(y!==!1)return y}if(xe=='"'||xe=="'")return _e.tokenize=ie(xe),_e.tokenize(ye,_e);if(Je.test(xe)){if(ye.backUp(1),ye.match(qe))return"number";ye.next()}if(ke.test(xe))return ee=xe,null;if(xe=="/"){if(ye.eat("*"))return _e.tokenize=W,W(ye,_e);if(ye.eat("/"))return ye.skipToEnd(),"comment"}if(Ye.test(xe)){for(;!ye.match(/^\/[\/*]/,!1)&&ye.eat(Ye););return"operator"}if(ye.eatWhile(w),ut)for(;ye.match(ut);)ye.eatWhile(w);var m=ye.current();return Z(Be,m)?(Z(Te,m)&&(ee="newstatement"),Z(ze,m)&&(Re=!0),"keyword"):Z(Ke,m)?"type":Z(He,m)||S&&S(m)?(Z(Te,m)&&(ee="newstatement"),"builtin"):Z(ce,m)?"atom":"variable"}function ie(ye){return function(_e,xe){for(var y=!1,m,B=!1;(m=_e.next())!=null;){if(m==ye&&!y){B=!0;break}y=!y&&m=="\\"}return(B||!(y||De))&&(xe.tokenize=null),"string"}}function W(ye,_e){for(var xe=!1,y;y=ye.next();){if(y=="/"&&xe){_e.tokenize=null;break}xe=y=="*"}return"comment"}function We(ye,_e){T.typeFirstDefinitions&&ye.eol()&&j(_e.context)&&(_e.typeAtEndOfLine=I(ye,_e,ye.pos))}return{startState:function(ye){return{tokenize:null,context:new R((ye||0)-se,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(ye,_e){var xe=_e.context;if(ye.sol()&&(xe.align==null&&(xe.align=!1),_e.indented=ye.indentation(),_e.startOfLine=!0),ye.eatSpace())return We(ye,_e),null;ee=Re=null;var y=(_e.tokenize||z)(ye,_e);if(y=="comment"||y=="meta")return y;if(xe.align==null&&(xe.align=!0),ee==";"||ee==":"||ee==","&&ye.match(/^\s*(?:\/\/.*)?$/,!1))for(;_e.context.type=="statement";)oe(_e);else if(ee=="{")$(_e,ye.column(),"}");else if(ee=="[")$(_e,ye.column(),"]");else if(ee=="(")$(_e,ye.column(),")");else if(ee=="}"){for(;xe.type=="statement";)xe=oe(_e);for(xe.type=="}"&&(xe=oe(_e));xe.type=="statement";)xe=oe(_e)}else ee==xe.type?oe(_e):Se&&((xe.type=="}"||xe.type=="top")&&ee!=";"||xe.type=="statement"&&ee=="newstatement")&&$(_e,ye.column(),"statement",ye.current());if(y=="variable"&&(_e.prevToken=="def"||T.typeFirstDefinitions&&I(ye,_e,ye.start)&&j(_e.context)&&ye.match(/^\s*\(/,!1))&&(y="def"),Ie.token){var m=Ie.token(ye,_e,y);m!==void 0&&(y=m)}return y=="def"&&T.styleDefs===!1&&(y="variable"),_e.startOfLine=!1,_e.prevToken=Re?"def":y||ee,We(ye,_e),y},indent:function(ye,_e){if(ye.tokenize!=z&&ye.tokenize!=null||ye.typeAtEndOfLine&&j(ye.context))return h.Pass;var xe=ye.context,y=_e&&_e.charAt(0),m=y==xe.type;if(xe.type=="statement"&&y=="}"&&(xe=xe.prev),T.dontIndentStatements)for(;xe.type=="statement"&&T.dontIndentStatements.test(xe.info);)xe=xe.prev;if(Ie.indent){var B=Ie.indent(ye,xe,_e,se);if(typeof B=="number")return B}var Le=xe.prev&&xe.prev.info=="switch";if(T.allmanIndentation&&/[{(]/.test(y)){for(;xe.type!="top"&&xe.type!="}";)xe=xe.prev;return xe.indented}return xe.type=="statement"?xe.indented+(y=="{"?0:Ae):xe.align&&(!Ue||xe.type!=")")?xe.column+(m?0:1):xe.type==")"&&!m?xe.indented+Ae:xe.indented+(m?0:se)+(!m&&Le&&!/^(?:case|default)\b/.test(_e)?se:0)},electricInput:Ze?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function p(x){for(var T={},se=x.split(" "),Ae=0;Ae<se.length;++Ae)T[se[Ae]]=!0;return T}function Z(x,T){return typeof x=="function"?x(T):x.propertyIsEnumerable(T)}var K="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",J="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",E="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",te="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",U=p("int long char short double float unsigned signed void bool"),re=p("SEL instancetype id Class Protocol BOOL");function ge(x){return Z(U,x)||/.+_t$/.test(x)}function fe(x){return ge(x)||Z(re,x)}var ne="case do else for if switch while struct enum union",A="struct enum union";function H(x,T){if(!T.startOfLine)return!1;for(var se,Ae=null;se=x.peek();){if(se=="\\"&&x.match(/^.$/)){Ae=H;break}else if(se=="/"&&x.match(/^\/[\/\*]/,!1))break;x.next()}return T.tokenize=Ae,"meta"}function Q(x,T){return T.prevToken=="type"?"type":!1}function de(x){return!x||x.length<2||x[0]!="_"?!1:x[1]=="_"||x[1]!==x[1].toLowerCase()}function ue(x){return x.eatWhile(/[\w\.']/),"number"}function ve(x,T){if(x.backUp(1),x.match(/^(?:R|u8R|uR|UR|LR)/)){var se=x.match(/^"([^\s\\()]{0,16})\(/);return se?(T.cpp11RawStringDelim=se[1],T.tokenize=N,N(x,T)):!1}return x.match(/^(?:u8|u|U|L)/)?x.match(/^["']/,!1)?"string":!1:(x.next(),!1)}function P(x){var T=/(\w+)::~?(\w+)$/.exec(x);return T&&T[1]==T[2]}function k(x,T){for(var se;(se=x.next())!=null;)if(se=='"'&&!x.eat('"')){T.tokenize=null;break}return"string"}function N(x,T){var se=T.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),Ae=x.match(new RegExp(".*?\\)"+se+'"'));return Ae?T.tokenize=null:x.skipToEnd(),"string"}function M(x,T){typeof x=="string"&&(x=[x]);var se=[];function Ae(Be){if(Be)for(var Ke in Be)Be.hasOwnProperty(Ke)&&se.push(Ke)}Ae(T.keywords),Ae(T.types),Ae(T.builtin),Ae(T.atoms),se.length&&(T.helperType=x[0],h.registerHelper("hintWords",x[0],se));for(var Ue=0;Ue<x.length;++Ue)h.defineMIME(x[Ue],T)}M(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:p(K),types:ge,blockKeywords:p(ne),defKeywords:p(A),typeFirstDefinitions:!0,atoms:p("NULL true false"),isReservedIdentifier:de,hooks:{"#":H,"*":Q},modeProps:{fold:["brace","include"]}}),M(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:p(K+" "+J),types:ge,blockKeywords:p(ne+" class try catch"),defKeywords:p(A+" class namespace"),typeFirstDefinitions:!0,atoms:p("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:de,hooks:{"#":H,"*":Q,u:ve,U:ve,L:ve,R:ve,0:ue,1:ue,2:ue,3:ue,4:ue,5:ue,6:ue,7:ue,8:ue,9:ue,token:function(x,T,se){if(se=="variable"&&x.peek()=="("&&(T.prevToken==";"||T.prevToken==null||T.prevToken=="}")&&P(x.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-java",{name:"clike",keywords:p("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:p("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:p("catch class do else finally for if switch try while"),defKeywords:p("class interface enum @interface"),typeFirstDefinitions:!0,atoms:p("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(x){return x.match("interface",!1)?!1:(x.eatWhile(/[\w\$_]/),"meta")},'"':function(x,T){return x.match(/""$/)?(T.tokenize=_,T.tokenize(x,T)):!1}},modeProps:{fold:["brace","import"]}}),M("text/x-csharp",{name:"clike",keywords:p("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:p("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:p("catch class do else finally for foreach if struct switch try while"),defKeywords:p("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:p("true false null"),hooks:{"@":function(x,T){return x.eat('"')?(T.tokenize=k,k(x,T)):(x.eatWhile(/[\w\$_]/),"meta")}}});function _(x,T){for(var se=!1;!x.eol();){if(!se&&x.match('"""')){T.tokenize=null;break}se=x.next()=="\\"&&!se}return"string"}function O(x){return function(T,se){for(var Ae;Ae=T.next();)if(Ae=="*"&&T.eat("/"))if(x==1){se.tokenize=null;break}else return se.tokenize=O(x-1),se.tokenize(T,se);else if(Ae=="/"&&T.eat("*"))return se.tokenize=O(x+1),se.tokenize(T,se);return"comment"}}M("text/x-scala",{name:"clike",keywords:p("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:p("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:p("catch class enum do else finally for forSome if match switch try while"),defKeywords:p("class enum def object package trait type val var"),atoms:p("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(x){return x.eatWhile(/[\w\$_]/),"meta"},'"':function(x,T){return x.match('""')?(T.tokenize=_,T.tokenize(x,T)):!1},"'":function(x){return x.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(x.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(x,T){var se=T.context;return se.type=="}"&&se.align&&x.eat(">")?(T.context=new R(se.indented,se.column,se.type,se.info,null,se.prev),"operator"):!1},"/":function(x,T){return x.eat("*")?(T.tokenize=O(1),T.tokenize(x,T)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function f(x){return function(T,se){for(var Ae=!1,Ue,Be=!1;!T.eol();){if(!x&&!Ae&&T.match('"')){Be=!0;break}if(x&&T.match('"""')){Be=!0;break}Ue=T.next(),!Ae&&Ue=="$"&&T.match("{")&&T.skipTo("}"),Ae=!Ae&&Ue=="\\"&&!x}return(Be||!x)&&(se.tokenize=null),"string"}}M("text/x-kotlin",{name:"clike",keywords:p("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:p("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:p("catch class do else finally for if where try while enum"),defKeywords:p("class val var object interface fun"),atoms:p("true false null this"),hooks:{"@":function(x){return x.eatWhile(/[\w\$_]/),"meta"},"*":function(x,T){return T.prevToken=="."?"variable":"operator"},'"':function(x,T){return T.tokenize=f(x.match('""')),T.tokenize(x,T)},"/":function(x,T){return x.eat("*")?(T.tokenize=O(1),T.tokenize(x,T)):!1},indent:function(x,T,se,Ae){var Ue=se&&se.charAt(0);if((x.prevToken=="}"||x.prevToken==")")&&se=="")return x.indented;if(x.prevToken=="operator"&&se!="}"&&x.context.type!="}"||x.prevToken=="variable"&&Ue=="."||(x.prevToken=="}"||x.prevToken==")")&&Ue==".")return Ae*2+T.indented;if(T.align&&T.type=="}")return T.indented+(x.context.type==(se||"").charAt(0)?0:Ae)}},modeProps:{closeBrackets:{triples:'"'}}}),M(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:p("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:p("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:p("for while do if else struct"),builtin:p("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:p("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":H},modeProps:{fold:["brace","include"]}}),M("text/x-nesc",{name:"clike",keywords:p(K+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:ge,blockKeywords:p(ne),atoms:p("null true false"),hooks:{"#":H},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec",{name:"clike",keywords:p(K+" "+E),types:fe,builtin:p(te),blockKeywords:p(ne+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:p(A+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:p("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:de,hooks:{"#":H,"*":Q},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec++",{name:"clike",keywords:p(K+" "+E+" "+J),types:fe,builtin:p(te),blockKeywords:p(ne+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:p(A+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:p("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:de,hooks:{"#":H,"*":Q,u:ve,U:ve,L:ve,R:ve,0:ue,1:ue,2:ue,3:ue,4:ue,5:ue,6:ue,7:ue,8:ue,9:ue,token:function(x,T,se){if(se=="variable"&&x.peek()=="("&&(T.prevToken==";"||T.prevToken==null||T.prevToken=="}")&&P(x.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-squirrel",{name:"clike",keywords:p("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ge,blockKeywords:p("case catch class else for foreach if switch try while"),defKeywords:p("function local class"),typeFirstDefinitions:!0,atoms:p("true false null"),hooks:{"#":H},modeProps:{fold:["brace","include"]}});var Y=null;function G(x){return function(T,se){for(var Ae=!1,Ue,Be=!1;!T.eol();){if(!Ae&&T.match('"')&&(x=="single"||T.match('""'))){Be=!0;break}if(!Ae&&T.match("``")){Y=G(x),Be=!0;break}Ue=T.next(),Ae=x=="single"&&!Ae&&Ue=="\\"}return Be&&(se.tokenize=null),"string"}}M("text/x-ceylon",{name:"clike",keywords:p("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(x){var T=x.charAt(0);return T===T.toUpperCase()&&T!==T.toLowerCase()},blockKeywords:p("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:p("class dynamic function interface module object package value"),builtin:p("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:p("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(x){return x.eatWhile(/[\w\$_]/),"meta"},'"':function(x,T){return T.tokenize=G(x.match('""')?"triple":"single"),T.tokenize(x,T)},"`":function(x,T){return!Y||!x.match("`")?!1:(T.tokenize=Y,Y=null,T.tokenize(x,T))},"'":function(x){return x.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(x,T,se){if((se=="variable"||se=="type")&&T.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})();var Wl={exports:{}},jl;function Ic(){return jl||(jl=1,function(b,V){(function(h){h(Tt())})(function(h){h.overlayMode=function(R,$,oe){return{startState:function(){return{base:h.startState(R),overlay:h.startState($),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(I){return{base:h.copyState(R,I.base),overlay:h.copyState($,I.overlay),basePos:I.basePos,baseCur:null,overlayPos:I.overlayPos,overlayCur:null}},token:function(I,j){return(I!=j.streamSeen||Math.min(j.basePos,j.overlayPos)<I.start)&&(j.streamSeen=I,j.basePos=j.overlayPos=I.start),I.start==j.basePos&&(j.baseCur=R.token(I,j.base),j.basePos=I.pos),I.start==j.overlayPos&&(I.pos=I.start,j.overlayCur=$.token(I,j.overlay),j.overlayPos=I.pos),I.pos=Math.min(j.basePos,j.overlayPos),j.overlayCur==null?j.baseCur:j.baseCur!=null&&j.overlay.combineTokens||oe&&j.overlay.combineTokens==null?j.baseCur+" "+j.overlayCur:j.overlayCur},indent:R.indent&&function(I,j,p){return R.indent(I.base,j,p)},electricChars:R.electricChars,innerMode:function(I){return{state:I.base,mode:R}},blankLine:function(I){var j,p;return R.blankLine&&(j=R.blankLine(I.base)),$.blankLine&&(p=$.blankLine(I.overlay)),p==null?j:oe&&j!=null?j+" "+p:p}}}})}()),Wl.exports}var Hl={exports:{}},ql;function Fc(){return ql||(ql=1,function(b,V){(function(h){h(Tt())})(function(h){h.defineMode("coffeescript",function(R,$){var oe="error";function I(k){return new RegExp("^(("+k.join(")|(")+"))\\b")}var j=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,p=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,Z=/^[_A-Za-z$][_A-Za-z$0-9]*/,K=/^@[_A-Za-z$][_A-Za-z$0-9]*/,J=I(["and","or","not","is","isnt","in","instanceof","typeof"]),E=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],te=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],U=I(E.concat(te));E=I(E);var re=/^('{3}|\"{3}|['\"])/,ge=/^(\/{3}|\/)/,fe=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],ne=I(fe);function A(k,N){if(k.sol()){N.scope.align===null&&(N.scope.align=!1);var M=N.scope.offset;if(k.eatSpace()){var _=k.indentation();return _>M&&N.scope.type=="coffee"?"indent":_<M?"dedent":null}else M>0&&ue(k,N)}if(k.eatSpace())return null;var O=k.peek();if(k.match("####"))return k.skipToEnd(),"comment";if(k.match("###"))return N.tokenize=Q,N.tokenize(k,N);if(O==="#")return k.skipToEnd(),"comment";if(k.match(/^-?[0-9\.]/,!1)){var f=!1;if(k.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(f=!0),k.match(/^-?\d+\.\d*/)&&(f=!0),k.match(/^-?\.\d+/)&&(f=!0),f)return k.peek()=="."&&k.backUp(1),"number";var Y=!1;if(k.match(/^-?0x[0-9a-f]+/i)&&(Y=!0),k.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(Y=!0),k.match(/^-?0(?![\dx])/i)&&(Y=!0),Y)return"number"}if(k.match(re))return N.tokenize=H(k.current(),!1,"string"),N.tokenize(k,N);if(k.match(ge)){if(k.current()!="/"||k.match(/^.*\//,!1))return N.tokenize=H(k.current(),!0,"string-2"),N.tokenize(k,N);k.backUp(1)}return k.match(j)||k.match(J)?"operator":k.match(p)?"punctuation":k.match(ne)?"atom":k.match(K)||N.prop&&k.match(Z)?"property":k.match(U)?"keyword":k.match(Z)?"variable":(k.next(),oe)}function H(k,N,M){return function(_,O){for(;!_.eol();)if(_.eatWhile(/[^'"\/\\]/),_.eat("\\")){if(_.next(),N&&_.eol())return M}else{if(_.match(k))return O.tokenize=A,M;_.eat(/['"\/]/)}return N&&($.singleLineStringErrors?M=oe:O.tokenize=A),M}}function Q(k,N){for(;!k.eol();){if(k.eatWhile(/[^#]/),k.match("###")){N.tokenize=A;break}k.eatWhile("#")}return"comment"}function de(k,N,M){M=M||"coffee";for(var _=0,O=!1,f=null,Y=N.scope;Y;Y=Y.prev)if(Y.type==="coffee"||Y.type=="}"){_=Y.offset+R.indentUnit;break}M!=="coffee"?(O=null,f=k.column()+k.current().length):N.scope.align&&(N.scope.align=!1),N.scope={offset:_,type:M,prev:N.scope,align:O,alignOffset:f}}function ue(k,N){if(N.scope.prev)if(N.scope.type==="coffee"){for(var M=k.indentation(),_=!1,O=N.scope;O;O=O.prev)if(M===O.offset){_=!0;break}if(!_)return!0;for(;N.scope.prev&&N.scope.offset!==M;)N.scope=N.scope.prev;return!1}else return N.scope=N.scope.prev,!1}function ve(k,N){var M=N.tokenize(k,N),_=k.current();_==="return"&&(N.dedent=!0),((_==="->"||_==="=>")&&k.eol()||M==="indent")&&de(k,N);var O="[({".indexOf(_);if(O!==-1&&de(k,N,"])}".slice(O,O+1)),E.exec(_)&&de(k,N),_=="then"&&ue(k,N),M==="dedent"&&ue(k,N))return oe;if(O="])}".indexOf(_),O!==-1){for(;N.scope.type=="coffee"&&N.scope.prev;)N.scope=N.scope.prev;N.scope.type==_&&(N.scope=N.scope.prev)}return N.dedent&&k.eol()&&(N.scope.type=="coffee"&&N.scope.prev&&(N.scope=N.scope.prev),N.dedent=!1),M}var P={startState:function(k){return{tokenize:A,scope:{offset:k||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(k,N){var M=N.scope.align===null&&N.scope;M&&k.sol()&&(M.align=!1);var _=ve(k,N);return _&&_!="comment"&&(M&&(M.align=!0),N.prop=_=="punctuation"&&k.current()=="."),_},indent:function(k,N){if(k.tokenize!=A)return 0;var M=k.scope,_=N&&"])}".indexOf(N.charAt(0))>-1;if(_)for(;M.type=="coffee"&&M.prev;)M=M.prev;var O=_&&M.type===N.charAt(0);return M.align?M.alignOffset-(O?1:0):(O?M.prev:M).offset},lineComment:"#",fold:"indent"};return P}),h.defineMIME("application/vnd.coffeescript","coffeescript"),h.defineMIME("text/x-coffeescript","coffeescript"),h.defineMIME("text/coffeescript","coffeescript")})}()),Hl.exports}var Bl={exports:{}},Rl;function Wc(){return Rl||(Rl=1,function(b,V){(function(h){h(Tt(),Li)})(function(h){h.defineMode("sass",function(R){var $=h.mimeModes["text/css"],oe=$.propertyKeywords||{},I=$.colorKeywords||{},j=$.valueKeywords||{},p=$.fontProperties||{};function Z(P){return new RegExp("^"+P.join("|"))}var K=["true","false","null","auto"],J=new RegExp("^"+K.join("|")),E=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],te=Z(E),U=/^::?[a-zA-Z_][\w\-]*/,re;function ge(P){return!P.peek()||P.match(/\s+$/,!1)}function fe(P,k){var N=P.peek();return N===")"?(P.next(),k.tokenizer=ue,"operator"):N==="("?(P.next(),P.eatSpace(),"operator"):N==="'"||N==='"'?(k.tokenizer=A(P.next()),"string"):(k.tokenizer=A(")",!1),"string")}function ne(P,k){return function(N,M){return N.sol()&&N.indentation()<=P?(M.tokenizer=ue,ue(N,M)):(k&&N.skipTo("*/")?(N.next(),N.next(),M.tokenizer=ue):N.skipToEnd(),"comment")}}function A(P,k){k==null&&(k=!0);function N(M,_){var O=M.next(),f=M.peek(),Y=M.string.charAt(M.pos-2),G=O!=="\\"&&f===P||O===P&&Y!=="\\";return G?(O!==P&&k&&M.next(),ge(M)&&(_.cursorHalf=0),_.tokenizer=ue,"string"):O==="#"&&f==="{"?(_.tokenizer=H(N),M.next(),"operator"):"string"}return N}function H(P){return function(k,N){return k.peek()==="}"?(k.next(),N.tokenizer=P,"operator"):ue(k,N)}}function Q(P){if(P.indentCount==0){P.indentCount++;var k=P.scopes[0].offset,N=k+R.indentUnit;P.scopes.unshift({offset:N})}}function de(P){P.scopes.length!=1&&P.scopes.shift()}function ue(P,k){var N=P.peek();if(P.match("/*"))return k.tokenizer=ne(P.indentation(),!0),k.tokenizer(P,k);if(P.match("//"))return k.tokenizer=ne(P.indentation(),!1),k.tokenizer(P,k);if(P.match("#{"))return k.tokenizer=H(ue),"operator";if(N==='"'||N==="'")return P.next(),k.tokenizer=A(N),"string";if(k.cursorHalf){if(N==="#"&&(P.next(),P.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||P.match(/^-?[0-9\.]+/))return ge(P)&&(k.cursorHalf=0),"number";if(P.match(/^(px|em|in)\b/))return ge(P)&&(k.cursorHalf=0),"unit";if(P.match(J))return ge(P)&&(k.cursorHalf=0),"keyword";if(P.match(/^url/)&&P.peek()==="(")return k.tokenizer=fe,ge(P)&&(k.cursorHalf=0),"atom";if(N==="$")return P.next(),P.eatWhile(/[\w-]/),ge(P)&&(k.cursorHalf=0),"variable-2";if(N==="!")return P.next(),k.cursorHalf=0,P.match(/^[\w]+/)?"keyword":"operator";if(P.match(te))return ge(P)&&(k.cursorHalf=0),"operator";if(P.eatWhile(/[\w-]/))return ge(P)&&(k.cursorHalf=0),re=P.current().toLowerCase(),j.hasOwnProperty(re)?"atom":I.hasOwnProperty(re)?"keyword":oe.hasOwnProperty(re)?(k.prevProp=P.current().toLowerCase(),"property"):"tag";if(ge(P))return k.cursorHalf=0,null}else{if(N==="-"&&P.match(/^-\w+-/))return"meta";if(N==="."){if(P.next(),P.match(/^[\w-]+/))return Q(k),"qualifier";if(P.peek()==="#")return Q(k),"tag"}if(N==="#"){if(P.next(),P.match(/^[\w-]+/))return Q(k),"builtin";if(P.peek()==="#")return Q(k),"tag"}if(N==="$")return P.next(),P.eatWhile(/[\w-]/),"variable-2";if(P.match(/^-?[0-9\.]+/))return"number";if(P.match(/^(px|em|in)\b/))return"unit";if(P.match(J))return"keyword";if(P.match(/^url/)&&P.peek()==="(")return k.tokenizer=fe,"atom";if(N==="="&&P.match(/^=[\w-]+/))return Q(k),"meta";if(N==="+"&&P.match(/^\+[\w-]+/))return"variable-3";if(N==="@"&&P.match("@extend")&&(P.match(/\s*[\w]/)||de(k)),P.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return Q(k),"def";if(N==="@")return P.next(),P.eatWhile(/[\w-]/),"def";if(P.eatWhile(/[\w-]/))if(P.match(/ *: *[\w-\+\$#!\("']/,!1)){re=P.current().toLowerCase();var M=k.prevProp+"-"+re;return oe.hasOwnProperty(M)?"property":oe.hasOwnProperty(re)?(k.prevProp=re,"property"):p.hasOwnProperty(re)?"property":"tag"}else return P.match(/ *:/,!1)?(Q(k),k.cursorHalf=1,k.prevProp=P.current().toLowerCase(),"property"):(P.match(/ *,/,!1)||Q(k),"tag");if(N===":")return P.match(U)?"variable-3":(P.next(),k.cursorHalf=1,"operator")}return P.match(te)?"operator":(P.next(),null)}function ve(P,k){P.sol()&&(k.indentCount=0);var N=k.tokenizer(P,k),M=P.current();if((M==="@return"||M==="}")&&de(k),N!==null){for(var _=P.pos-M.length,O=_+R.indentUnit*k.indentCount,f=[],Y=0;Y<k.scopes.length;Y++){var G=k.scopes[Y];G.offset<=O&&f.push(G)}k.scopes=f}return N}return{startState:function(){return{tokenizer:ue,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(P,k){var N=ve(P,k);return k.lastToken={style:N,content:P.current()},N},indent:function(P){return P.scopes[0].offset},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"indent"}},"css"),h.defineMIME("text/x-sass","sass")})}()),Bl.exports}var Kl={exports:{}},Ul;function jc(){return Ul||(Ul=1,function(b,V){(function(h){h(Tt())})(function(h){h.defineMode("stylus",function(H){for(var Q=H.indentUnit,de="",ue=ne(R),ve=/^(a|b|i|s|col|em)$/i,P=ne(j),k=ne(p),N=ne(J),M=ne(K),_=ne($),O=fe($),f=ne(I),Y=ne(oe),G=ne(Z),x=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,T=fe(E),se=ne(te),Ae=new RegExp(/^\-(moz|ms|o|webkit)-/i),Ue=ne(U),Be="",Ke={},He,Te,ze,ce;de.length<Q;)de+=" ";function Ie(y,m){if(Be=y.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),m.context.line.firstWord=Be?Be[0].replace(/^\s*/,""):"",m.context.line.indent=y.indentation(),He=y.peek(),y.match("//"))return y.skipToEnd(),["comment","comment"];if(y.match("/*"))return m.tokenize=De,De(y,m);if(He=='"'||He=="'")return y.next(),m.tokenize=Se(He),m.tokenize(y,m);if(He=="@")return y.next(),y.eatWhile(/[\w\\-]/),["def",y.current()];if(He=="#"){if(y.next(),y.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(y.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return y.match(Ae)?["meta","vendor-prefixes"]:y.match(/^-?[0-9]?\.?[0-9]/)?(y.eatWhile(/[a-z%]/i),["number","unit"]):He=="!"?(y.next(),[y.match(/^(important|optional)/i)?"keyword":"operator","important"]):He=="."&&y.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:y.match(O)?(y.peek()=="("&&(m.tokenize=Ze),["property","word"]):y.match(/^[a-z][\w-]*\(/i)?(y.backUp(1),["keyword","mixin"]):y.match(/^(\+|-)[a-z][\w-]*\(/i)?(y.backUp(1),["keyword","block-mixin"]):y.string.match(/^\s*&/)&&y.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:y.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(y.backUp(1),["variable-3","reference"]):y.match(/^&{1}\s*$/)?["variable-3","reference"]:y.match(T)?["operator","operator"]:y.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?y.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!w(y.current())?(y.match("."),["variable-2","variable-name"]):["variable-2","word"]:y.match(x)?["operator",y.current()]:/[:;,{}\[\]\(\)]/.test(He)?(y.next(),[null,He]):(y.next(),[null,null])}function De(y,m){for(var B=!1,Le;(Le=y.next())!=null;){if(B&&Le=="/"){m.tokenize=null;break}B=Le=="*"}return["comment","comment"]}function Se(y){return function(m,B){for(var Le=!1,tt;(tt=m.next())!=null;){if(tt==y&&!Le){y==")"&&m.backUp(1);break}Le=!Le&&tt=="\\"}return(tt==y||!Le&&y!=")")&&(B.tokenize=null),["string","string"]}}function Ze(y,m){return y.next(),y.match(/\s*[\"\')]/,!1)?m.tokenize=null:m.tokenize=Se(")"),[null,"("]}function ut(y,m,B,Le){this.type=y,this.indent=m,this.prev=B,this.line=Le||{firstWord:"",indent:0}}function ke(y,m,B,Le){return Le=Le>=0?Le:Q,y.context=new ut(B,m.indentation()+Le,y.context),B}function Je(y,m){var B=y.context.indent-Q;return m=m||!1,y.context=y.context.prev,m&&(y.context.indent=B),y.context.type}function qe(y,m,B){return Ke[B.context.type](y,m,B)}function Ye(y,m,B,Le){for(var tt=1;tt>0;tt--)B.context=B.context.prev;return qe(y,m,B)}function w(y){return y.toLowerCase()in ue}function S(y){return y=y.toLowerCase(),y in P||y in G}function ee(y){return y.toLowerCase()in se}function Re(y){return y.toLowerCase().match(Ae)}function z(y){var m=y.toLowerCase(),B="variable-2";return w(y)?B="tag":ee(y)?B="block-keyword":S(y)?B="property":m in N||m in Ue?B="atom":m=="return"||m in M?B="keyword":y.match(/^[A-Z]/)&&(B="string"),B}function ie(y,m){return _e(m)&&(y=="{"||y=="]"||y=="hash"||y=="qualifier")||y=="block-mixin"}function W(y,m){return y=="{"&&m.match(/^\s*\$?[\w-]+/i,!1)}function We(y,m){return y==":"&&m.match(/^[a-z-]+/,!1)}function ye(y){return y.sol()||y.string.match(new RegExp("^\\s*"+A(y.current())))}function _e(y){return y.eol()||y.match(/^\s*$/,!1)}function xe(y){var m=/^\s*[-_]*[a-z0-9]+[\w-]*/i,B=typeof y=="string"?y.match(m):y.string.match(m);return B?B[0].replace(/^\s*/,""):""}return Ke.block=function(y,m,B){if(y=="comment"&&ye(m)||y==","&&_e(m)||y=="mixin")return ke(B,m,"block",0);if(W(y,m))return ke(B,m,"interpolation");if(_e(m)&&y=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(m.string)&&!w(xe(m)))return ke(B,m,"block",0);if(ie(y,m))return ke(B,m,"block");if(y=="}"&&_e(m))return ke(B,m,"block",0);if(y=="variable-name")return m.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||ee(xe(m))?ke(B,m,"variableName"):ke(B,m,"variableName",0);if(y=="=")return!_e(m)&&!ee(xe(m))?ke(B,m,"block",0):ke(B,m,"block");if(y=="*"&&(_e(m)||m.match(/\s*(,|\.|#|\[|:|{)/,!1)))return ce="tag",ke(B,m,"block");if(We(y,m))return ke(B,m,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(y))return ke(B,m,_e(m)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(y))return ke(B,m,"keyframes");if(/@extends?/.test(y))return ke(B,m,"extend",0);if(y&&y.charAt(0)=="@")return m.indentation()>0&&S(m.current().slice(1))?(ce="variable-2","block"):/(@import|@require|@charset)/.test(y)?ke(B,m,"block",0):ke(B,m,"block");if(y=="reference"&&_e(m))return ke(B,m,"block");if(y=="(")return ke(B,m,"parens");if(y=="vendor-prefixes")return ke(B,m,"vendorPrefixes");if(y=="word"){var Le=m.current();if(ce=z(Le),ce=="property")return ye(m)?ke(B,m,"block",0):(ce="atom","block");if(ce=="tag"){if(/embed|menu|pre|progress|sub|table/.test(Le)&&S(xe(m))||m.string.match(new RegExp("\\[\\s*"+Le+"|"+Le+"\\s*\\]")))return ce="atom","block";if(ve.test(Le)&&(ye(m)&&m.string.match(/=/)||!ye(m)&&!m.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!w(xe(m))))return ce="variable-2",ee(xe(m))?"block":ke(B,m,"block",0);if(_e(m))return ke(B,m,"block")}if(ce=="block-keyword")return ce="keyword",m.current(/(if|unless)/)&&!ye(m)?"block":ke(B,m,"block");if(Le=="return")return ke(B,m,"block",0);if(ce=="variable-2"&&m.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return ke(B,m,"block")}return B.context.type},Ke.parens=function(y,m,B){if(y=="(")return ke(B,m,"parens");if(y==")")return B.context.prev.type=="parens"?Je(B):m.string.match(/^[a-z][\w-]*\(/i)&&_e(m)||ee(xe(m))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(xe(m))||!m.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&w(xe(m))?ke(B,m,"block"):m.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||m.string.match(/^\s*(\(|\)|[0-9])/)||m.string.match(/^\s+[a-z][\w-]*\(/i)||m.string.match(/^\s+[\$-]?[a-z]/i)?ke(B,m,"block",0):_e(m)?ke(B,m,"block"):ke(B,m,"block",0);if(y&&y.charAt(0)=="@"&&S(m.current().slice(1))&&(ce="variable-2"),y=="word"){var Le=m.current();ce=z(Le),ce=="tag"&&ve.test(Le)&&(ce="variable-2"),(ce=="property"||Le=="to")&&(ce="atom")}return y=="variable-name"?ke(B,m,"variableName"):We(y,m)?ke(B,m,"pseudo"):B.context.type},Ke.vendorPrefixes=function(y,m,B){return y=="word"?(ce="property",ke(B,m,"block",0)):Je(B)},Ke.pseudo=function(y,m,B){return S(xe(m.string))?Ye(y,m,B):(m.match(/^[a-z-]+/),ce="variable-3",_e(m)?ke(B,m,"block"):Je(B))},Ke.atBlock=function(y,m,B){if(y=="(")return ke(B,m,"atBlock_parens");if(ie(y,m))return ke(B,m,"block");if(W(y,m))return ke(B,m,"interpolation");if(y=="word"){var Le=m.current().toLowerCase();if(/^(only|not|and|or)$/.test(Le)?ce="keyword":_.hasOwnProperty(Le)?ce="tag":Y.hasOwnProperty(Le)?ce="attribute":f.hasOwnProperty(Le)?ce="property":k.hasOwnProperty(Le)?ce="string-2":ce=z(m.current()),ce=="tag"&&_e(m))return ke(B,m,"block")}return y=="operator"&&/^(not|and|or)$/.test(m.current())&&(ce="keyword"),B.context.type},Ke.atBlock_parens=function(y,m,B){if(y=="{"||y=="}")return B.context.type;if(y==")")return _e(m)?ke(B,m,"block"):ke(B,m,"atBlock");if(y=="word"){var Le=m.current().toLowerCase();return ce=z(Le),/^(max|min)/.test(Le)&&(ce="property"),ce=="tag"&&(ve.test(Le)?ce="variable-2":ce="atom"),B.context.type}return Ke.atBlock(y,m,B)},Ke.keyframes=function(y,m,B){return m.indentation()=="0"&&(y=="}"&&ye(m)||y=="]"||y=="hash"||y=="qualifier"||w(m.current()))?Ye(y,m,B):y=="{"?ke(B,m,"keyframes"):y=="}"?ye(m)?Je(B,!0):ke(B,m,"keyframes"):y=="unit"&&/^[0-9]+\%$/.test(m.current())?ke(B,m,"keyframes"):y=="word"&&(ce=z(m.current()),ce=="block-keyword")?(ce="keyword",ke(B,m,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(y)?ke(B,m,_e(m)?"block":"atBlock"):y=="mixin"?ke(B,m,"block",0):B.context.type},Ke.interpolation=function(y,m,B){return y=="{"&&Je(B)&&ke(B,m,"block"),y=="}"?m.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||m.string.match(/^\s*[a-z]/i)&&w(xe(m))?ke(B,m,"block"):!m.string.match(/^(\{|\s*\&)/)||m.match(/\s*[\w-]/,!1)?ke(B,m,"block",0):ke(B,m,"block"):y=="variable-name"?ke(B,m,"variableName",0):(y=="word"&&(ce=z(m.current()),ce=="tag"&&(ce="atom")),B.context.type)},Ke.extend=function(y,m,B){return y=="["||y=="="?"extend":y=="]"?Je(B):y=="word"?(ce=z(m.current()),"extend"):Je(B)},Ke.variableName=function(y,m,B){return y=="string"||y=="["||y=="]"||m.current().match(/^(\.|\$)/)?(m.current().match(/^\.[\w-]+/i)&&(ce="variable-2"),"variableName"):Ye(y,m,B)},{startState:function(y){return{tokenize:null,state:"block",context:new ut("block",y||0,null)}},token:function(y,m){return!m.tokenize&&y.eatSpace()?null:(Te=(m.tokenize||Ie)(y,m),Te&&typeof Te=="object"&&(ze=Te[1],Te=Te[0]),ce=Te,m.state=Ke[m.state](ze,y,m),ce)},indent:function(y,m,B){var Le=y.context,tt=m&&m.charAt(0),ft=Le.indent,Wt=xe(m),Dt=B.match(/^\s*/)[0].replace(/\t/g,de).length,Ee=y.context.prev?y.context.prev.line.firstWord:"",yt=y.context.prev?y.context.prev.line.indent:Dt;return Le.prev&&(tt=="}"&&(Le.type=="block"||Le.type=="atBlock"||Le.type=="keyframes")||tt==")"&&(Le.type=="parens"||Le.type=="atBlock_parens")||tt=="{"&&Le.type=="at")?ft=Le.indent-Q:/(\})/.test(tt)||(/@|\$|\d/.test(tt)||/^\{/.test(m)||/^\s*\/(\/|\*)/.test(m)||/^\s*\/\*/.test(Ee)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(m)||/^(\+|-)?[a-z][\w-]*\(/i.test(m)||/^return/.test(m)||ee(Wt)?ft=Dt:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(tt)||w(Wt)?/\,\s*$/.test(Ee)?ft=yt:/^\s+/.test(B)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Ee)||w(Ee))?ft=Dt<=yt?yt:yt+Q:ft=Dt:!/,\s*$/.test(B)&&(Re(Wt)||S(Wt))&&(ee(Ee)?ft=Dt<=yt?yt:yt+Q:/^\{/.test(Ee)?ft=Dt<=yt?Dt:yt+Q:Re(Ee)||S(Ee)?ft=Dt>=yt?yt:Dt:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(Ee)||/=\s*$/.test(Ee)||w(Ee)||/^\$[\w-\.\[\]\'\"]/.test(Ee)?ft=yt+Q:ft=Dt)),ft},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}});var R=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],$=["domain","regexp","url-prefix","url"],oe=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],I=["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"],j=["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"],p=["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"],Z=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],K=["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"],te=["for","if","else","unless","from","to"],U=["null","true","false","href","title","type","not-allowed","readonly","disabled"],re=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],ge=R.concat($,oe,I,j,p,K,J,Z,E,te,U,re);function fe(H){return H=H.sort(function(Q,de){return de>Q}),new RegExp("^(("+H.join(")|(")+"))\\b")}function ne(H){for(var Q={},de=0;de<H.length;++de)Q[H[de]]=!0;return Q}function A(H){return H.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}h.registerHelper("hintWords","stylus",ge),h.defineMIME("text/x-styl","stylus")})}()),Kl.exports}var Gl={exports:{}},Xl;function Hc(){return Xl||(Xl=1,function(b,V){(function(h){h(Tt(),Mo,Li,Ec)})(function(h){h.defineMode("pug",function(R){var $="keyword",oe="meta",I="builtin",j="qualifier",p={"{":"}","(":")","[":"]"},Z=h.getMode(R,"javascript");function K(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=h.startState(Z),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}K.prototype.copy=function(){var w=new K;return w.javaScriptLine=this.javaScriptLine,w.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,w.javaScriptArguments=this.javaScriptArguments,w.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,w.isInterpolating=this.isInterpolating,w.interpolationNesting=this.interpolationNesting,w.jsState=h.copyState(Z,this.jsState),w.innerMode=this.innerMode,this.innerMode&&this.innerState&&(w.innerState=h.copyState(this.innerMode,this.innerState)),w.restOfLine=this.restOfLine,w.isIncludeFiltered=this.isIncludeFiltered,w.isEach=this.isEach,w.lastTag=this.lastTag,w.scriptType=this.scriptType,w.isAttrs=this.isAttrs,w.attrsNest=this.attrsNest.slice(),w.inAttributeName=this.inAttributeName,w.attributeIsType=this.attributeIsType,w.attrValue=this.attrValue,w.indentOf=this.indentOf,w.indentToken=this.indentToken,w.innerModeForLine=this.innerModeForLine,w};function J(w,S){if(w.sol()&&(S.javaScriptLine=!1,S.javaScriptLineExcludesColon=!1),S.javaScriptLine){if(S.javaScriptLineExcludesColon&&w.peek()===":"){S.javaScriptLine=!1,S.javaScriptLineExcludesColon=!1;return}var ee=Z.token(w,S.jsState);return w.eol()&&(S.javaScriptLine=!1),ee||!0}}function E(w,S){if(S.javaScriptArguments){if(S.javaScriptArgumentsDepth===0&&w.peek()!=="("){S.javaScriptArguments=!1;return}if(w.peek()==="("?S.javaScriptArgumentsDepth++:w.peek()===")"&&S.javaScriptArgumentsDepth--,S.javaScriptArgumentsDepth===0){S.javaScriptArguments=!1;return}var ee=Z.token(w,S.jsState);return ee||!0}}function te(w){if(w.match(/^yield\b/))return"keyword"}function U(w){if(w.match(/^(?:doctype) *([^\n]+)?/))return oe}function re(w,S){if(w.match("#{"))return S.isInterpolating=!0,S.interpolationNesting=0,"punctuation"}function ge(w,S){if(S.isInterpolating){if(w.peek()==="}"){if(S.interpolationNesting--,S.interpolationNesting<0)return w.next(),S.isInterpolating=!1,"punctuation"}else w.peek()==="{"&&S.interpolationNesting++;return Z.token(w,S.jsState)||!0}}function fe(w,S){if(w.match(/^case\b/))return S.javaScriptLine=!0,$}function ne(w,S){if(w.match(/^when\b/))return S.javaScriptLine=!0,S.javaScriptLineExcludesColon=!0,$}function A(w){if(w.match(/^default\b/))return $}function H(w,S){if(w.match(/^extends?\b/))return S.restOfLine="string",$}function Q(w,S){if(w.match(/^append\b/))return S.restOfLine="variable",$}function de(w,S){if(w.match(/^prepend\b/))return S.restOfLine="variable",$}function ue(w,S){if(w.match(/^block\b *(?:(prepend|append)\b)?/))return S.restOfLine="variable",$}function ve(w,S){if(w.match(/^include\b/))return S.restOfLine="string",$}function P(w,S){if(w.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&w.match("include"))return S.isIncludeFiltered=!0,$}function k(w,S){if(S.isIncludeFiltered){var ee=T(w,S);return S.isIncludeFiltered=!1,S.restOfLine="string",ee}}function N(w,S){if(w.match(/^mixin\b/))return S.javaScriptLine=!0,$}function M(w,S){if(w.match(/^\+([-\w]+)/))return w.match(/^\( *[-\w]+ *=/,!1)||(S.javaScriptArguments=!0,S.javaScriptArgumentsDepth=0),"variable";if(w.match("+#{",!1))return w.next(),S.mixinCallAfter=!0,re(w,S)}function _(w,S){if(S.mixinCallAfter)return S.mixinCallAfter=!1,w.match(/^\( *[-\w]+ *=/,!1)||(S.javaScriptArguments=!0,S.javaScriptArgumentsDepth=0),!0}function O(w,S){if(w.match(/^(if|unless|else if|else)\b/))return S.javaScriptLine=!0,$}function f(w,S){if(w.match(/^(- *)?(each|for)\b/))return S.isEach=!0,$}function Y(w,S){if(S.isEach){if(w.match(/^ in\b/))return S.javaScriptLine=!0,S.isEach=!1,$;if(w.sol()||w.eol())S.isEach=!1;else if(w.next()){for(;!w.match(/^ in\b/,!1)&&w.next(););return"variable"}}}function G(w,S){if(w.match(/^while\b/))return S.javaScriptLine=!0,$}function x(w,S){var ee;if(ee=w.match(/^(\w(?:[-:\w]*\w)?)\/?/))return S.lastTag=ee[1].toLowerCase(),S.lastTag==="script"&&(S.scriptType="application/javascript"),"tag"}function T(w,S){if(w.match(/^:([\w\-]+)/)){var ee;return R&&R.innerModes&&(ee=R.innerModes(w.current().substring(1))),ee||(ee=w.current().substring(1)),typeof ee=="string"&&(ee=h.getMode(R,ee)),Ze(w,S,ee),"atom"}}function se(w,S){if(w.match(/^(!?=|-)/))return S.javaScriptLine=!0,"punctuation"}function Ae(w){if(w.match(/^#([\w-]+)/))return I}function Ue(w){if(w.match(/^\.([\w-]+)/))return j}function Be(w,S){if(w.peek()=="(")return w.next(),S.isAttrs=!0,S.attrsNest=[],S.inAttributeName=!0,S.attrValue="",S.attributeIsType=!1,"punctuation"}function Ke(w,S){if(S.isAttrs){if(p[w.peek()]&&S.attrsNest.push(p[w.peek()]),S.attrsNest[S.attrsNest.length-1]===w.peek())S.attrsNest.pop();else if(w.eat(")"))return S.isAttrs=!1,"punctuation";if(S.inAttributeName&&w.match(/^[^=,\)!]+/))return(w.peek()==="="||w.peek()==="!")&&(S.inAttributeName=!1,S.jsState=h.startState(Z),S.lastTag==="script"&&w.current().trim().toLowerCase()==="type"?S.attributeIsType=!0:S.attributeIsType=!1),"attribute";var ee=Z.token(w,S.jsState);if(S.attributeIsType&&ee==="string"&&(S.scriptType=w.current().toString()),S.attrsNest.length===0&&(ee==="string"||ee==="variable"||ee==="keyword"))try{return Function("","var x "+S.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),S.inAttributeName=!0,S.attrValue="",w.backUp(w.current().length),Ke(w,S)}catch(Re){}return S.attrValue+=w.current(),ee||!0}}function He(w,S){if(w.match(/^&attributes\b/))return S.javaScriptArguments=!0,S.javaScriptArgumentsDepth=0,"keyword"}function Te(w){if(w.sol()&&w.eatSpace())return"indent"}function ze(w,S){if(w.match(/^ *\/\/(-)?([^\n]*)/))return S.indentOf=w.indentation(),S.indentToken="comment","comment"}function ce(w){if(w.match(/^: */))return"colon"}function Ie(w,S){if(w.match(/^(?:\| ?| )([^\n]+)/))return"string";if(w.match(/^(<[^\n]*)/,!1))return Ze(w,S,"htmlmixed"),S.innerModeForLine=!0,ut(w,S,!0)}function De(w,S){if(w.eat(".")){var ee=null;return S.lastTag==="script"&&S.scriptType.toLowerCase().indexOf("javascript")!=-1?ee=S.scriptType.toLowerCase().replace(/"|'/g,""):S.lastTag==="style"&&(ee="css"),Ze(w,S,ee),"dot"}}function Se(w){return w.next(),null}function Ze(w,S,ee){ee=h.mimeModes[ee]||ee,ee=R.innerModes&&R.innerModes(ee)||ee,ee=h.mimeModes[ee]||ee,ee=h.getMode(R,ee),S.indentOf=w.indentation(),ee&&ee.name!=="null"?S.innerMode=ee:S.indentToken="string"}function ut(w,S,ee){if(w.indentation()>S.indentOf||S.innerModeForLine&&!w.sol()||ee)return S.innerMode?(S.innerState||(S.innerState=S.innerMode.startState?h.startState(S.innerMode,w.indentation()):{}),w.hideFirstChars(S.indentOf+2,function(){return S.innerMode.token(w,S.innerState)||!0})):(w.skipToEnd(),S.indentToken);w.sol()&&(S.indentOf=1/0,S.indentToken=null,S.innerMode=null,S.innerState=null)}function ke(w,S){if(w.sol()&&(S.restOfLine=""),S.restOfLine){w.skipToEnd();var ee=S.restOfLine;return S.restOfLine="",ee}}function Je(){return new K}function qe(w){return w.copy()}function Ye(w,S){var ee=ut(w,S)||ke(w,S)||ge(w,S)||k(w,S)||Y(w,S)||Ke(w,S)||J(w,S)||E(w,S)||_(w,S)||te(w)||U(w)||re(w,S)||fe(w,S)||ne(w,S)||A(w)||H(w,S)||Q(w,S)||de(w,S)||ue(w,S)||ve(w,S)||P(w,S)||N(w,S)||M(w,S)||O(w,S)||f(w,S)||G(w,S)||x(w,S)||T(w,S)||se(w,S)||Ae(w)||Ue(w)||Be(w,S)||He(w,S)||Te(w)||Ie(w,S)||ze(w,S)||ce(w)||De(w,S)||Se(w);return ee===!0?null:ee}return{startState:Je,copyState:qe,token:Ye}},"javascript","css","htmlmixed"),h.defineMIME("text/x-pug","pug"),h.defineMIME("text/x-jade","pug")})}()),Gl.exports}var Yl={exports:{}},Vl={exports:{}},Ql;function qc(){return Ql||(Ql=1,function(b,V){(function(h){h(Tt())})(function(h){h.defineSimpleMode=function(E,te){h.defineMode(E,function(U){return h.simpleMode(U,te)})},h.simpleMode=function(E,te){R(te,"start");var U={},re=te.meta||{},ge=!1;for(var fe in te)if(fe!=re&&te.hasOwnProperty(fe))for(var ne=U[fe]=[],A=te[fe],H=0;H<A.length;H++){var Q=A[H];ne.push(new I(Q,te)),(Q.indent||Q.dedent)&&(ge=!0)}var de={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:ge?[]:null}},copyState:function(ve){var P={state:ve.state,pending:ve.pending,local:ve.local,localState:null,indent:ve.indent&&ve.indent.slice(0)};ve.localState&&(P.localState=h.copyState(ve.local.mode,ve.localState)),ve.stack&&(P.stack=ve.stack.slice(0));for(var k=ve.persistentStates;k;k=k.next)P.persistentStates={mode:k.mode,spec:k.spec,state:k.state==ve.localState?P.localState:h.copyState(k.mode,k.state),next:P.persistentStates};return P},token:j(U,E),innerMode:function(ve){return ve.local&&{mode:ve.local.mode,state:ve.localState}},indent:J(U,re)};if(re)for(var ue in re)re.hasOwnProperty(ue)&&(de[ue]=re[ue]);return de};function R(E,te){if(!E.hasOwnProperty(te))throw new Error("Undefined state "+te+" in simple mode")}function $(E,te){if(!E)return/(?:)/;var U="";return E instanceof RegExp?(E.ignoreCase&&(U="i"),E.unicode&&(U+="u"),E=E.source):E=String(E),new RegExp((te===!1?"":"^")+"(?:"+E+")",U)}function oe(E){if(!E)return null;if(E.apply)return E;if(typeof E=="string")return E.replace(/\./g," ");for(var te=[],U=0;U<E.length;U++)te.push(E[U]&&E[U].replace(/\./g," "));return te}function I(E,te){(E.next||E.push)&&R(te,E.next||E.push),this.regex=$(E.regex),this.token=oe(E.token),this.data=E}function j(E,te){return function(U,re){if(re.pending){var ge=re.pending.shift();return re.pending.length==0&&(re.pending=null),U.pos+=ge.text.length,ge.token}if(re.local)if(re.local.end&&U.match(re.local.end)){var fe=re.local.endToken||null;return re.local=re.localState=null,fe}else{var fe=re.local.mode.token(U,re.localState),ne;return re.local.endScan&&(ne=re.local.endScan.exec(U.current()))&&(U.pos=U.start+ne.index),fe}for(var A=E[re.state],H=0;H<A.length;H++){var Q=A[H],de=(!Q.data.sol||U.sol())&&U.match(Q.regex);if(de){Q.data.next?re.state=Q.data.next:Q.data.push?((re.stack||(re.stack=[])).push(re.state),re.state=Q.data.push):Q.data.pop&&re.stack&&re.stack.length&&(re.state=re.stack.pop()),Q.data.mode&&Z(te,re,Q.data.mode,Q.token),Q.data.indent&&re.indent.push(U.indentation()+te.indentUnit),Q.data.dedent&&re.indent.pop();var ue=Q.token;if(ue&&ue.apply&&(ue=ue(de)),de.length>2&&Q.token&&typeof Q.token!="string"){for(var ve=2;ve<de.length;ve++)de[ve]&&(re.pending||(re.pending=[])).push({text:de[ve],token:Q.token[ve-1]});return U.backUp(de[0].length-(de[1]?de[1].length:0)),ue[0]}else return ue&&ue.join?ue[0]:ue}}return U.next(),null}}function p(E,te){if(E===te)return!0;if(!E||typeof E!="object"||!te||typeof te!="object")return!1;var U=0;for(var re in E)if(E.hasOwnProperty(re)){if(!te.hasOwnProperty(re)||!p(E[re],te[re]))return!1;U++}for(var re in te)te.hasOwnProperty(re)&&U--;return U==0}function Z(E,te,U,re){var ge;if(U.persistent)for(var fe=te.persistentStates;fe&&!ge;fe=fe.next)(U.spec?p(U.spec,fe.spec):U.mode==fe.mode)&&(ge=fe);var ne=ge?ge.mode:U.mode||h.getMode(E,U.spec),A=ge?ge.state:h.startState(ne);U.persistent&&!ge&&(te.persistentStates={mode:ne,spec:U.spec,state:A,next:te.persistentStates}),te.localState=A,te.local={mode:ne,end:U.end&&$(U.end),endScan:U.end&&U.forceEnd!==!1&&$(U.end,!1),endToken:re&&re.join?re[re.length-1]:re}}function K(E,te){for(var U=0;U<te.length;U++)if(te[U]===E)return!0}function J(E,te){return function(U,re,ge){if(U.local&&U.local.mode.indent)return U.local.mode.indent(U.localState,re,ge);if(U.indent==null||U.local||te.dontIndentStates&&K(U.state,te.dontIndentStates)>-1)return h.Pass;var fe=U.indent.length-1,ne=E[U.state];e:for(;;){for(var A=0;A<ne.length;A++){var H=ne[A];if(H.data.dedent&&H.data.dedentIfLineStart!==!1){var Q=H.regex.exec(re);if(Q&&Q[0]){fe--,(H.next||H.push)&&(ne=E[H.next||H.push]),re=re.slice(Q[0].length);continue e}}}break}return fe<0?0:U.indent[fe]}}})}()),Vl.exports}var Zl={exports:{}},Jl;function Bc(){return Jl||(Jl=1,function(b,V){(function(h){h(Tt())})(function(h){h.multiplexingMode=function(R){var $=Array.prototype.slice.call(arguments,1);function oe(I,j,p,Z){if(typeof j=="string"){var K=I.indexOf(j,p);return Z&&K>-1?K+j.length:K}var J=j.exec(p?I.slice(p):I);return J?J.index+p+(Z?J[0].length:0):-1}return{startState:function(){return{outer:h.startState(R),innerActive:null,inner:null,startingInner:!1}},copyState:function(I){return{outer:h.copyState(R,I.outer),innerActive:I.innerActive,inner:I.innerActive&&h.copyState(I.innerActive.mode,I.inner),startingInner:I.startingInner}},token:function(I,j){if(j.innerActive){var ge=j.innerActive,Z=I.string;if(!ge.close&&I.sol())return j.innerActive=j.inner=null,this.token(I,j);var E=ge.close&&!j.startingInner?oe(Z,ge.close,I.pos,ge.parseDelimiters):-1;if(E==I.pos&&!ge.parseDelimiters)return I.match(ge.close),j.innerActive=j.inner=null,ge.delimStyle&&ge.delimStyle+" "+ge.delimStyle+"-close";E>-1&&(I.string=Z.slice(0,E));var fe=ge.mode.token(I,j.inner);return E>-1?I.string=Z:I.pos>I.start&&(j.startingInner=!1),E==I.pos&&ge.parseDelimiters&&(j.innerActive=j.inner=null),ge.innerStyle&&(fe?fe=fe+" "+ge.innerStyle:fe=ge.innerStyle),fe}else{for(var p=1/0,Z=I.string,K=0;K<$.length;++K){var J=$[K],E=oe(Z,J.open,I.pos);if(E==I.pos){J.parseDelimiters||I.match(J.open),j.startingInner=!!J.parseDelimiters,j.innerActive=J;var te=0;if(R.indent){var U=R.indent(j.outer,"","");U!==h.Pass&&(te=U)}return j.inner=h.startState(J.mode,te),J.delimStyle&&J.delimStyle+" "+J.delimStyle+"-open"}else E!=-1&&E<p&&(p=E)}p!=1/0&&(I.string=Z.slice(0,p));var re=R.token(I,j.outer);return p!=1/0&&(I.string=Z),re}},indent:function(I,j,p){var Z=I.innerActive?I.innerActive.mode:R;return Z.indent?Z.indent(I.innerActive?I.inner:I.outer,j,p):h.Pass},blankLine:function(I){var j=I.innerActive?I.innerActive.mode:R;if(j.blankLine&&j.blankLine(I.innerActive?I.inner:I.outer),I.innerActive)I.innerActive.close===`
`&&(I.innerActive=I.inner=null);else for(var p=0;p<$.length;++p){var Z=$[p];Z.open===`
`&&(I.innerActive=Z,I.inner=h.startState(Z.mode,j.indent?j.indent(I.outer,"",""):0))}},electricChars:R.electricChars,innerMode:function(I){return I.inner?{state:I.inner,mode:I.innerActive.mode}:{state:I.outer,mode:R}}}}})}()),Zl.exports}var $l;function Rc(){return $l||($l=1,function(b,V){(function(h){h(Tt(),qc(),Bc())})(function(h){h.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:"--}}"}}),h.defineMode("handlebars",function(R,$){var oe=h.getMode(R,"handlebars-tags");return!$||!$.base?oe:h.multiplexingMode(h.getMode(R,$.base),{open:"{{",close:/\}\}\}?/,mode:oe,parseDelimiters:!0})}),h.defineMIME("text/x-handlebars-template","handlebars")})}()),Yl.exports}(function(b,V){(function(h){h(Tt(),Ic(),Oo(),Mo,Fc(),Li,Wc(),jc(),Hc(),Rc())})(function(h){var R={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};h.defineMode("vue-template",function($,oe){var I={token:function(j){if(j.match(/^\{\{.*?\}\}/))return"meta mustache";for(;j.next()&&!j.match("{{",!1););return null}};return h.overlayMode(h.getMode($,oe.backdrop||"text/html"),I)}),h.defineMode("vue",function($){return h.getMode($,{name:"htmlmixed",tags:R})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),h.defineMIME("script/x-vue","vue"),h.defineMIME("text/x-vue","vue")})})();const Kc=Ti({__name:"CodeMirror",props:{mode:{type:String,default:fn.JSON,validator(b){return Object.values(fn).includes(b)}},value:{type:String,default:""},readonly:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1}},emits:["change"],setup(b,{emit:V}){const h=b,R=V,$=as();let oe;const I=bc(Z,100),j=mc();ki(()=>h.value,J=>Rn(this,null,function*(){yield Dl();const E=oe==null?void 0:oe.getValue();J!==E&&(oe==null||oe.setValue(J||""))}),{flush:"post"}),ki(()=>h.mode,J=>{oe==null||oe.setOption("mode",J)}),ki(()=>j.getDarkMode,()=>Rn(this,null,function*(){p()}),{immediate:!0});function p(){var J;(J=ls(oe))==null||J.setOption("theme",j.getDarkMode==="light"?"idea":"material-palenight")}function Z(){oe==null||oe.refresh()}function K(){return Rn(this,null,function*(){const J={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers"]};oe=Oc($.value,Pl({value:"",mode:h.mode,readOnly:h.readonly,tabSize:2,theme:"material-palenight",lineWrapping:!0,lineNumbers:!0},J)),oe==null||oe.setValue(h.value),p(),oe==null||oe.on("change",()=>{R("change",oe==null?void 0:oe.getValue())})})}return kc(()=>Rn(this,null,function*(){yield Dl(),K(),zc(I)})),_c(()=>{oe=null}),(J,E)=>(zo(),ss("div",{class:Sc(["relative !h-full w-full overflow-hidden",{"ant-input":h.bordered,"css-dev-only-do-not-override-kqecok":h.bordered}]),ref_key:"el",ref:$},null,2))}}),Uc={class:"h-full"},Gc=Ti({__name:"CodeEditor",props:{value:{type:[Object,String]},mode:{type:String,default:fn.JSON,validator(b){return Object.values(fn).includes(b)}},readonly:{type:Boolean},autoFormat:{type:Boolean,default:!0},bordered:{type:Boolean,default:!1}},emits:["change","update:value","format-error"],setup(b,{emit:V}){const h=b,R=V,$=us(()=>{const{value:I,mode:j,autoFormat:p}=h;if(!p||j!==fn.JSON)return I;let Z=I;if(wc(I))try{Z=JSON.parse(I)}catch(K){return R("format-error",I),I}return JSON.stringify(Z,null,2)});function oe(I){R("update:value",I),R("change",I)}return(I,j)=>(zo(),ss("div",Uc,[cs(Kc,{value:$.value,onChange:oe,mode:b.mode,readonly:b.readonly,bordered:b.bordered},null,8,["value","mode","readonly","bordered"])]))}});var _i={d:(b,V)=>{for(var h in V)_i.o(V,h)&&!_i.o(b,h)&&Object.defineProperty(b,h,{enumerable:!0,get:V[h]})},o:(b,V)=>Object.prototype.hasOwnProperty.call(b,V)},fs={};function To(b,V){(V==null||V>b.length)&&(V=b.length);for(var h=0,R=new Array(V);h<V;h++)R[h]=b[h];return R}function ds(b,V){if(b){if(typeof b=="string")return To(b,V);var h=Object.prototype.toString.call(b).slice(8,-1);return h==="Object"&&b.constructor&&(h=b.constructor.name),h==="Map"||h==="Set"?Array.from(b):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?To(b,V):void 0}}function Si(b){return function(V){if(Array.isArray(V))return To(V)}(b)||function(V){if(typeof Symbol!="undefined"&&V[Symbol.iterator]!=null||V["@@iterator"]!=null)return Array.from(V)}(b)||ds(b)||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 Ci(b,V,h){return V in b?Object.defineProperty(b,V,{value:h,enumerable:!0,configurable:!0,writable:!0}):b[V]=h,b}_i.d(fs,{Z:()=>Zc});const Pe=(es={computed:()=>us,createTextVNode:()=>Cc,createVNode:()=>cs,defineComponent:()=>Ti,reactive:()=>Tc,ref:()=>as,watch:()=>ki,watchEffect:()=>Lc},Co={},_i.d(Co,es),Co),Xc=(0,Pe.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var b=this.data,V=this.onClick;return(0,Pe.createVNode)("span",{class:"vjs-tree-brackets",onClick:V},[b])}}),Yc=(0,Pe.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(b,V){var h=V.emit;return{uiType:(0,Pe.computed)(function(){return b.isMultiple?"checkbox":"radio"}),model:(0,Pe.computed)({get:function(){return b.checked},set:function(R){return h("update:modelValue",R)}})}},render:function(){var b=this.uiType,V=this.model,h=this.$emit;return(0,Pe.createVNode)("label",{class:["vjs-check-controller",V?"is-checked":""],onClick:function(R){return R.stopPropagation()}},[(0,Pe.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(b)},null),(0,Pe.createVNode)("input",{checked:V,class:"vjs-check-controller-original is-".concat(b),type:b,onChange:function(){return h("change",V)}},null)])}}),Vc=(0,Pe.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var b=this.nodeType,V=this.onClick,h=b==="objectStart"||b==="arrayStart";return h||b==="objectCollapsed"||b==="arrayCollapsed"?(0,Pe.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(h?"open":"close"),onClick:V},[(0,Pe.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,Pe.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var es,Co;function Lo(b){return Lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},Lo(b)}function hs(b){return Object.prototype.toString.call(b).slice(8,-1).toLowerCase()}function Ir(b){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,R=arguments.length>3?arguments[3]:void 0,$=R||{},oe=$.key,I=$.index,j=$.type,p=j===void 0?"content":j,Z=$.showComma,K=Z!==void 0&&Z,J=$.length,E=J===void 0?1:J,te=hs(b);if(te==="array"){var U=ts(b.map(function(fe,ne,A){return Ir(fe,"".concat(V,"[").concat(ne,"]"),h+1,{index:ne,showComma:ne!==A.length-1,length:E,type:p})}));return[Ir("[",V,h,{showComma:!1,key:oe,length:b.length,type:"arrayStart"})[0]].concat(U,Ir("]",V,h,{showComma:K,length:b.length,type:"arrayEnd"})[0])}if(te==="object"){var re=Object.keys(b),ge=ts(re.map(function(fe,ne,A){return Ir(b[fe],/^[a-zA-Z_]\w*$/.test(fe)?"".concat(V,".").concat(fe):"".concat(V,'["').concat(fe,'"]'),h+1,{key:fe,showComma:ne!==A.length-1,length:E,type:p})}));return[Ir("{",V,h,{showComma:!1,key:oe,index:I,length:re.length,type:"objectStart"})[0]].concat(ge,Ir("}",V,h,{showComma:K,length:re.length,type:"objectEnd"})[0])}return[{content:b,level:h,key:oe,index:I,path:V,showComma:K,length:E,type:p}]}function ts(b){if(typeof Array.prototype.flat=="function")return b.flat();for(var V=Si(b),h=[];V.length;){var R=V.shift();Array.isArray(R)?V.unshift.apply(V,Si(R)):h.push(R)}return h}function No(b){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(b==null)return b;if(b instanceof Date)return new Date(b);if(b instanceof RegExp)return new RegExp(b);if(Lo(b)!=="object")return b;if(V.get(b))return V.get(b);if(Array.isArray(b)){var h=b.map(function(oe){return No(oe,V)});return V.set(b,h),h}var R={};for(var $ in b)R[$]=No(b[$],V);return V.set(b,R),R}function rs(b,V){var h=Object.keys(b);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(b);V&&(R=R.filter(function($){return Object.getOwnPropertyDescriptor(b,$).enumerable})),h.push.apply(h,R)}return h}function ns(b){for(var V=1;V<arguments.length;V++){var h=arguments[V]!=null?arguments[V]:{};V%2?rs(Object(h),!0).forEach(function(R){Ci(b,R,h[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(h)):rs(Object(h)).forEach(function(R){Object.defineProperty(b,R,Object.getOwnPropertyDescriptor(h,R))})}return b}var ps={showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},theme:{type:String,default:"light"},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}};const Qc=(0,Pe.defineComponent)({name:"TreeNode",props:ns(ns({},ps),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(b,V){var h=V.emit,R=(0,Pe.computed)(function(){return hs(b.node.content)}),$=(0,Pe.computed)(function(){return"vjs-value vjs-value-".concat(R.value)}),oe=(0,Pe.computed)(function(){return b.showDoubleQuotes?'"'.concat(b.node.key,'"'):b.node.key}),I=(0,Pe.computed)(function(){return b.selectableType==="multiple"}),j=(0,Pe.computed)(function(){return b.selectableType==="single"}),p=(0,Pe.computed)(function(){return b.nodeSelectable(b.node)&&(I.value||j.value)}),Z=(0,Pe.reactive)({editing:!1}),K=function(ne){var A,H,Q=(H=(A=ne.target)===null||A===void 0?void 0:A.value)==="null"?null:H==="undefined"?void 0:H==="true"||H!=="false"&&(H[0]+H[H.length-1]==='""'||H[0]+H[H.length-1]==="''"?H.slice(1,-1):typeof Number(H)=="number"&&!isNaN(Number(H))||H==="NaN"?Number(H):H);h("valueChange",Q,b.node.path)},J=(0,Pe.computed)(function(){var ne,A=(ne=b.node)===null||ne===void 0?void 0:ne.content;return A===null?A="null":A===void 0&&(A="undefined"),R.value==="string"?'"'.concat(A,'"'):A+""}),E=function(){var ne=b.renderNodeValue;return ne?ne({node:b.node,defaultValue:J.value}):J.value},te=function(){h("bracketsClick",!b.collapsed,b.node)},U=function(){h("iconClick",!b.collapsed,b.node)},re=function(){h("selectedChange",b.node)},ge=function(){h("nodeClick",b.node),p.value&&b.selectOnClickNode&&h("selectedChange",b.node)},fe=function(ne){if(b.editable&&!Z.editing){Z.editing=!0;var A=function H(Q){var de;Q.target!==ne.target&&((de=Q.target)===null||de===void 0?void 0:de.parentElement)!==ne.target&&(Z.editing=!1,document.removeEventListener("click",H))};document.removeEventListener("click",A),document.addEventListener("click",A)}};return function(){var ne,A=b.node;return(0,Pe.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":b.showSelectController,"has-carets":b.showIcon,"is-highlight":b.highlightSelectedNode&&b.checked,dark:b.theme==="dark"},onClick:ge,style:b.style},[b.showLineNumber&&(0,Pe.createVNode)("span",{class:"vjs-node-index"},[A.id+1]),b.showSelectController&&p.value&&A.type!=="objectEnd"&&A.type!=="arrayEnd"&&(0,Pe.createVNode)(Yc,{isMultiple:I.value,checked:b.checked,onChange:re},null),(0,Pe.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(A.level)).map(function(H,Q){return(0,Pe.createVNode)("div",{key:Q,class:{"vjs-indent-unit":!0,"has-line":b.showLine}},null)}),b.showIcon&&(0,Pe.createVNode)(Vc,{nodeType:A.type,onClick:U},null)]),A.key&&(0,Pe.createVNode)("span",{class:"vjs-key"},[(ne=b.renderNodeKey,ne?ne({node:b.node,defaultKey:oe.value||""}):oe.value),(0,Pe.createVNode)("span",{class:"vjs-colon"},[":".concat(b.showKeyValueSpace?" ":"")])]),(0,Pe.createVNode)("span",null,[A.type!=="content"&&A.content?(0,Pe.createVNode)(Xc,{data:A.content.toString(),onClick:te},null):(0,Pe.createVNode)("span",{class:$.value,onClick:!b.editable||b.editableTrigger&&b.editableTrigger!=="click"?void 0:fe,onDblclick:b.editable&&b.editableTrigger==="dblclick"?fe:void 0},[b.editable&&Z.editing?(0,Pe.createVNode)("input",{value:J.value,onChange:K,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):E()]),A.showComma&&(0,Pe.createVNode)("span",null,[","]),b.showLength&&b.collapsed&&(0,Pe.createVNode)("span",{class:"vjs-comment"},[(0,Pe.createTextVNode)(" // "),A.length,(0,Pe.createTextVNode)(" items ")])])])}}});function is(b,V){var h=Object.keys(b);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(b);V&&(R=R.filter(function($){return Object.getOwnPropertyDescriptor(b,$).enumerable})),h.push.apply(h,R)}return h}function qt(b){for(var V=1;V<arguments.length;V++){var h=arguments[V]!=null?arguments[V]:{};V%2?is(Object(h),!0).forEach(function(R){Ci(b,R,h[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(h)):is(Object(h)).forEach(function(R){Object.defineProperty(b,R,Object.getOwnPropertyDescriptor(h,R))})}return b}const Zc=(0,Pe.defineComponent)({name:"Tree",props:qt(qt({},ps),{},{data:{type:[String,Number,Boolean,Array,Object],default:null},collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},rootPath:{type:String,default:"root"},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function},theme:{type:String,default:"light"}}),slots:["renderNodeKey","renderNodeValue"],emits:["nodeClick","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(b,V){var h=V.emit,R=V.slots,$=(0,Pe.ref)(),oe=(0,Pe.computed)(function(){return Ir(b.data,b.rootPath)}),I=function(A,H){return oe.value.reduce(function(Q,de){var ue,ve=de.level>=A||de.length>=H,P=(ue=b.pathCollapsible)===null||ue===void 0?void 0:ue.call(b,de);return de.type!=="objectStart"&&de.type!=="arrayStart"||!ve&&!P?Q:qt(qt({},Q),{},Ci({},de.path,1))},{})},j=(0,Pe.reactive)({translateY:0,visibleData:null,hiddenPaths:I(b.deep,b.collapsedNodeLength)}),p=(0,Pe.computed)(function(){for(var A=null,H=[],Q=oe.value.length,de=0;de<Q;de++){var ue=qt(qt({},oe.value[de]),{},{id:de}),ve=j.hiddenPaths[ue.path];if(A&&A.path===ue.path){var P=A.type==="objectStart",k=qt(qt(qt({},ue),A),{},{showComma:ue.showComma,content:P?"{...}":"[...]",type:P?"objectCollapsed":"arrayCollapsed"});A=null,H.push(k)}else{if(ve&&!A){A=ue;continue}if(A)continue;H.push(ue)}}return H}),Z=(0,Pe.computed)(function(){var A=b.selectedValue;return A&&b.selectableType==="multiple"&&Array.isArray(A)?A:[A]}),K=(0,Pe.computed)(function(){return!b.selectableType||b.selectOnClickNode||b.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),J=function(){var A=p.value;if(b.virtual){var H,Q=b.height/b.itemHeight,de=((H=$.value)===null||H===void 0?void 0:H.scrollTop)||0,ue=Math.floor(de/b.itemHeight),ve=ue<0?0:ue+Q>A.length?A.length-Q:ue;ve<0&&(ve=0);var P=ve+Q;j.translateY=ve*b.itemHeight,j.visibleData=A.filter(function(k,N){return N>=ve&&N<P})}else j.visibleData=A},E=function(){J()},te=function(A){var H,Q,de=A.path,ue=b.selectableType;if(ue==="multiple"){var ve=Z.value.findIndex(function(M){return M===de}),P=Si(Z.value);ve!==-1?P.splice(ve,1):P.push(de),h("update:selectedValue",P),h("selectedChange",P,Si(Z.value))}else if(ue==="single"&&Z.value[0]!==de){var k=(H=Z.value,Q=1,function(M){if(Array.isArray(M))return M}(H)||function(M,_){var O=M==null?null:typeof Symbol!="undefined"&&M[Symbol.iterator]||M["@@iterator"];if(O!=null){var f,Y,G=[],x=!0,T=!1;try{for(O=O.call(M);!(x=(f=O.next()).done)&&(G.push(f.value),!_||G.length!==_);x=!0);}catch(se){T=!0,Y=se}finally{try{x||O.return==null||O.return()}finally{if(T)throw Y}}return G}}(H,Q)||ds(H,Q)||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],N=de;h("update:selectedValue",N),h("selectedChange",N,k)}},U=function(A){h("nodeClick",A)},re=function(A,H){if(A)j.hiddenPaths=qt(qt({},j.hiddenPaths),{},Ci({},H,1));else{var Q=qt({},j.hiddenPaths);delete Q[H],j.hiddenPaths=Q}},ge=function(A,H){b.collapsedOnClickBrackets&&re(A,H.path),h("bracketsClick",A,H)},fe=function(A,H){re(A,H.path),h("iconClick",A,H)},ne=function(A,H){var Q=No(b.data),de=b.rootPath;new Function("data","val","data".concat(H.slice(de.length),"=val"))(Q,A),h("update:data",Q)};return(0,Pe.watchEffect)(function(){K.value&&function(A){throw new Error("[VueJSONPretty] ".concat(A))}(K.value)}),(0,Pe.watchEffect)(function(){p.value&&J()}),(0,Pe.watch)(function(){return b.deep},function(A){A&&(j.hiddenPaths=I(A,b.collapsedNodeLength))}),(0,Pe.watch)(function(){return b.collapsedNodeLength},function(A){A&&(j.hiddenPaths=I(b.deep,A))}),function(){var A,H,Q=(A=b.renderNodeKey)!==null&&A!==void 0?A:R.renderNodeKey,de=(H=b.renderNodeValue)!==null&&H!==void 0?H:R.renderNodeValue,ue=j.visibleData&&j.visibleData.map(function(ve){return(0,Pe.createVNode)(Qc,{key:ve.id,node:ve,collapsed:!!j.hiddenPaths[ve.path],theme:b.theme,showDoubleQuotes:b.showDoubleQuotes,showLength:b.showLength,checked:Z.value.includes(ve.path),selectableType:b.selectableType,showLine:b.showLine,showLineNumber:b.showLineNumber,showSelectController:b.showSelectController,selectOnClickNode:b.selectOnClickNode,nodeSelectable:b.nodeSelectable,highlightSelectedNode:b.highlightSelectedNode,editable:b.editable,editableTrigger:b.editableTrigger,showIcon:b.showIcon,showKeyValueSpace:b.showKeyValueSpace,renderNodeKey:Q,renderNodeValue:de,onNodeClick:U,onBracketsClick:ge,onIconClick:fe,onSelectedChange:te,onValueChange:ne,style:b.itemHeight&&b.itemHeight!==20?{lineHeight:"".concat(b.itemHeight,"px")}:{}},null)});return(0,Pe.createVNode)("div",{ref:$,class:{"vjs-tree":!0,"is-virtual":b.virtual,dark:b.theme==="dark"},onScroll:b.virtual?E:void 0,style:b.showLineNumber?qt({paddingLeft:"".concat(12*Number(oe.value.length.toString().length),"px")},b.style):b.style},[b.virtual?(0,Pe.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(b.height,"px")}},[(0,Pe.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(p.value.length*b.itemHeight,"px")}},[(0,Pe.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(j.translateY,"px)")}},[ue])])]):ue])}}});var Jc=fs.Z;const $c=Ti({__name:"JsonPreview",props:{data:Object},setup(b){return(V,h)=>(zo(),Nc(ls(Jc),{path:"res",deep:3,showLength:!0,data:b.data},null,8,["data"]))}}),af=os(Gc),lf=os($c);export{af as C,lf as J,fn as M};