@nodefony/monitoring-bundle
Version:
1 lines • 180 kB
JavaScript
(self["webpackChunk_nodefony_monitoring_bundle"]=self["webpackChunk_nodefony_monitoring_bundle"]||[]).push([[369,5237],{30369:function(e,t,n){"use strict";var r=n(15237),i=n.n(r),o=n(73525),l=n(27905);function s(e,t){const n=t.target||t.srcElement;if(!(n instanceof HTMLElement))return;if("SPAN"!==(null===n||void 0===n?void 0:n.nodeName))return;const r=n.getBoundingClientRect(),i={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=i,e.state.jump.isHoldingModifier&&f(e)}function a(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&d(e):e.state.jump.cursor=null}function u(e,t){if(e.state.jump.isHoldingModifier||!h(t.key))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&f(e);const n=l=>{l.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&d(e),i().off(document,"keyup",n),i().off(document,"click",r),e.off("mousedown",o))},r=t=>{const{destination:n,options:r}=e.state.jump;n&&r.onClick(n,t)},o=(t,n)=>{e.state.jump.destination&&(n.codemirrorIgnore=!0)};i().on(document,"keyup",n),i().on(document,"click",r),e.on("mousedown",o)}i().defineOption("jump",!1,((e,t,n)=>{if(n&&n!==i().Init){const t=e.state.jump.onMouseOver;i().off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;i().off(e.getWrapperElement(),"mouseout",n),i().off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:s.bind(null,e),onMouseOut:a.bind(null,e),onKeyDown:u.bind(null,e)};i().on(e.getWrapperElement(),"mouseover",n.onMouseOver),i().on(e.getWrapperElement(),"mouseout",n.onMouseOut),i().on(document,"keydown",n.onKeyDown)}}));const c="undefined"!==typeof navigator&&navigator.userAgent.includes("Mac");function h(e){return e===(c?"Meta":"Control")}function f(e){if(e.state.jump.marker)return;const{cursor:t,options:n}=e.state.jump,r=e.coordsChar(t),i=e.getTokenAt(r,!0),o=n.getDestination||e.getHelper(r,"jump");if(o){const t=o(i,n,e);if(t){const n=e.markText({line:r.line,ch:i.start},{line:r.line,ch:i.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=n,e.state.jump.destination=t}}}function d(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}i().registerHelper("jump","graphql",((e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:i}=n,s=(0,o.A)(t.schema,n);return"Field"===r&&0===i&&s.fieldDef||"AliasedField"===r&&2===i&&s.fieldDef?(0,l.Q0)(s):"Directive"===r&&1===i&&s.directiveDef?(0,l.t8)(s):"Argument"===r&&0===i&&s.argDef?(0,l.Hh)(s):"EnumValue"===r&&s.enumValue?(0,l.IR)(s):"NamedType"===r&&s.type?(0,l.a2)(s):void 0}))},27905:function(e,t,n){"use strict";n.d(t,{Hh:function(){return l},IR:function(){return s},Q0:function(){return i},a2:function(){return a},t8:function(){return o}});var r=n(35994);function i(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:u(e.fieldDef)?null:e.parentType}}function o(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}function l(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:u(e.fieldDef)?null:e.parentType}}function s(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?(0,r.MR)(e.inputType):void 0}}function a(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}function u(e){return"__"===e.name.slice(0,2)}},24294:function(e,t,n){"use strict";function r(e,t){const n=[];let r=e;while(null===r||void 0===r?void 0:r.kind)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}n.d(t,{A:function(){return r}})},73525:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(35994),i=n(9488),o=n(24294);function l(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return(0,o.A)(t,(t=>{var i,o;switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&t.name?s(e,n.parentType,t.name):null,n.type=null===(i=n.fieldDef)||void 0===i?void 0:i.type;break;case"SelectionSet":n.parentType=n.type?(0,r.MR)(n.type):null;break;case"Directive":n.directiveDef=t.name?e.getDirective(t.name):null;break;case"Arguments":const l=t.prevState?"Field"===t.prevState.kind?n.fieldDef:"Directive"===t.prevState.kind?n.directiveDef:"AliasedField"===t.prevState.kind?t.prevState.name&&s(e,n.parentType,t.prevState.name):null:null;n.argDefs=l?l.args:null;break;case"Argument":if(n.argDef=null,n.argDefs)for(let e=0;e<n.argDefs.length;e++)if(n.argDefs[e].name===t.name){n.argDef=n.argDefs[e];break}n.inputType=null===(o=n.argDef)||void 0===o?void 0:o.type;break;case"EnumValue":const u=n.inputType?(0,r.MR)(n.inputType):null;n.enumValue=u instanceof r.Zb?a(u.getValues(),(e=>e.value===t.name)):null;break;case"ListValue":const c=n.inputType?(0,r.yl)(n.inputType):null;n.inputType=c instanceof r.KT?c.ofType:null;break;case"ObjectValue":const h=n.inputType?(0,r.MR)(n.inputType):null;n.objectFieldDefs=h instanceof r.zP?h.getFields():null;break;case"ObjectField":const f=t.name&&n.objectFieldDefs?n.objectFieldDefs[t.name]:null;n.inputType=null===f||void 0===f?void 0:f.type,n.fieldDef=f;break;case"NamedType":n.type=t.name?e.getType(t.name):null;break}})),n}function s(e,t,n){return n===i.S0.name&&e.getQueryType()===t?i.S0:n===i.Xe.name&&e.getQueryType()===t?i.Xe:n===i.of.name&&(0,r.ML)(t)?i.of:t&&t.getFields?t.getFields()[n]:void 0}function a(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}},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),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),h=c&&+c[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),v=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,a=!0);var S=b&&(u||f&&(null==C||C<12.11)),k=n||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var n=e.className,r=L(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 N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function D(e,t){return N(e).appendChild(t)}function A(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 O(e,t,n,r){var i=A(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 H(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 F(e,t){var n=e.className;L(t).test(n)||(e.className+=(n?" ":"")+t)}function E(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!L(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 P=function(e){e.select()};function R(e){return e.display.wrapper.ownerDocument}function I(e){return z(e.display.wrapper)}function z(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function B(e){return R(e).defaultView}function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function V(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}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(t){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function K(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}U.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},U.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,_={toString:function(){return"CodeMirror.Pass"}},Y={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 Q=[""];function J(e){while(Q.length<=e)Q.push(ee(Q)+" ");return Q[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&&V(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 ue=/[\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 ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function he(e,t,n){while((n<0?t>0:t<e.length)&&ce(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 ve=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 u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,h=[],f=0;f<c;++f)h.push(n(e.charCodeAt(f)));for(var d=0,p=u;d<c;++d){var g=h[d];"m"==g?h[d]=p:p=g}for(var v=0,m=u;v<c;++v){var y=h[v];"1"==y&&"r"==m?h[v]="n":o.test(y)&&(m=y,"r"==y&&(h[v]="R"))}for(var b=1,w=h[0];b<c-1;++b){var x=h[b];"+"==x&&"1"==w&&"1"==h[b+1]?h[b]="1":","!=x||w!=h[b+1]||"1"!=w&&"n"!=w||(h[b]=w),w=x}for(var C=0;C<c;++C){var S=h[C];if(","==S)h[C]="N";else if("%"==S){var k=void 0;for(k=C+1;k<c&&"%"==h[k];++k);for(var L=C&&"!"==h[C-1]||k<c&&"1"==h[k]?"1":"N",T=C;T<k;++T)h[T]=L;C=k-1}}for(var M=0,N=u;M<c;++M){var D=h[M];"L"==N&&"1"==D?h[M]="L":o.test(D)&&(N=D)}for(var A=0;A<c;++A)if(i.test(h[A])){var O=void 0;for(O=A+1;O<c&&i.test(h[O]);++O);for(var W="L"==(A?h[A-1]:u),H="L"==(O<c?h[O]:u),F=W==H?W?"L":"R":u,E=A;E<O;++E)h[E]=F;A=O-1}for(var P,R=[],I=0;I<c;)if(l.test(h[I])){var z=I;for(++I;I<c&&l.test(h[I]);++I);R.push(new a(0,z,I))}else{var B=I,j=R.length,V="rtl"==t?1:0;for(++I;I<c&&"L"!=h[I];++I);for(var G=B;G<I;)if(s.test(h[G])){B<G&&(R.splice(j,0,new a(1,B,G)),j+=V);var U=G;for(++G;G<I&&s.test(h[G]);++G);R.splice(j,0,new a(2,U,G)),j+=V,B=G}else++G;B<I&&R.splice(j,0,new a(1,B,I))}return"ltr"==t&&(1==R[0].level&&(P=e.match(/^\s+/))&&(R[0].from=P[0].length,R.unshift(new a(0,0,P[0].length))),1==ee(R).level&&(P=e.match(/\s+$/))&&(ee(R).to-=P[0].length,R.push(new a(0,c-P[0].length,c)))),"rtl"==t?R.reverse():R}}();function me(e,t){var n=e.order;return null==n&&(n=e.order=ve(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 xe(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=K(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(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}}),Ce(e,n||t.type,e,t),De(t)||t.codemirrorIgnore}function ke(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==K(n,t[r])&&n.push(t[r])}function Le(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){xe(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function De(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ae(e){Me(e),Ne(e)}function Oe(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 He,Fe,Ee=function(){if(l&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==He){var t=A("span","");D(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var n=He?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Re(e){if(null!=Fe)return Fe;var t=D(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Ie=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/)},ze=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)},Be=function(){var e=A("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),je=null;function Ve(e){if(null!=je)return je;var t=D(e,A("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return je=Math.abs(n.left-r.left)>1}var Ge={},Ue={};function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ge[e]=t}function Xe(e,t){Ue[e]=t}function _e(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[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 _e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=_e(t);var n=Ge[t.name];if(!n)return Ye(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]={};V(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 Qe(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 Je(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=K(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 ut(e,t,n){if(void 0===n&&(n=null),!(this instanceof ut))return new ut(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ct(e,t){return e.line-t.line||e.ch-t.ch}function ht(e,t){return e.sticky==t.sticky&&0==ct(e,t)}function ft(e){return ut(e.line,e.ch)}function dt(e,t){return ct(e,t)<0?t:e}function pt(e,t){return ct(e,t)<0?e:t}function gt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function vt(e,t){if(t.line<e.first)return ut(e.first,0);var n=e.first+e.size-1;return t.line>n?ut(n,tt(e,n).text.length):mt(t,tt(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function yt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=vt(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 xt(e,t,n,r){var i=[e.state.modeGen],o={};At(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,u=0;n.state=!0,At(e,t.text,s.mode,n,(function(e,t){var n=a;while(u<e){var r=i[a];r>e&&i.splice(a,1,e,i[a+1],r),a+=2,u=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 Ct(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=xt(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=Ot(e,t,n),l=o>r.first&&tt(r,o-1).stateAfter,s=l?wt.fromSaved(r,l,o):new wt(r,Je(r.mode),o);return r.iter(o,t,(function(n){kt(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 kt(e,t,n,r){var i=e.doc.mode,o=new et(t,e.options.tabSize,n);o.start=o.pos=r||0,""==t&&Lt(i,n.state);while(!o.eol())Tt(i,o,n.state),o.start=o.pos}function Lt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Qe(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]=Qe(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 Nt(e,t,n,r){var i,o=e.doc,l=o.mode;t=vt(o,t);var s,a=tt(o,t.line),u=St(e,t.line,n),c=new et(a.text,e.options.tabSize,u);r&&(s=[]);while((r||c.pos<t.ch)&&!c.eol())c.start=c.pos,i=Tt(l,c,u.state),r&&s.push(new Mt(c,i,Ze(o.mode,u.state)));return r?s:new Mt(c,i,u.state)}function Dt(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 At(e,t,n,r,i,o,l){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new et(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];""==t&&Dt(Lt(n,r.state),o);while(!h.eol()){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&kt(e,t,r,h.pos),h.pos=t.length,a=null):a=Dt(Tt(n,h,r.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){while(u<h.start)u=Math.min(h.start,u+5e3),i(u,c);c=a}h.start=h.pos}while(u<h.pos){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}function Ot(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),u=a.stateAfter;if(u&&(!n||s+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return s;var c=G(a.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}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 Ht=!1,Ft=!1;function Et(){Ht=!0}function Pt(){Ft=!0}function Rt(e,t,n){this.marker=e,this.from=t,this.to=n}function It(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function zt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Bt(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 jt(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 Vt(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==ct(t.from,t.to),s=jt(n,i,l),a=Vt(r,o,l),u=1==t.text.length,c=ee(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=It(a,f.marker);d?u&&(f.to=null==d.to?null:d.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=c),null==g.from){var v=It(s,g.marker);v||(g.from=c,u&&(s||(s=[])).push(g))}else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=Ut(s)),a&&a!=s&&(a=Ut(a));var m=[s];if(!u){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 x=0;x<b;++x)m.push(y);m.push(a)}return m}function Ut(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 Kt(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!=K(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 u=i[a];if(!(ct(u.to,s.from)<0||ct(u.from,s.to)>0)){var c=[a,1],h=ct(u.from,s.from),f=ct(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.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 _t(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Yt(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=ct(r.from,i.from)||Yt(e)-Yt(t);if(o)return-o;var l=ct(r.to,i.to)||$t(e)-$t(t);return l||t.id-e.id}function Zt(e,t){var n,r=Ft&&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 Qt(e){return Zt(e,!0)}function Jt(e){return Zt(e,!1)}function en(e,t){var n,r=Ft&&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=Ft&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=ct(u.from,n)||Yt(a.marker)-Yt(i),h=ct(u.to,r)||$t(a.marker)-$t(i);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,n)>=0:ct(u.to,n)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,r)<=0:ct(u.from,r)<0)))return!0}}}function nn(e){var t;while(t=Qt(e))e=t.find(-1,!0).line;return e}function rn(e){var t;while(t=Jt(e))e=t.find(1,!0).line;return e}function on(e){var t,n;while(t=Jt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ln(e,t){var n=tt(e,t),r=nn(n);return n==r?t:ot(r)}function sn(e,t){if(t>e.lastLine())return t;var n,r=tt(e,t);if(!an(e,r))return t;while(n=Jt(r))r=n.find(1,!0).line;return ot(r)+1}function an(e,t){var n=Ft&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&un(e,t,r))return!0}}function un(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return un(e,r.line,It(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&un(e,t,i))return!0}function cn(e){e=nn(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==n)break;t+=s.height}return t}function hn(e){if(0==e.height)return 0;var t,n=e.text.length,r=e;while(t=Qt(r)){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}r=e;while(t=Jt(r)){var o=t.find(0,!0);n-=r.text.length-o.from.ch,r=o.to.line,n+=r.text.length-o.to.ch}return n}function fn(e){var t=e.display,n=e.doc;t.maxLine=tt(n,n.first),t.maxLineLength=hn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=hn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var dn=function(e,t,n){this.text=e,_t(this,t),this.height=n?n(this):1};function pn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Xt(e),_t(e,n);var i=r?r(e):1;i!=e.height&&it(e,i)}function gn(e){e.parent=null,Xt(e)}dn.prototype.lineNo=function(){return ot(this)},Te(dn);var vn={},mn={};function yn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function bn(e,t){var n=O("span",null,null,a?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=xn,Re(e.display.measure)&&(l=me(o,e.doc.direction))&&(r.addToken=Sn(r.addToken,l)),r.map=[];var s=t!=e.display.externalMeasured&&ot(o);Ln(o,r,Ct(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=E(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=E(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=E(r.pre.className,r.textClass||"")),r}function wn(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xn(e,t,n,r,i,o,a){if(t){var u,c=e.splitSpaces?Cn(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();var d=0;while(1){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&s<9?u.appendChild(A("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=u.appendChild(A("span",J(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=u.appendChild(A("span","\r"==p[0]?"␍":"","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),l&&s<9?u.appendChild(A("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||a){var w=n||"";r&&(w+=r),i&&(w+=i);var x=A("span",[u],w,o);if(a)for(var C in a)a.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,a[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function Cn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function Sn(e,t){return function(n,r,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var h=void 0,f=0;f<t.length;f++)if(h=t[f],h.to>u&&h.from<=u)break;if(h.to>=c)return e(n,r,i,o,l,s,a);e(n,r.slice(0,h.to-u),i,o,null,s,a),o=null,r=r.slice(h.to-u),u=h.to}}}function kn(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 Ln(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=s="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var x=r[w],C=x.marker;if("bookmark"==C.type&&x.from==p&&C.widgetNode)y.push(C);else if(x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||qt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==m&&(u+=" "+b[k]);if(!h||h.from==p)for(var L=0;L<y.length;++L)kn(t,0,y[L]);if(h&&(h.from||0)==p){if(kn(t,(null==h.to?d+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=d)break;var T=Math.min(d,m);while(1){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+a:a,c,p+N.length==m?u:"",s,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=n[g++]),l=yn(n[g++],t.cm.options)}}else for(var D=1;D<n.length;D+=2)t.addToken(t,i.slice(o,o=n[D]),yn(n[D+1],t.cm.options))}function Tn(e,t,n){this.line=t,this.rest=on(t),this.size=this.rest?ot(ee(this.rest))-n+1:1,this.node=this.text=null,this.hidden=an(e,t)}function Mn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var l=new Tn(e.doc,tt(e.doc,o),o);r=o+l.size,i.push(l)}return i}var Nn=null;function Dn(e){Nn?Nn.ops.push(e):e.ownsGroup=Nn={ops:[e],delayedCallbacks:[]}}function An(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)while(i.cursorActivityCalled<i.cursorActivityHandlers.length)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function On(e,t){var n=e.ownsGroup;if(n)try{An(n)}finally{Nn=null,t(n)}}var Wn=null;function Hn(e,t){var n=we(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Nn?r=Nn.delayedCallbacks:Wn?r=Wn:(r=Wn=[],setTimeout(Fn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},l=0;l<n.length;++l)o(l)}}function Fn(){var e=Wn;Wn=null;for(var t=0;t<e.length;++t)e[t]()}function En(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?zn(e,t):"gutter"==o?jn(e,t,n,r):"class"==o?Bn(e,t):"widget"==o&&Vn(e,t,r)}t.changes=null}function Pn(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function Rn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Pn(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function In(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):bn(e,t)}function zn(e,t){var n=t.text.className,r=In(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Bn(e,t)):n&&(t.text.className=n)}function Bn(e,t){Rn(e,t),t.line.wrapClass?Pn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function jn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Pn(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=Pn(t),s=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(A("div",at(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.display.gutterSpecs.length;++a){var u=e.display.gutterSpecs[a].className,c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(A("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Vn(e,t,n){t.alignable&&(t.alignable=null);for(var r=L("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Un(e,t,n)}function Gn(e,t,n,r){var i=In(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Bn(e,t),jn(e,t,n,r),Un(e,t,r),t.node}function Un(e,t,n){if(Kn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Kn(e,t.rest[r],t,n,!1)}function Kn(e,t,n,r,i){if(t.widgets)for(var o=Pn(n),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=A("div",[a.node],"CodeMirror-linewidget"+(a.className?" "+a.className:""));a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Xn(a,u,n,r),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Hn(a,"redraw")}}function Xn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function _n(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!W(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),D(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Yn(e,t){for(var n=Oe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function $n(e){return e.lineSpace.offsetTop}function qn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Zn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=D(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Qn(e){return X-e.display.nativeBarWidth}function Jn(e){return e.display.scroller.clientWidth-Qn(e)-e.display.barWidth}function er(e){return e.display.scroller.clientHeight-Qn(e)-e.display.barHeight}function tr(e,t,n){var r=e.options.lineWrapping,i=r&&Jn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function nr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(ot(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rr(e,t){t=nn(t);var n=ot(t),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=bn(e,r);return r.text=i.pre,D(e.display.lineMeasure,i.pre),r}function ir(e,t,n,r){return sr(e,lr(e,t),n,r)}function or(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Br(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function lr(e,t){var n=ot(t),r=or(e,n);r&&!r.text?r=null:r&&r.changes&&(En(e,r,n,Er(e)),e.curOp.forceUpdate=!0),r||(r=rr(e,t));var i=nr(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function sr(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(tr(e,t.view,t.rect),t.hasHeights=!0),o=fr(e,t,n,r),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var ar,ur={left:0,right:0,top:0,bottom:0};function cr(e,t,n){for(var r,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?(i=t-s,o=i+1):(u==e.length-3||t==a&&e[u+3]>t)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(r=e[u+2],s==a&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)while(u&&e[u-2]==e[u-3]&&e[u-1].insertLeft)r=e[2+(u-=3)],l="left";if("right"==n&&i==a-s)while(u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft)r=e[(u+=3)+2],l="right";break}return{node:r,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function hr(e,t){var n=ur;if("left"==t){for(var r=0;r<e.length;r++)if((n=e[r]).left!=n.right)break}else for(var i=e.length-1;i>=0;i--)if((n=e[i]).left!=n.right)break;return n}function fr(e,t,n,r){var i,o=cr(t.map,n,r),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){while(u&&ce(t.line.text.charAt(o.coverStart+u)))--u;while(o.coverStart+c<o.coverEnd&&ce(t.line.text.charAt(o.coverStart+c)))++c;if(i=l&&s<9&&0==u&&c==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():hr(T(a,u,c).getClientRects(),r),i.left||i.right||0==u)break;c=u,u-=1,h="right"}l&&s<11&&(i=dr(e.display.measure,i))}else{var d;u>0&&(h=r="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Fr(e.display),top:p.top,bottom:p.bottom}:ur}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1;b++)if(m<y[b])break;var w=b?y[b-1]:0,x=y[b],C={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:w,bottom:x};return i.left||i.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v),C}function dr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ve(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function pr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function gr(e){e.display.externalMeasure=null,N(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)pr(e.display.view[t])}function vr(e){gr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function mr(e){return c&&m?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function yr(e){return c&&m?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function br(e){var t=nn(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=_n(n[i]));return r}function wr(e,t,n,r,i){if(!i){var o=br(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var l=cn(t);if("local"==r?l+=$n(e.display):l-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==r?0:yr(R(e)));var a=s.left+("window"==r?0:mr(R(e)));n.left+=a,n.right+=a}return n.top+=l,n.bottom+=l,n}function xr(e,t,n){if("div"==