/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/codemirror-console-ui@3.2.0/dist/mirror-console-component.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/*! For license information please see mirror-console-component.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ConsoleUI=t():e.ConsoleUI=t()}(self,(function(){return function(){var e={5350:function(e){e.exports=function(e){var t;return t="object"==typeof arguments[1]&&arguments[1]?arguments[1]:Array.prototype.slice.call(arguments,1),String(e).replace(/\{?\{([^{}]+)}}?/g,function(e,t){return function(t,r){return"{{"==t.substring(0,2)&&"}}"==t.substring(t.length-2)?"{"+r+"}":e.hasOwnProperty(r)?"function"==typeof e[r]?e[r]():e[r]:t}}(t))}},8300:function(e,t,r){"use strict";var n=r(1513);function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}function i(e){return r.g.Buffer&&"function"==typeof r.g.Buffer.isBuffer?r.g.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=r(7966),l=Object.prototype.hasOwnProperty,s=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function f(e){return!i(e)&&"function"==typeof r.g.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var p=e.exports=v,d=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(a.isFunction(e)){if(c)return e.name;var t=e.toString().match(d);return t&&t[1]}}function g(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(c||!a.isFunction(e))return a.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,r,n,o){throw new p.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:o})}function v(e,t){e||y(e,!0,t,"==",p.ok)}function A(e,t,r,n){if(e===t)return!0;if(i(e)&&i(t))return 0===o(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===o(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var l=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==l&&l===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=b(e),i=b(t);if(o&&!i||!o&&i)return!1;if(o)return A(e=s.call(e),t=s.call(t),r);var l,c,u=x(e),f=x(t);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),c=u.length-1;c>=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c>=0;c--)if(!A(e[l=u[c]],t[l],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function C(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&y(o,r,"Missing expected exception"+n);var i="string"==typeof n,l=!e&&o&&!r;if((!e&&a.isError(o)&&i&&C(o,r)||l)&&y(o,r,"Got unwanted exception"+n),e&&o&&r&&!C(o,r)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(m(e.actual),128)+" "+e.operator+" "+g(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,o=h(t),i=n.indexOf("\n"+o);if(i>=0){var a=n.indexOf("\n",i+1);n=n.substring(a+1)}this.stack=n}}},a.inherits(p.AssertionError,Error),p.fail=y,p.ok=v,p.equal=function(e,t,r){e!=t&&y(e,t,r,"==",p.equal)},p.notEqual=function(e,t,r){e==t&&y(e,t,r,"!=",p.notEqual)},p.deepEqual=function(e,t,r){A(e,t,!1)||y(e,t,r,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,r){A(e,t,!0)||y(e,t,r,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,r){A(e,t,!1)&&y(e,t,r,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,r,n){A(t,r,!0)&&y(t,r,n,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,r){e!==t&&y(e,t,r,"===",p.strictEqual)},p.notStrictEqual=function(e,t,r){e===t&&y(e,t,r,"!==",p.notStrictEqual)},p.throws=function(e,t,r){w(!0,e,t,r)},p.doesNotThrow=function(e,t,r){w(!1,e,t,r)},p.ifError=function(e){if(e)throw e},p.strict=n((function e(t,r){t||y(t,!0,r,"==",e)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var x=Object.keys||function(e){var t=[];for(var r in e)l.call(e,r)&&t.push(r);return t}},2121:function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},4166:function(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},7966:function(e,t,r){var n=r(9907),o=r(4364),i=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r<o;l=n[++r])m(l)||!C(l)?a+=" "+l:a+=" "+s(l);return a},t.deprecate=function(e,i){if(A(r.g.process))return function(){return t.deprecate(e,i).apply(this,arguments)};if(!0===n.noDeprecation)return e;var a=!1;return function(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?o.trace(i):o.error(i),a=!0}return e.apply(this,arguments)}};var a,l={};function s(e,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,e,n.depth)}function c(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function u(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=f(e,o,n)),o}var i=function(e,t){if(A(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var a=Object.keys(r),l=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(k(r)){var s=r.name?": "+r.name:"";return e.stylize("[Function"+s+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return p(r)}var c,u="",C=!1,S=["{","}"];return h(r)&&(C=!0,S=["[","]"]),k(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(u=" "+RegExp.prototype.toString.call(r)),w(r)&&(u=" "+Date.prototype.toUTCString.call(r)),x(r)&&(u=" "+p(r)),0!==a.length||C&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=C?function(e,t,r,n,o){for(var i=[],a=0,l=t.length;a<l;++a)B(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(e,r,n,l,a):a.map((function(t){return d(e,r,n,l,t,C)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,u,S)):S[0]+u+S[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,l,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?l=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(l=e.stylize("[Setter]","special")),B(n,o)||(a="["+o+"]"),l||(e.seen.indexOf(s.value)<0?(l=m(r)?f(e,s.value,null):f(e,s.value,r-1)).indexOf("\n")>-1&&(l=i?l.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+l.split("\n").map((function(e){return"   "+e})).join("\n")):l=e.stylize("[Circular]","special")),A(a)){if(i&&o.match(/^\d+$/))return l;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+l}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function A(e){return void 0===e}function b(e){return C(e)&&"[object RegExp]"===S(e)}function C(e){return"object"==typeof e&&null!==e}function w(e){return C(e)&&"[object Date]"===S(e)}function x(e){return C(e)&&("[object Error]"===S(e)||e instanceof Error)}function k(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(A(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!l[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;l[e]=function(){var n=t.format.apply(t,arguments);o.error("%s %d: %s",e,r,n)}}else l[e]=function(){};return l[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=A,t.isRegExp=b,t.isObject=C,t.isDate=w,t.isError=x,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(4166);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(r=[E((e=new Date).getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(2121),t._extend=function(e,t){if(!t||!C(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},7546:function(e){e.exports={run_console:{ja:"実行",en:"Run",es:"Ejecutar"},clear_console:{ja:"ログをクリア",en:"Clear",es:"Limpiar"},exit_console:{ja:"終了",en:"Exit",es:"Salir"}}},3432:function(e){"use strict";e.exports=function(e,t){var r=Object.keys(e),n={};return r.forEach((function(r){n[r]=e[r][t]})),n}},7728:function(e,t,r){"use strict";var n=r(7556),o=r(5350);e.exports=function(e,t){return n(1==arguments.length?e:o(e,t))}},9035:function(e){function t(){return Array.from(crypto.getRandomValues(new Uint32Array(4))).map((e=>e.toString(36))).join("")}e.exports.createContextEval=function(){const e=document.createElement("iframe");e.setAttribute("style","display: none;");const r=t(),n=t();return{remove:()=>{document.body.removeChild(e)},run:(t,o={},i={})=>new Promise(((a,l)=>{const s=o=>{if(o.source!==e.contentWindow)return;const{id:i,result:c,error:u,ready:f}=o.data||{};i===r&&(f?e.contentWindow.postMessage({id:n,src:t},"*"):(u?l(new Error(u.message)):a(c),window.removeEventListener("message",s)))};window.addEventListener("message",s);const c=i.type?i.type:"script";e.srcdoc=(({origin:e,senderId:t,receiverId:r,type:n})=>"script"===n?'<!doctype html>\n<html lang="en">\n<body></body>\n</html>':`<!doctype html>\n<html lang="en">\n<body>\n<script>\nconst origin = "${e}";\nconst senderId = "${t}";\nconst receiverId = "${r}";\nconst handleMessage = async (event) => {\n  if (event.source !== window.parent) {\n    return;\n  }\n  if (event.origin !== origin) {\n    return;\n  }\n  const { id, src } = event.data || {};\n  if (id !== receiverId) {\n    return;\n  }\n  try {\n    const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor;\n    ${"module"===n?"await import(`data:text/javascript;charset=utf-8, ${encodeURIComponent(src)}`);window.parent.postMessage({ id: senderId, result: undefined }, origin);":"AsyncFunction"===n?"await new AsyncFunction(src)();window.parent.postMessage({ id: senderId, result: undefined }, origin);":"const result = eval(src);window.parent.postMessage({ id: senderId, result }, origin);"};\n  } catch (error) {\n    window.parent.postMessage({ id: senderId, error: {message:error.message} }, origin);\n  }\n  window.removeEventListener("message", handleMessage);\n};\nwindow.addEventListener("message", handleMessage);\nwindow.parent.postMessage({ id: senderId, ready: true }, origin);\n<\/script>\n</body>\n</html>`)({origin:window.location.origin,senderId:r,receiverId:n,type:c}),e.dataset.mirrorConsole=c,document.body.appendChild(e);const u=e.contentWindow;if(Object.keys(o).forEach((function(e){u[e]=o[e]})),"script"===c)try{a(u.eval(t))}catch(e){l(e)}}))}}},1088:function(e,t,r){"use strict";const n=r(1448),{createContextEval:o}=r(9035);function i(){this.editor=this.createEditor(),this.runningEvalContext=void 0}r(8269),i.prototype.createEditor=function(){return this.textareaHolder=document.createElement("div"),this.textarea=document.createElement("textarea"),this.textareaHolder.appendChild(this.textarea),n.fromTextArea(this.textarea)},i.prototype.setText=function(e){this.editor.setValue(e)},i.prototype.getText=function(){return this.editor.getValue()},i.prototype.swapWithElement=function(e){this.originalElemenet=e,e.parentNode.replaceChild(this.textareaHolder,e),this.editor.refresh()},i.prototype.destroy=function(){if(null==this.originalElemenet)throw new Error("Haven't `originalElement` : You have to call #swapWithElement before call this");this.textareaHolder.parentNode.replaceChild(this.originalElemenet,this.textareaHolder),this.originalElemenet=null,this.textarea=null,this.textareaHolder=null,this.editor=null,this.runningEvalContext&&this.runningEvalContext.remove(),Object.freeze(this)},i.prototype.runInContext=async function(e,t={}){this.runningEvalContext&&this.runningEvalContext.remove();const r=this.editor.getValue();return this.runningEvalContext=o(),this.runningEvalContext.run(r,e,t)},e.exports=i},9818:function(e,t,r){"use strict";var n=r(248),o=r(8498),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},8498:function(e,t,r){"use strict";var n=r(330),o=r(248),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||n.call(a,i),s=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=l(n,a,arguments);return s&&c&&s(t,"length").configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var f=function(){return l(n,i,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},5938:function(e){"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),l=[],s=0;s<a;s++)l.push("$"+s);if(o=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,i.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,i.concat(t.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o}},330:function(e,t,r){"use strict";var n=r(5938);e.exports=Function.prototype.bind||n},248:function(e,t,r){"use strict";var n,o=SyntaxError,i=Function,a=TypeError,l=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var c=function(){throw new a},u=s?function(){try{return c}catch(e){try{return s(arguments,"callee").get}catch(e){return c}}}():c,f=r(7422)(),p=Object.getPrototypeOf||function(e){return e.__proto__},d={},h="undefined"==typeof Uint8Array?n:p(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?p(p([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?p(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function e(t){var r;if("%AsyncFunction%"===t)r=l("async function () {}");else if("%GeneratorFunction%"===t)r=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=l("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=p(o.prototype))}return g[t]=r,r},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(330),A=r(2571),b=v.call(Function.call,Array.prototype.concat),C=v.call(Function.apply,Array.prototype.splice),w=v.call(Function.call,String.prototype.replace),x=v.call(Function.call,String.prototype.slice),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,E=function(e,t){var r,n=e;if(A(y,n)&&(n="%"+(r=y[n])[0]+"%"),A(g,n)){var i=g[n];if(i===d&&(i=m(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var r=function(e){var t=x(e,0,1),r=x(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return w(e,k,(function(e,t,r,o){n[n.length]=r?w(o,S,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=E("%"+n+"%",t),l=i.name,c=i.value,u=!1,f=i.alias;f&&(n=f[0],C(r,b([0,1],f)));for(var p=1,d=!0;p<r.length;p+=1){var h=r[p],m=x(h,0,1),y=x(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new o("property names with quotes must have matching quotes");if("constructor"!==h&&d||(u=!0),A(g,l="%"+(n+="."+h)+"%"))c=g[l];else if(null!=c){if(!(h in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(s&&p+1>=r.length){var v=s(c,h);c=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[h]}else d=A(c,h),c=c[h];d&&!u&&(g[l]=c)}}return c}},7422:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(8084);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},8084:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1448:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=n||o||i,l=a&&(n?document.documentMode||6:+(i||o)[1]),s=!i&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!i&&/Chrome\//.test(e),f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),y=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),v=g||/Mac/.test(t),A=/\bCrOS\b/.test(e),b=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,s=!0);var w=v&&(c||f&&(null==C||C<12.11)),x=r||a&&l>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,E=function(e,t){var r=e.className,n=k(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function B(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var o=document.createElement(e);if(r&&(o.className=r),n&&(o.style.cssText=n),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function T(e,t,r,n){var o=O(e,t,r,n);return o.setAttribute("role","presentation"),o}function L(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 P(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function j(e,t){var r=e.className;k(t).test(r)||(e.className+=(r?" ":"")+t)}function I(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!k(r[n]).test(t)&&(t+=" "+r[n]);return t}S=document.createRange?function(e,t,r,n){var o=document.createRange();return o.setEnd(n||e,r),o.setStart(e,t),o}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var N=function(e){e.select()};function D(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function W(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function F(e,t,r,n,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=n||0,a=o||0;;){var l=e.indexOf("\t",i);if(l<0||l>=t)return a+(t-i);a+=l-i,a+=r-a%r,i=l+1}}g?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},z.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var H=50,U={toString:function(){return"CodeMirror.Pass"}},_={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function q(e,t,r){for(var n=0,o=0;;){var i=e.indexOf("\t",n);-1==i&&(i=e.length);var a=i-n;if(i==e.length||o+a>=t)return n+Math.min(a,t-o);if(o+=i-n,n=i+1,(o+=r-o%r)>=t)return n}}var $=[""];function Y(e){for(;$.length<=e;)$.push(K($)+" ");return $[e]}function K(e){return e[e.length-1]}function X(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function J(){}function Z(e,t){var r;return Object.create?r=Object.create(e):(J.prototype=e,r=new J),t&&W(t,r),r}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 oe(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,r){for(;(r<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=r;return t}function ae(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var o=(t+r)/2,i=n<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:r;e(i)?r=i:t=i+n}}var le=null;function se(e,t,r){var n;le=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==r?n=o:le=o),i.from==t&&(i.from!=i.to&&"before"!=r?n=o:le=o)}return null!=n?n:le}var ce=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,o=/[1n]/;function i(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,l){var s,c="ltr"==l?"L":"R";if(0==a.length||"ltr"==l&&!e.test(a))return!1;for(var u=a.length,f=[],p=0;p<u;++p)f.push((s=a.charCodeAt(p))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(s):1424<=s&&s<=1524?"R":1536<=s&&s<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(s-1536):1774<=s&&s<=2220?"r":8192<=s&&s<=8203?"w":8204==s?"b":"L");for(var d=0,h=c;d<u;++d){var g=f[d];"m"==g?f[d]=h:h=g}for(var m=0,y=c;m<u;++m){var v=f[m];"1"==v&&"r"==y?f[m]="n":r.test(v)&&(y=v,"r"==v&&(f[m]="R"))}for(var A=1,b=f[0];A<u-1;++A){var C=f[A];"+"==C&&"1"==b&&"1"==f[A+1]?f[A]="1":","!=C||b!=f[A+1]||"1"!=b&&"n"!=b||(f[A]=b),b=C}for(var w=0;w<u;++w){var x=f[w];if(","==x)f[w]="N";else if("%"==x){var k=void 0;for(k=w+1;k<u&&"%"==f[k];++k);for(var S=w&&"!"==f[w-1]||k<u&&"1"==f[k]?"1":"N",E=w;E<k;++E)f[E]=S;w=k-1}}for(var M=0,B=c;M<u;++M){var O=f[M];"L"==B&&"1"==O?f[M]="L":r.test(O)&&(B=O)}for(var T=0;T<u;++T)if(t.test(f[T])){var L=void 0;for(L=T+1;L<u&&t.test(f[L]);++L);for(var P="L"==(T?f[T-1]:c),j=P==("L"==(L<u?f[L]:c))?P?"L":"R":c,I=T;I<L;++I)f[I]=j;T=L-1}for(var N,D=[],W=0;W<u;)if(n.test(f[W])){var F=W;for(++W;W<u&&n.test(f[W]);++W);D.push(new i(0,F,W))}else{var z=W,R=D.length,H="rtl"==l?1:0;for(++W;W<u&&"L"!=f[W];++W);for(var U=z;U<W;)if(o.test(f[U])){z<U&&(D.splice(R,0,new i(1,z,U)),R+=H);var _=U;for(++U;U<W&&o.test(f[U]);++U);D.splice(R,0,new i(2,_,U)),R+=H,z=U}else++U;z<W&&D.splice(R,0,new i(1,z,W))}return"ltr"==l&&(1==D[0].level&&(N=a.match(/^\s+/))&&(D[0].from=N[0].length,D.unshift(new i(0,0,N[0].length))),1==K(D).level&&(N=a.match(/\s+$/))&&(K(D).to-=N[0].length,D.push(new i(0,u-N[0].length,u)))),"rtl"==l?D.reverse():D}}();function ue(e,t){var r=e.order;return null==r&&(r=e.order=ce(e.text,t)),r}var fe=[],pe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||fe).concat(r)}};function de(e,t){return e._handlers&&e._handlers[t]||fe}function he(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,o=n&&n[t];if(o){var i=R(o,r);i>-1&&(n[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ge(e,t){var r=de(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<r.length;++o)r[o].apply(null,n)}function me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,r||t.type,e,t),we(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==R(r,t[n])&&r.push(t[n])}function ve(e,t){return de(e,t).length>0}function Ae(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xe(e){be(e),Ce(e)}function ke(e){return e.target||e.srcElement}function Se(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),v&&e.ctrlKey&&1==t&&(t=3),t}var Ee,Me,Be=function(){if(a&&l<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Ee){var t=O("span","​");B(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ee=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=Ee?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Te(e){if(null!=Me)return Me;var t=B(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Me=n.right-r.right<3)}var Le,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(r.push(i.slice(0,a)),t+=a+1):(r.push(i),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},je=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Le=O("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Ne=null;var De={},We={};function Fe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),De[e]=t}function ze(e){if("string"==typeof e&&We.hasOwnProperty(e))e=We[e];else if(e&&"string"==typeof e.name&&We.hasOwnProperty(e.name)){var t=We[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Re(e,t){t=ze(t);var r=De[t.name];if(!r)return Re(e,"text/plain");var n=r(e,t);if(He.hasOwnProperty(t.name)){var o=He[t.name];for(var i in o)o.hasOwnProperty(i)&&(n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=o[i])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var He={};function Ue(e,t){W(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function _e(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r}function Ge(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ve(e,t,r){return!e.startState||e.startState(t,r)}var qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function $e(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var o=r.children[n],i=o.chunkSize();if(t<i){r=o;break}t-=i}return r.lines[t]}function Ye(e,t,r){var n=[],o=t.line;return e.iter(t.line,r.line+1,(function(e){var i=e.text;o==r.line&&(i=i.slice(0,r.ch)),o==t.line&&(i=i.slice(t.ch)),n.push(i),++o})),n}function Ke(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function Xe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Je(e){if(null==e.parent)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)r+=n.children[o].chunkSize();return r+t.first}function Ze(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],i=o.height;if(t<i){e=o;continue e}t-=i,r+=o.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return r+a}function Qe(e,t){return t>=e.first&&t<e.first+e.size}function et(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function tt(e,t,r){if(void 0===r&&(r=null),!(this instanceof tt))return new tt(e,t,r);this.line=e,this.ch=t,this.sticky=r}function rt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==rt(e,t)}function ot(e){return tt(e.line,e.ch)}function it(e,t){return rt(e,t)<0?t:e}function at(e,t){return rt(e,t)<0?e:t}function lt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return tt(e.first,0);var r=e.first+e.size-1;return t.line>r?tt(r,$e(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?tt(e.line,t):r<0?tt(e.line,0):e}(t,$e(e,t.line).text.length)}function ct(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=st(e,t[n]);return r}qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},qe.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},qe.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var o=function(e){return r?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ft=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function pt(e,t,r,n){var o=[e.state.modeGen],i={};Ct(e,t.text,e.doc.mode,r,(function(e,t){return o.push(e,t)}),i,n);for(var a=r.state,l=function(n){r.baseTokens=o;var l=e.state.overlays[n],s=1,c=0;r.state=!0,Ct(e,t.text,l.mode,r,(function(e,t){for(var r=s;c<e;){var n=o[s];n>e&&o.splice(s,1,e,o[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)o.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;r<s;r+=2){var i=o[r+1];o[r+1]=(i?i+" ":"")+"overlay "+t}}),i),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function dt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=ht(e,Je(t)),o=t.text.length>e.options.maxHighlightLength&&_e(e.doc.mode,n.state),i=pt(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return new ft(n,!0,t);var i=function(e,t,r){for(var n,o,i=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=i.first)return i.first;var s=$e(i,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof ut?c.lookAhead:0)<=i.modeFrontier))return l;var u=F(s.text,null,e.options.tabSize);(null==o||n>u)&&(o=l-1,n=u)}return o}(e,t,r),a=i>n.first&&$e(n,i-1).stateAfter,l=a?ft.fromSaved(n,a,i):new ft(n,Ve(n.mode),i);return n.iter(i,t,(function(r){gt(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=o.viewFrom&&n<o.viewTo?l.save():null,l.nextLine()})),r&&(n.modeFrontier=l.line),l}function gt(e,t,r,n){var o=e.doc.mode,i=new qe(t,e.options.tabSize,r);for(i.start=i.pos=n||0,""==t&&mt(o,r.state);!i.eol();)yt(o,i,r.state),i.start=i.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ge(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function yt(e,t,r,n){for(var o=0;o<10;o++){n&&(n[0]=Ge(e,r).mode);var i=e.token(t,r);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}ft.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ft.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;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}},ft.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ft.fromSaved=function(e,t,r){return t instanceof ut?new ft(e,_e(e.mode,t.state),r,t.lookAhead):new ft(e,_e(e.mode,t),r)},ft.prototype.save=function(e){var t=!1!==e?_e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var vt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function At(e,t,r,n){var o,i,a=e.doc,l=a.mode,s=$e(a,(t=st(a,t)).line),c=ht(e,t.line,r),u=new qe(s.text,e.options.tabSize,c);for(n&&(i=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=yt(l,u,c.state),n&&i.push(new vt(u,o,_e(a.mode,c.state)));return n?i:new vt(u,o,c.state)}function bt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Ct(e,t,r,n,o,i,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,f=new qe(t,e.options.tabSize,n),p=e.options.addModeClass&&[null];for(""==t&&bt(mt(r,n.state),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(l=!1,a&&gt(e,t,n,f.pos),f.pos=t.length,s=null):s=bt(yt(r,f,n.state,p),i),p){var d=p[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!l||u!=s){for(;c<f.start;)o(c=Math.min(f.start,c+5e3),u);u=s}f.start=f.pos}for(;c<f.pos;){var h=Math.min(f.pos,c+5e3);o(h,u),c=h}}var wt=!1,xt=!1;function kt(e,t,r){this.marker=e,this.from=t,this.to=r}function St(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Et(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Mt(e,t){if(t.full)return null;var r=Qe(e,t.from.line)&&$e(e,t.from.line).markedSpans,n=Qe(e,t.to.line)&&$e(e,t.to.line).markedSpans;if(!r&&!n)return null;var o=t.from.ch,i=t.to.ch,a=0==rt(t.from,t.to),l=function(e,t,r){var n;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!r||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(n||(n=[])).push(new kt(a,i.from,l?null:i.to))}}return n}(r,o,a),s=function(e,t,r){var n;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!r||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(n||(n=[])).push(new kt(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return n}(n,i,a),c=1==t.text.length,u=K(t.text).length+(c?o:0);if(l)for(var f=0;f<l.length;++f){var p=l[f];if(null==p.to){var d=St(s,p.marker);d?c&&(p.to=null==d.to?null:d.to+u):p.to=o}}if(s)for(var h=0;h<s.length;++h){var g=s[h];null!=g.to&&(g.to+=u),null==g.from?St(l,g.marker)||(g.from=u,c&&(l||(l=[])).push(g)):(g.from+=u,c&&(l||(l=[])).push(g))}l&&(l=Bt(l)),s&&s!=l&&(s=Bt(s));var m=[l];if(!c){var y,v=t.text.length-2;if(v>0&&l)for(var A=0;A<l.length;++A)null==l[A].to&&(y||(y=[])).push(new kt(l[A].marker,null,null));for(var b=0;b<v;++b)m.push(y);m.push(s)}return m}function Bt(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ot(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Tt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Lt(e){return e.inclusiveLeft?-1:0}function Pt(e){return e.inclusiveRight?1:0}function jt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),o=t.find(),i=rt(n.from,o.from)||Lt(e)-Lt(t);return i?-i:rt(n.to,o.to)||Pt(e)-Pt(t)||t.id-e.id}function It(e,t){var r,n=xt&&e.markedSpans;if(n)for(var o=void 0,i=0;i<n.length;++i)(o=n[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!r||jt(r,o.marker)<0)&&(r=o.marker);return r}function Nt(e){return It(e,!0)}function Dt(e){return It(e,!1)}function Wt(e,t){var r,n=xt&&e.markedSpans;if(n)for(var o=0;o<n.length;++o){var i=n[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!r||jt(r,i.marker)<0)&&(r=i.marker)}return r}function Ft(e,t,r,n,o){var i=$e(e,t),a=xt&&i.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=rt(c.from,r)||Lt(s.marker)-Lt(o),f=rt(c.to,n)||Pt(s.marker)-Pt(o);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?rt(c.to,r)>=0:rt(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?rt(c.from,n)<=0:rt(c.from,n)<0)))return!0}}}function zt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Rt(e,t){var r=$e(e,t),n=zt(r);return r==n?t:Je(n)}function Ht(e,t){if(t>e.lastLine())return t;var r,n=$e(e,t);if(!Ut(e,n))return t;for(;r=Dt(n);)n=r.find(1,!0).line;return Je(n)+1}function Ut(e,t){var r=xt&&t.markedSpans;if(r)for(var n=void 0,o=0;o<r.length;++o)if((n=r[o]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&_t(e,t,n))return!0}}function _t(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return _t(e,n.line,St(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==r.to&&(null==o.to||o.to!=r.from)&&(o.marker.inclusiveLeft||r.marker.inclusiveRight)&&_t(e,t,o))return!0}function Gt(e){for(var t=0,r=(e=zt(e)).parent,n=0;n<r.lines.length;++n){var o=r.lines[n];if(o==e)break;t+=o.height}for(var i=r.parent;i;i=(r=i).parent)for(var a=0;a<i.children.length;++a){var l=i.children[a];if(l==r)break;t+=l.height}return t}function Vt(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Nt(n);){var o=t.find(0,!0);n=o.from.line,r+=o.from.ch-o.to.ch}for(n=e;t=Dt(n);){var i=t.find(0,!0);r-=n.text.length-i.from.ch,r+=(n=i.to.line).text.length-i.to.ch}return r}function qt(e){var t=e.display,r=e.doc;t.maxLine=$e(r,r.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=Vt(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var $t=function(e,t,r){this.text=e,Tt(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,Ot(e)}$t.prototype.lineNo=function(){return Je(this)},Ae($t);var Kt={},Xt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Xt:Kt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=T("span",null,null,s?"padding-right: .1px":null),n={pre:T("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;n.pos=0,n.addToken=er,Te(e.display.measure)&&(a=ue(i,e.doc.direction))&&(n.addToken=tr(n.addToken,a)),n.map=[],nr(i,n,dt(e,i,t!=e.display.externalMeasured&&Je(i))),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=I(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=I(i.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Oe(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=I(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function er(e,t,r,n,o,i,s){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/  /.test(e))return e;for(var r=t,n="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!r||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),n+=i,r=" "==i}return n}(t,e.trailingSpace):t,f=e.cm.state.specialChars,p=!1;if(f.test(t)){c=document.createDocumentFragment();for(var d=0;;){f.lastIndex=d;var h=f.exec(t),g=h?h.index-d:t.length-d;if(g){var m=document.createTextNode(u.slice(d,d+g));a&&l<9?c.appendChild(O("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!h)break;d+=g+1;var y=void 0;if("\t"==h[0]){var v=e.cm.options.tabSize,A=v-e.col%v;(y=c.appendChild(O("span",Y(A),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),e.col+=A}else"\r"==h[0]||"\n"==h[0]?((y=c.appendChild(O("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((y=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&l<9?c.appendChild(O("span",[y])):c.appendChild(y),e.col+=1);e.map.push(e.pos,e.pos+1,y),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&l<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||o||p||i||s){var b=r||"";n&&(b+=n),o&&(b+=o);var C=O("span",[c],b,i);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&C.setAttribute(w,s[w]);return e.content.appendChild(C)}e.content.appendChild(c)}}function tr(e,t){return function(r,n,o,i,a,l,s){o=o?o+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var f=void 0,p=0;p<t.length&&!((f=t[p]).to>c&&f.from<=c);p++);if(f.to>=u)return e(r,n,o,i,a,l,s);e(r,n.slice(0,f.to-c),o,i,null,l,s),i=null,n=n.slice(f.to-c),c=f.to}}}function rr(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nr(e,t,r){var n=e.markedSpans,o=e.text,i=0;if(n)for(var a,l,s,c,u,f,p,d=o.length,h=0,g=1,m="",y=0;;){if(y==h){s=c=u=l="",p=null,f=null,y=1/0;for(var v=[],A=void 0,b=0;b<n.length;++b){var C=n[b],w=C.marker;if("bookmark"==w.type&&C.from==h&&w.widgetNode)v.push(w);else if(C.from<=h&&(null==C.to||C.to>h||w.collapsed&&C.to==h&&C.from==h)){if(null!=C.to&&C.to!=h&&y>C.to&&(y=C.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&C.from==h&&(u+=" "+w.startStyle),w.endStyle&&C.to==y&&(A||(A=[])).push(w.endStyle,C.to),w.title&&((p||(p={})).title=w.title),w.attributes)for(var x in w.attributes)(p||(p={}))[x]=w.attributes[x];w.collapsed&&(!f||jt(f.marker,w)<0)&&(f=C)}else C.from>h&&y>C.from&&(y=C.from)}if(A)for(var k=0;k<A.length;k+=2)A[k+1]==y&&(c+=" "+A[k]);if(!f||f.from==h)for(var S=0;S<v.length;++S)rr(t,0,v[S]);if(f&&(f.from||0)==h){if(rr(t,(null==f.to?d+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}}if(h>=d)break;for(var E=Math.min(d,y);;){if(m){var M=h+m.length;if(!f){var B=M>E?m.slice(0,E-h):m;t.addToken(t,B,a?a+s:s,u,h+B.length==y?c:"",l,p)}if(M>=E){m=m.slice(E-h),h=E;break}h=M,u=""}m=o.slice(i,i=r[g++]),a=Jt(r[g++],t.cm.options)}}else for(var O=1;O<r.length;O+=2)t.addToken(t,o.slice(i,i=r[O]),Jt(r[O+1],t.cm.options))}function or(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Dt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?Je(K(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ut(e,t)}function ir(e,t,r){for(var n,o=[],i=t;i<r;i=n){var a=new or(e.doc,$e(e.doc,i),i);n=i+a.size,o.push(a)}return o}var ar=null;var lr=null;function sr(e,t){var r=de(e,t);if(r.length){var n,o=Array.prototype.slice.call(arguments,2);ar?n=ar.delayedCallbacks:lr?n=lr:(n=lr=[],setTimeout(cr,0));for(var i=function(e){n.push((function(){return r[e].apply(null,o)}))},a=0;a<r.length;++a)i(a)}}function cr(){var e=lr;lr=null;for(var t=0;t<e.length;++t)e[t]()}function ur(e,t,r,n){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?dr(e,t):"gutter"==i?gr(e,t,r,n):"class"==i?hr(e,t):"widget"==i&&mr(e,t,n)}t.changes=null}function fr(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function pr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zt(e,t)}function dr(e,t){var r=t.text.className,n=pr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,hr(e,t)):r&&(t.text.className=r)}function hr(e,t){(function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=fr(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?fr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function gr(e,t,r,n){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 o=fr(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var a=fr(t),l=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(O("div",et(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=i.hasOwnProperty(c)&&i[c];u&&l.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mr(e,t,r){t.alignable&&(t.alignable=null);for(var n=k("CodeMirror-linewidget"),o=t.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);vr(e,t,r)}function yr(e,t,r,n){var o=pr(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),hr(e,t),gr(e,t,r,n),vr(e,t,n),t.node}function vr(e,t,r){if(Ar(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ar(e,t.rest[n],t,r,!1)}function Ar(e,t,r,n,o){if(t.widgets)for(var i=fr(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=O("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),br(s,c,r,n),e.display.input.setUneditable(c),o&&s.above?i.insertBefore(c,r.gutter||r.text):i.appendChild(c),sr(s,"redraw")}}function br(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Cr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!L(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),B(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function wr(e,t){for(var r=ke(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function xr(e){return e.lineSpace.offsetTop}function kr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Sr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=B(e.measure,O("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Er(e){return H-e.display.nativeBarWidth}function Mr(e){return e.display.scroller.clientWidth-Er(e)-e.display.barWidth}function Br(e){return e.display.scroller.clientHeight-Er(e)-e.display.barHeight}function Or(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(Je(e.rest[o])>r)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Tr(e,t,r,n){return jr(e,Pr(e,t),r,n)}function Lr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[fn(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Pr(e,t){var r=Je(t),n=Lr(e,r);n&&!n.text?n=null:n&&n.changes&&(ur(e,n,r,an(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=Je(t=zt(t)),n=e.display.externalMeasured=new or(e.doc,t,r);n.lineN=r;var o=n.built=Zt(e,n);return n.text=o.pre,B(e.display.lineMeasure,o.pre),n}(e,t));var o=Or(n,t,r);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function jr(e,t,r,n,o){t.before&&(r=-1);var i,s=r+(n||"");return t.cache.hasOwnProperty(s)?i=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,r){var n=e.options.lineWrapping,o=n&&Mr(e);if(!t.measure.heights||n&&t.measure.width!=o){var i=t.measure.heights=[];if(n){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&i.push((s.bottom+c.top)/2-r.top)}}i.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,r,n){var o,i=Dr(t.map,r,n),s=i.node,c=i.start,u=i.end,f=i.collapse;if(3==s.nodeType){for(var p=0;p<4;p++){for(;c&&oe(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u<i.coverEnd&&oe(t.line.text.charAt(i.coverStart+u));)++u;if((o=a&&l<9&&0==c&&u==i.coverEnd-i.coverStart?s.parentNode.getBoundingClientRect():Wr(S(s,c,u).getClientRects(),n)).left||o.right||0==c)break;u=c,c-=1,f="right"}a&&l<11&&(o=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ne)return Ne;var t=B(e,O("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Ne=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,o))}else{var d;c>0&&(f=n="right"),o=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==n?d.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!o||!o.left&&!o.right)){var h=s.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+on(e.display),top:h.top,bottom:h.bottom}:Nr}for(var g=o.top-t.rect.top,m=o.bottom-t.rect.top,y=(g+m)/2,v=t.view.measure.heights,A=0;A<v.length-1&&!(y<v[A]);A++);var b=A?v[A-1]:0,C=v[A],w={left:("right"==f?o.right:o.left)-t.rect.left,right:("left"==f?o.left:o.right)-t.rect.left,top:b,bottom:C};return o.left||o.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=g,w.rbottom=m),w}(e,t,r,n)).bogus||(t.cache[s]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var Ir,Nr={left:0,right:0,top:0,bottom:0};function Dr(e,t,r){for(var n,o,i,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(o=0,i=1,a="left"):t<s?i=1+(o=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(o=(i=s-l)-1,t>=s&&(a="right")),null!=o){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&o==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:o,end:i,collapse:a,coverStart:l,coverEnd:s}}function Wr(e,t){var r=Nr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var o=e.length-1;o>=0&&(r=e[o]).left==r.right;o--);return r}function Fr(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 zr(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Fr(e.display.view[t])}function Rr(e){zr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hr(){return u&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ur(){return u&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function _r(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Cr(e.widgets[r]));return t}function Gr(e,t,r,n,o){if(!o){var i=_r(t);r.top+=i,r.bottom+=i}if("line"==n)return r;n||(n="local");var a=Gt(t);if("local"==n?a+=xr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:Ur());var s=l.left+("window"==n?0:Hr());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function Vr(e,t,r){if("div"==r)return t;var n=t.left,o=t.top;if("page"==r)n-=Hr(),o-=Ur();else if("local"==r||!r){var i=e.display.sizer.getBoundingClientRect();n+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:o-a.top}}function qr(e,t,r,n,o){return n||(n=$e(e.doc,t.line)),Gr(e,n,Tr(e,n,t.ch,o),r)}function $r(e,t,r,n,o,i){function a(t,a){var l=jr(e,o,t,a?"right":"left",i);return a?l.left=l.right:l.right=l.left,Gr(e,n,l,r)}n=n||$e(e.doc,t.line),o||(o=Pr(e,n));var l=ue(n,e.doc.direction),s=t.ch,c=t.sticky;if(s>=n.text.length?(s=n.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c);function u(e,t,r){return a(r?e-1:e,1==l[t].level!=r)}var f=se(l,s,c),p=le,d=u(s,f,"before"==c);return null!=p&&(d.other=u(s,p,"before"!=c)),d}function Yr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=on(e.display)*t.ch);var n=$e(e.doc,t.line),o=Gt(n)+xr(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function Kr(e,t,r,n,o){var i=tt(e,t,r);return i.xRel=o,n&&(i.outside=n),i}function Xr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Kr(n.first,0,null,-1,-1);var o=Ze(n,r),i=n.first+n.size-1;if(o>i)return Kr(n.first+n.size-1,$e(n,i).text.length,null,1,1);t<0&&(t=0);for(var a=$e(n,o);;){var l=en(e,a,o,t,r),s=Wt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==o)return c;a=$e(n,o=c.line)}}function Jr(e,t,r,n){n-=_r(t);var o=t.text.length,i=ae((function(t){return jr(e,r,t-1).bottom<=n}),o,0);return{begin:i,end:o=ae((function(t){return jr(e,r,t).top>n}),i,o)}}function Zr(e,t,r,n){return r||(r=Pr(e,t)),Jr(e,t,r,Gr(e,t,jr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function en(e,t,r,n,o){o-=Gt(t);var i=Pr(e,t),a=_r(t),l=0,s=t.text.length,c=!0,u=ue(t,e.doc.direction);if(u){var f=(e.options.lineWrapping?rn:tn)(e,t,r,i,u,n,o);l=(c=1!=f.level)?f.from:f.to-1,s=c?f.to:f.from-1}var p,d,h=null,g=null,m=ae((function(t){var r=jr(e,i,t);return r.top+=a,r.bottom+=a,!!Qr(r,n,o,!1)&&(r.top<=o&&r.left<=n&&(h=t,g=r),!0)}),l,s),y=!1;if(g){var v=n-g.left<g.right-n,A=v==c;m=h+(A?0:1),d=A?"after":"before",p=v?g.left:g.right}else{c||m!=s&&m!=l||m++,d=0==m?"after":m==t.text.length?"before":jr(e,i,m-(c?1:0)).bottom+a<=o==c?"after":"before";var b=$r(e,tt(r,m,d),"line",t,i);p=b.left,y=o<b.top?-1:o>=b.bottom?1:0}return Kr(r,m=ie(t.text,m,1),d,y,n-p)}function tn(e,t,r,n,o,i,a){var l=ae((function(l){var s=o[l],c=1!=s.level;return Qr($r(e,tt(r,c?s.to:s.from,c?"before":"after"),"line",t,n),i,a,!0)}),0,o.length-1),s=o[l];if(l>0){var c=1!=s.level,u=$r(e,tt(r,c?s.from:s.to,c?"after":"before"),"line",t,n);Qr(u,i,a,!0)&&u.top>a&&(s=o[l-1])}return s}function rn(e,t,r,n,o,i,a){var l=Jr(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,p=0;p<o.length;p++){var d=o[p];if(!(d.from>=c||d.to<=s)){var h=jr(e,n,1!=d.level?Math.min(c,d.to)-1:Math.max(s,d.from)).right,g=h<i?i-h+1e9:h-i;(!u||f>g)&&(u=d,f=g)}}return u||(u=o[o.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ir){Ir=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Ir.appendChild(document.createTextNode("x")),Ir.appendChild(O("br"));Ir.appendChild(document.createTextNode("x"))}B(e.measure,Ir);var r=Ir.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function on(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t],"CodeMirror-line-like");B(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function an(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=i.offsetLeft+i.clientLeft+o,n[l]=i.clientWidth}return{fixedPos:ln(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ln(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sn(e){var t=nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/on(e.display)-3);return function(o){if(Ut(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return r?i+(Math.ceil(o.text.length/n)||1)*t:i+t}}function cn(e){var t=e.doc,r=sn(e);t.iter((function(e){var t=r(e);t!=e.height&&Xe(e,t)}))}function un(e,t,r,n){var o=e.display;if(!r&&"true"==ke(t).getAttribute("cm-not-content"))return null;var i,a,l=o.lineSpace.getBoundingClientRect();try{i=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=Xr(e,i,a);if(n&&c.xRel>0&&(s=$e(e.doc,c.line).text).length==c.ch){var u=F(s,s.length,e.options.tabSize)-s.length;c=tt(c.line,Math.max(0,Math.round((i-Sr(e.display).left)/on(e.display))-u))}return c}function fn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function pn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&r<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)xt&&Rt(e.doc,t)<o.viewTo&&hn(e);else if(r<=o.viewFrom)xt&&Ht(e.doc,r+n)>o.viewFrom?hn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)hn(e);else if(t<=o.viewFrom){var i=gn(e,r,r+n,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=n):hn(e)}else if(r>=o.viewTo){var a=gn(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):hn(e)}else{var l=gn(e,t,t,-1),s=gn(e,r,r+n,1);l&&s?(o.view=o.view.slice(0,l.index).concat(ir(e,l.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=n):hn(e)}var c=o.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(o.externalMeasured=null))}function dn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var i=n.view[fn(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==R(a,r)&&a.push(r)}}}function hn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function gn(e,t,r,n){var o,i=fn(e,t),a=e.display.view;if(!xt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;Rt(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function mn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var o=t[n];o.hidden||o.node&&!o.changes||++r}return r}function yn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},o=n.cursors=document.createDocumentFragment(),i=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&An(e,l.head,o),s||Cn(e,l,i)}}return n}function An(e,t,r){var n=$r(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(O("div"," ","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var i=r.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=n.other.left+"px",i.style.top=n.other.top+"px",i.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function bn(e,t){return e.top-t.top||e.left-t.left}function Cn(e,t,r){var n=e.display,o=e.doc,i=document.createDocumentFragment(),a=Sr(e.display),l=a.left,s=Math.max(n.sizerWidth,Mr(e)-n.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n                             height: "+(n-t)+"px"))}function f(t,r,n){var i,a,f=$e(o,t),p=f.text.length;function d(r,n){return qr(e,tt(t,r),"div",f,n)}function h(t,r,n){var o=Zr(e,f,null,t),i="ltr"==r==("after"==n)?"left":"right";return d("after"==n?o.begin:o.end-(/\s/.test(f.text.charAt(o.end-1))?2:1),i)[i]}var g=ue(f,o.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",i),o=!0)}o||n(t,r,"ltr")}(g,r||0,null==n?p:n,(function(e,t,o,f){var m="ltr"==o,y=d(e,m?"left":"right"),v=d(t-1,m?"right":"left"),A=null==r&&0==e,b=null==n&&t==p,C=0==f,w=!g||f==g.length-1;if(v.top-y.top<=3){var x=(c?b:A)&&w,k=(c?A:b)&&C?l:(m?y:v).left,S=x?s:(m?v:y).right;u(k,y.top,S-k,y.bottom)}else{var E,M,B,O;m?(E=c&&A&&C?l:y.left,M=c?s:h(e,o,"before"),B=c?l:h(t,o,"after"),O=c&&b&&w?s:v.right):(E=c?h(e,o,"before"):l,M=!c&&A&&C?s:y.right,B=!c&&b&&w?l:v.left,O=c?h(t,o,"after"):s),u(E,y.top,M-E,y.bottom),y.bottom<v.top&&u(l,y.bottom,null,v.top),u(B,v.top,O-B,v.bottom)}(!i||bn(y,i)<0)&&(i=y),bn(v,i)<0&&(i=v),(!a||bn(y,a)<0)&&(a=y),bn(v,a)<0&&(a=v)})),{start:i,end:a}}var p=t.from(),d=t.to();if(p.line==d.line)f(p.line,p.ch,d.ch);else{var h=$e(o,p.line),g=$e(o,d.line),m=zt(h)==zt(g),y=f(p.line,p.ch,m?h.text.length+1:null).end,v=f(d.line,m?0:null,d.ch).start;m&&(y.top<v.top-2?(u(y.right,y.top,null,y.bottom),u(l,v.top,v.left,v.bottom)):u(y.right,y.top,v.left-y.right,y.bottom)),y.bottom<v.top&&u(l,y.bottom,null,v.top)}r.appendChild(i)}function wn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||En(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Sn(e))}function kn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&En(e))}),100)}function Sn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wn(e))}function En(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Mn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var o=t.view[n],i=e.options.lineWrapping,s=void 0,c=0;if(!o.hidden){if(a&&l<8){var u=o.node.offsetTop+o.node.offsetHeight;s=u-r,r=u}else{var f=o.node.getBoundingClientRect();s=f.bottom-f.top,!i&&o.text.firstChild&&(c=o.text.firstChild.getBoundingClientRect().right-f.left-1)}var p=o.line.height-s;if((p>.005||p<-.005)&&(Xe(o.line,s),Bn(o.line),o.rest))for(var d=0;d<o.rest.length;d++)Bn(o.rest[d]);if(c>e.display.sizerWidth){var h=Math.ceil(c/on(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Bn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function On(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-xr(e));var o=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,i=Ze(t,n),a=Ze(t,o);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<i?(i=l,a=Ze(t,Gt($e(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(i=Ze(t,Gt($e(t,s))-e.wrapper.clientHeight),a=s)}return{from:i,to:Math.max(a,i+1)}}function Tn(e,t){var r=e.display,n=nn(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,i=Br(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+kr(r),s=t.top<n,c=t.bottom>l-n;if(t.top<o)a.scrollTop=s?0:t.top;else if(t.bottom>o+i){var u=Math.min(t.top,(c?l:t.bottom)-i);u!=o&&(a.scrollTop=u)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,d=Mr(e)-r.gutters.offsetWidth,h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.left<p?a.scrollLeft=Math.max(0,t.left+f-(h?0:10)):t.right>d+p-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function Ln(e,t){null!=t&&(In(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pn(e){In(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function jn(e,t,r){null==t&&null==r||In(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function In(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nn(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function Nn(e,t,r,n){var o=Tn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});jn(e,o.scrollLeft,o.scrollTop)}function Dn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||co(e,{top:t}),Wn(e,t,!0),r&&co(e),oo(e,100))}function Wn(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fn(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,po(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function zn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+kr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Rn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Rn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Rn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Rn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Rn.prototype.zeroWidthHack=function(){var e=v&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},Rn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,(function n(){var o=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}))},Rn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hn=function(){};function Un(e,t){t||(t=zn(e));var r=e.display.barWidth,n=e.display.barHeight;_n(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&Mn(e),_n(e,zn(e)),r=e.display.barWidth,n=e.display.barHeight}function _n(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Hn.prototype.update=function(){return{bottom:0,right:0}},Hn.prototype.setScrollLeft=function(){},Hn.prototype.setScrollTop=function(){},Hn.prototype.clear=function(){};var Gn={native:Rn,null:Hn};function Vn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gn[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?Fn(e,t):Dn(e,t)}),e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var qn=0;function $n(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qn,markArrays:null},t=e.curOp,ar?ar.ops.push(t):t.ownsGroup=ar={ops:[t],delayedCallbacks:[]}}function Yn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(r<t.length)}(r)}finally{ar=null,t(r)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Kn(t[r]);for(var n=0;n<t.length;n++)Xn(t[n]);for(var o=0;o<t.length;o++)Jn(t[o]);for(var i=0;i<t.length;i++)Zn(t[i]);for(var a=0;a<t.length;a++)Qn(t[a])}(e)}))}function Kn(e){var t=e.cm,r=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Er(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Er(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&qt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ao(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xn(e){e.updatedDisplay=e.mustUpdate&&lo(e.cm,e.update)}function Jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Mn(t),e.barMeasure=zn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Tr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Mr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Zn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Fn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Un(t,e.barMeasure),e.updatedDisplay&&fo(t,e.barMeasure),e.selectionChanged&&wn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&xn(e.cm)}function Qn(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&so(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Fn(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var i=O("div","​",null,"position: absolute;\n                         top: "+(t.top-r.viewOffset-xr(e.display))+"px;\n                         height: "+(t.bottom-t.top+Er(e)+r.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,r,n){var o;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?tt(t.line,t.ch+1,"before"):t,t=t.ch?tt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,l=$r(e,t),s=r&&r!=t?$r(e,r):l,c=Tn(e,o={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(Dn(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Fn(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ge(o[a],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&ge(i[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function eo(e,t){if(e.curOp)return t();$n(e);try{return t()}finally{Yn(e)}}function to(e,t){return function(){if(e.curOp)return t.apply(e,arguments);$n(e);try{return t.apply(e,arguments)}finally{Yn(e)}}}function ro(e){return function(){if(this.curOp)return e.apply(this,arguments);$n(this);try{return e.apply(this,arguments)}finally{Yn(this)}}}function no(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);$n(t);try{return e.apply(this,arguments)}finally{Yn(t)}}}function oo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,D(io,e))}function io(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ht(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(n.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?_e(t.mode,n.state):null,s=pt(e,i,n,!0);l&&(n.state=l),i.styles=s.styles;var c=i.styleClasses,u=s.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!f&&p<a.length;++p)f=a[p]!=i.styles[p];f&&o.push(n.line),i.stateAfter=n.save(),n.nextLine()}else i.text.length<=e.options.maxHighlightLength&&gt(e,i.text,n),i.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return oo(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&eo(e,(function(){for(var t=0;t<o.length;t++)dn(e,o[t],"text")}))}}var ao=function(e,t,r){var n=e.display;this.viewport=t,this.visible=On(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Mr(e),this.force=r,this.dims=an(e),this.events=[]};function lo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return hn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==mn(e))return!1;ho(e)&&(hn(e),t.dims=an(e));var o=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFrom<i&&i-r.viewFrom<20&&(i=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(o,r.viewTo)),xt&&(i=Rt(e.doc,i),a=Ht(e.doc,a));var l=i!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;(function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(fn(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,fn(e,r)))),n.viewTo=r})(e,i,a),r.viewOffset=Gt($e(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=mn(e);if(!l&&0==c&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=P();if(!t||!L(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&L(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return c>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,o=e.options.lineNumbers,i=n.lineDiv,a=i.firstChild;function l(t){var r=t.nextSibling;return s&&v&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var c=n.view,u=n.viewFrom,f=0;f<c.length;f++){var p=c[f];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;a!=p.node;)a=l(a);var d=o&&null!=t&&t<=u&&p.lineNumber;p.changes&&(R(p.changes,"gutter")>-1&&(d=!1),ur(e,p,u,r)),d&&(M(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(et(e.options,u)))),a=p.node.nextSibling}else{var h=yr(e,p,u,r);i.insertBefore(h,a)}u+=p.size}for(;a;)a=l(a)}(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=P()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(u),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,oo(e,400)),r.updateLineNumbers=null,!0}function so(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Mr(e))n&&(t.visible=On(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+kr(e.display)-Br(e),r.top)}),t.visible=On(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!lo(e,t))break;Mn(e);var o=zn(e);yn(e),Un(e,o),fo(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function co(e,t){var r=new ao(e,t);if(lo(e,r)){Mn(e),so(e,r);var n=zn(e);yn(e),Un(e,n),fo(e,n),r.finish()}}function uo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",sr(e,"gutterChanged",e)}function fo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Er(e)+"px"}function po(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=ln(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=i),r[a].gutterBackground&&(r[a].gutterBackground.style.left=i));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function ho(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=et(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var o=n.measure.appendChild(O("div",[O("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(i,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",uo(e.display),!0}return!1}function go(e,t){for(var r=[],n=!1,o=0;o<e.length;o++){var i=e[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;n=!0}r.push({className:i,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function mo(e){var t=e.gutters,r=e.gutterSpecs;M(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var o=r[n],i=o.className,a=o.style,l=t.appendChild(O("div",null,"CodeMirror-gutter "+i));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==i&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",uo(e)}function yo(e){mo(e.display),pn(e),po(e)}function vo(e,t,n,o){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=T("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=T("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=T("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[c],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||r&&y||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=go(o.gutters,o.lineNumbers),mo(i),n.init(i)}ao.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},ao.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var Ao=0,bo=null;function Co(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function wo(e){var t=Co(e);return t.x*=bo,t.y*=bo,t}function xo(e,t){var n=Co(t),o=n.x,i=n.y,a=e.display,l=a.scroller,c=l.scrollWidth>l.clientWidth,u=l.scrollHeight>l.clientHeight;if(o&&c||i&&u){if(i&&v&&s)e:for(var p=t.target,d=a.view;p!=l;p=p.parentNode)for(var h=0;h<d.length;h++)if(d[h].node==p){e.display.currentWheelTarget=p;break e}if(o&&!r&&!f&&null!=bo)return i&&u&&Dn(e,Math.max(0,l.scrollTop+i*bo)),Fn(e,Math.max(0,l.scrollLeft+o*bo)),(!i||i&&u)&&be(t),void(a.wheelStartX=null);if(i&&null!=bo){var g=i*bo,m=e.doc.scrollTop,y=m+a.wrapper.clientHeight;g<0?m=Math.max(0,m+g-50):y=Math.min(e.doc.height,y+g+50),co(e,{top:m,bottom:y})}Ao<20&&(null==a.wheelStartX?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=o,a.wheelDY=i,setTimeout((function(){if(null!=a.wheelStartX){var e=l.scrollLeft-a.wheelStartX,t=l.scrollTop-a.wheelStartY,r=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,r&&(bo=(bo*Ao+r)/(Ao+1),++Ao)}}),200)):(a.wheelDX+=o,a.wheelDY+=i))}}a?bo=-.53:r?bo=15:u?bo=-.7:p&&(bo=-1/3);var ko=function(e,t){this.ranges=e,this.primIndex=t};ko.prototype.primary=function(){return this.ranges[this.primIndex]},ko.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!nt(r.anchor,n.anchor)||!nt(r.head,n.head))return!1}return!0},ko.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new So(ot(this.ranges[t].anchor),ot(this.ranges[t].head));return new ko(e,this.primIndex)},ko.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ko.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(rt(t,n.from())>=0&&rt(e,n.to())<=0)return r}return-1};var So=function(e,t){this.anchor=e,this.head=t};function Eo(e,t,r){var n=e&&e.options.selectionsMayTouch,o=t[r];t.sort((function(e,t){return rt(e.from(),t.from())})),r=R(t,o);for(var i=1;i<t.length;i++){var a=t[i],l=t[i-1],s=rt(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var c=at(l.from(),a.from()),u=it(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;i<=r&&--r,t.splice(--i,2,new So(f?u:c,f?c:u))}}return new ko(t,r)}function Mo(e,t){return new ko([new So(e,t||e)],0)}function Bo(e){return e.text?tt(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Oo(e,t){if(rt(e,t.from)<0)return e;if(rt(e,t.to)<=0)return Bo(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Bo(t).ch-t.to.ch),tt(r,n)}function To(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];r.push(new So(Oo(o.anchor,t),Oo(o.head,t)))}return Eo(e.cm,r,e.sel.primIndex)}function Lo(e,t,r){return e.line==t.line?tt(r.line,e.ch-t.ch+r.ch):tt(r.line+(e.line-t.line),e.ch)}function Po(e){e.doc.mode=Re(e.options,e.doc.modeOption),jo(e)}function jo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,oo(e,100),e.state.modeGen++,e.curOp&&pn(e)}function Io(e,t){return 0==t.from.ch&&0==t.to.ch&&""==K(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function No(e,t,r,n){function o(e){return r?r[e]:null}function i(e,r,o){(function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ot(e),Tt(e,r);var o=n?n(e):1;o!=e.height&&Xe(e,o)})(e,r,o,n),sr(e,"change",e,t)}function a(e,t){for(var r=[],i=e;i<t;++i)r.push(new $t(c[i],o(i),n));return r}var l=t.from,s=t.to,c=t.text,u=$e(e,l.line),f=$e(e,s.line),p=K(c),d=o(c.length-1),h=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Io(e,t)){var g=a(0,c.length-1);i(f,f.text,d),h&&e.remove(l.line,h),g.length&&e.insert(l.line,g)}else if(u==f)if(1==c.length)i(u,u.text.slice(0,l.ch)+p+u.text.slice(s.ch),d);else{var m=a(1,c.length-1);m.push(new $t(p+u.text.slice(s.ch),d,n)),i(u,u.text.slice(0,l.ch)+c[0],o(0)),e.insert(l.line+1,m)}else if(1==c.length)i(u,u.text.slice(0,l.ch)+c[0]+f.text.slice(s.ch),o(0)),e.remove(l.line+1,h);else{i(u,u.text.slice(0,l.ch)+c[0],o(0)),i(f,p+f.text.slice(s.ch),d);var y=a(1,c.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,y)}sr(e,"change",e,t)}function Do(e,t,r){!function e(n,o,i){if(n.linked)for(var a=0;a<n.linked.length;++a){var l=n.linked[a];if(l.doc!=o){var s=i&&l.sharedHist;r&&!s||(t(l.doc,s),e(l.doc,n,s))}}}(e,null,!0)}function Wo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,cn(e),Po(e),Fo(e),e.options.direction=t.direction,e.options.lineWrapping||qt(e),e.options.mode=t.modeOption,pn(e)}function Fo(e){("rtl"==e.doc.direction?j:E)(e.display.lineDiv,"CodeMirror-rtl")}function zo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ro(e,t){var r={from:ot(t.from),to:Bo(t),text:Ye(e,t.from,t.to)};return Vo(e,r,t.from.line,t.to.line+1),Do(e,(function(e){return Vo(e,r,t.from.line,t.to.line+1)}),!0),r}function Ho(e){for(;e.length&&K(e).ranges;)e.pop()}function Uo(e,t,r,n){var o=e.history;o.undone.length=0;var i,a,l=+new Date;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Ho(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}(o,o.lastOp==n)))a=K(i.changes),0==rt(t.from,t.to)&&0==rt(t.from,a.to)?a.to=Bo(t):i.changes.push(Ro(e,t));else{var s=K(o.done);for(s&&s.ranges||Go(e.sel,o.done),i={changes:[Ro(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function _o(e,t,r,n){var o=e.history,i=n&&n.origin;r==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,r,n){var o=t.charAt(0);return"*"==o||"+"==o&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,K(o.done),t))?o.done[o.done.length-1]=t:Go(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=r,n&&!1!==n.clearRedo&&Ho(o.undone)}function Go(e,t){var r=K(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Vo(e,t,r,n){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=r.markedSpans),++i}))}function qo(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function $o(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(qo(r[o]));return n}(e,t),n=Mt(e,t);if(!r)return n;if(!n)return r;for(var o=0;o<r.length;++o){var i=r[o],a=n[o];if(i&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<i.length;++c)if(i[c].marker==s.marker)continue e;i.push(s)}else a&&(r[o]=a)}return r}function Yo(e,t,r){for(var n=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)n.push(r?ko.prototype.deepCopy.call(i):i);else{var a=i.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&R(t,Number(u[1]))>-1&&(K(l)[f]=c[f],delete c[f])}}}return n}function Ko(e,t,r,n){if(n){var o=e.anchor;if(r){var i=rt(t,o)<0;i!=rt(r,o)<0?(o=t,t=r):i!=rt(t,r)<0&&(t=r)}return new So(o,t)}return new So(r||t,t)}function Xo(e,t,r,n,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ti(e,new ko([Ko(e.sel.primary(),t,r,o)],0),n)}function Jo(e,t,r){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)n[i]=Ko(e.sel.ranges[i],t[i],null,o);ti(e,Eo(e.cm,n,e.sel.primIndex),r)}function Zo(e,t,r,n){var o=e.sel.ranges.slice(0);o[t]=r,ti(e,Eo(e.cm,o,e.sel.primIndex),n)}function Qo(e,t,r,n){ti(e,Mo(t,r),n)}function ei(e,t,r){var n=e.history.done,o=K(n);o&&o.ranges?(n[n.length-1]=t,ri(e,t,r)):ti(e,t,r)}function ti(e,t,r){ri(e,t,r),_o(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function ri(e,t,r){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new So(st(e,t[r].anchor),st(e,t[r].head))},origin:r&&r.origin};return ge(e,"beforeSelectionChange",e,n),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Eo(e.cm,n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(rt(t.primary().head,e.sel.primary().head)<0?-1:1);ni(e,ii(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Pn(e.cm)}function ni(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ye(e.cm)),sr(e,"cursorActivity",e))}function oi(e){ni(e,ii(e,e.sel,null,!1))}function ii(e,t,r,n){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],s=li(e,a.anchor,l&&l.anchor,r,n),c=li(e,a.head,l&&l.head,r,n);(o||s!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new So(s,c))}return o?Eo(e.cm,o,t.primIndex):t}function ai(e,t,r,n,o){var i=$e(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var l=i.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(o&&(ge(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var f=s.find(n<0?1:-1),p=void 0;if((n<0?u:c)&&(f=si(e,f,-n,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(p=rt(f,r))&&(n<0?p<0:p>0))return ai(e,f,t,n,o)}var d=s.find(n<0?-1:1);return(n<0?c:u)&&(d=si(e,d,n,d.line==t.line?i:null)),d?ai(e,d,t,n,o):null}}return t}function li(e,t,r,n,o){var i=n||1;return ai(e,t,r,i,o)||!o&&ai(e,t,r,i,!0)||ai(e,t,r,-i,o)||!o&&ai(e,t,r,-i,!0)||(e.cantEdit=!0,tt(e.first,0))}function si(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,tt(t.line-1)):null:r>0&&t.ch==(n||$e(e,t.line)).text.length?t.line<e.first+e.size-1?tt(t.line+1,0):null:new tt(t.line,t.ch+r)}function ci(e){e.setSelection(tt(e.firstLine(),0),tt(e.lastLine()),_)}function ui(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,o,i){t&&(n.from=st(e,t)),r&&(n.to=st(e,r)),o&&(n.text=o),void 0!==i&&(n.origin=i)}),ge(e,"beforeChange",e,n),e.cm&&ge(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function fi(e,t,r){if(e.cm){if(!e.cm.curOp)return to(e.cm,fi)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=ui(e,t,!0))){var n=wt&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=R(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var o=[{from:t,to:r}],i=0;i<n.length;++i)for(var a=n[i],l=a.find(0),s=0;s<o.length;++s){var c=o[s];if(!(rt(c.to,l.from)<0||rt(c.from,l.to)>0)){var u=[s,1],f=rt(c.from,l.from),p=rt(c.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:l.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:l.to,to:c.to}),o.splice.apply(o,u),s+=u.length-3}}return o}(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)pi(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else pi(e,t)}}function pi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=rt(t.from,t.to)){var r=To(e,t);Uo(e,t,r,e.cm?e.cm.curOp.id:NaN),gi(e,t,r,Mt(e,t));var n=[];Do(e,(function(e,r){r||-1!=R(n,e.history)||(Ai(e.history,t),n.push(e.history)),gi(e,t,null,Mt(e,t))}))}}function di(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,c=0;c<l.length&&(o=l[c],r?!o.ranges||o.equals(e.sel):o.ranges);c++);if(c!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(n)return void l.push(o);break}if(Go(o,s),r&&!o.equals(e.sel))return void ti(e,o,{clearRedo:!1});a=o}var u=[];Go(a,s),s.push({changes:u,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var f=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),p=function(r){var n=o.changes[r];if(n.origin=t,f&&!ui(e,n,!1))return l.length=0,{};u.push(Ro(e,n));var i=r?To(e,n):K(l);gi(e,n,i,$o(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:Bo(n)});var a=[];Do(e,(function(e,t){t||-1!=R(a,e.history)||(Ai(e.history,n),a.push(e.history)),gi(e,n,null,$o(e,n))}))},d=o.changes.length-1;d>=0;--d){var h=p(d);if(h)return h.v}}}}function hi(e,t){if(0!=t&&(e.first+=t,e.sel=new ko(X(e.sel.ranges,(function(e){return new So(tt(e.anchor.line+t,e.anchor.ch),tt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)dn(e.cm,n,"gutter")}}function gi(e,t,r,n){if(e.cm&&!e.cm.curOp)return to(e.cm,gi)(e,t,r,n);if(t.to.line<e.first)hi(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);hi(e,o),t={from:tt(e.first,0),to:tt(t.to.line+o,t.to.ch),text:[K(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:tt(i,$e(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),r||(r=To(e,t)),e.cm?function(e,t,r){var n=e.doc,o=e.display,i=t.from,a=t.to,l=!1,s=i.line;e.options.lineWrapping||(s=Je(zt($e(n,i.line))),n.iter(s,a.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&ye(e),No(n,t,r,sn(e)),e.options.lineWrapping||(n.iter(s,i.line+t.text.length,(function(e){var t=Vt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var o=$e(e,n).stateAfter;if(o&&(!(o instanceof ut)||n+o.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}(n,i.line),oo(e,400);var c=t.text.length-(a.line-i.line)-1;t.full?pn(e):i.line!=a.line||1!=t.text.length||Io(e.doc,t)?pn(e,i.line,a.line+1,c):dn(e,i.line,"text");var u=ve(e,"changes"),f=ve(e,"change");if(f||u){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&sr(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,n):No(e,t,n),ri(e,r,_),e.cantEdit&&li(e,tt(e.firstLine(),0))&&(e.cantEdit=!1)}}function mi(e,t,r,n,o){var i;n||(n=r),rt(n,r)<0&&(r=(i=[n,r])[0],n=i[1]),"string"==typeof t&&(t=e.splitLines(t)),fi(e,{from:r,to:n,text:t,origin:o})}function yi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function vi(e,t,r,n){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)yi(i.ranges[l].anchor,t,r,n),yi(i.ranges[l].head,t,r,n)}else{for(var s=0;s<i.changes.length;++s){var c=i.changes[s];if(r<c.from.line)c.from=tt(c.from.line+n,c.from.ch),c.to=tt(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function Ai(e,t){var r=t.from.line,n=t.to.line,o=t.text.length-(n-r)-1;vi(e.done,r,n,o),vi(e.undone,r,n,o)}function bi(e,t,r,n){var o=t,i=t;return"number"==typeof t?i=$e(e,lt(e,t)):o=Je(t),null==o?null:(n(i,o)&&e.cm&&dn(e.cm,o,r),i)}function Ci(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function wi(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),r+=o.height,o.parent=this}this.size=t,this.height=r,this.parent=null}So.prototype.from=function(){return at(this.anchor,this.head)},So.prototype.to=function(){return it(this.anchor,this.head)},So.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Ci.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var o=this.lines[r];this.height-=o.height,Yt(o),sr(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},wi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],o=n.chunkSize();if(e<o){var i=Math.min(t,o-e),a=n.height;if(n.removeInner(e,i),this.height-=a-n.height,o==i&&(this.children.splice(r--,1),n.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ci))){var l=[];this.collapse(l),this.children=[new Ci(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var o=this.children[n],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var s=new Ci(o.lines.slice(l,l+=25));o.height-=s.height,this.children.splice(++n,0,s),s.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new wi(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=R(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new wi(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var o=this.children[n],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var xi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function ki(e,t,r){Gt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ln(e,r)}xi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Je(r);if(null!=n&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(r.widgets=null);var i=Cr(this);Xe(r,Math.max(0,r.height-i)),e&&(eo(e,(function(){ki(e,r,-i),dn(e,n,"widget")})),sr(e,"lineWidgetCleared",e,this,n))}},xi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var o=Cr(this)-t;o&&(Ut(this.doc,n)||Xe(n,n.height+o),r&&eo(r,(function(){r.curOp.forceUpdate=!0,ki(r,n,o),sr(r,"lineWidgetChanged",r,e,Je(n))})))},Ae(xi);var Si=0,Ei=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Si};function Mi(e,t,r,n,o){if(n&&n.shared)return function(e,t,r,n,o){(n=W(n)).shared=!1;var i=[Mi(e,t,r,n,o)],a=i[0],l=n.widgetNode;return Do(e,(function(e){l&&(n.widgetNode=l.cloneNode(!0)),i.push(Mi(e,st(e,t),st(e,r),n,o));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=K(i)})),new Bi(i,a)}(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return to(e.cm,Mi)(e,t,r,n,o);var i=new Ei(e,o),a=rt(t,r);if(n&&W(n,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=T("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ft(e,t.line,t,r,i)||t.line!=r.line&&Ft(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}i.addToHistory&&Uo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,r.line+1,(function(n){c&&i.collapsed&&!c.options.lineWrapping&&zt(n)==c.display.maxLine&&(l=!0),i.collapsed&&s!=t.line&&Xe(n,0),function(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}(n,new kt(i,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),i.collapsed&&e.iter(t.line,r.line+1,(function(t){Ut(e,t)&&Xe(t,0)})),i.clearOnEnter&&pe(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Si,i.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),i.collapsed)pn(c,t.line,r.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=r.line;u++)dn(c,u,"text");i.atomic&&oi(c.doc),sr(c,"markerAdded",c,i)}return i}Ei.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&$n(e),ve(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],l=St(a.markedSpans,this);e&&!this.collapsed?dn(e,Je(a),"text"):e&&(null!=l.to&&(o=Je(a)),null!=l.from&&(n=Je(a))),a.markedSpans=Et(a.markedSpans,l),null==l.from&&this.collapsed&&!Ut(this.doc,a)&&e&&Xe(a,nn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=zt(this.lines[s]),u=Vt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&pn(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&oi(e.doc)),e&&sr(e,"markerCleared",e,this,n,o),t&&Yn(e),this.parent&&this.parent.clear()}},Ei.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=St(i.markedSpans,this);if(null!=a.from&&(r=tt(t?i:Je(i),a.from),-1==e))return r;if(null!=a.to&&(n=tt(t?i:Je(i),a.to),1==e))return n}return r&&{from:r,to:n}},Ei.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&eo(n,(function(){var o=t.line,i=Je(t.line),a=Lr(n,i);if(a&&(Fr(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ut(r.doc,o)&&null!=r.height){var l=r.height;r.height=null;var s=Cr(r)-l;s&&Xe(o,o.height+s)}sr(n,"markerChanged",n,e)}))},Ei.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=R(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ei.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(Ei);var Bi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function Oi(e){return e.findMarks(tt(e.first,0),e.clipPos(tt(e.lastLine())),(function(e){return e.parent}))}function Ti(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Do(r.primary.doc,(function(e){return n.push(e)}));for(var o=0;o<r.markers.length;o++){var i=r.markers[o];-1==R(n,i.doc)&&(i.parent=null,r.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}Bi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Bi.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(Bi);var Li=0,Pi=function(e,t,r,n,o){if(!(this instanceof Pi))return new Pi(e,t,r,n,o);null==r&&(r=0),wi.call(this,[new Ci([new $t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var i=tt(r,0);this.sel=Mo(i),this.history=new zo(null),this.id=++Li,this.modeOption=t,this.lineSep=n,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),No(this,{from:i,to:i,text:e}),ti(this,Mo(i),_)};Pi.prototype=Z(wi.prototype,{constructor:Pi,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ke(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:no((function(e){var t=tt(this.first,0),r=this.first+this.size-1;fi(this,{from:t,to:tt(r,$e(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&jn(this.cm,0,0),ti(this,Mo(t),_)})),replaceRange:function(e,t,r,n){mi(this,e,t=st(this,t),r=r?st(this,r):t,n)},getRange:function(e,t,r){var n=Ye(this,st(this,e),st(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Qe(this,e))return $e(this,e)},getLineNumber:function(e){return Je(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=$e(this,e)),zt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:no((function(e,t,r){Qo(this,st(this,"number"==typeof e?tt(e,t||0):e),null,r)})),setSelection:no((function(e,t,r){Qo(this,st(this,e),st(this,t||e),r)})),extendSelection:no((function(e,t,r){Xo(this,st(this,e),t&&st(this,t),r)})),extendSelections:no((function(e,t){Jo(this,ct(this,e),t)})),extendSelectionsBy:no((function(e,t){Jo(this,ct(this,X(this.sel.ranges,e)),t)})),setSelections:no((function(e,t,r){if(e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new So(st(this,e[o].anchor),st(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ti(this,Eo(this.cm,n,t),r)}})),addSelection:no((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new So(st(this,e),st(this,t||e))),ti(this,Eo(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var o=Ye(this,r[n].from(),r[n].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var o=Ye(this,r[n].from(),r[n].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,r){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:no((function(e,t,r){for(var n=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];n[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:r}}for(var l=t&&"end"!=t&&function(e,t,r){for(var n=[],o=tt(e.first,0),i=o,a=0;a<t.length;a++){var l=t[a],s=Lo(l.from,o,i),c=Lo(Bo(l),o,i);if(o=l.to,i=c,"around"==r){var u=e.sel.ranges[a],f=rt(u.head,u.anchor)<0;n[a]=new So(f?c:s,f?s:c)}else n[a]=new So(s,s)}return new ko(n,e.sel.primIndex)}(this,n,t),s=n.length-1;s>=0;s--)fi(this,n[s]);l?ei(this,l):this.cm&&Pn(this.cm)})),undo:no((function(){di(this,"undo")})),redo:no((function(){di(this,"redo")})),undoSelection:no((function(){di(this,"undo",!0)})),redoSelection:no((function(){di(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new zo(this.history),Do(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Yo(this.history.done),undone:Yo(this.history.undone)}},setHistory:function(e){var t=this.history=new zo(this.history);t.done=Yo(e.done.slice(0),null,!0),t.undone=Yo(e.undone.slice(0),null,!0)},setGutterMarker:no((function(e,t,r){return bi(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&re(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:no((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&bi(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,re(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Qe(this,e))return null;if(t=e,!(e=$e(this,e)))return null}else if(null==(t=Je(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:no((function(e,t,r){return bi(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(k(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:no((function(e,t,r){return bi(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[n];if(!o)return!1;if(null==r)e[n]=null;else{var i=o.match(k(r));if(!i)return!1;var a=i.index+i[0].length;e[n]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:no((function(e,t,r){return function(e,t,r,n){var o=new xi(e,r,n),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),bi(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==o.insertAt?r.push(o):r.splice(Math.min(r.length,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!Ut(e,t)){var n=Gt(t)<e.scrollTop;Xe(t,t.height+Cr(o)),n&&Ln(i,o.height),i.curOp.forceUpdate=!0}return!0})),i&&sr(i,"lineWidgetAdded",i,o,"number"==typeof t?t:Je(t)),o}(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Mi(this,st(this,e),st(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Mi(this,e=st(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=$e(this,(e=st(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var o=r[n];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=st(this,e),t=st(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&o==e.line&&e.ch>=s.to||null==s.from&&o!=e.line||null!=s.from&&o==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++o})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(o){var i=o.text.length+n;if(i>e)return t=e,!0;e-=i,++r})),st(this,tt(r,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new Pi(Ke(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Pi(Ke(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],o=n.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(rt(i,a)){var l=Mi(e,i,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}(n,Oi(this)),n},unlinkDoc:function(e){if(e instanceof Ba&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ti(Oi(this));break}if(e.history==this.history){var r=[e.id];Do(e,(function(e){return r.push(e.id)}),!0),e.history=new zo(null),e.history.done=Yo(this.history.done,r),e.history.undone=Yo(this.history.undone,r)}},iterLinkedDocs:function(e){Do(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:no((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&eo(t=this.cm,(function(){Fo(t),pn(t)})))}))}),Pi.prototype.eachLine=Pi.prototype.iter;var ji=0;function Ii(e){var t=this;if(Ni(t),!me(t,e)&&!wr(t.display,e)){be(e),a&&(ji=+new Date);var r=un(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,i=Array(o),l=0,s=function(){++l==o&&to(t,(function(){var e={from:r=st(t.doc,r),to:r,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};fi(t.doc,e),ei(t.doc,Mo(st(t.doc,r),st(t.doc,Bo(e))))}))()},c=function(e,r){if(t.options.allowDropFileTypes&&-1==R(t.options.allowDropFileTypes,e.type))s();else{var n=new FileReader;n.onerror=function(){return s()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[r]=e),s()},n.readAsText(e)}},u=0;u<n.length;u++)c(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),ri(t.doc,Mo(r,r)),p)for(var d=0;d<p.length;++d)mi(t.doc,"",p[d].anchor,p[d].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ni(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Di(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&r.push(o)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var Wi=!1;function Fi(){var e;Wi||(pe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Di(zi)}),100))})),pe(window,"blur",(function(){return Di(En)})),Wi=!0)}function zi(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ri={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Hi=0;Hi<10;Hi++)Ri[Hi+48]=Ri[Hi+96]=String(Hi);for(var Ui=65;Ui<=90;Ui++)Ri[Ui]=String.fromCharCode(Ui);for(var _i=1;_i<=12;_i++)Ri[_i+111]=Ri[_i+63235]="F"+_i;var Gi={};function Vi(e){var t,r,n,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var l=i[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function qi(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var o=X(r.split(" "),Vi),i=0;i<o.length;i++){var a=void 0,l=void 0;i==o.length-1?(l=o.join(" "),a=n):(l=o.slice(0,i+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function $i(e,t,r,n){var o=(t=Ji(t)).call?t.call(e,n):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&r(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return $i(e,t.fallthrough,r,n);for(var i=0;i<t.fallthrough.length;i++){var a=$i(e,t.fallthrough[i],r,n);if(a)return a}}}function Yi(e){var t="string"==typeof e?e:Ri[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ki(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Xi(e,t){if(f&&34==e.keyCode&&e.char)return!1;var r=Ri[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Ki(r,e,t))}function Ji(e){return"string"==typeof e?Gi[e]:e}function Zi(e,t){for(var r=e.doc.sel.ranges,n=[],o=0;o<r.length;o++){for(var i=t(r[o]);n.length&&rt(i.from,K(n).to)<=0;){var a=n.pop();if(rt(a.from,i.from)<0){i.from=a.from;break}}n.push(i)}eo(e,(function(){for(var t=n.length-1;t>=0;t--)mi(e.doc,"",n[t].from,n[t].to,"+delete");Pn(e)}))}function Qi(e,t,r){var n=ie(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ea(e,t,r){var n=Qi(e,t.ch,r);return null==n?null:new tt(t.line,n,r<0?"after":"before")}function ta(e,t,r,n,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ue(r,t.doc.direction);if(i){var a,l=o<0?K(i):i[0],s=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=Pr(t,r);a=o<0?r.text.length-1:0;var u=jr(t,c,a).top;a=ae((function(e){return jr(t,c,e).top==u}),o<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Qi(r,a,1))}else a=o<0?l.to:l.from;return new tt(n,a,s)}}return new tt(n,o<0?r.text.length:0,o<0?"before":"after")}Gi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gi.default=v?Gi.macDefault:Gi.pcDefault;var ra={selectAll:ci,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),_)},killLine:function(e){return Zi(e,(function(t){if(t.empty()){var r=$e(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:tt(t.head.line+1,0)}:{from:t.head,to:tt(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Zi(e,(function(t){return{from:tt(t.from().line,0),to:st(e.doc,tt(t.to().line+1,0))}}))},delLineLeft:function(e){return Zi(e,(function(e){return{from:tt(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Zi(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Zi(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(tt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(tt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return oa(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var r=$e(e.doc,t),n=function(e){for(var t;t=Dt(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=Je(n)),ta(!0,e,r,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?oa(e,t.head):n}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,o=0;o<r.length;o++){var i=r[o].from(),a=F(e.getLine(i.line),i.ch,n);t.push(Y(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return eo(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var o=t[n].head,i=$e(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new tt(o.line,o.ch-1)),o.ch>0)o=new tt(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),tt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=$e(e.doc,o.line-1).text;a&&(o=new tt(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),tt(o.line-1,a.length-1),o,"+transpose"))}r.push(new So(o,o))}e.setSelections(r)}))},newlineAndIndent:function(e){return eo(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Pn(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function na(e,t){var r=$e(e.doc,t),n=zt(r);return n!=r&&(t=Je(n)),ta(!0,e,n,t,1)}function oa(e,t){var r=na(e,t.line),n=$e(e.doc,r.line),o=ue(n,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=i&&t.ch;return tt(r.line,a?0:i,r.sticky)}return r}function ia(e,t,r){if("string"==typeof t&&!(t=ra[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),o=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}var aa=new z;function la(e,t,r,n){var o=e.state.keySeq;if(o){if(Yi(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:aa.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,o+" "+t,r,n))return!0}return sa(e,t,r,n)}function sa(e,t,r,n){var o=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var o=$i(t,e.state.keyMaps[n],r,e);if(o)return o}return e.options.extraKeys&&$i(t,e.options.extraKeys,r,e)||$i(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&sr(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(be(r),wn(e)),!!o}function ca(e,t){var r=Xi(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?la(e,"Shift-"+r,t,(function(t){return ia(e,t,!0)}))||la(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ia(e,t)})):la(e,r,t,(function(t){return ia(e,t)})))}var ua=null;function fa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=P(),me(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var o=ca(t,e);f&&(ua=o?n:null,o||88!=n||Ie||!(v?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!v&&!o&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(E(t,"CodeMirror-crosshair"),he(document,"keyup",r),he(document,"mouseover",r))}j(t,"CodeMirror-crosshair"),pe(document,"keyup",r),pe(document,"mouseover",r)}(t)}}function pa(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function da(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||wr(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||v&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(f&&r==ua)return ua=null,void be(e);if(!f||e.which&&!(e.which<10)||!ca(t,e)){var o=String.fromCharCode(null==n?r:n);"\b"!=o&&(function(e,t,r){return la(e,"'"+r+"'",t,(function(t){return ia(e,t,!0)}))}(t,e,o)||t.display.input.onKeyPress(e))}}}var ha,ga,ma=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ya(e){var t=this,r=t.display;if(!(me(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,wr(r,e))s||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!ba(t,e)){var n=un(t,e),o=Se(e),i=n?function(e,t){var r=+new Date;return ga&&ga.compare(r,e,t)?(ha=ga=null,"triple"):ha&&ha.compare(r,e,t)?(ga=new ma(r,e,t),ha=null,"double"):(ha=new ma(r,e,t),ga=null,"single")}(n,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,o){var i="Click";return"double"==n?i="Double"+i:"triple"==n&&(i="Triple"+i),la(e,Ki(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,(function(t){if("string"==typeof t&&(t=ra[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=U}finally{e.state.suppressEdits=!1}return n}))}(t,o,n,i,e)||(1==o?n?function(e,t,r,n){a?setTimeout(D(xn,e),0):e.curOp.focus=P();var o,i=function(e,t,r){var n=e.getOption("configureMouse"),o=n?n(e,t,r):{};if(null==o.unit){var i=A?r.shiftKey&&r.metaKey:r.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||r.shiftKey),null==o.addNew&&(o.addNew=v?r.metaKey:r.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(v?r.altKey:r.ctrlKey)),o}(e,r,n),c=e.doc.sel;e.options.dragDrop&&Be&&!e.isReadOnly()&&"single"==r&&(o=c.contains(t))>-1&&(rt((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(rt(o.to(),t)>0||t.xRel<0)?function(e,t,r,n){var o=e.display,i=!1,c=to(e,(function(t){s&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:kn(e)),he(o.wrapper.ownerDocument,"mouseup",c),he(o.wrapper.ownerDocument,"mousemove",u),he(o.scroller,"dragstart",f),he(o.scroller,"drop",c),i||(be(t),n.addNew||Xo(e.doc,r,null,null,n.extend),s&&!p||a&&9==l?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};s&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,pe(o.wrapper.ownerDocument,"mouseup",c),pe(o.wrapper.ownerDocument,"mousemove",u),pe(o.scroller,"dragstart",f),pe(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,n,t,i):function(e,t,r,n){a&&kn(e);var o=e.display,i=e.doc;be(t);var l,s,c=i.sel,u=c.ranges;if(n.addNew&&!n.extend?(s=i.sel.contains(r),l=s>-1?u[s]:new So(r,r)):(l=i.sel.primary(),s=i.sel.primIndex),"rectangle"==n.unit)n.addNew||(l=new So(r,r)),r=un(e,t,!0,!0),s=-1;else{var f=va(e,r,n.unit);l=n.extend?Ko(l,f.anchor,f.head,n.extend):f}n.addNew?-1==s?(s=u.length,ti(i,Eo(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(ti(i,Eo(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):Zo(i,s,l,G):(s=0,ti(i,new ko([l],0),G),c=i.sel);var p=r;function d(t){if(0!=rt(p,t))if(p=t,"rectangle"==n.unit){for(var o=[],a=e.options.tabSize,u=F($e(i,r.line).text,r.ch,a),f=F($e(i,t.line).text,t.ch,a),d=Math.min(u,f),h=Math.max(u,f),g=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=m;g++){var y=$e(i,g).text,v=q(y,d,a);d==h?o.push(new So(tt(g,v),tt(g,v))):y.length>v&&o.push(new So(tt(g,v),tt(g,q(y,h,a))))}o.length||o.push(new So(r,r)),ti(i,Eo(e,c.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var A,b=l,C=va(e,t,n.unit),w=b.anchor;rt(C.anchor,w)>0?(A=C.head,w=at(b.from(),C.anchor)):(A=C.anchor,w=it(b.to(),C.head));var x=c.ranges.slice(0);x[s]=function(e,t){var r=t.anchor,n=t.head,o=$e(e.doc,r.line);if(0==rt(r,n)&&r.sticky==n.sticky)return t;var i=ue(o);if(!i)return t;var a=se(i,r.ch,r.sticky),l=i[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s,c=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==c||c==i.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(i,n.ch,n.sticky),f=u-a||(n.ch-r.ch)*(1==l.level?-1:1);s=u==c-1||u==c?f<0:f>0}var p=i[c+(s?-1:0)],d=s==(1==p.level),h=d?p.from:p.to,g=d?"after":"before";return r.ch==h&&r.sticky==g?t:new So(new tt(r.line,h,g),n)}(e,new So(st(i,w),A)),ti(i,Eo(e,x,s),G)}}var h=o.wrapper.getBoundingClientRect(),g=0;function m(t){var r=++g,a=un(e,t,!0,"rectangle"==n.unit);if(a)if(0!=rt(a,p)){e.curOp.focus=P(),d(a);var l=On(o,i);(a.line>=l.to||a.line<l.from)&&setTimeout(to(e,(function(){g==r&&m(t)})),150)}else{var s=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;s&&setTimeout(to(e,(function(){g==r&&(o.scroller.scrollTop+=s,m(t))})),50)}}function y(t){e.state.selectingText=!1,g=1/0,t&&(be(t),o.input.focus()),he(o.wrapper.ownerDocument,"mousemove",v),he(o.wrapper.ownerDocument,"mouseup",A),i.history.lastSelOrigin=null}var v=to(e,(function(e){0!==e.buttons&&Se(e)?m(e):y(e)})),A=to(e,y);e.state.selectingText=A,pe(o.wrapper.ownerDocument,"mousemove",v),pe(o.wrapper.ownerDocument,"mouseup",A)}(e,n,t,i)}(t,n,i,e):ke(e)==r.scroller&&be(e):2==o?(n&&Xo(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==o&&(x?t.display.input.onContextMenu(e):kn(t)))}}function va(e,t,r){if("char"==r)return new So(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new So(tt(t.line,0),st(e.doc,tt(t.line+1,0)));var n=r(e,t);return new So(n.from,n.to)}function Aa(e,t,r,n){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&be(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!ve(e,r))return we(t);i-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=o)return ge(e,r,e,Ze(e.doc,i),e.display.gutterSpecs[s].className,t),we(t)}}function ba(e,t){return Aa(e,t,"gutterClick",!0)}function Ca(e,t){wr(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&Aa(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||x||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}ma.prototype.compare=function(e,t,r){return this.time+400>e&&0==rt(t,this.pos)&&r==this.button};var xa={toString:function(){return"CodeMirror.Init"}},ka={},Sa={};function Ea(e,t,r){if(!t!=!(r&&r!=xa)){var n=e.display.dragFunctions,o=t?pe:he;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function Ma(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),qt(e)),cn(e),pn(e),Rr(e),setTimeout((function(){return Un(e)}),100)}function Ba(e,t){var r=this;if(!(this instanceof Ba))return new Ba(e,t);this.options=t=t?W(t):{},W(ka,t,!1);var n=t.value;"string"==typeof n?n=new Pi(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new Ba.inputStyles[t.inputStyle](this),i=this.display=new vo(e,n,o,t);for(var c in i.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},t.autofocus&&!y&&i.input.focus(),a&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",to(e,ya)),pe(t.scroller,"dblclick",a&&l<11?to(e,(function(t){if(!me(e,t)){var r=un(e,t);if(r&&!ba(e,t)&&!wr(e.display,t)){be(t);var n=e.findWordAt(r);Xo(e.doc,n.anchor,n.head)}}})):function(t){return me(e,t)||be(t)}),pe(t.scroller,"contextmenu",(function(t){return Ca(e,t)})),pe(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Ca(e,r)}));var r,n={end:0};function o(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function i(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}pe(t.scroller,"touchstart",(function(o){if(!me(e,o)&&!i(o)&&!ba(e,o)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!wr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!n.prev||s(n,n.prev)?new So(a,a):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(a):new So(tt(a.line,0),st(e.doc,tt(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),be(r)}o()})),pe(t.scroller,"touchcancel",o),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Dn(e,t.scroller.scrollTop),Fn(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return xo(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return xo(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||xe(t)},over:function(t){me(e,t)||(function(e,t){var r=un(e,t);if(r){var n=document.createDocumentFragment();An(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),B(e.display.dragCursor,n)}}(e,t),xe(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-ji<100))xe(t);else if(!me(e,t)&&!wr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),f&&r.parentNode.removeChild(r)}}(e,t)},drop:to(e,Ii),leave:function(t){me(e,t)||Ni(e)}};var c=t.input.getField();pe(c,"keyup",(function(t){return pa.call(e,t)})),pe(c,"keydown",to(e,fa)),pe(c,"keypress",to(e,da)),pe(c,"focus",(function(t){return Sn(e,t)})),pe(c,"blur",(function(t){return En(e,t)}))}(this),Fi(),$n(this),this.curOp.forceUpdate=!0,Wo(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Sn(r)}),20):En(this),Sa)Sa.hasOwnProperty(c)&&Sa[c](this,t[c],xa);ho(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Oa.length;++u)Oa[u](this);Yn(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}Ba.defaults=ka,Ba.optionHandlers=Sa;var Oa=[];function Ta(e,t,r,n){var o,i=e.doc;null==r&&(r="add"),"smart"==r&&(i.mode.indent?o=ht(e,t).state:r="prev");var a=e.options.tabSize,l=$e(i,t),s=F(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((c=i.mode.indent(o,l.text.slice(u.length),l.text))==U||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>i.first?F($e(i,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)p+=a,f+="\t";if(p<c&&(f+=Y(c-p)),f!=u)return mi(i,f,tt(t,0),tt(t,u.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var g=i.sel.ranges[h];if(g.head.line==t&&g.head.ch<u.length){var m=tt(t,u.length);Zo(i,h,new So(m,m));break}}}Ba.defineInitHook=function(e){return Oa.push(e)};var La=null;function Pa(e){La=e}function ja(e,t,r,n,o){var i=e.doc;e.display.shift=!1,n||(n=i.sel);var a=+new Date-200,l="paste"==o||e.state.pasteIncoming>a,s=Pe(t),c=null;if(l&&n.ranges.length>1)if(La&&La.text.join("\n")==t){if(n.ranges.length%La.text.length==0){c=[];for(var u=0;u<La.text.length;u++)c.push(i.splitLines(La.text[u]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(s,(function(e){return[e]})));for(var f=e.curOp.updateInput,p=n.ranges.length-1;p>=0;p--){var d=n.ranges[p],h=d.from(),g=d.to();d.empty()&&(r&&r>0?h=tt(h.line,h.ch-r):e.state.overwrite&&!l?g=tt(g.line,Math.min($e(i,g.line).text.length,g.ch+K(s).length)):l&&La&&La.lineWise&&La.text.join("\n")==s.join("\n")&&(h=g=tt(h.line,0)));var m={from:h,to:g,text:c?c[p%c.length]:s,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};fi(e.doc,m),sr(e,"inputRead",e,m)}t&&!l&&Na(e,t),Pn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||eo(t,(function(){return ja(t,r,0,null,"paste")})),!0}function Na(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(t.indexOf(i.electricChars.charAt(l))>-1){a=Ta(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test($e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ta(e,o.head.line,"smart"));a&&sr(e,"electricInput",e,o.head.line)}}}function Da(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,i={anchor:tt(o,0),head:tt(o+1,0)};r.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:r}}function Wa(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Fa(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Wa(e),t}function za(e,t,r,n,o){var i=t,a=r,l=$e(e,t.line),s=o&&"rtl"==e.direction?-r:r;function c(i){var a,c;if("codepoint"==n){var u=l.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(u))a=null;else{var f=r>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new tt(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(f?2:1))),-r)}}else a=o?function(e,t,r,n){var o=ue(t,e.doc.direction);if(!o)return ea(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var i=se(o,r.ch,r.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return ea(t,r,n);var l,s=function(e,r){return Qi(t,e instanceof tt?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||Pr(e,t),Zr(e,t,l,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?s(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==n<0,p=s(r,f?1:-1);if(null!=p&&(f?p<=a.to&&p<=u.end:p>=a.from&&p>=u.begin)){var d=f?"before":"after";return new tt(r.line,p,d)}}var h=function(e,t,n){for(var i=function(e,t){return t?new tt(r.line,s(e,1),"before"):new tt(r.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],l=t>0==(1!=a.level),c=l?n.begin:s(n.end,-1);if(a.from<=c&&c<a.to)return i(c,l);if(c=l?a.from:s(a.to,-1),n.begin<=c&&c<n.end)return i(c,l)}},g=h(i+n,n,u);if(g)return g;var m=n>0?u.end:s(u.begin,-1);return null==m||n>0&&m==t.text.length||!(g=h(n>0?0:o.length-1,n,c(m)))?null:g}(e.cm,l,t,r):ea(l,t,r);if(null==a){if(i||((c=t.line+s)<e.first||c>=e.first+e.size||(t=new tt(c,t.ch,t.sticky),!(l=$e(e,c)))))return!1;t=ta(o,e.cm,l,t.line,s)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var u=null,f="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||c(!d);d=!1){var h=l.text.charAt(t.ch)||"\n",g=te(h,p)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||d||g||(g="s"),u&&u!=g){r<0&&(r=1,c(),t.sticky="after");break}if(g&&(u=g),r>0&&!c(!d))break}var m=li(e,t,i,a,!0);return nt(i,m)&&(m.hitSide=!0),m}function Ra(e,t,r,n){var o,i,a=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*nn(e.display),3);o=(r>0?t.bottom:t.top)+r*c}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;(i=Xr(e,l,o)).outside;){if(r<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*r}return i}var Ha=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,t){var r=Lr(e,t.line);if(!r||r.hidden)return null;var n=$e(e.doc,t.line),o=Or(r,n,t.line),i=ue(n,e.doc.direction),a="left";i&&(a=se(i,t.ch)%2?"right":"left");var l=Dr(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function _a(e,t){return t&&(e.bad=!0),e}function Ga(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return _a(e.clipPos(tt(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==n)return Va(i,t,r)}}function Va(e,t,r){var n=e.text.firstChild,o=!1;if(!t||!L(n,t))return _a(tt(Je(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[r],r=0,!t)){var i=e.rest?K(e.rest):e.line;return _a(tt(Je(i),i.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,r,n){for(var o=-1;o<(c?c.length:0);o++)for(var i=o<0?s.map:c[o],a=0;a<i.length;a+=3){var l=i[a+2];if(l==t||l==r){var u=Je(o<0?e.line:e.rest[o]),f=i[a]+n;return(n<0||l!=t)&&(f=i[a+(n?1:0)]),tt(u,f)}}}var f=u(a,l,r);if(f)return _a(f,o);for(var p=l.nextSibling,d=a?a.nodeValue.length-r:0;p;p=p.nextSibling){if(f=u(p,p.firstChild,0))return _a(tt(f.line,f.ch-d),o);d+=p.textContent.length}for(var h=l.previousSibling,g=r;h;h=h.previousSibling){if(f=u(h,h.firstChild,-1))return _a(tt(f.line,f.ch+g),o);g+=h.textContent.length}}Ha.prototype.init=function(e){var t=this,r=this,n=r.cm,o=r.div=e.lineDiv;function i(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(i(e)&&!me(n,e)){if(n.somethingSelected())Pa({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Da(n);Pa({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,_),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=La.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=Fa(),s=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=La.text.join("\n");var c=P();N(s),setTimeout((function(){n.display.lineSpace.removeChild(l),c.focus(),c==o&&r.showPrimarySelection()}),50)}}o.contentEditable=!0,Wa(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),pe(o,"paste",(function(e){!i(e)||me(n,e)||Ia(e,n)||l<=11&&setTimeout(to(n,(function(){return t.updateFromDOM()})),20)})),pe(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),pe(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),pe(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),pe(o,"touchstart",(function(){return r.forceCompositionEnd()})),pe(o,"input",(function(){t.composing||t.readFromDOMSoon()})),pe(o,"copy",a),pe(o,"cut",a)},Ha.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ha.prototype.prepareSelection=function(){var e=vn(this.cm,!1);return e.focus=P()==this.div,e},Ha.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ha.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ha.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),o=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var a=Ga(t,e.anchorNode,e.anchorOffset),l=Ga(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=rt(at(a,l),o)||0!=rt(it(a,l),i)){var s=t.display.view,c=o.line>=t.display.viewFrom&&Ua(t,o)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Ua(t,i);if(!u){var f=s[s.length-1].measure,p=f.maps?f.maps[f.maps.length-1]:f.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(c&&u){var d,h=e.rangeCount&&e.getRangeAt(0);try{d=S(c.node,c.offset,u.offset,u.node)}catch(e){}d&&(!r&&t.state.focused?(e.collapse(c.node,c.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),h&&null==e.anchorNode?e.addRange(h):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ha.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ha.prototype.showMultipleSelections=function(e){B(this.cm.display.cursorDiv,e.cursors),B(this.cm.display.selectionDiv,e.selection)},Ha.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ha.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return L(this.div,t)},Ha.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&P()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ha.prototype.blur=function(){this.div.blur()},Ha.prototype.getField=function(){return this.div},Ha.prototype.supportsTouch=function(){return!0},Ha.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():eo(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Ha.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ha.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Ga(t,e.anchorNode,e.anchorOffset),n=Ga(t,e.focusNode,e.focusOffset);r&&n&&eo(t,(function(){ti(t.doc,Mo(r,n),_),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ha.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,o=n.display,i=n.doc.sel.primary(),a=i.from(),l=i.to();if(0==a.ch&&a.line>n.firstLine()&&(a=tt(a.line-1,$e(n.doc,a.line-1).length)),l.ch==$e(n.doc,l.line).text.length&&l.line<n.lastLine()&&(l=tt(l.line+1,0)),a.line<o.viewFrom||l.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=fn(n,a.line))?(t=Je(o.view[0].line),r=o.view[0].node):(t=Je(o.view[e].line),r=o.view[e-1].node.nextSibling);var s,c,u=fn(n,l.line);if(u==o.view.length-1?(s=o.viewTo-1,c=o.lineDiv.lastChild):(s=Je(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(function(e,t,r,n,o){var i="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(){a&&(i+=l,s&&(i+=l),a=s=!1)}function u(e){e&&(c(),i+=e)}function f(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void u(r);var i,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(tt(n,0),tt(o+1,0),(m=+p,function(e){return e.id==m}));return void(d.length&&(i=d[0].find(0))&&u(Ye(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),h&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var m}for(;f(t),t!=r;)t=t.nextSibling,s=!1;return i}(n,r,c,t,s)),p=Ye(n.doc,tt(t,0),tt(s,$e(n.doc,s).text.length));f.length>1&&p.length>1;)if(K(f)==K(p))f.pop(),p.pop(),s--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,g=f[0],m=p[0],y=Math.min(g.length,m.length);d<y&&g.charCodeAt(d)==m.charCodeAt(d);)++d;for(var v=K(f),A=K(p),b=Math.min(v.length-(1==f.length?d:0),A.length-(1==p.length?d:0));h<b&&v.charCodeAt(v.length-h-1)==A.charCodeAt(A.length-h-1);)++h;if(1==f.length&&1==p.length&&t==a.line)for(;d&&d>a.ch&&v.charCodeAt(v.length-h-1)==A.charCodeAt(A.length-h-1);)d--,h++;f[f.length-1]=v.slice(0,v.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=tt(t,d),w=tt(s,p.length?K(p).length-h:0);return f.length>1||f[0]||rt(C,w)?(mi(n.doc,f,C,w,"+input"),!0):void 0},Ha.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ha.prototype.reset=function(){this.forceCompositionEnd()},Ha.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ha.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ha.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||eo(this.cm,(function(){return pn(e.cm)}))},Ha.prototype.setUneditable=function(e){e.contentEditable="false"},Ha.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||to(this.cm,ja)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ha.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ha.prototype.onContextMenu=function(){},Ha.prototype.resetPosition=function(){},Ha.prototype.needsContentAttribute=!0;var qa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!me(n,e)){if(n.somethingSelected())Pa({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Da(n);Pa({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,_):(r.prevInput="",o.value=t.text.join("\n"),N(o))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),pe(o,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(o,"paste",(function(e){me(n,e)||Ia(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(o,"cut",i),pe(o,"copy",i),pe(e.scroller,"paste",(function(t){if(!wr(e,t)&&!me(n,t)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),pe(e.lineSpace,"selectstart",(function(t){wr(e,t)||be(t)})),pe(o,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(o,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},qa.prototype.createField=function(e){this.wrapper=Fa(),this.textarea=this.wrapper.firstChild},qa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=vn(e);if(e.options.moveInputWithCursor){var o=$r(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return n},qa.prototype.showSelection=function(e){var t=this.cm.display;B(t.cursorDiv,e.cursors),B(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&N(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},qa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}))},qa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||je(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=r.value;if(o==n&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===o||v&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(n.length,o.length);s<c&&n.charCodeAt(s)==o.charCodeAt(s);)++s;return eo(t,(function(){ja(t,o.slice(s),n.length-s,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=un(r,e),c=n.scroller.scrollTop;if(i&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(i)&&to(r,ti)(r.doc,Mo(i),_);var u,p=o.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=window.scrollY),n.input.focus(),s&&window.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=y,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&m(),x){xe(e);var g=function(){he(window,"mouseup",g),setTimeout(y,20)};pe(window,"mouseup",g)}else setTimeout(y,50)}function m(){if(null!=o.selectionStart){var e=r.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,n.selForContextMenu=r.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,o.style.cssText=p,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&l<9)&&m();var e=0,i=function(){n.selForContextMenu==r.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?to(r,ci)(r):e++<10?n.detectingSelectAll=setTimeout(i,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(i,200)}}},qa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,o,i){e.defaults[r]=n,o&&(t[r]=i?function(e,t,r){r!=xa&&o(e,t,r)}:o)}e.defineOption=r,e.Init=xa,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,Po(e)}),!0),r("indentUnit",2,Po,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){jo(e),Rr(e),pn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,r.push(tt(n,i))}n++}));for(var o=r.length-1;o>=0;o--)mi(e.doc,t,r[o],tt(r[o].line,r[o].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=xa&&e.refresh()})),r("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!b),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){wa(e),yo(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ji(t),o=r!=xa&&Ji(r);o&&o.detach&&o.detach(e,n),n.attach&&n.attach(e,o||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Ma,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=go(t,e.options.lineNumbers),yo(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ln(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return Un(e)}),!0),r("scrollbarStyle","native",(function(e){Vn(e),Un(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=go(e.options.gutters,t),yo(e)}),!0),r("firstLineNumber",1,yo,!0),r("lineNumberFormatter",(function(e){return e}),yo,!0),r("showCursorWhenSelecting",!1,yn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(En(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ea),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,yn,!0),r("singleCursorHeightPerLine",!0,yn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,jo,!0),r("addModeClass",!1,jo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,jo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}(Ba),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,o=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&to(this,t[e])(this,r,o),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ji(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:ro((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");(function(e,t,r){for(var n=0,o=r(t);n<e.length&&r(e[n])<=o;)n++;e.splice(n,0,t)})(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,pn(this)})),removeOverlay:ro((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void pn(this)}})),indentLine:ro((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Qe(this.doc,e)&&Ta(this,e,t,r)})),indentSelection:ro((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var o=t[n];if(o.empty())o.head.line>r&&(Ta(this,o.head.line,e,!0),r=o.head.line,n==this.doc.sel.primIndex&&Pn(this));else{var i=o.from(),a=o.to(),l=Math.max(r,i.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Ta(this,s,e);var c=this.doc.sel.ranges;0==i.ch&&t.length==c.length&&c[n].from().ch>0&&Zo(this.doc,n,new So(i,c[n].to()),_)}}})),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,tt(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=dt(this,$e(this.doc,e.line)),n=0,o=(r.length-1)/2,i=e.ch;if(0==i)t=r[2];else for(;;){var a=n+o>>1;if((a?r[2*a-1]:0)>=i)o=a;else{if(!(r[2*a+1]<i)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var o=r[t],i=this.getModeAt(e);if("string"==typeof i[t])o[i[t]]&&n.push(o[i[t]]);else if(i[t])for(var a=0;a<i[t].length;a++){var l=o[i[t][a]];l&&n.push(l)}else i.helperType&&o[i.helperType]?n.push(o[i.helperType]):o[i.name]&&n.push(o[i.name]);for(var s=0;s<o._global.length;s++){var c=o._global[s];c.pred(i,this)&&-1==R(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return ht(this,(e=lt(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return $r(this,null==e?r.head:"object"==typeof e?st(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return qr(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Xr(this,(e=Vr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Vr(this,{top:e,left:0},t||"page").top,Ze(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,o=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,o=!0),n=$e(this.doc,e)}else n=e;return Gr(this,n,{top:0,left:0},t||"page",r||o).top+(o?this.doc.height-Gt(n):0)},defaultTextHeight:function(){return nn(this.display)},defaultCharWidth:function(){return on(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,o){var i,a,l,s=this.display,c=(e=$r(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==n)c=e.top;else if("above"==n||"near"==n){var f=Math.max(s.wrapper.clientHeight,this.doc.height),p=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(c=e.bottom),u+t.offsetWidth>p&&(u=p-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(i=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(l=Tn(i,a)).scrollTop&&Dn(i,l.scrollTop),null!=l.scrollLeft&&Fn(i,l.scrollLeft))},triggerOnKeyDown:ro(fa),triggerOnKeyPress:ro(da),triggerOnKeyUp:pa,triggerOnMouseDown:ro(ya),execCommand:function(e){if(ra.hasOwnProperty(e))return ra[e].call(null,this)},triggerElectric:ro((function(e){Na(this,e)})),findPosH:function(e,t,r,n){var o=1;t<0&&(o=-1,t=-t);for(var i=st(this.doc,e),a=0;a<t&&!(i=za(this.doc,i,o,r,n)).hitSide;++a);return i},moveH:ro((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?za(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),V)})),deleteH:ro((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Zi(this,(function(r){var o=za(n,r.head,e,t,!1);return e<0?{from:o,to:r.head}:{from:r.head,to:o}}))})),findPosV:function(e,t,r,n){var o=1,i=n;t<0&&(o=-1,t=-t);for(var a=st(this.doc,e),l=0;l<t;++l){var s=$r(this,a,"div");if(null==i?i=s.left:s.left=i,(a=Ra(this,s,o,r)).hitSide)break}return a},moveV:ro((function(e,t){var r=this,n=this.doc,o=[],i=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(a){if(i)return e<0?a.from():a.to();var l=$r(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),o.push(l.left);var s=Ra(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Ln(r,qr(r,s,"div").top-l.top),s}),V),o.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=$e(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var i=t.charAt(r),a=te(i,o)?function(e){return te(e,o)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new So(tt(e.line,r),tt(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ro((function(e,t){jn(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Er(this)-this.display.barHeight,width:e.scrollWidth-Er(this)-this.display.barWidth,clientHeight:Br(this),clientWidth:Mr(this)}},scrollIntoView:ro((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:tt(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){In(e),e.curOp.scrollToPos=t}(this,e):Nn(this,e.from,e.to,e.margin)})),setSize:ro((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&zr(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){dn(r,o,"widget");break}++o})),this.curOp.forceUpdate=!0,ge(this,"refresh",this)})),operation:function(e){return eo(this,e)},startOperation:function(){return $n(this)},endOperation:function(){return Yn(this)},refresh:ro((function(){var e=this.display.cachedTextHeight;pn(this),this.curOp.forceUpdate=!0,Rr(this),jn(this,this.doc.scrollLeft,this.doc.scrollTop),uo(this.display),(null==e||Math.abs(e-nn(this.display))>.5||this.options.lineWrapping)&&cn(this),ge(this,"refresh",this)})),swapDoc:ro((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Wo(this,e),Rr(this),this.display.input.reset(),jn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ae(e),e.registerHelper=function(t,n,o){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=o},e.registerGlobalHelper=function(t,n,o,i){e.registerHelper(t,n,i),r[t]._global.push({pred:o,val:i})}}(Ba);var $a="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Pi.prototype)Pi.prototype.hasOwnProperty(Ya)&&R($a,Ya)<0&&(Ba.prototype[Ya]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pi.prototype[Ya]));return Ae(Pi),Ba.inputStyles={textarea:qa,contenteditable:Ha},Ba.defineMode=function(e){Ba.defaults.mode||"null"==e||(Ba.defaults.mode=e),Fe.apply(this,arguments)},Ba.defineMIME=function(e,t){We[e]=t},Ba.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ba.defineMIME("text/plain","null"),Ba.defineExtension=function(e,t){Ba.prototype[e]=t},Ba.defineDocExtension=function(e,t){Pi.prototype[e]=t},Ba.fromTextArea=function(e,t){if((t=t?W(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=P();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var o;if(e.form&&(pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var l=Ba((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l},function(e){e.off=he,e.on=pe,e.wheelEventPixels=wo,e.Doc=Pi,e.splitLines=Pe,e.countColumn=F,e.findColumn=q,e.isWordChar=ee,e.Pass=U,e.signal=ge,e.Line=$t,e.changeEnd=Bo,e.scrollbarModel=Gn,e.Pos=tt,e.cmpPos=rt,e.modes=De,e.mimeModes=We,e.resolveMode=ze,e.getMode=Re,e.modeExtensions=He,e.extendMode=Ue,e.copyState=_e,e.startState=Ve,e.innerMode=Ge,e.commands=ra,e.keyMap=Gi,e.keyName=Xi,e.isModifierKey=Yi,e.lookupKey=$i,e.normalizeKeyMap=qi,e.StringStream=qe,e.SharedTextMarker=Bi,e.TextMarker=Ei,e.LineWidget=xi,e.e_preventDefault=be,e.e_stopPropagation=Ce,e.e_stop=xe,e.addClass=j,e.contains=L,e.rmClass=E,e.keyNames=Ri}(Ba),Ba.version="5.61.1",Ba}()},8269:function(e,t,r){!function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,o,i=t.indentUnit,a=r.statementIndent,l=r.jsonld,s=r.json||l,c=!1!==r.trackScope,u=r.typescript,f=r.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),d=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e,t,r){return n=e,o=r,t}function m(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,o=!1;if(l&&"@"==e.peek()&&e.match(h))return t.tokenize=m,g("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||o);)o=!o&&"\\"==n;return o||(t.tokenize=m),g("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&e.eat(">"))return g("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):et(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==n)return t.tokenize=v,v(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==n&&e.eatWhile(f))return g("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(d.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?g("."):g("operator","operator",e.current());if(f.test(n)){e.eatWhile(f);var o=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(o)){var i=p[o];return g(i.type,i.style,o)}if("async"==o&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",o)}return g("variable","variable",o)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return g("comment","comment")}function v(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return g("quasi","string-2",e.current())}var A="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(u){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,i=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=A.indexOf(l);if(s>=0&&s<3){if(!o){++a;break}if(0==--o){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++o;else if(f.test(l))i=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(i&&!o){++a;break}}i&&!o&&(t.fatArrowAt=a)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function x(e,t){if(!c)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function k(e,t,r,n,o){var i=e.cc;for(S.state=e,S.stream=o,S.marked=null,S.cc=i,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():s?_:H)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return S.marked?S.marked:"variable"==r&&x(e,n)?"variable-2":t}}var S={state:null,column:null,marked:null,cc:null};function E(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function M(){return E.apply(null,arguments),!0}function B(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function O(e){var t=S.state;if(S.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=T(e,t.context);if(null!=n)return void(t.context=n)}else if(!B(e,t.localVars))return void(t.localVars=new j(e,t.localVars));r.globalVars&&!B(e,t.globalVars)&&(t.globalVars=new j(e,t.globalVars))}}function T(e,t){if(t){if(t.block){var r=T(e,t.prev);return r?r==t.prev?t:new P(r,t.vars,!0):null}return B(e,t.vars)?t:new P(t.prev,new j(e,t.vars),!1)}return null}function L(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function P(e,t,r){this.prev=e,this.vars=t,this.block=r}function j(e,t){this.name=e,this.next=t}var I=new j("this",new j("arguments",null));function N(){S.state.context=new P(S.state.context,S.state.localVars,!1),S.state.localVars=I}function D(){S.state.context=new P(S.state.context,S.state.localVars,!0),S.state.localVars=null}function W(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function F(e,t){var r=function(){var r=S.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new w(n,S.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function z(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function R(e){return function t(r){return r==e?M():";"==e||"}"==r||")"==r||"]"==r?E():M(t)}}function H(e,t){return"var"==e?M(F("vardef",t),Se,R(";"),z):"keyword a"==e?M(F("form"),V,H,z):"keyword b"==e?M(F("form"),H,z):"keyword d"==e?S.stream.match(/^\s*$/,!1)?M():M(F("stat"),$,R(";"),z):"debugger"==e?M(R(";")):"{"==e?M(F("}"),D,ce,z,W):";"==e?M():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==z&&S.state.cc.pop()(),M(F("form"),V,H,z,Le)):"function"==e?M(Ne):"for"==e?M(F("form"),D,Pe,H,W,z):"class"==e||u&&"interface"==t?(S.marked="keyword",M(F("form","class"==e?e:t),Re,z)):"variable"==e?u&&"declare"==t?(S.marked="keyword",M(H)):u&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?M(Ze):"type"==t?M(We,R("operator"),he,R(";")):M(F("form"),Ee,R("{"),F("}"),ce,z,z)):u&&"namespace"==t?(S.marked="keyword",M(F("form"),_,H,z)):u&&"abstract"==t?(S.marked="keyword",M(H)):M(F("stat"),re):"switch"==e?M(F("form"),V,R("{"),F("}","switch"),D,ce,z,z,W):"case"==e?M(_,R(":")):"default"==e?M(R(":")):"catch"==e?M(F("form"),N,U,H,z,W):"export"==e?M(F("stat"),Ge,z):"import"==e?M(F("stat"),qe,z):"async"==e?M(H):"@"==t?M(_,H):E(F("stat"),_,R(";"),z)}function U(e){if("("==e)return M(Fe,R(")"))}function _(e,t){return q(e,t,!1)}function G(e,t){return q(e,t,!0)}function V(e){return"("!=e?E():M(F(")"),$,R(")"),z)}function q(e,t,r){if(S.state.fatArrowAt==S.stream.start){var n=r?Q:Z;if("("==e)return M(N,F(")"),le(Fe,")"),z,R("=>"),n,W);if("variable"==e)return E(N,Ee,R("=>"),n,W)}var o=r?K:Y;return C.hasOwnProperty(e)?M(o):"function"==e?M(Ne,o):"class"==e||u&&"interface"==t?(S.marked="keyword",M(F("form"),ze,z)):"keyword c"==e||"async"==e?M(r?G:_):"("==e?M(F(")"),$,R(")"),z,o):"operator"==e||"spread"==e?M(r?G:_):"["==e?M(F("]"),Je,z,o):"{"==e?se(oe,"}",null,o):"quasi"==e?E(X,o):"new"==e?M(function(e){return function(t){return"."==t?M(e?te:ee):"variable"==t&&u?M(we,e?K:Y):E(e?G:_)}}(r)):M()}function $(e){return e.match(/[;\}\)\],]/)?E():E(_)}function Y(e,t){return","==e?M($):K(e,t,!1)}function K(e,t,r){var n=0==r?Y:K,o=0==r?_:G;return"=>"==e?M(N,r?Q:Z,W):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?M(n):u&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?M(F(">"),le(he,">"),z,n):"?"==t?M(_,R(":"),o):M(o):"quasi"==e?E(X,n):";"!=e?"("==e?se(G,")","call",n):"."==e?M(ne,n):"["==e?M(F("]"),$,R("]"),z,n):u&&"as"==t?(S.marked="keyword",M(he,n)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),M(o)):void 0:void 0}function X(e,t){return"quasi"!=e?E():"${"!=t.slice(t.length-2)?M(X):M(_,J)}function J(e){if("}"==e)return S.marked="string-2",S.state.tokenize=v,M(X)}function Z(e){return b(S.stream,S.state),E("{"==e?H:_)}function Q(e){return b(S.stream,S.state),E("{"==e?H:G)}function ee(e,t){if("target"==t)return S.marked="keyword",M(Y)}function te(e,t){if("target"==t)return S.marked="keyword",M(K)}function re(e){return":"==e?M(z,H):E(Y,R(";"),z)}function ne(e){if("variable"==e)return S.marked="property",M()}function oe(e,t){return"async"==e?(S.marked="property",M(oe)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?M(ie):(u&&S.state.fatArrowAt==S.stream.start&&(r=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+r[0].length),M(ae))):"number"==e||"string"==e?(S.marked=l?"property":S.style+" property",M(ae)):"jsonld-keyword"==e?M(ae):u&&L(t)?(S.marked="keyword",M(oe)):"["==e?M(_,ue,R("]"),ae):"spread"==e?M(G,ae):"*"==t?(S.marked="keyword",M(oe)):":"==e?E(ae):void 0;var r}function ie(e){return"variable"!=e?E(ae):(S.marked="property",M(Ne))}function ae(e){return":"==e?M(G):"("==e?E(Ne):void 0}function le(e,t,r){function n(o,i){if(r?r.indexOf(o)>-1:","==o){var a=S.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),M((function(r,n){return r==t||n==t?E():E(e)}),n)}return o==t||i==t?M():r&&r.indexOf(";")>-1?E(e):M(R(t))}return function(r,o){return r==t||o==t?M():E(e,n)}}function se(e,t,r){for(var n=3;n<arguments.length;n++)S.cc.push(arguments[n]);return M(F(t,r),le(e,t),z)}function ce(e){return"}"==e?M():E(H,ce)}function ue(e,t){if(u){if(":"==e)return M(he);if("?"==t)return M(ue)}}function fe(e,t){if(u&&(":"==e||"in"==t))return M(he)}function pe(e){if(u&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?M(_,de,he):M(he)}function de(e,t){if("is"==t)return S.marked="keyword",M()}function he(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(S.marked="keyword",M("typeof"==t?G:he)):"variable"==e||"void"==t?(S.marked="type",M(Ce)):"|"==t||"&"==t?M(he):"string"==e||"number"==e||"atom"==e?M(Ce):"["==e?M(F("]"),le(he,"]",","),z,Ce):"{"==e?M(F("}"),me,z,Ce):"("==e?M(le(be,")"),ge,Ce):"<"==e?M(le(he,">"),he):"quasi"==e?E(ve,Ce):void 0}function ge(e){if("=>"==e)return M(he)}function me(e){return e.match(/[\}\)\]]/)?M():","==e||";"==e?M(me):E(ye,me)}function ye(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",M(ye)):"?"==t||"number"==e||"string"==e?M(ye):":"==e?M(he):"["==e?M(R("variable"),fe,R("]"),ye):"("==e?E(De,ye):e.match(/[;\}\)\],]/)?void 0:M()}function ve(e,t){return"quasi"!=e?E():"${"!=t.slice(t.length-2)?M(ve):M(he,Ae)}function Ae(e){if("}"==e)return S.marked="string-2",S.state.tokenize=v,M(ve)}function be(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?M(be):":"==e?M(he):"spread"==e?M(be):E(he)}function Ce(e,t){return"<"==t?M(F(">"),le(he,">"),z,Ce):"|"==t||"."==e||"&"==t?M(he):"["==e?M(he,R("]"),Ce):"extends"==t||"implements"==t?(S.marked="keyword",M(he)):"?"==t?M(he,R(":"),he):void 0}function we(e,t){if("<"==t)return M(F(">"),le(he,">"),z,Ce)}function xe(){return E(he,ke)}function ke(e,t){if("="==t)return M(he)}function Se(e,t){return"enum"==t?(S.marked="keyword",M(Ze)):E(Ee,ue,Oe,Te)}function Ee(e,t){return u&&L(t)?(S.marked="keyword",M(Ee)):"variable"==e?(O(t),M()):"spread"==e?M(Ee):"["==e?se(Be,"]"):"{"==e?se(Me,"}"):void 0}function Me(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?M(Ee):"}"==e?E():"["==e?M(_,R("]"),R(":"),Me):M(R(":"),Ee,Oe)):(O(t),M(Oe))}function Be(){return E(Ee,Oe)}function Oe(e,t){if("="==t)return M(G)}function Te(e){if(","==e)return M(Se)}function Le(e,t){if("keyword b"==e&&"else"==t)return M(F("form","else"),H,z)}function Pe(e,t){return"await"==t?M(Pe):"("==e?M(F(")"),je,z):void 0}function je(e){return"var"==e?M(Se,Ie):"variable"==e?M(Ie):E(Ie)}function Ie(e,t){return")"==e?M():";"==e?M(Ie):"in"==t||"of"==t?(S.marked="keyword",M(_,Ie)):E(_,Ie)}function Ne(e,t){return"*"==t?(S.marked="keyword",M(Ne)):"variable"==e?(O(t),M(Ne)):"("==e?M(N,F(")"),le(Fe,")"),z,pe,H,W):u&&"<"==t?M(F(">"),le(xe,">"),z,Ne):void 0}function De(e,t){return"*"==t?(S.marked="keyword",M(De)):"variable"==e?(O(t),M(De)):"("==e?M(N,F(")"),le(Fe,")"),z,pe,W):u&&"<"==t?M(F(">"),le(xe,">"),z,De):void 0}function We(e,t){return"keyword"==e||"variable"==e?(S.marked="type",M(We)):"<"==t?M(F(">"),le(xe,">"),z):void 0}function Fe(e,t){return"@"==t&&M(_,Fe),"spread"==e?M(Fe):u&&L(t)?(S.marked="keyword",M(Fe)):u&&"this"==e?M(ue,Oe):E(Ee,ue,Oe)}function ze(e,t){return"variable"==e?Re(e,t):He(e,t)}function Re(e,t){if("variable"==e)return O(t),M(He)}function He(e,t){return"<"==t?M(F(">"),le(xe,">"),z,He):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(S.marked="keyword"),M(u?he:_,He)):"{"==e?M(F("}"),Ue,z):void 0}function Ue(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&L(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",M(Ue)):"variable"==e||"keyword"==S.style?(S.marked="property",M(_e,Ue)):"number"==e||"string"==e?M(_e,Ue):"["==e?M(_,ue,R("]"),_e,Ue):"*"==t?(S.marked="keyword",M(Ue)):u&&"("==e?E(De,Ue):";"==e||","==e?M(Ue):"}"==e?M():"@"==t?M(_,Ue):void 0}function _e(e,t){if("!"==t)return M(_e);if("?"==t)return M(_e);if(":"==e)return M(he,Oe);if("="==t)return M(G);var r=S.state.lexical.prev;return E(r&&"interface"==r.info?De:Ne)}function Ge(e,t){return"*"==t?(S.marked="keyword",M(Xe,R(";"))):"default"==t?(S.marked="keyword",M(_,R(";"))):"{"==e?M(le(Ve,"}"),Xe,R(";")):E(H)}function Ve(e,t){return"as"==t?(S.marked="keyword",M(R("variable"))):"variable"==e?E(G,Ve):void 0}function qe(e){return"string"==e?M():"("==e?E(_):"."==e?E(Y):E($e,Ye,Xe)}function $e(e,t){return"{"==e?se($e,"}"):("variable"==e&&O(t),"*"==t&&(S.marked="keyword"),M(Ke))}function Ye(e){if(","==e)return M($e,Ye)}function Ke(e,t){if("as"==t)return S.marked="keyword",M($e)}function Xe(e,t){if("from"==t)return S.marked="keyword",M(_)}function Je(e){return"]"==e?M():E(le(G,"]"))}function Ze(){return E(F("form"),Ee,R("{"),F("}"),le(Qe,"}"),z,z)}function Qe(){return E(Ee,Oe)}function et(e,t,r){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return W.lex=!0,z.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new w((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new P(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=o&&"--"!=o?n:"incdec",k(t,r,n,o,e))},indent:function(t,n){if(t.tokenize==y||t.tokenize==v)return e.Pass;if(t.tokenize!=m)return 0;var o,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==z)s=s.prev;else if(u!=Le&&u!=W)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(o=t.cc[t.cc.length-1])&&(o==Y||o==K)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,p=l==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==l?s.indented:"form"==f?s.indented+i:"stat"==f?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?a||i:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:et,skipExpression:function(t){k(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(1448))},4364:function(e,t,r){var n=r(9208),o=r(8300);function i(){return(new Date).getTime()}var a,l=Array.prototype.slice,s={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(e){s[e]=i()},"time"],[function(e){var t=s[e];if(!t)throw new Error("No such label: "+e);delete s[e];var r=i()-t;a.log(e+": "+r+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),a.error(e.stack)},"trace"],[function(e){a.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=l.call(arguments,1);o.ok(!1,n.format.apply(null,t))}},"assert"]],u=0;u<c.length;u++){var f=c[u],p=f[0],d=f[1];a[d]||(a[d]=p)}e.exports=a},7734:function(e,t,r){"use strict";var n=r(2001),o=r.n(n),i=r(935),a=r.n(i)()(o());a.push([e.id,"/* BASICS */\n\n.CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  font-family: monospace;\n  height: 300px;\n  color: black;\n  direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n  padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n  padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n  padding: 0 3px 0 5px;\n  min-width: 20px;\n  text-align: right;\n  color: #999;\n  white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n  border-left: 1px solid black;\n  border-right: none;\n  width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n  width: auto;\n  border: 0 !important;\n  background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n.cm-fat-cursor-mark {\n  background-color: rgba(20, 255, 20, 0.5);\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n}\n.cm-animate-fat-cursor {\n  width: auto;\n  border: 0;\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n  background-color: #7e7;\n}\n@-moz-keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n@-webkit-keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n@keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n  position: absolute;\n  left: 0; right: 0; top: -50px; bottom: 0;\n  overflow: hidden;\n}\n.CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  top: 0; bottom: 0;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n  position: relative;\n  overflow: hidden;\n  background: white;\n}\n\n.CodeMirror-scroll {\n  overflow: scroll !important; /* Things will break if this is overridden */\n  /* 50px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -50px; margin-right: -50px;\n  padding-bottom: 50px;\n  height: 100%;\n  outline: none; /* Prevent dragging from highlighting the element */\n  position: relative;\n}\n.CodeMirror-sizer {\n  position: relative;\n  border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actual scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  position: absolute;\n  z-index: 6;\n  display: none;\n  outline: none;\n}\n.CodeMirror-vscrollbar {\n  right: 0; top: 0;\n  overflow-x: hidden;\n  overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n  bottom: 0; left: 0;\n  overflow-y: hidden;\n  overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n  right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n  left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n  position: absolute; left: 0; top: 0;\n  min-height: 100%;\n  z-index: 3;\n}\n.CodeMirror-gutter {\n  white-space: normal;\n  height: 100%;\n  display: inline-block;\n  vertical-align: top;\n  margin-bottom: -50px;\n}\n.CodeMirror-gutter-wrapper {\n  position: absolute;\n  z-index: 4;\n  background: none !important;\n  border: none !important;\n}\n.CodeMirror-gutter-background {\n  position: absolute;\n  top: 0; bottom: 0;\n  z-index: 4;\n}\n.CodeMirror-gutter-elt {\n  position: absolute;\n  cursor: default;\n  z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n  cursor: text;\n  min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n  /* Reset some styles that the rest of the page might have set */\n  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n  border-width: 0;\n  background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n  z-index: 2;\n  position: relative;\n  overflow: visible;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-font-variant-ligatures: contextual;\n  font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.CodeMirror-linebackground {\n  position: absolute;\n  left: 0; right: 0; top: 0; bottom: 0;\n  z-index: 0;\n}\n\n.CodeMirror-linewidget {\n  position: relative;\n  z-index: 2;\n  padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n  outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n  position: absolute;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n}\n\n.CodeMirror-cursor {\n  position: absolute;\n  pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n  visibility: hidden;\n  position: relative;\n  z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n  visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n  background-color: #ffa;\n  background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n  /* Hide the cursor when printing */\n  .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n","",{version:3,sources:["webpack://./../../node_modules/codemirror/lib/codemirror.css"],names:[],mappings:"AAAA,WAAW;;AAEX;EACE,gEAAgE;EAChE,sBAAsB;EACtB,aAAa;EACb,YAAY;EACZ,cAAc;AAChB;;AAEA,YAAY;;AAEZ;EACE,cAAc,EAAE,oCAAoC;AACtD;AACA;;EAEE,cAAc,EAAE,kCAAkC;AACpD;;AAEA;EACE,uBAAuB,EAAE,iDAAiD;AAC5E;;AAEA,WAAW;;AAEX;EACE,4BAA4B;EAC5B,yBAAyB;EACzB,mBAAmB;AACrB;AACA,yBAAyB;AACzB;EACE,oBAAoB;EACpB,eAAe;EACf,iBAAiB;EACjB,WAAW;EACX,mBAAmB;AACrB;;AAEA,2BAA2B,YAAY,EAAE;AACzC,kCAAkC,WAAW,EAAE;;AAE/C,WAAW;;AAEX;EACE,4BAA4B;EAC5B,kBAAkB;EAClB,QAAQ;AACV;AACA,6CAA6C;AAC7C;EACE,6BAA6B;AAC/B;AACA;EACE,WAAW;EACX,oBAAoB;EACpB,gBAAgB;AAClB;AACA;EACE,UAAU;AACZ;AACA;EACE,wCAAwC;EACxC,gDAAgD;EAChD,6CAA6C;EAC7C,wCAAwC;AAC1C;AACA;EACE,WAAW;EACX,SAAS;EACT,gDAAgD;EAChD,6CAA6C;EAC7C,wCAAwC;EACxC,sBAAsB;AACxB;AACA;EACE,IAAI;EACJ,MAAM,6BAA6B,EAAE;EACrC,MAAM;AACR;AACA;EACE,IAAI;EACJ,MAAM,6BAA6B,EAAE;EACrC,MAAM;AACR;AACA;EACE,IAAI;EACJ,MAAM,6BAA6B,EAAE;EACrC,MAAM;AACR;;AAEA,8DAA8D;AAC9D,0CAA0C;;AAE1C,UAAU,qBAAqB,EAAE,wBAAwB,EAAE;;AAE3D;EACE,kBAAkB;EAClB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS;EACxC,gBAAgB;AAClB;AACA;EACE,2BAA2B;EAC3B,MAAM,EAAE,SAAS;EACjB,kBAAkB;AACpB;;AAEA,kBAAkB;;AAElB,0BAA0B,WAAW,CAAC;AACtC,yBAAyB,WAAW,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,wBAAwB,iBAAiB,CAAC;AAC1C,QAAQ,kBAAkB,CAAC;AAC3B,UAAU,0BAA0B,CAAC;AACrC,mBAAmB,6BAA6B,CAAC;;AAEjD,2BAA2B,WAAW,CAAC;AACvC,wBAAwB,WAAW,CAAC;AACpC,0BAA0B,WAAW,CAAC;AACtC,uBAAuB,WAAW,CAAC;AACnC;;;4BAG4B;AAC5B,8BAA8B,WAAW,CAAC;AAC1C,sDAAsD,WAAW,CAAC;AAClE,2BAA2B,WAAW,CAAC;AACvC,0BAA0B,WAAW,CAAC;AACtC,4BAA4B,WAAW,CAAC;AACxC,wBAAwB,WAAW,CAAC;AACpC,6BAA6B,WAAW,CAAC;AACzC,2BAA2B,WAAW,CAAC;AACvC,2BAA2B,WAAW,CAAC;AACvC,uBAAuB,WAAW,CAAC;AACnC,6BAA6B,WAAW,CAAC;AACzC,sBAAsB,WAAW,CAAC;AAClC,wBAAwB,WAAW,CAAC;;AAEpC,yBAAyB,WAAW,CAAC;AACrC,iBAAiB,WAAW,CAAC;;AAE7B,wBAAwB,wBAAwB,EAAE;;AAElD,qCAAqC;;AAErC,gDAAgD,WAAW,CAAC;AAC5D,mDAAmD,WAAW,CAAC;AAC/D,0BAA0B,iCAAiC,EAAE;AAC7D,mCAAmC,mBAAmB,CAAC;;AAEvD,SAAS;;AAET;mDACmD;;AAEnD;EACE,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;AACnB;;AAEA;EACE,2BAA2B,EAAE,4CAA4C;EACzE,wEAAwE;EACxE,wCAAwC;EACxC,oBAAoB,EAAE,mBAAmB;EACzC,oBAAoB;EACpB,YAAY;EACZ,aAAa,EAAE,mDAAmD;EAClE,kBAAkB;AACpB;AACA;EACE,kBAAkB;EAClB,oCAAoC;AACtC;;AAEA;;0BAE0B;AAC1B;EACE,kBAAkB;EAClB,UAAU;EACV,aAAa;EACb,aAAa;AACf;AACA;EACE,QAAQ,EAAE,MAAM;EAChB,kBAAkB;EAClB,kBAAkB;AACpB;AACA;EACE,SAAS,EAAE,OAAO;EAClB,kBAAkB;EAClB,kBAAkB;AACpB;AACA;EACE,QAAQ,EAAE,SAAS;AACrB;AACA;EACE,OAAO,EAAE,SAAS;AACpB;;AAEA;EACE,kBAAkB,EAAE,OAAO,EAAE,MAAM;EACnC,gBAAgB;EAChB,UAAU;AACZ;AACA;EACE,mBAAmB;EACnB,YAAY;EACZ,qBAAqB;EACrB,mBAAmB;EACnB,oBAAoB;AACtB;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,2BAA2B;EAC3B,uBAAuB;AACzB;AACA;EACE,kBAAkB;EAClB,MAAM,EAAE,SAAS;EACjB,UAAU;AACZ;AACA;EACE,kBAAkB;EAClB,eAAe;EACf,UAAU;AACZ;AACA,yCAAyC,8BAA8B;AACvE,8CAA8C,8BAA8B;;AAE5E;EACE,YAAY;EACZ,eAAe,EAAE,0CAA0C;AAC7D;AACA;;EAEE,+DAA+D;EAC/D,qBAAqB,EAAE,wBAAwB,EAAE,gBAAgB;EACjE,eAAe;EACf,uBAAuB;EACvB,oBAAoB;EACpB,kBAAkB;EAClB,SAAS;EACT,gBAAgB;EAChB,iBAAiB;EACjB,oBAAoB;EACpB,cAAc;EACd,UAAU;EACV,kBAAkB;EAClB,iBAAiB;EACjB,wCAAwC;EACxC,0CAA0C;EAC1C,kCAAkC;AACpC;AACA;;EAEE,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS;EACpC,UAAU;AACZ;;AAEA;EACE,kBAAkB;EAClB,UAAU;EACV,cAAc,EAAE,yDAAyD;AAC3E;;AAEA,oBAAoB;;AAEpB,sBAAsB,cAAc,EAAE;;AAEtC;EACE,aAAa;AACf;;AAEA,iEAAiE;AACjE;;;;;EAKE,4BAA4B;EAC5B,uBAAuB;AACzB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,oBAAoB;AACtB;AACA,0BAA0B,gBAAgB,EAAE;;AAE5C;EACE,kBAAkB;EAClB,kBAAkB;EAClB,UAAU;AACZ;AACA;EACE,mBAAmB;AACrB;;AAEA;EACE,mBAAmB;AACrB;;AAEA,uBAAuB,mBAAmB,EAAE;AAC5C,2CAA2C,mBAAmB,EAAE;AAChE,wBAAwB,iBAAiB,EAAE;AAC3C,6GAA6G,mBAAmB,EAAE;AAClI,4HAA4H,mBAAmB,EAAE;;AAEjJ;EACE,sBAAsB;EACtB,uCAAuC;AACzC;;AAEA,4CAA4C;AAC5C,mBAAmB,mBAAmB,EAAE;;AAExC;EACE,kCAAkC;EAClC;IACE,kBAAkB;EACpB;AACF;;AAEA,oBAAoB;AACpB,0BAA0B,WAAW,EAAE;;AAEvC,iEAAiE;AACjE,+BAA+B,gBAAgB,EAAE",sourcesContent:["/* BASICS */\n\n.CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  font-family: monospace;\n  height: 300px;\n  color: black;\n  direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n  padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n  padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n  padding: 0 3px 0 5px;\n  min-width: 20px;\n  text-align: right;\n  color: #999;\n  white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n  border-left: 1px solid black;\n  border-right: none;\n  width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n  width: auto;\n  border: 0 !important;\n  background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n.cm-fat-cursor-mark {\n  background-color: rgba(20, 255, 20, 0.5);\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n}\n.cm-animate-fat-cursor {\n  width: auto;\n  border: 0;\n  -webkit-animation: blink 1.06s steps(1) infinite;\n  -moz-animation: blink 1.06s steps(1) infinite;\n  animation: blink 1.06s steps(1) infinite;\n  background-color: #7e7;\n}\n@-moz-keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n@-webkit-keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n@keyframes blink {\n  0% {}\n  50% { background-color: transparent; }\n  100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n  position: absolute;\n  left: 0; right: 0; top: -50px; bottom: 0;\n  overflow: hidden;\n}\n.CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  top: 0; bottom: 0;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n  position: relative;\n  overflow: hidden;\n  background: white;\n}\n\n.CodeMirror-scroll {\n  overflow: scroll !important; /* Things will break if this is overridden */\n  /* 50px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -50px; margin-right: -50px;\n  padding-bottom: 50px;\n  height: 100%;\n  outline: none; /* Prevent dragging from highlighting the element */\n  position: relative;\n}\n.CodeMirror-sizer {\n  position: relative;\n  border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actual scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  position: absolute;\n  z-index: 6;\n  display: none;\n  outline: none;\n}\n.CodeMirror-vscrollbar {\n  right: 0; top: 0;\n  overflow-x: hidden;\n  overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n  bottom: 0; left: 0;\n  overflow-y: hidden;\n  overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n  right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n  left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n  position: absolute; left: 0; top: 0;\n  min-height: 100%;\n  z-index: 3;\n}\n.CodeMirror-gutter {\n  white-space: normal;\n  height: 100%;\n  display: inline-block;\n  vertical-align: top;\n  margin-bottom: -50px;\n}\n.CodeMirror-gutter-wrapper {\n  position: absolute;\n  z-index: 4;\n  background: none !important;\n  border: none !important;\n}\n.CodeMirror-gutter-background {\n  position: absolute;\n  top: 0; bottom: 0;\n  z-index: 4;\n}\n.CodeMirror-gutter-elt {\n  position: absolute;\n  cursor: default;\n  z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n  cursor: text;\n  min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n  /* Reset some styles that the rest of the page might have set */\n  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n  border-width: 0;\n  background: transparent;\n  font-family: inherit;\n  font-size: inherit;\n  margin: 0;\n  white-space: pre;\n  word-wrap: normal;\n  line-height: inherit;\n  color: inherit;\n  z-index: 2;\n  position: relative;\n  overflow: visible;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-font-variant-ligatures: contextual;\n  font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.CodeMirror-linebackground {\n  position: absolute;\n  left: 0; right: 0; top: 0; bottom: 0;\n  z-index: 0;\n}\n\n.CodeMirror-linewidget {\n  position: relative;\n  z-index: 2;\n  padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n  outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n  position: absolute;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n}\n\n.CodeMirror-cursor {\n  position: absolute;\n  pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n  visibility: hidden;\n  position: relative;\n  z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n  visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n  background-color: #ffa;\n  background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n  /* Hide the cursor when printing */\n  .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n"],sourceRoot:""}]),t.A=a},4246:function(e,t,r){"use strict";var n=r(2001),o=r.n(n),i=r(935),a=r.n(i)()(o());a.push([e.id,'@charset "UTF-8";\n.CodeMirror.cm-s-default {\n    border-bottom: #000 solid 1px;\n}\n\n.CodeMirror {\n    font-size: 16px;\n}\n\n.mirror-console-command {\n    margin-left: 15px;\n}\n\n.mirror-console-wrapper {\n    background-color: #f7f7f7;\n    outline: #000 solid 1px;\n}\n\n.mirror-console-button {\n    display: inline-block;\n    margin: 0.75em 0.25em;\n    font-size: 0.9em;\n    border: 0 none;\n    border-radius: 3px;\n    padding: 0.25em 1em;\n    color: white;\n}\n\n.mirror-console-button.mirror-console-run {\n    background-color: #5cb85c;\n}\n\n.mirror-console-button.mirror-console-clear {\n    background-color: #999999;\n}\n\n.mirror-console-button.mirror-console-exit {\n    background-color: red;\n}\n\n/* console */\n.mirror-console-log-row {\n    border-left: solid 10px #999;\n    line-height: 1.5;\n    white-space: pre;\n}\n\n.mirror-console-log-normal::before {\n    content: "▶";\n    color: #ddd;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-error::before {\n    content: "✘";\n    color: #dd6964;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-info::before {\n    content: "▶";\n    color: #8ee386;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-warn::before {\n    content: "⚠";\n    color: #ffd080;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-return::before {\n    content: "◀";\n    color: #ddd;\n    margin-right: 0.5em;\n}\n',"",{version:3,sources:["webpack://./components/mirror-console-compoenent.css"],names:[],mappings:"AAAA,gBAAgB;AAChB;IACI,6BAA6B;AACjC;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,iBAAiB;AACrB;;AAEA;IACI,yBAAyB;IACzB,uBAAuB;AAC3B;;AAEA;IACI,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,mBAAmB;IACnB,YAAY;AAChB;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,qBAAqB;AACzB;;AAEA,YAAY;AACZ;IACI,4BAA4B;IAC5B,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,cAAc;IACd,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,cAAc;IACd,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,cAAc;IACd,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,mBAAmB;AACvB",sourcesContent:['@charset "UTF-8";\n.CodeMirror.cm-s-default {\n    border-bottom: #000 solid 1px;\n}\n\n.CodeMirror {\n    font-size: 16px;\n}\n\n.mirror-console-command {\n    margin-left: 15px;\n}\n\n.mirror-console-wrapper {\n    background-color: #f7f7f7;\n    outline: #000 solid 1px;\n}\n\n.mirror-console-button {\n    display: inline-block;\n    margin: 0.75em 0.25em;\n    font-size: 0.9em;\n    border: 0 none;\n    border-radius: 3px;\n    padding: 0.25em 1em;\n    color: white;\n}\n\n.mirror-console-button.mirror-console-run {\n    background-color: #5cb85c;\n}\n\n.mirror-console-button.mirror-console-clear {\n    background-color: #999999;\n}\n\n.mirror-console-button.mirror-console-exit {\n    background-color: red;\n}\n\n/* console */\n.mirror-console-log-row {\n    border-left: solid 10px #999;\n    line-height: 1.5;\n    white-space: pre;\n}\n\n.mirror-console-log-normal::before {\n    content: "▶";\n    color: #ddd;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-error::before {\n    content: "✘";\n    color: #dd6964;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-info::before {\n    content: "▶";\n    color: #8ee386;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-warn::before {\n    content: "⚠";\n    color: #ffd080;\n    margin-right: 0.5em;\n}\n\n.mirror-console-log-return::before {\n    content: "◀";\n    color: #ddd;\n    margin-right: 0.5em;\n}\n'],sourceRoot:""}]),t.A=a},935:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(a[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);n&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},2001:function(e){"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(o," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},686:function(e,t,r){"use strict";var n=r(4940),o=r(5731),i=r(3468),a=r(9336);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===l&&f?f.enumerable:!l,value:r,writable:null===s&&f?f.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},7556:function(e){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var r=/<([\w:]+)/.exec(e);if(!r)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var o=r[1];if("body"==o)return(i=t.createElement("html")).innerHTML=e,i.removeChild(i.lastChild);var i,a=Object.prototype.hasOwnProperty.call(n,o)?n[o]:n._default,l=a[0],s=a[1],c=a[2];for((i=t.createElement("div")).innerHTML=s+e+c;l--;)i=i.lastChild;if(i.firstChild==i.lastChild)return i.removeChild(i.firstChild);for(var u=t.createDocumentFragment();i.firstChild;)u.appendChild(i.removeChild(i.firstChild));return u};var t,r=!1;"undefined"!=typeof document&&((t=document.createElement("div")).innerHTML='  <link/><table></table><a href="/a">a</a><input type="checkbox"/>',r=!t.getElementsByTagName("link").length,t=void 0);var n={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:r?[1,"X<div>","</div>"]:[0,"",""]};n.td=n.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],n.option=n.optgroup=[1,'<select multiple="multiple">',"</select>"],n.thead=n.tbody=n.colgroup=n.caption=n.tfoot=[1,"<table>","</table>"],n.polyline=n.ellipse=n.polygon=n.circle=n.text=n.line=n.path=n.rect=n.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"]},4940:function(e,t,r){"use strict";var n=r(528)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},9110:function(e){"use strict";e.exports=EvalError},9838:function(e){"use strict";e.exports=Error},1155:function(e){"use strict";e.exports=RangeError},4943:function(e){"use strict";e.exports=ReferenceError},5731:function(e){"use strict";e.exports=SyntaxError},3468:function(e){"use strict";e.exports=TypeError},2140:function(e){"use strict";e.exports=URIError},705:function(e,t,r){"use strict";var n=r(9617),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},8794:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=1,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments),l=r(0,o.length-a.length),s=[],c=0;c<l;c++)s[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=",");return r}(s)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i}},9138:function(e,t,r){"use strict";var n=r(8794);e.exports=Function.prototype.bind||n},528:function(e,t,r){"use strict";var n,o=r(9838),i=r(9110),a=r(1155),l=r(4943),s=r(5731),c=r(3468),u=r(2140),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch(e){d=null}var h=function(){throw new c},g=d?function(){try{return h}catch(e){try{return d(arguments,"callee").get}catch(e){return h}}}():h,m=r(3558)(),y=r(6869)(),v=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),A={},b="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,C={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":s,"%ThrowTypeError%":g,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var w=v(v(e));C["%Error.prototype%"]=w}var x=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return C[t]=r,r},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=r(9138),E=r(8554),M=S.call(Function.call,Array.prototype.concat),B=S.call(Function.apply,Array.prototype.splice),O=S.call(Function.call,String.prototype.replace),T=S.call(Function.call,String.prototype.slice),L=S.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,I=function(e,t){var r,n=e;if(E(k,n)&&(n="%"+(r=k[n])[0]+"%"),E(C,n)){var o=C[n];if(o===A&&(o=x(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,P,(function(e,t,r,o){n[n.length]=r?O(o,j,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=I("%"+n+"%",t),i=o.name,a=o.value,l=!1,u=o.alias;u&&(n=u[0],B(r,M([0,1],u)));for(var f=1,p=!0;f<r.length;f+=1){var h=r[f],g=T(h,0,1),m=T(h,-1);if(('"'===g||"'"===g||"`"===g||'"'===m||"'"===m||"`"===m)&&g!==m)throw new s("property names with quotes must have matching quotes");if("constructor"!==h&&p||(l=!0),E(C,i="%"+(n+="."+h)+"%"))a=C[i];else if(null!=a){if(!(h in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(d&&f+1>=r.length){var y=d(a,h);a=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[h]}else p=E(a,h),a=a[h];p&&!l&&(C[i]=a)}}return a}},9336:function(e,t,r){"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},7239:function(e,t,r){"use strict";var n=r(4940),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},6869:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},3558:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(2908);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},2908:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1913:function(e,t,r){"use strict";var n=r(2908);e.exports=function(){return n()&&!!Symbol.toStringTag}},7762:function(e){"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),l=[],s=0;s<a;s++)l.push("$"+s);if(o=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,i.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,i.concat(t.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o}},6890:function(e,t,r){"use strict";var n=r(7762);e.exports=Function.prototype.bind||n},2571:function(e,t,r){"use strict";var n=r(6890);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},8554:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(9138);e.exports=i.call(n,o)},9365:function(e){"use strict";var t=function(){var e,t,r=window.navigator||window.clientInformation||{},n=[].concat(r.languages,r.language,r.userLanguage,r.browserLanguage,r.systemLanguage),o=[];for(t=0;t<n.length;t++)(e=n[t])&&(e=e.replace(/-.*/,"").toLowerCase())&&-1===o.indexOf(e)&&o.push(e);return o};e.exports={first:function(){var e=t();return e.length?e[0]:null},list:t,pick:function(e,r){var n,o=t(),i=null;for(r=r||null,n=0;n<o.length&&null===i;n++)-1!==e.indexOf(o[n])&&(i=o[n]);return null===i&&(i=r),i}}},5615:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},5387:function(e,t,r){"use strict";var n=r(1913)(),o=r(9818)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},l=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=l?i:a},9617:function(e){"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},l=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;s.call(p)===s.call(document.all)&&(f=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&l(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return l(e);if(a(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}},2625:function(e,t,r){"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,l=r(1913)(),s=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!l)return"[object GeneratorFunction]"===o.call(e);if(!s)return!1;if(void 0===n){var t=function(){if(!l)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&s(t)}return s(e)===n}},5943:function(e,t,r){"use strict";var n=r(2730);e.exports=function(e){return!!n(e)}},8089:function(e,t,r){e=r.nmd(e);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object AsyncFunction]",l="[object Function]",s="[object GeneratorFunction]",c="[object Null]",u="[object Object]",f="[object Proxy]",p="[object Undefined]",d=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[i]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[l]=g["[object Map]"]=g["[object Number]"]=g[u]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var m,y,v,A="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,b="object"==typeof self&&self&&self.Object===Object&&self,C=A||b||Function("return this")(),w=t&&!t.nodeType&&t,x=w&&e&&!e.nodeType&&e,k=x&&x.exports===w,S=k&&A.process,E=function(){try{return x&&x.require&&x.require("util").types||S&&S.binding&&S.binding("util")}catch(e){}}(),M=E&&E.isTypedArray,B=Array.prototype,O=Function.prototype,T=Object.prototype,L=C["__core-js_shared__"],P=O.toString,j=T.hasOwnProperty,I=(m=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",N=T.toString,D=P.call(Object),W=RegExp("^"+P.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=k?C.Buffer:void 0,z=C.Symbol,R=C.Uint8Array,H=(F&&F.allocUnsafe,y=Object.getPrototypeOf,v=Object,function(e){return y(v(e))}),U=Object.create,_=T.propertyIsEnumerable,G=B.splice,V=z?z.toStringTag:void 0,q=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),$=F?F.isBuffer:void 0,Y=Math.max,K=Date.now,X=pe(C,"Map"),J=pe(Object,"create"),Z=function(){function e(){}return function(t){if(!ke(t))return{};if(U)return U(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!ye(e[t],r)||void 0===r&&!(t in e))&&ae(e,t,r)}function oe(e,t,r){var n=e[t];j.call(e,t)&&ye(n,r)&&(void 0!==r||t in e)||ae(e,t,r)}function ie(e,t){for(var r=e.length;r--;)if(ye(e[r][0],t))return r;return-1}function ae(e,t,r){"__proto__"==t&&q?q(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=J?J(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(J){var r=t[e];return r===n?void 0:r}return j.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return J?void 0!==t[e]:j.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=J&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=ie(t,e);return!(r<0||(r==t.length-1?t.pop():G.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=ie(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return ie(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=ie(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(X||ee),string:new Q}},te.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return fe(this,e).get(e)},te.prototype.has=function(e){return fe(this,e).has(e)},te.prototype.set=function(e,t){var r=fe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!X||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function le(e){return null==e?void 0===e?p:c:V&&V in Object(e)?function(e){var t=j.call(e,V),r=e[V];try{e[V]=void 0;var n=!0}catch(e){}var o=N.call(e);return n&&(t?e[V]=r:delete e[V]),o}(e):function(e){return N.call(e)}(e)}function se(e){return Se(e)&&le(e)==i}function ce(e,t,r,n,o){e!==t&&function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var l=i[++n];if(!1===t(o[l],l,o))break}}(t,(function(i,a){if(o||(o=new re),ke(i))!function(e,t,r,n,o,i,a){var l=ge(e,r),s=ge(t,r),c=a.get(s);if(c)ne(e,r,c);else{var f,p,d,h,g,m=i?i(l,s,r+"",e,t,a):void 0,y=void 0===m;if(y){var v=Ae(s),A=!v&&Ce(s),b=!v&&!A&&Ee(s);m=s,v||A||b?Ae(l)?m=l:Se(g=l)&&be(g)?m=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(l):A?(y=!1,m=function(e,t){return e.slice()}(s)):b?(y=!1,h=new(d=(f=s).buffer).constructor(d.byteLength),new R(h).set(new R(d)),p=h,m=new f.constructor(p,f.byteOffset,f.length)):m=[]:function(e){if(!Se(e)||le(e)!=u)return!1;var t=H(e);if(null===t)return!0;var r=j.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&P.call(r)==D}(s)||ve(s)?(m=l,ve(l)?m=function(e){return function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var l=t[i],s=void 0;void 0===s&&(s=e[l]),o?ae(r,l,s):oe(r,l,s)}return r}(e,Me(e))}(l):ke(l)&&!we(l)||(m=function(e){return"function"!=typeof e.constructor||he(e)?{}:Z(H(e))}(s))):y=!1}y&&(a.set(s,m),o(m,s,n,i,a),a.delete(s)),ne(e,r,m)}}(e,t,a,r,ce,n,o);else{var l=n?n(ge(e,a),i,a+"",e,t,o):void 0;void 0===l&&(l=i),ne(e,a,l)}}),Me)}var ue=q?function(e,t){return q(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Te;function fe(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function pe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ke(e)||function(e){return!!I&&I in e}(e))&&(we(e)?W:d).test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function de(e,t){var r=typeof e;return!!(t=null==t?o:t)&&("number"==r||"symbol"!=r&&h.test(e))&&e>-1&&e%1==0&&e<t}function he(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}function ge(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var me=function(e){var t=0,r=0;return function(){var n=K(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ue);function ye(e,t){return e===t||e!=e&&t!=t}var ve=se(function(){return arguments}())?se:function(e){return Se(e)&&j.call(e,"callee")&&!_.call(e,"callee")},Ae=Array.isArray;function be(e){return null!=e&&xe(e.length)&&!we(e)}var Ce=$||function(){return!1};function we(e){if(!ke(e))return!1;var t=le(e);return t==l||t==s||t==a||t==f}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Se(e){return null!=e&&"object"==typeof e}var Ee=M?function(e){return function(t){return e(t)}}(M):function(e){return Se(e)&&xe(e.length)&&!!g[le(e)]};function Me(e){return be(e)?function(e,t){var r=Ae(e),n=!r&&ve(e),o=!r&&!n&&Ce(e),i=!r&&!n&&!o&&Ee(e),a=r||n||o||i,l=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=l.length;for(var c in e)!t&&!j.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||de(c,s))||l.push(c);return l}(e,!0):function(e){if(!ke(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=he(e),r=[];for(var n in e)("constructor"!=n||!t&&j.call(e,n))&&r.push(n);return r}(e)}var Be,Oe=(Be=function(e,t,r){ce(e,t,r)},function(e,t){return me(function(e,t,r){return t=Y(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Y(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=n[o];return l[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,l)}}(e,t,Te),e+"")}((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=Be.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!ke(r))return!1;var n=typeof t;return!!("number"==n?be(r)&&de(t,r.length):"string"==n&&t in r)&&ye(r[t],e)}(t[0],t[1],i)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var a=t[r];a&&Be(e,a,r)}return e})));function Te(e){return e}e.exports=Oe},1513:function(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in i=Object(arguments[s]))r.call(i,c)&&(l[c]=i[c]);if(t){a=t(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(l[a[u]]=i[a[u]])}}return l}},9501:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},9907:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,s=[],c=!1,u=-1;function f(){c&&l&&(c=!1,l.length?s=l.concat(s):u=-1,s.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=s.length;t;){for(l=s,s=[];++u<t;)l&&l[u].run();u=-1,t=s.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new d(e,t)),1!==s.length||c||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},6051:function(e){e.exports='<div>\n    <div class="mirror-console-command">\n        <button class="mirror-console-button mirror-console-run">{run_console}</button>\n        <button class="mirror-console-button mirror-console-clear">{clear_console}</button>\n        <button class="mirror-console-button mirror-console-exit">{exit_console}</button>\n    </div>\n    <div class="mirror-console-log">\n    </div>\n</div>'},1946:function(e){e.exports='<div>\n    <button class="mirror-console-button mirror-console-run">{run_console}</button>\n</div>'},6108:function(e,t,r){"use strict";var n=r(528),o=r(686),i=r(7239)(),a=r(9336),l=r(3468),s=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new l("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6588:function(e,t,r){"use strict";r.r(t);var n=r(2591),o=r.n(n),i=r(1740),a=r.n(i),l=r(8128),s=r.n(l),c=r(855),u=r.n(c),f=r(3051),p=r.n(f),d=r(3656),h=r.n(d),g=r(7734),m={};m.styleTagTransform=h(),m.setAttributes=u(),m.insert=s().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(g.A,m),t.default=g.A&&g.A.locals?g.A.locals:void 0},8444:function(e,t,r){"use strict";r.r(t);var n=r(2591),o=r.n(n),i=r(1740),a=r.n(i),l=r(8128),s=r.n(l),c=r(855),u=r.n(c),f=r(3051),p=r.n(f),d=r(3656),h=r.n(d),g=r(4246),m={};m.styleTagTransform=h(),m.setAttributes=u(),m.insert=s().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(g.A,m),t.default=g.A&&g.A.locals?g.A.locals:void 0},2591:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var i={},a=[],l=0;l<e.length;l++){var s=e[l],c=n.base?s[0]+n.base:s[0],u=i[c]||0,f="".concat(c," ").concat(u);i[c]=u+1;var p=r(f),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var h=o(d,n);n.byIndex=l,t.splice(l,0,{identifier:f,updater:h,references:1})}a.push(f)}return a}function o(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var i=n(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var l=r(i[a]);t[l].references--}for(var s=n(e,o),c=0;c<i.length;c++){var u=r(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=s}}},8128:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},3051:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},1740:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},3656:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5272:function(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},1531:function(e,t,r){"use strict";var n=r(5387),o=r(2625),i=r(2730),a=r(5943);function l(e){return e.call.bind(e)}var s="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=l(Object.prototype.toString),f=l(Number.prototype.valueOf),p=l(String.prototype.valueOf),d=l(Boolean.prototype.valueOf);if(s)var h=l(BigInt.prototype.valueOf);if(c)var g=l(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===u(e)}function v(e){return"[object Set]"===u(e)}function A(e){return"[object WeakMap]"===u(e)}function b(e){return"[object WeakSet]"===u(e)}function C(e){return"[object ArrayBuffer]"===u(e)}function w(e){return"undefined"!=typeof ArrayBuffer&&(C.working?C(e):e instanceof ArrayBuffer)}function x(e){return"[object DataView]"===u(e)}function k(e){return"undefined"!=typeof DataView&&(x.working?x(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||k(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},A.working="undefined"!=typeof WeakMap&&A(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(A.working?A(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),t.isWeakSet=function(e){return b(e)},C.working="undefined"!=typeof ArrayBuffer&&C(new ArrayBuffer),t.isArrayBuffer=w,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=k;var S="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function E(e){return"[object SharedArrayBuffer]"===u(e)}function M(e){return void 0!==S&&(void 0===E.working&&(E.working=E(new S)),E.working?E(e):e instanceof S)}function B(e){return m(e,f)}function O(e){return m(e,p)}function T(e){return m(e,d)}function L(e){return s&&m(e,h)}function P(e){return c&&m(e,g)}t.isSharedArrayBuffer=M,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},t.isGeneratorObject=function(e){return"[object Generator]"===u(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},t.isNumberObject=B,t.isStringObject=O,t.isBooleanObject=T,t.isBigIntObject=L,t.isSymbolObject=P,t.isBoxedPrimitive=function(e){return B(e)||O(e)||T(e)||L(e)||P(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(w(e)||M(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},9208:function(e,t,r){var n=r(9907),o=r(4364),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},a=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(a,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r<o;l=n[++r])v(l)||!x(l)?i+=" "+l:i+=" "+u(l);return i},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return e.apply(this,arguments)}};var l={},s=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+c+"$","i")}function u(e,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),C(n.showHidden)&&(n.showHidden=!1),C(n.depth)&&(n.depth=2),C(n.colors)&&(n.colors=!1),C(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),d(n,e,n.depth)}function f(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function p(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return b(o)||(o=d(e,o,n)),o}var i=function(e,t){if(C(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return A(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var a=Object.keys(r),l=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(E(r)){var s=r.name?": "+r.name:"";return e.stylize("[Function"+s+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return h(r)}var c,u="",f=!1,p=["{","}"];return m(r)&&(f=!0,p=["[","]"]),E(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(u=" "+RegExp.prototype.toString.call(r)),k(r)&&(u=" "+Date.prototype.toUTCString.call(r)),S(r)&&(u=" "+h(r)),0!==a.length||f&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],a=0,l=t.length;a<l;++a)T(t,String(a))?i.push(g(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(g(e,t,r,n,o,!0))})),i}(e,r,n,l,a):a.map((function(t){return g(e,r,n,l,t,f)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,u,p)):p[0]+u+p[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function g(e,t,r,n,o,i){var a,l,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?l=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(l=e.stylize("[Setter]","special")),T(n,o)||(a="["+o+"]"),l||(e.seen.indexOf(s.value)<0?(l=v(r)?d(e,s.value,null):d(e,s.value,r-1)).indexOf("\n")>-1&&(l=i?l.split("\n").map((function(e){return"  "+e})).join("\n").slice(2):"\n"+l.split("\n").map((function(e){return"   "+e})).join("\n")):l=e.stylize("[Circular]","special")),C(a)){if(i&&o.match(/^\d+$/))return l;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+l}function m(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function v(e){return null===e}function A(e){return"number"==typeof e}function b(e){return"string"==typeof e}function C(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===M(e)}function x(e){return"object"==typeof e&&null!==e}function k(e){return x(e)&&"[object Date]"===M(e)}function S(e){return x(e)&&("[object Error]"===M(e)||e instanceof Error)}function E(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function B(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!l[e])if(s.test(e)){var r=n.pid;l[e]=function(){var n=t.format.apply(t,arguments);o.error("%s %d: %s",e,r,n)}}else l[e]=function(){};return l[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(1531),t.isArray=m,t.isBoolean=y,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=A,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=C,t.isRegExp=w,t.types.isRegExp=w,t.isObject=x,t.isDate=k,t.types.isDate=k,t.isError=S,t.types.isNativeError=S,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(5272);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(r=[B((e=new Date).getHours()),B(e.getMinutes()),B(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(5615),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t;if("function"!=typeof(t=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),L&&Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=L,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(P.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},2730:function(e,t,r){"use strict";var n=r(705),o=r(4834),i=r(6754),a=r(7354),l=r(9336),s=a("Object.prototype.toString"),c=r(1913)(),u="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),d=Object.getPrototypeOf,h=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},g={__proto__:null};n(f,c&&l&&d?function(e){var t=new u[e];if(Symbol.toStringTag in t){var r=d(t),n=l(r,Symbol.toStringTag);if(!n){var o=d(r);n=l(o,Symbol.toStringTag)}g["$"+e]=i(n.get)}}:function(e){var t=new u[e],r=t.slice||t.set;r&&(g["$"+e]=i(r))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=p(s(e),8,-1);return h(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(g,(function(r,n){if(!t)try{r(e),t=p(n,1)}catch(e){}})),t}(e)}return l?function(e){var t=!1;return n(g,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=p(n,1))}catch(e){}})),t}(e):null}},7354:function(e,t,r){"use strict";var n=r(528),o=r(6754),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},6754:function(e,t,r){"use strict";var n=r(9138),o=r(528),i=r(6108),a=r(3468),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(s,l),u=r(4940),f=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,s,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,l,arguments)};u?u(e.exports,"apply",{value:p}):e.exports.apply=p},4834:function(e,t,r){"use strict";var n=r(9501),o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.nc=void 0;var n={};return function(){"use strict";r.r(n),r.d(n,{attachToElement:function(){return p},setUserContext:function(){return d}});var e=r(4364),t=r(1088),o=r(8089),i=r(9208),a=r(9365).pick(["en","ja","es"],"en"),l=r(3432),s=r(7546),c=r(7728);r(8444),r(6588);var u={},f={state:"closed",scrollIntoView:!0};function p(n,d,h={}){var g=h.state||f.state,m=void 0!==h.scrollIntoView?h.scrollIntoView:f.scrollIntoView,y=n.parentNode,v=r(1946),A=c(v,l(s,a));function b(){var f=function(n,f,d={}){var h=new t,g=h.editor,m={"Cmd-Enter":function(){w()},"Ctrl-Enter":function(){w()}};g.setOption("lineNumbers",!0),g.setOption("extraKeys",m),h.setText(f||""),h.textareaHolder.className="mirror-console-wrapper";var y=r(6051),v=c(y,l(s,a)),A=v.querySelector(".mirror-console-log");function b(e,t){var r=document.createElement("div");r.className=t;var n=e.map((function(e){return"[object Object]"===String(e)||Array.isArray(e)?i.inspect(e):e&&e.cause?String(e)+" (Caused by: "+String(e.cause)+")":String(e)}));r.appendChild(document.createTextNode(n.join(", "))),A.appendChild(r)}var C={log:function(){b(Array.prototype.slice.call(arguments),"mirror-console-log-row mirror-console-log-normal"),e.log.apply(e,arguments)},info:function(){b(Array.prototype.slice.call(arguments),"mirror-console-log-row mirror-console-log-info"),e.info.apply(e,arguments)},warn:function(){b(Array.prototype.slice.call(arguments),"mirror-console-log-row mirror-console-log-warn"),e.warn.apply(e,arguments)},error:function(){b(Array.prototype.slice.call(arguments),"mirror-console-log-row mirror-console-log-error"),e.error.apply(e,arguments)}},w=async function(){var e=o({console:C},u);try{const t=await h.runInContext(e,d);void 0!==t&&b([t],"mirror-console-log-row mirror-console-log-return")}catch(e){C.error(e)}};return h.swapWithElement(n),h.textareaHolder.appendChild(v),w(),v.querySelector(".mirror-console-run").addEventListener("click",(function(){w()})),v.querySelector(".mirror-console-clear").addEventListener("click",(function(){var e=document.createRange();e.selectNodeContents(v.querySelector(".mirror-console-log")),e.deleteContents()})),v.querySelector(".mirror-console-exit").addEventListener("click",(function(){h.destroy(),p(n,f,d)})),h}(n,d,{type:h.type});m&&f.textareaHolder.scrollIntoView(!0),y.removeChild(A)}A.className="mirror-console-attach-button-wrapper",A.querySelector(".mirror-console-run").addEventListener("click",b),null===n.nextSibling?y.appendChild(A):y.insertBefore(A,n.nextSibling),"open"===g&&b()}function d(e){u=e}}(),n}()}));
//# sourceMappingURL=mirror-console-component.js.map