2026-10-19 17:33:22 +03:00
var ss = Object . defineProperty ; var Ld = Object . getOwnPropertyDescriptor ; var Cd = Object . getOwnPropertyNames ; var Ed = Object . prototype . hasOwnProperty ; var zd = ( o , p , m )=>()=>{ if ( m ) throw m [ 0 ]; try { return o && ( p = o ( o = 0 )), p } catch ( S ){ throw m = [ S ], S }}; var Ke = ( o , p )=>()=>{ try { return p || o (( p = { exports : {}}). exports , p ), p . exports } catch ( m ){ throw p = 0 , m }}; var Md = ( o , p , m , S )=>{ if ( p && typeof p == "object" || typeof p == "function" ) for ( let b of Cd ( p )) ! Ed . call ( o , b ) && b !== m && ss ( o , b ,{ get : ()=> p [ b ], enumerable :! ( S = Ld ( p , b )) || S . enumerable }); return o }; var Ad = o => Md ( ss ({}, "__esModule" ,{ value :! 0 }), o ); var We = Ke (( Yo , Qo )=>{( function ( o , p ){ typeof Yo == "object" && typeof Qo < "u" ? Qo . exports = p () : typeof define == "function" && define . amd ? define ( p ) : ( o = o || self , o . CodeMirror = p ())})( Yo ,( function (){ "use strict" ; var o = navigator . userAgent , p = navigator . platform , m = /gecko\/\d/i . test ( o ), S = /MSIE \d/ . test ( o ), b = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/ . exec ( o ), T = /Edge\/(\d+)/ . exec ( o ), s = S || b || T , h = s && ( S ? document . documentMode || 6 :+ ( T || b )[ 1 ]), g =! T && /WebKit\// . test ( o ), C = g && /Qt\/\d+\.\d+/ . test ( o ), _ =! T && /Chrome\/(\d+)/ . exec ( o ), c = _ &&+ _ [ 1 ], d = /Opera\// . test ( o ), w = /Apple Computer/ . test ( navigator . vendor ), E = /Mac OS X 1\d\D([8-9]|\d\d)\D/ . test ( o ), z = /PhantomJS/ . test ( o ), k = w && ( /Mobile\/\w+/ . test ( o ) || navigator . maxTouchPoints > 2 ), R = /Android/ . test ( o ), M = k || R || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i . test ( o ), I = k || /Mac/ . test ( p ), U = /\bCrOS\b/ . test ( o ), J = /win/i . test ( p ), re = d && o . match ( /Version\/(\d*\.\d*)/ ); re && ( re = Number ( re [ 1 ])), re && re >= 15 && ( d =! 1 , g =! 0 ); var F = I && ( C || d && ( re == null || re < 12.11 )), q = m || s && h >= 9 ; function D ( e ){ return new RegExp ( "(^|\\s)" + e + "(?:$|\\s)\\s*" )} var Q = 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 V ( e , t ){ return j ( e ). appendChild ( t )} function y ( 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 G ( e , t , n , r ){ var i = y ( e , t , n , r ); return i . setAttribute ( "role" , "presentation" ), i } var X ; document . createRange ? X = function ( e , t , n , r ){ var i = document . createRange (); return i . setEnd ( r || e , n ), i . setStart ( e , t ), i } : X = 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 O ( 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 H ( e ){ var t = e . ownerDocument || e , n ; try { n = e . activeElement } catch { n = t . body || null } for (; n && n . shadowRoot && n . shadowRoot . activeElement ;) n = n . shadowRoot . activeElement ; return n } function se ( e , t ){ var n = e . className ; D ( t ). test ( n ) || ( e . className += ( n ? " " : "" ) + t )} function _e ( 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 N = function ( e ){ e . select ()}; k ? N = function ( e ){ e . selectionStart = 0 , e . selectionEnd = e . value . length } : s && ( N = function ( e ){ try { e . select ()} catch {}}); function L ( e ){ return e . display . wrapper . ownerDocument } function he ( e ){ return ze ( e . display . wrapper )} function ze ( e ){ return e . getRootNode ? e . getRootNode () : e . ownerDocument } function de ( e ){ return L ( e ). defaultView } function Ee ( e ){ var t = Array . prototype . slice . call ( arguments , 1 ); return function (){ return e . apply ( null , t )}} function ge ( e , t , n ){ t || ( t = {}); for ( var r in e ) Object . prototype . hasOwnProperty . call ( e , r ) && ( n !==! 1 ||! Object . prototype . hasOwnProperty . call ( t , r )) && ( t [ r ] = e [ r ]); return t } function Oe ( 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 qe = function (){ this . id = null , this . f = null , this . time = 0 , this . handler = Ee ( this . onTimeout , this )}; qe . prototype . onTimeout = function ( e ){ e . id = 0 , e . time <=+ new Date ? e . f () : setTimeout ( e . handler , e . time -+ new Date )}, qe . 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 ,
2026-09-28 20:53:46 +03:00
b `.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
2026-10-19 17:33:22 +03:00
`,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/)},hr=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},ti=(function(){var e=y("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),$t=null;function to(e){if($t!=null)return $t;var t=V(e,y("span","x")),n=t.getBoundingClientRect(),r=X(t,0,1).getBoundingClientRect();return $t=Math.abs(n.left-r.left)>1}var Wr={},Kt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wr[e]=t}function Cr(e,t){Kt[e]=t}function Ur(e){if(typeof e=="string"&&Kt.hasOwnProperty(e))e=Kt[e];else if(e&&typeof e.name=="string"&&Kt.hasOwnProperty(e.name)){var t=Kt[e.name];typeof t=="string"&&(t={name:t}),e=oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ur("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ur("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $r(e,t){t=Ur(t);var n=Wr[t.name];if(!n)return $r(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 Kr(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};ge(t,n)}function Vt(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 _n(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 Gr(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=Oe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Oe(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return Oe(this.string,null,this.tabSize)-(this.lineStart?Oe(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
` ? ( ue = A . appendChild ( y ( "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 && h < 9 ? A . appendChild ( y ( "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 || v || a || l ){ var xe = n || "" ; r && ( xe += r ), i && ( xe += i ); var be = y ( "span" ,[ A ], xe , a ); if ( l ) for ( var Ce in l ) l . hasOwnProperty ( Ce ) && Ce != "style" && Ce != "class" && be . setAttribute ( Ce , l [ Ce ]); return e . content . appendChild ( be )} e . content . appendChild ( A )}} function $c ( 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 Kc ( e , t ){ return function ( n , r , i , a , l , u , f ){ i = i ? i + " cm-force-border" : "cm-force-border" ; for ( var v = n . pos , A = v + r . length ;;){ for ( var B = void 0 , ee = 0 ; ee < t . length && ( B = t [ ee ], ! ( B . to > v && B . from <= v )); ee ++ ); if ( B . to >= A ) return e ( n , r , i , a , l , u , f ); e ( n , r . slice ( 0 , B . to - v ), i , a , null , u , f ), a = null , r = r . slice ( B . to - v ), v = B . to }}} function Ea ( 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 Gc ( 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 ]), La ( n [ l + 1 ], t . cm . options )); return } for ( var u = i . length , f = 0 , v = 1 , A = "" , B , ee , Y = 0 , ie , ue , me , ve , xe ;;){ if ( Y == f ){ ie = ue = me = ee = "" , xe = null , ve = null , Y = 1 / 0 ; for ( var be = [], Ce = void 0 , Ne = 0 ; Ne < r . length ; ++ Ne ){ var Fe = r [ Ne ], $e = Fe . marker ; if ( $e . type == "bookmark" && Fe . from == f && $e . widgetNode ) be . push ( $e ); else if ( Fe . from <= f && ( Fe . to == null || Fe . to > f || $e . collapsed && Fe . to == f && Fe . from == f )){ if ( Fe . to != null && Fe . to != f && Y > Fe . to && ( Y = Fe . to , ue = "" ), $e . className && ( ie += " " + $e . className ), $e . css && ( ee = ( ee ? ee + ";" : "" ) + $e . css ), $e . startStyle && Fe . from == f && ( me += " " + $e . startStyle ), $e . endStyle && Fe . to == Y && ( Ce || ( Ce = [])). push ( $e . endStyle , Fe . to ), $e . title && (( xe || ( xe = {})). title = $e . title ), $e . attributes ) for ( var Ve in $e . attributes )( xe || ( xe = {}))[ Ve ] = $e . attributes [ Ve ]; $e . collapsed && ( ! ve || oo ( ve . marker , $e ) < 0 ) && ( ve = Fe )} else Fe . from > f && Y > Fe . from && ( Y = Fe . from )} if ( Ce ) for ( var vt = 0 ; vt < Ce . length ; vt += 2 ) Ce [ vt + 1 ] == Y && ( ue += " " + Ce [ vt ]); if ( ! ve || ve . from == f ) for ( var rt = 0 ; rt < be . length ; ++ rt ) Ea ( t , 0 , be [ rt ]); if ( ve && ( ve . from || 0 ) == f ){ if ( Ea ( 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 Ot = Math . min ( u , Y );;){ if ( A ){ var At = f + A . length ; if ( ! ve ){ var ut = At > Ot ? A . slice ( 0 , Ot - f ) : A ; t . addToken ( t , ut , B ? B + ie : ie , me , f + ut . length == Y ? ue : "" , ee , xe )} if ( At >= Ot ){ A = A . slice ( Ot - f ), f = Ot ; break } f = At , me = "" } A = i . slice ( a , a = n [ v ++ ]), B = La ( n [ v ++ ], t . cm . options )}}} function za ( e , t , n ){ this . line = t , this . rest = Pc ( t ), this . size = this . rest ? x ( ce ( this . rest )) - n + 1 : 1 , this . node = this . text = null , this . hidden = mr ( e , t )} function si ( e , t , n ){ for ( var r = [], i , a = t ; a < n ; a = i ){ var l = new za ( e . doc , Ae ( e . doc , a ), a ); i = a + l . size , r . push ( l )} return r } var Yr = null ; function Zc ( e ){ Yr ? Yr . ops . push ( e ) : e . ownsGroup = Yr = { ops : [ e ], delayedCallbacks : []}} function Xc ( 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 Yc ( e , t ){ var n = e . ownsGroup ; if ( n ) try { Xc ( n )} finally { Yr = null , t ( n )}} var Tn = null ; function ht ( e , t ){ var n = nr ( e , t ); if ( n . length ){ var r = Array . prototype . slice . call ( arguments , 2 ), i ; Yr ? i = Yr . delayedCallbacks : Tn ? i = Tn : ( i = Tn = [], setTimeout ( Qc , 0 )); for ( var a = function ( u ){ i . push ( function (){ return n [ u ]. apply ( null , r )})}, l = 0 ; l < n . length ; ++ l ) a ( l )}} function Qc (){ var e = Tn ; Tn = null ; for ( var t = 0 ; t < e . length ; ++ t ) e [ t ]()} function Ma ( e , t , n , r ){ for ( var i = 0 ; i < t . changes . length ; i ++ ){ var a = t . changes [ i ]; a == "text" ? Jc ( e , t ) : a == "gutter" ? Da ( e , t , n , r ) : a == "class" ? uo ( e , t ) : a == "widget" && ef ( e , t , r )} t . changes = null } function Ln ( e ){ return e . node == e . text && ( e . node = y ( "div" , null , null , "p
2026-09-28 20:53:46 +03:00
top: `+Ce+" px ; width : "+(Ne??f-be)+`px;
2026-10-19 17:33:22 +03:00
height: `+(Fe-Ce)+" px "))}function B(be,Ce,Ne){var Fe=Ae(i,be),$e=Fe.text.length,Ve,vt;function rt(ut,Dt){return fi(e,ne(be,ut)," div ",Fe,Dt)}function Ot(ut,Dt,yt){var ft=Ga(e,Fe,null,ut),ct=Dt==" ltr "==(yt==" after ")?" left ":" right ",lt=yt==" after "?ft.begin:ft.end-(/\s/.test(Fe.text.charAt(ft.end-1))?2:1);return rt(lt,ct)[ct]}var At=Pe(Fe,i.direction);return nt(At,Ce||0,Ne??$e,function(ut,Dt,yt,ft){var ct=yt==" ltr ",lt=rt(ut,ct?" left ":" right "),qt=rt(Dt-1,ct?" right ":" left "),pn=Ce==null&&ut==0,Sr=Ne==null&&Dt==$e,St=ft==0,rr=!At||ft==At.length-1;if(qt.top-lt.top<=3){var bt=(v?pn:Sr)&&St,Zo=(v?Sr:pn)&&rr,cr=bt?u:(ct?lt:qt).left,Nr=Zo?f:(ct?qt:lt).right;A(cr,lt.top,Nr-cr,lt.bottom)}else{var Or,Lt,hn,Xo;ct?(Or=v&&pn&&St?u:lt.left,Lt=v?f:Ot(ut,yt," before "),hn=v?u:Ot(Dt,yt," after "),Xo=v&&Sr&&rr?f:qt.right):(Or=v?Ot(ut,yt," before "):u,Lt=!v&&pn&&St?f:lt.right,hn=!v&&Sr&&rr?u:qt.left,Xo=v?Ot(Dt,yt," after "):f),A(Or,lt.top,Lt-Or,lt.bottom),lt.bottom<qt.top&&A(u,lt.bottom,null,qt.top),A(hn,qt.top,Xo-hn,qt.bottom)}(!Ve||pi(lt,Ve)<0)&&(Ve=lt),pi(qt,Ve)<0&&(Ve=qt),(!vt||pi(lt,vt)<0)&&(vt=lt),pi(qt,vt)<0&&(vt=qt)}),{start:Ve,end:vt}}var ee=t.from(),Y=t.to();if(ee.line==Y.line)B(ee.line,ee.ch,Y.ch);else{var ie=Ae(i,ee.line),ue=Ae(i,Y.line),me=Zt(ie)==Zt(ue),ve=B(ee.line,ee.ch,me?ie.text.length+1:null).end,xe=B(Y.line,me?0:null,Y.ch).start;me&&(ve.top<xe.top-2?(A(ve.right,ve.top,null,ve.bottom),A(u,xe.top,xe.left,xe.bottom)):A(ve.right,ve.top,xe.left-ve.right,ve.bottom)),ve.bottom<xe.top&&A(u,ve.bottom,null,xe.top)}n.appendChild(a)}function ko(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()||en(e),t.cursorDiv.style.visibility=(n=!n)?"":" hidden "},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=" hidden ")}}function Qa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||So(e))}function wo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&en(e))},100)}function So(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!=" nocursor "&&(e.state.focused||(it(e," focus ",e,t),e.state.focused=!0,se(e.display.wrapper," CodeMirror - focused "),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),g&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ko(e))}function en(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e," blur ",e,t),e.state.focused=!1,Q(e.display.wrapper," CodeMirror - focused ")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function hi(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,v=void 0,A=0;if(!u.hidden){if(i+=u.line.height,s&&h<8){var B=u.node.offsetTop+u.node.offsetHeight;v=B-n,n=B}else{var ee=u.node.getBoundingClientRect();v=ee.bottom-ee.top,!f&&u.text.firstChild&&(A=u.text.firstChild.getBoundingClientRect().right-ee.left-1)}var Y=u.line.height-v;if((Y>.005||Y<-.005)&&(i<r&&(a-=Y),Bt(u.line,v),Va(u.line),u.rest))for(var ie=0;ie<u.rest.length;ie++)Va(u.rest[ie]);if(A>e.display.sizerWidth){var ue=Math.ceil(A/Jr(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 Va(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 gi(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ui(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=P(t,r),l=P(t,i);if(n&&n.ensure){var u=n.ensure.from.line,f=n.ensure.to.line;u<a?(a=u,l=P(t,ar(Ae(t,u))+e.wrapper.clientHeight)):Math.min(f,t.lastLine())>=l&&(a=P(t,ar(Ae(t,f))-e.wrapper.
2026-09-28 20:53:46 +03:00
top: `+(t.top-n.viewOffset-ui(e.display))+`px;
height: `+(t.bottom-t.top+er(e)+n.barHeight)+`px;
2026-10-19 17:33:22 +03:00
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 gf(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky==" before "?ne(t.line,t.ch+1," before "):t,t=t.ch?ne(t.line,t.sticky==" before "?t.ch-1:t.ch," after "):t);for(var a=0;a<5;a++){var l=!1,u=Xt(e,t),f=!n||n==t?u:Xt(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 v=To(e,i),A=e.doc.scrollTop,B=e.doc.scrollLeft;if(v.scrollTop!=null&&(An(e,v.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),v.scrollLeft!=null&&(Dr(e,v.scrollLeft),Math.abs(e.doc.scrollLeft-B)>1&&(l=!0)),!l)break}return i}function mf(e,t){var n=To(e,t);n.scrollTop!=null&&An(e,n.scrollTop),n.scrollLeft!=null&&Dr(e,n.scrollLeft)}function To(e,t){var n=e.display,r=Vr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=fo(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+co(n),f=t.top<r,v=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,(v?u:t.bottom)-a);A!=i&&(l.scrollTop=A)}var B=e.options.fixedGutter?0:n.gutters.offsetWidth,ee=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-B,Y=Er(e)-n.gutters.offsetWidth,ie=t.right-t.left>Y;return ie&&(t.right=t.left+Y),t.left<10?l.scrollLeft=0:t.left<ee?l.scrollLeft=Math.max(0,t.left+B-(ie?0:10)):t.right>Y+ee-3&&(l.scrollLeft=t.right+(ie?0:10)-Y),l}function Lo(e,t){t!=null&&(mi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function tn(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,n){(t!=null||n!=null)&&mi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function vf(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=$a(e,t.from),r=$a(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=To(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||Eo(e,{top:t}),el(e,t,!0),m&&Eo(e),Fn(e,100))}function el(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 Dr(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,ol(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Dn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+co(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+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var qr=function(e,t,n){this.cm=n;var r=this.vert=y(" div ",[y(" div ",null,null," min - width : 1 px ")]," CodeMirror - vscrollbar "),i=this.horiz=y(" div ",[y(" div ",null,null," height : 100 % ; min - height : 1 px ")]," CodeMirror - hscrollbar ");r.tabIndex=i.tabIndex=-1,e(r),e(i),Ie(r," scroll ",function(){r.clientHeight&&t(r.scrollTop," vertical ")}),Ie(i," scroll ",function(){i.clientWidth&&t(i.scrollLeft," horizontal ")}),this.checkedZeroWidth=!1,s&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=" 18 px ")};qr.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.firstChil
`},setDirection:mt(function(e){e!=" rtl "&&(e=" ltr "),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&qf(this.cm))})}),Mt.prototype.eachLine=Mt.prototype.iter;var Nl=0;function Kf(e){var t=this;if(Ol(t),!(ot(t,e)||lr(t.display,e))){kt(e),s&&(Nl=+new Date);var n=Mr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),l=0,u=function(){++l==i&>(t,function(){n=je(t.doc,n);var Y={from:n,to:n,text:t.doc.splitLines(a.filter(function(ie){return ie!=null}).join(t.doc.lineSeparator())),origin:" paste "};an(t.doc,Y),_l(t.doc,yr(je(t.doc,n),je(t.doc,xr(Y))))})()},f=function(Y,ie){if(t.options.allowDropFileTypes&&Se(t.options.allowDropFileTypes,Y.type)==-1){u();return}var ue=new FileReader;ue.onerror=function(){return u()},ue.onload=function(){var me=ue.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(me)){u();return}a[ie]=me,u()},ue.readAsText(Y)},v=0;v<r.length;v++)f(r[v],v);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 B;if(t.state.draggingText&&!t.state.draggingText.copy&&(B=t.listSelections()),ki(t.doc,yr(n,n)),B)for(var ee=0;ee<B.length;++ee)ln(t.doc,"",B[ee].anchor,B[ee].head," drag ");t.replaceSelection(A," around "," paste "),t.display.input.focus()}}catch{}}}}function Gf(e,t){if(s&&(!e.state.draggingText||+new Date-Nl<100)){dr(t);return}if(!(ot(e,t)||lr(e.display,t))&&(t.dataTransfer.setData(" Text ",e.getSelection()),t.dataTransfer.effectAllowed=" copyMove ",t.dataTransfer.setDragImage&&!w)){var n=y(" 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 Zf(e,t){var n=Mr(e,t);if(n){var r=document.createDocumentFragment();_o(e,n,r),e.display.dragCursor||(e.display.dragCursor=y(" div ",null," CodeMirror - cursors CodeMirror - dragcursors "),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),V(e.display.dragCursor,r)}}function Ol(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Pl(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 Bl=!1;function Xf(){Bl||(Yf(),Bl=!0)}function Yf(){var e;Ie(window," resize ",function(){e==null&&(e=setTimeout(function(){e=null,Pl(Qf)},100))}),Ie(window," blur ",function(){return Pl(en)})}function Qf(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var wr={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++)wr[Wn+48]=wr[Wn+96]=String(Wn);for(var Ti=65;Ti<=90;Ti++)wr[Ti]=String.fromCharCode(Ti);for(var Un=1;Un<=12;Un++)wr[Un+111]=wr[Un+63235]="F"+Un;var ur={};ur.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"},ur.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"delete
` , "start" )}, toggleOverwrite : function ( e ){ return e . toggleOverwrite ()}}; function Wl ( e , t ){ var n = Ae ( e . doc , t ), r = Zt ( n ); return r != n && ( t = x ( r )), jo ( ! 0 , e , r , t , 1 )} function td ( e , t ){ var n = Ae ( e . doc , t ), r = Oc ( n ); return r != n && ( t = x ( r )), jo ( ! 0 , e , n , t , - 1 )} function Ul ( e , t ){ var n = Wl ( e , t . line ), r = Ae ( e . doc , n . line ), i = Pe ( 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 ne ( n . line , l ? 0 : a , n . sticky )} return n } function Ci ( e , t , n ){ if ( typeof t == "string" && ( t = $n [ 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 ) != Ze } finally { e . display . shift = r , e . state . suppressEdits =! 1 } return i } function rd ( e , t , n ){ for ( var r = 0 ; r < e . state . keyMaps . length ; r ++ ){ var i = un ( t , e . state . keyMaps [ r ], n , e ); if ( i ) return i } return e . options . extraKeys && un ( t , e . options . extraKeys , n , e ) || un ( t , e . options . keyMap , n , e )} var nd = new qe ; function Kn ( e , t , n , r ){ var i = e . state . keySeq ; if ( i ){ if ( jl ( t )) return "handled" ; if ( /\'$/ . test ( t ) ? e . state . keySeq = null : nd . set ( 50 , function (){ e . state . keySeq == i && ( e . state . keySeq = null , e . display . input . reset ())}), $l ( e , i + " " + t , n , r )) return ! 0 } return $l ( e , t , n , r )} function $l ( e , t , n , r ){ var i = rd ( e , t , r ); return i == "multi" && ( e . state . keySeq = t ), i == "handled" && ht ( e , "keyHandled" , e , t , n ),( i == "handled" || i == "multi" ) && ( kt ( n ), ko ( e )), !! i } function Kl ( e , t ){ var n = Hl ( t , ! 0 ); return n ? t . shiftKey &&! e . state . keySeq ? Kn ( e , "Shift-" + n , t , function ( r ){ return Ci ( e , r , ! 0 )}) || Kn ( e , n , t , function ( r ){ if ( typeof r == "string" ? /^go[A-Z]/ . test ( r ) : r . motion ) return Ci ( e , r )}) : Kn ( e , n , t , function ( r ){ return Ci ( e , r )}) :! 1 } function id ( e , t , n ){ return Kn ( e , "'" + n + "'" , t , function ( r ){ return Ci ( e , r , ! 0 )})} var Ro = null ; function Gl ( e ){ var t = this ; if ( ! ( e . target && e . target != t . display . input . getField ()) && ( t . curOp . focus = H ( he ( t )), ! ot ( t , e ))){ s && h < 11 && e . keyCode == 27 && ( e . returnValue =! 1 ); var n = e . keyCode ; t . display . shift = n == 16 || e . shiftKey ; var r = Kl ( t , e ); d && ( Ro = r ? n : null , ! r && n == 88 &&! ti && ( I ? e . metaKey : e . ctrlKey ) && t . replaceSelection ( "" , null , "cut" )), m &&! I &&! r && n == 46 && e . shiftKey &&! e . ctrlKey && document . execCommand && document . execCommand ( "cut" ), n == 18 &&! /\bCodeMirror-crosshair\b/ . test ( t . display . lineDiv . className ) && od ( t )}} function od ( e ){ var t = e . display . lineDiv ; se ( t , "CodeMirror-crosshair" ); function n ( r ){( r . keyCode == 18 ||! r . altKey ) && ( Q ( t , "CodeMirror-crosshair" ), _t ( document , "keyup" , n ), _t ( document , "mouseover" , n ))} Ie ( document , "keyup" , n ), Ie ( document , "mouseover" , n )} function Zl ( e ){ e . keyCode == 16 && ( this . doc . sel . shift =! 1 ), ot ( this , e )} function Xl ( e ){ var t = this ; if ( ! ( e . target && e . target != t . display . input . getField ()) &&! ( lr ( t . display , e ) || ot ( t , e ) || e . ctrlKey &&! e . altKey || I && 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 ) && Kl ( t , e ))){ var i = String . fromCharCode ( r ?? n ); i != "\b" && ( id ( t , e , i ) || t . display . input . onKeyPress ( e ))}}} var ad = 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 + ad > e && ye ( t , this . pos ) == 0 && n == this . button }; var Gn , Zn ; function ld ( e , t ){ var n =+ new Date ; return Zn && Zn . compare ( n , e , t ) ? ( Gn = Zn = null , "triple" ) : Gn && Gn . compare ( n , e , t ) ? ( Zn = new Ho ( n , e , t ), Gn = null , "double" ) : ( Gn = new Ho ( n , e , t ), Zn = null , "single" )} function Yl ( e ){ var t = this , n = t . display ; if ( ! ( ot ( t , e ) || n . activeTouch && n . input . supportsTouch ())){ if ( n . input . ensurePolled (), n . shift = e . shiftKey , lr ( n , e )){ g || ( n . scroller . draggable =! 1 , setTimeout ( function (){ return n . scroller . draggable =! 0 }, 100 )); return } if ( ! Wo ( t , e )){ var r = Mr ( t , e ), i = Ut ( e ), a = r ? ld ( r , i ) : "single" ; de ( t ). focus (), i == 1 && t . state . selectingText && t . state . selectingText ( e ), ! ( r && sd ( t , i , r , a , e )) && ( i == 1 ? r ? cd ( t , r , a , e ) : yn ( e ) == n . scroller && kt ( e ) : i == 2 ? ( r && _i ( t . doc , r ), setTimeout ( function (){ return n . input . focus ()}, 20 )) : i == 3 && ( q ? t . display . input . onContextMenu ( e ) : wo ( t )))}}} function sd ( 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 , Kn ( e , Rl ( a , i ), i , function ( l ){ if ( typeof l == "string" && ( l = $n [ l ]), ! l ) return ! 1 ; var u =! 1 ; try { e . isReadOnly () && ( e . state . suppressEdits =! 0 ), u = l ( e , n ) != Ze } finally { e . state . suppressEdits =! 1 } return u })} function ud ( e , t , n ){ var r = e . getOption ( "configureMouse" ), i = r ? r ( e , t , n ) : {}; if ( i . unit ==
`)==t){if(r.ranges.length%Qt.text.length==0){v=[];for(var A=0;A<Qt.text.length;A++)v.push(a.splitLines(Qt.text[A]))}}else f.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(v=He(f,function(ve){return[ve]}));for(var B=e.curOp.updateInput,ee=r.ranges.length-1;ee>=0;ee--){var Y=r.ranges[ee],ie=Y.from(),ue=Y.to();Y.empty()&&(n&&n>0?ie=ne(ie.line,ie.ch-n):e.state.overwrite&&!u?ue=ne(ue.line,Math.min(Ae(a,ue.line).text.length,ue.ch+ce(f).length)):u&&Qt&&Qt.lineWise&&Qt.text.join(`
2026-09-28 20:53:46 +03:00
`)==f.join(`
2026-10-19 17:33:22 +03:00
`)&&(ie=ue=ne(ie.line,0)));var me={from:ie,to:ue,text:v?v[ee%v.length]:f,origin:i||(u?"paste":e.state.cutIncoming>l?"cut":"+input")};an(e.doc,me),ht(e,"inputRead",e,me)}t&&!u&&ns(e,t),tn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=B),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function rs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Nt(t,function(){return $o(t,n,0,null,"paste")}),!0}function ns(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=Xn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Xn(e,i.head.line,"smart"));l&&ht(e,"electricInput",e,i.head.line)}}}function is(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:ne(i,0),head:ne(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Ko(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function os(){var e=y("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=y("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return g?e.style.width="1000px":e.setAttribute("wrap","off"),k&&(e.style.border="1px solid black"),t}function yd(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)&>(this,t[r])(this,i,l),it(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"](Li(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:Tt(function(r,i){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");te(this.state.overlays,{mode:a,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,zt(this)}),removeOverlay:Tt(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++,zt(this);return}}}),indentLine:Tt(function(r,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ae(this.doc,r)&&Xn(this,r,i,a)}),indentSelection:Tt(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&&(Xn(this,u.head.line,r,!0),a=u.head.line,l==this.doc.sel.primIndex&&tn(this));else{var f=u.from(),v=u.to(),A=Math.max(a,f.line);a=Math.min(this.lastLine(),v.line-(v.ch?0:1))+1;for(var B=A;B<a;++B)Xn(this,B,r);var ee=this.doc.sel.ranges;f.ch==0&&i.length==ee.length&&ee[l].from().ch>0&&Oo(this.doc,l,new Ye(f,ee[l].to()),ke)}}}),getTokenAt:function(r,i){return ga(this,r,i)},getLineTokens:function(r,i){return ga(this,ne(r),i,!0)},getTokenTypeAt:function(r){r=je(this.doc,r);var i=da(this,Ae(this.doc,r.line)),a=0,l=(i.length-1)/2,u=r.ch,f;if(u==0)f=i[2];else for(;;){var v=a+l>>1;if((v?i[v*2-1]:0)>=u)l=v;else if(i[v*2+1]<u)a=v+1;else{f=i[v*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]=="strin
2026-09-28 20:53:46 +03:00
` , me = Me ( ue , Y ) ? "w" : ee && ue == `
2026-10-19 17:33:22 +03:00
` ? "n" :! ee || /\s/ . test ( ue ) ? null : "p" ; if ( ee &&! ie &&! me && ( me = "s" ), B && B != me ){ n < 0 && ( n = 1 , A (), t . sticky = "after" ); break } if ( me && ( B = me ), n > 0 &&! A ( ! ie )) break } var ve = wi ( e , t , a , l , ! 0 ); return Xe ( a , ve ) && ( ve . hitSide =! 0 ), ve } function as ( 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 * Vr ( 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 v ; v = mo ( e , a , l ), !! v . outside ;){ if ( n < 0 ? l <= 0 : l >= i . height ){ v . hitSide =! 0 ; break } l += n * 5 } return v } var Qe = function ( e ){ this . cm = e , this . lastAnchorNode = this . lastAnchorOffset = this . lastFocusNode = this . lastFocusOffset = null , this . polling = new qe , 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 , Ko ( 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 } Ie ( i , "paste" , function ( u ){ ! a ( u ) || ot ( r , u ) || rs ( u , r ) || h <= 11 && setTimeout ( gt ( r , function (){ return t . updateFromDOM ()}), 20 )}), Ie ( i , "compositionstart" , function ( u ){ t . composing = { data : u . data , done :! 1 }}), Ie ( i , "compositionupdate" , function ( u ){ t . composing || ( t . composing = { data : u . data , done :! 1 })}), Ie ( i , "compositionend" , function ( u ){ t . composing && ( u . data != t . composing . data && t . readFromDOMSoon (), t . composing . done =! 0 )}), Ie ( i , "touchstart" , function (){ return n . forceCompositionEnd ()}), Ie ( i , "input" , function (){ t . composing || t . readFromDOMSoon ()}); function l ( u ){ if ( ! ( ! a ( u ) || ot ( r , u ))){ if ( r . somethingSelected ()) zi ({ lineWise :! 1 , text : r . getSelections ()}), u . type == "cut" && r . replaceSelection ( "" , null , "cut" ); else if ( r . options . lineWiseCopyCut ){ var f = is ( r ); zi ({ lineWise :! 0 , text : f . text }), u . type == "cut" && r . operation ( function (){ r . setSelections ( f . ranges , 0 , ke ), r . replaceSelection ( "" , null , "cut" )})} else return ; if ( u . clipboardData ){ u . clipboardData . clearData (); var v = Qt . text . join ( `
` ); if ( u . clipboardData . setData ( "Text" , v ), u . clipboardData . getData ( "Text" ) == v ){ u . preventDefault (); return }} var A = os (), B = A . firstChild ; Ko ( B ), r . display . lineSpace . insertBefore ( A , r . display . lineSpace . firstChild ), B . value = Qt . text . join ( `
` ); var ee = H ( ze ( i )); N ( B ), setTimeout ( function (){ r . display . lineSpace . removeChild ( A ), ee . focus (), ee == i && n . showPrimarySelection ()}, 50 )}} Ie ( i , "copy" , l ), Ie ( 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 = Ya ( this . cm , ! 1 ); return e . focus = H ( ze ( this . div )) == 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 = Mi ( t , e . anchorNode , e . anchorOffset ), l = Mi ( t , e . focusNode , e . focusOffset ); if ( ! ( a &&! a . bad && l &&! l . bad && ye ( Zr ( a , l ), r ) == 0 && ye ( Et ( a , l ), i ) == 0 )){ var u = t . display . view , f = r . line >= t . display . viewFrom && ls ( t , r ) || { node : u [ 0 ]. measure . map [ 2 ], offset : 0 }, v = i . line < t . display . viewTo && ls ( t , i ); if ( ! v ){ var A = u [ u . length - 1 ]. measure , B = A . maps ? A . maps [ A . maps . length - 1 ] : A . map ; v = { node : B [ B . length - 1 ], offset : B [ B . length - 2 ] - B [ B . length - 3 ]}} if ( ! f ||! v ){ e . removeAllRanges (); return } var ee = e . rangeCount && e . getRangeAt ( 0 ), Y ; try { Y = X ( f . node , f . offset , v . offset , v . node )} catch {} Y && ( ! m && t . state . focused ? ( e . collapse ( f . node , f . offset ), Y . collapsed || ( e . removeAllRanges (), e . addRange ( Y ))) : ( e . removeAllRanges (), e . addRange ( Y )), ee && e . anchorNode == null ? e . addRange ( ee ) : m && 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 ){ V ( this . cm . display . cursorDiv , e . cursors ), V ( 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 O ( this . div , t )}, Qe . prototype . focus = function (){ this . cm . options . readOnly != "nocursor" && (( ! this . selectionInEditor () || H ( ze ( this . div )) != 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 ) : Nt ( 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 ( R && _ && this . cm . display . gutterSpecs . length && xd ( e . anchorNode )){ this . cm . triggerOnKeyDown ({ type : "keydown" , keyCode : 8 , preventDefault : Math . abs }), this . blur (), this . focus (); return } if ( ! this . composing ){ this . rememberSelection (); var n = Mi ( t , e . anchorNode , e . anchorOffset ), r = Mi ( t , e . focusNode , e . focusOffset ); n && r && Nt ( t , function (){ wt ( t . doc , yr ( n , r ), ke ),( 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 = ne ( r . line - 1 , Ae ( e . doc , r . line - 1 ). length )), i . ch == Ae ( e . doc , i .
2026-09-28 20:53:46 +03:00
`),N(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ie(i,"cut",a),Ie(i,"copy",a),Ie(e.scroller,"paste",function(l){if(!(lr(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)}}),Ie(e.lineSpace,"selectstart",function(l){lr(e,l)||kt(l)}),Ie(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"})}}),Ie(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},st.prototype.createField=function(e){this.wrapper=os(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ko(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=Ya(e);if(e.options.moveInputWithCursor){var i=Xt(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;V(n.cursorDiv,e.cursors),V(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&&N(this.textarea),s&&h>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&h>=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||H(ze(this.textarea))!=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||hr(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&&h>=9&&this.hasSelection===i||I&&/[\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 Nt(t,function(){$o(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
2026-10-19 17:33:22 +03:00
`)>-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&&h>=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=Mr(n,e),l=r.scroller.scrollTop;if(!a||d)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&>(n,wt)(n.doc,yr(a),ke);var f=i.style.cssText,v=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=` position : absolute ; width : 30 px ; height : 30 px ;
2026-09-28 20:53:46 +03:00
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")+` ;
2026-10-19 17:33:22 +03:00
outline : none ; border - width : 0 ; outline : none ; overflow : hidden ; opacity : . 05 ; filter : alpha ( opacity = 5 ); `;var B;g&&(B=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,B),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=v,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&ee();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&ee(),q){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Ie(window,"mouseup",ie)}else setTimeout(Y,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 wd(e,t){if(t=t?ge(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=H(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Ie(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=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function Sd(e){e.off=_t,e.on=Ie,e.wheelEventPixels=Af,e.Doc=Mt,e.splitLines=Ht,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Hl,e.isModifierKey=jl,e.lookupKey=un,e.normalizeKeyMap=Jf,e.StringStream=at,e.SharedTextMarker=Hn,e.TextMarker=kr,e.LineWidget=Rn,e.e_preventDefault=kt,e.e_stopPropagation=Rr,e.e_stop=dr,e.addClass=se,e.contains=O,e.rmClass=Q,e.keyNames=wr}gd(tt),yd(tt);var Td="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(Td,Ai)<0&&(tt.prototype[Ai]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=wd,Sd(tt),tt.version="5.65.21",tt}))});var Yn=Ke((fs,ds)=>{(function(o){typeof fs=="object"&&typeof ds=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,m,S){return{startState:function(){return{base:o.startState(p),overlay:o.startState(m),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(m,b.overlay)
` } else { var I = z [ 1 ], U = z [ 5 ], J =! ( S . test ( z [ 2 ]) || z [ 2 ]. indexOf ( ">" ) >= 0 ), re = J ? parseInt ( z [ 3 ], 10 ) + 1 + z [ 4 ] : z [ 2 ]. replace ( "x" , " " ); h [ g ] = `
` + I + re + U , J && b ( T , C )}} T . replaceSelections ( h )}; function b ( T , s ){ var h = s . line , g = 0 , C = 0 , _ = p . exec ( T . getLine ( h )), c = _ [ 1 ]; do { g += 1 ; var d = h + g , w = T . getLine ( d ), E = p . exec ( w ); if ( E ){ var z = E [ 1 ], k = parseInt ( _ [ 3 ], 10 ) + g - C , R = parseInt ( E [ 3 ], 10 ), M = R ; if ( c === z &&! isNaN ( R )) k === R && ( M = R + 1 ), k > R && ( M = k + 1 ), T . replaceRange ( w . replace ( p , z + M + E [ 4 ] + E [ 5 ]),{ line : d , ch : 0 },{ line : d , ch : w . length }); else { if ( c . length > z . length || c . length < z . length && g === 1 ) return ; C += 1 }}} while ( E )}})}); var bs = Ke (( ms , vs )=>{( function ( o ){ typeof ms == "object" && typeof vs == "object" ? o ( We ()) : typeof define == "function" && define . amd ? define ([ "../../lib/codemirror" ], o ) : o ( CodeMirror )})( function ( o ){ o . defineOption ( "placeholder" , "" , function ( h , g , C ){ var _ = C && C != o . Init ; if ( g &&! _ ) h . on ( "blur" , b ), h . on ( "change" , T ), h . on ( "swapDoc" , T ), o . on ( h . getInputField (), "compositionupdate" , h . state . placeholderCompose = function (){ S ( h )}), T ( h ); else if ( ! g && _ ){ h . off ( "blur" , b ), h . off ( "change" , T ), h . off ( "swapDoc" , T ), o . off ( h . getInputField (), "compositionupdate" , h . state . placeholderCompose ), p ( h ); var c = h . getWrapperElement (); c . className = c . className . replace ( " CodeMirror-empty" , "" )} g &&! h . hasFocus () && b ( h )}); function p ( h ){ h . state . placeholder && ( h . state . placeholder . parentNode . removeChild ( h . state . placeholder ), h . state . placeholder = null )} function m ( h ){ p ( h ); var g = h . state . placeholder = document . createElement ( "pre" ); g . style . cssText = "height: 0; overflow: visible" , g . style . direction = h . getOption ( "direction" ), g . className = "CodeMirror-placeholder CodeMirror-line-like" ; var C = h . getOption ( "placeholder" ); typeof C == "string" && ( C = document . createTextNode ( C )), g . appendChild ( C ), h . display . lineSpace . insertBefore ( g , h . display . lineSpace . firstChild )} function S ( h ){ setTimeout ( function (){ var g =! 1 ; if ( h . lineCount () == 1 ){ var C = h . getInputField (); g = C . nodeName == "TEXTAREA" ?! h . getLine ( 0 ). length :! /[^\u200b]/ . test ( C . querySelector ( ".CodeMirror-line" ). textContent )} g ? m ( h ) : p ( h )}, 20 )} function b ( h ){ s ( h ) && m ( h )} function T ( h ){ var g = h . getWrapperElement (), C = s ( h ); g . className = g . className . replace ( " CodeMirror-empty" , "" ) + ( C ? " CodeMirror-empty" : "" ), C ? m ( h ) : p ( h )} function s ( h ){ return h . lineCount () === 1 && h . getLine ( 0 ) === "" }})}); var _s = Ke (( ys , xs )=>{( function ( o ){ typeof ys == "object" && typeof xs == "object" ? o ( We ()) : typeof define == "function" && define . amd ? define ([ "../../lib/codemirror" ], o ) : o ( CodeMirror )})( function ( o ){ "use strict" ; o . defineOption ( "styleSelectedText" , ! 1 , function ( _ , c , d ){ var w = d && d != o . Init ; c &&! w ? ( _ . state . markedSelection = [], _ . state . markedSelectionStyle = typeof c == "string" ? c : "CodeMirror-selectedtext" , g ( _ ), _ . on ( "cursorActivity" , p ), _ . on ( "change" , m )) :! c && w && ( _ . off ( "cursorActivity" , p ), _ . off ( "change" , m ), h ( _ ), _ . state . markedSelection = _ . state . markedSelectionStyle = null )}); function p ( _ ){ _ . state . markedSelection && _ . operation ( function (){ C ( _ )})} function m ( _ ){ _ . state . markedSelection && _ . state . markedSelection . length && _ . operation ( function (){ h ( _ )})} var S = 8 , b = o . Pos , T = o . cmpPos ; function s ( _ , c , d , w ){ if ( T ( c , d ) != 0 ) for ( var E = _ . state . markedSelection , z = _ . state . markedSelectionStyle , k = c . line ;;){ var R = k == c . line ? c : b ( k , 0 ), M = k + S , I = M >= d . line , U = I ? d : b ( M , 0 ), J = _ . markText ( R , U ,{ className : z }); if ( w == null ? E . push ( J ) : E . splice ( w ++ , 0 , J ), I ) break ; k = M }} function h ( _ ){ for ( var c = _ . state . markedSelection , d = 0 ; d < c . length ; ++ d ) c [ d ]. clear (); c . length = 0 } function g ( _ ){ h ( _ ); for ( var c = _ . listSelections (), d = 0 ; d < c . length ; d ++ ) s ( _ , c [ d ]. from (), c [ d ]. to ())} function C ( _ ){ if ( ! _ . somethingSelected ()) return h ( _ ); if ( _ . listSelections (). length > 1 ) return g ( _ ); var c = _ . getCursor ( "start" ), d = _ . getCursor ( "end" ), w = _ . state . markedSelection ; if ( ! w . length ) return s ( _ , c , d ); var E = w [ 0 ]. find (), z = w [ w . length - 1 ]. find (); if ( ! E ||! z || d . line - c . line <= S || T ( c , z . to ) >= 0 || T ( d , E . from ) <= 0 ) return g ( _ ); for (; T ( c , E . from ) > 0 ;) w . shift (). clear (), E = w [ 0 ]. find (); for ( T ( c , E . from ) < 0 && ( E . to . line - c . line < S ? ( w . shift (). clear (), s ( _ , c , E . to , 0 )) : s ( _ , c , E . from , 0 )); T ( d , z . to ) < 0 ;) w . pop (). clear (), z = w [ w . length - 1 ]. find (); T ( d , z . to ) > 0 && ( d . line - z . from . line < S ? ( w . pop (). clear (), s ( _ , z . from , d )) : s ( _ , z . to , d ))}})}); var Ss = Ke (( ks , ws )=>{( function ( o ){ typeof ks == "object" && typeof ws == "object" ? o ( We ()) : typeof define == "function" && define . amd ? define ([ "../../lib/codemirror" ], o ) : o ( CodeMirror )})( function ( o ){ "use strict" ; var p = o . Pos ; function m ( k ){ var R = k . flags ; return R ?? ( k . ignoreCase ? "i" : "" ) + ( k . global ?
2026-09-28 20:53:46 +03:00
`+q}U=U*2,R.lastIndex=M.ch;var D=R.exec(I);if(D){var Q=I.slice(0,D.index).split(`
`),j=D[0].split(`
2026-10-19 17:33:22 +03:00
`),V=M.line+Q.length-1,y=Q[Q.length-1].length;return{from:p(V,y),to:p(V+j.length-1,j.length==1?y+j[0].length:j[j.length-1].length),match:D}}}}function h(k,R,M){for(var I,U=0;U<=k.length;){R.lastIndex=U;var J=R.exec(k);if(!J)break;var re=J.index+J[0].length;if(re>k.length-M)break;(!I||re>I.index+I[0].length)&&(I=J),U=J.index+1}return I}function g(k,R,M){R=S(R,"g");for(var I=M.line,U=M.ch,J=k.firstLine();I>=J;I--,U=-1){var re=k.getLine(I),F=h(re,R,U<0?0:re.length-U);if(F)return{from:p(I,F.index),to:p(I,F.index+F[0].length),match:F}}}function C(k,R,M){if(!b(R))return g(k,R,M);R=S(R,"gm");for(var I,U=1,J=k.getLine(M.line).length-M.ch,re=M.line,F=k.firstLine();re>=F;){for(var q=0;q<U&&re>=F;q++){var D=k.getLine(re--);I=I==null?D:D+`
2026-09-28 20:53:46 +03:00
`+I}U*=2;var Q=h(I,R,J);if(Q){var j=I.slice(0,Q.index).split(`
`),V=Q[0].split(`
2026-10-19 17:33:22 +03:00
`),y=re+j.length,G=j[j.length-1].length;return{from:p(y,G),to:p(y+V.length-1,V.length==1?G+V[0].length:V[V.length-1].length),match:Q}}}}var _,c;String.prototype.normalize?(_=function(k){return k.normalize("NFD").toLowerCase()},c=function(k){return k.normalize("NFD")}):(_=function(k){return k.toLowerCase()},c=function(k){return k});function d(k,R,M,I){if(k.length==R.length)return M;for(var U=0,J=M+Math.max(0,k.length-R.length);;){if(U==J)return U;var re=U+J>>1,F=I(k.slice(0,re)).length;if(F==M)return re;F>M?J=re:U=re+1}}function w(k,R,M,I){if(!R.length)return null;var U=I?_:c,J=U(R).split(/\r|\n\r?/);e:for(var re=M.line,F=M.ch,q=k.lastLine()+1-J.length;re<=q;re++,F=0){var D=k.getLine(re).slice(F),Q=U(D);if(J.length==1){var j=Q.indexOf(J[0]);if(j==-1)continue e;var M=d(D,Q,j,U)+F;return{from:p(re,d(D,Q,j,U)+F),to:p(re,d(D,Q,j+J[0].length,U)+F)}}else{var V=Q.length-J[0].length;if(Q.slice(V)!=J[0])continue e;for(var y=1;y<J.length-1;y++)if(U(k.getLine(re+y))!=J[y])continue e;var G=k.getLine(re+J.length-1),X=U(G),O=J[J.length-1];if(X.slice(0,O.length)!=O)continue e;return{from:p(re,d(D,Q,V,U)+F),to:p(re+J.length-1,d(G,X,O.length,U))}}}}function E(k,R,M,I){if(!R.length)return null;var U=I?_:c,J=U(R).split(/\r|\n\r?/);e:for(var re=M.line,F=M.ch,q=k.firstLine()-1+J.length;re>=q;re--,F=-1){var D=k.getLine(re);F>-1&&(D=D.slice(0,F));var Q=U(D);if(J.length==1){var j=Q.lastIndexOf(J[0]);if(j==-1)continue e;return{from:p(re,d(D,Q,j,U)),to:p(re,d(D,Q,j+J[0].length,U))}}else{var V=J[J.length-1];if(Q.slice(0,V.length)!=V)continue e;for(var y=1,M=re-J.length+1;y<J.length-1;y++)if(U(k.getLine(M+y))!=J[y])continue e;var G=k.getLine(re+1-J.length),X=U(G);if(X.slice(X.length-J[0].length)!=J[0])continue e;return{from:p(re+1-J.length,d(G,X,G.length-J[0].length,U)),to:p(re,d(D,Q,V.length,U))}}}}function z(k,R,M,I){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=k,M=M?k.clipPos(M):p(0,0),this.pos={from:M,to:M};var U;typeof I=="object"?U=I.caseFold:(U=I,I=null),typeof R=="string"?(U==null&&(U=!1),this.matches=function(J,re){return(J?E:w)(k,R,re,U)}):(R=S(R,"gm"),!I||I.multiline!==!1?this.matches=function(J,re){return(J?C:s)(k,R,re)}:this.matches=function(J,re){return(J?g:T)(k,R,re)})}z.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(k){var R=this.doc.clipPos(k?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(R=p(R.line,R.ch),k?(R.ch--,R.ch<0&&(R.line--,R.ch=(this.doc.getLine(R.line)||"").length)):(R.ch++,R.ch>(this.doc.getLine(R.line)||"").length&&(R.ch=0,R.line++)),o.cmpPos(R,this.doc.clipPos(R))!=0))return this.atOccurrence=!1;var M=this.matches(k,R);if(this.afterEmptyMatch=M&&o.cmpPos(M.from,M.to)==0,M)return this.pos=M,this.atOccurrence=!0,this.pos.match||!0;var I=p(k?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:I,to:I},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(k,R){if(this.atOccurrence){var M=o.splitLines(k);this.doc.replaceRange(M,this.pos.from,this.pos.to,R),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(k,R,M){return new z(this.doc,k,R,M)}),o.defineDocExtension("getSearchCursor",function(k,R,M){return new z(this,k,R,M)}),o.defineExtension("selectMatches",function(k,R){for(var M=[],I=this.getSearchCursor(k,this.getCursor("from"),R);I.findNext()&&!(o.cmpPos(I.to(),this.getCursor("to"))>0);)M.push({anchor:I.from(),head:I.to()});M.length&&this.setSelections(M,0)})})});var Vo=Ke((Ts,Ls)=>{(function(o){typeof Ts=="object"&&typeof Ls=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(O,H,se,_e,N,L){this.indented=O,this.column=H,this.type=se,this.info=_e,this.align=N,this.prev=L}function m(O,H,se,_e){var N=O.indented;return O.context&&O.context.type=="statement"&&se!="statement"&&(N=O.context.indented),O.context=new p(N,H,se,_e,null,
` && ( b . innerActive = b . inner = null ); else for ( var s = 0 ; s < m . length ; ++ s ){ var h = m [ s ]; h . open === `
` && ( b . innerActive = h , b . inner = o . startState ( h . mode , T . indent ? T . 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 uc = Ke (( lc , sc )=>{( function ( o ){ typeof lc == "object" && typeof sc == "object" ? o ( We (), Di (), ac ()) : 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 , m ){ var S = o . getMode ( p , "handlebars-tags" ); return ! m ||! m . base ? S : o . multiplexingMode ( o . getMode ( p , m . base ),{ open : "{{" , close : /\}\}\}?/ , mode : S , parseDelimiters :! 0 })}), o . defineMIME ( "text/x-handlebars-template" , "handlebars" )})}); var dc = Ke (( cc , fc )=>{( function ( o ){ "use strict" ; typeof cc == "object" && typeof fc == "object" ? o ( We (), Yn (), mn (), vn (), ec (), gn (), ea (), ta (), nc (), uc ()) : 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 ( m , S ){ var b = { token : function ( T ){ if ( T . match ( /^\{\{.*?\}\}/ )) return "meta mustache" ; for (; T . next () &&! T . match ( "{{" , ! 1 );); return null }}; return o . overlayMode ( o . getMode ( m , S . backdrop || "text/html" ), b )}), o . defineMode ( "vue" , function ( m ){ return o . getMode ( m ,{ 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 gc = Ke (( pc , hc )=>{( function ( o ){ typeof pc == "object" && typeof hc == "object" ? o ( We ()) : 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" ], m = new RegExp ( "\\b((" + p . join ( ")|(" ) + "))$" , "i" ); return { token : function ( S , b ){ var T = S . peek (), s = b . escaped ; if ( b . escaped =! 1 , T == "#" && ( S . pos == 0 || /\s/ . test ( S . string . charAt ( S . pos - 1 )))) return S . skipToEnd (), "comment" ; if ( S . match ( /^('([^']|\\.)*'?|"([^"]|\\.)*"?)/ )) return "string" ; if ( b . literal && S . indentation () > b . keyCol ) return S . skipToEnd (), "string" ; if ( b . literal && ( b . literal =! 1 ), S . sol ()){ if ( b . keyCol = 0 , b . pair =! 1 , b . pairStart =! 1 , S . match ( "---" ) || S . match ( "..." )) return "def" ; if ( S . match ( /\s*-\s+/ )) return "meta" } if ( S . match ( /^(\{|\}|\[|\])/ )) return T == "{" ? b . inlinePairs
`,L=`
`+O;_e&&se++,_e&&X.ch===0&&(L=O+`
`,se--),jr(y,!1,[N,L]),y.setSelection({line:H,ch:0},{line:se,ch:0})}var s=o.codemirror,h=s.getCursor("start"),g=s.getCursor("end"),C=s.getTokenAt({line:h.line,ch:h.ch||1}),_=s.getLineHandle(h.line),c=b(s,h.line,_,C),d,w,E;if(c==="single"){var z=_.text.slice(0,h.ch).replace("` ",""),k=_.text.slice(h.ch).replace(" `","");s.replaceRange(z+k,{line:h.line,ch:0},{line:h.line,ch:99999999999999}),h.ch--,h!==g&&g.ch--,s.setSelection(h,g),s.focus()}else if(c==="fenced")if(h.line!==g.line||h.ch!==g.ch){for(d=h.line;d>=0&&(_=s.getLineHandle(d),!m(_));d--);var R=s.getTokenAt({line:d,ch:1}),M=S(R).fencedChars,I,U,J,re;m(s.getLineHandle(h.line))?(I="",U=h.line):m(s.getLineHandle(h.line-1))?(I="",U=h.line-1):(I=M+`
`,U=h.line),m(s.getLineHandle(g.line))?(J="",re=g.line,g.ch===0&&(re+=1)):g.ch!==0&&m(s.getLineHandle(g.line+1))?(J="",re=g.line+1):(J=M+`
`,re=g.line+1),g.ch===0&&(re-=1),s.operation(function(){s.replaceRange(J,{line:re,ch:0},{line:re+(J?0:1),ch:0}),s.replaceRange(I,{line:U,ch:0},{line:U+(I?0:1),ch:0})}),s.setSelection({line:U+(I?1:0),ch:0},{line:re+(I?1:-1),ch:0}),s.focus()}else{var F=h.line;if(m(s.getLineHandle(h.line))&&(b(s,h.line+1)==="fenced"?(d=h.line,F=h.line+1):(w=h.line,F=h.line-1)),d===void 0)for(d=F;d>=0&&(_=s.getLineHandle(d),!m(_));d--);if(w===void 0)for(E=s.lineCount(),w=F;w<E&&(_=s.getLineHandle(w),!m(_));w++);s.operation(function(){s.replaceRange("",{line:d,ch:0},{line:d+1,ch:0}),s.replaceRange("",{line:w-1,ch:0},{line:w,ch:0})}),s.focus()}else if(c==="indented"){if(h.line!==g.line||h.ch!==g.ch)d=h.line,w=g.line,g.ch===0&&w--;else{for(d=h.line;d>=0;d--)if(_=s.getLineHandle(d),!_.text.match(/^\s*$/)&&b(s,d,_)!=="indented"){d+=1;break}for(E=s.lineCount(),w=h.line;w<E;w++)if(_=s.getLineHandle(w),!_.text.match(/^\s*$/)&&b(s,w,_)!=="indented"){w-=1;break}}var q=s.getLineHandle(w+1),D=q&&s.getTokenAt({line:w+1,ch:q.text.length-1}),Q=D&&S(D).indentedCode;s.operation(function(){Q&&s.replaceRange(`
`,{line:w+1,ch:0});for(var y=d;y<=w;y++)s.indentLine(y,"subtract")}),s.focus()}else{var j=h.line===g.line&&h.ch===g.ch&&h.ch===0,V=h.line!==g.line;j||V?T(s,h,g,p):jr(s,!1,["` "," `"])}}function Bi(o){la(o.codemirror,"quote")}function Jn(o){Lr(o.codemirror,"smaller")}function ji(o){Lr(o.codemirror,"bigger")}function Ri(o){Lr(o.codemirror,void 0,1)}function Hi(o){Lr(o.codemirror,void 0,2)}function Wi(o){Lr(o.codemirror,void 0,3)}function na(o){Lr(o.codemirror,void 0,4)}function ia(o){Lr(o.codemirror,void 0,5)}function oa(o){Lr(o.codemirror,void 0,6)}function Ui(o){var p=o.codemirror,m="*";["-","+","*"].includes(o.options.unorderedListStyle)&&(m=o.options.unorderedListStyle),la(p,"unordered-list",m)}function $i(o){la(o.codemirror,"ordered-list")}function Ki(o){jd(o.codemirror)}function Gi(o){var p=o.options,m="https://";if(p.promptURLs){var S=prompt(p.promptTexts.link,m);if(!S)return!1;m=xc(S)}kc(o,"link",p.insertTexts.link,m)}function Zi(o){var p=o.options,m="https://";if(p.promptURLs){var S=prompt(p.promptTexts.image,m);if(!S)return!1;m=xc(S)}kc(o,"image",p.insertTexts.image,m)}function xc(o){return encodeURI(o).replace(/([\\()])/g,"\\$1")}function aa(o){o.openBrowseFileWindow()}function _c(o,p){var m=o.codemirror,S=Tr(m),b=o.options,T=p.substr(p.lastIndexOf("/")+1),s=T.substring(T.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(s))jr(m,S.image,b.insertTexts.uploadedImage,p);else{var h=b.insertTexts.link;h[0]="["+T,jr(m,S.link,h,p)}o.updateStatusBar("upload-image",o.options.imageTexts.sbOnUploaded.replace("#image_name#",T)),setTimeout(function(){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit)},1e3)}function Xi(o){var p=o.codemirror,m=Tr(p),S=o.options;jr(p,m.table,S.insertTexts.table)}function Yi(o){var p=o.codemirror,m=Tr(p),S=o.options;jr(p,m.image,S.insertTexts.horizontalRule)}function Qi(o){var p=o.codemirror;p.undo(),p.focus()}function Vi(o){var p=o.codemirror;p.redo(),p.focus()}function bn(o){var p=o.codemirror,m=p.getWrapperElement(),S=m.nextSibling,b=o.toolbarElements&&o.toolbarElements["side-by-side"],T=!1,s=m.parentNode;S.classList.contains("editor-preview-active-side")?(o.options.sideBySideFullscreen===!1&&s.classList.remove("sided--no-fullscreen"),S.classList.remove("editor-preview-active-side"),b&&b.classList.remove("active"),m.classList.remove("CodeMirror-sided")):(setTimeout(function(){p.getOption("fullScreen")||(o.options.sideBySideFullscreen===!1?s.classList.add("sided--no-fullscreen"):Br(o)),S.classList.add("editor-preview-active-side")},1),b&&b.classList.add("active"),m.classList.add("CodeMirror-sided"),T=!0);var h=m.lastChild;if(h.classList.contains("editor-preview-active")){h.classList.remove("editor-preview-active");var g=o.toolbarElements.preview,C=o.toolbar_div;g.classList.remove("active"),C.classList.remove("disabled-for-preview")}var _=function(){var d=o.options.previewRender(o.value(),S);d!=null&&(S.innerHTML=d)};if(p.sideBySideRenderingFunction||(p.sideBySideRenderingFunction=_),T){var c=o.options.previewRender(o.value(),S);c!=null&&(S.innerHTML=c),p.on("update",p.sideBySideRenderingFunction)}else p.off("update",p.sideBySideRenderingFunction);p.refresh()}function Ji(o){var p=o.codemirror,m=p.getWrapperElement(),S=o.toolbar_div,b=o.options.toolbar?o.toolbarElements.preview:!1,T=m.lastChild,s=p.getWrapperElement().nextSibling;if(s.classList.contains("editor-preview-active-side")&&bn(o),!T||!T.classList.contains("editor-preview-full")){if(T=document.createElement("div"),T.className="editor-preview-full",o.options.previewClass)if(Array.isArray(o.options.previewClass))for(var h=0;h<o.options.previewClass.length;h++)T.classList.add(o.options.previewClass[h]);else typeof o.options.previewClass=="string"&&T.classList.add(o.options.previewClass);m.appendChild(T)}T.classList.contains("editor-preview-active")?(T.classList.remove("editor-preview-active"),b&&(b.classList.remove("active"),S.classList.remove("disabled-for-preview"))):(setTimeout(function(){T.classList.add("editor-preview-active")},1),b&&(b.classList.add("acti
2026-09-28 20:53:46 +03:00
| Column 1 | Column 2 | Column 3 |
| -------- | -------- | -------- |
| Text | Text | Text |
` ], horizontalRule : [ "" , `
-----
2026-10-19 17:33:22 +03:00
` ]}, Hd = { link : "URL for the link:" , image : "URL of the image:" }, Wd = { locale : "en-US" , format : { hour : "2-digit" , minute : "2-digit" }}, Ud = { bold : "**" , code : "```" , italic : "*" }, $d = { 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" }, Kd = { 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#." }; Te . prototype . uploadImages = function ( o , p , m ){ if ( o . length !== 0 ){ for ( var S = [], b = 0 ; b < o . length ; b ++ ) S . push ( o [ b ]. name ), this . uploadImage ( o [ b ], p , m ); this . updateStatusBar ( "upload-image" , this . options . imageTexts . sbOnDrop . replace ( "#images_names#" , S . join ( ", " )))}}; Te . prototype . uploadImagesUsingCustomFunction = function ( o , p ){ if ( p . length !== 0 ){ for ( var m = [], S = 0 ; S < p . length ; S ++ ) m . push ( p [ S ]. name ), this . uploadImageUsingCustomFunction ( o , p [ S ]); this . updateStatusBar ( "upload-image" , this . options . imageTexts . sbOnDrop . replace ( "#images_names#" , m . join ( ", " )))}}; Te . prototype . updateStatusBar = function ( o , p ){ if ( this . gui . statusbar ){ var m = this . gui . statusbar . getElementsByClassName ( o ); m . length === 1 ? this . gui . statusbar . getElementsByClassName ( o )[ 0 ]. textContent = p : m . length === 0 ? console . log ( "EasyMDE: status bar item " + o + " was not found." ) : console . log ( "EasyMDE: Several status bar items named " + o + " was found." )}}; Te . 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 m = this . options . renderingConfig . hljs || window . hljs ; m && ( p . highlight = function ( b , T ){ return T && m . getLanguage ( T ) ? m . highlight ( T , b ). value : m . highlightAuto ( b ). value })} marked . setOptions ( p ); var S = marked . parse ( o ); return this . options . renderingConfig && typeof this . options . renderingConfig . sanitizerFunction == "function" && ( S = this . options . renderingConfig . sanitizerFunction . call ( this , S )), S = Id ( S ), S = Nd ( S ), S }}; Te . 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 , m = this , S = {}; function b ( I ){ let U = I . getInputField (), J = U . form ; if ( J ){ let re = Array . from ( J . elements ). filter ( q => ! ( q . closest && q . closest ( ".editor-toolbar" ) || q . offsetParent === null )), F = re . indexOf ( U ); F !==- 1 && F + 1 < re . length && re [ F + 1 ] && re [ F + 1 ]. focus ()}} function T ( I ){ let U = I . getInputField (), J = U . form ; if ( J ){ let re = Array . from ( J . elements ). filter ( q => ! ( q . closest && q . closest ( ".editor-toolbar" ) || q . offsetParent === null )), F = re . indexOf ( U ); if ( F !==- 1 ) for ( let q = F - 1 ; q >= 0 ; q -- ){ let D = re [ q ]; if ( D ){ D . focus (); break }}}} for ( var s in p . shortcuts ) p . shortcuts [ s ] !== null && Vn [ s ] !== null && ( function ( I ){ S [ yc ( p . shortcuts [ I ])] = function (){ var U = Vn [ I ]; typeof U == "function" ? U ( m ) : typeof U == "string" && window . open ( U , "_blank" )}})( s ); S . Enter = "newlineAndIndentContinueMarkdownList" , S . Tab = I =>{ let U = I . getSelection (); U && U . length > 0 ? I . execCommand ( "indentMore" ) : b ( I )}, S [ "Shift-Tab" ] = I =>{ let U = I . getSelection (); U && U . length > 0 ? I . execCommand ( "indentLess" ) : T ( I )}, S . Esc = function ( I ){ I . getOption ( "fullScreen" ) && Br ( m )}, this . documentOnKeyDown = function ( I ){ I = I || window . event , I . keyCode == 27 && m . codemirror . getOption ( "fullScreen" ) && Br ( m )}, document . addEventListener ( "keydown" , this . documentOnKeyDown , ! 1 ); var h , g ; p . overlayMode ? ( CodeMirror . defineMode ( "overlay-mode" , function ( I ){ return CodeMirror . overlayMode ( CodeMirror . getMode ( I , p . spellChecker !==! 1 ? "spell-checker" : "gfm" ), p . overlayMode . mode , p . overlayMode . combine )}), h = "overlay-mode" , g = p . parsingConfig , g . gitHubSpice =! 1 ) : ( h = p . parsingConfig , h . name = "gfm" , h . gitHubSpice =! 1 ), p . spellChecker !==! 1 && ( h = "spell-checker" , g = p . parsingConfig , g . name = "gfm" , g . gitHubSpice =! 1 , typeof p . spellChecker == "function" ? p . spellChecker ({ codeMirrorInstance : CodeMirror }) : CodeMirrorSpellChecker ({ codeMirrorInstance : CodeMirror })); function C ( I , U , J ){ return { addNew :! 1 }} CodeMirror . getMode ( "php" ). mime = "text/x-php" , this . codemirror = CodeMirror . fromTextArea ( o ,{ mode : h , backdrop : g , 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 : S , direction : p . direction , lineWrapping : p . lineWrapping !==! 1 , allowDropFileTypes : [ "text/plain" ], placeholder : p . pl