2022-11-27 13:35:57 +00:00
|
|
|
import{S as Ou,_ as Cl,g as kl,a4 as Nu,h as Mu,P as pl,x as Au,R as Du,o as Ll,c as Tl,r as Hu,a as Nn,b as vl,w as Eu,p as Wu,f as Fu}from"./index.50eb5827.js";var ho={exports:{}},gl;function tt(){return gl||(gl=1,function(Oe,Be){(function(m,U){Oe.exports=U()})(Ou,function(){var m=navigator.userAgent,U=navigator.platform,I=/gecko\/\d/i.test(m),G=/MSIE \d/.test(m),A=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(m),w=/Edge\/(\d+)/.exec(m),S=G||A||w,x=S&&(G?document.documentMode||6:+(w||A)[1]),C=!w&&/WebKit\//.test(m),W=C&&/Qt\/\d+\.\d+/.test(m),P=!w&&/Chrome\/(\d+)/.exec(m),j=P&&+P[1],O=/Opera\//.test(m),R=/Apple Computer/.test(navigator.vendor),D=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(m),H=/PhantomJS/.test(m),k=R&&(/Mobile\/\w+/.test(m)||navigator.maxTouchPoints>2),L=/Android/.test(m),B=k||L||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(m),z=k||/Mac/.test(U),q=/\bCrOS\b/.test(m),Q=/win/i.test(U),g=O&&m.match(/Version\/(\d*\.\d*)/);g&&(g=Number(g[1])),g&&g>=15&&(O=!1,C=!0);var F=z&&(W||O&&(g==null||g<12.11)),ne=I||S&&x>=9;function V(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ee=function(e,t){var n=e.className,r=V(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 T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function K(e,t){return T(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 ce(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var be;document.createRange?be=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:be=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 Le(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 we(e){var t;try{t=e.activeElement}catch{t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Ce(e,t){var n=e.className;V(t).test(n)||(e.className+=(n?" ":"")+t)}function Ft(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!V(n[r]).test(t)&&(t+=" "+n[r]);return t}var lr=function(e){e.select()};k?lr=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(lr=function(e){try{e.select()}catch{}});function ze(e){return e.display.wrapper.ownerDocument}function Pt(e){return ze(e).defaultView}function rt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ae(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function ie(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=rt(this.onTimeout,this)};ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ue.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 Mn=50,xe={toString:function(){return"CodeMirror.Pass"}},Ne={scroll:!1},sr={origin:"*mouse"},qt={origin:"+move"};function kt(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 pt=[""];function Lt(e){for(;pt.length<=e;)pt.push(pe(pt)+" ");return pt[e]}function pe(e){return e[e.length-1]}function wr(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function An(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r+
|
2022-11-25 04:57:33 +00:00
|
|
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
2022-11-27 13:35:57 +00:00
|
|
|
`,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/)},Zt=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},Nt=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Mt=null;function Pn(e){if(Mt!=null)return Mt;var t=K(e,d("span","x")),n=t.getBoundingClientRect(),r=be(t,0,1).getBoundingClientRect();return Mt=Math.abs(n.left-r.left)>1}var bt={},Qt={};function In(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),bt[e]=t}function Lr(e,t){Qt[e]=t}function ut(e){if(typeof e=="string"&&Qt.hasOwnProperty(e))e=Qt[e];else if(e&&typeof e.name=="string"&&Qt.hasOwnProperty(e.name)){var t=Qt[e.name];typeof t=="string"&&(t={name:t}),e=Dn(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ut("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ut("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Rt(e,t){t=ut(t);var n=bt[t.name];if(!n)return Rt(e,"text/plain");var r=n(e,t);if(Jt.hasOwnProperty(t.name)){var i=Jt[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 Jt={};function Rn(e,t){var n=Jt.hasOwnProperty(e)?Jt[e]:Jt[e]={};ae(t,n)}function Bt(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 jt(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 $r(e,t,n){return e.startState?e.startState(t,n):!0}var He=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};He.prototype.eol=function(){return this.pos>=this.string.length},He.prototype.sol=function(){return this.pos==this.lineStart},He.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},He.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},He.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},He.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},He.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},He.prototype.skipToEnd=function(){this.pos=this.string.length},He.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},He.prototype.backUp=function(e){this.pos-=e},He.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ie(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ie(this.string,this.lineStart,this.tabSize):0)},He.prototype.indentation=function(){return ie(this.string,null,this.tabSize)-(this.lineStart?ie(this.string,this.lineStart,this.tabSize):0)},He.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)}},He.prototype.current=function(){return this.string.slice(this.start,this.pos)},He.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},He.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},He
|
|
|
|
|
`?(E=h.appendChild(d("span",b[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),E.setAttribute("cm-text",b[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(b[0]),E.setAttribute("cm-text",b[0]),S&&x<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||u||o||a){var J=n||"";r&&(J+=r),i&&(J+=i);var Y=d("span",[h],J,o);if(a)for(var $ in a)a.hasOwnProperty($)&&$!="style"&&$!="class"&&Y.setAttribute($,a[$]);return e.content.appendChild(Y)}e.content.appendChild(h)}}function ql(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),r+=o,n=o==" "}return r}function Zl(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,h=u+r.length;;){for(var c=void 0,b=0;b<t.length&&(c=t[b],!(c.to>u&&c.from<=u));b++);if(c.to>=h)return e(n,r,i,o,a,l,s);e(n,r.slice(0,c.to-u),i,o,null,l,s),o=null,r=r.slice(c.to-u),u=c.to}}}function Eo(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 Ql(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]),Do(n[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,h="",c,b,y=0,M,E,_,X,J;;){if(y==s){M=E=_=b="",J=null,X=null,y=1/0;for(var Y=[],$=void 0,oe=0;oe<r.length;++oe){var re=r[oe],fe=re.marker;if(fe.type=="bookmark"&&re.from==s&&fe.widgetNode)Y.push(fe);else if(re.from<=s&&(re.to==null||re.to>s||fe.collapsed&&re.to==s&&re.from==s)){if(re.to!=null&&re.to!=s&&y>re.to&&(y=re.to,E=""),fe.className&&(M+=" "+fe.className),fe.css&&(b=(b?b+";":"")+fe.css),fe.startStyle&&re.from==s&&(_+=" "+fe.startStyle),fe.endStyle&&re.to==y&&($||($=[])).push(fe.endStyle,re.to),fe.title&&((J||(J={})).title=fe.title),fe.attributes)for(var Se in fe.attributes)(J||(J={}))[Se]=fe.attributes[Se];fe.collapsed&&(!X||Si(X.marker,fe)<0)&&(X=re)}else re.from>s&&y>re.from&&(y=re.from)}if($)for(var Ke=0;Ke<$.length;Ke+=2)$[Ke+1]==y&&(E+=" "+$[Ke]);if(!X||X.from==s)for(var Me=0;Me<Y.length;++Me)Eo(t,0,Y[Me]);if(X&&(X.from||0)==s){if(Eo(t,(X.to==null?l+1:X.to)-s,X.marker,X.from==null),X.to==null)return;X.to==s&&(X=!1)}}if(s>=l)break;for(var ht=Math.min(l,y);;){if(h){var at=s+h.length;if(!X){var Fe=at>ht?h.slice(0,ht-s):h;t.addToken(t,Fe,c?c+M:M,_,s+Fe.length==y?E:"",b,J)}if(at>=ht){h=h.slice(ht-s),s=ht;break}s=at,_=""}h=i.slice(o,o=n[u++]),c=Do(n[u++],t.cm.options)}}}function Wo(e,t,n){this.line=t,this.rest=zl(t),this.size=this.rest?ge(pe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Vt(e,t)}function Xn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new Wo(e.doc,te(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Nr=null;function Jl(e){Nr?Nr.ops.push(e):e.ownsGroup=Nr={ops:[e],delayedCallbacks:[]}}function jl(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 Vl(e,t){var n=e.ownsGroup;if(!!n)try{jl(n)}finally{Nr=null,t(n)}}var rn=null;function _e(e,t){var n=Qr(e,t);if(!!n.length){var r=Array.prototype.slice.call(arguments,2),i;Nr?i=Nr.delayedCallbacks:rn?i=rn:(i=rn=[],setTimeout($l,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function $l(){var e=rn;rn=null;for(var t=0;t<e.length;++t)e[t]()}function Fo(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ts(e,t):o=="gutter"?Io(e,t,n,r):o=="class"?Ti(e,t):o=="widget"&&rs(e,t,r)}t.changes=null}function nn(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.
|
2022-11-25 04:57:33 +00:00
|
|
|
top: `+$+"px; width: "+(oe==null?s-Y:oe)+`px;
|
2022-11-27 13:35:57 +00:00
|
|
|
height: `+(re-$)+"px"))}function c(Y,$,oe){var re=te(i,Y),fe=re.text.length,Se,Ke;function Me(Fe,lt){return Zn(e,v(Y,Fe),"div",re,lt)}function ht(Fe,lt,Ye){var Re=Vo(e,re,null,Fe),Pe=lt=="ltr"==(Ye=="after")?"left":"right",Ee=Ye=="after"?Re.begin:Re.end-(/\s/.test(re.text.charAt(Re.end-1))?2:1);return Me(Ee,Pe)[Pe]}var at=gt(re,i.direction);return ur(at,$||0,oe==null?fe:oe,function(Fe,lt,Ye,Re){var Pe=Ye=="ltr",Ee=Me(Fe,Pe?"left":"right"),st=Me(lt-1,Pe?"right":"left"),Kr=$==null&&Fe==0,ar=oe==null&<==fe,Je=Re==0,Wt=!at||Re==at.length-1;if(st.top-Ee.top<=3){var Xe=(u?Kr:ar)&&Je,uo=(u?ar:Kr)&&Wt,Yt=Xe?l:(Pe?Ee:st).left,br=uo?s:(Pe?st:Ee).right;h(Yt,Ee.top,br-Yt,Ee.bottom)}else{var xr,et,Xr,fo;Pe?(xr=u&&Kr&&Je?l:Ee.left,et=u?s:ht(Fe,Ye,"before"),Xr=u?l:ht(lt,Ye,"after"),fo=u&&ar&&Wt?s:st.right):(xr=u?ht(Fe,Ye,"before"):l,et=!u&&Kr&&Je?s:Ee.right,Xr=!u&&ar&&Wt?l:st.left,fo=u?ht(lt,Ye,"after"):s),h(xr,Ee.top,et-xr,Ee.bottom),Ee.bottom<st.top&&h(l,Ee.bottom,null,st.top),h(Xr,st.top,fo-Xr,st.bottom)}(!Se||Jn(Ee,Se)<0)&&(Se=Ee),Jn(st,Se)<0&&(Se=st),(!Ke||Jn(Ee,Ke)<0)&&(Ke=Ee),Jn(st,Ke)<0&&(Ke=st)}),{start:Se,end:Ke}}var b=t.from(),y=t.to();if(b.line==y.line)c(b.line,b.ch,y.ch);else{var M=te(i,b.line),E=te(i,y.line),_=xt(M)==xt(E),X=c(b.line,b.ch,_?M.text.length+1:null).end,J=c(y.line,_?0:null,y.ch).start;_&&(X.top<J.top-2?(h(X.right,X.top,null,X.bottom),h(l,J.top,J.left,J.bottom)):h(X.right,X.top,J.left-X.right,X.bottom)),X.bottom<J.top&&h(l,X.bottom,null,J.top)}n.appendChild(o)}function Ri(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()||Hr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ra(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||zi(e))}function Bi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Hr(e))},100)}function zi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(ke(e,"focus",e,t),e.state.focused=!0,Ce(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),C&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ri(e))}function Hr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ke(e,"blur",e,t),e.state.focused=!1,ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function jn(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,h=0;if(!l.hidden){if(i+=l.line.height,S&&x<8){var c=l.node.offsetTop+l.node.offsetHeight;u=c-n,n=c}else{var b=l.node.getBoundingClientRect();u=b.bottom-b.top,!s&&l.text.firstChild&&(h=l.text.firstChild.getBoundingClientRect().right-b.left-1)}var y=l.line.height-u;if((y>.005||y<-.005)&&(i<r&&(o-=y),mt(l.line,u),na(l.line),l.rest))for(var M=0;M<l.rest.length;M++)na(l.rest[M]);if(h>e.display.sizerWidth){var E=Math.ceil(h/Dr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function na(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 Vn(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Yn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=At(t,r),a=At(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=At(t,Gt(te(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=At(t,Gt(te(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Mat
|
2022-11-25 04:57:33 +00:00
|
|
|
top: `+(t.top-n.viewOffset-Yn(e.display))+`px;
|
|
|
|
|
height: `+(t.bottom-t.top+Ht(e)+n.barHeight)+`px;
|
2022-11-27 13:35:57 +00:00
|
|
|
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 gs(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?v(t.line,t.ch+1,"before"):t,t=t.ch?v(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=wt(e,t),s=!n||n==t?l:wt(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=_i(e,i),h=e.doc.scrollTop,c=e.doc.scrollLeft;if(u.scrollTop!=null&&(un(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(a=!0)),u.scrollLeft!=null&&(vr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(a=!0)),!a)break}return i}function ys(e,t){var n=_i(e,t);n.scrollTop!=null&&un(e,n.scrollTop),n.scrollLeft!=null&&vr(e,n.scrollLeft)}function _i(e,t){var n=e.display,r=Ar(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Ni(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Oi(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 h=Math.min(t.top,(u?l:t.bottom)-o);h!=i&&(a.scrollTop=h)}var c=e.options.fixedGutter?0:n.gutters.offsetWidth,b=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-c,y=hr(e)-n.gutters.offsetWidth,M=t.right-t.left>y;return M&&(t.right=t.left+y),t.left<10?a.scrollLeft=0:t.left<b?a.scrollLeft=Math.max(0,t.left+c-(M?0:10)):t.right>y+b-3&&(a.scrollLeft=t.right+(M?0:10)-y),a}function Gi(e,t){t!=null&&($n(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Er(e){$n(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sn(e,t,n){(t!=null||n!=null)&&$n(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function ms(e,t){$n(e),e.curOp.scrollToPos=t}function $n(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);ia(e,n,r,t.margin)}}function ia(e,t,n,r){var i=_i(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});sn(e,i.scrollLeft,i.scrollTop)}function un(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ki(e,{top:t}),oa(e,t,!0),I&&Ki(e),cn(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 vr(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,fa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Oi(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+Ht(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var gr=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),Z(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Z(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};gr.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.hei
|
|
|
|
|
`},setDirection:Ue(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Ws(this.cm))})}),ot.prototype.eachLine=ot.prototype.iter;var _a=0;function qs(e){var t=this;if(Ga(t),!(De(t,e)||Ut(t.display,e))){Ze(e),S&&(_a=+new Date);var n=dr(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&&Ge(t,function(){n=se(t.doc,n);var y={from:n,to:n,text:t.doc.splitLines(o.filter(function(M){return M!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ir(t.doc,y),Ta(t.doc,tr(se(t.doc,n),se(t.doc,rr(y))))})()},s=function(y,M){if(t.options.allowDropFileTypes&&de(t.options.allowDropFileTypes,y.type)==-1){l();return}var E=new FileReader;E.onerror=function(){return l()},E.onload=function(){var _=E.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_)){l();return}o[M]=_,l()},E.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 c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),oi(t.doc,tr(n,n)),c)for(var b=0;b<c.length;++b)Rr(t.doc,"",c[b].anchor,c[b].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}function Zs(e,t){if(S&&(!e.state.draggingText||+new Date-_a<100)){It(t);return}if(!(De(e,t)||Ut(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!R)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",O&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),O&&n.parentNode.removeChild(n)}}function Qs(e,t){var n=dr(e,t);if(!!n){var r=document.createDocumentFragment();Ii(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)),K(e.display.dragCursor,r)}}function Ga(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ua(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 Ka=!1;function Js(){Ka||(js(),Ka=!0)}function js(){var e;Z(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ua(Vs)},100))}),Z(window,"blur",function(){return Ua(Hr)})}function Vs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var or={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"},wn=0;wn<10;wn++)or[wn+48]=or[wn+96]=String(wn);for(var si=65;si<=90;si++)or[si]=String.fromCharCode(si);for(var Sn=1;Sn<=12;Sn++)or[Sn+111]=or[Sn+63235]="F"+Sn;var Xt={};Xt.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"},Xt.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":
|
|
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Za(e,t){var n=te(e.doc,t),r=xt(n);return r!=n&&(t=ge(r)),ro(!0,e,r,t,1)}function ru(e,t){var n=te(e.doc,t),r=Bl(n);return r!=n&&(t=ge(r)),ro(!0,e,n,t,-1)}function Qa(e,t){var n=Za(e,t.line),r=te(e.doc,n.line),i=gt(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 v(n.line,a?0:o,n.sticky)}return n}function fi(e,t,n){if(typeof t=="string"&&(t=Cn[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)!=xe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function nu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=zr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&zr(t,e.options.extraKeys,n,e)||zr(t,e.options.keyMap,n,e)}var iu=new ue;function kn(e,t,n,r){var i=e.state.keySeq;if(i){if(Xa(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:iu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Ja(e,i+" "+t,n,r))return!0}return Ja(e,t,n,r)}function Ja(e,t,n,r){var i=nu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&_e(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(Ze(n),Ri(e)),!!i}function ja(e,t){var n=qa(t,!0);return n?t.shiftKey&&!e.state.keySeq?kn(e,"Shift-"+n,t,function(r){return fi(e,r,!0)})||kn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return fi(e,r)}):kn(e,n,t,function(r){return fi(e,r)}):!1}function ou(e,t,n){return kn(e,"'"+n+"'",t,function(r){return fi(e,r,!0)})}var no=null;function Va(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=we(ze(t)),!De(t,e))){S&&x<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=ja(t,e);O&&(no=r?n:null,!r&&n==88&&!Nt&&(z?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),I&&!z&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&au(t)}}function au(e){var t=e.display.lineDiv;Ce(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(ee(t,"CodeMirror-crosshair"),qe(document,"keyup",n),qe(document,"mouseover",n))}Z(document,"keyup",n),Z(document,"mouseover",n)}function $a(e){e.keyCode==16&&(this.doc.sel.shift=!1),De(this,e)}function el(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Ut(t.display,e)||De(t,e)||e.ctrlKey&&!e.altKey||z&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(O&&n==no){no=null,Ze(e);return}if(!(O&&(!e.which||e.which<10)&&ja(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(ou(t,e,i)||t.display.input.onKeyPress(e))}}}var lu=400,io=function(e,t,n){this.time=e,this.pos=t,this.button=n};io.prototype.compare=function(e,t,n){return this.time+lu>e&&N(t,this.pos)==0&&n==this.button};var Ln,Tn;function su(e,t){var n=+new Date;return Tn&&Tn.compare(n,e,t)?(Ln=Tn=null,"triple"):Ln&&Ln.compare(n,e,t)?(Tn=new io(n,e,t),Ln=null,"double"):(Ln=new io(n,e,t),Tn=null,"single")}function tl(e){var t=this,n=t.display;if(!(De(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Ut(n,e)){C||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!oo(t,e)){var r=dr(t,e),i=jr(e),o=r?su(r,i):"single";Pt(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&uu(t,i,r,o,e))&&(i==1?r?hu(t,r,o,e):nt(e)==n.scroller&&Ze(e):i==2?(r&&ii(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(ne?t.display.input.onContextMenu(e):Bi(t)))}}}function uu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,kn(e,Ya(o,i),i,function(a){if(typeof a=="string"&&(a=Cn[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=xe}finally{e.state.suppressEdits=!1}return l})}function fu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(
|
|
|
|
|
`)==t){if(r.ranges.length%Ct.text.length==0){u=[];for(var h=0;h<Ct.text.length;h++)u.push(o.splitLines(Ct.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=wr(s,function(X){return[X]}));for(var c=e.curOp.updateInput,b=r.ranges.length-1;b>=0;b--){var y=r.ranges[b],M=y.from(),E=y.to();y.empty()&&(n&&n>0?M=v(M.line,M.ch-n):e.state.overwrite&&!l?E=v(E.line,Math.min(te(o,E.line).text.length,E.ch+pe(s).length)):l&&Ct&&Ct.lineWise&&Ct.text.join(`
|
2022-11-25 04:57:33 +00:00
|
|
|
`)==s.join(`
|
2022-11-27 13:35:57 +00:00
|
|
|
`)&&(M=E=v(M.line,0)));var _={from:M,to:E,text:u?u[b%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Ir(e.doc,_),_e(e,"inputRead",e,_)}t&&!l&&sl(e,t),Er(e),e.curOp.updateInput<2&&(e.curOp.updateInput=c),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ll(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&ft(t,function(){return lo(t,n,0,null,"paste")}),!0}function sl(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=On(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(te(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=On(e,i.head.line,"smart"));a&&_e(e,"electricInput",e,i.head.line)}}}function ul(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:v(i,0),head:v(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function fl(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function hl(){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 C?e.style.width="1000px":e.setAttribute("wrap","off"),k&&(e.style.border="1px solid black"),fl(e),t}function xu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){Pt(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)&&Ge(this,t[r])(this,i,a),ke(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"](ui(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:$e(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");An(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,it(this)}),removeOverlay:$e(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++,it(this);return}}}),indentLine:$e(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),f(this.doc,r)&&On(this,r,i,o)}),indentSelection:$e(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&&(On(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Er(this));else{var s=l.from(),u=l.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var c=h;c<o;++c)On(this,c,r);var b=this.doc.sel.ranges;s.ch==0&&i.length==b.length&&b[a].from().ch>0&&$i(this.doc,a,new ye(s,b[a].to()),Ne)}}}),getTokenAt:function(r,i){return xo(this,r,i)},getLineTokens:function(r,i){return xo(this,v(r),i,!0)},getTokenTypeAt:function(r){r=se(this.doc,r);var i=yo(this,te(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 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 a=n[i],l=this.getModeAt(r);if(typeof l[i]=="string")a[l[i]]&&o.pu
|
2022-11-25 04:57:33 +00:00
|
|
|
`,_=Sr(E,y)?"w":b&&E==`
|
2022-11-27 13:35:57 +00:00
|
|
|
`?"n":!b||/\s/.test(E)?null:"p";if(b&&!M&&!_&&(_="s"),c&&c!=_){n<0&&(n=1,h(),t.sticky="after");break}if(_&&(c=_),n>0&&!h(!M))break}var X=ai(e,t,o,a,!0);return le(o,X)&&(X.hitSide=!0),X}function cl(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,Pt(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(l-.5*Ar(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=Hi(e,o,a),!!u.outside;){if(n<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=n*5}return u}var me=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};me.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,fl(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}Z(i,"paste",function(l){!o(l)||De(r,l)||ll(l,r)||x<=11&&setTimeout(Ge(r,function(){return t.updateFromDOM()}),20)}),Z(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),Z(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),Z(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Z(i,"touchstart",function(){return n.forceCompositionEnd()}),Z(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||De(r,l))){if(r.somethingSelected())ci({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ul(r);ci({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ne),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Ct.text.join(`
|
2022-11-25 04:57:33 +00:00
|
|
|
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var h=hl(),c=h.firstChild;r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),c.value=Ct.text.join(`
|
2022-11-27 13:35:57 +00:00
|
|
|
`);var b=we(i.ownerDocument);lr(c),setTimeout(function(){r.display.lineSpace.removeChild(h),b.focus(),b==i&&n.showPrimarySelection()},50)}}Z(i,"copy",a),Z(i,"cut",a)},me.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},me.prototype.prepareSelection=function(){var e=ta(this.cm,!1);return e.focus=we(this.div.ownerDocument)==this.div,e},me.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},me.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},me.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=di(t,e.anchorNode,e.anchorOffset),a=di(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&N(Ie(o,a),r)==0&&N(ve(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&dl(t,r)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&dl(t,i);if(!u){var h=l[l.length-1].measure,c=h.maps?h.maps[h.maps.length-1]:h.map;u={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}if(!s||!u){e.removeAllRanges();return}var b=e.rangeCount&&e.getRangeAt(0),y;try{y=be(s.node,s.offset,u.offset,u.node)}catch{}y&&(!I&&t.state.focused?(e.collapse(s.node,s.offset),y.collapsed||(e.removeAllRanges(),e.addRange(y))):(e.removeAllRanges(),e.addRange(y)),b&&e.anchorNode==null?e.addRange(b):I&&this.startGracePeriod()),this.rememberSelection()}},me.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)},me.prototype.showMultipleSelections=function(e){K(this.cm.display.cursorDiv,e.cursors),K(this.cm.display.selectionDiv,e.selection)},me.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},me.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Le(this.div,t)},me.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||we(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},me.prototype.blur=function(){this.div.blur()},me.prototype.getField=function(){return this.div},me.prototype.supportsTouch=function(){return!0},me.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):ft(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)},me.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},me.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(L&&P&&this.cm.display.gutterSpecs.length&&wu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=di(t,e.anchorNode,e.anchorOffset),r=di(t,e.focusNode,e.focusOffset);n&&r&&ft(t,function(){Qe(t.doc,tr(n,r),Ne),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},me.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=v(r.line-1,te(e.doc,r.line-1).l
|
2022-11-25 04:57:33 +00:00
|
|
|
`),lr(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}Z(i,"cut",o),Z(i,"copy",o),Z(e.scroller,"paste",function(a){if(!(Ut(e,a)||De(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)}}),Z(e.lineSpace,"selectstart",function(a){Ut(e,a)||Ze(a)}),Z(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"})}}),Z(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},We.prototype.createField=function(e){this.wrapper=hl(),this.textarea=this.wrapper.firstChild},We.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},We.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=ta(e);if(e.options.moveInputWithCursor){var i=wt(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},We.prototype.showSelection=function(e){var t=this.cm,n=t.display;K(n.cursorDiv,e.cursors),K(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},We.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&&lr(this.textarea),S&&x>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",S&&x>=9&&(this.hasSelection=null));this.resetting=!1}},We.prototype.getField=function(){return this.textarea},We.prototype.supportsTouch=function(){return!1},We.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!B||we(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},We.prototype.blur=function(){this.textarea.blur()},We.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},We.prototype.receivedFocus=function(){this.slowPoll()},We.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},We.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)},We.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Zt(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(S&&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="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return ft(t,function(){lo(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},We.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},We.prototype.onKeyPress=function(){S&&x>=9&&(this.hasSelection=null),this.fastPoll()},We.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=dr(n,e),a=r.scroller.scrollTop;if(!o||O)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&Ge(n,Qe)(n.doc,tr(o),Ne);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: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
|
2022-11-27 13:35:57 +00:00
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var c;C&&(c=i.ownerDocument.defaultView.scrollY),r.input.focus(),C&&i.ownerDocument.defaultView.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function b(){if(i.selectionStart!=null){var E=n.somethingSelected(),_="\u200B"+(E?i.value:"");i.value="\u21DA",i.value=_,t.prevInput=E?"":"\u200B",i.selectionStart=1,i.selectionEnd=_.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,S&&x<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!S||S&&x<9)&&b();var E=0,_=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Ge(n,Da)(n):E++<10?r.detectingSelectAll=setTimeout(_,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(_,200)}}if(S&&x>=9&&b(),ne){It(e);var M=function(){qe(window,"mouseup",M),setTimeout(y,20)};Z(window,"mouseup",M)}else setTimeout(y,50)},We.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},We.prototype.setUneditable=function(){},We.prototype.needsContentAttribute=!1;function ku(e,t){if(t=t?ae(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=we(e.ownerDocument);t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(Z(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{}}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&&(qe(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Te(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function Lu(e){e.off=qe,e.on=Z,e.wheelEventPixels=Hs,e.Doc=ot,e.splitLines=Vr,e.countColumn=ie,e.findColumn=kt,e.isWordChar=qr,e.Pass=xe,e.signal=ke,e.Line=Or,e.changeEnd=rr,e.scrollbarModel=la,e.Pos=v,e.cmpPos=N,e.modes=bt,e.mimeModes=Qt,e.resolveMode=ut,e.getMode=Rt,e.modeExtensions=Jt,e.extendMode=Rn,e.copyState=Bt,e.startState=$r,e.innerMode=jt,e.commands=Cn,e.keyMap=Xt,e.keyName=qa,e.isModifierKey=Xa,e.lookupKey=zr,e.normalizeKeyMap=eu,e.StringStream=He,e.SharedTextMarker=xn,e.TextMarker=ir,e.LineWidget=bn,e.e_preventDefault=Ze,e.e_stopPropagation=fr,e.e_stop=It,e.addClass=Ce,e.contains=Le,e.rmClass=ee,e.keyNames=or}gu(Te),xu(Te);var Tu="iter insert remove copy getEditor constructor".split(" ");for(var pi in ot.prototype)ot.prototype.hasOwnProperty(pi)&&de(Tu,pi)<0&&(Te.prototype[pi]=function(e){return function(){return e.apply(this.doc,arguments)}}(ot.prototype[pi]));return Ve(ot),Te.inputStyles={textarea:We,contenteditable:me},Te.defineMode=function(e){!Te.defaults.mode&&e!="null"&&(Te.defaults.mode=e),In.apply(this,arguments)},Te.defineMIME=Lr,Te.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Te.defineMIME("text/plain","null"),Te.defineExtension=function(e,t){Te.prototype[e]=t},Te.defineDocExtension=function(e,t){ot.prototype[e]=t},Te.fromTextArea=ku,Lu(Te),Te.version="5.65.9",Te})}(ho)),ho.exports}var Pu=tt();(function(Oe,Be){(function(m){m(tt())})(function(m){m.defineMode("javascript",function(U,I){var G=U.indentUnit,A=I.statementIndent,w=I.jsonld,S=I.json||w,x=I.trackScope!==!1,C=I.typescript,W=I.wordCharacters||/[\w$\xa1-\uffff]/,P=function(){function f(Ie){return{type:Ie,style:"keyword"}}var p=f("keyword a"),v=f("keyword b"),N=f("keyword c"),le=f("keyword d"),he=f("operator"),ve={type:"atom",style:"atom"};return{if:f("if"),while:p,with:p,else:v,do
|
2022-11-25 04:57:33 +00:00
|
|
|
`+ne}q=q*2,L.lastIndex=B.ch;var V=L.exec(z);if(V){var ee=z.slice(0,V.index).split(`
|
|
|
|
|
`),T=V[0].split(`
|
2022-11-27 13:35:57 +00:00
|
|
|
`),K=B.line+ee.length-1,d=ee[ee.length-1].length;return{from:U(K,d),to:U(K+T.length-1,T.length==1?d+T[0].length:T[T.length-1].length),match:V}}}}function x(k,L,B){for(var z,q=0;q<=k.length;){L.lastIndex=q;var Q=L.exec(k);if(!Q)break;var g=Q.index+Q[0].length;if(g>k.length-B)break;(!z||g>z.index+z[0].length)&&(z=Q),q=Q.index+1}return z}function C(k,L,B){L=G(L,"g");for(var z=B.line,q=B.ch,Q=k.firstLine();z>=Q;z--,q=-1){var g=k.getLine(z),F=x(g,L,q<0?0:g.length-q);if(F)return{from:U(z,F.index),to:U(z,F.index+F[0].length),match:F}}}function W(k,L,B){if(!A(L))return C(k,L,B);L=G(L,"gm");for(var z,q=1,Q=k.getLine(B.line).length-B.ch,g=B.line,F=k.firstLine();g>=F;){for(var ne=0;ne<q&&g>=F;ne++){var V=k.getLine(g--);z=z==null?V:V+`
|
2022-11-25 04:57:33 +00:00
|
|
|
`+z}q*=2;var ee=x(z,L,Q);if(ee){var T=z.slice(0,ee.index).split(`
|
|
|
|
|
`),K=ee[0].split(`
|
2022-11-27 13:35:57 +00:00
|
|
|
`),d=g+T.length,ce=T[T.length-1].length;return{from:U(d,ce),to:U(d+K.length-1,K.length==1?ce+K[0].length:K[K.length-1].length),match:ee}}}}var P,j;String.prototype.normalize?(P=function(k){return k.normalize("NFD").toLowerCase()},j=function(k){return k.normalize("NFD")}):(P=function(k){return k.toLowerCase()},j=function(k){return k});function O(k,L,B,z){if(k.length==L.length)return B;for(var q=0,Q=B+Math.max(0,k.length-L.length);;){if(q==Q)return q;var g=q+Q>>1,F=z(k.slice(0,g)).length;if(F==B)return g;F>B?Q=g:q=g+1}}function R(k,L,B,z){if(!L.length)return null;var q=z?P:j,Q=q(L).split(/\r|\n\r?/);e:for(var g=B.line,F=B.ch,ne=k.lastLine()+1-Q.length;g<=ne;g++,F=0){var V=k.getLine(g).slice(F),ee=q(V);if(Q.length==1){var T=ee.indexOf(Q[0]);if(T==-1)continue e;var B=O(V,ee,T,q)+F;return{from:U(g,O(V,ee,T,q)+F),to:U(g,O(V,ee,T+Q[0].length,q)+F)}}else{var K=ee.length-Q[0].length;if(ee.slice(K)!=Q[0])continue e;for(var d=1;d<Q.length-1;d++)if(q(k.getLine(g+d))!=Q[d])continue e;var ce=k.getLine(g+Q.length-1),be=q(ce),Le=Q[Q.length-1];if(be.slice(0,Le.length)!=Le)continue e;return{from:U(g,O(V,ee,K,q)+F),to:U(g+Q.length-1,O(ce,be,Le.length,q))}}}}function D(k,L,B,z){if(!L.length)return null;var q=z?P:j,Q=q(L).split(/\r|\n\r?/);e:for(var g=B.line,F=B.ch,ne=k.firstLine()-1+Q.length;g>=ne;g--,F=-1){var V=k.getLine(g);F>-1&&(V=V.slice(0,F));var ee=q(V);if(Q.length==1){var T=ee.lastIndexOf(Q[0]);if(T==-1)continue e;return{from:U(g,O(V,ee,T,q)),to:U(g,O(V,ee,T+Q[0].length,q))}}else{var K=Q[Q.length-1];if(ee.slice(0,K.length)!=K)continue e;for(var d=1,B=g-Q.length+1;d<Q.length-1;d++)if(q(k.getLine(B+d))!=Q[d])continue e;var ce=k.getLine(g+1-Q.length),be=q(ce);if(be.slice(be.length-Q[0].length)!=Q[0])continue e;return{from:U(g+1-Q.length,O(ce,be,ce.length-Q[0].length,q)),to:U(g,O(V,ee,K.length,q))}}}}function H(k,L,B,z){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=k,B=B?k.clipPos(B):U(0,0),this.pos={from:B,to:B};var q;typeof z=="object"?q=z.caseFold:(q=z,z=null),typeof L=="string"?(q==null&&(q=!1),this.matches=function(Q,g){return(Q?D:R)(k,L,g,q)}):(L=G(L,"gm"),!z||z.multiline!==!1?this.matches=function(Q,g){return(Q?W:S)(k,L,g)}:this.matches=function(Q,g){return(Q?C:w)(k,L,g)})}H.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(k){var L=this.doc.clipPos(k?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(L=U(L.line,L.ch),k?(L.ch--,L.ch<0&&(L.line--,L.ch=(this.doc.getLine(L.line)||"").length)):(L.ch++,L.ch>(this.doc.getLine(L.line)||"").length&&(L.ch=0,L.line++)),m.cmpPos(L,this.doc.clipPos(L))!=0))return this.atOccurrence=!1;var B=this.matches(k,L);if(this.afterEmptyMatch=B&&m.cmpPos(B.from,B.to)==0,B)return this.pos=B,this.atOccurrence=!0,this.pos.match||!0;var z=U(k?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:z,to:z},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(k,L){if(!!this.atOccurrence){var B=m.splitLines(k);this.doc.replaceRange(B,this.pos.from,this.pos.to,L),this.pos.to=U(this.pos.from.line+B.length-1,B[B.length-1].length+(B.length==1?this.pos.from.ch:0))}}},m.defineExtension("getSearchCursor",function(k,L,B){return new H(this.doc,k,L,B)}),m.defineDocExtension("getSearchCursor",function(k,L,B){return new H(this,k,L,B)}),m.defineExtension("selectMatches",function(k,L){for(var B=[],z=this.getSearchCursor(k,this.getCursor("from"),L);z.findNext()&&!(m.cmpPos(z.to(),this.getCursor("to"))>0);)B.push({anchor:z.from(),head:z.to()});B.length&&this.setSelections(B,0)})})}()),ml.exports}var xl;function Ol(){return xl||(xl=1,function(Oe,Be){(function(m){m(tt(),co(),Ru.exports)})(function(m){m.defineExtension("showMatchesOnScrollbar",function(A,w,S){return typeof S=="string"&&(S={className:S}),S||(S={}),new U(this,A,w,S)});function U(A,w,S,x){this.cm=A,this.options=x;var C={listenForChanges:!1};for(var W in x)C[W]=x[W];C.className||(C.className="CodeMirror-search-match"),this.annotation=A.annotateScrollbar(C),this.que
|
|
|
|
|
`:ne=="r"?"\r":ne=="t"?" ":ne=="\\"?"\\":F})}function P(g){var F=g.match(/^\/(.*)\/([a-z]*)$/);if(F)try{g=new RegExp(F[1],F[2].indexOf("i")==-1?"":"i")}catch{}else g=W(g);return(typeof g=="string"?g=="":g.test(""))&&(g=/x^/),g}function j(g,F,ne){F.queryText=ne,F.query=P(ne),g.removeOverlay(F.overlay,A(F.query)),F.overlay=U(F.query,A(F.query)),g.addOverlay(F.overlay),g.showMatchesOnScrollbar&&(F.annotate&&(F.annotate.clear(),F.annotate=null),F.annotate=g.showMatchesOnScrollbar(F.query,A(F.query)))}function O(g,F,ne,V){var ee=G(g);if(ee.query)return R(g,F);var T=g.getSelection()||ee.lastQuery;if(T instanceof RegExp&&T.source=="x^"&&(T=null),ne&&g.openDialog){var K=null,d=function(ce,be){m.e_stop(be),ce&&(ce!=ee.queryText&&(j(g,ee,ce),ee.posFrom=ee.posTo=g.getCursor()),K&&(K.style.opacity=1),R(g,be.shiftKey,function(Le,we){var Ce;we.line<3&&document.querySelector&&(Ce=g.display.wrapper.querySelector(".CodeMirror-dialog"))&&Ce.getBoundingClientRect().bottom-4>g.cursorCoords(we,"window").top&&((K=Ce).style.opacity=.4)}))};S(g,k(g),T,d,function(ce,be){var Le=m.keyName(ce),we=g.getOption("extraKeys"),Ce=we&&we[Le]||m.keyMap[g.getOption("keyMap")][Le];Ce=="findNext"||Ce=="findPrev"||Ce=="findPersistentNext"||Ce=="findPersistentPrev"?(m.e_stop(ce),j(g,G(g),be),g.execCommand(Ce)):(Ce=="find"||Ce=="findPersistent")&&(m.e_stop(ce),d(be,ce))}),V&&T&&(j(g,ee,T),R(g,F))}else x(g,k(g),"Search for:",T,function(ce){ce&&!ee.query&&g.operation(function(){j(g,ee,ce),ee.posFrom=ee.posTo=g.getCursor(),R(g,F)})})}function R(g,F,ne){g.operation(function(){var V=G(g),ee=w(g,V.query,F?V.posFrom:V.posTo);!ee.find(F)&&(ee=w(g,V.query,F?m.Pos(g.lastLine()):m.Pos(g.firstLine(),0)),!ee.find(F))||(g.setSelection(ee.from(),ee.to()),g.scrollIntoView({from:ee.from(),to:ee.to()},20),V.posFrom=ee.from(),V.posTo=ee.to(),ne&&ne(ee.from(),ee.to()))})}function D(g){g.operation(function(){var F=G(g);F.lastQuery=F.query,F.query&&(F.query=F.queryText=null,g.removeOverlay(F.overlay),F.annotate&&(F.annotate.clear(),F.annotate=null))})}function H(g,F){var ne=g?document.createElement(g):document.createDocumentFragment();for(var V in F)ne[V]=F[V];for(var ee=2;ee<arguments.length;ee++){var T=arguments[ee];ne.appendChild(typeof T=="string"?document.createTextNode(T):T)}return ne}function k(g){var F=H("label",{className:"CodeMirror-search-label"},g.phrase("Search:"),H("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return F.setAttribute("for","CodeMirror-search-field"),H("",null,F," ",H("span",{style:"color: #666",className:"CodeMirror-search-hint"},g.phrase("(Use /re/ syntax for regexp search)")))}function L(g){return H("",null," ",H("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",H("span",{style:"color: #666",className:"CodeMirror-search-hint"},g.phrase("(Use /re/ syntax for regexp search)")))}function B(g){return H("",null,H("span",{className:"CodeMirror-search-label"},g.phrase("With:"))," ",H("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function z(g){return H("",null,H("span",{className:"CodeMirror-search-label"},g.phrase("Replace?"))," ",H("button",{},g.phrase("Yes"))," ",H("button",{},g.phrase("No"))," ",H("button",{},g.phrase("All"))," ",H("button",{},g.phrase("Stop")))}function q(g,F,ne){g.operation(function(){for(var V=w(g,F);V.findNext();)if(typeof F!="string"){var ee=g.getRange(V.from(),V.to()).match(F);V.replace(ne.replace(/\$(\d)/g,function(T,K){return ee[K]}))}else V.replace(ne)})}function Q(g,F){if(!g.getOption("readOnly")){var ne=g.getSelection()||G(g).lastQuery,V=F?g.phrase("Replace all:"):g.phrase("Replace:"),ee=H("",null,H("span",{className:"CodeMirror-search-label"},V),L(g));x(g,ee,V,ne,function(T){!T||(T=P(T),x(g,B(g),g.phrase("Replace with:"),"",function(K){if(K=W(K),F)q(g,T,K);else{D(g);var d=w(g,T,g.getCursor("from")),ce=function(){var Le=d.from(),we;!(we=d.findNext())&&(d=w(g,T),!(we=d.findNext())||Le&&d.from().line==Le.line&&d.from().ch==Le.ch)||(g.setSelection(d.from(),d.to()),g.scrollIntoView({from:d.from(),to:d.to(
|