Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 4.2.3 |
Comparing to | |
See all releases |
Code changes from version 4.2.2 to 4.2.3
- CHANGELOG.md +13 -0
- assets/js/forms-admin.js +35 -26
- assets/js/forms-admin.min.js +1 -1
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 4.2.2 - May 22, 2018
|
5 |
|
6 |
**Fixes**
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 4.2.3 - June 11, 2018
|
5 |
+
|
6 |
+
**Fixes**
|
7 |
+
|
8 |
+
- Don't wrap "agree to terms" input in hyperlink element.
|
9 |
+
- Allow [ENTER] key again after field helper overlay is closed.
|
10 |
+
|
11 |
+
**Improvements**
|
12 |
+
|
13 |
+
- Fallback to meta-refresh if redirect fails because of "headers already sent" error.
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
#### 4.2.2 - May 22, 2018
|
18 |
|
19 |
**Fixes**
|
assets/js/forms-admin.js
CHANGED
@@ -280,20 +280,20 @@ var g = function g(m) {
|
|
280 |
};
|
281 |
|
282 |
generators['terms-checkbox'] = function (config) {
|
283 |
-
var
|
284 |
-
name: config.name(),
|
285 |
-
type: 'checkbox',
|
286 |
-
value: config.value(),
|
287 |
-
required: config.required()
|
288 |
-
}), ' ', config.label()];
|
289 |
-
|
290 |
-
var content = checkbox;
|
291 |
|
292 |
if (config.link().length > 0) {
|
293 |
-
|
|
|
|
|
294 |
}
|
295 |
|
296 |
-
return m('label',
|
|
|
|
|
|
|
|
|
|
|
297 |
};
|
298 |
|
299 |
/**
|
@@ -492,7 +492,7 @@ var FieldHelper = function FieldHelper(m, tabs, editor, fields, events, i18n) {
|
|
492 |
// build DOM for overlay
|
493 |
var form = null;
|
494 |
if (fieldConfig) {
|
495 |
-
form = overlay(
|
496 |
// field wizard
|
497 |
m("div.field-wizard", [
|
498 |
|
@@ -516,7 +516,7 @@ var FieldHelper = function FieldHelper(m, tabs, editor, fields, events, i18n) {
|
|
516 |
}
|
517 |
},
|
518 |
onclick: createFieldHTMLAndAddToForm
|
519 |
-
}, i18n.addToForm)])]), setActiveField);
|
520 |
}
|
521 |
|
522 |
return [fieldsChoice, form];
|
@@ -718,7 +718,7 @@ var FieldFactory = function FieldFactory(fields, i18n) {
|
|
718 |
}, true);
|
719 |
|
720 |
register(category, {
|
721 |
-
name: '
|
722 |
value: 1,
|
723 |
type: "terms-checkbox",
|
724 |
label: i18n.agreeToTerms,
|
@@ -1299,19 +1299,28 @@ var overlay = function overlay(m, i18n) {
|
|
1299 |
return function (content, onCloseCallback) {
|
1300 |
_onCloseCallback = onCloseCallback;
|
1301 |
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1315 |
};
|
1316 |
};
|
1317 |
|
280 |
};
|
281 |
|
282 |
generators['terms-checkbox'] = function (config) {
|
283 |
+
var label = void 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
if (config.link().length > 0) {
|
286 |
+
label = m('a', { href: config.link(), target: "_blank" }, config.label());
|
287 |
+
} else {
|
288 |
+
label = config.label();
|
289 |
}
|
290 |
|
291 |
+
return m('label', [m('input', {
|
292 |
+
name: config.name(),
|
293 |
+
type: 'checkbox',
|
294 |
+
value: config.value(),
|
295 |
+
required: config.required()
|
296 |
+
}), ' ', label]);
|
297 |
};
|
298 |
|
299 |
/**
|
492 |
// build DOM for overlay
|
493 |
var form = null;
|
494 |
if (fieldConfig) {
|
495 |
+
form = m(overlay(
|
496 |
// field wizard
|
497 |
m("div.field-wizard", [
|
498 |
|
516 |
}
|
517 |
},
|
518 |
onclick: createFieldHTMLAndAddToForm
|
519 |
+
}, i18n.addToForm)])]), setActiveField));
|
520 |
}
|
521 |
|
522 |
return [fieldsChoice, form];
|
718 |
}, true);
|
719 |
|
720 |
register(category, {
|
721 |
+
name: 'AGREE_TO_TERMS',
|
722 |
value: 1,
|
723 |
type: "terms-checkbox",
|
724 |
label: i18n.agreeToTerms,
|
1299 |
return function (content, onCloseCallback) {
|
1300 |
_onCloseCallback = onCloseCallback;
|
1301 |
|
1302 |
+
return {
|
1303 |
+
oncreate: function oncreate() {
|
1304 |
+
document.addEventListener('keydown', onKeyDown);
|
1305 |
+
window.addEventListener('resize', position);
|
1306 |
+
},
|
1307 |
+
onremove: function onremove() {
|
1308 |
+
document.removeEventListener('keydown', onKeyDown);
|
1309 |
+
window.removeEventListener('resize', position);
|
1310 |
+
},
|
1311 |
+
view: function view() {
|
1312 |
+
return [m('div.overlay-wrap', m("div.overlay", { oncreate: storeElementReference }, [
|
1313 |
+
// close icon
|
1314 |
+
m('span', {
|
1315 |
+
"class": 'close dashicons dashicons-no',
|
1316 |
+
title: i18n.close,
|
1317 |
+
onclick: close
|
1318 |
+
}), content])), m('div.overlay-background', {
|
1319 |
+
title: i18n.close,
|
1320 |
+
onclick: close
|
1321 |
+
})];
|
1322 |
+
}
|
1323 |
+
};
|
1324 |
};
|
1325 |
};
|
1326 |
|
assets/js/forms-admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function(){function t(r,n,i){function o(l,s){if(!n[l]){if(!r[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};r[l][0].call(d.exports,function(e){var t=r[l][1][e];return o(t||e)},d,d.exports,t,r,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}return t}()({1:[function(e,t,r){"use strict";t.exports=function(e,t){var r={};return r.showType=function(r){var n=r.type();return n=n.charAt(0).toUpperCase()+n.slice(1),e("div",[e("label",t.fieldType),e("span",n)])},r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){var n="hidden"===r.type();return e("div",[e("label",[n?t.value:t.initialValue," ",n?"":e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),n?"":e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)},i=void 0;return r.forceRequired()&&(n.required=!0,n.disabled=!0,i=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",n),t.isFieldRequired]),i])},r.placeholder=function(r){return e("div",[e("label",[t.placeholder," ",e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){var n=[e("option",{value:"select",selected:"select"===r.type()&&"selected"},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()&&"selected"},t.radioButtons)];return r.acceptsMultipleValues&&n.push(e("option",{value:"checkbox",selected:"checkbox"===r.type()&&"selected"},t.checkboxes)),e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},n)])},r.choices=function(r){var n=[];return n.push(e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(n,i){return e("tr",{"data-id":i},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:n.selected(),value:n.value(),title:t.preselect})),e("td.stretch",e("input.widefat",{type:"text",value:n.label(),placeholder:n.title(),onchange:e.withAttr("value",n.label)})),e("td",e("span",{title:t.remove,class:"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,i)},""))])})])])])),n},r.linkToTerms=function(r){return e("div",[e("label",t.agreeToTermsLink),e("input.widefat",{type:"text",value:r.link,onchange:e.withAttr("value",r.link),placeholder:"https://..."})])},r}},{}],2:[function(e,t,r){"use strict";t.exports=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type()&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.label(""),e.wrap(!1),[i.showType(e),i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n["terms-checkbox"]=function(e){return[i.label(e),i.linkToTerms(e),i.isRequired(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n}},{"./field-forms-rows.js":1}],3:[function(e,t,r){"use strict";var n=e("html"),i=function(e){e.dom.checked&&e.dom.setAttribute("checked","true"),e.dom.value&&e.dom.setAttribute("value",e.dom.value),e.dom.selected&&e.dom.setAttribute("selected","true")};t.exports=function(e){var t={};return t.select=function(t){var r={name:t.name(),required:t.required()},n=!1,o=t.choices().map(function(t){return t.selected()&&(n=!0),e("option",{value:t.value()!==t.label()?t.value():void 0,selected:t.selected(),oncreate:i},t.label())}),a=t.placeholder();return a.length>0&&o.unshift(e("option",{disabled:!0,value:"",selected:!n,oncreate:i},a)),e("select",r,o)},t["terms-checkbox"]=function(t){var r=[e("input",{name:t.name(),type:"checkbox",value:t.value(),required:t.required()})," ",t.label()],n=r;return t.link().length>0&&(n=e("a",{href:t.link(),target:"_blank"},r)),e("label",n)},t.checkbox=function(t){return t.choices().map(function(r){var n=t.name()+("checkbox"===t.type()?"[]":""),o=t.required()&&"radio"===t.type();return e("label",[e("input",{name:n,type:t.type(),value:r.value(),checked:r.selected(),required:o,oncreate:i})," ",e("span",r.label())])})},t.radio=t.checkbox,t.default=function(t){var r={type:t.type()};return t.name()&&(r.name=t.name()),t.min()&&(r.min=t.min()),t.max()&&(r.max=t.max()),t.value().length>0&&(r.value=t.value()),t.placeholder().length>0&&(r.placeholder=t.placeholder()),r.required=t.required(),r.oncreate=i,e("input",r)},function(r){var i=void 0,o=void 0,a=void 0,l=document.createElement("div");return i=r.label().length>0&&r.showLabel()?e("label",{},r.label()):"",o="function"==typeof t[r.type()]?t[r.type()](r):t.default(r),a=r.wrap()?e("p",[i,o]):[i,o],e.render(l,a),n.prettyPrint(l.innerHTML)+"\n"}}},{html:22}],4:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function l(e){(c=i.get(e))&&c.choices().length>0&&c.value(c.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function s(){var e=u(c);n.insert(e),l(""),t.redraw()}var c,u=e("./field-generator.js")(t),d=e("./overlay.js")(t,a),f=e("./field-forms.js")(t,a);return n.on("blur",t.redraw),{view:function(){var e=i.getCategories(),r=i.getAll(),n=t("div.available-fields.small-margin",[t("h4",a.chooseField),e.map(function(e){var n=r.filter(function(t){return t.category===e});if(n.length)return t("div.tiny-margin",[t("strong",e),n.map(function(e){var r="button";e.forceRequired()&&(r+=" is-required");var n=e.inFormContent();return null!==n&&(r+=" "+(n?"in-form":"not-in-form")),t("button",{className:r,type:"button",onclick:t.withAttr("value",l),value:e.index},e.title())})])})]),o=null;return c&&(o=d(t("div.field-wizard",[t("h3",[c.title(),c.forceRequired()?t("span.red","*"):"",c.name().length?t("code",c.name()):""]),c.help().length?t("p",t.trust(c.help())):"",f.render(c),t("p",[t("button",{class:"button-primary",type:"button",onkeydown:function(e){13==(e=e||window.event).keyCode&&s()},onclick:s},a.addToForm)])]),l)),[n,o]},controller:function(){}}}},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){"use strict";t.exports=function(e,t){function r(t,r,n){var i=e.register(t,r);n||l.push(i)}function n(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function i(e){var i=t.listFields,o=n(e.field_type),a={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o,choices:e.choices,acceptsMultipleValues:!1};return"address"!==a.type?r(i,a,!1):(r(i,{name:a.name+"[addr1]",type:"text",mailchimpType:"address",title:t.streetAddress}),r(i,{name:a.name+"[city]",type:"text",mailchimpType:"address",title:t.city}),r(i,{name:a.name+"[state]",type:"text",mailchimpType:"address",title:t.state}),r(i,{name:a.name+"[zip]",type:"text",mailchimpType:"address",title:t.zip}),r(i,{name:a.name+"[country]",type:"select",mailchimpType:"address",title:t.country,choices:mc4wp_vars.countries})),!0}function o(e){var i=t.interestCategories,o=n(e.field_type);r(i,{title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o},!1)}function a(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e.public&&!t.public?-1:!e.public&&t.public?1:0}),e.merge_fields.forEach(i),e.interest_categories.forEach(o)}var l=[];return{registerCustomFields:function(e){var n,i=t.formFields;r(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),n={};for(var o in e)n[e[o].id]=e[o].name;r(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:n,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),n={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},r(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:n,value:"subscribe",help:t.formActionDescription},!0),r(i,{name:"_mc4wp_agree_to_terms",value:1,type:"terms-checkbox",label:t.agreeToTerms,title:t.agreeToTermsShort,showLabel:!1,required:!0},!0)},registerListFields:a,registerListsFields:function(t){l.forEach(e.deregister),t.forEach(a)}}}},{}],6:[function(e,t,r){"use strict";var n=e("mithril/stream");t.exports=function(e,t){function r(e,t){return o.filter(function(r){return r[e]()===t})}var i,o=[],a=[],l=function(e){this.name=n(e.name),this.title=n(e.title||e.name),this.type=n(e.type),this.mailchimpType=n(e.mailchimpType||""),this.label=n(e.label||e.title||""),this.showLabel=n(void 0===e.showLabel||e.showLabel),this.value=n(e.value||""),this.placeholder=n(e.placeholder||""),this.required=n(e.required||!1),this.forceRequired=n(e.forceRequired||!1),this.wrap=n(void 0===e.wrap||e.wrap),this.min=n(e.min||null),this.max=n(e.max||null),this.help=n(e.help||""),this.choices=n(e.choices||[]),this.inFormContent=n(null),this.acceptsMultipleValues=e.acceptsMultipleValues,this.link=n(e.link||""),this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},s=function(e){this.label=n(e.label),this.title=n(e.title||e.label),this.selected=n(e.selected||!1),this.value=n(e.value||e.label)};return{get:function(e){return o[e]},getAll:function(){return o=o.map(function(e,t){return e.index=t,e})},getCategories:function(){return a},deregister:function(t){var r=o.indexOf(t);r>-1&&(delete o[r],e.redraw())},register:function(n,c){var u,d=r("name",c.name).shift();if(!d)return c.choices&&(c.choices=function(e){return"function"==typeof e.map?e.map(function(e){return new s({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new s({label:r,value:t})})}(c.choices),c.value&&(c.choices=c.choices.map(function(e){return e.value()===c.value&&e.selected(!0),e}))),a.indexOf(n)<0&&a.push(n),u=new l(c),u.category=n,o.push(u),i&&window.clearTimeout(i),i=window.setTimeout(e.redraw,200),t.trigger("fields.change"),u;!d.forceRequired()&&c.forceRequired&&d.forceRequired(!0)},getAllWhere:r}}},{"mithril/stream":23}],7:[function(e,t,r){"use strict";function n(){var e=h.contentDocument||h.contentWindow.document;(s=e.querySelector(".mc4wp-form-fields"))&&i()}function i(){var e=c.getValue();e=e.replace(p,"").replace(p,""),s.innerHTML=e,s.dispatchEvent(new Event("mc4wp-refresh"))}function o(){return d&&(u.innerHTML=c.getValue().toLowerCase(),d=!1),u}var a=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/edit/matchtags.js"),e("codemirror/addon/edit/closetag.js"),e("codemirror/addon/selection/active-line.js"),e("codemirror/addon/edit/matchbrackets.js");var l,s,c={},u=document.createElement("form"),d=!1,f=document.getElementById("mc4wp-form-content"),h=document.getElementById("mc4wp-form-preview"),p=/\{[^{}]+\}/g;window.addEventListener("load",function(){a.signal(l,"change")}),f.addEventListener("change",function(){d=!0,i()}),c.getValue=function(){return l?l.getValue():f.value},c.query=function(e){return o().querySelectorAll(e.toLowerCase())},c.containsField=function(e){return null!==o().elements.namedItem(e.toLowerCase())},c.insert=function(e){l?(l.replaceSelection(e),l.focus()):f.value+=e},c.on=function(e,t){return l?(e="input"===e?"changes":e,l.on(e,t)):f.addEventListener(e,t)},c.refresh=function(){l&&l.refresh()},u.innerHTML=f.value.toLowerCase(),a&&(l=a.fromTextArea(f,{selectionPointer:!0,mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0,styleActiveLine:!0,matchBrackets:!0,matchTags:{bothTags:!0}}),window.dispatchEvent&&l.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});f.dispatchEvent(e)}})),h.addEventListener("load",n),n.call(),t.exports=c},{codemirror:17,"codemirror/addon/edit/closetag.js":12,"codemirror/addon/edit/matchbrackets.js":13,"codemirror/addon/edit/matchtags.js":14,"codemirror/addon/fold/xml-fold.js":15,"codemirror/addon/selection/active-line.js":16,"codemirror/mode/css/css":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/xml/xml":21}],8:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,i,o){function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);if(e.inFormContent(n),"address"===e.mailchimpType()){e.originalRequiredValue=void 0===e.originalRequiredValue?e.forceRequired():e.originalRequiredValue;var i=e.name().replace(/\[(\w+)\]/g,"");t.query('[name^="'+i+'"]').length>0?(void 0===e.originalRequiredValue&&(e.originalRequiredValue=e.forceRequired()),e.forceRequired(!0)):e.forceRequired(e.originalRequiredValue)}}}),function(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase().replace(/\[(\w+)\]/g,".$1")}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name;if(r&&!(r.length<0)&&"_"!==r[0]){var n=(r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/\[\]$/,"")).indexOf(".");n=n>0?n:r.length,r=r.substr(0,n).toUpperCase()+r.substr(n),-1===e.indexOf(r)&&e.push(r)}}),l.value=e.join(",")}(),e.redraw()}var l=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))}},{}],9:[function(e,t,r){"use strict";function n(e,t){a[e]=t,o()}function i(e){delete a[e],o()}function o(){var e="";for(var t in a)e+='<div class="notice notice-warning inline"><p>'+a[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){(r=document.createElement("div")).className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}var a={};t.exports={init:function(e,t){var r=function(){e.getValue().toLowerCase().indexOf('name="groupings')>-1?n("deprecated_groupings","Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly."):i("deprecated_groupings")},o=function(){var r=t.getAllWhere("forceRequired",!0).filter(function(t){return!e.containsField(t.name().toUpperCase())}),o="<strong>Heads up!</strong> Your form is missing list fields that are required in MailChimp. Either add these fields to your form or mark them as optional in MailChimp.";o+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+r.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",r.length>0?n("required_fields_missing",o):i("required_fields_missing")};r(),e.on("focus",r),e.on("blur",r),o(),e.on("blur",o),e.on("focus",o)}}},{}],10:[function(e,t,r){"use strict";t.exports=function(e,t){function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),l()}function n(e){27==(e=e||window.event).keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(a){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-a.clientWidth-40)/2,n=(t-a.clientHeight-40)/2;a.style.left=(r>0?r:0)+"px",a.style.top=(n>0?n:0)+"px"}}function o(e){a=e.dom,i()}var a=void 0,l=void 0;return function(a,s){return l=s,document.addEventListener("keydown",n),window.addEventListener("resize",i),[e("div.overlay-wrap",e("div.overlay",{oncreate:o},[e("span",{class:"close dashicons dashicons-no",title:t.close,onclick:r}),a])),e("div.overlay-background",{title:t.close,onclick:r})]}}},{}],11:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),f=e("./admin/fields-factory.js"),h=e("./admin/fields.js")(i,o),p=window.formEditor=u,m=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),g=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),m);var v=new f(h,n);o.on("selectedLists.change",v.registerListsFields),v.registerListsFields(a.getSelectedLists()),v.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),g.init(p,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=p,window.mc4wp.forms.fields=h},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8,"./admin/notices":9}],12:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t,r){for(var i=t.listSelections(),o=[],a=r?"/":"</",l=0;l<i.length;l++){if(!i[l].empty())return e.Pass;var s=i[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var f;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)f=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;f=a+"style"}else{if(!d.context||!d.context.tagName||n(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),o[l]=f}t.replaceSelections(o),i=t.listSelections();for(l=0;l<i.length;l++)(l==i.length-1||i[l].head.line<i[l+1].head.line)&&t.indentLine(i[l].head.line)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function n(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;u<c;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(a,l,s){if(s!=e.Init&&s&&a.removeKeyMap("autoCloseTags"),l){var c={name:"autoCloseTags"};("object"!=typeof l||l.whenClosing)&&(c["'/'"]=function(r){return function(r){return r.getOption("disableInput")?e.Pass:t(r,!0)}(r)}),("object"!=typeof l||l.whenOpening)&&(c["'>'"]=function(t){return function(t){if(t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),l=[],s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var c=a[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),f=d.state;if("xml"!=d.mode.name||!f.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,m="object"==typeof h&&h.dontCloseTags||p&&i,g="object"==typeof h&&h.indentTags||p&&o,v=f.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==f.type||u.string.indexOf("/")==u.string.length-1||m&&r(m,y)>-1||n(t,v,c,f,!0))return e.Pass;var b=g&&r(g,y)>-1;l[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(s=a.length-1;s>=0;s--){var w=l[s];t.replaceRange(w.text,a[s].head,a[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}(t)}),a.addKeyMap(c)}});var i=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],o=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return t(e)}})},{"../../lib/codemirror":17,"../fold/xml-fold":15}],13:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){function t(e,t,n){var i=e.getLineHandle(t.line),o=t.ch-1,s=n&&n.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&o>=0&&l[i.text.charAt(o)]||l[i.text.charAt(++o)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(n&&n.strict&&u>0!=(o==t.ch))return null;var d=e.getTokenTypeAt(a(t.line,o+1)),f=r(e,a(t.line,o+(u>0?1:0)),u,d||null,n);return null==f?null:{from:a(t.line,o),to:f&&f.pos,match:f&&f.ch==c.charAt(0),forward:u>0}}function r(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,s=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,d=r>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),f=t.line;f!=d;f+=r){var h=e.getLine(f);if(h){var p=r>0?0:h.length-1,m=r>0?h.length:-1;if(!(h.length>o))for(f==t.line&&(p=t.ch-(r<0?1:0));p!=m;p+=r){var g=h.charAt(p);if(u.test(g)&&(void 0===n||e.getTokenTypeAt(a(f,p+1))==n)){if(">"==l[g].charAt(1)==r>0)c.push(g);else{if(!c.length)return{pos:a(f,p),ch:g};c.pop()}}}}}return f-r!=(r>0?e.lastLine():e.firstLine())&&null}function n(e,r,n){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c<s.length;c++){var u=s[c].empty()&&t(e,s[c].head,n);if(u&&e.getLine(u.from.line).length<=i){var d=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:d})),u.to&&e.getLine(u.to.line).length<=i&&l.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:d}))}}if(l.length){o&&e.state.focused&&e.focus();var f=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!r)return f;setTimeout(f,800)}}function i(e){e.operation(function(){s&&(s(),s=null),s=n(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,r,n){n&&n!=e.Init&&(t.off("cursorActivity",i),s&&(s(),s=null)),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){n(this,!0)}),e.defineExtension("findMatchingBracket",function(e,r,n){return(n||"boolean"==typeof r)&&(n?(n.strict=r,r=n):r=r?{strict:!0}:null),t(this,e,r)}),e.defineExtension("scanForBracket",function(e,t,n,i){return r(this,e,t,n,i)})})},{"../../lib/codemirror":17}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":17,"../fold/xml-fold":15}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function r(e,t){var r=e.cm.getTokenTypeAt(d(e.line,t));return r&&/\btag\b/.test(r)}function n(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function o(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(n(e))continue;return}{if(r(e,t+1)){var i=e.text.lastIndexOf("/",t),o=i>-1&&!/\S/.test(e.text.slice(i+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(i(e))continue;return}if(r(e,t+1)){h.lastIndex=t,e.ch=t;var n=h.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){h.lastIndex=e.ch;var t=h.exec(e.text);if(!t){if(n(e))continue;return}{if(r(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(i(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t}}}function c(e,t){for(var r=[];;){var n,i=l(e),a=e.line,s=e.ch-(i?i[0].length:0);if(!i||!(n=o(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:d(a,s),to:d(e.line,e.ch)}}else r.push(i[2])}}function u(e,t){for(var r=[];;){var n=s(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,l=a(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var c=r.length-1;c>=0;--c)if(r[c]==l[2]){r.length=c;break}if(c<0&&(!t||t==l[2]))return{tag:l[2],from:d(e.line,e.ch),to:d(i,o)}}}else a(e)}}var d=e.Pos,f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",h=new RegExp("<(/?)(["+f+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,r){for(var n=new t(e,r.line,0);;){var i,a=l(n);if(!a||n.line!=r.line||!(i=o(n)))return;if(!a[1]&&"selfClose"!=i){var s=d(n.line,n.ch),u=c(n,a[2]);return u&&{from:s,to:u.from}}}}),e.findMatchingTag=function(e,r,n){var i=new t(e,r.line,r.ch,n);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=o(i),s=l&&d(i.line,i.ch),f=l&&a(i);if(l&&f&&!(function(e,t){return e.line-t.line||e.ch-t.ch}(i,r)>0)){var h={from:d(i.line,i.ch),to:s,tag:f[2]};return"selfClose"==l?{open:h,close:null,at:"open"}:f[1]?{open:u(i,f[2]),close:h,at:"close"}:(i=new t(e,s.line,s.ch,n),{open:h,close:c(i,f[2]),at:"open"})}}},e.findEnclosingTag=function(e,r,n,i){for(var o=new t(e,r.line,r.ch,n);;){var a=u(o,i);if(!a)break;var l=c(new t(e,r.line,r.ch,n),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,r,n,i){return c(new t(e,r.line,r.ch,i?{from:0,to:i}:null),n)}})},{"../../lib/codemirror":17}],16:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",i),e.removeLineClass(e.state.activeLines[t],"background",o),e.removeLineClass(e.state.activeLines[t],"gutter",a)}function r(e,r){for(var n=[],l=0;l<r.length;l++){var s=r[l],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?s.anchor.line==s.head.line:s.empty()){var u=e.getLineHandleVisualStart(s.head.line);n[n.length-1]!=u&&n.push(u)}}(function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0})(e.state.activeLines,n)||e.operation(function(){t(e);for(var r=0;r<n.length;r++)e.addLineClass(n[r],"wrap",i),e.addLineClass(n[r],"background",o),e.addLineClass(n[r],"gutter",a);e.state.activeLines=n})}function n(e,t){r(e,t.ranges)}var i="CodeMirror-activeline",o="CodeMirror-activeline-background",a="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(i,o,a){var l=a!=e.Init&&a;o!=l&&(l&&(i.off("beforeSelectionChange",n),t(i),delete i.state.activeLines),o&&(i.state.activeLines=[],r(i,i.listSelections()),i.on("beforeSelectionChange",n)))})})},{"../../lib/codemirror":17}],17:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.CodeMirror=i()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"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 i(e,t,r,i){var o=n(e,t,r,i);return o.setAttribute("role","presentation"),o}function o(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 a(){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 l(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function s(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function u(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function d(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}function f(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function h(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;wo.length<=e;)wo.push(m(wo)+" ");return wo[e]}function m(e){return e[e.length-1]}function g(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function v(){}function y(e,t){var r;return Object.create?r=Object.create(e):(v.prototype=e,r=new v),t&&u(t,r),r}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||xo.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function k(e){return e.charCodeAt(0)>=768&&ko.test(e)}function C(e,t,r){for(;(r<0?t>0:t<e.length)&&k(e.charAt(t));)t+=r;return t}function T(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function S(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function L(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function M(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function A(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function O(e){if(null==e.parent)return null;for(var t=e.parent,r=f(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function N(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return r+a}function _(e,t){return t>=e.first&&t<e.first+e.size}function E(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function W(e,t,r){if(void 0===r&&(r=null),!(this instanceof W))return new W(e,t,r);this.line=e,this.ch=t,this.sticky=r}function F(e,t){return e.line-t.line||e.ch-t.ch}function D(e,t){return e.sticky==t.sticky&&0==F(e,t)}function z(e){return W(e.line,e.ch)}function P(e,t){return F(e,t)<0?t:e}function H(e,t){return F(e,t)<0?e:t}function I(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function j(e,t){if(t.line<e.first)return W(e.first,0);var r=e.first+e.size-1;return t.line>r?W(r,S(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?W(e.line,t):r<0?W(e.line,0):e}(t,S(e,t.line).text.length)}function R(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=j(e,t[n]);return r}function B(e,t,r){this.marker=e,this.from=t,this.to=r}function q(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function U(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function K(e,t){if(t.full)return null;var r=_(e,t.from.line)&&S(e,t.from.line).markedSpans,n=_(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==F(t.from,t.to),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new B(a,o.from,l?null:o.to))}}return n}(r,i,a),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new B(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=m(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=q(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];if(null!=g.to&&(g.to+=u),null==g.from){q(l,g.marker)||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=V(l)),s&&s!=l&&(s=V(s));var v=[l];if(!c){var y,b=t.text.length-2;if(b>0&&l)for(var w=0;w<l.length;++w)null==l[w].to&&(y||(y=[])).push(new B(l[w].marker,null,null));for(var x=0;x<b;++x)v.push(y);v.push(s)}return v}function V(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function G(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function $(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Y(e){return e.inclusiveLeft?-1:0}function X(e){return e.inclusiveRight?1:0}function Z(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=F(n.from,i.from)||Y(e)-Y(t);if(o)return-o;var a=F(n.to,i.to)||X(e)-X(t);return a||t.id-e.id}function J(e,t){var r,n=To&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Z(r,i.marker)<0)&&(r=i.marker);return r}function Q(e){return J(e,!0)}function ee(e){return J(e,!1)}function te(e,t,r,n,i){var o=S(e,t),a=To&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=F(c.from,r)||Y(s.marker)-Y(i),d=F(c.to,n)||X(s.marker)-X(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?F(c.to,r)>=0:F(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?F(c.from,n)<=0:F(c.from,n)<0)))return!0}}}function re(e){for(var t;t=Q(e);)e=t.find(-1,!0).line;return e}function ne(e,t){var r=S(e,t),n=re(r);return r==n?t:O(n)}function ie(e,t){if(t>e.lastLine())return t;var r,n=S(e,t);if(!oe(e,n))return t;for(;r=ee(n);)n=r.find(1,!0).line;return O(n)+1}function oe(e,t){var r=To&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ae(e,t,n))return!0}}function ae(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ae(e,n.line,q(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.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==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ae(e,t,i))return!0}function le(e){for(var t=0,r=(e=re(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function se(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Q(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ee(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function ce(e){var t=e.display,r=e.doc;t.maxLine=S(r,r.first),t.maxLineLength=se(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=se(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function ue(e,t,r){var n;So=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"==r?n=i:So=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:So=i)}return null!=n?n:So}function de(e,t){var r=e.order;return null==r&&(r=e.order=Lo(e.text,t)),r}function fe(e,t){return e._handlers&&e._handlers[t]||Mo}function he(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=f(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var r=fe(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,r||t.type,e,t),xe(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==f(r,t[n])&&r.push(t[n])}function ve(e,t){return fe(e,t).length>0}function ye(e){e.prototype.on=function(e,t){Ao(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){be(e),we(e)}function Ce(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ro&&e.ctrlKey&&1==t&&(t=3),t}function Se(e){if(null==ho){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ho=t.offsetWidth<=1&&t.offsetHeight>2&&!(Ui&&Ki<8))}var i=ho?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Le(e){if(null!=po)return po;var n=r(e,document.createTextNode("AخA")),i=ao(n,0,1).getBoundingClientRect(),o=ao(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(po=o.right-i.right<3)}function Me(e){if("string"==typeof e&&Do.hasOwnProperty(e))e=Do[e];else if(e&&"string"==typeof e.name&&Do.hasOwnProperty(e.name)){var t=Do[e.name];"string"==typeof t&&(t={name:t}),(e=y(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Me("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Me("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ae(e,t){t=Me(t);var r=Fo[t.name];if(!r)return Ae(e,"text/plain");var n=r(e,t);if(zo.hasOwnProperty(t.name)){var i=zo[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}function Oe(e,t){u(t,zo.hasOwnProperty(e)?zo[e]:zo[e]={})}function Ne(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function _e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ee(e,t,r){return!e.startState||e.startState(t,r)}function We(e,t,r,n){var i=[e.state.modeGen],o={};Re(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=r.state,l=function(n){r.baseTokens=i;var l=e.state.overlays[n],s=1,c=0;r.state=!0,Re(e,t.text,l.mode,r,function(e,t){for(var r=s;c<e;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Fe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=De(e,O(t)),i=t.text.length>e.options.maxHighlightLength&&Ne(e.doc.mode,n.state),o=We(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function De(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Io(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=S(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof Ho?c.lookAhead:0)<=o.modeFrontier))return l;var u=d(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}(e,t,r),a=o>n.first&&S(n,o-1).stateAfter,l=a?Io.fromSaved(n,a,o):new Io(n,Ee(n.mode),o);return n.iter(o,t,function(r){ze(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function ze(e,t,r,n){var i=e.doc.mode,o=new Po(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Pe(i,r.state);!o.eol();)He(i,o,r.state),o.start=o.pos}function Pe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=_e(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function He(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=_e(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Ie(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=S(a,(t=j(a,t)).line),c=De(e,t.line,r),u=new Po(s.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=He(l,u,c.state),n&&o.push(new jo(u,i,Ne(a.mode,c.state)));return n?o:new jo(u,i,c.state)}function je(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Re(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Po(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&je(Pe(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&ze(e,t,n,d.pos),d.pos=t.length,s=null):s=je(He(r,d,n.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Be(e){e.parent=null,G(e)}function qe(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Uo:qo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ue(e,t){var r=i("span",null,null,Vi?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Ui||Vi)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,l=void 0;n.pos=0,n.addToken=Ve,Le(e.display.measure)&&(l=de(a,e.doc.direction))&&(n.addToken=function(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}(n.addToken,l)),n.map=[];!function(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),qe(r[a+1],t.cm.options));return}for(var l,s,c,u,d,f,h,p=i.length,m=0,g=1,v="",y=0;;){if(y==m){c=u=d=f=s="",h=null,y=1/0;for(var b=[],w=void 0,x=0;x<n.length;++x){var k=n[x],C=k.marker;"bookmark"==C.type&&k.from==m&&C.widgetNode?b.push(C):k.from<=m&&(null==k.to||k.to>m||C.collapsed&&k.to==m&&k.from==m)?(null!=k.to&&k.to!=m&&y>k.to&&(y=k.to,u=""),C.className&&(c+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&k.from==m&&(d+=" "+C.startStyle),C.endStyle&&k.to==y&&(w||(w=[])).push(C.endStyle,k.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||Z(h.marker,C)<0)&&(h=k)):k.from>m&&y>k.from&&(y=k.from)}if(w)for(var T=0;T<w.length;T+=2)w[T+1]==y&&(u+=" "+w[T]);if(!h||h.from==m)for(var S=0;S<b.length;++S)Ge(t,0,b[S]);if(h&&(h.from||0)==m){if(Ge(t,(null==h.to?p+1:h.to)-m,h.marker,null==h.from),null==h.to)return;h.to==m&&(h=!1)}}if(m>=p)break;for(var L=Math.min(p,y);;){if(v){var M=m+v.length;if(!h){var A=M>L?v.slice(0,L-m):v;t.addToken(t,A,l?l+c:c,d,m+A.length==y?u:"",f,s)}if(M>=L){v=v.slice(L-m),m=L;break}m=M,d=""}v=i.slice(o,o=r[g++]),l=qe(r[g++],t.cm.options)}}}(a,n,Fe(e,a,t!=e.display.externalMeasured&&O(a))),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=s(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=s(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Se(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Vi){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=s(n.pre.className,n.textClass||"")),n}function Ke(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ve(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){s=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var h=u.exec(t),m=h?h.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));Ui&&Ki<9?s.appendChild(n("span",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;f+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=s.appendChild(n("span",p(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=s.appendChild(n("span","\r"==h[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),Ui&&Ki<9?s.appendChild(n("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),Ui&&Ki<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||i||o||d||l){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[s],w,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(s)}}function Ge(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function $e(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=ee(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?O(m(this.rest))-r+1:1,this.node=this.text=null,this.hidden=oe(e,t)}function Ye(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new $e(e.doc,S(e.doc,o),o);n=o+a.size,i.push(a)}return i}function Xe(e,t){var r=fe(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);Ko?n=Ko.delayedCallbacks:Vo?n=Vo:(n=Vo=[],setTimeout(Ze,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function Ze(){var e=Vo;Vo=null;for(var t=0;t<e.length;++t)e[t]()}function Je(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?function(e,t){var r=t.text.className,n=et(e,t);t.text==t.node&&(t.node=n.pre);t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,tt(e,t)):r&&(t.text.className=r)}(e,t):"gutter"==o?rt(e,t,r,n):"class"==o?tt(e,t):"widget"==o&&function(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);it(e,t,r)}(e,t,n)}t.changes=null}function Qe(e){return e.node==e.text&&(e.node=n("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Ui&&Ki<8&&(e.node.style.zIndex=2)),e.node}function et(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ue(e,t)}function tt(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=Qe(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?Qe(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function rt(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Qe(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=Qe(t),s=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(n("div",E(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.options.gutters.length;++c){var u=e.options.gutters[c],d=a.hasOwnProperty(u)&&a[u];d&&s.appendChild(n("div",[d],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function nt(e,t,r,n){var i=et(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),tt(e,t),rt(e,t,r,n),it(e,t,n),t.node}function it(e,t,r){if(ot(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)ot(e,t.rest[n],t,r,!1)}function ot(e,t,r,i,o){if(t.widgets)for(var a=Qe(r),l=0,s=t.widgets;l<s.length;++l){var c=s[l],u=n("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),function(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),Xe(c,"redraw")}}function at(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function lt(e,t){for(var r=Ce(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function st(e){return e.lineSpace.offsetTop}function ct(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ut(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function dt(e){return mo-e.display.nativeBarWidth}function ft(e){return e.display.scroller.clientWidth-dt(e)-e.display.barWidth}function ht(e){return e.display.scroller.clientHeight-dt(e)-e.display.barHeight}function pt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(O(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function mt(e,t,r,n){return yt(e,vt(e,t),r,n)}function gt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ut(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function vt(e,t){var n=O(t),i=gt(e,n);i&&!i.text?i=null:i&&i.changes&&(Je(e,i,n,It(e)),e.curOp.forceUpdate=!0),i||(i=function(e,t){var n=O(t=re(t)),i=e.display.externalMeasured=new $e(e.doc,t,n);i.lineN=n;var o=i.built=Ue(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}(e,t));var o=pt(i,t,n);return{line:t,view:i,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function yt(e,t,i,o,a){t.before&&(i=-1);var l,s=i+(o||"");return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&ft(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function(e,t,i,o){var a,l=bt(t.map,i,o),s=l.node,c=l.start,u=l.end,d=l.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&k(t.line.text.charAt(l.coverStart+c));)--c;for(;l.coverStart+u<l.coverEnd&&k(t.line.text.charAt(l.coverStart+u));)++u;if((a=Ui&&Ki<9&&0==c&&u==l.coverEnd-l.coverStart?s.parentNode.getBoundingClientRect():wt(ao(s,c,u).getClientRects(),o)).left||a.right||0==c)break;u=c,c-=1,d="right"}Ui&&Ki<11&&(a=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Wo)return Wo;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=ao(t,0,1).getBoundingClientRect();return Wo=Math.abs(i.left-o.left)>1}(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*o,bottom:t.bottom*o}}(e.display.measure,a))}else{c>0&&(d=o="right");var h;a=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==o?h.length-1:0]:s.getBoundingClientRect()}if(Ui&&Ki<9&&!c&&(!a||!a.left&&!a.right)){var p=s.parentNode.getClientRects()[0];a=p?{left:p.left,right:p.left+Ht(e.display),top:p.top,bottom:p.bottom}:Go}for(var m=a.top-t.rect.top,g=a.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==d?a.right:a.left)-t.rect.left,right:("left"==d?a.left:a.right)-t.rect.left,top:w,bottom:x};a.left||a.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=m,C.rbottom=g);return C}(e,t,i,o)).bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:a?l.rtop:l.top,bottom:a?l.rbottom:l.bottom}}function bt(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function wt(e,t){var r=Go;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function xt(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 kt(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)xt(e.display.view[r])}function Ct(e){kt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Tt(){return $i&&eo?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function St(){return $i&&eo?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Lt(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=at(e.widgets[r]));return t}function Mt(e,t,r,n,i){if(!i){var o=Lt(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=le(t);if("local"==n?a+=st(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:St());var s=l.left+("window"==n?0:Tt());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function At(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Tt(),i-=St();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Ot(e,t,r,n,i){return n||(n=S(e.doc,t.line)),Mt(e,n,mt(e,n,t.ch,i),r)}function Nt(e,t,r,n,i,o){function a(t,a){var l=yt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,Mt(e,n,l,r)}function l(e,t,r){var n=1==s[t].level;return a(r?e-1:e,n!=r)}n=n||S(e.doc,t.line),i||(i=vt(e,n));var s=de(n,e.doc.direction),c=t.ch,u=t.sticky;if(c>=n.text.length?(c=n.text.length,u="before"):c<=0&&(c=0,u="after"),!s)return a("before"==u?c-1:c,"before"==u);var d=ue(s,c,u),f=So,h=l(c,d,"before"==u);return null!=f&&(h.other=l(c,f,"before"!=u)),h}function _t(e,t){var r=0;t=j(e.doc,t),e.options.lineWrapping||(r=Ht(e.display)*t.ch);var n=S(e.doc,t.line),i=le(n)+st(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Et(e,t,r,n,i){var o=W(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Wt(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Et(n.first,0,null,!0,-1);var i=N(n,r),o=n.first+n.size-1;if(i>o)return Et(n.first+n.size-1,S(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=S(n,i);;){var l=function(e,t,r,n,i){i-=le(t);var o=vt(e,t),a=Lt(t),l=0,s=t.text.length,c=!0,u=de(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,r,n,i,o,a){var l=Ft(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=yt(e,n,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||d>g)&&(u=h,d=g)}}u||(u=i[i.length-1]);u.from<s&&(u={from:s,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(e,t,r,n,i,o,a){var l=T(function(l){var s=i[l],c=1!=s.level;return zt(Nt(e,W(r,c?s.to:s.from,c?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=Nt(e,W(r,c?s.from:s.to,c?"after":"before"),"line",t,n);zt(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s})(e,t,r,o,u,n,i);c=1!=d.level,l=c?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=T(function(t){var r=yt(e,o,t);return r.top+=a,r.bottom+=a,!!zt(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,m=r),!0)},l,s),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==t.text.length?"before":yt(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Nt(e,W(r,g,h),"line",t,o);f=w.left,v=i<w.top||i>=w.bottom}return g=C(t.text,g,1),Et(r,g,h,v,n-f)}(e,a,i,t,r),s=ee(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=O(a=c.to.line)}}function Ft(e,t,r,n){n-=Lt(t);var i=t.text.length,o=T(function(t){return yt(e,r,t-1).bottom<=n},i,0);return i=T(function(t){return yt(e,r,t).top>n},o,i),{begin:o,end:i}}function Dt(e,t,r,n){r||(r=vt(e,t));return Ft(e,t,r,Mt(e,t,yt(e,r,n),"line").top)}function zt(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Pt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Bo){Bo=n("pre");for(var i=0;i<49;++i)Bo.appendChild(document.createTextNode("x")),Bo.appendChild(n("br"));Bo.appendChild(document.createTextNode("x"))}r(e.measure,Bo);var o=Bo.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function Ht(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function It(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:jt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function jt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Rt(e){var t=Pt(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Ht(e.display)-3);return function(i){if(oe(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Bt(e){var t=e.doc,r=Rt(e);t.iter(function(e){var t=r(e);t!=e.height&&A(e,t)})}function qt(e,t,r,n){var i=e.display;if(!r&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=Wt(e,o,a);if(n&&1==c.xRel&&(s=S(e.doc,c.line).text).length==c.ch){var u=d(s,s.length,e.options.tabSize)-s.length;c=W(c.line,Math.max(0,Math.round((o-ut(e.display).left)/Ht(e.display))-u))}return c}function Ut(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Kt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Vt(e,t){void 0===t&&(t=!0);for(var r=e.doc,i={},o=i.cursors=document.createDocumentFragment(),a=i.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();(c||e.options.showCursorWhenSelecting)&&Gt(e,s.head,o),c||function(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?d-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return Ot(e,W(t,r),"div",h,n)}function a(t,r,n){var i=Dt(e,h,null,t),a="ltr"==r==("after"==n)?"left":"right",l="after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return o(l,a)[a]}var s,c,h=S(l,t),p=h.text.length,m=de(h,l.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(m,r||0,null==n?p:n,function(e,t,l,h){var g="ltr"==l,v=o(e,g?"left":"right"),y=o(t-1,g?"right":"left"),b=null==r&&0==e,w=null==n&&t==p,x=0==h,k=!m||h==m.length-1;if(y.top-v.top<=3){var C=(f?b:w)&&x,T=(f?w:b)&&k,S=C?u:(g?v:y).left,L=T?d:(g?y:v).right;i(S,v.top,L-S,v.bottom)}else{var M,A,O,N;g?(M=f&&b&&x?u:v.left,A=f?d:a(e,l,"before"),O=f?u:a(t,l,"after"),N=f&&w&&k?d:y.right):(M=f?a(e,l,"before"):u,A=!f&&b&&x?d:v.right,O=!f&&w&&k?u:y.left,N=f?a(t,l,"after"):d),i(M,v.top,A-M,v.bottom),v.bottom<y.top&&i(u,v.bottom,null,y.top),i(O,y.top,N-O,y.bottom)}(!s||$t(v,s)<0)&&(s=v),$t(y,s)<0&&(s=y),(!c||$t(v,c)<0)&&(c=v),$t(y,c)<0&&(c=y)}),{start:s,end:c}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=ut(e.display),u=c.left,d=Math.max(a.sizerWidth,ft(e)-a.sizer.offsetLeft)-c.right,f="ltr"==l.direction;var h=t.from(),p=t.to();if(h.line==p.line)o(h.line,h.ch,p.ch);else{var m=S(l,h.line),g=S(l,p.line),v=re(m)==re(g),y=o(h.line,h.ch,v?m.text.length+1:null).end,b=o(p.line,v?0:null,p.ch).start;v&&(y.top<b.top-2?(i(y.right,y.top,null,y.bottom),i(u,b.top,b.left,b.bottom)):i(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&i(u,y.bottom,null,b.top)}r.appendChild(s)}(e,s,a)}}return i}function Gt(e,t,r){var i=Nt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var a=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function $t(e,t){return e.top-t.top||e.left-t.left}function Yt(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xt(e){e.state.focused||(e.display.input.focus(),Jt(e))}function Zt(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qt(e))},100)}function Jt(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,l(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Vi&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Yt(e))}function Qt(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,co(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(Ui&&Ki<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var l=i.node.getBoundingClientRect();o=l.bottom-l.top}var s=i.line.height-o;if(o<2&&(o=Pt(t)),(s>.005||s<-.005)&&(A(i.line,o),tr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)tr(i.rest[c])}}}function tr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function rr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-st(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=N(t,n),a=N(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=N(t,le(S(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=N(t,le(S(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function nr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=jt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function ir(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=E(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Fr(e),!0}return!1}function or(e,t){var r=e.display,n=Pt(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=ht(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+ct(r),s=t.top<n,c=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=ft(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function ar(e,t){null!=t&&(cr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function lr(e){cr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sr(e,t,r){null==t&&null==r||cr(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function cr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;ur(e,_t(e,t.from),_t(e,t.to),t.margin)}}function ur(e,t,r,n){var i=or(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});sr(e,i.scrollLeft,i.scrollTop)}function dr(e,t){Math.abs(e.doc.scrollTop-t)<2||(ji||Wr(e,{top:t}),fr(e,t,!0),ji&&Wr(e),Or(e,100))}function fr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,nr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ct(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+dt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function mr(e,t){t||(t=pr(e));var r=e.display.barWidth,n=e.display.barHeight;gr(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&er(e),gr(e,pr(e)),r=e.display.barWidth,n=e.display.barHeight}function gr(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&co(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Xo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ao(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?hr(e,t):dr(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function yr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},function(e){Ko?Ko.ops.push(e):e.ownsGroup=Ko={ops:[e],delayedCallbacks:[]}}(e.curOp)}function br(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{Ko=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)!function(e){var t=e.cm,r=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=dt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=dt(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&ce(t);e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Jo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}(t[r]);for(var i=0;i<t.length;i++)!function(e){e.updatedDisplay=e.mustUpdate&&_r(e.cm,e.update)}(t[i]);for(var o=0;o<t.length;o++)!function(e){var t=e.cm,r=t.display;e.updatedDisplay&&er(t);e.barMeasure=pr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=mt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+dt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ft(t)));(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}(t[o]);for(var l=0;l<t.length;l++)!function(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&hr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r);(e.updatedDisplay||e.startHeight!=t.doc.height)&&mr(t,e.barMeasure);e.updatedDisplay&&Dr(t,e.barMeasure);e.selectionChanged&&Yt(t);t.state.focused&&e.updateInput&&t.display.input.reset(e.typing);r&&Xt(e.cm)}(t[l]);for(var s=0;s<t.length;s++)!function(e){var t=e.cm,r=t.display,i=t.doc;e.updatedDisplay&&Er(t,e.update);null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null);null!=e.scrollTop&&fr(t,e.scrollTop,e.forceScroll);null!=e.scrollLeft&&hr(t,e.scrollLeft,!0,!0);if(e.scrollToPos){var o=function(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?W(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?W(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Nt(e,t),s=r&&r!=t?Nt(e,r):l,c=or(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(dr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(hr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,j(i,e.scrollToPos.from),j(i,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!me(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ji){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-st(e.display))+"px;\n height: "+(t.bottom-t.top+dt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,o)}var a=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||pe(a[s],"hide");if(l)for(var c=0;c<l.length;++c)l[c].lines.length&&pe(l[c],"unhide");r.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop);e.changeObjs&&pe(t,"changes",t,e.changeObjs);e.update&&e.update.finish()}(t[s])}(e)})}function wr(e,t){if(e.curOp)return t();yr(e);try{return t()}finally{br(e)}}function xr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);yr(e);try{return t.apply(e,arguments)}finally{br(e)}}}function kr(e){return function(){if(this.curOp)return e.apply(this,arguments);yr(this);try{return e.apply(this,arguments)}finally{br(this)}}}function Cr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);yr(t);try{return e.apply(this,arguments)}finally{br(t)}}}function Tr(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)To&&ne(e.doc,t)<i.viewTo&&Lr(e);else if(r<=i.viewFrom)To&&ie(e.doc,r+n)>i.viewFrom?Lr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Lr(e);else if(t<=i.viewFrom){var o=Mr(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Lr(e)}else if(r>=i.viewTo){var a=Mr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Lr(e)}else{var l=Mr(e,t,t,-1),s=Mr(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Ye(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Lr(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Sr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Ut(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,r)&&a.push(r)}}}function Lr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mr(e,t,r,n){var i,o=Ut(e,t),a=e.display.view;if(!To||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ne(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Ar(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Or(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(Nr,e))}function Nr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=De(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ne(t.mode,n.state):null,s=We(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ze(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Or(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wr(e,function(){for(var t=0;t<i.length;t++)Sr(e,i[t],"text")})}}function _r(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return Lr(e),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ar(e))return!1;ir(e)&&(Lr(e),r.dims=It(e));var l=i.first+i.size,s=Math.max(r.visible.from-e.options.viewportMargin,i.first),c=Math.min(l,r.visible.to+e.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(i.first,n.viewFrom)),n.viewTo>c&&n.viewTo-c<20&&(c=Math.min(l,n.viewTo)),To&&(s=ne(e.doc,s),c=ie(e.doc,c));var u=s!=n.viewFrom||c!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Ye(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ye(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Ut(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ye(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Ut(e,r)))),n.viewTo=r}(e,s,c),n.viewOffset=le(S(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var d=Ar(e);if(!u&&0==d&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=a();if(!t||!o(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return d>4&&(n.lineDiv.style.display="none"),function(e,r,n){function i(t){var r=t.nextSibling;return Vi&&ro&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild;for(var c=o.view,u=o.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==l){for(;s!=h.node;)s=i(s);var p=a&&null!=r&&r<=u&&h.lineNumber;h.changes&&(f(h.changes,"gutter")>-1&&(p=!1),Je(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(E(e.options,u)))),s=h.node.nextSibling}else{var m=nt(e,h,u,n);l.insertBefore(m,s)}u+=h.size}for(;s;)s=i(s)}(e,n.updateLineNumbers,r.dims),d>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),e.anchorNode&&o(document.body,e.anchorNode)&&o(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(h),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Or(e,400)),n.updateLineNumbers=null,!0}function Er(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=ft(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+ct(e.display)-ht(e),r.top)}),t.visible=rr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_r(e,t);n=!1){er(e);var i=pr(e);Kt(e),mr(e,i),Dr(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 Wr(e,t){var r=new Jo(e,t);if(_r(e,r)){er(e),Er(e,r);var n=pr(e);Kt(e),mr(e,n),Dr(e,n),r.finish()}}function Fr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Dr(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+dt(e)+"px"}function zr(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var a=i[o],l=r.appendChild(n("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",Fr(e)}function Pr(e){var t=f(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Hr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Ir(e){var t=Hr(e);return t.x*=ea,t.y*=ea,t}function jr(e,t){var r=Hr(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&ro&&Vi)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!ji&&!Yi&&null!=ea)return i&&s&&dr(e,Math.max(0,a.scrollTop+i*ea)),hr(e,Math.max(0,a.scrollLeft+n*ea)),(!i||i&&s)&&be(t),void(o.wheelStartX=null);if(i&&null!=ea){var f=i*ea,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),Wr(e,{top:h,bottom:p})}Qo<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(ea=(ea*Qo+r)/(Qo+1),++Qo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Rr(e,t){var r=e[t];e.sort(function(e,t){return F(e.from(),t.from())}),t=f(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(F(o.to(),i.from())>=0){var a=H(o.from(),i.from()),l=P(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new ra(s?l:a,s?a:l))}}return new ta(e,t)}function Br(e,t){return new ta([new ra(e,t||e)],0)}function qr(e){return e.text?W(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ur(e,t){if(F(e,t.from)<0)return e;if(F(e,t.to)<=0)return qr(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=qr(t).ch-t.to.ch),W(r,n)}function Kr(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new ra(Ur(i.anchor,t),Ur(i.head,t)))}return Rr(r,e.sel.primIndex)}function Vr(e,t,r){return e.line==t.line?W(r.line,e.ch-t.ch+r.ch):W(r.line+(e.line-t.line),e.ch)}function Gr(e){e.doc.mode=Ae(e.options,e.doc.modeOption),$r(e)}function $r(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,Or(e,100),e.state.modeGen++,e.curOp&&Tr(e)}function Yr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Xr(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),G(e),$(e,r);var i=n?n(e):1;i!=e.height&&A(e,i)}(e,r,i,n),Xe(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new Ro(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=S(e,l.line),d=S(e,s.line),f=m(c),h=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Yr(e,t)){var g=a(0,c.length-1);o(d,d.text,h),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var v=a(1,c.length-1);v.push(new Ro(f+u.text.slice(s.ch),h,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var y=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,y)}Xe(e,"change",e,t)}function Zr(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Jr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Bt(e),Gr(e),Qr(e),e.options.lineWrapping||ce(e),e.options.mode=t.modeOption,Tr(e)}function Qr(e){("rtl"==e.doc.direction?l:co)(e.display.lineDiv,"CodeMirror-rtl")}function en(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 tn(e,t){var r={from:z(t.from),to:qr(t),text:L(e,t.from,t.to)};return ln(e,r,t.from.line,t.to.line+1),Zr(e,function(e){return ln(e,r,t.from.line,t.to.line+1)},!0),r}function rn(e){for(;e.length;){if(!m(e).ranges)break;e.pop()}}function nn(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(rn(e.done),m(e.done)):e.done.length&&!m(e.done).ranges?m(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}(i,i.lastOp==n)))a=m(o.changes),0==F(t.from,t.to)&&0==F(t.from,a.to)?a.to=qr(t):o.changes.push(tn(e,t));else{var s=m(i.done);for(s&&s.ranges||an(e.sel,i.done),o={changes:[tn(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function on(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,m(i.done),t))?i.done[i.done.length-1]=t:an(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&rn(i.undone)}function an(e,t){var r=m(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ln(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function sn(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function cn(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(sn(r[i]));return n}(e,t),n=K(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function un(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?ta.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&f(t,Number(u[1]))>-1&&(m(l)[d]=c[d],delete c[d])}}}return n}function dn(e,t,r,n){if(n){var i=e.anchor;if(r){var o=F(t,i)<0;o!=F(r,i)<0?(i=t,t=r):o!=F(t,r)<0&&(t=r)}return new ra(i,t)}return new ra(r||t,t)}function fn(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),vn(e,new ta([dn(e.sel.primary(),t,r,i)],0),n)}function hn(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=dn(e.sel.ranges[o],t[o],null,i);vn(e,Rr(n,e.sel.primIndex),r)}function pn(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,vn(e,Rr(i,e.sel.primIndex),n)}function mn(e,t,r,n){vn(e,Br(t,r),n)}function gn(e,t,r){var n=e.history.done,i=m(n);i&&i.ranges?(n[n.length-1]=t,yn(e,t,r)):vn(e,t,r)}function vn(e,t,r){yn(e,t,r),on(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function yn(e,t,r){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new ra(j(e,t[r].anchor),j(e,t[r].head))},origin:r&&r.origin};return pe(e,"beforeSelectionChange",e,n),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Rr(n.ranges,n.ranges.length-1):t}(e,t,r));bn(e,xn(e,t,r&&r.bias||(F(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||lr(e.cm)}function bn(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ge(e.cm)),Xe(e,"cursorActivity",e))}function wn(e){bn(e,xn(e,e.sel,null,!1))}function xn(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Cn(e,a.anchor,l&&l.anchor,r,n),c=Cn(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ra(s,c))}return i?Rr(i,t.primIndex):t}function kn(e,t,r,n,i){var o=S(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(pe(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=Tn(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=F(c,r))&&(n<0?u<0:u>0))return kn(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=Tn(e,d,n,d.line==t.line?o:null)),d?kn(e,d,t,n,i):null}}return t}function Cn(e,t,r,n,i){var o=n||1,a=kn(e,t,r,o,i)||!i&&kn(e,t,r,o,!0)||kn(e,t,r,-o,i)||!i&&kn(e,t,r,-o,!0);return a||(e.cantEdit=!0,W(e.first,0))}function Tn(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?j(e,W(t.line-1)):null:r>0&&t.ch==(n||S(e,t.line)).text.length?t.line<e.first+e.size-1?W(t.line+1,0):null:new W(t.line,t.ch+r)}function Sn(e){e.setSelection(W(e.firstLine(),0),W(e.lastLine()),vo)}function Ln(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=j(e,t)),r&&(n.to=j(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),pe(e,"beforeChange",e,n),e.cm&&pe(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Mn(e,t,r){if(e.cm){if(!e.cm.curOp)return xr(e.cm,Mn)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=Ln(e,t,!0))){var n=Co&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=f(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(F(c.to,l.from)<0||F(c.from,l.to)>0)){var u=[s,1],d=F(c.from,l.from),h=F(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)An(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else An(e,t)}}function An(e,t){if(1!=t.text.length||""!=t.text[0]||0!=F(t.from,t.to)){var r=Kr(e,t);nn(e,t,r,e.cm?e.cm.curOp.id:NaN),_n(e,t,r,K(e,t));var n=[];Zr(e,function(e,r){r||-1!=f(n,e.history)||(Dn(e.history,t),n.push(e.history)),_n(e,t,null,K(e,t))})}}function On(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=a.pop()).ranges;){if(an(n,l),r&&!n.equals(e.sel))return void vn(e,n,{clearRedo:!1});o=n}var c=[];an(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(r){var i=n.changes[r];if(i.origin=t,u&&!Ln(e,i,!1))return a.length=0,{};c.push(tn(e,i));var o=r?Kr(e,i):m(a);_n(e,i,o,cn(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:qr(i)});var l=[];Zr(e,function(e,t){t||-1!=f(l,e.history)||(Dn(e.history,i),l.push(e.history)),_n(e,i,null,cn(e,i))})},h=n.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function Nn(e,t){if(0!=t&&(e.first+=t,e.sel=new ta(g(e.sel.ranges,function(e){return new ra(W(e.anchor.line+t,e.anchor.ch),W(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Tr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Sr(e.cm,n,"gutter")}}function _n(e,t,r,n){if(e.cm&&!e.cm.curOp)return xr(e.cm,_n)(e,t,r,n);if(t.to.line<e.first)Nn(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);Nn(e,i),t={from:W(e.first,0),to:W(t.to.line+i,t.to.ch),text:[m(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:W(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=L(e,t.from,t.to),r||(r=Kr(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=O(re(S(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ge(e);Xr(n,t,r,Rt(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=se(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=S(e,n).stateAfter;if(i&&(!(i instanceof Ho)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),Or(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Tr(e):o.line!=a.line||1!=t.text.length||Yr(e.doc,t)?Tr(e,o.line,a.line+1,c):Sr(e,o.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Xe(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Xr(e,t,n),yn(e,r,vo)}}function En(e,t,r,n,i){if(n||(n=r),F(n,r)<0){var o;r=(o=[n,r])[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Mn(e,{from:r,to:n,text:t,origin:i})}function Wn(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Fn(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)Wn(o.ranges[l].anchor,t,r,n),Wn(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(r<c.from.line)c.from=W(c.from.line+n,c.from.ch),c.to=W(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Dn(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Fn(e.done,r,n,i),Fn(e.undone,r,n,i)}function zn(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=S(e,I(e,t)):i=O(t),null==i?null:(n(o,i)&&e.cm&&Sr(e.cm,i,r),o)}function Pn(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function Hn(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function In(e,t,r){le(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ar(e,r)}function jn(e,t,r,n,o){if(n&&n.shared)return function(e,t,r,n,i){(n=u(n)).shared=!1;var o=[jn(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Zr(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(jn(e,j(e,t),j(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=m(o)}),new aa(o,a)}(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return xr(e.cm,jn)(e,t,r,n,o);var a=new oa(e,o),l=F(t,r);if(n&&u(n,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(te(e,t.line,t,r,a)||t.line!=r.line&&te(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");To=!0}a.addToHistory&&nn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,c=t.line,d=e.cm;if(e.iter(c,r.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&re(e)==d.display.maxLine&&(s=!0),a.collapsed&&c!=t.line&&A(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new B(a,c==t.line?t.ch:null,c==r.line?r.ch:null)),++c}),a.collapsed&&e.iter(t.line,r.line+1,function(t){oe(e,t)&&A(t,0)}),a.clearOnEnter&&Ao(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Co=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ia,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)Tr(d,t.line,r.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=r.line;f++)Sr(d,f,"text");a.atomic&&wn(d.doc),Xe(d,"markerAdded",d,a)}return a}function Rn(e){return e.findMarks(W(e.first,0),e.clipPos(W(e.lastLine())),function(e){return e.parent})}function Bn(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Zr(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==f(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}function qn(e){var t=this;if(Un(t),!me(t,e)&&!lt(t.display,e)){be(e),Ui&&(ca=+new Date);var r=qt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||-1!=f(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=xr(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){var s={from:r=j(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Mn(t.doc,s),gn(t.doc,Br(r,qr(s)))}}),l.readAsText(e)}},s=0;s<i;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),yn(t.doc,Br(r,r)),u)for(var d=0;d<u.length;++d)En(t.doc,"",u[d].anchor,u[d].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Un(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Kn(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Vn(){ua||(!function(){var e;Ao(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Kn(Gn)},100))}),Ao(window,"blur",function(){return Kn(Qt)})}(),ua=!0)}function Gn(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function $n(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Yn(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=g(r.split(" "),$n),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Xn(e,t,r,n){var i=(t=ei(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Xn(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Xn(e,t.fallthrough[o],r,n);if(a)return a}}}function Zn(e){var t="string"==typeof e?e:da[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Jn(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(lo?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(lo?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Qn(e,t){if(Yi&&34==e.keyCode&&e.char)return!1;var r=da[e.keyCode];return null!=r&&!e.altGraphKey&&Jn(r,e,t)}function ei(e){return"string"==typeof e?ma[e]:e}function ti(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&F(o.from,m(n).to)<=0;){var a=n.pop();if(F(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}wr(e,function(){for(var t=n.length-1;t>=0;t--)En(e.doc,"",n[t].from,n[t].to,"+delete");lr(e)})}function ri(e,t,r){var n=C(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ni(e,t,r){var n=ri(e,t.ch,r);return null==n?null:new W(t.line,n,r<0?"after":"before")}function ii(e,t,r,n,i){if(e){var o=de(r,t.doc.direction);if(o){var a,l=i<0?m(o):o[0],s=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=vt(t,r);a=i<0?r.text.length-1:0;var u=yt(t,c,a).top;a=T(function(e){return yt(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=ri(r,a,1))}else a=i<0?l.to:l.from;return new W(n,a,s)}}return new W(n,i<0?r.text.length:0,i<0?"before":"after")}function oi(e,t){var r=S(e.doc,t),n=re(r);return n!=r&&(t=O(n)),ii(!0,e,n,t,1)}function ai(e,t){var r=S(e.doc,t),n=function(e){for(var t;t=ee(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=O(n)),ii(!0,e,r,t,-1)}function li(e,t){var r=oi(e,t.line),n=S(e.doc,r.line),i=de(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return W(r.line,a?0:o,r.sticky)}return r}function si(e,t,r){if("string"==typeof t&&!(t=ga[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=go}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ci(e,t,r,n){var i=e.state.keySeq;if(i){if(Zn(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:va.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ui(e,i+" "+t,r,n))return!0}return ui(e,t,r,n)}function ui(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Xn(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Xn(t,e.options.extraKeys,r,e)||Xn(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Xe(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(be(r),Yt(e)),!!i}function di(e,t){var r=Qn(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ci(e,"Shift-"+r,t,function(t){return si(e,t,!0)})||ci(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return si(e,t)}):ci(e,r,t,function(t){return si(e,t)}))}function fi(e){if(this.curOp.focus=a(),!me(this,e)){Ui&&Ki<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var r=di(this,e);Yi&&(ya=r?t:null,!r&&88==t&&!Eo&&(ro?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){function t(e){18!=e.keyCode&&e.altKey||(co(r,"CodeMirror-crosshair"),he(document,"keyup",t),he(document,"mouseover",t))}var r=e.display.lineDiv;l(r,"CodeMirror-crosshair");Ao(document,"keyup",t),Ao(document,"mouseover",t)}(this)}}function hi(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function pi(e){if(!(lt(this.display,e)||me(this,e)||e.ctrlKey&&!e.altKey||ro&&e.metaKey)){var t=e.keyCode,r=e.charCode;if(Yi&&t==ya)return ya=null,void be(e);if(!Yi||e.which&&!(e.which<10)||!di(this,e)){var n=String.fromCharCode(null==r?t:r);"\b"!=n&&(function(e,t,r){return ci(e,"'"+r+"'",t,function(t){return si(e,t,!0)})}(this,e,n)||this.display.input.onKeyPress(e))}}}function mi(e){var t=this.display;if(!(me(this,e)||t.activeTouch&&t.input.supportsTouch()))if(t.input.ensurePolled(),t.shift=e.shiftKey,lt(t,e))Vi||(t.scroller.draggable=!1,setTimeout(function(){return t.scroller.draggable=!0},100));else if(!yi(this,e)){var r=qt(this,e),n=Te(e),i=r?function(e,t){var r=+new Date;return xa&&xa.compare(r,e,t)?(wa=xa=null,"triple"):wa&&wa.compare(r,e,t)?(xa=new ba(r,e,t),wa=null,"double"):(wa=new ba(r,e,t),xa=null,"single")}(r,n):"single";window.focus(),1==n&&this.state.selectingText&&this.state.selectingText(e),r&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return o=(1==t?"Left":2==t?"Middle":"Right")+o,ci(e,Jn(o,i),i,function(t){if("string"==typeof t&&(t=ga[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=go}finally{e.state.suppressEdits=!1}return n})}(this,n,r,i,e)||(1==n?r?function(e,t,r,n){Ui?setTimeout(c(Xt,e),0):e.curOp.focus=a();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=no?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=ro?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(ro?r.altKey:r.ctrlKey));return i}(e,r,n),l=e.doc.sel;e.options.dragDrop&&Oo&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(F((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(F(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,a=xr(e,function(t){Vi&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(document,"mouseup",a),he(document,"mousemove",l),he(i.scroller,"dragstart",s),he(i.scroller,"drop",a),o||(be(t),n.addNew||fn(e.doc,r,null,null,n.extend),Vi||Ui&&9==Ki?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return o=!0};Vi&&(i.scroller.draggable=!0);e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();Ao(document,"mouseup",a),Ao(document,"mousemove",l),Ao(i.scroller,"dragstart",s),Ao(i.scroller,"drop",a),Zt(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){function i(t){if(0!=F(v,t))if(v=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,a=d(S(c,r.line).text,r.ch,o),l=d(S(c,t.line).text,t.ch,o),s=Math.min(a,l),m=Math.max(a,l),g=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=y;g++){var b=S(c,g).text,w=h(b,s,o);s==m?i.push(new ra(W(g,w),W(g,w))):b.length>w&&i.push(new ra(W(g,w),W(g,h(b,m,o))))}i.length||i.push(new ra(r,r)),vn(c,Rr(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,k=u,C=gi(e,t,n.unit),T=k.anchor;F(C.anchor,T)>0?(x=C.head,T=H(k.from(),C.anchor)):(x=C.anchor,T=P(k.to(),C.head));var L=p.ranges.slice(0);L[f]=function(e,t){var r=t.anchor,n=t.head,i=S(e.doc,r.line);if(0==F(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var a=ue(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;var c;if(n.line!=r.line)c=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==l.level?-1:1);c=u==s-1||u==s?d<0:d>0}var f=o[s+(c?-1:0)],h=c==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new ra(new W(r.line,p,m),n)}(e,new ra(j(c,T),x)),vn(c,Rr(L,f),yo)}}function o(t){var r=++b,l=qt(e,t,!0,"rectangle"==n.unit);if(l)if(0!=F(l,v)){e.curOp.focus=a(),i(l);var u=rr(s,c);(l.line>=u.to||l.line<u.from)&&setTimeout(xr(e,function(){b==r&&o(t)}),150)}else{var d=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;d&&setTimeout(xr(e,function(){b==r&&(s.scroller.scrollTop+=d,o(t))}),50)}}function l(t){e.state.selectingText=!1,b=1/0,be(t),s.input.focus(),he(document,"mousemove",w),he(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;be(t);var u,f,p=c.sel,m=p.ranges;n.addNew&&!n.extend?(f=c.sel.contains(r),u=f>-1?m[f]:new ra(r,r)):(u=c.sel.primary(),f=c.sel.primIndex);if("rectangle"==n.unit)n.addNew||(u=new ra(r,r)),r=qt(e,t,!0,!0),f=-1;else{var g=gi(e,r,n.unit);u=n.extend?dn(u,g.anchor,g.head,n.extend):g}n.addNew?-1==f?(f=m.length,vn(c,Rr(m.concat([u]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==n.unit&&!n.extend?(vn(c,Rr(m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):pn(c,f,u,yo):(f=0,vn(c,new ta([u],0),yo),p=c.sel);var v=r;var y=s.wrapper.getBoundingClientRect(),b=0;var w=xr(e,function(e){Te(e)?o(e):l(e)}),x=xr(e,l);e.state.selectingText=x,Ao(document,"mousemove",w),Ao(document,"mouseup",x)}(e,n,t,o)}(this,r,i,e):Ce(e)==t.scroller&&be(e):2==n?(r&&fn(this.doc,r),setTimeout(function(){return t.input.focus()},20)):3==n&&(so?bi(this,e):Zt(this)))}}function gi(e,t,r){if("char"==r)return new ra(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new ra(W(t.line,0),j(e.doc,W(t.line+1,0)));var n=r(e,t);return new ra(n.from,n.to)}function vi(e,t,r,n){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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&be(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!ve(e,r))return xe(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){return pe(e,r,e,N(e.doc,o),e.options.gutters[s],t),xe(t)}}}function yi(e,t){return vi(e,t,"gutterClick",!0)}function bi(e,t){lt(e.display,t)||function(e,t){if(!ve(e,"gutterContextMenu"))return!1;return vi(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function wi(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ct(e)}function xi(e){zr(e),Tr(e),nr(e)}function ki(e,t,r){if(!t!=!(r&&r!=ka)){var n=e.display.dragFunctions,i=t?Ao:he;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Ci(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(co(e.display.wrapper,"CodeMirror-wrap"),ce(e)),Bt(e),Tr(e),Ct(e),setTimeout(function(){return mr(e)},100)}function Ti(e,t){var o=this;if(!(this instanceof Ti))return new Ti(e,t);this.options=t=t?u(t):{},u(Ca,t,!1),Pr(t);var a=t.value;"string"==typeof a&&(a=new sa(a,t.mode,null,t.lineSeparator,t.direction)),this.doc=a;var l=new Ti.inputStyles[t.inputStyle](this),s=this.display=new function(e,t,r){this.input=r,this.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),this.scrollbarFiller.setAttribute("cm-not-content","true"),this.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),this.gutterFiller.setAttribute("cm-not-content","true"),this.lineDiv=i("div",null,"CodeMirror-code"),this.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),this.cursorDiv=n("div",null,"CodeMirror-cursors"),this.measure=n("div",null,"CodeMirror-measure"),this.lineMeasure=n("div",null,"CodeMirror-measure"),this.lineSpace=i("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var o=i("div",[this.lineSpace],"CodeMirror-lines");this.mover=n("div",[o],null,"position: relative"),this.sizer=n("div",[this.mover],"CodeMirror-sizer"),this.sizerWidth=null,this.heightForcer=n("div",null,null,"position: absolute; height: "+mo+"px; width: 1px;"),this.gutters=n("div",null,"CodeMirror-gutters"),this.lineGutter=null,this.scroller=n("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll"),this.scroller.setAttribute("tabIndex","-1"),this.wrapper=n("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror"),Ui&&Ki<8&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),Vi||ji&&to||(this.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(this.wrapper):e(this.wrapper)),this.viewFrom=this.viewTo=t.first,this.reportedViewFrom=this.reportedViewTo=t.first,this.view=[],this.renderedView=null,this.externalMeasured=null,this.viewOffset=0,this.lastWrapHeight=this.lastWrapWidth=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLine=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.selForContextMenu=null,this.activeTouch=null,r.init(this)}(e,a,l);s.wrapper.CodeMirror=this,zr(this),wi(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vr(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 fo,keySeq:null,specialChars:null},t.autofocus&&!to&&s.input.focus(),Ui&&Ki<11&&setTimeout(function(){return o.display.input.reset(!0)},20),function(e){function t(){o.activeTouch&&(a=setTimeout(function(){return o.activeTouch=null},1e3),(l=o.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var o=e.display;Ao(o.scroller,"mousedown",xr(e,mi)),Ui&&Ki<11?Ao(o.scroller,"dblclick",xr(e,function(t){if(!me(e,t)){var r=qt(e,t);if(r&&!yi(e,t)&&!lt(e.display,t)){be(t);var n=e.findWordAt(r);fn(e.doc,n.anchor,n.head)}}})):Ao(o.scroller,"dblclick",function(t){return me(e,t)||be(t)});so||Ao(o.scroller,"contextmenu",function(t){return bi(e,t)});var a,l={end:0};Ao(o.scroller,"touchstart",function(t){if(!me(e,t)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(t)&&!yi(e,t)){o.input.ensurePolled(),clearTimeout(a);var r=+new Date;o.activeTouch={start:r,moved:!1,prev:r-l.end<=300?l:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),Ao(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),Ao(o.scroller,"touchend",function(r){var n=o.activeTouch;if(n&&!lt(o,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,l=e.coordsChar(o.activeTouch,"page");a=!n.prev||i(n,n.prev)?new ra(l,l):!n.prev.prev||i(n,n.prev.prev)?e.findWordAt(l):new ra(W(l.line,0),j(e.doc,W(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(r)}t()}),Ao(o.scroller,"touchcancel",t),Ao(o.scroller,"scroll",function(){o.scroller.clientHeight&&(dr(e,o.scroller.scrollTop),hr(e,o.scroller.scrollLeft,!0),pe(e,"scroll",e))}),Ao(o.scroller,"mousewheel",function(t){return jr(e,t)}),Ao(o.scroller,"DOMMouseScroll",function(t){return jr(e,t)}),Ao(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){me(e,t)||ke(t)},over:function(t){me(e,t)||(!function(e,t){var i=qt(e,t);if(i){var o=document.createDocumentFragment();Gt(e,i,o),e.display.dragCursor||(e.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),r(e.display.dragCursor,o)}}(e,t),ke(t))},start:function(t){return function(e,t){if(Ui&&(!e.state.draggingText||+new Date-ca<100))ke(t);else if(!me(e,t)&&!lt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Xi)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Yi&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Yi&&r.parentNode.removeChild(r)}}(e,t)},drop:xr(e,qn),leave:function(t){me(e,t)||Un(e)}};var s=o.input.getField();Ao(s,"keyup",function(t){return hi.call(e,t)}),Ao(s,"keydown",xr(e,fi)),Ao(s,"keypress",xr(e,pi)),Ao(s,"focus",function(t){return Jt(e,t)}),Ao(s,"blur",function(t){return Qt(e,t)})}(this),Vn(),yr(this),this.curOp.forceUpdate=!0,Jr(this,a),t.autofocus&&!to||this.hasFocus()?setTimeout(c(Jt,this),20):Qt(this);for(var d in Ta)Ta.hasOwnProperty(d)&&Ta[d](o,t[d],ka);ir(this),t.finishInit&&t.finishInit(this);for(var f=0;f<Sa.length;++f)Sa[f](o);br(this),Vi&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function Si(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=De(e,t).state:r="prev");var a=e.options.tabSize,l=S(o,t),s=d(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==go||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?d(S(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)h+=a,f+="\t";if(h<c&&(f+=p(c-h)),f!=u)return En(o,f,W(t,0),W(t,u.length),"+input"),l.stateAfter=null,!0;for(var g=0;g<o.sel.ranges.length;g++){var v=o.sel.ranges[g];if(v.head.line==t&&v.head.ch<u.length){var y=W(t,u.length);pn(o,g,new ra(y,y));break}}}function Li(e){La=e}function Mi(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=No(t),s=null;if(a&&n.ranges.length>1)if(La&&La.text.join("\n")==t){if(n.ranges.length%La.text.length==0){s=[];for(var c=0;c<La.text.length;c++)s.push(o.splitLines(La.text[c]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(s=g(l,function(e){return[e]}));for(var u,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],h=f.from(),p=f.to();f.empty()&&(r&&r>0?h=W(h.line,h.ch-r):e.state.overwrite&&!a?p=W(p.line,Math.min(S(o,p.line).text.length,p.ch+m(l).length)):La&&La.lineWise&&La.text.join("\n")==t&&(h=p=W(h.line,0))),u=e.curOp.updateInput;var v={from:h,to:p,text:s?s[d%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Mn(e.doc,v),Xe(e,"inputRead",e,v)}t&&!a&&Oi(e,t),lr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ai(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||wr(t,function(){return Mi(t,r,0,null,"paste")}),!0}function Oi(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Si(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Si(e,i.head.line,"smart"));a&&Xe(e,"electricInput",e,i.head.line)}}}function Ni(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:W(i,0),head:W(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function _i(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Ei(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Vi?e.style.width="1000px":e.setAttribute("wrap","off"),Qi&&(e.style.border="1px solid black"),_i(e),t}function Wi(e,t,r,n,i){function o(n){var o;if(null==(o=i?function(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return ni(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return ni(t,r,n);var l,s=function(e,r){return ri(t,e instanceof W?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||vt(e,t),Dt(e,t,l,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?s(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=s(r,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after";return new W(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new W(r.line,s(e,1),"before"):new W(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?n.begin:s(n.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),n.begin<=c&&c<n.end)return o(c,l)}},m=p(o+n,n,u);if(m)return m;var g=n>0?u.end:s(u.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:i.length-1,n,c(g)))?null:m}(e.cm,s,t,r):ni(s,t,r))){if(n||!function(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new W(n,t.ch,t.sticky),s=S(e,n))}())return!1;t=ii(i,e.cm,s,t.line,r)}else t=o;return!0}var a=t,l=r,s=S(e,t.line);if("char"==n)o();else if("column"==n)o(!0);else if("word"==n||"group"==n)for(var c=null,u="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||o(!f);f=!1){var h=s.text.charAt(t.ch)||"\n",p=w(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||f||p||(p="s"),c&&c!=p){r<0&&(r=1,o(),t.sticky="after");break}if(p&&(c=p),r>0&&!o(!f))break}var m=Cn(e,t,a,l,!0);return D(a,m)&&(m.hitSide=!0),m}function Fi(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Pt(e.display),3);i=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var c;(c=Wt(e,a,i)).outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Di(e,t){var r=gt(e,t.line);if(!r||r.hidden)return null;var n=S(e.doc,t.line),i=pt(r,n,t.line),o=de(n,e.doc.direction),a="left";if(o){a=ue(o,t.ch)%2?"right":"left"}var l=bt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function zi(e,t){return t&&(e.bad=!0),e}function Pi(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return zi(e.clipPos(W(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return function(e,t,r){function n(t,r,n){for(var i=-1;i<(d?d.length:0);i++)for(var o=i<0?u.map:d[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=O(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),W(s,c)}}}var i=e.text.firstChild,a=!1;if(!t||!o(i,t))return zi(W(O(e.line),0),!0);if(t==i&&(a=!0,t=i.childNodes[r],r=0,!t)){var l=e.rest?m(e.rest):e.line;return zi(W(O(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));for(;c.parentNode!=i;)c=c.parentNode;var u=e.measure,d=u.maps;var f=n(s,c,r);if(f)return zi(f,a);for(var h=c.nextSibling,p=s?s.nodeValue.length-r:0;h;h=h.nextSibling){if(f=n(h,h.firstChild,0))return zi(W(f.line,f.ch-p),a);p+=h.textContent.length}for(var g=c.previousSibling,v=r;g;g=g.previousSibling){if(f=n(g,g.firstChild,-1))return zi(W(f.line,f.ch+v),a);v+=g.textContent.length}}(a,t,r)}}var Hi=navigator.userAgent,Ii=navigator.platform,ji=/gecko\/\d/i.test(Hi),Ri=/MSIE \d/.test(Hi),Bi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hi),qi=/Edge\/(\d+)/.exec(Hi),Ui=Ri||Bi||qi,Ki=Ui&&(Ri?document.documentMode||6:+(qi||Bi)[1]),Vi=!qi&&/WebKit\//.test(Hi),Gi=Vi&&/Qt\/\d+\.\d+/.test(Hi),$i=!qi&&/Chrome\//.test(Hi),Yi=/Opera\//.test(Hi),Xi=/Apple Computer/.test(navigator.vendor),Zi=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Hi),Ji=/PhantomJS/.test(Hi),Qi=!qi&&/AppleWebKit/.test(Hi)&&/Mobile\/\w+/.test(Hi),eo=/Android/.test(Hi),to=Qi||eo||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Hi),ro=Qi||/Mac/.test(Ii),no=/\bCrOS\b/.test(Hi),io=/win/i.test(Ii),oo=Yi&&Hi.match(/Version\/(\d*\.\d*)/);oo&&(oo=Number(oo[1])),oo&&oo>=15&&(Yi=!1,Vi=!0);var ao,lo=ro&&(Gi||Yi&&(null==oo||oo<12.11)),so=ji||Ui&&Ki>=9,co=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};ao=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var uo=function(e){e.select()};Qi?uo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Ui&&(uo=function(e){try{e.select()}catch(e){}});var fo=function(){this.id=null};fo.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ho,po,mo=30,go={toString:function(){return"CodeMirror.Pass"}},vo={scroll:!1},yo={origin:"*mouse"},bo={origin:"+move"},wo=[""],xo=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ko=/[\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]/,Co=!1,To=!1,So=null,Lo=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(r,n){var c="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var u=r.length,d=[],f=0;f<u;++f)d.push(e(r.charCodeAt(f)));for(var h=0,p=c;h<u;++h){var g=d[h];"m"==g?d[h]=p:p=g}for(var v=0,y=c;v<u;++v){var b=d[v];"1"==b&&"r"==y?d[v]="n":a.test(b)&&(y=b,"r"==b&&(d[v]="R"))}for(var w=1,x=d[0];w<u-1;++w){var k=d[w];"+"==k&&"1"==x&&"1"==d[w+1]?d[w]="1":","!=k||x!=d[w+1]||"1"!=x&&"n"!=x||(d[w]=x),x=k}for(var C=0;C<u;++C){var T=d[C];if(","==T)d[C]="N";else if("%"==T){var S=void 0;for(S=C+1;S<u&&"%"==d[S];++S);for(var L=C&&"!"==d[C-1]||S<u&&"1"==d[S]?"1":"N",M=C;M<S;++M)d[M]=L;C=S-1}}for(var A=0,O=c;A<u;++A){var N=d[A];"L"==O&&"1"==N?d[A]="L":a.test(N)&&(O=N)}for(var _=0;_<u;++_)if(o.test(d[_])){var E=void 0;for(E=_+1;E<u&&o.test(d[E]);++E);for(var W="L"==(_?d[_-1]:c),F=W==("L"==(E<u?d[E]:c))?W?"L":"R":c,D=_;D<E;++D)d[D]=F;_=E-1}for(var z,P=[],H=0;H<u;)if(l.test(d[H])){var I=H;for(++H;H<u&&l.test(d[H]);++H);P.push(new t(0,I,H))}else{var j=H,R=P.length;for(++H;H<u&&"L"!=d[H];++H);for(var B=j;B<H;)if(s.test(d[B])){j<B&&P.splice(R,0,new t(1,j,B));var q=B;for(++B;B<H&&s.test(d[B]);++B);P.splice(R,0,new t(2,q,B)),j=B}else++B;j<H&&P.splice(R,0,new t(1,j,H))}return"ltr"==n&&(1==P[0].level&&(z=r.match(/^\s+/))&&(P[0].from=z[0].length,P.unshift(new t(0,0,z[0].length))),1==m(P).level&&(z=r.match(/\s+$/))&&(m(P).to-=z[0].length,P.push(new t(0,u-z[0].length,u)))),"rtl"==n?P.reverse():P}}(),Mo=[],Ao=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Mo).concat(r)}},Oo=function(){if(Ui&&Ki<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),No=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},_o=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)},Eo=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Wo=null,Fo={},Do={},zo={},Po=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Po.prototype.eol=function(){return this.pos>=this.string.length},Po.prototype.sol=function(){return this.pos==this.lineStart},Po.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Po.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Po.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},Po.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Po.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Po.prototype.skipToEnd=function(){this.pos=this.string.length},Po.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Po.prototype.backUp=function(e){this.pos-=e},Po.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=d(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Po.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Po.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Po.prototype.current=function(){return this.string.slice(this.start,this.pos)},Po.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Po.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Po.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ho=function(e,t){this.state=e,this.lookAhead=t},Io=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Io.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Io.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}},Io.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Io.fromSaved=function(e,t,r){return t instanceof Ho?new Io(e,Ne(e.mode,t.state),r,t.lookAhead):new Io(e,Ne(e.mode,t),r)},Io.prototype.save=function(e){var t=!1!==e?Ne(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ho(t,this.maxLookAhead):t};var jo=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},Ro=function(e,t,r){this.text=e,$(this,t),this.height=r?r(this):1};Ro.prototype.lineNo=function(){return O(this)},ye(Ro);var Bo,qo={},Uo={},Ko=null,Vo=null,Go={left:0,right:0,top:0,bottom:0},$o=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Ao(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ao(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ui&&Ki<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};$o.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},$o.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},$o.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},$o.prototype.zeroWidthHack=function(){var e=ro&&!Zi?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new fo,this.disableVert=new fo},$o.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?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,n)}e.style.pointerEvents="auto",t.set(1e3,n)},$o.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Yo=function(){};Yo.prototype.update=function(){return{bottom:0,right:0}},Yo.prototype.setScrollLeft=function(){},Yo.prototype.setScrollTop=function(){},Yo.prototype.clear=function(){};var Xo={native:$o,null:Yo},Zo=0,Jo=function(e,t,r){var n=e.display;this.viewport=t,this.visible=rr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=ft(e),this.force=r,this.dims=It(e),this.events=[]};Jo.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},Jo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var Qo=0,ea=null;Ui?ea=-.53:ji?ea=15:$i?ea=-.7:Xi&&(ea=-1/3);var ta=function(e,t){this.ranges=e,this.primIndex=t};ta.prototype.primary=function(){return this.ranges[this.primIndex]},ta.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!D(r.anchor,n.anchor)||!D(r.head,n.head))return!1}return!0},ta.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ra(z(this.ranges[t].anchor),z(this.ranges[t].head));return new ta(e,this.primIndex)},ta.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ta.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(F(t,n.from())>=0&&F(e,n.to())<=0)return r}return-1};var ra=function(e,t){this.anchor=e,this.head=t};ra.prototype.from=function(){return H(this.anchor,this.head)},ra.prototype.to=function(){return P(this.anchor,this.head)},ra.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Pn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Be(i),Xe(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},Hn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Pn))){var l=[];this.collapse(l),this.children=[new Pn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Pn(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Hn(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=f(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new Hn(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var na=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};na.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=O(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=at(this);A(r,Math.max(0,r.height-o)),e&&(wr(e,function(){In(e,r,-o),Sr(e,n,"widget")}),Xe(e,"lineWidgetCleared",e,this,n))}},na.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=at(this)-t;i&&(A(n,n.height+i),r&&wr(r,function(){r.curOp.forceUpdate=!0,In(r,n,i),Xe(r,"lineWidgetChanged",r,e,O(n))}))},ye(na);var ia=0,oa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ia};oa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yr(e),ve(this,"clear")){var r=this.find();r&&Xe(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=q(a.markedSpans,this);e&&!this.collapsed?Sr(e,O(a),"text"):e&&(null!=l.to&&(i=O(a)),null!=l.from&&(n=O(a))),a.markedSpans=U(a.markedSpans,l),null==l.from&&this.collapsed&&!oe(this.doc,a)&&e&&A(a,Pt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=re(this.lines[s]),u=se(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Tr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wn(e.doc)),e&&Xe(e,"markerCleared",e,this,n,i),t&&br(e),this.parent&&this.parent.clear()}},oa.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=q(o.markedSpans,this);if(null!=a.from&&(r=W(t?o:O(o),a.from),-1==e))return r;if(null!=a.to&&(n=W(t?o:O(o),a.to),1==e))return n}return r&&{from:r,to:n}},oa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&wr(n,function(){var i=t.line,o=O(t.line),a=gt(n,o);if(a&&(xt(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!oe(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=at(r)-l;s&&A(i,i.height+s)}Xe(n,"markerChanged",n,e)})},oa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=f(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},oa.prototype.detachLine=function(e){if(this.lines.splice(f(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(oa);var aa=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};aa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Xe(this,"clear")}},aa.prototype.find=function(e,t){return this.primary.find(e,t)},ye(aa);var la=0,sa=function(e,t,r,n,i){if(!(this instanceof sa))return new sa(e,t,r,n,i);null==r&&(r=0),Hn.call(this,[new Pn([new Ro("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=W(r,0);this.sel=Br(o),this.history=new en(null),this.id=++la,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Xr(this,{from:o,to:o,text:e}),vn(this,Br(o),vo)};sa.prototype=y(Hn.prototype,{constructor:sa,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=M(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Cr(function(e){var t=W(this.first,0),r=this.first+this.size-1;Mn(this,{from:t,to:W(r,S(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&sr(this.cm,0,0),vn(this,Br(t),vo)}),replaceRange:function(e,t,r,n){En(this,e,t=j(this,t),r=r?j(this,r):t,n)},getRange:function(e,t,r){var n=L(this,j(this,e),j(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(_(this,e))return S(this,e)},getLineNumber:function(e){return O(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=S(this,e)),re(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return j(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:Cr(function(e,t,r){mn(this,j(this,"number"==typeof e?W(e,t||0):e),null,r)}),setSelection:Cr(function(e,t,r){mn(this,j(this,e),j(this,t||e),r)}),extendSelection:Cr(function(e,t,r){fn(this,j(this,e),t&&j(this,t),r)}),extendSelections:Cr(function(e,t){hn(this,R(this,e),t)}),extendSelectionsBy:Cr(function(e,t){hn(this,R(this,g(this.sel.ranges,e)),t)}),setSelections:Cr(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new ra(j(this,e[i].anchor),j(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),vn(this,Rr(n,t),r)}}),addSelection:Cr(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new ra(j(this,e),j(this,t||e))),vn(this,Rr(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Cr(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&function(e,t,r){for(var n=[],i=W(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Vr(l.from,i,o),c=Vr(qr(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=F(u.head,u.anchor)<0;n[a]=new ra(d?c:s,d?s:c)}else n[a]=new ra(s,s)}return new ta(n,e.sel.primIndex)}(this,n,t),s=n.length-1;s>=0;s--)Mn(this,n[s]);l?gn(this,l):this.cm&&lr(this.cm)}),undo:Cr(function(){On(this,"undo")}),redo:Cr(function(){On(this,"redo")}),undoSelection:Cr(function(){On(this,"undo",!0)}),redoSelection:Cr(function(){On(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new en(this.history.maxGeneration)},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:un(this.history.done),undone:un(this.history.undone)}},setHistory:function(e){var t=this.history=new en(this.history.maxGeneration);t.done=un(e.done.slice(0),null,!0),t.undone=un(e.undone.slice(0),null,!0)},setGutterMarker:Cr(function(e,t,r){return zn(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&x(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Cr(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&zn(t,r,"gutter",function(){return r.gutterMarkers[e]=null,x(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!_(this,e))return null;if(t=e,!(e=S(this,e)))return null}else if(null==(t=O(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:Cr(function(t,r,n){return zn(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:Cr(function(t,r,n){return zn(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var a=o.match(e(n));if(!a)return!1;var l=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:Cr(function(e,t,r){return function(e,t,r,n){var i=new na(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),zn(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!oe(e,t)){var n=le(t)<e.scrollTop;A(t,t.height+at(i)),n&&ar(o,i.height),o.curOp.forceUpdate=!0}return!0}),Xe(o,"lineWidgetAdded",o,i,"number"==typeof t?t:O(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return jn(this,j(this,e),j(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=j(this,e),jn(this,e,e,r,"bookmark")},findMarksAt:function(e){var t=[],r=S(this,(e=j(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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,r){e=j(this,e),t=j(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),j(this,W(r,t))},indexFromPos:function(e){var t=(e=j(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new sa(M(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new sa(M(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(F(o,a)){var l=jn(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}(n,Rn(this)),n},unlinkDoc:function(e){if(e instanceof Ti&&(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),Bn(Rn(this));break}}if(e.history==this.history){var r=[e.id];Zr(e,function(e){return r.push(e.id)},!0),e.history=new en(null),e.history.done=un(this.history.done,r),e.history.undone=un(this.history.undone,r)}},iterLinkedDocs:function(e){Zr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):No(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Cr(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){wr(e,function(){Qr(e),Tr(e)})}(this.cm))})}),sa.prototype.eachLine=sa.prototype.iter;for(var ca=0,ua=!1,da={3:"Enter",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:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},fa=0;fa<10;fa++)da[fa+48]=da[fa+96]=String(fa);for(var ha=65;ha<=90;ha++)da[ha]=String.fromCharCode(ha);for(var pa=1;pa<=12;pa++)da[pa+111]=da[pa+63235]="F"+pa;var ma={};ma.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"},ma.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"},ma.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"},ma.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"]},ma.default=ro?ma.macDefault:ma.pcDefault;var ga={selectAll:Sn,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),vo)},killLine:function(e){return ti(e,function(t){if(t.empty()){var r=S(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:W(t.head.line+1,0)}:{from:t.head,to:W(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ti(e,function(t){return{from:W(t.from().line,0),to:j(e.doc,W(t.to().line+1,0))}})},delLineLeft:function(e){return ti(e,function(e){return{from:W(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ti(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return ti(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(W(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(W(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return oi(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return li(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ai(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},bo)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},bo)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?li(e,t.head):n},bo)},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,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=d(e.getLine(o.line),o.ch,n);t.push(p(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=S(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new W(i.line,i.ch-1)),i.ch>0)i=new W(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),W(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new W(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),W(i.line-1,a.length-1),i,"+transpose"))}r.push(new ra(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);lr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},va=new fo,ya=null,ba=function(e,t,r){this.time=e,this.pos=t,this.button=r};ba.prototype.compare=function(e,t,r){return this.time+400>e&&0==F(t,this.pos)&&r==this.button};var wa,xa,ka={toString:function(){return"CodeMirror.Init"}},Ca={},Ta={};Ti.defaults=Ca,Ti.optionHandlers=Ta;var Sa=[];Ti.defineInitHook=function(e){return Sa.push(e)};var La=null,Ma=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new fo,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ma.prototype.init=function(e){function t(e){if(!me(i,e)){if(i.somethingSelected())Li({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Ni(i);Li({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,vo),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=La.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var a=Ei(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=La.text.join("\n");var s=document.activeElement;uo(l),setTimeout(function(){i.display.lineSpace.removeChild(a),s.focus(),s==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;_i(o,i.options.spellcheck),Ao(o,"paste",function(e){me(i,e)||Ai(e,i)||Ki<=11&&setTimeout(xr(i,function(){return r.updateFromDOM()}),20)}),Ao(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),Ao(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),Ao(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ao(o,"touchstart",function(){return n.forceCompositionEnd()}),Ao(o,"input",function(){r.composing||r.readFromDOMSoon()}),Ao(o,"copy",t),Ao(o,"cut",t)},Ma.prototype.prepareSelection=function(){var e=Vt(this.cm,!1);return e.focus=this.cm.state.focused,e},Ma.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ma.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Pi(t,e.anchorNode,e.anchorOffset),a=Pi(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=F(H(o,a),n)||0!=F(P(o,a),i)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Di(t,n)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Di(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=ao(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!ji&&t.state.focused?(e.collapse(s.node,s.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):ji&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ma.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)},Ma.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},Ma.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ma.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},Ma.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ma.prototype.blur=function(){this.div.blur()},Ma.prototype.getField=function(){return this.div},Ma.prototype.supportsTouch=function(){return!0},Ma.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():wr(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Ma.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ma.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(eo&&$i&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Pi(t,e.anchorNode,e.anchorOffset),n=Pi(t,e.focusNode,e.focusOffset);r&&n&&wr(t,function(){vn(t.doc,Br(r,n),vo),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ma.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=W(n.line-1,S(e.doc,n.line-1).length)),i.ch==S(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=W(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||0==(o=Ut(e,n.line))?(a=O(t.view[0].line),l=t.view[0].node):(a=O(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Ut(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=O(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(function(e,t,r,n,i){function o(){c&&(s+=u,c=!1)}function a(e){e&&(o(),s+=e)}function l(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void a(r||t.textContent.replace(/\u200b/g,""));var s,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(W(n,0),W(i+1,0),function(e){return function(t){return t.id==e}}(+d));return void(f.length&&(s=f[0].find(0))&&a(L(e.doc,s.from,s.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p)$/i.test(t.nodeName);h&&o();for(var p=0;p<t.childNodes.length;p++)l(t.childNodes[p]);h&&(c=!0)}else 3==t.nodeType&&a(t.nodeValue)}for(var s="",c=!1,u=e.doc.lineSeparator();l(t),t!=r;)t=t.nextSibling;return s}(e,l,c,a,s)),f=L(e.doc,W(a,0),W(s,S(e.doc,s).text.length));d.length>1&&f.length>1;)if(m(d)==m(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var h=0,p=0,g=d[0],v=f[0],y=Math.min(g.length,v.length);h<y&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=m(d),w=m(f),x=Math.min(b.length-(1==d.length?h:0),w.length-(1==f.length?h:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==d.length&&1==f.length&&a==n.line)for(;h&&h>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.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 k=W(a,h),C=W(s,f.length?m(f).length-p:0);return d.length>1||d[0]||F(k,C)?(En(e.doc,d,k,C,"+input"),!0):void 0},Ma.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ma.prototype.reset=function(){this.forceCompositionEnd()},Ma.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ma.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))},Ma.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||wr(this.cm,function(){return Tr(e.cm)})},Ma.prototype.setUneditable=function(e){e.contentEditable="false"},Ma.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||xr(this.cm,Mi)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ma.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ma.prototype.onContextMenu=function(){},Ma.prototype.resetPosition=function(){},Ma.prototype.needsContentAttribute=!0;var Aa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new fo,this.hasSelection=!1,this.composing=null};Aa.prototype.init=function(e){function t(e){if(!me(i,e)){if(i.somethingSelected())Li({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Ni(i);Li({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,vo):(n.prevInput="",a.value=t.text.join("\n"),uo(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Ei(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Qi&&(a.style.width="0px"),Ao(a,"input",function(){Ui&&Ki>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Ao(a,"paste",function(e){me(i,e)||Ai(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ao(a,"cut",t),Ao(a,"copy",t),Ao(e.scroller,"paste",function(t){lt(e,t)||me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ao(e.lineSpace,"selectstart",function(t){lt(e,t)||be(t)}),Ao(a,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ao(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Aa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Vt(e);if(e.options.moveInputWithCursor){var i=Nt(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Aa.prototype.showSelection=function(e){var t=this.cm.display;r(t.cursorDiv,e.cursors),r(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Aa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&uo(this.textarea),Ui&&Ki>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",Ui&&Ki>=9&&(this.hasSelection=null))}},Aa.prototype.getField=function(){return this.textarea},Aa.prototype.supportsTouch=function(){return!1},Aa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!to||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},Aa.prototype.blur=function(){this.textarea.blur()},Aa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Aa.prototype.receivedFocus=function(){this.slowPoll()},Aa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Aa.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},Aa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||_o(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(Ui&&Ki>=9&&this.hasSelection===i||ro&&/[\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||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return wr(t,function(){Mi(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.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},Aa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Aa.prototype.onKeyPress=function(){Ui&&Ki>=9&&(this.hasSelection=null),this.fastPoll()},Aa.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=u,a.style.cssText=c,Ui&&Ki<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!Ui||Ui&&Ki<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?xr(i,Sn)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=qt(i,e),s=o.scroller.scrollTop;if(l&&!Yi){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&xr(i,vn)(i.doc,Br(l),vo);var c=a.style.cssText,u=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var d=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(Ui?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var f;if(Vi&&(f=window.scrollY),o.input.focus(),Vi&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Ui&&Ki>=9&&t(),so){ke(e);var h=function(){he(window,"mouseup",h),setTimeout(r,20)};Ao(window,"mouseup",h)}else setTimeout(r,50)}},Aa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Aa.prototype.setUneditable=function(){},Aa.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=ka&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=ka,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Gr(e)},!0),t("indentUnit",2,Gr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){$r(e),Ct(e),Tr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=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,r.push(W(n,o))}n++});for(var i=r.length-1;i>=0;i--)En(e.doc,t,r[i],W(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ka&&e.refresh()}),t("specialCharPlaceholder",Ke,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",to?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!io),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){wi(e),xi(e)},!0),t("keyMap","default",function(e,t,r){var n=ei(t),i=r!=ka&&ei(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Ci,!0),t("gutters",[],function(e){Pr(e.options),xi(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?jt(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return mr(e)},!0),t("scrollbarStyle","native",function(e){vr(e),mr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pr(e.options),xi(e)},!0),t("firstLineNumber",1,xi,!0),t("lineNumberFormatter",function(e){return e},xi,!0),t("showCursorWhenSelecting",!1,Kt,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Qt(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ki),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Kt,!0),t("singleCursorHeightPerLine",!0,Kt,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,$r,!0),t("addModeClass",!1,$r,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,$r,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Ti),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&xr(this,t[e])(this,r,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"](ei(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:kr(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Tr(this)}),removeOverlay:kr(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Tr(this)}}),indentLine:kr(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),_(this.doc,e)&&Si(this,e,t,r)}),indentSelection:kr(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Si(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&lr(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Si(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&pn(this.doc,n,new ra(o,c[n].to()),vo)}}}),getTokenAt:function(e,t){return Ie(this,e,t)},getLineTokens:function(e,t){return Ie(this,W(e),t,!0)},getTokenTypeAt:function(e){e=j(this.doc,e);var t,r=Fe(this,S(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&n.push(l)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==f(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return e=I(r,null==e?r.first+r.size-1:e),De(this,e+1,t).state},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?j(this.doc,e):e?n.from():n.to(),Nt(this,r,t||"page")},charCoords:function(e,t){return Ot(this,j(this.doc,e),t||"page")},coordsChar:function(e,t){return e=At(this,e,t||"page"),Wt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=At(this,{top:e,left:0},t||"page").top,N(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,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),n=S(this.doc,e)}else n=e;return Mt(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-le(n):0)},defaultTextHeight:function(){return Pt(this.display)},defaultCharWidth:function(){return Ht(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Nt(this,j(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&function(e,t){var r=or(e,t);null!=r.scrollTop&&dr(e,r.scrollTop),null!=r.scrollLeft&&hr(e,r.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:kr(fi),triggerOnKeyPress:kr(pi),triggerOnKeyUp:hi,triggerOnMouseDown:kr(mi),execCommand:function(e){if(ga.hasOwnProperty(e))return ga[e].call(null,this)},triggerElectric:kr(function(e){Oi(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=j(this.doc,e),a=0;a<t&&!(o=Wi(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:kr(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Wi(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},bo)}),deleteH:kr(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):ti(this,function(r){var i=Wi(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=j(this.doc,e),l=0;l<t;++l){var s=Nt(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Fi(this,s,i,r)).hitSide)break}return a},moveV:kr(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=Nt(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Fi(r,l,e,t);return"page"==t&&a==n.sel.primary()&&ar(r,Ot(r,s,"div").top-l.top),s},bo),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=S(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=w(o,i)?function(e){return w(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new ra(W(e.line,r),W(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):co(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:kr(function(e,t){sr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-dt(this)-this.display.barHeight,width:e.scrollWidth-dt(this)-this.display.barWidth,clientHeight:ht(this),clientWidth:ft(this)}},scrollIntoView:kr(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:W(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){cr(e),e.curOp.scrollToPos=t}(this,e):ur(this,e.from,e.to,e.margin)}),setSize:kr(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&kt(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){Sr(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,pe(this,"refresh",this)}),operation:function(e){return wr(this,e)},startOperation:function(){return yr(this)},endOperation:function(){return br(this)},refresh:kr(function(){var e=this.display.cachedTextHeight;Tr(this),this.curOp.forceUpdate=!0,Ct(this),sr(this,this.doc.scrollLeft,this.doc.scrollTop),Fr(this),(null==e||Math.abs(e-Pt(this.display))>.5)&&Bt(this),pe(this,"refresh",this)}),swapDoc:kr(function(e){var t=this.doc;return t.cm=null,Jr(this,e),Ct(this),this.display.input.reset(),sr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Xe(this,"swapDoc",this,t),t}),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}},ye(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Ti);var Oa="iter insert remove copy getEditor constructor".split(" ");for(var Na in sa.prototype)sa.prototype.hasOwnProperty(Na)&&f(Oa,Na)<0&&(Ti.prototype[Na]=function(e){return function(){return e.apply(this.doc,arguments)}}(sa.prototype[Na]));return ye(sa),Ti.inputStyles={textarea:Aa,contenteditable:Ma},Ti.defineMode=function(e){Ti.defaults.mode||"null"==e||(Ti.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fo[e]=t}.apply(this,arguments)},Ti.defineMIME=function(e,t){Do[e]=t},Ti.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ti.defineMIME("text/plain","null"),Ti.defineExtension=function(e,t){Ti.prototype[e]=t},Ti.defineDocExtension=function(e,t){sa.prototype[e]=t},Ti.fromTextArea=function(e,t){function r(){e.value=s.getValue()}if(t=t?u(t):{},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=a();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(Ao(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(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ti(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=he,e.on=Ao,e.wheelEventPixels=Ir,e.Doc=sa,e.splitLines=No,e.countColumn=d,e.findColumn=h,e.isWordChar=b,e.Pass=go,e.signal=pe,e.Line=Ro,e.changeEnd=qr,e.scrollbarModel=Xo,e.Pos=W,e.cmpPos=F,e.modes=Fo,e.mimeModes=Do,e.resolveMode=Me,e.getMode=Ae,e.modeExtensions=zo,e.extendMode=Oe,e.copyState=Ne,e.startState=Ee,e.innerMode=_e,e.commands=ga,e.keyMap=ma,e.keyName=Qn,e.isModifierKey=Zn,e.lookupKey=Xn,e.normalizeKeyMap=Yn,e.StringStream=Po,e.SharedTextMarker=aa,e.TextMarker=oa,e.LineWidget=na,e.e_preventDefault=be,e.e_stopPropagation=we,e.e_stop=ke,e.addClass=l,e.contains=o,e.rmClass=co,e.keyNames=da}(Ti),Ti.version="5.32.0",Ti})},{}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return h=t,e}function i(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function a(e,t,r){this.type=e,this.indent=t,this.prev=r}function l(e,t,r,n){return e.context=new a(r,t.indentation()+(!1===n?0:m),e.context),r}function s(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,r){return N[r.context.type](e,t,r)}function u(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return c(e,t,r)}function d(e){var t=e.current().toLowerCase();p=L.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var f=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,p,m=t.indentUnit,g=r.tokenHooks,v=r.documentTypes||{},y=r.mediaTypes||{},b=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},k=r.nonStandardPropertyKeywords||{},C=r.fontProperties||{},T=r.counterDescriptors||{},S=r.colorKeywords||{},L=r.valueKeywords||{},M=r.allowNested,A=r.lineComment,O=!0===r.supportsAtComponent,N={};return N.top=function(e,t,r){if("{"==e)return l(r,t,"block");if("}"==e&&r.context.prev)return s(r);if(O&&/@component/.test(e))return l(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return l(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return l(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(r,t,"at");if("hash"==e)p="builtin";else if("word"==e)p="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(r,t,"interpolation");if(":"==e)return"pseudo";if(M&&"("==e)return l(r,t,"parens")}return r.context.type},N.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(p="property","maybeprop"):k.hasOwnProperty(n)?(p="string-2","maybeprop"):M?(p=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==e?"block":M||"hash"!=e&&"qualifier"!=e?N.top(e,t,r):(p="error","block")},N.maybeprop=function(e,t,r){return":"==e?l(r,t,"prop"):c(e,t,r)},N.prop=function(e,t,r){if(";"==e)return s(r);if("{"==e&&M)return l(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return l(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)d(t);else if("interpolation"==e)return l(r,t,"interpolation")}else p+=" error";return"prop"},N.propBlock=function(e,t,r){return"}"==e?s(r):"word"==e?(p="property","maybeprop"):r.context.type},N.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?s(r):"("==e?l(r,t,"parens"):"interpolation"==e?l(r,t,"interpolation"):("word"==e&&d(t),"parens")},N.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(p="variable-3",r.context.type):c(e,t,r)},N.documentTypes=function(e,t,r){return"word"==e&&v.hasOwnProperty(t.current())?(p="tag",r.context.type):N.atBlock(e,t,r)},N.atBlock=function(e,t,r){if("("==e)return l(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return s(r)&&l(r,t,M?"block":"top");if("interpolation"==e)return l(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();p="only"==n||"not"==n||"and"==n||"or"==n?"keyword":y.hasOwnProperty(n)?"attribute":b.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":k.hasOwnProperty(n)?"string-2":L.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},N.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?s(r)&&l(r,t,M?"block":"top",!1):("word"==e&&(p="error"),r.context.type)},N.atBlock_parens=function(e,t,r){return")"==e?s(r):"{"==e||"}"==e?u(e,t,r,2):N.atBlock(e,t,r)},N.restricted_atBlock_before=function(e,t,r){return"{"==e?l(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(p="variable","restricted_atBlock_before"):c(e,t,r)},N.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,s(r)):"word"==e?(p="@font-face"==r.stateArg&&!C.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,r){return"word"==e?(p="variable","keyframes"):"{"==e?l(r,t,"top"):c(e,t,r)},N.at=function(e,t,r){return";"==e?s(r):"{"==e||"}"==e?u(e,t,r):("word"==e?p="tag":"hash"==e&&(p="builtin"),"at")},N.interpolation=function(e,t,r){return"}"==e?s(r):"{"==e||";"==e?u(e,t,r):("word"==e?p="variable":"variable"!=e&&"("!=e&&")"!=e&&(p="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(g[r]){var a=g[r](e,t);if(!1!==a)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),p=r,"comment"!=h&&(t.state=N[t.state](h,e,t)),p},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:A,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(h),m=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=t(v),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(b),x=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(v).concat(b);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:w,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:w,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":17}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){var r=e.match(function(e){var t=o[e];return t||(o[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function r(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function n(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},o={};e.defineMode("htmlmixed",function(o,a){function l(n,i){var a,u=s.token(n,i.htmlState),d=/\btag\b/.test(u);if(d&&!/[<>\s\/]/.test(n.current())&&(a=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))i.inTag=a+" ";else if(i.inTag&&d&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var h=">"==n.current()&&function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(t(r,i[0])))return i[2]}}(c[f[1]],f[2]),p=e.getMode(o,h),m=r(f[1],!0),g=r(f[1],!1);i.token=function(e,t){return e.match(m,!1)?(t.token=l,t.localState=t.localMode=null,null):function(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}(e,g,t.localMode.token(e,t.localState))},i.localMode=p,i.localState=e.startState(p,s.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return u}var s=e.getMode(o,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag}),c={},u=a&&a.tags,d=a&&a.scriptTypes;if(n(i,c),u&&n(u,c),d)for(var f=d.length-1;f>=0;f--)c.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?s.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":17,"../css/css":18,"../javascript/javascript":20,"../xml/xml":21}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e,t,r){return ke=e,Ce=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=function(e){return function(t,r){var o,a=!1;if(Le&&"@"==t.peek()&&t.match(Ee))return r.tokenize=i,n("jsonld-keyword","meta");for(;null!=(o=t.next())&&(o!=e||a);)a=!a&&"\\"==o;return a||(r.tokenize=i),n("string","string")}}(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return n("number","number");if("."==r&&e.match(".."))return n("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return n(r);if("="==r&&e.eat(">"))return n("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),n("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),n("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),n("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),n("number","number");if("/"==r)return e.eat("*")?(t.tokenize=o,o(e,t)):e.eat("/")?(e.skipToEnd(),n("comment","comment")):xe(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),n("regexp","string-2")):(e.eat("="),n("operator","operator",e.current()));if("`"==r)return t.tokenize=a,a(e,t);if("#"==r)return e.skipToEnd(),n("error","error");if(_e.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),n("operator","operator",e.current());if(Oe.test(r)){e.eatWhile(Oe);var l=e.current();if("."!=t.lastType){if(Ne.propertyIsEnumerable(l)){var s=Ne[l];return n(s.type,s.style,l)}if("async"==l&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return n("async","keyword",l)}return n("variable","variable",l)}}function o(e,t){for(var r,o=!1;r=e.next();){if("/"==r&&o){t.tokenize=i;break}o="*"==r}return n("comment","comment")}function a(e,t){for(var r,o=!1;null!=(r=e.next());){if(!o&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}o=!o&&"\\"==r}return n("quasi","string-2",e.current())}function l(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ae){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=We.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(Oe.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function s(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function c(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function u(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function d(){return u.apply(null,arguments),!0}function f(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function h(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=ze}function p(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function m(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new s(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function g(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function v(e){function t(r){return r==e?d():";"==e?u():d(t)}return t}function y(e,t){return"var"==e?d(m("vardef",t.length),Y,v(";"),g):"keyword a"==e?d(m("form"),x,y,g):"keyword b"==e?d(m("form"),y,g):"keyword d"==e?De.stream.match(/^\s*$/,!1)?d():d(m("stat"),C,v(";"),g):"debugger"==e?d(v(";")):"{"==e?d(m("}"),P,g):";"==e?d():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==g&&De.state.cc.pop()(),d(m("form"),x,y,g,ee)):"function"==e?d(ae):"for"==e?d(m("form"),te,y,g):"variable"==e?Ae&&"type"==t?(De.marked="keyword",d(R,v("operator"),R,v(";"))):Ae&&"declare"==t?(De.marked="keyword",d(y)):Ae&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",d(m("form"),X,v("{"),m("}"),P,g,g)):d(m("stat"),N):"switch"==e?d(m("form"),x,v("{"),m("}","switch"),P,g,g):"case"==e?d(b,v(":")):"default"==e?d(v(":")):"catch"==e?d(m("form"),h,v("("),le,v(")"),y,g,p):"class"==e?d(m("form"),ce,g):"export"==e?d(m("stat"),he,g):"import"==e?d(m("stat"),me,g):"async"==e?d(y):"@"==t?d(b,y):u(m("stat"),b,v(";"),g)}function b(e){return k(e,!1)}function w(e){return k(e,!0)}function x(e){return"("!=e?u():d(m(")"),b,v(")"),g)}function k(e,t){if(De.state.fatArrowAt==De.stream.start){var r=t?O:A;if("("==e)return d(h,m(")"),D(le,")"),g,v("=>"),r,p);if("variable"==e)return u(h,X,v("=>"),r,p)}var n=t?S:T;return Fe.hasOwnProperty(e)?d(n):"function"==e?d(ae,n):"class"==e?d(m("form"),se,g):"keyword c"==e||"async"==e?d(t?w:b):"("==e?d(m(")"),C,v(")"),g,n):"operator"==e||"spread"==e?d(t?w:b):"["==e?d(m("]"),we,g,n):"{"==e?z(E,"}",null,n):"quasi"==e?u(L,n):"new"==e?d(function(e){return function(t){return"."==t?d(e?function(e,t){if("target"==t)return De.marked="keyword",d(S)}:function(e,t){if("target"==t)return De.marked="keyword",d(T)}):"variable"==t&&Ae?d(V,e?S:T):u(e?w:b)}}(t)):d()}function C(e){return e.match(/[;\}\)\],]/)?u():u(b)}function T(e,t){return","==e?d(b):S(e,t,!1)}function S(e,t,r){var n=0==r?T:S,i=0==r?b:w;return"=>"==e?d(h,r?O:A,p):"operator"==e?/\+\+|--/.test(t)||Ae&&"!"==t?d(n):Ae&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?d(m(">"),D(R,">"),g,n):"?"==t?d(b,v(":"),i):d(i):"quasi"==e?u(L,n):";"!=e?"("==e?z(w,")","call",n):"."==e?d(_,n):"["==e?d(m("]"),C,v("]"),g,n):Ae&&"as"==t?(De.marked="keyword",d(R,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),d(i)):void 0:void 0}function L(e,t){return"quasi"!=e?u():"${"!=t.slice(t.length-2)?d(L):d(b,M)}function M(e){if("}"==e)return De.marked="string-2",De.state.tokenize=a,d(L)}function A(e){return l(De.stream,De.state),u("{"==e?y:b)}function O(e){return l(De.stream,De.state),u("{"==e?y:w)}function N(e){return":"==e?d(g,y):u(T,v(";"),g)}function _(e){if("variable"==e)return De.marked="property",d()}function E(e,t){if("async"==e)return De.marked="property",d(E);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return d(W);var r;return Ae&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),d(F)}return"number"==e||"string"==e?(De.marked=Le?"property":De.style+" property",d(F)):"jsonld-keyword"==e?d(F):"modifier"==e?d(E):"["==e?d(b,v("]"),F):"spread"==e?d(w,F):"*"==t?(De.marked="keyword",d(E)):":"==e?u(F):void 0}function W(e){return"variable"!=e?u(F):(De.marked="property",d(ae))}function F(e){return":"==e?d(w):"("==e?u(ae):void 0}function D(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=De.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),d(function(r,n){return r==t||n==t?u():u(e)},n)}return i==t||o==t?d():d(v(t))}return function(r,i){return r==t||i==t?d():u(e,n)}}function z(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return d(m(t,r),D(e,t),g)}function P(e){return"}"==e?d():u(y,P)}function H(e,t){if(Ae){if(":"==e)return d(R);if("?"==t)return d(H)}}function I(e){if(Ae&&":"==e)return De.stream.match(/^\s*\w+\s+is\b/,!1)?d(b,j,R):d(R)}function j(e,t){if("is"==t)return De.marked="keyword",d()}function R(e,t){return"variable"==e||"void"==t?"keyof"==t?(De.marked="keyword",d(R)):(De.marked="type",d(K)):"string"==e||"number"==e||"atom"==e?d(K):"["==e?d(m("]"),D(R,"]",","),g,K):"{"==e?d(m("}"),D(q,"}",",;"),g,K):"("==e?d(D(U,")"),B):void 0}function B(e){if("=>"==e)return d(R)}function q(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",d(q)):"?"==t?d(q):":"==e?d(R):"["==e?d(b,H,v("]"),q):void 0}function U(e){return"variable"==e?d(U):":"==e?d(R):void 0}function K(e,t){return"<"==t?d(m(">"),D(R,">"),g,K):"|"==t||"."==e?d(R):"["==e?d(v("]"),K):"extends"==t?d(R):void 0}function V(e,t){if("<"==t)return d(m(">"),D(R,">"),g,K)}function G(){return u(R,$)}function $(e,t){if("="==t)return d(R)}function Y(){return u(X,H,J,Q)}function X(e,t){return"modifier"==e?d(X):"variable"==e?(f(t),d()):"spread"==e?d(X):"["==e?z(X,"]"):"{"==e?z(Z,"}"):void 0}function Z(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?d(X):"}"==e?u():d(v(":"),X,J)):(f(t),d(J))}function J(e,t){if("="==t)return d(w)}function Q(e){if(","==e)return d(Y)}function ee(e,t){if("keyword b"==e&&"else"==t)return d(m("form","else"),y,g)}function te(e){if("("==e)return d(m(")"),re,v(")"),g)}function re(e){return"var"==e?d(Y,v(";"),ie):";"==e?d(ie):"variable"==e?d(ne):u(b,v(";"),ie)}function ne(e,t){return"in"==t||"of"==t?(De.marked="keyword",d(b)):d(T,ie)}function ie(e,t){return";"==e?d(oe):"in"==t||"of"==t?(De.marked="keyword",d(b)):u(b,v(";"),oe)}function oe(e){")"!=e&&d(b)}function ae(e,t){return"*"==t?(De.marked="keyword",d(ae)):"variable"==e?(f(t),d(ae)):"("==e?d(h,m(")"),D(le,")"),g,I,y,p):Ae&&"<"==t?d(m(">"),D(G,">"),g,ae):void 0}function le(e,t){return"@"==t&&d(b,le),"spread"==e||"modifier"==e?d(le):u(X,H,J)}function se(e,t){return"variable"==e?ce(e,t):ue(e,t)}function ce(e,t){if("variable"==e)return f(t),d(ue)}function ue(e,t){return"<"==t?d(m(">"),D(G,">"),g,ue):"extends"==t||"implements"==t||Ae&&","==e?d(Ae?R:b,ue):"{"==e?d(m("}"),de,g):void 0}function de(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",d(de)):"variable"==e||"keyword"==De.style?(De.marked="property",d(Ae?fe:ae,de)):"["==e?d(b,v("]"),Ae?fe:ae,de):"*"==t?(De.marked="keyword",d(de)):";"==e?d(de):"}"==e?d():"@"==t?d(b,de):void 0}function fe(e,t){return"?"==t?d(fe):":"==e?d(R,J):"="==t?d(w):u(ae)}function he(e,t){return"*"==t?(De.marked="keyword",d(be,v(";"))):"default"==t?(De.marked="keyword",d(b,v(";"))):"{"==e?d(D(pe,"}"),be,v(";")):u(y)}function pe(e,t){return"as"==t?(De.marked="keyword",d(v("variable"))):"variable"==e?u(w,pe):void 0}function me(e){return"string"==e?d():u(ge,ve,be)}function ge(e,t){return"{"==e?z(ge,"}"):("variable"==e&&f(t),"*"==t&&(De.marked="keyword"),d(ye))}function ve(e){if(","==e)return d(ge,ve)}function ye(e,t){if("as"==t)return De.marked="keyword",d(ge)}function be(e,t){if("from"==t)return De.marked="keyword",d(b)}function we(e){return"]"==e?d():u(D(w,"]"))}function xe(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var ke,Ce,Te=t.indentUnit,Se=r.statementIndent,Le=r.jsonld,Me=r.json||Le,Ae=r.typescript,Oe=r.wordCharacters||/[\w$\xa1-\uffff]/,Ne=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Ae){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var u in c)l[u]=c[u]}return l}(),_e=/[+\-*&%=<>!?|~^@]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,We="([{}])",Fe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},ze={name:"this",next:{name:"arguments"}};return g.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new s((e||0)-Te,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),l(e,t)),t.tokenize!=o&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==ke?r:(t.lastType="operator"!=ke||"++"!=Ce&&"--"!=Ce?ke:"incdec",function(e,t,r,n,i){var o=e.cc;for(De.state=e,De.stream=i,De.marked=null,De.cc=o,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():Me?b:y)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return De.marked?De.marked:"variable"==r&&c(e,n)?"variable-2":t}}(t,r,ke,Ce,e))},indent:function(t,n){if(t.tokenize==o)return e.Pass;if(t.tokenize!=i)return 0;var a,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==g)s=s.prev;else if(u!=ee)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(a=t.cc[t.cc.length-1])&&(a==T||a==S)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Se&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,f=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+Te:"stat"==d?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||_e.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?Se||Te:0):"switch"!=s.info||f||0==r.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:Te):s.indented+(/^(?:case|default)\b/.test(n)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Me?null:"/*",blockCommentEnd:Me?null:"*/",blockCommentContinue:Me?null:" * ",lineComment:Me?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Me?"json":"javascript",jsonldMode:Le,jsonMode:Me,expressionAllowed:xe,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=b&&t!=w||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":17}],21:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(l("atom","]]>")):null:e.match("--")?r(l("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(s(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){return(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,T=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return T="equals",null;if("<"==r){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=function(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function s(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=s(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=s(e-1),r.tokenize(t,r)}}return"meta"}}function c(e){e.context&&(e.context=e.context.prev)}function u(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;c(e)}}function d(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:d}function f(e,t,r){return"word"==e?(r.tagName=t.current(),S="tag",g):(S="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&c(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(S="tag",p):(S="tag error",m)}return S="error",m}function p(e,t,r){return"endTag"!=e?(S="error",p):(c(r),d)}function m(e,t,r){return S="error",p(e,0,r)}function g(e,t,r){if("word"==e)return S="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?u(r,n):(u(r,n),r.context=new function(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}(r,n,i==r.indented)),d}return S="error",g}function v(e,t,r){return"equals"==e?y:(x.allowMissing||(S="error"),g(e,0,r))}function y(e,t,r){return"string"==e?b:"word"==e&&x.allowUnquoted?(S="string",g):(S="error",g(e,0,r))}function b(e,t,r){return"string"==e?b:g(e,0,r)}var w=n.indentUnit,x={},k=i.htmlMode?t:r;for(var C in k)x[C]=k[C];for(var C in i)x[C]=i[C];var T,S;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var r=t.tokenize(e,t);return(r||T)&&"comment"!=r&&(S=null,t.state=t.state(T||r,e,t),S&&(r="error"==S?r+" error":S)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!x.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=x.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+w:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==y&&(e.state=g)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":17}],22:[function(e,t,r){t.exports={prettyPrint:function(e,t){var r,n,i,o,a,l;for(n=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,l=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(r=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace))t.length&&(r=!0),this.line_char_count--;else{if(r){if(this.line_char_count>=this.max_char){t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;r=!1}t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1==this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.get_tag=function(){var e,t,r="",n=[],i=!1;do{if(this.pos>=this.input.length)return n.length?n.join(""):["","TK_EOF"];r=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(r,this.Utils.whitespace)?(i=!0,this.line_char_count--):("'"!==r&&'"'!==r||n[1]&&"!"===n[1]||(r+=this.get_unformatted(r),i=!0),"="===r&&(i=!1),n.length&&"="!==n[n.length-1]&&">"!==r&&i&&(this.line_char_count>=this.max_char?(this.print_newline(!1,n),this.line_char_count=0):(n.push(" "),this.line_char_count++),i=!1),"<"===r&&(e=this.pos-1),n.push(r))}while(">"!==r);var o,a=n.join("");o=-1!=a.indexOf(" ")?a.indexOf(" "):a.indexOf(">");var s=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(s,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===s)this.record_tag(s),this.tag_type="SCRIPT";else if("style"===s)this.record_tag(s),this.tag_type="STYLE";else if(this.Utils.in_array(s,l)){var c=this.get_unformatted("</"+s+">",a);n.push(c),e>0&&this.Utils.in_array(this.input.charAt(e-1),this.Utils.whitespace)&&n.splice(0,0,this.input.charAt(e-1)),t=this.pos-1,this.Utils.in_array(this.input.charAt(t+1),this.Utils.whitespace)&&n.push(this.input.charAt(t+1)),this.tag_type="SINGLE"}else"!"===s.charAt(0)?-1!=s.indexOf("[if")?(-1!=a.indexOf("!IE")&&(c=this.get_unformatted("--\x3e",a),n.push(c)),this.tag_type="START"):-1!=s.indexOf("[endif")?(this.tag_type="END",this.unindent()):-1!=s.indexOf("[cdata[")?(c=this.get_unformatted("]]>",a),n.push(c),this.tag_type="SINGLE"):(c=this.get_unformatted("--\x3e",a),n.push(c),this.tag_type="SINGLE"):("/"===s.charAt(0)?(this.retrieve_tag(s.substring(1)),this.tag_type="END"):(this.record_tag(s),this.tag_type="START"),this.Utils.in_array(s,this.Utils.extra_liners)&&this.print_newline(!0,this.output));return n.join("")},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var r="",n="",i=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,i=!0}while(-1==n.toLowerCase().indexOf(e));return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,r,n,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=r,this.brace_style=i,this.indent_level=0,this.max_char=n,this.line_char_count=0;for(var o=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){if(this.line_char_count=0,t&&t.length){if(!e)for(;this.Utils.in_array(t[t.length-1],this.Utils.whitespace);)t.pop();t.push("\n");for(var r=0;r<this.indent_level;r++)t.push(this.indent_string)}},this.print_token=function(e){this.output.push(e)},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}).printer(e,i,n,o,a);;){var s=r.get_token();if(r.token_text=s[0],r.token_type=s[1],"TK_EOF"===r.token_type)break;switch(r.token_type){case"TK_TAG_START":r.print_newline(!1,r.output),r.print_token(r.token_text),r.indent(),r.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===r.last_token&&""===r.last_text){var c=r.token_text.match(/\w+/)[0],u=r.output[r.output.length-1].match(/<\s*(\w+)/);null!==u&&u[1]===c||r.print_newline(!0,r.output)}r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var d=r.token_text.match(/^\s*<([a-z]+)/i);d&&r.Utils.in_array(d[1],l)||r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_CONTENT":""!==r.token_text&&r.print_token(r.token_text),r.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==r.token_text){r.output.push("\n");var f=r.token_text;if("TK_SCRIPT"==r.token_type)var h="function"==typeof js_beautify&&js_beautify;else"TK_STYLE"==r.token_type&&(h="function"==typeof css_beautify&&css_beautify);if("keep"==t.indent_scripts)var p=0;else p="separate"==t.indent_scripts?-r.indent_level:1;var m=r.get_full_indent(p);if(h)f=h(f.replace(/^\s*/,m),t);else{var g=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(r.indent_string).length-1,v=r.get_full_indent(p-g);f=f.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+v).replace(/\s*$/,"")}f&&(r.print_token(f),r.print_newline(!0,r.output))}r.current_mode="TAG"}r.last_token=r.token_type,r.last_text=r.token_text}return r.output.join("")}}},{}],23:[function(e,t,r){"use strict";t.exports=e("./stream/stream")},{"./stream/stream":24}],24:[function(e,t,r){!function(){"use strict";function e(){function t(){return arguments.length>0&&arguments[0]!==v&&r(t,arguments[0]),t._state.value}return function(t){t.constructor=e,t._state={id:g++,value:void 0,state:0,derive:void 0,recover:void 0,deps:{},parents:[],endStream:void 0,unregister:void 0},t.map=t["fantasy-land/map"]=s,t["fantasy-land/ap"]=c,t["fantasy-land/of"]=e,t.valueOf=u,t.toJSON=d,t.toString=u,Object.defineProperties(t,{end:{get:function(){if(!t._state.endStream){var r=e();r.map(function(e){return!0===e&&(l(t),r._state.unregister=function(){l(r)}),e}),t._state.endStream=r}return t._state.endStream}}})}(t),arguments.length>0&&arguments[0]!==v&&r(t,arguments[0]),t}function r(e,t){n(e,t);for(var r in e._state.deps)i(e._state.deps[r],!1);null!=e._state.unregister&&e._state.unregister(),function(e){e._state.changed=!1;for(var t in e._state.deps)e._state.deps[t]._state.changed=!1}(e)}function n(e,t){e._state.value=t,e._state.changed=!0,2!==e._state.state&&(e._state.state=1)}function i(e,t){var r=e._state.parents;if(r.length>0&&r.every(h)&&(t||r.some(p))){var i=e._state.derive();if(i===v)return!1;n(e,i)}}function o(t,r){if(!r.every(f))throw new Error("Ensure that each item passed to stream.combine/stream.merge is a stream");return function(e,t,r){var n=e._state;return n.derive=r,n.parents=t.filter(m),a(e,n.parents),i(e,!0),e}(e(),r,function(){return t.apply(this,r.concat([r.filter(p)]))})}function a(e,t){for(var r=0;r<t.length;r++)t[r]._state.deps[e._state.id]=e,a(e,t[r]._state.parents)}function l(e){for(var t=0;t<e._state.parents.length;t++){delete e._state.parents[t]._state.deps[e._state.id]}for(var r in e._state.deps){var n=e._state.deps[r],i=n._state.parents.indexOf(e);i>-1&&n._state.parents.splice(i,1)}e._state.state=2,e._state.deps={}}function s(e){return o(function(t){return e(t())},[this])}function c(e){return o(function(e,t){return e()(t())},[e,this])}function u(){return this._state.value}function d(){return null!=this._state.value&&"function"==typeof this._state.value.toJSON?this._state.value.toJSON():this._state.value}function f(e){return e._state}function h(e){return 1===e._state.state}function p(e){return e._state.changed}function m(e){return 2!==e._state.state}var g=0,v={};e["fantasy-land/of"]=e,e.merge=function(e){return o(function(){return e.map(function(e){return e()})},e)},e.combine=o,e.scan=function(e,t,r){var n=o(function(r){return t=e(t,r._state.value)},[r]);return 0===n._state.state&&n(t),n},e.scanMerge=function(e,t){var r=e.map(function(e){var t=e[0];return 0===t._state.state&&t(void 0),t});return o(function(){var n=arguments[arguments.length-1];return r.forEach(function(r,i){n.indexOf(r)>-1&&(t=e[i][1](t,r._state.value))}),t},r)},e.HALT=v,void 0!==t?t.exports=e:"function"!=typeof window.m||"stream"in window.m?window.m={stream:e}:window.m.stream=e}()},{}]},{},[11])}();
|
2 |
//# sourceMappingURL=forms-admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function(){function t(r,n,i){function o(l,s){if(!n[l]){if(!r[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};r[l][0].call(d.exports,function(e){var t=r[l][1][e];return o(t||e)},d,d.exports,t,r,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}return t}()({1:[function(e,t,r){"use strict";t.exports=function(e,t){var r={};return r.showType=function(r){var n=r.type();return n=n.charAt(0).toUpperCase()+n.slice(1),e("div",[e("label",t.fieldType),e("span",n)])},r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){var n="hidden"===r.type();return e("div",[e("label",[n?t.value:t.initialValue," ",n?"":e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),n?"":e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)},i=void 0;return r.forceRequired()&&(n.required=!0,n.disabled=!0,i=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",n),t.isFieldRequired]),i])},r.placeholder=function(r){return e("div",[e("label",[t.placeholder," ",e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){var n=[e("option",{value:"select",selected:"select"===r.type()&&"selected"},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()&&"selected"},t.radioButtons)];return r.acceptsMultipleValues&&n.push(e("option",{value:"checkbox",selected:"checkbox"===r.type()&&"selected"},t.checkboxes)),e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},n)])},r.choices=function(r){var n=[];return n.push(e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(n,i){return e("tr",{"data-id":i},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:n.selected(),value:n.value(),title:t.preselect})),e("td.stretch",e("input.widefat",{type:"text",value:n.label(),placeholder:n.title(),onchange:e.withAttr("value",n.label)})),e("td",e("span",{title:t.remove,class:"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,i)},""))])})])])])),n},r.linkToTerms=function(r){return e("div",[e("label",t.agreeToTermsLink),e("input.widefat",{type:"text",value:r.link,onchange:e.withAttr("value",r.link),placeholder:"https://..."})])},r}},{}],2:[function(e,t,r){"use strict";t.exports=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type()&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.label(""),e.wrap(!1),[i.showType(e),i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n["terms-checkbox"]=function(e){return[i.label(e),i.linkToTerms(e),i.isRequired(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n}},{"./field-forms-rows.js":1}],3:[function(e,t,r){"use strict";var n=e("html"),i=function(e){e.dom.checked&&e.dom.setAttribute("checked","true"),e.dom.value&&e.dom.setAttribute("value",e.dom.value),e.dom.selected&&e.dom.setAttribute("selected","true")};t.exports=function(e){var t={};return t.select=function(t){var r={name:t.name(),required:t.required()},n=!1,o=t.choices().map(function(t){return t.selected()&&(n=!0),e("option",{value:t.value()!==t.label()?t.value():void 0,selected:t.selected(),oncreate:i},t.label())}),a=t.placeholder();return a.length>0&&o.unshift(e("option",{disabled:!0,value:"",selected:!n,oncreate:i},a)),e("select",r,o)},t["terms-checkbox"]=function(t){var r=void 0;return r=t.link().length>0?e("a",{href:t.link(),target:"_blank"},t.label()):t.label(),e("label",[e("input",{name:t.name(),type:"checkbox",value:t.value(),required:t.required()})," ",r])},t.checkbox=function(t){return t.choices().map(function(r){var n=t.name()+("checkbox"===t.type()?"[]":""),o=t.required()&&"radio"===t.type();return e("label",[e("input",{name:n,type:t.type(),value:r.value(),checked:r.selected(),required:o,oncreate:i})," ",e("span",r.label())])})},t.radio=t.checkbox,t.default=function(t){var r={type:t.type()};return t.name()&&(r.name=t.name()),t.min()&&(r.min=t.min()),t.max()&&(r.max=t.max()),t.value().length>0&&(r.value=t.value()),t.placeholder().length>0&&(r.placeholder=t.placeholder()),r.required=t.required(),r.oncreate=i,e("input",r)},function(r){var i=void 0,o=void 0,a=void 0,l=document.createElement("div");return i=r.label().length>0&&r.showLabel()?e("label",{},r.label()):"",o="function"==typeof t[r.type()]?t[r.type()](r):t.default(r),a=r.wrap()?e("p",[i,o]):[i,o],e.render(l,a),n.prettyPrint(l.innerHTML)+"\n"}}},{html:22}],4:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function l(e){(c=i.get(e))&&c.choices().length>0&&c.value(c.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function s(){var e=u(c);n.insert(e),l(""),t.redraw()}var c,u=e("./field-generator.js")(t),d=e("./overlay.js")(t,a),f=e("./field-forms.js")(t,a);return n.on("blur",t.redraw),{view:function(){var e=i.getCategories(),r=i.getAll(),n=t("div.available-fields.small-margin",[t("h4",a.chooseField),e.map(function(e){var n=r.filter(function(t){return t.category===e});if(n.length)return t("div.tiny-margin",[t("strong",e),n.map(function(e){var r="button";e.forceRequired()&&(r+=" is-required");var n=e.inFormContent();return null!==n&&(r+=" "+(n?"in-form":"not-in-form")),t("button",{className:r,type:"button",onclick:t.withAttr("value",l),value:e.index},e.title())})])})]),o=null;return c&&(o=t(d(t("div.field-wizard",[t("h3",[c.title(),c.forceRequired()?t("span.red","*"):"",c.name().length?t("code",c.name()):""]),c.help().length?t("p",t.trust(c.help())):"",f.render(c),t("p",[t("button",{class:"button-primary",type:"button",onkeydown:function(e){13==(e=e||window.event).keyCode&&s()},onclick:s},a.addToForm)])]),l))),[n,o]},controller:function(){}}}},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){"use strict";t.exports=function(e,t){function r(t,r,n){var i=e.register(t,r);n||l.push(i)}function n(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function i(e){var i=t.listFields,o=n(e.field_type),a={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o,choices:e.choices,acceptsMultipleValues:!1};return"address"!==a.type?r(i,a,!1):(r(i,{name:a.name+"[addr1]",type:"text",mailchimpType:"address",title:t.streetAddress}),r(i,{name:a.name+"[city]",type:"text",mailchimpType:"address",title:t.city}),r(i,{name:a.name+"[state]",type:"text",mailchimpType:"address",title:t.state}),r(i,{name:a.name+"[zip]",type:"text",mailchimpType:"address",title:t.zip}),r(i,{name:a.name+"[country]",type:"select",mailchimpType:"address",title:t.country,choices:mc4wp_vars.countries})),!0}function o(e){var i=t.interestCategories,o=n(e.field_type);r(i,{title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o},!1)}function a(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e.public&&!t.public?-1:!e.public&&t.public?1:0}),e.merge_fields.forEach(i),e.interest_categories.forEach(o)}var l=[];return{registerCustomFields:function(e){var n,i=t.formFields;r(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),n={};for(var o in e)n[e[o].id]=e[o].name;r(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:n,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),n={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},r(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:n,value:"subscribe",help:t.formActionDescription},!0),r(i,{name:"AGREE_TO_TERMS",value:1,type:"terms-checkbox",label:t.agreeToTerms,title:t.agreeToTermsShort,showLabel:!1,required:!0},!0)},registerListFields:a,registerListsFields:function(t){l.forEach(e.deregister),t.forEach(a)}}}},{}],6:[function(e,t,r){"use strict";var n=e("mithril/stream");t.exports=function(e,t){function r(e,t){return o.filter(function(r){return r[e]()===t})}var i,o=[],a=[],l=function(e){this.name=n(e.name),this.title=n(e.title||e.name),this.type=n(e.type),this.mailchimpType=n(e.mailchimpType||""),this.label=n(e.label||e.title||""),this.showLabel=n(void 0===e.showLabel||e.showLabel),this.value=n(e.value||""),this.placeholder=n(e.placeholder||""),this.required=n(e.required||!1),this.forceRequired=n(e.forceRequired||!1),this.wrap=n(void 0===e.wrap||e.wrap),this.min=n(e.min||null),this.max=n(e.max||null),this.help=n(e.help||""),this.choices=n(e.choices||[]),this.inFormContent=n(null),this.acceptsMultipleValues=e.acceptsMultipleValues,this.link=n(e.link||""),this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},s=function(e){this.label=n(e.label),this.title=n(e.title||e.label),this.selected=n(e.selected||!1),this.value=n(e.value||e.label)};return{get:function(e){return o[e]},getAll:function(){return o=o.map(function(e,t){return e.index=t,e})},getCategories:function(){return a},deregister:function(t){var r=o.indexOf(t);r>-1&&(delete o[r],e.redraw())},register:function(n,c){var u,d=r("name",c.name).shift();if(!d)return c.choices&&(c.choices=function(e){return"function"==typeof e.map?e.map(function(e){return new s({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new s({label:r,value:t})})}(c.choices),c.value&&(c.choices=c.choices.map(function(e){return e.value()===c.value&&e.selected(!0),e}))),a.indexOf(n)<0&&a.push(n),u=new l(c),u.category=n,o.push(u),i&&window.clearTimeout(i),i=window.setTimeout(e.redraw,200),t.trigger("fields.change"),u;!d.forceRequired()&&c.forceRequired&&d.forceRequired(!0)},getAllWhere:r}}},{"mithril/stream":23}],7:[function(e,t,r){"use strict";function n(){var e=h.contentDocument||h.contentWindow.document;(s=e.querySelector(".mc4wp-form-fields"))&&i()}function i(){var e=c.getValue();e=e.replace(p,"").replace(p,""),s.innerHTML=e,s.dispatchEvent(new Event("mc4wp-refresh"))}function o(){return d&&(u.innerHTML=c.getValue().toLowerCase(),d=!1),u}var a=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/edit/matchtags.js"),e("codemirror/addon/edit/closetag.js"),e("codemirror/addon/selection/active-line.js"),e("codemirror/addon/edit/matchbrackets.js");var l,s,c={},u=document.createElement("form"),d=!1,f=document.getElementById("mc4wp-form-content"),h=document.getElementById("mc4wp-form-preview"),p=/\{[^{}]+\}/g;window.addEventListener("load",function(){a.signal(l,"change")}),f.addEventListener("change",function(){d=!0,i()}),c.getValue=function(){return l?l.getValue():f.value},c.query=function(e){return o().querySelectorAll(e.toLowerCase())},c.containsField=function(e){return null!==o().elements.namedItem(e.toLowerCase())},c.insert=function(e){l?(l.replaceSelection(e),l.focus()):f.value+=e},c.on=function(e,t){return l?(e="input"===e?"changes":e,l.on(e,t)):f.addEventListener(e,t)},c.refresh=function(){l&&l.refresh()},u.innerHTML=f.value.toLowerCase(),a&&(l=a.fromTextArea(f,{selectionPointer:!0,mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0,styleActiveLine:!0,matchBrackets:!0,matchTags:{bothTags:!0}}),window.dispatchEvent&&l.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});f.dispatchEvent(e)}})),h.addEventListener("load",n),n.call(),t.exports=c},{codemirror:17,"codemirror/addon/edit/closetag.js":12,"codemirror/addon/edit/matchbrackets.js":13,"codemirror/addon/edit/matchtags.js":14,"codemirror/addon/fold/xml-fold.js":15,"codemirror/addon/selection/active-line.js":16,"codemirror/mode/css/css":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/xml/xml":21}],8:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,i,o){function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);if(e.inFormContent(n),"address"===e.mailchimpType()){e.originalRequiredValue=void 0===e.originalRequiredValue?e.forceRequired():e.originalRequiredValue;var i=e.name().replace(/\[(\w+)\]/g,"");t.query('[name^="'+i+'"]').length>0?(void 0===e.originalRequiredValue&&(e.originalRequiredValue=e.forceRequired()),e.forceRequired(!0)):e.forceRequired(e.originalRequiredValue)}}}),function(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase().replace(/\[(\w+)\]/g,".$1")}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name;if(r&&!(r.length<0)&&"_"!==r[0]){var n=(r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/\[\]$/,"")).indexOf(".");n=n>0?n:r.length,r=r.substr(0,n).toUpperCase()+r.substr(n),-1===e.indexOf(r)&&e.push(r)}}),l.value=e.join(",")}(),e.redraw()}var l=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))}},{}],9:[function(e,t,r){"use strict";function n(e,t){a[e]=t,o()}function i(e){delete a[e],o()}function o(){var e="";for(var t in a)e+='<div class="notice notice-warning inline"><p>'+a[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){(r=document.createElement("div")).className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}var a={};t.exports={init:function(e,t){var r=function(){e.getValue().toLowerCase().indexOf('name="groupings')>-1?n("deprecated_groupings","Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly."):i("deprecated_groupings")},o=function(){var r=t.getAllWhere("forceRequired",!0).filter(function(t){return!e.containsField(t.name().toUpperCase())}),o="<strong>Heads up!</strong> Your form is missing list fields that are required in MailChimp. Either add these fields to your form or mark them as optional in MailChimp.";o+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+r.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",r.length>0?n("required_fields_missing",o):i("required_fields_missing")};r(),e.on("focus",r),e.on("blur",r),o(),e.on("blur",o),e.on("focus",o)}}},{}],10:[function(e,t,r){"use strict";t.exports=function(e,t){function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),l()}function n(e){27==(e=e||window.event).keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(a){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-a.clientWidth-40)/2,n=(t-a.clientHeight-40)/2;a.style.left=(r>0?r:0)+"px",a.style.top=(n>0?n:0)+"px"}}function o(e){a=e.dom,i()}var a=void 0,l=void 0;return function(a,s){return l=s,{oncreate:function(){document.addEventListener("keydown",n),window.addEventListener("resize",i)},onremove:function(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i)},view:function(){return[e("div.overlay-wrap",e("div.overlay",{oncreate:o},[e("span",{class:"close dashicons dashicons-no",title:t.close,onclick:r}),a])),e("div.overlay-background",{title:t.close,onclick:r})]}}}}},{}],11:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),f=e("./admin/fields-factory.js"),h=e("./admin/fields.js")(i,o),p=window.formEditor=u,m=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),g=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),m);var v=new f(h,n);o.on("selectedLists.change",v.registerListsFields),v.registerListsFields(a.getSelectedLists()),v.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),g.init(p,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=p,window.mc4wp.forms.fields=h},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8,"./admin/notices":9}],12:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t,r){for(var i=t.listSelections(),o=[],a=r?"/":"</",l=0;l<i.length;l++){if(!i[l].empty())return e.Pass;var s=i[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var f;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)f=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;f=a+"style"}else{if(!d.context||!d.context.tagName||n(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),o[l]=f}t.replaceSelections(o),i=t.listSelections();for(l=0;l<i.length;l++)(l==i.length-1||i[l].head.line<i[l+1].head.line)&&t.indentLine(i[l].head.line)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function n(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;u<c;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(a,l,s){if(s!=e.Init&&s&&a.removeKeyMap("autoCloseTags"),l){var c={name:"autoCloseTags"};("object"!=typeof l||l.whenClosing)&&(c["'/'"]=function(r){return function(r){return r.getOption("disableInput")?e.Pass:t(r,!0)}(r)}),("object"!=typeof l||l.whenOpening)&&(c["'>'"]=function(t){return function(t){if(t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),l=[],s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var c=a[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),f=d.state;if("xml"!=d.mode.name||!f.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,m="object"==typeof h&&h.dontCloseTags||p&&i,g="object"==typeof h&&h.indentTags||p&&o,v=f.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==f.type||u.string.indexOf("/")==u.string.length-1||m&&r(m,y)>-1||n(t,v,c,f,!0))return e.Pass;var b=g&&r(g,y)>-1;l[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(s=a.length-1;s>=0;s--){var w=l[s];t.replaceRange(w.text,a[s].head,a[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}(t)}),a.addKeyMap(c)}});var i=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],o=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return t(e)}})},{"../../lib/codemirror":17,"../fold/xml-fold":15}],13:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){function t(e,t,n){var i=e.getLineHandle(t.line),o=t.ch-1,s=n&&n.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&o>=0&&l[i.text.charAt(o)]||l[i.text.charAt(++o)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(n&&n.strict&&u>0!=(o==t.ch))return null;var d=e.getTokenTypeAt(a(t.line,o+1)),f=r(e,a(t.line,o+(u>0?1:0)),u,d||null,n);return null==f?null:{from:a(t.line,o),to:f&&f.pos,match:f&&f.ch==c.charAt(0),forward:u>0}}function r(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,s=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,d=r>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),f=t.line;f!=d;f+=r){var h=e.getLine(f);if(h){var p=r>0?0:h.length-1,m=r>0?h.length:-1;if(!(h.length>o))for(f==t.line&&(p=t.ch-(r<0?1:0));p!=m;p+=r){var g=h.charAt(p);if(u.test(g)&&(void 0===n||e.getTokenTypeAt(a(f,p+1))==n)){if(">"==l[g].charAt(1)==r>0)c.push(g);else{if(!c.length)return{pos:a(f,p),ch:g};c.pop()}}}}}return f-r!=(r>0?e.lastLine():e.firstLine())&&null}function n(e,r,n){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c<s.length;c++){var u=s[c].empty()&&t(e,s[c].head,n);if(u&&e.getLine(u.from.line).length<=i){var d=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:d})),u.to&&e.getLine(u.to.line).length<=i&&l.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:d}))}}if(l.length){o&&e.state.focused&&e.focus();var f=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!r)return f;setTimeout(f,800)}}function i(e){e.operation(function(){s&&(s(),s=null),s=n(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,r,n){n&&n!=e.Init&&(t.off("cursorActivity",i),s&&(s(),s=null)),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){n(this,!0)}),e.defineExtension("findMatchingBracket",function(e,r,n){return(n||"boolean"==typeof r)&&(n?(n.strict=r,r=n):r=r?{strict:!0}:null),t(this,e,r)}),e.defineExtension("scanForBracket",function(e,t,n,i){return r(this,e,t,n,i)})})},{"../../lib/codemirror":17}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":17,"../fold/xml-fold":15}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function r(e,t){var r=e.cm.getTokenTypeAt(d(e.line,t));return r&&/\btag\b/.test(r)}function n(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function o(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(n(e))continue;return}{if(r(e,t+1)){var i=e.text.lastIndexOf("/",t),o=i>-1&&!/\S/.test(e.text.slice(i+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(i(e))continue;return}if(r(e,t+1)){h.lastIndex=t,e.ch=t;var n=h.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){h.lastIndex=e.ch;var t=h.exec(e.text);if(!t){if(n(e))continue;return}{if(r(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(i(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t}}}function c(e,t){for(var r=[];;){var n,i=l(e),a=e.line,s=e.ch-(i?i[0].length:0);if(!i||!(n=o(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:d(a,s),to:d(e.line,e.ch)}}else r.push(i[2])}}function u(e,t){for(var r=[];;){var n=s(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,l=a(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var c=r.length-1;c>=0;--c)if(r[c]==l[2]){r.length=c;break}if(c<0&&(!t||t==l[2]))return{tag:l[2],from:d(e.line,e.ch),to:d(i,o)}}}else a(e)}}var d=e.Pos,f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",h=new RegExp("<(/?)(["+f+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,r){for(var n=new t(e,r.line,0);;){var i,a=l(n);if(!a||n.line!=r.line||!(i=o(n)))return;if(!a[1]&&"selfClose"!=i){var s=d(n.line,n.ch),u=c(n,a[2]);return u&&{from:s,to:u.from}}}}),e.findMatchingTag=function(e,r,n){var i=new t(e,r.line,r.ch,n);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=o(i),s=l&&d(i.line,i.ch),f=l&&a(i);if(l&&f&&!(function(e,t){return e.line-t.line||e.ch-t.ch}(i,r)>0)){var h={from:d(i.line,i.ch),to:s,tag:f[2]};return"selfClose"==l?{open:h,close:null,at:"open"}:f[1]?{open:u(i,f[2]),close:h,at:"close"}:(i=new t(e,s.line,s.ch,n),{open:h,close:c(i,f[2]),at:"open"})}}},e.findEnclosingTag=function(e,r,n,i){for(var o=new t(e,r.line,r.ch,n);;){var a=u(o,i);if(!a)break;var l=c(new t(e,r.line,r.ch,n),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,r,n,i){return c(new t(e,r.line,r.ch,i?{from:0,to:i}:null),n)}})},{"../../lib/codemirror":17}],16:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",i),e.removeLineClass(e.state.activeLines[t],"background",o),e.removeLineClass(e.state.activeLines[t],"gutter",a)}function r(e,r){for(var n=[],l=0;l<r.length;l++){var s=r[l],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?s.anchor.line==s.head.line:s.empty()){var u=e.getLineHandleVisualStart(s.head.line);n[n.length-1]!=u&&n.push(u)}}(function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0})(e.state.activeLines,n)||e.operation(function(){t(e);for(var r=0;r<n.length;r++)e.addLineClass(n[r],"wrap",i),e.addLineClass(n[r],"background",o),e.addLineClass(n[r],"gutter",a);e.state.activeLines=n})}function n(e,t){r(e,t.ranges)}var i="CodeMirror-activeline",o="CodeMirror-activeline-background",a="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(i,o,a){var l=a!=e.Init&&a;o!=l&&(l&&(i.off("beforeSelectionChange",n),t(i),delete i.state.activeLines),o&&(i.state.activeLines=[],r(i,i.listSelections()),i.on("beforeSelectionChange",n)))})})},{"../../lib/codemirror":17}],17:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.CodeMirror=i()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"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 i(e,t,r,i){var o=n(e,t,r,i);return o.setAttribute("role","presentation"),o}function o(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 a(){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 l(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function s(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function u(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function d(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}function f(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function h(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;wo.length<=e;)wo.push(m(wo)+" ");return wo[e]}function m(e){return e[e.length-1]}function g(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function v(){}function y(e,t){var r;return Object.create?r=Object.create(e):(v.prototype=e,r=new v),t&&u(t,r),r}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||xo.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function k(e){return e.charCodeAt(0)>=768&&ko.test(e)}function C(e,t,r){for(;(r<0?t>0:t<e.length)&&k(e.charAt(t));)t+=r;return t}function T(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function S(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function L(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function M(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function A(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function O(e){if(null==e.parent)return null;for(var t=e.parent,r=f(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function N(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return r+a}function _(e,t){return t>=e.first&&t<e.first+e.size}function E(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function W(e,t,r){if(void 0===r&&(r=null),!(this instanceof W))return new W(e,t,r);this.line=e,this.ch=t,this.sticky=r}function F(e,t){return e.line-t.line||e.ch-t.ch}function D(e,t){return e.sticky==t.sticky&&0==F(e,t)}function z(e){return W(e.line,e.ch)}function P(e,t){return F(e,t)<0?t:e}function H(e,t){return F(e,t)<0?e:t}function I(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function R(e,t){if(t.line<e.first)return W(e.first,0);var r=e.first+e.size-1;return t.line>r?W(r,S(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?W(e.line,t):r<0?W(e.line,0):e}(t,S(e,t.line).text.length)}function j(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=R(e,t[n]);return r}function B(e,t,r){this.marker=e,this.from=t,this.to=r}function q(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function U(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function K(e,t){if(t.full)return null;var r=_(e,t.from.line)&&S(e,t.from.line).markedSpans,n=_(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==F(t.from,t.to),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new B(a,o.from,l?null:o.to))}}return n}(r,i,a),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new B(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=m(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=q(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];if(null!=g.to&&(g.to+=u),null==g.from){q(l,g.marker)||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=V(l)),s&&s!=l&&(s=V(s));var v=[l];if(!c){var y,b=t.text.length-2;if(b>0&&l)for(var w=0;w<l.length;++w)null==l[w].to&&(y||(y=[])).push(new B(l[w].marker,null,null));for(var x=0;x<b;++x)v.push(y);v.push(s)}return v}function V(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function G(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function $(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Y(e){return e.inclusiveLeft?-1:0}function X(e){return e.inclusiveRight?1:0}function Z(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=F(n.from,i.from)||Y(e)-Y(t);if(o)return-o;var a=F(n.to,i.to)||X(e)-X(t);return a||t.id-e.id}function J(e,t){var r,n=To&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Z(r,i.marker)<0)&&(r=i.marker);return r}function Q(e){return J(e,!0)}function ee(e){return J(e,!1)}function te(e,t,r,n,i){var o=S(e,t),a=To&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=F(c.from,r)||Y(s.marker)-Y(i),d=F(c.to,n)||X(s.marker)-X(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?F(c.to,r)>=0:F(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?F(c.from,n)<=0:F(c.from,n)<0)))return!0}}}function re(e){for(var t;t=Q(e);)e=t.find(-1,!0).line;return e}function ne(e,t){var r=S(e,t),n=re(r);return r==n?t:O(n)}function ie(e,t){if(t>e.lastLine())return t;var r,n=S(e,t);if(!oe(e,n))return t;for(;r=ee(n);)n=r.find(1,!0).line;return O(n)+1}function oe(e,t){var r=To&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ae(e,t,n))return!0}}function ae(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ae(e,n.line,q(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.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==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ae(e,t,i))return!0}function le(e){for(var t=0,r=(e=re(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function se(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Q(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ee(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function ce(e){var t=e.display,r=e.doc;t.maxLine=S(r,r.first),t.maxLineLength=se(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=se(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function ue(e,t,r){var n;So=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"==r?n=i:So=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:So=i)}return null!=n?n:So}function de(e,t){var r=e.order;return null==r&&(r=e.order=Lo(e.text,t)),r}function fe(e,t){return e._handlers&&e._handlers[t]||Mo}function he(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=f(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var r=fe(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,r||t.type,e,t),xe(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==f(r,t[n])&&r.push(t[n])}function ve(e,t){return fe(e,t).length>0}function ye(e){e.prototype.on=function(e,t){Ao(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){be(e),we(e)}function Ce(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ro&&e.ctrlKey&&1==t&&(t=3),t}function Se(e){if(null==ho){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ho=t.offsetWidth<=1&&t.offsetHeight>2&&!(Ui&&Ki<8))}var i=ho?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Le(e){if(null!=po)return po;var n=r(e,document.createTextNode("AخA")),i=ao(n,0,1).getBoundingClientRect(),o=ao(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(po=o.right-i.right<3)}function Me(e){if("string"==typeof e&&Do.hasOwnProperty(e))e=Do[e];else if(e&&"string"==typeof e.name&&Do.hasOwnProperty(e.name)){var t=Do[e.name];"string"==typeof t&&(t={name:t}),(e=y(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Me("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Me("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ae(e,t){t=Me(t);var r=Fo[t.name];if(!r)return Ae(e,"text/plain");var n=r(e,t);if(zo.hasOwnProperty(t.name)){var i=zo[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}function Oe(e,t){u(t,zo.hasOwnProperty(e)?zo[e]:zo[e]={})}function Ne(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function _e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ee(e,t,r){return!e.startState||e.startState(t,r)}function We(e,t,r,n){var i=[e.state.modeGen],o={};je(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=r.state,l=function(n){r.baseTokens=i;var l=e.state.overlays[n],s=1,c=0;r.state=!0,je(e,t.text,l.mode,r,function(e,t){for(var r=s;c<e;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Fe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=De(e,O(t)),i=t.text.length>e.options.maxHighlightLength&&Ne(e.doc.mode,n.state),o=We(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function De(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Io(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=S(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof Ho?c.lookAhead:0)<=o.modeFrontier))return l;var u=d(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}(e,t,r),a=o>n.first&&S(n,o-1).stateAfter,l=a?Io.fromSaved(n,a,o):new Io(n,Ee(n.mode),o);return n.iter(o,t,function(r){ze(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function ze(e,t,r,n){var i=e.doc.mode,o=new Po(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Pe(i,r.state);!o.eol();)He(i,o,r.state),o.start=o.pos}function Pe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=_e(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function He(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=_e(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Ie(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=S(a,(t=R(a,t)).line),c=De(e,t.line,r),u=new Po(s.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=He(l,u,c.state),n&&o.push(new Ro(u,i,Ne(a.mode,c.state)));return n?o:new Ro(u,i,c.state)}function Re(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function je(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Po(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Re(Pe(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&ze(e,t,n,d.pos),d.pos=t.length,s=null):s=Re(He(r,d,n.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Be(e){e.parent=null,G(e)}function qe(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Uo:qo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ue(e,t){var r=i("span",null,null,Vi?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Ui||Vi)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,l=void 0;n.pos=0,n.addToken=Ve,Le(e.display.measure)&&(l=de(a,e.doc.direction))&&(n.addToken=function(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}(n.addToken,l)),n.map=[];!function(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),qe(r[a+1],t.cm.options));return}for(var l,s,c,u,d,f,h,p=i.length,m=0,g=1,v="",y=0;;){if(y==m){c=u=d=f=s="",h=null,y=1/0;for(var b=[],w=void 0,x=0;x<n.length;++x){var k=n[x],C=k.marker;"bookmark"==C.type&&k.from==m&&C.widgetNode?b.push(C):k.from<=m&&(null==k.to||k.to>m||C.collapsed&&k.to==m&&k.from==m)?(null!=k.to&&k.to!=m&&y>k.to&&(y=k.to,u=""),C.className&&(c+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&k.from==m&&(d+=" "+C.startStyle),C.endStyle&&k.to==y&&(w||(w=[])).push(C.endStyle,k.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||Z(h.marker,C)<0)&&(h=k)):k.from>m&&y>k.from&&(y=k.from)}if(w)for(var T=0;T<w.length;T+=2)w[T+1]==y&&(u+=" "+w[T]);if(!h||h.from==m)for(var S=0;S<b.length;++S)Ge(t,0,b[S]);if(h&&(h.from||0)==m){if(Ge(t,(null==h.to?p+1:h.to)-m,h.marker,null==h.from),null==h.to)return;h.to==m&&(h=!1)}}if(m>=p)break;for(var L=Math.min(p,y);;){if(v){var M=m+v.length;if(!h){var A=M>L?v.slice(0,L-m):v;t.addToken(t,A,l?l+c:c,d,m+A.length==y?u:"",f,s)}if(M>=L){v=v.slice(L-m),m=L;break}m=M,d=""}v=i.slice(o,o=r[g++]),l=qe(r[g++],t.cm.options)}}}(a,n,Fe(e,a,t!=e.display.externalMeasured&&O(a))),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=s(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=s(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Se(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Vi){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=s(n.pre.className,n.textClass||"")),n}function Ke(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ve(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){s=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var h=u.exec(t),m=h?h.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));Ui&&Ki<9?s.appendChild(n("span",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;f+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=s.appendChild(n("span",p(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=s.appendChild(n("span","\r"==h[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),Ui&&Ki<9?s.appendChild(n("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),Ui&&Ki<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||i||o||d||l){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[s],w,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(s)}}function Ge(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function $e(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=ee(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?O(m(this.rest))-r+1:1,this.node=this.text=null,this.hidden=oe(e,t)}function Ye(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new $e(e.doc,S(e.doc,o),o);n=o+a.size,i.push(a)}return i}function Xe(e,t){var r=fe(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);Ko?n=Ko.delayedCallbacks:Vo?n=Vo:(n=Vo=[],setTimeout(Ze,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function Ze(){var e=Vo;Vo=null;for(var t=0;t<e.length;++t)e[t]()}function Je(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?function(e,t){var r=t.text.className,n=et(e,t);t.text==t.node&&(t.node=n.pre);t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,tt(e,t)):r&&(t.text.className=r)}(e,t):"gutter"==o?rt(e,t,r,n):"class"==o?tt(e,t):"widget"==o&&function(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);it(e,t,r)}(e,t,n)}t.changes=null}function Qe(e){return e.node==e.text&&(e.node=n("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Ui&&Ki<8&&(e.node.style.zIndex=2)),e.node}function et(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ue(e,t)}function tt(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=Qe(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?Qe(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function rt(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Qe(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=Qe(t),s=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(n("div",E(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.options.gutters.length;++c){var u=e.options.gutters[c],d=a.hasOwnProperty(u)&&a[u];d&&s.appendChild(n("div",[d],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function nt(e,t,r,n){var i=et(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),tt(e,t),rt(e,t,r,n),it(e,t,n),t.node}function it(e,t,r){if(ot(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)ot(e,t.rest[n],t,r,!1)}function ot(e,t,r,i,o){if(t.widgets)for(var a=Qe(r),l=0,s=t.widgets;l<s.length;++l){var c=s[l],u=n("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),function(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),Xe(c,"redraw")}}function at(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function lt(e,t){for(var r=Ce(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function st(e){return e.lineSpace.offsetTop}function ct(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ut(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function dt(e){return mo-e.display.nativeBarWidth}function ft(e){return e.display.scroller.clientWidth-dt(e)-e.display.barWidth}function ht(e){return e.display.scroller.clientHeight-dt(e)-e.display.barHeight}function pt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(O(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function mt(e,t,r,n){return yt(e,vt(e,t),r,n)}function gt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ut(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function vt(e,t){var n=O(t),i=gt(e,n);i&&!i.text?i=null:i&&i.changes&&(Je(e,i,n,It(e)),e.curOp.forceUpdate=!0),i||(i=function(e,t){var n=O(t=re(t)),i=e.display.externalMeasured=new $e(e.doc,t,n);i.lineN=n;var o=i.built=Ue(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}(e,t));var o=pt(i,t,n);return{line:t,view:i,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function yt(e,t,i,o,a){t.before&&(i=-1);var l,s=i+(o||"");return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&ft(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function(e,t,i,o){var a,l=bt(t.map,i,o),s=l.node,c=l.start,u=l.end,d=l.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&k(t.line.text.charAt(l.coverStart+c));)--c;for(;l.coverStart+u<l.coverEnd&&k(t.line.text.charAt(l.coverStart+u));)++u;if((a=Ui&&Ki<9&&0==c&&u==l.coverEnd-l.coverStart?s.parentNode.getBoundingClientRect():wt(ao(s,c,u).getClientRects(),o)).left||a.right||0==c)break;u=c,c-=1,d="right"}Ui&&Ki<11&&(a=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Wo)return Wo;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=ao(t,0,1).getBoundingClientRect();return Wo=Math.abs(i.left-o.left)>1}(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*o,bottom:t.bottom*o}}(e.display.measure,a))}else{c>0&&(d=o="right");var h;a=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==o?h.length-1:0]:s.getBoundingClientRect()}if(Ui&&Ki<9&&!c&&(!a||!a.left&&!a.right)){var p=s.parentNode.getClientRects()[0];a=p?{left:p.left,right:p.left+Ht(e.display),top:p.top,bottom:p.bottom}:Go}for(var m=a.top-t.rect.top,g=a.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==d?a.right:a.left)-t.rect.left,right:("left"==d?a.left:a.right)-t.rect.left,top:w,bottom:x};a.left||a.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=m,C.rbottom=g);return C}(e,t,i,o)).bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:a?l.rtop:l.top,bottom:a?l.rbottom:l.bottom}}function bt(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function wt(e,t){var r=Go;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function xt(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 kt(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)xt(e.display.view[r])}function Ct(e){kt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Tt(){return $i&&eo?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function St(){return $i&&eo?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Lt(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=at(e.widgets[r]));return t}function Mt(e,t,r,n,i){if(!i){var o=Lt(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=le(t);if("local"==n?a+=st(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:St());var s=l.left+("window"==n?0:Tt());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function At(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Tt(),i-=St();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Ot(e,t,r,n,i){return n||(n=S(e.doc,t.line)),Mt(e,n,mt(e,n,t.ch,i),r)}function Nt(e,t,r,n,i,o){function a(t,a){var l=yt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,Mt(e,n,l,r)}function l(e,t,r){var n=1==s[t].level;return a(r?e-1:e,n!=r)}n=n||S(e.doc,t.line),i||(i=vt(e,n));var s=de(n,e.doc.direction),c=t.ch,u=t.sticky;if(c>=n.text.length?(c=n.text.length,u="before"):c<=0&&(c=0,u="after"),!s)return a("before"==u?c-1:c,"before"==u);var d=ue(s,c,u),f=So,h=l(c,d,"before"==u);return null!=f&&(h.other=l(c,f,"before"!=u)),h}function _t(e,t){var r=0;t=R(e.doc,t),e.options.lineWrapping||(r=Ht(e.display)*t.ch);var n=S(e.doc,t.line),i=le(n)+st(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Et(e,t,r,n,i){var o=W(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Wt(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Et(n.first,0,null,!0,-1);var i=N(n,r),o=n.first+n.size-1;if(i>o)return Et(n.first+n.size-1,S(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=S(n,i);;){var l=function(e,t,r,n,i){i-=le(t);var o=vt(e,t),a=Lt(t),l=0,s=t.text.length,c=!0,u=de(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,r,n,i,o,a){var l=Ft(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=yt(e,n,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||d>g)&&(u=h,d=g)}}u||(u=i[i.length-1]);u.from<s&&(u={from:s,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(e,t,r,n,i,o,a){var l=T(function(l){var s=i[l],c=1!=s.level;return zt(Nt(e,W(r,c?s.to:s.from,c?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=Nt(e,W(r,c?s.from:s.to,c?"after":"before"),"line",t,n);zt(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s})(e,t,r,o,u,n,i);c=1!=d.level,l=c?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=T(function(t){var r=yt(e,o,t);return r.top+=a,r.bottom+=a,!!zt(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,m=r),!0)},l,s),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==t.text.length?"before":yt(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Nt(e,W(r,g,h),"line",t,o);f=w.left,v=i<w.top||i>=w.bottom}return g=C(t.text,g,1),Et(r,g,h,v,n-f)}(e,a,i,t,r),s=ee(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=O(a=c.to.line)}}function Ft(e,t,r,n){n-=Lt(t);var i=t.text.length,o=T(function(t){return yt(e,r,t-1).bottom<=n},i,0);return i=T(function(t){return yt(e,r,t).top>n},o,i),{begin:o,end:i}}function Dt(e,t,r,n){r||(r=vt(e,t));return Ft(e,t,r,Mt(e,t,yt(e,r,n),"line").top)}function zt(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Pt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Bo){Bo=n("pre");for(var i=0;i<49;++i)Bo.appendChild(document.createTextNode("x")),Bo.appendChild(n("br"));Bo.appendChild(document.createTextNode("x"))}r(e.measure,Bo);var o=Bo.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function Ht(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function It(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:Rt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Rt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function jt(e){var t=Pt(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Ht(e.display)-3);return function(i){if(oe(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Bt(e){var t=e.doc,r=jt(e);t.iter(function(e){var t=r(e);t!=e.height&&A(e,t)})}function qt(e,t,r,n){var i=e.display;if(!r&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=Wt(e,o,a);if(n&&1==c.xRel&&(s=S(e.doc,c.line).text).length==c.ch){var u=d(s,s.length,e.options.tabSize)-s.length;c=W(c.line,Math.max(0,Math.round((o-ut(e.display).left)/Ht(e.display))-u))}return c}function Ut(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Kt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Vt(e,t){void 0===t&&(t=!0);for(var r=e.doc,i={},o=i.cursors=document.createDocumentFragment(),a=i.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();(c||e.options.showCursorWhenSelecting)&&Gt(e,s.head,o),c||function(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?d-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return Ot(e,W(t,r),"div",h,n)}function a(t,r,n){var i=Dt(e,h,null,t),a="ltr"==r==("after"==n)?"left":"right",l="after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return o(l,a)[a]}var s,c,h=S(l,t),p=h.text.length,m=de(h,l.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(m,r||0,null==n?p:n,function(e,t,l,h){var g="ltr"==l,v=o(e,g?"left":"right"),y=o(t-1,g?"right":"left"),b=null==r&&0==e,w=null==n&&t==p,x=0==h,k=!m||h==m.length-1;if(y.top-v.top<=3){var C=(f?b:w)&&x,T=(f?w:b)&&k,S=C?u:(g?v:y).left,L=T?d:(g?y:v).right;i(S,v.top,L-S,v.bottom)}else{var M,A,O,N;g?(M=f&&b&&x?u:v.left,A=f?d:a(e,l,"before"),O=f?u:a(t,l,"after"),N=f&&w&&k?d:y.right):(M=f?a(e,l,"before"):u,A=!f&&b&&x?d:v.right,O=!f&&w&&k?u:y.left,N=f?a(t,l,"after"):d),i(M,v.top,A-M,v.bottom),v.bottom<y.top&&i(u,v.bottom,null,y.top),i(O,y.top,N-O,y.bottom)}(!s||$t(v,s)<0)&&(s=v),$t(y,s)<0&&(s=y),(!c||$t(v,c)<0)&&(c=v),$t(y,c)<0&&(c=y)}),{start:s,end:c}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=ut(e.display),u=c.left,d=Math.max(a.sizerWidth,ft(e)-a.sizer.offsetLeft)-c.right,f="ltr"==l.direction;var h=t.from(),p=t.to();if(h.line==p.line)o(h.line,h.ch,p.ch);else{var m=S(l,h.line),g=S(l,p.line),v=re(m)==re(g),y=o(h.line,h.ch,v?m.text.length+1:null).end,b=o(p.line,v?0:null,p.ch).start;v&&(y.top<b.top-2?(i(y.right,y.top,null,y.bottom),i(u,b.top,b.left,b.bottom)):i(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&i(u,y.bottom,null,b.top)}r.appendChild(s)}(e,s,a)}}return i}function Gt(e,t,r){var i=Nt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var a=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function $t(e,t){return e.top-t.top||e.left-t.left}function Yt(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xt(e){e.state.focused||(e.display.input.focus(),Jt(e))}function Zt(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qt(e))},100)}function Jt(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,l(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Vi&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Yt(e))}function Qt(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,co(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(Ui&&Ki<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var l=i.node.getBoundingClientRect();o=l.bottom-l.top}var s=i.line.height-o;if(o<2&&(o=Pt(t)),(s>.005||s<-.005)&&(A(i.line,o),tr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)tr(i.rest[c])}}}function tr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function rr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-st(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=N(t,n),a=N(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=N(t,le(S(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=N(t,le(S(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function nr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Rt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function ir(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=E(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Fr(e),!0}return!1}function or(e,t){var r=e.display,n=Pt(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=ht(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+ct(r),s=t.top<n,c=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=ft(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function ar(e,t){null!=t&&(cr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function lr(e){cr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sr(e,t,r){null==t&&null==r||cr(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function cr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;ur(e,_t(e,t.from),_t(e,t.to),t.margin)}}function ur(e,t,r,n){var i=or(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});sr(e,i.scrollLeft,i.scrollTop)}function dr(e,t){Math.abs(e.doc.scrollTop-t)<2||(Ri||Wr(e,{top:t}),fr(e,t,!0),Ri&&Wr(e),Or(e,100))}function fr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,nr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ct(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+dt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function mr(e,t){t||(t=pr(e));var r=e.display.barWidth,n=e.display.barHeight;gr(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&er(e),gr(e,pr(e)),r=e.display.barWidth,n=e.display.barHeight}function gr(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&co(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Xo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ao(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?hr(e,t):dr(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function yr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},function(e){Ko?Ko.ops.push(e):e.ownsGroup=Ko={ops:[e],delayedCallbacks:[]}}(e.curOp)}function br(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{Ko=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)!function(e){var t=e.cm,r=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=dt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=dt(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&ce(t);e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Jo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}(t[r]);for(var i=0;i<t.length;i++)!function(e){e.updatedDisplay=e.mustUpdate&&_r(e.cm,e.update)}(t[i]);for(var o=0;o<t.length;o++)!function(e){var t=e.cm,r=t.display;e.updatedDisplay&&er(t);e.barMeasure=pr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=mt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+dt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ft(t)));(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}(t[o]);for(var l=0;l<t.length;l++)!function(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&hr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r);(e.updatedDisplay||e.startHeight!=t.doc.height)&&mr(t,e.barMeasure);e.updatedDisplay&&Dr(t,e.barMeasure);e.selectionChanged&&Yt(t);t.state.focused&&e.updateInput&&t.display.input.reset(e.typing);r&&Xt(e.cm)}(t[l]);for(var s=0;s<t.length;s++)!function(e){var t=e.cm,r=t.display,i=t.doc;e.updatedDisplay&&Er(t,e.update);null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null);null!=e.scrollTop&&fr(t,e.scrollTop,e.forceScroll);null!=e.scrollLeft&&hr(t,e.scrollLeft,!0,!0);if(e.scrollToPos){var o=function(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?W(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?W(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Nt(e,t),s=r&&r!=t?Nt(e,r):l,c=or(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(dr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(hr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,R(i,e.scrollToPos.from),R(i,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!me(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ji){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-st(e.display))+"px;\n height: "+(t.bottom-t.top+dt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,o)}var a=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||pe(a[s],"hide");if(l)for(var c=0;c<l.length;++c)l[c].lines.length&&pe(l[c],"unhide");r.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop);e.changeObjs&&pe(t,"changes",t,e.changeObjs);e.update&&e.update.finish()}(t[s])}(e)})}function wr(e,t){if(e.curOp)return t();yr(e);try{return t()}finally{br(e)}}function xr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);yr(e);try{return t.apply(e,arguments)}finally{br(e)}}}function kr(e){return function(){if(this.curOp)return e.apply(this,arguments);yr(this);try{return e.apply(this,arguments)}finally{br(this)}}}function Cr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);yr(t);try{return e.apply(this,arguments)}finally{br(t)}}}function Tr(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)To&&ne(e.doc,t)<i.viewTo&&Lr(e);else if(r<=i.viewFrom)To&&ie(e.doc,r+n)>i.viewFrom?Lr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Lr(e);else if(t<=i.viewFrom){var o=Mr(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Lr(e)}else if(r>=i.viewTo){var a=Mr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Lr(e)}else{var l=Mr(e,t,t,-1),s=Mr(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Ye(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Lr(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Sr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Ut(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,r)&&a.push(r)}}}function Lr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mr(e,t,r,n){var i,o=Ut(e,t),a=e.display.view;if(!To||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ne(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Ar(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Or(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(Nr,e))}function Nr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=De(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ne(t.mode,n.state):null,s=We(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ze(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Or(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wr(e,function(){for(var t=0;t<i.length;t++)Sr(e,i[t],"text")})}}function _r(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return Lr(e),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ar(e))return!1;ir(e)&&(Lr(e),r.dims=It(e));var l=i.first+i.size,s=Math.max(r.visible.from-e.options.viewportMargin,i.first),c=Math.min(l,r.visible.to+e.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(i.first,n.viewFrom)),n.viewTo>c&&n.viewTo-c<20&&(c=Math.min(l,n.viewTo)),To&&(s=ne(e.doc,s),c=ie(e.doc,c));var u=s!=n.viewFrom||c!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Ye(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ye(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Ut(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ye(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Ut(e,r)))),n.viewTo=r}(e,s,c),n.viewOffset=le(S(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var d=Ar(e);if(!u&&0==d&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=a();if(!t||!o(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return d>4&&(n.lineDiv.style.display="none"),function(e,r,n){function i(t){var r=t.nextSibling;return Vi&&ro&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild;for(var c=o.view,u=o.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==l){for(;s!=h.node;)s=i(s);var p=a&&null!=r&&r<=u&&h.lineNumber;h.changes&&(f(h.changes,"gutter")>-1&&(p=!1),Je(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(E(e.options,u)))),s=h.node.nextSibling}else{var m=nt(e,h,u,n);l.insertBefore(m,s)}u+=h.size}for(;s;)s=i(s)}(e,n.updateLineNumbers,r.dims),d>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),e.anchorNode&&o(document.body,e.anchorNode)&&o(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(h),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Or(e,400)),n.updateLineNumbers=null,!0}function Er(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=ft(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+ct(e.display)-ht(e),r.top)}),t.visible=rr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_r(e,t);n=!1){er(e);var i=pr(e);Kt(e),mr(e,i),Dr(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 Wr(e,t){var r=new Jo(e,t);if(_r(e,r)){er(e),Er(e,r);var n=pr(e);Kt(e),mr(e,n),Dr(e,n),r.finish()}}function Fr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Dr(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+dt(e)+"px"}function zr(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var a=i[o],l=r.appendChild(n("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",Fr(e)}function Pr(e){var t=f(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Hr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Ir(e){var t=Hr(e);return t.x*=ea,t.y*=ea,t}function Rr(e,t){var r=Hr(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&ro&&Vi)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!Ri&&!Yi&&null!=ea)return i&&s&&dr(e,Math.max(0,a.scrollTop+i*ea)),hr(e,Math.max(0,a.scrollLeft+n*ea)),(!i||i&&s)&&be(t),void(o.wheelStartX=null);if(i&&null!=ea){var f=i*ea,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),Wr(e,{top:h,bottom:p})}Qo<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(ea=(ea*Qo+r)/(Qo+1),++Qo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function jr(e,t){var r=e[t];e.sort(function(e,t){return F(e.from(),t.from())}),t=f(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(F(o.to(),i.from())>=0){var a=H(o.from(),i.from()),l=P(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new ra(s?l:a,s?a:l))}}return new ta(e,t)}function Br(e,t){return new ta([new ra(e,t||e)],0)}function qr(e){return e.text?W(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ur(e,t){if(F(e,t.from)<0)return e;if(F(e,t.to)<=0)return qr(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=qr(t).ch-t.to.ch),W(r,n)}function Kr(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new ra(Ur(i.anchor,t),Ur(i.head,t)))}return jr(r,e.sel.primIndex)}function Vr(e,t,r){return e.line==t.line?W(r.line,e.ch-t.ch+r.ch):W(r.line+(e.line-t.line),e.ch)}function Gr(e){e.doc.mode=Ae(e.options,e.doc.modeOption),$r(e)}function $r(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,Or(e,100),e.state.modeGen++,e.curOp&&Tr(e)}function Yr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Xr(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),G(e),$(e,r);var i=n?n(e):1;i!=e.height&&A(e,i)}(e,r,i,n),Xe(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new jo(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=S(e,l.line),d=S(e,s.line),f=m(c),h=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Yr(e,t)){var g=a(0,c.length-1);o(d,d.text,h),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var v=a(1,c.length-1);v.push(new jo(f+u.text.slice(s.ch),h,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var y=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,y)}Xe(e,"change",e,t)}function Zr(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Jr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Bt(e),Gr(e),Qr(e),e.options.lineWrapping||ce(e),e.options.mode=t.modeOption,Tr(e)}function Qr(e){("rtl"==e.doc.direction?l:co)(e.display.lineDiv,"CodeMirror-rtl")}function en(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 tn(e,t){var r={from:z(t.from),to:qr(t),text:L(e,t.from,t.to)};return ln(e,r,t.from.line,t.to.line+1),Zr(e,function(e){return ln(e,r,t.from.line,t.to.line+1)},!0),r}function rn(e){for(;e.length;){if(!m(e).ranges)break;e.pop()}}function nn(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(rn(e.done),m(e.done)):e.done.length&&!m(e.done).ranges?m(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}(i,i.lastOp==n)))a=m(o.changes),0==F(t.from,t.to)&&0==F(t.from,a.to)?a.to=qr(t):o.changes.push(tn(e,t));else{var s=m(i.done);for(s&&s.ranges||an(e.sel,i.done),o={changes:[tn(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function on(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,m(i.done),t))?i.done[i.done.length-1]=t:an(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&rn(i.undone)}function an(e,t){var r=m(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ln(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function sn(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function cn(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(sn(r[i]));return n}(e,t),n=K(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function un(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?ta.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&f(t,Number(u[1]))>-1&&(m(l)[d]=c[d],delete c[d])}}}return n}function dn(e,t,r,n){if(n){var i=e.anchor;if(r){var o=F(t,i)<0;o!=F(r,i)<0?(i=t,t=r):o!=F(t,r)<0&&(t=r)}return new ra(i,t)}return new ra(r||t,t)}function fn(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),vn(e,new ta([dn(e.sel.primary(),t,r,i)],0),n)}function hn(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=dn(e.sel.ranges[o],t[o],null,i);vn(e,jr(n,e.sel.primIndex),r)}function pn(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,vn(e,jr(i,e.sel.primIndex),n)}function mn(e,t,r,n){vn(e,Br(t,r),n)}function gn(e,t,r){var n=e.history.done,i=m(n);i&&i.ranges?(n[n.length-1]=t,yn(e,t,r)):vn(e,t,r)}function vn(e,t,r){yn(e,t,r),on(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function yn(e,t,r){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new ra(R(e,t[r].anchor),R(e,t[r].head))},origin:r&&r.origin};return pe(e,"beforeSelectionChange",e,n),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?jr(n.ranges,n.ranges.length-1):t}(e,t,r));bn(e,xn(e,t,r&&r.bias||(F(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||lr(e.cm)}function bn(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ge(e.cm)),Xe(e,"cursorActivity",e))}function wn(e){bn(e,xn(e,e.sel,null,!1))}function xn(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Cn(e,a.anchor,l&&l.anchor,r,n),c=Cn(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ra(s,c))}return i?jr(i,t.primIndex):t}function kn(e,t,r,n,i){var o=S(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(pe(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=Tn(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=F(c,r))&&(n<0?u<0:u>0))return kn(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=Tn(e,d,n,d.line==t.line?o:null)),d?kn(e,d,t,n,i):null}}return t}function Cn(e,t,r,n,i){var o=n||1,a=kn(e,t,r,o,i)||!i&&kn(e,t,r,o,!0)||kn(e,t,r,-o,i)||!i&&kn(e,t,r,-o,!0);return a||(e.cantEdit=!0,W(e.first,0))}function Tn(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?R(e,W(t.line-1)):null:r>0&&t.ch==(n||S(e,t.line)).text.length?t.line<e.first+e.size-1?W(t.line+1,0):null:new W(t.line,t.ch+r)}function Sn(e){e.setSelection(W(e.firstLine(),0),W(e.lastLine()),vo)}function Ln(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=R(e,t)),r&&(n.to=R(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),pe(e,"beforeChange",e,n),e.cm&&pe(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Mn(e,t,r){if(e.cm){if(!e.cm.curOp)return xr(e.cm,Mn)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=Ln(e,t,!0))){var n=Co&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=f(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(F(c.to,l.from)<0||F(c.from,l.to)>0)){var u=[s,1],d=F(c.from,l.from),h=F(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)An(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else An(e,t)}}function An(e,t){if(1!=t.text.length||""!=t.text[0]||0!=F(t.from,t.to)){var r=Kr(e,t);nn(e,t,r,e.cm?e.cm.curOp.id:NaN),_n(e,t,r,K(e,t));var n=[];Zr(e,function(e,r){r||-1!=f(n,e.history)||(Dn(e.history,t),n.push(e.history)),_n(e,t,null,K(e,t))})}}function On(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=a.pop()).ranges;){if(an(n,l),r&&!n.equals(e.sel))return void vn(e,n,{clearRedo:!1});o=n}var c=[];an(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(r){var i=n.changes[r];if(i.origin=t,u&&!Ln(e,i,!1))return a.length=0,{};c.push(tn(e,i));var o=r?Kr(e,i):m(a);_n(e,i,o,cn(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:qr(i)});var l=[];Zr(e,function(e,t){t||-1!=f(l,e.history)||(Dn(e.history,i),l.push(e.history)),_n(e,i,null,cn(e,i))})},h=n.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function Nn(e,t){if(0!=t&&(e.first+=t,e.sel=new ta(g(e.sel.ranges,function(e){return new ra(W(e.anchor.line+t,e.anchor.ch),W(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Tr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Sr(e.cm,n,"gutter")}}function _n(e,t,r,n){if(e.cm&&!e.cm.curOp)return xr(e.cm,_n)(e,t,r,n);if(t.to.line<e.first)Nn(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);Nn(e,i),t={from:W(e.first,0),to:W(t.to.line+i,t.to.ch),text:[m(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:W(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=L(e,t.from,t.to),r||(r=Kr(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=O(re(S(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ge(e);Xr(n,t,r,jt(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=se(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=S(e,n).stateAfter;if(i&&(!(i instanceof Ho)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),Or(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Tr(e):o.line!=a.line||1!=t.text.length||Yr(e.doc,t)?Tr(e,o.line,a.line+1,c):Sr(e,o.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Xe(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Xr(e,t,n),yn(e,r,vo)}}function En(e,t,r,n,i){if(n||(n=r),F(n,r)<0){var o;r=(o=[n,r])[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Mn(e,{from:r,to:n,text:t,origin:i})}function Wn(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Fn(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)Wn(o.ranges[l].anchor,t,r,n),Wn(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(r<c.from.line)c.from=W(c.from.line+n,c.from.ch),c.to=W(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Dn(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Fn(e.done,r,n,i),Fn(e.undone,r,n,i)}function zn(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=S(e,I(e,t)):i=O(t),null==i?null:(n(o,i)&&e.cm&&Sr(e.cm,i,r),o)}function Pn(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function Hn(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function In(e,t,r){le(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ar(e,r)}function Rn(e,t,r,n,o){if(n&&n.shared)return function(e,t,r,n,i){(n=u(n)).shared=!1;var o=[Rn(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Zr(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Rn(e,R(e,t),R(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=m(o)}),new aa(o,a)}(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return xr(e.cm,Rn)(e,t,r,n,o);var a=new oa(e,o),l=F(t,r);if(n&&u(n,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(te(e,t.line,t,r,a)||t.line!=r.line&&te(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");To=!0}a.addToHistory&&nn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,c=t.line,d=e.cm;if(e.iter(c,r.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&re(e)==d.display.maxLine&&(s=!0),a.collapsed&&c!=t.line&&A(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new B(a,c==t.line?t.ch:null,c==r.line?r.ch:null)),++c}),a.collapsed&&e.iter(t.line,r.line+1,function(t){oe(e,t)&&A(t,0)}),a.clearOnEnter&&Ao(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Co=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ia,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)Tr(d,t.line,r.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=r.line;f++)Sr(d,f,"text");a.atomic&&wn(d.doc),Xe(d,"markerAdded",d,a)}return a}function jn(e){return e.findMarks(W(e.first,0),e.clipPos(W(e.lastLine())),function(e){return e.parent})}function Bn(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Zr(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==f(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}function qn(e){var t=this;if(Un(t),!me(t,e)&&!lt(t.display,e)){be(e),Ui&&(ca=+new Date);var r=qt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||-1!=f(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=xr(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){var s={from:r=R(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Mn(t.doc,s),gn(t.doc,Br(r,qr(s)))}}),l.readAsText(e)}},s=0;s<i;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),yn(t.doc,Br(r,r)),u)for(var d=0;d<u.length;++d)En(t.doc,"",u[d].anchor,u[d].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Un(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Kn(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Vn(){ua||(!function(){var e;Ao(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Kn(Gn)},100))}),Ao(window,"blur",function(){return Kn(Qt)})}(),ua=!0)}function Gn(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function $n(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Yn(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=g(r.split(" "),$n),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Xn(e,t,r,n){var i=(t=ei(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Xn(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Xn(e,t.fallthrough[o],r,n);if(a)return a}}}function Zn(e){var t="string"==typeof e?e:da[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Jn(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(lo?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(lo?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Qn(e,t){if(Yi&&34==e.keyCode&&e.char)return!1;var r=da[e.keyCode];return null!=r&&!e.altGraphKey&&Jn(r,e,t)}function ei(e){return"string"==typeof e?ma[e]:e}function ti(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&F(o.from,m(n).to)<=0;){var a=n.pop();if(F(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}wr(e,function(){for(var t=n.length-1;t>=0;t--)En(e.doc,"",n[t].from,n[t].to,"+delete");lr(e)})}function ri(e,t,r){var n=C(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ni(e,t,r){var n=ri(e,t.ch,r);return null==n?null:new W(t.line,n,r<0?"after":"before")}function ii(e,t,r,n,i){if(e){var o=de(r,t.doc.direction);if(o){var a,l=i<0?m(o):o[0],s=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=vt(t,r);a=i<0?r.text.length-1:0;var u=yt(t,c,a).top;a=T(function(e){return yt(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=ri(r,a,1))}else a=i<0?l.to:l.from;return new W(n,a,s)}}return new W(n,i<0?r.text.length:0,i<0?"before":"after")}function oi(e,t){var r=S(e.doc,t),n=re(r);return n!=r&&(t=O(n)),ii(!0,e,n,t,1)}function ai(e,t){var r=S(e.doc,t),n=function(e){for(var t;t=ee(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=O(n)),ii(!0,e,r,t,-1)}function li(e,t){var r=oi(e,t.line),n=S(e.doc,r.line),i=de(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return W(r.line,a?0:o,r.sticky)}return r}function si(e,t,r){if("string"==typeof t&&!(t=ga[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=go}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ci(e,t,r,n){var i=e.state.keySeq;if(i){if(Zn(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:va.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ui(e,i+" "+t,r,n))return!0}return ui(e,t,r,n)}function ui(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Xn(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Xn(t,e.options.extraKeys,r,e)||Xn(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Xe(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(be(r),Yt(e)),!!i}function di(e,t){var r=Qn(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ci(e,"Shift-"+r,t,function(t){return si(e,t,!0)})||ci(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return si(e,t)}):ci(e,r,t,function(t){return si(e,t)}))}function fi(e){if(this.curOp.focus=a(),!me(this,e)){Ui&&Ki<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var r=di(this,e);Yi&&(ya=r?t:null,!r&&88==t&&!Eo&&(ro?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){function t(e){18!=e.keyCode&&e.altKey||(co(r,"CodeMirror-crosshair"),he(document,"keyup",t),he(document,"mouseover",t))}var r=e.display.lineDiv;l(r,"CodeMirror-crosshair");Ao(document,"keyup",t),Ao(document,"mouseover",t)}(this)}}function hi(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function pi(e){if(!(lt(this.display,e)||me(this,e)||e.ctrlKey&&!e.altKey||ro&&e.metaKey)){var t=e.keyCode,r=e.charCode;if(Yi&&t==ya)return ya=null,void be(e);if(!Yi||e.which&&!(e.which<10)||!di(this,e)){var n=String.fromCharCode(null==r?t:r);"\b"!=n&&(function(e,t,r){return ci(e,"'"+r+"'",t,function(t){return si(e,t,!0)})}(this,e,n)||this.display.input.onKeyPress(e))}}}function mi(e){var t=this.display;if(!(me(this,e)||t.activeTouch&&t.input.supportsTouch()))if(t.input.ensurePolled(),t.shift=e.shiftKey,lt(t,e))Vi||(t.scroller.draggable=!1,setTimeout(function(){return t.scroller.draggable=!0},100));else if(!yi(this,e)){var r=qt(this,e),n=Te(e),i=r?function(e,t){var r=+new Date;return xa&&xa.compare(r,e,t)?(wa=xa=null,"triple"):wa&&wa.compare(r,e,t)?(xa=new ba(r,e,t),wa=null,"double"):(wa=new ba(r,e,t),xa=null,"single")}(r,n):"single";window.focus(),1==n&&this.state.selectingText&&this.state.selectingText(e),r&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return o=(1==t?"Left":2==t?"Middle":"Right")+o,ci(e,Jn(o,i),i,function(t){if("string"==typeof t&&(t=ga[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=go}finally{e.state.suppressEdits=!1}return n})}(this,n,r,i,e)||(1==n?r?function(e,t,r,n){Ui?setTimeout(c(Xt,e),0):e.curOp.focus=a();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=no?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=ro?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(ro?r.altKey:r.ctrlKey));return i}(e,r,n),l=e.doc.sel;e.options.dragDrop&&Oo&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(F((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(F(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,a=xr(e,function(t){Vi&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(document,"mouseup",a),he(document,"mousemove",l),he(i.scroller,"dragstart",s),he(i.scroller,"drop",a),o||(be(t),n.addNew||fn(e.doc,r,null,null,n.extend),Vi||Ui&&9==Ki?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return o=!0};Vi&&(i.scroller.draggable=!0);e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();Ao(document,"mouseup",a),Ao(document,"mousemove",l),Ao(i.scroller,"dragstart",s),Ao(i.scroller,"drop",a),Zt(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){function i(t){if(0!=F(v,t))if(v=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,a=d(S(c,r.line).text,r.ch,o),l=d(S(c,t.line).text,t.ch,o),s=Math.min(a,l),m=Math.max(a,l),g=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=y;g++){var b=S(c,g).text,w=h(b,s,o);s==m?i.push(new ra(W(g,w),W(g,w))):b.length>w&&i.push(new ra(W(g,w),W(g,h(b,m,o))))}i.length||i.push(new ra(r,r)),vn(c,jr(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,k=u,C=gi(e,t,n.unit),T=k.anchor;F(C.anchor,T)>0?(x=C.head,T=H(k.from(),C.anchor)):(x=C.anchor,T=P(k.to(),C.head));var L=p.ranges.slice(0);L[f]=function(e,t){var r=t.anchor,n=t.head,i=S(e.doc,r.line);if(0==F(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var a=ue(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;var c;if(n.line!=r.line)c=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==l.level?-1:1);c=u==s-1||u==s?d<0:d>0}var f=o[s+(c?-1:0)],h=c==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new ra(new W(r.line,p,m),n)}(e,new ra(R(c,T),x)),vn(c,jr(L,f),yo)}}function o(t){var r=++b,l=qt(e,t,!0,"rectangle"==n.unit);if(l)if(0!=F(l,v)){e.curOp.focus=a(),i(l);var u=rr(s,c);(l.line>=u.to||l.line<u.from)&&setTimeout(xr(e,function(){b==r&&o(t)}),150)}else{var d=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;d&&setTimeout(xr(e,function(){b==r&&(s.scroller.scrollTop+=d,o(t))}),50)}}function l(t){e.state.selectingText=!1,b=1/0,be(t),s.input.focus(),he(document,"mousemove",w),he(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;be(t);var u,f,p=c.sel,m=p.ranges;n.addNew&&!n.extend?(f=c.sel.contains(r),u=f>-1?m[f]:new ra(r,r)):(u=c.sel.primary(),f=c.sel.primIndex);if("rectangle"==n.unit)n.addNew||(u=new ra(r,r)),r=qt(e,t,!0,!0),f=-1;else{var g=gi(e,r,n.unit);u=n.extend?dn(u,g.anchor,g.head,n.extend):g}n.addNew?-1==f?(f=m.length,vn(c,jr(m.concat([u]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==n.unit&&!n.extend?(vn(c,jr(m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):pn(c,f,u,yo):(f=0,vn(c,new ta([u],0),yo),p=c.sel);var v=r;var y=s.wrapper.getBoundingClientRect(),b=0;var w=xr(e,function(e){Te(e)?o(e):l(e)}),x=xr(e,l);e.state.selectingText=x,Ao(document,"mousemove",w),Ao(document,"mouseup",x)}(e,n,t,o)}(this,r,i,e):Ce(e)==t.scroller&&be(e):2==n?(r&&fn(this.doc,r),setTimeout(function(){return t.input.focus()},20)):3==n&&(so?bi(this,e):Zt(this)))}}function gi(e,t,r){if("char"==r)return new ra(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new ra(W(t.line,0),R(e.doc,W(t.line+1,0)));var n=r(e,t);return new ra(n.from,n.to)}function vi(e,t,r,n){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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&be(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!ve(e,r))return xe(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){return pe(e,r,e,N(e.doc,o),e.options.gutters[s],t),xe(t)}}}function yi(e,t){return vi(e,t,"gutterClick",!0)}function bi(e,t){lt(e.display,t)||function(e,t){if(!ve(e,"gutterContextMenu"))return!1;return vi(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function wi(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ct(e)}function xi(e){zr(e),Tr(e),nr(e)}function ki(e,t,r){if(!t!=!(r&&r!=ka)){var n=e.display.dragFunctions,i=t?Ao:he;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Ci(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(co(e.display.wrapper,"CodeMirror-wrap"),ce(e)),Bt(e),Tr(e),Ct(e),setTimeout(function(){return mr(e)},100)}function Ti(e,t){var o=this;if(!(this instanceof Ti))return new Ti(e,t);this.options=t=t?u(t):{},u(Ca,t,!1),Pr(t);var a=t.value;"string"==typeof a&&(a=new sa(a,t.mode,null,t.lineSeparator,t.direction)),this.doc=a;var l=new Ti.inputStyles[t.inputStyle](this),s=this.display=new function(e,t,r){this.input=r,this.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),this.scrollbarFiller.setAttribute("cm-not-content","true"),this.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),this.gutterFiller.setAttribute("cm-not-content","true"),this.lineDiv=i("div",null,"CodeMirror-code"),this.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),this.cursorDiv=n("div",null,"CodeMirror-cursors"),this.measure=n("div",null,"CodeMirror-measure"),this.lineMeasure=n("div",null,"CodeMirror-measure"),this.lineSpace=i("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var o=i("div",[this.lineSpace],"CodeMirror-lines");this.mover=n("div",[o],null,"position: relative"),this.sizer=n("div",[this.mover],"CodeMirror-sizer"),this.sizerWidth=null,this.heightForcer=n("div",null,null,"position: absolute; height: "+mo+"px; width: 1px;"),this.gutters=n("div",null,"CodeMirror-gutters"),this.lineGutter=null,this.scroller=n("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll"),this.scroller.setAttribute("tabIndex","-1"),this.wrapper=n("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror"),Ui&&Ki<8&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),Vi||Ri&&to||(this.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(this.wrapper):e(this.wrapper)),this.viewFrom=this.viewTo=t.first,this.reportedViewFrom=this.reportedViewTo=t.first,this.view=[],this.renderedView=null,this.externalMeasured=null,this.viewOffset=0,this.lastWrapHeight=this.lastWrapWidth=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLine=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.selForContextMenu=null,this.activeTouch=null,r.init(this)}(e,a,l);s.wrapper.CodeMirror=this,zr(this),wi(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vr(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 fo,keySeq:null,specialChars:null},t.autofocus&&!to&&s.input.focus(),Ui&&Ki<11&&setTimeout(function(){return o.display.input.reset(!0)},20),function(e){function t(){o.activeTouch&&(a=setTimeout(function(){return o.activeTouch=null},1e3),(l=o.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var o=e.display;Ao(o.scroller,"mousedown",xr(e,mi)),Ui&&Ki<11?Ao(o.scroller,"dblclick",xr(e,function(t){if(!me(e,t)){var r=qt(e,t);if(r&&!yi(e,t)&&!lt(e.display,t)){be(t);var n=e.findWordAt(r);fn(e.doc,n.anchor,n.head)}}})):Ao(o.scroller,"dblclick",function(t){return me(e,t)||be(t)});so||Ao(o.scroller,"contextmenu",function(t){return bi(e,t)});var a,l={end:0};Ao(o.scroller,"touchstart",function(t){if(!me(e,t)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(t)&&!yi(e,t)){o.input.ensurePolled(),clearTimeout(a);var r=+new Date;o.activeTouch={start:r,moved:!1,prev:r-l.end<=300?l:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),Ao(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),Ao(o.scroller,"touchend",function(r){var n=o.activeTouch;if(n&&!lt(o,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,l=e.coordsChar(o.activeTouch,"page");a=!n.prev||i(n,n.prev)?new ra(l,l):!n.prev.prev||i(n,n.prev.prev)?e.findWordAt(l):new ra(W(l.line,0),R(e.doc,W(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(r)}t()}),Ao(o.scroller,"touchcancel",t),Ao(o.scroller,"scroll",function(){o.scroller.clientHeight&&(dr(e,o.scroller.scrollTop),hr(e,o.scroller.scrollLeft,!0),pe(e,"scroll",e))}),Ao(o.scroller,"mousewheel",function(t){return Rr(e,t)}),Ao(o.scroller,"DOMMouseScroll",function(t){return Rr(e,t)}),Ao(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){me(e,t)||ke(t)},over:function(t){me(e,t)||(!function(e,t){var i=qt(e,t);if(i){var o=document.createDocumentFragment();Gt(e,i,o),e.display.dragCursor||(e.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),r(e.display.dragCursor,o)}}(e,t),ke(t))},start:function(t){return function(e,t){if(Ui&&(!e.state.draggingText||+new Date-ca<100))ke(t);else if(!me(e,t)&&!lt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Xi)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Yi&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Yi&&r.parentNode.removeChild(r)}}(e,t)},drop:xr(e,qn),leave:function(t){me(e,t)||Un(e)}};var s=o.input.getField();Ao(s,"keyup",function(t){return hi.call(e,t)}),Ao(s,"keydown",xr(e,fi)),Ao(s,"keypress",xr(e,pi)),Ao(s,"focus",function(t){return Jt(e,t)}),Ao(s,"blur",function(t){return Qt(e,t)})}(this),Vn(),yr(this),this.curOp.forceUpdate=!0,Jr(this,a),t.autofocus&&!to||this.hasFocus()?setTimeout(c(Jt,this),20):Qt(this);for(var d in Ta)Ta.hasOwnProperty(d)&&Ta[d](o,t[d],ka);ir(this),t.finishInit&&t.finishInit(this);for(var f=0;f<Sa.length;++f)Sa[f](o);br(this),Vi&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function Si(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=De(e,t).state:r="prev");var a=e.options.tabSize,l=S(o,t),s=d(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==go||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?d(S(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)h+=a,f+="\t";if(h<c&&(f+=p(c-h)),f!=u)return En(o,f,W(t,0),W(t,u.length),"+input"),l.stateAfter=null,!0;for(var g=0;g<o.sel.ranges.length;g++){var v=o.sel.ranges[g];if(v.head.line==t&&v.head.ch<u.length){var y=W(t,u.length);pn(o,g,new ra(y,y));break}}}function Li(e){La=e}function Mi(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=No(t),s=null;if(a&&n.ranges.length>1)if(La&&La.text.join("\n")==t){if(n.ranges.length%La.text.length==0){s=[];for(var c=0;c<La.text.length;c++)s.push(o.splitLines(La.text[c]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(s=g(l,function(e){return[e]}));for(var u,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],h=f.from(),p=f.to();f.empty()&&(r&&r>0?h=W(h.line,h.ch-r):e.state.overwrite&&!a?p=W(p.line,Math.min(S(o,p.line).text.length,p.ch+m(l).length)):La&&La.lineWise&&La.text.join("\n")==t&&(h=p=W(h.line,0))),u=e.curOp.updateInput;var v={from:h,to:p,text:s?s[d%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Mn(e.doc,v),Xe(e,"inputRead",e,v)}t&&!a&&Oi(e,t),lr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ai(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||wr(t,function(){return Mi(t,r,0,null,"paste")}),!0}function Oi(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Si(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Si(e,i.head.line,"smart"));a&&Xe(e,"electricInput",e,i.head.line)}}}function Ni(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:W(i,0),head:W(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function _i(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Ei(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Vi?e.style.width="1000px":e.setAttribute("wrap","off"),Qi&&(e.style.border="1px solid black"),_i(e),t}function Wi(e,t,r,n,i){function o(n){var o;if(null==(o=i?function(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return ni(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return ni(t,r,n);var l,s=function(e,r){return ri(t,e instanceof W?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||vt(e,t),Dt(e,t,l,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?s(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=s(r,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after";return new W(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new W(r.line,s(e,1),"before"):new W(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?n.begin:s(n.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),n.begin<=c&&c<n.end)return o(c,l)}},m=p(o+n,n,u);if(m)return m;var g=n>0?u.end:s(u.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:i.length-1,n,c(g)))?null:m}(e.cm,s,t,r):ni(s,t,r))){if(n||!function(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new W(n,t.ch,t.sticky),s=S(e,n))}())return!1;t=ii(i,e.cm,s,t.line,r)}else t=o;return!0}var a=t,l=r,s=S(e,t.line);if("char"==n)o();else if("column"==n)o(!0);else if("word"==n||"group"==n)for(var c=null,u="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||o(!f);f=!1){var h=s.text.charAt(t.ch)||"\n",p=w(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||f||p||(p="s"),c&&c!=p){r<0&&(r=1,o(),t.sticky="after");break}if(p&&(c=p),r>0&&!o(!f))break}var m=Cn(e,t,a,l,!0);return D(a,m)&&(m.hitSide=!0),m}function Fi(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Pt(e.display),3);i=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var c;(c=Wt(e,a,i)).outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Di(e,t){var r=gt(e,t.line);if(!r||r.hidden)return null;var n=S(e.doc,t.line),i=pt(r,n,t.line),o=de(n,e.doc.direction),a="left";if(o){a=ue(o,t.ch)%2?"right":"left"}var l=bt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function zi(e,t){return t&&(e.bad=!0),e}function Pi(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return zi(e.clipPos(W(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return function(e,t,r){function n(t,r,n){for(var i=-1;i<(d?d.length:0);i++)for(var o=i<0?u.map:d[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=O(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),W(s,c)}}}var i=e.text.firstChild,a=!1;if(!t||!o(i,t))return zi(W(O(e.line),0),!0);if(t==i&&(a=!0,t=i.childNodes[r],r=0,!t)){var l=e.rest?m(e.rest):e.line;return zi(W(O(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));for(;c.parentNode!=i;)c=c.parentNode;var u=e.measure,d=u.maps;var f=n(s,c,r);if(f)return zi(f,a);for(var h=c.nextSibling,p=s?s.nodeValue.length-r:0;h;h=h.nextSibling){if(f=n(h,h.firstChild,0))return zi(W(f.line,f.ch-p),a);p+=h.textContent.length}for(var g=c.previousSibling,v=r;g;g=g.previousSibling){if(f=n(g,g.firstChild,-1))return zi(W(f.line,f.ch+v),a);v+=g.textContent.length}}(a,t,r)}}var Hi=navigator.userAgent,Ii=navigator.platform,Ri=/gecko\/\d/i.test(Hi),ji=/MSIE \d/.test(Hi),Bi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hi),qi=/Edge\/(\d+)/.exec(Hi),Ui=ji||Bi||qi,Ki=Ui&&(ji?document.documentMode||6:+(qi||Bi)[1]),Vi=!qi&&/WebKit\//.test(Hi),Gi=Vi&&/Qt\/\d+\.\d+/.test(Hi),$i=!qi&&/Chrome\//.test(Hi),Yi=/Opera\//.test(Hi),Xi=/Apple Computer/.test(navigator.vendor),Zi=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Hi),Ji=/PhantomJS/.test(Hi),Qi=!qi&&/AppleWebKit/.test(Hi)&&/Mobile\/\w+/.test(Hi),eo=/Android/.test(Hi),to=Qi||eo||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Hi),ro=Qi||/Mac/.test(Ii),no=/\bCrOS\b/.test(Hi),io=/win/i.test(Ii),oo=Yi&&Hi.match(/Version\/(\d*\.\d*)/);oo&&(oo=Number(oo[1])),oo&&oo>=15&&(Yi=!1,Vi=!0);var ao,lo=ro&&(Gi||Yi&&(null==oo||oo<12.11)),so=Ri||Ui&&Ki>=9,co=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};ao=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var uo=function(e){e.select()};Qi?uo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Ui&&(uo=function(e){try{e.select()}catch(e){}});var fo=function(){this.id=null};fo.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ho,po,mo=30,go={toString:function(){return"CodeMirror.Pass"}},vo={scroll:!1},yo={origin:"*mouse"},bo={origin:"+move"},wo=[""],xo=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ko=/[\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]/,Co=!1,To=!1,So=null,Lo=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(r,n){var c="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var u=r.length,d=[],f=0;f<u;++f)d.push(e(r.charCodeAt(f)));for(var h=0,p=c;h<u;++h){var g=d[h];"m"==g?d[h]=p:p=g}for(var v=0,y=c;v<u;++v){var b=d[v];"1"==b&&"r"==y?d[v]="n":a.test(b)&&(y=b,"r"==b&&(d[v]="R"))}for(var w=1,x=d[0];w<u-1;++w){var k=d[w];"+"==k&&"1"==x&&"1"==d[w+1]?d[w]="1":","!=k||x!=d[w+1]||"1"!=x&&"n"!=x||(d[w]=x),x=k}for(var C=0;C<u;++C){var T=d[C];if(","==T)d[C]="N";else if("%"==T){var S=void 0;for(S=C+1;S<u&&"%"==d[S];++S);for(var L=C&&"!"==d[C-1]||S<u&&"1"==d[S]?"1":"N",M=C;M<S;++M)d[M]=L;C=S-1}}for(var A=0,O=c;A<u;++A){var N=d[A];"L"==O&&"1"==N?d[A]="L":a.test(N)&&(O=N)}for(var _=0;_<u;++_)if(o.test(d[_])){var E=void 0;for(E=_+1;E<u&&o.test(d[E]);++E);for(var W="L"==(_?d[_-1]:c),F=W==("L"==(E<u?d[E]:c))?W?"L":"R":c,D=_;D<E;++D)d[D]=F;_=E-1}for(var z,P=[],H=0;H<u;)if(l.test(d[H])){var I=H;for(++H;H<u&&l.test(d[H]);++H);P.push(new t(0,I,H))}else{var R=H,j=P.length;for(++H;H<u&&"L"!=d[H];++H);for(var B=R;B<H;)if(s.test(d[B])){R<B&&P.splice(j,0,new t(1,R,B));var q=B;for(++B;B<H&&s.test(d[B]);++B);P.splice(j,0,new t(2,q,B)),R=B}else++B;R<H&&P.splice(j,0,new t(1,R,H))}return"ltr"==n&&(1==P[0].level&&(z=r.match(/^\s+/))&&(P[0].from=z[0].length,P.unshift(new t(0,0,z[0].length))),1==m(P).level&&(z=r.match(/\s+$/))&&(m(P).to-=z[0].length,P.push(new t(0,u-z[0].length,u)))),"rtl"==n?P.reverse():P}}(),Mo=[],Ao=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Mo).concat(r)}},Oo=function(){if(Ui&&Ki<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),No=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},_o=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)},Eo=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Wo=null,Fo={},Do={},zo={},Po=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Po.prototype.eol=function(){return this.pos>=this.string.length},Po.prototype.sol=function(){return this.pos==this.lineStart},Po.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Po.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Po.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},Po.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Po.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Po.prototype.skipToEnd=function(){this.pos=this.string.length},Po.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Po.prototype.backUp=function(e){this.pos-=e},Po.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=d(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Po.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Po.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Po.prototype.current=function(){return this.string.slice(this.start,this.pos)},Po.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Po.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Po.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ho=function(e,t){this.state=e,this.lookAhead=t},Io=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Io.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Io.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}},Io.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Io.fromSaved=function(e,t,r){return t instanceof Ho?new Io(e,Ne(e.mode,t.state),r,t.lookAhead):new Io(e,Ne(e.mode,t),r)},Io.prototype.save=function(e){var t=!1!==e?Ne(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ho(t,this.maxLookAhead):t};var Ro=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},jo=function(e,t,r){this.text=e,$(this,t),this.height=r?r(this):1};jo.prototype.lineNo=function(){return O(this)},ye(jo);var Bo,qo={},Uo={},Ko=null,Vo=null,Go={left:0,right:0,top:0,bottom:0},$o=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Ao(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ao(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ui&&Ki<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};$o.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},$o.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},$o.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},$o.prototype.zeroWidthHack=function(){var e=ro&&!Zi?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new fo,this.disableVert=new fo},$o.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?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,n)}e.style.pointerEvents="auto",t.set(1e3,n)},$o.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Yo=function(){};Yo.prototype.update=function(){return{bottom:0,right:0}},Yo.prototype.setScrollLeft=function(){},Yo.prototype.setScrollTop=function(){},Yo.prototype.clear=function(){};var Xo={native:$o,null:Yo},Zo=0,Jo=function(e,t,r){var n=e.display;this.viewport=t,this.visible=rr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=ft(e),this.force=r,this.dims=It(e),this.events=[]};Jo.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},Jo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var Qo=0,ea=null;Ui?ea=-.53:Ri?ea=15:$i?ea=-.7:Xi&&(ea=-1/3);var ta=function(e,t){this.ranges=e,this.primIndex=t};ta.prototype.primary=function(){return this.ranges[this.primIndex]},ta.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!D(r.anchor,n.anchor)||!D(r.head,n.head))return!1}return!0},ta.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ra(z(this.ranges[t].anchor),z(this.ranges[t].head));return new ta(e,this.primIndex)},ta.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ta.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(F(t,n.from())>=0&&F(e,n.to())<=0)return r}return-1};var ra=function(e,t){this.anchor=e,this.head=t};ra.prototype.from=function(){return H(this.anchor,this.head)},ra.prototype.to=function(){return P(this.anchor,this.head)},ra.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Pn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Be(i),Xe(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},Hn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Pn))){var l=[];this.collapse(l),this.children=[new Pn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Pn(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Hn(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=f(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new Hn(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var na=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};na.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=O(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=at(this);A(r,Math.max(0,r.height-o)),e&&(wr(e,function(){In(e,r,-o),Sr(e,n,"widget")}),Xe(e,"lineWidgetCleared",e,this,n))}},na.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=at(this)-t;i&&(A(n,n.height+i),r&&wr(r,function(){r.curOp.forceUpdate=!0,In(r,n,i),Xe(r,"lineWidgetChanged",r,e,O(n))}))},ye(na);var ia=0,oa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ia};oa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yr(e),ve(this,"clear")){var r=this.find();r&&Xe(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=q(a.markedSpans,this);e&&!this.collapsed?Sr(e,O(a),"text"):e&&(null!=l.to&&(i=O(a)),null!=l.from&&(n=O(a))),a.markedSpans=U(a.markedSpans,l),null==l.from&&this.collapsed&&!oe(this.doc,a)&&e&&A(a,Pt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=re(this.lines[s]),u=se(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Tr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wn(e.doc)),e&&Xe(e,"markerCleared",e,this,n,i),t&&br(e),this.parent&&this.parent.clear()}},oa.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=q(o.markedSpans,this);if(null!=a.from&&(r=W(t?o:O(o),a.from),-1==e))return r;if(null!=a.to&&(n=W(t?o:O(o),a.to),1==e))return n}return r&&{from:r,to:n}},oa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&wr(n,function(){var i=t.line,o=O(t.line),a=gt(n,o);if(a&&(xt(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!oe(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=at(r)-l;s&&A(i,i.height+s)}Xe(n,"markerChanged",n,e)})},oa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=f(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},oa.prototype.detachLine=function(e){if(this.lines.splice(f(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(oa);var aa=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};aa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Xe(this,"clear")}},aa.prototype.find=function(e,t){return this.primary.find(e,t)},ye(aa);var la=0,sa=function(e,t,r,n,i){if(!(this instanceof sa))return new sa(e,t,r,n,i);null==r&&(r=0),Hn.call(this,[new Pn([new jo("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=W(r,0);this.sel=Br(o),this.history=new en(null),this.id=++la,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Xr(this,{from:o,to:o,text:e}),vn(this,Br(o),vo)};sa.prototype=y(Hn.prototype,{constructor:sa,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=M(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Cr(function(e){var t=W(this.first,0),r=this.first+this.size-1;Mn(this,{from:t,to:W(r,S(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&sr(this.cm,0,0),vn(this,Br(t),vo)}),replaceRange:function(e,t,r,n){En(this,e,t=R(this,t),r=r?R(this,r):t,n)},getRange:function(e,t,r){var n=L(this,R(this,e),R(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(_(this,e))return S(this,e)},getLineNumber:function(e){return O(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=S(this,e)),re(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return R(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:Cr(function(e,t,r){mn(this,R(this,"number"==typeof e?W(e,t||0):e),null,r)}),setSelection:Cr(function(e,t,r){mn(this,R(this,e),R(this,t||e),r)}),extendSelection:Cr(function(e,t,r){fn(this,R(this,e),t&&R(this,t),r)}),extendSelections:Cr(function(e,t){hn(this,j(this,e),t)}),extendSelectionsBy:Cr(function(e,t){hn(this,j(this,g(this.sel.ranges,e)),t)}),setSelections:Cr(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new ra(R(this,e[i].anchor),R(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),vn(this,jr(n,t),r)}}),addSelection:Cr(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new ra(R(this,e),R(this,t||e))),vn(this,jr(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Cr(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&function(e,t,r){for(var n=[],i=W(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Vr(l.from,i,o),c=Vr(qr(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=F(u.head,u.anchor)<0;n[a]=new ra(d?c:s,d?s:c)}else n[a]=new ra(s,s)}return new ta(n,e.sel.primIndex)}(this,n,t),s=n.length-1;s>=0;s--)Mn(this,n[s]);l?gn(this,l):this.cm&&lr(this.cm)}),undo:Cr(function(){On(this,"undo")}),redo:Cr(function(){On(this,"redo")}),undoSelection:Cr(function(){On(this,"undo",!0)}),redoSelection:Cr(function(){On(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new en(this.history.maxGeneration)},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:un(this.history.done),undone:un(this.history.undone)}},setHistory:function(e){var t=this.history=new en(this.history.maxGeneration);t.done=un(e.done.slice(0),null,!0),t.undone=un(e.undone.slice(0),null,!0)},setGutterMarker:Cr(function(e,t,r){return zn(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&x(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Cr(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&zn(t,r,"gutter",function(){return r.gutterMarkers[e]=null,x(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!_(this,e))return null;if(t=e,!(e=S(this,e)))return null}else if(null==(t=O(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:Cr(function(t,r,n){return zn(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:Cr(function(t,r,n){return zn(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var a=o.match(e(n));if(!a)return!1;var l=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:Cr(function(e,t,r){return function(e,t,r,n){var i=new na(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),zn(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!oe(e,t)){var n=le(t)<e.scrollTop;A(t,t.height+at(i)),n&&ar(o,i.height),o.curOp.forceUpdate=!0}return!0}),Xe(o,"lineWidgetAdded",o,i,"number"==typeof t?t:O(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Rn(this,R(this,e),R(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=R(this,e),Rn(this,e,e,r,"bookmark")},findMarksAt:function(e){var t=[],r=S(this,(e=R(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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,r){e=R(this,e),t=R(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),R(this,W(r,t))},indexFromPos:function(e){var t=(e=R(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new sa(M(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new sa(M(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(F(o,a)){var l=Rn(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}(n,jn(this)),n},unlinkDoc:function(e){if(e instanceof Ti&&(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),Bn(jn(this));break}}if(e.history==this.history){var r=[e.id];Zr(e,function(e){return r.push(e.id)},!0),e.history=new en(null),e.history.done=un(this.history.done,r),e.history.undone=un(this.history.undone,r)}},iterLinkedDocs:function(e){Zr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):No(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Cr(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){wr(e,function(){Qr(e),Tr(e)})}(this.cm))})}),sa.prototype.eachLine=sa.prototype.iter;for(var ca=0,ua=!1,da={3:"Enter",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:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},fa=0;fa<10;fa++)da[fa+48]=da[fa+96]=String(fa);for(var ha=65;ha<=90;ha++)da[ha]=String.fromCharCode(ha);for(var pa=1;pa<=12;pa++)da[pa+111]=da[pa+63235]="F"+pa;var ma={};ma.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"},ma.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"},ma.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"},ma.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"]},ma.default=ro?ma.macDefault:ma.pcDefault;var ga={selectAll:Sn,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),vo)},killLine:function(e){return ti(e,function(t){if(t.empty()){var r=S(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:W(t.head.line+1,0)}:{from:t.head,to:W(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ti(e,function(t){return{from:W(t.from().line,0),to:R(e.doc,W(t.to().line+1,0))}})},delLineLeft:function(e){return ti(e,function(e){return{from:W(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ti(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return ti(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(W(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(W(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return oi(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return li(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ai(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},bo)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},bo)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?li(e,t.head):n},bo)},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,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=d(e.getLine(o.line),o.ch,n);t.push(p(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=S(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new W(i.line,i.ch-1)),i.ch>0)i=new W(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),W(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new W(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),W(i.line-1,a.length-1),i,"+transpose"))}r.push(new ra(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);lr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},va=new fo,ya=null,ba=function(e,t,r){this.time=e,this.pos=t,this.button=r};ba.prototype.compare=function(e,t,r){return this.time+400>e&&0==F(t,this.pos)&&r==this.button};var wa,xa,ka={toString:function(){return"CodeMirror.Init"}},Ca={},Ta={};Ti.defaults=Ca,Ti.optionHandlers=Ta;var Sa=[];Ti.defineInitHook=function(e){return Sa.push(e)};var La=null,Ma=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new fo,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ma.prototype.init=function(e){function t(e){if(!me(i,e)){if(i.somethingSelected())Li({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Ni(i);Li({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,vo),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=La.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var a=Ei(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=La.text.join("\n");var s=document.activeElement;uo(l),setTimeout(function(){i.display.lineSpace.removeChild(a),s.focus(),s==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;_i(o,i.options.spellcheck),Ao(o,"paste",function(e){me(i,e)||Ai(e,i)||Ki<=11&&setTimeout(xr(i,function(){return r.updateFromDOM()}),20)}),Ao(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),Ao(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),Ao(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ao(o,"touchstart",function(){return n.forceCompositionEnd()}),Ao(o,"input",function(){r.composing||r.readFromDOMSoon()}),Ao(o,"copy",t),Ao(o,"cut",t)},Ma.prototype.prepareSelection=function(){var e=Vt(this.cm,!1);return e.focus=this.cm.state.focused,e},Ma.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ma.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Pi(t,e.anchorNode,e.anchorOffset),a=Pi(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=F(H(o,a),n)||0!=F(P(o,a),i)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Di(t,n)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Di(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=ao(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!Ri&&t.state.focused?(e.collapse(s.node,s.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):Ri&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ma.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)},Ma.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},Ma.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ma.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},Ma.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ma.prototype.blur=function(){this.div.blur()},Ma.prototype.getField=function(){return this.div},Ma.prototype.supportsTouch=function(){return!0},Ma.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():wr(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Ma.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ma.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(eo&&$i&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Pi(t,e.anchorNode,e.anchorOffset),n=Pi(t,e.focusNode,e.focusOffset);r&&n&&wr(t,function(){vn(t.doc,Br(r,n),vo),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ma.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=W(n.line-1,S(e.doc,n.line-1).length)),i.ch==S(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=W(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||0==(o=Ut(e,n.line))?(a=O(t.view[0].line),l=t.view[0].node):(a=O(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Ut(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=O(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(function(e,t,r,n,i){function o(){c&&(s+=u,c=!1)}function a(e){e&&(o(),s+=e)}function l(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void a(r||t.textContent.replace(/\u200b/g,""));var s,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(W(n,0),W(i+1,0),function(e){return function(t){return t.id==e}}(+d));return void(f.length&&(s=f[0].find(0))&&a(L(e.doc,s.from,s.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p)$/i.test(t.nodeName);h&&o();for(var p=0;p<t.childNodes.length;p++)l(t.childNodes[p]);h&&(c=!0)}else 3==t.nodeType&&a(t.nodeValue)}for(var s="",c=!1,u=e.doc.lineSeparator();l(t),t!=r;)t=t.nextSibling;return s}(e,l,c,a,s)),f=L(e.doc,W(a,0),W(s,S(e.doc,s).text.length));d.length>1&&f.length>1;)if(m(d)==m(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var h=0,p=0,g=d[0],v=f[0],y=Math.min(g.length,v.length);h<y&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=m(d),w=m(f),x=Math.min(b.length-(1==d.length?h:0),w.length-(1==f.length?h:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==d.length&&1==f.length&&a==n.line)for(;h&&h>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.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 k=W(a,h),C=W(s,f.length?m(f).length-p:0);return d.length>1||d[0]||F(k,C)?(En(e.doc,d,k,C,"+input"),!0):void 0},Ma.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ma.prototype.reset=function(){this.forceCompositionEnd()},Ma.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ma.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))},Ma.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||wr(this.cm,function(){return Tr(e.cm)})},Ma.prototype.setUneditable=function(e){e.contentEditable="false"},Ma.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||xr(this.cm,Mi)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ma.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ma.prototype.onContextMenu=function(){},Ma.prototype.resetPosition=function(){},Ma.prototype.needsContentAttribute=!0;var Aa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new fo,this.hasSelection=!1,this.composing=null};Aa.prototype.init=function(e){function t(e){if(!me(i,e)){if(i.somethingSelected())Li({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Ni(i);Li({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,vo):(n.prevInput="",a.value=t.text.join("\n"),uo(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Ei(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Qi&&(a.style.width="0px"),Ao(a,"input",function(){Ui&&Ki>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Ao(a,"paste",function(e){me(i,e)||Ai(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ao(a,"cut",t),Ao(a,"copy",t),Ao(e.scroller,"paste",function(t){lt(e,t)||me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ao(e.lineSpace,"selectstart",function(t){lt(e,t)||be(t)}),Ao(a,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ao(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Aa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Vt(e);if(e.options.moveInputWithCursor){var i=Nt(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Aa.prototype.showSelection=function(e){var t=this.cm.display;r(t.cursorDiv,e.cursors),r(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Aa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&uo(this.textarea),Ui&&Ki>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",Ui&&Ki>=9&&(this.hasSelection=null))}},Aa.prototype.getField=function(){return this.textarea},Aa.prototype.supportsTouch=function(){return!1},Aa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!to||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},Aa.prototype.blur=function(){this.textarea.blur()},Aa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Aa.prototype.receivedFocus=function(){this.slowPoll()},Aa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Aa.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},Aa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||_o(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(Ui&&Ki>=9&&this.hasSelection===i||ro&&/[\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||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return wr(t,function(){Mi(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.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},Aa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Aa.prototype.onKeyPress=function(){Ui&&Ki>=9&&(this.hasSelection=null),this.fastPoll()},Aa.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=u,a.style.cssText=c,Ui&&Ki<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!Ui||Ui&&Ki<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?xr(i,Sn)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=qt(i,e),s=o.scroller.scrollTop;if(l&&!Yi){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&xr(i,vn)(i.doc,Br(l),vo);var c=a.style.cssText,u=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var d=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(Ui?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var f;if(Vi&&(f=window.scrollY),o.input.focus(),Vi&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Ui&&Ki>=9&&t(),so){ke(e);var h=function(){he(window,"mouseup",h),setTimeout(r,20)};Ao(window,"mouseup",h)}else setTimeout(r,50)}},Aa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Aa.prototype.setUneditable=function(){},Aa.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=ka&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=ka,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Gr(e)},!0),t("indentUnit",2,Gr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){$r(e),Ct(e),Tr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=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,r.push(W(n,o))}n++});for(var i=r.length-1;i>=0;i--)En(e.doc,t,r[i],W(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ka&&e.refresh()}),t("specialCharPlaceholder",Ke,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",to?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!io),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){wi(e),xi(e)},!0),t("keyMap","default",function(e,t,r){var n=ei(t),i=r!=ka&&ei(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Ci,!0),t("gutters",[],function(e){Pr(e.options),xi(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Rt(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return mr(e)},!0),t("scrollbarStyle","native",function(e){vr(e),mr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pr(e.options),xi(e)},!0),t("firstLineNumber",1,xi,!0),t("lineNumberFormatter",function(e){return e},xi,!0),t("showCursorWhenSelecting",!1,Kt,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Qt(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ki),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Kt,!0),t("singleCursorHeightPerLine",!0,Kt,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,$r,!0),t("addModeClass",!1,$r,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,$r,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Ti),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&xr(this,t[e])(this,r,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"](ei(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:kr(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Tr(this)}),removeOverlay:kr(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Tr(this)}}),indentLine:kr(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),_(this.doc,e)&&Si(this,e,t,r)}),indentSelection:kr(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Si(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&lr(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Si(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&pn(this.doc,n,new ra(o,c[n].to()),vo)}}}),getTokenAt:function(e,t){return Ie(this,e,t)},getLineTokens:function(e,t){return Ie(this,W(e),t,!0)},getTokenTypeAt:function(e){e=R(this.doc,e);var t,r=Fe(this,S(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&n.push(l)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==f(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return e=I(r,null==e?r.first+r.size-1:e),De(this,e+1,t).state},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?R(this.doc,e):e?n.from():n.to(),Nt(this,r,t||"page")},charCoords:function(e,t){return Ot(this,R(this.doc,e),t||"page")},coordsChar:function(e,t){return e=At(this,e,t||"page"),Wt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=At(this,{top:e,left:0},t||"page").top,N(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,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),n=S(this.doc,e)}else n=e;return Mt(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-le(n):0)},defaultTextHeight:function(){return Pt(this.display)},defaultCharWidth:function(){return Ht(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Nt(this,R(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&function(e,t){var r=or(e,t);null!=r.scrollTop&&dr(e,r.scrollTop),null!=r.scrollLeft&&hr(e,r.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:kr(fi),triggerOnKeyPress:kr(pi),triggerOnKeyUp:hi,triggerOnMouseDown:kr(mi),execCommand:function(e){if(ga.hasOwnProperty(e))return ga[e].call(null,this)},triggerElectric:kr(function(e){Oi(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=R(this.doc,e),a=0;a<t&&!(o=Wi(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:kr(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Wi(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},bo)}),deleteH:kr(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):ti(this,function(r){var i=Wi(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=R(this.doc,e),l=0;l<t;++l){var s=Nt(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Fi(this,s,i,r)).hitSide)break}return a},moveV:kr(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=Nt(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Fi(r,l,e,t);return"page"==t&&a==n.sel.primary()&&ar(r,Ot(r,s,"div").top-l.top),s},bo),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=S(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=w(o,i)?function(e){return w(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new ra(W(e.line,r),W(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):co(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:kr(function(e,t){sr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-dt(this)-this.display.barHeight,width:e.scrollWidth-dt(this)-this.display.barWidth,clientHeight:ht(this),clientWidth:ft(this)}},scrollIntoView:kr(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:W(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){cr(e),e.curOp.scrollToPos=t}(this,e):ur(this,e.from,e.to,e.margin)}),setSize:kr(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&kt(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){Sr(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,pe(this,"refresh",this)}),operation:function(e){return wr(this,e)},startOperation:function(){return yr(this)},endOperation:function(){return br(this)},refresh:kr(function(){var e=this.display.cachedTextHeight;Tr(this),this.curOp.forceUpdate=!0,Ct(this),sr(this,this.doc.scrollLeft,this.doc.scrollTop),Fr(this),(null==e||Math.abs(e-Pt(this.display))>.5)&&Bt(this),pe(this,"refresh",this)}),swapDoc:kr(function(e){var t=this.doc;return t.cm=null,Jr(this,e),Ct(this),this.display.input.reset(),sr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Xe(this,"swapDoc",this,t),t}),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}},ye(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Ti);var Oa="iter insert remove copy getEditor constructor".split(" ");for(var Na in sa.prototype)sa.prototype.hasOwnProperty(Na)&&f(Oa,Na)<0&&(Ti.prototype[Na]=function(e){return function(){return e.apply(this.doc,arguments)}}(sa.prototype[Na]));return ye(sa),Ti.inputStyles={textarea:Aa,contenteditable:Ma},Ti.defineMode=function(e){Ti.defaults.mode||"null"==e||(Ti.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fo[e]=t}.apply(this,arguments)},Ti.defineMIME=function(e,t){Do[e]=t},Ti.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ti.defineMIME("text/plain","null"),Ti.defineExtension=function(e,t){Ti.prototype[e]=t},Ti.defineDocExtension=function(e,t){sa.prototype[e]=t},Ti.fromTextArea=function(e,t){function r(){e.value=s.getValue()}if(t=t?u(t):{},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=a();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(Ao(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(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ti(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=he,e.on=Ao,e.wheelEventPixels=Ir,e.Doc=sa,e.splitLines=No,e.countColumn=d,e.findColumn=h,e.isWordChar=b,e.Pass=go,e.signal=pe,e.Line=jo,e.changeEnd=qr,e.scrollbarModel=Xo,e.Pos=W,e.cmpPos=F,e.modes=Fo,e.mimeModes=Do,e.resolveMode=Me,e.getMode=Ae,e.modeExtensions=zo,e.extendMode=Oe,e.copyState=Ne,e.startState=Ee,e.innerMode=_e,e.commands=ga,e.keyMap=ma,e.keyName=Qn,e.isModifierKey=Zn,e.lookupKey=Xn,e.normalizeKeyMap=Yn,e.StringStream=Po,e.SharedTextMarker=aa,e.TextMarker=oa,e.LineWidget=na,e.e_preventDefault=be,e.e_stopPropagation=we,e.e_stop=ke,e.addClass=l,e.contains=o,e.rmClass=co,e.keyNames=da}(Ti),Ti.version="5.32.0",Ti})},{}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return h=t,e}function i(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function a(e,t,r){this.type=e,this.indent=t,this.prev=r}function l(e,t,r,n){return e.context=new a(r,t.indentation()+(!1===n?0:m),e.context),r}function s(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,r){return N[r.context.type](e,t,r)}function u(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return c(e,t,r)}function d(e){var t=e.current().toLowerCase();p=L.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var f=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,p,m=t.indentUnit,g=r.tokenHooks,v=r.documentTypes||{},y=r.mediaTypes||{},b=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},k=r.nonStandardPropertyKeywords||{},C=r.fontProperties||{},T=r.counterDescriptors||{},S=r.colorKeywords||{},L=r.valueKeywords||{},M=r.allowNested,A=r.lineComment,O=!0===r.supportsAtComponent,N={};return N.top=function(e,t,r){if("{"==e)return l(r,t,"block");if("}"==e&&r.context.prev)return s(r);if(O&&/@component/.test(e))return l(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return l(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return l(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(r,t,"at");if("hash"==e)p="builtin";else if("word"==e)p="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(r,t,"interpolation");if(":"==e)return"pseudo";if(M&&"("==e)return l(r,t,"parens")}return r.context.type},N.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(p="property","maybeprop"):k.hasOwnProperty(n)?(p="string-2","maybeprop"):M?(p=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==e?"block":M||"hash"!=e&&"qualifier"!=e?N.top(e,t,r):(p="error","block")},N.maybeprop=function(e,t,r){return":"==e?l(r,t,"prop"):c(e,t,r)},N.prop=function(e,t,r){if(";"==e)return s(r);if("{"==e&&M)return l(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return l(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)d(t);else if("interpolation"==e)return l(r,t,"interpolation")}else p+=" error";return"prop"},N.propBlock=function(e,t,r){return"}"==e?s(r):"word"==e?(p="property","maybeprop"):r.context.type},N.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?s(r):"("==e?l(r,t,"parens"):"interpolation"==e?l(r,t,"interpolation"):("word"==e&&d(t),"parens")},N.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(p="variable-3",r.context.type):c(e,t,r)},N.documentTypes=function(e,t,r){return"word"==e&&v.hasOwnProperty(t.current())?(p="tag",r.context.type):N.atBlock(e,t,r)},N.atBlock=function(e,t,r){if("("==e)return l(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return s(r)&&l(r,t,M?"block":"top");if("interpolation"==e)return l(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();p="only"==n||"not"==n||"and"==n||"or"==n?"keyword":y.hasOwnProperty(n)?"attribute":b.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":k.hasOwnProperty(n)?"string-2":L.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},N.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?s(r)&&l(r,t,M?"block":"top",!1):("word"==e&&(p="error"),r.context.type)},N.atBlock_parens=function(e,t,r){return")"==e?s(r):"{"==e||"}"==e?u(e,t,r,2):N.atBlock(e,t,r)},N.restricted_atBlock_before=function(e,t,r){return"{"==e?l(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(p="variable","restricted_atBlock_before"):c(e,t,r)},N.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,s(r)):"word"==e?(p="@font-face"==r.stateArg&&!C.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,r){return"word"==e?(p="variable","keyframes"):"{"==e?l(r,t,"top"):c(e,t,r)},N.at=function(e,t,r){return";"==e?s(r):"{"==e||"}"==e?u(e,t,r):("word"==e?p="tag":"hash"==e&&(p="builtin"),"at")},N.interpolation=function(e,t,r){return"}"==e?s(r):"{"==e||";"==e?u(e,t,r):("word"==e?p="variable":"variable"!=e&&"("!=e&&")"!=e&&(p="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(g[r]){var a=g[r](e,t);if(!1!==a)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),p=r,"comment"!=h&&(t.state=N[t.state](h,e,t)),p},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:A,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(h),m=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=t(v),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(b),x=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(v).concat(b);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:w,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:w,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":17}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){var r=e.match(function(e){var t=o[e];return t||(o[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function r(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function n(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},o={};e.defineMode("htmlmixed",function(o,a){function l(n,i){var a,u=s.token(n,i.htmlState),d=/\btag\b/.test(u);if(d&&!/[<>\s\/]/.test(n.current())&&(a=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))i.inTag=a+" ";else if(i.inTag&&d&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var h=">"==n.current()&&function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(t(r,i[0])))return i[2]}}(c[f[1]],f[2]),p=e.getMode(o,h),m=r(f[1],!0),g=r(f[1],!1);i.token=function(e,t){return e.match(m,!1)?(t.token=l,t.localState=t.localMode=null,null):function(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}(e,g,t.localMode.token(e,t.localState))},i.localMode=p,i.localState=e.startState(p,s.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return u}var s=e.getMode(o,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag}),c={},u=a&&a.tags,d=a&&a.scriptTypes;if(n(i,c),u&&n(u,c),d)for(var f=d.length-1;f>=0;f--)c.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?s.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":17,"../css/css":18,"../javascript/javascript":20,"../xml/xml":21}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e,t,r){return ke=e,Ce=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=function(e){return function(t,r){var o,a=!1;if(Le&&"@"==t.peek()&&t.match(Ee))return r.tokenize=i,n("jsonld-keyword","meta");for(;null!=(o=t.next())&&(o!=e||a);)a=!a&&"\\"==o;return a||(r.tokenize=i),n("string","string")}}(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return n("number","number");if("."==r&&e.match(".."))return n("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return n(r);if("="==r&&e.eat(">"))return n("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),n("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),n("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),n("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),n("number","number");if("/"==r)return e.eat("*")?(t.tokenize=o,o(e,t)):e.eat("/")?(e.skipToEnd(),n("comment","comment")):xe(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),n("regexp","string-2")):(e.eat("="),n("operator","operator",e.current()));if("`"==r)return t.tokenize=a,a(e,t);if("#"==r)return e.skipToEnd(),n("error","error");if(_e.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),n("operator","operator",e.current());if(Oe.test(r)){e.eatWhile(Oe);var l=e.current();if("."!=t.lastType){if(Ne.propertyIsEnumerable(l)){var s=Ne[l];return n(s.type,s.style,l)}if("async"==l&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return n("async","keyword",l)}return n("variable","variable",l)}}function o(e,t){for(var r,o=!1;r=e.next();){if("/"==r&&o){t.tokenize=i;break}o="*"==r}return n("comment","comment")}function a(e,t){for(var r,o=!1;null!=(r=e.next());){if(!o&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}o=!o&&"\\"==r}return n("quasi","string-2",e.current())}function l(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ae){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=We.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(Oe.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function s(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function c(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function u(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function d(){return u.apply(null,arguments),!0}function f(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function h(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=ze}function p(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function m(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new s(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function g(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function v(e){function t(r){return r==e?d():";"==e?u():d(t)}return t}function y(e,t){return"var"==e?d(m("vardef",t.length),Y,v(";"),g):"keyword a"==e?d(m("form"),x,y,g):"keyword b"==e?d(m("form"),y,g):"keyword d"==e?De.stream.match(/^\s*$/,!1)?d():d(m("stat"),C,v(";"),g):"debugger"==e?d(v(";")):"{"==e?d(m("}"),P,g):";"==e?d():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==g&&De.state.cc.pop()(),d(m("form"),x,y,g,ee)):"function"==e?d(ae):"for"==e?d(m("form"),te,y,g):"variable"==e?Ae&&"type"==t?(De.marked="keyword",d(j,v("operator"),j,v(";"))):Ae&&"declare"==t?(De.marked="keyword",d(y)):Ae&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",d(m("form"),X,v("{"),m("}"),P,g,g)):d(m("stat"),N):"switch"==e?d(m("form"),x,v("{"),m("}","switch"),P,g,g):"case"==e?d(b,v(":")):"default"==e?d(v(":")):"catch"==e?d(m("form"),h,v("("),le,v(")"),y,g,p):"class"==e?d(m("form"),ce,g):"export"==e?d(m("stat"),he,g):"import"==e?d(m("stat"),me,g):"async"==e?d(y):"@"==t?d(b,y):u(m("stat"),b,v(";"),g)}function b(e){return k(e,!1)}function w(e){return k(e,!0)}function x(e){return"("!=e?u():d(m(")"),b,v(")"),g)}function k(e,t){if(De.state.fatArrowAt==De.stream.start){var r=t?O:A;if("("==e)return d(h,m(")"),D(le,")"),g,v("=>"),r,p);if("variable"==e)return u(h,X,v("=>"),r,p)}var n=t?S:T;return Fe.hasOwnProperty(e)?d(n):"function"==e?d(ae,n):"class"==e?d(m("form"),se,g):"keyword c"==e||"async"==e?d(t?w:b):"("==e?d(m(")"),C,v(")"),g,n):"operator"==e||"spread"==e?d(t?w:b):"["==e?d(m("]"),we,g,n):"{"==e?z(E,"}",null,n):"quasi"==e?u(L,n):"new"==e?d(function(e){return function(t){return"."==t?d(e?function(e,t){if("target"==t)return De.marked="keyword",d(S)}:function(e,t){if("target"==t)return De.marked="keyword",d(T)}):"variable"==t&&Ae?d(V,e?S:T):u(e?w:b)}}(t)):d()}function C(e){return e.match(/[;\}\)\],]/)?u():u(b)}function T(e,t){return","==e?d(b):S(e,t,!1)}function S(e,t,r){var n=0==r?T:S,i=0==r?b:w;return"=>"==e?d(h,r?O:A,p):"operator"==e?/\+\+|--/.test(t)||Ae&&"!"==t?d(n):Ae&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?d(m(">"),D(j,">"),g,n):"?"==t?d(b,v(":"),i):d(i):"quasi"==e?u(L,n):";"!=e?"("==e?z(w,")","call",n):"."==e?d(_,n):"["==e?d(m("]"),C,v("]"),g,n):Ae&&"as"==t?(De.marked="keyword",d(j,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),d(i)):void 0:void 0}function L(e,t){return"quasi"!=e?u():"${"!=t.slice(t.length-2)?d(L):d(b,M)}function M(e){if("}"==e)return De.marked="string-2",De.state.tokenize=a,d(L)}function A(e){return l(De.stream,De.state),u("{"==e?y:b)}function O(e){return l(De.stream,De.state),u("{"==e?y:w)}function N(e){return":"==e?d(g,y):u(T,v(";"),g)}function _(e){if("variable"==e)return De.marked="property",d()}function E(e,t){if("async"==e)return De.marked="property",d(E);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return d(W);var r;return Ae&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),d(F)}return"number"==e||"string"==e?(De.marked=Le?"property":De.style+" property",d(F)):"jsonld-keyword"==e?d(F):"modifier"==e?d(E):"["==e?d(b,v("]"),F):"spread"==e?d(w,F):"*"==t?(De.marked="keyword",d(E)):":"==e?u(F):void 0}function W(e){return"variable"!=e?u(F):(De.marked="property",d(ae))}function F(e){return":"==e?d(w):"("==e?u(ae):void 0}function D(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=De.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),d(function(r,n){return r==t||n==t?u():u(e)},n)}return i==t||o==t?d():d(v(t))}return function(r,i){return r==t||i==t?d():u(e,n)}}function z(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return d(m(t,r),D(e,t),g)}function P(e){return"}"==e?d():u(y,P)}function H(e,t){if(Ae){if(":"==e)return d(j);if("?"==t)return d(H)}}function I(e){if(Ae&&":"==e)return De.stream.match(/^\s*\w+\s+is\b/,!1)?d(b,R,j):d(j)}function R(e,t){if("is"==t)return De.marked="keyword",d()}function j(e,t){return"variable"==e||"void"==t?"keyof"==t?(De.marked="keyword",d(j)):(De.marked="type",d(K)):"string"==e||"number"==e||"atom"==e?d(K):"["==e?d(m("]"),D(j,"]",","),g,K):"{"==e?d(m("}"),D(q,"}",",;"),g,K):"("==e?d(D(U,")"),B):void 0}function B(e){if("=>"==e)return d(j)}function q(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",d(q)):"?"==t?d(q):":"==e?d(j):"["==e?d(b,H,v("]"),q):void 0}function U(e){return"variable"==e?d(U):":"==e?d(j):void 0}function K(e,t){return"<"==t?d(m(">"),D(j,">"),g,K):"|"==t||"."==e?d(j):"["==e?d(v("]"),K):"extends"==t?d(j):void 0}function V(e,t){if("<"==t)return d(m(">"),D(j,">"),g,K)}function G(){return u(j,$)}function $(e,t){if("="==t)return d(j)}function Y(){return u(X,H,J,Q)}function X(e,t){return"modifier"==e?d(X):"variable"==e?(f(t),d()):"spread"==e?d(X):"["==e?z(X,"]"):"{"==e?z(Z,"}"):void 0}function Z(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?d(X):"}"==e?u():d(v(":"),X,J)):(f(t),d(J))}function J(e,t){if("="==t)return d(w)}function Q(e){if(","==e)return d(Y)}function ee(e,t){if("keyword b"==e&&"else"==t)return d(m("form","else"),y,g)}function te(e){if("("==e)return d(m(")"),re,v(")"),g)}function re(e){return"var"==e?d(Y,v(";"),ie):";"==e?d(ie):"variable"==e?d(ne):u(b,v(";"),ie)}function ne(e,t){return"in"==t||"of"==t?(De.marked="keyword",d(b)):d(T,ie)}function ie(e,t){return";"==e?d(oe):"in"==t||"of"==t?(De.marked="keyword",d(b)):u(b,v(";"),oe)}function oe(e){")"!=e&&d(b)}function ae(e,t){return"*"==t?(De.marked="keyword",d(ae)):"variable"==e?(f(t),d(ae)):"("==e?d(h,m(")"),D(le,")"),g,I,y,p):Ae&&"<"==t?d(m(">"),D(G,">"),g,ae):void 0}function le(e,t){return"@"==t&&d(b,le),"spread"==e||"modifier"==e?d(le):u(X,H,J)}function se(e,t){return"variable"==e?ce(e,t):ue(e,t)}function ce(e,t){if("variable"==e)return f(t),d(ue)}function ue(e,t){return"<"==t?d(m(">"),D(G,">"),g,ue):"extends"==t||"implements"==t||Ae&&","==e?d(Ae?j:b,ue):"{"==e?d(m("}"),de,g):void 0}function de(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",d(de)):"variable"==e||"keyword"==De.style?(De.marked="property",d(Ae?fe:ae,de)):"["==e?d(b,v("]"),Ae?fe:ae,de):"*"==t?(De.marked="keyword",d(de)):";"==e?d(de):"}"==e?d():"@"==t?d(b,de):void 0}function fe(e,t){return"?"==t?d(fe):":"==e?d(j,J):"="==t?d(w):u(ae)}function he(e,t){return"*"==t?(De.marked="keyword",d(be,v(";"))):"default"==t?(De.marked="keyword",d(b,v(";"))):"{"==e?d(D(pe,"}"),be,v(";")):u(y)}function pe(e,t){return"as"==t?(De.marked="keyword",d(v("variable"))):"variable"==e?u(w,pe):void 0}function me(e){return"string"==e?d():u(ge,ve,be)}function ge(e,t){return"{"==e?z(ge,"}"):("variable"==e&&f(t),"*"==t&&(De.marked="keyword"),d(ye))}function ve(e){if(","==e)return d(ge,ve)}function ye(e,t){if("as"==t)return De.marked="keyword",d(ge)}function be(e,t){if("from"==t)return De.marked="keyword",d(b)}function we(e){return"]"==e?d():u(D(w,"]"))}function xe(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var ke,Ce,Te=t.indentUnit,Se=r.statementIndent,Le=r.jsonld,Me=r.json||Le,Ae=r.typescript,Oe=r.wordCharacters||/[\w$\xa1-\uffff]/,Ne=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Ae){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var u in c)l[u]=c[u]}return l}(),_e=/[+\-*&%=<>!?|~^@]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,We="([{}])",Fe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},ze={name:"this",next:{name:"arguments"}};return g.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new s((e||0)-Te,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),l(e,t)),t.tokenize!=o&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==ke?r:(t.lastType="operator"!=ke||"++"!=Ce&&"--"!=Ce?ke:"incdec",function(e,t,r,n,i){var o=e.cc;for(De.state=e,De.stream=i,De.marked=null,De.cc=o,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():Me?b:y)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return De.marked?De.marked:"variable"==r&&c(e,n)?"variable-2":t}}(t,r,ke,Ce,e))},indent:function(t,n){if(t.tokenize==o)return e.Pass;if(t.tokenize!=i)return 0;var a,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==g)s=s.prev;else if(u!=ee)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(a=t.cc[t.cc.length-1])&&(a==T||a==S)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Se&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,f=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+Te:"stat"==d?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||_e.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?Se||Te:0):"switch"!=s.info||f||0==r.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:Te):s.indented+(/^(?:case|default)\b/.test(n)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Me?null:"/*",blockCommentEnd:Me?null:"*/",blockCommentContinue:Me?null:" * ",lineComment:Me?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Me?"json":"javascript",jsonldMode:Le,jsonMode:Me,expressionAllowed:xe,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=b&&t!=w||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":17}],21:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(l("atom","]]>")):null:e.match("--")?r(l("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(s(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){return(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,T=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return T="equals",null;if("<"==r){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=function(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function s(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=s(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=s(e-1),r.tokenize(t,r)}}return"meta"}}function c(e){e.context&&(e.context=e.context.prev)}function u(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;c(e)}}function d(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:d}function f(e,t,r){return"word"==e?(r.tagName=t.current(),S="tag",g):(S="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&c(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(S="tag",p):(S="tag error",m)}return S="error",m}function p(e,t,r){return"endTag"!=e?(S="error",p):(c(r),d)}function m(e,t,r){return S="error",p(e,0,r)}function g(e,t,r){if("word"==e)return S="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?u(r,n):(u(r,n),r.context=new function(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}(r,n,i==r.indented)),d}return S="error",g}function v(e,t,r){return"equals"==e?y:(x.allowMissing||(S="error"),g(e,0,r))}function y(e,t,r){return"string"==e?b:"word"==e&&x.allowUnquoted?(S="string",g):(S="error",g(e,0,r))}function b(e,t,r){return"string"==e?b:g(e,0,r)}var w=n.indentUnit,x={},k=i.htmlMode?t:r;for(var C in k)x[C]=k[C];for(var C in i)x[C]=i[C];var T,S;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var r=t.tokenize(e,t);return(r||T)&&"comment"!=r&&(S=null,t.state=t.state(T||r,e,t),S&&(r="error"==S?r+" error":S)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!x.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=x.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+w:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==y&&(e.state=g)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":17}],22:[function(e,t,r){t.exports={prettyPrint:function(e,t){var r,n,i,o,a,l;for(n=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,l=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(r=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace))t.length&&(r=!0),this.line_char_count--;else{if(r){if(this.line_char_count>=this.max_char){t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;r=!1}t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1==this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.get_tag=function(){var e,t,r="",n=[],i=!1;do{if(this.pos>=this.input.length)return n.length?n.join(""):["","TK_EOF"];r=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(r,this.Utils.whitespace)?(i=!0,this.line_char_count--):("'"!==r&&'"'!==r||n[1]&&"!"===n[1]||(r+=this.get_unformatted(r),i=!0),"="===r&&(i=!1),n.length&&"="!==n[n.length-1]&&">"!==r&&i&&(this.line_char_count>=this.max_char?(this.print_newline(!1,n),this.line_char_count=0):(n.push(" "),this.line_char_count++),i=!1),"<"===r&&(e=this.pos-1),n.push(r))}while(">"!==r);var o,a=n.join("");o=-1!=a.indexOf(" ")?a.indexOf(" "):a.indexOf(">");var s=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(s,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===s)this.record_tag(s),this.tag_type="SCRIPT";else if("style"===s)this.record_tag(s),this.tag_type="STYLE";else if(this.Utils.in_array(s,l)){var c=this.get_unformatted("</"+s+">",a);n.push(c),e>0&&this.Utils.in_array(this.input.charAt(e-1),this.Utils.whitespace)&&n.splice(0,0,this.input.charAt(e-1)),t=this.pos-1,this.Utils.in_array(this.input.charAt(t+1),this.Utils.whitespace)&&n.push(this.input.charAt(t+1)),this.tag_type="SINGLE"}else"!"===s.charAt(0)?-1!=s.indexOf("[if")?(-1!=a.indexOf("!IE")&&(c=this.get_unformatted("--\x3e",a),n.push(c)),this.tag_type="START"):-1!=s.indexOf("[endif")?(this.tag_type="END",this.unindent()):-1!=s.indexOf("[cdata[")?(c=this.get_unformatted("]]>",a),n.push(c),this.tag_type="SINGLE"):(c=this.get_unformatted("--\x3e",a),n.push(c),this.tag_type="SINGLE"):("/"===s.charAt(0)?(this.retrieve_tag(s.substring(1)),this.tag_type="END"):(this.record_tag(s),this.tag_type="START"),this.Utils.in_array(s,this.Utils.extra_liners)&&this.print_newline(!0,this.output));return n.join("")},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var r="",n="",i=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,i=!0}while(-1==n.toLowerCase().indexOf(e));return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,r,n,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=r,this.brace_style=i,this.indent_level=0,this.max_char=n,this.line_char_count=0;for(var o=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){if(this.line_char_count=0,t&&t.length){if(!e)for(;this.Utils.in_array(t[t.length-1],this.Utils.whitespace);)t.pop();t.push("\n");for(var r=0;r<this.indent_level;r++)t.push(this.indent_string)}},this.print_token=function(e){this.output.push(e)},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}).printer(e,i,n,o,a);;){var s=r.get_token();if(r.token_text=s[0],r.token_type=s[1],"TK_EOF"===r.token_type)break;switch(r.token_type){case"TK_TAG_START":r.print_newline(!1,r.output),r.print_token(r.token_text),r.indent(),r.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===r.last_token&&""===r.last_text){var c=r.token_text.match(/\w+/)[0],u=r.output[r.output.length-1].match(/<\s*(\w+)/);null!==u&&u[1]===c||r.print_newline(!0,r.output)}r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var d=r.token_text.match(/^\s*<([a-z]+)/i);d&&r.Utils.in_array(d[1],l)||r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_CONTENT":""!==r.token_text&&r.print_token(r.token_text),r.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==r.token_text){r.output.push("\n");var f=r.token_text;if("TK_SCRIPT"==r.token_type)var h="function"==typeof js_beautify&&js_beautify;else"TK_STYLE"==r.token_type&&(h="function"==typeof css_beautify&&css_beautify);if("keep"==t.indent_scripts)var p=0;else p="separate"==t.indent_scripts?-r.indent_level:1;var m=r.get_full_indent(p);if(h)f=h(f.replace(/^\s*/,m),t);else{var g=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(r.indent_string).length-1,v=r.get_full_indent(p-g);f=f.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+v).replace(/\s*$/,"")}f&&(r.print_token(f),r.print_newline(!0,r.output))}r.current_mode="TAG"}r.last_token=r.token_type,r.last_text=r.token_text}return r.output.join("")}}},{}],23:[function(e,t,r){"use strict";t.exports=e("./stream/stream")},{"./stream/stream":24}],24:[function(e,t,r){!function(){"use strict";function e(){function t(){return arguments.length>0&&arguments[0]!==v&&r(t,arguments[0]),t._state.value}return function(t){t.constructor=e,t._state={id:g++,value:void 0,state:0,derive:void 0,recover:void 0,deps:{},parents:[],endStream:void 0,unregister:void 0},t.map=t["fantasy-land/map"]=s,t["fantasy-land/ap"]=c,t["fantasy-land/of"]=e,t.valueOf=u,t.toJSON=d,t.toString=u,Object.defineProperties(t,{end:{get:function(){if(!t._state.endStream){var r=e();r.map(function(e){return!0===e&&(l(t),r._state.unregister=function(){l(r)}),e}),t._state.endStream=r}return t._state.endStream}}})}(t),arguments.length>0&&arguments[0]!==v&&r(t,arguments[0]),t}function r(e,t){n(e,t);for(var r in e._state.deps)i(e._state.deps[r],!1);null!=e._state.unregister&&e._state.unregister(),function(e){e._state.changed=!1;for(var t in e._state.deps)e._state.deps[t]._state.changed=!1}(e)}function n(e,t){e._state.value=t,e._state.changed=!0,2!==e._state.state&&(e._state.state=1)}function i(e,t){var r=e._state.parents;if(r.length>0&&r.every(h)&&(t||r.some(p))){var i=e._state.derive();if(i===v)return!1;n(e,i)}}function o(t,r){if(!r.every(f))throw new Error("Ensure that each item passed to stream.combine/stream.merge is a stream");return function(e,t,r){var n=e._state;return n.derive=r,n.parents=t.filter(m),a(e,n.parents),i(e,!0),e}(e(),r,function(){return t.apply(this,r.concat([r.filter(p)]))})}function a(e,t){for(var r=0;r<t.length;r++)t[r]._state.deps[e._state.id]=e,a(e,t[r]._state.parents)}function l(e){for(var t=0;t<e._state.parents.length;t++){delete e._state.parents[t]._state.deps[e._state.id]}for(var r in e._state.deps){var n=e._state.deps[r],i=n._state.parents.indexOf(e);i>-1&&n._state.parents.splice(i,1)}e._state.state=2,e._state.deps={}}function s(e){return o(function(t){return e(t())},[this])}function c(e){return o(function(e,t){return e()(t())},[e,this])}function u(){return this._state.value}function d(){return null!=this._state.value&&"function"==typeof this._state.value.toJSON?this._state.value.toJSON():this._state.value}function f(e){return e._state}function h(e){return 1===e._state.state}function p(e){return e._state.changed}function m(e){return 2!==e._state.state}var g=0,v={};e["fantasy-land/of"]=e,e.merge=function(e){return o(function(){return e.map(function(e){return e()})},e)},e.combine=o,e.scan=function(e,t,r){var n=o(function(r){return t=e(t,r._state.value)},[r]);return 0===n._state.state&&n(t),n},e.scanMerge=function(e,t){var r=e.map(function(e){var t=e[0];return 0===t._state.state&&t(void 0),t});return o(function(){var n=arguments[arguments.length-1];return r.forEach(function(r,i){n.indexOf(r)>-1&&(t=e[i][1](t,r._state.value))}),t},r)},e.HALT=v,void 0!==t?t.exports=e:"function"!=typeof window.m||"stream"in window.m?window.m={stream:e}:window.m.stream=e}()},{}]},{},[11])}();
|
2 |
//# sourceMappingURL=forms-admin.min.js.map
|
assets/js/forms-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["forms-admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","m","i18n","showType","config","fieldType","type","charAt","toUpperCase","slice","label","fieldLabel","value","onchange","withAttr","placeholder","title","isHidden","initialValue","style","optional","valueHelp","numberMinMax","min","max","isRequired","inputAtts","checked","required","desc","forceRequired","disabled","isFieldRequired","placeholderHelp","useParagraphs","wrap","wrapInParagraphTags","choiceType","options","selected","dropdown","radioButtons","acceptsMultipleValues","push","checkboxes","choices","html","map","choice","index","data-id","name","selectChoice","bind","preselect","remove","class","onclick","key","this","splice","linkToTerms","agreeToTermsLink","link","2","forms","rows","render","text","visibleRows","hidden","submit","number","./field-forms-rows.js","3","htmlutil","setAttributes","vnode","dom","setAttribute","generators","select","attributes","hasSelection","oncreate","unshift","checkbox","content","href","target","radio","field","htmlTemplate","vdom","document","createElement","showLabel","prettyPrint","innerHTML","4","tabs","editor","fields","events","setActiveField","fieldConfig","get","c","join","redraw","createFieldHTMLAndAddToForm","generate","insert","overlay","on","view","fieldCategories","getCategories","availableFields","getAll","fieldsChoice","chooseField","category","categoryFields","filter","className","inForm","inFormContent","form","help","trust","onkeydown","window","event","keyCode","addToForm","controller","./field-forms.js","./field-generator.js","./overlay.js","5","register","data","sticky","registeredFields","getFieldType","phone","birthday","registerMergeField","mergeField","listFields","field_type","tag","mailchimpType","streetAddress","city","state","zip","country","mc4wp_vars","countries","registerInterestCategory","interestCategory","interestCategories","id","interests","registerListFields","list","merge_fields","sort","b","public","forEach","interest_categories","registerCustomFields","lists","formFields","subscribe","submitButton","listChoice","listChoiceDescription","unsubscribe","formAction","formActionDescription","agreeToTerms","agreeToTermsShort","registerListsFields","deregister","6","prop","getAllWhere","searchKey","searchValue","timeout","categories","Field","FieldChoice","indexOf","existingField","shift","choiceLabel","Object","keys","createChoices","clearTimeout","setTimeout","trigger","mithril/stream","7","setPreviewDom","frameContent","previewFrame","contentDocument","contentWindow","previewDom","querySelector","updatePreview","markup","FormEditor","getValue","replace","templateRegex","dispatchEvent","Event","domDirty","_dom","toLowerCase","CodeMirror","element","getElementById","addEventListener","signal","query","querySelectorAll","containsField","fieldName","elements","namedItem","replaceSelection","focus","callback","refresh","fromTextArea","selectionPointer","mode","htmlMode","autoCloseTags","autoRefresh","styleActiveLine","matchBrackets","matchTags","bothTags","bubbles","codemirror","codemirror/addon/edit/closetag.js","codemirror/addon/edit/matchbrackets.js","codemirror/addon/edit/matchtags.js","codemirror/addon/fold/xml-fold.js","codemirror/addon/selection/active-line.js","codemirror/mode/css/css","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/javascript/javascript","codemirror/mode/xml/xml","8","settings","helpers","updateFields","originalRequiredValue","nameGroup","requiredFields","requiredFieldElements","Array","prototype","el","pos","substr","requiredFieldsInput","findRequiredFields","debounce","9","show","notices","hide","container","heading","parentNode","insertBefore","nextSibling","init","groupingsNotice","requiredFieldsNotice","missingFields","10","close","removeEventListener","onKeyDown","position","_onCloseCallback","preventDefault","_element","windowWidth","innerWidth","documentElement","clientWidth","body","windowHeight","innerHeight","clientHeight","marginLeft","marginTop","left","top","storeElementReference","onCloseCallback","11","mc4wp_forms_i18n","mc4wp","deps","mithril","FormWatcher","FieldHelper","FieldsFactory","formEditor","fieldHelper","mount","fieldsFactory","getSelectedLists","mailchimp","./admin/field-helper.js","./admin/fields-factory.js","./admin/fields.js","./admin/form-editor.js","./admin/form-watcher.js","./admin/notices","12","mod","amd","autoCloseCurrent","cm","typingSlash","ranges","listSelections","replacements","head","empty","Pass","tok","getTokenAt","inner","innerMode","getMode","string","start","ch","replacement","context","tagName","closingTagExists","getLine","line","end","replaceSelections","indentLine","collection","elt","newTag","scanForClosingTag","Math","lastLine","nextClose","cx","onCx","prev","to","next","defineOption","val","old","Init","removeKeyMap","whenClosing","getOption","autoCloseSlash","whenOpening","opt","configuration","dontCloseTags","htmlDontClose","indentTags","htmlIndent","lowerTagName","test","indent","newPos","Pos","info","replaceRange","anchor","sel","setSelections","autoCloseGT","addKeyMap","commands","closeTag","../../lib/codemirror","../fold/xml-fold","13","findMatchingBracket","where","getLineHandle","afterCursor","getWrapperElement","match","matching","dir","strict","getTokenTypeAt","found","scanForBracket","from","forward","maxScanLen","maxScanLineLength","maxScanLines","stack","re","bracketRegex","lineEnd","firstLine","lineNo","pop","autoclear","maxHighlightLen","maxHighlightLineLength","marks","markText","ie_lt8","focused","clear","operation","doMatchBrackets","currentlyHighlighted","navigator","userAgent","documentMode","(",")","[","]","{","}","off","defineExtension","oldConfig","14","tagHit","tagOther","doMatchTags","failedTagMatch","somethingSelected","cur","getCursor","range","getViewport","findMatchingTag","matchBothTags","hit","at","open","other","maybeUpdateMatch","toMatchingTag","extendSelection","15","Iter","tagAt","iter","nextLine","prevLine","toTagEnd","gt","lastSlash","lastIndexOf","selfClose","toTagStart","lt","xmlTagStart","lastIndex","exec","toNextTag","toPrevTag","findMatchingClose","startLine","startCh","findMatchingOpen","endLine","endCh","nameStartChar","RegExp","registerHelper","openTag","startPos","endPos","cmp","here","findEnclosingTag","16","clearActiveLines","activeLines","removeLineClass","WRAP_CLASS","BACK_CLASS","GUTT_CLASS","updateActiveLines","active","option","nonEmpty","getLineHandleVisualStart","sameArray","addLineClass","selectionChange","17","global","factory","classTest","cls","removeChildren","count","childNodes","removeChild","firstChild","removeChildrenAndAdd","parent","appendChild","cssText","createTextNode","eltP","contains","child","nodeType","host","activeElt","activeElement","shadowRoot","addClass","node","current","joinClasses","as","split","args","arguments","apply","copyObj","obj","overwrite","hasOwnProperty","countColumn","tabSize","startIndex","startValue","search","nextTab","array","findColumn","goal","col","skipped","spaceStr","spaceStrs","lst","arr","out","nothing","createObj","base","props","inst","create","isWordCharBasic","nonASCIISingleCaseWordChar","isWordChar","helper","source","isEmpty","isExtendingChar","charCodeAt","extendingChars","skipExtendingChars","str","findFirst","pred","midF","mid","ceil","floor","doc","first","size","chunk","lines","children","sz","chunkSize","getBetween","getLines","updateLineHeight","height","diff","no","lineAtHeight","h","outer","i$1","lh","isLine","lineNumberFor","String","lineNumberFormatter","firstLineNumber","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","last","linelen","clipToLen","clipPosArray","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","change","full","oldFirst","markedSpans","oldLast","isInsert","nw","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","startsBefore","markedSpansAfter","sameLine","offset","span$1","clearEmptySpans","newMarkers","gapMarkers","gap","i$2","i$3","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","find","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sawCollapsedSpans","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","conflictingCollapsedRange","lineNo$$1","visualLine","merged","visualLineNo","lineN","vis","visualLineEndNo","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","p","lineLength","len","found$1","findMaxLine","d","display","maxLine","maxLineLength","maxLineChanged","getBidiPartAt","order","bidiOther","getOrder","direction","bidiOrdering","getHandlers","emitter","_handlers","noHandlers","detachEvent","map$$1","concat","handlers","signalDOMEvent","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","set","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","mac","ctrlKey","zeroWidthElement","measure","zwspSupported","offsetHeight","offsetWidth","ie","ie_version","hasBadBidiRects","badBidiRects","txt","r0","getBoundingClientRect","r1","right","resolveMode","spec","mimeModes","mfactory","modes","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","startState","a1","a2","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","baseTokens","overlays","i_end","opaque","baseTokenPos","styles","classes","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","result","stateAfter","save","styleClasses","highlightFrontier","modeFrontier","precise","Context","minindent","minline","lim","after","SavedContext","lookAhead","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","startAt","stream","StringStream","callBlankLine","eol","readToken","blankLine","token","takeToken","asArray","tokens","Token","extractLineClasses","output","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","cleanUpLine","interpretTokenStyle","cache","styleToClassCacheWithMode","styleToClassCache","buildLineContent","lineView","webkit","builder","pre","trailingSpace","splitSpaces","rest","addToken","buildToken","startStyle","endStyle","css","part","buildTokenBadBidi","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","Infinity","foundBookmarks","endStyles","j","j$1","j$2","buildCollapsedSpan","upto","tokenText","insertLineContent","externalMeasured","maps","caches","lastChild","defaultSpecialCharPlaceholder","toString","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","ignoreWidget","widget","input","needsContentAttribute","setUneditable","LineView","visualLineContinued","buildViewArray","nextPos","signalLater","operationGroup","delayedCallbacks","orphanDelayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","built","getLineContent","replaceChild","updateLineClasses","updateLineText","updateLineGutter","alignable","insertLineWidgets","updateLineWidgets","ensureLineWrapped","zIndex","ext","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutters","gutterWidth","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","positionLineWidget","above","widgetHeight","parentStyle","wrapper","eventInWidget","getAttribute","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","parseInt","paddingRight","isNaN","scrollGap","scrollerGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","barHeight","mapFromLineView","before","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","ensureLineHeights","place","nodeAndOffsetInLineMap","collapse","coverStart","coverEnd","getUsefulRect","screen","logicalXDPI","deviceXDPI","badZoomedRects","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","chrome","android","pageXOffset","scrollLeft","pageScrollY","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","invert","level","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","widgetHeight$$1","begin","ltr","_lineNo","ref","wrappedLineExtent","closestDist","endX","dist","boxIsAfter","baseX","chAround","boxAround","box","atLeft","atStart","coordsCharInner","mergedPos","wrappedLineExtentChar","textHeight","measureText","clientLeft","offsetLeft","compensateForHScroll","estimateHeight","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","round","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","selection","primIndex","range$$1","showCursorWhenSelecting","drawSelectionCursor","add","fragment","rightSide","drawForLine","fromArg","toArg","wrapX","side","extent","lineLen","iterateBidiSections","fromPos","toPos","openStart","openEnd","openLeft","docLTR","openRight","leftSide","topLeft","topRight","botLeft","botRight","cmpCoords","padding","sizerWidth","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","drawSelectionRange","cursor","cursorHeight","otherCursor","restartBlink","clearInterval","blinker","cursorDiv","visibility","cursorBlinkRate","setInterval","ensureFocus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","reset","receivedFocus","rmClass","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","alignHorizontally","alignWidgets","comp","gutterW","align","maybeUpdateLineNumberWidth","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","updateGutterSpace","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","gecko","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","measureForScrollbars","docH","viewHeight","viewWidth","barLeft","docHeight","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","update","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","initScrollbars","scrollbarModel","scrollbarStyle","axis","startOperation","viewChanged","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","nextOpId","op","ops","ownsGroup","pushOperation","endOperation","endCb","group","callbacks","fireCallbacksForOps","finishOperation","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","mustUpdate","DisplayUpdate","endOperation_R1","updatedDisplay","updateDisplayIfNeeded","endOperation_W1","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","endOperation_R2","minWidth","takeFocus","setDocumentHeight","endOperation_W2","i$4","postUpdateDisplay","wheelStartX","wheelStartY","limit","changed","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","doScroll","phantom","scrollNode","scrollIntoView","maybeScrollWindow","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","endOperation_finish","endOperations","runInOp","methodOp","docMethodOp","regChange","lendiff","updateLineNumbers","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","time","highlight","highlightWorker","Date","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","editorIsHidden","force","visible","renderedView","viewportMargin","different","lastWrapHeight","wrapperHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","getSelection","anchorNode","extend","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","createRange","setEnd","removeAllRanges","addRange","restoreSelection","selectionDiv","minHeight","oldDisplayWidth","reportedViewFrom","reportedViewTo","updateGutters","specs","gElt","setGuttersForLineNumbers","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","wheelPixelsPerUnit","onScrollWheel","scroll","canScrollX","canScrollY","presto","pixels","wheelSamples","wheelDX","wheelDY","movedX","movedY","sample","normalizeSelection","prim","inv","Range","Selection","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","updateLine","linesFor","Line","lastText","lastSpans","nlines","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","History","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","history","origin","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","equals","existing","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","copy","deepCopy","newChanges","Number","extendRange","posBefore","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","atomic","near","movePos","far","cantEdit","selectAll","sel_dontScroll","filterChange","canceled","cancel","makeChange","ignoreReadOnly","suppressEdits","sawReadOnlySpans","mark","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","antiChanges","returned","v","shiftDoc","distance","removed","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","assign","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","adjustScrollWhenAboveVisible","cloneNode","isParent","SharedTextMarker","markTextShared","TextMarker","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","nextMarkerId","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","onDrop","clearDragCursor","lastDrop","files","dataTransfer","isReadOnly","FileReader","File","read","loadFile","file","allowDropFileTypes","reader","onload","lineSeparator","readAsText","draggingText","text$1","getData","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","ensureGlobalHandlers","globalsRegistered","resizeTimer","onResize","registerGlobalHandlers","setSize","normalizeKeyName","alt","ctrl","cmd","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","keyNames","addModifierNames","noShift","altKey","flipCtrlCmd","metaKey","shiftKey","keyName","altGraphKey","keyMap","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","prep","targetTop","lineStart","visual","visualLineEnd","lineStartSmart","firstNonWS","inWS","doHandleBinding","bound","dropShift","ensurePolled","prevShift","dispatchKey","seq","keySeq","stopSeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","handled","lastStoppedKey","hasCopyEvent","up","showCrossHair","onKeyUp","onKeyPress","charCode","fromCharCode","handleCharBinding","onMouseDown","activeTouch","supportsTouch","draggable","clickInGutter","repeat","now","lastDoubleClick","compare","lastClick","PastClick","clickRepeat","selectingText","handleMappedButton","contained","behavior","unit","chromeOS","addNew","moveOnDrag","configureMouse","dragDrop","dragAndDrop","moved","dragEnd","mouseMove","dragStart","e2","leftButtonStartDrag","extendTo","lastPos","startCol","posCol","leftPos","startSel","ourIndex","oldRange","ourRange","rangeForUnit","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","sel_mouse","curCount","counter","editorSize","move","leftButtonSelect","leftButtonDown","captureRightClick","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","g","contextMenuInGutter","themeChanged","theme","guttersChanged","dragDropChanged","funcs","dragFunctions","toggle","enter","over","leave","drop","wrappingChanged","CodeMirror$1","this$1","defaults","Doc","inputStyles","inputStyle","mobile","pasteIncoming","cutIncoming","Delayed","autofocus","finishTouch","touchFinished","prevTouch","farAway","touch","word","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","safari","img","src","_top","onDragStart","inp","getField","registerEventHandlers","optionHandlers","finishInit","initHooks","textRendering","how","aggressive","curSpace","indentation","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","setLastCopied","newLastCopied","lastCopied","applyTextInput","inserted","deleted","paste","textLines","splitLinesAuto","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","getRange","disableBrowserMagic","spellcheck","hiddenTextarea","te","div","ios","border","findPosH","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","moveInStorageOrder","searchInVisualLine","getRes","res","nextCh","moveVisually","findNextLine","origDir","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","posToDOM","badPos","bad","domToPos","lineNode","textNode","topNode","curNode","nodeValue","textContent","previousSibling","dist$1","locateNodeInLineView","platform","ie_upto10","ie_11up","edge","qtwebkit","vendor","mac_geMountainLion","windows","presto_version","endNode","setStart","createTextRange","moveToElementText","moveEnd","moveStart","selectInput","selectionStart","selectionEnd","_e","ms","sel_move","charType","lowTypes","arabicTypes","BidiSpan","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","outerType","types","type$1","prev$1","type$2","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","i$7","nstart","reverse","attachEvent","nl","rt","ownerDocument","parentElement","compareEndPoints","oncopy","lineOracle","lastColumnPos","lastColumnValue","sol","peek","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","pattern","consume","caseInsensitive","cased","hideFirstChars","oracle","baseToken","maxLookAhead","NativeScrollbars","vert","horiz","checkedZeroWidth","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","delay","maybeDisable","elementFromPoint","NullScrollbars","native","null","there","removeInner","insertInner","iterN","oldHeight","remaining","leaf","maybeSpill","me","sibling","myIndex","used","LineWidget","oldH","withOp","dHeight","nextDocId","lineSep","cleanGeneration","constructor","setValue","getLineNumber","lineCount","setCursor","extendSelectionsBy","addSelection","getSelections","dup","newSel","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","splitIds","iterLinkedDocs","getEditor","setDirection","directionChanged","eachLine","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","127","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","Ctrl-O","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","goLineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","openLine","toggleOverwrite","defineInitHook","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","poll","pollSelection","pollInterval","scan","isInGutter","triggerOnKeyDown","pollContent","fromIndex","fromNode","toNode","toIndex","newText","closing","addText","walk","cmText","markerID","recognizeMarker","isBlock","nodeName","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","prepareCopyCut","textarea","fastPoll","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","prepareSelectAllHack","extval","rehide","oldWrapperCSS","oldCSS","detectingSelectAll","resetSelectionOnContextMenu","wrapperBox","oldScrollY","scrollY","scrollTo","mouseup","deflt","notOnInit","newBreaks","getInputField","detach","attach","integer","tabIndex","defineOptions","setOption","getDoc","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getLineTokens","getHelpers","_global","getStateAfter","defaultTextHeight","defaultCharWidth","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","getScrollerElement","getGutterElement","registerGlobalHelper","predicate","addEditorMethods","dontDelegate","method","contenteditable","defineMode","dependencies","defineMIME","mime","func","defineDocExtension","tabindex","realSubmit","leaveSubmitMethodAlone","wrappedSubmit","getTextArea","toTextArea","cmpPos","addLegacyProps","version","keySet","tokenCComment","maybeEnd","tokenize","parserConfig","ret","tp","tokenString","quote","escaped","tokenParenthesized","pushContext","popContext","pass","states","popAndPass","wordAsValue","valueKeywords","colorKeywords","inline","propertyKeywords","tokenHooks","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","allowNested","lineComment","supportsAtComponent","stateArg","block","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","blockCommentStart","blockCommentEnd","blockCommentContinue","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","colorKeywords_","valueKeywords_","allWords","/",":","$","#","@","&","getAttrValue","attr","regexp","attrRegexpCache","getAttrRegexp","getTagRegexp","anchored","addTags","defaultTags","script","htmlState","tags","inTag","tagInfo","tagText","findMatchingMode","endTagA","endTag","localState","localMode","pat","maybeBackup","multilineTagIndentFactor","multilineTagIndentPastTag","configTags","configScript","scriptTypes","matches","local","../css/css","../javascript/javascript","../xml/xml","cont","tokenBase","jsonldMode","isJsonldKeyword","tokenComment","expressionAllowed","inSet","readRegexp","tokenQuasi","isOperatorChar","lexical","wordRE","lastType","keywords","propertyIsEnumerable","kw","findFatArrow","fatArrowAt","arrow","isTS","depth","sawSomething","bracket","brackets","JSLexical","inScope","varname","localVars","vars","cc","inList","marked","globalVars","pushcontext","defaultVars","popcontext","pushlex","lex","poplex","expect","wanted","exp","statement","vardef","parenExpr","maybeexpression","maybeelse","functiondef","forspec","typeexpr","maybelabel","expression","funarg","afterExport","afterImport","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","atomicTypes","classExpression","arrayLiteral","contCommasep","objprop","quasi","_","maybeTypeArgs","maybeTarget","expr","property","continueQuasi","getterSetter","afterprop","what","sep","proceed","maybetype","mayberettype","isKW","afterType","typeprop","typearg","maybeReturnType","typeparam","maybeTypeDefault","maybeAssign","vardefCont","proppattern","_type","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","statementIndent","jsonld","jsonMode","json","typescript","wordCharacters","A","B","C","D","operator","atom","jsKeywords","if","while","with","else","do","try","finally","return","break","continue","new","delete","void","throw","debugger","var","const","let","function","catch","for","switch","case","default","in","typeof","instanceof","true","false","super","yield","export","import","extends","await","tsKeywords","interface","implements","namespace","private","protected","abstract","readonly","boolean","any","variable","jsonld-keyword","basecolumn","parseJS","firstChar","isContinuedStatement","doubleIndentSwitch","closeBrackets","skipExpression","21","htmlConfig","autoSelfClosers","area","br","command","embed","frame","hr","keygen","meta","param","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","tr","contextGrabbers","dt","address","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","editorConf","config_","inText","chain","parser","inBlock","doctype","baseState","tagStart","closure","isInAttribute","inAttribute","stringStartCol","terminator","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","setStyle","attrState","matchClosing","closeState","closeStateErr","attrEqState","startOfLine","noIndent","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","skipAttribute","22","html_source","multi_parser","indent_size","indent_character","max_char","brace_style","unformatted","indent_char","current_mode","parentcount","parent1","tag_type","token_text","last_token","last_text","token_type","Utils","whitespace","single_token","extra_liners","in_array","get_content","input_char","line_char_count","indent_level","indent_string","get_contents_to","reg_match","reg_array","end_script","substring","record_tag","retrieve_tag","temp_parent","get_tag","tag_start","tag_end","get_unformatted","print_newline","tag_index","tag_complete","tag_check","comment","unindent","delimiter","orig_tag","get_token","get_full_indent","printer","js_source","ignore","print_token","tag_name","tag_extracted_from_last_output","_beautifier","js_beautify","css_beautify","indent_scripts","script_indent_level","_level","reindent","23","./stream/stream","24","createStream","HALT","updateStream","_state","guid","derive","recover","parents","endStream","unregister","ap","valueOf","toJSON","defineProperties","unregisterStream","initStream","updateState","updateDependency","finalize","mustSync","every","some","combine","fn","streams","valid","dep","notEnded","registerDependency","initDependency","dependent","s1","s2","merge","reducer","seed","newStream","scanMerge","tuples","tuple","idx"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,EAAeC,OAASD,GAAW,WAAY,SAASE,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATV,GAAqBA,EAAQ,IAAIS,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,IAAIQ,YAAYZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAGL,GAAG,OAAOI,EAAEF,GAAIF,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGQ,QAAkD,IAAI,IAA1CL,EAAkB,mBAATX,GAAqBA,EAAgBQ,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAAE,OAAOJ,EAA3c,EAAA,EAAkdgB,GAAG,SAASnB,EAAQoB,EAAOJ,GAC7iB,aA8IAI,EAAOJ,QA5II,SAAcK,EAAGC,GAE3B,IAAIhB,KAuIJ,OArIAA,EAAEiB,SAAW,SAAUC,GAEtB,IAAIC,EAAYD,EAAOE,OAGvB,OAFAD,EAAYA,EAAUE,OAAO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aC,KAAOA,OAEE,IAAXtuF,EAAwBA,EAAgB,QAAIquF,EAC1B,mBAAbjmF,OAAOnI,GAAsB,WAAYmI,OAAOnI,EAC3DmI,OAAOnI,GAAKmzB,OAASi7D,GAD0CjmF,OAAOnI,EAAEmzB,OAASi7D,EA5JrF,aAiKU,KA7ycX","file":"forms-admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){\n'use strict';\n\nvar rows = function rows(m, i18n) {\n\n\tvar r = {};\n\n\tr.showType = function (config) {\n\t\t// ucfirst\n\t\tvar fieldType = config.type();\n\t\tfieldType = fieldType.charAt(0).toUpperCase() + fieldType.slice(1);\n\n\t\treturn m('div', [m(\"label\", i18n.fieldType), m('span', fieldType)]);\n\t};\n\n\tr.label = function (config) {\n\t\t// label row\n\t\treturn m(\"div\", [m(\"label\", i18n.fieldLabel), m(\"input.widefat\", {\n\t\t\ttype: \"text\",\n\t\t\tvalue: config.label(),\n\t\t\tonchange: m.withAttr('value', config.label),\n\t\t\tplaceholder: config.title()\n\t\t})]);\n\t};\n\n\tr.value = function (config) {\n\t\tvar isHidden = config.type() === 'hidden';\n\t\treturn m(\"div\", [m(\"label\", [isHidden ? i18n.value : i18n.initialValue, \" \", isHidden ? '' : m('small', { \"style\": \"float: right; font-weight: normal;\" }, i18n.optional)]), m(\"input.widefat\", {\n\t\t\ttype: \"text\",\n\t\t\tvalue: config.value(),\n\t\t\tonchange: m.withAttr('value', config.value)\n\t\t}), isHidden ? '' : m('p.help', i18n.valueHelp)]);\n\t};\n\n\tr.numberMinMax = function (config) {\n\t\treturn m('div', [m('div.row', [m('div.col.col-3', [m('label', i18n.min), m('input', { type: 'number', onchange: m.withAttr('value', config.min) })]), m('div.col.col-3', [m('label', i18n.max), m('input', { type: 'number', onchange: m.withAttr('value', config.max) })])])]);\n\t};\n\n\tr.isRequired = function (config) {\n\t\tvar inputAtts = {\n\t\t\ttype: 'checkbox',\n\t\t\tchecked: config.required(),\n\t\t\tonchange: m.withAttr('checked', config.required)\n\t\t};\n\t\tvar desc = void 0;\n\n\t\tif (config.forceRequired()) {\n\t\t\tinputAtts.required = true;\n\t\t\tinputAtts.disabled = true;\n\t\t\tdesc = m('p.help', i18n.forceRequired);\n\t\t}\n\n\t\treturn m('div', [m('label.cb-wrap', [m('input', inputAtts), i18n.isFieldRequired]), desc]);\n\t};\n\n\tr.placeholder = function (config) {\n\n\t\treturn m(\"div\", [m(\"label\", [i18n.placeholder, \" \", m('small', { \"style\": \"float: right; font-weight: normal;\" }, i18n.optional)]), m(\"input.widefat\", {\n\t\t\ttype: \"text\",\n\t\t\tvalue: config.placeholder(),\n\t\t\tonchange: m.withAttr('value', config.placeholder),\n\t\t\tplaceholder: \"\"\n\t\t}), m(\"p.help\", i18n.placeholderHelp)]);\n\t};\n\n\tr.useParagraphs = function (config) {\n\t\treturn m('div', [m('label.cb-wrap', [m('input', {\n\t\t\ttype: 'checkbox',\n\t\t\tchecked: config.wrap(),\n\t\t\tonchange: m.withAttr('checked', config.wrap)\n\t\t}), i18n.wrapInParagraphTags])]);\n\t};\n\n\tr.choiceType = function (config) {\n\t\tvar options = [m('option', {\n\t\t\tvalue: 'select',\n\t\t\tselected: config.type() === 'select' ? 'selected' : false\n\t\t}, i18n.dropdown), m('option', {\n\t\t\tvalue: 'radio',\n\t\t\tselected: config.type() === 'radio' ? 'selected' : false\n\t\t}, i18n.radioButtons)];\n\n\t\t// only add checkbox choice if field accepts multiple values\n\t\tif (config.acceptsMultipleValues) {\n\t\t\toptions.push(m('option', {\n\t\t\t\tvalue: 'checkbox',\n\t\t\t\tselected: config.type() === 'checkbox' ? 'selected' : false\n\t\t\t}, i18n.checkboxes));\n\t\t}\n\n\t\treturn m('div', [m('label', i18n.choiceType), m('select', {\n\t\t\tvalue: config.type(),\n\t\t\tonchange: m.withAttr('value', config.type)\n\t\t}, options)]);\n\t};\n\n\tr.choices = function (config) {\n\n\t\tvar html = [];\n\t\thtml.push(m('div', [m('label', i18n.choices), m('div.limit-height', [m(\"table\", [\n\n\t\t// table body\n\t\tconfig.choices().map(function (choice, index) {\n\t\t\treturn m('tr', {\n\t\t\t\t'data-id': index\n\t\t\t}, [m('td.cb', m('input', {\n\t\t\t\tname: 'selected',\n\t\t\t\ttype: config.type() === 'checkbox' ? 'checkbox' : 'radio',\n\t\t\t\tonchange: m.withAttr('value', config.selectChoice.bind(config)),\n\t\t\t\tchecked: choice.selected(),\n\t\t\t\tvalue: choice.value(),\n\t\t\t\ttitle: i18n.preselect\n\t\t\t})), m('td.stretch', m('input.widefat', {\n\t\t\t\ttype: 'text',\n\t\t\t\tvalue: choice.label(),\n\t\t\t\tplaceholder: choice.title(),\n\t\t\t\tonchange: m.withAttr('value', choice.label)\n\t\t\t})), m('td', m('span', {\n\t\t\t\t\"title\": i18n.remove,\n\t\t\t\t\"class\": 'dashicons dashicons-no-alt hover-activated',\n\t\t\t\t\"onclick\": function (key) {\n\t\t\t\t\tthis.choices().splice(key, 1);\n\t\t\t\t}.bind(config, index)\n\t\t\t}, ''))]);\n\t\t})]) // end of table\n\t\t]) // end of limit-height div\n\t\t]));\n\n\t\treturn html;\n\t};\n\n\tr.linkToTerms = function (config) {\n\t\t// label row\n\t\treturn m(\"div\", [m(\"label\", i18n.agreeToTermsLink), m(\"input.widefat\", {\n\t\t\ttype: \"text\",\n\t\t\tvalue: config.link,\n\t\t\tonchange: m.withAttr('value', config.link),\n\t\t\tplaceholder: 'https://...'\n\t\t})]);\n\t};\n\treturn r;\n};\n\nmodule.exports = rows;\n\n},{}],2:[function(require,module,exports){\n'use strict';\n\nvar forms = function forms(m, i18n) {\n\tvar forms = {};\n\tvar rows = require('./field-forms-rows.js')(m, i18n);\n\n\t// route to one of the other form configs, default to \"text\"\n\tforms.render = function (config) {\n\n\t\tvar type = config.type();\n\n\t\tif (typeof forms[type] === \"function\") {\n\t\t\treturn forms[type](config);\n\t\t}\n\n\t\tswitch (type) {\n\t\t\tcase 'select':\n\t\t\tcase 'radio':\n\t\t\tcase 'checkbox':\n\t\t\t\treturn forms.choice(config);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// fallback to good old text field\n\t\treturn forms.text(config);\n\t};\n\n\tforms.text = function (config) {\n\t\treturn [rows.label(config), rows.placeholder(config), rows.value(config), rows.isRequired(config), rows.useParagraphs(config)];\n\t};\n\n\tforms.choice = function (config) {\n\t\tvar visibleRows = [rows.label(config), rows.choiceType(config), rows.choices(config)];\n\n\t\tif (config.type() === 'select') {\n\t\t\tvisibleRows.push(rows.placeholder(config));\n\t\t}\n\n\t\tvisibleRows.push(rows.useParagraphs(config));\n\n\t\tif (config.type() === 'select' || config.type() === 'radio') {\n\t\t\tvisibleRows.push(rows.isRequired(config));\n\t\t}\n\n\t\treturn visibleRows;\n\t};\n\n\tforms.hidden = function (config) {\n\t\tconfig.placeholder('');\n\t\tconfig.label('');\n\t\tconfig.wrap(false);\n\n\t\treturn [rows.showType(config), rows.value(config)];\n\t};\n\n\tforms.submit = function (config) {\n\t\tconfig.label('');\n\t\tconfig.placeholder('');\n\n\t\treturn [rows.value(config), rows.useParagraphs(config)];\n\t};\n\n\tforms['terms-checkbox'] = function (config) {\n\t\treturn [rows.label(config), rows.linkToTerms(config), rows.isRequired(config), rows.useParagraphs(config)];\n\t};\n\n\tforms.number = function (config) {\n\t\treturn [forms.text(config), rows.numberMinMax(config)];\n\t};\n\n\treturn forms;\n};\n\nmodule.exports = forms;\n\n},{\"./field-forms-rows.js\":1}],3:[function(require,module,exports){\n'use strict';\n\nvar htmlutil = require('html');\n\nvar setAttributes = function setAttributes(vnode) {\n\tif (vnode.dom.checked) {\n\t\tvnode.dom.setAttribute(\"checked\", \"true\");\n\t}\n\n\tif (vnode.dom.value) {\n\t\tvnode.dom.setAttribute('value', vnode.dom.value);\n\t}\n\n\tif (vnode.dom.selected) {\n\t\tvnode.dom.setAttribute(\"selected\", \"true\");\n\t}\n};\n\nvar g = function g(m) {\n\tvar generators = {};\n\n\t/**\n * Generates a <select> field\n * @param config\n * @returns {*}\n */\n\tgenerators.select = function (config) {\n\t\tvar attributes = {\n\t\t\tname: config.name(),\n\t\t\trequired: config.required()\n\t\t};\n\t\tvar hasSelection = false;\n\n\t\tvar options = config.choices().map(function (choice) {\n\n\t\t\tif (choice.selected()) {\n\t\t\t\thasSelection = true;\n\t\t\t}\n\n\t\t\treturn m('option', {\n\t\t\t\tvalue: choice.value() !== choice.label() ? choice.value() : undefined,\n\t\t\t\t\"selected\": choice.selected(),\n\t\t\t\toncreate: setAttributes\n\t\t\t}, choice.label());\n\t\t});\n\n\t\tvar placeholder = config.placeholder();\n\t\tif (placeholder.length > 0) {\n\t\t\toptions.unshift(m('option', {\n\t\t\t\t'disabled': true,\n\t\t\t\t'value': '',\n\t\t\t\t'selected': !hasSelection,\n\t\t\t\toncreate: setAttributes\n\t\t\t}, placeholder));\n\t\t}\n\n\t\treturn m('select', attributes, options);\n\t};\n\n\tgenerators['terms-checkbox'] = function (config) {\n\t\tvar checkbox = [m('input', {\n\t\t\tname: config.name(),\n\t\t\ttype: 'checkbox',\n\t\t\tvalue: config.value(),\n\t\t\trequired: config.required()\n\t\t}), ' ', config.label()];\n\n\t\tvar content = checkbox;\n\n\t\tif (config.link().length > 0) {\n\t\t\tcontent = m('a', { href: config.link(), target: \"_blank\" }, checkbox);\n\t\t}\n\n\t\treturn m('label', content);\n\t};\n\n\t/**\n * Generates a checkbox or radio type input field.\n *\n * @param config\n * @returns {*}\n */\n\tgenerators.checkbox = function (config) {\n\t\tvar fields = config.choices().map(function (choice) {\n\t\t\tvar name = config.name() + (config.type() === 'checkbox' ? '[]' : '');\n\t\t\tvar required = config.required() && config.type() === 'radio';\n\n\t\t\treturn m('label', [m('input', {\n\t\t\t\tname: name,\n\t\t\t\ttype: config.type(),\n\t\t\t\tvalue: choice.value(),\n\t\t\t\tchecked: choice.selected(),\n\t\t\t\trequired: required,\n\t\t\t\toncreate: setAttributes\n\t\t\t}), ' ', m('span', choice.label())]);\n\t\t});\n\n\t\treturn fields;\n\t};\n\tgenerators.radio = generators.checkbox;\n\n\t/**\n * Generates a default field\n *\n * - text, url, number, email, date\n *\n * @param config\n * @returns {*}\n */\n\tgenerators['default'] = function (config) {\n\t\tvar attributes = {\n\t\t\ttype: config.type()\n\t\t};\n\n\t\tif (config.name()) {\n\t\t\tattributes.name = config.name();\n\t\t}\n\n\t\tif (config.min()) {\n\t\t\tattributes.min = config.min();\n\t\t}\n\n\t\tif (config.max()) {\n\t\t\tattributes.max = config.max();\n\t\t}\n\n\t\tif (config.value().length > 0) {\n\t\t\tattributes.value = config.value();\n\t\t}\n\n\t\tif (config.placeholder().length > 0) {\n\t\t\tattributes.placeholder = config.placeholder();\n\t\t}\n\n\t\tattributes.required = config.required();\n\t\tattributes.oncreate = setAttributes;\n\n\t\treturn m('input', attributes);\n\t};\n\n\t/**\n * Generates an HTML string based on a field (config) object\n *\n * @param config\n * @returns {*}\n */\n\tfunction generate(config) {\n\t\tvar label = void 0,\n\t\t field = void 0,\n\t\t htmlTemplate = void 0,\n\t\t html = void 0,\n\t\t vdom = document.createElement('div');\n\n\t\tlabel = config.label().length > 0 && config.showLabel() ? m(\"label\", {}, config.label()) : '';\n\t\tfield = typeof generators[config.type()] === \"function\" ? generators[config.type()](config) : generators['default'](config);\n\t\thtmlTemplate = config.wrap() ? m('p', [label, field]) : [label, field];\n\n\t\t// render in vdom\n\t\tm.render(vdom, htmlTemplate);\n\n\t\t// prettify html\n\t\thtml = htmlutil.prettyPrint(vdom.innerHTML);\n\n\t\treturn html + \"\\n\";\n\t}\n\n\treturn generate;\n};\n\nmodule.exports = g;\n\n},{\"html\":22}],4:[function(require,module,exports){\n'use strict';\n\nvar FieldHelper = function FieldHelper(m, tabs, editor, fields, events, i18n) {\n\t'use strict';\n\n\tvar generate = require('./field-generator.js')(m);\n\tvar overlay = require('./overlay.js')(m, i18n);\n\tvar forms = require('./field-forms.js')(m, i18n);\n\tvar fieldConfig;\n\n\teditor.on('blur', m.redraw);\n\n\t/**\n * Choose a field to open the helper form for\n *\n * @param index\n * @returns {*}\n */\n\tfunction setActiveField(index) {\n\n\t\tfieldConfig = fields.get(index);\n\n\t\t// if this hidden field has choices (hidden groups), glue them together by their label.\n\t\tif (fieldConfig && fieldConfig.choices().length > 0) {\n\t\t\tfieldConfig.value(fieldConfig.choices().map(function (c) {\n\t\t\t\treturn c.label();\n\t\t\t}).join('|'));\n\t\t}\n\n\t\tm.redraw();\n\t}\n\n\t/**\n * Controller\n */\n\tfunction controller() {}\n\n\t/**\n * Create HTML based on current config object\n */\n\tfunction createFieldHTMLAndAddToForm() {\n\n\t\t// generate html\n\t\tvar html = generate(fieldConfig);\n\n\t\t// add to editor\n\t\teditor.insert(html);\n\n\t\t// reset field form\n\t\tsetActiveField('');\n\n\t\t// redraw\n\t\tm.redraw();\n\t}\n\n\t/**\n * View\n * @returns {*}\n */\n\tfunction view() {\n\n\t\t// build DOM for fields choice\n\t\tvar fieldCategories = fields.getCategories();\n\t\tvar availableFields = fields.getAll();\n\n\t\tvar fieldsChoice = m(\"div.available-fields.small-margin\", [m(\"h4\", i18n.chooseField), fieldCategories.map(function (category) {\n\t\t\tvar categoryFields = availableFields.filter(function (f) {\n\t\t\t\treturn f.category === category;\n\t\t\t});\n\n\t\t\tif (!categoryFields.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn m(\"div.tiny-margin\", [m(\"strong\", category),\n\n\t\t\t// render fields\n\t\t\tcategoryFields.map(function (field) {\n\t\t\t\tvar className = \"button\";\n\t\t\t\tif (field.forceRequired()) {\n\t\t\t\t\tclassName += \" is-required\";\n\t\t\t\t}\n\n\t\t\t\tvar inForm = field.inFormContent();\n\t\t\t\tif (inForm !== null) {\n\t\t\t\t\tclassName += \" \" + (inForm ? 'in-form' : 'not-in-form');\n\t\t\t\t}\n\n\t\t\t\treturn m(\"button\", {\n\t\t\t\t\tclassName: className,\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tonclick: m.withAttr(\"value\", setActiveField),\n\t\t\t\t\tvalue: field.index\n\t\t\t\t}, field.title());\n\t\t\t})]);\n\t\t})]);\n\n\t\t// build DOM for overlay\n\t\tvar form = null;\n\t\tif (fieldConfig) {\n\t\t\tform = overlay(\n\t\t\t// field wizard\n\t\t\tm(\"div.field-wizard\", [\n\n\t\t\t//heading\n\t\t\tm(\"h3\", [fieldConfig.title(), fieldConfig.forceRequired() ? m('span.red', '*') : '', fieldConfig.name().length ? m(\"code\", fieldConfig.name()) : '']),\n\n\t\t\t// help text\n\t\t\tfieldConfig.help().length ? m('p', m.trust(fieldConfig.help())) : '',\n\n\t\t\t// actual form\n\t\t\tforms.render(fieldConfig),\n\n\t\t\t// add to form button\n\t\t\tm(\"p\", [m(\"button\", {\n\t\t\t\t\"class\": \"button-primary\",\n\t\t\t\ttype: \"button\",\n\t\t\t\tonkeydown: function onkeydown(e) {\n\t\t\t\t\te = e || window.event;\n\t\t\t\t\tif (e.keyCode == 13) {\n\t\t\t\t\t\tcreateFieldHTMLAndAddToForm();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonclick: createFieldHTMLAndAddToForm\n\t\t\t}, i18n.addToForm)])]), setActiveField);\n\t\t}\n\n\t\treturn [fieldsChoice, form];\n\t}\n\n\t// expose some variables\n\treturn {\n\t\tview: view,\n\t\tcontroller: controller\n\t};\n};\n\nmodule.exports = FieldHelper;\n\n},{\"./field-forms.js\":2,\"./field-generator.js\":3,\"./overlay.js\":10}],5:[function(require,module,exports){\n'use strict';\n\nvar FieldFactory = function FieldFactory(fields, i18n) {\n 'use strict';\n\n /**\n * Array of registered fields\n *\n * @type {Array}\n */\n\n var registeredFields = [];\n\n /**\n * Reset all previously registered fields\n */\n function reset() {\n // clear all of our fields\n registeredFields.forEach(fields.deregister);\n }\n\n /**\n * Helper function to quickly register a field and store it in local scope\n *\n * @param {object} data\n * @param {boolean} sticky\n */\n function register(category, data, sticky) {\n var field = fields.register(category, data);\n\n if (!sticky) {\n registeredFields.push(field);\n }\n }\n\n /**\n * Normalizes the field type which is passed by MailChimp\n *\n * @param type\n * @returns {*}\n */\n function getFieldType(type) {\n\n var map = {\n 'phone': 'tel',\n 'dropdown': 'select',\n 'checkboxes': 'checkbox',\n 'birthday': 'text'\n };\n\n return typeof map[type] !== \"undefined\" ? map[type] : type;\n }\n\n /**\n * Register the various fields for a merge var\n *\n * @param mergeField\n * @returns {boolean}\n */\n function registerMergeField(mergeField) {\n\n var category = i18n.listFields;\n var fieldType = getFieldType(mergeField.field_type);\n\n // name, type, title, value, required, label, placeholder, choices, wrap\n var data = {\n name: mergeField.tag,\n title: mergeField.name,\n required: mergeField.required,\n forceRequired: mergeField.required,\n type: fieldType,\n choices: mergeField.choices,\n acceptsMultipleValues: false // merge fields never accept multiple values.\n };\n\n if (data.type !== 'address') {\n register(category, data, false);\n } else {\n register(category, { name: data.name + '[addr1]', type: 'text', mailchimpType: 'address', title: i18n.streetAddress });\n register(category, { name: data.name + '[city]', type: 'text', mailchimpType: 'address', title: i18n.city });\n register(category, { name: data.name + '[state]', type: 'text', mailchimpType: 'address', title: i18n.state });\n register(category, { name: data.name + '[zip]', type: 'text', mailchimpType: 'address', title: i18n.zip });\n register(category, { name: data.name + '[country]', type: 'select', mailchimpType: 'address', title: i18n.country, choices: mc4wp_vars.countries });\n }\n\n return true;\n }\n\n /**\n * Register a field for a MailChimp grouping\n *\n * @param interestCategory\n */\n function registerInterestCategory(interestCategory) {\n var category = i18n.interestCategories;\n var fieldType = getFieldType(interestCategory.field_type);\n\n var data = {\n title: interestCategory.name,\n name: 'INTERESTS[' + interestCategory.id + ']',\n type: fieldType,\n choices: interestCategory.interests,\n acceptsMultipleValues: fieldType === 'checkbox'\n };\n register(category, data, false);\n }\n\n /**\n * Register all fields belonging to a list\n *\n * @param list\n */\n function registerListFields(list) {\n\n // make sure EMAIL && public fields come first\n list.merge_fields = list.merge_fields.sort(function (a, b) {\n if (a.tag === 'EMAIL' || a.public && !b.public) {\n return -1;\n }\n\n if (!a.public && b.public) {\n return 1;\n }\n\n return 0;\n });\n\n // loop through merge vars\n list.merge_fields.forEach(registerMergeField);\n\n // loop through groupings\n list.interest_categories.forEach(registerInterestCategory);\n }\n\n /**\n * Register all lists fields\n *\n * @param lists\n */\n function registerListsFields(lists) {\n reset();\n lists.forEach(registerListFields);\n }\n\n function registerCustomFields(lists) {\n\n var choices,\n category = i18n.formFields;\n\n // register submit button\n register(category, {\n name: '',\n value: i18n.subscribe,\n type: \"submit\",\n title: i18n.submitButton\n }, true);\n\n // register lists choice field\n choices = {};\n for (var key in lists) {\n choices[lists[key].id] = lists[key].name;\n }\n\n register(category, {\n name: '_mc4wp_lists',\n type: 'checkbox',\n title: i18n.listChoice,\n choices: choices,\n help: i18n.listChoiceDescription,\n acceptsMultipleValues: true\n }, true);\n\n choices = {\n 'subscribe': \"Subscribe\",\n 'unsubscribe': \"Unsubscribe\"\n };\n register(category, {\n name: '_mc4wp_action',\n type: 'radio',\n title: i18n.formAction,\n choices: choices,\n value: 'subscribe',\n help: i18n.formActionDescription\n }, true);\n\n register(category, {\n name: '_mc4wp_agree_to_terms',\n value: 1,\n type: \"terms-checkbox\",\n label: i18n.agreeToTerms,\n title: i18n.agreeToTermsShort,\n showLabel: false,\n required: true\n }, true);\n }\n\n /**\n * Expose some methods\n */\n return {\n 'registerCustomFields': registerCustomFields,\n 'registerListFields': registerListFields,\n 'registerListsFields': registerListsFields\n };\n};\n\nmodule.exports = FieldFactory;\n\n},{}],6:[function(require,module,exports){\n'use strict';\n\nvar prop = require(\"mithril/stream\");\n\nmodule.exports = function (m, events) {\n var timeout;\n var fields = [];\n var categories = [];\n\n /**\n * @internal\n *\n *\n * @param data\n * @constructor\n */\n var Field = function Field(data) {\n this.name = prop(data.name);\n this.title = prop(data.title || data.name);\n this.type = prop(data.type);\n this.mailchimpType = prop(data.mailchimpType || '');\n this.label = prop(data.label || data.title || '');\n this.showLabel = prop(data.showLabel !== undefined ? data.showLabel : true);\n this.value = prop(data.value || '');\n this.placeholder = prop(data.placeholder || '');\n this.required = prop(data.required || false);\n this.forceRequired = prop(data.forceRequired || false);\n this.wrap = prop(data.wrap !== undefined ? data.wrap : true);\n this.min = prop(data.min || null);\n this.max = prop(data.max || null);\n this.help = prop(data.help || '');\n this.choices = prop(data.choices || []);\n this.inFormContent = prop(null);\n this.acceptsMultipleValues = data.acceptsMultipleValues;\n this.link = prop(data.link || '');\n\n this.selectChoice = function (value) {\n var field = this;\n\n this.choices(this.choices().map(function (choice) {\n\n if (choice.value() === value) {\n choice.selected(true);\n } else {\n // only checkboxes allow for multiple selections\n if (field.type() !== 'checkbox') {\n choice.selected(false);\n }\n }\n\n return choice;\n }));\n };\n };\n\n /**\n * @internal\n *\n * @param data\n * @constructor\n */\n var FieldChoice = function FieldChoice(data) {\n this.label = prop(data.label);\n this.title = prop(data.title || data.label);\n this.selected = prop(data.selected || false);\n this.value = prop(data.value || data.label);\n };\n\n /**\n * Creates FieldChoice objects from an (associative) array of data objects\n *\n * @param data\n * @returns {Array}\n */\n function createChoices(data) {\n var choices = [];\n if (typeof data.map === \"function\") {\n choices = data.map(function (choiceLabel) {\n return new FieldChoice({ label: choiceLabel });\n });\n } else {\n choices = Object.keys(data).map(function (key) {\n var choiceLabel = data[key];\n return new FieldChoice({ label: choiceLabel, value: key });\n });\n }\n\n return choices;\n }\n\n /**\n * Factory method\n *\n * @api\n *\n * @param data\n * @returns {Field}\n */\n function register(category, data) {\n\n var field;\n var existingField = getAllWhere('name', data.name).shift();\n\n // a field with the same \"name\" already exists\n if (existingField) {\n\n // update \"required\" status\n if (!existingField.forceRequired() && data.forceRequired) {\n existingField.forceRequired(true);\n }\n\n // bail\n return undefined;\n }\n\n // array of choices given? convert to FieldChoice objects\n if (data.choices) {\n data.choices = createChoices(data.choices);\n\n if (data.value) {\n data.choices = data.choices.map(function (choice) {\n if (choice.value() === data.value) {\n choice.selected(true);\n }\n return choice;\n });\n }\n }\n\n // register category\n if (categories.indexOf(category) < 0) {\n categories.push(category);\n }\n\n // create Field object\n field = new Field(data);\n field.category = category;\n\n // add to array\n fields.push(field);\n\n // redraw view\n timeout && window.clearTimeout(timeout);\n timeout = window.setTimeout(m.redraw, 200);\n\n // trigger event\n events.trigger('fields.change');\n\n return field;\n }\n\n /**\n * @api\n *\n * @param field\n */\n function deregister(field) {\n var index = fields.indexOf(field);\n if (index > -1) {\n delete fields[index];\n m.redraw();\n }\n }\n\n /**\n * Get a field config object\n *\n * @param name\n * @returns {*}\n */\n function get(name) {\n return fields[name];\n }\n\n /**\n * Get all field config objects\n *\n * @returns {Array|*}\n */\n function getAll() {\n // rebuild index property on all fields\n fields = fields.map(function (f, i) {\n f.index = i;\n return f;\n });\n\n return fields;\n }\n\n function getCategories() {\n return categories;\n }\n\n /**\n * Get all fields where a property matches the given value\n *\n * @param searchKey\n * @param searchValue\n * @returns {Array|*}\n */\n function getAllWhere(searchKey, searchValue) {\n return fields.filter(function (field) {\n return field[searchKey]() === searchValue;\n });\n }\n\n /**\n * Exposed methods\n */\n return {\n 'get': get,\n 'getAll': getAll,\n 'getCategories': getCategories,\n 'deregister': deregister,\n 'register': register,\n 'getAllWhere': getAllWhere\n };\n};\n\n},{\"mithril/stream\":23}],7:[function(require,module,exports){\n'use strict';\n\n// load CodeMirror & plugins\n\nvar CodeMirror = require('codemirror');\nrequire('codemirror/mode/xml/xml');\nrequire('codemirror/mode/javascript/javascript');\nrequire('codemirror/mode/css/css');\nrequire('codemirror/mode/htmlmixed/htmlmixed');\nrequire('codemirror/addon/fold/xml-fold.js');\nrequire('codemirror/addon/edit/matchtags.js');\nrequire('codemirror/addon/edit/closetag.js');\nrequire('codemirror/addon/selection/active-line.js');\nrequire('codemirror/addon/edit/matchbrackets.js');\n\n/* variables */\nvar FormEditor = {};\nvar _dom = document.createElement('form');\nvar domDirty = false;\nvar editor;\nvar element = document.getElementById('mc4wp-form-content');\nvar previewFrame = document.getElementById('mc4wp-form-preview');\nvar previewDom;\nvar templateRegex = /\\{[^{}]+\\}/g;\n\n/* functions */\nfunction setPreviewDom() {\n var frameContent = previewFrame.contentDocument || previewFrame.contentWindow.document;\n previewDom = frameContent.querySelector('.mc4wp-form-fields');\n\n if (previewDom) {\n updatePreview();\n }\n}\n\nfunction updatePreview() {\n var markup = FormEditor.getValue();\n\n // replace template tags (twice, to allow for nested tags)\n markup = markup.replace(templateRegex, '').replace(templateRegex, '');\n\n // update dom\n previewDom.innerHTML = markup;\n previewDom.dispatchEvent(new Event('mc4wp-refresh'));\n}\n\nwindow.addEventListener('load', function () {\n CodeMirror.signal(editor, \"change\");\n});\n\n// set domDirty to true everytime the \"change\" event fires (a lot..)\nelement.addEventListener('change', function () {\n domDirty = true;\n updatePreview();\n});\n\nfunction dom() {\n if (domDirty) {\n _dom.innerHTML = FormEditor.getValue().toLowerCase();\n domDirty = false;\n }\n\n return _dom;\n}\n\nFormEditor.getValue = function () {\n return editor ? editor.getValue() : element.value;\n};\n\nFormEditor.query = function (query) {\n return dom().querySelectorAll(query.toLowerCase());\n};\n\nFormEditor.containsField = function (fieldName) {\n return dom().elements.namedItem(fieldName.toLowerCase()) !== null;\n};\n\nFormEditor.insert = function (html) {\n if (editor) {\n editor.replaceSelection(html);\n editor.focus();\n } else {\n element.value += html;\n }\n};\n\nFormEditor.on = function (event, callback) {\n if (editor) {\n // translate \"input\" event for CodeMirror\n event = event === 'input' ? 'changes' : event;\n return editor.on(event, callback);\n }\n\n return element.addEventListener(event, callback);\n};\n\nFormEditor.refresh = function () {\n editor && editor.refresh();\n};\n\n/* bootstrap */\n_dom.innerHTML = element.value.toLowerCase();\n\nif (CodeMirror) {\n editor = CodeMirror.fromTextArea(element, {\n selectionPointer: true,\n mode: \"htmlmixed\",\n htmlMode: true,\n autoCloseTags: true,\n autoRefresh: true,\n styleActiveLine: true,\n matchBrackets: true,\n matchTags: { bothTags: true }\n });\n\n // dispatch regular \"change\" on element event every time editor changes (IE9+ only)\n window.dispatchEvent && editor.on('change', function () {\n if (typeof Event === \"function\") {\n // Create a new 'change' event\n var event = new Event('change', { bubbles: true });\n element.dispatchEvent(event);\n }\n });\n}\n\npreviewFrame.addEventListener('load', setPreviewDom);\nsetPreviewDom.call();\n\n/* exports */\nmodule.exports = FormEditor;\n\n},{\"codemirror\":17,\"codemirror/addon/edit/closetag.js\":12,\"codemirror/addon/edit/matchbrackets.js\":13,\"codemirror/addon/edit/matchtags.js\":14,\"codemirror/addon/fold/xml-fold.js\":15,\"codemirror/addon/selection/active-line.js\":16,\"codemirror/mode/css/css\":18,\"codemirror/mode/htmlmixed/htmlmixed\":19,\"codemirror/mode/javascript/javascript\":20,\"codemirror/mode/xml/xml\":21}],8:[function(require,module,exports){\n'use strict';\n\nvar FormWatcher = function FormWatcher(m, editor, settings, fields, events, helpers) {\n 'use strict';\n\n var requiredFieldsInput = document.getElementById('required-fields');\n\n function updateFields() {\n fields.getAll().forEach(function (field) {\n // don't run for empty field names\n if (field.name().length <= 0) return;\n\n var fieldName = field.name();\n if (field.type() === 'checkbox') {\n fieldName += '[]';\n }\n\n var inForm = editor.containsField(fieldName);\n field.inFormContent(inForm);\n\n // if form contains 1 address field of group, mark all fields in this group as \"required\"\n if (field.mailchimpType() === 'address') {\n field.originalRequiredValue = field.originalRequiredValue === undefined ? field.forceRequired() : field.originalRequiredValue;\n\n // query other fields for this address group\n var nameGroup = field.name().replace(/\\[(\\w+)\\]/g, '');\n if (editor.query('[name^=\"' + nameGroup + '\"]').length > 0) {\n if (field.originalRequiredValue === undefined) {\n field.originalRequiredValue = field.forceRequired();\n }\n field.forceRequired(true);\n } else {\n field.forceRequired(field.originalRequiredValue);\n }\n }\n });\n\n findRequiredFields();\n m.redraw();\n }\n\n function findRequiredFields() {\n\n // query fields required by MailChimp\n var requiredFields = fields.getAllWhere('forceRequired', true).map(function (f) {\n return f.name().toUpperCase().replace(/\\[(\\w+)\\]/g, '.$1');\n });\n\n // query fields in form with [required] attribute\n var requiredFieldElements = editor.query('[required]');\n Array.prototype.forEach.call(requiredFieldElements, function (el) {\n var name = el.name;\n\n // bail if name attr empty or starts with underscore\n if (!name || name.length < 0 || name[0] === '_') {\n return;\n }\n\n // replace array brackets with dot style notation\n name = name.replace(/\\[(\\w+)\\]/g, '.$1');\n\n // replace array-style fields\n name = name.replace(/\\[\\]$/, '');\n\n // uppercase everything before the .\n var pos = name.indexOf('.');\n pos = pos > 0 ? pos : name.length;\n name = name.substr(0, pos).toUpperCase() + name.substr(pos);\n\n // only add field if it's not already in it\n if (requiredFields.indexOf(name) === -1) {\n requiredFields.push(name);\n }\n });\n\n // update meta\n requiredFieldsInput.value = requiredFields.join(',');\n }\n\n // events\n editor.on('change', helpers.debounce(updateFields, 500));\n events.on('fields.change', helpers.debounce(updateFields, 500));\n};\n\nmodule.exports = FormWatcher;\n\n},{}],9:[function(require,module,exports){\n'use strict';\n\nvar notices = {};\n\nfunction show(id, text) {\n notices[id] = text;\n render();\n}\n\nfunction hide(id) {\n delete notices[id];\n render();\n}\n\nfunction render() {\n var html = '';\n for (var key in notices) {\n html += '<div class=\"notice notice-warning inline\"><p>' + notices[key] + '</p></div>';\n }\n\n var container = document.querySelector('.mc4wp-notices');\n if (!container) {\n container = document.createElement('div');\n container.className = 'mc4wp-notices';\n var heading = document.querySelector('h1, h2');\n heading.parentNode.insertBefore(container, heading.nextSibling);\n }\n\n container.innerHTML = html;\n}\n\nfunction init(editor, fields) {\n\n var groupingsNotice = function groupingsNotice() {\n var text = \"Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly.\";\n var formCode = editor.getValue().toLowerCase();\n formCode.indexOf('name=\"groupings') > -1 ? show('deprecated_groupings', text) : hide('deprecated_groupings');\n };\n\n var requiredFieldsNotice = function requiredFieldsNotice() {\n var requiredFields = fields.getAllWhere('forceRequired', true);\n var missingFields = requiredFields.filter(function (f) {\n return !editor.containsField(f.name().toUpperCase());\n });\n\n var text = '<strong>Heads up!</strong> Your form is missing list fields that are required in MailChimp. Either add these fields to your form or mark them as optional in MailChimp.';\n text += \"<br /><ul class=\\\"ul-square\\\" style=\\\"margin-bottom: 0;\\\"><li>\" + missingFields.map(function (f) {\n return f.title();\n }).join('</li><li>') + '</li></ul>';\n\n missingFields.length > 0 ? show('required_fields_missing', text) : hide('required_fields_missing');\n };\n\n // old groupings\n groupingsNotice();\n editor.on('focus', groupingsNotice);\n editor.on('blur', groupingsNotice);\n\n // missing required fields\n requiredFieldsNotice();\n editor.on('blur', requiredFieldsNotice);\n editor.on('focus', requiredFieldsNotice);\n}\n\nmodule.exports = {\n \"init\": init\n};\n\n},{}],10:[function(require,module,exports){\n'use strict';\n\nvar overlay = function overlay(m, i18n) {\n\t'use strict';\n\n\tvar _element = void 0,\n\t _onCloseCallback = void 0;\n\n\tfunction close() {\n\t\tdocument.removeEventListener('keydown', onKeyDown);\n\t\twindow.removeEventListener('resize', position);\n\t\t_onCloseCallback();\n\t}\n\n\tfunction onKeyDown(e) {\n\t\te = e || window.event;\n\n\t\t// close overlay when pressing ESC\n\t\tif (e.keyCode == 27) {\n\t\t\tclose();\n\t\t}\n\n\t\t// prevent ENTER\n\t\tif (e.keyCode == 13) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tfunction position() {\n\t\tif (!_element) return;\n\n\t\t// fix for window width in IE8\n\t\tvar windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\t\tvar windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n\n\t\tvar marginLeft = (windowWidth - _element.clientWidth - 40) / 2;\n\t\tvar marginTop = (windowHeight - _element.clientHeight - 40) / 2;\n\n\t\t_element.style.left = (marginLeft > 0 ? marginLeft : 0) + \"px\";\n\t\t_element.style.top = (marginTop > 0 ? marginTop : 0) + \"px\";\n\t}\n\n\tfunction storeElementReference(vnode) {\n\t\t_element = vnode.dom;\n\t\tposition();\n\t}\n\n\treturn function (content, onCloseCallback) {\n\t\t_onCloseCallback = onCloseCallback;\n\n\t\tdocument.addEventListener('keydown', onKeyDown);\n\t\twindow.addEventListener('resize', position);\n\n\t\treturn [m('div.overlay-wrap', m(\"div.overlay\", { oncreate: storeElementReference }, [\n\t\t// close icon\n\t\tm('span', {\n\t\t\t\"class\": 'close dashicons dashicons-no',\n\t\t\ttitle: i18n.close,\n\t\t\tonclick: close\n\t\t}), content])), m('div.overlay-background', {\n\t\t\ttitle: i18n.close,\n\t\t\tonclick: close\n\t\t})];\n\t};\n};\n\nmodule.exports = overlay;\n\n},{}],11:[function(require,module,exports){\n'use strict';\n\n// deps\n\nvar i18n = window.mc4wp_forms_i18n;\nvar m = window.mc4wp.deps.mithril;\nvar events = mc4wp.events;\nvar settings = mc4wp.settings;\nvar helpers = mc4wp.helpers;\n\nvar tabs = mc4wp.tabs;\nvar FormWatcher = require('./admin/form-watcher.js');\nvar FormEditor = require('./admin/form-editor.js');\nvar FieldHelper = require('./admin/field-helper.js');\nvar FieldsFactory = require('./admin/fields-factory.js');\nvar fields = require('./admin/fields.js')(m, events);\n\n// vars\nvar editor = window.formEditor = FormEditor;\nvar watcher = new FormWatcher(m, formEditor, settings, fields, events, helpers);\nvar fieldHelper = new FieldHelper(m, tabs, formEditor, fields, events, i18n);\nvar notices = require('./admin/notices');\n\n// mount field helper on element\nm.mount(document.getElementById('mc4wp-field-wizard'), fieldHelper);\n\n// register fields and redraw screen in 2 seconds (fixes IE8 bug)\nvar fieldsFactory = new FieldsFactory(fields, i18n);\nevents.on('selectedLists.change', fieldsFactory.registerListsFields);\nfieldsFactory.registerListsFields(settings.getSelectedLists());\nfieldsFactory.registerCustomFields(mc4wp_vars.mailchimp.lists);\n\nwindow.setTimeout(function () {\n m.redraw();\n}, 2000);\n\n// init notices\nnotices.init(editor, fields);\n\n// expose some methods\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.forms = window.mc4wp.forms || {};\nwindow.mc4wp.forms.editor = editor;\nwindow.mc4wp.forms.fields = fields;\n\n},{\"./admin/field-helper.js\":4,\"./admin/fields-factory.js\":5,\"./admin/fields.js\":6,\"./admin/form-editor.js\":7,\"./admin/form-watcher.js\":8,\"./admin/notices\":9}],12:[function(require,module,exports){\n// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Tag-closer extension for CodeMirror.\n *\n * This extension adds an \"autoCloseTags\" option that can be set to\n * either true to get the default behavior, or an object to further\n * configure its behavior.\n *\n * These are supported options:\n *\n * `whenClosing` (default true)\n * Whether to autoclose when the '/' of a closing tag is typed.\n * `whenOpening` (default true)\n * Whether to autoclose the tag when the final '>' of an opening\n * tag is typed.\n * `dontCloseTags` (default is empty tags for HTML, none for XML)\n * An array of tag names that should not be autoclosed.\n * `indentTags` (default is block tags for HTML, none for XML)\n * An array of tag names that should, when opened, cause a\n * blank line to be added inside the tag, and the blank line and\n * closing line to be indented.\n *\n * See demos/closetag.html for a usage example.\n */\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../fold/xml-fold\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../fold/xml-fold\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n CodeMirror.defineOption(\"autoCloseTags\", false, function(cm, val, old) {\n if (old != CodeMirror.Init && old)\n cm.removeKeyMap(\"autoCloseTags\");\n if (!val) return;\n var map = {name: \"autoCloseTags\"};\n if (typeof val != \"object\" || val.whenClosing)\n map[\"'/'\"] = function(cm) { return autoCloseSlash(cm); };\n if (typeof val != \"object\" || val.whenOpening)\n map[\"'>'\"] = function(cm) { return autoCloseGT(cm); };\n cm.addKeyMap(map);\n });\n\n var htmlDontClose = [\"area\", \"base\", \"br\", \"col\", \"command\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"param\",\n \"source\", \"track\", \"wbr\"];\n var htmlIndent = [\"applet\", \"blockquote\", \"body\", \"button\", \"div\", \"dl\", \"fieldset\", \"form\", \"frameset\", \"h1\", \"h2\", \"h3\", \"h4\",\n \"h5\", \"h6\", \"head\", \"html\", \"iframe\", \"layer\", \"legend\", \"object\", \"ol\", \"p\", \"select\", \"table\", \"ul\"];\n\n function autoCloseGT(cm) {\n if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n var ranges = cm.listSelections(), replacements = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n if (inner.mode.name != \"xml\" || !state.tagName) return CodeMirror.Pass;\n\n var opt = cm.getOption(\"autoCloseTags\"), html = inner.mode.configuration == \"html\";\n var dontCloseTags = (typeof opt == \"object\" && opt.dontCloseTags) || (html && htmlDontClose);\n var indentTags = (typeof opt == \"object\" && opt.indentTags) || (html && htmlIndent);\n\n var tagName = state.tagName;\n if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n var lowerTagName = tagName.toLowerCase();\n // Don't process the '>' at the end of an end-tag or self-closing tag\n if (!tagName ||\n tok.type == \"string\" && (tok.end != pos.ch || !/[\\\"\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n tok.type == \"tag\" && state.type == \"closeTag\" ||\n tok.string.indexOf(\"/\") == (tok.string.length - 1) || // match something like <someTagName />\n dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n closingTagExists(cm, tagName, pos, state, true))\n return CodeMirror.Pass;\n\n var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n replacements[i] = {indent: indent,\n text: \">\" + (indent ? \"\\n\\n\" : \"\") + \"</\" + tagName + \">\",\n newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};\n }\n\n for (var i = ranges.length - 1; i >= 0; i--) {\n var info = replacements[i];\n cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, \"+insert\");\n var sel = cm.listSelections().slice(0);\n sel[i] = {head: info.newPos, anchor: info.newPos};\n cm.setSelections(sel);\n if (info.indent) {\n cm.indentLine(info.newPos.line, null, true);\n cm.indentLine(info.newPos.line + 1, null, true);\n }\n }\n }\n\n function autoCloseCurrent(cm, typingSlash) {\n var ranges = cm.listSelections(), replacements = [];\n var head = typingSlash ? \"/\" : \"</\";\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n if (typingSlash && (tok.type == \"string\" || tok.string.charAt(0) != \"<\" ||\n tok.start != pos.ch - 1))\n return CodeMirror.Pass;\n // Kludge to get around the fact that we are not in XML mode\n // when completing in JS/CSS snippet in htmlmixed mode. Does not\n // work for other XML embedded languages (there is no general\n // way to go from a mixed mode to its current XML state).\n var replacement;\n if (inner.mode.name != \"xml\") {\n if (cm.getMode().name == \"htmlmixed\" && inner.mode.name == \"javascript\")\n replacement = head + \"script\";\n else if (cm.getMode().name == \"htmlmixed\" && inner.mode.name == \"css\")\n replacement = head + \"style\";\n else\n return CodeMirror.Pass;\n } else {\n if (!state.context || !state.context.tagName ||\n closingTagExists(cm, state.context.tagName, pos, state))\n return CodeMirror.Pass;\n replacement = head + state.context.tagName;\n }\n if (cm.getLine(pos.line).charAt(tok.end) != \">\") replacement += \">\";\n replacements[i] = replacement;\n }\n cm.replaceSelections(replacements);\n ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++)\n if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)\n cm.indentLine(ranges[i].head.line);\n }\n\n function autoCloseSlash(cm) {\n if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n return autoCloseCurrent(cm, true);\n }\n\n CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };\n\n function indexOf(collection, elt) {\n if (collection.indexOf) return collection.indexOf(elt);\n for (var i = 0, e = collection.length; i < e; ++i)\n if (collection[i] == elt) return i;\n return -1;\n }\n\n // If xml-fold is loaded, we use its functionality to try and verify\n // whether a given tag is actually unclosed.\n function closingTagExists(cm, tagName, pos, state, newTag) {\n if (!CodeMirror.scanForClosingTag) return false;\n var end = Math.min(cm.lastLine() + 1, pos.line + 500);\n var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);\n if (!nextClose || nextClose.tag != tagName) return false;\n var cx = state.context;\n // If the immediate wrapping context contains onCx instances of\n // the same tag, a closing tag only exists if there are at least\n // that many closing tags of that type following.\n for (var onCx = newTag ? 1 : 0; cx && cx.tagName == tagName; cx = cx.prev) ++onCx;\n pos = nextClose.to;\n for (var i = 1; i < onCx; i++) {\n var next = CodeMirror.scanForClosingTag(cm, pos, null, end);\n if (!next || next.tag != tagName) return false;\n pos = next.to;\n }\n return true;\n }\n});\n\n},{\"../../lib/codemirror\":17,\"../fold/xml-fold\":15}],13:[function(require,module,exports){\n// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n (document.documentMode == null || document.documentMode < 8);\n\n var Pos = CodeMirror.Pos;\n\n var matching = {\"(\": \")>\", \")\": \"(<\", \"[\": \"]>\", \"]\": \"[<\", \"{\": \"}>\", \"}\": \"{<\"};\n\n function findMatchingBracket(cm, where, config) {\n var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n var afterCursor = config && config.afterCursor\n if (afterCursor == null)\n afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)\n\n // A cursor is defined as between two characters, but in in vim command mode\n // (i.e. not insert mode), the cursor is visually represented as a\n // highlighted box on top of the 2nd character. Otherwise, we allow matches\n // from before or after the cursor.\n var match = (!afterCursor && pos >= 0 && matching[line.text.charAt(pos)]) ||\n matching[line.text.charAt(++pos)];\n if (!match) return null;\n var dir = match.charAt(1) == \">\" ? 1 : -1;\n if (config && config.strict && (dir > 0) != (pos == where.ch)) return null;\n var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n\n var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);\n if (found == null) return null;\n return {from: Pos(where.line, pos), to: found && found.pos,\n match: found && found.ch == match.charAt(0), forward: dir > 0};\n }\n\n // bracketRegex is used to specify which type of bracket to scan\n // should be a regexp, e.g. /[[\\]]/\n //\n // Note: If \"where\" is on an open bracket, then this bracket is ignored.\n //\n // Returns false when no bracket was found, null when it reached\n // maxScanLines and gave up\n function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }\n\n function matchBrackets(cm, autoclear, config) {\n // Disable brace matching in long lines, since it'll cause hugely slow updates\n var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n var marks = [], ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);\n if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {\n var style = match.match ? \"CodeMirror-matchingbracket\" : \"CodeMirror-nonmatchingbracket\";\n marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n }\n }\n\n if (marks.length) {\n // Kludge to work around the IE bug from issue #1193, where text\n // input stops going to the textare whever this fires.\n if (ie_lt8 && cm.state.focused) cm.focus();\n\n var clear = function() {\n cm.operation(function() {\n for (var i = 0; i < marks.length; i++) marks[i].clear();\n });\n };\n if (autoclear) setTimeout(clear, 800);\n else return clear;\n }\n }\n\n var currentlyHighlighted = null;\n function doMatchBrackets(cm) {\n cm.operation(function() {\n if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n });\n }\n\n CodeMirror.defineOption(\"matchBrackets\", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n cm.off(\"cursorActivity\", doMatchBrackets);\n if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n }\n if (val) {\n cm.state.matchBrackets = typeof val == \"object\" ? val : {};\n cm.on(\"cursorActivity\", doMatchBrackets);\n }\n });\n\n CodeMirror.defineExtension(\"matchBrackets\", function() {matchBrackets(this, true);});\n CodeMirror.defineExtension(\"findMatchingBracket\", function(pos, config, oldConfig){\n // Backwards-compatibility kludge\n if (oldConfig || typeof config == \"boolean\") {\n if (!oldConfig) {\n config = config ? {strict: true} : null\n } else {\n oldConfig.strict = config\n config = oldConfig\n }\n }\n return findMatchingBracket(this, pos, config)\n });\n CodeMirror.defineExtension(\"scanForBracket\", function(pos, dir, style, config){\n return scanForBracket(this, pos, dir, style, config);\n });\n});\n\n},{\"../../lib/codemirror\":17}],14:[function(require,module,exports){\n// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../fold/xml-fold\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../fold/xml-fold\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineOption(\"matchTags\", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n cm.off(\"cursorActivity\", doMatchTags);\n cm.off(\"viewportChange\", maybeUpdateMatch);\n clear(cm);\n }\n if (val) {\n cm.state.matchBothTags = typeof val == \"object\" && val.bothTags;\n cm.on(\"cursorActivity\", doMatchTags);\n cm.on(\"viewportChange\", maybeUpdateMatch);\n doMatchTags(cm);\n }\n });\n\n function clear(cm) {\n if (cm.state.tagHit) cm.state.tagHit.clear();\n if (cm.state.tagOther) cm.state.tagOther.clear();\n cm.state.tagHit = cm.state.tagOther = null;\n }\n\n function doMatchTags(cm) {\n cm.state.failedTagMatch = false;\n cm.operation(function() {\n clear(cm);\n if (cm.somethingSelected()) return;\n var cur = cm.getCursor(), range = cm.getViewport();\n range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);\n var match = CodeMirror.findMatchingTag(cm, cur, range);\n if (!match) return;\n if (cm.state.matchBothTags) {\n var hit = match.at == \"open\" ? match.open : match.close;\n if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: \"CodeMirror-matchingtag\"});\n }\n var other = match.at == \"close\" ? match.open : match.close;\n if (other)\n cm.state.tagOther = cm.markText(other.from, other.to, {className: \"CodeMirror-matchingtag\"});\n else\n cm.state.failedTagMatch = true;\n });\n }\n\n function maybeUpdateMatch(cm) {\n if (cm.state.failedTagMatch) doMatchTags(cm);\n }\n\n CodeMirror.commands.toMatchingTag = function(cm) {\n var found = CodeMirror.findMatchingTag(cm, cm.getCursor());\n if (found) {\n var other = found.at == \"close\" ? found.open : found.close;\n if (other) cm.extendSelection(other.to, other.from);\n }\n };\n});\n\n},{\"../../lib/codemirror\":17,\"../fold/xml-fold\":15}],15:[function(require,module,exports){\n// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var Pos = CodeMirror.Pos;\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }\n\n var nameStartChar = \"A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n var nameChar = nameStartChar + \"\\-\\:\\.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n var xmlTagStart = new RegExp(\"<(/?)([\" + nameStartChar + \"][\" + nameChar + \"]*)\", \"g\");\n\n function Iter(cm, line, ch, range) {\n this.line = line; this.ch = ch;\n this.cm = cm; this.text = cm.getLine(line);\n this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();\n this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();\n }\n\n function tagAt(iter, ch) {\n var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));\n return type && /\\btag\\b/.test(type);\n }\n\n function nextLine(iter) {\n if (iter.line >= iter.max) return;\n iter.ch = 0;\n iter.text = iter.cm.getLine(++iter.line);\n return true;\n }\n function prevLine(iter) {\n if (iter.line <= iter.min) return;\n iter.text = iter.cm.getLine(--iter.line);\n iter.ch = iter.text.length;\n return true;\n }\n\n function toTagEnd(iter) {\n for (;;) {\n var gt = iter.text.indexOf(\">\", iter.ch);\n if (gt == -1) { if (nextLine(iter)) continue; else return; }\n if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }\n var lastSlash = iter.text.lastIndexOf(\"/\", gt);\n var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n iter.ch = gt + 1;\n return selfClose ? \"selfClose\" : \"regular\";\n }\n }\n function toTagStart(iter) {\n for (;;) {\n var lt = iter.ch ? iter.text.lastIndexOf(\"<\", iter.ch - 1) : -1;\n if (lt == -1) { if (prevLine(iter)) continue; else return; }\n if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }\n xmlTagStart.lastIndex = lt;\n iter.ch = lt;\n var match = xmlTagStart.exec(iter.text);\n if (match && match.index == lt) return match;\n }\n }\n\n function toNextTag(iter) {\n for (;;) {\n xmlTagStart.lastIndex = iter.ch;\n var found = xmlTagStart.exec(iter.text);\n if (!found) { if (nextLine(iter)) continue; else return; }\n if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }\n iter.ch = found.index + found[0].length;\n return found;\n }\n }\n function toPrevTag(iter) {\n for (;;) {\n var gt = iter.ch ? iter.text.lastIndexOf(\">\", iter.ch - 1) : -1;\n if (gt == -1) { if (prevLine(iter)) continue; else return; }\n if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }\n var lastSlash = iter.text.lastIndexOf(\"/\", gt);\n var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n iter.ch = gt + 1;\n return selfClose ? \"selfClose\" : \"regular\";\n }\n }\n\n function findMatchingClose(iter, tag) {\n var stack = [];\n for (;;) {\n var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);\n if (!next || !(end = toTagEnd(iter))) return;\n if (end == \"selfClose\") continue;\n if (next[1]) { // closing tag\n for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {\n stack.length = i;\n break;\n }\n if (i < 0 && (!tag || tag == next[2])) return {\n tag: next[2],\n from: Pos(startLine, startCh),\n to: Pos(iter.line, iter.ch)\n };\n } else { // opening tag\n stack.push(next[2]);\n }\n }\n }\n function findMatchingOpen(iter, tag) {\n var stack = [];\n for (;;) {\n var prev = toPrevTag(iter);\n if (!prev) return;\n if (prev == \"selfClose\") { toTagStart(iter); continue; }\n var endLine = iter.line, endCh = iter.ch;\n var start = toTagStart(iter);\n if (!start) return;\n if (start[1]) { // closing tag\n stack.push(start[2]);\n } else { // opening tag\n for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {\n stack.length = i;\n break;\n }\n if (i < 0 && (!tag || tag == start[2])) return {\n tag: start[2],\n from: Pos(iter.line, iter.ch),\n to: Pos(endLine, endCh)\n };\n }\n }\n }\n\n CodeMirror.registerHelper(\"fold\", \"xml\", function(cm, start) {\n var iter = new Iter(cm, start.line, 0);\n for (;;) {\n var openTag = toNextTag(iter), end;\n if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;\n if (!openTag[1] && end != \"selfClose\") {\n var startPos = Pos(iter.line, iter.ch);\n var endPos = findMatchingClose(iter, openTag[2]);\n return endPos && {from: startPos, to: endPos.from};\n }\n }\n });\n CodeMirror.findMatchingTag = function(cm, pos, range) {\n var iter = new Iter(cm, pos.line, pos.ch, range);\n if (iter.text.indexOf(\">\") == -1 && iter.text.indexOf(\"<\") == -1) return;\n var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n var start = end && toTagStart(iter);\n if (!end || !start || cmp(iter, pos) > 0) return;\n var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n if (end == \"selfClose\") return {open: here, close: null, at: \"open\"};\n\n if (start[1]) { // closing tag\n return {open: findMatchingOpen(iter, start[2]), close: here, at: \"close\"};\n } else { // opening tag\n iter = new Iter(cm, to.line, to.ch, range);\n return {open: here, close: findMatchingClose(iter, start[2]), at: \"open\"};\n }\n };\n\n CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {\n var iter = new Iter(cm, pos.line, pos.ch, range);\n for (;;) {\n var open = findMatchingOpen(iter, tag);\n if (!open) break;\n var forward = new Iter(cm, pos.line, pos.ch, range);\n var close = findMatchingClose(forward, open.tag);\n if (close) return {open: open, close: close};\n }\n };\n\n // Used by addon/edit/closetag.js\n CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n return findMatchingClose(iter, name);\n };\n});\n\n},{\"../../lib/codemirror\":17}],16:[function(require,module,exports){\n// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n var WRAP_CLASS = \"CodeMirror-activeline\";\n var BACK_CLASS = \"CodeMirror-activeline-background\";\n var GUTT_CLASS = \"CodeMirror-activeline-gutter\";\n\n CodeMirror.defineOption(\"styleActiveLine\", false, function(cm, val, old) {\n var prev = old == CodeMirror.Init ? false : old;\n if (val == prev) return\n if (prev) {\n cm.off(\"beforeSelectionChange\", selectionChange);\n clearActiveLines(cm);\n delete cm.state.activeLines;\n }\n if (val) {\n cm.state.activeLines = [];\n updateActiveLines(cm, cm.listSelections());\n cm.on(\"beforeSelectionChange\", selectionChange);\n }\n });\n\n function clearActiveLines(cm) {\n for (var i = 0; i < cm.state.activeLines.length; i++) {\n cm.removeLineClass(cm.state.activeLines[i], \"wrap\", WRAP_CLASS);\n cm.removeLineClass(cm.state.activeLines[i], \"background\", BACK_CLASS);\n cm.removeLineClass(cm.state.activeLines[i], \"gutter\", GUTT_CLASS);\n }\n }\n\n function sameArray(a, b) {\n if (a.length != b.length) return false;\n for (var i = 0; i < a.length; i++)\n if (a[i] != b[i]) return false;\n return true;\n }\n\n function updateActiveLines(cm, ranges) {\n var active = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n var option = cm.getOption(\"styleActiveLine\");\n if (typeof option == \"object\" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())\n continue\n var line = cm.getLineHandleVisualStart(range.head.line);\n if (active[active.length - 1] != line) active.push(line);\n }\n if (sameArray(cm.state.activeLines, active)) return;\n cm.operation(function() {\n clearActiveLines(cm);\n for (var i = 0; i < active.length; i++) {\n cm.addLineClass(active[i], \"wrap\", WRAP_CLASS);\n cm.addLineClass(active[i], \"background\", BACK_CLASS);\n cm.addLineClass(active[i], \"gutter\", GUTT_CLASS);\n }\n cm.state.activeLines = active;\n });\n }\n\n function selectionChange(cm, sel) {\n updateActiveLines(cm, sel.ranges);\n }\n});\n\n},{\"../../lib/codemirror\":17}],17:[function(require,module,exports){\n// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n// Kludges for bugs and behavior differences that can't be feature\n// detected are enabled based on userAgent etc sniffing.\nvar userAgent = navigator.userAgent;\nvar platform = navigator.platform;\n\nvar gecko = /gecko\\/\\d/i.test(userAgent);\nvar ie_upto10 = /MSIE \\d/.test(userAgent);\nvar ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\nvar edge = /Edge\\/(\\d+)/.exec(userAgent);\nvar ie = ie_upto10 || ie_11up || edge;\nvar ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\nvar webkit = !edge && /WebKit\\//.test(userAgent);\nvar qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\nvar chrome = !edge && /Chrome\\//.test(userAgent);\nvar presto = /Opera\\//.test(userAgent);\nvar safari = /Apple Computer/.test(navigator.vendor);\nvar mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\nvar phantom = /PhantomJS/.test(userAgent);\n\nvar ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\nvar android = /Android/.test(userAgent);\n// This is woefully incomplete. Suggestions for alternative methods welcome.\nvar mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\nvar mac = ios || /Mac/.test(platform);\nvar chromeOS = /\\bCrOS\\b/.test(userAgent);\nvar windows = /win/i.test(platform);\n\nvar presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\nif (presto_version) { presto_version = Number(presto_version[1]); }\nif (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n// Some browsers use the wrong event properties to signal cmd/ctrl on OS X\nvar flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\nvar captureRightClick = gecko || (ie && ie_version >= 9);\n\nfunction classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\nvar rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n};\n\nfunction removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n}\n\nfunction removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n}\n\nfunction elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n}\n// wrapper for elt, which removes the elt from the accessibility tree\nfunction eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n}\n\nvar range;\nif (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n}; }\nelse { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n}; }\n\nfunction contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n}\n\nfunction activeElt() {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var activeElement;\n try {\n activeElement = document.activeElement;\n } catch(e) {\n activeElement = document.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n}\n\nfunction addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n}\nfunction joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n}\n\nvar selectInput = function(node) { node.select(); };\nif (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\nelse if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\nfunction bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n}\n\nfunction copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n}\n\n// Counts the column offset in a string, taking tabs into account.\n// Used mostly to find indentation.\nfunction countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}\n\nvar Delayed = function() {this.id = null;};\nDelayed.prototype.set = function (ms, f) {\n clearTimeout(this.id);\n this.id = setTimeout(f, ms);\n};\n\nfunction indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n}\n\n// Number of pixels added to scroller and sizer to hide scrollbar\nvar scrollerGap = 30;\n\n// Returned or thrown by various protocols to signal 'I'm not\n// handling this'.\nvar Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n// Reused option objects for setSelection & friends\nvar sel_dontScroll = {scroll: false};\nvar sel_mouse = {origin: \"*mouse\"};\nvar sel_move = {origin: \"+move\"};\n\n// The inverse of countColumn -- find the offset that corresponds to\n// a particular column.\nfunction findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}\n\nvar spaceStrs = [\"\"];\nfunction spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n}\n\nfunction lst(arr) { return arr[arr.length-1] }\n\nfunction map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n}\n\nfunction insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n}\n\nfunction nothing() {}\n\nfunction createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n}\n\nvar nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\nfunction isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n}\nfunction isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n}\n\nfunction isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n}\n\n// Extending unicode characters. A series of a non-extending char +\n// any number of extending chars is treated as a single unit as far\n// as editing and measuring is concerned. This is not fully correct,\n// since some scripts/fonts/browsers also treat other configurations\n// of code points as a group.\nvar extendingChars = /[\\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]/;\nfunction isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n// Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\nfunction skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}\n\n// Returns the value from the range [`from`; `to`] that satisfies\n// `pred` and is closest to `from`. Assumes that at least `to`\n// satisfies `pred`. Supports `from` being greater than `to`.\nfunction findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}\n\n// The display handles the DOM integration, both for input reading\n// and content drawing. It holds references to DOM nodes and\n// display-related state.\n\nfunction Display(place, doc, input) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n input.init(d);\n}\n\n// Find the line object corresponding to the given line number.\nfunction getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n}\n\n// Get the part of a document between two positions, as an array of\n// strings.\nfunction getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}\n// Get the lines between from and to, as array of strings.\nfunction getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}\n\n// Update the height of a line, propagating the height change\n// upwards to parent nodes.\nfunction updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}\n\n// Given a line object, find its line number by walking up through\n// its parent links.\nfunction lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}\n\n// Find the line at the given vertical position, using the height\n// information in the document tree.\nfunction lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}\n\nfunction isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\nfunction lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n}\n\n// A Pos instance represents a position within the text.\nfunction Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}\n\n// Compare two positions, return 0 if they are the same, a negative\n// number when a is less, and a positive number otherwise.\nfunction cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\nfunction equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\nfunction copyPos(x) {return Pos(x.line, x.ch)}\nfunction maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\nfunction minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n// Most of the external API clips given positions to make sure they\n// actually exist within the document.\nfunction clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\nfunction clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n}\nfunction clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n}\nfunction clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n}\n\n// Optimize some code when these features are not used.\nvar sawReadOnlySpans = false;\nvar sawCollapsedSpans = false;\n\nfunction seeReadOnlySpans() {\n sawReadOnlySpans = true;\n}\n\nfunction seeCollapsedSpans() {\n sawCollapsedSpans = true;\n}\n\n// TEXTMARKER SPANS\n\nfunction MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n}\n\n// Search an array of spans for a span matching the given marker.\nfunction getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}\n// Remove a span from an array, returning undefined if no spans are\n// left (we don't store arrays for lines without spans).\nfunction removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}\n// Add a span to a line.\nfunction addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}\n\n// Used for the algorithm that adjusts markers for a change in the\n// document. These functions cut an array of spans at a given\n// character position, returning an array of remaining chunks (or\n// undefined if nothing remains).\nfunction markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n}\nfunction markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n}\n\n// Given a change object, compute the new set of marker spans that\n// cover the line in which the change took place. Removes spans\n// entirely within the change, reconnects spans belonging to the\n// same marker that appear on both sides of the change, and cuts off\n// spans partially within the change. Returns an array of span\n// arrays with one element for each line in (after) the change.\nfunction stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}\n\n// Remove spans that are empty and don't have a clearWhenEmpty\n// option of false.\nfunction clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}\n\n// Used to 'clip' out readOnly ranges when making a change.\nfunction removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}\n\n// Connect or disconnect spans from a line.\nfunction detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n}\nfunction attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n}\n\n// Helpers used when computing which overlapping collapsed span\n// counts as the larger one.\nfunction extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\nfunction extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n// Returns a number indicating which of two overlapping collapsed\n// spans is larger (and thus includes the other). Falls back to\n// comparing ids when the spans cover exactly the same range.\nfunction compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}\n\n// Find out whether a line ends or starts in a collapsed span. If\n// so, return the marker for that span.\nfunction collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}\nfunction collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\nfunction collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n// Test whether there exists a collapsed span that partially\n// overlaps (covers the start or end, but not both) of a new span.\n// Such overlap is not allowed.\nfunction conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}\n\n// A visual line is a line as drawn on the screen. Folding, for\n// example, can cause multiple logical lines to appear on the same\n// visual line. This finds the start of the visual line that the\n// given line is part of (usually that is the line itself).\nfunction visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}\n\nfunction visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n}\n\n// Returns an array of logical lines that continue the visual line\n// started by the argument, or undefined if there are no such lines.\nfunction visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}\n\n// Get the line number of the start of the visual line that the\n// given line number is part of.\nfunction visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}\n\n// Get the line number of the start of the next visual line after\n// the given line.\nfunction visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n}\n\n// Compute whether a line is hidden. Lines count as hidden when they\n// are part of a visual line that starts with another line, or when\n// they are entirely covered by collapsed, non-widget span.\nfunction lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}\nfunction lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n}\n\n// Find the height above the given line.\nfunction heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}\n\n// Compute the character length of a line, taking into account\n// collapsed ranges (see markText) that might hide parts, and join\n// other lines onto it.\nfunction lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n}\n\n// Find the longest line in the document.\nfunction findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n}\n\n// BIDI HELPERS\n\nfunction iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n}\n\nvar bidiOther = null;\nfunction getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n}\n\n// Bidirectional ordering algorithm\n// See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n// that this (partially) implements.\n\n// One-char codes used for character types:\n// L (L): Left-to-Right\n// R (R): Right-to-Left\n// r (AL): Right-to-Left Arabic\n// 1 (EN): European Number\n// + (ES): European Number Separator\n// % (ET): European Number Terminator\n// n (AN): Arabic Number\n// , (CS): Common Number Separator\n// m (NSM): Non-Spacing Mark\n// b (BN): Boundary Neutral\n// s (B): Paragraph Separator\n// t (S): Segment Separator\n// w (WS): Whitespace\n// N (ON): Other Neutrals\n\n// Returns null if characters are ordered as they appear\n// (left-to-right), or an array of sections ({from, to, level}\n// objects) in the order in which they occur visually.\nvar bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n})();\n\n// Get the bidi ordering for the given line (and cache it). Returns\n// false for lines that are fully left-to-right, and an array of\n// BidiSpan objects otherwise.\nfunction getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}\n\n// EVENT HANDLING\n\n// Lightweight event framework. on/off also work on DOM nodes,\n// registering native DOM handlers.\n\nvar noHandlers = [];\n\nvar on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers || (emitter._handlers = {});\n map$$1[type] = (map$$1[type] || noHandlers).concat(f);\n }\n};\n\nfunction getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n}\n\nfunction off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n}\n\nfunction signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n}\n\n// The DOM events that CodeMirror handles can be overridden by\n// registering a (non-DOM) handler on the editor for the event name,\n// and preventDefault-ing the event in that handler.\nfunction signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}\n\nfunction signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n}\n\nfunction hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n}\n\n// Add on and off methods to a constructor's prototype, to make\n// registering events on such objects more convenient.\nfunction eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}\n\n// Due to the fact that we still support jurassic IE versions, some\n// compatibility wrappers are needed.\n\nfunction e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n}\nfunction e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n}\nfunction e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n}\nfunction e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\nfunction e_target(e) {return e.target || e.srcElement}\nfunction e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n}\n\n// Detect drag-and-drop\nvar dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n}();\n\nvar zwspSupported;\nfunction zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n}\n\n// Feature-detect IE's crummy client rect reporting for bidi text\nvar badBidiRects;\nfunction hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n}\n\n// See if \"\".split is the broken IE version, if so, provide an\n// alternative way to split lines.\nvar splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n} : function (string) { return string.split(/\\r\\n?|\\n/); };\n\nvar hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n} : function (te) {\n var range$$1;\n try {range$$1 = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range$$1 || range$$1.parentElement() != te) { return false }\n return range$$1.compareEndPoints(\"StartToEnd\", range$$1) != 0\n};\n\nvar hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n})();\n\nvar badZoomedRects = null;\nfunction hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n}\n\n// Known modes, by name and by MIME\nvar modes = {};\nvar mimeModes = {};\n\n// Extra arguments are stored as the mode's dependencies, which is\n// used by (legacy) mechanisms like loadmode.js to automatically\n// load a mode. (Preferred mechanism is the require/define calls.)\nfunction defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}\n\nfunction defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n}\n\n// Given a MIME type, a {name, ...options} config object, or a name\n// string, return a mode config object.\nfunction resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n}\n\n// Given a mode spec (anything that resolveMode accepts), find and\n// initialize an actual mode object.\nfunction getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}\n\n// This can be used to attach properties to mode objects from\n// outside the actual mode definition.\nvar modeExtensions = {};\nfunction extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n}\n\nfunction copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n}\n\n// Given a mode and a state (for that mode), find the inner mode and\n// state at the position that the state refers to.\nfunction innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}\n\nfunction startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n}\n\n// STRING STREAM\n\n// Fed to the mode parsers, provides helper functions to make\n// parsers more succinct.\n\nvar StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n};\n\nStringStream.prototype.eol = function () {return this.pos >= this.string.length};\nStringStream.prototype.sol = function () {return this.pos == this.lineStart};\nStringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\nStringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n};\nStringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n};\nStringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n};\nStringStream.prototype.eatSpace = function () {\n var this$1 = this;\n\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }\n return this.pos > start\n};\nStringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\nStringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n};\nStringStream.prototype.backUp = function (n) {this.pos -= n;};\nStringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n};\nStringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n};\nStringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n};\nStringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\nStringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n};\nStringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n};\nStringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n};\n\nvar SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n};\n\nvar Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n};\n\nContext.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n};\n\nContext.prototype.baseToken = function (n) {\n var this$1 = this;\n\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this$1.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n};\n\nContext.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n};\n\nContext.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n};\n\nContext.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n};\n\n\n// Compute a style array (an array starting with a mode generation\n// -- for invalidation -- followed by pairs of end positions and\n// style strings), which is used to highlight the tokens on the\n// line.\nfunction highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}\n\nfunction getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n}\n\nfunction getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n}\n\n// Lightweight form of highlight -- proceed over this line and\n// update state, but don't save a style array. Used for lines that\n// aren't currently visible.\nfunction processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}\n\nfunction callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n}\n\nfunction readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n}\n\nvar Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n};\n\n// Utility for getTokenAt and getLineTokens\nfunction takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}\n\nfunction extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n}\n\n// Run the given mode's parser over a line, calling f for each token.\nfunction runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}\n\n// Finds the line to start with when starting a parse. Tries to\n// find a line with a stateAfter, so that it can start with a\n// valid state. If that fails, it returns the line with the\n// smallest indentation, which tends to need the least context to\n// parse correctly.\nfunction findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}\n\nfunction retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n}\n\n// LINE DATA STRUCTURE\n\n// Line objects. These hold state related to a line, including\n// highlighting info (the styles array).\nvar Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n};\n\nLine.prototype.lineNo = function () { return lineNo(this) };\neventMixin(Line);\n\n// Change the content (text, markers) of a line. Automatically\n// invalidates cached information and tries to re-estimate the\n// line's height.\nfunction updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n}\n\n// Detach a line from the document tree and its markers.\nfunction cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n}\n\n// Convert a style as returned by a mode (either null, or a string\n// containing one or more styles) to a CSS style. This is cached,\n// and also looks for line-wide styles.\nvar styleToClassCache = {};\nvar styleToClassCacheWithMode = {};\nfunction interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n}\n\n// Render the DOM representation of the text of a line. Also builds\n// up a 'line map', which points at the DOM nodes that represent\n// specific stretches of text, and is used by the measuring code.\n// The returned object contains the DOM node, this map, and\n// information about line-wide styles that were set by the mode.\nfunction buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: (ie || webkit) && cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n}\n\nfunction defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n}\n\n// Build up the DOM representation for a single token, and add it to\n// the line map. Takes care to render special characters separately.\nfunction buildToken(builder, text, style, startStyle, endStyle, title, css) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (title) { token.title = title; }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n}\n\nfunction splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n}\n\n// Work around nonsense dimensions being reported for stretches of\n// right-to-left text.\nfunction buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, title, css) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, title, css) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n}\n\nfunction buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n}\n\n// Outputs a number of spans to make up a line, taking highlighting\n// and marked text into account.\nfunction insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}\n\n\n// These objects are used to represent the visible (currently drawn)\n// part of the document. A LineView may correspond to multiple\n// logical lines, if those are connected by collapsed ranges.\nfunction LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}\n\n// Create a range of LineView objects for the given lines.\nfunction buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n}\n\nvar operationGroup = null;\n\nfunction pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n}\n\nfunction fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n}\n\nfunction finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n}\n\nvar orphanDelayedCallbacks = null;\n\n// Often, we want to signal events at a point where we are in the\n// middle of some work, but don't want the handler to start calling\n// other methods on the editor, which might be in an inconsistent\n// state or simply not expect any other events to happen.\n// signalLater looks whether there are any handlers, and schedules\n// them to be executed when the last operation ends, or, if no\n// operation is active, when a timeout fires.\nfunction signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n}\n\nfunction fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n}\n\n// When an aspect of a line changes, a string is added to\n// lineView.changes. This updates the relevant part of the line's\n// DOM structure.\nfunction updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n}\n\n// Lines with gutter elements, widgets or a background class need to\n// be wrapped, and have the extra elements added to the wrapper div\nfunction ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n}\n\nfunction updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n}\n\n// Wrapper around buildLineContent which will reuse the structure\n// in display.externalMeasured when possible.\nfunction getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n}\n\n// Redraw the line's text. Interacts with the background and text\n// classes because the mode may output tokens that influence these\n// classes.\nfunction updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n}\n\nfunction updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n}\n\nfunction updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) {\n var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n}\n\nfunction updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (node.className == \"CodeMirror-linewidget\")\n { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n}\n\n// Build a line's DOM representation from scratch\nfunction buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n}\n\n// A lineView may contain multiple logical lines (when merged by\n// collapsed spans). The widgets for all of them need to be drawn.\nfunction insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n}\n\nfunction insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n}\n\nfunction positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n}\n\nfunction widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n}\n\n// Return true when the given mouse event happened in a widget\nfunction eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n}\n\n// POSITION MEASUREMENT\n\nfunction paddingTop(display) {return display.lineSpace.offsetTop}\nfunction paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\nfunction paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n}\n\nfunction scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\nfunction displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n}\nfunction displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n}\n\n// Ensure the lineView.wrapping.heights array is populated. This is\n// an array of bottom offsets for the lines that make up a drawn\n// line. When lineWrapping is on, there might be more than one\n// height.\nfunction ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n}\n\n// Find a line map (mapping character offsets to text nodes) and a\n// measurement cache for the given line number. (A line view might\n// contain multiple lines when collapsed ranges are present.)\nfunction mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n}\n\n// Render a line into the hidden node display.externalMeasured. Used\n// when measurement is needed for a line that's not in the viewport.\nfunction updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n}\n\n// Get a {top, bottom, left, right} box (in line-local coordinates)\n// for a given character.\nfunction measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n}\n\n// Find a line view that corresponds to the given line number.\nfunction findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}\n\n// Measurement can be split in two steps, the set-up work that\n// applies to the whole line, and the measurement of the actual\n// character. Functions like coordsChar, that need to do a lot of\n// measurements in a row, can thus ensure that the set-up work is\n// only done once.\nfunction prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n}\n\n// Given a prepared measurement object, measures the position of an\n// actual character (or fetches it from the cache).\nfunction measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n}\n\nvar nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\nfunction nodeAndOffsetInLineMap(map$$1, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map$$1.length; i += 3) {\n mStart = map$$1[i];\n mEnd = map$$1[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map$$1[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {\n node = map$$1[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {\n node = map$$1[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n}\n\nfunction getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n}\n\nfunction measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n}\n\n// Work around problem with bounding client rects on ranges being\n// returned incorrectly when zoomed on IE10 and below.\nfunction maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n}\n\nfunction clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n}\n\nfunction clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n}\n\nfunction clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n}\n\nfunction pageScrollX() {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n}\nfunction pageScrollY() {\n if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n return window.pageYOffset || (document.documentElement || document.body).scrollTop\n}\n\nfunction widgetTopHeight(lineObj) {\n var height = 0;\n if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)\n { height += widgetHeight(lineObj.widgets[i]); } } }\n return height\n}\n\n// Converts a {top, bottom, left, right} box from line-local\n// coordinates into another coordinate system. Context may be one of\n// \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n// or \"page\".\nfunction intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n}\n\n// Coverts a box from \"div\" coords to another coordinate system.\n// Context may be \"window\", \"page\", \"div\", or \"local\"./null.\nfunction fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}\n\nfunction charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n}\n\n// Returns a box for a given cursor position, which may have an\n// 'other' property containing the position of the secondary cursor\n// on a bidi boundary.\n// A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n// and after `char - 1` in writing order of `char - 1`\n// A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n// and before `char` in writing order of `char`\n// Examples (upper-case letters are RTL, lower-case are LTR):\n// Pos(0, 1, ...)\n// before after\n// ab a|b a|b\n// aB a|B aB|\n// Ab |Ab A|b\n// AB B|A B|A\n// Every position after the last character on a line is considered to stick\n// to the last character on the line.\nfunction cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n}\n\n// Used to cheaply estimate the coordinates for a position. Used for\n// intermediate scroll updates.\nfunction estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n}\n\n// Positions returned by coordsChar contain some extra information.\n// xRel is the relative x position of the input coordinates compared\n// to the found position (so xRel > 0 means the coordinates are to\n// the right of the character position, for example). When outside\n// is true, that means the coordinates lie outside the line's\n// vertical range.\nfunction PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = true; }\n return pos\n}\n\n// Compute the character position closest to the given coordinates.\n// Input must be lineSpace-local (\"div\" coordinate system).\nfunction coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var merged = collapsedSpanAtEnd(lineObj);\n var mergedPos = merged && merged.find(0, true);\n if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))\n { lineN = lineNo(lineObj = mergedPos.to.line); }\n else\n { return found }\n }\n}\n\nfunction wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n}\n\nfunction wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n}\n\n// Returns true if the given side of a box is after the given\n// coordinates, in top-to-bottom, left-to-right order.\nfunction boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n}\n\nfunction coordsCharInner(cm, lineObj, lineNo$$1, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight$$1 = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight$$1; box.bottom += widgetHeight$$1;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top || y >= coords.bottom;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX)\n}\n\nfunction coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n}\n\nfunction coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n}\n\nvar measureText;\n// Compute the default text height.\nfunction textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}\n\n// Compute the default character width.\nfunction charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor]);\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n}\n\n// Do a bulk-read of the DOM positions and sizes needed to draw the\n// view, so that we don't interleave reading and writing to the DOM.\nfunction getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[cm.options.gutters[i]] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n}\n\n// Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n// but using getBoundingClientRect to get a sub-pixel-accurate\n// result.\nfunction compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n}\n\n// Returns a function that estimates the height of a line, to use as\n// first approximation until the line becomes visible (and is thus\n// properly measurable).\nfunction estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}\n\nfunction estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n}\n\n// Given a mouse event, find the corresponding position. If liberal\n// is false, it checks whether a gutter or scrollbar was clicked,\n// and returns null if it was. forRect is used by rectangular\n// selections, and tries to estimate a character position even for\n// coordinates beyond the right of the text.\nfunction posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n}\n\n// Find the view element corresponding to a given line. Return null\n// when the line isn't visible.\nfunction findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n}\n\nfunction updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n}\n\nfunction prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range$$1 = doc.sel.ranges[i];\n if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }\n var collapsed = range$$1.empty();\n if (collapsed || cm.options.showCursorWhenSelecting)\n { drawSelectionCursor(cm, range$$1.head, curFragment); }\n if (!collapsed)\n { drawSelectionRange(cm, range$$1, selFragment); }\n }\n return result\n}\n\n// Draws a cursor for the given range\nfunction drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n}\n\nfunction cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n// Draws the given range as a highlighted selection\nfunction drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}\n\n// Cursor-blinking\nfunction restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\"; },\n cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n}\n\nfunction ensureFocus(cm) {\n if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n}\n\nfunction delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n onBlur(cm);\n } }, 100);\n}\n\nfunction onFocus(cm, e) {\n if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n}\nfunction onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n}\n\n// Read the actual heights of the rendered lines, and update their\n// stored heights to match.\nfunction updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], height = (void 0);\n if (cur.hidden) { continue }\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n }\n var diff = cur.line.height - height;\n if (height < 2) { height = textHeight(display); }\n if (diff > .005 || diff < -.005) {\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n }\n}\n\n// Read and store the height of line widgets associated with the\n// given line.\nfunction updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}\n\n// Compute the lines that are visible in a given viewport (defaults\n// the the current scroll position). viewport may contain top,\n// height, and ensure (see op.scrollToPos) properties.\nfunction visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n}\n\n// Re-align line numbers and gutter marks to compensate for\n// horizontal scrolling.\nfunction alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n}\n\n// Used to ensure that the line number gutter is still the right\n// size for the current document size. Returns true when an update\n// is needed.\nfunction maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm);\n return true\n }\n return false\n}\n\n// SCROLLING THINGS INTO VIEW\n\n// If an editor sits on the top or bottom of the window, partially\n// scrolled out of view, this ensures that the cursor is visible.\nfunction maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n}\n\n// Scroll a given position into view (immediately), verifying that\n// it actually became visible (as line heights are accurately\n// measured, the position of something may 'drift' during drawing).\nfunction scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n}\n\n// Scroll a given set of coordinates into view (immediately).\nfunction scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}\n\n// Calculate a new scroll position needed to scroll the given\n// rectangle into view. Returns an object with scrollTop and\n// scrollLeft properties. When these are undefined, the\n// vertical/horizontal position does not need to be adjusted.\nfunction calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}\n\n// Store a relative adjustment to the scroll position in the current\n// operation (to be applied when the operation finishes).\nfunction addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n}\n\n// Make sure that at the end of the operation the current cursor is\n// shown.\nfunction ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n}\n\nfunction scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n}\n\nfunction scrollToRange(cm, range$$1) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range$$1;\n}\n\n// When an operation has its scrollToPos property set, and another\n// scroll action is applied before the end of the operation, this\n// 'simulates' scrolling that position into view in a cheap way, so\n// that the effect of intermediate scroll commands is not ignored.\nfunction resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}\n\nfunction scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n}\n\n// Sync the scrollable area and scrollbars, ensure the viewport\n// covers the visible area.\nfunction updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n}\n\nfunction setScrollTop(cm, val, forceScroll) {\n val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n}\n\n// Sync scroller and scrollbar, ensure the gutter elements are\n// aligned.\nfunction setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n}\n\n// SCROLLBARS\n\n// Prepare DOM reads needed to update the scrollbars. Done in one\n// shot to minimize update/measure roundtrips.\nfunction measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n}\n\nvar NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n};\n\nNativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n};\n\nNativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n};\n\nNativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n};\n\nNativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n};\n\nNativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.pointerEvents = \"auto\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt$$1 = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt$$1 != bar) { bar.style.pointerEvents = \"none\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n};\n\nNativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n};\n\nvar NullScrollbars = function () {};\n\nNullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\nNullScrollbars.prototype.setScrollLeft = function () {};\nNullScrollbars.prototype.setScrollTop = function () {};\nNullScrollbars.prototype.clear = function () {};\n\nfunction updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n}\n\n// Re-synchronize the fake scrollbars with the actual size of the\n// content.\nfunction updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n}\n\nvar scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\nfunction initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n}\n\n// Operations are used to wrap a series of changes to the editor\n// state in such a way that each change won't have to update the\n// cursor and display (which would be awkward, slow, and\n// error-prone). Instead, display updates are batched and then all\n// combined and executed at once.\n\nvar nextOpId = 0;\n// Start a new operation.\nfunction startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: null, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId // Unique ID\n };\n pushOperation(cm.curOp);\n}\n\n// Finish an operation, updating the display and signalling delayed events\nfunction endOperation(cm) {\n var op = cm.curOp;\n finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n });\n}\n\n// The DOM updates done when an operation finishes are batched so\n// that the minimum number of relayouts are required.\nfunction endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n}\n\nfunction endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n}\n\nfunction endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n}\n\nfunction endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, displ
|
|