UNPKG

@nodefony/monitoring-bundle

Version:
1 lines 198 kB
(self["webpackChunk_nodefony_monitoring_bundle"]=self["webpackChunk_nodefony_monitoring_bundle"]||[]).push([[3653,5237,7923,8208],{97923:function(e,t,n){(function(e){e(n(15237))})((function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),a=t.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=i(o),h=!c&&a>=0&&u.test(s.text.charAt(a))&&r[s.text.charAt(a)]||u.test(s.text.charAt(a+1))&&r[s.text.charAt(++a)];if(!h)return null;var f=">"==h.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(a==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,a+1)),p=l(e,n(t.line,a+(f>0?1:0)),f,d,o);return null==p?null:{from:n(t.line,a),to:p&&p.pos,match:p&&p.ch==h.charAt(0),forward:f>0}}function l(e,t,o,l,s){for(var a=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],h=i(s),f=o>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),d=t.line;d!=f;d+=o){var p=e.getLine(d);if(p){var g=o>0?0:p.length-1,m=o>0?p.length:-1;if(!(p.length>a))for(d==t.line&&(g=t.ch-(o<0?1:0));g!=m;g+=o){var v=p.charAt(g);if(h.test(v)&&(void 0===l||(e.getTokenTypeAt(n(d,g+1))||"")==(l||""))){var y=r[v];if(y&&">"==y.charAt(1)==o>0)u.push(v);else{if(!u.length)return{pos:n(d,g),ch:v};u.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var l=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,a=[],c=e.listSelections(),u=0;u<c.length;u++){var h=c[u].empty()&&o(e,c[u].head,i);if(h&&(h.match||!1!==s)&&e.getLine(h.from.line).length<=l){var f=h.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(h.from,n(h.from.line,h.from.ch+1),{className:f})),h.to&&e.getLine(h.to.line).length<=l&&a.push(e.markText(h.to,n(h.to.line,h.to.ch+1),{className:f}))}}if(a.length){t&&e.state.focused&&e.focus();var d=function(){e.operation((function(){for(var e=0;e<a.length;e++)a[e].clear()}))};if(!r)return d;setTimeout(d,800)}}function a(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",a),t.off("focus",a),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",a),t.on("focus",a),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return l(this,e,t,n,r)}))}))},23653:function(e,t,n){(function(e){e(n(15237))})((function(e){"use strict";var t,n,r=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var n=i(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function l(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,n){t=o(t,"g");for(var i=n.line,l=n.ch,s=e.lastLine();i<=s;i++,l=0){t.lastIndex=l;var a=e.getLine(i),c=t.exec(a);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function a(e,t,n){if(!l(t))return s(e,t,n);t=o(t,"gm");for(var i,a=1,c=n.line,u=e.lastLine();c<=u;){for(var h=0;h<a;h++){if(c>u)break;var f=e.getLine(c++);i=null==i?f:i+"\n"+f}a*=2,t.lastIndex=n.ch;var d=t.exec(i);if(d){var p=i.slice(0,d.index).split("\n"),g=d[0].split("\n"),m=n.line+p.length-1,v=p[p.length-1].length;return{from:r(m,v),to:r(m+g.length-1,1==g.length?v+g[0].length:g[g.length-1].length),match:d}}}}function c(e,t,n){var r,i=0;while(i<=e.length){t.lastIndex=i;var o=t.exec(e);if(!o)break;var l=o.index+o[0].length;if(l>e.length-n)break;(!r||l>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=o(t,"g");for(var i=n.line,l=n.ch,s=e.firstLine();i>=s;i--,l=-1){var a=e.getLine(i),u=c(a,t,l<0?0:a.length-l);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function h(e,t,n){if(!l(t))return u(e,t,n);t=o(t,"gm");for(var i,s=1,a=e.getLine(n.line).length-n.ch,h=n.line,f=e.firstLine();h>=f;){for(var d=0;d<s&&h>=f;d++){var p=e.getLine(h--);i=null==i?p:p+"\n"+i}s*=2;var g=c(i,t,a);if(g){var m=i.slice(0,g.index).split("\n"),v=g[0].split("\n"),y=h+m.length,b=m[m.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:g}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var l=i+o>>1,s=r(e.slice(0,l)).length;if(s==n)return l;s>n?o=l:i=l+1}}function d(e,i,o,l){if(!i.length)return null;var s=l?t:n,a=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,h=e.lastLine()+1-a.length;c<=h;c++,u=0){var d=e.getLine(c).slice(u),p=s(d);if(1==a.length){var g=p.indexOf(a[0]);if(-1==g)continue e;o=f(d,p,g,s)+u;return{from:r(c,f(d,p,g,s)+u),to:r(c,f(d,p,g+a[0].length,s)+u)}}var m=p.length-a[0].length;if(p.slice(m)==a[0]){for(var v=1;v<a.length-1;v++)if(s(e.getLine(c+v))!=a[v])continue e;var y=e.getLine(c+a.length-1),b=s(y),w=a[a.length-1];if(b.slice(0,w.length)==w)return{from:r(c,f(d,p,m,s)+u),to:r(c+a.length-1,f(y,b,w.length,s))}}}}function p(e,i,o,l){if(!i.length)return null;var s=l?t:n,a=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,h=e.firstLine()-1+a.length;c>=h;c--,u=-1){var d=e.getLine(c);u>-1&&(d=d.slice(0,u));var p=s(d);if(1==a.length){var g=p.lastIndexOf(a[0]);if(-1==g)continue e;return{from:r(c,f(d,p,g,s)),to:r(c,f(d,p,g+a[0].length,s))}}var m=a[a.length-1];if(p.slice(0,m.length)==m){var v=1;for(o=c-a.length+1;v<a.length-1;v++)if(s(e.getLine(o+v))!=a[v])continue e;var y=e.getLine(c+1-a.length),b=s(y);if(b.slice(b.length-a[0].length)==a[0])return{from:r(c+1-a.length,f(y,b,y.length-a[0].length,s)),to:r(c,f(d,p,m.length,s))}}}}function g(e,t,n,i){var l;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?l=i.caseFold:(l=i,i=null),"string"==typeof t?(null==l&&(l=!1),this.matches=function(n,r){return(n?p:d)(e,t,r,l)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?u:s)(e,t,r)}:this.matches=function(n,r){return(n?h:a)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),g.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new g(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new g(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);while(i.findNext()){if(e.cmpPos(i.to(),this.getCursor("to"))>0)break;r.push({anchor:i.from(),head:i.to()})}r.length&&this.setSelections(r,0)}))}))},8208:function(e,t,n){(function(e){e(n(15237),n(23653),n(97923))})((function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var l,s="start",a=r.ch,c=a,u=i<0?0:o.length,h=0;c!=u;c+=i,h++){var f=o.charAt(i<0?c-1:c),d="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==d&&f.toUpperCase()==f&&(d="W"),"start"==s)"o"!=d?(s="in",l=d):a=c+i;else if("in"==s&&l!=d){if("w"==l&&"W"==d&&i<0&&c--,"W"==l&&"w"==d&&i>0){if(c==a+1){l="w";continue}c--}break}}return n(r.line,c)}function i(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,l=0;l<e;l++){var s=t.listSelections()[l].head;if(!(s.line<=o)){var a=n(s.line+(r?0:1),0);t.replaceRange("\n",a,null,"+insertLine"),t.indentLine(a.line,null,!0),i.push({head:a,anchor:a}),o=s.line+1}}t.setSelections(i)})),t.execCommand("indentAuto")}function l(t,r){var i=r.ch,o=i,l=t.getLine(r.line);while(i&&e.isWordChar(l.charAt(i-1)))--i;while(o<l.length&&e.isWordChar(l.charAt(o)))++o;return{from:n(r.line,i),to:n(r.line,o),word:l.slice(i,o)}}function s(e,t){for(var n=e.listSelections(),r=[],i=0;i<n.length;i++){var o=n[i],l=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),s=e.findPosV(o.head,t,"line",o.head.goalColumn);l.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,s.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var a={anchor:l,head:s};r.push(o),r.push(a)}e.setSelections(r)}function a(t,n,r){for(var i=0;i<t.length;i++)if(0==e.cmpPos(t[i].from(),n)&&0==e.cmpPos(t[i].to(),r))return!0;return!1}t.goSubwordLeft=function(e){i(e,-1)},t.goSubwordRight=function(e){i(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++)for(var o=t[i].from(),l=t[i].to(),s=o.line;s<=l.line;++s)l.line>o.line&&s==l.line&&0==l.ch||r.push({anchor:s==o.line?o:n(s,0),head:s==l.line?l:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i];r.push({anchor:n(o.from().line,0),head:n(o.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return o(e,!1)},t.insertLineBefore=function(e){return o(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),i=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,i)){var s=l(t,r);if(!s.word)return;t.setSelection(s.from,s.to),o=!0}else{var c=t.getRange(r,i),u=o?new RegExp("\\b"+c+"\\b"):c,h=t.getSearchCursor(u,i),f=h.findNext();if(f||(h=t.getSearchCursor(u,n(t.firstLine(),0)),f=h.findNext()),!f||a(t.listSelections(),h.from(),h.to()))return;t.addSelection(h.from(),h.to())}o&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),i=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,i)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=i})))},t.addCursorToPrevLine=function(e){s(e,-1)},t.addCursorToNextLine=function(e){s(e,1)};var c="(){}[]";function u(t){for(var r=t.listSelections(),i=[],o=0;o<r.length;o++){var l=r[o],s=l.head,a=t.scanForBracket(s,-1);if(!a)return!1;for(;;){var u=t.scanForBracket(s,1);if(!u)return!1;if(u.ch==c.charAt(c.indexOf(a.ch)+1)){var h=n(a.pos.line,a.pos.ch+1);if(0!=e.cmpPos(h,l.from())||0!=e.cmpPos(u.pos,l.to())){i.push({anchor:h,head:u.pos});break}if(a=t.scanForBracket(a.pos,-1),!a)return!1}s=n(u.pos.line,u.pos.ch+1)}}return t.setSelections(i),!0}function h(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function f(t,r,i){if(t.isReadOnly())return e.Pass;for(var o,l=t.listSelections(),s=[],a=0;a<l.length;a++){var c=l[a];if(!c.empty()){var u=c.from().line,h=c.to().line;while(a<l.length-1&&l[a+1].from().line==h)h=l[++a].to().line;l[a].to().ch||h--,s.push(u,h)}}s.length?o=!0:s.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],l=0;l<s.length;l+=2){var a=s[l],c=s[l+1],u=n(a,0),h=n(c),f=t.getRange(u,h,!1);r?f.sort((function(e,t){return e<t?-i:e==t?0:i})):f.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-i:e==t?0:i})),t.replaceRange(f,u,h),o&&e.push({anchor:u,head:n(c+1,0)})}o&&t.setSelections(e,0)}))}function d(t,n){t.operation((function(){for(var r=t.listSelections(),i=[],o=[],s=0;s<r.length;s++){var a=r[s];a.empty()?(i.push(s),o.push("")):o.push(n(t.getRange(a.from(),a.to())))}t.replaceSelections(o,"around","case");var c;for(s=i.length-1;s>=0;s--){a=r[i[s]];if(!(c&&e.cmpPos(a.head,c)>0)){var u=l(t,a.head);c=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function p(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=l(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function g(e,t){var r=p(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,h(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,h(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,l=[],s=0;s<r.length;s++){var a=r[s],c=a.from().line-1,u=a.to().line;l.push({anchor:n(a.anchor.line-1,a.anchor.ch),head:n(a.head.line-1,a.head.ch)}),0!=a.to().ch||a.empty()||--u,c>o?i.push(c,u):i.length&&(i[i.length-1]=u),o=u}t.operation((function(){for(var e=0;e<i.length;e+=2){var r=i[e],o=i[e+1],s=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.setSelections(l),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,l=r.length-1;l>=0;l--){var s=r[l],a=s.to().line+1,c=s.from().line;0!=s.to().ch||s.empty()||a--,a<o?i.push(a,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=i.length-2;e>=0;e-=2){var r=i[e],o=i[e+1],l=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(l+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i],l=o.from(),s=l.line,a=o.to().line;while(i<t.length-1&&t[i+1].from().line==a)a=t[++i].to().line;r.push({start:s,end:a,anchor:!o.empty()&&l})}e.operation((function(){for(var t=0,i=[],o=0;o<r.length;o++){for(var l,s=r[o],a=s.anchor&&n(s.anchor.line-t,s.anchor.ch),c=s.start;c<=s.end;c++){var u=c-t;c==s.end&&(l=n(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",n(u),n(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}i.push({anchor:a||l,head:l})}e.setSelections(i,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var i=e.listSelections()[r];i.empty()?e.replaceRange(e.getLine(i.head.line)+"\n",n(i.head.line,0)):e.replaceRange(e.getRange(i.from(),i.to()),i.from())}e.scrollIntoView()}))},t.sortLines=function(e){f(e,!0,1)},t.reverseSortLines=function(e){f(e,!0,-1)},t.sortLinesInsensitive=function(e){f(e,!1,1)},t.reverseSortLinesInsensitive=function(e){f(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)while(t.length){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)while(t.length){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),l=t[r].empty()?e.findMarksAt(i):e.findMarks(i,o),s=0;s<l.length;s++)if(l[s].sublimeBookmark){l[s].clear();for(var a=0;a<n.length;a++)n[a]==l[s]&&n.splice(a--,1);break}s==l.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),i=t.getOption("indentUnit"),o=r.length-1;o>=0;o--){var l=r[o].head,s=t.getRange({line:l.line,ch:0},l),a=e.countColumn(s,null,t.getOption("tabSize")),c=t.findPosH(l,-1,"char",!1);if(s&&!/\S/.test(s)&&a%i==0){var u=new n(l.line,e.findColumn(s,a-i,i));u.ch!=l.ch&&(c=u)}t.replaceRange("",c,l,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){d(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){d(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){g(e,!0)},t.findUnderPrevious=function(e){g(e,!1)},t.findAllUnder=function(e){var t=p(e);if(t){var n=e.getSearchCursor(t.query),r=[],i=-1;while(n.findNext())r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var m=e.keyMap;m.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(m.macSublime),m.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(m.pcSublime);var v=m.default==m.macDefault;m.sublime=v?m.macSublime:m.pcSublime}))},15237:function(e){(function(t,n){e.exports=n()})(0,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=r||i||o,s=l&&(r?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),c=a&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\/(\d+)/.exec(e),h=u&&+u[1],f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),m=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),w=/\bCrOS\b/.test(e),C=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,a=!0);var S=b&&(c||f&&(null==x||x<12.11)),L=n||l&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var n=e.className,r=k(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 A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return A(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function D(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function F(e){var t,n=e.ownerDocument||e;try{t=e.activeElement}catch(r){t=n.body||null}while(t&&t.shadowRoot&&t.shadowRoot.activeElement)t=t.shadowRoot.activeElement;return t}function H(e,t){var n=e.className;k(t).test(n)||(e.className+=(n?" ":"")+t)}function P(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!k(n[r]).test(t)&&(t+=" "+n[r]);return t}T=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var B=function(e){e.select()};function R(e){return e.display.wrapper.ownerDocument}function E(e){return I(e.display.wrapper)}function I(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function z(e){return R(e).defaultView}function U(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function K(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function G(e,t,n,r,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=r||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=n-l%n,o=s+1}}m?B=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(B=function(e){try{e.select()}catch(t){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};function j(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.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)};var X=50,Y={toString:function(){return"CodeMirror.Pass"}},_={scroll:!1},$={origin:"*mouse"},q={origin:"+move"};function Z(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var J=[""];function Q(e){while(J.length<=e)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ne(e,t,n){var r=0,i=n(t);while(r<e.length&&n(e[r])<=i)r++;e.splice(r,0,t)}function re(){}function ie(e,t){var n;return Object.create?n=Object.create(e):(re.prototype=e,n=new re),t&&K(t,n),n}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function le(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function se(e,t){return t?!!(t.source.indexOf("\\w")>-1&&le(e))||t.test(e):le(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ce=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&ce.test(e)}function he(e,t,n){while((n<0?t>0:t<e.length)&&ue(e.charAt(t)))t+=n;return t}function fe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function de(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var pe=null;function ge(e,t,n){var r;pe=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:pe=i)}return null!=r?r:pe}var me=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,h=[],f=0;f<u;++f)h.push(n(e.charCodeAt(f)));for(var d=0,p=c;d<u;++d){var g=h[d];"m"==g?h[d]=p:p=g}for(var m=0,v=c;m<u;++m){var y=h[m];"1"==y&&"r"==v?h[m]="n":o.test(y)&&(v=y,"r"==y&&(h[m]="R"))}for(var b=1,w=h[0];b<u-1;++b){var C=h[b];"+"==C&&"1"==w&&"1"==h[b+1]?h[b]="1":","!=C||w!=h[b+1]||"1"!=w&&"n"!=w||(h[b]=w),w=C}for(var x=0;x<u;++x){var S=h[x];if(","==S)h[x]="N";else if("%"==S){var L=void 0;for(L=x+1;L<u&&"%"==h[L];++L);for(var k=x&&"!"==h[x-1]||L<u&&"1"==h[L]?"1":"N",T=x;T<L;++T)h[T]=k;x=L-1}}for(var M=0,A=c;M<u;++M){var N=h[M];"L"==A&&"1"==N?h[M]="L":o.test(N)&&(A=N)}for(var O=0;O<u;++O)if(i.test(h[O])){var D=void 0;for(D=O+1;D<u&&i.test(h[D]);++D);for(var W="L"==(O?h[O-1]:c),F="L"==(D<u?h[D]:c),H=W==F?W?"L":"R":c,P=O;P<D;++P)h[P]=H;O=D-1}for(var B,R=[],E=0;E<u;)if(l.test(h[E])){var I=E;for(++E;E<u&&l.test(h[E]);++E);R.push(new a(0,I,E))}else{var z=E,U=R.length,K="rtl"==t?1:0;for(++E;E<u&&"L"!=h[E];++E);for(var G=z;G<E;)if(s.test(h[G])){z<G&&(R.splice(U,0,new a(1,z,G)),U+=K);var V=G;for(++G;G<E&&s.test(h[G]);++G);R.splice(U,0,new a(2,V,G)),U+=K,z=G}else++G;z<E&&R.splice(U,0,new a(1,z,E))}return"ltr"==t&&(1==R[0].level&&(B=e.match(/^\s+/))&&(R[0].from=B[0].length,R.unshift(new a(0,0,B[0].length))),1==ee(R).level&&(B=e.match(/\s+$/))&&(ee(R).to-=B[0].length,R.push(new a(0,u-B[0].length,u)))),"rtl"==t?R.reverse():R}}();function ve(e,t){var n=e.order;return null==n&&(n=e.order=me(e.text,t)),n}var ye=[],be=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ye).concat(n)}};function we(e,t){return e._handlers&&e._handlers[t]||ye}function Ce(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=j(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function xe(e,t){var n=we(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Se(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),xe(e,n||t.type,e,t),Ne(t)||t.codemirrorIgnore}function Le(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==j(n,t[r])&&n.push(t[r])}function ke(e,t){return we(e,t).length>0}function Te(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){Ce(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ne(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Me(e),Ae(e)}function De(e){return e.target||e.srcElement}function We(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Fe,He,Pe=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Be(e){if(null==Fe){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Fe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var n=Fe?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Re(e){if(null!=He)return He;var t=N(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(He=r.right-n.right<3)}var Ee=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ze=function(){var e=O("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ue=null;function Ke(e){if(null!=Ue)return Ue;var t=N(e,O("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return Ue=Math.abs(n.left-r.left)>1}var Ge={},Ve={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ge[e]=t}function Xe(e,t){Ve[e]=t}function Ye(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),e=ie(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ye("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ye("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function _e(e,t){t=Ye(t);var n=Ge[t.name];if(!n)return _e(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var $e={};function qe(e,t){var n=$e.hasOwnProperty(e)?$e[e]:$e[e]={};K(t,n)}function Ze(e,t){if(!0===t)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 Je(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var et=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};function tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function nt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function rt(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function it(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ot(e){if(null==e.parent)return null;for(var t=e.parent,n=j(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n+t.first}function lt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l],a=s.height;if(t<a)break;t-=a}return n+l}function st(e,t){return t>=e.first&&t<e.first+e.size}function at(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ct(e,t,n){if(void 0===n&&(n=null),!(this instanceof ct))return new ct(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ut(e,t){return e.line-t.line||e.ch-t.ch}function ht(e,t){return e.sticky==t.sticky&&0==ut(e,t)}function ft(e){return ct(e.line,e.ch)}function dt(e,t){return ut(e,t)<0?t:e}function pt(e,t){return ut(e,t)<0?e:t}function gt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function mt(e,t){if(t.line<e.first)return ct(e.first,0);var n=e.first+e.size-1;return t.line>n?ct(n,tt(e,n).text.length):vt(t,tt(e,t.line).text.length)}function vt(e,t){var n=e.ch;return null==n||n>t?ct(e.line,t):n<0?ct(e.line,0):e}function yt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=mt(e,t[r]);return n}et.prototype.eol=function(){return this.pos>=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},et.prototype.eat=function(e){var t,n=this.string.charAt(this.pos);if(t="string"==typeof e?n==e:n&&(e.test?e.test(n):e(n)),t)return++this.pos,n},et.prototype.eatWhile=function(e){var t=this.pos;while(this.eat(e));return this.pos>t},et.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},et.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},et.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function Ct(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var l=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],a=1,c=0;n.state=!0,Ot(e,t.text,s.mode,n,(function(e,t){var n=a;while(c<e){var r=i[a];r>e&&i.splice(a,1,e,i[a+1],r),a+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function xt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=St(e,ot(t)),i=t.text.length>e.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=Ct(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wt(r,!0,t);var o=Dt(e,t,n),l=o>r.first&&tt(r,o-1).stateAfter,s=l?wt.fromSaved(r,l,o):new wt(r,Qe(r.mode),o);return r.iter(o,t,(function(n){Lt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function Lt(e,t,n,r){var i=e.doc.mode,o=new et(t,e.options.tabSize,n);o.start=o.pos=r||0,""==t&&kt(i,n.state);while(!o.eol())Tt(i,o,n.state),o.start=o.pos}function kt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Je(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Tt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Je(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=e)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,n){return t instanceof bt?new wt(e,Ze(e.mode,t.state),n,t.lookAhead):new wt(e,Ze(e.mode,t),n)},wt.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function At(e,t,n,r){var i,o=e.doc,l=o.mode;t=mt(o,t);var s,a=tt(o,t.line),c=St(e,t.line,n),u=new et(a.text,e.options.tabSize,c);r&&(s=[]);while((r||u.pos<t.ch)&&!u.eol())u.start=u.pos,i=Tt(l,u,c.state),r&&s.push(new Mt(u,i,Ze(o.mode,c.state)));return r?s:new Mt(u,i,c.state)}function Nt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Ot(e,t,n,r,i,o,l){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,c=0,u=null,h=new et(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];""==t&&Nt(kt(n,r.state),o);while(!h.eol()){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&Lt(e,t,r,h.pos),h.pos=t.length,a=null):a=Nt(Tt(n,h,r.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||u!=a){while(c<h.start)c=Math.min(h.start,c+5e3),i(c,u);u=a}h.start=h.pos}while(c<h.pos){var p=Math.min(h.pos,c+5e3);i(p,u),c=p}}function Dt(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=tt(o,s-1),c=a.stateAfter;if(c&&(!n||s+(c instanceof bt?c.lookAhead:0)<=o.modeFrontier))return s;var u=G(a.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Wt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=tt(e,r).stateAfter;if(i&&(!(i instanceof bt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Ft=!1,Ht=!1;function Pt(){Ft=!0}function Bt(){Ht=!0}function Rt(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function It(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function zt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ut(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==l.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Rt(l,o.from,a?null:o.to))}}return r}function Kt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Rt(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Gt(e,t){if(t.full)return null;var n=st(e,t.from.line)&&tt(e,t.from.line).markedSpans,r=st(e,t.to.line)&&tt(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=0==ut(t.from,t.to),s=Ut(n,i,l),a=Kt(r,o,l),c=1==t.text.length,u=ee(t.text).length+(c?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=Et(a,f.marker);d?c&&(f.to=null==d.to?null:d.to+u):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=u),null==g.from){var m=Et(s,g.marker);m||(g.from=u,c&&(s||(s=[])).push(g))}else g.from+=u,c&&(s||(s=[])).push(g)}s&&(s=Vt(s)),a&&a!=s&&(a=Vt(a));var v=[s];if(!c){var y,b=t.text.length-2;if(b>0&&s)for(var w=0;w<s.length;++w)null==s[w].to&&(y||(y=[])).push(new Rt(s[w].marker,null,null));for(var C=0;C<b;++C)v.push(y);v.push(a)}return v}function Vt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function jt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=j(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],s=l.find(0),a=0;a<i.length;++a){var c=i[a];if(!(ut(c.to,s.from)<0||ut(c.from,s.to)>0)){var u=[a,1],h=ut(c.from,s.from),f=ut(c.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),a+=u.length-3}}return i}function Xt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Yt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function _t(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function qt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ut(r.from,i.from)||_t(e)-_t(t);if(o)return-o;var l=ut(r.to,i.to)||$t(e)-$t(t);return l||t.id-e.id}function Zt(e,t){var n,r=Ht&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||qt(n,i.marker)<0)&&(n=i.marker);return n}function Jt(e){return Zt(e,!0)}function Qt(e){return Zt(e,!1)}function en(e,t){var n,r=Ht&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function tn(e,t,n,r,i){var o=tt(e,t),l=Ht&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var c=a.marker.find(0),u=ut(c.from,n)||_t(a.marker)-_t(i),h=ut(c.to,r)||$t(a.marker)-$t(i);if(!(u>=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ut(c.to,n)>=0:ut(c.to,n)>0)||u>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ut(c.from,r)<=0:ut(c.from,r)<0)))return!0}}}function nn(e){var t;while(t=Jt(e))e=t.find(-1,!0).line;return e}function rn(e){var t;while(t=Qt(e))e=t.find(1,!0).line;