26 lines
291 KiB
JavaScript
26 lines
291 KiB
JavaScript
|
|
import{q as _u}from"./defaultSettingsView-BEpdCv1S.js";var vi={exports:{}},Ru=vi.exports,ha;function Nt(){return ha||(ha=1,(function(At,Ot){(function(C,De){At.exports=De()})(Ru,(function(){var C=navigator.userAgent,De=navigator.platform,P=/gecko\/\d/i.test(C),fe=/MSIE \d/.test(C),Se=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),le=/Edge\/(\d+)/.exec(C),b=fe||Se||le,W=b&&(fe?document.documentMode||6:+(le||Se)[1]),j=!le&&/WebKit\//.test(C),oe=j&&/Qt\/\d+\.\d+/.test(C),w=!le&&/Chrome\/(\d+)/.exec(C),B=w&&+w[1],A=/Opera\//.test(C),K=/Apple Computer/.test(navigator.vendor),ae=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),F=/PhantomJS/.test(C),N=K&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),R=/Android/.test(C),_=N||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),Y=N||/Mac/.test(De),ce=/\bCrOS\b/.test(C),$=/win/i.test(De),ee=A&&C.match(/Version\/(\d*\.\d*)/);ee&&(ee=Number(ee[1])),ee&&ee>=15&&(A=!1,j=!0);var Ae=Y&&(oe||A&&(ee==null||ee<12.11)),se=P||b&&W>=9;function q(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Fe=function(e,t){var n=e.className,r=q(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return M(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function S(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var L;document.createRange?L=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:L=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function m(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 x(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function z(e,t){var n=e.className;q(t).test(n)||(e.className+=(n?" ":"")+t)}function ne(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!q(n[r]).test(t)&&(t+=" "+n[r]);return t}var p=function(e){e.select()};N?p=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(p=function(e){try{e.select()}catch{}});function c(e){return e.display.wrapper.ownerDocument}function te(e){return ke(e.display.wrapper)}function ke(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function J(e){return c(e).defaultView}function pe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Te(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 Ce(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var we=function(){this.id=null,this.f=null,this.time=0,this.handler=pe(this.onTimeout,this)};we.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},we.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function de(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Oe=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},ct={origin:"*mouse"},Pe={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(xe(Ue)+" ");return Ue[e]}function xe(e){return e[e.length-1]}function Ie(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}functi
|
|||
|
|
|
|||
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|||
|
|
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Hn=(function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),Ht=null;function yi(e){if(Ht!=null)return Ht;var t=G(e,d("span","x")),n=t.getBoundingClientRect(),r=L(t,0,1).getBoundingClientRect();return Ht=Math.abs(n.left-r.left)>1}var Pr={},_t={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){_t[e]=t}function Ir(e){if(typeof e=="string"&&_t.hasOwnProperty(e))e=_t[e];else if(e&&typeof e.name=="string"&&_t.hasOwnProperty(e.name)){var t=_t[e.name];typeof t=="string"&&(t={name:t}),e=O(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.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},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ce(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ce(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Ce(this.string,null,this.tabSize)-(this.lineStart?Ce(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},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)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.
|
|||
|
|
`?(H=h.appendChild(d("span",k[0]=="\r"?"␍":"","cm-invalidchar")),H.setAttribute("cm-text",k[0]),e.col+=1):(H=e.cm.options.specialCharPlaceholder(k[0]),H.setAttribute("cm-text",k[0]),b&&W<9?h.appendChild(d("span",[H])):h.appendChild(H),e.col+=1);e.map.push(e.pos,e.pos+1,H),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var ie=n||"";r&&(ie+=r),i&&(ie+=i);var V=d("span",[h],ie,o);if(l)for(var ue in l)l.hasOwnProperty(ue)&&ue!="style"&&ue!="class"&&V.setAttribute(ue,l[ue]);return e.content.appendChild(V)}e.content.appendChild(h)}}function ls(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;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 as(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+r.length;;){for(var v=void 0,k=0;k<t.length&&(v=t[k],!(v.to>u&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ss(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(o,o=n[l]),Eo(n[l+1],t.cm.options));return}for(var a=i.length,s=0,u=1,h="",v,k,y=0,E,H,Z,Q,ie;;){if(y==s){E=H=Z=k="",ie=null,Q=null,y=1/0;for(var V=[],ue=void 0,be=0;be<r.length;++be){var me=r[be],Ne=me.marker;if(Ne.type=="bookmark"&&me.from==s&&Ne.widgetNode)V.push(Ne);else if(me.from<=s&&(me.to==null||me.to>s||Ne.collapsed&&me.to==s&&me.from==s)){if(me.to!=null&&me.to!=s&&y>me.to&&(y=me.to,H=""),Ne.className&&(E+=" "+Ne.className),Ne.css&&(k=(k?k+";":"")+Ne.css),Ne.startStyle&&me.from==s&&(Z+=" "+Ne.startStyle),Ne.endStyle&&me.to==y&&(ue||(ue=[])).push(Ne.endStyle,me.to),Ne.title&&((ie||(ie={})).title=Ne.title),Ne.attributes)for(var Ke in Ne.attributes)(ie||(ie={}))[Ke]=Ne.attributes[Ke];Ne.collapsed&&(!Q||Si(Q.marker,Ne)<0)&&(Q=me)}else me.from>s&&y>me.from&&(y=me.from)}if(ue)for(var st=0;st<ue.length;st+=2)ue[st+1]==y&&(H+=" "+ue[st]);if(!Q||Q.from==s)for(var Xe=0;Xe<V.length;++Xe)Oo(t,0,V[Xe]);if(Q&&(Q.from||0)==s){if(Oo(t,(Q.to==null?a+1:Q.to)-s,Q.marker,Q.from==null),Q.to==null)return;Q.to==s&&(Q=!1)}}if(s>=a)break;for(var Mt=Math.min(a,y);;){if(h){var wt=s+h.length;if(!Q){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+E:E,Z,s+tt.length==y?H:"",k,ie)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,Z=""}h=i.slice(o,o=n[u++]),v=Eo(n[u++],t.cm.options)}}}function Po(e,t,n){this.line=t,this.rest=$a(t),this.size=this.rest?f(xe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var l=new Po(e.doc,ge(e.doc,o),o);i=o+l.size,r.push(l)}return r}var Rr=null;function us(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function fs(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 cs(e,t){var n=e.ownsGroup;if(n)try{fs(n)}finally{Rr=null,t(n)}}var dn=null;function ot(e,t){var n=Qt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Rr?i=Rr.delayedCallbacks:dn?i=dn:(i=dn=[],setTimeout(ds,0));for(var o=function(a){i.push(function(){return n[a].apply(null,r)})},l=0;l<n.length;++l)o(l)}}function ds(){var e=dn;dn=null;for(var t=0;t<e.length;++t)e[t]()}function Io(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ps(e,t):o=="gutter"?Bo(e,t,n,r):o=="class"?Di(e,t):o=="widget"&&gs(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChil
|
|||
|
|
top: `+ue+"px; width: "+(be??s-V)+`px;
|
|||
|
|
height: `+(me-ue)+"px"))}function v(V,ue,be){var me=ge(i,V),Ne=me.text.length,Ke,st;function Xe(tt,St){return Zn(e,D(V,tt),"div",me,St)}function Mt(tt,St,ft){var nt=Vo(e,me,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(me.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(me,i.direction);return or(wt,ue||0,be??Ne,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Lt=Xe(St-1,rt?"right":"left"),nn=ue==null&&tt==0,yr=be==null&&St==Ne,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Lt.top-Qe.top<=3){var ut=(u?nn:yr)&>,co=(u?yr:nn)&&Jt,ir=ut?a:(rt?Qe:Lt).left,Fr=co?s:(rt?Lt:Qe).right;h(ir,Qe.top,Fr-ir,Qe.bottom)}else{var Er,mt,on,ho;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),ho=u&&yr&&Jt?s:Lt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&yr&&Jt?a:Lt.left,ho=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom<Lt.top&&h(a,Qe.bottom,null,Lt.top),h(on,Lt.top,ho-on,Lt.bottom)}(!Ke||Qn(Qe,Ke)<0)&&(Ke=Qe),Qn(Lt,Ke)<0&&(Ke=Lt),(!st||Qn(Qe,st)<0)&&(st=Qe),Qn(Lt,st)<0&&(st=Lt)}),{start:Ke,end:st}}var k=t.from(),y=t.to();if(k.line==y.line)v(k.line,k.ch,y.ch);else{var E=ge(i,k.line),H=ge(i,y.line),Z=qt(E)==qt(H),Q=v(k.line,k.ch,Z?E.text.length+1:null).end,ie=v(y.line,Z?0:null,y.ch).start;Z&&(Q.top<ie.top-2?(h(Q.right,Q.top,null,Q.bottom),h(a,ie.top,ie.left,ie.bottom)):h(Q.right,Q.top,ie.left-Q.right,Q.bottom)),Q.bottom<ie.top&&h(a,Q.bottom,null,ie.top)}n.appendChild(o)}function Hi(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()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function rl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),j&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Hi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Fe(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,u=void 0,h=0;if(!a.hidden){if(i+=a.line.height,b&&W<8){var v=a.node.offsetTop+a.node.offsetHeight;u=v-n,n=v}else{var k=a.node.getBoundingClientRect();u=k.bottom-k.top,!s&&a.text.firstChild&&(h=a.text.firstChild.getBoundingClientRect().right-k.left-1)}var y=a.line.height-u;if((y>.005||y<-.005)&&(i<r&&(o-=y),Ft(a.line,u),nl(a.line),a.rest))for(var E=0;E<a.rest.length;E++)nl(a.rest[E]);if(h>e.display.sizerWidth){var H=Math.ceil(h/Kr(e.display));H>e.display.maxLineLength&&(e.display.maxLineLength=H,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nl(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function $n(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=g(t,r),l=g(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=g(t,er(ge(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=g(t,er(ge(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.m
|
|||
|
|
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
|
|||
|
|
height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px;
|
|||
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function As(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?D(t.line,t.ch+1,"before"):t,t=t.ch?D(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(xn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function Fs(e,t){var n=qi(e,t);n.scrollTop!=null&&xn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Ai(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,y=wr(e)-n.gutters.offsetWidth,E=t.right-t.left>y;return E&&(t.right=t.left+y),t.left<10?l.scrollLeft=0:t.left<k?l.scrollLeft=Math.max(0,t.left+v-(E?0:10)):t.right>y+k-3&&(l.scrollLeft=t.right+(E?0:10)-y),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Es(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);il(e,n,r,t.margin)}}function il(e,t,n,r){var i=qi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function xn(e,t){Math.abs(e.doc.scrollTop-t)<2||(P||Ui(e,{top:t}),ol(e,t,!0),P&&Ui(e),kn(e,100))}function ol(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,fl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ye(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ye(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.h
|
|||
|
|
`},setDirection:at(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Xs(this.cm))})}),kt.prototype.eachLine=kt.prototype.iter;var Rl=0;function lu(e){var t=this;if(ql(t),!(Ze(t,e)||tr(t.display,e))){ht(e),b&&(Rl=+new Date);var n=Lr(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),l=0,a=function(){++l==i&<(t,function(){n=Me(t.doc,n);var y={from:n,to:n,text:t.doc.splitLines(o.filter(function(E){return E!=null}).join(t.doc.lineSeparator())),origin:"paste"};Jr(t.doc,y),Cl(t.doc,pr(Me(t.doc,n),Me(t.doc,gr(y))))})()},s=function(y,E){if(t.options.allowDropFileTypes&&de(t.options.allowDropFileTypes,y.type)==-1){a();return}var H=new FileReader;H.onerror=function(){return a()},H.onload=function(){var Z=H.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Z)){a();return}o[E]=Z,a()},H.readAsText(y)},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 h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k<v.length;++k)Qr(t.doc,"",v[k].anchor,v[k].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}function au(e,t){if(b&&(!e.state.draggingText||+new Date-Rl<100)){ar(t);return}if(!(Ze(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!K)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",A&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),A&&n.parentNode.removeChild(n)}}function su(e,t){var n=Lr(e,t);if(n){var r=document.createDocumentFragment();Wi(e,n,r),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),G(e.display.dragCursor,r)}}function ql(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function jl(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 Kl=!1;function uu(){Kl||(fu(),Kl=!0)}function fu(){var e;ye(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,jl(cu)},100))}),ye(window,"blur",function(){return jl(Ur)})}function cu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var xr={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"},Fn=0;Fn<10;Fn++)xr[Fn+48]=xr[Fn+96]=String(Fn);for(var ui=65;ui<=90;ui++)xr[ui]=String.fromCharCode(ui);for(var En=1;En<=12;En++)xr[En+111]=xr[En+63235]="F"+En;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":"u
|
|||
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var n=ge(e.doc,t),r=qt(n);return r!=n&&(t=f(r)),no(!0,e,r,t,1)}function gu(e,t){var n=ge(e.doc,t),r=Va(n);return r!=n&&(t=f(r)),no(!0,e,n,t,-1)}function Zl(e,t){var n=Yl(e,t.line),r=ge(e.doc,n.line),i=We(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return D(n.line,l?0:o,n.sticky)}return n}function ci(e,t,n){if(typeof t=="string"&&(t=Nn[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)!=qe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function vu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$r(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$r(t,e.options.extraKeys,n,e)||$r(t,e.options.keyMap,n,e)}var mu=new we;function On(e,t,n,r){var i=e.state.keySeq;if(i){if(Ul(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:mu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Jl(e,i+" "+t,n,r))return!0}return Jl(e,t,n,r)}function Jl(e,t,n,r){var i=vu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(ht(n),Hi(e)),!!i}function Ql(e,t){var n=Xl(t,!0);return n?t.shiftKey&&!e.state.keySeq?On(e,"Shift-"+n,t,function(r){return ci(e,r,!0)})||On(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ci(e,r)}):On(e,n,t,function(r){return ci(e,r)}):!1}function xu(e,t,n){return On(e,"'"+n+"'",t,function(r){return ci(e,r,!0)})}var io=null;function Vl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=x(te(t)),!Ze(t,e))){b&&W<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ql(t,e);A&&(io=r?n:null,!r&&n==88&&!Hn&&(Y?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),P&&!Y&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&yu(t)}}function yu(e){var t=e.display.lineDiv;z(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Fe(t,"CodeMirror-crosshair"),dt(document,"keyup",n),dt(document,"mouseover",n))}ye(document,"keyup",n),ye(document,"mouseover",n)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ze(this,e)}function ea(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Ze(t,e)||e.ctrlKey&&!e.altKey||Y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(A&&n==io){io=null,ht(e);return}if(!(A&&(!e.which||e.which<10)&&Ql(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(xu(t,e,i)||t.display.input.onKeyPress(e))}}}var bu=400,oo=function(e,t,n){this.time=e,this.pos=t,this.button=n};oo.prototype.compare=function(e,t,n){return this.time+bu>e&&re(t,this.pos)==0&&n==this.button};var Pn,In;function ku(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ta(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){j||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Lr(t,e),i=Wt(e),o=r?ku(r,i):"single";J(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&wu(t,i,r,o,e))&&(i==1?r?Lu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(se?t.display.input.onContextMenu(e):_i(t)))}}}function wu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function Su(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==n
|
|||
|
|
`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h<Ut.text.length;h++)u.push(o.splitLines(Ut.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Ie(s,function(Q){return[Q]}));for(var v=e.curOp.updateInput,k=r.ranges.length-1;k>=0;k--){var y=r.ranges[k],E=y.from(),H=y.to();y.empty()&&(n&&n>0?E=D(E.line,E.ch-n):e.state.overwrite&&!a?H=D(H.line,Math.min(ge(o,H.line).text.length,H.ch+xe(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(`
|
|||
|
|
`)==s.join(`
|
|||
|
|
`)&&(E=H=D(E.line,0)));var Z={from:E,to:H,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,Z),ot(e,"inputRead",e,Z)}t&&!a&&sa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return so(t,n,0,null,"paste")}),!0}function sa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function ua(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:D(i,0),head:D(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function uo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function fa(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return j?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),t}function Ou(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){J(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,l=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&<(this,t[r])(this,i,l),Ye(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"](fi(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:vt(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");T(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,bt(this)}),removeOverlay:vt(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var l=i[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(o,1),this.state.modeGen++,bt(this);return}}}),indentLine:vt(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),I(this.doc,r)&&zn(this,r,i,o)}),indentSelection:vt(function(r){for(var i=this.doc.sel.ranges,o=-1,l=0;l<i.length;l++){var a=i[l];if(a.empty())a.head.line>o&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v<o;++v)zn(this,v,r);var k=this.doc.sel.ranges;s.ch==0&&i.length==k.length&&k[l].from().ch>0&&eo(this.doc,l,new _e(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return bo(this,r,i)},getLineTokens:function(r,i){return bo(this,D(r),i,!0)},getTokenTypeAt:function(r){r=Me(this.doc,r);var i=mo(this,ge(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]<a)o=u+1;else{s=i[u*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-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 l=n[i],a=this.getModeAt(r);if(typeof a[i]=="string")l[a[i]]&&o.push(l
|
|||
|
|
`,Z=Le(H,y)?"w":k&&H==`
|
|||
|
|
`?"n":!k||/\s/.test(H)?null:"p";if(k&&!E&&!Z&&(Z="s"),v&&v!=Z){n<0&&(n=1,h(),t.sticky="after");break}if(Z&&(v=Z),n>0&&!h(!E))break}var Q=ai(e,t,o,l,!0);return He(o,Q)&&(Q.hitSide=!0),Q}function ca(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,J(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new we,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ye(i,"paste",function(a){!o(a)||Ze(r,a)||aa(a,r)||W<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ye(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ye(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ye(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ye(i,"touchstart",function(){return n.forceCompositionEnd()}),ye(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ua(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(`
|
|||
|
|
`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=fa(),v=h.firstChild;uo(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(`
|
|||
|
|
`);var k=x(ke(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ye(i,"copy",l),ye(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=tl(this.cm,!1);return e.focus=x(ke(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=pi(t,e.anchorNode,e.anchorOffset),l=pi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&re(Hr(o,l),r)==0&&re(yt(o,l),i)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&da(t,r)||{node:a[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&da(t,i);if(!u){var h=a[a.length-1].measure,v=h.maps?h.maps[h.maps.length-1]:h.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var k=e.rangeCount&&e.getRangeAt(0),y;try{y=L(s.node,s.offset,u.offset,u.node)}catch{}y&&(!P&&t.state.focused?(e.collapse(s.node,s.offset),y.collapsed||(e.removeAllRanges(),e.addRange(y))):(e.removeAllRanges(),e.addRange(y)),k&&e.anchorNode==null?e.addRange(k):P&&this.startGracePeriod()),this.rememberSelection()}},je.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)},je.prototype.showMultipleSelections=function(e){G(this.cm.display.cursorDiv,e.cursors),G(this.cm.display.selectionDiv,e.selection)},je.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},je.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},je.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||x(ke(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},je.prototype.blur=function(){this.div.blur()},je.prototype.getField=function(){return this.div},je.prototype.supportsTouch=function(){return!0},je.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Dt(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)},je.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},je.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(R&&w&&this.cm.display.gutterSpecs.length&&Pu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=pi(t,e.anchorNode,e.anchorOffset),r=pi(t,e.focusNode,e.focusOffset);n&&r&&Dt(t,function(){pt(t.doc,pr(n,r),Ve),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},je.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=D(r.line-1,ge(e.doc,r.line-1).length)),i.ch==ge(e.doc,i.line).t
|
|||
|
|
`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ye(i,"cut",o),ye(i,"copy",o),ye(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ye(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ye(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ye(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=fa(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=tl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;G(n.cursorDiv,e.cursors),G(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&W>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&W>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!_||x(ke(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&W>=9&&this.hasSelection===i||Y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r=""),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l<a&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Dt(t,function(){so(t,i.slice(l),r.length-l,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},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&W>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Lr(n,e),l=r.scroller.scrollTop;if(!o||A)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|||
|
|
top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
|
|||
|
|
z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|||
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;j&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),j&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var H=n.somethingSelected(),Z=""+(H?i.value:"");i.value="⇚",i.value=Z,t.prevInput=H?"":"",i.selectionStart=1,i.selectionEnd=Z.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&W<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&W<9)&&k();var H=0,Z=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?lt(n,El)(n):H++<10?r.detectingSelectAll=setTimeout(Z,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(Z,200)}}if(b&&W>=9&&k(),se){ar(e);var E=function(){dt(window,"mouseup",E),setTimeout(y,20)};ye(window,"mouseup",E)}else setTimeout(y,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Bu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=x(ke(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ye(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function Wu(e){e.off=dt,e.on=ye,e.wheelEventPixels=Us,e.Doc=kt,e.splitLines=zt,e.countColumn=Ce,e.findColumn=Re,e.isWordChar=he,e.Pass=qe,e.signal=Ye,e.Line=_r,e.changeEnd=gr,e.scrollbarModel=al,e.Pos=D,e.cmpPos=re,e.modes=Pr,e.mimeModes=_t,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Xl,e.isModifierKey=Ul,e.lookupKey=$r,e.normalizeKeyMap=hu,e.StringStream=Je,e.SharedTextMarker=An,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=z,e.contains=m,e.rmClass=Fe,e.keyNames=xr}Au(Ge),Ou(Ge);var Hu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&de(Hu,gi)<0&&(Ge.prototype[gi]=(function(e){return function(){return e.apply(this.doc,arguments)}})(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=Bu,Wu(Ge),Ge.version="5.65.18",Ge}))})(vi)),vi.exports}var qu=Nt();const $u=_u(qu);var pa={exports:{}},ga;function Wa(){return ga||(ga=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineMode("css",function(se,q){var Fe=q.inline;q.propertyKeywords||(q=C.resolveMode("text/css"));var M=se.indentUnit,G=q.tokenHooks,d=q.documentTypes||{},S=q.mediaTypes||{},L=q.mediaFeatures||{},m=q.mediaValueKeywords||{},x=q.propertyKeywords||{},z=q.nonStandardPropertyKeywords||{},ne=q.fontProperties||{},p=q.counterDescriptors||{},c=q.col
|
|||
|
|
`;F.replaceSelection($+$,null),w(F,-1),_=F.listSelections();for(var ee=0;ee<_.length;ee++){var Ae=_[ee].head.line;F.indentLine(Ae,null,!0),F.indentLine(Ae+1,null,!0)}})}function w(F,N){for(var R=[],_=F.listSelections(),Y=0,ce=0;ce<_.length;ce++){var $=_[ce];$.head==F.getCursor()&&(Y=ce);var ee=$.head.ch||N>0?{line:$.head.line,ch:$.head.ch+N}:{line:$.head.line-1};R.push({anchor:ee,head:ee})}F.setSelections(R,Y)}function B(F){var N=C.cmpPos(F.anchor,F.head)>0;return{anchor:new P(F.anchor.line,F.anchor.ch+(N?-1:1)),head:new P(F.head.line,F.head.ch+(N?1:-1))}}function A(F,N){var R=W(F);if(!R||F.getOption("disableInput"))return C.Pass;var _=fe(R,"pairs"),Y=_.indexOf(N);if(Y==-1)return C.Pass;for(var ce=fe(R,"closeBefore"),$=fe(R,"triples"),ee=_.charAt(Y+1)==N,Ae=F.listSelections(),se=Y%2==0,q,Fe=0;Fe<Ae.length;Fe++){var M=Ae[Fe],G=M.head,d,S=F.getRange(G,P(G.line,G.ch+1));if(se&&!M.empty())d="surround";else if((ee||!se)&&S==N)ee&&ae(F,G)?d="both":$.indexOf(N)>=0&&F.getRange(G,P(G.line,G.ch+3))==N+N+N?d="skipThree":d="skip";else if(ee&&G.ch>1&&$.indexOf(N)>=0&&F.getRange(P(G.line,G.ch-2),G)==N+N){if(G.ch>2&&/\bstring/.test(F.getTokenTypeAt(P(G.line,G.ch-2))))return C.Pass;d="addFour"}else if(ee){var L=G.ch==0?" ":F.getRange(P(G.line,G.ch-1),G);if(!C.isWordChar(S)&&L!=N&&!C.isWordChar(L))d="both";else return C.Pass}else if(se&&(S.length===0||/\s/.test(S)||ce.indexOf(S)>-1))d="both";else return C.Pass;if(!q)q=d;else if(q!=d)return C.Pass}var m=Y%2?_.charAt(Y-1):N,x=Y%2?N:_.charAt(Y+1);F.operation(function(){if(q=="skip")w(F,1);else if(q=="skipThree")w(F,3);else if(q=="surround"){for(var z=F.getSelections(),ne=0;ne<z.length;ne++)z[ne]=m+z[ne]+x;F.replaceSelections(z,"around"),z=F.listSelections().slice();for(var ne=0;ne<z.length;ne++)z[ne]=B(z[ne]);F.setSelections(z)}else q=="both"?(F.replaceSelection(m+x,null),F.triggerElectric(m+x),w(F,-1)):q=="addFour"&&(F.replaceSelection(m+m+m+m,"before"),w(F,1))})}function K(F,N){var R=F.getRange(P(N.line,N.ch-1),P(N.line,N.ch+1));return R.length==2?R:null}function ae(F,N){var R=F.getTokenAt(P(N.line,N.ch+1));return/\bstring/.test(R.type)&&R.start==N.ch&&(N.ch==0||!/\bstring/.test(F.getTokenTypeAt(N)))}})})()),za.exports}Qu();export{$u as default};
|