mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
27 lines
247 KiB
JavaScript
27 lines
247 KiB
JavaScript
var nf=Object.defineProperty;var Ni=Object.getOwnPropertySymbols;var Il=Object.prototype.hasOwnProperty,Bl=Object.prototype.propertyIsEnumerable;var Hl=(v,M,y)=>M in v?nf(v,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):v[M]=y,xr=(v,M)=>{for(var y in M||(M={}))Il.call(M,y)&&Hl(v,y,M[y]);if(Ni)for(var y of Ni(M))Bl.call(M,y)&&Hl(v,y,M[y]);return v};var Rl=(v,M)=>{var y={};for(var I in v)Il.call(v,I)&&M.indexOf(I)<0&&(y[I]=v[I]);if(v!=null&&Ni)for(var I of Ni(v))M.indexOf(I)<0&&Bl.call(v,I)&&(y[I]=v[I]);return y};var zr=(v,M,y)=>new Promise((I,ee)=>{var j=A=>{try{ne(y.next(A))}catch(X){ee(X)}},ge=A=>{try{ne(y.throw(A))}catch(X){ee(X)}},ne=A=>A.done?I(A.value):Promise.resolve(A.value).then(j,ge);ne((y=y.apply(v,M)).next())});import{u as of,B as af,T as lf}from"./useForm-6f1ddc16.js";import{f as sf,b as uf,u as ff,i as cf}from"./schema-6f62165b.js";import{a as df,B as hf}from"./index-e108fcd6.js";import{U as pf,z as vf,i as gf,w as Zl,_ as mf}from"./index.js";import{c as yf,d as bf,N as wf,a8 as xf}from"./antd-5a8a8bf9.js";import{d as qn,f as dn,w as Do,y as _l,h as Vl,u as lt,o as kf,b as Sf,Z as Gn,_ as Ql,c as Ho,k as kr,G as Po,r as Cf,a4 as Wo,a6 as Tf,a5 as cn,l as Kl,$ as Oo,a8 as Lf,a9 as Mf}from"./vue-72a104e4.js";import{u as Nf}from"./useWindowSizeFn-46f0db92.js";import{u as Of,B as Af}from"./useTable-df4dc2dc.js";import Df from"./modal-f738a3e4.js";import{u as Pf}from"./index-7258f782.js";import"./copyTextToClipboard-a14ac5da.js";import"./deviceApi-260fcde9.js";import"./onMountedOrActivated-ee461833.js";import"./sortable.esm-15c0a34e.js";var $l={exports:{}};(function(v,M){(function(y,I){v.exports=I()})(yf,function(){var y=navigator.userAgent,I=navigator.platform,ee=/gecko\/\d/i.test(y),j=/MSIE \d/.test(y),ge=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(y),ne=/Edge\/(\d+)/.exec(y),A=j||ge||ne,X=A&&(j?document.documentMode||6:+(ne||ge)[1]),G=!ne&&/WebKit\//.test(y),J=G&&/Qt\/\d+\.\d+/.test(y),U=!ne&&/Chrome\/(\d+)/.exec(y),ce=U&&+U[1],ue=/Opera\//.test(y),Le=/Apple Computer/.test(navigator.vendor),Ae=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(y),Ce=/PhantomJS/.test(y),q=Le&&(/Mobile\/\w+/.test(y)||navigator.maxTouchPoints>2),T=/Android/.test(y),W=q||T||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(y),Z=q||/Mac/.test(I),se=/\bCrOS\b/.test(y),ye=/win/i.test(I),me=ue&&y.match(/Version\/(\d*\.\d*)/);me&&(me=Number(me[1])),me&&me>=15&&(ue=!1,G=!0);var Te=Z&&(J||ue&&(me==null||me<12.11)),ie=ee||A&&X>=9;function z(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var oe=function(e,t){var n=e.className,r=z(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 k(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return k(e).appendChild(t)}function c(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 B(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var N;document.createRange?N=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:N=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 V(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 xe(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 Fe(e,t){var n=e.className;z(t).test(n)||(e.className+=(n?" ":"")+t)}function Dt(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!z(n[r]).test(t)&&(t+=" "+n[r]);return t}var Yt=function(e){e.select()};q?Yt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:A&&(Yt=function(e){try{e.select()}catch(t){}});function st(e){return e.display.wrapper.ownerDocument}function wt(e){return Ee(e.display.wrapper)}function Ee(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function fe(e){return st(e).defaultView}function le(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function pe(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 ke(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 he=function(){this.id=null,this.f=null,this.time=0,this.handler=le(this.onTimeout,this)};he.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},he.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 Q(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var et=50,Pt={toString:function(){return"CodeMirror.Pass"}},ct={scroll:!1},Ct={origin:"*mouse"},Me={origin:"+move"};function je(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 dt=[""];function Tt(e){for(;dt.length<=e;)dt.push(we(dt)+" ");return dt[e]}function we(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function b(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function P(){}function S(e,t){var n;return Object.create?n=Object.create(e):(P.prototype=e,n=new P),t&&pe(t,n),n}var Se=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function rt(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Se.test(e))}function Jt(e,t){return t?t.source.indexOf("\\w")>-1&&rt(e)?!0:t.test(e):rt(e)}function Yn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Zt=/[\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 Ue(e){return e.charCodeAt(0)>=768&&Zt.test(e)}function or(e,t,n){for(;(n<0?t>0:t<e.length)&&Ue(e.charAt(t));)t+=n;return t}function Kt(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 ar(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 Sr=null;function lr(e,t,n){var r;Sr=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:Sr=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:Sr=i)}return r!=null?r:Sr}var Pi=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,p){this.level=u,this.from=d,this.to=p}return function(u,d){var p=d=="ltr"?"L":"R";if(u.length==0||d=="ltr"&&!r.test(u))return!1;for(var m=u.length,g=[],x=0;x<m;++x)g.push(n(u.charCodeAt(x)));for(var L=0,D=p;L<m;++L){var F=g[L];F=="m"?g[L]=D:D=F}for(var _=0,H=p;_<m;++_){var K=g[_];K=="1"&&H=="r"?g[_]="n":o.test(K)&&(H=K,K=="r"&&(g[_]="R"))}for(var re=1,$=g[0];re<m-1;++re){var ve=g[re];ve=="+"&&$=="1"&&g[re+1]=="1"?g[re]="1":ve==","&&$==g[re+1]&&($=="1"||$=="n")&&(g[re]=$),$=ve}for(var We=0;We<m;++We){var Qe=g[We];if(Qe==",")g[We]="N";else if(Qe=="%"){var He=void 0;for(He=We+1;He<m&&g[He]=="%";++He);for(var St=We&&g[We-1]=="!"||He<m&&g[He]=="1"?"1":"N",mt=We;mt<He;++mt)g[mt]=St;We=He-1}}for(var Ge=0,yt=p;Ge<m;++Ge){var tt=g[Ge];yt=="L"&&tt=="1"?g[Ge]="L":o.test(tt)&&(yt=tt)}for(var Xe=0;Xe<m;++Xe)if(i.test(g[Xe])){var qe=void 0;for(qe=Xe+1;qe<m&&i.test(g[qe]);++qe);for(var _e=(Xe?g[Xe-1]:p)=="L",bt=(qe<m?g[qe]:p)=="L",un=_e==bt?_e?"L":"R":p,wr=Xe;wr<qe;++wr)g[wr]=un;Xe=qe-1}for(var at=[],Xt,$e=0;$e<m;)if(a.test(g[$e])){var Mo=$e;for(++$e;$e<m&&a.test(g[$e]);++$e);at.push(new s(0,Mo,$e))}else{var ir=$e,Wr=at.length,Er=d=="rtl"?1:0;for(++$e;$e<m&&g[$e]!="L";++$e);for(var ft=ir;ft<$e;)if(l.test(g[ft])){ir<ft&&(at.splice(Wr,0,new s(1,ir,ft)),Wr+=Er);var fn=ft;for(++ft;ft<$e&&l.test(g[ft]);++ft);at.splice(Wr,0,new s(2,fn,ft)),Wr+=Er,ir=ft}else++ft;ir<$e&&at.splice(Wr,0,new s(1,ir,$e))}return d=="ltr"&&(at[0].level==1&&(Xt=u.match(/^\s+/))&&(at[0].from=Xt[0].length,at.unshift(new s(0,0,Xt[0].length))),we(at).level==1&&(Xt=u.match(/\s+$/))&&(we(at).to-=Xt[0].length,at.push(new s(0,m-Xt[0].length,m)))),d=="rtl"?at.reverse():at}}();function be(e,t){var n=e.order;return n==null&&(n=e.order=Pi(e.text,t)),n}var Jn=[],te=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]||Jn).concat(n)}};function Vt(e,t){return e._handlers&&e._handlers[t]||Jn}function nt(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=Q(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ie(e,t){var n=Vt(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 Be(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ie(e,n||t.type,e,t),ht(t)||t.codemirrorIgnore}function Ot(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)Q(n,t[r])==-1&&n.push(t[r])}function xt(e,t){return Vt(e,t).length>0}function Wt(e){e.prototype.on=function(t,n){te(this,t,n)},e.prototype.off=function(t,n){nt(this,t,n)}}function it(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ht(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sr(e){it(e),Hr(e)}function pn(e){return e.target||e.srcElement}function Et(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Z&&e.ctrlKey&&t==1&&(t=3),t}var Wi=function(){if(A&&X<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Ir;function Zn(e){if(Ir==null){var t=c("span","");E(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ir=t.offsetWidth<=1&&t.offsetHeight>2&&!(A&&X<8))}var n=Ir?c("span",""):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var vn;function ur(e){if(vn!=null)return vn;var t=E(e,document.createTextNode("AخA")),n=N(t,0,1).getBoundingClientRect(),r=N(t,1,2).getBoundingClientRect();return k(e),!n||n.left==n.right?!1:vn=r.right-n.right<3}var At=`
|
||
|
||
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/)},fr=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},Vn=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),zt=null;function Ei(e){if(zt!=null)return zt;var t=E(e,c("span","x")),n=t.getBoundingClientRect(),r=N(t,0,1).getBoundingClientRect();return zt=Math.abs(n.left-r.left)>1}var Br={},Ft={};function Ht(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Br[e]=t}function Cr(e,t){Ft[e]=t}function Rr(e){if(typeof e=="string"&&Ft.hasOwnProperty(e))e=Ft[e];else if(e&&typeof e.name=="string"&&Ft.hasOwnProperty(e.name)){var t=Ft[e.name];typeof t=="string"&&(t={name:t}),e=S(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Rr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Rr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function _r(e,t){t=Rr(t);var n=Br[t.name];if(!n)return _r(e,"text/plain");var r=n(e,t);if(cr.hasOwnProperty(t.name)){var i=cr[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 cr={};function Kr(e,t){var n=cr.hasOwnProperty(e)?cr[e]:cr[e]={};pe(t,n)}function jt(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 gn(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 jr(e,t,n){return e.startState?e.startState(t,n):!0}var Re=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};Re.prototype.eol=function(){return this.pos>=this.string.length},Re.prototype.sol=function(){return this.pos==this.lineStart},Re.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Re.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Re.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},Re.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Re.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Re.prototype.skipToEnd=function(){this.pos=this.string.length},Re.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Re.prototype.backUp=function(e){this.pos-=e},Re.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ke(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ke(this.string,this.lineStart,this.tabSize):0)},Re.prototype.indentation=function(){return ke(this.string,null,this.tabSize)-(this.lineStart?ke(this.string,this.lineStart,this.tabSize):0)},Re.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)}},Re.prototype.current=function(){return this.string.slice(this.start,this.pos)},Re.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Re.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Re.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Y(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 Qt(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 mn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Lt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=Q(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 h(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 C(e,t){return t>=e.first&&t<e.first+e.size}function O(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function w(e,t,n){if(n===void 0&&(n=null),!(this instanceof w))return new w(e,t,n);this.line=e,this.ch=t,this.sticky=n}function R(e,t){return e.line-t.line||e.ch-t.ch}function Ne(e,t){return e.sticky==t.sticky&&R(e,t)==0}function Ye(e){return w(e.line,e.ch)}function pt(e,t){return R(e,t)<0?t:e}function Ur(e,t){return R(e,t)<0?e:t}function Io(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function de(e,t){if(t.line<e.first)return w(e.first,0);var n=e.first+e.size-1;return t.line>n?w(n,Y(e,n).text.length):is(t,Y(e,t.line).text.length)}function is(e,t){var n=e.ch;return n==null||n>t?w(e.line,t):n<0?w(e.line,0):e}function Bo(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=de(e,t[r]);return n}var Qn=function(e,t){this.state=e,this.lookAhead=t},Ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ut.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}},Ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ut.fromSaved=function(e,t,n){return t instanceof Qn?new Ut(e,jt(e.mode,t.state),n,t.lookAhead):new Ut(e,jt(e.mode,t),n)},Ut.prototype.save=function(e){var t=e!==!1?jt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Qn(t,this.maxLookAhead):t};function Ro(e,t,n,r){var i=[e.state.modeGen],o={};qo(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],p=1,m=0;n.state=!0,qo(e,t.text,d.mode,n,function(g,x){for(var L=p;m<g;){var D=i[p];D>g&&i.splice(p,1,g,i[p+1],D),p+=2,m=Math.min(g,D)}if(x)if(d.opaque)i.splice(L,p-L,g,"overlay "+x),p=L+2;else for(;L<p;L+=2){var F=i[L+1];i[L+1]=(F?F+" ":"")+"overlay "+x}},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 _o(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=yn(e,f(t)),i=t.text.length>e.options.maxHighlightLength&&jt(e.doc.mode,r.state),o=Ro(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 yn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Ut(r,!0,t);var o=os(e,t,n),a=o>r.first&&Y(r,o-1).stateAfter,l=a?Ut.fromSaved(r,a,o):new Ut(r,jr(r.mode),o);return r.iter(o,t,function(s){zi(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 zi(e,t,n,r){var i=e.doc.mode,o=new Re(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&Ko(i,n.state);!o.eol();)Fi(i,o,n.state),o.start=o.pos}function Ko(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=gn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Fi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=gn(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 jo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Uo(e,t,n,r){var i=e.doc,o=i.mode,a;t=de(i,t);var l=Y(i,t.line),s=yn(e,t.line,n),u=new Re(l.text,e.options.tabSize,s),d;for(r&&(d=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Fi(o,u,s.state),r&&d.push(new jo(u,a,jt(i.mode,s.state)));return r?d:new jo(u,a,s.state)}function Go(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 qo(e,t,n,r,i,o,a){var l=n.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,d=new Re(t,e.options.tabSize,r),p,m=e.options.addModeClass&&[null];for(t==""&&Go(Ko(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&zi(e,t,r,d.pos),d.pos=t.length,p=null):p=Go(Fi(n,d,r.state,m),o),m){var g=m[0].name;g&&(p="m-"+(p?g+" "+p:g))}if(!l||u!=p){for(;s<d.start;)s=Math.min(d.start,s+5e3),i(s,u);u=p}d.start=d.pos}for(;s<d.pos;){var x=Math.min(d.pos,s+5e3);i(x,u),s=x}}function os(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=Y(o,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof Qn?u.lookAhead:0)<=o.modeFrontier))return l;var d=ke(s.text,null,e.options.tabSize);(i==null||r>d)&&(i=l-1,r=d)}return i}function as(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=Y(e,r).stateAfter;if(i&&(!(i instanceof Qn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Xo=!1,$t=!1;function ls(){Xo=!0}function ss(){$t=!0}function $n(e,t,n){this.marker=e,this.from=t,this.to=n}function bn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function us(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function fs(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 cs(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 $n(a,o.from,s?null:o.to))}}return r}function ds(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 $n(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function Hi(e,t){if(t.full)return null;var n=C(e,t.from.line)&&Y(e,t.from.line).markedSpans,r=C(e,t.to.line)&&Y(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=R(t.from,t.to)==0,l=cs(n,i,a),s=ds(r,o,a),u=t.text.length==1,d=we(t.text).length+(u?i:0);if(l)for(var p=0;p<l.length;++p){var m=l[p];if(m.to==null){var g=bn(s,m.marker);g?u&&(m.to=g.to==null?null:g.to+d):m.to=i}}if(s)for(var x=0;x<s.length;++x){var L=s[x];if(L.to!=null&&(L.to+=d),L.from==null){var D=bn(l,L.marker);D||(L.from=d,u&&(l||(l=[])).push(L))}else L.from+=d,u&&(l||(l=[])).push(L)}l&&(l=Yo(l)),s&&s!=l&&(s=Yo(s));var F=[l];if(!u){var _=t.text.length-2,H;if(_>0&&l)for(var K=0;K<l.length;++K)l[K].to==null&&(H||(H=[])).push(new $n(l[K].marker,null,null));for(var re=0;re<_;++re)F.push(H);F.push(s)}return F}function Yo(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 hs(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(g){if(g.markedSpans)for(var x=0;x<g.markedSpans.length;++x){var L=g.markedSpans[x].marker;L.readOnly&&(!r||Q(r,L)==-1)&&(r||(r=[])).push(L)}}),!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(!(R(u.to,l.from)<0||R(u.from,l.to)>0)){var d=[s,1],p=R(u.from,l.from),m=R(u.to,l.to);(p<0||!a.inclusiveLeft&&!p)&&d.push({from:u.from,to:l.from}),(m>0||!a.inclusiveRight&&!m)&&d.push({from:l.to,to:u.to}),i.splice.apply(i,d),s+=d.length-3}}return i}function Jo(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Zo(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function ei(e){return e.inclusiveLeft?-1:0}function ti(e){return e.inclusiveRight?1:0}function Ii(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=R(r.from,i.from)||ei(e)-ei(t);if(o)return-o;var a=R(r.to,i.to)||ti(e)-ti(t);return a||t.id-e.id}function Vo(e,t){var n=$t&&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||Ii(r,i.marker)<0)&&(r=i.marker);return r}function Qo(e){return Vo(e,!0)}function ri(e){return Vo(e,!1)}function ps(e,t){var n=$t&&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||Ii(r,o.marker)<0)&&(r=o.marker)}return r}function $o(e,t,n,r,i){var o=Y(e,t),a=$t&&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=R(u.from,n)||ei(s.marker)-ei(i),p=R(u.to,r)||ti(s.marker)-ti(i);if(!(d>=0&&p<=0||d<=0&&p>=0)&&(d<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?R(u.to,n)>=0:R(u.to,n)>0)||d>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?R(u.from,r)<=0:R(u.from,r)<0)))return!0}}}function It(e){for(var t;t=Qo(e);)e=t.find(-1,!0).line;return e}function vs(e){for(var t;t=ri(e);)e=t.find(1,!0).line;return e}function gs(e){for(var t,n;t=ri(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Bi(e,t){var n=Y(e,t),r=It(n);return n==r?t:f(r)}function ea(e,t){if(t>e.lastLine())return t;var n=Y(e,t),r;if(!dr(e,n))return t;for(;r=ri(n);)n=r.find(1,!0).line;return f(n)+1}function dr(e,t){var n=$t&&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&&Ri(e,t,r))return!0}}}function Ri(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Ri(e,r.line,bn(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)&&Ri(e,t,i))return!0}function er(e){e=It(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 ni(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Qo(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=ri(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 _i(e){var t=e.display,n=e.doc;t.maxLine=Y(n,n.first),t.maxLineLength=ni(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=ni(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Gr=function(e,t,n){this.text=e,Zo(this,t),this.height=n?n(this):1};Gr.prototype.lineNo=function(){return f(this)},Wt(Gr);function ms(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Jo(e),Zo(e,n);var i=r?r(e):1;i!=e.height&&Lt(e,i)}function ys(e){e.parent=null,Jo(e)}var bs={},ws={};function ta(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ws:bs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function ra(e,t){var n=B("span",null,null,G?"padding-right: .1px":null),r={pre:B("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=ks,ur(e.display.measure)&&(a=be(o,e.doc.direction))&&(r.addToken=Cs(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&f(o);Ts(o,r,_o(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=Dt(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=Dt(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Zn(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(G){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 Ie(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Dt(r.pre.className,r.textClass||"")),r}function xs(e){var t=c("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ks(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?Ss(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),A&&X<9&&(u=!0),e.pos+=t.length;else{d=document.createDocumentFragment();for(var p=0;;){s.lastIndex=p;var m=s.exec(t),g=m?m.index-p:t.length-p;if(g){var x=document.createTextNode(l.slice(p,p+g));A&&X<9?d.appendChild(c("span",[x])):d.appendChild(x),e.map.push(e.pos,e.pos+g,x),e.col+=g,e.pos+=g}if(!m)break;p+=g+1;var L=void 0;if(m[0]==" "){var D=e.cm.options.tabSize,F=D-e.col%D;L=d.appendChild(c("span",Tt(F),"cm-tab")),L.setAttribute("role","presentation"),L.setAttribute("cm-text"," "),e.col+=F}else m[0]=="\r"||m[0]==`
|
||
`?(L=d.appendChild(c("span",m[0]=="\r"?"␍":"","cm-invalidchar")),L.setAttribute("cm-text",m[0]),e.col+=1):(L=e.cm.options.specialCharPlaceholder(m[0]),L.setAttribute("cm-text",m[0]),A&&X<9?d.appendChild(c("span",[L])):d.appendChild(L),e.col+=1);e.map.push(e.pos,e.pos+1,L),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||u||o||a){var _=n||"";r&&(_+=r),i&&(_+=i);var H=c("span",[d],_,o);if(a)for(var K in a)a.hasOwnProperty(K)&&K!="style"&&K!="class"&&H.setAttribute(K,a[K]);return e.content.appendChild(H)}e.content.appendChild(d)}}function Ss(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 Cs(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 p=void 0,m=0;m<t.length&&(p=t[m],!(p.to>u&&p.from<=u));m++);if(p.to>=d)return e(n,r,i,o,a,l,s);e(n,r.slice(0,p.to-u),i,o,null,l,s),o=null,r=r.slice(p.to-u),u=p.to}}}function na(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ts(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var a=1;a<n.length;a+=2)t.addToken(t,i.slice(o,o=n[a]),ta(n[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,d="",p,m,g=0,x,L,D,F,_;;){if(g==s){x=L=D=m="",_=null,F=null,g=1/0;for(var H=[],K=void 0,re=0;re<r.length;++re){var $=r[re],ve=$.marker;if(ve.type=="bookmark"&&$.from==s&&ve.widgetNode)H.push(ve);else if($.from<=s&&($.to==null||$.to>s||ve.collapsed&&$.to==s&&$.from==s)){if($.to!=null&&$.to!=s&&g>$.to&&(g=$.to,L=""),ve.className&&(x+=" "+ve.className),ve.css&&(m=(m?m+";":"")+ve.css),ve.startStyle&&$.from==s&&(D+=" "+ve.startStyle),ve.endStyle&&$.to==g&&(K||(K=[])).push(ve.endStyle,$.to),ve.title&&((_||(_={})).title=ve.title),ve.attributes)for(var We in ve.attributes)(_||(_={}))[We]=ve.attributes[We];ve.collapsed&&(!F||Ii(F.marker,ve)<0)&&(F=$)}else $.from>s&&g>$.from&&(g=$.from)}if(K)for(var Qe=0;Qe<K.length;Qe+=2)K[Qe+1]==g&&(L+=" "+K[Qe]);if(!F||F.from==s)for(var He=0;He<H.length;++He)na(t,0,H[He]);if(F&&(F.from||0)==s){if(na(t,(F.to==null?l+1:F.to)-s,F.marker,F.from==null),F.to==null)return;F.to==s&&(F=!1)}}if(s>=l)break;for(var St=Math.min(l,g);;){if(d){var mt=s+d.length;if(!F){var Ge=mt>St?d.slice(0,St-s):d;t.addToken(t,Ge,p?p+x:x,D,s+Ge.length==g?L:"",m,_)}if(mt>=St){d=d.slice(St-s),s=St;break}s=mt,D=""}d=i.slice(o,o=n[u++]),p=ta(n[u++],t.cm.options)}}}function ia(e,t,n){this.line=t,this.rest=gs(t),this.size=this.rest?f(we(this.rest))-n+1:1,this.node=this.text=null,this.hidden=dr(e,t)}function ii(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new ia(e.doc,Y(e.doc,o),o);i=o+a.size,r.push(a)}return r}var qr=null;function Ls(e){qr?qr.ops.push(e):e.ownsGroup=qr={ops:[e],delayedCallbacks:[]}}function Ms(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 Ns(e,t){var n=e.ownsGroup;if(n)try{Ms(n)}finally{qr=null,t(n)}}var wn=null;function Je(e,t){var n=Vt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;qr?i=qr.delayedCallbacks:wn?i=wn:(i=wn=[],setTimeout(Os,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function Os(){var e=wn;wn=null;for(var t=0;t<e.length;++t)e[t]()}function oa(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Ds(e,t):o=="gutter"?la(e,t,n,r):o=="class"?Ki(e,t):o=="widget"&&Ps(e,t,r)}t.changes=null}function xn(e){return e.node==e.text&&(e.node=c("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),A&&X<8&&(e.node.style.zIndex=2)),e.node}function As(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=xn(t);t.background=r.insertBefore(c("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function aa(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):ra(e,t)}function Ds(e,t){var n=t.text.className,r=aa(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ki(e,t)):n&&(t.text.className=n)}function Ki(e,t){As(e,t),t.line.wrapClass?xn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function la(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=xn(t);t.gutterBackground=c("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=xn(t),l=t.gutter=c("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(c("div",O(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(c("div",[d],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Ps(e,t,n){t.alignable&&(t.alignable=null);for(var r=z("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);sa(e,t,n)}function Ws(e,t,n,r){var i=aa(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ki(e,t),la(e,t,n,r),sa(e,t,r),t.node}function sa(e,t,n){if(ua(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)ua(e,t.rest[r],t,n,!1)}function ua(e,t,n,r,i){if(t.widgets)for(var o=xn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=c("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Es(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Je(s,"redraw")}}function Es(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 kn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!V(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;"),E(t.display.measure,c("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function tr(e,t){for(var n=pn(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 oi(e){return e.lineSpace.offsetTop}function ji(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function fa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,c("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 Gt(e){return et-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-Gt(e)-e.display.barWidth}function Ui(e){return e.display.scroller.clientHeight-Gt(e)-e.display.barHeight}function zs(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 ca(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(f(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Fs(e,t){t=It(t);var n=f(t),r=e.display.externalMeasured=new ia(e.doc,t,n);r.lineN=n;var i=r.built=ra(e,r);return r.text=i.pre,E(e.display.lineMeasure,i.pre),r}function da(e,t,n,r){return qt(e,Xr(e,t),n,r)}function Gi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Nr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Xr(e,t){var n=f(t),r=Gi(e,n);r&&!r.text?r=null:r&&r.changes&&(oa(e,r,n,Zi(e)),e.curOp.forceUpdate=!0),r||(r=Fs(e,t));var i=ca(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function qt(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||(zs(e,t.view,t.rect),t.hasHeights=!0),a=Is(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 ha={left:0,right:0,top:0,bottom:0};function pa(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 Hs(e,t){var n=ha;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 Is(e,t,n,r){var i=pa(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&&Ue(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&Ue(t.line.text.charAt(i.coverStart+l));)++l;if(A&&X<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Hs(N(o,a,l).getClientRects(),r),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}A&&X<11&&(u=Bs(e.display.measure,u))}else{a>0&&(s=r="right");var p;e.options.lineWrapping&&(p=o.getClientRects()).length>1?u=p[r=="right"?p.length-1:0]:u=o.getBoundingClientRect()}if(A&&X<9&&!a&&(!u||!u.left&&!u.right)){var m=o.parentNode.getClientRects()[0];m?u={left:m.left,right:m.left+Jr(e.display),top:m.top,bottom:m.bottom}:u=ha}for(var g=u.top-t.rect.top,x=u.bottom-t.rect.top,L=(g+x)/2,D=t.view.measure.heights,F=0;F<D.length-1&&!(L<D[F]);F++);var _=F?D[F-1]:0,H=D[F],K={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:_,bottom:H};return!u.left&&!u.right&&(K.bogus=!0),e.options.singleCursorHeightPerLine||(K.rtop=g,K.rbottom=x),K}function Bs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ei(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 va(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ga(e){e.display.externalMeasure=null,k(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)va(e.display.view[t])}function Sn(e){ga(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ma(e){return U&&T?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function ya(e){return U&&T?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function qi(e){var t=It(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=kn(n[i]));return r}function ai(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=er(t);if(r=="local"?a+=oi(e.display):a-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(r=="window"?0:ya(st(e)));var s=l.left+(r=="window"?0:ma(st(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function ba(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=ma(st(e)),i-=ya(st(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 li(e,t,n,r,i){return r||(r=Y(e.doc,t.line)),ai(e,r,da(e,r,t.ch,i),n)}function Bt(e,t,n,r,i,o){r=r||Y(e.doc,t.line),i||(i=Xr(e,r));function a(x,L){var D=qt(e,i,x,L?"right":"left",o);return L?D.left=D.right:D.right=D.left,ai(e,r,D,n)}var l=be(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(x,L,D){var F=l[L],_=F.level==1;return a(D?x-1:x,_!=D)}var p=lr(l,s,u),m=Sr,g=d(s,p,u=="before");return m!=null&&(g.other=d(s,m,u!="before")),g}function wa(e,t){var n=0;t=de(e.doc,t),e.options.lineWrapping||(n=Jr(e.display)*t.ch);var r=Y(e.doc,t.line),i=er(r)+oi(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xi(e,t,n,r,i){var o=w(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Yi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Xi(r.first,0,null,-1,-1);var i=h(r,n),o=r.first+r.size-1;if(i>o)return Xi(r.first+r.size-1,Y(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Y(r,i);;){var l=Rs(e,a,i,t,n),s=ps(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=Y(r,i=u.line)}}function xa(e,t,n,r){r-=qi(t);var i=t.text.length,o=Kt(function(a){return qt(e,n,a-1).bottom<=r},i,0);return i=Kt(function(a){return qt(e,n,a).top>r},o,i),{begin:o,end:i}}function ka(e,t,n,r){n||(n=Xr(e,t));var i=ai(e,t,qt(e,n,r),"line").top;return xa(e,t,n,i)}function Ji(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Rs(e,t,n,r,i){i-=er(t);var o=Xr(e,t),a=qi(t),l=0,s=t.text.length,u=!0,d=be(t,e.doc.direction);if(d){var p=(e.options.lineWrapping?Ks:_s)(e,t,n,o,d,r,i);u=p.level!=1,l=u?p.from:p.to-1,s=u?p.to:p.from-1}var m=null,g=null,x=Kt(function(re){var $=qt(e,o,re);return $.top+=a,$.bottom+=a,Ji($,r,i,!1)?($.top<=i&&$.left<=r&&(m=re,g=$),!0):!1},l,s),L,D,F=!1;if(g){var _=r-g.left<g.right-r,H=_==u;x=m+(H?0:1),D=H?"after":"before",L=_?g.left:g.right}else{!u&&(x==s||x==l)&&x++,D=x==0?"after":x==t.text.length?"before":qt(e,o,x-(u?1:0)).bottom+a<=i==u?"after":"before";var K=Bt(e,w(n,x,D),"line",t,o);L=K.left,F=i<K.top?-1:i>=K.bottom?1:0}return x=or(t.text,x,1),Xi(n,x,D,F,r-L)}function _s(e,t,n,r,i,o,a){var l=Kt(function(p){var m=i[p],g=m.level!=1;return Ji(Bt(e,w(n,g?m.to:m.from,g?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,d=Bt(e,w(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ji(d,o,a,!0)&&d.top>a&&(s=i[l-1])}return s}function Ks(e,t,n,r,i,o,a){var l=xa(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var d=null,p=null,m=0;m<i.length;m++){var g=i[m];if(!(g.from>=u||g.to<=s)){var x=g.level!=1,L=qt(e,r,x?Math.min(u,g.to)-1:Math.max(s,g.from)).right,D=L<o?o-L+1e9:L-o;(!d||p>D)&&(d=g,p=D)}}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=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Lr.appendChild(document.createTextNode("x")),Lr.appendChild(c("br"));Lr.appendChild(document.createTextNode("x"))}E(e.measure,Lr);var n=Lr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),k(e.measure),n||1}function Jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),n=c("pre",[t],"CodeMirror-line-like");E(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Zi(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:Vi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Vi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Sa(e){var t=Yr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Jr(e.display)-3);return function(i){if(dr(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 Qi(e){var t=e.doc,n=Sa(e);t.iter(function(r){var i=n(r);i!=r.height&&Lt(r,i)})}function Mr(e,t,n,r){var i=e.display;if(!n&&pn(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(p){return null}var s=Yi(e,o,a),u;if(r&&s.xRel>0&&(u=Y(e.doc,s.line).text).length==s.ch){var d=ke(u,u.length,e.options.tabSize)-u.length;s=w(s.line,Math.max(0,Math.round((o-fa(e.display).left)/Jr(e.display))-d))}return s}function Nr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function vt(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)$t&&Bi(e.doc,t)<i.viewTo&&pr(e);else if(n<=i.viewFrom)$t&&ea(e.doc,n+r)>i.viewFrom?pr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)pr(e);else if(t<=i.viewFrom){var o=si(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(e)}else if(n>=i.viewTo){var a=si(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(e)}else{var l=si(e,t,t,-1),s=si(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(ii(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):pr(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function hr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Nr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);Q(a,n)==-1&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function si(e,t,n,r){var i=Nr(e,t),o,a=e.display.view;if(!$t||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(;Bi(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 js(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=ii(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=ii(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Nr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(ii(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Nr(e,n)))),r.viewTo=n}function Ca(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function Cn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ta(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&&$i(e,d,i)}else(u||e.options.showCursorWhenSelecting)&&$i(e,s.head,i);u||Us(e,s,o)}}return r}function $i(e,t,n){var r=Bt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(c("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=li(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(c("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 ui(e,t){return e.top-t.top||e.left-t.left}function Us(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=fa(e.display),l=a.left,s=Math.max(r.sizerWidth,Tr(e)-r.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function d(H,K,re,$){K<0&&(K=0),K=Math.round(K),$=Math.round($),o.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+H+`px;
|
||
top: `+K+"px; width: "+(re==null?s-H:re)+`px;
|
||
height: `+($-K)+"px"))}function p(H,K,re){var $=Y(i,H),ve=$.text.length,We,Qe;function He(Ge,yt){return li(e,w(H,Ge),"div",$,yt)}function St(Ge,yt,tt){var Xe=ka(e,$,null,Ge),qe=yt=="ltr"==(tt=="after")?"left":"right",_e=tt=="after"?Xe.begin:Xe.end-(/\s/.test($.text.charAt(Xe.end-1))?2:1);return He(_e,qe)[qe]}var mt=be($,i.direction);return ar(mt,K||0,re==null?ve:re,function(Ge,yt,tt,Xe){var qe=tt=="ltr",_e=He(Ge,qe?"left":"right"),bt=He(yt-1,qe?"right":"left"),un=K==null&&Ge==0,wr=re==null&&yt==ve,at=Xe==0,Xt=!mt||Xe==mt.length-1;if(bt.top-_e.top<=3){var $e=(u?un:wr)&&at,Mo=(u?wr:un)&&Xt,ir=$e?l:(qe?_e:bt).left,Wr=Mo?s:(qe?bt:_e).right;d(ir,_e.top,Wr-ir,_e.bottom)}else{var Er,ft,fn,No;qe?(Er=u&&un&&at?l:_e.left,ft=u?s:St(Ge,tt,"before"),fn=u?l:St(yt,tt,"after"),No=u&&wr&&Xt?s:bt.right):(Er=u?St(Ge,tt,"before"):l,ft=!u&&un&&at?s:_e.right,fn=!u&&wr&&Xt?l:bt.left,No=u?St(yt,tt,"after"):s),d(Er,_e.top,ft-Er,_e.bottom),_e.bottom<bt.top&&d(l,_e.bottom,null,bt.top),d(fn,bt.top,No-fn,bt.bottom)}(!We||ui(_e,We)<0)&&(We=_e),ui(bt,We)<0&&(We=bt),(!Qe||ui(_e,Qe)<0)&&(Qe=_e),ui(bt,Qe)<0&&(Qe=bt)}),{start:We,end:Qe}}var m=t.from(),g=t.to();if(m.line==g.line)p(m.line,m.ch,g.ch);else{var x=Y(i,m.line),L=Y(i,g.line),D=It(x)==It(L),F=p(m.line,m.ch,D?x.text.length+1:null).end,_=p(g.line,D?0:null,g.ch).start;D&&(F.top<_.top-2?(d(F.right,F.top,null,F.bottom),d(l,_.top,_.left,_.bottom)):d(F.right,F.top,_.left-F.right,F.bottom)),F.bottom<_.top&&d(l,F.bottom,null,_.top)}n.appendChild(o)}function eo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Zr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function La(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ro(e))}function to(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zr(e))},100)}function ro(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ie(e,"focus",e,t),e.state.focused=!0,Fe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),G&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),eo(e))}function Zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ie(e,"blur",e,t),e.state.focused=!1,oe(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function fi(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,A&&X<8){var p=l.node.offsetTop+l.node.offsetHeight;u=p-n,n=p}else{var m=l.node.getBoundingClientRect();u=m.bottom-m.top,!s&&l.text.firstChild&&(d=l.text.firstChild.getBoundingClientRect().right-m.left-1)}var g=l.line.height-u;if((g>.005||g<-.005)&&(i<r&&(o-=g),Lt(l.line,u),Ma(l.line),l.rest))for(var x=0;x<l.rest.length;x++)Ma(l.rest[x]);if(d>e.display.sizerWidth){var L=Math.ceil(d/Jr(e.display));L>e.display.maxLineLength&&(e.display.maxLineLength=L,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Ma(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ci(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-oi(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=h(t,r),a=h(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=h(t,er(Y(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=h(t,er(Y(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Gs(e,t){if(!Be(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&&!Ce){var a=c("div","",null,`position: absolute;
|
||
top: `+(t.top-n.viewOffset-oi(e.display))+`px;
|
||
height: `+(t.bottom-t.top+Gt(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 qs(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?w(t.line,t.ch+1,"before"):t,t=t.ch?w(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Bt(e,t),s=!n||n==t?l:Bt(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=no(e,i),d=e.doc.scrollTop,p=e.doc.scrollLeft;if(u.scrollTop!=null&&(Ln(e,u.scrollTop),Math.abs(e.doc.scrollTop-d)>1&&(a=!0)),u.scrollLeft!=null&&(Or(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}function Xs(e,t){var n=no(e,t);n.scrollTop!=null&&Ln(e,n.scrollTop),n.scrollLeft!=null&&Or(e,n.scrollLeft)}function no(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=Ui(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+ji(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 p=e.options.fixedGutter?0:n.gutters.offsetWidth,m=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-p,g=Tr(e)-n.gutters.offsetWidth,x=t.right-t.left>g;return x&&(t.right=t.left+g),t.left<10?a.scrollLeft=0:t.left<m?a.scrollLeft=Math.max(0,t.left+p-(x?0:10)):t.right>g+m-3&&(a.scrollLeft=t.right+(x?0:10)-g),a}function io(e,t){t!=null&&(di(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Vr(e){di(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Tn(e,t,n){(t!=null||n!=null)&&di(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Ys(e,t){di(e),e.curOp.scrollToPos=t}function di(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=wa(e,t.from),r=wa(e,t.to);Na(e,n,r,t.margin)}}function Na(e,t,n,r){var i=no(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Tn(e,i.scrollLeft,i.scrollTop)}function Ln(e,t){Math.abs(e.doc.scrollTop-t)<2||(ee||ao(e,{top:t}),Oa(e,t,!0),ee&&ao(e),On(e,100))}function Oa(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Or(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,Ea(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Mn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+ji(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+Gt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ar=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),te(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),te(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,A&&X<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ar.prototype.zeroWidthHack=function(){var e=Z&&!Ae?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new he,this.disableVert=new he},Ar.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Nn=function(){};Nn.prototype.update=function(){return{bottom:0,right:0}},Nn.prototype.setScrollLeft=function(){},Nn.prototype.setScrollTop=function(){},Nn.prototype.clear=function(){};function Qr(e,t){t||(t=Mn(e));var n=e.display.barWidth,r=e.display.barHeight;Aa(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&fi(e),Aa(e,Mn(e)),n=e.display.barWidth,r=e.display.barHeight}function Aa(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 Da={native:Ar,null:Nn};function Pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&oe(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Da[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),te(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"?Or(e,t):Ln(e,t)},e),e.display.scrollbars.addClass&&Fe(e.display.wrapper,e.display.scrollbars.addClass)}var Js=0;function Dr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Js,markArrays:null},Ls(e.curOp)}function Pr(e){var t=e.curOp;t&&Ns(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;Zs(n)})}function Zs(e){for(var t=e.ops,n=0;n<t.length;n++)Vs(t[n]);for(var r=0;r<t.length;r++)Qs(t[r]);for(var i=0;i<t.length;i++)$s(t[i]);for(var o=0;o<t.length;o++)eu(t[o]);for(var a=0;a<t.length;a++)tu(t[a])}function Vs(e){var t=e.cm,n=t.display;nu(t),e.updateMaxLine&&_i(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 hi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qs(e){e.updatedDisplay=e.mustUpdate&&oo(e.cm,e.update)}function $s(e){var t=e.cm,n=t.display;e.updatedDisplay&&fi(t),e.barMeasure=Mn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=da(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+Gt(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 eu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Or(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==xe(wt(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Qr(t,e.barMeasure),e.updatedDisplay&&so(t,e.barMeasure),e.selectionChanged&&eo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&La(e.cm)}function tu(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Wa(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&Oa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Or(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=qs(t,de(r,e.scrollToPos.from),de(r,e.scrollToPos.to),e.scrollToPos.margin);Gs(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Ie(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Ie(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ie(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function kt(e,t){if(e.curOp)return t();Dr(e);try{return t()}finally{Pr(e)}}function Ze(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Dr(e);try{return t.apply(e,arguments)}finally{Pr(e)}}}function ut(e){return function(){if(this.curOp)return e.apply(this,arguments);Dr(this);try{return e.apply(this,arguments)}finally{Pr(this)}}}function Ve(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Dr(t);try{return e.apply(this,arguments)}finally{Pr(t)}}}function On(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,le(ru,e))}function ru(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=yn(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?jt(t.mode,r.state):null,s=Ro(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 p=!a||a.length!=o.styles.length||u!=d&&(!u||!d||u.bgClass!=d.bgClass||u.textClass!=d.textClass),m=0;!p&&m<a.length;++m)p=a[m]!=o.styles[m];p&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&zi(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return On(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&kt(e,function(){for(var o=0;o<i.length;o++)hr(e,i[o],"text")})}}var hi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ci(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=n,this.dims=Zi(e),this.events=[]};hi.prototype.signal=function(e,t){xt(e,t)&&this.events.push(arguments)},hi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ie.apply(null,this.events[e])};function nu(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Gt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Gt(e)+"px",t.scrollbarsClipped=!0)}function iu(e){if(e.hasFocus())return null;var t=xe(wt(e));if(!t||!V(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=fe(e).getSelection();r.anchorNode&&r.extend&&V(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function ou(e){if(!(!e||!e.activeElt||e.activeElt==xe(Ee(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&V(document.body,e.anchorNode)&&V(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 oo(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return pr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Ca(e)==0)return!1;za(e)&&(pr(e),t.dims=Zi(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)),$t&&(o=Bi(e.doc,o),a=ea(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;js(e,o,a),n.viewOffset=er(Y(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Ca(e);if(!l&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=iu(e);return s>4&&(n.lineDiv.style.display="none"),au(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ou(u),k(n.cursorDiv),k(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,On(e,400)),n.updateLineNumbers=null,!0}function Wa(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+ji(e.display)-Ui(e),n.top)}),t.visible=ci(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ci(e.display,e.doc,n));if(!oo(e,t))break;fi(e);var i=Mn(e);Cn(e),Qr(e,i),so(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 ao(e,t){var n=new hi(e,t);if(oo(e,n)){fi(e),Wa(e,n);var r=Mn(e);Cn(e),Qr(e,r),so(e,r),n.finish()}}function au(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(x){var L=x.nextSibling;return G&&Z&&e.display.currentWheelTarget==x?x.style.display="none":x.parentNode.removeChild(x),L}for(var s=r.view,u=r.viewFrom,d=0;d<s.length;d++){var p=s[d];if(!p.hidden)if(!p.node||p.node.parentNode!=o){var m=Ws(e,p,u,n);o.insertBefore(m,a)}else{for(;a!=p.node;)a=l(a);var g=i&&t!=null&&t<=u&&p.lineNumber;p.changes&&(Q(p.changes,"gutter")>-1&&(g=!1),oa(e,p,u,n)),g&&(k(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(O(e.options,u)))),a=p.node.nextSibling}u+=p.size}for(;a;)a=l(a)}function lo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Je(e,"gutterChanged",e)}function so(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+Gt(e)+"px"}function Ea(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Vi(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=O(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(c("div",[c("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",lo(e.display),!0}return!1}function uo(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 Fa(e){var t=e.gutters,n=e.gutterSpecs;k(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(c("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",lo(e)}function An(e){Fa(e.display),vt(e),Ea(e)}function lu(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=c("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=c("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=B("div",null,"CodeMirror-code"),i.selectionDiv=c("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=c("div",null,"CodeMirror-cursors"),i.measure=c("div",null,"CodeMirror-measure"),i.lineMeasure=c("div",null,"CodeMirror-measure"),i.lineSpace=B("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=B("div",[i.lineSpace],"CodeMirror-lines");i.mover=c("div",[o],null,"position: relative"),i.sizer=c("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=c("div",null,null,"position: absolute; height: "+et+"px; width: 1px;"),i.gutters=c("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=c("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=c("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),U&&ce>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),A&&X<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!G&&!(ee&&W)&&(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=uo(r.gutters,r.lineNumbers),Fa(i),n.init(i)}var pi=0,rr=null;A?rr=-.53:ee?rr=15:U?rr=-.7:Le&&(rr=-1/3);function Ha(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 su(e){var t=Ha(e);return t.x*=rr,t.y*=rr,t}function Ia(e,t){U&&ce==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=Ha(t),r=n.x,i=n.y,o=rr;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&&Z&&G){e:for(var d=t.target,p=a.view;d!=l;d=d.parentNode)for(var m=0;m<p.length;m++)if(p[m].node==d){e.display.currentWheelTarget=d;break e}}if(r&&!ee&&!ue&&o!=null){i&&u&&Ln(e,Math.max(0,l.scrollTop+i*o)),Or(e,Math.max(0,l.scrollLeft+r*o)),(!i||i&&u)&&it(t),a.wheelStartX=null;return}if(i&&o!=null){var g=i*o,x=e.doc.scrollTop,L=x+a.wrapper.clientHeight;g<0?x=Math.max(0,x+g-50):L=Math.min(e.doc.height,L+g+50),ao(e,{top:x,bottom:L})}pi<20&&t.deltaMode!==0&&(a.wheelStartX==null?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=r,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX!=null){var D=l.scrollLeft-a.wheelStartX,F=l.scrollTop-a.wheelStartY,_=F&&a.wheelDY&&F/a.wheelDY||D&&a.wheelDX&&D/a.wheelDX;a.wheelStartX=a.wheelStartY=null,_&&(rr=(rr*pi+_)/(pi+1),++pi)}},200)):(a.wheelDX+=r,a.wheelDY+=i))}}var Mt=function(e,t){this.ranges=e,this.primIndex=t};Mt.prototype.primary=function(){return this.ranges[this.primIndex]},Mt.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(!Ne(n.anchor,r.anchor)||!Ne(n.head,r.head))return!1}return!0},Mt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Oe(Ye(this.ranges[t].anchor),Ye(this.ranges[t].head));return new Mt(e,this.primIndex)},Mt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Mt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(R(t,r.from())>=0&&R(e,r.to())<=0)return n}return-1};var Oe=function(e,t){this.anchor=e,this.head=t};Oe.prototype.from=function(){return Ur(this.anchor,this.head)},Oe.prototype.to=function(){return pt(this.anchor,this.head)},Oe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Rt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(m,g){return R(m.from(),g.from())}),n=Q(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=R(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var u=Ur(l.from(),a.from()),d=pt(l.to(),a.to()),p=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Oe(p?d:u,p?u:d))}}return new Mt(t,n)}function vr(e,t){return new Mt([new Oe(e,t||e)],0)}function gr(e){return e.text?w(e.from.line+e.text.length-1,we(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ba(e,t){if(R(e,t.from)<0)return e;if(R(e,t.to)<=0)return gr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=gr(t).ch-t.to.ch),w(n,r)}function fo(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Oe(Ba(i.anchor,t),Ba(i.head,t)))}return Rt(e.cm,n,e.sel.primIndex)}function Ra(e,t,n){return e.line==t.line?w(n.line,e.ch-t.ch+n.ch):w(n.line+(e.line-t.line),e.ch)}function uu(e,t,n){for(var r=[],i=w(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ra(l.from,i,o),u=Ra(gr(l),i,o);if(i=l.to,o=u,n=="around"){var d=e.sel.ranges[a],p=R(d.head,d.anchor)<0;r[a]=new Oe(p?u:s,p?s:u)}else r[a]=new Oe(s,s)}return new Mt(r,e.sel.primIndex)}function co(e){e.doc.mode=_r(e.options,e.doc.modeOption),Dn(e)}function Dn(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,On(e,100),e.state.modeGen++,e.curOp&&vt(e)}function _a(e,t){return t.from.ch==0&&t.to.ch==0&&we(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ho(e,t,n,r){function i(_){return n?n[_]:null}function o(_,H,K){ms(_,H,K,r),Je(_,"change",_,t)}function a(_,H){for(var K=[],re=_;re<H;++re)K.push(new Gr(u[re],i(re),r));return K}var l=t.from,s=t.to,u=t.text,d=Y(e,l.line),p=Y(e,s.line),m=we(u),g=i(u.length-1),x=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(_a(e,t)){var L=a(0,u.length-1);o(p,p.text,g),x&&e.remove(l.line,x),L.length&&e.insert(l.line,L)}else if(d==p)if(u.length==1)o(d,d.text.slice(0,l.ch)+m+d.text.slice(s.ch),g);else{var D=a(1,u.length-1);D.push(new Gr(m+d.text.slice(s.ch),g,r)),o(d,d.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,D)}else if(u.length==1)o(d,d.text.slice(0,l.ch)+u[0]+p.text.slice(s.ch),i(0)),e.remove(l.line+1,x);else{o(d,d.text.slice(0,l.ch)+u[0],i(0)),o(p,m+p.text.slice(s.ch),g);var F=a(1,u.length-1);x>1&&e.remove(l.line+1,x-1),e.insert(l.line+1,F)}Je(e,"change",e,t)}function mr(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 Ka(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Qi(e),co(e),ja(e),e.options.direction=t.direction,e.options.lineWrapping||_i(e),e.options.mode=t.modeOption,vt(e)}function ja(e){(e.doc.direction=="rtl"?Fe:oe)(e.display.lineDiv,"CodeMirror-rtl")}function fu(e){kt(e,function(){ja(e),vt(e)})}function vi(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 po(e,t){var n={from:Ye(t.from),to:gr(t),text:Qt(e,t.from,t.to)};return qa(e,n,t.from.line,t.to.line+1),mr(e,function(r){return qa(r,n,t.from.line,t.to.line+1)},!0),n}function Ua(e){for(;e.length;){var t=we(e);if(t.ranges)e.pop();else break}}function cu(e,t){if(t)return Ua(e.done),we(e.done);if(e.done.length&&!we(e.done).ranges)return we(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),we(e.done)}function Ga(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=cu(i,i.lastOp==r)))l=we(a.changes),R(t.from,t.to)==0&&R(t.from,l.to)==0?l.to=gr(t):a.changes.push(po(e,t));else{var s=we(i.done);for((!s||!s.ranges)&&gi(e.sel,i.done),a={changes:[po(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||Ie(e,"historyAdded")}function du(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 hu(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||du(e,o,we(i.done),t))?i.done[i.done.length-1]=t:gi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&Ua(i.undone)}function gi(e,t){var n=we(t);n&&n.ranges&&n.equals(e)||t.push(e)}function qa(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 pu(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 vu(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(pu(n[i]));return r}function Xa(e,t){var n=vu(e,t),r=Hi(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?Mt.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 p in u)(d=p.match(/^spans_(\d+)$/))&&Q(t,Number(d[1]))>-1&&(we(l)[p]=u[p],delete u[p])}}return r}function vo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=R(t,i)<0;o!=R(n,i)<0?(i=t,t=n):o!=R(t,n)<0&&(t=n)}return new Oe(i,t)}else return new Oe(n||t,t)}function mi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),ot(e,new Mt([vo(e.sel.primary(),t,n,i)],0),r)}function Ya(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]=vo(e.sel.ranges[o],t[o],null,i);var a=Rt(e.cm,r,e.sel.primIndex);ot(e,a,n)}function go(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ot(e,Rt(e.cm,i,e.sel.primIndex),r)}function Ja(e,t,n,r){ot(e,vr(t,n),r)}function gu(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 Oe(de(e,i[o].anchor),de(e,i[o].head))},origin:n&&n.origin};return Ie(e,"beforeSelectionChange",e,r),e.cm&&Ie(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Rt(e.cm,r.ranges,r.ranges.length-1):t}function Za(e,t,n){var r=e.history.done,i=we(r);i&&i.ranges?(r[r.length-1]=t,yi(e,t,n)):ot(e,t,n)}function ot(e,t,n){yi(e,t,n),hu(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function yi(e,t,n){(xt(e,"beforeSelectionChange")||e.cm&&xt(e.cm,"beforeSelectionChange"))&&(t=gu(e,t,n));var r=n&&n.bias||(R(t.primary().head,e.sel.primary().head)<0?-1:1);Va(e,$a(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Vr(e.cm)}function Va(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ot(e.cm)),Je(e,"cursorActivity",e))}function Qa(e){Va(e,$a(e,e.sel,null,!1))}function $a(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=bi(e,a.anchor,l&&l.anchor,n,r),u=a.head==a.anchor?s:bi(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 Oe(s,u))}return i?Rt(e.cm,i,t.primIndex):t}function en(e,t,n,r,i){var o=Y(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&&(Ie(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(n){var p=s.find(r<0?1:-1),m=void 0;if((r<0?d:u)&&(p=el(e,p,-r,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(m=R(p,n))&&(r<0?m<0:m>0))return en(e,p,t,r,i)}var g=s.find(r<0?-1:1);return(r<0?u:d)&&(g=el(e,g,r,g.line==t.line?o:null)),g?en(e,g,t,r,i):null}}return t}function bi(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,w(e.first,0))}function el(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?de(e,w(t.line-1)):null:n>0&&t.ch==(r||Y(e,t.line)).text.length?t.line<e.first+e.size-1?w(t.line+1,0):null:new w(t.line,t.ch+n)}function tl(e){e.setSelection(w(e.firstLine(),0),w(e.lastLine()),ct)}function rl(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,o,a,l){i&&(r.from=de(e,i)),o&&(r.to=de(e,o)),a&&(r.text=a),l!==void 0&&(r.origin=l)}),Ie(e,"beforeChange",e,r),e.cm&&Ie(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 Ze(e.cm,tn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((xt(e,"beforeChange")||e.cm&&xt(e.cm,"beforeChange"))&&(t=rl(e,t,!0),!t))){var r=Xo&&!n&&hs(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)nl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else nl(e,t)}}function nl(e,t){if(!(t.text.length==1&&t.text[0]==""&&R(t.from,t.to)==0)){var n=fo(e,t);Ga(e,t,n,e.cm?e.cm.curOp.id:NaN),Pn(e,t,n,Hi(e,t));var r=[];mr(e,function(i,o){!o&&Q(r,i.history)==-1&&(ll(i.history,t),r.push(i.history)),Pn(i,t,null,Hi(i,t))})}}function wi(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(gi(o,s),n&&!o.equals(e.sel)){ot(e,o,{clearRedo:!1});return}a=o}else if(r){l.push(o);return}else break;var d=[];gi(a,s),s.push({changes:d,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var p=xt(e,"beforeChange")||e.cm&&xt(e.cm,"beforeChange"),m=function(L){var D=o.changes[L];if(D.origin=t,p&&!rl(e,D,!1))return l.length=0,{};d.push(po(e,D));var F=L?fo(e,D):we(l);Pn(e,D,F,Xa(e,D)),!L&&e.cm&&e.cm.scrollIntoView({from:D.from,to:gr(D)});var _=[];mr(e,function(H,K){!K&&Q(_,H.history)==-1&&(ll(H.history,D),_.push(H.history)),Pn(H,D,null,Xa(H,D))})},g=o.changes.length-1;g>=0;--g){var x=m(g);if(x)return x.v}}}}function il(e,t){if(t!=0&&(e.first+=t,e.sel=new Mt(Pe(e.sel.ranges,function(i){return new Oe(w(i.anchor.line+t,i.anchor.ch),w(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){vt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)hr(e.cm,r,"gutter")}}function Pn(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ze(e.cm,Pn)(e,t,n,r);if(t.to.line<e.first){il(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);il(e,i),t={from:w(e.first,0),to:w(t.to.line+i,t.to.ch),text:[we(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:w(o,Y(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qt(e,t.from,t.to),n||(n=fo(e,t)),e.cm?mu(e.cm,t,r):ho(e,t,r),yi(e,n,ct),e.cantEdit&&bi(e,w(e.firstLine(),0))&&(e.cantEdit=!1)}}function mu(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=f(It(Y(r,o.line))),r.iter(s,a.line+1,function(g){if(g==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ot(e),ho(r,t,n,Sa(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(g){var x=ni(g);x>i.maxLineLength&&(i.maxLine=g,i.maxLineLength=x,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),as(r,o.line),On(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?vt(e):o.line==a.line&&t.text.length==1&&!_a(e.doc,t)?hr(e,o.line,"text"):vt(e,o.line,a.line+1,u);var d=xt(e,"changes"),p=xt(e,"change");if(p||d){var m={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};p&&Je(e,"change",e,m),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(m)}e.display.selForContextMenu=null}function rn(e,t,n,r,i){var o;r||(r=n),R(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 ol(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function al(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)ol(o.ranges[l].anchor,t,n,r),ol(o.ranges[l].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=w(u.from.line+r,u.from.ch),u.to=w(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 ll(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;al(e.done,n,r,i),al(e.undone,n,r,i)}function Wn(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=Y(e,Io(e,t)):i=f(t),i==null?null:(r(o,i)&&e.cm&&hr(e.cm,i,n),o)}function En(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}En.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,ys(i),Je(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 zn(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}zn.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 En))){var l=[];this.collapse(l),this.children=[new En(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 En(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 zn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=Q(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new zn(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 Fn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Fn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=f(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=kn(this);Lt(n,Math.max(0,n.height-o)),e&&(kt(e,function(){sl(e,n,-o),hr(e,r,"widget")}),Je(e,"lineWidgetCleared",e,this,r))}},Fn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=kn(this)-t;i&&(dr(this.doc,r)||Lt(r,r.height+i),n&&kt(n,function(){n.curOp.forceUpdate=!0,sl(n,r,i),Je(n,"lineWidgetChanged",n,e,f(r))}))},Wt(Fn);function sl(e,t,n){er(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&io(e,n)}function yu(e,t,n,r){var i=new Fn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Wn(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!dr(e,a)){var s=er(a)<e.scrollTop;Lt(a,a.height+kn(i)),s&&io(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&Je(o,"lineWidgetAdded",o,i,typeof t=="number"?t:f(t)),i}var ul=0,yr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ul};yr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Dr(e),xt(this,"clear")){var n=this.find();n&&Je(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=bn(a.markedSpans,this);e&&!this.collapsed?hr(e,f(a),"text"):e&&(l.to!=null&&(i=f(a)),l.from!=null&&(r=f(a))),a.markedSpans=us(a.markedSpans,l),l.from==null&&this.collapsed&&!dr(this.doc,a)&&e&&Lt(a,Yr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=It(this.lines[s]),d=ni(u);d>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&vt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qa(e.doc)),e&&Je(e,"markerCleared",e,this,r,i),t&&Pr(e),this.parent&&this.parent.clear()}},yr.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=bn(o.markedSpans,this);if(a.from!=null&&(n=w(t?o:f(o),a.from),e==-1))return n;if(a.to!=null&&(r=w(t?o:f(o),a.to),e==1))return r}return n&&{from:n,to:r}},yr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||kt(r,function(){var i=t.line,o=f(t.line),a=Gi(r,o);if(a&&(va(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!dr(n.doc,i)&&n.height!=null){var l=n.height;n.height=null;var s=kn(n)-l;s&&Lt(i,i.height+s)}Je(r,"markerChanged",r,e)})},yr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Q(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},yr.prototype.detachLine=function(e){if(this.lines.splice(Q(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Wt(yr);function nn(e,t,n,r,i){if(r&&r.shared)return bu(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ze(e.cm,nn)(e,t,n,r,i);var o=new yr(e,i),a=R(t,n);if(r&&pe(r,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=B("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if($o(e,t.line,t,n,o)||t.line!=n.line&&$o(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ss()}o.addToHistory&&Ga(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(p){s&&o.collapsed&&!s.options.lineWrapping&&It(p)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&Lt(p,0),fs(p,new $n(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(p){dr(e,p)&&Lt(p,0)}),o.clearOnEnter&&te(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ls(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ul,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)vt(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++)hr(s,d,"text");o.atomic&&Qa(s.doc),Je(s,"markerAdded",s,o)}return o}var Hn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Hn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Je(this,"clear")}},Hn.prototype.find=function(e,t){return this.primary.find(e,t)},Wt(Hn);function bu(e,t,n,r,i){r=pe(r),r.shared=!1;var o=[nn(e,t,n,r,i)],a=o[0],l=r.widgetNode;return mr(e,function(s){l&&(r.widgetNode=l.cloneNode(!0)),o.push(nn(s,de(s,t),de(s,n),r,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=we(o)}),new Hn(o,a)}function fl(e){return e.findMarks(w(e.first,0),e.clipPos(w(e.lastLine())),function(t){return t.parent})}function wu(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(R(o,a)){var l=nn(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function xu(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];mr(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];Q(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}var ku=0,gt=function(e,t,n,r,i){if(!(this instanceof gt))return new gt(e,t,n,r,i);n==null&&(n=0),zn.call(this,[new En([new Gr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=w(n,0);this.sel=vr(o),this.history=new vi(null),this.id=++ku,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ho(this,{from:o,to:o,text:e}),ot(this,vr(o),ct)};gt.prototype=S(zn.prototype,{constructor:gt,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=mn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ve(function(e){var t=w(this.first,0),n=this.first+this.size-1;tn(this,{from:t,to:w(n,Y(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Tn(this.cm,0,0),ot(this,vr(t),ct)}),replaceRange:function(e,t,n,r){t=de(this,t),n=n?de(this,n):t,rn(this,e,t,n,r)},getRange:function(e,t,n){var r=Qt(this,de(this,e),de(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(C(this,e))return Y(this,e)},getLineNumber:function(e){return f(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Y(this,e)),It(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return de(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:Ve(function(e,t,n){Ja(this,de(this,typeof e=="number"?w(e,t||0):e),null,n)}),setSelection:Ve(function(e,t,n){Ja(this,de(this,e),de(this,t||e),n)}),extendSelection:Ve(function(e,t,n){mi(this,de(this,e),t&&de(this,t),n)}),extendSelections:Ve(function(e,t){Ya(this,Bo(this,e),t)}),extendSelectionsBy:Ve(function(e,t){var n=Pe(this.sel.ranges,e);Ya(this,Bo(this,n),t)}),setSelections:Ve(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Oe(de(this,e[i].anchor),de(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ot(this,Rt(this.cm,r,t),n)}}),addSelection:Ve(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Oe(de(this,e),de(this,t||e))),ot(this,Rt(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=Qt(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=Qt(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:Ve(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"&&uu(this,r,t),s=r.length-1;s>=0;s--)tn(this,r[s]);l?Za(this,l):this.cm&&Vr(this.cm)}),undo:Ve(function(){wi(this,"undo")}),redo:Ve(function(){wi(this,"redo")}),undoSelection:Ve(function(){wi(this,"undo",!0)}),redoSelection:Ve(function(){wi(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 vi(this.history),mr(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 vi(this.history);t.done=$r(e.done.slice(0),null,!0),t.undone=$r(e.undone.slice(0),null,!0)},setGutterMarker:Ve(function(e,t,n){return Wn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&Yn(i)&&(r.gutterMarkers=null),!0})}),clearGutter:Ve(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Wn(t,n,"gutter",function(){return n.gutterMarkers[e]=null,Yn(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!C(this,e)||(t=e,e=Y(this,e),!e))return null}else if(t=f(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:Ve(function(e,t,n){return Wn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(z(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:Ve(function(e,t,n){return Wn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[i];if(o)if(n==null)r[i]=null;else{var a=o.match(z(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:Ve(function(e,t,n){return yu(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return nn(this,de(this,e),de(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=de(this,e),nn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=de(this,e);var t=[],n=Y(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=de(this,e),t=de(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}),de(this,w(n,t))},indexFromPos:function(e){e=de(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 gt(mn(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 gt(mn(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}],wu(r,fl(this)),r},unlinkDoc:function(e){if(e instanceof ze&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xu(fl(this));break}}if(e.history==this.history){var r=[e.id];mr(e,function(i){return r.push(i.id)},!0),e.history=new vi(null),e.history.done=$r(this.history.done,r),e.history.undone=$r(this.history.undone,r)}},iterLinkedDocs:function(e){mr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):At(e)},lineSeparator:function(){return this.lineSep||`
|
||
`},setDirection:Ve(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fu(this.cm))})}),gt.prototype.eachLine=gt.prototype.iter;var cl=0;function Su(e){var t=this;if(dl(t),!(Be(t,e)||tr(t.display,e))){it(e),A&&(cl=+new Date);var n=Mr(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&&Ze(t,function(){n=de(t.doc,n);var g={from:n,to:n,text:t.doc.splitLines(o.filter(function(x){return x!=null}).join(t.doc.lineSeparator())),origin:"paste"};tn(t.doc,g),Za(t.doc,vr(de(t.doc,n),de(t.doc,gr(g))))})()},s=function(g,x){if(t.options.allowDropFileTypes&&Q(t.options.allowDropFileTypes,g.type)==-1){l();return}var L=new FileReader;L.onerror=function(){return l()},L.onload=function(){var D=L.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(D)){l();return}o[x]=D,l()},L.readAsText(g)},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 p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),yi(t.doc,vr(n,n)),p)for(var m=0;m<p.length;++m)rn(t.doc,"",p[m].anchor,p[m].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(g){}}}}function Cu(e,t){if(A&&(!e.state.draggingText||+new Date-cl<100)){sr(t);return}if(!(Be(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Le)){var n=c("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ue&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),ue&&n.parentNode.removeChild(n)}}function Tu(e,t){var n=Mr(e,t);if(n){var r=document.createDocumentFragment();$i(e,n,r),e.display.dragCursor||(e.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,r)}}function dl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function hl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var pl=!1;function Lu(){pl||(Mu(),pl=!0)}function Mu(){var e;te(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,hl(Nu)},100))}),te(window,"blur",function(){return hl(Zr)})}function Nu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var br={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++)br[In+48]=br[In+96]=String(In);for(var xi=65;xi<=90;xi++)br[xi]=String.fromCharCode(xi);for(var Bn=1;Bn<=12;Bn++)br[Bn+111]=br[Bn+63235]="F"+Bn;var nr={};nr.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"},nr.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"},nr.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"},nr.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"]},nr.default=Z?nr.macDefault:nr.pcDefault;function Ou(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 Au(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=Pe(n.split(" "),Ou),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=ki(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 vl(e){var t=typeof e=="string"?e:br[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function gl(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(Te?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(Te?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function ml(e,t){if(ue&&e.keyCode==34&&e.char)return!1;var n=br[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),gl(n,e,t))}function ki(e){return typeof e=="string"?nr[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&&R(o.from,we(r).to)<=0;){var a=r.pop();if(R(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}kt(e,function(){for(var l=r.length-1;l>=0;l--)rn(e.doc,"",r[l].from,r[l].to,"+delete");Vr(e)})}function mo(e,t,n){var r=or(e.text,t+n,n);return r<0||r>e.text.length?null:r}function yo(e,t,n){var r=mo(e,t.ch,n);return r==null?null:new w(t.line,r,n<0?"after":"before")}function bo(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=be(n,t.doc.direction);if(o){var a=i<0?we(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 p=qt(t,d,u).top;u=Kt(function(m){return qt(t,d,m).top==p},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=mo(n,u,1))}else u=i<0?a.to:a.from;return new w(r,u,s)}}return new w(r,i<0?n.text.length:0,i<0?"before":"after")}function Du(e,t,n,r){var i=be(t,e.doc.direction);if(!i)return yo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lr(i,n.ch,n.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return yo(t,n,r);var l=function(F,_){return mo(t,F instanceof w?F.ch:F,_)},s,u=function(F){return e.options.lineWrapping?(s=s||Xr(e,t),ka(e,t,s,F)):{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 p=a.level==1==r<0,m=l(n,p?1:-1);if(m!=null&&(p?m<=a.to&&m<=d.end:m>=a.from&&m>=d.begin)){var g=p?"before":"after";return new w(n.line,m,g)}}var x=function(F,_,H){for(var K=function(We,Qe){return Qe?new w(n.line,l(We,1),"before"):new w(n.line,We,"after")};F>=0&&F<i.length;F+=_){var re=i[F],$=_>0==(re.level!=1),ve=$?H.begin:l(H.end,-1);if(re.from<=ve&&ve<re.to||(ve=$?re.from:l(re.to,-1),H.begin<=ve&&ve<H.end))return K(ve,$)}},L=x(o+r,r,d);if(L)return L;var D=r>0?d.end:l(d.begin,-1);return D!=null&&!(r>0&&D==t.text.length)&&(L=x(r>0?0:i.length-1,r,u(D)),L)?L:null}var Rn={selectAll:tl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ct)},killLine:function(e){return an(e,function(t){if(t.empty()){var n=Y(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:w(t.head.line+1,0)}:{from:t.head,to:w(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return an(e,function(t){return{from:w(t.from().line,0),to:de(e.doc,w(t.to().line+1,0))}})},delLineLeft:function(e){return an(e,function(t){return{from:w(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(w(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(w(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return yl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pu(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")},Me)},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")},Me)},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/)?bl(e,t.head):r},Me)},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=ke(e.getLine(o.line),o.ch,r);t.push(Tt(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return kt(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Y(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new w(i.line,i.ch-1)),i.ch>0)i=new w(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),w(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Y(e.doc,i.line-1).text;a&&(i=new w(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),w(i.line-1,a.length-1),i,"+transpose"))}}n.push(new Oe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return kt(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);Vr(e)})},openLine:function(e){return e.replaceSelection(`
|
||
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function yl(e,t){var n=Y(e.doc,t),r=It(n);return r!=n&&(t=f(r)),bo(!0,e,r,t,1)}function Pu(e,t){var n=Y(e.doc,t),r=vs(n);return r!=n&&(t=f(r)),bo(!0,e,n,t,-1)}function bl(e,t){var n=yl(e,t.line),r=Y(e.doc,n.line),i=be(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 w(n.line,a?0:o,n.sticky)}return n}function Si(e,t,n){if(typeof t=="string"&&(t=Rn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Pt}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Wu(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 Eu=new he;function _n(e,t,n,r){var i=e.state.keySeq;if(i){if(vl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Eu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),wl(e,i+" "+t,n,r))return!0}return wl(e,t,n,r)}function wl(e,t,n,r){var i=Wu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Je(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(it(n),eo(e)),!!i}function xl(e,t){var n=ml(t,!0);return n?t.shiftKey&&!e.state.keySeq?_n(e,"Shift-"+n,t,function(r){return Si(e,r,!0)})||_n(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Si(e,r)}):_n(e,n,t,function(r){return Si(e,r)}):!1}function zu(e,t,n){return _n(e,"'"+n+"'",t,function(r){return Si(e,r,!0)})}var wo=null;function kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=xe(wt(t)),!Be(t,e))){A&&X<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=xl(t,e);ue&&(wo=r?n:null,!r&&n==88&&!Vn&&(Z?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),ee&&!Z&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fu(t)}}function Fu(e){var t=e.display.lineDiv;Fe(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(oe(t,"CodeMirror-crosshair"),nt(document,"keyup",n),nt(document,"mouseover",n))}te(document,"keyup",n),te(document,"mouseover",n)}function Sl(e){e.keyCode==16&&(this.doc.sel.shift=!1),Be(this,e)}function Cl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Be(t,e)||e.ctrlKey&&!e.altKey||Z&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ue&&n==wo){wo=null,it(e);return}if(!(ue&&(!e.which||e.which<10)&&xl(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(zu(t,e,i)||t.display.input.onKeyPress(e))}}}var Hu=400,xo=function(e,t,n){this.time=e,this.pos=t,this.button=n};xo.prototype.compare=function(e,t,n){return this.time+Hu>e&&R(t,this.pos)==0&&n==this.button};var Kn,jn;function Iu(e,t){var n=+new Date;return jn&&jn.compare(n,e,t)?(Kn=jn=null,"triple"):Kn&&Kn.compare(n,e,t)?(jn=new xo(n,e,t),Kn=null,"double"):(Kn=new xo(n,e,t),jn=null,"single")}function Tl(e){var t=this,n=t.display;if(!(Be(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){G||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!ko(t,e)){var r=Mr(t,e),i=Et(e),o=r?Iu(r,i):"single";fe(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Bu(t,i,r,o,e))&&(i==1?r?_u(t,r,o,e):pn(e)==n.scroller&&it(e):i==2?(r&&mi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(ie?t.display.input.onContextMenu(e):to(t)))}}}function Bu(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,_n(e,gl(o,i),i,function(a){if(typeof a=="string"&&(a=Rn[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=Pt}finally{e.state.suppressEdits=!1}return l})}function Ru(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=se?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=Z?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(Z?n.altKey:n.ctrlKey)),i}function _u(e,t,n,r){A?setTimeout(le(La,e),0):e.curOp.focus=xe(wt(e));var i=Ru(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&Wi&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(R((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(R(a.to(),t)>0||t.xRel<0)?Ku(e,r,t,i):ju(e,r,t,i)}function Ku(e,t,n,r){var i=e.display,o=!1,a=Ze(e,function(u){G&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:to(e)),nt(i.wrapper.ownerDocument,"mouseup",a),nt(i.wrapper.ownerDocument,"mousemove",l),nt(i.scroller,"dragstart",s),nt(i.scroller,"drop",a),o||(it(u),r.addNew||mi(e.doc,n,null,null,r.extend),G&&!Le||A&&X==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};G&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,te(i.wrapper.ownerDocument,"mouseup",a),te(i.wrapper.ownerDocument,"mousemove",l),te(i.scroller,"dragstart",s),te(i.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ll(e,t,n){if(n=="char")return new Oe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Oe(w(t.line,0),de(e.doc,w(t.line+1,0)));var r=n(e,t);return new Oe(r.from,r.to)}function ju(e,t,n,r){A&&to(e);var i=e.display,o=e.doc;it(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 Oe(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new Oe(n,n)),n=Mr(e,t,!0,!0),l=-1;else{var d=Ll(e,n,r.unit);r.extend?a=vo(a,d.anchor,d.head,r.extend):a=d}r.addNew?l==-1?(l=u.length,ot(o,Rt(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&r.unit=="char"&&!r.extend?(ot(o,Rt(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):go(o,l,a,Ct):(l=0,ot(o,new Mt([a],0),Ct),s=o.sel);var p=n;function m(H){if(R(p,H)!=0)if(p=H,r.unit=="rectangle"){for(var K=[],re=e.options.tabSize,$=ke(Y(o,n.line).text,n.ch,re),ve=ke(Y(o,H.line).text,H.ch,re),We=Math.min($,ve),Qe=Math.max($,ve),He=Math.min(n.line,H.line),St=Math.min(e.lastLine(),Math.max(n.line,H.line));He<=St;He++){var mt=Y(o,He).text,Ge=je(mt,We,re);We==Qe?K.push(new Oe(w(He,Ge),w(He,Ge))):mt.length>Ge&&K.push(new Oe(w(He,Ge),w(He,je(mt,Qe,re))))}K.length||K.push(new Oe(n,n)),ot(o,Rt(e,s.ranges.slice(0,l).concat(K),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(H)}else{var yt=a,tt=Ll(e,H,r.unit),Xe=yt.anchor,qe;R(tt.anchor,Xe)>0?(qe=tt.head,Xe=Ur(yt.from(),tt.anchor)):(qe=tt.anchor,Xe=pt(yt.to(),tt.head));var _e=s.ranges.slice(0);_e[l]=Uu(e,new Oe(de(o,Xe),qe)),ot(o,Rt(e,_e,l),Ct)}}var g=i.wrapper.getBoundingClientRect(),x=0;function L(H){var K=++x,re=Mr(e,H,!0,r.unit=="rectangle");if(re)if(R(re,p)!=0){e.curOp.focus=xe(wt(e)),m(re);var $=ci(i,o);(re.line>=$.to||re.line<$.from)&&setTimeout(Ze(e,function(){x==K&&L(H)}),150)}else{var ve=H.clientY<g.top?-20:H.clientY>g.bottom?20:0;ve&&setTimeout(Ze(e,function(){x==K&&(i.scroller.scrollTop+=ve,L(H))}),50)}}function D(H){e.state.selectingText=!1,x=1/0,H&&(it(H),i.input.focus()),nt(i.wrapper.ownerDocument,"mousemove",F),nt(i.wrapper.ownerDocument,"mouseup",_),o.history.lastSelOrigin=null}var F=Ze(e,function(H){H.buttons===0||!Et(H)?D(H):L(H)}),_=Ze(e,D);e.state.selectingText=_,te(i.wrapper.ownerDocument,"mousemove",F),te(i.wrapper.ownerDocument,"mouseup",_)}function Uu(e,t){var n=t.anchor,r=t.head,i=Y(e.doc,n.line);if(R(n,r)==0&&n.sticky==r.sticky)return t;var o=be(i);if(!o)return t;var a=lr(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=lr(o,r.ch,r.sticky),p=d-a||(r.ch-n.ch)*(l.level==1?-1:1);d==s-1||d==s?u=p<0:u=p>0}var m=o[s+(u?-1:0)],g=u==(m.level==1),x=g?m.from:m.to,L=g?"after":"before";return n.ch==x&&n.sticky==L?t:new Oe(new w(n.line,x,L),r)}function Ml(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(m){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&it(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!xt(e,n))return ht(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=h(e.doc,o),p=e.display.gutterSpecs[s];return Ie(e,n,e,d,p.className,t),ht(t)}}}function ko(e,t){return Ml(e,t,"gutterClick",!0)}function Nl(e,t){tr(e.display,t)||Gu(e,t)||Be(e,t,"contextmenu")||ie||e.display.input.onContextMenu(t)}function Gu(e,t){return xt(e,"gutterContextMenu")?Ml(e,t,"gutterContextMenu",!1):!1}function Ol(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Sn(e)}var ln={toString:function(){return"CodeMirror.Init"}},Al={},Ci={};function qu(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,co(r)},!0),n("indentUnit",2,co,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Dn(r),Sn(r),vt(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(w(a,d))}a++});for(var l=o.length-1;l>=0;l--)rn(r.doc,i,o[l],w(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",xs,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",W?"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",!ye),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Ol(r),An(r)},!0),n("keyMap","default",function(r,i,o){var a=ki(i),l=o!=ln&&ki(o);l&&l.detach&&l.detach(r,a),a.attach&&a.attach(r,l||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Yu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=uo(i,r.options.lineNumbers),An(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Vi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Qr(r)},!0),n("scrollbarStyle","native",function(r){Pa(r),Qr(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=uo(r.options.gutters,i),An(r)},!0),n("firstLineNumber",1,An,!0),n("lineNumberFormatter",function(r){return r},An,!0),n("showCursorWhenSelecting",!1,Cn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Zr(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Xu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Cn,!0),n("singleCursorHeightPerLine",!0,Cn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Dn,!0),n("addModeClass",!1,Dn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Dn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Xu(e,t,n){var r=n&&n!=ln;if(!t!=!r){var i=e.display.dragFunctions,o=t?te:nt;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 Yu(e){e.options.lineWrapping?(Fe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(oe(e.display.wrapper,"CodeMirror-wrap"),_i(e)),Qi(e),vt(e),Sn(e),setTimeout(function(){return Qr(e)},100)}function ze(e,t){var n=this;if(!(this instanceof ze))return new ze(e,t);this.options=t=t?pe(t):{},pe(Al,t,!1);var r=t.value;typeof r=="string"?r=new gt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new ze.inputStyles[t.inputStyle](this),o=this.display=new lu(e,r,i,t);o.wrapper.CodeMirror=this,Ol(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Pa(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 he,keySeq:null,specialChars:null},t.autofocus&&!W&&o.input.focus(),A&&X<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ju(this),Lu(),Dr(this),this.curOp.forceUpdate=!0,Ka(this,r),t.autofocus&&!W||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ro(n)},20):Zr(this);for(var a in Ci)Ci.hasOwnProperty(a)&&Ci[a](this,t[a],ln);za(this),t.finishInit&&t.finishInit(this);for(var l=0;l<So.length;++l)So[l](this);Pr(this),G&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}ze.defaults=Al,ze.optionHandlers=Ci;function Ju(e){var t=e.display;te(t.scroller,"mousedown",Ze(e,Tl)),A&&X<11?te(t.scroller,"dblclick",Ze(e,function(s){if(!Be(e,s)){var u=Mr(e,s);if(!(!u||ko(e,s)||tr(e.display,s))){it(s);var d=e.findWordAt(u);mi(e.doc,d.anchor,d.head)}}})):te(t.scroller,"dblclick",function(s){return Be(e,s)||it(s)}),te(t.scroller,"contextmenu",function(s){return Nl(e,s)}),te(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Nl(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,p=u.top-s.top;return d*d+p*p>20*20}te(t.scroller,"touchstart",function(s){if(!Be(e,s)&&!o(s)&&!ko(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)}}),te(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),te(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var d=e.coordsChar(t.activeTouch,"page"),p;!u.prev||a(u,u.prev)?p=new Oe(d,d):!u.prev.prev||a(u,u.prev.prev)?p=e.findWordAt(d):p=new Oe(w(d.line,0),de(e.doc,w(d.line+1,0))),e.setSelection(p.anchor,p.head),e.focus(),it(s)}i()}),te(t.scroller,"touchcancel",i),te(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ln(e,t.scroller.scrollTop),Or(e,t.scroller.scrollLeft,!0),Ie(e,"scroll",e))}),te(t.scroller,"mousewheel",function(s){return Ia(e,s)}),te(t.scroller,"DOMMouseScroll",function(s){return Ia(e,s)}),te(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Be(e,s)||sr(s)},over:function(s){Be(e,s)||(Tu(e,s),sr(s))},start:function(s){return Cu(e,s)},drop:Ze(e,Su),leave:function(s){Be(e,s)||dl(e)}};var l=t.input.getField();te(l,"keyup",function(s){return Sl.call(e,s)}),te(l,"keydown",Ze(e,kl)),te(l,"keypress",Ze(e,Cl)),te(l,"focus",function(s){return ro(e,s)}),te(l,"blur",function(s){return Zr(e,s)})}var So=[];ze.defineInitHook=function(e){return So.push(e)};function Un(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=yn(e,t).state:n="prev");var a=e.options.tabSize,l=Y(i,t),s=ke(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==Pt||d>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?d=ke(Y(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 p="",m=0;if(e.options.indentWithTabs)for(var g=Math.floor(d/a);g;--g)m+=a,p+=" ";if(m<d&&(p+=Tt(d-m)),p!=u)return rn(i,p,w(t,0),w(t,u.length),"+input"),l.stateAfter=null,!0;for(var x=0;x<i.sel.ranges.length;x++){var L=i.sel.ranges[x];if(L.head.line==t&&L.head.ch<u.length){var D=w(t,u.length);go(i,x,new Oe(D,D));break}}}var _t=null;function Ti(e){_t=e}function Co(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=At(t),u=null;if(l&&r.ranges.length>1)if(_t&&_t.text.join(`
|
||
`)==t){if(r.ranges.length%_t.text.length==0){u=[];for(var d=0;d<_t.text.length;d++)u.push(o.splitLines(_t.text[d]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Pe(s,function(F){return[F]}));for(var p=e.curOp.updateInput,m=r.ranges.length-1;m>=0;m--){var g=r.ranges[m],x=g.from(),L=g.to();g.empty()&&(n&&n>0?x=w(x.line,x.ch-n):e.state.overwrite&&!l?L=w(L.line,Math.min(Y(o,L.line).text.length,L.ch+we(s).length)):l&&_t&&_t.lineWise&&_t.text.join(`
|
||
`)==s.join(`
|
||
`)&&(x=L=w(x.line,0)));var D={from:x,to:L,text:u?u[m%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};tn(e.doc,D),Je(e,"inputRead",e,D)}t&&!l&&Pl(e,t),Vr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Dl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&kt(t,function(){return Co(t,n,0,null,"paste")}),!0}function Pl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Un(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Y(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Un(e,i.head.line,"smart"));a&&Je(e,"electricInput",e,i.head.line)}}}function Wl(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:w(i,0),head:w(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function To(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function El(){var e=c("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=c("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return G?e.style.width="1000px":e.setAttribute("wrap","off"),q&&(e.style.border="1px solid black"),t}function Zu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){fe(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)&&Ze(this,t[r])(this,i,a),Ie(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"](ki(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:ut(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");b(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,vt(this)}),removeOverlay:ut(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++,vt(this);return}}}),indentLine:ut(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),C(this.doc,r)&&Un(this,r,i,o)}),indentSelection:ut(function(r){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(Un(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Vr(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 p=d;p<o;++p)Un(this,p,r);var m=this.doc.sel.ranges;s.ch==0&&i.length==m.length&&m[a].from().ch>0&&go(this.doc,a,new Oe(s,m[a].to()),ct)}}}),getTokenAt:function(r,i){return Uo(this,r,i)},getLineTokens:function(r,i){return Uo(this,w(r),i,!0)},getTokenTypeAt:function(r){r=de(this.doc,r);var i=_o(this,Y(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 p=a._global[d];p.pred(l,this)&&Q(o,p.val)==-1&&o.push(p.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=Io(o,r==null?o.first+o.size-1:r),yn(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=de(this.doc,r):o=r?a.from():a.to(),Bt(this,o,i||"page")},charCoords:function(r,i){return li(this,de(this.doc,r),i||"page")},coordsChar:function(r,i){return r=ba(this,r,i||"page"),Yi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=ba(this,{top:r,left:0},i||"page").top,h(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=Y(this.doc,r)}else l=r;return ai(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-er(l):0)},defaultTextHeight:function(){return Yr(this.display)},defaultCharWidth:function(){return Jr(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=Bt(this,de(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 p=Math.max(s.wrapper.clientHeight,this.doc.height),m=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>p)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=p&&(u=r.bottom),d+i.offsetWidth>m&&(d=m-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&&Xs(this,{left:d,top:u,right:d+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:ut(kl),triggerOnKeyPress:ut(Cl),triggerOnKeyUp:Sl,triggerOnMouseDown:ut(Tl),execCommand:function(r){if(Rn.hasOwnProperty(r))return Rn[r].call(null,this)},triggerElectric:ut(function(r){Pl(this,r)}),findPosH:function(r,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=de(this.doc,r),u=0;u<i&&(s=Lo(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:ut(function(r,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?Lo(o.doc,a.head,r,i,o.options.rtlMoveVisually):r<0?a.from():a.to()},Me)}),deleteH:ut(function(r,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):an(this,function(l){var s=Lo(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=de(this.doc,r),d=0;d<i;++d){var p=Bt(this,u,"div");if(s==null?s=p.left:p.left=s,u=zl(this,p,l,o),u.hitSide)break}return u},moveV:ut(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 p=Bt(o,d.head,"div");d.goalColumn!=null&&(p.left=d.goalColumn),l.push(p.left);var m=zl(o,p,r,i);return i=="page"&&d==a.sel.primary()&&io(o,li(o,m,"div").top-p.top),m},Me),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=Y(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=Jt(u,s)?function(p){return Jt(p,s)}:/\s/.test(u)?function(p){return/\s/.test(p)}:function(p){return!/\s/.test(p)&&!Jt(p)};a>0&&d(o.charAt(a-1));)--a;for(;l<o.length&&d(o.charAt(l));)++l}return new Oe(w(r.line,a),w(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Fe(this.display.cursorDiv,"CodeMirror-overwrite"):oe(this.display.cursorDiv,"CodeMirror-overwrite"),Ie(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==xe(wt(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ut(function(r,i){Tn(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Gt(this)-this.display.barHeight,width:r.scrollWidth-Gt(this)-this.display.barWidth,clientHeight:Ui(this),clientWidth:Tr(this)}},scrollIntoView:ut(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:w(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?Ys(this,r):Na(this,r.from,r.to,r.margin)}),setSize:ut(function(r,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=a(r)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&ga(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){hr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Ie(this,"refresh",this)}),operation:function(r){return kt(this,r)},startOperation:function(){return Dr(this)},endOperation:function(){return Pr(this)},refresh:ut(function(){var r=this.display.cachedTextHeight;vt(this),this.curOp.forceUpdate=!0,Sn(this),Tn(this,this.doc.scrollLeft,this.doc.scrollTop),lo(this.display),(r==null||Math.abs(r-Yr(this.display))>.5||this.options.lineWrapping)&&Qi(this),Ie(this,"refresh",this)}),swapDoc:ut(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ka(this,r),Sn(this),this.display.input.reset(),Tn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Je(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}},Wt(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 Lo(e,t,n,r,i){var o=t,a=n,l=Y(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var _=t.line+s;return _<e.first||_>=e.first+e.size?!1:(t=new w(_,t.ch,t.sticky),l=Y(e,_))}function d(_){var H;if(r=="codepoint"){var K=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(K))H=null;else{var re=n>0?K>=55296&&K<56320:K>=56320&&K<57343;H=new w(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(re?2:1))),-n)}}else i?H=Du(e.cm,l,t,n):H=yo(l,t,n);if(H==null)if(!_&&u())t=bo(i,e.cm,l,t.line,s);else return!1;else t=H;return!0}if(r=="char"||r=="codepoint")d();else if(r=="column")d(!0);else if(r=="word"||r=="group")for(var p=null,m=r=="group",g=e.cm&&e.cm.getHelper(t,"wordChars"),x=!0;!(n<0&&!d(!x));x=!1){var L=l.text.charAt(t.ch)||`
|
||
`,D=Jt(L,g)?"w":m&&L==`
|
||
`?"n":!m||/\s/.test(L)?null:"p";if(m&&!x&&!D&&(D="s"),p&&p!=D){n<0&&(n=1,d(),t.sticky="after");break}if(D&&(p=D),n>0&&!d(!x))break}var F=bi(e,t,o,a,!0);return Ne(o,F)&&(F.hitSide=!0),F}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,fe(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=Yi(e,o,a),!!u.outside;){if(n<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=n*5}return u}var De=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};De.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,To(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}te(i,"paste",function(l){!o(l)||Be(r,l)||Dl(l,r)||X<=11&&setTimeout(Ze(r,function(){return t.updateFromDOM()}),20)}),te(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),te(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),te(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),te(i,"touchstart",function(){return n.forceCompositionEnd()}),te(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||Be(r,l))){if(r.somethingSelected())Ti({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=Wl(r);Ti({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,ct),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=_t.text.join(`
|
||
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var d=El(),p=d.firstChild;To(p),r.display.lineSpace.insertBefore(d,r.display.lineSpace.firstChild),p.value=_t.text.join(`
|
||
`);var m=xe(Ee(i));Yt(p),setTimeout(function(){r.display.lineSpace.removeChild(d),m.focus(),m==i&&n.showPrimarySelection()},50)}}te(i,"copy",a),te(i,"cut",a)},De.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},De.prototype.prepareSelection=function(){var e=Ta(this.cm,!1);return e.focus=xe(Ee(this.div))==this.div,e},De.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},De.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},De.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=Li(t,e.anchorNode,e.anchorOffset),a=Li(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&R(Ur(o,a),r)==0&&R(pt(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Fl(t,r)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Fl(t,i);if(!u){var d=l[l.length-1].measure,p=d.maps?d.maps[d.maps.length-1]:d.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(!s||!u){e.removeAllRanges();return}var m=e.rangeCount&&e.getRangeAt(0),g;try{g=N(s.node,s.offset,u.offset,u.node)}catch(x){}g&&(!ee&&t.state.focused?(e.collapse(s.node,s.offset),g.collapsed||(e.removeAllRanges(),e.addRange(g))):(e.removeAllRanges(),e.addRange(g)),m&&e.anchorNode==null?e.addRange(m):ee&&this.startGracePeriod()),this.rememberSelection()}},De.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)},De.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},De.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},De.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return V(this.div,t)},De.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||xe(Ee(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},De.prototype.blur=function(){this.div.blur()},De.prototype.getField=function(){return this.div},De.prototype.supportsTouch=function(){return!0},De.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):kt(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)},De.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},De.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(T&&U&&this.cm.display.gutterSpecs.length&&Vu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=Li(t,e.anchorNode,e.anchorOffset),r=Li(t,e.focusNode,e.focusOffset);n&&r&&kt(t,function(){ot(t.doc,vr(n,r),ct),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},De.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=w(r.line-1,Y(e.doc,r.line-1).length)),i.ch==Y(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=w(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||(o=Nr(e,r.line))==0?(a=f(t.view[0].line),l=t.view[0].node):(a=f(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=Nr(e,i.line),u,d;if(s==t.view.length-1?(u=t.viewTo-1,d=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,d=t.view[s+1].node.previousSibling),!l)return!1;for(var p=e.doc.splitLines(Qu(e,l,d,a,u)),m=Qt(e.doc,w(a,0),w(u,Y(e.doc,u).text.length));p.length>1&&m.length>1;)if(we(p)==we(m))p.pop(),m.pop(),u--;else if(p[0]==m[0])p.shift(),m.shift(),a++;else break;for(var g=0,x=0,L=p[0],D=m[0],F=Math.min(L.length,D.length);g<F&&L.charCodeAt(g)==D.charCodeAt(g);)++g;for(var _=we(p),H=we(m),K=Math.min(_.length-(p.length==1?g:0),H.length-(m.length==1?g:0));x<K&&_.charCodeAt(_.length-x-1)==H.charCodeAt(H.length-x-1);)++x;if(p.length==1&&m.length==1&&a==r.line)for(;g&&g>r.ch&&_.charCodeAt(_.length-x-1)==H.charCodeAt(H.length-x-1);)g--,x++;p[p.length-1]=_.slice(0,_.length-x).replace(/^\u200b+/,""),p[0]=p[0].slice(g).replace(/\u200b+$/,"");var re=w(a,g),$=w(u,m.length?we(m).length-x:0);if(p.length>1||p[0]||R(re,$))return rn(e.doc,p,re,$,"+input"),!0},De.prototype.ensurePolled=function(){this.forceCompositionEnd()},De.prototype.reset=function(){this.forceCompositionEnd()},De.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},De.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))},De.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&kt(this.cm,function(){return vt(e.cm)})},De.prototype.setUneditable=function(e){e.contentEditable="false"},De.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ze(this.cm,Co)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},De.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},De.prototype.onContextMenu=function(){},De.prototype.resetPosition=function(){},De.prototype.needsContentAttribute=!0;function Fl(e,t){var n=Gi(e,t.line);if(!n||n.hidden)return null;var r=Y(e.doc,t.line),i=ca(n,r,t.line),o=be(r,e.doc.direction),a="left";if(o){var l=lr(o,t.ch);a=l%2?"right":"left"}var s=pa(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Vu(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 Qu(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(g){return function(x){return x.id==g}}function d(){a&&(o+=l,s&&(o+=l),a=s=!1)}function p(g){g&&(d(),o+=g)}function m(g){if(g.nodeType==1){var x=g.getAttribute("cm-text");if(x){p(x);return}var L=g.getAttribute("cm-marker"),D;if(L){var F=e.findMarks(w(r,0),w(i+1,0),u(+L));F.length&&(D=F[0].find(0))&&p(Qt(e.doc,D.from,D.to).join(l));return}if(g.getAttribute("contenteditable")=="false")return;var _=/^(pre|div|p|li|table|br)$/i.test(g.nodeName);if(!/^br$/i.test(g.nodeName)&&g.textContent.length==0)return;_&&d();for(var H=0;H<g.childNodes.length;H++)m(g.childNodes[H]);/^(pre|p)$/i.test(g.nodeName)&&(s=!0),_&&(a=!0)}else g.nodeType==3&&p(g.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;m(t),t!=n;)t=t.nextSibling,s=!1;return o}function Li(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return sn(e.clipPos(w(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 $u(o,t,n)}}function $u(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!V(r,t))return sn(w(f(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?we(e.rest):e.line;return sn(w(f(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(D,F,_){for(var H=-1;H<(u?u.length:0);H++)for(var K=H<0?s.map:u[H],re=0;re<K.length;re+=3){var $=K[re+2];if($==D||$==F){var ve=f(H<0?e.line:e.rest[H]),We=K[re]+_;return(_<0||$!=D)&&(We=K[re+(_?1:0)]),w(ve,We)}}}var p=d(a,l,n);if(p)return sn(p,i);for(var m=l.nextSibling,g=a?a.nodeValue.length-n:0;m;m=m.nextSibling){if(p=d(m,m.firstChild,0),p)return sn(w(p.line,p.ch-g),i);g+=m.textContent.length}for(var x=l.previousSibling,L=n;x;x=x.previousSibling){if(p=d(x,x.firstChild,-1),p)return sn(w(p.line,p.ch+L),i);L+=x.textContent.length}}var Ke=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new he,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ke.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),q&&(i.style.width="0px"),te(i,"input",function(){A&&X>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),te(i,"paste",function(a){Be(r,a)||Dl(a,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(a){if(!Be(r,a)){if(r.somethingSelected())Ti({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=Wl(r);Ti({lineWise:!0,text:l.text}),a.type=="cut"?r.setSelections(l.ranges,null,ct):(n.prevInput="",i.value=l.text.join(`
|
||
`),Yt(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}te(i,"cut",o),te(i,"copy",o),te(e.scroller,"paste",function(a){if(!(tr(e,a)||Be(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)}}),te(e.lineSpace,"selectstart",function(a){tr(e,a)||it(a)}),te(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"})}}),te(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ke.prototype.createField=function(e){this.wrapper=El(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;To(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ke.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ke.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ta(e);if(e.options.moveInputWithCursor){var i=Bt(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},Ke.prototype.showSelection=function(e){var t=this.cm,n=t.display;E(n.cursorDiv,e.cursors),E(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ke.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&&Yt(this.textarea),A&&X>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",A&&X>=9&&(this.hasSelection=null));this.resetting=!1}},Ke.prototype.getField=function(){return this.textarea},Ke.prototype.supportsTouch=function(){return!1},Ke.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!W||xe(Ee(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},Ke.prototype.blur=function(){this.textarea.blur()},Ke.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ke.prototype.receivedFocus=function(){this.slowPoll()},Ke.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ke.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)},Ke.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||fr(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(A&&X>=9&&this.hasSelection===i||Z&&/[\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 kt(t,function(){Co(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},Ke.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ke.prototype.onKeyPress=function(){A&&X>=9&&(this.hasSelection=null),this.fastPoll()},Ke.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Mr(n,e),a=r.scroller.scrollTop;if(!o||ue)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&Ze(n,ot)(n.doc,vr(o),ct);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: `+(A?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var p;G&&(p=i.ownerDocument.defaultView.scrollY),r.input.focus(),G&&i.ownerDocument.defaultView.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function m(){if(i.selectionStart!=null){var L=n.somethingSelected(),D=""+(L?i.value:"");i.value="⇚",i.value=D,t.prevInput=L?"":"",i.selectionStart=1,i.selectionEnd=D.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,A&&X<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!A||A&&X<9)&&m();var L=0,D=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?Ze(n,tl)(n):L++<10?r.detectingSelectAll=setTimeout(D,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(D,200)}}if(A&&X>=9&&m(),ie){sr(e);var x=function(){nt(window,"mouseup",x),setTimeout(g,20)};te(window,"mouseup",x)}else setTimeout(g,50)},Ke.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ke.prototype.setUneditable=function(){},Ke.prototype.needsContentAttribute=!1;function ef(e,t){if(t=t?pe(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=xe(Ee(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(te(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&&(nt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=ze(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function tf(e){e.off=nt,e.on=te,e.wheelEventPixels=su,e.Doc=gt,e.splitLines=At,e.countColumn=ke,e.findColumn=je,e.isWordChar=rt,e.Pass=Pt,e.signal=Ie,e.Line=Gr,e.changeEnd=gr,e.scrollbarModel=Da,e.Pos=w,e.cmpPos=R,e.modes=Br,e.mimeModes=Ft,e.resolveMode=Rr,e.getMode=_r,e.modeExtensions=cr,e.extendMode=Kr,e.copyState=jt,e.startState=jr,e.innerMode=gn,e.commands=Rn,e.keyMap=nr,e.keyName=ml,e.isModifierKey=vl,e.lookupKey=on,e.normalizeKeyMap=Au,e.StringStream=Re,e.SharedTextMarker=Hn,e.TextMarker=yr,e.LineWidget=Fn,e.e_preventDefault=it,e.e_stopPropagation=Hr,e.e_stop=sr,e.addClass=Fe,e.contains=V,e.rmClass=oe,e.keyNames=br}qu(ze),Zu(ze);var rf="iter insert remove copy getEditor constructor".split(" ");for(var Mi in gt.prototype)gt.prototype.hasOwnProperty(Mi)&&Q(rf,Mi)<0&&(ze.prototype[Mi]=function(e){return function(){return e.apply(this.doc,arguments)}}(gt.prototype[Mi]));return Wt(gt),ze.inputStyles={textarea:Ke,contenteditable:De},ze.defineMode=function(e){!ze.defaults.mode&&e!="null"&&(ze.defaults.mode=e),Ht.apply(this,arguments)},ze.defineMIME=Cr,ze.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ze.defineMIME("text/plain","null"),ze.defineExtension=function(e,t){ze.prototype[e]=t},ze.defineDocExtension=function(e,t){gt.prototype[e]=t},ze.fromTextArea=ef,tf(ze),ze.version="5.65.18",ze})})($l);var Xn=$l.exports;const Wf=bf(Xn);var hn=(v=>(v.JSON="application/json",v.HTML="htmlmixed",v.JS="javascript",v))(hn||{});var Ef={exports:{}};(function(v,M){(function(y){y(Xn)})(function(y){y.defineMode("javascript",function(I,ee){var j=I.indentUnit,ge=ee.statementIndent,ne=ee.jsonld,A=ee.json||ne,X=ee.trackScope!==!1,G=ee.typescript,J=ee.wordCharacters||/[\w$\xa1-\uffff]/,U=function(){function f(Ye){return{type:Ye,style:"keyword"}}var h=f("keyword a"),C=f("keyword b"),O=f("keyword c"),w=f("keyword d"),R=f("operator"),Ne={type:"atom",style:"atom"};return{if:f("if"),while:h,with:h,else:C,do:C,try:C,finally:C,return:w,break:w,continue:w,new:f("new"),delete:O,void:O,throw:O,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:R,typeof:R,instanceof:R,true:Ne,false:Ne,null:Ne,undefined:Ne,NaN:Ne,Infinity:Ne,this:f("this"),class:f("class"),super:f("atom"),yield:O,export:f("export"),import:f("import"),extends:O,await:O}}(),ce=/[+\-*&%=<>!?|~^@]/,ue=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Le(f){for(var h=!1,C,O=!1;(C=f.next())!=null;){if(!h){if(C=="/"&&!O)return;C=="["?O=!0:O&&C=="]"&&(O=!1)}h=!h&&C=="\\"}}var Ae,Ce;function q(f,h,C){return Ae=f,Ce=C,h}function T(f,h){var C=f.next();if(C=='"'||C=="'")return h.tokenize=W(C),h.tokenize(f,h);if(C=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return q("number","number");if(C=="."&&f.match(".."))return q("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(C))return q(C);if(C=="="&&f.eat(">"))return q("=>","operator");if(C=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return q("number","number");if(/\d/.test(C))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),q("number","number");if(C=="/")return f.eat("*")?(h.tokenize=Z,Z(f,h)):f.eat("/")?(f.skipToEnd(),q("comment","comment")):Lt(f,h,1)?(Le(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),q("regexp","string-2")):(f.eat("="),q("operator","operator",f.current()));if(C=="`")return h.tokenize=se,se(f,h);if(C=="#"&&f.peek()=="!")return f.skipToEnd(),q("meta","meta");if(C=="#"&&f.eatWhile(J))return q("variable","property");if(C=="<"&&f.match("!--")||C=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),q("comment","comment");if(ce.test(C))return(C!=">"||!h.lexical||h.lexical.type!=">")&&(f.eat("=")?(C=="!"||C=="=")&&f.eat("="):/[<>*+\-|&?]/.test(C)&&(f.eat(C),C==">"&&f.eat(C))),C=="?"&&f.eat(".")?q("."):q("operator","operator",f.current());if(J.test(C)){f.eatWhile(J);var O=f.current();if(h.lastType!="."){if(U.propertyIsEnumerable(O)){var w=U[O];return q(w.type,w.style,O)}if(O=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return q("async","keyword",O)}return q("variable","variable",O)}}function W(f){return function(h,C){var O=!1,w;if(ne&&h.peek()=="@"&&h.match(ue))return C.tokenize=T,q("jsonld-keyword","meta");for(;(w=h.next())!=null&&!(w==f&&!O);)O=!O&&w=="\\";return O||(C.tokenize=T),q("string","string")}}function Z(f,h){for(var C=!1,O;O=f.next();){if(O=="/"&&C){h.tokenize=T;break}C=O=="*"}return q("comment","comment")}function se(f,h){for(var C=!1,O;(O=f.next())!=null;){if(!C&&(O=="`"||O=="$"&&f.eat("{"))){h.tokenize=T;break}C=!C&&O=="\\"}return q("quasi","string-2",f.current())}var ye="([{}])";function me(f,h){h.fatArrowAt&&(h.fatArrowAt=null);var C=f.string.indexOf("=>",f.start);if(!(C<0)){if(G){var O=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,C));O&&(C=O.index)}for(var w=0,R=!1,Ne=C-1;Ne>=0;--Ne){var Ye=f.string.charAt(Ne),pt=ye.indexOf(Ye);if(pt>=0&&pt<3){if(!w){++Ne;break}if(--w==0){Ye=="("&&(R=!0);break}}else if(pt>=3&&pt<6)++w;else if(J.test(Ye))R=!0;else if(/["'\/`]/.test(Ye))for(;;--Ne){if(Ne==0)return;var Ur=f.string.charAt(Ne-1);if(Ur==Ye&&f.string.charAt(Ne-2)!="\\"){Ne--;break}}else if(R&&!w){++Ne;break}}R&&!w&&(h.fatArrowAt=Ne)}}var Te={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function ie(f,h,C,O,w,R){this.indented=f,this.column=h,this.type=C,this.prev=w,this.info=R,O!=null&&(this.align=O)}function z(f,h){if(!X)return!1;for(var C=f.localVars;C;C=C.next)if(C.name==h)return!0;for(var O=f.context;O;O=O.prev)for(var C=O.vars;C;C=C.next)if(C.name==h)return!0}function oe(f,h,C,O,w){var R=f.cc;for(k.state=f,k.stream=w,k.marked=null,k.cc=R,k.style=h,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var Ne=R.length?R.pop():A?Q:ke;if(Ne(C,O)){for(;R.length&&R[R.length-1].lex;)R.pop()();return k.marked?k.marked:C=="variable"&&z(f,O)?"variable-2":h}}}var k={state:null,column:null,marked:null,cc:null};function E(){for(var f=arguments.length-1;f>=0;f--)k.cc.push(arguments[f])}function c(){return E.apply(null,arguments),!0}function B(f,h){for(var C=h;C;C=C.next)if(C.name==f)return!0;return!1}function N(f){var h=k.state;if(k.marked="def",!!X){if(h.context){if(h.lexical.info=="var"&&h.context&&h.context.block){var C=V(f,h.context);if(C!=null){h.context=C;return}}else if(!B(f,h.localVars)){h.localVars=new Dt(f,h.localVars);return}}ee.globalVars&&!B(f,h.globalVars)&&(h.globalVars=new Dt(f,h.globalVars))}}function V(f,h){if(h)if(h.block){var C=V(f,h.prev);return C?C==h.prev?h:new Fe(C,h.vars,!0):null}else return B(f,h.vars)?h:new Fe(h.prev,new Dt(f,h.vars),!1);else return null}function xe(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function Fe(f,h,C){this.prev=f,this.vars=h,this.block=C}function Dt(f,h){this.name=f,this.next=h}var Yt=new Dt("this",new Dt("arguments",null));function st(){k.state.context=new Fe(k.state.context,k.state.localVars,!1),k.state.localVars=Yt}function wt(){k.state.context=new Fe(k.state.context,k.state.localVars,!0),k.state.localVars=null}st.lex=wt.lex=!0;function Ee(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}Ee.lex=!0;function fe(f,h){var C=function(){var O=k.state,w=O.indented;if(O.lexical.type=="stat")w=O.lexical.indented;else for(var R=O.lexical;R&&R.type==")"&&R.align;R=R.prev)w=R.indented;O.lexical=new ie(w,k.stream.column(),f,null,O.lexical,h)};return C.lex=!0,C}function le(){var f=k.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}le.lex=!0;function pe(f){function h(C){return C==f?c():f==";"||C=="}"||C==")"||C=="]"?E():c(h)}return h}function ke(f,h){return f=="var"?c(fe("vardef",h),Hr,pe(";"),le):f=="keyword a"?c(fe("form"),Pt,ke,le):f=="keyword b"?c(fe("form"),ke,le):f=="keyword d"?k.stream.match(/^\s*$/,!1)?c():c(fe("stat"),Ct,pe(";"),le):f=="debugger"?c(pe(";")):f=="{"?c(fe("}"),wt,Kt,le,Ee):f==";"?c():f=="if"?(k.state.lexical.info=="else"&&k.state.cc[k.state.cc.length-1]==le&&k.state.cc.pop()(),c(fe("form"),Pt,ke,le,Ir)):f=="function"?c(At):f=="for"?c(fe("form"),wt,Zn,ke,Ee,le):f=="class"||G&&h=="interface"?(k.marked="keyword",c(fe("form",f=="class"?f:h),Br,le)):f=="variable"?G&&h=="declare"?(k.marked="keyword",c(ke)):G&&(h=="module"||h=="enum"||h=="type")&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword",h=="enum"?c(Y):h=="type"?c(Vn,pe("operator"),be,pe(";")):c(fe("form"),ht,pe("{"),fe("}"),Kt,le,le)):G&&h=="namespace"?(k.marked="keyword",c(fe("form"),Q,ke,le)):G&&h=="abstract"?(k.marked="keyword",c(ke)):c(fe("stat"),Se):f=="switch"?c(fe("form"),Pt,pe("{"),fe("}","switch"),wt,Kt,le,le,Ee):f=="case"?c(Q,pe(":")):f=="default"?c(pe(":")):f=="catch"?c(fe("form"),st,he,ke,le,Ee):f=="export"?c(fe("stat"),Rr,le):f=="import"?c(fe("stat"),cr,le):f=="async"?c(ke):h=="@"?c(Q,ke):E(fe("stat"),Q,pe(";"),le)}function he(f){if(f=="(")return c(zt,pe(")"))}function Q(f,h){return ct(f,h,!1)}function et(f,h){return ct(f,h,!0)}function Pt(f){return f!="("?E():c(fe(")"),Ct,pe(")"),le)}function ct(f,h,C){if(k.state.fatArrowAt==k.stream.start){var O=C?Pe:we;if(f=="(")return c(st,fe(")"),Ue(zt,")"),le,pe("=>"),O,Ee);if(f=="variable")return E(st,ht,pe("=>"),O,Ee)}var w=C?je:Me;return Te.hasOwnProperty(f)?c(w):f=="function"?c(At,w):f=="class"||G&&h=="interface"?(k.marked="keyword",c(fe("form"),Ei,le)):f=="keyword c"||f=="async"?c(C?et:Q):f=="("?c(fe(")"),Ct,pe(")"),le,w):f=="operator"||f=="spread"?c(C?et:Q):f=="["?c(fe("]"),Re,le,w):f=="{"?or(Jt,"}",null,w):f=="quasi"?E(dt,w):f=="new"?c(b(C)):c()}function Ct(f){return f.match(/[;\}\)\],]/)?E():E(Q)}function Me(f,h){return f==","?c(Ct):je(f,h,!1)}function je(f,h,C){var O=C==!1?Me:je,w=C==!1?Q:et;if(f=="=>")return c(st,C?Pe:we,Ee);if(f=="operator")return/\+\+|--/.test(h)||G&&h=="!"?c(O):G&&h=="<"&&k.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?c(fe(">"),Ue(be,">"),le,O):h=="?"?c(Q,pe(":"),w):c(w);if(f=="quasi")return E(dt,O);if(f!=";"){if(f=="(")return or(et,")","call",O);if(f==".")return c(rt,O);if(f=="[")return c(fe("]"),Ct,pe("]"),le,O);if(G&&h=="as")return k.marked="keyword",c(be,O);if(f=="regexp")return k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),c(w)}}function dt(f,h){return f!="quasi"?E():h.slice(h.length-2)!="${"?c(dt):c(Ct,Tt)}function Tt(f){if(f=="}")return k.marked="string-2",k.state.tokenize=se,c(dt)}function we(f){return me(k.stream,k.state),E(f=="{"?ke:Q)}function Pe(f){return me(k.stream,k.state),E(f=="{"?ke:et)}function b(f){return function(h){return h=="."?c(f?S:P):h=="variable"&&G?c(xt,f?je:Me):E(f?et:Q)}}function P(f,h){if(h=="target")return k.marked="keyword",c(Me)}function S(f,h){if(h=="target")return k.marked="keyword",c(je)}function Se(f){return f==":"?c(le,ke):E(Me,pe(";"),le)}function rt(f){if(f=="variable")return k.marked="property",c()}function Jt(f,h){if(f=="async")return k.marked="property",c(Jt);if(f=="variable"||k.style=="keyword"){if(k.marked="property",h=="get"||h=="set")return c(Yn);var C;return G&&k.state.fatArrowAt==k.stream.start&&(C=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+C[0].length),c(Zt)}else{if(f=="number"||f=="string")return k.marked=ne?"property":k.style+" property",c(Zt);if(f=="jsonld-keyword")return c(Zt);if(G&&xe(h))return k.marked="keyword",c(Jt);if(f=="[")return c(Q,ar,pe("]"),Zt);if(f=="spread")return c(et,Zt);if(h=="*")return k.marked="keyword",c(Jt);if(f==":")return E(Zt)}}function Yn(f){return f!="variable"?E(Zt):(k.marked="property",c(At))}function Zt(f){if(f==":")return c(et);if(f=="(")return E(At)}function Ue(f,h,C){function O(w,R){if(C?C.indexOf(w)>-1:w==","){var Ne=k.state.lexical;return Ne.info=="call"&&(Ne.pos=(Ne.pos||0)+1),c(function(Ye,pt){return Ye==h||pt==h?E():E(f)},O)}return w==h||R==h?c():C&&C.indexOf(";")>-1?E(f):c(pe(h))}return function(w,R){return w==h||R==h?c():E(f,O)}}function or(f,h,C){for(var O=3;O<arguments.length;O++)k.cc.push(arguments[O]);return c(fe(h,C),Ue(f,h),le)}function Kt(f){return f=="}"?c():E(ke,Kt)}function ar(f,h){if(G){if(f==":")return c(be);if(h=="?")return c(ar)}}function Sr(f,h){if(G&&(f==":"||h=="in"))return c(be)}function lr(f){if(G&&f==":")return k.stream.match(/^\s*\w+\s+is\b/,!1)?c(Q,Pi,be):c(be)}function Pi(f,h){if(h=="is")return k.marked="keyword",c()}function be(f,h){if(h=="keyof"||h=="typeof"||h=="infer"||h=="readonly")return k.marked="keyword",c(h=="typeof"?et:be);if(f=="variable"||h=="void")return k.marked="type",c(Ot);if(h=="|"||h=="&")return c(be);if(f=="string"||f=="number"||f=="atom")return c(Ot);if(f=="[")return c(fe("]"),Ue(be,"]",","),le,Ot);if(f=="{")return c(fe("}"),te,le,Ot);if(f=="(")return c(Ue(Be,")"),Jn,Ot);if(f=="<")return c(Ue(be,">"),be);if(f=="quasi")return E(nt,Ot)}function Jn(f){if(f=="=>")return c(be)}function te(f){return f.match(/[\}\)\]]/)?c():f==","||f==";"?c(te):E(Vt,te)}function Vt(f,h){if(f=="variable"||k.style=="keyword")return k.marked="property",c(Vt);if(h=="?"||f=="number"||f=="string")return c(Vt);if(f==":")return c(be);if(f=="[")return c(pe("variable"),Sr,pe("]"),Vt);if(f=="(")return E(fr,Vt);if(!f.match(/[;\}\)\],]/))return c()}function nt(f,h){return f!="quasi"?E():h.slice(h.length-2)!="${"?c(nt):c(be,Ie)}function Ie(f){if(f=="}")return k.marked="string-2",k.state.tokenize=se,c(nt)}function Be(f,h){return f=="variable"&&k.stream.match(/^\s*[?:]/,!1)||h=="?"?c(Be):f==":"?c(be):f=="spread"?c(Be):E(be)}function Ot(f,h){if(h=="<")return c(fe(">"),Ue(be,">"),le,Ot);if(h=="|"||f=="."||h=="&")return c(be);if(f=="[")return c(be,pe("]"),Ot);if(h=="extends"||h=="implements")return k.marked="keyword",c(be);if(h=="?")return c(be,pe(":"),be)}function xt(f,h){if(h=="<")return c(fe(">"),Ue(be,">"),le,Ot)}function Wt(){return E(be,it)}function it(f,h){if(h=="=")return c(be)}function Hr(f,h){return h=="enum"?(k.marked="keyword",c(Y)):E(ht,ar,Et,Wi)}function ht(f,h){if(G&&xe(h))return k.marked="keyword",c(ht);if(f=="variable")return N(h),c();if(f=="spread")return c(ht);if(f=="[")return or(pn,"]");if(f=="{")return or(sr,"}")}function sr(f,h){return f=="variable"&&!k.stream.match(/^\s*:/,!1)?(N(h),c(Et)):(f=="variable"&&(k.marked="property"),f=="spread"?c(ht):f=="}"?E():f=="["?c(Q,pe("]"),pe(":"),sr):c(pe(":"),ht,Et))}function pn(){return E(ht,Et)}function Et(f,h){if(h=="=")return c(et)}function Wi(f){if(f==",")return c(Hr)}function Ir(f,h){if(f=="keyword b"&&h=="else")return c(fe("form","else"),ke,le)}function Zn(f,h){if(h=="await")return c(Zn);if(f=="(")return c(fe(")"),vn,le)}function vn(f){return f=="var"?c(Hr,ur):f=="variable"?c(ur):E(ur)}function ur(f,h){return f==")"?c():f==";"?c(ur):h=="in"||h=="of"?(k.marked="keyword",c(Q,ur)):E(Q,ur)}function At(f,h){if(h=="*")return k.marked="keyword",c(At);if(f=="variable")return N(h),c(At);if(f=="(")return c(st,fe(")"),Ue(zt,")"),le,lr,ke,Ee);if(G&&h=="<")return c(fe(">"),Ue(Wt,">"),le,At)}function fr(f,h){if(h=="*")return k.marked="keyword",c(fr);if(f=="variable")return N(h),c(fr);if(f=="(")return c(st,fe(")"),Ue(zt,")"),le,lr,Ee);if(G&&h=="<")return c(fe(">"),Ue(Wt,">"),le,fr)}function Vn(f,h){if(f=="keyword"||f=="variable")return k.marked="type",c(Vn);if(h=="<")return c(fe(">"),Ue(Wt,">"),le)}function zt(f,h){return h=="@"&&c(Q,zt),f=="spread"?c(zt):G&&xe(h)?(k.marked="keyword",c(zt)):G&&f=="this"?c(ar,Et):E(ht,ar,Et)}function Ei(f,h){return f=="variable"?Br(f,h):Ft(f,h)}function Br(f,h){if(f=="variable")return N(h),c(Ft)}function Ft(f,h){if(h=="<")return c(fe(">"),Ue(Wt,">"),le,Ft);if(h=="extends"||h=="implements"||G&&f==",")return h=="implements"&&(k.marked="keyword"),c(G?be:Q,Ft);if(f=="{")return c(fe("}"),Ht,le)}function Ht(f,h){if(f=="async"||f=="variable"&&(h=="static"||h=="get"||h=="set"||G&&xe(h))&&k.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return k.marked="keyword",c(Ht);if(f=="variable"||k.style=="keyword")return k.marked="property",c(Cr,Ht);if(f=="number"||f=="string")return c(Cr,Ht);if(f=="[")return c(Q,ar,pe("]"),Cr,Ht);if(h=="*")return k.marked="keyword",c(Ht);if(G&&f=="(")return E(fr,Ht);if(f==";"||f==",")return c(Ht);if(f=="}")return c();if(h=="@")return c(Q,Ht)}function Cr(f,h){if(h=="!"||h=="?")return c(Cr);if(f==":")return c(be,Et);if(h=="=")return c(et);var C=k.state.lexical.prev,O=C&&C.info=="interface";return E(O?fr:At)}function Rr(f,h){return h=="*"?(k.marked="keyword",c(jr,pe(";"))):h=="default"?(k.marked="keyword",c(Q,pe(";"))):f=="{"?c(Ue(_r,"}"),jr,pe(";")):E(ke)}function _r(f,h){if(h=="as")return k.marked="keyword",c(pe("variable"));if(f=="variable")return E(et,_r)}function cr(f){return f=="string"?c():f=="("?E(Q):f=="."?E(Me):E(Kr,jt,jr)}function Kr(f,h){return f=="{"?or(Kr,"}"):(f=="variable"&&N(h),h=="*"&&(k.marked="keyword"),c(gn))}function jt(f){if(f==",")return c(Kr,jt)}function gn(f,h){if(h=="as")return k.marked="keyword",c(Kr)}function jr(f,h){if(h=="from")return k.marked="keyword",c(Q)}function Re(f){return f=="]"?c():E(Ue(et,"]"))}function Y(){return E(fe("form"),ht,pe("{"),fe("}"),Ue(Qt,"}"),le,le)}function Qt(){return E(ht,Et)}function mn(f,h){return f.lastType=="operator"||f.lastType==","||ce.test(h.charAt(0))||/[,.]/.test(h.charAt(0))}function Lt(f,h,C){return h.tokenize==T&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(h.lastType)||h.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(C||0)))}return{startState:function(f){var h={tokenize:T,lastType:"sof",cc:[],lexical:new ie((f||0)-j,0,"block",!1),localVars:ee.localVars,context:ee.localVars&&new Fe(null,null,!1),indented:f||0};return ee.globalVars&&typeof ee.globalVars=="object"&&(h.globalVars=ee.globalVars),h},token:function(f,h){if(f.sol()&&(h.lexical.hasOwnProperty("align")||(h.lexical.align=!1),h.indented=f.indentation(),me(f,h)),h.tokenize!=Z&&f.eatSpace())return null;var C=h.tokenize(f,h);return Ae=="comment"?C:(h.lastType=Ae=="operator"&&(Ce=="++"||Ce=="--")?"incdec":Ae,oe(h,C,Ae,Ce,f))},indent:function(f,h){if(f.tokenize==Z||f.tokenize==se)return y.Pass;if(f.tokenize!=T)return 0;var C=h&&h.charAt(0),O=f.lexical,w;if(!/^\s*else\b/.test(h))for(var R=f.cc.length-1;R>=0;--R){var Ne=f.cc[R];if(Ne==le)O=O.prev;else if(Ne!=Ir&&Ne!=Ee)break}for(;(O.type=="stat"||O.type=="form")&&(C=="}"||(w=f.cc[f.cc.length-1])&&(w==Me||w==je)&&!/^[,\.=+\-*:?[\(]/.test(h));)O=O.prev;ge&&O.type==")"&&O.prev.type=="stat"&&(O=O.prev);var Ye=O.type,pt=C==Ye;return Ye=="vardef"?O.indented+(f.lastType=="operator"||f.lastType==","?O.info.length+1:0):Ye=="form"&&C=="{"?O.indented:Ye=="form"?O.indented+j:Ye=="stat"?O.indented+(mn(f,h)?ge||j:0):O.info=="switch"&&!pt&&ee.doubleIndentSwitch!=!1?O.indented+(/^(?:case|default)\b/.test(h)?j:2*j):O.align?O.column+(pt?0:1):O.indented+(pt?0:j)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:A?null:"/*",blockCommentEnd:A?null:"*/",blockCommentContinue:A?null:" * ",lineComment:A?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:A?"json":"javascript",jsonldMode:ne,jsonMode:A,expressionAllowed:Lt,skipExpression:function(f){oe(f,"atom","atom","true",new y.StringStream("",2,null))}}}),y.registerHelper("wordChars","javascript",/[\w$]/),y.defineMIME("text/javascript","javascript"),y.defineMIME("text/ecmascript","javascript"),y.defineMIME("application/javascript","javascript"),y.defineMIME("application/x-javascript","javascript"),y.defineMIME("application/ecmascript","javascript"),y.defineMIME("application/json",{name:"javascript",json:!0}),y.defineMIME("application/x-json",{name:"javascript",json:!0}),y.defineMIME("application/manifest+json",{name:"javascript",json:!0}),y.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),y.defineMIME("text/typescript",{name:"javascript",typescript:!0}),y.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var zf=Ef.exports,Ff={exports:{}};(function(v,M){(function(y){y(Xn)})(function(y){y.defineMode("css",function(ie,z){var oe=z.inline;z.propertyKeywords||(z=y.resolveMode("text/css"));var k=ie.indentUnit,E=z.tokenHooks,c=z.documentTypes||{},B=z.mediaTypes||{},N=z.mediaFeatures||{},V=z.mediaValueKeywords||{},xe=z.propertyKeywords||{},Fe=z.nonStandardPropertyKeywords||{},Dt=z.fontProperties||{},Yt=z.counterDescriptors||{},st=z.colorKeywords||{},wt=z.valueKeywords||{},Ee=z.allowNested,fe=z.lineComment,le=z.supportsAtComponent===!0,pe=ie.highlightNonStandardPropertyKeywords!==!1,ke,he;function Q(b,P){return ke=P,b}function et(b,P){var S=b.next();if(E[S]){var Se=E[S](b,P);if(Se!==!1)return Se}if(S=="@")return b.eatWhile(/[\w\\\-]/),Q("def",b.current());if(S=="="||(S=="~"||S=="|")&&b.eat("="))return Q(null,"compare");if(S=='"'||S=="'")return P.tokenize=Pt(S),P.tokenize(b,P);if(S=="#")return b.eatWhile(/[\w\\\-]/),Q("atom","hash");if(S=="!")return b.match(/^\s*\w*/),Q("keyword","important");if(/\d/.test(S)||S=="."&&b.eat(/\d/))return b.eatWhile(/[\w.%]/),Q("number","unit");if(S==="-"){if(/[\d.]/.test(b.peek()))return b.eatWhile(/[\w.%]/),Q("number","unit");if(b.match(/^-[\w\\\-]*/))return b.eatWhile(/[\w\\\-]/),b.match(/^\s*:/,!1)?Q("variable-2","variable-definition"):Q("variable-2","variable");if(b.match(/^\w+-/))return Q("meta","meta")}else return/[,+>*\/]/.test(S)?Q(null,"select-op"):S=="."&&b.match(/^-?[_a-z][_a-z0-9-]*/i)?Q("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(S)?Q(null,S):b.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(b.current())&&(P.tokenize=ct),Q("variable callee","variable")):/[\w\\\-]/.test(S)?(b.eatWhile(/[\w\\\-]/),Q("property","word")):Q(null,null)}function Pt(b){return function(P,S){for(var Se=!1,rt;(rt=P.next())!=null;){if(rt==b&&!Se){b==")"&&P.backUp(1);break}Se=!Se&&rt=="\\"}return(rt==b||!Se&&b!=")")&&(S.tokenize=null),Q("string","string")}}function ct(b,P){return b.next(),b.match(/^\s*[\"\')]/,!1)?P.tokenize=null:P.tokenize=Pt(")"),Q(null,"(")}function Ct(b,P,S){this.type=b,this.indent=P,this.prev=S}function Me(b,P,S,Se){return b.context=new Ct(S,P.indentation()+(Se===!1?0:k),b.context),S}function je(b){return b.context.prev&&(b.context=b.context.prev),b.context.type}function dt(b,P,S){return Pe[S.context.type](b,P,S)}function Tt(b,P,S,Se){for(var rt=Se||1;rt>0;rt--)S.context=S.context.prev;return dt(b,P,S)}function we(b){var P=b.current().toLowerCase();wt.hasOwnProperty(P)?he="atom":st.hasOwnProperty(P)?he="keyword":he="variable"}var Pe={};return Pe.top=function(b,P,S){if(b=="{")return Me(S,P,"block");if(b=="}"&&S.context.prev)return je(S);if(le&&/@component/i.test(b))return Me(S,P,"atComponentBlock");if(/^@(-moz-)?document$/i.test(b))return Me(S,P,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(b))return Me(S,P,"atBlock");if(/^@(font-face|counter-style)/i.test(b))return S.stateArg=b,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(b))return"keyframes";if(b&&b.charAt(0)=="@")return Me(S,P,"at");if(b=="hash")he="builtin";else if(b=="word")he="tag";else{if(b=="variable-definition")return"maybeprop";if(b=="interpolation")return Me(S,P,"interpolation");if(b==":")return"pseudo";if(Ee&&b=="(")return Me(S,P,"parens")}return S.context.type},Pe.block=function(b,P,S){if(b=="word"){var Se=P.current().toLowerCase();return xe.hasOwnProperty(Se)?(he="property","maybeprop"):Fe.hasOwnProperty(Se)?(he=pe?"string-2":"property","maybeprop"):Ee?(he=P.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(he+=" error","maybeprop")}else return b=="meta"?"block":!Ee&&(b=="hash"||b=="qualifier")?(he="error","block"):Pe.top(b,P,S)},Pe.maybeprop=function(b,P,S){return b==":"?Me(S,P,"prop"):dt(b,P,S)},Pe.prop=function(b,P,S){if(b==";")return je(S);if(b=="{"&&Ee)return Me(S,P,"propBlock");if(b=="}"||b=="{")return Tt(b,P,S);if(b=="(")return Me(S,P,"parens");if(b=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(P.current()))he+=" error";else if(b=="word")we(P);else if(b=="interpolation")return Me(S,P,"interpolation");return"prop"},Pe.propBlock=function(b,P,S){return b=="}"?je(S):b=="word"?(he="property","maybeprop"):S.context.type},Pe.parens=function(b,P,S){return b=="{"||b=="}"?Tt(b,P,S):b==")"?je(S):b=="("?Me(S,P,"parens"):b=="interpolation"?Me(S,P,"interpolation"):(b=="word"&&we(P),"parens")},Pe.pseudo=function(b,P,S){return b=="meta"?"pseudo":b=="word"?(he="variable-3",S.context.type):dt(b,P,S)},Pe.documentTypes=function(b,P,S){return b=="word"&&c.hasOwnProperty(P.current())?(he="tag",S.context.type):Pe.atBlock(b,P,S)},Pe.atBlock=function(b,P,S){if(b=="(")return Me(S,P,"atBlock_parens");if(b=="}"||b==";")return Tt(b,P,S);if(b=="{")return je(S)&&Me(S,P,Ee?"block":"top");if(b=="interpolation")return Me(S,P,"interpolation");if(b=="word"){var Se=P.current().toLowerCase();Se=="only"||Se=="not"||Se=="and"||Se=="or"?he="keyword":B.hasOwnProperty(Se)?he="attribute":N.hasOwnProperty(Se)?he="property":V.hasOwnProperty(Se)?he="keyword":xe.hasOwnProperty(Se)?he="property":Fe.hasOwnProperty(Se)?he=pe?"string-2":"property":wt.hasOwnProperty(Se)?he="atom":st.hasOwnProperty(Se)?he="keyword":he="error"}return S.context.type},Pe.atComponentBlock=function(b,P,S){return b=="}"?Tt(b,P,S):b=="{"?je(S)&&Me(S,P,Ee?"block":"top",!1):(b=="word"&&(he="error"),S.context.type)},Pe.atBlock_parens=function(b,P,S){return b==")"?je(S):b=="{"||b=="}"?Tt(b,P,S,2):Pe.atBlock(b,P,S)},Pe.restricted_atBlock_before=function(b,P,S){return b=="{"?Me(S,P,"restricted_atBlock"):b=="word"&&S.stateArg=="@counter-style"?(he="variable","restricted_atBlock_before"):dt(b,P,S)},Pe.restricted_atBlock=function(b,P,S){return b=="}"?(S.stateArg=null,je(S)):b=="word"?(S.stateArg=="@font-face"&&!Dt.hasOwnProperty(P.current().toLowerCase())||S.stateArg=="@counter-style"&&!Yt.hasOwnProperty(P.current().toLowerCase())?he="error":he="property","maybeprop"):"restricted_atBlock"},Pe.keyframes=function(b,P,S){return b=="word"?(he="variable","keyframes"):b=="{"?Me(S,P,"top"):dt(b,P,S)},Pe.at=function(b,P,S){return b==";"?je(S):b=="{"||b=="}"?Tt(b,P,S):(b=="word"?he="tag":b=="hash"&&(he="builtin"),"at")},Pe.interpolation=function(b,P,S){return b=="}"?je(S):b=="{"||b==";"?Tt(b,P,S):(b=="word"?he="variable":b!="variable"&&b!="("&&b!=")"&&(he="error"),"interpolation")},{startState:function(b){return{tokenize:null,state:oe?"block":"top",stateArg:null,context:new Ct(oe?"block":"top",b||0,null)}},token:function(b,P){if(!P.tokenize&&b.eatSpace())return null;var S=(P.tokenize||et)(b,P);return S&&typeof S=="object"&&(ke=S[1],S=S[0]),he=S,ke!="comment"&&(P.state=Pe[P.state](ke,b,P)),he},indent:function(b,P){var S=b.context,Se=P&&P.charAt(0),rt=S.indent;return S.type=="prop"&&(Se=="}"||Se==")")&&(S=S.prev),S.prev&&(Se=="}"&&(S.type=="block"||S.type=="top"||S.type=="interpolation"||S.type=="restricted_atBlock")?(S=S.prev,rt=S.indent):(Se==")"&&(S.type=="parens"||S.type=="atBlock_parens")||Se=="{"&&(S.type=="at"||S.type=="atBlock"))&&(rt=Math.max(0,S.indent-k))),rt},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:fe,fold:"brace"}});function I(ie){for(var z={},oe=0;oe<ie.length;++oe)z[ie[oe].toLowerCase()]=!0;return z}var ee=["domain","regexp","url","url-prefix"],j=I(ee),ge=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],ne=I(ge),A=["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"],X=I(A),G=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],J=I(G),U=["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"],ce=I(U),ue=["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"],Le=I(ue),Ae=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],Ce=I(Ae),q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],T=I(q),W=["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"],Z=I(W),se=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],ye=I(se),me=ee.concat(ge).concat(A).concat(G).concat(U).concat(ue).concat(W).concat(se);y.registerHelper("hintWords","css",me);function Te(ie,z){for(var oe=!1,k;(k=ie.next())!=null;){if(oe&&k=="/"){z.tokenize=null;break}oe=k=="*"}return["comment","comment"]}y.defineMIME("text/css",{documentTypes:j,mediaTypes:ne,mediaFeatures:X,mediaValueKeywords:J,propertyKeywords:ce,nonStandardPropertyKeywords:Le,fontProperties:Ce,counterDescriptors:T,colorKeywords:Z,valueKeywords:ye,tokenHooks:{"/":function(ie,z){return ie.eat("*")?(z.tokenize=Te,Te(ie,z)):!1}},name:"css"}),y.defineMIME("text/x-scss",{mediaTypes:ne,mediaFeatures:X,mediaValueKeywords:J,propertyKeywords:ce,nonStandardPropertyKeywords:Le,colorKeywords:Z,valueKeywords:ye,fontProperties:Ce,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ie,z){return ie.eat("/")?(ie.skipToEnd(),["comment","comment"]):ie.eat("*")?(z.tokenize=Te,Te(ie,z)):["operator","operator"]},":":function(ie){return ie.match(/^\s*\{/,!1)?[null,null]:!1},$:function(ie){return ie.match(/^[\w-]+/),ie.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(ie){return ie.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),y.defineMIME("text/x-less",{mediaTypes:ne,mediaFeatures:X,mediaValueKeywords:J,propertyKeywords:ce,nonStandardPropertyKeywords:Le,colorKeywords:Z,valueKeywords:ye,fontProperties:Ce,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ie,z){return ie.eat("/")?(ie.skipToEnd(),["comment","comment"]):ie.eat("*")?(z.tokenize=Te,Te(ie,z)):["operator","operator"]},"@":function(ie){return ie.eat("{")?[null,"interpolation"]:ie.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(ie.eatWhile(/[\w\\\-]/),ie.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),y.defineMIME("text/x-gss",{documentTypes:j,mediaTypes:ne,mediaFeatures:X,propertyKeywords:ce,nonStandardPropertyKeywords:Le,fontProperties:Ce,counterDescriptors:T,colorKeywords:Z,valueKeywords:ye,supportsAtComponent:!0,tokenHooks:{"/":function(ie,z){return ie.eat("*")?(z.tokenize=Te,Te(ie,z)):!1}},name:"css",helperType:"gss"})})})();var Hf=Ff.exports,jl={exports:{}},Ul;function If(){return Ul||(Ul=1,function(v,M){(function(y){y(Xn)})(function(y){var I={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},ee={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};y.defineMode("xml",function(j,ge){var ne=j.indentUnit,A={},X=ge.htmlMode?I:ee;for(var G in X)A[G]=X[G];for(var G in ge)A[G]=ge[G];var J,U;function ce(c,B){function N(Fe){return B.tokenize=Fe,Fe(c,B)}var V=c.next();if(V=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?N(Ae("atom","]]>")):null:c.match("--")?N(Ae("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),N(Ce(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),B.tokenize=Ae("meta","?>"),"meta"):(J=c.eat("/")?"closeTag":"openTag",B.tokenize=ue,"tag bracket");if(V=="&"){var xe;return c.eat("#")?c.eat("x")?xe=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):xe=c.eatWhile(/[\d]/)&&c.eat(";"):xe=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),xe?"atom":"error"}else return c.eatWhile(/[^&<]/),null}ce.isInText=!0;function ue(c,B){var N=c.next();if(N==">"||N=="/"&&c.eat(">"))return B.tokenize=ce,J=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return J="equals",null;if(N=="<"){B.tokenize=ce,B.state=se,B.tagName=B.tagStart=null;var V=B.tokenize(c,B);return V?V+" tag error":"tag error"}else return/[\'\"]/.test(N)?(B.tokenize=Le(N),B.stringStartCol=c.column(),B.tokenize(c,B)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Le(c){var B=function(N,V){for(;!N.eol();)if(N.next()==c){V.tokenize=ue;break}return"string"};return B.isInAttribute=!0,B}function Ae(c,B){return function(N,V){for(;!N.eol();){if(N.match(B)){V.tokenize=ce;break}N.next()}return c}}function Ce(c){return function(B,N){for(var V;(V=B.next())!=null;){if(V=="<")return N.tokenize=Ce(c+1),N.tokenize(B,N);if(V==">")if(c==1){N.tokenize=ce;break}else return N.tokenize=Ce(c-1),N.tokenize(B,N)}return"meta"}}function q(c){return c&&c.toLowerCase()}function T(c,B,N){this.prev=c.context,this.tagName=B||"",this.indent=c.indented,this.startOfLine=N,(A.doNotIndent.hasOwnProperty(B)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function W(c){c.context&&(c.context=c.context.prev)}function Z(c,B){for(var N;;){if(!c.context||(N=c.context.tagName,!A.contextGrabbers.hasOwnProperty(q(N))||!A.contextGrabbers[q(N)].hasOwnProperty(q(B))))return;W(c)}}function se(c,B,N){return c=="openTag"?(N.tagStart=B.column(),ye):c=="closeTag"?me:se}function ye(c,B,N){return c=="word"?(N.tagName=B.current(),U="tag",z):A.allowMissingTagName&&c=="endTag"?(U="tag bracket",z(c,B,N)):(U="error",ye)}function me(c,B,N){if(c=="word"){var V=B.current();return N.context&&N.context.tagName!=V&&A.implicitlyClosed.hasOwnProperty(q(N.context.tagName))&&W(N),N.context&&N.context.tagName==V||A.matchClosing===!1?(U="tag",Te):(U="tag error",ie)}else return A.allowMissingTagName&&c=="endTag"?(U="tag bracket",Te(c,B,N)):(U="error",ie)}function Te(c,B,N){return c!="endTag"?(U="error",Te):(W(N),se)}function ie(c,B,N){return U="error",Te(c,B,N)}function z(c,B,N){if(c=="word")return U="attribute",oe;if(c=="endTag"||c=="selfcloseTag"){var V=N.tagName,xe=N.tagStart;return N.tagName=N.tagStart=null,c=="selfcloseTag"||A.autoSelfClosers.hasOwnProperty(q(V))?Z(N,V):(Z(N,V),N.context=new T(N,V,xe==N.indented)),se}return U="error",z}function oe(c,B,N){return c=="equals"?k:(A.allowMissing||(U="error"),z(c,B,N))}function k(c,B,N){return c=="string"?E:c=="word"&&A.allowUnquoted?(U="string",z):(U="error",z(c,B,N))}function E(c,B,N){return c=="string"?E:z(c,B,N)}return{startState:function(c){var B={tokenize:ce,state:se,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(B.baseIndent=c),B},token:function(c,B){if(!B.tagName&&c.sol()&&(B.indented=c.indentation()),c.eatSpace())return null;J=null;var N=B.tokenize(c,B);return(N||J)&&N!="comment"&&(U=null,B.state=B.state(J||N,c,B),U&&(N=U=="error"?N+" error":U)),N},indent:function(c,B,N){var V=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+ne;if(V&&V.noIndent)return y.Pass;if(c.tokenize!=ue&&c.tokenize!=ce)return N?N.match(/^(\s*)/)[0].length:0;if(c.tagName)return A.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+ne*(A.multilineTagIndentFactor||1);if(A.alignCDATA&&/<!\[CDATA\[/.test(B))return 0;var xe=B&&/^<(\/)?([\w_:\.-]*)/.exec(B);if(xe&&xe[1])for(;V;)if(V.tagName==xe[2]){V=V.prev;break}else if(A.implicitlyClosed.hasOwnProperty(q(V.tagName)))V=V.prev;else break;else if(xe)for(;V;){var Fe=A.contextGrabbers[q(V.tagName)];if(Fe&&Fe.hasOwnProperty(q(xe[2])))V=V.prev;else break}for(;V&&V.prev&&!V.startOfLine;)V=V.prev;return V?V.indent+ne:c.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:A.htmlMode?"html":"xml",helperType:A.htmlMode?"html":"xml",skipAttribute:function(c){c.state==k&&(c.state=z)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var B=[],N=c.context;N;N=N.prev)B.push(N.tagName);return B.reverse()}}}),y.defineMIME("text/xml","xml"),y.defineMIME("application/xml","xml"),y.mimeModes.hasOwnProperty("text/html")||y.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),jl.exports}(function(v,M){(function(y){y(Xn,If(),zf,Hf)})(function(y){var I={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 ee(J,U,ce){var ue=J.current(),Le=ue.search(U);return Le>-1?J.backUp(ue.length-Le):ue.match(/<\/?$/)&&(J.backUp(ue.length),J.match(U,!1)||J.match(ue)),ce}var j={};function ge(J){var U=j[J];return U||(j[J]=new RegExp("\\s+"+J+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function ne(J,U){var ce=J.match(ge(U));return ce?/^\s*(.*?)\s*$/.exec(ce[2])[1]:""}function A(J,U){return new RegExp((U?"^":"")+"</\\s*"+J+"\\s*>","i")}function X(J,U){for(var ce in J)for(var ue=U[ce]||(U[ce]=[]),Le=J[ce],Ae=Le.length-1;Ae>=0;Ae--)ue.unshift(Le[Ae])}function G(J,U){for(var ce=0;ce<J.length;ce++){var ue=J[ce];if(!ue[0]||ue[1].test(ne(U,ue[0])))return ue[2]}}y.defineMode("htmlmixed",function(J,U){var ce=y.getMode(J,{name:"xml",htmlMode:!0,multilineTagIndentFactor:U.multilineTagIndentFactor,multilineTagIndentPastTag:U.multilineTagIndentPastTag,allowMissingTagName:U.allowMissingTagName}),ue={},Le=U&&U.tags,Ae=U&&U.scriptTypes;if(X(I,ue),Le&&X(Le,ue),Ae)for(var Ce=Ae.length-1;Ce>=0;Ce--)ue.script.unshift(["type",Ae[Ce].matches,Ae[Ce].mode]);function q(T,W){var Z=ce.token(T,W.htmlState),se=/\btag\b/.test(Z),ye;if(se&&!/[<>\s\/]/.test(T.current())&&(ye=W.htmlState.tagName&&W.htmlState.tagName.toLowerCase())&&ue.hasOwnProperty(ye))W.inTag=ye+" ";else if(W.inTag&&se&&/>$/.test(T.current())){var me=/^([\S]+) (.*)/.exec(W.inTag);W.inTag=null;var Te=T.current()==">"&&G(ue[me[1]],me[2]),ie=y.getMode(J,Te),z=A(me[1],!0),oe=A(me[1],!1);W.token=function(k,E){return k.match(z,!1)?(E.token=q,E.localState=E.localMode=null,null):ee(k,oe,E.localMode.token(k,E.localState))},W.localMode=ie,W.localState=y.startState(ie,ce.indent(W.htmlState,"",""))}else W.inTag&&(W.inTag+=T.current(),T.eol()&&(W.inTag+=" "));return Z}return{startState:function(){var T=y.startState(ce);return{token:q,inTag:null,localMode:null,localState:null,htmlState:T}},copyState:function(T){var W;return T.localState&&(W=y.copyState(T.localMode,T.localState)),{token:T.token,inTag:T.inTag,localMode:T.localMode,localState:W,htmlState:y.copyState(ce,T.htmlState)}},token:function(T,W){return W.token(T,W)},indent:function(T,W,Z){return!T.localMode||/^\s*<\//.test(W)?ce.indent(T.htmlState,W,Z):T.localMode.indent?T.localMode.indent(T.localState,W,Z):y.Pass},innerMode:function(T){return{state:T.localState||T.htmlState,mode:T.localMode||ce}}}},"xml","javascript","css"),y.defineMIME("text/html","htmlmixed")})})();const Bf=qn({__name:"CodeMirror",props:{mode:{type:String,default:hn.JSON,validator(v){return Object.values(hn).includes(v)}},value:{type:String,default:""},readonly:{type:Boolean,default:!1}},emits:["change"],setup(v,{emit:M}){const y=v,I=M,ee=dn();let j;const ge=pf(X,100),ne=vf();Do(()=>y.value,J=>zr(this,null,function*(){yield _l();const U=j==null?void 0:j.getValue();J!==U&&(j==null||j.setValue(J||""))}),{flush:"post"}),Vl(()=>{j==null||j.setOption("mode",y.mode)}),Do(()=>ne.getDarkMode,()=>zr(this,null,function*(){A()}),{immediate:!0});function A(){var J;(J=lt(j))==null||J.setOption("theme",ne.getDarkMode==="light"?"idea":"material-palenight")}function X(){j==null||j.refresh()}function G(){return zr(this,null,function*(){const J={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers"]};j=Wf(ee.value,xr({value:"",mode:y.mode,readOnly:y.readonly,tabSize:2,theme:"material-palenight",lineWrapping:!0,lineNumbers:!0},J)),j==null||j.setValue(y.value),A(),j==null||j.on("change",()=>{I("change",j==null?void 0:j.getValue())})})}return kf(()=>zr(this,null,function*(){yield _l(),G(),Nf(ge)})),Sf(()=>{j=null}),(J,U)=>(Gn(),Ql("div",{class:"relative !h-full w-full overflow-hidden",ref_key:"el",ref:ee},null,512))}}),Rf={class:"h-full"},_f=qn({__name:"CodeEditor",props:{value:{type:[Object,String]},mode:{type:String,default:hn.JSON,validator(v){return Object.values(hn).includes(v)}},readonly:{type:Boolean},autoFormat:{type:Boolean,default:!0}},emits:["change","update:value","format-error"],setup(v,{emit:M}){const y=v,I=M,ee=Ho(()=>{const{value:ge,mode:ne,autoFormat:A}=y;if(!A||ne!==hn.JSON)return ge;let X=ge;if(gf(ge))try{X=JSON.parse(ge)}catch(G){return I("format-error",ge),ge}return JSON.stringify(X,null,2)});function j(ge){I("update:value",ge),I("change",ge)}return(ge,ne)=>(Gn(),Ql("div",Rf,[kr(Bf,{value:ee.value,onChange:j,mode:v.mode,readonly:v.readonly},null,8,["value","mode","readonly"])]))}});var Oi={d:(v,M)=>{for(var y in M)Oi.o(M,y)&&!Oi.o(v,y)&&Object.defineProperty(v,y,{enumerable:!0,get:M[y]})},o:(v,M)=>Object.prototype.hasOwnProperty.call(v,M)},es={};function Eo(v,M){(M==null||M>v.length)&&(M=v.length);for(var y=0,I=new Array(M);y<M;y++)I[y]=v[y];return I}function ts(v,M){if(v){if(typeof v=="string")return Eo(v,M);var y=Object.prototype.toString.call(v).slice(8,-1);return y==="Object"&&v.constructor&&(y=v.constructor.name),y==="Map"||y==="Set"?Array.from(v):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?Eo(v,M):void 0}}function Ai(v){return function(M){if(Array.isArray(M))return Eo(M)}(v)||function(M){if(typeof Symbol!="undefined"&&M[Symbol.iterator]!=null||M["@@iterator"]!=null)return Array.from(M)}(v)||ts(v)||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 Di(v,M,y){return M in v?Object.defineProperty(v,M,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[M]=y,v}Oi.d(es,{Z:()=>qf});const ae=(Gl={computed:()=>Ho,createTextVNode:()=>Po,createVNode:()=>kr,defineComponent:()=>qn,reactive:()=>Cf,ref:()=>dn,watch:()=>Do,watchEffect:()=>Vl},Ao={},Oi.d(Ao,Gl),Ao),Kf=(0,ae.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var v=this.data,M=this.onClick;return(0,ae.createVNode)("span",{class:"vjs-tree-brackets",onClick:M},[v])}}),jf=(0,ae.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(v,M){var y=M.emit;return{uiType:(0,ae.computed)(function(){return v.isMultiple?"checkbox":"radio"}),model:(0,ae.computed)({get:function(){return v.checked},set:function(I){return y("update:modelValue",I)}})}},render:function(){var v=this.uiType,M=this.model,y=this.$emit;return(0,ae.createVNode)("label",{class:["vjs-check-controller",M?"is-checked":""],onClick:function(I){return I.stopPropagation()}},[(0,ae.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(v)},null),(0,ae.createVNode)("input",{checked:M,class:"vjs-check-controller-original is-".concat(v),type:v,onChange:function(){return y("change",M)}},null)])}}),Uf=(0,ae.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var v=this.nodeType,M=this.onClick,y=v==="objectStart"||v==="arrayStart";return y||v==="objectCollapsed"||v==="arrayCollapsed"?(0,ae.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(y?"open":"close"),onClick:M},[(0,ae.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,ae.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 Gl,Ao;function zo(v){return zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},zo(v)}function rs(v){return Object.prototype.toString.call(v).slice(8,-1).toLowerCase()}function Fr(v){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,I=arguments.length>3?arguments[3]:void 0,ee=I||{},j=ee.key,ge=ee.index,ne=ee.type,A=ne===void 0?"content":ne,X=ee.showComma,G=X!==void 0&&X,J=ee.length,U=J===void 0?1:J,ce=rs(v);if(ce==="array"){var ue=ql(v.map(function(Ce,q,T){return Fr(Ce,"".concat(M,"[").concat(q,"]"),y+1,{index:q,showComma:q!==T.length-1,length:U,type:A})}));return[Fr("[",M,y,{showComma:!1,key:j,length:v.length,type:"arrayStart"})[0]].concat(ue,Fr("]",M,y,{showComma:G,length:v.length,type:"arrayEnd"})[0])}if(ce==="object"){var Le=Object.keys(v),Ae=ql(Le.map(function(Ce,q,T){return Fr(v[Ce],/^[a-zA-Z_]\w*$/.test(Ce)?"".concat(M,".").concat(Ce):"".concat(M,'["').concat(Ce,'"]'),y+1,{key:Ce,showComma:q!==T.length-1,length:U,type:A})}));return[Fr("{",M,y,{showComma:!1,key:j,index:ge,length:Le.length,type:"objectStart"})[0]].concat(Ae,Fr("}",M,y,{showComma:G,length:Le.length,type:"objectEnd"})[0])}return[{content:v,level:y,key:j,index:ge,path:M,showComma:G,length:U,type:A}]}function ql(v){if(typeof Array.prototype.flat=="function")return v.flat();for(var M=Ai(v),y=[];M.length;){var I=M.shift();Array.isArray(I)?M.unshift.apply(M,Ai(I)):y.push(I)}return y}function Fo(v){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(v==null)return v;if(v instanceof Date)return new Date(v);if(v instanceof RegExp)return new RegExp(v);if(zo(v)!=="object")return v;if(M.get(v))return M.get(v);if(Array.isArray(v)){var y=v.map(function(j){return Fo(j,M)});return M.set(v,y),y}var I={};for(var ee in v)I[ee]=Fo(v[ee],M);return M.set(v,I),I}function Xl(v,M){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(v);M&&(I=I.filter(function(ee){return Object.getOwnPropertyDescriptor(v,ee).enumerable})),y.push.apply(y,I)}return y}function Yl(v){for(var M=1;M<arguments.length;M++){var y=arguments[M]!=null?arguments[M]:{};M%2?Xl(Object(y),!0).forEach(function(I){Di(v,I,y[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):Xl(Object(y)).forEach(function(I){Object.defineProperty(v,I,Object.getOwnPropertyDescriptor(y,I))})}return v}var ns={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 Gf=(0,ae.defineComponent)({name:"TreeNode",props:Yl(Yl({},ns),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(v,M){var y=M.emit,I=(0,ae.computed)(function(){return rs(v.node.content)}),ee=(0,ae.computed)(function(){return"vjs-value vjs-value-".concat(I.value)}),j=(0,ae.computed)(function(){return v.showDoubleQuotes?'"'.concat(v.node.key,'"'):v.node.key}),ge=(0,ae.computed)(function(){return v.selectableType==="multiple"}),ne=(0,ae.computed)(function(){return v.selectableType==="single"}),A=(0,ae.computed)(function(){return v.nodeSelectable(v.node)&&(ge.value||ne.value)}),X=(0,ae.reactive)({editing:!1}),G=function(q){var T,W,Z=(W=(T=q.target)===null||T===void 0?void 0:T.value)==="null"?null:W==="undefined"?void 0:W==="true"||W!=="false"&&(W[0]+W[W.length-1]==='""'||W[0]+W[W.length-1]==="''"?W.slice(1,-1):typeof Number(W)=="number"&&!isNaN(Number(W))||W==="NaN"?Number(W):W);y("valueChange",Z,v.node.path)},J=(0,ae.computed)(function(){var q,T=(q=v.node)===null||q===void 0?void 0:q.content;return T===null?T="null":T===void 0&&(T="undefined"),I.value==="string"?'"'.concat(T,'"'):T+""}),U=function(){var q=v.renderNodeValue;return q?q({node:v.node,defaultValue:J.value}):J.value},ce=function(){y("bracketsClick",!v.collapsed,v.node)},ue=function(){y("iconClick",!v.collapsed,v.node)},Le=function(){y("selectedChange",v.node)},Ae=function(){y("nodeClick",v.node),A.value&&v.selectOnClickNode&&y("selectedChange",v.node)},Ce=function(q){if(v.editable&&!X.editing){X.editing=!0;var T=function W(Z){var se;Z.target!==q.target&&((se=Z.target)===null||se===void 0?void 0:se.parentElement)!==q.target&&(X.editing=!1,document.removeEventListener("click",W))};document.removeEventListener("click",T),document.addEventListener("click",T)}};return function(){var q,T=v.node;return(0,ae.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":v.showSelectController,"has-carets":v.showIcon,"is-highlight":v.highlightSelectedNode&&v.checked,dark:v.theme==="dark"},onClick:Ae,style:v.style},[v.showLineNumber&&(0,ae.createVNode)("span",{class:"vjs-node-index"},[T.id+1]),v.showSelectController&&A.value&&T.type!=="objectEnd"&&T.type!=="arrayEnd"&&(0,ae.createVNode)(jf,{isMultiple:ge.value,checked:v.checked,onChange:Le},null),(0,ae.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(T.level)).map(function(W,Z){return(0,ae.createVNode)("div",{key:Z,class:{"vjs-indent-unit":!0,"has-line":v.showLine}},null)}),v.showIcon&&(0,ae.createVNode)(Uf,{nodeType:T.type,onClick:ue},null)]),T.key&&(0,ae.createVNode)("span",{class:"vjs-key"},[(q=v.renderNodeKey,q?q({node:v.node,defaultKey:j.value||""}):j.value),(0,ae.createVNode)("span",{class:"vjs-colon"},[":".concat(v.showKeyValueSpace?" ":"")])]),(0,ae.createVNode)("span",null,[T.type!=="content"&&T.content?(0,ae.createVNode)(Kf,{data:T.content.toString(),onClick:ce},null):(0,ae.createVNode)("span",{class:ee.value,onClick:!v.editable||v.editableTrigger&&v.editableTrigger!=="click"?void 0:Ce,onDblclick:v.editable&&v.editableTrigger==="dblclick"?Ce:void 0},[v.editable&&X.editing?(0,ae.createVNode)("input",{value:J.value,onChange:G,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):U()]),T.showComma&&(0,ae.createVNode)("span",null,[","]),v.showLength&&v.collapsed&&(0,ae.createVNode)("span",{class:"vjs-comment"},[(0,ae.createTextVNode)(" // "),T.length,(0,ae.createTextVNode)(" items ")])])])}}});function Jl(v,M){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(v);M&&(I=I.filter(function(ee){return Object.getOwnPropertyDescriptor(v,ee).enumerable})),y.push.apply(y,I)}return y}function Nt(v){for(var M=1;M<arguments.length;M++){var y=arguments[M]!=null?arguments[M]:{};M%2?Jl(Object(y),!0).forEach(function(I){Di(v,I,y[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):Jl(Object(y)).forEach(function(I){Object.defineProperty(v,I,Object.getOwnPropertyDescriptor(y,I))})}return v}const qf=(0,ae.defineComponent)({name:"Tree",props:Nt(Nt({},ns),{},{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(v,M){var y=M.emit,I=M.slots,ee=(0,ae.ref)(),j=(0,ae.computed)(function(){return Fr(v.data,v.rootPath)}),ge=function(T,W){return j.value.reduce(function(Z,se){var ye,me=se.level>=T||se.length>=W,Te=(ye=v.pathCollapsible)===null||ye===void 0?void 0:ye.call(v,se);return se.type!=="objectStart"&&se.type!=="arrayStart"||!me&&!Te?Z:Nt(Nt({},Z),{},Di({},se.path,1))},{})},ne=(0,ae.reactive)({translateY:0,visibleData:null,hiddenPaths:ge(v.deep,v.collapsedNodeLength)}),A=(0,ae.computed)(function(){for(var T=null,W=[],Z=j.value.length,se=0;se<Z;se++){var ye=Nt(Nt({},j.value[se]),{},{id:se}),me=ne.hiddenPaths[ye.path];if(T&&T.path===ye.path){var Te=T.type==="objectStart",ie=Nt(Nt(Nt({},ye),T),{},{showComma:ye.showComma,content:Te?"{...}":"[...]",type:Te?"objectCollapsed":"arrayCollapsed"});T=null,W.push(ie)}else{if(me&&!T){T=ye;continue}if(T)continue;W.push(ye)}}return W}),X=(0,ae.computed)(function(){var T=v.selectedValue;return T&&v.selectableType==="multiple"&&Array.isArray(T)?T:[T]}),G=(0,ae.computed)(function(){return!v.selectableType||v.selectOnClickNode||v.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 T=A.value;if(v.virtual){var W,Z=v.height/v.itemHeight,se=((W=ee.value)===null||W===void 0?void 0:W.scrollTop)||0,ye=Math.floor(se/v.itemHeight),me=ye<0?0:ye+Z>T.length?T.length-Z:ye;me<0&&(me=0);var Te=me+Z;ne.translateY=me*v.itemHeight,ne.visibleData=T.filter(function(ie,z){return z>=me&&z<Te})}else ne.visibleData=T},U=function(){J()},ce=function(T){var W,Z,se=T.path,ye=v.selectableType;if(ye==="multiple"){var me=X.value.findIndex(function(oe){return oe===se}),Te=Ai(X.value);me!==-1?Te.splice(me,1):Te.push(se),y("update:selectedValue",Te),y("selectedChange",Te,Ai(X.value))}else if(ye==="single"&&X.value[0]!==se){var ie=(W=X.value,Z=1,function(oe){if(Array.isArray(oe))return oe}(W)||function(oe,k){var E=oe==null?null:typeof Symbol!="undefined"&&oe[Symbol.iterator]||oe["@@iterator"];if(E!=null){var c,B,N=[],V=!0,xe=!1;try{for(E=E.call(oe);!(V=(c=E.next()).done)&&(N.push(c.value),!k||N.length!==k);V=!0);}catch(Fe){xe=!0,B=Fe}finally{try{V||E.return==null||E.return()}finally{if(xe)throw B}}return N}}(W,Z)||ts(W,Z)||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],z=se;y("update:selectedValue",z),y("selectedChange",z,ie)}},ue=function(T){y("nodeClick",T)},Le=function(T,W){if(T)ne.hiddenPaths=Nt(Nt({},ne.hiddenPaths),{},Di({},W,1));else{var Z=Nt({},ne.hiddenPaths);delete Z[W],ne.hiddenPaths=Z}},Ae=function(T,W){v.collapsedOnClickBrackets&&Le(T,W.path),y("bracketsClick",T,W)},Ce=function(T,W){Le(T,W.path),y("iconClick",T,W)},q=function(T,W){var Z=Fo(v.data),se=v.rootPath;new Function("data","val","data".concat(W.slice(se.length),"=val"))(Z,T),y("update:data",Z)};return(0,ae.watchEffect)(function(){G.value&&function(T){throw new Error("[VueJSONPretty] ".concat(T))}(G.value)}),(0,ae.watchEffect)(function(){A.value&&J()}),(0,ae.watch)(function(){return v.deep},function(T){T&&(ne.hiddenPaths=ge(T,v.collapsedNodeLength))}),(0,ae.watch)(function(){return v.collapsedNodeLength},function(T){T&&(ne.hiddenPaths=ge(v.deep,T))}),function(){var T,W,Z=(T=v.renderNodeKey)!==null&&T!==void 0?T:I.renderNodeKey,se=(W=v.renderNodeValue)!==null&&W!==void 0?W:I.renderNodeValue,ye=ne.visibleData&&ne.visibleData.map(function(me){return(0,ae.createVNode)(Gf,{key:me.id,node:me,collapsed:!!ne.hiddenPaths[me.path],theme:v.theme,showDoubleQuotes:v.showDoubleQuotes,showLength:v.showLength,checked:X.value.includes(me.path),selectableType:v.selectableType,showLine:v.showLine,showLineNumber:v.showLineNumber,showSelectController:v.showSelectController,selectOnClickNode:v.selectOnClickNode,nodeSelectable:v.nodeSelectable,highlightSelectedNode:v.highlightSelectedNode,editable:v.editable,editableTrigger:v.editableTrigger,showIcon:v.showIcon,showKeyValueSpace:v.showKeyValueSpace,renderNodeKey:Z,renderNodeValue:se,onNodeClick:ue,onBracketsClick:Ae,onIconClick:Ce,onSelectedChange:ce,onValueChange:q,style:v.itemHeight&&v.itemHeight!==20?{lineHeight:"".concat(v.itemHeight,"px")}:{}},null)});return(0,ae.createVNode)("div",{ref:ee,class:{"vjs-tree":!0,"is-virtual":v.virtual,dark:v.theme==="dark"},onScroll:v.virtual?U:void 0,style:v.showLineNumber?Nt({paddingLeft:"".concat(12*Number(j.value.length.toString().length),"px")},v.style):v.style},[v.virtual?(0,ae.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(v.height,"px")}},[(0,ae.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(A.value.length*v.itemHeight,"px")}},[(0,ae.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(ne.translateY,"px)")}},[ye])])]):ye])}}});var Xf=es.Z;const Yf=qn({__name:"JsonPreview",props:{data:Object},setup(v){return(M,y)=>(Gn(),Wo(lt(Xf),{path:"res",deep:3,showLength:!0,data:v.data},null,8,["data"]))}}),Jf=Zl(_f);Zl(Yf);const Zf=qn({__name:"drawer",emits:["success","register"],setup(v,{emit:M}){const[y,{openModal:I}]=Pf(),ee=[{title:"预埋件编号",dataIndex:"code",key:"code"},{title:"类型",dataIndex:"type",key:"type"},{title:"X(mm)",dataIndex:"x",key:"x",width:"80px"},{title:"Y(mm)",dataIndex:"y",key:"y",width:"80px"},{title:"w(mm)",dataIndex:"w",key:"w",width:"80px"},{title:"h(mm)",dataIndex:"h",key:"h",width:"80px"}],j=dn([]),ge=M,ne=dn(!0),A=dn(),[X,{resetFields:G,setFieldsValue:J,validate:U}]=of({labelWidth:120,schemas:sf,showActionButtonGroup:!1}),[ce,{setDrawerProps:ue,closeDrawer:Le}]=df(z=>zr(this,null,function*(){yield G(),ue({confirmLoading:!1}),ne.value=!!(z!=null&&z.isUpdate),A.value=z==null?void 0:z.record,j.value=[],(A.value&&A.value.paramJson?JSON.parse(A.value.paramJson):[]).forEach((k,E)=>{j.value.push(xr({index:E},k))}),yield J(xr({},z.record))})),[Ae]=Of({title:"预埋件列表",columns:ee,dataSource:j,useSearchForm:!1,showTableSetting:!1,bordered:!0,showIndexColumn:!1,canResize:!1,pagination:!1,rowKey:z=>z.code,actionColumn:{width:180,title:"操作",dataIndex:"action",fixed:void 0}}),Ce=Ho(()=>lt(ne)?"编辑":"新增");function q(){return zr(this,null,function*(){try{const z=yield U();ue({confirmLoading:!0});const oe=Rl(z,[]),k=lt(ne)?ff:uf,E=lt(ne)?Object.assign({},xr(xr({},lt(A)),oe)):xr({},oe);let c=[];j.value.forEach(B=>{delete B.index,c.push(B)}),E.paramJson=JSON.stringify(c),yield k(E),Le(),ge("success")}catch(z){}finally{ue({confirmLoading:!1})}})}const T=()=>{I(!0,{isUpdate:!1})},W=(z,oe)=>{I(!0,{record:z,isUpdate:!0})},Z=z=>{j.value=j.value.filter(oe=>oe.code!==z.code)},se=dn(),ye=()=>{var z;(z=se.value)==null||z.click()},me=z=>{const oe=z.target.files[0];if(oe){const k=new FileReader;k.onload=E=>{Te(E.target.result),se.value.value=""},k.readAsDataURL(oe)}},Te=z=>{cf(z).then(oe=>{WebViewService.setMessage("数据导入成功!","success").then(()=>{}),j.value=JSON.parse(oe)}).catch(()=>{WebViewService.setMessage("数据导入失败!","error").then(()=>{})})},ie=z=>{j.value[z.index]=xr({},z)};return(z,oe)=>{const k=Tf("a-button");return Gn(),Wo(lt(hf),Mf(z.$attrs,{onRegister:lt(ce),showFooter:"",title:Ce.value,width:"900px",onOk:q}),{default:cn(()=>[kr(lt(af),{onRegister:lt(X)},{paramJson:cn(({model:E})=>[kr(lt(Jf),{style:{height:"500px"},"auto-height":!1,value:E.paramJson,"onUpdate:value":c=>E.paramJson=c,onChange:c=>{E.paramJson=c}},null,8,["value","onUpdate:value","onChange"])]),_:1},8,["onRegister"]),kr(lt(Af),{onRegister:lt(Ae)},{toolbar:cn(()=>[kr(k,{type:"primary",onClick:T,icon:Kl(lt(wf))},{default:cn(()=>oe[0]||(oe[0]=[Po("新 增")])),_:1},8,["icon"]),oe[2]||(oe[2]=Oo("div",{style:{width:"5px"}},null,-1)),kr(k,{type:"primary",icon:Kl(lt(xf)),onClick:ye},{default:cn(()=>oe[1]||(oe[1]=[Po("OCR识别")])),_:1},8,["icon"]),Oo("input",{type:"file",ref_key:"fileInput",ref:se,"aria-hidden":"true",accept:"image/bmp,image/jpeg,image/jpg,image/png",onChange:me,style:{display:"none"}},null,544),oe[3]||(oe[3]=Oo("div",{style:{width:"5px"}},null,-1))]),bodyCell:cn(({column:E,record:c})=>[E.dataIndex==="action"?(Gn(),Wo(lt(lf),{key:0,actions:[{label:"编辑",icon:"clarity:note-edit-line",onClick:W.bind(null,c),divider:!0},{label:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:Z.bind(null,c),placement:"topRight"},divider:!0}]},null,8,["actions"])):Lf("",!0)]),_:1},8,["onRegister"]),kr(Df,{onRegister:lt(y),onSuccess:ie},null,8,["onRegister"])]),_:1},16,["onRegister","title"])}}});const dc=mf(Zf,[["__scopeId","data-v-92cb4812"]]);export{dc as default};
|