uawdijnntqw1x1x1
IP : 216.73.216.119
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
ether
/
seo
/
src
/
web
/
assets
/
js
/
SeoSettings.min.js
/
/
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/assets/js/",n(n.s="./js/SeoSettings.js")}({"../../../../../usr/local/lib/node_modules/build/node_modules/@babel/runtime/helpers/defineProperty.js":function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/a-possible-prototype.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-object.js");e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/add-to-unscopables.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-create.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-property.js"),l=r("unscopables"),s=Array.prototype;null==s[l]&&o.f(s,l,{configurable:!0,value:i(null)}),e.exports=function(e){s[l][e]=!0}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/advance-string-index.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/string-multibyte.js").charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-object.js");e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/array-includes.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-indexed-object.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-length.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-absolute-index.js"),l=function(e){return function(t,n,l){var s,a=r(t),u=i(a.length),c=o(l,u);if(e&&n!=n){for(;u>c;)if((s=a[c++])!=s)return!0}else for(;u>c;c++)if((e||c in a)&&a[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:l(!0),indexOf:l(!1)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/classof-raw.js":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/own-keys.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t){for(var n=i(t),s=l.f,a=o.f,u=0;u<n.length;u++){var c=n[u];r(e,c)||s(e,c,a(t,c))}}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/correct-prototype-getter.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js");e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-iterator-constructor.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators-core.js").IteratorPrototype,i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-create.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-property-descriptor.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-to-string-tag.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators.js"),a=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),l(e,u,!1,!0),s[u]=a,e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/descriptors.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-property.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-property-descriptor.js");e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-property-descriptor.js":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/define-iterator.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/export.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-iterator-constructor.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-prototype-of.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-set-prototype-of.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-to-string-tag.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/redefine.js"),c=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js"),d=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-pure.js"),f=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators.js"),h=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators-core.js"),p=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v=function(){return this};e.exports=function(e,t,n,c,h,b,y){i(n,t,c);var x,w,j,C=function(e){if(e===h&&T)return T;if(!m&&e in k)return k[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},S=t+" Iterator",_=!1,k=e.prototype,L=k[g]||k["@@iterator"]||h&&k[h],T=!m&&L||C(h),M="Array"==t&&k.entries||L;if(M&&(x=o(M.call(new e)),p!==Object.prototype&&x.next&&(d||o(x)===p||(l?l(x,p):"function"!=typeof x[g]&&a(x,g,v)),s(x,S,!0,!0),d&&(f[S]=v))),"values"==h&&L&&"values"!==L.name&&(_=!0,T=function(){return L.call(this)}),d&&!y||k[g]===T||a(k,g,T),f[t]=T,h)if(w={values:C("values"),keys:b?T:C("keys"),entries:C("entries")},y)for(j in w)(m||_||!(j in k))&&u(k,j,w[j]);else r({target:t,proto:!0,forced:m||_},w);return w}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/descriptors.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/document-create-element.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-object.js"),o=r.document,l=i(o)&&i(o.createElement);e.exports=function(e){return l?o.createElement(e):{}}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/dom-iterables.js":function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/enum-bug-keys.js":function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/export.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-descriptor.js").f,o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/redefine.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-global.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/copy-constructor-properties.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-forced.js");e.exports=function(e,t){var n,c,d,f,h,p=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(f=t[c],d=e.noTargetGet?(h=i(n,c))&&h.value:n[c],!u(m?c:p+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;a(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),l(n,c,f,e)}}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js":function(e,t,n){"use strict";n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.regexp.exec.js");var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/redefine.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-exec.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),a=o("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),h=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var p=o(e),m=!i((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[a]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!m||!g||"replace"===e&&(!u||!c||f)||"split"===e&&!h){var v=/./[p],b=n(p,""[e],(function(e,t,n,r,i){return t.exec===l?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),y=b[0],x=b[1];r(String.prototype,e,y),r(RegExp.prototype,p,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}d&&s(RegExp.prototype[p],"sham",!0)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/get-built-in.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/path.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/get-substitution.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-object.js"),i=Math.floor,o="".replace,l=/\$([$&'`]|\d\d?|<[^>]*>)/g,s=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,a,u,c){var d=n+e.length,f=a.length,h=s;return void 0!==u&&(u=r(u),h=l),o.call(c,h,(function(r,o){var l;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(d);case"<":l=u[o.slice(1,-1)];break;default:var s=+o;if(0===s)return r;if(s>f){var c=i(s/10);return 0===c?r:c<=f?void 0===a[c-1]?o.charAt(1):a[c-1]+o.charAt(1):r}l=a[s-1]}return void 0===l?"":l}))}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js":function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n("../../../../../usr/local/lib/node_modules/build/node_modules/webpack/buildin/global.js"))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/hidden-keys.js":function(e,t){e.exports={}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/html.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/get-built-in.js");e.exports=r("document","documentElement")},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/ie8-dom-define.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/descriptors.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/document-create-element.js");e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/indexed-object.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/classof-raw.js"),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/inspect-source.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-store.js"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/internal-state.js":function(e,t,n){var r,i,o,l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/native-weak-map.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-object.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),c=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),d=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-store.js"),f=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-key.js"),h=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/hidden-keys.js"),p=s.WeakMap;if(l){var m=d.state||(d.state=new p),g=m.get,v=m.has,b=m.set;r=function(e,t){return t.facade=e,b.call(m,e,t),t},i=function(e){return g.call(m,e)||{}},o=function(e){return v.call(m,e)}}else{var y=f("state");h[y]=!0,r=function(e,t){return t.facade=e,u(e,y,t),t},i=function(e){return c(e,y)?e[y]:{}},o=function(e){return c(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!a(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-forced.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js"),i=/#|\.prototype\./,o=function(e,t){var n=s[l(e)];return n==u||n!=a&&("function"==typeof t?r(t):!!t)},l=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},a=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-object.js":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-pure.js":function(e,t){e.exports=!1},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators-core.js":function(e,t,n){"use strict";var r,i,o,l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-prototype-of.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),c=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js"),d=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-pure.js"),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):h=!0);var p=null==r||l((function(){var e={};return r[f].call(e)!==e}));p&&(r={}),d&&!p||u(r,f)||a(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators.js":function(e,t){e.exports={}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/native-symbol.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js");e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/native-weak-map.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/inspect-source.js"),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-create.js":function(e,t,n){var r,i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-properties.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/enum-bug-keys.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/hidden-keys.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/html.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/document-create-element.js"),c=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-key.js"),d=c("IE_PROTO"),f=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=u("iframe")).style.display="none",a.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=l.length;n--;)delete p.prototype[l[n]];return p()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=i(e),n=new f,f.prototype=null,n[d]=e):n=p(),void 0===t?n:o(n,t)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-properties.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/descriptors.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-property.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-keys.js");e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=l(t),s=r.length,a=0;s>a;)i.f(e,n=r[a++],t[n]);return e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-property.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/descriptors.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/ie8-dom-define.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-primitive.js"),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=l(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/descriptors.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-property-is-enumerable.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-property-descriptor.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-indexed-object.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-primitive.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/ie8-dom-define.js"),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=l(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(a(e,t))return o(!i.f.call(e,t),e[t])}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-keys-internal.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-prototype-of.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-object.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-key.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/correct-prototype-getter.js"),s=o("IE_PROTO"),a=Object.prototype;e.exports=l?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-keys-internal.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-indexed-object.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/array-includes.js").indexOf,l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/hidden-keys.js");e.exports=function(e,t){var n,s=i(e),a=0,u=[];for(n in s)!r(l,n)&&r(s,n)&&u.push(n);for(;t.length>a;)r(s,n=t[a++])&&(~o(u,n)||u.push(n));return u}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-keys.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-keys-internal.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return r(e,i)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-set-prototype-of.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/a-possible-prototype.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/own-keys.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/get-built-in.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-names.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-get-own-property-symbols.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js");e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(l(e)),n=o.f;return n?t.concat(n(e)):t}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/path.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js");e.exports=r},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/redefine.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-global.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/inspect-source.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/internal-state.js"),u=a.get,c=a.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var a,u=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,h=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(a=c(n)).source||(a.source=d.join("string"==typeof t?t:""))),e!==r?(u?!h&&e[t]&&(f=!0):delete e[t],f?e[t]=n:i(e,t,n)):f?e[t]=n:l(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-exec-abstract.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/classof-raw.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-exec.js");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-exec.js":function(e,t,n){"use strict";var r,i,o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-flags.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-sticky-helpers.js"),s=RegExp.prototype.exec,a=String.prototype.replace,u=s,c=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),d=l.UNSUPPORTED_Y||l.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(c||f||d)&&(u=function(e){var t,n,r,i,l=this,u=d&&l.sticky,h=o.call(l),p=l.source,m=0,g=e;return u&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(e).slice(l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==e[l.lastIndex-1])&&(p="(?: "+p+")",g=" "+g,m++),n=new RegExp("^(?:"+p+")",h)),f&&(n=new RegExp("^"+p+"$(?!\\s)",h)),c&&(t=l.lastIndex),r=s.call(u?n:l,g),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=l.lastIndex,l.lastIndex+=r[0].length):l.lastIndex=0:c&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),f&&r&&r.length>1&&a.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-flags.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-sticky-helpers.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fails.js");function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/require-object-coercible.js":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-global.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js");e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-to-string-tag.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/object-define-property.js").f,i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-key.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/uid.js"),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-store.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/set-global.js"),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-pure.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared-store.js");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/string-multibyte.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-integer.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/require-object-coercible.js"),o=function(e){return function(t,n){var o,l,s=String(i(t)),a=r(n),u=s.length;return a<0||a>=u?e?"":void 0:(o=s.charCodeAt(a))<55296||o>56319||a+1===u||(l=s.charCodeAt(a+1))<56320||l>57343?e?s.charAt(a):o:e?s.slice(a,a+2):l-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-absolute-index.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-integer.js"),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-indexed-object.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/indexed-object.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return r(i(e))}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-integer.js":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-length.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-integer.js"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-object.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return Object(r(e))}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-primitive.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/is-object.js");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/uid.js":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/use-symbol-as-uid.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/native-symbol.js");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/shared.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/has.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/uid.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/native-symbol.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/use-symbol-as-uid.js"),u=i("wks"),c=r.Symbol,d=a?c:c&&c.withoutSetter||l;e.exports=function(e){return o(u,e)||(s&&o(c,e)?u[e]=c[e]:u[e]=d("Symbol."+e)),u[e]}},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.array.iterator.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-indexed-object.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/add-to-unscopables.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/iterators.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/internal-state.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/define-iterator.js"),a=l.set,u=l.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){a(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.regexp.exec.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/export.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-exec.js");r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.string.replace.js":function(e,t,n){"use strict";var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/an-object.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-length.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/to-integer.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/require-object-coercible.js"),a=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/advance-string-index.js"),u=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/get-substitution.js"),c=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/regexp-exec-abstract.js"),d=Math.max,f=Math.min;r("replace",2,(function(e,t,n,r){var h=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,p=r.REPLACE_KEEPS_$0,m=h?"$":"$0";return[function(n,r){var i=s(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!h&&p||"string"==typeof r&&-1===r.indexOf(m)){var s=n(t,e,this,r);if(s.done)return s.value}var g=i(e),v=String(this),b="function"==typeof r;b||(r=String(r));var y=g.global;if(y){var x=g.unicode;g.lastIndex=0}for(var w=[];;){var j=c(g,v);if(null===j)break;if(w.push(j),!y)break;""===String(j[0])&&(g.lastIndex=a(v,o(g.lastIndex),x))}for(var C,S="",_=0,k=0;k<w.length;k++){j=w[k];for(var L=String(j[0]),T=d(f(l(j.index),v.length),0),M=[],O=1;O<j.length;O++)M.push(void 0===(C=j[O])?C:String(C));var A=j.groups;if(b){var N=[L].concat(M,T,v);void 0!==A&&N.push(A);var E=String(r.apply(void 0,N))}else E=u(L,v,T,M,A,r);T>=_&&(S+=v.slice(_,T)+E,_=T+L.length)}return S+v.slice(_)}]}))},"../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/web.dom-collections.iterator.js":function(e,t,n){var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/global.js"),i=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/dom-iterables.js"),o=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.array.iterator.js"),l=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/create-non-enumerable-property.js"),s=n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/internals/well-known-symbol.js"),a=s("iterator"),u=s("toStringTag"),c=o.values;for(var d in i){var f=r[d],h=f&&f.prototype;if(h){if(h[a]!==c)try{l(h,a,c)}catch(e){h[a]=c}if(h[u]||l(h,u,d),i[d])for(var p in o)if(h[p]!==o[p])try{l(h,p,o[p])}catch(e){h[p]=o[p]}}}},"../../../../../usr/local/lib/node_modules/build/node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./js/SeoSettings.js":function(e,t,n){"use strict";n.r(t);n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.string.replace.js");var r=n("../../../../../usr/local/lib/node_modules/build/node_modules/@babel/runtime/helpers/defineProperty.js"),i=n.n(r),o=n("./js/helpers.js");const l={301:"301 (Permanent)",302:"302 (Temporary)"};class s{constructor(e,t){i()(this,"onSubmitNew",e=>{e.preventDefault();const t=e.target,n=t.getElementsByClassName("spinner")[0],r=t.elements[this.namespaceField("uri")],i=t.elements[this.namespaceField("to")],o=t.elements[this.namespaceField("type")],l=t.elements[this.namespaceField("siteId")],a=this.tables[l.value].children.length;s._validate(r,i,n)&&this.post("POST",{action:"seo/redirects/save",order:a,uri:r.value,to:i.value,type:o.value,siteId:l.value},({id:e})=>{this.tables[l.value].appendChild(this.rowStatic(e,a,r.value,i.value,o.value,l.value)),Craft.cp.displayNotice("<strong>SEO:</strong> Redirect added successfully!"),n.classList.add("hidden"),r.value="",i.value="",r.focus(),this.initTables()},e=>{Craft.cp.displayError("<strong>SEO:</strong> "+e),n.classList.add("hidden")})}),i()(this,"onSubmitBulk",e=>{e.preventDefault();const t=e.target,n=t.getElementsByClassName("spinner")[0],r=t.elements[this.namespaceField("redirects")],i=t.elements[this.namespaceField("separator")],o=t.elements[this.namespaceField("type")],l=t.elements[this.namespaceField("siteId")];let s=!0;""===r.value.trim()?(r.classList.add("error"),s=!1):r.classList.remove("error"),""===i.value?(i.classList.add("error"),s=!1):i.classList.remove("error"),s&&(n.classList.remove("hidden"),this.post("PUT",{redirects:r.value,separator:i.value,type:o.value,siteId:l.value},({redirects:e})=>{e.forEach(({id:e,order:t,uri:n,to:r,type:i,siteId:o})=>{this.tables[o||"null"].appendChild(this.rowStatic(e,t,n,r,i,o))}),Craft.cp.displayNotice("<strong>SEO:</strong> Redirects added successfully!"),n.classList.add("hidden"),r.value="",this.initTables()},e=>{Craft.cp.displayError("<strong>SEO:</strong> "+e),n.classList.add("hidden")}))}),i()(this,"onUpdate",(e,t)=>{t.preventDefault();const n=t.target,r=n.getElementsByClassName("spinner")[0],i=n.elements[this.namespaceField("id")],o=n.elements[this.namespaceField("order")],l=n.elements[this.namespaceField("uri")],a=n.elements[this.namespaceField("to")],u=n.elements[this.namespaceField("type")];s._validate(l,a,r)&&this.post("POST",{action:"seo/redirects/save",id:i.value,order:o.value,uri:l.value,to:a.value,type:u.value},()=>{const t=this.editRow;this.cancelCurrentEdit(),this.tables[e].insertBefore(this.rowStatic(i.value,o.value,l.value,a.value,u.value,e.value,t.dataset.added),t),this.tables[e].removeChild(t)},e=>{Craft.cp.displayError("<strong>SEO:</strong> "+e),r.classList.add("hidden")})}),i()(this,"onEditClick",(e,t,n)=>{t.preventDefault();const{id:r,order:i,uri:o,to:l,type:s,added:a}=t.target.dataset;this.cancelCurrentEdit();const u=this.rowEdit(r,i,o,l,s);this.editRow=n,this.editRow.setAttribute("data-added",a),this.cancelCurrentEdit=()=>{this.tables[e].insertBefore(n,u[0]),this.tables[e].removeChild(u[0]),this.tables[e].removeChild(u[1]),this.cancelCurrentEdit=()=>{},this.editRow=null},this.tables[e].insertBefore(u[0],n),this.tables[e].insertBefore(u[1],n),u[0].getElementsByTagName("input")[1].focus(),this.tables[e].removeChild(n)}),i()(this,"onDeleteClick",(e,t,n)=>{t.preventDefault(),confirm("Delete this redirect?")&&this.post("DELETE",{id:n.dataset.id},()=>{Craft.cp.displayNotice("<strong>SEO:</strong> Redirect deleted"),this.tables[e].removeChild(n)},e=>{Craft.cp.displayNotice("<strong>SEO:</strong> "+e)})}),i()(this,"onSort",e=>{const t=e.querySelectorAll("tr"),n=[];for(let e=0,r=t.length;e<r;e++){const r=t[e];r.dataset.order=e,r.querySelector("a").dataset.order=e,n.push({id:r.dataset.id,order:r.dataset.order})}this.post("POST",{action:"seo/redirects/sort",order:n},()=>{Craft.cp.displayNotice("<strong>SEO:</strong> Redirect order saved")},e=>{Craft.cp.displayNotice("<strong>SEO:</strong> "+e)})}),this.ns=e,this.csrf=t;const n=document.querySelectorAll("tbody[data-redirects]"),r=document.querySelectorAll("form[data-redirects]");this.newForm=document.getElementById(e+"-redirectsNew"),this.bulkForm=document.getElementById(e+"-redirectsBulk"),this.cancelCurrentEdit=()=>{},this.editRow=null,this.newForm.addEventListener("submit",this.onSubmitNew),this.bulkForm.addEventListener("submit",this.onSubmitBulk),this.tables={};for(let e=0,t=n.length;e<t;++e){const t=n[e].dataset.redirects;this.tables[t]=n[e]}this.tableForms={};for(let e=0,t=r.length;e<t;++e){const t=r[e].dataset.redirects;this.tableForms[t]=r[e],this.tableForms[t].addEventListener("submit",this.onUpdate.bind(this,t))}this.initTables()}initTables(){Object.keys(this.tables).forEach(e=>{this.tables[e].__sorter&&this.tables[e].__sorter.destroy(),this.tables[e].__sorter=new Craft.DataTableSorter(this.tables[e].parentNode,{onSortChange:()=>this.onSort(this.tables[e])}),[].slice.call(this.tables[e].getElementsByTagName("tr")).forEach(t=>{const n=t.getElementsByTagName("a");n[0].addEventListener("click",n=>{this.onEditClick(e,n,t)}),n[2].addEventListener("click",n=>{this.onDeleteClick(e,n,t)})})})}namespaceField(e){return"".concat(this.ns,"[").concat(e,"]")}post(e,t={},n=(()=>{}),r=(()=>{})){const i={};i[this.csrf.name]=this.csrf.token,Object.keys(t).forEach(e=>{t.hasOwnProperty(e)&&(i[e]=t[e])}),$.ajax({type:e,url:window.location.href,dataType:"json",data:i}).done((e,t)=>{"success"===t?e.hasOwnProperty("success")?n(e):e.hasOwnProperty("error")&&("string"==typeof e.error?r(e.error):r(e.error[Object.keys(e.error)[0]][0])):r(e)}).fail(()=>{r("An unknown error has occurred")})}rowStatic(e=-1,t=-1,n="",r="",i=301,s=null,a=null){const u=a||"Now",c=Object(o.b)("tr",{tabindex:0,"data-id":e},[Object(o.b)("td",{class:"redirects--title-col"},[Object(o.b)("div",{class:"element small"},[Object(o.b)("div",{class:"label"},[Object(o.b)("span",{class:"title"},[Object(o.b)("a",{href:"#",title:"Edit Redirect","data-id":e,"data-order":t,"data-uri":n,"data-to":r,"data-type":i,"data-added":a,click:e=>this.onEditClick(s,e,c)},n)])])])]),Object(o.b)("td",{},r),Object(o.b)("td",{},l[i]),Object(o.b)("td",{},u),Object(o.b)("td",{class:"thin action"},[Object(o.b)("a",{class:"move icon",title:"Reorder"})]),Object(o.b)("td",{class:"thin action"},[Object(o.b)("a",{class:"delete icon",title:"Delete",click:e=>this.onDeleteClick(s,e,c)})])]);return c}rowEdit(e,t,n,r,i){return[Object(o.b)("tr",{class:"redirects--edit-row"},[Object(o.b)("td",{},[Object(o.b)("input",{value:e,type:"hidden",name:this.namespaceField("id")}),Object(o.b)("input",{value:t,type:"hidden",name:this.namespaceField("order")}),Object(o.b)("input",{value:n,type:"text",class:"text fullwidth",name:this.namespaceField("uri")})]),Object(o.b)("td",{},[Object(o.b)("input",{value:r,type:"text",class:"text fullwidth",name:this.namespaceField("to")})]),Object(o.b)("td",{colspan:2},[Object(o.b)("div",{class:"select"},[Object(o.b)("select",{name:this.namespaceField("type")},Object.keys(l).map(e=>{const t={value:e};return i===e&&(t.selected="selected"),Object(o.b)("option",t,l[e])}))])]),Object(o.b)("td",{},[Object(o.b)("div",{class:"spinner hidden"})])]),Object(o.b)("tr",{class:"redirects--edit-controls"},[Object(o.b)("td",{colspan:5},[Object(o.b)("input",{class:"btn submit",type:"submit",value:"Update"}),Object(o.b)("input",{class:"btn",type:"button",value:"Cancel",click:()=>{this.cancelCurrentEdit()}})])])]}static _validate(e,t,n){let r=!0;return""===e.value.trim()?(e.classList.add("error"),r=!1):e.classList.remove("error"),""===t.value.trim()?(t.classList.add("error"),r=!1):t.classList.remove("error"),!!r&&(n.classList.remove("hidden"),!0)}}var a=n("./node_modules/codemirror/lib/codemirror.js"),u=n.n(a);n("./node_modules/codemirror/addon/edit/closebrackets.js"),n("./node_modules/codemirror/mode/twig/twig.js");class c{constructor(e,t){this.namespace=e,this.csrf=t,this.initSitemap(),this.initRobots()}initSitemap(){const e=document.getElementById("".concat(this.namespace,"-sitemapNameExample"));document.getElementById("".concat(this.namespace,"-sitemapName")).addEventListener("input",({target:t})=>{e.textContent="".concat(t.value,".xml")})}initRobots(){const e=document.getElementById("".concat(this.namespace,"-robotsTxt")),t=u.a.fromTextArea(e,{lineNumbers:!0,mode:"twig",theme:"monokai",indentWithTabs:!0,autoCloseBrackets:!0,htmlMode:!1}),n=document.querySelector("a[href='#settings-robots']");n&&n.addEventListener("click",()=>{t.refresh()})}}class d{constructor(e,t,n=[Craft.csrfTokenName,Craft.csrfTokenValue]){switch(i()(this,"namespace",null),i()(this,"csrf",null),this.namespace=e,this.csrf={name:n[0],token:n[1]},t){case"sitemap":d.EditableTable("".concat(this.namespace,"-customUrls"),"".concat(this.namespace,"-addCustomUrl"));break;case"redirects":new s(this.namespace,this.csrf);break;case"settings":new c(this.namespace,this.csrf)}}static EditableTable(e,t,n){const r=()=>{};d.rowCb=typeof n==typeof r?n:r,d.table=document.getElementById(e).getElementsByTagName("tbody")[0],d.row=d.table.firstElementChild.cloneNode(!0),d.table.firstElementChild.remove(),d.row.classList.remove("hidden");const i=d.table.getElementsByClassName("delete");let o=i.length;for(;o--;){const e=i[o];e.addEventListener("click",()=>{e.parentNode.parentNode.remove(),d.rowCb()})}document.getElementById(t).addEventListener("click",()=>{d.addRowToEditableTable()})}static addRowToEditableTable(){const e=d.row.cloneNode(!0);e.innerHTML=e.innerHTML.replace(/{i}/g,d.table.childNodes.length-2),e.getElementsByClassName("delete")[0].addEventListener("click",()=>{e.remove(),d.rowCb()}),d.table.appendChild(e),d.rowCb()}}i()(d,"rowCb",null),i()(d,"table",null),i()(d,"row",null),window.SeoSettings=d},"./js/helpers.js":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"g",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return u}));n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/es.string.replace.js"),n("../../../../../usr/local/lib/node_modules/build/node_modules/core-js/modules/web.dom-collections.iterator.js");function r(e="div",t={},n=[]){const r=document.createElement(e);for(let[e,n]of Object.entries(t))n&&("function"!=typeof n?("style"===e&&(n=n.replace(/(?:\r\n|\r|\n|\t|\s+)/g," ").trim()),r.setAttribute(e,n)):"ref"===e?n(r):r.addEventListener(e,n));return Array.isArray(n)||(n=[n]),n.map(e=>{if(e)try{r.appendChild(e)}catch(t){r.appendChild(document.createTextNode(e))}}),r}class i{constructor(e){this.text=e?i.cleanText(e):e}fleschKincaidReadingEase(){return Math.round(10*(206.835-1.015*this.averageWordsPerSentence()-84.6*this.averageSyllablesPerWord()))/10}fleschKincaidGradeLevel(){return Math.round(10*(.39*this.averageWordsPerSentence()+11.8*this.averageSyllablesPerWord()-15.59))/10}gunningFogScore(){return Math.round(.4*(this.averageWordsPerSentence()+this.percentageWordsWithThreeSyllables(!1))*10)/10}colemanLiauIndex(){return Math.round(10*(this.letterCount()/this.wordCount()*5.89-this.sentenceCount()/this.wordCount()*.3-15.8))/10}smogIndex(){return Math.round(1.043*Math.sqrt(this.wordsWithThreeSyllables()*(30/this.sentenceCount())+3.1291)*10)/10}automatedReadabilityIndex(){return Math.round(10*(this.letterCount()/this.wordCount()*4.71+this.wordCount()/this.sentenceCount()*.5-21.43))/10}static cleanText(e){return["li","p","h1","h2","h3","h4","h5","h6","dd"].forEach(t=>{e.replace("</".concat(t,">"),".")}),e=e.replace(/<[^>]+>/g,"").replace(/[,:;()-]/g," ").replace(/[.!?]/g,".").replace(/^\s+/g,"").replace(/[ ]*(\n|\r\n|\r)[ ]*/g," ").replace(/([.])[. ]+/g,".").replace(/[ ]*([.])/g,". ").replace(/\s+/g," ").replace(/\s+$/g,"").replace(/'/g,""),e+="."}static syllableCount(e){let t=0,n=0;e=e.toLowerCase().replace(/[^a-z]/g,"");const r={simile:3,forever:3,shoreline:2};if(r.hasOwnProperty(e))return r[e];[/^un/,/^fore/,/ly$/,/less$/,/ful$/,/ers?$/,/ings?$/].forEach(t=>{e.match(t)&&(e=e.replace(t,""),n++)});let i=e.split(/[^aeiouy]+/gi).filter(e=>!!e.replace(/\s+/gi,"").length).length;return t=i+n,[/cial/,/tia/,/cius/,/cious/,/giu/,/ion/,/iou/,/sia$/,/[^aeiuoyt]{2,}ed$/,/.ely$/,/[cg]h?e[rsd]?$/,/rved?$/,/[aeiouy][dt]es?$/,/[aeiouy][^aeiouydt]e[rsd]?$/,/^[dr]e[aeiou][^aeiou]+$/,/[aeiouy]rse$/].forEach(n=>{e.match(n)&&t--}),[/ia/,/riet/,/dien/,/iu/,/io/,/ii/,/[aeiouym]bl$/,/[aeiou]{3}/,/^mc/,/ism$/,/([^aeiouy])\1l$/,/[^l]lien/,/^coa[dglx]./,/[^gq]ua[^auieo]/,/dnt$/,/uity$/,/ie(r|st)$/].forEach(n=>{e.match(n)&&t++}),t||1}textLength(){return this.text.length}letterCount(){return this.text.replace(/[^a-z]+/gi,"").length}sentenceCount(){return this.text.replace(/[^.!?]/g,"").length||1}wordCount(){return this.words().length||1}words(){return this._words||(this._words=this.text.split(/[^a-z0-9']+/i)),this._words}averageWordsPerSentence(){return this.wordCount()/this.sentenceCount()}averageSyllablesPerWord(){let e=0,t=this.wordCount();return this.text.split(/\s+/).forEach(t=>{e+=i.syllableCount(t)}),(e||1)/(t||1)}wordsWithThreeSyllables(e=!0){let t=0;return e=!1!==e,this.text.split(/\s+/).forEach(n=>{n.match(/^[A-Z]/)&&!e||this.syllableCount(n)>2&&t++}),t}percentageWordsWithThreeSyllables(e=!0){return this.wordsWithThreeSyllables(e)/this.wordCount()*100}}function o(e){Craft.cp.displayError("<strong>SEO:</strong> ".concat(e)),window.console&&console.error.apply(console,["%cSEO: %c ".concat(e),"font-weight: bold;","font-weight: normal;"])}function l(e,t=300,n=!1){let r;return 0===t?function(){e.apply(this,arguments)}:function(){const i=this,o=arguments;"SyntheticEvent"===o[0].constructor.name&&o[0].persist();const l=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(l,t),s&&e.apply(i,o)}}function s(e){const t=e=>{let t=/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i.exec(e);return null!==t&&t[1]};return t(location.href)===t(e)}function a(e,t){let n=0,r=e.length;if(Array.isArray(t)){const i=e.length,o=t.length;for(;r--;){let l=o,s=0;for(;l--&&r+l<i;)e[r+l].toLowerCase()===t[l]&&s++;s===o&&n++}}else for(;r--;)e[r].toLowerCase()===t&&n++;return n}function u(e,t="div"){const n=(i=e)[0].toUpperCase()+i.slice(1);var i;return r(t,{class:"seo--light ".concat(e),title:n},n)}},"./node_modules/codemirror/addon/edit/closebrackets.js":function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,l){l&&l!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),l=t.listSelections(),u=0;u<l.length;u++){if(!l[u].empty())return e.Pass;var c=a(t,l[u].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(u=l.length-1;u>=0;u--){var d=l[u].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return e.Pass;var u=a(t,o[l].head);if(!u||i.indexOf(u)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=l(n))}}function l(t){return function(i){return function(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var l=r(o,"pairs"),a=l.indexOf(i);if(-1==a)return e.Pass;for(var c,d=r(o,"closeBefore"),f=r(o,"triples"),h=l.charAt(a+1)==i,p=t.listSelections(),m=a%2==0,g=0;g<p.length;g++){var v,b=p[g],y=b.head,x=t.getRange(y,n(y.line,y.ch+1));if(m&&!b.empty())v="surround";else if(!h&&m||x!=i)if(h&&y.ch>1&&f.indexOf(i)>=0&&t.getRange(n(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(y.line,y.ch-2))))return e.Pass;v="addFour"}else if(h){var w=0==y.ch?" ":t.getRange(n(y.line,y.ch-1),y);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;v="both"}else v=h&&u(t,y)?"both":f.indexOf(i)>=0&&t.getRange(y,n(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=v)return e.Pass}else c=v}var j=a%2?l.charAt(a-1):i,C=a%2?i:l.charAt(a+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==c){var i=t.getSelections();for(r=0;r<i.length;r++)i[r]=j+i[r]+C;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),r=0;r<i.length;r++)i[r]=(o=i[r],l=void 0,l=e.cmpPos(o.anchor,o.head)>0,{anchor:new n(o.anchor.line,o.anchor.ch+(l?-1:1)),head:new n(o.head.line,o.head.ch+(l?1:-1))});t.setSelections(i)}else"both"==c?(t.replaceSelection(j+C,null),t.triggerElectric(j+C),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(j+j+j+j,"before"),t.execCommand("goCharRight"));var o,l}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function a(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function u(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/mode/multiplex.js":function(e,t,n){!function(e){"use strict";e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(i,o){if(o.innerActive){var l=o.innerActive;if(u=i.string,!l.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((d=l.close?r(u,l.close,i.pos,l.parseDelimiters):-1)==i.pos&&!l.parseDelimiters)return i.match(l.close),o.innerActive=o.inner=null,l.delimStyle&&l.delimStyle+" "+l.delimStyle+"-close";d>-1&&(i.string=u.slice(0,d));var s=l.mode.token(i,o.inner);return d>-1&&(i.string=u),d==i.pos&&l.parseDelimiters&&(o.innerActive=o.inner=null),l.innerStyle&&(s=s?s+" "+l.innerStyle:l.innerStyle),s}for(var a=1/0,u=i.string,c=0;c<n.length;++c){var d,f=n[c];if((d=r(u,f.open,i.pos))==i.pos){f.parseDelimiters||i.match(f.open),o.innerActive=f;var h=0;if(t.indent){var p=t.indent(o.outer,"","");p!==e.Pass&&(h=p)}return o.inner=e.startState(f.mode,h),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=d&&d<a&&(a=d)}a!=1/0&&(i.string=u.slice(0,a));var m=t.token(i,o.outer);return a!=1/0&&(i.string=u),m},indent:function(n,r,i){var o=n.innerActive?n.innerActive.mode:t;return o.indent?o.indent(n.innerActive?n.inner:n.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:t;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var o=0;o<n.length;++o){var l=n[o];"\n"===l.open&&(r.innerActive=l,r.inner=e.startState(l.mode,i.indent?i.indent(r.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}(n("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/lib/codemirror.js":function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=r||i||o,s=l&&(r?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,a=!0);var j=b&&(u||d&&(null==w||w<12.11)),C=n||l&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,k=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function L(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return L(e).appendChild(t)}function M(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function O(e,t,n,r){var i=M(e,t,n,r);return i.setAttribute("role","presentation"),i}function A(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 N(){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 E(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function D(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}_=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var W=function(e){e.select()};function P(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function F(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function R(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=n-l%n,o=s+1}}m?W=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(W=function(e){try{e.select()}catch(e){}});var I=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}I.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},I.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var B={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},U={origin:"+move"};function $(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var V=[""];function K(e){for(;V.length<=e;)V.push(X(V)+" ");return V[e]}function X(e){return e[e.length-1]}function q(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Y(){}function Z(e,t){var n;return Object.create?n=Object.create(e):(Y.prototype=e,n=new Y),t&&F(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&J(e))||t.test(e):J(e)}function te(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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function oe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var le=null;function se(e,t,n){var r;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var ae=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,s){var a="ltr"==s?"L":"R";if(0==l.length||"ltr"==s&&!e.test(l))return!1;for(var u,c=l.length,d=[],f=0;f<c;++f)d.push((u=l.charCodeAt(f))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":8204==u?"b":"L");for(var h=0,p=a;h<c;++h){var m=d[h];"m"==m?d[h]=p:p=m}for(var g=0,v=a;g<c;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":n.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,x=d[0];y<c-1;++y){var w=d[y];"+"==w&&"1"==x&&"1"==d[y+1]?d[y]="1":","!=w||x!=d[y+1]||"1"!=x&&"n"!=x||(d[y]=x),x=w}for(var j=0;j<c;++j){var C=d[j];if(","==C)d[j]="N";else if("%"==C){var S=void 0;for(S=j+1;S<c&&"%"==d[S];++S);for(var _=j&&"!"==d[j-1]||S<c&&"1"==d[S]?"1":"N",k=j;k<S;++k)d[k]=_;j=S-1}}for(var L=0,T=a;L<c;++L){var M=d[L];"L"==T&&"1"==M?d[L]="L":n.test(M)&&(T=M)}for(var O=0;O<c;++O)if(t.test(d[O])){var A=void 0;for(A=O+1;A<c&&t.test(d[A]);++A);for(var N="L"==(O?d[O-1]:a),E=N==("L"==(A<c?d[A]:a))?N?"L":"R":a,D=O;D<A;++D)d[D]=E;O=A-1}for(var W,P=[],F=0;F<c;)if(r.test(d[F])){var R=F;for(++F;F<c&&r.test(d[F]);++F);P.push(new o(0,R,F))}else{var I=F,H=P.length,B="rtl"==s?1:0;for(++F;F<c&&"L"!=d[F];++F);for(var z=I;z<F;)if(i.test(d[z])){I<z&&(P.splice(H,0,new o(1,I,z)),H+=B);var G=z;for(++z;z<F&&i.test(d[z]);++z);P.splice(H,0,new o(2,G,z)),H+=B,I=z}else++z;I<F&&P.splice(H,0,new o(1,I,F))}return"ltr"==s&&(1==P[0].level&&(W=l.match(/^\s+/))&&(P[0].from=W[0].length,P.unshift(new o(0,0,W[0].length))),1==X(P).level&&(W=l.match(/\s+$/))&&(X(P).to-=W[0].length,P.push(new o(0,c-W[0].length,c)))),"rtl"==s?P.reverse():P}}();function ue(e,t){var n=e.order;return null==n&&(n=e.order=ae(e.text,t)),n}var ce=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ce).concat(n)}};function fe(e,t){return e._handlers&&e._handlers[t]||ce}function he(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=H(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function me(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,n||t.type,e,t),we(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==H(n,t[r])&&n.push(t[r])}function ve(e,t){return fe(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function je(e){ye(e),xe(e)}function Ce(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)),b&&e.ctrlKey&&1==t&&(t=3),t}var _e,ke,Le=function(){if(l&&s<9)return!1;var e=M("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==_e){var t=M("span","");T(e,M("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(_e=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var n=_e?M("span",""):M("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Me(e){if(null!=ke)return ke;var t=T(e,document.createTextNode("AخA")),n=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return L(e),!(!n||n.left==n.right)&&(ke=r.right-n.right<3)}var Oe,Ae=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ne=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)},Ee="oncopy"in(Oe=M("div"))||(Oe.setAttribute("oncopy","return;"),"function"==typeof Oe.oncopy),De=null,We={},Pe={};function Fe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),We[e]=t}function Re(e){if("string"==typeof e&&Pe.hasOwnProperty(e))e=Pe[e];else if(e&&"string"==typeof e.name&&Pe.hasOwnProperty(e.name)){var t=Pe[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 Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ie(e,t){t=Re(t);var n=We[t.name];if(!n)return Ie(e,"text/plain");var r=n(e,t);if(He.hasOwnProperty(t.name)){var i=He[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var He={};function Be(e,t){F(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ue(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ve(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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ke(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Xe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function qe(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ye(e){if(null==e.parent)return null;for(var t=e.parent,n=H(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Ze(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return n+l}function Qe(e,t){return t>=e.first&&t<e.first+e.size}function Je(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function ot(e,t){return tt(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 et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,Ve(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ve(e,t.line).text.length)}function at(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}$e.prototype.eol=function(){return this.pos>=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},$e.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},$e.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},$e.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},$e.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var l=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],a=1,u=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=a;u<e;){var r=i[a];r>e&&i.splice(a,1,e,i[a+1],r),a+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function ft(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ht(e,Ye(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,r.state),o=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=Ve(o,s-1),u=a.stateAfter;if(u&&(!n||s+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return s;var c=R(a.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),l=o>r.first&&Ve(r,o-1).stateAfter,s=l?ct.fromSaved(r,l,o):new ct(r,Ue(r.mode),o);return r.iter(o,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function pt(e,t,n,r){var i=e.doc.mode,o=new $e(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&mt(i,n.state);!o.eol();)gt(i,o,n.state),o.start=o.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ge(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ge(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.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}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof ut?new ct(e,ze(e.mode,t.state),n,t.lookAhead):new ct(e,ze(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var i,o,l=e.doc,s=l.mode,a=Ve(l,(t=st(l,t)).line),u=ht(e,t.line,n),c=new $e(a.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=gt(s,c,u.state),r&&o.push(new vt(c,i,ze(l.mode,u.state)));return r?o:new vt(c,i,u.state)}function yt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function xt(e,t,n,r,i,o,l){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,d=new $e(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&yt(mt(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,l&&pt(e,t,r,d.pos),d.pos=t.length,a=null):a=yt(gt(n,d,r.state,f),o),f){var h=f[0].name;h&&(a="m-"+(a?h+" "+a:h))}if(!s||c!=a){for(;u<d.start;)i(u=Math.min(d.start,u+5e3),c);c=a}d.start=d.pos}for(;u<d.pos;){var p=Math.min(d.pos,u+5e3);i(p,c),u=p}}var wt=!1,jt=!1;function Ct(e,t,n){this.marker=e,this.from=t,this.to=n}function St(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function _t(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function kt(e,t){if(t.full)return null;var n=Qe(e,t.from.line)&&Ve(e,t.from.line).markedSpans,r=Qe(e,t.to.line)&&Ve(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Ct(l,o.from,s?null:o.to))}}return r}(n,i,l),a=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Ct(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,l),u=1==t.text.length,c=X(t.text).length+(u?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var h=St(a,f.marker);h?u&&(f.to=null==h.to?null:h.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var m=a[p];null!=m.to&&(m.to+=c),null==m.from?St(s,m.marker)||(m.from=c,u&&(s||(s=[])).push(m)):(m.from+=c,u&&(s||(s=[])).push(m))}s&&(s=Lt(s)),a&&a!=s&&(a=Lt(a));var g=[s];if(!u){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new Ct(s[y].marker,null,null));for(var x=0;x<b;++x)g.push(v);g.push(a)}return g}function Lt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Tt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Mt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ot(e){return e.inclusiveLeft?-1:0}function At(e){return e.inclusiveRight?1:0}function Nt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=tt(r.from,i.from)||Ot(e)-Ot(t);if(o)return-o;var l=tt(r.to,i.to)||At(e)-At(t);return l||t.id-e.id}function Et(e,t){var n,r=jt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Nt(n,i.marker)<0)&&(n=i.marker);return n}function Dt(e){return Et(e,!0)}function Wt(e){return Et(e,!1)}function Pt(e,t){var n,r=jt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Nt(n,o.marker)<0)&&(n=o.marker)}return n}function Ft(e,t,n,r,i){var o=Ve(e,t),l=jt&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=tt(u.from,n)||Ot(a.marker)-Ot(i),d=tt(u.to,r)||At(a.marker)-At(i);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,n)>=0:tt(u.to,n)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,r)<=0:tt(u.from,r)<0)))return!0}}}function Rt(e){for(var t;t=Dt(e);)e=t.find(-1,!0).line;return e}function It(e,t){var n=Ve(e,t),r=Rt(n);return n==r?t:Ye(r)}function Ht(e,t){if(t>e.lastLine())return t;var n,r=Ve(e,t);if(!Bt(e,r))return t;for(;n=Wt(r);)r=n.find(1,!0).line;return Ye(r)+1}function Bt(e,t){var n=jt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,St(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&zt(e,t,i))return!0}function Gt(e){for(var t=0,n=(e=Rt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==n)break;t+=s.height}return t}function Ut(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Dt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Wt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function $t(e){var t=e.display,n=e.doc;t.maxLine=Ve(n,n.first),t.maxLineLength=Ut(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Ut(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Vt=function(e,t,n){this.text=e,Mt(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Tt(e)}Vt.prototype.lineNo=function(){return Ye(this)},be(Vt);var Xt={},qt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?qt:Xt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var n=O("span",null,null,a?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Jt,Me(e.display.measure)&&(l=ue(o,e.doc.direction))&&(r.addToken=en(r.addToken,l)),r.map=[],nn(o,r,ft(e,o,t!=e.display.externalMeasured&&Ye(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=D(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=D(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function Qt(e){var t=M("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,n,r,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){u=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var p=d.exec(t),m=p?p.index-h:t.length-h;if(m){var g=document.createTextNode(c.slice(h,h+m));l&&s<9?u.appendChild(M("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;h+=m+1;var v=void 0;if("\t"==p[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=u.appendChild(M("span",K(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==p[0]||"\n"==p[0]?((v=u.appendChild(M("span","\r"==p[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&s<9?u.appendChild(M("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||a){var x=n||"";r&&(x+=r),i&&(x+=i);var w=M("span",[u],x,o);if(a)for(var j in a)a.hasOwnProperty(j)&&"style"!=j&&"class"!=j&&w.setAttribute(j,a[j]);return e.content.appendChild(w)}e.content.appendChild(u)}}function en(e,t){return function(n,r,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>u&&d.from<=u);f++);if(d.to>=c)return e(n,r,i,o,l,s,a);e(n,r.slice(0,d.to-u),i,o,null,s,a),o=null,r=r.slice(d.to-u),u=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,s,a,u,c,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){a=u=c=s="",f=null,d=null,v=1/0;for(var b=[],y=void 0,x=0;x<r.length;++x){var w=r[x],j=w.marker;if("bookmark"==j.type&&w.from==p&&j.widgetNode)b.push(j);else if(w.from<=p&&(null==w.to||w.to>p||j.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),j.className&&(a+=" "+j.className),j.css&&(s=(s?s+";":"")+j.css),j.startStyle&&w.from==p&&(c+=" "+j.startStyle),j.endStyle&&w.to==v&&(y||(y=[])).push(j.endStyle,w.to),j.title&&((f||(f={})).title=j.title),j.attributes)for(var C in j.attributes)(f||(f={}))[C]=j.attributes[C];j.collapsed&&(!d||Nt(d.marker,j)<0)&&(d=w)}else w.from>p&&v>w.from&&(v=w.from)}if(y)for(var S=0;S<y.length;S+=2)y[S+1]==v&&(u+=" "+y[S]);if(!d||d.from==p)for(var _=0;_<b.length;++_)tn(t,0,b[_]);if(d&&(d.from||0)==p){if(tn(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;for(var k=Math.min(h,v);;){if(g){var L=p+g.length;if(!d){var T=L>k?g.slice(0,k-p):g;t.addToken(t,T,l?l+a:a,c,p+T.length==v?u:"",s,f)}if(L>=k){g=g.slice(k-p),p=k;break}p=L,c=""}g=i.slice(o,o=n[m++]),l=Yt(n[m++],t.cm.options)}}else for(var M=1;M<n.length;M+=2)t.addToken(t,i.slice(o,o=n[M]),Yt(n[M+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Wt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ye(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Bt(e,t)}function on(e,t,n){for(var r,i=[],o=t;o<n;o=r){var l=new rn(e.doc,Ve(e.doc,o),o);r=o+l.size,i.push(l)}return i}var ln=null,sn=null;function an(e,t){var n=fe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);ln?r=ln.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(un,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},l=0;l<n.length;++l)o(l)}}function un(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function cn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?hn(e,t):"gutter"==o?mn(e,t,n,r):"class"==o?pn(e,t):"widget"==o&&gn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=M("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function fn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Zt(e,t)}function hn(e,t){var n=t.text.className,r=fn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,pn(e,t)):n&&(t.text.className=n)}function pn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(M("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function mn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=dn(t);t.gutterBackground=M("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=dn(t),s=t.gutter=M("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(M("div",Je(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.display.gutterSpecs.length;++a){var u=e.display.gutterSpecs[a].className,c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(M("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=S("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);bn(e,t,n)}function vn(e,t,n,r){var i=fn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),mn(e,t,n,r),bn(e,t,r),t.node}function bn(e,t,n){if(yn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)yn(e,t.rest[r],t,n,!1)}function yn(e,t,n,r,i){if(t.widgets)for(var o=dn(n),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=M("div",[a.node],"CodeMirror-linewidget"+(a.className?" "+a.className:""));a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),xn(a,u,n,r),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),an(a,"redraw")}}function xn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function wn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!A(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,M("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function jn(e,t){for(var n=Ce(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Cn(e){return e.lineSpace.offsetTop}function Sn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _n(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,M("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function kn(e){return 50-e.display.nativeBarWidth}function Ln(e){return e.display.scroller.clientWidth-kn(e)-e.display.barWidth}function Tn(e){return e.display.scroller.clientHeight-kn(e)-e.display.barHeight}function Mn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Ye(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function On(e,t,n,r){return En(e,Nn(e,t),n,r)}function An(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[cr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Nn(e,t){var n=Ye(t),r=An(e,n);r&&!r.text?r=null:r&&r.changes&&(cn(e,r,n,or(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ye(t=Rt(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Zt(e,r);return r.text=i.pre,T(e.display.lineMeasure,i.pre),r}(e,t));var i=Mn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function En(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Ln(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Pn(t.map,n,r),a=o.node,u=o.start,c=o.end,d=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&re(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&re(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&s<9&&0==u&&c==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Fn(_(a,u,c).getClientRects(),r)).left||i.right||0==u)break;c=u,u-=1,d="right"}l&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=De)return De;var t=T(e,M("span","x")),n=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return De=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var h;u>0&&(d=r="right"),i=e.options.lineWrapping&&(h=a.getClientRects()).length>1?h["right"==r?h.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:Wn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var x=y?b[y-1]:0,w=b[y],j={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:x,bottom:w};return i.left||i.right||(j.bogus=!0),e.options.singleCursorHeightPerLine||(j.rtop=m,j.rbottom=g),j}(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Dn,Wn={left:0,right:0,top:0,bottom:0};function Pn(e,t,n){for(var r,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=1+(i=t-s):(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(r=e[u+2],s==a&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],l="left";if("right"==n&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],l="right";break}return{node:r,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Fn(e,t){var n=Wn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Rn(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 In(e){e.display.externalMeasure=null,L(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Rn(e.display.view[t])}function Hn(e){In(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Bn(){return c&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zn(){return c&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=wn(e.widgets[n]));return t}function Un(e,t,n,r,i){if(!i){var o=Gn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var l=Gt(t);if("local"==r?l+=Cn(e.display):l-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==r?0:zn());var a=s.left+("window"==r?0:Bn());n.left+=a,n.right+=a}return n.top+=l,n.bottom+=l,n}function $n(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Bn(),i-=zn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function Vn(e,t,n,r,i){return r||(r=Ve(e.doc,t.line)),Un(e,r,On(e,r,t.ch,i),n)}function Kn(e,t,n,r,i,o){function l(t,l){var s=En(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,Un(e,r,s,n)}r=r||Ve(e.doc,t.line),i||(i=Nn(e,r));var s=ue(r,e.doc.direction),a=t.ch,u=t.sticky;if(a>=r.text.length?(a=r.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,n){return l(n?e-1:e,1==s[t].level!=n)}var d=se(s,a,u),f=le,h=c(a,d,"before"==u);return null!=f&&(h.other=c(a,f,"before"!=u)),h}function Xn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ve(e.doc,t.line),i=Gt(r)+Cn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function qn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return qn(r.first,0,null,-1,-1);var i=Ze(r,n),o=r.first+r.size-1;if(i>o)return qn(r.first+r.size-1,Ve(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ve(r,i);;){var s=er(e,l,i,t,n),a=Pt(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=Ve(r,i=u.line)}}function Zn(e,t,n,r){r-=Gn(t);var i=t.text.length,o=oe((function(t){return En(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return En(e,n,t).top>r}),o,i)}}function Qn(e,t,n,r){return n||(n=Nn(e,t)),Zn(e,t,n,Un(e,t,En(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Gt(t);var o=Nn(e,t),l=Gn(t),s=0,a=t.text.length,u=!0,c=ue(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?nr:tr)(e,t,n,o,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,a=u?d.to:d.from-1}var f,h,p=null,m=null,g=oe((function(t){var n=En(e,o,t);return n.top+=l,n.bottom+=l,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,a),v=!1;if(m){var b=r-m.left<m.right-r,y=b==u;g=p+(y?0:1),h=y?"after":"before",f=b?m.left:m.right}else{u||g!=a&&g!=s||g++,h=0==g?"after":g==t.text.length?"before":En(e,o,g-(u?1:0)).bottom+l<=i==u?"after":"before";var x=Kn(e,et(n,g,h),"line",t,o);f=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return qn(n,g=ie(t.text,g,1),h,v,r-f)}function tr(e,t,n,r,i,o,l){var s=oe((function(s){var a=i[s],u=1!=a.level;return Jn(Kn(e,et(n,u?a.to:a.from,u?"before":"after"),"line",t,r),o,l,!0)}),0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Kn(e,et(n,u?a.from:a.to,u?"after":"before"),"line",t,r);Jn(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function nr(e,t,n,r,i,o,l){var s=Zn(e,t,r,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=u||h.to<=a)){var p=En(e,r,1!=h.level?Math.min(u,h.to)-1:Math.max(a,h.from)).right,m=p<o?o-p+1e9:p-o;(!c||d>m)&&(c=h,d=m)}}return c||(c=i[i.length-1]),c.from<a&&(c={from:a,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Dn){Dn=M("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(M("br"));Dn.appendChild(document.createTextNode("x"))}T(e.measure,Dn);var n=Dn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),L(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=M("span","xxxxxxxxxx"),n=M("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:lr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Bt(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function ar(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&qe(e,t)}))}function ur(e,t,n,r){var i=e.display;if(!n&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(e){return null}var a,u=Yn(e,o,l);if(r&&u.xRel>0&&(a=Ve(e.doc,u.line).text).length==u.ch){var c=R(a,a.length,e.options.tabSize)-a.length;u=et(u.line,Math.max(0,Math.round((o-_n(e.display).left)/ir(e.display))-c))}return u}function cr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)jt&&It(e.doc,t)<i.viewTo&&hr(e);else if(n<=i.viewFrom)jt&&Ht(e.doc,n+r)>i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=pr(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var s=pr(e,t,t,-1),a=pr(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function fr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[cr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==H(l,n)&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=cr(e,t),l=e.display.view;if(!jt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(r>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;It(e.doc,n)!=n;){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var s=n.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&br(e,s.head,i),a||xr(e,s,o)}}return r}function br(e,t,n){var r=Kn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(M("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(M("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function yr(e,t){return e.top-t.top||e.left-t.left}function xr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_n(e.display),s=l.left,a=Math.max(r.sizerWidth,Ln(e)-r.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(M("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?a-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var o,l,d=Ve(i,t),f=d.text.length;function h(n,r){return Vn(e,et(t,n),"div",d,r)}function p(t,n,r){var i=Qn(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ue(d,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=h(e,g?"left":"right"),b=h(t-1,g?"right":"left"),y=null==n&&0==e,x=null==r&&t==f,w=0==d,j=!m||d==m.length-1;if(b.top-v.top<=3){var C=(u?x:y)&&j,S=(u?y:x)&&w?s:(g?v:b).left,_=C?a:(g?b:v).right;c(S,v.top,_-S,v.bottom)}else{var k,L,T,M;g?(k=u&&y&&w?s:v.left,L=u?a:p(e,i,"before"),T=u?s:p(t,i,"after"),M=u&&x&&j?a:b.right):(k=u?p(e,i,"before"):s,L=!u&&y&&w?a:v.right,T=!u&&x&&j?s:b.left,M=u?p(t,i,"after"):a),c(k,v.top,L-k,v.bottom),v.bottom<b.top&&c(s,v.bottom,null,b.top),c(T,b.top,M-T,b.bottom)}(!o||yr(v,o)<0)&&(o=v),yr(b,o)<0&&(o=b),(!l||yr(v,l)<0)&&(l=v),yr(b,l)<0&&(l=b)})),{start:o,end:l}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=Ve(i,f.line),m=Ve(i,h.line),g=Rt(p)==Rt(m),v=d(f.line,f.ch,g?p.text.length+1:null).end,b=d(h.line,g?0:null,h.ch).start;g&&(v.top<b.top-2?(c(v.right,v.top,null,v.bottom),c(s,b.top,b.left,b.bottom)):c(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&c(s,v.bottom,null,b.top)}n.appendChild(o)}function wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||_r(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function jr(e){e.state.focused||(e.display.input.focus(),Sr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,_r(e))}),100)}function Sr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,E(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function _r(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,k(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function kr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,a=void 0,u=0;if(!i.hidden){if(l&&s<8){var c=i.node.offsetTop+i.node.offsetHeight;a=c-n,n=c}else{var d=i.node.getBoundingClientRect();a=d.bottom-d.top,!o&&i.text.firstChild&&(u=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=i.line.height-a;if((f>.005||f<-.005)&&(qe(i.line,a),Lr(i.line),i.rest))for(var h=0;h<i.rest.length;h++)Lr(i.rest[h]);if(u>e.display.sizerWidth){var p=Math.ceil(u/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Lr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Tr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Cn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Ze(t,r),l=Ze(t,i);if(n&&n.ensure){var s=n.ensure.from.line,a=n.ensure.to.line;s<o?(o=s,l=Ze(t,Gt(Ve(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=Ze(t,Gt(Ve(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Mr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Tn(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sn(n),a=t.top<r,u=t.bottom>s-r;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,h=Ln(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<f?l.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function Or(e,t){null!=t&&(Er(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ar(e){Er(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nr(e,t,n){null==t&&null==n||Er(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Er(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Dr(e,Xn(e,t.from),Xn(e,t.to),t.margin))}function Dr(e,t,n,r){var i=Mr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Nr(e,i.scrollLeft,i.scrollTop)}function Wr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ai(e,{top:t}),Pr(e,t,!0),n&&ai(e),ri(e,100))}function Pr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Sn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ir=function(e,t,n){this.cm=n;var r=this.vert=M("div",[M("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=M("div",[M("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ir.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ir.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ir.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ir.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new I,this.disableVert=new I},Ir.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Ir.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hr=function(){};function Br(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&kr(e),zr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Gr={native:Ir,null:Hr};function Ur(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Fr(e,t):Wr(e,t)}),e),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)}var $r=0;function Vr(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:++$r},t=e.curOp,ln?ln.ops.push(t):t.ownsGroup=ln={ops:[t],delayedCallbacks:[]}}function Kr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{ln=null,t(n)}}(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,n=0;n<t.length;n++)Xr(t[n]);for(var r=0;r<t.length;r++)qr(t[r]);for(var i=0;i<t.length;i++)Yr(t[i]);for(var o=0;o<t.length;o++)Zr(t[o]);for(var l=0;l<t.length;l++)Qr(t[l])}(e)}))}function Xr(e){var t=e.cm,n=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=kn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&$t(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function qr(e){e.updatedDisplay=e.mustUpdate&&li(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&kr(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=On(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ln(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Zr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Fr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Br(t,e.barMeasure),e.updatedDisplay&&ci(t,e.barMeasure),e.selectionChanged&&wr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&jr(e.cm)}function Qr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&si(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Pr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Fr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=M("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+kn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Kn(e,t),a=n&&n!=t?Kn(e,n):s,u=Mr(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-r,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Wr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Fr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(l=!0)),!l)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||pe(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&pe(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Jr(e,t){if(e.curOp)return t();Vr(e);try{return t()}finally{Kr(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Vr(e);try{return t.apply(e,arguments)}finally{Kr(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Vr(this);try{return e.apply(this,arguments)}finally{Kr(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Vr(t);try{return e.apply(this,arguments)}finally{Kr(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,P(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ht(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,a=dt(e,o,r,!0);s&&(r.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!d&&f<l.length;++f)d=l[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&pt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jr(e,(function(){for(var t=0;t<i.length;t++)fr(e,i[t],"text")}))}}var oi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Tr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ln(e),this.force=n,this.dims=or(e),this.events=[]};function li(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return hr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fi(e)&&(hr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),jt&&(o=It(e.doc,o),l=Ht(e.doc,l));var s=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(cr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,cr(e,n)))),r.viewTo=n}(e,o,l),n.viewOffset=Gt(Ve(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=mr(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=N();if(!t||!A(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&A(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function s(t){var n=t.nextSibling;return a&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d<u.length;d++){var f=u[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;l!=f.node;)l=s(l);var h=i&&null!=t&&t<=c&&f.lineNumber;f.changes&&(H(f.changes,"gutter")>-1&&(h=!1),cn(e,f,c,n)),h&&(L(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Je(e.options,c)))),l=f.node.nextSibling}else{var p=vn(e,f,c,n);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),L(n.cursorDiv),L(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ln(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Sn(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!li(e,t))break;kr(e);var i=Rr(e);gr(e),Br(e,i),ci(e,i),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 ai(e,t){var n=new oi(e,t);if(li(e,n)){kr(e),si(e,n);var r=Rr(e);gr(e),Br(e,r),ci(e,r),n.finish()}}function ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ci(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+kn(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=lr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=o),n[l].gutterBackground&&(n[l].gutterBackground.style.left=o));var s=n[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function fi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Je(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(M("div",[M("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ui(e.display),!0}return!1}function hi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:l})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(e){var t=e.gutters,n=e.gutterSpecs;L(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,l=i.style,s=t.appendChild(M("div",null,"CodeMirror-gutter "+o));l&&(s.style.cssText=l),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ui(e)}function mi(e){pi(e.display),dr(e),di(e)}function gi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=M("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=M("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=O("div",null,"CodeMirror-code"),o.selectionDiv=M("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=M("div",null,"CodeMirror-cursors"),o.measure=M("div",null,"CodeMirror-measure"),o.lineMeasure=M("div",null,"CodeMirror-measure"),o.lineSpace=O("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=O("div",[o.lineSpace],"CodeMirror-lines");o.mover=M("div",[u],null,"position: relative"),o.sizer=M("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=M("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=M("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=M("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=M("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),l&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),a||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=hi(i.gutters,i.lineNumbers),pi(o),r.init(o)}oi.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var vi=0,bi=null;function yi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function xi(e){var t=yi(e);return t.x*=bi,t.y*=bi,t}function wi(e,t){var r=yi(t),i=r.x,o=r.y,l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&b&&a)e:for(var f=t.target,h=l.view;f!=s;f=f.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!n&&!d&&null!=bi)return o&&c&&Wr(e,Math.max(0,s.scrollTop+o*bi)),Fr(e,Math.max(0,s.scrollLeft+i*bi)),(!o||o&&c)&&ye(t),void(l.wheelStartX=null);if(o&&null!=bi){var m=o*bi,g=e.doc.scrollTop,v=g+l.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),ai(e,{top:g,bottom:v})}vi<20&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout((function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(bi=(bi*vi+n)/(vi+1),++vi)}}),200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?bi=-.53:n?bi=15:c?bi=-.7:f&&(bi=-1/3);var ji=function(e,t){this.ranges=e,this.primIndex=t};ji.prototype.primary=function(){return this.ranges[this.primIndex]},ji.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 n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},ji.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ci(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new ji(e,this.primIndex)},ji.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ji.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function Si(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=H(t,i);for(var o=1;o<t.length;o++){var l=t[o],s=t[o-1],a=tt(s.to(),l.from());if(r&&!l.empty()?a>0:a>=0){var u=ot(s.from(),l.from()),c=it(s.to(),l.to()),d=s.empty()?l.from()==l.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Ci(d?c:u,d?u:c))}}return new ji(t,n)}function _i(e,t){return new ji([new Ci(e,t||e)],0)}function ki(e){return e.text?et(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Li(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return ki(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ki(t).ch-t.to.ch),et(n,r)}function Ti(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Ci(Li(i.anchor,t),Li(i.head,t)))}return Si(e.cm,n,e.sel.primIndex)}function Mi(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Oi(e){e.doc.mode=Ie(e.options,e.doc.modeOption),Ai(e)}function Ai(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,ri(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Ni(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ei(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Tt(e),Mt(e,n);var i=r?r(e):1;i!=e.height&&qe(e,i)}(e,n,i,r),an(e,"change",e,t)}function l(e,t){for(var n=[],o=e;o<t;++o)n.push(new Vt(u[o],i(o),r));return n}var s=t.from,a=t.to,u=t.text,c=Ve(e,s.line),d=Ve(e,a.line),f=X(u),h=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Ni(e,t)){var m=l(0,u.length-1);o(d,d.text,h),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(c==d)if(1==u.length)o(c,c.text.slice(0,s.ch)+f+c.text.slice(a.ch),h);else{var g=l(1,u.length-1);g.push(new Vt(f+c.text.slice(a.ch),h,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(d,f+d.text.slice(a.ch),h);var v=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}an(e,"change",e,t)}function Di(e,t,n){!function e(r,i,o){if(r.linked)for(var l=0;l<r.linked.length;++l){var s=r.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;n&&!a||(t(s.doc,a),e(s.doc,r,a))}}}(e,null,!0)}function Wi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ar(e),Oi(e),Pi(e),e.options.lineWrapping||$t(e),e.options.mode=t.modeOption,dr(e)}function Pi(e){("rtl"==e.doc.direction?E:k)(e.display.lineDiv,"CodeMirror-rtl")}function Fi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ri(e,t){var n={from:rt(t.from),to:ki(t),text:Ke(e,t.from,t.to)};return Gi(e,n,t.from.line,t.to.line+1),Di(e,(function(e){return Gi(e,n,t.from.line,t.to.line+1)}),!0),n}function Ii(e){for(;e.length&&X(e).ranges;)e.pop()}function Hi(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Ii(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(i,i.lastOp==r)))l=X(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,l.to)?l.to=ki(t):o.changes.push(Ri(e,t));else{var a=X(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Ri(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||pe(e,"historyAdded")}function Bi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,X(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ii(i.undone)}function zi(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Gi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Ui(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function $i(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ui(n[i]));return r}(e,t),r=kt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],l=r[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(n[i]=l)}return n}function Vi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ji.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];r.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&H(t,Number(c[1]))>-1&&(X(s)[d]=u[d],delete u[d])}}}return r}function Ki(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Ci(i,t)}return new Ci(n||t,t)}function Xi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ji(e,new ji([Ki(e.sel.primary(),t,n,i)],0),r)}function qi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Ki(e.sel.ranges[o],t[o],null,i);Ji(e,Si(e.cm,r,e.sel.primIndex),n)}function Yi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ji(e,Si(e.cm,i,e.sel.primIndex),r)}function Zi(e,t,n,r){Ji(e,_i(t,n),r)}function Qi(e,t,n){var r=e.history.done,i=X(r);i&&i.ranges?(r[r.length-1]=t,eo(e,t,n)):Ji(e,t,n)}function Ji(e,t,n){eo(e,t,n),Bi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function eo(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Ci(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Si(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,ro(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Ar(e.cm)}function to(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),an(e,"cursorActivity",e))}function no(e){to(e,ro(e,e.sel,null,!1))}function ro(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=oo(e,l.anchor,s&&s.anchor,n,r),u=oo(e,l.head,s&&s.head,n,r);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Ci(a,u))}return i?Si(e.cm,i,t.primIndex):t}function io(e,t,n,r,i){var o=Ve(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker,u="selectLeft"in a?!a.selectLeft:a.inclusiveLeft,c="selectRight"in a?!a.selectRight:a.inclusiveRight;if((null==s.from||(u?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(c?s.to>=t.ch:s.to>t.ch))){if(i&&(pe(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(n){var d=a.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(d=lo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=tt(d,n))&&(r<0?f<0:f>0))return io(e,d,t,r,i)}var h=a.find(r<0?-1:1);return(r<0?u:c)&&(h=lo(e,h,r,h.line==t.line?o:null)),h?io(e,h,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,l=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return l||(e.cantEdit=!0,et(e.first,0))}function lo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ve(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function so(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),z)}function ao(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),pe(e,"beforeChange",e,r),e.cm&&pe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function uo(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,uo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=ao(e,t,!0))){var r=wt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=H(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(tt(u.to,s.from)<0||tt(u.from,s.to)>0)){var c=[a,1],d=tt(u.from,s.from),f=tt(u.to,s.to);(d<0||!l.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)co(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ti(e,t);Hi(e,t,n,e.cm?e.cm.curOp.id:NaN),po(e,t,n,kt(e,t));var r=[];Di(e,(function(e,n){n||-1!=H(r,e.history)||(bo(e.history,t),r.push(e.history)),po(e,t,null,kt(e,t))}))}}function fo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,s="undo"==t?o.done:o.undone,a="undo"==t?o.undone:o.done,u=0;u<s.length&&(i=s[u],n?!i.ranges||i.equals(e.sel):i.ranges);u++);if(u!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(zi(i,a),n&&!i.equals(e.sel))return void Ji(e,i,{clearRedo:!1});l=i}var c=[];zi(l,a),a.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!ao(e,r,!1))return s.length=0,{};c.push(Ri(e,r));var o=n?Ti(e,r):X(s);po(e,r,o,$i(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:ki(r)});var l=[];Di(e,(function(e,t){t||-1!=H(l,e.history)||(bo(e.history,r),l.push(e.history)),po(e,r,null,$i(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=f(h);if(p)return p.v}}}}function ho(e,t){if(0!=t&&(e.first+=t,e.sel=new ji(q(e.sel.ranges,(function(e){return new Ci(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)fr(e.cm,r,"gutter")}}function po(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,po)(e,t,n,r);if(t.to.line<e.first)ho(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 i=t.text.length-1-(e.first-t.from.line);ho(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:et(o,Ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Ti(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=Ye(Rt(Ve(r,o.line))),r.iter(a,l.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ei(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(a,o.line+t.text.length,(function(e){var t=Ut(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ve(e,r).stateAfter;if(i&&(!(i instanceof ut)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?dr(e):o.line!=l.line||1!=t.text.length||Ni(e.doc,t)?dr(e,o.line,l.line+1,u):fr(e,o.line,"text");var c=ve(e,"changes"),d=ve(e,"change");if(d||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};d&&an(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,r):Ei(e,t,r),eo(e,n,z),e.cantEdit&&oo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function mo(e,t,n,r,i){var o;r||(r=n),tt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),uo(e,{from:n,to:r,text:t,origin:i})}function go(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)go(o.ranges[s].anchor,t,n,r),go(o.ranges[s].head,t,n,r)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(n<u.from.line)u.from=et(u.from.line+r,u.from.ch),u.to=et(u.to.line+r,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function bo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;vo(e.done,n,r,i),vo(e.undone,n,r,i)}function yo(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ve(e,lt(e,t)):i=Ye(t),null==i?null:(r(o,i)&&e.cm&&fr(e.cm,i,n),o)}function xo(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function wo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Ci.prototype.from=function(){return ot(this.anchor,this.head)},Ci.prototype.to=function(){return it(this.anchor,this.head)},Ci.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Kt(i),an(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},wo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof xo))){var s=[];this.collapse(s),this.children=[new xo(s)],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,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new xo(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++r,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new wo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=H(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new wo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,n))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var jo=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function Co(e,t,n){Gt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Or(e,n)}jo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ye(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=wn(this);qe(n,Math.max(0,n.height-o)),e&&(Jr(e,(function(){Co(e,n,-o),fr(e,r,"widget")})),an(e,"lineWidgetCleared",e,this,r))}},jo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=wn(this)-t;i&&(Bt(this.doc,r)||qe(r,r.height+i),n&&Jr(n,(function(){n.curOp.forceUpdate=!0,Co(n,r,i),an(n,"lineWidgetChanged",n,e,Ye(r))})))},be(jo);var So=0,_o=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++So};function ko(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=F(r)).shared=!1;var o=[ko(e,t,n,r,i)],l=o[0],s=r.widgetNode;return Di(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(ko(e,st(e,t),st(e,n),r,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=X(o)})),new Lo(o,l)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,ko)(e,t,n,r,i);var o=new _o(e,i),l=tt(t,n);if(r&&F(r,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ft(e,t.line,t,n,o)||t.line!=n.line&&Ft(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");jt=!0}o.addToHistory&&Hi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Rt(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(o,a==t.line?t.ch:null,a==n.line?n.ch:null)),++a})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Bt(e,t)&&qe(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++So,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)dr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)fr(u,c,"text");o.atomic&&no(u.doc),an(u,"markerAdded",u,o)}return o}_o.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Vr(e),ve(this,"clear")){var n=this.find();n&&an(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=St(l.markedSpans,this);e&&!this.collapsed?fr(e,Ye(l),"text"):e&&(null!=s.to&&(i=Ye(l)),null!=s.from&&(r=Ye(l))),l.markedSpans=_t(l.markedSpans,s),null==s.from&&this.collapsed&&!Bt(this.doc,l)&&e&&qe(l,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var u=Rt(this.lines[a]),c=Ut(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&an(e,"markerCleared",e,this,r,i),t&&Kr(e),this.parent&&this.parent.clear()}},_o.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=St(o.markedSpans,this);if(null!=l.from&&(n=et(t?o:Ye(o),l.from),-1==e))return n;if(null!=l.to&&(r=et(t?o:Ye(o),l.to),1==e))return r}return n&&{from:n,to:r}},_o.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Jr(r,(function(){var i=t.line,o=Ye(t.line),l=An(r,o);if(l&&(Rn(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Bt(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var a=wn(n)-s;a&&qe(i,i.height+a)}an(r,"markerChanged",r,e)}))},_o.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},_o.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(_o);var Lo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function To(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Mo(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Di(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==H(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Lo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();an(this,"clear")}},Lo.prototype.find=function(e,t){return this.primary.find(e,t)},be(Lo);var Oo=0,Ao=function(e,t,n,r,i){if(!(this instanceof Ao))return new Ao(e,t,n,r,i);null==n&&(n=0),wo.call(this,[new xo([new Vt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=et(n,0);this.sel=_i(o),this.history=new Fi(null),this.id=++Oo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ei(this,{from:o,to:o,text:e}),Ji(this,_i(o),z)};Ao.prototype=Z(wo.prototype,{constructor:Ao,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Xe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;uo(this,{from:t,to:et(n,Ve(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Nr(this.cm,0,0),Ji(this,_i(t),z)})),replaceRange:function(e,t,n,r){mo(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=Ke(this,st(this,e),st(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Qe(this,e))return Ve(this,e)},getLineNumber:function(e){return Ye(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ve(this,e)),Rt(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:ni((function(e,t,n){Zi(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Zi(this,st(this,e),st(this,t||e),n)})),extendSelection:ni((function(e,t,n){Xi(this,st(this,e),t&&st(this,t),n)})),extendSelections:ni((function(e,t){qi(this,at(this,e),t)})),extendSelectionsBy:ni((function(e,t){qi(this,at(this,q(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Ci(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ji(this,Si(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ci(st(this,e),st(this,t||e))),Ji(this,Si(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ke(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ke(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Mi(s.from,i,o),u=Mi(ki(s),i,o);if(i=s.to,o=u,"around"==n){var c=e.sel.ranges[l],d=tt(c.head,c.anchor)<0;r[l]=new Ci(d?u:a,d?a:u)}else r[l]=new Ci(a,a)}return new ji(r,e.sel.primIndex)}(this,r,t),a=r.length-1;a>=0;a--)uo(this,r[a]);s?Qi(this,s):this.cm&&Ar(this.cm)})),undo:ni((function(){fo(this,"undo")})),redo:ni((function(){fo(this,"redo")})),undoSelection:ni((function(){fo(this,"undo",!0)})),redoSelection:ni((function(){fo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Fi(this.history.maxGeneration),Di(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:Vi(this.history.done),undone:Vi(this.history.undone)}},setHistory:function(e){var t=this.history=new Fi(this.history.maxGeneration);t.done=Vi(e.done.slice(0),null,!0),t.undone=Vi(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return yo(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&yo(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Qe(this,e))return null;if(t=e,!(e=Ve(this,e)))return null}else if(null==(t=Ye(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:ni((function(e,t,n){return yo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(S(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return yo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(S(n));if(!o)return!1;var l=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new jo(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),yo(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Bt(e,t)){var r=Gt(t)<e.scrollTop;qe(t,t.height+wn(i)),r&&Or(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&an(o,"lineWidgetAdded",o,i,"number"==typeof t?t:Ye(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ko(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ko(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ve(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||n&&!n(a.marker)||r.push(a.marker.parent||a.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ao(Xe(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,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ao(Xe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(tt(o,l)){var s=ko(e,o,l,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,To(this)),r},unlinkDoc:function(e){if(e instanceof Ll&&(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),Mo(To(this));break}if(e.history==this.history){var n=[e.id];Di(e,(function(e){return n.push(e.id)}),!0),e.history=new Fi(null),e.history.done=Vi(this.history.done,n),e.history.undone=Vi(this.history.undone,n)}},iterLinkedDocs:function(e){Di(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ae(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Jr(t=this.cm,(function(){Pi(t),dr(t)})))}))}),Ao.prototype.eachLine=Ao.prototype.iter;var No=0;function Eo(e){var t=this;if(Do(t),!me(t,e)&&!jn(t.display,e)){ye(e),l&&(No=+new Date);var n=ur(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,a=function(){++s==i&&ei(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};uo(t.doc,e),Qi(t.doc,_i(st(t.doc,n),st(t.doc,ki(e))))}))()},u=function(e,n){if(t.options.allowDropFileTypes&&-1==H(t.options.allowDropFileTypes,e.type))a();else{var r=new FileReader;r.onerror=function(){return a()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),a()},r.readAsText(e)}},c=0;c<r.length;c++)u(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,_i(n,n)),f)for(var h=0;h<f.length;++h)mo(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Do(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Wo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Po=!1;function Fo(){var e;Po||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Wo(Ro)}),100))})),de(window,"blur",(function(){return Wo(_r)})),Po=!0)}function Ro(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Io={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"},Ho=0;Ho<10;Ho++)Io[Ho+48]=Io[Ho+96]=String(Ho);for(var Bo=65;Bo<=90;Bo++)Io[Bo]=String.fromCharCode(Bo);for(var zo=1;zo<=12;zo++)Io[zo+111]=Io[zo+63235]="F"+zo;var Go={};function Uo(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function $o(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=q(n.split(" "),Uo),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=r):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[n]}for(var u in t)e[u]=t[u];return e}function Vo(e,t,n,r){var i=(t=Yo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Vo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var l=Vo(e,t.fallthrough[o],n,r);if(l)return l}}}function Ko(e){var t="string"==typeof e?e:Io[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Xo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(j?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(j?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function qo(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Io[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Xo(n,e,t))}function Yo(e){return"string"==typeof e?Go[e]:e}function Zo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&tt(o.from,X(r).to)<=0;){var l=r.pop();if(tt(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}Jr(e,(function(){for(var t=r.length-1;t>=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Ar(e)}))}function Qo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jo(e,t,n){var r=Qo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function el(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ue(n,t.doc.direction);if(o){var l,s=i<0?X(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Nn(t,n);l=i<0?n.text.length-1:0;var c=En(t,u,l).top;l=oe((function(e){return En(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Qo(n,l,1))}else l=i<0?s.to:s.from;return new et(r,l,a)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Go.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"},Go.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"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.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"]},Go.default=b?Go.macDefault:Go.pcDefault;var tl={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Zo(e,(function(t){if(t.empty()){var n=Ve(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Zo(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Zo(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Zo(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Zo(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},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(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return nl(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return rl(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ve(e.doc,t),r=function(e){for(var t;t=Wt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ye(r)),el(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),U)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),U)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?rl(e,t.head):r}),U)},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=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),l=R(e.getLine(o.line),o.ch,r);t.push(K(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ve(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ve(e.doc,i.line-1).text;l&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),et(i.line-1,l.length-1),i,"+transpose"))}n.push(new Ci(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Ar(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function nl(e,t){var n=Ve(e.doc,t),r=Rt(n);return r!=n&&(t=Ye(r)),el(!0,e,r,t,1)}function rl(e,t){var n=nl(e,t.line),r=Ve(e.doc,n.line),i=ue(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return et(n.line,l?0:o,n.sticky)}return n}function il(e,t,n){if("string"==typeof t&&!(t=tl[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=B}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var ol=new I;function ll(e,t,n,r){var i=e.state.keySeq;if(i){if(Ko(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ol.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),sl(e,i+" "+t,n,r))return!0}return sl(e,t,n,r)}function sl(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Vo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Vo(t,e.options.extraKeys,n,e)||Vo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&an(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(ye(n),wr(e)),!!i}function al(e,t){var n=qo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ll(e,"Shift-"+n,t,(function(t){return il(e,t,!0)}))||ll(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return il(e,t)})):ll(e,n,t,(function(t){return il(e,t)})))}var ul=null;function cl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=N(),me(t,e)))){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=al(t,e);d&&(ul=i?r:null,i||88!=r||Ee||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(k(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n))}E(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function dl(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function fl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||jn(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==ul)return ul=null,void ye(e);if(!d||e.which&&!(e.which<10)||!al(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return ll(e,"'"+n+"'",t,(function(t){return il(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var hl,pl,ml=function(e,t,n){this.time=e,this.pos=t,this.button=n};function gl(e){var t=this,n=t.display;if(!(me(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,jn(n,e))a||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!yl(t,e)){var r=ur(t,e),i=Se(e),o=r?function(e,t){var n=+new Date;return pl&&pl.compare(n,e,t)?(hl=pl=null,"triple"):hl&&hl.compare(n,e,t)?(pl=new ml(n,e,t),hl=null,"double"):(hl=new ml(n,e,t),pl=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ll(e,Xo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=tl[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=B}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){l?setTimeout(P(jr,e),0):e.curOp.focus=N();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=y?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}(e,n,r),u=e.doc.sel;e.options.dragDrop&&Le&&!e.isReadOnly()&&"single"==n&&(i=u.contains(t))>-1&&(tt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=ei(e,(function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",u),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",d),he(i.scroller,"drop",u),o||(ye(t),r.addNew||Xi(e.doc,n,null,null,r.extend),a&&!f||l&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};a&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",u),de(i.wrapper.ownerDocument,"mousemove",c),de(i.scroller,"dragstart",d),de(i.scroller,"drop",u),Cr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;ye(t);var l,s,a=o.sel,u=a.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),l=s>-1?u[s]:new Ci(n,n)):(l=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new Ci(n,n)),n=ur(e,t,!0,!0),s=-1;else{var c=vl(e,n,r.unit);l=r.extend?Ki(l,c.anchor,c.head,r.extend):c}r.addNew?-1==s?(s=u.length,Ji(o,Si(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(Ji(o,Si(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):Yi(o,s,l,G):(s=0,Ji(o,new ji([l],0),G),a=o.sel);var d=n;function f(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],u=e.options.tabSize,c=R(Ve(o,n.line).text,n.ch,u),f=R(Ve(o,t.line).text,t.ch,u),h=Math.min(c,f),p=Math.max(c,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ve(o,m).text,b=$(v,h,u);h==p?i.push(new Ci(et(m,b),et(m,b))):v.length>b&&i.push(new Ci(et(m,b),et(m,$(v,p,u))))}i.length||i.push(new Ci(n,n)),Ji(o,Si(e,a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=l,w=vl(e,t,r.unit),j=x.anchor;tt(w.anchor,j)>0?(y=w.head,j=ot(x.from(),w.anchor)):(y=w.anchor,j=it(x.to(),w.head));var C=a.ranges.slice(0);C[s]=function(e,t){var n=t.anchor,r=t.head,i=Ve(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ue(i);if(!o)return t;var l=se(o,n.ch,n.sticky),s=o[l];if(s.from!=n.ch&&s.to!=n.ch)return t;var a,u=l+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)a=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=se(o,r.ch,r.sticky),d=c-l||(r.ch-n.ch)*(1==s.level?-1:1);a=c==u-1||c==u?d<0:d>0}var f=o[u+(a?-1:0)],h=a==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Ci(new et(n.line,p,m),r)}(e,new Ci(st(o,j),y)),Ji(o,Si(e,C,s),G)}}var h=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(ye(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var l=++p,s=ur(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=N(),f(s);var a=Tr(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(ei(e,(function(){p==l&&t(n)})),150)}else{var u=n.clientY<h.top?-20:n.clientY>h.bottom?20:0;u&&setTimeout(ei(e,(function(){p==l&&(i.scroller.scrollTop+=u,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Ce(e)==n.scroller&&ye(e):2==i?(r&&Xi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function vl(e,t,n){if("char"==n)return new Ci(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ci(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ci(r.from,r.to)}function bl(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ye(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return we(t);o-=s.top-l.viewOffset;for(var a=0;a<e.display.gutterSpecs.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i)return pe(e,n,e,Ze(e.doc,o),e.display.gutterSpecs[a].className,t),we(t)}}function yl(e,t){return bl(e,t,"gutterClick",!0)}function xl(e,t){jn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&bl(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function wl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(e)}ml.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var jl={toString:function(){return"CodeMirror.Init"}},Cl={},Sl={};function _l(e,t,n){if(!t!=!(n&&n!=jl)){var r=e.display.dragFunctions,i=t?de:he;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function kl(e){e.options.lineWrapping?(E(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(k(e.display.wrapper,"CodeMirror-wrap"),$t(e)),ar(e),dr(e),Hn(e),setTimeout((function(){return Br(e)}),100)}function Ll(e,t){var n=this;if(!(this instanceof Ll))return new Ll(e,t);this.options=t=t?F(t):{},F(Cl,t,!1);var r=t.value;"string"==typeof r?r=new Ao(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ll.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,wl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ur(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 I,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),l&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,gl)),de(t.scroller,"dblclick",l&&s<11?ei(e,(function(t){if(!me(e,t)){var n=ur(e,t);if(n&&!yl(e,t)&&!jn(e.display,t)){ye(t);var r=e.findWordAt(n);Xi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return xl(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xl(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!yl(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!jn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!r.prev||o(r,r.prev)?new Ci(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Ci(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),ye(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Wr(e,t.scroller.scrollTop),Fr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return wi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||je(t)},over:function(t){me(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=M("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),je(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-No<100))je(t);else if(!me(e,t)&&!jn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=M("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Eo),leave:function(t){me(e,t)||Do(e)}};var a=t.input.getField();de(a,"keyup",(function(t){return dl.call(e,t)})),de(a,"keydown",ei(e,cl)),de(a,"keypress",ei(e,fl)),de(a,"focus",(function(t){return Sr(e,t)})),de(a,"blur",(function(t){return _r(e,t)}))}(this),Fo(),Vr(this),this.curOp.forceUpdate=!0,Wi(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Sr(n)}),20):_r(this),Sl)Sl.hasOwnProperty(u)&&Sl[u](this,t[u],jl);fi(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Tl.length;++c)Tl[c](this);Kr(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ll.defaults=Cl,Ll.optionHandlers=Sl;var Tl=[];function Ml(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=ht(e,t).state:n="prev");var l=e.options.tabSize,s=Ve(o,t),a=R(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==B||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?R(Ve(o,t-1).text,null,l):0:"add"==n?u=a+e.options.indentUnit:"subtract"==n?u=a-e.options.indentUnit:"number"==typeof n&&(u=a+n),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)f+=l,d+="\t";if(f<u&&(d+=K(u-f)),d!=c)return mo(o,d,et(t,0),et(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<c.length){var g=et(t,c.length);Yi(o,p,new Ci(g,g));break}}}Ll.defineInitHook=function(e){return Tl.push(e)};var Ol=null;function Al(e){Ol=e}function Nl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=+new Date-200,s="paste"==i||e.state.pasteIncoming>l,a=Ae(t),u=null;if(s&&r.ranges.length>1)if(Ol&&Ol.text.join("\n")==t){if(r.ranges.length%Ol.text.length==0){u=[];for(var c=0;c<Ol.text.length;c++)u.push(o.splitLines(Ol.text[c]))}}else a.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=q(a,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ve(o,m.line).text.length,m.ch+X(a).length)):s&&Ol&&Ol.lineWise&&Ol.text.join("\n")==a.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:u?u[f%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};uo(e.doc,g),an(e,"inputRead",e,g)}t&&!s&&Dl(e,t),Ar(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function El(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Jr(t,(function(){return Nl(t,n,0,null,"paste")})),!0}function Dl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=Ml(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ml(e,i.head.line,"smart"));l&&an(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:et(i,0),head:et(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Pl(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Fl(){var e=M("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=M("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Pl(e),t}function Rl(e,t,n,r,i){var o=t,l=n,s=Ve(e,t.line),a=i&&"rtl"==e.direction?-n:n;function u(o){var l,u;if("codepoint"==r){var c=s.text.charCodeAt(t.ch+(r>0?0:-1));l=isNaN(c)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(c>=55296&&c<56320?2:1))),-n)}else l=i?function(e,t,n,r){var i=ue(t,e.doc.direction);if(!i)return Jo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from<n.ch))return Jo(t,n,r);var s,a=function(e,n){return Qo(t,e instanceof et?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(s=s||Nn(e,t),Qn(e,t,s,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?a(n,-1):n.ch);if("rtl"==e.doc.direction||1==l.level){var d=1==l.level==r<0,f=a(n,d?1:-1);if(null!=f&&(d?f<=l.to&&f<=c.end:f>=l.from&&f>=c.begin)){var h=d?"before":"after";return new et(n.line,f,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,a(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?r.begin:a(r.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),r.begin<=u&&u<r.end)return o(u,s)}},m=p(o+r,r,c);if(m)return m;var g=r>0?c.end:a(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,u(g)))?null:m}(e.cm,s,t,n):Jo(s,t,n);if(null==l){if(o||(u=t.line+a)<e.first||u>=e.first+e.size||(t=new et(u,t.ch,t.sticky),!(s=Ve(e,u))))return!1;t=el(i,e.cm,s,t.line,a)}else t=l;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!h))break}var g=oo(e,t,o,l,!0);return nt(o,g)&&(g.hitSide=!0),g}function Il(e,t,n,r){var i,o,l=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Yn(e,s,i)).outside;){if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var Hl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Bl(e,t){var n=An(e,t.line);if(!n||n.hidden)return null;var r=Ve(e.doc,t.line),i=Mn(n,r,t.line),o=ue(r,e.doc.direction),l="left";o&&(l=se(o,t.ch)%2?"right":"left");var s=Pn(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function zl(e,t){return t&&(e.bad=!0),e}function Gl(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return zl(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Ul(o,t,n)}}function Ul(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!A(r,t))return zl(et(Ye(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?X(e.rest):e.line;return zl(et(Ye(o),o.text.length),i)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var a=e.measure,u=a.maps;function c(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?a.map:u[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==n){var c=Ye(i<0?e.line:e.rest[i]),d=o[l]+r;return(r<0||s!=t)&&(d=o[l+(r?1:0)]),et(c,d)}}}var d=c(l,s,n);if(d)return zl(d,i);for(var f=s.nextSibling,h=l?l.nodeValue.length-n:0;f;f=f.nextSibling){if(d=c(f,f.firstChild,0))return zl(et(d.line,d.ch-h),i);h+=f.textContent.length}for(var p=s.previousSibling,m=n;p;p=p.previousSibling){if(d=c(p,p.firstChild,-1))return zl(et(d.line,d.ch+m),i);m+=p.textContent.length}}Hl.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function l(e){if(o(e)&&!me(r,e)){if(r.somethingSelected())Al({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Wl(r);Al({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var l=Ol.text.join("\n");if(e.clipboardData.setData("Text",l),e.clipboardData.getData("Text")==l)return void e.preventDefault()}var s=Fl(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=Ol.text.join("\n");var u=document.activeElement;W(a),setTimeout((function(){r.display.lineSpace.removeChild(s),u.focus(),u==i&&n.showPrimarySelection()}),50)}}Pl(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(i,"paste",(function(e){!o(e)||me(r,e)||El(e,r)||s<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),de(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(i,"touchstart",(function(){return n.forceCompositionEnd()})),de(i,"input",(function(){t.composing||t.readFromDOMSoon()})),de(i,"copy",l),de(i,"cut",l)},Hl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Hl.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Hl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Hl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Hl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=Gl(t,e.anchorNode,e.anchorOffset),s=Gl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=tt(ot(l,s),i)||0!=tt(it(l,s),o)){var a=t.display.view,u=i.line>=t.display.viewFrom&&Bl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&Bl(t,o);if(!c){var d=a[a.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(u&&c){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=_(u.node,u.offset,c.offset,c.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(u.node,u.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Hl.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)},Hl.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Hl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Hl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return A(this.div,t)},Hl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Hl.prototype.blur=function(){this.div.blur()},Hl.prototype.getField=function(){return this.div},Hl.prototype.supportsTouch=function(){return!0},Hl.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Jr(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))}))},Hl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Hl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&c&&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 n=Gl(t,e.anchorNode,e.anchorOffset),r=Gl(t,e.focusNode,e.focusOffset);n&&r&&Jr(t,(function(){Ji(t.doc,_i(n,r),z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Hl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>r.firstLine()&&(l=et(l.line-1,Ve(r.doc,l.line-1).length)),s.ch==Ve(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=cr(r,l.line))?(t=Ye(i.view[0].line),n=i.view[0].node):(t=Ye(i.view[e].line),n=i.view[e-1].node.nextSibling);var a,u,c=cr(r,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=Ye(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",l=!1,s=e.doc.lineSeparator(),a=!1;function u(){l&&(o+=s,a&&(o+=s),l=a=!1)}function c(e){e&&(u(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(et(r,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(h.length&&(o=h[0].find(0))&&c(Ke(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(a=!0),p&&(l=!0)}else 3==t.nodeType&&c(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,a=!1;return o}(r,n,u,t,a)),f=Ke(r.doc,et(t,0),et(a,Ve(r.doc,a).text.length));d.length>1&&f.length>1;)if(X(d)==X(f))d.pop(),f.pop(),a--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var b=X(d),y=X(f),x=Math.min(b.length-(1==d.length?h:0),y.length-(1==f.length?h:0));p<x&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==f.length&&t==l.line)for(;h&&h>l.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)h--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var w=et(t,h),j=et(a,f.length?X(f).length-p:0);return d.length>1||d[0]||tt(w,j)?(mo(r.doc,d,w,j,"+input"),!0):void 0},Hl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Hl.prototype.reset=function(){this.forceCompositionEnd()},Hl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Hl.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))},Hl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,(function(){return dr(e.cm)}))},Hl.prototype.setUneditable=function(e){e.contentEditable="false"},Hl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Nl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Hl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Hl.prototype.onContextMenu=function(){},Hl.prototype.resetPosition=function(){},Hl.prototype.needsContentAttribute=!0;var $l=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null};$l.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Al({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Wl(r);Al({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),W(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||El(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!jn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){jn(e,t)||ye(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},$l.prototype.createField=function(e){this.wrapper=Fl(),this.textarea=this.wrapper.firstChild},$l.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$l.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Kn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$l.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$l.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&W(this.textarea),l&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},$l.prototype.getField=function(){return this.textarea},$l.prototype.supportsTouch=function(){return!1},$l.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},$l.prototype.blur=function(){this.textarea.blur()},$l.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$l.prototype.receivedFocus=function(){this.slowPoll()},$l.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$l.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},$l.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(r.length,i.length);a<u&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return Jr(t,(function(){Nl(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},$l.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$l.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},$l.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=ur(n,e),u=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Ji)(n.doc,_i(o),z);var c,f=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(c=window.scrollY),r.input.focus(),a&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&s>=9&&g(),C){je(e);var m=function(){he(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,l&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},$l.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$l.prototype.setUneditable=function(){},$l.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=jl&&i(e,t,n)}:i)}e.defineOption=n,e.Init=jl,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Oi(e)}),!0),n("indentUnit",2,Oi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ai(e),Hn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=jl&&e.refresh()})),n("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wl(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yo(t),i=n!=jl&&Yo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,kl,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=hi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?lr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Br(e)}),!0),n("scrollbarStyle","native",(function(e){Ur(e),Br(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=hi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(_r(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,_l),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ai,!0),n("addModeClass",!1,Ai,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ai,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ll),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(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"](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Qe(this.doc,e)&&Ml(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ml(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ar(this));else{var o=i.from(),l=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<n;++a)Ml(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&Yi(this.doc,r,new Ci(o,u[r].to()),z)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,Ve(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]<o)){t=n[2*l+2];break}r=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var a=0;a<i._global.length;a++){var u=i._global[a];u.pred(o,this)&&-1==H(r,u.val)&&r.push(u.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ht(this,(e=lt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Kn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Vn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Yn(this,(e=$n(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=$n(this,{top:e,left:0},t||"page").top,Ze(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Ve(this.doc,e)}else r=e;return Un(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Gt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,l,s,a=this.display,u=(e=Kn(this,st(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var d=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Mr(o,l)).scrollTop&&Wr(o,s.scrollTop),null!=s.scrollLeft&&Fr(o,s.scrollLeft))},triggerOnKeyDown:ti(cl),triggerOnKeyPress:ti(fl),triggerOnKeyUp:dl,triggerOnMouseDown:ti(gl),execCommand:function(e){if(tl.hasOwnProperty(e))return tl[e].call(null,this)},triggerElectric:ti((function(e){Dl(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),l=0;l<t&&!(o=Rl(this.doc,o,i,n,r)).hitSide;++l);return o},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Rl(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),U)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Zo(this,(function(n){var i=Rl(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var l=st(this.doc,e),s=0;s<t;++s){var a=Kn(this,l,"div");if(null==o?o=a.left:a.left=o,(l=Il(this,a,i,n)).hitSide)break}return l},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(l){if(o)return e<0?l.from():l.to();var s=Kn(n,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Il(n,s,e,t);return"page"==t&&l==r.sel.primary()&&Or(n,Vn(n,a,"div").top-s.top),a}),U),i.length)for(var l=0;l<r.sel.ranges.length;l++)r.sel.ranges[l].goalColumn=i[l]})),findWordAt:function(e){var t=Ve(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),l=ee(o,i)?function(e){return ee(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&l(t.charAt(n-1));)--n;for(;r<t.length&&l(t.charAt(r));)++r}return new Ci(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?E(this.display.cursorDiv,"CodeMirror-overwrite"):k(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Nr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-kn(this)-this.display.barHeight,width:e.scrollWidth-kn(this)-this.display.barWidth,clientHeight:Tn(this),clientWidth:Ln(this)}},scrollIntoView:ti((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:et(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){Er(e),e.curOp.scrollToPos=t}(this,e):Dr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&In(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){fr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return Jr(this,e)},startOperation:function(){return Vr(this)},endOperation:function(){return Kr(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Hn(this),Nr(this,this.doc.scrollLeft,this.doc.scrollTop),ui(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&ar(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Wi(this,e),Hn(this),this.display.input.reset(),Nr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,an(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}},be(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ll);var Vl="iter insert remove copy getEditor constructor".split(" ");for(var Kl in Ao.prototype)Ao.prototype.hasOwnProperty(Kl)&&H(Vl,Kl)<0&&(Ll.prototype[Kl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ao.prototype[Kl]));return be(Ao),Ll.inputStyles={textarea:$l,contenteditable:Hl},Ll.defineMode=function(e){Ll.defaults.mode||"null"==e||(Ll.defaults.mode=e),Fe.apply(this,arguments)},Ll.defineMIME=function(e,t){Pe[e]=t},Ll.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ll.defineMIME("text/plain","null"),Ll.defineExtension=function(e,t){Ll.prototype[e]=t},Ll.defineDocExtension=function(e,t){Ao.prototype[e]=t},Ll.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ll((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=he,e.on=de,e.wheelEventPixels=xi,e.Doc=Ao,e.splitLines=Ae,e.countColumn=R,e.findColumn=$,e.isWordChar=J,e.Pass=B,e.signal=pe,e.Line=Vt,e.changeEnd=ki,e.scrollbarModel=Gr,e.Pos=et,e.cmpPos=tt,e.modes=We,e.mimeModes=Pe,e.resolveMode=Re,e.getMode=Ie,e.modeExtensions=He,e.extendMode=Be,e.copyState=ze,e.startState=Ue,e.innerMode=Ge,e.commands=tl,e.keyMap=Go,e.keyName=qo,e.isModifierKey=Ko,e.lookupKey=Vo,e.normalizeKeyMap=$o,e.StringStream=$e,e.SharedTextMarker=Lo,e.TextMarker=_o,e.LineWidget=jo,e.e_preventDefault=ye,e.e_stopPropagation=xe,e.e_stop=je,e.addClass=E,e.contains=A,e.rmClass=k,e.keyNames=Io}(Ll),Ll.version="5.58.2",Ll}()},"./node_modules/codemirror/mode/twig/twig.js":function(e,t,n){!function(e){"use strict";e.defineMode("twig:inner",(function(){var e=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],t=/^[+\-*&%=<>!?|~^]/,n=/^[:\[\(\{]/,r=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],i=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return e=new RegExp("(("+e.join(")|(")+"))\\b"),r=new RegExp("(("+r.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(o,l){return function(o,l){var s=o.peek();if(l.incomment)return o.skipTo("#}")?(o.eatWhile(/\#|}/),l.incomment=!1):o.skipToEnd(),"comment";if(l.intag){if(l.operator){if(l.operator=!1,o.match(r))return"atom";if(o.match(i))return"number"}if(l.sign){if(l.sign=!1,o.match(r))return"atom";if(o.match(i))return"number"}if(l.instring)return s==l.instring&&(l.instring=!1),o.next(),"string";if("'"==s||'"'==s)return l.instring=s,o.next(),"string";if(o.match(l.intag+"}")||o.eat("-")&&o.match(l.intag+"}"))return l.intag=!1,"tag";if(o.match(t))return l.operator=!0,"operator";if(o.match(n))l.sign=!0;else if(o.eat(" ")||o.sol()){if(o.match(e))return"keyword";if(o.match(r))return"atom";if(o.match(i))return"number";o.sol()&&o.next()}else o.next();return"variable"}if(o.eat("{")){if(o.eat("#"))return l.incomment=!0,o.skipTo("#}")?(o.eatWhile(/\#|}/),l.incomment=!1):o.skipToEnd(),"comment";if(s=o.eat(/\{|%/))return l.intag=s,"{"==s&&(l.intag="}"),o.eat("-"),"tag"}o.next()}(o,l)}}})),e.defineMode("twig",(function(t,n){var r=e.getMode(t,"twig:inner");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:r,parseDelimiters:!0}):r})),e.defineMIME("text/x-twig","twig")}(n("./node_modules/codemirror/lib/codemirror.js"),n("./node_modules/codemirror/addon/mode/multiplex.js"))}}); //# sourceMappingURL=SeoSettings.min.js.map
/srv/users/craft4/apps/craft4-newsite-space/vendor/ether/seo/src/web/assets/js/SeoSettings.min.js