52 lines
508 KiB
JavaScript
52 lines
508 KiB
JavaScript
|
var as=Object.defineProperty;var kd=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var Sd=Object.prototype.hasOwnProperty;var Td=(o,p)=>()=>(o&&(p=o(o=0)),p);var Ue=(o,p)=>()=>(p||o((p={exports:{}}).exports,p),p.exports);var Ld=(o,p,v,C)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of wd(p))!Sd.call(o,b)&&b!==v&&as(o,b,{get:()=>p[b],enumerable:!(C=kd(p,b))||C.enumerable});return o};var Cd=o=>Ld(as({},"__esModule",{value:!0}),o);var Re=Ue((Xo,Yo)=>{(function(o,p){typeof Xo=="object"&&typeof Yo<"u"?Yo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Xo,function(){"use strict";var o=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(o),C=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),_=/Edge\/(\d+)/.exec(o),s=C||b||_,g=s&&(C?document.documentMode||6:+(_||b)[1]),h=!_&&/WebKit\//.test(o),w=h&&/Qt\/\d+\.\d+/.test(o),k=!_&&/Chrome\/(\d+)/.exec(o),c=k&&+k[1],d=/Opera\//.test(o),S=/Apple Computer/.test(navigator.vendor),E=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),z=/PhantomJS/.test(o),y=S&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),H=/Android/.test(o),M=y||H||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),B=y||/Mac/.test(p),X=/\bCrOS\b/.test(o),re=/win/i.test(p),ne=d&&o.match(/Version\/(\d*\.\d*)/);ne&&(ne=Number(ne[1])),ne&&ne>=15&&(d=!1,h=!0);var N=B&&(w||d&&(ne==null||ne<12.11)),F=v||s&&g>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var V=function(e,t){var n=e.className,r=D(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 j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return j(e).appendChild(t)}function x(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 a=0;a<t.length;++a)i.appendChild(t[a]);return i}function K(e,t,n,r){var i=x(e,t,n,r);return i.setAttribute("role","presentation"),i}var Y;document.createRange?Y=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:Y=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 I(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 W(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 le(e,t){var n=e.className;D(t).test(n)||(e.className+=(n?" ":"")+t)}function ye(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!D(n[r]).test(t)&&(t+=" "+n[r]);return t}var q=function(e){e.select()};y?q=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(q=function(e){try{e.select()}catch{}});function T(e){return e.display.wrapper.ownerDocument}function de(e){return T(e).defaultView}function Ee(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function fe(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 xe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,l=i||0;;){var u=e.indexOf(" ",a);if(u<0||u>=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var pe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};pe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},pe.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 Ne=50,Me={toString:function(){return"CodeMirror.Pass"}},Fe={scroll:!1},Ge={origin:"*mouse"},Le={origin:"+move"};function Je(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" "
|
||
|
|
||
|
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 a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},pr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Xt=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Yt=null;function Vn(e){if(Yt!=null)return Yt;var t=J(e,x("span","x")),n=t.getBoundingClientRect(),r=Y(t,0,1).getBoundingClientRect();return Yt=Math.abs(n.left-r.left)>1}var Ut={},hr={};function Jn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ut[e]=t}function Wr(e,t){hr[e]=t}function Ot(e){if(typeof e=="string"&&hr.hasOwnProperty(e))e=hr[e];else if(e&&typeof e.name=="string"&&hr.hasOwnProperty(e.name)){var t=hr[e.name];typeof t=="string"&&(t={name:t}),e=te(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ot("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ot("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function nr(e,t){t=Ot(t);var n=Ut[t.name];if(!n)return nr(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}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 gr={};function ei(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};fe(t,n)}function ir(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 mr(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 bn(e,t,n){return e.startState?e.startState(t,n):!0}var at=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};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},at.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},at.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=xe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?xe(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return xe(this.string,null,this.tabSize)-(this.lineStart?xe(this.string,this.lineStart,this.tabSize):0)},at.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 a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.p
|
||
|
`?(ue=A.appendChild(x("span",ee[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ue.setAttribute("cm-text",ee[0]),e.col+=1):(ue=e.cm.options.specialCharPlaceholder(ee[0]),ue.setAttribute("cm-text",ee[0]),s&&g<9?A.appendChild(x("span",[ue])):A.appendChild(ue),e.col+=1);e.map.push(e.pos,e.pos+1,ue),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,n||r||i||m||a||l){var _e=n||"";r&&(_e+=r),i&&(_e+=i);var be=x("span",[A],_e,a);if(l)for(var Te in l)l.hasOwnProperty(Te)&&Te!="style"&&Te!="class"&&be.setAttribute(Te,l[Te]);return e.content.appendChild(be)}e.content.appendChild(A)}}function Hc(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),r+=a,n=a==" "}return r}function Bc(e,t){return function(n,r,i,a,l,u,f){i=i?i+" cm-force-border":"cm-force-border";for(var m=n.pos,A=m+r.length;;){for(var P=void 0,ee=0;ee<t.length&&(P=t[ee],!(P.to>m&&P.from<=m));ee++);if(P.to>=A)return e(n,r,i,a,l,u,f);e(n,r.slice(0,P.to-m),i,a,null,u,f),a=null,r=r.slice(P.to-m),m=P.to}}}function La(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 Wc(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(a,a=n[l]),Sa(n[l+1],t.cm.options));return}for(var u=i.length,f=0,m=1,A="",P,ee,Q=0,ae,ue,he,ve,_e;;){if(Q==f){ae=ue=he=ee="",_e=null,ve=null,Q=1/0;for(var be=[],Te=void 0,Ie=0;Ie<r.length;++Ie){var qe=r[Ie],We=qe.marker;if(We.type=="bookmark"&&qe.from==f&&We.widgetNode)be.push(We);else if(qe.from<=f&&(qe.to==null||qe.to>f||We.collapsed&&qe.to==f&&qe.from==f)){if(qe.to!=null&&qe.to!=f&&Q>qe.to&&(Q=qe.to,ue=""),We.className&&(ae+=" "+We.className),We.css&&(ee=(ee?ee+";":"")+We.css),We.startStyle&&qe.from==f&&(he+=" "+We.startStyle),We.endStyle&&qe.to==Q&&(Te||(Te=[])).push(We.endStyle,qe.to),We.title&&((_e||(_e={})).title=We.title),We.attributes)for(var Ve in We.attributes)(_e||(_e={}))[Ve]=We.attributes[Ve];We.collapsed&&(!ve||io(ve.marker,We)<0)&&(ve=qe)}else qe.from>f&&Q>qe.from&&(Q=qe.from)}if(Te)for(var mt=0;mt<Te.length;mt+=2)Te[mt+1]==Q&&(ue+=" "+Te[mt]);if(!ve||ve.from==f)for(var it=0;it<be.length;++it)La(t,0,be[it]);if(ve&&(ve.from||0)==f){if(La(t,(ve.to==null?u+1:ve.to)-f,ve.marker,ve.from==null),ve.to==null)return;ve.to==f&&(ve=!1)}}if(f>=u)break;for(var jt=Math.min(u,Q);;){if(A){var It=f+A.length;if(!ve){var ut=It>jt?A.slice(0,jt-f):A;t.addToken(t,ut,P?P+ae:ae,he,f+ut.length==Q?ue:"",ee,_e)}if(It>=jt){A=A.slice(jt-f),f=jt;break}f=It,he=""}A=i.slice(a,a=n[m++]),P=Sa(n[m++],t.cm.options)}}}function Ca(e,t,n){this.line=t,this.rest=Ic(t),this.size=this.rest?Xe(O(this.rest))-n+1:1,this.node=this.text=null,this.hidden=vr(e,t)}function li(e,t,n){for(var r=[],i,a=t;a<n;a=i){var l=new Ca(e.doc,ze(e.doc,a),a);i=a+l.size,r.push(l)}return r}var Kr=null;function Uc(e){Kr?Kr.ops.push(e):e.ownsGroup=Kr={ops:[e],delayedCallbacks:[]}}function $c(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 Kc(e,t){var n=e.ownsGroup;if(n)try{$c(n)}finally{Kr=null,t(n)}}var _n=null;function pt(e,t){var n=bt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Kr?i=Kr.delayedCallbacks:_n?i=_n:(i=_n=[],setTimeout(Gc,0));for(var a=function(u){i.push(function(){return n[u].apply(null,r)})},l=0;l<n.length;++l)a(l)}}function Gc(){var e=_n;_n=null;for(var t=0;t<e.length;++t)e[t]()}function Ea(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Xc(e,t):a=="gutter"?Ma(e,t,n,r):a=="class"?so(e,t):a=="widget"&&Yc(e,t,r)}t.changes=null}function kn(e){return e.node==e.text&&(e.node=x("div",null,null,"p
|
||
|
top: `+Te+"px; width: "+(Ie??f-be)+`px;
|
||
|
height: `+(qe-Te)+"px"))}function P(be,Te,Ie){var qe=ze(i,be),We=qe.text.length,Ve,mt;function it(ut,Ft){return ci(e,G(be,ut),"div",qe,Ft)}function jt(ut,Ft,yt){var dt=$a(e,qe,null,ut),ct=Ft=="ltr"==(yt=="after")?"left":"right",lt=yt=="after"?dt.begin:dt.end-(/\s/.test(qe.text.charAt(dt.end-1))?2:1);return it(lt,ct)[ct]}var It=xt(qe,i.direction);return se(It,Te||0,Ie??We,function(ut,Ft,yt,dt){var ct=yt=="ltr",lt=it(ut,ct?"left":"right"),Nt=it(Ft-1,ct?"right":"left"),un=Te==null&&ut==0,Tr=Ie==null&&Ft==We,St=dt==0,tr=!It||dt==It.length-1;if(Nt.top-lt.top<=3){var vt=(m?un:Tr)&&St,Go=(m?Tr:un)&&tr,fr=vt?u:(ct?lt:Nt).left,Or=Go?f:(ct?Nt:lt).right;A(fr,lt.top,Or-fr,lt.bottom)}else{var Pr,Et,cn,Zo;ct?(Pr=m&&un&&St?u:lt.left,Et=m?f:jt(ut,yt,"before"),cn=m?u:jt(Ft,yt,"after"),Zo=m&&Tr&&tr?f:Nt.right):(Pr=m?jt(ut,yt,"before"):u,Et=!m&&un&&St?f:lt.right,cn=!m&&Tr&&tr?u:Nt.left,Zo=m?jt(Ft,yt,"after"):f),A(Pr,lt.top,Et-Pr,lt.bottom),lt.bottom<Nt.top&&A(u,lt.bottom,null,Nt.top),A(cn,Nt.top,Zo-cn,Nt.bottom)}(!Ve||di(lt,Ve)<0)&&(Ve=lt),di(Nt,Ve)<0&&(Ve=Nt),(!mt||di(lt,mt)<0)&&(mt=lt),di(Nt,mt)<0&&(mt=Nt)}),{start:Ve,end:mt}}var ee=t.from(),Q=t.to();if(ee.line==Q.line)P(ee.line,ee.ch,Q.ch);else{var ae=ze(i,ee.line),ue=ze(i,Q.line),he=$t(ae)==$t(ue),ve=P(ee.line,ee.ch,he?ae.text.length+1:null).end,_e=P(Q.line,he?0:null,Q.ch).start;he&&(ve.top<_e.top-2?(A(ve.right,ve.top,null,ve.bottom),A(u,_e.top,_e.left,_e.bottom)):A(ve.right,ve.top,_e.left-ve.right,ve.bottom)),ve.bottom<_e.top&&A(u,ve.bottom,null,_e.top)}n.appendChild(a)}function _o(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()||Yr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||wo(e))}function ko(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Yr(e))},100)}function wo(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(tt(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),h&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),_o(e))}function Yr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(tt(e,"blur",e,t),e.state.focused=!1,V(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function pi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l<t.view.length;l++){var u=t.view[l],f=e.options.lineWrapping,m=void 0,A=0;if(!u.hidden){if(i+=u.line.height,s&&g<8){var P=u.node.offsetTop+u.node.offsetHeight;m=P-n,n=P}else{var ee=u.node.getBoundingClientRect();m=ee.bottom-ee.top,!f&&u.text.firstChild&&(A=u.text.firstChild.getBoundingClientRect().right-ee.left-1)}var Q=u.line.height-m;if((Q>.005||Q<-.005)&&(i<r&&(a-=Q),Wt(u.line,m),Ya(u.line),u.rest))for(var ae=0;ae<u.rest.length;ae++)Ya(u.rest[ae]);if(A>e.display.sizerWidth){var ue=Math.ceil(A/Xr(e.display));ue>e.display.maxLineLength&&(e.display.maxLineLength=ue,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Ya(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 hi(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-si(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=Qt(t,r),l=Qt(t,i);if(n&&n.ensure){var u=n.ensure.from.line,f=n.ensure.to.line;u<a?(a=u,l=Qt(t,lr(ze(t,u))+e.wrapper.clientHeight)):Math.min(f,t.lastLine())>=l&&(a=Qt(t,lr(ze(t,f))-e.wrapp
|
||
|
top: `+(t.top-n.viewOffset-si(e.display))+`px;
|
||
|
height: `+(t.bottom-t.top+Jt(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 ff(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?G(t.line,t.ch+1,"before"):t,t=t.ch?G(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var l=!1,u=Kt(e,t),f=!n||n==t?u:Kt(e,n);i={left:Math.min(u.left,f.left),top:Math.min(u.top,f.top)-r,right:Math.max(u.left,f.left),bottom:Math.max(u.bottom,f.bottom)+r};var m=So(e,i),A=e.doc.scrollTop,P=e.doc.scrollLeft;if(m.scrollTop!=null&&(Cn(e,m.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),m.scrollLeft!=null&&(qr(e,m.scrollLeft),Math.abs(e.doc.scrollLeft-P)>1&&(l=!0)),!l)break}return i}function df(e,t){var n=So(e,t);n.scrollTop!=null&&Cn(e,n.scrollTop),n.scrollLeft!=null&&qr(e,n.scrollLeft)}function So(e,t){var n=e.display,r=Zr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=co(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+uo(n),f=t.top<r,m=t.bottom>u-r;if(t.top<i)l.scrollTop=f?0:t.top;else if(t.bottom>i+a){var A=Math.min(t.top,(m?u:t.bottom)-a);A!=i&&(l.scrollTop=A)}var P=e.options.fixedGutter?0:n.gutters.offsetWidth,ee=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-P,Q=zr(e)-n.gutters.offsetWidth,ae=t.right-t.left>Q;return ae&&(t.right=t.left+Q),t.left<10?l.scrollLeft=0:t.left<ee?l.scrollLeft=Math.max(0,t.left+P-(ae?0:10)):t.right>Q+ee-3&&(l.scrollLeft=t.right+(ae?0:10)-Q),l}function To(e,t){t!=null&&(gi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Qr(e){gi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ln(e,t,n){(t!=null||n!=null)&&gi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function pf(e,t){gi(e),e.curOp.scrollToPos=t}function gi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Wa(e,t.from),r=Wa(e,t.to);Qa(e,n,r,t.margin)}}function Qa(e,t,n,r){var i=So(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ln(e,i.scrollLeft,i.scrollTop)}function Cn(e,t){Math.abs(e.doc.scrollTop-t)<2||(v||Co(e,{top:t}),Va(e,t,!0),v&&Co(e),Mn(e,100))}function Va(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 qr(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,nl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function En(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+uo(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+Jt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ir=function(e,t,n){this.cm=n;var r=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ge(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ge(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&g<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ir.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.
|
||
|
`},setDirection:gt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&zf(this.cm))})}),qt.prototype.eachLine=qt.prototype.iter;var Il=0;function Bf(e){var t=this;if(Fl(t),!(ot(t,e)||sr(t.display,e))){kt(e),s&&(Il=+new Date);var n=Ar(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),l=0,u=function(){++l==i&&ht(t,function(){n=Pe(t.doc,n);var Q={from:n,to:n,text:t.doc.splitLines(a.filter(function(ae){return ae!=null}).join(t.doc.lineSeparator())),origin:"paste"};tn(t.doc,Q),yl(t.doc,xr(Pe(t.doc,n),Pe(t.doc,_r(Q))))})()},f=function(Q,ae){if(t.options.allowDropFileTypes&&De(t.options.allowDropFileTypes,Q.type)==-1){u();return}var ue=new FileReader;ue.onerror=function(){return u()},ue.onload=function(){var he=ue.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(he)){u();return}a[ae]=he,u()},ue.readAsText(Q)},m=0;m<r.length;m++)f(r[m],m);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 A=e.dataTransfer.getData("Text");if(A){var P;if(t.state.draggingText&&!t.state.draggingText.copy&&(P=t.listSelections()),_i(t.doc,xr(n,n)),P)for(var ee=0;ee<P.length;++ee)rn(t.doc,"",P[ee].anchor,P[ee].head,"drag");t.replaceSelection(A,"around","paste"),t.display.input.focus()}}catch{}}}}function Wf(e,t){if(s&&(!e.state.draggingText||+new Date-Il<100)){rr(t);return}if(!(ot(e,t)||sr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!S)){var n=x("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Uf(e,t){var n=Ar(e,t);if(n){var r=document.createDocumentFragment();xo(e,n,r),e.display.dragCursor||(e.display.dragCursor=x("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),J(e.display.dragCursor,r)}}function Fl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Nl(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 a=0;a<n.length;a++)e(n[a])})}}var Ol=!1;function $f(){Ol||(Kf(),Ol=!0)}function Kf(){var e;ge(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Nl(Gf)},100))}),ge(window,"blur",function(){return Nl(Yr)})}function Gf(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Sr={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"},jn=0;jn<10;jn++)Sr[jn+48]=Sr[jn+96]=String(jn);for(var Si=65;Si<=90;Si++)Sr[Si]=String.fromCharCode(Si);for(var Rn=1;Rn<=12;Rn++)Sr[Rn+111]=Sr[Rn+63235]="F"+Rn;var cr={};cr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},cr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"delete
|
||
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Hl(e,t){var n=ze(e.doc,t),r=$t(n);return r!=n&&(t=Xe(r)),jo(!0,e,r,t,1)}function Qf(e,t){var n=ze(e.doc,t),r=qc(n);return r!=n&&(t=Xe(r)),jo(!0,e,n,t,-1)}function Bl(e,t){var n=Hl(e,t.line),r=ze(e.doc,n.line),i=xt(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=a&&t.ch;return G(n.line,l?0:a,n.sticky)}return n}function Li(e,t,n){if(typeof t=="string"&&(t=Hn[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)!=Me}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Vf(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=on(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&on(t,e.options.extraKeys,n,e)||on(t,e.options.keyMap,n,e)}var Jf=new pe;function Bn(e,t,n,r){var i=e.state.keySeq;if(i){if(Pl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Jf.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Wl(e,i+" "+t,n,r))return!0}return Wl(e,t,n,r)}function Wl(e,t,n,r){var i=Vf(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&pt(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(kt(n),_o(e)),!!i}function Ul(e,t){var n=Rl(t,!0);return n?t.shiftKey&&!e.state.keySeq?Bn(e,"Shift-"+n,t,function(r){return Li(e,r,!0)})||Bn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Li(e,r)}):Bn(e,n,t,function(r){return Li(e,r)}):!1}function ed(e,t,n){return Bn(e,"'"+n+"'",t,function(r){return Li(e,r,!0)})}var Ro=null;function $l(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=W(T(t)),!ot(t,e))){s&&g<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ul(t,e);d&&(Ro=r?n:null,!r&&n==88&&!Xt&&(B?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),v&&!B&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&td(t)}}function td(e){var t=e.display.lineDiv;le(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(V(t,"CodeMirror-crosshair"),_t(document,"keyup",n),_t(document,"mouseover",n))}ge(document,"keyup",n),ge(document,"mouseover",n)}function Kl(e){e.keyCode==16&&(this.doc.sel.shift=!1),ot(this,e)}function Gl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(sr(t.display,e)||ot(t,e)||e.ctrlKey&&!e.altKey||B&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==Ro){Ro=null,kt(e);return}if(!(d&&(!e.which||e.which<10)&&Ul(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(ed(t,e,i)||t.display.input.onKeyPress(e))}}}var rd=400,Ho=function(e,t,n){this.time=e,this.pos=t,this.button=n};Ho.prototype.compare=function(e,t,n){return this.time+rd>e&&ie(t,this.pos)==0&&n==this.button};var Wn,Un;function nd(e,t){var n=+new Date;return Un&&Un.compare(n,e,t)?(Wn=Un=null,"triple"):Wn&&Wn.compare(n,e,t)?(Un=new Ho(n,e,t),Wn=null,"double"):(Wn=new Ho(n,e,t),Un=null,"single")}function Zl(e){var t=this,n=t.display;if(!(ot(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,sr(n,e)){h||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Bo(t,e)){var r=Ar(t,e),i=mn(e),a=r?nd(r,i):"single";de(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&id(t,i,r,a,e))&&(i==1?r?ad(t,r,a,e):At(e)==n.scroller&&kt(e):i==2?(r&&xi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(F?t.display.input.onContextMenu(e):ko(t)))}}}function id(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Bn(e,jl(a,i),i,function(l){if(typeof l=="string"&&(l=Hn[l]),!l)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=l(e,n)!=Me}finally{e.state.suppressEdits=!1}return u})}function od(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==
|
||
|
`)==t){if(r.ranges.length%Zt.text.length==0){m=[];for(var A=0;A<Zt.text.length;A++)m.push(a.splitLines(Zt.text[A]))}}else f.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(m=Z(f,function(ve){return[ve]}));for(var P=e.curOp.updateInput,ee=r.ranges.length-1;ee>=0;ee--){var Q=r.ranges[ee],ae=Q.from(),ue=Q.to();Q.empty()&&(n&&n>0?ae=G(ae.line,ae.ch-n):e.state.overwrite&&!u?ue=G(ue.line,Math.min(ze(a,ue.line).text.length,ue.ch+O(f).length)):u&&Zt&&Zt.lineWise&&Zt.text.join(`
|
||
|
`)==f.join(`
|
||
|
`)&&(ae=ue=G(ae.line,0)));var he={from:ae,to:ue,text:m?m[ee%m.length]:f,origin:i||(u?"paste":e.state.cutIncoming>l?"cut":"+input")};tn(e.doc,he),pt(e,"inputRead",e,he)}t&&!u&&ts(e,t),Qr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=P),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function es(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Pt(t,function(){return Uo(t,n,0,null,"paste")}),!0}function ts(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 a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var u=0;u<a.electricChars.length;u++)if(t.indexOf(a.electricChars.charAt(u))>-1){l=$n(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=$n(e,i.head.line,"smart"));l&&pt(e,"electricInput",e,i.head.line)}}}function rs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:G(i,0),head:G(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function $o(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function ns(){var e=x("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=x("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return h?e.style.width="1000px":e.setAttribute("wrap","off"),y&&(e.style.border="1px solid black"),t}function gd(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){de(this).focus(),this.display.input.focus()},setOption:function(r,i){var a=this.options,l=a[r];a[r]==i&&r!="mode"||(a[r]=i,t.hasOwnProperty(r)&&ht(this,t[r])(this,i,l),tt(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](Ti(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==r||i[a].name==r)return i.splice(a,1),!0},addOverlay:Ct(function(r,i){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");me(this.state.overlays,{mode:a,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,Dt(this)}),removeOverlay:Ct(function(r){for(var i=this.state.overlays,a=0;a<i.length;++a){var l=i[a].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(a,1),this.state.modeGen++,Dt(this);return}}}),indentLine:Ct(function(r,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),L(this.doc,r)&&$n(this,r,i,a)}),indentSelection:Ct(function(r){for(var i=this.doc.sel.ranges,a=-1,l=0;l<i.length;l++){var u=i[l];if(u.empty())u.head.line>a&&($n(this,u.head.line,r,!0),a=u.head.line,l==this.doc.sel.primIndex&&Qr(this));else{var f=u.from(),m=u.to(),A=Math.max(a,f.line);a=Math.min(this.lastLine(),m.line-(m.ch?0:1))+1;for(var P=A;P<a;++P)$n(this,P,r);var ee=this.doc.sel.ranges;f.ch==0&&i.length==ee.length&&ee[l].from().ch>0&&No(this.doc,l,new Ye(f,ee[l].to()),Fe)}}}),getTokenAt:function(r,i){return pa(this,r,i)},getLineTokens:function(r,i){return pa(this,G(r),i,!0)},getTokenTypeAt:function(r){r=Pe(this.doc,r);var i=ca(this,ze(this.doc,r.line)),a=0,l=(i.length-1)/2,u=r.ch,f;if(u==0)f=i[2];else for(;;){var m=a+l>>1;if((m?i[m*2-1]:0)>=u)l=m;else if(i[m*2+1]<u)a=m+1;else{f=i[m*2+2];break}}var A=f?f.indexOf("overlay "):-1;return A<0?f:A==0?null:f.slice(0,A-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 a=[];if(!n.hasOwnProperty(i))return a;var l=n[i],u=this.getModeAt(r);if(typeof u[i]=="string")l[
|
||
|
`,he=je(ue,Q)?"w":ee&&ue==`
|
||
|
`?"n":!ee||/\s/.test(ue)?null:"p";if(ee&&!ae&&!he&&(he="s"),P&&P!=he){n<0&&(n=1,A(),t.sticky="after");break}if(he&&(P=he),n>0&&!A(!ae))break}var ve=ki(e,t,a,l,!0);return Oe(a,ve)&&(ve.hitSide=!0),ve}function is(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,de(e).innerHeight||i(e).documentElement.clientHeight),f=Math.max(u-.5*Zr(e.display),3);l=(n>0?t.bottom:t.top)+n*f}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var m;m=go(e,a,l),!!m.outside;){if(n<0?l<=0:l>=i.height){m.hitSide=!0;break}l+=n*5}return m}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new pe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,$o(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var f=u.target;f;f=f.parentNode){if(f==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}ge(i,"paste",function(u){!a(u)||ot(r,u)||es(u,r)||g<=11&&setTimeout(ht(r,function(){return t.updateFromDOM()}),20)}),ge(i,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),ge(i,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),ge(i,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ge(i,"touchstart",function(){return n.forceCompositionEnd()}),ge(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(u){if(!(!a(u)||ot(r,u))){if(r.somethingSelected())Ei({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var f=rs(r);Ei({lineWise:!0,text:f.text}),u.type=="cut"&&r.operation(function(){r.setSelections(f.ranges,0,Fe),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var m=Zt.text.join(`
|
||
|
`);if(u.clipboardData.setData("Text",m),u.clipboardData.getData("Text")==m){u.preventDefault();return}}var A=ns(),P=A.firstChild;$o(P),r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),P.value=Zt.text.join(`
|
||
|
`);var ee=W(i.ownerDocument);q(P),setTimeout(function(){r.display.lineSpace.removeChild(A),ee.focus(),ee==i&&n.showPrimarySelection()},50)}}ge(i,"copy",l),ge(i,"cut",l)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Za(this.cm,!1);return e.focus=W(this.div.ownerDocument)==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.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 a=zi(t,e.anchorNode,e.anchorOffset),l=zi(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&l&&!l.bad&&ie(ft(a,l),r)==0&&ie(Ze(a,l),i)==0)){var u=t.display.view,f=r.line>=t.display.viewFrom&&os(t,r)||{node:u[0].measure.map[2],offset:0},m=i.line<t.display.viewTo&&os(t,i);if(!m){var A=u[u.length-1].measure,P=A.maps?A.maps[A.maps.length-1]:A.map;m={node:P[P.length-1],offset:P[P.length-2]-P[P.length-3]}}if(!f||!m){e.removeAllRanges();return}var ee=e.rangeCount&&e.getRangeAt(0),Q;try{Q=Y(f.node,f.offset,m.offset,m.node)}catch{}Q&&(!v&&t.state.focused?(e.collapse(f.node,f.offset),Q.collapsed||(e.removeAllRanges(),e.addRange(Q))):(e.removeAllRanges(),e.addRange(Q)),ee&&e.anchorNode==null?e.addRange(ee):v&&this.startGracePeriod()),this.rememberSelection()}},Qe.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)},Qe.prototype.showMultipleSelections=function(e){J(this.cm.display.cursorDiv,e.cursors),J(this.cm.display.selectionDiv,e.selection)},Qe.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Qe.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},Qe.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||W(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qe.prototype.blur=function(){this.div.blur()},Qe.prototype.getField=function(){return this.div},Qe.prototype.supportsTouch=function(){return!0},Qe.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Pt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},Qe.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Qe.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(H&&k&&this.cm.display.gutterSpecs.length&&md(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=zi(t,e.anchorNode,e.anchorOffset),r=zi(t,e.focusNode,e.focusOffset);n&&r&&Pt(t,function(){wt(t.doc,xr(n,r),Fe),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Qe.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=G(r.line-1,ze(e.doc,r.line-
|
||
|
`),q(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ge(i,"cut",a),ge(i,"copy",a),ge(e.scroller,"paste",function(l){if(!(sr(e,l)||ot(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var u=new Event("paste");u.clipboardData=l.clipboardData,i.dispatchEvent(u)}}),ge(e.lineSpace,"selectstart",function(l){sr(e,l)||kt(l)}),ge(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"})}}),ge(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},st.prototype.createField=function(e){this.wrapper=ns(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;$o(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},st.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},st.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Za(e);if(e.options.moveInputWithCursor){var i=Kt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},st.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},st.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&&q(this.textarea),s&&g>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&g>=9&&(this.hasSelection=null));this.resetting=!1}},st.prototype.getField=function(){return this.textarea},st.prototype.supportsTouch=function(){return!1},st.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!M||W(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},st.prototype.blur=function(){this.textarea.blur()},st.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},st.prototype.receivedFocus=function(){this.slowPoll()},st.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},st.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)},st.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||pr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&g>=9&&this.hasSelection===i||B&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l<u&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Pt(t,function(){Uo(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},st.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},st.prototype.onKeyPress=function(){s&&g>=9&&(this.hasSelection=null),this.fastPoll()},st.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Ar(n,e),l=r.scroller.scrollTop;if(!a||d)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&&ht(n,wt)(n.doc,xr(a),Fe);var f=i.style.cssText,m=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||
|
top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px;
|
||
|
z-index: 1000; background: `+(s?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var P;h&&(P=i.ownerDocument.defaultView.scrollY),r.input.focus(),h&&i.ownerDocument.defaultView.scrollTo(null,P),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Q,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),he="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=he,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=he.length,r.selForContextMenu=n.doc.sel}}function Q(){if(t.contextMenuPending==Q&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=f,s&&g<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&g<9)&&ee();var ue=0,he=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?ht(n,Sl)(n):ue++<10?r.detectingSelectAll=setTimeout(he,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(he,200)}}if(s&&g>=9&&ee(),F){rr(e);var ae=function(){_t(window,"mouseup",ae),setTimeout(Q,20)};ge(window,"mouseup",ae)}else setTimeout(Q,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function yd(e,t){if(t=t?fe(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=W(e.ownerDocument);t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(ge(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=nt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function xd(e){e.off=_t,e.on=ge,e.wheelEventPixels=Cf,e.Doc=qt,e.splitLines=vn,e.countColumn=xe,e.findColumn=Je,e.isWordChar=oe,e.Pass=Me,e.signal=tt,e.Line=$r,e.changeEnd=_r,e.scrollbarModel=el,e.Pos=G,e.cmpPos=ie,e.modes=Ut,e.mimeModes=hr,e.resolveMode=Ot,e.getMode=nr,e.modeExtensions=gr,e.extendMode=ei,e.copyState=ir,e.startState=bn,e.innerMode=mr,e.commands=Hn,e.keyMap=cr,e.keyName=Rl,e.isModifierKey=Pl,e.lookupKey=on,e.normalizeKeyMap=Xf,e.StringStream=at,e.SharedTextMarker=Pn,e.TextMarker=wr,e.LineWidget=On,e.e_preventDefault=kt,e.e_stopPropagation=Er,e.e_stop=rr,e.addClass=le,e.contains=I,e.rmClass=V,e.keyNames=Sr}fd(nt),gd(nt);var _d="iter insert remove copy getEditor constructor".split(" ");for(var Mi in qt.prototype)qt.prototype.hasOwnProperty(Mi)&&De(_d,Mi)<0&&(nt.prototype[Mi]=function(e){return function(){return e.apply(this.doc,arguments)}}(qt.prototype[Mi]));return Lt(qt),nt.inputStyles={textarea:st,contenteditable:Qe},nt.defineMode=function(e){!nt.defaults.mode&&e!="null"&&(nt.defaults.mode=e),Jn.apply(this,arguments)},nt.defineMIME=Wr,nt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),nt.defineMIME("text/plain","null"),nt.defineExtension=function(e,t){nt.prototype[e]=t},nt.defineDocExtension=function(e,t){qt.prototype[e]=t},nt.fromTextArea=yd,xd(nt),nt.version="5.65.15",nt})});var Kn=Ue((ls,ss)=>{(function(o){typeof ls=="object"&&typeof ss=="object"?o(Re()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,v,C){return{startState:function(){return{base:o.startState(p),overlay:o.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(v,b.ov
|
||
|
`}else{var B=z[1],X=z[5],re=!(C.test(z[2])||z[2].indexOf(">")>=0),ne=re?parseInt(z[3],10)+1+z[4]:z[2].replace("x"," ");g[h]=`
|
||
|
`+B+ne+X,re&&b(_,w)}}_.replaceSelections(g)};function b(_,s){var g=s.line,h=0,w=0,k=p.exec(_.getLine(g)),c=k[1];do{h+=1;var d=g+h,S=_.getLine(d),E=p.exec(S);if(E){var z=E[1],y=parseInt(k[3],10)+h-w,H=parseInt(E[3],10),M=H;if(c===z&&!isNaN(H))y===H&&(M=H+1),y>H&&(M=y+1),_.replaceRange(S.replace(p,z+M+E[4]+E[5]),{line:d,ch:0},{line:d,ch:S.length});else{if(c.length>z.length||c.length<z.length&&h===1)return;w+=1}}}while(E)}})});var hs=Ue((ds,ps)=>{(function(o){typeof ds=="object"&&typeof ps=="object"?o(Re()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){o.defineOption("placeholder","",function(g,h,w){var k=w&&w!=o.Init;if(h&&!k)g.on("blur",b),g.on("change",_),g.on("swapDoc",_),o.on(g.getInputField(),"compositionupdate",g.state.placeholderCompose=function(){C(g)}),_(g);else if(!h&&k){g.off("blur",b),g.off("change",_),g.off("swapDoc",_),o.off(g.getInputField(),"compositionupdate",g.state.placeholderCompose),p(g);var c=g.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}h&&!g.hasFocus()&&b(g)});function p(g){g.state.placeholder&&(g.state.placeholder.parentNode.removeChild(g.state.placeholder),g.state.placeholder=null)}function v(g){p(g);var h=g.state.placeholder=document.createElement("pre");h.style.cssText="height: 0; overflow: visible",h.style.direction=g.getOption("direction"),h.className="CodeMirror-placeholder CodeMirror-line-like";var w=g.getOption("placeholder");typeof w=="string"&&(w=document.createTextNode(w)),h.appendChild(w),g.display.lineSpace.insertBefore(h,g.display.lineSpace.firstChild)}function C(g){setTimeout(function(){var h=!1;if(g.lineCount()==1){var w=g.getInputField();h=w.nodeName=="TEXTAREA"?!g.getLine(0).length:!/[^\u200b]/.test(w.querySelector(".CodeMirror-line").textContent)}h?v(g):p(g)},20)}function b(g){s(g)&&v(g)}function _(g){var h=g.getWrapperElement(),w=s(g);h.className=h.className.replace(" CodeMirror-empty","")+(w?" CodeMirror-empty":""),w?v(g):p(g)}function s(g){return g.lineCount()===1&&g.getLine(0)===""}})});var vs=Ue((gs,ms)=>{(function(o){typeof gs=="object"&&typeof ms=="object"?o(Re()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineOption("styleSelectedText",!1,function(k,c,d){var S=d&&d!=o.Init;c&&!S?(k.state.markedSelection=[],k.state.markedSelectionStyle=typeof c=="string"?c:"CodeMirror-selectedtext",h(k),k.on("cursorActivity",p),k.on("change",v)):!c&&S&&(k.off("cursorActivity",p),k.off("change",v),g(k),k.state.markedSelection=k.state.markedSelectionStyle=null)});function p(k){k.state.markedSelection&&k.operation(function(){w(k)})}function v(k){k.state.markedSelection&&k.state.markedSelection.length&&k.operation(function(){g(k)})}var C=8,b=o.Pos,_=o.cmpPos;function s(k,c,d,S){if(_(c,d)!=0)for(var E=k.state.markedSelection,z=k.state.markedSelectionStyle,y=c.line;;){var H=y==c.line?c:b(y,0),M=y+C,B=M>=d.line,X=B?d:b(M,0),re=k.markText(H,X,{className:z});if(S==null?E.push(re):E.splice(S++,0,re),B)break;y=M}}function g(k){for(var c=k.state.markedSelection,d=0;d<c.length;++d)c[d].clear();c.length=0}function h(k){g(k);for(var c=k.listSelections(),d=0;d<c.length;d++)s(k,c[d].from(),c[d].to())}function w(k){if(!k.somethingSelected())return g(k);if(k.listSelections().length>1)return h(k);var c=k.getCursor("start"),d=k.getCursor("end"),S=k.state.markedSelection;if(!S.length)return s(k,c,d);var E=S[0].find(),z=S[S.length-1].find();if(!E||!z||d.line-c.line<=C||_(c,z.to)>=0||_(d,E.from)<=0)return h(k);for(;_(c,E.from)>0;)S.shift().clear(),E=S[0].find();for(_(c,E.from)<0&&(E.to.line-c.line<C?(S.shift().clear(),s(k,c,E.to,0)):s(k,c,E.from,0));_(d,z.to)<0;)S.pop().clear(),z=S[S.length-1].find();_(d,z.to)>0&&(d.line-z.from.line<C?(S.pop().clear(),s(k,z.from,d)):s(k,z.to,d))}})});var xs=Ue((bs,ys)=>{(function(o){typeof bs=="object"&&typeof ys=="object"?o(Re()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=o.Pos;function v(y){var H=y.flags;return H??(y.ignoreCase?"i":"")+(y.glo
|
||
|
`+F}X=X*2,H.lastIndex=M.ch;var D=H.exec(B);if(D){var V=B.slice(0,D.index).split(`
|
||
|
`),j=D[0].split(`
|
||
|
`),J=M.line+V.length-1,x=V[V.length-1].length;return{from:p(J,x),to:p(J+j.length-1,j.length==1?x+j[0].length:j[j.length-1].length),match:D}}}}function g(y,H,M){for(var B,X=0;X<=y.length;){H.lastIndex=X;var re=H.exec(y);if(!re)break;var ne=re.index+re[0].length;if(ne>y.length-M)break;(!B||ne>B.index+B[0].length)&&(B=re),X=re.index+1}return B}function h(y,H,M){H=C(H,"g");for(var B=M.line,X=M.ch,re=y.firstLine();B>=re;B--,X=-1){var ne=y.getLine(B),N=g(ne,H,X<0?0:ne.length-X);if(N)return{from:p(B,N.index),to:p(B,N.index+N[0].length),match:N}}}function w(y,H,M){if(!b(H))return h(y,H,M);H=C(H,"gm");for(var B,X=1,re=y.getLine(M.line).length-M.ch,ne=M.line,N=y.firstLine();ne>=N;){for(var F=0;F<X&&ne>=N;F++){var D=y.getLine(ne--);B=B==null?D:D+`
|
||
|
`+B}X*=2;var V=g(B,H,re);if(V){var j=B.slice(0,V.index).split(`
|
||
|
`),J=V[0].split(`
|
||
|
`),x=ne+j.length,K=j[j.length-1].length;return{from:p(x,K),to:p(x+J.length-1,J.length==1?K+J[0].length:J[J.length-1].length),match:V}}}}var k,c;String.prototype.normalize?(k=function(y){return y.normalize("NFD").toLowerCase()},c=function(y){return y.normalize("NFD")}):(k=function(y){return y.toLowerCase()},c=function(y){return y});function d(y,H,M,B){if(y.length==H.length)return M;for(var X=0,re=M+Math.max(0,y.length-H.length);;){if(X==re)return X;var ne=X+re>>1,N=B(y.slice(0,ne)).length;if(N==M)return ne;N>M?re=ne:X=ne+1}}function S(y,H,M,B){if(!H.length)return null;var X=B?k:c,re=X(H).split(/\r|\n\r?/);e:for(var ne=M.line,N=M.ch,F=y.lastLine()+1-re.length;ne<=F;ne++,N=0){var D=y.getLine(ne).slice(N),V=X(D);if(re.length==1){var j=V.indexOf(re[0]);if(j==-1)continue e;var M=d(D,V,j,X)+N;return{from:p(ne,d(D,V,j,X)+N),to:p(ne,d(D,V,j+re[0].length,X)+N)}}else{var J=V.length-re[0].length;if(V.slice(J)!=re[0])continue e;for(var x=1;x<re.length-1;x++)if(X(y.getLine(ne+x))!=re[x])continue e;var K=y.getLine(ne+re.length-1),Y=X(K),I=re[re.length-1];if(Y.slice(0,I.length)!=I)continue e;return{from:p(ne,d(D,V,J,X)+N),to:p(ne+re.length-1,d(K,Y,I.length,X))}}}}function E(y,H,M,B){if(!H.length)return null;var X=B?k:c,re=X(H).split(/\r|\n\r?/);e:for(var ne=M.line,N=M.ch,F=y.firstLine()-1+re.length;ne>=F;ne--,N=-1){var D=y.getLine(ne);N>-1&&(D=D.slice(0,N));var V=X(D);if(re.length==1){var j=V.lastIndexOf(re[0]);if(j==-1)continue e;return{from:p(ne,d(D,V,j,X)),to:p(ne,d(D,V,j+re[0].length,X))}}else{var J=re[re.length-1];if(V.slice(0,J.length)!=J)continue e;for(var x=1,M=ne-re.length+1;x<re.length-1;x++)if(X(y.getLine(M+x))!=re[x])continue e;var K=y.getLine(ne+1-re.length),Y=X(K);if(Y.slice(Y.length-re[0].length)!=re[0])continue e;return{from:p(ne+1-re.length,d(K,Y,K.length-re[0].length,X)),to:p(ne,d(D,V,J.length,X))}}}}function z(y,H,M,B){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=y,M=M?y.clipPos(M):p(0,0),this.pos={from:M,to:M};var X;typeof B=="object"?X=B.caseFold:(X=B,B=null),typeof H=="string"?(X==null&&(X=!1),this.matches=function(re,ne){return(re?E:S)(y,H,ne,X)}):(H=C(H,"gm"),!B||B.multiline!==!1?this.matches=function(re,ne){return(re?w:s)(y,H,ne)}:this.matches=function(re,ne){return(re?h:_)(y,H,ne)})}z.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(y){var H=this.doc.clipPos(y?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(H=p(H.line,H.ch),y?(H.ch--,H.ch<0&&(H.line--,H.ch=(this.doc.getLine(H.line)||"").length)):(H.ch++,H.ch>(this.doc.getLine(H.line)||"").length&&(H.ch=0,H.line++)),o.cmpPos(H,this.doc.clipPos(H))!=0))return this.atOccurrence=!1;var M=this.matches(y,H);if(this.afterEmptyMatch=M&&o.cmpPos(M.from,M.to)==0,M)return this.pos=M,this.atOccurrence=!0,this.pos.match||!0;var B=p(y?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:B,to:B},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(y,H){if(this.atOccurrence){var M=o.splitLines(y);this.doc.replaceRange(M,this.pos.from,this.pos.to,H),this.pos.to=p(this.pos.from.line+M.length-1,M[M.length-1].length+(M.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(y,H,M){return new z(this.doc,y,H,M)}),o.defineDocExtension("getSearchCursor",function(y,H,M){return new z(this,y,H,M)}),o.defineExtension("selectMatches",function(y,H){for(var M=[],B=this.getSearchCursor(y,this.getCursor("from"),H);B.findNext()&&!(o.cmpPos(B.to(),this.getCursor("to"))>0);)M.push({anchor:B.from(),head:B.to()});M.length&&this.setSelections(M,0)})})});var Qo=Ue((_s,ks)=>{(function(o){typeof _s=="object"&&typeof ks=="object"?o(Re()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(I,W,le,ye,q,T){this.indented=I,this.column=W,this.type=le,this.info=ye,this.align=q,this.prev=T}function v(I,W,le,ye){var q=I.indented;return I.context&&I.context.type=="statement"&&le!="statement"&&(q=I.context.ind
|
||
|
`&&(b.innerActive=b.inner=null);else for(var s=0;s<v.length;++s){var g=v[s];g.open===`
|
||
|
`&&(b.innerActive=g,b.inner=o.startState(g.mode,_.indent?_.indent(b.outer,"",""):0))}},electricChars:p.electricChars,innerMode:function(b){return b.inner?{state:b.inner,mode:b.innerActive.mode}:{state:b.outer,mode:p}}}}})});var oc=Ue((nc,ic)=>{(function(o){typeof nc=="object"&&typeof ic=="object"?o(Re(),Ai(),rc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),o.defineMode("handlebars",function(p,v){var C=o.getMode(p,"handlebars-tags");return!v||!v.base?C:o.multiplexingMode(o.getMode(p,v.base),{open:"{{",close:/\}\}\}?/,mode:C,parseDelimiters:!0})}),o.defineMIME("text/x-handlebars-template","handlebars")})});var sc=Ue((ac,lc)=>{(function(o){"use strict";typeof ac=="object"&&typeof lc=="object"?o(Re(),Kn(),dn(),pn(),Yu(),fn(),Jo(),ea(),Ju(),oc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],o):o(CodeMirror)})(function(o){var p={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};o.defineMode("vue-template",function(v,C){var b={token:function(_){if(_.match(/^\{\{.*?\}\}/))return"meta mustache";for(;_.next()&&!_.match("{{",!1););return null}};return o.overlayMode(o.getMode(v,C.backdrop||"text/html"),b)}),o.defineMode("vue",function(v){return o.getMode(v,{name:"htmlmixed",tags:p})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),o.defineMIME("script/x-vue","vue"),o.defineMIME("text/x-vue","vue")})});var fc=Ue((uc,cc)=>{(function(o){typeof uc=="object"&&typeof cc=="object"?o(Re()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("yaml",function(){var p=["true","false","on","off","yes","no"],v=new RegExp("\\b(("+p.join(")|(")+"))$","i");return{token:function(C,b){var _=C.peek(),s=b.escaped;if(b.escaped=!1,_=="#"&&(C.pos==0||/\s/.test(C.string.charAt(C.pos-1))))return C.skipToEnd(),"comment";if(C.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(b.literal&&C.indentation()>b.keyCol)return C.skipToEnd(),"string";if(b.literal&&(b.literal=!1),C.sol()){if(b.keyCol=0,b.pair=!1,b.pairStart=!1,C.match("---")||C.match("..."))return"def";if(C.match(/\s*-\s+/))return"meta"}if(C.match(/^(\{|\}|\[|\])/))return _=="{"?b.inlinePairs
|
||
|
`,de=`
|
||
|
`+W;q&&ye++,q&&I.ch===0&&(de=W+`
|
||
|
`,ye--),Hr(K,!1,[T,de]),K.setSelection({line:le,ch:0},{line:ye,ch:0})}var s=o.codemirror,g=s.getCursor("start"),h=s.getCursor("end"),w=s.getTokenAt({line:g.line,ch:g.ch||1}),k=s.getLineHandle(g.line),c=b(s,g.line,k,w),d,S,E;if(c==="single"){var z=k.text.slice(0,g.ch).replace("`",""),y=k.text.slice(g.ch).replace("`","");s.replaceRange(z+y,{line:g.line,ch:0},{line:g.line,ch:99999999999999}),g.ch--,g!==h&&h.ch--,s.setSelection(g,h),s.focus()}else if(c==="fenced")if(g.line!==h.line||g.ch!==h.ch){for(d=g.line;d>=0&&(k=s.getLineHandle(d),!v(k));d--);var H=s.getTokenAt({line:d,ch:1}),M=C(H).fencedChars,B,X,re,ne;v(s.getLineHandle(g.line))?(B="",X=g.line):v(s.getLineHandle(g.line-1))?(B="",X=g.line-1):(B=M+`
|
||
|
`,X=g.line),v(s.getLineHandle(h.line))?(re="",ne=h.line,h.ch===0&&(ne+=1)):h.ch!==0&&v(s.getLineHandle(h.line+1))?(re="",ne=h.line+1):(re=M+`
|
||
|
`,ne=h.line+1),h.ch===0&&(ne-=1),s.operation(function(){s.replaceRange(re,{line:ne,ch:0},{line:ne+(re?0:1),ch:0}),s.replaceRange(B,{line:X,ch:0},{line:X+(B?0:1),ch:0})}),s.setSelection({line:X+(B?1:0),ch:0},{line:ne+(B?1:-1),ch:0}),s.focus()}else{var N=g.line;if(v(s.getLineHandle(g.line))&&(b(s,g.line+1)==="fenced"?(d=g.line,N=g.line+1):(S=g.line,N=g.line-1)),d===void 0)for(d=N;d>=0&&(k=s.getLineHandle(d),!v(k));d--);if(S===void 0)for(E=s.lineCount(),S=N;S<E&&(k=s.getLineHandle(S),!v(k));S++);s.operation(function(){s.replaceRange("",{line:d,ch:0},{line:d+1,ch:0}),s.replaceRange("",{line:S-1,ch:0},{line:S,ch:0})}),s.focus()}else if(c==="indented"){if(g.line!==h.line||g.ch!==h.ch)d=g.line,S=h.line,h.ch===0&&S--;else{for(d=g.line;d>=0;d--)if(k=s.getLineHandle(d),!k.text.match(/^\s*$/)&&b(s,d,k)!=="indented"){d+=1;break}for(E=s.lineCount(),S=g.line;S<E;S++)if(k=s.getLineHandle(S),!k.text.match(/^\s*$/)&&b(s,S,k)!=="indented"){S-=1;break}}var F=s.getLineHandle(S+1),D=F&&s.getTokenAt({line:S+1,ch:F.text.length-1}),V=D&&C(D).indentedCode;V&&s.replaceRange(`
|
||
|
`,{line:S+1,ch:0});for(var j=d;j<=S;j++)s.indentLine(j,"subtract");s.focus()}else{var J=g.line===h.line&&g.ch===h.ch&&g.ch===0,x=g.line!==h.line;J||x?_(s,g,h,p):Hr(s,!1,["`","`"])}}function Pi(o){aa(o.codemirror,"quote")}function Xn(o){Cr(o.codemirror,"smaller")}function ji(o){Cr(o.codemirror,"bigger")}function Ri(o){Cr(o.codemirror,void 0,1)}function Hi(o){Cr(o.codemirror,void 0,2)}function Bi(o){Cr(o.codemirror,void 0,3)}function ra(o){Cr(o.codemirror,void 0,4)}function na(o){Cr(o.codemirror,void 0,5)}function ia(o){Cr(o.codemirror,void 0,6)}function Wi(o){var p=o.codemirror,v="*";["-","+","*"].includes(o.options.unorderedListStyle)&&(v=o.options.unorderedListStyle),aa(p,"unordered-list",v)}function Ui(o){aa(o.codemirror,"ordered-list")}function $i(o){Nd(o.codemirror)}function Ki(o){var p=o.options,v="https://";if(p.promptURLs){var C=prompt(p.promptTexts.link,v);if(!C)return!1;v=mc(C)}bc(o,"link",p.insertTexts.link,v)}function Gi(o){var p=o.options,v="https://";if(p.promptURLs){var C=prompt(p.promptTexts.image,v);if(!C)return!1;v=mc(C)}bc(o,"image",p.insertTexts.image,v)}function mc(o){return encodeURI(o).replace(/([\\()])/g,"\\$1")}function oa(o){o.openBrowseFileWindow()}function vc(o,p){var v=o.codemirror,C=Lr(v),b=o.options,_=p.substr(p.lastIndexOf("/")+1),s=_.substring(_.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(s))Hr(v,C.image,b.insertTexts.uploadedImage,p);else{var g=b.insertTexts.link;g[0]="["+_,Hr(v,C.link,g,p)}o.updateStatusBar("upload-image",o.options.imageTexts.sbOnUploaded.replace("#image_name#",_)),setTimeout(function(){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit)},1e3)}function Zi(o){var p=o.codemirror,v=Lr(p),C=o.options;Hr(p,v.table,C.insertTexts.table)}function Xi(o){var p=o.codemirror,v=Lr(p),C=o.options;Hr(p,v.image,C.insertTexts.horizontalRule)}function Yi(o){var p=o.codemirror;p.undo(),p.focus()}function Qi(o){var p=o.codemirror;p.redo(),p.focus()}function hn(o){var p=o.codemirror,v=p.getWrapperElement(),C=v.nextSibling,b=o.toolbarElements&&o.toolbarElements["side-by-side"],_=!1,s=v.parentNode;C.classList.contains("editor-preview-active-side")?(o.options.sideBySideFullscreen===!1&&s.classList.remove("sided--no-fullscreen"),C.classList.remove("editor-preview-active-side"),b&&b.classList.remove("active"),v.classList.remove("CodeMirror-sided")):(setTimeout(function(){p.getOption("fullScreen")||(o.options.sideBySideFullscreen===!1?s.classList.add("sided--no-fullscreen"):Rr(o)),C.classList.add("editor-preview-active-side")},1),b&&b.classList.add("active"),v.classList.add("CodeMirror-sided"),_=!0);var g=v.lastChild;if(g.classList.contains("editor-preview-active")){g.classList.remove("editor-preview-active");var h=o.toolbarElements.preview,w=o.toolbar_div;h.classList.remove("active"),w.classList.remove("disabled-for-preview")}var k=function(){var d=o.options.previewRender(o.value(),C);d!=null&&(C.innerHTML=d)};if(p.sideBySideRenderingFunction||(p.sideBySideRenderingFunction=k),_){var c=o.options.previewRender(o.value(),C);c!=null&&(C.innerHTML=c),p.on("update",p.sideBySideRenderingFunction)}else p.off("update",p.sideBySideRenderingFunction);p.refresh()}function Vi(o){var p=o.codemirror,v=p.getWrapperElement(),C=o.toolbar_div,b=o.options.toolbar?o.toolbarElements.preview:!1,_=v.lastChild,s=p.getWrapperElement().nextSibling;if(s.classList.contains("editor-preview-active-side")&&hn(o),!_||!_.classList.contains("editor-preview-full")){if(_=document.createElement("div"),_.className="editor-preview-full",o.options.previewClass)if(Array.isArray(o.options.previewClass))for(var g=0;g<o.options.previewClass.length;g++)_.classList.add(o.options.previewClass[g]);else typeof o.options.previewClass=="string"&&_.classList.add(o.options.previewClass);v.appendChild(_)}_.classList.contains("editor-preview-active")?(_.classList.remove("editor-preview-active"),b&&(b.classList.remove("active"),C.classList.remove("disabled-for-preview"))):(setTimeout(function(){_.classList.add("editor-preview-active")},1),b&&(b.classList.add("active
|
||
|
|
||
|
| Column 1 | Column 2 | Column 3 |
|
||
|
| -------- | -------- | -------- |
|
||
|
| Text | Text | Text |
|
||
|
|
||
|
`],horizontalRule:["",`
|
||
|
|
||
|
-----
|
||
|
|
||
|
`]},Pd={link:"URL for the link:",image:"URL of the image:"},jd={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},Rd={bold:"**",code:"```",italic:"*"},Hd={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Bd={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
|
||
|
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};Se.prototype.uploadImages=function(o,p,v){if(o.length!==0){for(var C=[],b=0;b<o.length;b++)C.push(o[b].name),this.uploadImage(o[b],p,v);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",C.join(", ")))}};Se.prototype.uploadImagesUsingCustomFunction=function(o,p){if(p.length!==0){for(var v=[],C=0;C<p.length;C++)v.push(p[C].name),this.uploadImageUsingCustomFunction(o,p[C]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",v.join(", ")))}};Se.prototype.updateStatusBar=function(o,p){if(this.gui.statusbar){var v=this.gui.statusbar.getElementsByClassName(o);v.length===1?this.gui.statusbar.getElementsByClassName(o)[0].textContent=p:v.length===0?console.log("EasyMDE: status bar item "+o+" was not found."):console.log("EasyMDE: Several status bar items named "+o+" was found.")}};Se.prototype.markdown=function(o){if(marked){var p;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?p=this.options.renderingConfig.markedOptions:p={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?p.breaks=!1:p.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var v=this.options.renderingConfig.hljs||window.hljs;v&&(p.highlight=function(b,_){return _&&v.getLanguage(_)?v.highlight(_,b).value:v.highlightAuto(b).value})}marked.setOptions(p);var C=marked.parse(o);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(C=this.options.renderingConfig.sanitizerFunction.call(this,C)),C=Ad(C),C=Dd(C),C}};Se.prototype.render=function(o){if(o||(o=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===o)return;this.element=o;var p=this.options,v=this,C={};for(var b in p.shortcuts)p.shortcuts[b]!==null&&Zn[b]!==null&&function(y){C[gc(p.shortcuts[y])]=function(){var H=Zn[y];typeof H=="function"?H(v):typeof H=="string"&&window.open(H,"_blank")}}(b);C.Enter="newlineAndIndentContinueMarkdownList",C.Tab="tabAndIndentMarkdownList",C["Shift-Tab"]="shiftTabAndUnindentMarkdownList",C.Esc=function(y){y.getOption("fullScreen")&&Rr(v)},this.documentOnKeyDown=function(y){y=y||window.event,y.keyCode==27&&v.codemirror.getOption("fullScreen")&&Rr(v)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var _,s;p.overlayMode?(CodeMirror.defineMode("overlay-mode",function(y){return CodeMirror.overlayMode(CodeMirror.getMode(y,p.spellChecker!==!1?"spell-checker":"gfm"),p.overlayMode.mode,p.overlayMode.combine)}),_="overlay-mode",s=p.parsingConfig,s.gitHubSpice=!1):(_=p.parsingConfig,_.name="gfm",_.gitHubSpice=!1),p.spellChecker!==!1&&(_="spell-checker",s=p.parsingConfig,s.name="gfm",s.gitHubSpice=!1,typeof p.spellChecker=="function"?p.spellChecker({codeMirrorInstance:CodeMirror}):CodeMirrorSpellChecker({codeMirrorInstance:CodeMirror}));function g(y,H,M){return{addNew:!1}}if(CodeMirror.getMode("php").mime="text/x-php",this.codemirror=CodeMirror.fromTextArea(o,{mode:_,backdrop:s,theme:p.theme!=null?p.theme:"easymde",tabSize:p.tabSize!=null?p.tabSize:2,indentUnit:p.tabSize!=null?p.tabSize:2,indentWithTabs:p.indentWithTabs!==!1,lineNumbers:p.lineNumbers===!0,autofocus:p.autofocus===!0,extraKeys:C,direction:p.direction,lineWrapping:p.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:p.placeholder||o.getAttribute("placeholder")||"",styleSelectedText:p.styleSelectedText!=null?p.styleSelectedText:!ta(),scrollbarStyle:p.scrollbarStyle!=null?p.scrollbarStyle:"native",configureMouse:g,inputStyle:p.inputStyle!=null?p.inputStyle:ta()?"contenteditable":"textarea",spellcheck:p.nativeSpellcheck!=null?p.nativeSpellcheck:!0,autoRefresh:p.autoRefresh!=null?p.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=p.minHeight,typeof p.maxHeight<"u"&&(this.codemirror.getScrollerElement().style.height=p.maxHeight),p.forceSync===!0){var h=t
|