Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 4.1.7 |
Comparing to | |
See all releases |
Code changes from version 4.1.6 to 4.1.7
- CHANGELOG.md +18 -0
- assets/js/admin.js +39 -24
- assets/js/admin.min.js +2 -2
- assets/js/admin.min.js.map +1 -1
- assets/js/forms-admin.js +62 -48
- assets/js/forms-admin.min.js +8 -8
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,24 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 4.1.6 - July 31, 2017
|
5 |
|
6 |
**Fixes**
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
|
5 |
+
#### 4.1.7 - September 8, 2017
|
6 |
+
|
7 |
+
**Fixes**
|
8 |
+
|
9 |
+
- Properly escape the return value of `add_query_arg` when it is used in HTML attributes to prevent cross-site scripting. Thanks to [Karim Ouerghemmi of RIPS](https://www.ripstech.com/) for responsibly disclosing.
|
10 |
+
- Now loading integrations after WPML so that String Translations work properly.
|
11 |
+
|
12 |
+
**Additions**
|
13 |
+
|
14 |
+
- Add sign-up integration for WPForms forms.
|
15 |
+
|
16 |
+
**Improvements**
|
17 |
+
|
18 |
+
- Updated internal JS dependencies.
|
19 |
+
- Form tag `{data key="foo.bar"}` now allows you to access nested array values.
|
20 |
+
|
21 |
+
|
22 |
#### 4.1.6 - July 31, 2017
|
23 |
|
24 |
**Fixes**
|
assets/js/admin.js
CHANGED
@@ -497,7 +497,7 @@ function compileSelector(selector) {
|
|
497 |
var attrValue = match[6]
|
498 |
if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\")
|
499 |
if (match[4] === "class") classes.push(attrValue)
|
500 |
-
else attrs[match[4]] = attrValue || true
|
501 |
}
|
502 |
}
|
503 |
if (classes.length > 0) attrs.className = classes.join(" ")
|
@@ -844,8 +844,15 @@ var requestService = _8(window, PromisePolyfill)
|
|
844 |
var coreRenderer = function($window) {
|
845 |
var $doc = $window.document
|
846 |
var $emptyFragment = $doc.createDocumentFragment()
|
|
|
|
|
|
|
|
|
847 |
var onevent
|
848 |
function setEventCallback(callback) {return onevent = callback}
|
|
|
|
|
|
|
849 |
//create
|
850 |
function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {
|
851 |
for (var i = start; i < end; i++) {
|
@@ -902,12 +909,9 @@ var coreRenderer = function($window) {
|
|
902 |
}
|
903 |
function createElement(parent, vnode, hooks, ns, nextSibling) {
|
904 |
var tag = vnode.tag
|
905 |
-
switch (vnode.tag) {
|
906 |
-
case "svg": ns = "http://www.w3.org/2000/svg"; break
|
907 |
-
case "math": ns = "http://www.w3.org/1998/Math/MathML"; break
|
908 |
-
}
|
909 |
var attrs2 = vnode.attrs
|
910 |
var is = attrs2 && attrs2.is
|
|
|
911 |
var element = ns ?
|
912 |
is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
|
913 |
is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)
|
@@ -970,7 +974,7 @@ var coreRenderer = function($window) {
|
|
970 |
//update
|
971 |
function updateNodes(parent, old, vnodes, recycling, hooks, nextSibling, ns) {
|
972 |
if (old === vnodes || old == null && vnodes == null) return
|
973 |
-
else if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling,
|
974 |
else if (vnodes == null) removeNodes(old, 0, old.length, vnodes)
|
975 |
else {
|
976 |
if (old.length === vnodes.length) {
|
@@ -1047,7 +1051,7 @@ var coreRenderer = function($window) {
|
|
1047 |
if (movable.dom != null) nextSibling = movable.dom
|
1048 |
}
|
1049 |
else {
|
1050 |
-
var dom = createNode(parent, v, hooks,
|
1051 |
nextSibling = dom
|
1052 |
}
|
1053 |
}
|
@@ -1118,10 +1122,7 @@ var coreRenderer = function($window) {
|
|
1118 |
}
|
1119 |
function updateElement(old, vnode, recycling, hooks, ns) {
|
1120 |
var element = vnode.dom = old.dom
|
1121 |
-
|
1122 |
-
case "svg": ns = "http://www.w3.org/2000/svg"; break
|
1123 |
-
case "math": ns = "http://www.w3.org/1998/Math/MathML"; break
|
1124 |
-
}
|
1125 |
if (vnode.tag === "textarea") {
|
1126 |
if (vnode.attrs == null) vnode.attrs = {}
|
1127 |
if (vnode.text != null) {
|
@@ -1301,12 +1302,21 @@ var coreRenderer = function($window) {
|
|
1301 |
else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value)
|
1302 |
else if (key2 === "style") updateStyle(element, old, value)
|
1303 |
else if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) {
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1310 |
// If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.
|
1311 |
if (vnode.tag === "input" && key2 === "type") {
|
1312 |
element.setAttribute(key2, value)
|
@@ -1421,10 +1431,11 @@ var coreRenderer = function($window) {
|
|
1421 |
if (!dom) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.")
|
1422 |
var hooks = []
|
1423 |
var active = $doc.activeElement
|
|
|
1424 |
// First time0 rendering into a node clears it out
|
1425 |
if (dom.vnodes == null) dom.textContent = ""
|
1426 |
if (!Array.isArray(vnodes)) vnodes = [vnodes]
|
1427 |
-
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, undefined)
|
1428 |
dom.vnodes = vnodes
|
1429 |
for (var i = 0; i < hooks.length; i++) hooks[i]()
|
1430 |
if ($doc.activeElement !== active) active.focus()
|
@@ -1454,7 +1465,8 @@ function throttle(callback) {
|
|
1454 |
var _11 = function($window) {
|
1455 |
var renderService = coreRenderer($window)
|
1456 |
renderService.setEventCallback(function(e) {
|
1457 |
-
if (e.redraw
|
|
|
1458 |
})
|
1459 |
var callbacks = []
|
1460 |
function subscribe(key1, callback) {
|
@@ -1653,7 +1665,10 @@ var _20 = function($window, redrawService0) {
|
|
1653 |
redrawService0.subscribe(root, run1)
|
1654 |
}
|
1655 |
route.set = function(path, data, options) {
|
1656 |
-
if (lastUpdate != null)
|
|
|
|
|
|
|
1657 |
lastUpdate = null
|
1658 |
routeService.setPath(path, data, options)
|
1659 |
}
|
@@ -1689,7 +1704,7 @@ m.request = requestService.request
|
|
1689 |
m.jsonp = requestService.jsonp
|
1690 |
m.parseQueryString = parseQueryString
|
1691 |
m.buildQueryString = buildQueryString
|
1692 |
-
m.version = "1.1.
|
1693 |
m.vnode = Vnode
|
1694 |
if (typeof module !== "undefined") module["exports"] = m
|
1695 |
else window.m = m
|
@@ -1697,7 +1712,7 @@ else window.m = m
|
|
1697 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
1698 |
},{}],8:[function(require,module,exports){
|
1699 |
/*!
|
1700 |
-
* EventEmitter v5.
|
1701 |
* Unlicense - http://unlicense.org/
|
1702 |
* Oliver Caldwell - http://oli.me.uk/
|
1703 |
* @preserve
|
@@ -1940,7 +1955,7 @@ else window.m = m
|
|
1940 |
|
1941 |
/**
|
1942 |
* Adds listeners in bulk using the manipulateListeners method.
|
1943 |
-
* If you pass an object as the
|
1944 |
* You can also pass it a regular expression to add the array of listeners to all events that match it.
|
1945 |
* Yeah, this function does quite a bit. That's probably a bad thing.
|
1946 |
*
|
@@ -1955,7 +1970,7 @@ else window.m = m
|
|
1955 |
|
1956 |
/**
|
1957 |
* Removes listeners in bulk using the manipulateListeners method.
|
1958 |
-
* If you pass an object as the
|
1959 |
* You can also pass it an event name and an array of listeners to be removed.
|
1960 |
* You can also pass it a regular expression to remove the listeners from all events that match it.
|
1961 |
*
|
497 |
var attrValue = match[6]
|
498 |
if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\")
|
499 |
if (match[4] === "class") classes.push(attrValue)
|
500 |
+
else attrs[match[4]] = attrValue === "" ? attrValue : attrValue || true
|
501 |
}
|
502 |
}
|
503 |
if (classes.length > 0) attrs.className = classes.join(" ")
|
844 |
var coreRenderer = function($window) {
|
845 |
var $doc = $window.document
|
846 |
var $emptyFragment = $doc.createDocumentFragment()
|
847 |
+
var nameSpace = {
|
848 |
+
svg: "http://www.w3.org/2000/svg",
|
849 |
+
math: "http://www.w3.org/1998/Math/MathML"
|
850 |
+
}
|
851 |
var onevent
|
852 |
function setEventCallback(callback) {return onevent = callback}
|
853 |
+
function getNameSpace(vnode) {
|
854 |
+
return vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]
|
855 |
+
}
|
856 |
//create
|
857 |
function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {
|
858 |
for (var i = start; i < end; i++) {
|
909 |
}
|
910 |
function createElement(parent, vnode, hooks, ns, nextSibling) {
|
911 |
var tag = vnode.tag
|
|
|
|
|
|
|
|
|
912 |
var attrs2 = vnode.attrs
|
913 |
var is = attrs2 && attrs2.is
|
914 |
+
ns = getNameSpace(vnode) || ns
|
915 |
var element = ns ?
|
916 |
is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
|
917 |
is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)
|
974 |
//update
|
975 |
function updateNodes(parent, old, vnodes, recycling, hooks, nextSibling, ns) {
|
976 |
if (old === vnodes || old == null && vnodes == null) return
|
977 |
+
else if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)
|
978 |
else if (vnodes == null) removeNodes(old, 0, old.length, vnodes)
|
979 |
else {
|
980 |
if (old.length === vnodes.length) {
|
1051 |
if (movable.dom != null) nextSibling = movable.dom
|
1052 |
}
|
1053 |
else {
|
1054 |
+
var dom = createNode(parent, v, hooks, ns, nextSibling)
|
1055 |
nextSibling = dom
|
1056 |
}
|
1057 |
}
|
1122 |
}
|
1123 |
function updateElement(old, vnode, recycling, hooks, ns) {
|
1124 |
var element = vnode.dom = old.dom
|
1125 |
+
ns = getNameSpace(vnode) || ns
|
|
|
|
|
|
|
1126 |
if (vnode.tag === "textarea") {
|
1127 |
if (vnode.attrs == null) vnode.attrs = {}
|
1128 |
if (vnode.text != null) {
|
1302 |
else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value)
|
1303 |
else if (key2 === "style") updateStyle(element, old, value)
|
1304 |
else if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) {
|
1305 |
+
if (key2 === "value") {
|
1306 |
+
var normalized0 = "" + value // eslint-disable-line no-implicit-coercion
|
1307 |
+
//setting input[value] to same value by typing on focused element moves cursor to end in Chrome
|
1308 |
+
if ((vnode.tag === "input" || vnode.tag === "textarea") && vnode.dom.value === normalized0 && vnode.dom === $doc.activeElement) return
|
1309 |
+
//setting select[value] to same value while having select open blinks select dropdown in Chrome
|
1310 |
+
if (vnode.tag === "select") {
|
1311 |
+
if (value === null) {
|
1312 |
+
if (vnode.dom.selectedIndex === -1 && vnode.dom === $doc.activeElement) return
|
1313 |
+
} else {
|
1314 |
+
if (old !== null && vnode.dom.value === normalized0 && vnode.dom === $doc.activeElement) return
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
+
//setting option[value] to same value while having select open blinks select dropdown in Chrome
|
1318 |
+
if (vnode.tag === "option" && old != null && vnode.dom.value === normalized0) return
|
1319 |
+
}
|
1320 |
// If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.
|
1321 |
if (vnode.tag === "input" && key2 === "type") {
|
1322 |
element.setAttribute(key2, value)
|
1431 |
if (!dom) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.")
|
1432 |
var hooks = []
|
1433 |
var active = $doc.activeElement
|
1434 |
+
var namespace = dom.namespaceURI
|
1435 |
// First time0 rendering into a node clears it out
|
1436 |
if (dom.vnodes == null) dom.textContent = ""
|
1437 |
if (!Array.isArray(vnodes)) vnodes = [vnodes]
|
1438 |
+
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
|
1439 |
dom.vnodes = vnodes
|
1440 |
for (var i = 0; i < hooks.length; i++) hooks[i]()
|
1441 |
if ($doc.activeElement !== active) active.focus()
|
1465 |
var _11 = function($window) {
|
1466 |
var renderService = coreRenderer($window)
|
1467 |
renderService.setEventCallback(function(e) {
|
1468 |
+
if (e.redraw === false) e.redraw = undefined
|
1469 |
+
else redraw()
|
1470 |
})
|
1471 |
var callbacks = []
|
1472 |
function subscribe(key1, callback) {
|
1665 |
redrawService0.subscribe(root, run1)
|
1666 |
}
|
1667 |
route.set = function(path, data, options) {
|
1668 |
+
if (lastUpdate != null) {
|
1669 |
+
options = options || {}
|
1670 |
+
options.replace = true
|
1671 |
+
}
|
1672 |
lastUpdate = null
|
1673 |
routeService.setPath(path, data, options)
|
1674 |
}
|
1704 |
m.jsonp = requestService.jsonp
|
1705 |
m.parseQueryString = parseQueryString
|
1706 |
m.buildQueryString = buildQueryString
|
1707 |
+
m.version = "1.1.3"
|
1708 |
m.vnode = Vnode
|
1709 |
if (typeof module !== "undefined") module["exports"] = m
|
1710 |
else window.m = m
|
1712 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
1713 |
},{}],8:[function(require,module,exports){
|
1714 |
/*!
|
1715 |
+
* EventEmitter v5.2.2 - git.io/ee
|
1716 |
* Unlicense - http://unlicense.org/
|
1717 |
* Oliver Caldwell - http://oli.me.uk/
|
1718 |
* @preserve
|
1955 |
|
1956 |
/**
|
1957 |
* Adds listeners in bulk using the manipulateListeners method.
|
1958 |
+
* If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
|
1959 |
* You can also pass it a regular expression to add the array of listeners to all events that match it.
|
1960 |
* Yeah, this function does quite a bit. That's probably a bad thing.
|
1961 |
*
|
1970 |
|
1971 |
/**
|
1972 |
* Removes listeners in bulk using the manipulateListeners method.
|
1973 |
+
* If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
|
1974 |
* You can also pass it an event name and an array of listeners to be removed.
|
1975 |
* You can also pass it a regular expression to remove the listeners from all events that match it.
|
1976 |
*
|
assets/js/admin.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function t(n,r,i){function o(l,s){if(!r[l]){if(!n[l]){var u="function"==typeof e&&e;if(!s&&u)return u(l,!0);if(a)return a(l,!0);var c=new Error("Cannot find module '"+l+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[l]={exports:{}};n[l][0].call(f.exports,function(e){var t=n[l][1][e];return o(t||e)},f,f.exports,t,n,r,i)}return r[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(e,t,n){"use strict";var r=window.m=e("mithril"),i=e("wolfy87-eventemitter"),o=document.getElementById("mc4wp-admin"),a=new i,l=e("./admin/tabs.js")(o),s=e("./admin/helpers.js"),u=e("./admin/settings.js")(o,s,a),c=e("./admin/list-fetcher.js"),f=document.getElementById("mc4wp-list-fetcher");f&&r.mount(f,new c),window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=r,window.mc4wp.helpers=s,window.mc4wp.events=a,window.mc4wp.settings=u,window.mc4wp.tabs=l},{"./admin/helpers.js":2,"./admin/list-fetcher.js":3,"./admin/settings.js":4,"./admin/tabs.js":5,mithril:7,"wolfy87-eventemitter":8}],2:[function(e,t,n){"use strict";var r={};r.toggleElement=function(e){for(var t=document.querySelectorAll(e),n=0;n<t.length;n++){var r=t[n].clientHeight<=0;t[n].style.display=r?"":"none"}},r.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},r.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){r.bindEventToElement(e,t,n)})},r.debounce=function(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(i,o)}},function(){var e=document.querySelectorAll("[data-showif]");Array.prototype.forEach.call(e,function(e){function t(){if("radio"!==this.getAttribute("type")||this.checked){var t="checkbox"===this.getAttribute("type")?this.checked:this.value,r=t==n.value;a?(e.style.display=r?"":"none",e.style.visibility=r?"":"hidden"):e.style.opacity=r?"":"0.4",Array.prototype.forEach.call(o,function(e){r?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}var n=JSON.parse(e.getAttribute("data-showif")),i=document.querySelectorAll('[name="'+n.element+'"]'),o=e.querySelectorAll("input,select,textarea:not([readonly])"),a=void 0===n.hide||n.hide;Array.prototype.forEach.call(i,function(e){t.call(e)}),r.bindEventToElements(i,"change",t)})}(),t.exports=r},{}],3:[function(e,t,n){"use strict";function r(){this.working=!1,this.done=!1,o.mailchimp.api_connected&&0===o.mailchimp.lists.length&&this.fetch()}var i=window.jQuery,o=mc4wp_vars,a=o.i18n;r.prototype.fetch=function(e){e&&e.preventDefault(),this.working=!0,this.done=!1,i.post(ajaxurl,{action:"mc4wp_renew_mailchimp_lists",timeout:18e4}).done(function(e){this.success=!0,e&&window.setTimeout(function(){window.location.reload()},3e3)}.bind(this)).fail(function(e){this.success=!1}.bind(this)).always(function(e){this.working=!1,this.done=!0,m.redraw()}.bind(this))},r.prototype.view=function(){return m("form",{method:"POST",onsubmit:this.fetch.bind(this)},[m("p",[m("input",{type:"submit",value:this.working?a.fetching_mailchimp_lists:a.renew_mailchimp_lists,className:"button",disabled:!!this.working}),m.trust(" "),this.working?[m("span.mc4wp-loader","Loading..."),m.trust(" "),m("em.help",a.fetching_mailchimp_lists_can_take_a_while)]:"",this.done?[this.success?m("em.help.green",a.fetching_mailchimp_lists_done):m("em.help.red",a.fetching_mailchimp_lists_error)]:""])])},t.exports=r},{}],4:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t,n){function i(e,t){return c.filter(function(n){return n[e]===t})}function o(){return c}function a(){return c=[],Array.prototype.forEach.call(s,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"===r(u[e.value])&&c.push(u[e.value])}),n.trigger("selectedLists.change",[c]),c}function l(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){i("id",e.getAttribute("data-list-id")).length>0?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}var s=(e.querySelector("form"),e.querySelectorAll(".mc4wp-list-input")),u=mc4wp_vars.mailchimp.lists,c=[];return n.on("selectedLists.change",l),t.bindEventToElements(s,"change",a),a(),{getSelectedLists:o}};t.exports=i},{}],5:[function(e,t,n){"use strict";var r=e("./url.js"),i=function(e){function t(e){for(var t=0;t<f.length;t++)if(f[t].id===e)return f[t]}function n(e,n){if("string"==typeof e&&(e=t(e)),!e)return!1;void 0==n&&(n=!0),s.removeClass("tab-active").css("display","none"),u.removeClass("nav-tab-active"),Array.prototype.forEach.call(e.nav,function(e){e.className+=" nav-tab-active",e.blur()}),e.element.style.display="block",e.element.className+=" tab-active";var o=r.setParameter(window.location.href,"tab",e.id);return history.pushState&&n&&history.pushState(e.id,"",o),i(e),c.value=o,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function i(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function o(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var i=this.className.match(/nav-tab-(\w+)?/);i&&(t=i[1])}if(!t){var o=r.parse(this.href);if(!o.tab)return;t=o.tab}return!n(t)||(e.preventDefault(),e.returnValue=!1,!1)}var a=window.jQuery,l=a(e),s=l.find(".tab"),u=l.find(".nav-tab"),c=e.querySelector('input[name="_wp_http_referer"]'),f=[];return a.each(s,function(t,r){var i=r.id.substring(4),o=a(r).find("h2").first().text();f.push({id:i,title:o,element:r,nav:e.querySelectorAll(".nav-tab-"+i),open:function(){return n(i)}})}),u.click(o),a(document.body).on("click",".tab-link",o),function(){if(history.pushState){var e=s.filter(":visible").get(0);if(e){var n=t(e.id.substring(4));n&&(history.replaceState&&null===history.state&&history.replaceState(n.id,""),i(n))}}}(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){return!e.state||n(e.state,!1)}),{open:n,get:t}};t.exports=i},{"./url.js":6}],6:[function(e,t,n){"use strict";var r={parse:function(e){var t={},n=e.split("&");for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t},build:function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},setParameter:function(e,t,n){var i=r.parse(e);return i[t]=n,r.build(i)}};t.exports=r},{}],7:[function(e,t,n){(function(e){!function(){"use strict";function n(e,t,n,r,i,o){return{tag:e,key:t,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,_state:void 0,events:void 0,instance:void 0,skip:!1}}function r(e){for(var t,n="div",r=[],i={};t=l.exec(e);){var o=t[1],a=t[2];if(""===o&&""!==a)n=a;else if("#"===o)i.id=a;else if("."===o)r.push(a);else if("["===t[3][0]){var u=t[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===t[4]?r.push(u):i[t[4]]=u||!0}}return r.length>0&&(i.className=r.join(" ")),s[e]={tag:n,attrs:i}}function i(e,t,r){var i,o,a=!1,l=t.className||t.class;for(var s in e.attrs)u.call(e.attrs,s)&&(t[s]=e.attrs[s]);void 0!==l&&(void 0!==t.class&&(t.class=void 0,t.className=l),null!=e.attrs.className&&(t.className=e.attrs.className+" "+l));for(var s in t)if(u.call(t,s)&&"key"!==s){a=!0;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?o=r[0].children:i=r,n(e.tag,t.key,a?t:void 0,i,o)}function o(e){var t,o=arguments[1],a=2;if(null==e||"string"!=typeof e&&"function"!=typeof e&&"function"!=typeof e.view)throw Error("The selector must be either a string or a component.");if("string"==typeof e)var l=s[e]||r(e);if(null==o?o={}:("object"!=typeof o||null!=o.tag||Array.isArray(o))&&(o={},a=1),arguments.length===a+1)t=arguments[a],Array.isArray(t)||(t=[t]);else for(t=[];a<arguments.length;)t.push(arguments[a++]);var u=n.normalizeChildren(t);return"string"==typeof e?i(l,o,u):n(e,o.key,o,u)}function a(e){var t=0,n=null,r="function"==typeof requestAnimationFrame?requestAnimationFrame:setTimeout;return function(){var i=Date.now();0===t||i-t>=16?(t=i,e()):null===n&&(n=r(function(){n=null,e(),t=Date.now()},16-(i-t)))}}n.normalize=function(e){return Array.isArray(e)?n("[",void 0,void 0,n.normalizeChildren(e),void 0,void 0):null!=e&&"object"!=typeof e?n("#",void 0,void 0,!1===e?"":e,void 0,void 0):e},n.normalizeChildren=function(e){for(var t=0;t<e.length;t++)e[t]=n.normalize(e[t]);return e};var l=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},u={}.hasOwnProperty;o.trust=function(e){return null==e&&(e=""),n("<",void 0,void 0,e,void 0,void 0)},o.fragment=function(e,t){return n("[",e.key,e,n.normalizeChildren(t),void 0,void 0)};var c=o,f=function(e){function t(e,t){return function a(c){var f;try{if(!t||null==c||"object"!=typeof c&&"function"!=typeof c||"function"!=typeof(f=c.then))u(function(){t||0!==e.length||console.error("Possible unhandled promise rejection:",c);for(var n=0;n<e.length;n++)e[n](c);i.length=0,o.length=0,s.state=t,s.retry=function(){a(c)}});else{if(c===r)throw new TypeError("Promise can't be resolved w/ itself");n(f.bind(c))}}catch(e){l(e)}}}function n(e){function t(e){return function(t){n++>0||e(t)}}var n=0,r=t(l);try{e(t(a),r)}catch(e){r(e)}}if(!(this instanceof f))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var r=this,i=[],o=[],a=t(i,!0),l=t(o,!1),s=r._instance={resolvers:i,rejectors:o},u="function"==typeof setImmediate?setImmediate:setTimeout;n(e)};if(f.prototype.then=function(e,t){function n(e,t,n,o){t.push(function(t){if("function"!=typeof e)n(t);else try{r(e(t))}catch(e){i&&i(e)}}),"function"==typeof a.retry&&o===a.state&&a.retry()}var r,i,o=this,a=o._instance,l=new f(function(e,t){r=e,i=t});return n(e,a.resolvers,r,!0),n(t,a.rejectors,i,!1),l},f.prototype.catch=function(e){return this.then(null,e)},f.resolve=function(e){return e instanceof f?e:new f(function(t){t(e)})},f.reject=function(e){return new f(function(t,n){n(e)})},f.all=function(e){return new f(function(t,n){var r=e.length,i=0,o=[];if(0===e.length)t([]);else for(var a=0;a<e.length;a++)!function(a){function l(e){i++,o[a]=e,i===r&&t(o)}null==e[a]||"object"!=typeof e[a]&&"function"!=typeof e[a]||"function"!=typeof e[a].then?l(e[a]):e[a].then(l,n)}(a)})},f.race=function(e){return new f(function(t,n){for(var r=0;r<e.length;r++)e[r].then(t,n)})},"undefined"!=typeof window){void 0===window.Promise&&(window.Promise=f);var f=window.Promise}else if(void 0!==e){void 0===e.Promise&&(e.Promise=f);var f=e.Promise}var d=function(e){function t(e,r){if(Array.isArray(r))for(var i=0;i<r.length;i++)t(e+"["+i+"]",r[i]);else if("[object Object]"===Object.prototype.toString.call(r))for(var i in r)t(e+"["+i+"]",r[i]);else n.push(encodeURIComponent(e)+(null!=r&&""!==r?"="+encodeURIComponent(r):""))}if("[object Object]"!==Object.prototype.toString.call(e))return"";var n=[];for(var r in e)t(r,e[r]);return n.join("&")},h=new RegExp("^file://","i"),v=function(e,t){function n(e){v=e}function r(){function e(){0==--t&&"function"==typeof v&&v()}var t=0;return function n(r){var i=r.then;return r.then=function(){t++;var o=i.apply(r,arguments);return o.then(e,function(n){if(e(),0===t)throw n}),n(o)},r}}function i(e,t){if("string"==typeof e){var n=e;e=t||{},null==e.url&&(e.url=n)}return e}function o(n,o){var a=r();n=i(n,o);var d=new t(function(t,r){null==n.method&&(n.method="GET"),n.method=n.method.toUpperCase();var i="GET"!==n.method&&"TRACE"!==n.method&&("boolean"!=typeof n.useBody||n.useBody);"function"!=typeof n.serialize&&(n.serialize="undefined"!=typeof FormData&&n.data instanceof FormData?function(e){return e}:JSON.stringify),"function"!=typeof n.deserialize&&(n.deserialize=u),"function"!=typeof n.extract&&(n.extract=c),n.url=l(n.url,n.data),i?n.data=n.serialize(n.data):n.url=s(n.url,n.data);var o=new e.XMLHttpRequest,a=!1,d=o.abort;o.abort=function(){a=!0,d.call(o)},o.open(n.method,n.url,"boolean"!=typeof n.async||n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),n.serialize===JSON.stringify&&i&&o.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.deserialize===u&&o.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(o.withCredentials=n.withCredentials);for(var v in n.headers)({}).hasOwnProperty.call(n.headers,v)&&o.setRequestHeader(v,n.headers[v]);"function"==typeof n.config&&(o=n.config(o,n)||o),o.onreadystatechange=function(){if(!a&&4===o.readyState)try{var e=n.extract!==c?n.extract(o,n):n.deserialize(n.extract(o,n));if(o.status>=200&&o.status<300||304===o.status||h.test(n.url))t(f(n.type,e));else{var i=new Error(o.responseText);for(var l in e)i[l]=e[l];r(i)}}catch(e){r(e)}},i&&null!=n.data?o.send(n.data):o.send()});return!0===n.background?d:a(d)}function a(n,o){var a=r();n=i(n,o);var u=new t(function(t,r){var i=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+p++,o=e.document.createElement("script");e[i]=function(r){o.parentNode.removeChild(o),t(f(n.type,r)),delete e[i]},o.onerror=function(){o.parentNode.removeChild(o),r(new Error("JSONP request failed")),delete e[i]},null==n.data&&(n.data={}),n.url=l(n.url,n.data),n.data[n.callbackKey||"callback"]=i,o.src=s(n.url,n.data),e.document.documentElement.appendChild(o)});return!0===n.background?u:a(u)}function l(e,t){if(null==t)return e;for(var n=e.match(/:[^\/]+/gi)||[],r=0;r<n.length;r++){var i=n[r].slice(1);null!=t[i]&&(e=e.replace(n[r],t[i]))}return e}function s(e,t){var n=d(t);if(""!==n){e+=(e.indexOf("?")<0?"?":"&")+n}return e}function u(e){try{return""!==e?JSON.parse(e):null}catch(t){throw new Error(e)}}function c(e){return e.responseText}function f(e,t){if("function"==typeof e){if(!Array.isArray(t))return new e(t);for(var n=0;n<t.length;n++)t[n]=new e(t[n])}return t}var v,p=0;return{request:o,jsonp:a,setCompletionCallback:n}}(window,f),p=function(e){function t(e){return V=e}function r(e,t,n,r,o,a,l){for(var s=n;s<r;s++){var u=t[s];null!=u&&i(e,u,o,l,a)}}function i(e,t,n,r,i){var u=t.tag;if("string"!=typeof u)return c(e,t,n,r,i);switch(t.state={},null!=t.attrs&&M(t.attrs,t,n),u){case"#":return o(e,t,i);case"<":return a(e,t,i);case"[":return l(e,t,n,r,i);default:return s(e,t,n,r,i)}}function o(e,t,n){return t.dom=H.createTextNode(t.children),E(e,t.dom,n),t.dom}function a(e,t,n){var r=t.children.match(/^\s*?<(\w+)/im)||[],i={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"}[r[1]]||"div",o=H.createElement(i);o.innerHTML=t.children,t.dom=o.firstChild,t.domSize=o.childNodes.length;for(var a,l=H.createDocumentFragment();a=o.firstChild;)l.appendChild(a);return E(e,l,n),l}function l(e,t,n,i,o){var a=H.createDocumentFragment();if(null!=t.children){var l=t.children;r(a,l,0,l.length,n,null,i)}return t.dom=a.firstChild,t.domSize=a.childNodes.length,E(e,a,o),a}function s(e,t,i,o,a){var l=t.tag;switch(t.tag){case"svg":o="http://www.w3.org/2000/svg";break;case"math":o="http://www.w3.org/1998/Math/MathML"}var s=t.attrs,u=s&&s.is,c=o?u?H.createElementNS(o,l,{is:u}):H.createElementNS(o,l):u?H.createElement(l,{is:u}):H.createElement(l);if(t.dom=c,null!=s&&j(t,s,o),E(e,c,a),null!=t.attrs&&null!=t.attrs.contenteditable)A(t);else if(null!=t.text&&(""!==t.text?c.textContent=t.text:t.children=[n("#",void 0,void 0,t.text,void 0,void 0)]),null!=t.children){var f=t.children;r(c,f,0,f.length,i,null,o),O(t)}return c}function u(e,t){var r;if("function"==typeof e.tag.view){if(e.state=Object.create(e.tag),r=e.state.view,null!=r.$$reentrantLock$$)return B;r.$$reentrantLock$$=!0}else{if(e.state=void 0,r=e.tag,null!=r.$$reentrantLock$$)return B;r.$$reentrantLock$$=!0,e.state=null!=e.tag.prototype&&"function"==typeof e.tag.prototype.view?new e.tag(e):e.tag(e)}if(e._state=e.state,null!=e.attrs&&M(e.attrs,e,t),M(e._state,e,t),e.instance=n.normalize(e._state.view.call(e.state,e)),e.instance===e)throw Error("A view cannot return the vnode it received as argument");r.$$reentrantLock$$=null}function c(e,t,n,r,o){if(u(t,n),null!=t.instance){var a=i(e,t.instance,n,r,o);return t.dom=t.instance.dom,t.domSize=null!=t.dom?t.instance.domSize:0,E(e,a,o),a}return t.domSize=0,B}function f(e,t,n,o,a,l,s){if(t!==n&&(null!=t||null!=n))if(null==t)r(e,n,0,n.length,a,l,void 0);else if(null==n)k(t,0,t.length,n);else{if(t.length===n.length){for(var u=!1,c=0;c<n.length;c++)if(null!=n[c]&&null!=t[c]){u=null==n[c].key&&null==t[c].key;break}if(u){for(var c=0;c<t.length;c++)t[c]!==n[c]&&(null==t[c]&&null!=n[c]?i(e,n[c],a,s,x(t,c+1,l)):null==n[c]?k(t,c,c+1,n):d(e,t[c],n[c],a,x(t,c+1,l),o,s));return}}if(o=o||g(t,n)){var f=t.pool;t=t.concat(t.pool)}for(var h,v=0,p=0,m=t.length-1,y=n.length-1;m>=v&&y>=p;){var A=t[v],S=n[p];if(A!==S||o)if(null==A)v++;else if(null==S)p++;else if(A.key===S.key){var _=null!=f&&v>=t.length-f.length||null==f&&o;v++,p++,d(e,A,S,a,x(t,v,l),_,s),o&&A.tag===S.tag&&E(e,b(A),l)}else{var A=t[m];if(A!==S||o)if(null==A)m--;else if(null==S)p++;else{if(A.key!==S.key)break;var _=null!=f&&m>=t.length-f.length||null==f&&o;d(e,A,S,a,x(t,m+1,l),_,s),(o||p<y)&&E(e,b(A),x(t,v,l)),m--,p++}else m--,p++}else v++,p++}for(;m>=v&&y>=p;){var A=t[m],S=n[y];if(A!==S||o)if(null==A)m--;else if(null==S)y--;else if(A.key===S.key){var _=null!=f&&m>=t.length-f.length||null==f&&o;d(e,A,S,a,x(t,m+1,l),_,s),o&&A.tag===S.tag&&E(e,b(A),l),null!=A.dom&&(l=A.dom),m--,y--}else{if(h||(h=w(t,m)),null!=S){var L=h[S.key];if(null!=L){var j=t[L],_=null!=f&&L>=t.length-f.length||null==f&&o;d(e,j,S,a,x(t,m+1,l),o,s),E(e,b(j),l),t[L].skip=!0,null!=j.dom&&(l=j.dom)}else{var C=i(e,S,a,void 0,l);l=C}}y--}else m--,y--;if(y<p)break}r(e,n,p,y+1,a,l,s),k(t,v,m+1,n)}}function d(e,t,n,r,o,a,l){var s=t.tag;if(s===n.tag){if(n.state=t.state,n._state=t._state,n.events=t.events,!a&&U(n,t))return;if("string"==typeof s)switch(null!=n.attrs&&(a?(n.state={},M(n.attrs,n,r)):D(n.attrs,n,r)),s){case"#":h(t,n);break;case"<":v(e,t,n,o);break;case"[":p(e,t,n,a,r,o,l);break;default:m(t,n,a,r,l)}else y(e,t,n,r,o,a,l)}else S(t,null),i(e,n,r,l,o)}function h(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children),t.dom=e.dom}function v(e,t,n,r){t.children!==n.children?(b(t),a(e,n,r)):(n.dom=t.dom,n.domSize=t.domSize)}function p(e,t,n,r,i,o,a){f(e,t.children,n.children,r,i,o,a);var l=0,s=n.children;if(n.dom=null,null!=s){for(var u=0;u<s.length;u++){var c=s[u];null!=c&&null!=c.dom&&(null==n.dom&&(n.dom=c.dom),l+=c.domSize||1)}1!==l&&(n.domSize=l)}}function m(e,t,r,i,o){var a=t.dom=e.dom;switch(t.tag){case"svg":o="http://www.w3.org/2000/svg";break;case"math":o="http://www.w3.org/1998/Math/MathML"}"textarea"===t.tag&&(null==t.attrs&&(t.attrs={}),null!=t.text&&(t.attrs.value=t.text,t.text=void 0)),z(t,e.attrs,t.attrs,o),null!=t.attrs&&null!=t.attrs.contenteditable?A(t):null!=e.text&&null!=t.text&&""!==t.text?e.text.toString()!==t.text.toString()&&(e.dom.firstChild.nodeValue=t.text):(null!=e.text&&(e.children=[n("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=t.text&&(t.children=[n("#",void 0,void 0,t.text,void 0,void 0)]),f(a,e.children,t.children,r,i,null,o))}function y(e,t,r,o,a,l,s){if(l)u(r,o);else{if(r.instance=n.normalize(r._state.view.call(r.state,r)),r.instance===r)throw Error("A view cannot return the vnode it received as argument");null!=r.attrs&&D(r.attrs,r,o),D(r._state,r,o)}null!=r.instance?(null==t.instance?i(e,r.instance,o,s,a):d(e,t.instance,r.instance,o,a,l,s),r.dom=r.instance.dom,r.domSize=r.instance.domSize):null!=t.instance?(S(t.instance,null),r.dom=void 0,r.domSize=0):(r.dom=t.dom,r.domSize=t.domSize)}function g(e,t){if(null!=e.pool&&Math.abs(e.pool.length-t.length)<=Math.abs(e.length-t.length)){var n=e[0]&&e[0].children&&e[0].children.length||0,r=e.pool[0]&&e.pool[0].children&&e.pool[0].children.length||0,i=t[0]&&t[0].children&&t[0].children.length||0;if(Math.abs(r-i)<=Math.abs(n-i))return!0}return!1}function w(e,t){for(var n={},r=0,r=0;r<t;r++){var i=e[r];if(null!=i){var o=i.key;null!=o&&(n[o]=r)}}return n}function b(e){var t=e.domSize;if(null!=t||null==e.dom){var n=H.createDocumentFragment();if(t>0){for(var r=e.dom;--t;)n.appendChild(r.nextSibling);n.insertBefore(r,n.firstChild)}return n}return e.dom}function x(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function E(e,t,n){n&&n.parentNode?e.insertBefore(t,n):e.appendChild(t)}function A(e){var t=e.children;if(null!=t&&1===t.length&&"<"===t[0].tag){var n=t[0].children;e.dom.innerHTML!==n&&(e.dom.innerHTML=n)}else if(null!=e.text||null!=t&&0!==t.length)throw new Error("Child node of a contenteditable must be trusted")}function k(e,t,n,r){for(var i=t;i<n;i++){var o=e[i];null!=o&&(o.skip?o.skip=!1:S(o,r))}}function S(e,t){function n(){if(++i===r&&(L(e),e.dom)){var n=e.domSize||1;if(n>1)for(var o=e.dom;--n;)_(o.nextSibling);_(e.dom),null==t||null!=e.domSize||$(e.attrs)||"string"!=typeof e.tag||(t.pool?t.pool.push(e):t.pool=[e])}}var r=1,i=0;if(e.attrs&&"function"==typeof e.attrs.onbeforeremove){var o=e.attrs.onbeforeremove.call(e.state,e);null!=o&&"function"==typeof o.then&&(r++,o.then(n,n))}if("string"!=typeof e.tag&&"function"==typeof e._state.onbeforeremove){var o=e._state.onbeforeremove.call(e.state,e);null!=o&&"function"==typeof o.then&&(r++,o.then(n,n))}n()}function _(e){var t=e.parentNode;null!=t&&t.removeChild(e)}function L(e){if(e.attrs&&"function"==typeof e.attrs.onremove&&e.attrs.onremove.call(e.state,e),"string"!=typeof e.tag&&"function"==typeof e._state.onremove&&e._state.onremove.call(e.state,e),null!=e.instance)L(e.instance);else{var t=e.children;if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];null!=r&&L(r)}}}function j(e,t,n){for(var r in t)C(e,r,null,t[r],n)}function C(e,t,n,r,i){var o=e.dom;if("key"!==t&&"is"!==t&&(n!==r||T(e,t)||"object"==typeof r)&&void 0!==r&&!N(t)){var a=t.indexOf(":");if(a>-1&&"xlink"===t.substr(0,a))o.setAttributeNS("http://www.w3.org/1999/xlink",t.slice(a+1),r);else if("o"===t[0]&&"n"===t[1]&&"function"==typeof r)q(e,t,r);else if("style"===t)I(o,n,r);else if(t in o&&!P(t)&&void 0===i&&!R(e)){if("input"===e.tag&&"value"===t&&e.dom.value==r&&e.dom===H.activeElement)return;if("select"===e.tag&&"value"===t&&e.dom.value==r&&e.dom===H.activeElement)return;if("option"===e.tag&&"value"===t&&e.dom.value==r)return;if("input"===e.tag&&"type"===t)return void o.setAttribute(t,r);o[t]=r}else"boolean"==typeof r?r?o.setAttribute(t,""):o.removeAttribute(t):o.setAttribute("className"===t?"class":t,r)}}function O(e){var t=e.attrs;"select"===e.tag&&null!=t&&("value"in t&&C(e,"value",null,t.value,void 0),"selectedIndex"in t&&C(e,"selectedIndex",null,t.selectedIndex,void 0))}function z(e,t,n,r){if(null!=n)for(var i in n)C(e,i,t&&t[i],n[i],r);if(null!=t)for(var i in t)null!=n&&i in n||("className"===i&&(i="class"),"o"!==i[0]||"n"!==i[1]||N(i)?"key"!==i&&e.dom.removeAttribute(i):q(e,i,void 0))}function T(e,t){return"value"===t||"checked"===t||"selectedIndex"===t||"selected"===t&&e.dom===H.activeElement}function N(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function P(e){return"href"===e||"list"===e||"form"===e||"width"===e||"height"===e}function R(e){return e.attrs.is||e.tag.indexOf("-")>-1}function $(e){return null!=e&&(e.oncreate||e.onupdate||e.onbeforeremove||e.onremove)}function I(e,t,n){if(t===n&&(e.style.cssText="",t=null),null==n)e.style.cssText="";else if("string"==typeof n)e.style.cssText=n;else{"string"==typeof t&&(e.style.cssText="");for(var r in n)e.style[r]=n[r];if(null!=t&&"string"!=typeof t)for(var r in t)r in n||(e.style[r]="")}}function q(e,t,n){var r=e.dom,i="function"!=typeof V?n:function(e){var t=n.call(r,e);return V.call(r,e),t};if(t in r)r[t]="function"==typeof n?i:null;else{var o=t.slice(2);if(void 0===e.events&&(e.events={}),e.events[t]===i)return;null!=e.events[t]&&r.removeEventListener(o,e.events[t],!1),"function"==typeof n&&(e.events[t]=i,r.addEventListener(o,e.events[t],!1))}}function M(e,t,n){"function"==typeof e.oninit&&e.oninit.call(t.state,t),"function"==typeof e.oncreate&&n.push(e.oncreate.bind(t.state,t))}function D(e,t,n){"function"==typeof e.onupdate&&n.push(e.onupdate.bind(t.state,t))}function U(e,t){var n,r;return null!=e.attrs&&"function"==typeof e.attrs.onbeforeupdate&&(n=e.attrs.onbeforeupdate.call(e.state,e,t)),"string"!=typeof e.tag&&"function"==typeof e._state.onbeforeupdate&&(r=e._state.onbeforeupdate.call(e.state,e,t)),!(void 0===n&&void 0===r||n||r)&&(e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,!0)}function F(e,t){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var r=[],i=H.activeElement;null==e.vnodes&&(e.textContent=""),Array.isArray(t)||(t=[t]),f(e,e.vnodes,n.normalizeChildren(t),!1,r,null,void 0),e.vnodes=t;for(var o=0;o<r.length;o++)r[o]();H.activeElement!==i&&i.focus()}var V,H=e.document,B=H.createDocumentFragment();return{render:F,setEventCallback:t}},m=function(e){function t(e,t){n(e),o.push(e,a(t))}function n(e){var t=o.indexOf(e);t>-1&&o.splice(t,2)}function r(){for(var e=1;e<o.length;e+=2)o[e]()}var i=p(e);i.setEventCallback(function(e){!1!==e.redraw&&r()});var o=[];return{subscribe:t,unsubscribe:n,redraw:r,render:i.render}}(window);v.setCompletionCallback(m.redraw);c.mount=function(e){return function(t,r){if(null===r)return e.render(t,[]),void e.unsubscribe(t);if(null==r.view&&"function"!=typeof r)throw new Error("m.mount(element, component) expects a component, not a vnode");var i=function(){e.render(t,n(r))};e.subscribe(t,i),e.redraw()}}(m);var y=f,g=function(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t=e.split("&"),n={},r={},i=0;i<t.length;i++){var o=t[i].split("="),a=decodeURIComponent(o[0]),l=2===o.length?decodeURIComponent(o[1]):"";"true"===l?l=!0:"false"===l&&(l=!1);var s=a.split(/\]\[?|\[/),u=n;a.indexOf("[")>-1&&s.pop();for(var c=0;c<s.length;c++){var f=s[c],d=s[c+1],h=""==d||!isNaN(parseInt(d,10)),v=c===s.length-1;if(""===f){var a=s.slice(0,c).join();null==r[a]&&(r[a]=0),f=r[a]++}null==u[f]&&(u[f]=v?l:h?[]:{}),u=u[f]}}return n},w=function(e){function t(t){var n=e.location[t].replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent);return"pathname"===t&&"/"!==n[0]&&(n="/"+n),n}function n(e){return function(){null==i&&(i=a(function(){i=null,e()}))}}function r(e,t,n){var r=e.indexOf("?"),i=e.indexOf("#"),o=r>-1?r:i>-1?i:e.length;if(r>-1){var a=i>-1?i:e.length,l=g(e.slice(r+1,a));for(var s in l)t[s]=l[s]}if(i>-1){var u=g(e.slice(i+1));for(var s in u)n[s]=u[s]}return e.slice(0,o)}var i,o="function"==typeof e.history.pushState,a="function"==typeof setImmediate?setImmediate:setTimeout,l={prefix:"#!"};return l.getPath=function(){switch(l.prefix.charAt(0)){case"#":return t("hash").slice(l.prefix.length);case"?":return t("search").slice(l.prefix.length)+t("hash");default:return t("pathname").slice(l.prefix.length)+t("search")+t("hash")}},l.setPath=function(t,n,i){var a={},s={};if(t=r(t,a,s),null!=n){for(var u in n)a[u]=n[u];t=t.replace(/:([^\/]+)/g,function(e,t){return delete a[t],n[t]})}var c=d(a);c&&(t+="?"+c);var f=d(s);if(f&&(t+="#"+f),o){var h=i?i.state:null,v=i?i.title:null;e.onpopstate(),i&&i.replace?e.history.replaceState(h,v,l.prefix+t):e.history.pushState(h,v,l.prefix+t)}else e.location.href=l.prefix+t},l.defineRoutes=function(t,i,a){function s(){var n=l.getPath(),o={},s=r(n,o,o),u=e.history.state;if(null!=u)for(var c in u)o[c]=u[c];for(var f in t){var d=new RegExp("^"+f.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(d.test(s))return void s.replace(d,function(){for(var e=f.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2),a=0;a<e.length;a++)o[e[a].replace(/:|\./g,"")]=decodeURIComponent(r[a]);i(t[f],o,n,f)})}a(n,o)}o?e.onpopstate=n(s):"#"===l.prefix.charAt(0)&&(e.onhashchange=s),s()},l};c.route=function(e,t){var r,i,o,a,l,s=w(e),u=function(e){return e},c=function(e,c,f){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var d=function(){null!=r&&t.render(e,r(n(i,o.key,o)))},h=function(e){if(e===c)throw new Error("Could not resolve default route "+c);s.setPath(c,null,{replace:!0})};s.defineRoutes(f,function(e,t,n){var s=l=function(e,c){s===l&&(i=null==c||"function"!=typeof c.view&&"function"!=typeof c?"div":c,o=t,a=n,l=null,r=(e.render||u).bind(e),d())};e.view||"function"==typeof e?s({},e):e.onmatch?y.resolve(e.onmatch(t,n)).then(function(t){s(e,t)},h):s(e,"div")},h),t.subscribe(e,d)};return c.set=function(e,t,n){null!=l&&(n={replace:!0}),l=null,s.setPath(e,t,n)},c.get=function(){return a},c.prefix=function(e){s.prefix=e},c.link=function(e){e.dom.setAttribute("href",s.prefix+e.attrs.href),e.dom.onclick=function(e){if(!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault(),e.redraw=!1;var t=this.getAttribute("href");0===t.indexOf(s.prefix)&&(t=t.slice(s.prefix.length)),c.set(t,void 0,void 0)}}},c.param=function(e){return void 0!==o&&void 0!==e?o[e]:o},c}(window,m),c.withAttr=function(e,t,n){return function(r){t.call(n||this,e in r.currentTarget?r.currentTarget[e]:r.currentTarget.getAttribute(e))}};var b=p(window);c.render=b.render,c.redraw=m.redraw,c.request=v.request,c.jsonp=v.jsonp,c.parseQueryString=g,c.buildQueryString=d,c.version="1.1.1",c.vnode=n,void 0!==t?t.exports=c:window.m=c}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,n,r){!function(e){"use strict";function r(){}function i(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}function a(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&a(e.listener)}var l=r.prototype,s=e.EventEmitter;l.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},l.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},l.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},l.addListener=function(e,t){if(!a(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),o="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&-1===i(r[n],t)&&r[n].push(o?t:{listener:t,once:!1});return this},l.on=o("addListener"),l.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},l.once=o("addOnceListener"),l.defineEvent=function(e){return this.getListeners(e),this},l.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},l.removeListener=function(e,t){var n,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&-1!==(n=i(o[r],t))&&o[r].splice(n,1);return this},l.off=o("removeListener"),l.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},l.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},l.manipulateListeners=function(e,t,n){var r,i,o=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)o.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?o.call(this,r,i):a.call(this,r,i));return this},l.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},l.removeAllListeners=o("removeEvent"),l.emitEvent=function(e,t){var n,r,i,o,a=this.getListenersAsObject(e)
|
2 |
-
;for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=0;i<n.length;i++)r=n[i],!0===r.once&&this.removeListener(e,r.listener),r.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},l.trigger=o("emitEvent"),l.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},l.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},l._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},l._getEvents=function(){return this._events||(this._events={})},r.noConflict=function(){return e.EventEmitter=s,r},"function"==typeof t&&t.amd?t(function(){return r}):"object"==typeof n&&n.exports?n.exports=r:e.EventEmitter=r}(this||{})},{}]},{},[1])}();
|
3 |
//# sourceMappingURL=admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function t(n,r,i){function o(l,s){if(!r[l]){if(!n[l]){var u="function"==typeof e&&e;if(!s&&u)return u(l,!0);if(a)return a(l,!0);var c=new Error("Cannot find module '"+l+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[l]={exports:{}};n[l][0].call(f.exports,function(e){var t=n[l][1][e];return o(t||e)},f,f.exports,t,n,r,i)}return r[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(e,t,n){"use strict";var r=window.m=e("mithril"),i=e("wolfy87-eventemitter"),o=document.getElementById("mc4wp-admin"),a=new i,l=e("./admin/tabs.js")(o),s=e("./admin/helpers.js"),u=e("./admin/settings.js")(o,s,a),c=e("./admin/list-fetcher.js"),f=document.getElementById("mc4wp-list-fetcher");f&&r.mount(f,new c),window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=r,window.mc4wp.helpers=s,window.mc4wp.events=a,window.mc4wp.settings=u,window.mc4wp.tabs=l},{"./admin/helpers.js":2,"./admin/list-fetcher.js":3,"./admin/settings.js":4,"./admin/tabs.js":5,mithril:7,"wolfy87-eventemitter":8}],2:[function(e,t,n){"use strict";var r={};r.toggleElement=function(e){for(var t=document.querySelectorAll(e),n=0;n<t.length;n++){var r=t[n].clientHeight<=0;t[n].style.display=r?"":"none"}},r.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},r.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){r.bindEventToElement(e,t,n)})},r.debounce=function(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(i,o)}},function(){var e=document.querySelectorAll("[data-showif]");Array.prototype.forEach.call(e,function(e){function t(){if("radio"!==this.getAttribute("type")||this.checked){var t="checkbox"===this.getAttribute("type")?this.checked:this.value,r=t==n.value;a?(e.style.display=r?"":"none",e.style.visibility=r?"":"hidden"):e.style.opacity=r?"":"0.4",Array.prototype.forEach.call(o,function(e){r?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}var n=JSON.parse(e.getAttribute("data-showif")),i=document.querySelectorAll('[name="'+n.element+'"]'),o=e.querySelectorAll("input,select,textarea:not([readonly])"),a=void 0===n.hide||n.hide;Array.prototype.forEach.call(i,function(e){t.call(e)}),r.bindEventToElements(i,"change",t)})}(),t.exports=r},{}],3:[function(e,t,n){"use strict";function r(){this.working=!1,this.done=!1,o.mailchimp.api_connected&&0===o.mailchimp.lists.length&&this.fetch()}var i=window.jQuery,o=mc4wp_vars,a=o.i18n;r.prototype.fetch=function(e){e&&e.preventDefault(),this.working=!0,this.done=!1,i.post(ajaxurl,{action:"mc4wp_renew_mailchimp_lists",timeout:18e4}).done(function(e){this.success=!0,e&&window.setTimeout(function(){window.location.reload()},3e3)}.bind(this)).fail(function(e){this.success=!1}.bind(this)).always(function(e){this.working=!1,this.done=!0,m.redraw()}.bind(this))},r.prototype.view=function(){return m("form",{method:"POST",onsubmit:this.fetch.bind(this)},[m("p",[m("input",{type:"submit",value:this.working?a.fetching_mailchimp_lists:a.renew_mailchimp_lists,className:"button",disabled:!!this.working}),m.trust(" "),this.working?[m("span.mc4wp-loader","Loading..."),m.trust(" "),m("em.help",a.fetching_mailchimp_lists_can_take_a_while)]:"",this.done?[this.success?m("em.help.green",a.fetching_mailchimp_lists_done):m("em.help.red",a.fetching_mailchimp_lists_error)]:""])])},t.exports=r},{}],4:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t,n){function i(e,t){return c.filter(function(n){return n[e]===t})}function o(){return c}function a(){return c=[],Array.prototype.forEach.call(s,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"===r(u[e.value])&&c.push(u[e.value])}),n.trigger("selectedLists.change",[c]),c}function l(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){i("id",e.getAttribute("data-list-id")).length>0?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}var s=(e.querySelector("form"),e.querySelectorAll(".mc4wp-list-input")),u=mc4wp_vars.mailchimp.lists,c=[];return n.on("selectedLists.change",l),t.bindEventToElements(s,"change",a),a(),{getSelectedLists:o}};t.exports=i},{}],5:[function(e,t,n){"use strict";var r=e("./url.js"),i=function(e){function t(e){for(var t=0;t<f.length;t++)if(f[t].id===e)return f[t]}function n(e,n){if("string"==typeof e&&(e=t(e)),!e)return!1;void 0==n&&(n=!0),s.removeClass("tab-active").css("display","none"),u.removeClass("nav-tab-active"),Array.prototype.forEach.call(e.nav,function(e){e.className+=" nav-tab-active",e.blur()}),e.element.style.display="block",e.element.className+=" tab-active";var o=r.setParameter(window.location.href,"tab",e.id);return history.pushState&&n&&history.pushState(e.id,"",o),i(e),c.value=o,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function i(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function o(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var i=this.className.match(/nav-tab-(\w+)?/);i&&(t=i[1])}if(!t){var o=r.parse(this.href);if(!o.tab)return;t=o.tab}return!n(t)||(e.preventDefault(),e.returnValue=!1,!1)}var a=window.jQuery,l=a(e),s=l.find(".tab"),u=l.find(".nav-tab"),c=e.querySelector('input[name="_wp_http_referer"]'),f=[];return a.each(s,function(t,r){var i=r.id.substring(4),o=a(r).find("h2").first().text();f.push({id:i,title:o,element:r,nav:e.querySelectorAll(".nav-tab-"+i),open:function(){return n(i)}})}),u.click(o),a(document.body).on("click",".tab-link",o),function(){if(history.pushState){var e=s.filter(":visible").get(0);if(e){var n=t(e.id.substring(4));n&&(history.replaceState&&null===history.state&&history.replaceState(n.id,""),i(n))}}}(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){return!e.state||n(e.state,!1)}),{open:n,get:t}};t.exports=i},{"./url.js":6}],6:[function(e,t,n){"use strict";var r={parse:function(e){var t={},n=e.split("&");for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t},build:function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},setParameter:function(e,t,n){var i=r.parse(e);return i[t]=n,r.build(i)}};t.exports=r},{}],7:[function(e,t,n){(function(e){!function(){"use strict";function n(e,t,n,r,i,o){return{tag:e,key:t,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,_state:void 0,events:void 0,instance:void 0,skip:!1}}function r(e){for(var t,n="div",r=[],i={};t=l.exec(e);){var o=t[1],a=t[2];if(""===o&&""!==a)n=a;else if("#"===o)i.id=a;else if("."===o)r.push(a);else if("["===t[3][0]){var u=t[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===t[4]?r.push(u):i[t[4]]=""===u?u:u||!0}}return r.length>0&&(i.className=r.join(" ")),s[e]={tag:n,attrs:i}}function i(e,t,r){var i,o,a=!1,l=t.className||t.class;for(var s in e.attrs)u.call(e.attrs,s)&&(t[s]=e.attrs[s]);void 0!==l&&(void 0!==t.class&&(t.class=void 0,t.className=l),null!=e.attrs.className&&(t.className=e.attrs.className+" "+l));for(var s in t)if(u.call(t,s)&&"key"!==s){a=!0;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?o=r[0].children:i=r,n(e.tag,t.key,a?t:void 0,i,o)}function o(e){var t,o=arguments[1],a=2;if(null==e||"string"!=typeof e&&"function"!=typeof e&&"function"!=typeof e.view)throw Error("The selector must be either a string or a component.");if("string"==typeof e)var l=s[e]||r(e);if(null==o?o={}:("object"!=typeof o||null!=o.tag||Array.isArray(o))&&(o={},a=1),arguments.length===a+1)t=arguments[a],Array.isArray(t)||(t=[t]);else for(t=[];a<arguments.length;)t.push(arguments[a++]);var u=n.normalizeChildren(t);return"string"==typeof e?i(l,o,u):n(e,o.key,o,u)}function a(e){var t=0,n=null,r="function"==typeof requestAnimationFrame?requestAnimationFrame:setTimeout;return function(){var i=Date.now();0===t||i-t>=16?(t=i,e()):null===n&&(n=r(function(){n=null,e(),t=Date.now()},16-(i-t)))}}n.normalize=function(e){return Array.isArray(e)?n("[",void 0,void 0,n.normalizeChildren(e),void 0,void 0):null!=e&&"object"!=typeof e?n("#",void 0,void 0,!1===e?"":e,void 0,void 0):e},n.normalizeChildren=function(e){for(var t=0;t<e.length;t++)e[t]=n.normalize(e[t]);return e};var l=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},u={}.hasOwnProperty;o.trust=function(e){return null==e&&(e=""),n("<",void 0,void 0,e,void 0,void 0)},o.fragment=function(e,t){return n("[",e.key,e,n.normalizeChildren(t),void 0,void 0)};var c=o,f=function(e){function t(e,t){return function a(c){var f;try{if(!t||null==c||"object"!=typeof c&&"function"!=typeof c||"function"!=typeof(f=c.then))u(function(){t||0!==e.length||console.error("Possible unhandled promise rejection:",c);for(var n=0;n<e.length;n++)e[n](c);i.length=0,o.length=0,s.state=t,s.retry=function(){a(c)}});else{if(c===r)throw new TypeError("Promise can't be resolved w/ itself");n(f.bind(c))}}catch(e){l(e)}}}function n(e){function t(e){return function(t){n++>0||e(t)}}var n=0,r=t(l);try{e(t(a),r)}catch(e){r(e)}}if(!(this instanceof f))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var r=this,i=[],o=[],a=t(i,!0),l=t(o,!1),s=r._instance={resolvers:i,rejectors:o},u="function"==typeof setImmediate?setImmediate:setTimeout;n(e)};if(f.prototype.then=function(e,t){function n(e,t,n,o){t.push(function(t){if("function"!=typeof e)n(t);else try{r(e(t))}catch(e){i&&i(e)}}),"function"==typeof a.retry&&o===a.state&&a.retry()}var r,i,o=this,a=o._instance,l=new f(function(e,t){r=e,i=t});return n(e,a.resolvers,r,!0),n(t,a.rejectors,i,!1),l},f.prototype.catch=function(e){return this.then(null,e)},f.resolve=function(e){return e instanceof f?e:new f(function(t){t(e)})},f.reject=function(e){return new f(function(t,n){n(e)})},f.all=function(e){return new f(function(t,n){var r=e.length,i=0,o=[];if(0===e.length)t([]);else for(var a=0;a<e.length;a++)!function(a){function l(e){i++,o[a]=e,i===r&&t(o)}null==e[a]||"object"!=typeof e[a]&&"function"!=typeof e[a]||"function"!=typeof e[a].then?l(e[a]):e[a].then(l,n)}(a)})},f.race=function(e){return new f(function(t,n){for(var r=0;r<e.length;r++)e[r].then(t,n)})},"undefined"!=typeof window){void 0===window.Promise&&(window.Promise=f);var f=window.Promise}else if(void 0!==e){void 0===e.Promise&&(e.Promise=f);var f=e.Promise}var d=function(e){function t(e,r){if(Array.isArray(r))for(var i=0;i<r.length;i++)t(e+"["+i+"]",r[i]);else if("[object Object]"===Object.prototype.toString.call(r))for(var i in r)t(e+"["+i+"]",r[i]);else n.push(encodeURIComponent(e)+(null!=r&&""!==r?"="+encodeURIComponent(r):""))}if("[object Object]"!==Object.prototype.toString.call(e))return"";var n=[];for(var r in e)t(r,e[r]);return n.join("&")},h=new RegExp("^file://","i"),v=function(e,t){function n(e){v=e}function r(){function e(){0==--t&&"function"==typeof v&&v()}var t=0;return function n(r){var i=r.then;return r.then=function(){t++;var o=i.apply(r,arguments);return o.then(e,function(n){if(e(),0===t)throw n}),n(o)},r}}function i(e,t){if("string"==typeof e){var n=e;e=t||{},null==e.url&&(e.url=n)}return e}function o(n,o){var a=r();n=i(n,o);var d=new t(function(t,r){null==n.method&&(n.method="GET"),n.method=n.method.toUpperCase();var i="GET"!==n.method&&"TRACE"!==n.method&&("boolean"!=typeof n.useBody||n.useBody);"function"!=typeof n.serialize&&(n.serialize="undefined"!=typeof FormData&&n.data instanceof FormData?function(e){return e}:JSON.stringify),"function"!=typeof n.deserialize&&(n.deserialize=u),"function"!=typeof n.extract&&(n.extract=c),n.url=l(n.url,n.data),i?n.data=n.serialize(n.data):n.url=s(n.url,n.data);var o=new e.XMLHttpRequest,a=!1,d=o.abort;o.abort=function(){a=!0,d.call(o)},o.open(n.method,n.url,"boolean"!=typeof n.async||n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),n.serialize===JSON.stringify&&i&&o.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.deserialize===u&&o.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(o.withCredentials=n.withCredentials);for(var v in n.headers)({}).hasOwnProperty.call(n.headers,v)&&o.setRequestHeader(v,n.headers[v]);"function"==typeof n.config&&(o=n.config(o,n)||o),o.onreadystatechange=function(){if(!a&&4===o.readyState)try{var e=n.extract!==c?n.extract(o,n):n.deserialize(n.extract(o,n));if(o.status>=200&&o.status<300||304===o.status||h.test(n.url))t(f(n.type,e));else{var i=new Error(o.responseText);for(var l in e)i[l]=e[l];r(i)}}catch(e){r(e)}},i&&null!=n.data?o.send(n.data):o.send()});return!0===n.background?d:a(d)}function a(n,o){var a=r();n=i(n,o);var u=new t(function(t,r){var i=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+p++,o=e.document.createElement("script");e[i]=function(r){o.parentNode.removeChild(o),t(f(n.type,r)),delete e[i]},o.onerror=function(){o.parentNode.removeChild(o),r(new Error("JSONP request failed")),delete e[i]},null==n.data&&(n.data={}),n.url=l(n.url,n.data),n.data[n.callbackKey||"callback"]=i,o.src=s(n.url,n.data),e.document.documentElement.appendChild(o)});return!0===n.background?u:a(u)}function l(e,t){if(null==t)return e;for(var n=e.match(/:[^\/]+/gi)||[],r=0;r<n.length;r++){var i=n[r].slice(1);null!=t[i]&&(e=e.replace(n[r],t[i]))}return e}function s(e,t){var n=d(t);if(""!==n){e+=(e.indexOf("?")<0?"?":"&")+n}return e}function u(e){try{return""!==e?JSON.parse(e):null}catch(t){throw new Error(e)}}function c(e){return e.responseText}function f(e,t){if("function"==typeof e){if(!Array.isArray(t))return new e(t);for(var n=0;n<t.length;n++)t[n]=new e(t[n])}return t}var v,p=0;return{request:o,jsonp:a,setCompletionCallback:n}}(window,f),p=function(e){function t(e){return H=e}function r(e){return e.attrs&&e.attrs.xmlns||K[e.tag]}function i(e,t,n,r,i,a,l){for(var s=n;s<r;s++){var u=t[s];null!=u&&o(e,u,i,l,a)}}function o(e,t,n,r,i){var o=t.tag;if("string"!=typeof o)return f(e,t,n,r,i);switch(t.state={},null!=t.attrs&&D(t.attrs,t,n),o){case"#":return a(e,t,i);case"<":return l(e,t,i);case"[":return s(e,t,n,r,i);default:return u(e,t,n,r,i)}}function a(e,t,n){return t.dom=B.createTextNode(t.children),A(e,t.dom,n),t.dom}function l(e,t,n){var r=t.children.match(/^\s*?<(\w+)/im)||[],i={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"}[r[1]]||"div",o=B.createElement(i);o.innerHTML=t.children,t.dom=o.firstChild,t.domSize=o.childNodes.length;for(var a,l=B.createDocumentFragment();a=o.firstChild;)l.appendChild(a);return A(e,l,n),l}function s(e,t,n,r,o){var a=B.createDocumentFragment();if(null!=t.children){var l=t.children;i(a,l,0,l.length,n,null,r)}return t.dom=a.firstChild,t.domSize=a.childNodes.length,A(e,a,o),a}function u(e,t,o,a,l){var s=t.tag,u=t.attrs,c=u&&u.is;a=r(t)||a;var f=a?c?B.createElementNS(a,s,{is:c}):B.createElementNS(a,s):c?B.createElement(s,{is:c}):B.createElement(s);if(t.dom=f,null!=u&&C(t,u,a),A(e,f,l),null!=t.attrs&&null!=t.attrs.contenteditable)k(t);else if(null!=t.text&&(""!==t.text?f.textContent=t.text:t.children=[n("#",void 0,void 0,t.text,void 0,void 0)]),null!=t.children){var d=t.children;i(f,d,0,d.length,o,null,a),z(t)}return f}function c(e,t){var r;if("function"==typeof e.tag.view){if(e.state=Object.create(e.tag),r=e.state.view,null!=r.$$reentrantLock$$)return J;r.$$reentrantLock$$=!0}else{if(e.state=void 0,r=e.tag,null!=r.$$reentrantLock$$)return J;r.$$reentrantLock$$=!0,e.state=null!=e.tag.prototype&&"function"==typeof e.tag.prototype.view?new e.tag(e):e.tag(e)}if(e._state=e.state,null!=e.attrs&&D(e.attrs,e,t),D(e._state,e,t),e.instance=n.normalize(e._state.view.call(e.state,e)),e.instance===e)throw Error("A view cannot return the vnode it received as argument");r.$$reentrantLock$$=null}function f(e,t,n,r,i){if(c(t,n),null!=t.instance){var a=o(e,t.instance,n,r,i);return t.dom=t.instance.dom,t.domSize=null!=t.dom?t.instance.domSize:0,A(e,a,i),a}return t.domSize=0,J}function d(e,t,n,r,a,l,s){if(t!==n&&(null!=t||null!=n))if(null==t)i(e,n,0,n.length,a,l,s);else if(null==n)S(t,0,t.length,n);else{if(t.length===n.length){for(var u=!1,c=0;c<n.length;c++)if(null!=n[c]&&null!=t[c]){u=null==n[c].key&&null==t[c].key;break}if(u){for(var c=0;c<t.length;c++)t[c]!==n[c]&&(null==t[c]&&null!=n[c]?o(e,n[c],a,s,E(t,c+1,l)):null==n[c]?S(t,c,c+1,n):h(e,t[c],n[c],a,E(t,c+1,l),r,s));return}}if(r=r||w(t,n)){var f=t.pool;t=t.concat(t.pool)}for(var d,v=0,p=0,m=t.length-1,y=n.length-1;m>=v&&y>=p;){var g=t[v],k=n[p];if(g!==k||r)if(null==g)v++;else if(null==k)p++;else if(g.key===k.key){var _=null!=f&&v>=t.length-f.length||null==f&&r;v++,p++,h(e,g,k,a,E(t,v,l),_,s),r&&g.tag===k.tag&&A(e,x(g),l)}else{var g=t[m];if(g!==k||r)if(null==g)m--;else if(null==k)p++;else{if(g.key!==k.key)break;var _=null!=f&&m>=t.length-f.length||null==f&&r;h(e,g,k,a,E(t,m+1,l),_,s),(r||p<y)&&A(e,x(g),E(t,v,l)),m--,p++}else m--,p++}else v++,p++}for(;m>=v&&y>=p;){var g=t[m],k=n[y];if(g!==k||r)if(null==g)m--;else if(null==k)y--;else if(g.key===k.key){var _=null!=f&&m>=t.length-f.length||null==f&&r;h(e,g,k,a,E(t,m+1,l),_,s),r&&g.tag===k.tag&&A(e,x(g),l),null!=g.dom&&(l=g.dom),m--,y--}else{if(d||(d=b(t,m)),null!=k){var L=d[k.key];if(null!=L){var j=t[L],_=null!=f&&L>=t.length-f.length||null==f&&r;h(e,j,k,a,E(t,m+1,l),r,s),A(e,x(j),l),t[L].skip=!0,null!=j.dom&&(l=j.dom)}else{var C=o(e,k,a,s,l);l=C}}y--}else m--,y--;if(y<p)break}i(e,n,p,y+1,a,l,s),S(t,v,m+1,n)}}function h(e,t,n,r,i,a,l){var s=t.tag;if(s===n.tag){if(n.state=t.state,n._state=t._state,n.events=t.events,!a&&F(n,t))return;if("string"==typeof s)switch(null!=n.attrs&&(a?(n.state={},D(n.attrs,n,r)):U(n.attrs,n,r)),s){case"#":v(t,n);break;case"<":p(e,t,n,i);break;case"[":m(e,t,n,a,r,i,l);break;default:y(t,n,a,r,l)}else g(e,t,n,r,i,a,l)}else _(t,null),o(e,n,r,l,i)}function v(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children),t.dom=e.dom}function p(e,t,n,r){t.children!==n.children?(x(t),l(e,n,r)):(n.dom=t.dom,n.domSize=t.domSize)}function m(e,t,n,r,i,o,a){d(e,t.children,n.children,r,i,o,a);var l=0,s=n.children;if(n.dom=null,null!=s){for(var u=0;u<s.length;u++){var c=s[u];null!=c&&null!=c.dom&&(null==n.dom&&(n.dom=c.dom),l+=c.domSize||1)}1!==l&&(n.domSize=l)}}function y(e,t,i,o,a){var l=t.dom=e.dom;a=r(t)||a,"textarea"===t.tag&&(null==t.attrs&&(t.attrs={}),null!=t.text&&(t.attrs.value=t.text,t.text=void 0)),T(t,e.attrs,t.attrs,a),null!=t.attrs&&null!=t.attrs.contenteditable?k(t):null!=e.text&&null!=t.text&&""!==t.text?e.text.toString()!==t.text.toString()&&(e.dom.firstChild.nodeValue=t.text):(null!=e.text&&(e.children=[n("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=t.text&&(t.children=[n("#",void 0,void 0,t.text,void 0,void 0)]),d(l,e.children,t.children,i,o,null,a))}function g(e,t,r,i,a,l,s){if(l)c(r,i);else{if(r.instance=n.normalize(r._state.view.call(r.state,r)),r.instance===r)throw Error("A view cannot return the vnode it received as argument");null!=r.attrs&&U(r.attrs,r,i),U(r._state,r,i)}null!=r.instance?(null==t.instance?o(e,r.instance,i,s,a):h(e,t.instance,r.instance,i,a,l,s),r.dom=r.instance.dom,r.domSize=r.instance.domSize):null!=t.instance?(_(t.instance,null),r.dom=void 0,r.domSize=0):(r.dom=t.dom,r.domSize=t.domSize)}function w(e,t){if(null!=e.pool&&Math.abs(e.pool.length-t.length)<=Math.abs(e.length-t.length)){var n=e[0]&&e[0].children&&e[0].children.length||0,r=e.pool[0]&&e.pool[0].children&&e.pool[0].children.length||0,i=t[0]&&t[0].children&&t[0].children.length||0;if(Math.abs(r-i)<=Math.abs(n-i))return!0}return!1}function b(e,t){for(var n={},r=0,r=0;r<t;r++){var i=e[r];if(null!=i){var o=i.key;null!=o&&(n[o]=r)}}return n}function x(e){var t=e.domSize;if(null!=t||null==e.dom){var n=B.createDocumentFragment();if(t>0){for(var r=e.dom;--t;)n.appendChild(r.nextSibling);n.insertBefore(r,n.firstChild)}return n}return e.dom}function E(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function A(e,t,n){n&&n.parentNode?e.insertBefore(t,n):e.appendChild(t)}function k(e){var t=e.children;if(null!=t&&1===t.length&&"<"===t[0].tag){var n=t[0].children;e.dom.innerHTML!==n&&(e.dom.innerHTML=n)}else if(null!=e.text||null!=t&&0!==t.length)throw new Error("Child node of a contenteditable must be trusted")}function S(e,t,n,r){for(var i=t;i<n;i++){var o=e[i];null!=o&&(o.skip?o.skip=!1:_(o,r))}}function _(e,t){function n(){if(++i===r&&(j(e),e.dom)){var n=e.domSize||1;if(n>1)for(var o=e.dom;--n;)L(o.nextSibling);L(e.dom),null==t||null!=e.domSize||$(e.attrs)||"string"!=typeof e.tag||(t.pool?t.pool.push(e):t.pool=[e])}}var r=1,i=0;if(e.attrs&&"function"==typeof e.attrs.onbeforeremove){var o=e.attrs.onbeforeremove.call(e.state,e);null!=o&&"function"==typeof o.then&&(r++,o.then(n,n))}if("string"!=typeof e.tag&&"function"==typeof e._state.onbeforeremove){var o=e._state.onbeforeremove.call(e.state,e);null!=o&&"function"==typeof o.then&&(r++,o.then(n,n))}n()}function L(e){var t=e.parentNode;null!=t&&t.removeChild(e)}function j(e){if(e.attrs&&"function"==typeof e.attrs.onremove&&e.attrs.onremove.call(e.state,e),"string"!=typeof e.tag&&"function"==typeof e._state.onremove&&e._state.onremove.call(e.state,e),null!=e.instance)j(e.instance);else{var t=e.children;if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];null!=r&&j(r)}}}function C(e,t,n){for(var r in t)O(e,r,null,t[r],n)}function O(e,t,n,r,i){var o=e.dom;if("key"!==t&&"is"!==t&&(n!==r||N(e,t)||"object"==typeof r)&&void 0!==r&&!R(t)){var a=t.indexOf(":");if(a>-1&&"xlink"===t.substr(0,a))o.setAttributeNS("http://www.w3.org/1999/xlink",t.slice(a+1),r);else if("o"===t[0]&&"n"===t[1]&&"function"==typeof r)M(e,t,r);else if("style"===t)q(o,n,r);else if(t in o&&!P(t)&&void 0===i&&!I(e)){if("value"===t){var l=""+r;if(("input"===e.tag||"textarea"===e.tag)&&e.dom.value===l&&e.dom===B.activeElement)return;if("select"===e.tag)if(null===r){if(-1===e.dom.selectedIndex&&e.dom===B.activeElement)return}else if(null!==n&&e.dom.value===l&&e.dom===B.activeElement)return;if("option"===e.tag&&null!=n&&e.dom.value===l)return}if("input"===e.tag&&"type"===t)return void o.setAttribute(t,r);o[t]=r}else"boolean"==typeof r?r?o.setAttribute(t,""):o.removeAttribute(t):o.setAttribute("className"===t?"class":t,r)}}function z(e){var t=e.attrs;"select"===e.tag&&null!=t&&("value"in t&&O(e,"value",null,t.value,void 0),"selectedIndex"in t&&O(e,"selectedIndex",null,t.selectedIndex,void 0))}function T(e,t,n,r){if(null!=n)for(var i in n)O(e,i,t&&t[i],n[i],r);if(null!=t)for(var i in t)null!=n&&i in n||("className"===i&&(i="class"),"o"!==i[0]||"n"!==i[1]||R(i)?"key"!==i&&e.dom.removeAttribute(i):M(e,i,void 0))}function N(e,t){return"value"===t||"checked"===t||"selectedIndex"===t||"selected"===t&&e.dom===B.activeElement}function R(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function P(e){return"href"===e||"list"===e||"form"===e||"width"===e||"height"===e}function I(e){return e.attrs.is||e.tag.indexOf("-")>-1}function $(e){return null!=e&&(e.oncreate||e.onupdate||e.onbeforeremove||e.onremove)}function q(e,t,n){if(t===n&&(e.style.cssText="",t=null),null==n)e.style.cssText="";else if("string"==typeof n)e.style.cssText=n;else{"string"==typeof t&&(e.style.cssText="");for(var r in n)e.style[r]=n[r];if(null!=t&&"string"!=typeof t)for(var r in t)r in n||(e.style[r]="")}}function M(e,t,n){var r=e.dom,i="function"!=typeof H?n:function(e){var t=n.call(r,e);return H.call(r,e),t};if(t in r)r[t]="function"==typeof n?i:null;else{var o=t.slice(2);if(void 0===e.events&&(e.events={}),e.events[t]===i)return;null!=e.events[t]&&r.removeEventListener(o,e.events[t],!1),"function"==typeof n&&(e.events[t]=i,r.addEventListener(o,e.events[t],!1))}}function D(e,t,n){"function"==typeof e.oninit&&e.oninit.call(t.state,t),"function"==typeof e.oncreate&&n.push(e.oncreate.bind(t.state,t))}function U(e,t,n){"function"==typeof e.onupdate&&n.push(e.onupdate.bind(t.state,t))}function F(e,t){var n,r;return null!=e.attrs&&"function"==typeof e.attrs.onbeforeupdate&&(n=e.attrs.onbeforeupdate.call(e.state,e,t)),"string"!=typeof e.tag&&"function"==typeof e._state.onbeforeupdate&&(r=e._state.onbeforeupdate.call(e.state,e,t)),!(void 0===n&&void 0===r||n||r)&&(e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,!0)}function V(e,t){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var r=[],i=B.activeElement,o=e.namespaceURI;null==e.vnodes&&(e.textContent=""),Array.isArray(t)||(t=[t]),d(e,e.vnodes,n.normalizeChildren(t),!1,r,null,"http://www.w3.org/1999/xhtml"===o?void 0:o),e.vnodes=t;for(var a=0;a<r.length;a++)r[a]();B.activeElement!==i&&i.focus()}var H,B=e.document,J=B.createDocumentFragment(),K={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};return{render:V,setEventCallback:t}},m=function(e){function t(e,t){n(e),o.push(e,a(t))}function n(e){var t=o.indexOf(e);t>-1&&o.splice(t,2)}function r(){for(var e=1;e<o.length;e+=2)o[e]()}var i=p(e);i.setEventCallback(function(e){!1===e.redraw?e.redraw=void 0:r()});var o=[];return{subscribe:t,unsubscribe:n,redraw:r,render:i.render}}(window);v.setCompletionCallback(m.redraw);c.mount=function(e){return function(t,r){if(null===r)return e.render(t,[]),void e.unsubscribe(t);if(null==r.view&&"function"!=typeof r)throw new Error("m.mount(element, component) expects a component, not a vnode");var i=function(){e.render(t,n(r))};e.subscribe(t,i),e.redraw()}}(m);var y=f,g=function(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t=e.split("&"),n={},r={},i=0;i<t.length;i++){var o=t[i].split("="),a=decodeURIComponent(o[0]),l=2===o.length?decodeURIComponent(o[1]):"";"true"===l?l=!0:"false"===l&&(l=!1);var s=a.split(/\]\[?|\[/),u=n;a.indexOf("[")>-1&&s.pop();for(var c=0;c<s.length;c++){var f=s[c],d=s[c+1],h=""==d||!isNaN(parseInt(d,10)),v=c===s.length-1;if(""===f){var a=s.slice(0,c).join();null==r[a]&&(r[a]=0),f=r[a]++}null==u[f]&&(u[f]=v?l:h?[]:{}),u=u[f]}}return n},w=function(e){function t(t){var n=e.location[t].replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent);return"pathname"===t&&"/"!==n[0]&&(n="/"+n),n}function n(e){return function(){null==i&&(i=a(function(){i=null,e()}))}}function r(e,t,n){var r=e.indexOf("?"),i=e.indexOf("#"),o=r>-1?r:i>-1?i:e.length;if(r>-1){var a=i>-1?i:e.length,l=g(e.slice(r+1,a));for(var s in l)t[s]=l[s]}if(i>-1){var u=g(e.slice(i+1));for(var s in u)n[s]=u[s]}return e.slice(0,o)}var i,o="function"==typeof e.history.pushState,a="function"==typeof setImmediate?setImmediate:setTimeout,l={prefix:"#!"};return l.getPath=function(){switch(l.prefix.charAt(0)){case"#":return t("hash").slice(l.prefix.length);case"?":return t("search").slice(l.prefix.length)+t("hash");default:return t("pathname").slice(l.prefix.length)+t("search")+t("hash")}},l.setPath=function(t,n,i){var a={},s={};if(t=r(t,a,s),null!=n){for(var u in n)a[u]=n[u];t=t.replace(/:([^\/]+)/g,function(e,t){return delete a[t],n[t]})}var c=d(a);c&&(t+="?"+c);var f=d(s);if(f&&(t+="#"+f),o){var h=i?i.state:null,v=i?i.title:null;e.onpopstate(),i&&i.replace?e.history.replaceState(h,v,l.prefix+t):e.history.pushState(h,v,l.prefix+t)}else e.location.href=l.prefix+t},l.defineRoutes=function(t,i,a){function s(){var n=l.getPath(),o={},s=r(n,o,o),u=e.history.state;if(null!=u)for(var c in u)o[c]=u[c];for(var f in t){var d=new RegExp("^"+f.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(d.test(s))return void s.replace(d,function(){for(var e=f.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2),a=0;a<e.length;a++)o[e[a].replace(/:|\./g,"")]=decodeURIComponent(r[a]);i(t[f],o,n,f)})}a(n,o)}o?e.onpopstate=n(s):"#"===l.prefix.charAt(0)&&(e.onhashchange=s),s()},l};c.route=function(e,t){var r,i,o,a,l,s=w(e),u=function(e){return e},c=function(e,c,f){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var d=function(){null!=r&&t.render(e,r(n(i,o.key,o)))},h=function(e){if(e===c)throw new Error("Could not resolve default route "+c);s.setPath(c,null,{replace:!0})};s.defineRoutes(f,function(e,t,n){var s=l=function(e,c){s===l&&(i=null==c||"function"!=typeof c.view&&"function"!=typeof c?"div":c,o=t,a=n,l=null,r=(e.render||u).bind(e),d())};e.view||"function"==typeof e?s({},e):e.onmatch?y.resolve(e.onmatch(t,n)).then(function(t){s(e,t)},h):s(e,"div")},h),t.subscribe(e,d)};return c.set=function(e,t,n){null!=l&&(n=n||{},n.replace=!0),l=null,s.setPath(e,t,n)},c.get=function(){return a},c.prefix=function(e){s.prefix=e},c.link=function(e){e.dom.setAttribute("href",s.prefix+e.attrs.href),e.dom.onclick=function(e){if(!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault(),e.redraw=!1;var t=this.getAttribute("href");0===t.indexOf(s.prefix)&&(t=t.slice(s.prefix.length)),c.set(t,void 0,void 0)}}},c.param=function(e){return void 0!==o&&void 0!==e?o[e]:o},c}(window,m),c.withAttr=function(e,t,n){return function(r){t.call(n||this,e in r.currentTarget?r.currentTarget[e]:r.currentTarget.getAttribute(e))}};var b=p(window);c.render=b.render,c.redraw=m.redraw,c.request=v.request,c.jsonp=v.jsonp,c.parseQueryString=g,c.buildQueryString=d,c.version="1.1.3",c.vnode=n,void 0!==t?t.exports=c:window.m=c}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,n,r){!function(e){"use strict";function r(){}function i(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}function a(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&a(e.listener)}var l=r.prototype,s=e.EventEmitter;l.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},l.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},l.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},l.addListener=function(e,t){if(!a(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),o="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&-1===i(r[n],t)&&r[n].push(o?t:{listener:t,once:!1});return this},l.on=o("addListener"),l.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},l.once=o("addOnceListener"),l.defineEvent=function(e){return this.getListeners(e),this},l.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},l.removeListener=function(e,t){var n,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&-1!==(n=i(o[r],t))&&o[r].splice(n,1);return this},l.off=o("removeListener"),l.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},l.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},l.manipulateListeners=function(e,t,n){var r,i,o=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)o.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?o.call(this,r,i):a.call(this,r,i));return this},l.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},
|
2 |
+
l.removeAllListeners=o("removeEvent"),l.emitEvent=function(e,t){var n,r,i,o,a=this.getListenersAsObject(e);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=0;i<n.length;i++)r=n[i],!0===r.once&&this.removeListener(e,r.listener),r.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},l.trigger=o("emitEvent"),l.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},l.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},l._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},l._getEvents=function(){return this._events||(this._events={})},r.noConflict=function(){return e.EventEmitter=s,r},"function"==typeof t&&t.amd?t(function(){return r}):"object"==typeof n&&n.exports?n.exports=r:e.EventEmitter=r}(this||{})},{}]},{},[1])}();
|
3 |
//# sourceMappingURL=admin.min.js.map
|
assets/js/admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["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","window","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","ListFetcher","mount","mc4wp","deps","mithril","./admin/helpers.js","./admin/list-fetcher.js","./admin/settings.js","./admin/tabs.js","wolfy87-eventemitter","2","toggleElement","selector","elements","querySelectorAll","show","clientHeight","style","display","bindEventToElement","element","event","handler","addEventListener","attachEvent","bindEventToElements","Array","prototype","forEach","debounce","func","wait","immediate","timeout","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","showIfElements","getAttribute","checked","value","conditionMet","config","hide","visibility","opacity","inputs","inputElement","removeAttribute","setAttribute","JSON","parse","parentElements","parentElement","3","working","done","mailchimp","api_connected","lists","fetch","$","jQuery","mc4wp_vars","i18n","preventDefault","post","ajaxurl","action","data","success","location","reload","bind","fail","always","redraw","view","method","onsubmit","type","fetching_mailchimp_lists","renew_mailchimp_lists","className","disabled","trust","fetching_mailchimp_lists_can_take_a_while","fetching_mailchimp_lists_done","fetching_mailchimp_lists_error","4","_typeof","Symbol","iterator","obj","constructor","Settings","getSelectedListsWhere","searchKey","searchValue","selectedLists","filter","el","getSelectedLists","updateSelectedLists","listInputs","input","push","trigger","toggleVisibleLists","rows","replace","querySelector","on","5","URL","Tabs","get","id","_open","tab","updateState","$tabs","removeClass","css","$tabNavs","nav","blur","url","setParameter","href","history","pushState","title","refererField","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","returnValue","$context","find","each","substring","first","text","open","click","body","activeTab","replaceState","state","./url.js","6","query","hasOwnProperty","b","decodeURIComponent","build","ret","d","encodeURIComponent","join","key","7","global","Vnode","tag","attrs0","children","dom","attrs","domSize","_state","instance","skip","compileSelector","classes","selectorParser","exec","attrValue","selectorCache","execSelector","childList","hasAttrs","class","hasOwn","isArray","hyperscript","start","cached","normalized","normalizeChildren","throttle","callback","last","pending","requestAnimationFrame","now","Date","normalize","node","html","fragment","attrs1","PromisePolyfill","executor","list","shouldAbsorb","execute","then","callAsync","console","error","resolvers","rejectors","retry","self","TypeError","executeOnce","rejectCurrent","run","fn","runs","onerror","resolveCurrent","_instance","setImmediate","onFulfilled","onRejection","handle","next","resolveNext","rejectNext","promise","resolve","reject","catch","all","total","count","values","consume","race","Promise","buildQueryString","object","destructure","key0","Object","toString","FILE_PROTOCOL_REGEX","RegExp","requestService","$window","setCompletionCallback","oncompletion","finalizer","complete","finalize","promise0","then0","extra","request","toUpperCase","useBody","serialize","FormData","stringify","deserialize","extract","interpolate","assemble","xhr","XMLHttpRequest","aborted","_abort","abort","async","user","password","setRequestHeader","withCredentials","headers","onreadystatechange","readyState","response","status","test","cast","responseText","send","background","jsonp","callbackName","Math","round","random","callbackCount","script","createElement","parentNode","removeChild","callbackKey","src","documentElement","appendChild","tokens","slice","querystring","indexOf","type0","coreRenderer","setEventCallback","onevent","createNodes","parent","vnodes","end","hooks","nextSibling","ns","vnode","createNode","createComponent","initLifecycle","createText","createHTML","createFragment","$doc","createTextNode","insertNode","match1","parent1","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","temp","innerHTML","firstChild","childNodes","child","createDocumentFragment","attrs2","is","createElementNS","setAttrs","contenteditable","setContentEditable","textContent","setLateAttrs","initComponent","sentinel","create","$$reentrantLock$$","$emptyFragment","updateNodes","old","recycling","removeNodes","isUnkeyed","getNextSibling","updateNode","isRecyclable","pool","concat","map","oldStart","oldEnd","v","shouldRecycle","toFragment","getKeyMap","oldIndex","movable","oldTag","shouldNotUpdate","updateLifecycle","updateText","updateHTML","updateFragment","updateElement","updateComponent","removeNode","nodeValue","updateAttrs","abs","oldChildrenLength","poolChildrenLength","vnodesChildrenLength","key2","count0","insertBefore","content","continuation","called","expected","onremove","removeNodeFromDOM","hasIntegrationMethods","onbeforeremove","result","setAttr","isFormAttribute","isLifecycleMethod","nsLastIndex","substr","setAttributeNS","updateEvent","updateStyle","isAttribute","isCustomElement","activeElement","selectedIndex","attr","source","oncreate","onupdate","cssText","eventName","removeEventListener","oninit","forceVnodeUpdate","forceComponentUpdate","onbeforeupdate","render","active","focus","redrawService","subscribe","key1","unsubscribe","callbacks","index","splice","renderService","redrawService0","root","component","run0","parseQueryString","string","charAt","entries","data0","counters","entry","key5","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","isValue","coreRouter","normalize1","fragment0","debounceAsync","callback0","asyncId","callAsync0","parsePath","path","queryData","hashData","queryIndex","hashIndex","pathEnd","queryEnd","queryParams","key4","hashParams","supportsPushState","router","prefix","getPath","setPath","options","match2","token","hash","onpopstate","defineRoutes","routes","resolveRoute","params","pathname","k","route0","matcher","keys","onhashchange","route","render1","attrs3","currentPath","lastUpdate","routeService","identity","defaultRoute","run1","bail","payload","update","routeResolver","comp","onmatch","resolved","set","prefix0","link","vnode1","onclick","ctrlKey","metaKey","shiftKey","which","param","key3","withAttr","attrName","callback1","currentTarget","_28","version","8","indexOfListener","listeners","listener","alias","name","isValidListener","proto","originalGlobalValue","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,GAAIA,OAAUC,GAAeC,MAASD,IAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,E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AAM,aAUtBG,EAAM6B,KAAO,SAAc1B,GACvB,GAAIvgB,GAAOT,MAAMC,UAAUkS,MAAM3U,KAAKkD,UAAW,EACjD,OAAOF,MAAK+hB,UAAUvB,EAAKvgB,IAW/BogB,EAAM8B,mBAAqB,SAA4BxhB,GAEnD,MADAX,MAAKoiB,iBAAmBzhB,EACjBX,MAWXqgB,EAAM4B,oBAAsB,WACxB,OAAIjiB,KAAKkI,eAAe,qBACblI,KAAKoiB,kBAapB/B,EAAMI,WAAa,WACf,MAAOzgB,MAAK6hB,UAAY7hB,KAAK6hB,aAQjCvkB,EAAa+kB,WAAa,WAEtB,MADAtlB,GAAQO,aAAegjB,EAChBhjB,GAIW,kBAAXrB,IAAyBA,EAAOqmB,IACvCrmB,EAAO,WACH,MAAOqB,KAGY,gBAAXH,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUO,EAGjBP,EAAQO,aAAeA,GAE7B0C,oBAES","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (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})({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\n\nvar m = window.m = require('mithril');\nvar EventEmitter = require('wolfy87-eventemitter');\n\n// vars\nvar context = document.getElementById('mc4wp-admin');\nvar events = new EventEmitter();\nvar tabs = require('./admin/tabs.js')(context);\nvar helpers = require('./admin/helpers.js');\nvar settings = require('./admin/settings.js')(context, helpers, events);\n\n// list fetcher\nvar ListFetcher = require('./admin/list-fetcher.js');\nvar mount = document.getElementById('mc4wp-list-fetcher');\nif (mount) {\n m.mount(mount, new ListFetcher());\n}\n\n// expose some things\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.deps = window.mc4wp.deps || {};\nwindow.mc4wp.deps.mithril = m;\nwindow.mc4wp.helpers = helpers;\nwindow.mc4wp.events = events;\nwindow.mc4wp.settings = settings;\nwindow.mc4wp.tabs = tabs;\n\n},{\"./admin/helpers.js\":2,\"./admin/list-fetcher.js\":3,\"./admin/settings.js\":4,\"./admin/tabs.js\":5,\"mithril\":7,\"wolfy87-eventemitter\":8}],2:[function(require,module,exports){\n'use strict';\n\nvar helpers = {};\n\nhelpers.toggleElement = function (selector) {\n\tvar elements = document.querySelectorAll(selector);\n\tfor (var i = 0; i < elements.length; i++) {\n\t\tvar show = elements[i].clientHeight <= 0;\n\t\telements[i].style.display = show ? '' : 'none';\n\t}\n};\n\nhelpers.bindEventToElement = function (element, event, handler) {\n\tif (element.addEventListener) {\n\t\telement.addEventListener(event, handler);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent('on' + event, handler);\n\t}\n};\n\nhelpers.bindEventToElements = function (elements, event, handler) {\n\tArray.prototype.forEach.call(elements, function (element) {\n\t\thelpers.bindEventToElement(element, event, handler);\n\t});\n};\n\n// polling\nhelpers.debounce = function (func, wait, immediate) {\n\tvar timeout;\n\treturn function () {\n\t\tvar context = this,\n\t\t args = arguments;\n\t\tvar later = function later() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\n/**\n * Showif.js\n */\n(function () {\n\tvar showIfElements = document.querySelectorAll('[data-showif]');\n\n\t// dependent elements\n\tArray.prototype.forEach.call(showIfElements, function (element) {\n\t\tvar config = JSON.parse(element.getAttribute('data-showif'));\n\t\tvar parentElements = document.querySelectorAll('[name=\"' + config.element + '\"]');\n\t\tvar inputs = element.querySelectorAll('input,select,textarea:not([readonly])');\n\t\tvar hide = config.hide === undefined || config.hide;\n\n\t\tfunction toggleElement() {\n\n\t\t\t// do nothing with unchecked radio inputs\n\t\t\tif (this.getAttribute('type') === \"radio\" && !this.checked) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar value = this.getAttribute(\"type\") === \"checkbox\" ? this.checked : this.value;\n\t\t\tvar conditionMet = value == config.value;\n\n\t\t\tif (hide) {\n\t\t\t\telement.style.display = conditionMet ? '' : 'none';\n\t\t\t\telement.style.visibility = conditionMet ? '' : 'hidden';\n\t\t\t} else {\n\t\t\t\telement.style.opacity = conditionMet ? '' : '0.4';\n\t\t\t}\n\n\t\t\t// disable input fields to stop sending their values to server\n\t\t\tArray.prototype.forEach.call(inputs, function (inputElement) {\n\t\t\t\tconditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly', 'readonly');\n\t\t\t});\n\t\t}\n\n\t\t// find checked element and call toggleElement function\n\t\tArray.prototype.forEach.call(parentElements, function (parentElement) {\n\t\t\ttoggleElement.call(parentElement);\n\t\t});\n\n\t\t// bind on all changes\n\t\thelpers.bindEventToElements(parentElements, 'change', toggleElement);\n\t});\n})();\n\nmodule.exports = helpers;\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar $ = window.jQuery;\nvar config = mc4wp_vars;\nvar i18n = config.i18n;\n\nfunction ListFetcher() {\n this.working = false;\n this.done = false;\n\n // start fetching right away when no lists but api key given\n if (config.mailchimp.api_connected && config.mailchimp.lists.length === 0) {\n this.fetch();\n }\n}\n\nListFetcher.prototype.fetch = function (e) {\n e && e.preventDefault();\n\n this.working = true;\n this.done = false;\n\n $.post(ajaxurl, {\n action: \"mc4wp_renew_mailchimp_lists\",\n timeout: 180000\n }).done(function (data) {\n this.success = true;\n\n if (data) {\n window.setTimeout(function () {\n window.location.reload();\n }, 3000);\n }\n }.bind(this)).fail(function (data) {\n this.success = false;\n }.bind(this)).always(function (data) {\n this.working = false;\n this.done = true;\n\n m.redraw();\n }.bind(this));\n};\n\nListFetcher.prototype.view = function () {\n return m('form', {\n method: \"POST\",\n onsubmit: this.fetch.bind(this)\n }, [m('p', [m('input', {\n type: \"submit\",\n value: this.working ? i18n.fetching_mailchimp_lists : i18n.renew_mailchimp_lists,\n className: \"button\",\n disabled: !!this.working\n }), m.trust(' '), this.working ? [m('span.mc4wp-loader', \"Loading...\"), m.trust(' '), m('em.help', i18n.fetching_mailchimp_lists_can_take_a_while)] : '', this.done ? [this.success ? m('em.help.green', i18n.fetching_mailchimp_lists_done) : m('em.help.red', i18n.fetching_mailchimp_lists_error)] : ''])]);\n};\n\nmodule.exports = ListFetcher;\n\n},{}],4:[function(require,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar Settings = function Settings(context, helpers, events) {\n\t'use strict';\n\n\t// vars\n\n\tvar form = context.querySelector('form');\n\tvar listInputs = context.querySelectorAll('.mc4wp-list-input');\n\tvar lists = mc4wp_vars.mailchimp.lists;\n\tvar selectedLists = [];\n\n\t// functions\n\tfunction getSelectedListsWhere(searchKey, searchValue) {\n\t\treturn selectedLists.filter(function (el) {\n\t\t\treturn el[searchKey] === searchValue;\n\t\t});\n\t}\n\n\tfunction getSelectedLists() {\n\t\treturn selectedLists;\n\t}\n\n\tfunction updateSelectedLists() {\n\t\tselectedLists = [];\n\n\t\tArray.prototype.forEach.call(listInputs, function (input) {\n\t\t\t// skip unchecked checkboxes\n\t\t\tif (typeof input.checked === \"boolean\" && !input.checked) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_typeof(lists[input.value]) === \"object\") {\n\t\t\t\tselectedLists.push(lists[input.value]);\n\t\t\t}\n\t\t});\n\n\t\tevents.trigger('selectedLists.change', [selectedLists]);\n\t\treturn selectedLists;\n\t}\n\n\tfunction toggleVisibleLists() {\n\t\tvar rows = document.querySelectorAll('.lists--only-selected > *');\n\t\tArray.prototype.forEach.call(rows, function (el) {\n\n\t\t\tvar listId = el.getAttribute('data-list-id');\n\t\t\tvar isSelected = getSelectedListsWhere('id', listId).length > 0;\n\n\t\t\tif (isSelected) {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class').replace('hidden', ''));\n\t\t\t} else {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class') + \" hidden\");\n\t\t\t}\n\t\t});\n\t}\n\n\tevents.on('selectedLists.change', toggleVisibleLists);\n\thelpers.bindEventToElements(listInputs, 'change', updateSelectedLists);\n\n\tupdateSelectedLists();\n\n\treturn {\n\t\tgetSelectedLists: getSelectedLists\n\t};\n};\n\nmodule.exports = Settings;\n\n},{}],5:[function(require,module,exports){\n'use strict';\n\nvar URL = require('./url.js');\n\n// Tabs\nvar Tabs = function Tabs(context) {\n\n\t// TODO: last piece of jQuery... can we get rid of it?\n\tvar $ = window.jQuery;\n\n\tvar $context = $(context);\n\tvar $tabs = $context.find('.tab');\n\tvar $tabNavs = $context.find('.nav-tab');\n\tvar refererField = context.querySelector('input[name=\"_wp_http_referer\"]');\n\tvar tabs = [];\n\n\t$.each($tabs, function (i, t) {\n\t\tvar id = t.id.substring(4);\n\t\tvar title = $(t).find('h2').first().text();\n\n\t\ttabs.push({\n\t\t\tid: id,\n\t\t\ttitle: title,\n\t\t\telement: t,\n\t\t\tnav: context.querySelectorAll('.nav-tab-' + id),\n\t\t\topen: function open() {\n\t\t\t\treturn _open(id);\n\t\t\t}\n\t\t});\n\t});\n\n\tfunction get(id) {\n\n\t\tfor (var i = 0; i < tabs.length; i++) {\n\t\t\tif (tabs[i].id === id) {\n\t\t\t\treturn tabs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction _open(tab, updateState) {\n\n\t\t// make sure we have a tab object\n\t\tif (typeof tab === \"string\") {\n\t\t\ttab = get(tab);\n\t\t}\n\n\t\tif (!tab) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// should we update state?\n\t\tif (updateState == undefined) {\n\t\t\tupdateState = true;\n\t\t}\n\n\t\t// hide all tabs & remove active class\n\t\t$tabs.removeClass('tab-active').css('display', 'none');\n\t\t$tabNavs.removeClass('nav-tab-active');\n\n\t\t// add `nav-tab-active` to this tab\n\t\tArray.prototype.forEach.call(tab.nav, function (nav) {\n\t\t\tnav.className += \" nav-tab-active\";\n\t\t\tnav.blur();\n\t\t});\n\n\t\t// show target tab\n\t\ttab.element.style.display = 'block';\n\t\ttab.element.className += \" tab-active\";\n\n\t\t// create new URL\n\t\tvar url = URL.setParameter(window.location.href, \"tab\", tab.id);\n\n\t\t// update hash\n\t\tif (history.pushState && updateState) {\n\t\t\thistory.pushState(tab.id, '', url);\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\n\t\t// update referer field\n\t\trefererField.value = url;\n\n\t\t// if thickbox is open, close it.\n\t\tif (typeof tb_remove === \"function\") {\n\t\t\ttb_remove();\n\t\t}\n\n\t\t// refresh editor after switching tabs\n\t\t// TODO: decouple this! law of demeter etc.\n\t\tif (tab.id === 'fields' && window.mc4wp && window.mc4wp.forms && window.mc4wp.forms.editor) {\n\t\t\tmc4wp.forms.editor.refresh();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction title(tab) {\n\t\tvar title = document.title.split('-');\n\t\tdocument.title = document.title.replace(title[0], tab.title + \" \");\n\t}\n\n\tfunction switchTab(e) {\n\t\te = e || window.event;\n\n\t\t// get from data attribute\n\t\tvar tabId = this.getAttribute('data-tab');\n\n\t\t// get from classname\n\t\tif (!tabId) {\n\t\t\tvar match = this.className.match(/nav-tab-(\\w+)?/);\n\t\t\tif (match) {\n\t\t\t\ttabId = match[1];\n\t\t\t}\n\t\t}\n\n\t\t// get from href\n\t\tif (!tabId) {\n\t\t\tvar urlParams = URL.parse(this.href);\n\t\t\tif (!urlParams.tab) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttabId = urlParams.tab;\n\t\t}\n\n\t\tvar opened = _open(tabId);\n\n\t\tif (opened) {\n\t\t\te.preventDefault();\n\t\t\te.returnValue = false;\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction init() {\n\n\t\t// check for current tab\n\t\tif (!history.pushState) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeTab = $tabs.filter(':visible').get(0);\n\t\tif (!activeTab) {\n\t\t\treturn;\n\t\t}\n\t\tvar tab = get(activeTab.id.substring(4));\n\t\tif (!tab) return;\n\n\t\t// check if tab is in html5 history\n\t\tif (history.replaceState && history.state === null) {\n\t\t\thistory.replaceState(tab.id, '');\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\t}\n\n\t$tabNavs.click(switchTab);\n\t$(document.body).on('click', '.tab-link', switchTab);\n\tinit();\n\n\tif (window.addEventListener && history.pushState) {\n\t\twindow.addEventListener('popstate', function (e) {\n\t\t\tif (!e.state) return true;\n\t\t\tvar tabId = e.state;\n\t\t\treturn _open(tabId, false);\n\t\t});\n\t}\n\n\treturn {\n\t\topen: _open,\n\t\tget: get\n\t};\n};\n\nmodule.exports = Tabs;\n\n},{\"./url.js\":6}],6:[function(require,module,exports){\n'use strict';\n\nvar URL = {\n\tparse: function parse(url) {\n\t\tvar query = {};\n\t\tvar a = url.split('&');\n\t\tfor (var i in a) {\n\t\t\tif (!a.hasOwnProperty(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar b = a[i].split('=');\n\t\t\tquery[decodeURIComponent(b[0])] = decodeURIComponent(b[1]);\n\t\t}\n\n\t\treturn query;\n\t},\n\tbuild: function build(data) {\n\t\tvar ret = [];\n\t\tfor (var d in data) {\n\t\t\tret.push(d + \"=\" + encodeURIComponent(data[d]));\n\t\t}return ret.join(\"&\");\n\t},\n\tsetParameter: function setParameter(url, key, value) {\n\t\tvar data = URL.parse(url);\n\t\tdata[key] = value;\n\t\treturn URL.build(data);\n\t}\n};\n\nmodule.exports = URL;\n\n},{}],7:[function(require,module,exports){\n(function (global){\n;(function() {\n\"use strict\"\nfunction Vnode(tag, key, attrs0, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: undefined, _state: undefined, events: undefined, instance: undefined, skip: false}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node != null && typeof node !== \"object\") return Vnode(\"#\", undefined, undefined, node === false ? \"\" : node, undefined, undefined)\n\treturn node\n}\nVnode.normalizeChildren = function normalizeChildren(children) {\n\tfor (var i = 0; i < children.length; i++) {\n\t\tchildren[i] = Vnode.normalize(children[i])\n\t}\n\treturn children\n}\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\nfunction execSelector(state, attrs, children) {\n\tvar hasAttrs = false, childList, text\n\tvar className = attrs.className || attrs.class\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key)) {\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className !== undefined) {\n\t\tif (attrs.class !== undefined) {\n\t\t\tattrs.class = undefined\n\t\t\tattrs.className = className\n\t\t}\n\t\tif (state.attrs.className != null) {\n\t\t\tattrs.className = state.attrs.className + \" \" + className\n\t\t}\n\t}\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\thasAttrs = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\ttext = children[0].children\n\t} else {\n\t\tchildList = children\n\t}\n\treturn Vnode(state.tag, attrs.key, hasAttrs ? attrs : undefined, childList, text)\n}\nfunction hyperscript(selector) {\n\t// Because sloppy mode sucks\n\tvar attrs = arguments[1], start = 2, children\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\tif (typeof selector === \"string\") {\n\t\tvar cached = selectorCache[selector] || compileSelector(selector)\n\t}\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = 1\n\t}\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\tvar normalized = Vnode.normalizeChildren(children)\n\tif (typeof selector === \"string\") {\n\t\treturn execSelector(cached, attrs, normalized)\n\t} else {\n\t\treturn Vnode(selector, attrs.key, attrs, normalized)\n\t}\n}\nhyperscript.trust = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\nhyperscript.fragment = function(attrs1, children) {\n\treturn Vnode(\"[\", attrs1.key, attrs1, Vnode.normalizeChildren(children), undefined, undefined)\n}\nvar m = hyperscript\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") window.Promise = PromisePolyfill\n\tvar PromisePolyfill = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") global.Promise = PromisePolyfill\n\tvar PromisePolyfill = global.Promise\n} else {\n}\nvar buildQueryString = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\tvar args = []\n\tfor (var key0 in object) {\n\t\tdestructure(key0, object[key0])\n\t}\n\treturn args.join(\"&\")\n\tfunction destructure(key0, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key0 + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key0 + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key0) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\nvar FILE_PROTOCOL_REGEX = new RegExp(\"^file://\", \"i\")\nvar _8 = function($window, Promise) {\n\tvar callbackCount = 0\n\tvar oncompletion\n\tfunction setCompletionCallback(callback) {oncompletion = callback}\n\tfunction finalizer() {\n\t\tvar count = 0\n\t\tfunction complete() {if (--count === 0 && typeof oncompletion === \"function\") oncompletion()}\n\t\treturn function finalize(promise0) {\n\t\t\tvar then0 = promise0.then\n\t\t\tpromise0.then = function() {\n\t\t\t\tcount++\n\t\t\t\tvar next = then0.apply(promise0, arguments)\n\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\tcomplete()\n\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t})\n\t\t\t\treturn finalize(next)\n\t\t\t}\n\t\t\treturn promise0\n\t\t}\n\t}\n\tfunction normalize(args, extra) {\n\t\tif (typeof args === \"string\") {\n\t\t\tvar url = args\n\t\t\targs = extra || {}\n\t\t\tif (args.url == null) args.url = url\n\t\t}\n\t\treturn args\n\t}\n\tfunction request(args, extra) {\n\t\tvar finalize = finalizer()\n\t\targs = normalize(args, extra)\n\t\tvar promise0 = new Promise(function(resolve, reject) {\n\t\t\tif (args.method == null) args.method = \"GET\"\n\t\t\targs.method = args.method.toUpperCase()\n\t\t\tvar useBody = (args.method === \"GET\" || args.method === \"TRACE\") ? false : (typeof args.useBody === \"boolean\" ? args.useBody : true)\n\t\t\tif (typeof args.serialize !== \"function\") args.serialize = typeof FormData !== \"undefined\" && args.data instanceof FormData ? function(value) {return value} : JSON.stringify\n\t\t\tif (typeof args.deserialize !== \"function\") args.deserialize = deserialize\n\t\t\tif (typeof args.extract !== \"function\") args.extract = extract\n\t\t\targs.url = interpolate(args.url, args.data)\n\t\t\tif (useBody) args.data = args.serialize(args.data)\n\t\t\telse args.url = assemble(args.url, args.data)\n\t\t\tvar xhr = new $window.XMLHttpRequest(),\n\t\t\t\taborted = false,\n\t\t\t\t_abort = xhr.abort\n\t\t\txhr.abort = function abort() {\n\t\t\t\taborted = true\n\t\t\t\t_abort.call(xhr)\n\t\t\t}\n\t\t\txhr.open(args.method, args.url, typeof args.async === \"boolean\" ? args.async : true, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\t\t\tif (args.serialize === JSON.stringify && useBody) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (args.deserialize === deserialize) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tfor (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t}\n\t\t\tif (typeof args.config === \"function\") xhr = args.config(xhr, args) || xhr\n\t\t\txhr.onreadystatechange = function() {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif(aborted) return\n\t\t\t\tif (xhr.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args))\n\t\t\t\t\t\tif ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304 || FILE_PROTOCOL_REGEX.test(args.url)) {\n\t\t\t\t\t\t\tresolve(cast(args.type, response))\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar error = new Error(xhr.responseText)\n\t\t\t\t\t\t\tfor (var key in response) error[key] = response[key]\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (useBody && (args.data != null)) xhr.send(args.data)\n\t\t\telse xhr.send()\n\t\t})\n\t\treturn args.background === true ? promise0 : finalize(promise0)\n\t}\n\tfunction jsonp(args, extra) {\n\t\tvar finalize = finalizer()\n\t\targs = normalize(args, extra)\n\t\tvar promise0 = new Promise(function(resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(cast(args.type, data))\n\t\t\t\tdelete $window[callbackName]\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t\tdelete $window[callbackName]\n\t\t\t}\n\t\t\tif (args.data == null) args.data = {}\n\t\t\targs.url = interpolate(args.url, args.data)\n\t\t\targs.data[args.callbackKey || \"callback\"] = callbackName\n\t\t\tscript.src = assemble(args.url, args.data)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t})\n\t\treturn args.background === true? promise0 : finalize(promise0)\n\t}\n\tfunction interpolate(url, data) {\n\t\tif (data == null) return url\n\t\tvar tokens = url.match(/:[^\\/]+/gi) || []\n\t\tfor (var i = 0; i < tokens.length; i++) {\n\t\t\tvar key = tokens[i].slice(1)\n\t\t\tif (data[key] != null) {\n\t\t\t\turl = url.replace(tokens[i], data[key])\n\t\t\t}\n\t\t}\n\t\treturn url\n\t}\n\tfunction assemble(url, data) {\n\t\tvar querystring = buildQueryString(data)\n\t\tif (querystring !== \"\") {\n\t\t\tvar prefix = url.indexOf(\"?\") < 0 ? \"?\" : \"&\"\n\t\t\turl += prefix + querystring\n\t\t}\n\t\treturn url\n\t}\n\tfunction deserialize(data) {\n\t\ttry {return data !== \"\" ? JSON.parse(data) : null}\n\t\tcatch (e) {throw new Error(data)}\n\t}\n\tfunction extract(xhr) {return xhr.responseText}\n\tfunction cast(type0, data) {\n\t\tif (typeof type0 === \"function\") {\n\t\t\tif (Array.isArray(data)) {\n\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\tdata[i] = new type0(data[i])\n\t\t\t\t}\n\t\t\t}\n\t\t\telse return new type0(data)\n\t\t}\n\t\treturn data\n\t}\n\treturn {request: request, jsonp: jsonp, setCompletionCallback: setCompletionCallback}\n}\nvar requestService = _8(window, PromisePolyfill)\nvar coreRenderer = function($window) {\n\tvar $doc = $window.document\n\tvar $emptyFragment = $doc.createDocumentFragment()\n\tvar onevent\n\tfunction setEventCallback(callback) {return onevent = callback}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": return createText(parent, vnode, nextSibling)\n\t\t\t\tcase \"<\": return createHTML(parent, vnode, nextSibling)\n\t\t\t\tcase \"[\": return createFragment(parent, vnode, hooks, ns, nextSibling)\n\t\t\t\tdefault: return createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse return createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t\treturn vnode.dom\n\t}\n\tfunction createHTML(parent, vnode, nextSibling) {\n\t\tvar match1 = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\tvar parent1 = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}[match1[1]] || \"div\"\n\t\tvar temp = $doc.createElement(parent1)\n\t\ttemp.innerHTML = vnode.children\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t\treturn fragment\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t\treturn fragment\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tswitch (vnode.tag) {\n\t\t\tcase \"svg\": ns = \"http://www.w3.org/2000/svg\"; break\n\t\t\tcase \"math\": ns = \"http://www.w3.org/1998/Math/MathML\"; break\n\t\t}\n\t\tvar attrs2 = vnode.attrs\n\t\tvar is = attrs2 && attrs2.is\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\t\tif (attrs2 != null) {\n\t\t\tsetAttrs(vnode, attrs2, ns)\n\t\t}\n\t\tinsertNode(parent, element, nextSibling)\n\t\tif (vnode.attrs != null && vnode.attrs.contenteditable != null) {\n\t\t\tsetContentEditable(vnode)\n\t\t}\n\t\telse {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tsetLateAttrs(vnode)\n\t\t\t}\n\t\t}\n\t\treturn element\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return $emptyFragment\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return $emptyFragment\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tvnode._state = vnode.state\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tinitLifecycle(vnode._state, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tvar element = createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t\tinsertNode(parent, element, nextSibling)\n\t\t\treturn element\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t\treturn $emptyFragment\n\t\t}\n\t}\n\t//update\n\tfunction updateNodes(parent, old, vnodes, recycling, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, undefined)\n\t\telse if (vnodes == null) removeNodes(old, 0, old.length, vnodes)\n\t\telse {\n\t\t\tif (old.length === vnodes.length) {\n\t\t\t\tvar isUnkeyed = false\n\t\t\t\tfor (var i = 0; i < vnodes.length; i++) {\n\t\t\t\t\tif (vnodes[i] != null && old[i] != null) {\n\t\t\t\t\t\tisUnkeyed = vnodes[i].key == null && old[i].key == null\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isUnkeyed) {\n\t\t\t\t\tfor (var i = 0; i < old.length; i++) {\n\t\t\t\t\t\tif (old[i] === vnodes[i]) continue\n\t\t\t\t\t\telse if (old[i] == null && vnodes[i] != null) createNode(parent, vnodes[i], hooks, ns, getNextSibling(old, i + 1, nextSibling))\n\t\t\t\t\t\telse if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes)\n\t\t\t\t\t\telse updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), recycling, ns)\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\trecycling = recycling || isRecyclable(old, vnodes)\n\t\t\tif (recycling) {\n\t\t\t\tvar pool = old.pool\n\t\t\t\told = old.concat(old.pool)\n\t\t\t}\n\t\t\tvar oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map\n\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\tvar o = old[oldStart], v = vnodes[start]\n\t\t\t\tif (o === v && !recycling) oldStart++, start++\n\t\t\t\telse if (o == null) oldStart++\n\t\t\t\telse if (v == null) start++\n\t\t\t\telse if (o.key === v.key) {\n\t\t\t\t\tvar shouldRecycle = (pool != null && oldStart >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tupdateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), shouldRecycle, ns)\n\t\t\t\t\tif (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar o = old[oldEnd]\n\t\t\t\t\tif (o === v && !recycling) oldEnd--, start++\n\t\t\t\t\telse if (o == null) oldEnd--\n\t\t\t\t\telse if (v == null) start++\n\t\t\t\t\telse if (o.key === v.key) {\n\t\t\t\t\t\tvar shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\t\tupdateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)\n\t\t\t\t\t\tif (recycling || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, nextSibling))\n\t\t\t\t\t\toldEnd--, start++\n\t\t\t\t\t}\n\t\t\t\t\telse break\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\tvar o = old[oldEnd], v = vnodes[end]\n\t\t\t\tif (o === v && !recycling) oldEnd--, end--\n\t\t\t\telse if (o == null) oldEnd--\n\t\t\t\telse if (v == null) end--\n\t\t\t\telse if (o.key === v.key) {\n\t\t\t\t\tvar shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\tupdateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)\n\t\t\t\t\tif (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)\n\t\t\t\t\tif (o.dom != null) nextSibling = o.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!map) map = getKeyMap(old, oldEnd)\n\t\t\t\t\tif (v != null) {\n\t\t\t\t\t\tvar oldIndex = map[v.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tvar movable = old[oldIndex]\n\t\t\t\t\t\t\tvar shouldRecycle = (pool != null && oldIndex >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\t\t\tupdateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns)\n\t\t\t\t\t\t\tinsertNode(parent, toFragment(movable), nextSibling)\n\t\t\t\t\t\t\told[oldIndex].skip = true\n\t\t\t\t\t\t\tif (movable.dom != null) nextSibling = movable.dom\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar dom = createNode(parent, v, hooks, undefined, nextSibling)\n\t\t\t\t\t\t\tnextSibling = dom\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tend--\n\t\t\t\t}\n\t\t\t\tif (end < start) break\n\t\t\t}\n\t\t\tcreateNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\tremoveNodes(old, oldStart, oldEnd + 1, vnodes)\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode._state = old._state\n\t\t\tvnode.events = old.events\n\t\t\tif (!recycling && shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tif (recycling) {\n\t\t\t\t\t\tvnode.state = {}\n\t\t\t\t\t\tinitLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t\t}\n\t\t\t\t\telse updateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, recycling, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(old, null)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\ttoFragment(old)\n\t\t\tcreateHTML(parent, vnode, nextSibling)\n\t\t}\n\t\telse vnode.dom = old.dom, vnode.domSize = old.domSize\n\t}\n\tfunction updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, recycling, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, recycling, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tswitch (vnode.tag) {\n\t\t\tcase \"svg\": ns = \"http://www.w3.org/2000/svg\"; break\n\t\t\tcase \"math\": ns = \"http://www.w3.org/1998/Math/MathML\"; break\n\t\t}\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle0 multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (vnode.attrs != null && vnode.attrs.contenteditable != null) {\n\t\t\tsetContentEditable(vnode)\n\t\t}\n\t\telse if (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t}\n\t\telse {\n\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\tupdateNodes(element, old.children, vnode.children, recycling, hooks, null, ns)\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) {\n\t\tif (recycling) {\n\t\t\tinitComponent(vnode, hooks)\n\t\t} else {\n\t\t\tvnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))\n\t\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tupdateLifecycle(vnode._state, vnode, hooks)\n\t\t}\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, recycling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(old.instance, null)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction isRecyclable(old, vnodes) {\n\t\tif (old.pool != null && Math.abs(old.pool.length - vnodes.length) <= Math.abs(old.length - vnodes.length)) {\n\t\t\tvar oldChildrenLength = old[0] && old[0].children && old[0].children.length || 0\n\t\t\tvar poolChildrenLength = old.pool[0] && old.pool[0].children && old.pool[0].children.length || 0\n\t\t\tvar vnodesChildrenLength = vnodes[0] && vnodes[0].children && vnodes[0].children.length || 0\n\t\t\tif (Math.abs(poolChildrenLength - vnodesChildrenLength) <= Math.abs(oldChildrenLength - vnodesChildrenLength)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\tfunction getKeyMap(vnodes, end) {\n\t\tvar map = {}, i = 0\n\t\tfor (var i = 0; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key2 = vnode.key\n\t\t\t\tif (key2 != null) map[key2] = i\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\tfunction toFragment(vnode) {\n\t\tvar count0 = vnode.domSize\n\t\tif (count0 != null || vnode.dom == null) {\n\t\t\tvar fragment = $doc.createDocumentFragment()\n\t\t\tif (count0 > 0) {\n\t\t\t\tvar dom = vnode.dom\n\t\t\t\twhile (--count0) fragment.appendChild(dom.nextSibling)\n\t\t\t\tfragment.insertBefore(dom, fragment.firstChild)\n\t\t\t}\n\t\t\treturn fragment\n\t\t}\n\t\telse return vnode.dom\n\t}\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling && nextSibling.parentNode) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\tfunction setContentEditable(vnode) {\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t}\n\t//remove\n\tfunction removeNodes(vnodes, start, end, context) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tif (vnode.skip) vnode.skip = false\n\t\t\t\telse removeNode(vnode, context)\n\t\t\t}\n\t\t}\n\t}\n\tfunction removeNode(vnode, context) {\n\t\tvar expected = 1, called = 0\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = vnode.attrs.onbeforeremove.call(vnode.state, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\texpected++\n\t\t\t\tresult.then(continuation, continuation)\n\t\t\t}\n\t\t}\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode._state.onbeforeremove === \"function\") {\n\t\t\tvar result = vnode._state.onbeforeremove.call(vnode.state, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\texpected++\n\t\t\t\tresult.then(continuation, continuation)\n\t\t\t}\n\t\t}\n\t\tcontinuation()\n\t\tfunction continuation() {\n\t\t\tif (++called === expected) {\n\t\t\t\tonremove(vnode)\n\t\t\t\tif (vnode.dom) {\n\t\t\t\t\tvar count0 = vnode.domSize || 1\n\t\t\t\t\tif (count0 > 1) {\n\t\t\t\t\t\tvar dom = vnode.dom\n\t\t\t\t\t\twhile (--count0) {\n\t\t\t\t\t\t\tremoveNodeFromDOM(dom.nextSibling)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tremoveNodeFromDOM(vnode.dom)\n\t\t\t\t\tif (context != null && vnode.domSize == null && !hasIntegrationMethods(vnode.attrs) && typeof vnode.tag === \"string\") { //TODO test custom elements\n\t\t\t\t\t\tif (!context.pool) context.pool = [vnode]\n\t\t\t\t\t\telse context.pool.push(vnode)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction removeNodeFromDOM(node) {\n\t\tvar parent = node.parentNode\n\t\tif (parent != null) parent.removeChild(node)\n\t}\n\tfunction onremove(vnode) {\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") vnode.attrs.onremove.call(vnode.state, vnode)\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode._state.onremove === \"function\") vnode._state.onremove.call(vnode.state, vnode)\n\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\telse {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//attrs2\n\tfunction setAttrs(vnode, attrs2, ns) {\n\t\tfor (var key2 in attrs2) {\n\t\t\tsetAttr(vnode, key2, null, attrs2[key2], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key2, old, value, ns) {\n\t\tvar element = vnode.dom\n\t\tif (key2 === \"key\" || key2 === \"is\" || (old === value && !isFormAttribute(vnode, key2)) && typeof value !== \"object\" || typeof value === \"undefined\" || isLifecycleMethod(key2)) return\n\t\tvar nsLastIndex = key2.indexOf(\":\")\n\t\tif (nsLastIndex > -1 && key2.substr(0, nsLastIndex) === \"xlink\") {\n\t\t\telement.setAttributeNS(\"http://www.w3.org/1999/xlink\", key2.slice(nsLastIndex + 1), value)\n\t\t}\n\t\telse if (key2[0] === \"o\" && key2[1] === \"n\" && typeof value === \"function\") updateEvent(vnode, key2, value)\n\t\telse if (key2 === \"style\") updateStyle(element, old, value)\n\t\telse if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) {\n\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\tif (vnode.tag === \"input\" && key2 === \"value\" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return\n\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\tif (vnode.tag === \"select\" && key2 === \"value\" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return\n\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\tif (vnode.tag === \"option\" && key2 === \"value\" && vnode.dom.value == value) return\n\t\t\t// If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.\n\t\t\tif (vnode.tag === \"input\" && key2 === \"type\") {\n\t\t\t\telement.setAttribute(key2, value)\n\t\t\t\treturn\n\t\t\t}\n\t\t\telement[key2] = value\n\t\t}\n\t\telse {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) element.setAttribute(key2, \"\")\n\t\t\t\telse element.removeAttribute(key2)\n\t\t\t}\n\t\t\telse element.setAttribute(key2 === \"className\" ? \"class\" : key2, value)\n\t\t}\n\t}\n\tfunction setLateAttrs(vnode) {\n\t\tvar attrs2 = vnode.attrs\n\t\tif (vnode.tag === \"select\" && attrs2 != null) {\n\t\t\tif (\"value\" in attrs2) setAttr(vnode, \"value\", null, attrs2.value, undefined)\n\t\t\tif (\"selectedIndex\" in attrs2) setAttr(vnode, \"selectedIndex\", null, attrs2.selectedIndex, undefined)\n\t\t}\n\t}\n\tfunction updateAttrs(vnode, old, attrs2, ns) {\n\t\tif (attrs2 != null) {\n\t\t\tfor (var key2 in attrs2) {\n\t\t\t\tsetAttr(vnode, key2, old && old[key2], attrs2[key2], ns)\n\t\t\t}\n\t\t}\n\t\tif (old != null) {\n\t\t\tfor (var key2 in old) {\n\t\t\t\tif (attrs2 == null || !(key2 in attrs2)) {\n\t\t\t\t\tif (key2 === \"className\") key2 = \"class\"\n\t\t\t\t\tif (key2[0] === \"o\" && key2[1] === \"n\" && !isLifecycleMethod(key2)) updateEvent(vnode, key2, undefined)\n\t\t\t\t\telse if (key2 !== \"key\") vnode.dom.removeAttribute(key2)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction isAttribute(attr) {\n\t\treturn attr === \"href\" || attr === \"list\" || attr === \"form\" || attr === \"width\" || attr === \"height\"// || attr === \"type\"\n\t}\n\tfunction isCustomElement(vnode){\n\t\treturn vnode.attrs.is || vnode.tag.indexOf(\"-\") > -1\n\t}\n\tfunction hasIntegrationMethods(source) {\n\t\treturn source != null && (source.oncreate || source.onupdate || source.onbeforeremove || source.onremove)\n\t}\n\t//style\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) element.style.cssText = \"\", old = null\n\t\tif (style == null) element.style.cssText = \"\"\n\t\telse if (typeof style === \"string\") element.style.cssText = style\n\t\telse {\n\t\t\tif (typeof old === \"string\") element.style.cssText = \"\"\n\t\t\tfor (var key2 in style) {\n\t\t\t\telement.style[key2] = style[key2]\n\t\t\t}\n\t\t\tif (old != null && typeof old !== \"string\") {\n\t\t\t\tfor (var key2 in old) {\n\t\t\t\t\tif (!(key2 in style)) element.style[key2] = \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//event\n\tfunction updateEvent(vnode, key2, value) {\n\t\tvar element = vnode.dom\n\t\tvar callback = typeof onevent !== \"function\" ? value : function(e) {\n\t\t\tvar result = value.call(element, e)\n\t\t\tonevent.call(element, e)\n\t\t\treturn result\n\t\t}\n\t\tif (key2 in element) element[key2] = typeof value === \"function\" ? callback : null\n\t\telse {\n\t\t\tvar eventName = key2.slice(2)\n\t\t\tif (vnode.events === undefined) vnode.events = {}\n\t\t\tif (vnode.events[key2] === callback) return\n\t\t\tif (vnode.events[key2] != null) element.removeEventListener(eventName, vnode.events[key2], false)\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\tvnode.events[key2] = callback\n\t\t\t\telement.addEventListener(eventName, vnode.events[key2], false)\n\t\t\t}\n\t\t}\n\t}\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") source.oninit.call(vnode.state, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(source.oncreate.bind(vnode.state, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(source.onupdate.bind(vnode.state, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tvar forceVnodeUpdate, forceComponentUpdate\n\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") forceVnodeUpdate = vnode.attrs.onbeforeupdate.call(vnode.state, vnode, old)\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode._state.onbeforeupdate === \"function\") forceComponentUpdate = vnode._state.onbeforeupdate.call(vnode.state, vnode, old)\n\t\tif (!(forceVnodeUpdate === undefined && forceComponentUpdate === undefined) && !forceVnodeUpdate && !forceComponentUpdate) {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n\tfunction render(dom, vnodes) {\n\t\tif (!dom) throw new Error(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = $doc.activeElement\n\t\t// First time0 rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\t\tif (!Array.isArray(vnodes)) vnodes = [vnodes]\n\t\tupdateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, undefined)\n\t\tdom.vnodes = vnodes\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t\tif ($doc.activeElement !== active) active.focus()\n\t}\n\treturn {render: render, setEventCallback: setEventCallback}\n}\nfunction throttle(callback) {\n\t//60fps translates to 16.6ms, round it down since setTimeout requires int\n\tvar time = 16\n\tvar last = 0, pending = null\n\tvar timeout = typeof requestAnimationFrame === \"function\" ? requestAnimationFrame : setTimeout\n\treturn function() {\n\t\tvar now = Date.now()\n\t\tif (last === 0 || now - last >= time) {\n\t\t\tlast = now\n\t\t\tcallback()\n\t\t}\n\t\telse if (pending === null) {\n\t\t\tpending = timeout(function() {\n\t\t\t\tpending = null\n\t\t\t\tcallback()\n\t\t\t\tlast = Date.now()\n\t\t\t}, time - (now - last))\n\t\t}\n\t}\n}\nvar _11 = function($window) {\n\tvar renderService = coreRenderer($window)\n\trenderService.setEventCallback(function(e) {\n\t\tif (e.redraw !== false) redraw()\n\t})\n\tvar callbacks = []\n\tfunction subscribe(key1, callback) {\n\t\tunsubscribe(key1)\n\t\tcallbacks.push(key1, throttle(callback))\n\t}\n\tfunction unsubscribe(key1) {\n\t\tvar index = callbacks.indexOf(key1)\n\t\tif (index > -1) callbacks.splice(index, 2)\n\t}\n\tfunction redraw() {\n\t\tfor (var i = 1; i < callbacks.length; i += 2) {\n\t\t\tcallbacks[i]()\n\t\t}\n\t}\n\treturn {subscribe: subscribe, unsubscribe: unsubscribe, redraw: redraw, render: renderService.render}\n}\nvar redrawService = _11(window)\nrequestService.setCompletionCallback(redrawService.redraw)\nvar _16 = function(redrawService0) {\n\treturn function(root, component) {\n\t\tif (component === null) {\n\t\t\tredrawService0.render(root, [])\n\t\t\tredrawService0.unsubscribe(root)\n\t\t\treturn\n\t\t}\n\t\t\n\t\tif (component.view == null && typeof component !== \"function\") throw new Error(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t\n\t\tvar run0 = function() {\n\t\t\tredrawService0.render(root, Vnode(component))\n\t\t}\n\t\tredrawService0.subscribe(root, run0)\n\t\tredrawService0.redraw()\n\t}\n}\nm.mount = _16(redrawService)\nvar Promise = PromisePolyfill\nvar parseQueryString = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\tvar entries = string.split(\"&\"), data0 = {}, counters = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key5 = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\t\tvar levels = key5.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data0\n\t\tif (key5.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tvar isValue = j === levels.length - 1\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key5 = levels.slice(0, j).join()\n\t\t\t\tif (counters[key5] == null) counters[key5] = 0\n\t\t\t\tlevel = counters[key5]++\n\t\t\t}\n\t\t\tif (cursor[level] == null) {\n\t\t\t\tcursor[level] = isValue ? value : isNumber ? [] : {}\n\t\t\t}\n\t\t\tcursor = cursor[level]\n\t\t}\n\t}\n\treturn data0\n}\nvar coreRouter = function($window) {\n\tvar supportsPushState = typeof $window.history.pushState === \"function\"\n\tvar callAsync0 = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction normalize1(fragment0) {\n\t\tvar data = $window.location[fragment0].replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\tif (fragment0 === \"pathname\" && data[0] !== \"/\") data = \"/\" + data\n\t\treturn data\n\t}\n\tvar asyncId\n\tfunction debounceAsync(callback0) {\n\t\treturn function() {\n\t\t\tif (asyncId != null) return\n\t\t\tasyncId = callAsync0(function() {\n\t\t\t\tasyncId = null\n\t\t\t\tcallback0()\n\t\t\t})\n\t\t}\n\t}\n\tfunction parsePath(path, queryData, hashData) {\n\t\tvar queryIndex = path.indexOf(\"?\")\n\t\tvar hashIndex = path.indexOf(\"#\")\n\t\tvar pathEnd = queryIndex > -1 ? queryIndex : hashIndex > -1 ? hashIndex : path.length\n\t\tif (queryIndex > -1) {\n\t\t\tvar queryEnd = hashIndex > -1 ? hashIndex : path.length\n\t\t\tvar queryParams = parseQueryString(path.slice(queryIndex + 1, queryEnd))\n\t\t\tfor (var key4 in queryParams) queryData[key4] = queryParams[key4]\n\t\t}\n\t\tif (hashIndex > -1) {\n\t\t\tvar hashParams = parseQueryString(path.slice(hashIndex + 1))\n\t\t\tfor (var key4 in hashParams) hashData[key4] = hashParams[key4]\n\t\t}\n\t\treturn path.slice(0, pathEnd)\n\t}\n\tvar router = {prefix: \"#!\"}\n\trouter.getPath = function() {\n\t\tvar type2 = router.prefix.charAt(0)\n\t\tswitch (type2) {\n\t\t\tcase \"#\": return normalize1(\"hash\").slice(router.prefix.length)\n\t\t\tcase \"?\": return normalize1(\"search\").slice(router.prefix.length) + normalize1(\"hash\")\n\t\t\tdefault: return normalize1(\"pathname\").slice(router.prefix.length) + normalize1(\"search\") + normalize1(\"hash\")\n\t\t}\n\t}\n\trouter.setPath = function(path, data, options) {\n\t\tvar queryData = {}, hashData = {}\n\t\tpath = parsePath(path, queryData, hashData)\n\t\tif (data != null) {\n\t\t\tfor (var key4 in data) queryData[key4] = data[key4]\n\t\t\tpath = path.replace(/:([^\\/]+)/g, function(match2, token) {\n\t\t\t\tdelete queryData[token]\n\t\t\t\treturn data[token]\n\t\t\t})\n\t\t}\n\t\tvar query = buildQueryString(queryData)\n\t\tif (query) path += \"?\" + query\n\t\tvar hash = buildQueryString(hashData)\n\t\tif (hash) path += \"#\" + hash\n\t\tif (supportsPushState) {\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\t$window.onpopstate()\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, router.prefix + path)\n\t\t\telse $window.history.pushState(state, title, router.prefix + path)\n\t\t}\n\t\telse $window.location.href = router.prefix + path\n\t}\n\trouter.defineRoutes = function(routes, resolve, reject) {\n\t\tfunction resolveRoute() {\n\t\t\tvar path = router.getPath()\n\t\t\tvar params = {}\n\t\t\tvar pathname = parsePath(path, params, params)\n\t\t\tvar state = $window.history.state\n\t\t\tif (state != null) {\n\t\t\t\tfor (var k in state) params[k] = state[k]\n\t\t\t}\n\t\t\tfor (var route0 in routes) {\n\t\t\t\tvar matcher = new RegExp(\"^\" + route0.replace(/:[^\\/]+?\\.{3}/g, \"(.*?)\").replace(/:[^\\/]+/g, \"([^\\\\/]+)\") + \"\\/?$\")\n\t\t\t\tif (matcher.test(pathname)) {\n\t\t\t\t\tpathname.replace(matcher, function() {\n\t\t\t\t\t\tvar keys = route0.match(/:[^\\/]+/g) || []\n\t\t\t\t\t\tvar values = [].slice.call(arguments, 1, -2)\n\t\t\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\t\t\tparams[keys[i].replace(/:|\\./g, \"\")] = decodeURIComponent(values[i])\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolve(routes[route0], params, path, route0)\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\treject(path, params)\n\t\t}\n\t\tif (supportsPushState) $window.onpopstate = debounceAsync(resolveRoute)\n\t\telse if (router.prefix.charAt(0) === \"#\") $window.onhashchange = resolveRoute\n\t\tresolveRoute()\n\t}\n\treturn router\n}\nvar _20 = function($window, redrawService0) {\n\tvar routeService = coreRouter($window)\n\tvar identity = function(v) {return v}\n\tvar render1, component, attrs3, currentPath, lastUpdate\n\tvar route = function(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\tvar run1 = function() {\n\t\t\tif (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3)))\n\t\t}\n\t\tvar bail = function(path) {\n\t\t\tif (path !== defaultRoute) routeService.setPath(defaultRoute, null, {replace: true})\n\t\t\telse throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t}\n\t\trouteService.defineRoutes(routes, function(payload, params, path) {\n\t\t\tvar update = lastUpdate = function(routeResolver, comp) {\n\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\tattrs3 = params, currentPath = path, lastUpdate = null\n\t\t\t\trender1 = (routeResolver.render || identity).bind(routeResolver)\n\t\t\t\trun1()\n\t\t\t}\n\t\t\tif (payload.view || typeof payload === \"function\") update({}, payload)\n\t\t\telse {\n\t\t\t\tif (payload.onmatch) {\n\t\t\t\t\tPromise.resolve(payload.onmatch(params, path)).then(function(resolved) {\n\t\t\t\t\t\tupdate(payload, resolved)\n\t\t\t\t\t}, bail)\n\t\t\t\t}\n\t\t\t\telse update(payload, \"div\")\n\t\t\t}\n\t\t}, bail)\n\t\tredrawService0.subscribe(root, run1)\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) options = {replace: true}\n\t\tlastUpdate = null\n\t\trouteService.setPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = function(prefix0) {routeService.prefix = prefix0}\n\troute.link = function(vnode1) {\n\t\tvnode1.dom.setAttribute(\"href\", routeService.prefix + vnode1.attrs.href)\n\t\tvnode1.dom.onclick = function(e) {\n\t\t\tif (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return\n\t\t\te.preventDefault()\n\t\t\te.redraw = false\n\t\t\tvar href = this.getAttribute(\"href\")\n\t\t\tif (href.indexOf(routeService.prefix) === 0) href = href.slice(routeService.prefix.length)\n\t\t\troute.set(href, undefined, undefined)\n\t\t}\n\t}\n\troute.param = function(key3) {\n\t\tif(typeof attrs3 !== \"undefined\" && typeof key3 !== \"undefined\") return attrs3[key3]\n\t\treturn attrs3\n\t}\n\treturn route\n}\nm.route = _20(window, redrawService)\nm.withAttr = function(attrName, callback1, context) {\n\treturn function(e) {\n\t\tcallback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))\n\t}\n}\nvar _28 = coreRenderer(window)\nm.render = _28.render\nm.redraw = redrawService.redraw\nm.request = requestService.request\nm.jsonp = requestService.jsonp\nm.parseQueryString = parseQueryString\nm.buildQueryString = buildQueryString\nm.version = \"1.1.1\"\nm.vnode = Vnode\nif (typeof module !== \"undefined\") module[\"exports\"] = m\nelse window.m = m\n}());\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],8:[function(require,module,exports){\n/*!\n * EventEmitter v5.1.0 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n},{}]},{},[1]);\n })();"]}
|
1 |
+
{"version":3,"sources":["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","window","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","ListFetcher","mount","mc4wp","deps","mithril","./admin/helpers.js","./admin/list-fetcher.js","./admin/settings.js","./admin/tabs.js","wolfy87-eventemitter","2","toggleElement","selector","elements","querySelectorAll","show","clientHeight","style","display","bindEventToElement","element","event","handler","addEventListener","attachEvent","bindEventToElements","Array","prototype","forEach","debounce","func","wait","immediate","timeout","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","showIfElements","getAttribute","checked","value","conditionMet","config","hide","visibility","opacity","inputs","inputElement","removeAttribute","setAttribute","JSON","parse","parentElements","parentElement","3","working","done","mailchimp","api_connected","lists","fetch","$","jQuery","mc4wp_vars","i18n","preventDefault","post","ajaxurl","action","data","success","location","reload","bind","fail","always","redraw","view","method","onsubmit","type","fetching_mailchimp_lists","renew_mailchimp_lists","className","disabled","trust","fetching_mailchimp_lists_can_take_a_while","fetching_mailchimp_lists_done","fetching_mailchimp_lists_error","4","_typeof","Symbol","iterator","obj","constructor","Settings","getSelectedListsWhere","searchKey","searchValue","selectedLists","filter","el","getSelectedLists","updateSelectedLists","listInputs","input","push","trigger","toggleVisibleLists","rows","replace","querySelector","on","5","URL","Tabs","get","id","_open","tab","updateState","$tabs","removeClass","css","$tabNavs","nav","blur","url","setParameter","href","history","pushState","title","refererField","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","returnValue","$context","find","each","substring","first","text","open","click","body","activeTab","replaceState","state","./url.js","6","query","hasOwnProperty","b","decodeURIComponent","build","ret","d","encodeURIComponent","join","key","7","global","Vnode","tag","attrs0","children","dom","attrs","domSize","_state","instance","skip","compileSelector","classes","selectorParser","exec","attrValue","selectorCache","execSelector","childList","hasAttrs","class","hasOwn","isArray","hyperscript","start","cached","normalized","normalizeChildren","throttle","callback","last","pending","requestAnimationFrame","now","Date","normalize","node","html","fragment","attrs1","PromisePolyfill","executor","list","shouldAbsorb","execute","then","callAsync","console","error","resolvers","rejectors","retry","self","TypeError","executeOnce","rejectCurrent","run","fn","runs","onerror","resolveCurrent","_instance","setImmediate","onFulfilled","onRejection","handle","next","resolveNext","rejectNext","promise","resolve","reject","catch","all","total","count","values","consume","race","Promise","buildQueryString","object","destructure","key0","Object","toString","FILE_PROTOCOL_REGEX","RegExp","requestService","$window","setCompletionCallback","oncompletion","finalizer","complete","finalize","promise0","then0","extra","request","toUpperCase","useBody","serialize","FormData","stringify","deserialize","extract","interpolate","assemble","xhr","XMLHttpRequest","aborted","_abort","abort","async","user","password","setRequestHeader","withCredentials","headers","onreadystatechange","readyState","response","status","test","cast","responseText","send","background","jsonp","callbackName","Math","round","random","callbackCount","script","createElement","parentNode","removeChild","callbackKey","src","documentElement","appendChild","tokens","slice","querystring","indexOf","type0","coreRenderer","setEventCallback","onevent","getNameSpace","vnode","xmlns","nameSpace","createNodes","parent","vnodes","end","hooks","nextSibling","ns","createNode","createComponent","initLifecycle","createText","createHTML","createFragment","$doc","createTextNode","insertNode","match1","parent1","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","temp","innerHTML","firstChild","childNodes","child","createDocumentFragment","attrs2","is","createElementNS","setAttrs","contenteditable","setContentEditable","textContent","setLateAttrs","initComponent","sentinel","create","$$reentrantLock$$","$emptyFragment","updateNodes","old","recycling","removeNodes","isUnkeyed","getNextSibling","updateNode","isRecyclable","pool","concat","map","oldStart","oldEnd","v","shouldRecycle","toFragment","getKeyMap","oldIndex","movable","oldTag","shouldNotUpdate","updateLifecycle","updateText","updateHTML","updateFragment","updateElement","updateComponent","removeNode","nodeValue","updateAttrs","abs","oldChildrenLength","poolChildrenLength","vnodesChildrenLength","key2","count0","insertBefore","content","continuation","called","expected","onremove","removeNodeFromDOM","hasIntegrationMethods","onbeforeremove","result","setAttr","isFormAttribute","isLifecycleMethod","nsLastIndex","substr","setAttributeNS","updateEvent","updateStyle","isAttribute","isCustomElement","normalized0","activeElement","selectedIndex","attr","source","oncreate","onupdate","cssText","eventName","removeEventListener","oninit","forceVnodeUpdate","forceComponentUpdate","onbeforeupdate","render","active","namespace","namespaceURI","focus","svg","math","redrawService","subscribe","key1","unsubscribe","callbacks","index","splice","renderService","redrawService0","root","component","run0","parseQueryString","string","charAt","entries","data0","counters","entry","key5","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","isValue","coreRouter","normalize1","fragment0","debounceAsync","callback0","asyncId","callAsync0","parsePath","path","queryData","hashData","queryIndex","hashIndex","pathEnd","queryEnd","queryParams","key4","hashParams","supportsPushState","router","prefix","getPath","setPath","options","match2","token","hash","onpopstate","defineRoutes","routes","resolveRoute","params","pathname","k","route0","matcher","keys","onhashchange","route","render1","attrs3","currentPath","lastUpdate","routeService","identity","defaultRoute","run1","bail","payload","update","routeResolver","comp","onmatch","resolved","set","prefix0","link","vnode1","onclick","ctrlKey","metaKey","shiftKey","which","param","key3","withAttr","attrName","callback1","currentTarget","_28","version","8","indexOfListener","listeners","listener","alias","name","isValidListener","proto","originalGlobalValue","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,GAAIA,OAAUC,GAAeC,MAASD,IAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,GAAIF,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGQ,QAAkD,IAAI,GAA1CL,GAAkB,kBAATX,IAAqBA,EAAgBQ,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,GAAI,OAAOD,KAAKY,GAAG,SAASnB,EAAQoB,EAAOJ,GACvhB,YAIA,IAAIK,GAAIC,OAAOD,EAAIrB,EAAQ,WACvBuB,EAAevB,EAAQ,wBAGvBwB,EAAUC,SAASC,eAAe,eAClCC,EAAS,GAAIJ,GAC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AAc1B,GACvB,GAAI/gB,GAAOT,MAAMC,UAAUkS,MAAM3U,KAAKkD,UAAW,EACjD,OAAOF,MAAKuiB,UAAUvB,EAAK/gB,IAW/B4gB,EAAM8B,mBAAqB,SAA4BhiB,GAEnD,MADAX,MAAK4iB,iBAAmBjiB,EACjBX,MAWX6gB,EAAM4B,oBAAsB,WACxB,OAAIziB,KAAKkI,eAAe,qBACblI,KAAK4iB,kBAapB/B,EAAMI,WAAa,WACf,MAAOjhB,MAAKqiB,UAAYriB,KAAKqiB,aAQjC/kB,EAAaulB,WAAa,WAEtB,MADA9lB,GAAQO,aAAewjB,EAChBxjB,GAIW,kBAAXrB,IAAyBA,EAAO6mB,IACvC7mB,EAAO,WACH,MAAOqB,KAGY,gBAAXH,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUO,EAGjBP,EAAQO,aAAeA,GAE7B0C,oBAES","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (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})({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\n\nvar m = window.m = require('mithril');\nvar EventEmitter = require('wolfy87-eventemitter');\n\n// vars\nvar context = document.getElementById('mc4wp-admin');\nvar events = new EventEmitter();\nvar tabs = require('./admin/tabs.js')(context);\nvar helpers = require('./admin/helpers.js');\nvar settings = require('./admin/settings.js')(context, helpers, events);\n\n// list fetcher\nvar ListFetcher = require('./admin/list-fetcher.js');\nvar mount = document.getElementById('mc4wp-list-fetcher');\nif (mount) {\n m.mount(mount, new ListFetcher());\n}\n\n// expose some things\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.deps = window.mc4wp.deps || {};\nwindow.mc4wp.deps.mithril = m;\nwindow.mc4wp.helpers = helpers;\nwindow.mc4wp.events = events;\nwindow.mc4wp.settings = settings;\nwindow.mc4wp.tabs = tabs;\n\n},{\"./admin/helpers.js\":2,\"./admin/list-fetcher.js\":3,\"./admin/settings.js\":4,\"./admin/tabs.js\":5,\"mithril\":7,\"wolfy87-eventemitter\":8}],2:[function(require,module,exports){\n'use strict';\n\nvar helpers = {};\n\nhelpers.toggleElement = function (selector) {\n\tvar elements = document.querySelectorAll(selector);\n\tfor (var i = 0; i < elements.length; i++) {\n\t\tvar show = elements[i].clientHeight <= 0;\n\t\telements[i].style.display = show ? '' : 'none';\n\t}\n};\n\nhelpers.bindEventToElement = function (element, event, handler) {\n\tif (element.addEventListener) {\n\t\telement.addEventListener(event, handler);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent('on' + event, handler);\n\t}\n};\n\nhelpers.bindEventToElements = function (elements, event, handler) {\n\tArray.prototype.forEach.call(elements, function (element) {\n\t\thelpers.bindEventToElement(element, event, handler);\n\t});\n};\n\n// polling\nhelpers.debounce = function (func, wait, immediate) {\n\tvar timeout;\n\treturn function () {\n\t\tvar context = this,\n\t\t args = arguments;\n\t\tvar later = function later() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\n/**\n * Showif.js\n */\n(function () {\n\tvar showIfElements = document.querySelectorAll('[data-showif]');\n\n\t// dependent elements\n\tArray.prototype.forEach.call(showIfElements, function (element) {\n\t\tvar config = JSON.parse(element.getAttribute('data-showif'));\n\t\tvar parentElements = document.querySelectorAll('[name=\"' + config.element + '\"]');\n\t\tvar inputs = element.querySelectorAll('input,select,textarea:not([readonly])');\n\t\tvar hide = config.hide === undefined || config.hide;\n\n\t\tfunction toggleElement() {\n\n\t\t\t// do nothing with unchecked radio inputs\n\t\t\tif (this.getAttribute('type') === \"radio\" && !this.checked) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar value = this.getAttribute(\"type\") === \"checkbox\" ? this.checked : this.value;\n\t\t\tvar conditionMet = value == config.value;\n\n\t\t\tif (hide) {\n\t\t\t\telement.style.display = conditionMet ? '' : 'none';\n\t\t\t\telement.style.visibility = conditionMet ? '' : 'hidden';\n\t\t\t} else {\n\t\t\t\telement.style.opacity = conditionMet ? '' : '0.4';\n\t\t\t}\n\n\t\t\t// disable input fields to stop sending their values to server\n\t\t\tArray.prototype.forEach.call(inputs, function (inputElement) {\n\t\t\t\tconditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly', 'readonly');\n\t\t\t});\n\t\t}\n\n\t\t// find checked element and call toggleElement function\n\t\tArray.prototype.forEach.call(parentElements, function (parentElement) {\n\t\t\ttoggleElement.call(parentElement);\n\t\t});\n\n\t\t// bind on all changes\n\t\thelpers.bindEventToElements(parentElements, 'change', toggleElement);\n\t});\n})();\n\nmodule.exports = helpers;\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar $ = window.jQuery;\nvar config = mc4wp_vars;\nvar i18n = config.i18n;\n\nfunction ListFetcher() {\n this.working = false;\n this.done = false;\n\n // start fetching right away when no lists but api key given\n if (config.mailchimp.api_connected && config.mailchimp.lists.length === 0) {\n this.fetch();\n }\n}\n\nListFetcher.prototype.fetch = function (e) {\n e && e.preventDefault();\n\n this.working = true;\n this.done = false;\n\n $.post(ajaxurl, {\n action: \"mc4wp_renew_mailchimp_lists\",\n timeout: 180000\n }).done(function (data) {\n this.success = true;\n\n if (data) {\n window.setTimeout(function () {\n window.location.reload();\n }, 3000);\n }\n }.bind(this)).fail(function (data) {\n this.success = false;\n }.bind(this)).always(function (data) {\n this.working = false;\n this.done = true;\n\n m.redraw();\n }.bind(this));\n};\n\nListFetcher.prototype.view = function () {\n return m('form', {\n method: \"POST\",\n onsubmit: this.fetch.bind(this)\n }, [m('p', [m('input', {\n type: \"submit\",\n value: this.working ? i18n.fetching_mailchimp_lists : i18n.renew_mailchimp_lists,\n className: \"button\",\n disabled: !!this.working\n }), m.trust(' '), this.working ? [m('span.mc4wp-loader', \"Loading...\"), m.trust(' '), m('em.help', i18n.fetching_mailchimp_lists_can_take_a_while)] : '', this.done ? [this.success ? m('em.help.green', i18n.fetching_mailchimp_lists_done) : m('em.help.red', i18n.fetching_mailchimp_lists_error)] : ''])]);\n};\n\nmodule.exports = ListFetcher;\n\n},{}],4:[function(require,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar Settings = function Settings(context, helpers, events) {\n\t'use strict';\n\n\t// vars\n\n\tvar form = context.querySelector('form');\n\tvar listInputs = context.querySelectorAll('.mc4wp-list-input');\n\tvar lists = mc4wp_vars.mailchimp.lists;\n\tvar selectedLists = [];\n\n\t// functions\n\tfunction getSelectedListsWhere(searchKey, searchValue) {\n\t\treturn selectedLists.filter(function (el) {\n\t\t\treturn el[searchKey] === searchValue;\n\t\t});\n\t}\n\n\tfunction getSelectedLists() {\n\t\treturn selectedLists;\n\t}\n\n\tfunction updateSelectedLists() {\n\t\tselectedLists = [];\n\n\t\tArray.prototype.forEach.call(listInputs, function (input) {\n\t\t\t// skip unchecked checkboxes\n\t\t\tif (typeof input.checked === \"boolean\" && !input.checked) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_typeof(lists[input.value]) === \"object\") {\n\t\t\t\tselectedLists.push(lists[input.value]);\n\t\t\t}\n\t\t});\n\n\t\tevents.trigger('selectedLists.change', [selectedLists]);\n\t\treturn selectedLists;\n\t}\n\n\tfunction toggleVisibleLists() {\n\t\tvar rows = document.querySelectorAll('.lists--only-selected > *');\n\t\tArray.prototype.forEach.call(rows, function (el) {\n\n\t\t\tvar listId = el.getAttribute('data-list-id');\n\t\t\tvar isSelected = getSelectedListsWhere('id', listId).length > 0;\n\n\t\t\tif (isSelected) {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class').replace('hidden', ''));\n\t\t\t} else {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class') + \" hidden\");\n\t\t\t}\n\t\t});\n\t}\n\n\tevents.on('selectedLists.change', toggleVisibleLists);\n\thelpers.bindEventToElements(listInputs, 'change', updateSelectedLists);\n\n\tupdateSelectedLists();\n\n\treturn {\n\t\tgetSelectedLists: getSelectedLists\n\t};\n};\n\nmodule.exports = Settings;\n\n},{}],5:[function(require,module,exports){\n'use strict';\n\nvar URL = require('./url.js');\n\n// Tabs\nvar Tabs = function Tabs(context) {\n\n\t// TODO: last piece of jQuery... can we get rid of it?\n\tvar $ = window.jQuery;\n\n\tvar $context = $(context);\n\tvar $tabs = $context.find('.tab');\n\tvar $tabNavs = $context.find('.nav-tab');\n\tvar refererField = context.querySelector('input[name=\"_wp_http_referer\"]');\n\tvar tabs = [];\n\n\t$.each($tabs, function (i, t) {\n\t\tvar id = t.id.substring(4);\n\t\tvar title = $(t).find('h2').first().text();\n\n\t\ttabs.push({\n\t\t\tid: id,\n\t\t\ttitle: title,\n\t\t\telement: t,\n\t\t\tnav: context.querySelectorAll('.nav-tab-' + id),\n\t\t\topen: function open() {\n\t\t\t\treturn _open(id);\n\t\t\t}\n\t\t});\n\t});\n\n\tfunction get(id) {\n\n\t\tfor (var i = 0; i < tabs.length; i++) {\n\t\t\tif (tabs[i].id === id) {\n\t\t\t\treturn tabs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction _open(tab, updateState) {\n\n\t\t// make sure we have a tab object\n\t\tif (typeof tab === \"string\") {\n\t\t\ttab = get(tab);\n\t\t}\n\n\t\tif (!tab) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// should we update state?\n\t\tif (updateState == undefined) {\n\t\t\tupdateState = true;\n\t\t}\n\n\t\t// hide all tabs & remove active class\n\t\t$tabs.removeClass('tab-active').css('display', 'none');\n\t\t$tabNavs.removeClass('nav-tab-active');\n\n\t\t// add `nav-tab-active` to this tab\n\t\tArray.prototype.forEach.call(tab.nav, function (nav) {\n\t\t\tnav.className += \" nav-tab-active\";\n\t\t\tnav.blur();\n\t\t});\n\n\t\t// show target tab\n\t\ttab.element.style.display = 'block';\n\t\ttab.element.className += \" tab-active\";\n\n\t\t// create new URL\n\t\tvar url = URL.setParameter(window.location.href, \"tab\", tab.id);\n\n\t\t// update hash\n\t\tif (history.pushState && updateState) {\n\t\t\thistory.pushState(tab.id, '', url);\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\n\t\t// update referer field\n\t\trefererField.value = url;\n\n\t\t// if thickbox is open, close it.\n\t\tif (typeof tb_remove === \"function\") {\n\t\t\ttb_remove();\n\t\t}\n\n\t\t// refresh editor after switching tabs\n\t\t// TODO: decouple this! law of demeter etc.\n\t\tif (tab.id === 'fields' && window.mc4wp && window.mc4wp.forms && window.mc4wp.forms.editor) {\n\t\t\tmc4wp.forms.editor.refresh();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction title(tab) {\n\t\tvar title = document.title.split('-');\n\t\tdocument.title = document.title.replace(title[0], tab.title + \" \");\n\t}\n\n\tfunction switchTab(e) {\n\t\te = e || window.event;\n\n\t\t// get from data attribute\n\t\tvar tabId = this.getAttribute('data-tab');\n\n\t\t// get from classname\n\t\tif (!tabId) {\n\t\t\tvar match = this.className.match(/nav-tab-(\\w+)?/);\n\t\t\tif (match) {\n\t\t\t\ttabId = match[1];\n\t\t\t}\n\t\t}\n\n\t\t// get from href\n\t\tif (!tabId) {\n\t\t\tvar urlParams = URL.parse(this.href);\n\t\t\tif (!urlParams.tab) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttabId = urlParams.tab;\n\t\t}\n\n\t\tvar opened = _open(tabId);\n\n\t\tif (opened) {\n\t\t\te.preventDefault();\n\t\t\te.returnValue = false;\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction init() {\n\n\t\t// check for current tab\n\t\tif (!history.pushState) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeTab = $tabs.filter(':visible').get(0);\n\t\tif (!activeTab) {\n\t\t\treturn;\n\t\t}\n\t\tvar tab = get(activeTab.id.substring(4));\n\t\tif (!tab) return;\n\n\t\t// check if tab is in html5 history\n\t\tif (history.replaceState && history.state === null) {\n\t\t\thistory.replaceState(tab.id, '');\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\t}\n\n\t$tabNavs.click(switchTab);\n\t$(document.body).on('click', '.tab-link', switchTab);\n\tinit();\n\n\tif (window.addEventListener && history.pushState) {\n\t\twindow.addEventListener('popstate', function (e) {\n\t\t\tif (!e.state) return true;\n\t\t\tvar tabId = e.state;\n\t\t\treturn _open(tabId, false);\n\t\t});\n\t}\n\n\treturn {\n\t\topen: _open,\n\t\tget: get\n\t};\n};\n\nmodule.exports = Tabs;\n\n},{\"./url.js\":6}],6:[function(require,module,exports){\n'use strict';\n\nvar URL = {\n\tparse: function parse(url) {\n\t\tvar query = {};\n\t\tvar a = url.split('&');\n\t\tfor (var i in a) {\n\t\t\tif (!a.hasOwnProperty(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar b = a[i].split('=');\n\t\t\tquery[decodeURIComponent(b[0])] = decodeURIComponent(b[1]);\n\t\t}\n\n\t\treturn query;\n\t},\n\tbuild: function build(data) {\n\t\tvar ret = [];\n\t\tfor (var d in data) {\n\t\t\tret.push(d + \"=\" + encodeURIComponent(data[d]));\n\t\t}return ret.join(\"&\");\n\t},\n\tsetParameter: function setParameter(url, key, value) {\n\t\tvar data = URL.parse(url);\n\t\tdata[key] = value;\n\t\treturn URL.build(data);\n\t}\n};\n\nmodule.exports = URL;\n\n},{}],7:[function(require,module,exports){\n(function (global){\n;(function() {\n\"use strict\"\nfunction Vnode(tag, key, attrs0, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: undefined, _state: undefined, events: undefined, instance: undefined, skip: false}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node != null && typeof node !== \"object\") return Vnode(\"#\", undefined, undefined, node === false ? \"\" : node, undefined, undefined)\n\treturn node\n}\nVnode.normalizeChildren = function normalizeChildren(children) {\n\tfor (var i = 0; i < children.length; i++) {\n\t\tchildren[i] = Vnode.normalize(children[i])\n\t}\n\treturn children\n}\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\nfunction execSelector(state, attrs, children) {\n\tvar hasAttrs = false, childList, text\n\tvar className = attrs.className || attrs.class\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key)) {\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className !== undefined) {\n\t\tif (attrs.class !== undefined) {\n\t\t\tattrs.class = undefined\n\t\t\tattrs.className = className\n\t\t}\n\t\tif (state.attrs.className != null) {\n\t\t\tattrs.className = state.attrs.className + \" \" + className\n\t\t}\n\t}\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\thasAttrs = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\ttext = children[0].children\n\t} else {\n\t\tchildList = children\n\t}\n\treturn Vnode(state.tag, attrs.key, hasAttrs ? attrs : undefined, childList, text)\n}\nfunction hyperscript(selector) {\n\t// Because sloppy mode sucks\n\tvar attrs = arguments[1], start = 2, children\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\tif (typeof selector === \"string\") {\n\t\tvar cached = selectorCache[selector] || compileSelector(selector)\n\t}\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = 1\n\t}\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\tvar normalized = Vnode.normalizeChildren(children)\n\tif (typeof selector === \"string\") {\n\t\treturn execSelector(cached, attrs, normalized)\n\t} else {\n\t\treturn Vnode(selector, attrs.key, attrs, normalized)\n\t}\n}\nhyperscript.trust = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\nhyperscript.fragment = function(attrs1, children) {\n\treturn Vnode(\"[\", attrs1.key, attrs1, Vnode.normalizeChildren(children), undefined, undefined)\n}\nvar m = hyperscript\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") window.Promise = PromisePolyfill\n\tvar PromisePolyfill = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") global.Promise = PromisePolyfill\n\tvar PromisePolyfill = global.Promise\n} else {\n}\nvar buildQueryString = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\tvar args = []\n\tfor (var key0 in object) {\n\t\tdestructure(key0, object[key0])\n\t}\n\treturn args.join(\"&\")\n\tfunction destructure(key0, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key0 + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key0 + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key0) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\nvar FILE_PROTOCOL_REGEX = new RegExp(\"^file://\", \"i\")\nvar _8 = function($window, Promise) {\n\tvar callbackCount = 0\n\tvar oncompletion\n\tfunction setCompletionCallback(callback) {oncompletion = callback}\n\tfunction finalizer() {\n\t\tvar count = 0\n\t\tfunction complete() {if (--count === 0 && typeof oncompletion === \"function\") oncompletion()}\n\t\treturn function finalize(promise0) {\n\t\t\tvar then0 = promise0.then\n\t\t\tpromise0.then = function() {\n\t\t\t\tcount++\n\t\t\t\tvar next = then0.apply(promise0, arguments)\n\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\tcomplete()\n\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t})\n\t\t\t\treturn finalize(next)\n\t\t\t}\n\t\t\treturn promise0\n\t\t}\n\t}\n\tfunction normalize(args, extra) {\n\t\tif (typeof args === \"string\") {\n\t\t\tvar url = args\n\t\t\targs = extra || {}\n\t\t\tif (args.url == null) args.url = url\n\t\t}\n\t\treturn args\n\t}\n\tfunction request(args, extra) {\n\t\tvar finalize = finalizer()\n\t\targs = normalize(args, extra)\n\t\tvar promise0 = new Promise(function(resolve, reject) {\n\t\t\tif (args.method == null) args.method = \"GET\"\n\t\t\targs.method = args.method.toUpperCase()\n\t\t\tvar useBody = (args.method === \"GET\" || args.method === \"TRACE\") ? false : (typeof args.useBody === \"boolean\" ? args.useBody : true)\n\t\t\tif (typeof args.serialize !== \"function\") args.serialize = typeof FormData !== \"undefined\" && args.data instanceof FormData ? function(value) {return value} : JSON.stringify\n\t\t\tif (typeof args.deserialize !== \"function\") args.deserialize = deserialize\n\t\t\tif (typeof args.extract !== \"function\") args.extract = extract\n\t\t\targs.url = interpolate(args.url, args.data)\n\t\t\tif (useBody) args.data = args.serialize(args.data)\n\t\t\telse args.url = assemble(args.url, args.data)\n\t\t\tvar xhr = new $window.XMLHttpRequest(),\n\t\t\t\taborted = false,\n\t\t\t\t_abort = xhr.abort\n\t\t\txhr.abort = function abort() {\n\t\t\t\taborted = true\n\t\t\t\t_abort.call(xhr)\n\t\t\t}\n\t\t\txhr.open(args.method, args.url, typeof args.async === \"boolean\" ? args.async : true, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\t\t\tif (args.serialize === JSON.stringify && useBody) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (args.deserialize === deserialize) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tfor (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t}\n\t\t\tif (typeof args.config === \"function\") xhr = args.config(xhr, args) || xhr\n\t\t\txhr.onreadystatechange = function() {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif(aborted) return\n\t\t\t\tif (xhr.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args))\n\t\t\t\t\t\tif ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304 || FILE_PROTOCOL_REGEX.test(args.url)) {\n\t\t\t\t\t\t\tresolve(cast(args.type, response))\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar error = new Error(xhr.responseText)\n\t\t\t\t\t\t\tfor (var key in response) error[key] = response[key]\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (useBody && (args.data != null)) xhr.send(args.data)\n\t\t\telse xhr.send()\n\t\t})\n\t\treturn args.background === true ? promise0 : finalize(promise0)\n\t}\n\tfunction jsonp(args, extra) {\n\t\tvar finalize = finalizer()\n\t\targs = normalize(args, extra)\n\t\tvar promise0 = new Promise(function(resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(cast(args.type, data))\n\t\t\t\tdelete $window[callbackName]\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t\tdelete $window[callbackName]\n\t\t\t}\n\t\t\tif (args.data == null) args.data = {}\n\t\t\targs.url = interpolate(args.url, args.data)\n\t\t\targs.data[args.callbackKey || \"callback\"] = callbackName\n\t\t\tscript.src = assemble(args.url, args.data)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t})\n\t\treturn args.background === true? promise0 : finalize(promise0)\n\t}\n\tfunction interpolate(url, data) {\n\t\tif (data == null) return url\n\t\tvar tokens = url.match(/:[^\\/]+/gi) || []\n\t\tfor (var i = 0; i < tokens.length; i++) {\n\t\t\tvar key = tokens[i].slice(1)\n\t\t\tif (data[key] != null) {\n\t\t\t\turl = url.replace(tokens[i], data[key])\n\t\t\t}\n\t\t}\n\t\treturn url\n\t}\n\tfunction assemble(url, data) {\n\t\tvar querystring = buildQueryString(data)\n\t\tif (querystring !== \"\") {\n\t\t\tvar prefix = url.indexOf(\"?\") < 0 ? \"?\" : \"&\"\n\t\t\turl += prefix + querystring\n\t\t}\n\t\treturn url\n\t}\n\tfunction deserialize(data) {\n\t\ttry {return data !== \"\" ? JSON.parse(data) : null}\n\t\tcatch (e) {throw new Error(data)}\n\t}\n\tfunction extract(xhr) {return xhr.responseText}\n\tfunction cast(type0, data) {\n\t\tif (typeof type0 === \"function\") {\n\t\t\tif (Array.isArray(data)) {\n\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\tdata[i] = new type0(data[i])\n\t\t\t\t}\n\t\t\t}\n\t\t\telse return new type0(data)\n\t\t}\n\t\treturn data\n\t}\n\treturn {request: request, jsonp: jsonp, setCompletionCallback: setCompletionCallback}\n}\nvar requestService = _8(window, PromisePolyfill)\nvar coreRenderer = function($window) {\n\tvar $doc = $window.document\n\tvar $emptyFragment = $doc.createDocumentFragment()\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\tvar onevent\n\tfunction setEventCallback(callback) {return onevent = callback}\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": return createText(parent, vnode, nextSibling)\n\t\t\t\tcase \"<\": return createHTML(parent, vnode, nextSibling)\n\t\t\t\tcase \"[\": return createFragment(parent, vnode, hooks, ns, nextSibling)\n\t\t\t\tdefault: return createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse return createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t\treturn vnode.dom\n\t}\n\tfunction createHTML(parent, vnode, nextSibling) {\n\t\tvar match1 = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\tvar parent1 = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}[match1[1]] || \"div\"\n\t\tvar temp = $doc.createElement(parent1)\n\t\ttemp.innerHTML = vnode.children\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t\treturn fragment\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t\treturn fragment\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs2 = vnode.attrs\n\t\tvar is = attrs2 && attrs2.is\n\t\tns = getNameSpace(vnode) || ns\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\t\tif (attrs2 != null) {\n\t\t\tsetAttrs(vnode, attrs2, ns)\n\t\t}\n\t\tinsertNode(parent, element, nextSibling)\n\t\tif (vnode.attrs != null && vnode.attrs.contenteditable != null) {\n\t\t\tsetContentEditable(vnode)\n\t\t}\n\t\telse {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tsetLateAttrs(vnode)\n\t\t\t}\n\t\t}\n\t\treturn element\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return $emptyFragment\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return $emptyFragment\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tvnode._state = vnode.state\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tinitLifecycle(vnode._state, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tvar element = createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t\tinsertNode(parent, element, nextSibling)\n\t\t\treturn element\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t\treturn $emptyFragment\n\t\t}\n\t}\n\t//update\n\tfunction updateNodes(parent, old, vnodes, recycling, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null) removeNodes(old, 0, old.length, vnodes)\n\t\telse {\n\t\t\tif (old.length === vnodes.length) {\n\t\t\t\tvar isUnkeyed = false\n\t\t\t\tfor (var i = 0; i < vnodes.length; i++) {\n\t\t\t\t\tif (vnodes[i] != null && old[i] != null) {\n\t\t\t\t\t\tisUnkeyed = vnodes[i].key == null && old[i].key == null\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isUnkeyed) {\n\t\t\t\t\tfor (var i = 0; i < old.length; i++) {\n\t\t\t\t\t\tif (old[i] === vnodes[i]) continue\n\t\t\t\t\t\telse if (old[i] == null && vnodes[i] != null) createNode(parent, vnodes[i], hooks, ns, getNextSibling(old, i + 1, nextSibling))\n\t\t\t\t\t\telse if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes)\n\t\t\t\t\t\telse updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), recycling, ns)\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\trecycling = recycling || isRecyclable(old, vnodes)\n\t\t\tif (recycling) {\n\t\t\t\tvar pool = old.pool\n\t\t\t\told = old.concat(old.pool)\n\t\t\t}\n\t\t\tvar oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map\n\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\tvar o = old[oldStart], v = vnodes[start]\n\t\t\t\tif (o === v && !recycling) oldStart++, start++\n\t\t\t\telse if (o == null) oldStart++\n\t\t\t\telse if (v == null) start++\n\t\t\t\telse if (o.key === v.key) {\n\t\t\t\t\tvar shouldRecycle = (pool != null && oldStart >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tupdateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), shouldRecycle, ns)\n\t\t\t\t\tif (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar o = old[oldEnd]\n\t\t\t\t\tif (o === v && !recycling) oldEnd--, start++\n\t\t\t\t\telse if (o == null) oldEnd--\n\t\t\t\t\telse if (v == null) start++\n\t\t\t\t\telse if (o.key === v.key) {\n\t\t\t\t\t\tvar shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\t\tupdateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)\n\t\t\t\t\t\tif (recycling || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, nextSibling))\n\t\t\t\t\t\toldEnd--, start++\n\t\t\t\t\t}\n\t\t\t\t\telse break\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\tvar o = old[oldEnd], v = vnodes[end]\n\t\t\t\tif (o === v && !recycling) oldEnd--, end--\n\t\t\t\telse if (o == null) oldEnd--\n\t\t\t\telse if (v == null) end--\n\t\t\t\telse if (o.key === v.key) {\n\t\t\t\t\tvar shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\tupdateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)\n\t\t\t\t\tif (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)\n\t\t\t\t\tif (o.dom != null) nextSibling = o.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!map) map = getKeyMap(old, oldEnd)\n\t\t\t\t\tif (v != null) {\n\t\t\t\t\t\tvar oldIndex = map[v.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tvar movable = old[oldIndex]\n\t\t\t\t\t\t\tvar shouldRecycle = (pool != null && oldIndex >= old.length - pool.length) || ((pool == null) && recycling)\n\t\t\t\t\t\t\tupdateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns)\n\t\t\t\t\t\t\tinsertNode(parent, toFragment(movable), nextSibling)\n\t\t\t\t\t\t\told[oldIndex].skip = true\n\t\t\t\t\t\t\tif (movable.dom != null) nextSibling = movable.dom\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar dom = createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\tnextSibling = dom\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tend--\n\t\t\t\t}\n\t\t\t\tif (end < start) break\n\t\t\t}\n\t\t\tcreateNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\tremoveNodes(old, oldStart, oldEnd + 1, vnodes)\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode._state = old._state\n\t\t\tvnode.events = old.events\n\t\t\tif (!recycling && shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tif (recycling) {\n\t\t\t\t\t\tvnode.state = {}\n\t\t\t\t\t\tinitLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t\t}\n\t\t\t\t\telse updateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, recycling, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(old, null)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\ttoFragment(old)\n\t\t\tcreateHTML(parent, vnode, nextSibling)\n\t\t}\n\t\telse vnode.dom = old.dom, vnode.domSize = old.domSize\n\t}\n\tfunction updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, recycling, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, recycling, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle0 multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (vnode.attrs != null && vnode.attrs.contenteditable != null) {\n\t\t\tsetContentEditable(vnode)\n\t\t}\n\t\telse if (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t}\n\t\telse {\n\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\tupdateNodes(element, old.children, vnode.children, recycling, hooks, null, ns)\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) {\n\t\tif (recycling) {\n\t\t\tinitComponent(vnode, hooks)\n\t\t} else {\n\t\t\tvnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))\n\t\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tupdateLifecycle(vnode._state, vnode, hooks)\n\t\t}\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, recycling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(old.instance, null)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction isRecyclable(old, vnodes) {\n\t\tif (old.pool != null && Math.abs(old.pool.length - vnodes.length) <= Math.abs(old.length - vnodes.length)) {\n\t\t\tvar oldChildrenLength = old[0] && old[0].children && old[0].children.length || 0\n\t\t\tvar poolChildrenLength = old.pool[0] && old.pool[0].children && old.pool[0].children.length || 0\n\t\t\tvar vnodesChildrenLength = vnodes[0] && vnodes[0].children && vnodes[0].children.length || 0\n\t\t\tif (Math.abs(poolChildrenLength - vnodesChildrenLength) <= Math.abs(oldChildrenLength - vnodesChildrenLength)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\tfunction getKeyMap(vnodes, end) {\n\t\tvar map = {}, i = 0\n\t\tfor (var i = 0; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key2 = vnode.key\n\t\t\t\tif (key2 != null) map[key2] = i\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\tfunction toFragment(vnode) {\n\t\tvar count0 = vnode.domSize\n\t\tif (count0 != null || vnode.dom == null) {\n\t\t\tvar fragment = $doc.createDocumentFragment()\n\t\t\tif (count0 > 0) {\n\t\t\t\tvar dom = vnode.dom\n\t\t\t\twhile (--count0) fragment.appendChild(dom.nextSibling)\n\t\t\t\tfragment.insertBefore(dom, fragment.firstChild)\n\t\t\t}\n\t\t\treturn fragment\n\t\t}\n\t\telse return vnode.dom\n\t}\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling && nextSibling.parentNode) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\tfunction setContentEditable(vnode) {\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t}\n\t//remove\n\tfunction removeNodes(vnodes, start, end, context) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tif (vnode.skip) vnode.skip = false\n\t\t\t\telse removeNode(vnode, context)\n\t\t\t}\n\t\t}\n\t}\n\tfunction removeNode(vnode, context) {\n\t\tvar expected = 1, called = 0\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = vnode.attrs.onbeforeremove.call(vnode.state, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\texpected++\n\t\t\t\tresult.then(continuation, continuation)\n\t\t\t}\n\t\t}\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode._state.onbeforeremove === \"function\") {\n\t\t\tvar result = vnode._state.onbeforeremove.call(vnode.state, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\texpected++\n\t\t\t\tresult.then(continuation, continuation)\n\t\t\t}\n\t\t}\n\t\tcontinuation()\n\t\tfunction continuation() {\n\t\t\tif (++called === expected) {\n\t\t\t\tonremove(vnode)\n\t\t\t\tif (vnode.dom) {\n\t\t\t\t\tvar count0 = vnode.domSize || 1\n\t\t\t\t\tif (count0 > 1) {\n\t\t\t\t\t\tvar dom = vnode.dom\n\t\t\t\t\t\twhile (--count0) {\n\t\t\t\t\t\t\tremoveNodeFromDOM(dom.nextSibling)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tremoveNodeFromDOM(vnode.dom)\n\t\t\t\t\tif (context != null && vnode.domSize == null && !hasIntegrationMethods(vnode.attrs) && typeof vnode.tag === \"string\") { //TODO test custom elements\n\t\t\t\t\t\tif (!context.pool) context.pool = [vnode]\n\t\t\t\t\t\telse context.pool.push(vnode)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction removeNodeFromDOM(node) {\n\t\tvar parent = node.parentNode\n\t\tif (parent != null) parent.removeChild(node)\n\t}\n\tfunction onremove(vnode) {\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") vnode.attrs.onremove.call(vnode.state, vnode)\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode._state.onremove === \"function\") vnode._state.onremove.call(vnode.state, vnode)\n\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\telse {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//attrs2\n\tfunction setAttrs(vnode, attrs2, ns) {\n\t\tfor (var key2 in attrs2) {\n\t\t\tsetAttr(vnode, key2, null, attrs2[key2], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key2, old, value, ns) {\n\t\tvar element = vnode.dom\n\t\tif (key2 === \"key\" || key2 === \"is\" || (old === value && !isFormAttribute(vnode, key2)) && typeof value !== \"object\" || typeof value === \"undefined\" || isLifecycleMethod(key2)) return\n\t\tvar nsLastIndex = key2.indexOf(\":\")\n\t\tif (nsLastIndex > -1 && key2.substr(0, nsLastIndex) === \"xlink\") {\n\t\t\telement.setAttributeNS(\"http://www.w3.org/1999/xlink\", key2.slice(nsLastIndex + 1), value)\n\t\t}\n\t\telse if (key2[0] === \"o\" && key2[1] === \"n\" && typeof value === \"function\") updateEvent(vnode, key2, value)\n\t\telse if (key2 === \"style\") updateStyle(element, old, value)\n\t\telse if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) {\n\t\t\tif (key2 === \"value\") {\n\t\t\t\tvar normalized0 = \"\" + value // eslint-disable-line no-implicit-coercion\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === normalized0 && vnode.dom === $doc.activeElement) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\") {\n\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\tif (vnode.dom.selectedIndex === -1 && vnode.dom === $doc.activeElement) return\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (old !== null && vnode.dom.value === normalized0 && vnode.dom === $doc.activeElement) return\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old != null && vnode.dom.value === normalized0) return\n\t\t\t}\n\t\t\t// If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.\n\t\t\tif (vnode.tag === \"input\" && key2 === \"type\") {\n\t\t\t\telement.setAttribute(key2, value)\n\t\t\t\treturn\n\t\t\t}\n\t\t\telement[key2] = value\n\t\t}\n\t\telse {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) element.setAttribute(key2, \"\")\n\t\t\t\telse element.removeAttribute(key2)\n\t\t\t}\n\t\t\telse element.setAttribute(key2 === \"className\" ? \"class\" : key2, value)\n\t\t}\n\t}\n\tfunction setLateAttrs(vnode) {\n\t\tvar attrs2 = vnode.attrs\n\t\tif (vnode.tag === \"select\" && attrs2 != null) {\n\t\t\tif (\"value\" in attrs2) setAttr(vnode, \"value\", null, attrs2.value, undefined)\n\t\t\tif (\"selectedIndex\" in attrs2) setAttr(vnode, \"selectedIndex\", null, attrs2.selectedIndex, undefined)\n\t\t}\n\t}\n\tfunction updateAttrs(vnode, old, attrs2, ns) {\n\t\tif (attrs2 != null) {\n\t\t\tfor (var key2 in attrs2) {\n\t\t\t\tsetAttr(vnode, key2, old && old[key2], attrs2[key2], ns)\n\t\t\t}\n\t\t}\n\t\tif (old != null) {\n\t\t\tfor (var key2 in old) {\n\t\t\t\tif (attrs2 == null || !(key2 in attrs2)) {\n\t\t\t\t\tif (key2 === \"className\") key2 = \"class\"\n\t\t\t\t\tif (key2[0] === \"o\" && key2[1] === \"n\" && !isLifecycleMethod(key2)) updateEvent(vnode, key2, undefined)\n\t\t\t\t\telse if (key2 !== \"key\") vnode.dom.removeAttribute(key2)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction isAttribute(attr) {\n\t\treturn attr === \"href\" || attr === \"list\" || attr === \"form\" || attr === \"width\" || attr === \"height\"// || attr === \"type\"\n\t}\n\tfunction isCustomElement(vnode){\n\t\treturn vnode.attrs.is || vnode.tag.indexOf(\"-\") > -1\n\t}\n\tfunction hasIntegrationMethods(source) {\n\t\treturn source != null && (source.oncreate || source.onupdate || source.onbeforeremove || source.onremove)\n\t}\n\t//style\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) element.style.cssText = \"\", old = null\n\t\tif (style == null) element.style.cssText = \"\"\n\t\telse if (typeof style === \"string\") element.style.cssText = style\n\t\telse {\n\t\t\tif (typeof old === \"string\") element.style.cssText = \"\"\n\t\t\tfor (var key2 in style) {\n\t\t\t\telement.style[key2] = style[key2]\n\t\t\t}\n\t\t\tif (old != null && typeof old !== \"string\") {\n\t\t\t\tfor (var key2 in old) {\n\t\t\t\t\tif (!(key2 in style)) element.style[key2] = \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//event\n\tfunction updateEvent(vnode, key2, value) {\n\t\tvar element = vnode.dom\n\t\tvar callback = typeof onevent !== \"function\" ? value : function(e) {\n\t\t\tvar result = value.call(element, e)\n\t\t\tonevent.call(element, e)\n\t\t\treturn result\n\t\t}\n\t\tif (key2 in element) element[key2] = typeof value === \"function\" ? callback : null\n\t\telse {\n\t\t\tvar eventName = key2.slice(2)\n\t\t\tif (vnode.events === undefined) vnode.events = {}\n\t\t\tif (vnode.events[key2] === callback) return\n\t\t\tif (vnode.events[key2] != null) element.removeEventListener(eventName, vnode.events[key2], false)\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\tvnode.events[key2] = callback\n\t\t\t\telement.addEventListener(eventName, vnode.events[key2], false)\n\t\t\t}\n\t\t}\n\t}\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") source.oninit.call(vnode.state, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(source.oncreate.bind(vnode.state, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(source.onupdate.bind(vnode.state, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tvar forceVnodeUpdate, forceComponentUpdate\n\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") forceVnodeUpdate = vnode.attrs.onbeforeupdate.call(vnode.state, vnode, old)\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode._state.onbeforeupdate === \"function\") forceComponentUpdate = vnode._state.onbeforeupdate.call(vnode.state, vnode, old)\n\t\tif (!(forceVnodeUpdate === undefined && forceComponentUpdate === undefined) && !forceVnodeUpdate && !forceComponentUpdate) {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n\tfunction render(dom, vnodes) {\n\t\tif (!dom) throw new Error(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = $doc.activeElement\n\t\tvar namespace = dom.namespaceURI\n\t\t// First time0 rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\t\tif (!Array.isArray(vnodes)) vnodes = [vnodes]\n\t\tupdateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\tdom.vnodes = vnodes\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t\tif ($doc.activeElement !== active) active.focus()\n\t}\n\treturn {render: render, setEventCallback: setEventCallback}\n}\nfunction throttle(callback) {\n\t//60fps translates to 16.6ms, round it down since setTimeout requires int\n\tvar time = 16\n\tvar last = 0, pending = null\n\tvar timeout = typeof requestAnimationFrame === \"function\" ? requestAnimationFrame : setTimeout\n\treturn function() {\n\t\tvar now = Date.now()\n\t\tif (last === 0 || now - last >= time) {\n\t\t\tlast = now\n\t\t\tcallback()\n\t\t}\n\t\telse if (pending === null) {\n\t\t\tpending = timeout(function() {\n\t\t\t\tpending = null\n\t\t\t\tcallback()\n\t\t\t\tlast = Date.now()\n\t\t\t}, time - (now - last))\n\t\t}\n\t}\n}\nvar _11 = function($window) {\n\tvar renderService = coreRenderer($window)\n\trenderService.setEventCallback(function(e) {\n\t\tif (e.redraw === false) e.redraw = undefined\n\t\telse redraw()\n\t})\n\tvar callbacks = []\n\tfunction subscribe(key1, callback) {\n\t\tunsubscribe(key1)\n\t\tcallbacks.push(key1, throttle(callback))\n\t}\n\tfunction unsubscribe(key1) {\n\t\tvar index = callbacks.indexOf(key1)\n\t\tif (index > -1) callbacks.splice(index, 2)\n\t}\n\tfunction redraw() {\n\t\tfor (var i = 1; i < callbacks.length; i += 2) {\n\t\t\tcallbacks[i]()\n\t\t}\n\t}\n\treturn {subscribe: subscribe, unsubscribe: unsubscribe, redraw: redraw, render: renderService.render}\n}\nvar redrawService = _11(window)\nrequestService.setCompletionCallback(redrawService.redraw)\nvar _16 = function(redrawService0) {\n\treturn function(root, component) {\n\t\tif (component === null) {\n\t\t\tredrawService0.render(root, [])\n\t\t\tredrawService0.unsubscribe(root)\n\t\t\treturn\n\t\t}\n\t\t\n\t\tif (component.view == null && typeof component !== \"function\") throw new Error(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t\n\t\tvar run0 = function() {\n\t\t\tredrawService0.render(root, Vnode(component))\n\t\t}\n\t\tredrawService0.subscribe(root, run0)\n\t\tredrawService0.redraw()\n\t}\n}\nm.mount = _16(redrawService)\nvar Promise = PromisePolyfill\nvar parseQueryString = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\tvar entries = string.split(\"&\"), data0 = {}, counters = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key5 = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\t\tvar levels = key5.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data0\n\t\tif (key5.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tvar isValue = j === levels.length - 1\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key5 = levels.slice(0, j).join()\n\t\t\t\tif (counters[key5] == null) counters[key5] = 0\n\t\t\t\tlevel = counters[key5]++\n\t\t\t}\n\t\t\tif (cursor[level] == null) {\n\t\t\t\tcursor[level] = isValue ? value : isNumber ? [] : {}\n\t\t\t}\n\t\t\tcursor = cursor[level]\n\t\t}\n\t}\n\treturn data0\n}\nvar coreRouter = function($window) {\n\tvar supportsPushState = typeof $window.history.pushState === \"function\"\n\tvar callAsync0 = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction normalize1(fragment0) {\n\t\tvar data = $window.location[fragment0].replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\tif (fragment0 === \"pathname\" && data[0] !== \"/\") data = \"/\" + data\n\t\treturn data\n\t}\n\tvar asyncId\n\tfunction debounceAsync(callback0) {\n\t\treturn function() {\n\t\t\tif (asyncId != null) return\n\t\t\tasyncId = callAsync0(function() {\n\t\t\t\tasyncId = null\n\t\t\t\tcallback0()\n\t\t\t})\n\t\t}\n\t}\n\tfunction parsePath(path, queryData, hashData) {\n\t\tvar queryIndex = path.indexOf(\"?\")\n\t\tvar hashIndex = path.indexOf(\"#\")\n\t\tvar pathEnd = queryIndex > -1 ? queryIndex : hashIndex > -1 ? hashIndex : path.length\n\t\tif (queryIndex > -1) {\n\t\t\tvar queryEnd = hashIndex > -1 ? hashIndex : path.length\n\t\t\tvar queryParams = parseQueryString(path.slice(queryIndex + 1, queryEnd))\n\t\t\tfor (var key4 in queryParams) queryData[key4] = queryParams[key4]\n\t\t}\n\t\tif (hashIndex > -1) {\n\t\t\tvar hashParams = parseQueryString(path.slice(hashIndex + 1))\n\t\t\tfor (var key4 in hashParams) hashData[key4] = hashParams[key4]\n\t\t}\n\t\treturn path.slice(0, pathEnd)\n\t}\n\tvar router = {prefix: \"#!\"}\n\trouter.getPath = function() {\n\t\tvar type2 = router.prefix.charAt(0)\n\t\tswitch (type2) {\n\t\t\tcase \"#\": return normalize1(\"hash\").slice(router.prefix.length)\n\t\t\tcase \"?\": return normalize1(\"search\").slice(router.prefix.length) + normalize1(\"hash\")\n\t\t\tdefault: return normalize1(\"pathname\").slice(router.prefix.length) + normalize1(\"search\") + normalize1(\"hash\")\n\t\t}\n\t}\n\trouter.setPath = function(path, data, options) {\n\t\tvar queryData = {}, hashData = {}\n\t\tpath = parsePath(path, queryData, hashData)\n\t\tif (data != null) {\n\t\t\tfor (var key4 in data) queryData[key4] = data[key4]\n\t\t\tpath = path.replace(/:([^\\/]+)/g, function(match2, token) {\n\t\t\t\tdelete queryData[token]\n\t\t\t\treturn data[token]\n\t\t\t})\n\t\t}\n\t\tvar query = buildQueryString(queryData)\n\t\tif (query) path += \"?\" + query\n\t\tvar hash = buildQueryString(hashData)\n\t\tif (hash) path += \"#\" + hash\n\t\tif (supportsPushState) {\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\t$window.onpopstate()\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, router.prefix + path)\n\t\t\telse $window.history.pushState(state, title, router.prefix + path)\n\t\t}\n\t\telse $window.location.href = router.prefix + path\n\t}\n\trouter.defineRoutes = function(routes, resolve, reject) {\n\t\tfunction resolveRoute() {\n\t\t\tvar path = router.getPath()\n\t\t\tvar params = {}\n\t\t\tvar pathname = parsePath(path, params, params)\n\t\t\tvar state = $window.history.state\n\t\t\tif (state != null) {\n\t\t\t\tfor (var k in state) params[k] = state[k]\n\t\t\t}\n\t\t\tfor (var route0 in routes) {\n\t\t\t\tvar matcher = new RegExp(\"^\" + route0.replace(/:[^\\/]+?\\.{3}/g, \"(.*?)\").replace(/:[^\\/]+/g, \"([^\\\\/]+)\") + \"\\/?$\")\n\t\t\t\tif (matcher.test(pathname)) {\n\t\t\t\t\tpathname.replace(matcher, function() {\n\t\t\t\t\t\tvar keys = route0.match(/:[^\\/]+/g) || []\n\t\t\t\t\t\tvar values = [].slice.call(arguments, 1, -2)\n\t\t\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\t\t\tparams[keys[i].replace(/:|\\./g, \"\")] = decodeURIComponent(values[i])\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolve(routes[route0], params, path, route0)\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\treject(path, params)\n\t\t}\n\t\tif (supportsPushState) $window.onpopstate = debounceAsync(resolveRoute)\n\t\telse if (router.prefix.charAt(0) === \"#\") $window.onhashchange = resolveRoute\n\t\tresolveRoute()\n\t}\n\treturn router\n}\nvar _20 = function($window, redrawService0) {\n\tvar routeService = coreRouter($window)\n\tvar identity = function(v) {return v}\n\tvar render1, component, attrs3, currentPath, lastUpdate\n\tvar route = function(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\tvar run1 = function() {\n\t\t\tif (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3)))\n\t\t}\n\t\tvar bail = function(path) {\n\t\t\tif (path !== defaultRoute) routeService.setPath(defaultRoute, null, {replace: true})\n\t\t\telse throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t}\n\t\trouteService.defineRoutes(routes, function(payload, params, path) {\n\t\t\tvar update = lastUpdate = function(routeResolver, comp) {\n\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\tattrs3 = params, currentPath = path, lastUpdate = null\n\t\t\t\trender1 = (routeResolver.render || identity).bind(routeResolver)\n\t\t\t\trun1()\n\t\t\t}\n\t\t\tif (payload.view || typeof payload === \"function\") update({}, payload)\n\t\t\telse {\n\t\t\t\tif (payload.onmatch) {\n\t\t\t\t\tPromise.resolve(payload.onmatch(params, path)).then(function(resolved) {\n\t\t\t\t\t\tupdate(payload, resolved)\n\t\t\t\t\t}, bail)\n\t\t\t\t}\n\t\t\t\telse update(payload, \"div\")\n\t\t\t}\n\t\t}, bail)\n\t\tredrawService0.subscribe(root, run1)\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\trouteService.setPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = function(prefix0) {routeService.prefix = prefix0}\n\troute.link = function(vnode1) {\n\t\tvnode1.dom.setAttribute(\"href\", routeService.prefix + vnode1.attrs.href)\n\t\tvnode1.dom.onclick = function(e) {\n\t\t\tif (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return\n\t\t\te.preventDefault()\n\t\t\te.redraw = false\n\t\t\tvar href = this.getAttribute(\"href\")\n\t\t\tif (href.indexOf(routeService.prefix) === 0) href = href.slice(routeService.prefix.length)\n\t\t\troute.set(href, undefined, undefined)\n\t\t}\n\t}\n\troute.param = function(key3) {\n\t\tif(typeof attrs3 !== \"undefined\" && typeof key3 !== \"undefined\") return attrs3[key3]\n\t\treturn attrs3\n\t}\n\treturn route\n}\nm.route = _20(window, redrawService)\nm.withAttr = function(attrName, callback1, context) {\n\treturn function(e) {\n\t\tcallback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))\n\t}\n}\nvar _28 = coreRenderer(window)\nm.render = _28.render\nm.redraw = redrawService.redraw\nm.request = requestService.request\nm.jsonp = requestService.jsonp\nm.parseQueryString = parseQueryString\nm.buildQueryString = buildQueryString\nm.version = \"1.1.3\"\nm.vnode = Vnode\nif (typeof module !== \"undefined\") module[\"exports\"] = m\nelse window.m = m\n}());\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],8:[function(require,module,exports){\n/*!\n * EventEmitter v5.2.2 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(this || {}));\n\n},{}]},{},[1]);\n })();"]}
|
assets/js/forms-admin.js
CHANGED
@@ -3308,7 +3308,7 @@ Context.prototype.nextLine = function () {
|
|
3308 |
|
3309 |
Context.fromSaved = function (doc, saved, line) {
|
3310 |
if (saved instanceof SavedContext)
|
3311 |
-
{ return new Context(doc, copyState(doc.mode, saved.
|
3312 |
else
|
3313 |
{ return new Context(doc, copyState(doc.mode, saved), line) }
|
3314 |
};
|
@@ -4952,7 +4952,7 @@ function updateHeightsInViewport(cm) {
|
|
4952 |
}
|
4953 |
var diff = cur.line.height - height;
|
4954 |
if (height < 2) { height = textHeight(display); }
|
4955 |
-
if (diff > .
|
4956 |
updateLineHeight(cur.line, height);
|
4957 |
updateWidgetHeight(cur.line);
|
4958 |
if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
|
@@ -5059,6 +5059,13 @@ function maybeScrollWindow(cm, rect) {
|
|
5059 |
function scrollPosIntoView(cm, pos, end, margin) {
|
5060 |
if (margin == null) { margin = 0; }
|
5061 |
var rect;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5062 |
for (var limit = 0; limit < 5; limit++) {
|
5063 |
var changed = false;
|
5064 |
var coords = cursorCoords(cm, pos);
|
@@ -5133,12 +5140,8 @@ function addToScrollTop(cm, top) {
|
|
5133 |
// shown.
|
5134 |
function ensureCursorVisible(cm) {
|
5135 |
resolveScrollToPos(cm);
|
5136 |
-
var cur = cm.getCursor()
|
5137 |
-
|
5138 |
-
from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;
|
5139 |
-
to = Pos(cur.line, cur.ch + 1);
|
5140 |
-
}
|
5141 |
-
cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin};
|
5142 |
}
|
5143 |
|
5144 |
function scrollToCoords(cm, x, y) {
|
@@ -6883,7 +6886,7 @@ function makeChange(doc, change, ignoreReadOnly) {
|
|
6883 |
var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
|
6884 |
if (split) {
|
6885 |
for (var i = split.length - 1; i >= 0; --i)
|
6886 |
-
{ makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); }
|
6887 |
} else {
|
6888 |
makeChangeInner(doc, change);
|
6889 |
}
|
@@ -8499,15 +8502,15 @@ var commands = {
|
|
8499 |
{origin: "+move", bias: -1}
|
8500 |
); },
|
8501 |
goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
|
8502 |
-
var top = cm.
|
8503 |
return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
|
8504 |
}, sel_move); },
|
8505 |
goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
|
8506 |
-
var top = cm.
|
8507 |
return cm.coordsChar({left: 0, top: top}, "div")
|
8508 |
}, sel_move); },
|
8509 |
goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
|
8510 |
-
var top = cm.
|
8511 |
var pos = cm.coordsChar({left: 0, top: top}, "div");
|
8512 |
if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
|
8513 |
return pos
|
@@ -10062,6 +10065,8 @@ var addEditorMethods = function(CodeMirror) {
|
|
10062 |
}),
|
10063 |
|
10064 |
operation: function(f){return runInOp(this, f)},
|
|
|
|
|
10065 |
|
10066 |
refresh: methodOp(function() {
|
10067 |
var oldHeight = this.display.cachedTextHeight;
|
@@ -10605,7 +10610,7 @@ function domTextBetween(cm, from, to, fromLine, toLine) {
|
|
10605 |
var markerID = node.getAttribute("cm-marker"), range$$1;
|
10606 |
if (markerID) {
|
10607 |
var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
|
10608 |
-
if (found.length && (range$$1 = found[0].find()))
|
10609 |
{ addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }
|
10610 |
return
|
10611 |
}
|
@@ -10714,9 +10719,6 @@ var TextareaInput = function(cm) {
|
|
10714 |
this.pollingFast = false;
|
10715 |
// Self-resetting timeout for the poller
|
10716 |
this.polling = new Delayed();
|
10717 |
-
// Tracks when input.reset has punted to just putting a short
|
10718 |
-
// string into the textarea instead of the full selection.
|
10719 |
-
this.inaccurateSelection = false;
|
10720 |
// Used to work around IE issue with selection being forgotten when focus moves away from textarea
|
10721 |
this.hasSelection = false;
|
10722 |
this.composing = null;
|
@@ -10753,12 +10755,6 @@ TextareaInput.prototype.init = function (display) {
|
|
10753 |
if (signalDOMEvent(cm, e)) { return }
|
10754 |
if (cm.somethingSelected()) {
|
10755 |
setLastCopied({lineWise: false, text: cm.getSelections()});
|
10756 |
-
if (input.inaccurateSelection) {
|
10757 |
-
input.prevInput = "";
|
10758 |
-
input.inaccurateSelection = false;
|
10759 |
-
te.value = lastCopied.text.join("\n");
|
10760 |
-
selectInput(te);
|
10761 |
-
}
|
10762 |
} else if (!cm.options.lineWiseCopyCut) {
|
10763 |
return
|
10764 |
} else {
|
@@ -10837,13 +10833,10 @@ TextareaInput.prototype.showSelection = function (drawn) {
|
|
10837 |
// when not typing and nothing is selected)
|
10838 |
TextareaInput.prototype.reset = function (typing) {
|
10839 |
if (this.contextMenuPending || this.composing) { return }
|
10840 |
-
var
|
10841 |
if (cm.somethingSelected()) {
|
10842 |
this.prevInput = "";
|
10843 |
-
var
|
10844 |
-
minimal = hasCopyEvent &&
|
10845 |
-
(range$$1.to().line - range$$1.from().line > 100 || (selected = cm.getSelection()).length > 1000);
|
10846 |
-
var content = minimal ? "-" : selected || cm.getSelection();
|
10847 |
this.textarea.value = content;
|
10848 |
if (cm.state.focused) { selectInput(this.textarea); }
|
10849 |
if (ie && ie_version >= 9) { this.hasSelection = content; }
|
@@ -10851,7 +10844,6 @@ TextareaInput.prototype.reset = function (typing) {
|
|
10851 |
this.prevInput = this.textarea.value = "";
|
10852 |
if (ie && ie_version >= 9) { this.hasSelection = null; }
|
10853 |
}
|
10854 |
-
this.inaccurateSelection = minimal;
|
10855 |
};
|
10856 |
|
10857 |
TextareaInput.prototype.getField = function () { return this.textarea };
|
@@ -11202,7 +11194,7 @@ CodeMirror$1.fromTextArea = fromTextArea;
|
|
11202 |
|
11203 |
addLegacyProps(CodeMirror$1);
|
11204 |
|
11205 |
-
CodeMirror$1.version = "5.
|
11206 |
|
11207 |
return CodeMirror$1;
|
11208 |
|
@@ -11594,7 +11586,8 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
11594 |
style = style[0];
|
11595 |
}
|
11596 |
override = style;
|
11597 |
-
|
|
|
11598 |
return override;
|
11599 |
},
|
11600 |
|
@@ -12208,11 +12201,6 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12208 |
})(function(CodeMirror) {
|
12209 |
"use strict";
|
12210 |
|
12211 |
-
function expressionAllowed(stream, state, backUp) {
|
12212 |
-
return /^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
|
12213 |
-
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
|
12214 |
-
}
|
12215 |
-
|
12216 |
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
12217 |
var indentUnit = config.indentUnit;
|
12218 |
var statementIndent = parserConfig.statementIndent;
|
@@ -12257,6 +12245,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12257 |
"private": kw("modifier"),
|
12258 |
"protected": kw("modifier"),
|
12259 |
"abstract": kw("modifier"),
|
|
|
12260 |
|
12261 |
// types
|
12262 |
"string": type, "number": type, "boolean": type, "any": type
|
@@ -12565,6 +12554,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12565 |
if (isTS && value == "type") {
|
12566 |
cx.marked = "keyword"
|
12567 |
return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
|
|
|
|
|
|
12568 |
} else {
|
12569 |
return cont(pushlex("stat"), maybelabel);
|
12570 |
}
|
@@ -12631,7 +12623,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12631 |
var expr = noComma == false ? expression : expressionNoComma;
|
12632 |
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
12633 |
if (type == "operator") {
|
12634 |
-
if (/\+\+|--/.test(value)) return cont(me);
|
12635 |
if (value == "?") return cont(expression, expect(":"), expr);
|
12636 |
return cont(expr);
|
12637 |
}
|
@@ -12665,6 +12657,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12665 |
function maybeTarget(noComma) {
|
12666 |
return function(type) {
|
12667 |
if (type == ".") return cont(noComma ? targetNoComma : target);
|
|
|
12668 |
else return pass(noComma ? expressionNoComma : expression);
|
12669 |
};
|
12670 |
}
|
@@ -12746,9 +12739,18 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12746 |
if (value == "?") return cont(maybetype);
|
12747 |
}
|
12748 |
}
|
12749 |
-
function typeexpr(type) {
|
12750 |
-
if (type == "variable") {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12751 |
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
|
|
12752 |
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
12753 |
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
12754 |
}
|
@@ -12777,6 +12779,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12777 |
if (type == "[") return cont(expect("]"), afterType)
|
12778 |
if (value == "extends") return cont(typeexpr)
|
12779 |
}
|
|
|
|
|
|
|
12780 |
function vardef() {
|
12781 |
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
12782 |
}
|
@@ -12834,7 +12839,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12834 |
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef)
|
12835 |
}
|
12836 |
function funarg(type) {
|
12837 |
-
if (type == "spread") return cont(funarg);
|
12838 |
return pass(pattern, maybetype, maybeAssign);
|
12839 |
}
|
12840 |
function classExpression(type, value) {
|
@@ -12852,13 +12857,14 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12852 |
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
12853 |
}
|
12854 |
function classBody(type, value) {
|
12855 |
-
if (type == "
|
12856 |
-
|
12857 |
-
|
12858 |
-
|
12859 |
-
|
12860 |
-
|
12861 |
-
|
|
|
12862 |
cx.marked = "property";
|
12863 |
return cont(isTS ? classfield : functiondef, classBody);
|
12864 |
}
|
@@ -12918,6 +12924,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12918 |
/[,.]/.test(textAfter.charAt(0));
|
12919 |
}
|
12920 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12921 |
// Interface
|
12922 |
|
12923 |
return {
|
@@ -12992,6 +13004,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12992 |
jsonMode: jsonMode,
|
12993 |
|
12994 |
expressionAllowed: expressionAllowed,
|
|
|
12995 |
skipExpression: function(state) {
|
12996 |
var top = state.cc[state.cc.length - 1]
|
12997 |
if (top == expression || top == expressionNoComma) state.cc.pop()
|
@@ -13953,9 +13966,10 @@ module.exports = {
|
|
13953 |
module.exports = require("./stream/stream")
|
13954 |
|
13955 |
},{"./stream/stream":22}],22:[function(require,module,exports){
|
13956 |
-
|
13957 |
-
|
13958 |
;(function() {
|
|
|
|
|
13959 |
|
13960 |
var guid = 0, HALT = {}
|
13961 |
function createStream() {
|
3308 |
|
3309 |
Context.fromSaved = function (doc, saved, line) {
|
3310 |
if (saved instanceof SavedContext)
|
3311 |
+
{ return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }
|
3312 |
else
|
3313 |
{ return new Context(doc, copyState(doc.mode, saved), line) }
|
3314 |
};
|
4952 |
}
|
4953 |
var diff = cur.line.height - height;
|
4954 |
if (height < 2) { height = textHeight(display); }
|
4955 |
+
if (diff > .005 || diff < -.005) {
|
4956 |
updateLineHeight(cur.line, height);
|
4957 |
updateWidgetHeight(cur.line);
|
4958 |
if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
|
5059 |
function scrollPosIntoView(cm, pos, end, margin) {
|
5060 |
if (margin == null) { margin = 0; }
|
5061 |
var rect;
|
5062 |
+
if (!cm.options.lineWrapping && pos == end) {
|
5063 |
+
// Set pos and end to the cursor positions around the character pos sticks to
|
5064 |
+
// If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
|
5065 |
+
// If pos == Pos(_, 0, "before"), pos and end are unchanged
|
5066 |
+
pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
|
5067 |
+
end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
|
5068 |
+
}
|
5069 |
for (var limit = 0; limit < 5; limit++) {
|
5070 |
var changed = false;
|
5071 |
var coords = cursorCoords(cm, pos);
|
5140 |
// shown.
|
5141 |
function ensureCursorVisible(cm) {
|
5142 |
resolveScrollToPos(cm);
|
5143 |
+
var cur = cm.getCursor();
|
5144 |
+
cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};
|
|
|
|
|
|
|
|
|
5145 |
}
|
5146 |
|
5147 |
function scrollToCoords(cm, x, y) {
|
6886 |
var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
|
6887 |
if (split) {
|
6888 |
for (var i = split.length - 1; i >= 0; --i)
|
6889 |
+
{ makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); }
|
6890 |
} else {
|
6891 |
makeChangeInner(doc, change);
|
6892 |
}
|
8502 |
{origin: "+move", bias: -1}
|
8503 |
); },
|
8504 |
goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
|
8505 |
+
var top = cm.cursorCoords(range.head, "div").top + 5;
|
8506 |
return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
|
8507 |
}, sel_move); },
|
8508 |
goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
|
8509 |
+
var top = cm.cursorCoords(range.head, "div").top + 5;
|
8510 |
return cm.coordsChar({left: 0, top: top}, "div")
|
8511 |
}, sel_move); },
|
8512 |
goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
|
8513 |
+
var top = cm.cursorCoords(range.head, "div").top + 5;
|
8514 |
var pos = cm.coordsChar({left: 0, top: top}, "div");
|
8515 |
if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
|
8516 |
return pos
|
10065 |
}),
|
10066 |
|
10067 |
operation: function(f){return runInOp(this, f)},
|
10068 |
+
startOperation: function(){return startOperation(this)},
|
10069 |
+
endOperation: function(){return endOperation(this)},
|
10070 |
|
10071 |
refresh: methodOp(function() {
|
10072 |
var oldHeight = this.display.cachedTextHeight;
|
10610 |
var markerID = node.getAttribute("cm-marker"), range$$1;
|
10611 |
if (markerID) {
|
10612 |
var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
|
10613 |
+
if (found.length && (range$$1 = found[0].find(0)))
|
10614 |
{ addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }
|
10615 |
return
|
10616 |
}
|
10719 |
this.pollingFast = false;
|
10720 |
// Self-resetting timeout for the poller
|
10721 |
this.polling = new Delayed();
|
|
|
|
|
|
|
10722 |
// Used to work around IE issue with selection being forgotten when focus moves away from textarea
|
10723 |
this.hasSelection = false;
|
10724 |
this.composing = null;
|
10755 |
if (signalDOMEvent(cm, e)) { return }
|
10756 |
if (cm.somethingSelected()) {
|
10757 |
setLastCopied({lineWise: false, text: cm.getSelections()});
|
|
|
|
|
|
|
|
|
|
|
|
|
10758 |
} else if (!cm.options.lineWiseCopyCut) {
|
10759 |
return
|
10760 |
} else {
|
10833 |
// when not typing and nothing is selected)
|
10834 |
TextareaInput.prototype.reset = function (typing) {
|
10835 |
if (this.contextMenuPending || this.composing) { return }
|
10836 |
+
var cm = this.cm;
|
10837 |
if (cm.somethingSelected()) {
|
10838 |
this.prevInput = "";
|
10839 |
+
var content = cm.getSelection();
|
|
|
|
|
|
|
10840 |
this.textarea.value = content;
|
10841 |
if (cm.state.focused) { selectInput(this.textarea); }
|
10842 |
if (ie && ie_version >= 9) { this.hasSelection = content; }
|
10844 |
this.prevInput = this.textarea.value = "";
|
10845 |
if (ie && ie_version >= 9) { this.hasSelection = null; }
|
10846 |
}
|
|
|
10847 |
};
|
10848 |
|
10849 |
TextareaInput.prototype.getField = function () { return this.textarea };
|
11194 |
|
11195 |
addLegacyProps(CodeMirror$1);
|
11196 |
|
11197 |
+
CodeMirror$1.version = "5.29.0";
|
11198 |
|
11199 |
return CodeMirror$1;
|
11200 |
|
11586 |
style = style[0];
|
11587 |
}
|
11588 |
override = style;
|
11589 |
+
if (type != "comment")
|
11590 |
+
state.state = states[state.state](type, stream, state);
|
11591 |
return override;
|
11592 |
},
|
11593 |
|
12201 |
})(function(CodeMirror) {
|
12202 |
"use strict";
|
12203 |
|
|
|
|
|
|
|
|
|
|
|
12204 |
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
12205 |
var indentUnit = config.indentUnit;
|
12206 |
var statementIndent = parserConfig.statementIndent;
|
12245 |
"private": kw("modifier"),
|
12246 |
"protected": kw("modifier"),
|
12247 |
"abstract": kw("modifier"),
|
12248 |
+
"readonly": kw("modifier"),
|
12249 |
|
12250 |
// types
|
12251 |
"string": type, "number": type, "boolean": type, "any": type
|
12554 |
if (isTS && value == "type") {
|
12555 |
cx.marked = "keyword"
|
12556 |
return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
12557 |
+
} if (isTS && value == "declare") {
|
12558 |
+
cx.marked = "keyword"
|
12559 |
+
return cont(statement)
|
12560 |
} else {
|
12561 |
return cont(pushlex("stat"), maybelabel);
|
12562 |
}
|
12623 |
var expr = noComma == false ? expression : expressionNoComma;
|
12624 |
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
12625 |
if (type == "operator") {
|
12626 |
+
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
|
12627 |
if (value == "?") return cont(expression, expect(":"), expr);
|
12628 |
return cont(expr);
|
12629 |
}
|
12657 |
function maybeTarget(noComma) {
|
12658 |
return function(type) {
|
12659 |
if (type == ".") return cont(noComma ? targetNoComma : target);
|
12660 |
+
else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
|
12661 |
else return pass(noComma ? expressionNoComma : expression);
|
12662 |
};
|
12663 |
}
|
12739 |
if (value == "?") return cont(maybetype);
|
12740 |
}
|
12741 |
}
|
12742 |
+
function typeexpr(type, value) {
|
12743 |
+
if (type == "variable") {
|
12744 |
+
if (value == "keyof") {
|
12745 |
+
cx.marked = "keyword"
|
12746 |
+
return cont(typeexpr)
|
12747 |
+
} else {
|
12748 |
+
cx.marked = "type"
|
12749 |
+
return cont(afterType)
|
12750 |
+
}
|
12751 |
+
}
|
12752 |
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
12753 |
+
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
12754 |
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
12755 |
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
12756 |
}
|
12779 |
if (type == "[") return cont(expect("]"), afterType)
|
12780 |
if (value == "extends") return cont(typeexpr)
|
12781 |
}
|
12782 |
+
function maybeTypeArgs(_, value) {
|
12783 |
+
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
12784 |
+
}
|
12785 |
function vardef() {
|
12786 |
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
12787 |
}
|
12839 |
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef)
|
12840 |
}
|
12841 |
function funarg(type) {
|
12842 |
+
if (type == "spread" || type == "modifier") return cont(funarg);
|
12843 |
return pass(pattern, maybetype, maybeAssign);
|
12844 |
}
|
12845 |
function classExpression(type, value) {
|
12857 |
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
12858 |
}
|
12859 |
function classBody(type, value) {
|
12860 |
+
if (type == "modifier" || type == "async" ||
|
12861 |
+
(type == "variable" &&
|
12862 |
+
(value == "static" || value == "get" || value == "set") &&
|
12863 |
+
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
|
12864 |
+
cx.marked = "keyword";
|
12865 |
+
return cont(classBody);
|
12866 |
+
}
|
12867 |
+
if (type == "variable") {
|
12868 |
cx.marked = "property";
|
12869 |
return cont(isTS ? classfield : functiondef, classBody);
|
12870 |
}
|
12924 |
/[,.]/.test(textAfter.charAt(0));
|
12925 |
}
|
12926 |
|
12927 |
+
function expressionAllowed(stream, state, backUp) {
|
12928 |
+
return state.tokenize == tokenBase &&
|
12929 |
+
/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
|
12930 |
+
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
|
12931 |
+
}
|
12932 |
+
|
12933 |
// Interface
|
12934 |
|
12935 |
return {
|
13004 |
jsonMode: jsonMode,
|
13005 |
|
13006 |
expressionAllowed: expressionAllowed,
|
13007 |
+
|
13008 |
skipExpression: function(state) {
|
13009 |
var top = state.cc[state.cc.length - 1]
|
13010 |
if (top == expression || top == expressionNoComma) state.cc.pop()
|
13966 |
module.exports = require("./stream/stream")
|
13967 |
|
13968 |
},{"./stream/stream":22}],22:[function(require,module,exports){
|
13969 |
+
/* eslint-disable */
|
|
|
13970 |
;(function() {
|
13971 |
+
"use strict"
|
13972 |
+
/* eslint-enable */
|
13973 |
|
13974 |
var guid = 0, HALT = {}
|
13975 |
function createStream() {
|
assets/js/forms-admin.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!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}({1:[function(e,t,r){"use strict";var n=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};t.exports=n},{}],2:[function(e,t,r){"use strict";var n=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.number=function(e){return[n.text(e),i.numberMinMax(e)]},n};t.exports=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")},o=function(e){function t(t){var i=void 0,o=void 0,a=void 0,l=document.createElement("div");return i=t.label().length>0?e("label",{},t.label()):"",o="function"==typeof r[t.type()]?r[t.type()](t):r.default(t),a=t.wrap()?e("p",[i,o]):[i,o],e.render(l,a),n.prettyPrint(l.innerHTML)+"\n"}var r={};return r.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)},r.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())])})},r.radio=r.checkbox,r.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)},t};t.exports=o},{html:20}],4:[function(e,t,r){"use strict";var n=function(t,r,n,i,o,a){function l(e){d=i.get(e),d&&d.choices().length>0&&d.value(d.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function s(){}function c(){var e=f(d);n.insert(e),l(""),t.redraw()}function u(){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 d&&(o=h(t("div.field-wizard",[t("h3",[d.title(),d.forceRequired()?t("span.red","*"):"",d.name().length?t("code",d.name()):""]),d.help().length?t("p",t.trust(d.help())):"",p.render(d),t("p",[t("button",{class:"button-primary",type:"button",onkeydown:function(e){e=e||window.event,13==e.keyCode&&c()},onclick:c},a.addToForm)])]),l)),[n,o]}var d,f=e("./field-generator.js")(t),h=e("./overlay.js")(t,a),p=e("./field-forms.js")(t,a);return n.on("blur",t.redraw),{view:u,controller:s}};t.exports=n},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){"use strict";var n=function(e,t){function r(){u.forEach(e.deregister)}function n(t,r,n){var i=e.register(t,r);n||u.push(i)}function i(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function o(e){var r=t.listFields,o=i(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?n(r,a,!1):(n(r,{name:a.name+"[addr1]",type:"text",mailchimpType:"address",title:t.streetAddress}),n(r,{name:a.name+"[city]",type:"text",mailchimpType:"address",title:t.city}),n(r,{name:a.name+"[state]",type:"text",mailchimpType:"address",title:t.state}),n(r,{name:a.name+"[zip]",type:"text",mailchimpType:"address",title:t.zip}),n(r,{name:a.name+"[country]",type:"select",mailchimpType:"address",title:t.country,choices:mc4wp_vars.countries})),!0}function a(e){var r=t.interestCategories,o=i(e.field_type);n(r,{title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o},!1)}function l(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(o),e.interest_categories.forEach(a)}function s(e){r(),e.forEach(l)}function c(e){var r,i=t.formFields;n(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),r={};for(var o in e)r[e[o].id]=e[o].name;n(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:r,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),r={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},n(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:r,value:"subscribe",help:t.formActionDescription},!0)}var u=[];return{registerCustomFields:c,registerListFields:l,registerListsFields:s}};t.exports=n},{}],6:[function(e,t,r){"use strict";var n=e("mithril/stream");t.exports=function(e,t){function r(e){return"function"==typeof e.map?e.map(function(e){return new p({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new p({label:r,value:t})})}function i(n,i){var o,a=c("name",i.name).shift();return a?void(!a.forceRequired()&&i.forceRequired&&a.forceRequired(!0)):(i.choices&&(i.choices=r(i.choices),i.value&&(i.choices=i.choices.map(function(e){return e.value()===i.value&&e.selected(!0),e}))),f.indexOf(n)<0&&f.push(n),o=new h(i),o.category=n,d.push(o),u&&window.clearTimeout(u),u=window.setTimeout(e.redraw,200),t.trigger("fields.change"),o)}function o(t){var r=d.indexOf(t);r>-1&&(delete d[r],e.redraw())}function a(e){return d[e]}function l(){return d=d.map(function(e,t){return e.index=t,e})}function s(){return f}function c(e,t){return d.filter(function(r){return r[e]()===t})}var u,d=[],f=[],h=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.title||""),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(e.wrap||!0),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.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}))}},p=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:a,getAll:l,getCategories:s,deregister:o,register:i,getAllWhere:c}}},{"mithril/stream":21}],7:[function(e,t,r){"use strict";var n=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"),e("codemirror/addon/edit/matchtags"),e("codemirror/addon/edit/closetag.js");var i=function(e){function t(){return o&&(i.innerHTML=a.getValue().toLowerCase(),o=!1),i}var r,i=document.createElement("form"),o=!1,a={};return i.innerHTML=e.value.toLowerCase(),n&&(r=n.fromTextArea(e,{selectionPointer:!0,matchTags:{bothTags:!0},mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0}),window.dispatchEvent&&r.on("change",function(){if("function"==typeof Event){var t=new Event("change",{bubbles:!0});e.dispatchEvent(t)}})),window.addEventListener("load",function(){n.signal(r,"change")}),e.addEventListener("change",function(){o=!0}),a.getValue=function(){return r?r.getValue():e.value},a.query=function(e){return t().querySelectorAll(e.toLowerCase())},a.containsField=function(e){return null!==t().elements.namedItem(e.toLowerCase())},a.insert=function(t){r?(r.replaceSelection(t),r.focus()):e.value+=t},a.on=function(t,n){return r?(t="input"===t?"changes":t,r.on(t,n)):e.addEventListener(t,n)},a.refresh=function(){r&&r.refresh()},a};t.exports=i},{codemirror:15,"codemirror/addon/edit/closetag.js":12,"codemirror/addon/edit/matchtags":13,"codemirror/addon/fold/xml-fold":14,"codemirror/mode/css/css":16,"codemirror/mode/htmlmixed/htmlmixed":17,"codemirror/mode/javascript/javascript":18,"codemirror/mode/xml/xml":19}],8:[function(e,t,r){"use strict";var n=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)}}}),l(),e.redraw()}function l(){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.toUpperCase();"_"!==r[0]&&(r=r.replace(/\[(\w+)\]/g,".$1"),-1===e.indexOf(r)&&e.push(r))}),s.value=e.join(",")}var s=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))};t.exports=n},{}],9:[function(e,t,r){"use strict";function n(e,t){l[e]=t,o()}function i(e){delete l[e],o()}function o(){var e="";for(var t in l)e+='<div class="notice notice-warning inline"><p>'+l[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){r=document.createElement("div"),r.className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}function a(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),o=r.filter(function(t){return!e.containsField(t.name().toUpperCase())}),a="<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.";a+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+o.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",o.length>0?n("required_fields_missing",a):i("required_fields_missing")};r(),e.on("focus",r),e.on("blur",r),o(),e.on("blur",o),e.on("focus",o)}var l={};t.exports={init:a}},{}],10:[function(e,t,r){"use strict";var n=function(e,t){function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),l()}function n(e){e=e||window.event,27==e.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})]}};t.exports=n},{}],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=document.getElementById("mc4wp-form-content"),m=window.formEditor=new u(p),g=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),v=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),g);var y=new f(h,n);o.on("selectedLists.change",y.registerListsFields),y.registerListsFields(a.getSelectedLists()),y.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),v.init(m,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=m,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){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),n=[],s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[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&&a,g="object"==typeof h&&h.indentTags||p&&l,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&&i(m,y)>-1||o(t,v,c,f,!0))return e.Pass;var b=g&&i(g,y)>-1;n[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=r.length-1;s>=0;s--){var w=n[s];t.replaceRange(w.text,r[s].head,r[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))}}function r(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=n[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||o(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),i[l]=f}t.replaceSelections(i),n=t.listSelections();for(var l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&t.indentLine(n[l].head.line)}function n(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function i(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 o(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(r,i,o){if(o!=e.Init&&o&&r.removeKeyMap("autoCloseTags"),i){var a={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof i||i.whenOpening)&&(a["'>'"]=function(e){return t(e)}),r.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["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 r(e)}})},{"../../lib/codemirror":15,"../fold/xml-fold":14}],13:[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":15,"../fold/xml-fold":14}],14:[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){return e.line-t.line||e.ch-t.ch}function r(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 n(e,t){var r=e.cm.getTokenTypeAt(f(e.line,t));return r&&/\btag\b/.test(r)}function i(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(n(e,t+1)){p.lastIndex=t,e.ch=t;var r=p.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function s(e){for(;;){p.lastIndex=e.ch;var t=p.exec(e.text);if(!t){if(i(e))continue;return}{if(n(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var r=[];;){var n,i=s(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(n=a(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:f(o,l),to:f(e.line,e.ch)}}else r.push(i[2])}}function d(e,t){for(var r=[];;){var n=c(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:f(e.line,e.ch),to:f(i,o)}}}else l(e)}}var f=e.Pos,h="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",p=new RegExp("<(/?)(["+h+"][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,t){for(var n=new r(e,t.line,0);;){var i,o=s(n);if(!o||n.line!=t.line||!(i=a(n)))return;if(!o[1]&&"selfClose"!=i){var l=f(n.line,n.ch),c=u(n,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,n,i){var o=new r(e,n.line,n.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=a(o),c=s&&f(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,n)>0)){var p={from:f(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:h[1]?{open:d(o,h[2]),close:p,at:"close"}:(o=new r(e,c.line,c.ch,i),{open:p,close:u(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,n,i){for(var o=new r(e,t.line,t.ch,n);;){var a=d(o,i);if(!a)break;var l=new r(e,t.line,t.ch,n),s=u(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,i){return u(new r(e,t.line,t.ch,i?{from:0,to:i}:null),n)}})},{"../../lib/codemirror":15}],15:[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(;Ra.length<=e;)Ra.push(m(Ra)+" ");return Ra[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(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function y(){}function b(e,t){var r;return Object.create?r=Object.create(e):(y.prototype=e,r=new y),t&&u(t,r),r}function w(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ja.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function k(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function C(e){return e.charCodeAt(0)>=768&&Ba.test(e)}function S(e,t,r){for(;(r<0?t>0:t<e.length)&&C(e.charAt(t));)t+=r;return t}function T(e,t,r){for(;;){if(Math.abs(t-r)<=1)return e(t)?t:r;var n=Math.floor((t+r)/2);e(n)?r=n:t=n}}function L(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[a],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Da+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),da&&fa<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),ha||la&&ka||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(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 A(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 N(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function O(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function _(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 E(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],s=l.height;if(t<s)break;t-=s}return r+a}function W(e,t){return t>=e.first&&t<e.first+e.size}function F(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function D(e,t,r){if(void 0===r&&(r=null),!(this instanceof D))return new D(e,t,r);this.line=e,this.ch=t,this.sticky=r}function z(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&0==z(e,t)}function H(e){return D(e.line,e.ch)}function I(e,t){return z(e,t)<0?t:e}function R(e,t){return z(e,t)<0?e:t}function j(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function B(e,t){if(t.line<e.first)return D(e.first,0);var r=e.first+e.size-1;return t.line>r?D(r,M(e,r).text.length):q(t,M(e,t.line).text.length)}function q(e,t){var r=e.ch;return null==r||r>t?D(e.line,t):r<0?D(e.line,0):e}function U(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=B(e,t[n]);return r}function K(){qa=!0}function V(){Ua=!0}function G(e,t,r){this.marker=e,this.from=t,this.to=r}function $(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Y(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function X(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Z(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new G(a,o.from,s?null:o.to))}}return n}function J(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new G(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function Q(e,t){if(t.full)return null
|
2 |
-
;var r=W(e,t.from.line)&&M(e,t.from.line).markedSpans,n=W(e,t.to.line)&&M(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==z(t.from,t.to),l=Z(r,i,a),s=J(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=$(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){var v=$(l,g.marker);v||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=ee(l)),s&&s!=l&&(s=ee(s));var y=[l];if(!c){var b,w=t.text.length-2;if(w>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(b||(b=[])).push(new G(l[x].marker,null,null));for(var k=0;k<w;++k)y.push(b);y.push(s)}return y}function ee(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 te(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(!(z(c.to,l.from)<0||z(c.from,l.to)>0)){var u=[s,1],d=z(c.from,l.from),h=z(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}function re(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function ne(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ie(e){return e.inclusiveLeft?-1:0}function oe(e){return e.inclusiveRight?1:0}function ae(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=z(n.from,i.from)||ie(e)-ie(t);if(o)return-o;var a=z(n.to,i.to)||oe(e)-oe(t);return a||t.id-e.id}function le(e,t){var r,n=Ua&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||ae(r,i.marker)<0)&&(r=i.marker);return r}function se(e){return le(e,!0)}function ce(e){return le(e,!1)}function ue(e,t,r,n,i){var o=M(e,t),a=Ua&&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=z(c.from,r)||ie(s.marker)-ie(i),d=z(c.to,n)||oe(s.marker)-oe(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?z(c.to,r)>=0:z(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?z(c.from,n)<=0:z(c.from,n)<0)))return!0}}}function de(e){for(var t;t=se(e);)e=t.find(-1,!0).line;return e}function fe(e){for(var t;t=ce(e);)e=t.find(1,!0).line;return e}function he(e){for(var t,r;t=ce(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=de(r);return r==n?t:_(n)}function me(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ge(e,n))return t;for(;r=ce(n);)n=r.find(1,!0).line;return _(n)+1}function ge(e,t){var r=Ua&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ve(e,t,n))return!0}}function ve(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ve(e,n.line,$(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],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ve(e,t,i))return!0}function ye(e){e=de(e);for(var t=0,r=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 be(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=se(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ce(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function we(e){var t=e.display,r=e.doc;t.maxLine=M(r,r.first),t.maxLineLength=be(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=be(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr");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"),i=!0)}i||n(t,r,"ltr")}function ke(e,t,r){var n;Ka=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:Ka=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Ka=i)}return null!=n?n:Ka}function Ce(e,t){var r=e.order;return null==r&&(r=e.order=Va(e.text,t)),r}function Se(e,t,r){var n=S(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Te(e,t,r){var n=Se(e,t.ch,r);return null==n?null:new D(t.line,n,r<0?"after":"before")}function Le(e,t,r,n,i){if(e){var o=Ce(r,t.doc.direction);if(o){var a,l=i<0?m(o):o[0],s=i<0==(1==l.level),c=s?"after":"before";if(l.level>0){var u=Zt(t,r);a=i<0?r.text.length-1:0;var d=Jt(t,u,a).top;a=T(function(e){return Jt(t,u,e).top==d},i<0==(1==l.level)?l.from:l.to-1,a),"before"==c&&(a=Se(r,a,1))}else a=i<0?l.to:l.from;return new D(n,a,c)}}return new D(n,i<0?r.text.length:0,i<0?"before":"after")}function Me(e,t,r,n){var i=Ce(t,e.doc.direction);if(!i)return Te(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=ke(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 Te(t,r,n);var l,s=function(e,r){return Se(t,e instanceof D?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||Zt(e,t),gr(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 D(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new D(r.line,s(e,1),"before"):new D(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}function Ae(e,t){return e._handlers&&e._handlers[t]||Ga}function Ne(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 Oe(e,t){var r=Ae(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 _e(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,r||t.type,e,t),Pe(t)||t.codemirrorIgnore}function Ee(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 We(e,t){return Ae(e,t).length>0}function Fe(e){e.prototype.on=function(e,t){$a(this,e,t)},e.prototype.off=function(e,t){Ne(this,e,t)}}function De(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ze(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Pe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function He(e){De(e),ze(e)}function Ie(e){return e.target||e.srcElement}function Re(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ca&&e.ctrlKey&&1==t&&(t=3),t}function je(e){if(null==Wa){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Wa=t.offsetWidth<=1&&t.offsetHeight>2&&!(da&&fa<8))}var i=Wa?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Be(e){if(null!=Fa)return Fa;var n=r(e,document.createTextNode("AخA")),i=Ma(n,0,1).getBoundingClientRect(),o=Ma(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Fa=o.right-i.right<3)}function qe(e){if(null!=Qa)return Qa;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=Ma(t,0,1).getBoundingClientRect();return Qa=Math.abs(i.left-o.left)>1}function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),el[e]=t}function Ke(e,t){tl[e]=t}function Ve(e){if("string"==typeof e&&tl.hasOwnProperty(e))e=tl[e];else if(e&&"string"==typeof e.name&&tl.hasOwnProperty(e.name)){var t=tl[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ve(t);var r=el[t.name];if(!r)return Ge(e,"text/plain");var n=r(e,t);if(rl.hasOwnProperty(t.name)){var i=rl[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 $e(e,t){u(t,rl.hasOwnProperty(e)?rl[e]:rl[e]={})}function Ye(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 Xe(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 Ze(e,t,r){return!e.startState||e.startState(t,r)}function Je(e,t,r,n){var i=[e.state.modeGen],o={};at(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=r.state,l=0;l<e.state.overlays.length;++l)!function(n){var a=e.state.overlays[n],l=1,s=0;r.state=!0,at(e,t.text,a.mode,r,function(e,t){for(var r=l;s<e;){var n=i[l];n>e&&i.splice(l,1,e,i[l+1],n),l+=2,s=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;r<l;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o)}(l);return r.state=a,{styles:i,classes:o.bgClass||o.textClass?o:null}}function Qe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=et(e,_(t)),i=t.text.length>e.options.maxHighlightLength&&Ye(e.doc.mode,n.state),o=Je(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 et(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ol(n,!0,t);var o=lt(e,t,r),a=o>n.first&&M(n,o-1).stateAfter,l=a?ol.fromSaved(n,a,o):new ol(n,Ze(n.mode),o);return n.iter(o,t,function(r){tt(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 tt(e,t,r,n){var i=e.doc.mode,o=new nl(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&rt(i,r.state);!o.eol();)nt(i,o,r.state),o.start=o.pos}function rt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Xe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function nt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Xe(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 it(e,t,r,n){var i,o=e.doc,a=o.mode;t=B(o,t);var l,s=M(o,t.line),c=et(e,t.line,r),u=new nl(s.text,e.options.tabSize,c);for(n&&(l=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=nt(a,u,c.state),n&&l.push(new al(u,i,Ye(o.mode,c.state)));return n?l:new al(u,i,c.state)}function ot(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 at(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 nl(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&ot(rt(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&tt(e,t,n,d.pos),d.pos=t.length,s=null):s=ot(nt(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;)c=Math.min(d.start,c+5e3),i(c,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 lt(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=M(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof il?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}function st(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=M(e,n).stateAfter;if(i&&(!(i instanceof il)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}function ct(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),re(e),ne(e,r);var i=n?n(e):1;i!=e.height&&O(e,i)}function ut(e){e.parent=null,re(e)}function dt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ul:cl;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function ft(e,t){var r=i("span",null,null,ha?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(da||ha)&&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=pt,Be(e.display.measure)&&(l=Ce(a,e.doc.direction))&&(n.addToken=gt(n.addToken,l)),n.map=[];yt(a,n,Qe(e,a,t!=e.display.externalMeasured&&_(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(je(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(ha){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 Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=s(n.pre.className,n.textClass||"")),n}function ht(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function pt(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?mt(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));da&&fa<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")),v.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")),v.setAttribute("cm-text",h[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(h[0]),v.setAttribute("cm-text",h[0]),da&&fa<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),da&&fa<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 mt(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}function gt(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],!(d.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}}}function vt(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 yt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=d=l="",f=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?y.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!f||ae(f.marker,k)<0)&&(f=x)):x.from>p&&v>x.from&&(v=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!f||f.from==p)for(var S=0;S<y.length;++S)vt(t,0,y[S]);if(f&&(f.from||0)==p){if(vt(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var T=Math.min(h,v);;){if(g){var L=p+g.length;if(!f){var M=L>T?g.slice(0,T-p):g;t.addToken(t,M,a?a+s:s,u,p+M.length==v?c:"",d,l)}if(L>=T){g=g.slice(T-p),p=T;break}p=L,u=""}g=i.slice(o,o=r[m++]),a=dt(r[m++],t.cm.options)}}else for(var A=1;A<r.length;A+=2)t.addToken(t,i.slice(o,o=r[A]),dt(r[A+1],t.cm.options))}function bt(e,t,r){this.line=t,this.rest=he(t),this.size=this.rest?_(m(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ge(e,t)}function wt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new bt(e.doc,M(e.doc,o),o);n=o+a.size,i.push(a)}return i}function xt(e){dl?dl.ops.push(e):e.ownsGroup=dl={ops:[e],delayedCallbacks:[]}}function kt(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)}function Ct(e,t){var r=e.ownsGroup;if(r)try{kt(r)}finally{dl=null,t(r)}}function St(e,t){var r=Ae(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);dl?n=dl.delayedCallbacks:fl?n=fl:(n=fl=[],setTimeout(Tt,0));for(var o=0;o<r.length;++o)!function(e){n.push(function(){return r[e].apply(null,i)})}(o)}}function Tt(){var e=fl;fl=null;for(var t=0;t<e.length;++t)e[t]()}function Lt(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Ot(e,t):"gutter"==o?Et(e,t,r,n):"class"==o?_t(e,t):"widget"==o&&Wt(e,t,n)}t.changes=null}function Mt(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),da&&fa<8&&(e.node.style.zIndex=2)),e.node}function At(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=Mt(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function Nt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):ft(e,t)}function Ot(e,t){var r=t.text.className,n=Nt(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,_t(e,t)):r&&(t.text.className=r)}function _t(e,t){At(e,t),t.line.wrapClass?Mt(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 Et(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=Mt(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=Mt(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",F(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 Wt(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);Dt(e,t,r)}function Ft(e,t,r,n){var i=Nt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),_t(e,t),Et(e,t,r,n),Dt(e,t,n),t.node}function Dt(e,t,r){if(zt(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)zt(e,t.rest[n],t,r,!1)}function zt(e,t,r,i,o){if(t.widgets)for(var a=Mt(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"),Pt(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),St(c,"redraw")}}function Pt(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"))}function Ht(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 It(e,t){for(var r=Ie(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 Rt(e){return e.lineSpace.offsetTop}function jt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Bt(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 qt(e){return Da-e.display.nativeBarWidth}function Ut(e){return e.display.scroller.clientWidth-qt(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-qt(e)-e.display.barHeight}function Vt(e,t,r){var n=e.options.lineWrapping,i=n&&Ut(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)}}function Gt(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(_(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function $t(e,t){t=de(t);var n=_(t),i=e.display.externalMeasured=new bt(e.doc,t,n);i.lineN=n;var o=i.built=ft(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function Yt(e,t,r,n){return Jt(e,Zt(e,t),r,n)}function Xt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Tr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Zt(e,t){var r=_(t),n=Xt(e,r);n&&!n.text?n=null:n&&n.changes&&(Lt(e,n,r,wr(e)),e.curOp.forceUpdate=!0),n||(n=$t(e,t));var i=Gt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Jt(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Vt(e,t.view,t.rect),t.hasHeights=!0),o=tr(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Qt(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?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-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 er(e,t){var r=hl;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 tr(e,t,r,n){var i,o=Qt(t.map,r,n),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&C(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&C(t.line.text.charAt(o.coverStart+s));)++s;if(i=da&&fa<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():er(Ma(a,l,s).getClientRects(),n),i.left||i.right||0==l)break;s=l,l-=1,c="right"}da&&fa<11&&(i=rr(e.display.measure,i))}else{l>0&&(c=n="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(da&&fa<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+br(e.display),top:f.top,bottom:f.bottom}:hl}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],w={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p),w}function rr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!qe(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function nr(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 ir(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)nr(e.display.view[r])}function or(e){ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ar(){return ma&&xa?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function lr(){return ma&&xa?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function sr(e,t,r,n,i){if(!i&&t.widgets)for(var o=0;o<t.widgets.length;++o)if(t.widgets[o].above){var a=Ht(t.widgets[o]);r.top+=a,r.bottom+=a}if("line"==n)return r;n||(n="local");var l=ye(t);if("local"==n?l+=Rt(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:lr());var c=s.left+("window"==n?0:ar());r.left+=c,r.right+=c}return r.top+=l,r.bottom+=l,r}function cr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=ar(),i-=lr();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 ur(e,t,r,n,i){return n||(n=M(e.doc,t.line)),sr(e,n,Yt(e,n,t.ch,i),r)}function dr(e,t,r,n,i,o){function a(t,a){var l=Jt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,sr(e,n,l,r)}function l(e,t,r){var n=s[t],i=n.level%2!=0;return a(r?e-1:e,i!=r)}n=n||M(e.doc,t.line),i||(i=Zt(e,n));var s=Ce(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=ke(s,c,u),f=Ka,h=l(c,d,"before"==u);return null!=f&&(h.other=l(c,f,"before"!=u)),h}function fr(e,t){var r=0;t=B(e.doc,t),e.options.lineWrapping||(r=br(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Rt(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function hr(e,t,r,n,i){var o=D(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function pr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return hr(n.first,0,null,!0,-1);var i=E(n,r),o=n.first+n.size-1;if(i>o)return hr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=M(n,i);;){var l=vr(e,a,i,t,r),s=ce(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=_(a=c.to.line)}}function mr(e,t,r,n){var i=function(n){return sr(e,t,Jt(e,r,n),"line")},o=t.text.length,a=T(function(e){return i(e-1).bottom<=n},o,0);return o=T(function(e){return i(e).top>n},a,o),{begin:a,end:o}}function gr(e,t,r,n){return mr(e,t,r,sr(e,t,Jt(e,r,n),"line").top)}function vr(e,t,r,n,i){i-=ye(t);var o,a=0,l=t.text.length,s=Zt(e,t);if(Ce(t,e.doc.direction)){if(e.options.lineWrapping){var c;c=mr(e,t,s,i),a=c.begin,l=c.end}o=new D(r,Math.floor(a+(l-a)/2));var u,d,f=dr(e,o,"line",t,s).left,h=f<n?1:-1,p=f-n,m=Math.ceil((l-a)/4);e:do{u=p,d=o;for(var g=0;g<m;++g){var v=o;if(null==(o=Me(e,t,o,h))||o.ch<a||l<=("before"==o.sticky?o.ch-1:o.ch)){o=v;break e}}if(p=dr(e,o,"line",t,s).left-n,m>1){var y=Math.abs(p-u)/m;m=Math.min(m,Math.ceil(Math.abs(p)/y)),h=p<0?1:-1}}while(0!=p&&(m>1||h<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=d}}else{var b=T(function(r){var o=sr(e,t,Jt(e,s,r),"line");return o.top>i?(l=Math.min(r,l),!0):!(o.bottom<=i)&&(o.left>n||!(o.right<n)&&n-o.left<o.right-n)},a,l);b=S(t.text,b,1),o=new D(r,b,b==l?"before":"after")}var w=dr(e,o,"line",t,s);return(i<w.top||w.bottom<i)&&(o.outside=!0),o.xRel=n<w.left?-1:n>w.right?1:0,o}function yr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==sl){sl=n("pre");for(var i=0;i<49;++i)sl.appendChild(document.createTextNode("x")),sl.appendChild(n("br"));sl.appendChild(document.createTextNode("x"))}r(e.measure,sl);var o=sl.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function br(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 wr(e){
|
3 |
-
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:xr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function kr(e){var t=yr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/br(e.display)-3);return function(i){if(ge(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 Cr(e){var t=e.doc,r=kr(e);t.iter(function(e){var t=r(e);t!=e.height&&O(e,t)})}function Sr(e,t,r,n){var i=e.display;if(!r&&"true"==Ie(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=pr(e,o,a);if(n&&1==c.xRel&&(s=M(e.doc,c.line).text).length==c.ch){var u=d(s,s.length,e.options.tabSize)-s.length;c=D(c.line,Math.max(0,Math.round((o-Bt(e.display).left)/br(e.display))-u))}return c}function Tr(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 Lr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Mr(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!1!==t||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ar(e,l.head,i),s||Nr(e,l,o)}}return n}function Ar(e,t,r){var i=dr(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 Nr(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 ur(e,D(t,r),"div",c,n)}var a,s,c=M(l,t),f=c.text.length;return xe(Ce(c,l.direction),r||0,null==n?f:n,function(e,t,l){var c,h,p,m=o(e,"left");if(e==t)c=m,h=p=m.left;else{if(c=o(t-1,"right"),"rtl"==l){var g=m;m=c,c=g}h=m.left,p=c.right}null==r&&0==e&&(h=u),c.top-m.top>3&&(i(h,m.top,null,m.bottom),h=u,m.bottom<c.top&&i(h,m.bottom,null,c.top)),null==n&&t==f&&(p=d),(!a||m.top<a.top||m.top==a.top&&m.left<a.left)&&(a=m),(!s||c.bottom>s.bottom||c.bottom==s.bottom&&c.right>s.right)&&(s=c),h<u+1&&(h=u),i(h,c.top,p-h,c.bottom)}),{start:a,end:s}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=Bt(e.display),u=c.left,d=Math.max(a.sizerWidth,Ut(e)-a.sizer.offsetLeft)-c.right,f=t.from(),h=t.to();if(f.line==h.line)o(f.line,f.ch,h.ch);else{var p=M(l,f.line),m=M(l,h.line),g=de(p)==de(m),v=o(f.line,f.ch,g?p.text.length+1:null).end,y=o(h.line,g?0:null,h.ch).start;g&&(v.top<y.top-2?(i(v.right,v.top,null,v.bottom),i(u,y.top,y.left,y.bottom)):i(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&i(u,v.bottom,null,y.top)}r.appendChild(s)}function Or(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 _r(e){e.state.focused||(e.display.input.focus(),Wr(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Fr(e))},100)}function Wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Oe(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(),ha&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Or(e))}function Fr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,Oa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Dr(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(da&&fa<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=yr(t)),(s>.001||s<-.001)&&(O(i.line,o),zr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)zr(i.rest[c])}}}function zr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function Pr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Rt(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=E(t,n),a=E(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=E(t,ye(M(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=E(t,ye(M(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Hr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=xr(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=F(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",_n(e),!0}return!1}function Rr(e,t){if(!_e(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&&!ba){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Rt(e.display))+"px;\n height: "+(t.bottom-t.top+qt(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)}}}function jr(e,t,r,n){null==n&&(n=0);for(var i,o=0;o<5;o++){var a=!1,l=dr(e,t),s=r&&r!=t?dr(e,r):l;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};var c=qr(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Xr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Jr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function Br(e,t){var r=qr(e,t);null!=r.scrollTop&&Xr(e,r.scrollTop),null!=r.scrollLeft&&Jr(e,r.scrollLeft)}function qr(e,t){var r=e.display,n=yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Kt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+jt(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=Ut(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 Ur(e,t){null!=t&&($r(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Kr(e){$r(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?D(t.line,t.ch-1):t,n=D(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin}}function Vr(e,t,r){null==t&&null==r||$r(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Gr(e,t){$r(e),e.curOp.scrollToPos=t}function $r(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Yr(e,fr(e,t.from),fr(e,t.to),t.margin)}}function Yr(e,t,r,n){var i=qr(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});Vr(e,i.scrollLeft,i.scrollTop)}function Xr(e,t){Math.abs(e.doc.scrollTop-t)<2||(la||Nn(e,{top:t}),Zr(e,t,!0),la&&Nn(e),kn(e,100))}function Zr(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 Jr(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,Hr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Qr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+jt(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+qt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function en(e,t){t||(t=Qr(e));var r=e.display.barWidth,n=e.display.barHeight;tn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Dr(e),tn(e,Qr(e)),r=e.display.barWidth,n=e.display.barHeight}function tn(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 rn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Oa(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new gl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),$a(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?Jr(e,t):Xr(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function nn(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:++vl},xt(e.curOp)}function on(e){Ct(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;an(e)})}function an(e){for(var t=e.ops,r=0;r<t.length;r++)ln(t[r]);for(var n=0;n<t.length;n++)sn(t[n]);for(var i=0;i<t.length;i++)cn(t[i]);for(var o=0;o<t.length;o++)un(t[o]);for(var a=0;a<t.length;a++)dn(t[a])}function ln(e){var t=e.cm,r=t.display;Sn(t),e.updateMaxLine&&we(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 yl(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function sn(e){e.updatedDisplay=e.mustUpdate&&Mn(e.cm,e.update)}function cn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Dr(t),e.barMeasure=Qr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Yt(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+qt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ut(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function un(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Jr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==a()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&en(t,e.barMeasure),e.updatedDisplay&&En(t,e.barMeasure),e.selectionChanged&&Or(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&_r(e.cm)}function dn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&An(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Zr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Jr(t,e.scrollLeft,!0,!0),e.scrollToPos){Rr(t,jr(t,B(n,e.scrollToPos.from),B(n,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Oe(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Oe(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function fn(e,t){if(e.curOp)return t();nn(e);try{return t()}finally{on(e)}}function hn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);nn(e);try{return t.apply(e,arguments)}finally{on(e)}}}function pn(e){return function(){if(this.curOp)return e.apply(this,arguments);nn(this);try{return e.apply(this,arguments)}finally{on(this)}}}function mn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);nn(t);try{return e.apply(this,arguments)}finally{on(t)}}}function gn(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)Ua&&pe(e.doc,t)<i.viewTo&&yn(e);else if(r<=i.viewFrom)Ua&&me(e.doc,r+n)>i.viewFrom?yn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)yn(e);else if(t<=i.viewFrom){var o=bn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):yn(e)}else if(r>=i.viewTo){var a=bn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):yn(e)}else{var l=bn(e,t,t,-1),s=bn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(wt(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):yn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function vn(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[Tr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,r)&&a.push(r)}}}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function bn(e,t,r,n){var i,o=Tr(e,t),a=e.display.view;if(!Ua||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(;pe(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 wn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=wt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=wt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Tr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(wt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Tr(e,r)))),n.viewTo=r}function xn(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 kn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(Cn,e))}function Cn(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=et(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?Ye(t.mode,n.state):null,s=Je(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&&tt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&fn(e,function(){for(var t=0;t<i.length;t++)vn(e,i[t],"text")})}}function Sn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=qt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=qt(e)+"px",t.scrollbarsClipped=!0)}function Tn(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}function Ln(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)}}function Mn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return yn(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==xn(e))return!1;Ir(e)&&(yn(e),r.dims=wr(e));var o=i.first+i.size,a=Math.max(r.visible.from-e.options.viewportMargin,i.first),l=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(i.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(o,n.viewTo)),Ua&&(a=pe(e.doc,a),l=me(e.doc,l));var s=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;wn(e,a,l),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=xn(e);if(!s&&0==c&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Tn(e);return c>4&&(n.lineDiv.style.display="none"),On(e,n.updateLineNumbers,r.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ln(u),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function An(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ut(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+jt(e.display)-Kt(e),r.top)}),t.visible=Pr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Mn(e,t);n=!1){Dr(e);var i=Qr(e);Lr(e),en(e,i),En(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 Nn(e,t){var r=new yl(e,t);if(Mn(e,r)){Dr(e),An(e,r);var n=Qr(e);Lr(e),en(e,n),En(e,n),r.finish()}}function On(e,r,n){function i(t){var r=t.nextSibling;return ha&&Ca&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild,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),Lt(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(F(e.options,u)))),s=h.node.nextSibling}else{var m=Ft(e,h,u,n);l.insertBefore(m,s)}u+=h.size}for(;s;)s=i(s)}function _n(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function En(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+qt(e)+"px"}function Wn(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",_n(e)}function Fn(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 Dn(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 zn(e){var t=Dn(e);return t.x*=wl,t.y*=wl,t}function Pn(e,t){var r=Dn(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&&Ca&&ha)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&&!la&&!ga&&null!=wl)return i&&s&&Xr(e,Math.max(0,a.scrollTop+i*wl)),Jr(e,Math.max(0,a.scrollLeft+n*wl)),(!i||i&&s)&&De(t),void(o.wheelStartX=null);if(i&&null!=wl){var f=i*wl,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),Nn(e,{top:h,bottom:p})}bl<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&&(wl=(wl*bl+r)/(bl+1),++bl)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Hn(e,t){var r=e[t];e.sort(function(e,t){return z(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(z(o.to(),i.from())>=0){var a=R(o.from(),i.from()),l=I(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new kl(s?l:a,s?a:l))}}return new xl(e,t)}function In(e,t){return new xl([new kl(e,t||e)],0)}function Rn(e){return e.text?D(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function jn(e,t){if(z(e,t.from)<0)return e;if(z(e,t.to)<=0)return Rn(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+=Rn(t).ch-t.to.ch),D(r,n)}function Bn(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new kl(jn(i.anchor,t),jn(i.head,t)))}return Hn(r,e.sel.primIndex)}function qn(e,t,r){return e.line==t.line?D(r.line,e.ch-t.ch+r.ch):D(r.line+(e.line-t.line),e.ch)}function Un(e,t,r){for(var n=[],i=D(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=qn(l.from,i,o),c=qn(Rn(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=z(u.head,u.anchor)<0;n[a]=new kl(d?c:s,d?s:c)}else n[a]=new kl(s,s)}return new xl(n,e.sel.primIndex)}function Kn(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Vn(e)}function Vn(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,kn(e,100),e.state.modeGen++,e.curOp&&gn(e)}function Gn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function $n(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){ct(e,r,i,n),St(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new ll(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=M(e,l.line),d=M(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(Gn(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 ll(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)}St(e,"change",e,t)}function Yn(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 Xn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Cr(e),Kn(e),Zn(e),e.options.lineWrapping||we(e),e.options.mode=t.modeOption,gn(e)}function Zn(e){("rtl"==e.doc.direction?l:Oa)(e.display.lineDiv,"CodeMirror-rtl")}function Jn(e){fn(e,function(){Zn(e),gn(e)})}function Qn(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 ei(e,t){var r={from:H(t.from),to:Rn(t),text:A(e,t.from,t.to)};return li(e,r,t.from.line,t.to.line+1),Yn(e,function(e){return li(e,r,t.from.line,t.to.line+1)},!0),r}function ti(e){for(;e.length;){if(!m(e).ranges)break;e.pop()}}function ri(e,t){return t?(ti(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}function ni(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=ri(i,i.lastOp==n)))a=m(o.changes),0==z(t.from,t.to)&&0==z(t.from,a.to)?a.to=Rn(t):o.changes.push(ei(e,t));else{var s=m(i.done);for(s&&s.ranges||ai(e.sel,i.done),o={changes:[ei(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||Oe(e,"historyAdded")}function ii(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)}function oi(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||ii(e,o,m(i.done),t))?i.done[i.done.length-1]=t:ai(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ti(i.undone)}function ai(e,t){var r=m(t);r&&r.ranges&&r.equals(e)||t.push(e)}function li(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 si(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 ci(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(si(r[i]));return n}function ui(e,t){var r=ci(e,t),n=Q(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 di(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?xl.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 fi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=z(t,i)<0;o!=z(r,i)<0?(i=t,t=r):o!=z(t,r)<0&&(t=r)}return new kl(i,t)}return new kl(r||t,t)}function hi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),bi(e,new xl([fi(e.sel.primary(),t,r,i)],0),n)}function pi(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]=fi(e.sel.ranges[o],t[o],null,i);bi(e,Hn(n,e.sel.primIndex),r)}function mi(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,bi(e,Hn(i,e.sel.primIndex),n)}function gi(e,t,r,n){bi(e,In(t,r),n)}function vi(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new kl(B(e,t[n].anchor),B(e,t[n].head))},origin:r&&r.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Hn(n.ranges,n.ranges.length-1):t}function yi(e,t,r){var n=e.history.done,i=m(n);i&&i.ranges?(n[n.length-1]=t,wi(e,t,r)):bi(e,t,r)}function bi(e,t,r){wi(e,t,r),oi(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function wi(e,t,r){(We(e,"beforeSelectionChange")||e.cm&&We(e.cm,"beforeSelectionChange"))&&(t=vi(e,t,r)),xi(e,Ci(e,t,r&&r.bias||(z(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||Kr(e.cm)}function xi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ee(e.cm)),St(e,"cursorActivity",e))}function ki(e){xi(e,Ci(e,e.sel,null,!1))}function Ci(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=Ti(e,a.anchor,l&&l.anchor,r,n),c=Ti(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 kl(s,c))}return i?Hn(i,t.primIndex):t}function Si(e,t,r,n,i){var o=M(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&&(Oe(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=Li(e,c,-n,c&&c.line==t.line?o:null)),
|
4 |
-
c&&c.line==t.line&&(u=z(c,r))&&(n<0?u<0:u>0))return Si(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=Li(e,d,n,d.line==t.line?o:null)),d?Si(e,d,t,n,i):null}}return t}function Ti(e,t,r,n,i){var o=n||1,a=Si(e,t,r,o,i)||!i&&Si(e,t,r,o,!0)||Si(e,t,r,-o,i)||!i&&Si(e,t,r,-o,!0);return a||(e.cantEdit=!0,D(e.first,0))}function Li(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?B(e,D(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line<e.first+e.size-1?D(t.line+1,0):null:new D(t.line,t.ch+r)}function Mi(e){e.setSelection(D(e.firstLine(),0),D(e.lastLine()),Pa)}function Ai(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=B(e,t)),r&&(n.to=B(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ni(e,t,r){if(e.cm){if(!e.cm.curOp)return hn(e.cm,Ni)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"))||(t=Ai(e,t,!0))){var n=qa&&!r&&te(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Oi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Oi(e,t)}}function Oi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=z(t.from,t.to)){var r=Bn(e,t);ni(e,t,r,e.cm?e.cm.curOp.id:NaN),Wi(e,t,r,Q(e,t));var n=[];Yn(e,function(e,r){r||-1!=f(n,e.history)||(Hi(e.history,t),n.push(e.history)),Wi(e,t,null,Q(e,t))})}}function _i(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(),n.ranges;){if(ai(n,l),r&&!n.equals(e.sel))return void bi(e,n,{clearRedo:!1});o=n}var c=[];ai(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"),d=n.changes.length-1;d>=0;--d){var h=function(r){var i=n.changes[r];if(i.origin=t,u&&!Ai(e,i,!1))return a.length=0,{};c.push(ei(e,i));var o=r?Bn(e,i):m(a);Wi(e,i,o,ui(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Rn(i)});var l=[];Yn(e,function(e,t){t||-1!=f(l,e.history)||(Hi(e.history,i),l.push(e.history)),Wi(e,i,null,ui(e,i))})}(d);if(h)return h.v}}}}function Ei(e,t){if(0!=t&&(e.first+=t,e.sel=new xl(g(e.sel.ranges,function(e){return new kl(D(e.anchor.line+t,e.anchor.ch),D(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){gn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)vn(e.cm,n,"gutter")}}function Wi(e,t,r,n){if(e.cm&&!e.cm.curOp)return hn(e.cm,Wi)(e,t,r,n);if(t.to.line<e.first)return void Ei(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ei(e,i),t={from:D(e.first,0),to:D(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:D(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=A(e,t.from,t.to),r||(r=Bn(e,t)),e.cm?Fi(e.cm,t,n):$n(e,t,n),wi(e,r,Pa)}}function Fi(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=_(de(M(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&&Ee(e),$n(n,t,r,kr(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),st(n,o.line),kn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?gn(e):o.line!=a.line||1!=t.text.length||Gn(e.doc,t)?gn(e,o.line,a.line+1,c):vn(e,o.line,"text");var u=We(e,"changes"),d=We(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&St(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Di(e,t,r,n,i){if(n||(n=r),z(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Ni(e,{from:r,to:n,text:t,origin:i})}function zi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Pi(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(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)zi(o.ranges[l].anchor,t,r,n),zi(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=D(c.from.line+n,c.from.ch),c.to=D(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 Hi(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Pi(e.done,r,n,i),Pi(e.undone,r,n,i)}function Ii(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=M(e,j(e,t)):i=_(t),null==i?null:(n(o,i)&&e.cm&&vn(e.cm,i,r),o)}function Ri(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r}function ji(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null}function Bi(e,t,r){ye(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ur(e,r)}function qi(e,t,r,n){var i=new Cl(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Ii(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&&!ge(e,t)){var n=ye(t)<e.scrollTop;O(t,t.height+Ht(i)),n&&Ur(o,i.height),o.curOp.forceUpdate=!0}return!0}),St(o,"lineWidgetAdded",o,i,"number"==typeof t?t:_(t)),i}function Ui(e,t,r,n,o){if(n&&n.shared)return Ki(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return hn(e.cm,Ui)(e,t,r,n,o);var a=new Tl(e,o),l=z(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(ue(e,t.line,t,r,a)||t.line!=r.line&&ue(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");V()}a.addToHistory&&ni(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&&de(e)==d.display.maxLine&&(s=!0),a.collapsed&&c!=t.line&&O(e,0),X(e,new G(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){ge(e,t)&&O(t,0)}),a.clearOnEnter&&$a(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(K(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Sl,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)gn(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++)vn(d,f,"text");a.atomic&&ki(d.doc),St(d,"markerAdded",d,a)}return a}function Ki(e,t,r,n,i){n=u(n),n.shared=!1;var o=[Ui(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Yn(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ui(e,B(e,t),B(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=m(o)}),new Ll(o,a)}function Vi(e){return e.findMarks(D(e.first,0),e.clipPos(D(e.lastLine())),function(e){return e.parent})}function Gi(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(z(o,a)){var l=Ui(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function $i(e){for(var t=0;t<e.length;t++)!function(t){var r=e[t],n=[r.primary.doc];Yn(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))}}(t)}function Yi(e){var t=this;if(Ji(t),!_e(t,e)&&!It(t.display,e)){De(e),da&&(Nl=+new Date);var r=Sr(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=0;l<i;++l)!function(e,n){if(!t.options.allowDropFileTypes||-1!=f(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=hn(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){r=B(t.doc,r);var s={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ni(t.doc,s),yi(t.doc,In(r,Rn(s)))}}),l.readAsText(e)}}(n[l],l);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 s=e.dataTransfer.getData("Text");if(s){var c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),wi(t.doc,In(r,r)),c)for(var u=0;u<c.length;++u)Di(t.doc,"",c[u].anchor,c[u].head,"drag");t.replaceSelection(s,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Xi(e,t){if(da&&(!e.state.draggingText||+new Date-Nl<100))return void He(t);if(!_e(e,t)&&!It(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!va)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ga&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ga&&r.parentNode.removeChild(r)}}function Zi(e,t){var i=Sr(e,t);if(i){var o=document.createDocumentFragment();Ar(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)}}function Ji(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Qi(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 eo(){Ol||(to(),Ol=!0)}function to(){var e;$a(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Qi(ro)},100))}),$a(window,"blur",function(){return Qi(Fr)})}function ro(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 no(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 io(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(" "),no),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 oo(e,t,r,n){t=co(t);var i=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 oo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=oo(e,t.fallthrough[o],r,n);if(a)return a}}}function ao(e){var t="string"==typeof e?e:_l[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function lo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(Aa?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(Aa?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function so(e,t){if(ga&&34==e.keyCode&&e.char)return!1;var r=_l[e.keyCode];return null!=r&&!e.altGraphKey&&lo(r,e,t)}function co(e){return"string"==typeof e?Dl[e]:e}function uo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&z(o.from,m(n).to)<=0;){var a=n.pop();if(z(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}fn(e,function(){for(var t=n.length-1;t>=0;t--)Di(e.doc,"",n[t].from,n[t].to,"+delete");Kr(e)})}function fo(e,t){var r=M(e.doc,t),n=de(r);return n!=r&&(t=_(n)),Le(!0,e,n,t,1)}function ho(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=_(n)),Le(!0,e,r,t,-1)}function po(e,t){var r=fo(e,t.line),n=M(e.doc,r.line),i=Ce(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 D(r.line,a?0:o,r.sticky)}return r}function mo(e,t,r){if("string"==typeof t&&!(t=zl[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)!=za}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function go(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=oo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&oo(t,e.options.extraKeys,r,e)||oo(t,e.options.keyMap,r,e)}function vo(e,t,r,n){var i=e.state.keySeq;if(i){if(ao(t))return"handled";Pl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=go(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&St(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(De(r),Or(e)),i&&!o&&/\'$/.test(t)?(De(r),!0):!!o}function yo(e,t){var r=so(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?vo(e,"Shift-"+r,t,function(t){return mo(e,t,!0)})||vo(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return mo(e,t)}):vo(e,r,t,function(t){return mo(e,t)}))}function bo(e,t,r){return vo(e,"'"+r+"'",t,function(t){return mo(e,t,!0)})}function wo(e){var t=this;if(t.curOp.focus=a(),!_e(t,e)){da&&fa<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=yo(t,e);ga&&(Hl=n?r:null,!n&&88==r&&!Ja&&(Ca?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||xo(t)}}function xo(e){function t(e){18!=e.keyCode&&e.altKey||(Oa(r,"CodeMirror-crosshair"),Ne(document,"keyup",t),Ne(document,"mouseover",t))}var r=e.display.lineDiv;l(r,"CodeMirror-crosshair"),$a(document,"keyup",t),$a(document,"mouseover",t)}function ko(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function Co(e){var t=this;if(!(It(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||Ca&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(ga&&r==Hl)return Hl=null,void De(e);if(!ga||e.which&&!(e.which<10)||!yo(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(bo(t,e,i)||t.display.input.onKeyPress(e))}}}function So(e,t){var r=+new Date;return jl&&jl.compare(r,e,t)?(Rl=jl=null,"triple"):Rl&&Rl.compare(r,e,t)?(jl=new Il(r,e,t),Rl=null,"double"):(Rl=new Il(r,e,t),jl=null,"single")}function To(e){var t=this,r=t.display;if(!(_e(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,It(r,e))return void(ha||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!Wo(t,e)){var n=Sr(t,e),i=Re(e),o=n?So(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&Lo(t,i,n,o,e)||(1==i?n?Ao(t,n,o,e):Ie(e)==r.scroller&&De(e):2==i?(n&&hi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(Na?Fo(t,e):Er(t)))}}}function Lo(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,vo(e,lo(o,i),i,function(t){if("string"==typeof t&&(t=zl[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=za}finally{e.state.suppressEdits=!1}return n})}function Mo(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=Sa?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=Ca?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(Ca?r.altKey:r.ctrlKey)),i}function Ao(e,t,r,n){da?setTimeout(c(_r,e),0):e.curOp.focus=a();var i,o=Mo(e,r,n),l=e.doc.sel;e.options.dragDrop&&Ya&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(z((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(z(i.to(),t)>0||t.xRel<0)?No(e,n,t,o):_o(e,n,t,o)}function No(e,t,r,n){var i=e.display,o=!1,a=hn(e,function(t){ha&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ne(document,"mouseup",a),Ne(document,"mousemove",l),Ne(i.scroller,"dragstart",s),Ne(i.scroller,"drop",a),o||(De(t),n.addNew||hi(e.doc,r,null,null,n.extend),ha||da&&9==fa?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};ha&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),$a(document,"mouseup",a),$a(document,"mousemove",l),$a(i.scroller,"dragstart",s),$a(i.scroller,"drop",a),Er(e),setTimeout(function(){return i.input.focus()},20)}function Oo(e,t,r){if("char"==r)return new kl(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new kl(D(t.line,0),B(e.doc,D(t.line+1,0)));var n=r(e,t);return new kl(n.from,n.to)}function _o(e,t,r,n){function i(t){if(0!=z(v,t))if(v=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,a=d(M(c,r.line).text,r.ch,o),l=d(M(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=M(c,g).text,w=h(b,s,o);s==m?i.push(new kl(D(g,w),D(g,w))):b.length>w&&i.push(new kl(D(g,w),D(g,h(b,m,o))))}i.length||i.push(new kl(r,r)),bi(c,Hn(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,k=u,C=Oo(e,t,n.unit),S=k.anchor;z(C.anchor,S)>0?(x=C.head,S=R(k.from(),C.anchor)):(x=C.anchor,S=I(k.to(),C.head));var T=p.ranges.slice(0);T[f]=new kl(B(c,S),x),bi(c,Hn(T,f),Ha)}}function o(t){var r=++b,l=Sr(e,t,!0,"rectangle"==n.unit);if(l)if(0!=z(l,v)){e.curOp.focus=a(),i(l);var u=Pr(s,c);(l.line>=u.to||l.line<u.from)&&setTimeout(hn(e,function(){b==r&&o(t)}),150)}else{var d=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;d&&setTimeout(hn(e,function(){b==r&&(s.scroller.scrollTop+=d,o(t))}),50)}}function l(t){e.state.selectingText=!1,b=1/0,De(t),s.input.focus(),Ne(document,"mousemove",w),Ne(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;De(t);var u,f,p=c.sel,m=p.ranges;if(n.addNew&&!n.extend?(f=c.sel.contains(r),u=f>-1?m[f]:new kl(r,r)):(u=c.sel.primary(),f=c.sel.primIndex),"rectangle"==n.unit)n.addNew||(u=new kl(r,r)),r=Sr(e,t,!0,!0),f=-1;else{var g=Oo(e,r,n.unit);u=n.extend?fi(u,g.anchor,g.head,n.extend):g}n.addNew?-1==f?(f=m.length,bi(c,Hn(m.concat([u]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==n.unit&&!n.extend?(bi(c,Hn(m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):mi(c,f,u,Ha):(f=0,bi(c,new xl([u],0),Ha),p=c.sel);var v=r,y=s.wrapper.getBoundingClientRect(),b=0,w=hn(e,function(e){Re(e)?o(e):l(e)}),x=hn(e,l);e.state.selectingText=x,$a(document,"mousemove",w),$a(document,"mouseup",x)}function Eo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&De(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!We(e,r))return Pe(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 Oe(e,r,e,E(e.doc,o),e.options.gutters[s],t),Pe(t)}}}function Wo(e,t){return Eo(e,t,"gutterClick",!0)}function Fo(e,t){It(e.display,t)||Do(e,t)||_e(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Do(e,t){return!!We(e,"gutterContextMenu")&&Eo(e,t,"gutterContextMenu",!1)}function zo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),or(e)}function Po(e){Wn(e),gn(e),Hr(e)}function Ho(e,t,r){if(!t!=!(r&&r!=Bl)){var n=e.display.dragFunctions,i=t?$a:Ne;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 Io(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Oa(e.display.wrapper,"CodeMirror-wrap"),we(e)),Cr(e),gn(e),or(e),setTimeout(function(){return en(e)},100)}function Ro(e,t){var r=this;if(!(this instanceof Ro))return new Ro(e,t);this.options=t=t?u(t):{},u(ql,t,!1),Fn(t);var n=t.value;"string"==typeof n&&(n=new Al(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Ro.inputStyles[t.inputStyle](this),o=this.display=new L(e,n,i);o.wrapper.CodeMirror=this,Wn(this),zo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),rn(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 Ea,keySeq:null,specialChars:null},t.autofocus&&!ka&&o.input.focus(),da&&fa<11&&setTimeout(function(){return r.display.input.reset(!0)},20),jo(this),eo(),nn(this),this.curOp.forceUpdate=!0,Xn(this,n),t.autofocus&&!ka||this.hasFocus()?setTimeout(c(Wr,this),20):Fr(this);for(var a in Ul)Ul.hasOwnProperty(a)&&Ul[a](r,t[a],Bl);Ir(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Kl.length;++l)Kl[l](r);on(this),ha&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function jo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(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 i=e.display;$a(i.scroller,"mousedown",hn(e,To)),da&&fa<11?$a(i.scroller,"dblclick",hn(e,function(t){if(!_e(e,t)){var r=Sr(e,t);if(r&&!Wo(e,t)&&!It(e.display,t)){De(t);var n=e.findWordAt(r);hi(e.doc,n.anchor,n.head)}}})):$a(i.scroller,"dblclick",function(t){return _e(e,t)||De(t)}),Na||$a(i.scroller,"contextmenu",function(t){return Fo(e,t)});var o,a={end:0};$a(i.scroller,"touchstart",function(t){if(!_e(e,t)&&!r(t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),$a(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),$a(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!It(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new kl(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new kl(D(l.line,0),B(e.doc,D(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),De(r)}t()}),$a(i.scroller,"touchcancel",t),$a(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Xr(e,i.scroller.scrollTop),Jr(e,i.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),$a(i.scroller,"mousewheel",function(t){return Pn(e,t)}),$a(i.scroller,"DOMMouseScroll",function(t){return Pn(e,t)}),$a(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){_e(e,t)||He(t)},over:function(t){_e(e,t)||(Zi(e,t),He(t))},start:function(t){return Xi(e,t)},drop:hn(e,Yi),leave:function(t){_e(e,t)||Ji(e)}};var l=i.input.getField();$a(l,"keyup",function(t){return ko.call(e,t)}),$a(l,"keydown",hn(e,wo)),$a(l,"keypress",hn(e,Co)),$a(l,"focus",function(t){return Wr(e,t)}),$a(l,"blur",function(t){return Fr(e,t)})}function Bo(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=et(e,t).state:r="prev");var a=e.options.tabSize,l=M(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))==za||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?d(M(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 Di(o,f,D(t,0),D(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=D(t,u.length);mi(o,g,new kl(y,y));break}}}function qo(e){Vl=e}function Uo(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=Xa(t),s=null;if(a&&n.ranges.length>1)if(Vl&&Vl.text.join("\n")==t){if(n.ranges.length%Vl.text.length==0){s=[];for(var c=0;c<Vl.text.length;c++)s.push(o.splitLines(Vl.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=D(h.line,h.ch-r):e.state.overwrite&&!a?p=D(p.line,Math.min(M(o,p.line).text.length,p.ch+m(l).length)):Vl&&Vl.lineWise&&Vl.text.join("\n")==t&&(h=p=D(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")};Ni(e.doc,v),St(e,"inputRead",e,v)}t&&!a&&Vo(e,t),Kr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ko(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||fn(t,function(){return Uo(t,r,0,null,"paste")}),!0}function Vo(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=Bo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Bo(e,i.head.line,"smart"));a&&St(e,"electricInput",e,i.head.line)}}}function Go(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:D(i,0),head:D(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function $o(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Yo(){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 ha?e.style.width="1000px":e.setAttribute("wrap","off"),wa&&(e.style.border="1px solid black"),$o(e),t}function Xo(e,t,r,n,i){function o(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new D(n,t.ch,t.sticky),c=M(e,n))}function a(n){var a;if(null==(a=i?Me(e.cm,c,t,r):Te(c,t,r))){if(n||!o())return!1;t=Le(i,e.cm,c,t.line,r)}else t=a;return!0}var l=t,s=r,c=M(e,t.line);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,d="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(r<0)||a(!h);h=!1){var p=c.text.charAt(t.ch)||"\n",m=x(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){r<0&&(r=1,a(),t.sticky="after");break}if(m&&(u=m),r>0&&!a(!h))break}var g=Ti(e,t,l,s,!0);return P(l,g)&&(g.hitSide=!0),g}function Zo(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*yr(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=pr(e,a,i),c.outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Jo(e,t){var r=Xt(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Gt(r,n,t.line),o=Ce(n,e.doc.direction),a="left";if(o){a=ke(o,t.ch)%2?"right":"left"}var l=Qt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Qo(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ea(e,t){return t&&(e.bad=!0),e}function ta(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(){u&&(c+=d,u=!1)}function l(e){e&&(a(),c+=e)}function s(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void l(r||t.textContent.replace(/\u200b/g,""));var c,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(D(n,0),D(i+1,0),o(+f));return void(h.length&&(c=h[0].find())&&l(A(e.doc,c.from,c.to).join(d)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&a();for(var m=0;m<t.childNodes.length;m++)s(t.childNodes[m]);p&&(u=!0)}else 3==t.nodeType&&l(t.nodeValue)}for(var c="",u=!1,d=e.doc.lineSeparator();s(t),t!=r;)t=t.nextSibling;return c}function ra(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return ea(e.clipPos(D(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 o=e.display.view[i];if(o.node==n)return na(o,t,r)}}function na(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=_(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),D(s,c)}}}var i=e.text.firstChild,a=!1;if(!t||!o(i,t))return ea(D(_(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 ea(D(_(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));c.parentNode!=i;)c=c.parentNode;var u=e.measure,d=u.maps,f=n(s,c,r);if(f)return ea(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 ea(D(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 ea(D(f.line,f.ch+v),a);v+=g.textContent.length}}function ia(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&&($a(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&&(Ne(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ro(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}
|
5 |
-
var oa=navigator.userAgent,aa=navigator.platform,la=/gecko\/\d/i.test(oa),sa=/MSIE \d/.test(oa),ca=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(oa),ua=/Edge\/(\d+)/.exec(oa),da=sa||ca||ua,fa=da&&(sa?document.documentMode||6:+(ua||ca)[1]),ha=!ua&&/WebKit\//.test(oa),pa=ha&&/Qt\/\d+\.\d+/.test(oa),ma=!ua&&/Chrome\//.test(oa),ga=/Opera\//.test(oa),va=/Apple Computer/.test(navigator.vendor),ya=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(oa),ba=/PhantomJS/.test(oa),wa=!ua&&/AppleWebKit/.test(oa)&&/Mobile\/\w+/.test(oa),xa=/Android/.test(oa),ka=wa||xa||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(oa),Ca=wa||/Mac/.test(aa),Sa=/\bCrOS\b/.test(oa),Ta=/win/i.test(aa),La=ga&&oa.match(/Version\/(\d*\.\d*)/);La&&(La=Number(La[1])),La&&La>=15&&(ga=!1,ha=!0);var Ma,Aa=Ca&&(pa||ga&&(null==La||La<12.11)),Na=la||da&&fa>=9,Oa=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:"")}};Ma=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 _a=function(e){e.select()};wa?_a=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:da&&(_a=function(e){try{e.select()}catch(e){}});var Ea=function(){this.id=null};Ea.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Wa,Fa,Da=30,za={toString:function(){return"CodeMirror.Pass"}},Pa={scroll:!1},Ha={origin:"*mouse"},Ia={origin:"+move"},Ra=[""],ja=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ba=/[\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]/,qa=!1,Ua=!1,Ka=null,Va=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 S=d[C];if(","==S)d[C]="N";else if("%"==S){var T=void 0;for(T=C+1;T<u&&"%"==d[T];++T);for(var L=C&&"!"==d[C-1]||T<u&&"1"==d[T]?"1":"N",M=C;M<T;++M)d[M]=L;C=T-1}}for(var A=0,N=c;A<u;++A){var O=d[A];"L"==N&&"1"==O?d[A]="L":a.test(O)&&(N=O)}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="L"==(E<u?d[E]:c),D=W==F?W?"L":"R":c,z=_;z<E;++z)d[z]=D;_=E-1}for(var P,H=[],I=0;I<u;)if(l.test(d[I])){var R=I;for(++I;I<u&&l.test(d[I]);++I);H.push(new t(0,R,I))}else{var j=I,B=H.length;for(++I;I<u&&"L"!=d[I];++I);for(var q=j;q<I;)if(s.test(d[q])){j<q&&H.splice(B,0,new t(1,j,q));var U=q;for(++q;q<I&&s.test(d[q]);++q);H.splice(B,0,new t(2,U,q)),j=q}else++q;j<I&&H.splice(B,0,new t(1,j,I))}return 1==H[0].level&&(P=r.match(/^\s+/))&&(H[0].from=P[0].length,H.unshift(new t(0,0,P[0].length))),1==m(H).level&&(P=r.match(/\s+$/))&&(m(H).to-=P[0].length,H.push(new t(0,u-P[0].length,u))),"rtl"==n?H.reverse():H}}(),Ga=[],$a=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]||Ga).concat(r)}},Ya=function(){if(da&&fa<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),Xa=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/)},Za=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)},Ja=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Qa=null,el={},tl={},rl={},nl=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};nl.prototype.eol=function(){return this.pos>=this.string.length},nl.prototype.sol=function(){return this.pos==this.lineStart},nl.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nl.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nl.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},nl.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},nl.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},nl.prototype.skipToEnd=function(){this.pos=this.string.length},nl.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},nl.prototype.backUp=function(e){this.pos-=e},nl.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)},nl.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},nl.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},nl.prototype.current=function(){return this.string.slice(this.start,this.pos)},nl.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},nl.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)};var il=function(e,t){this.state=e,this.lookAhead=t},ol=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0};ol.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ol.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ol.fromSaved=function(e,t,r){return t instanceof il?new ol(e,Ye(e.mode,t.saved),r,t.lookAhead):new ol(e,Ye(e.mode,t),r)},ol.prototype.save=function(e){var t=!1!==e?Ye(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new il(t,this.maxLookAhead):t};var al=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},ll=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};ll.prototype.lineNo=function(){return _(this)},Fe(ll);var sl,cl={},ul={},dl=null,fl=null,hl={left:0,right:0,top:0,bottom:0},pl=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),$a(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),$a(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,da&&fa<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pl.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}},pl.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pl.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pl.prototype.zeroWidthHack=function(){var e=Ca&&!ya?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ea,this.disableVert=new Ea},pl.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)},pl.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ml=function(){};ml.prototype.update=function(){return{bottom:0,right:0}},ml.prototype.setScrollLeft=function(){},ml.prototype.setScrollTop=function(){},ml.prototype.clear=function(){};var gl={native:pl,null:ml},vl=0,yl=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Pr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ut(e),this.force=r,this.dims=wr(e),this.events=[]};yl.prototype.signal=function(e,t){We(e,t)&&this.events.push(arguments)},yl.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Oe.apply(null,e.events[t])};var bl=0,wl=null;da?wl=-.53:la?wl=15:ma?wl=-.7:va&&(wl=-1/3);var xl=function(e,t){this.ranges=e,this.primIndex=t};xl.prototype.primary=function(){return this.ranges[this.primIndex]},xl.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(!P(n.anchor,i.anchor)||!P(n.head,i.head))return!1}return!0},xl.prototype.deepCopy=function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new kl(H(e.ranges[r].anchor),H(e.ranges[r].head));return new xl(t,this.primIndex)},xl.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},xl.prototype.contains=function(e,t){var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(z(t,i.from())>=0&&z(e,i.to())<=0)return n}return-1};var kl=function(e,t){this.anchor=e,this.head=t};kl.prototype.from=function(){return R(this.anchor,this.head)},kl.prototype.to=function(){return I(this.anchor,this.head)},kl.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Ri.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,ut(o),St(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},iterN:function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0}},ji.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e),l=i.height;if(i.removeInner(e,a),r.height-=l-i.height,o==a&&(r.children.splice(n--,1),i.parent=null),0==(t-=a))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ri))){var s=[];this.collapse(s),this.children=[new Ri(s)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},insertInner:function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var l=o.lines.length%25+25,s=l;s<o.lines.length;){var c=new Ri(o.lines.slice(s,s+=25));o.height-=c.height,n.children.splice(++i,0,c),c.parent=n}o.lines=o.lines.slice(0,l),n.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ji(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=f(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new ji(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<a){var l=Math.min(t,a-e);if(o.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=a}}};var Cl=function(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t};Cl.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=_(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var a=Ht(this);O(n,Math.max(0,n.height-a)),t&&(fn(t,function(){Bi(t,n,-a),vn(t,i,"widget")}),St(t,"lineWidgetCleared",t,this,i))}},Cl.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Ht(this)-t;i&&(O(n,n.height+i),r&&fn(r,function(){r.curOp.forceUpdate=!0,Bi(r,n,i),St(r,"lineWidgetChanged",r,e,_(n))}))},Fe(Cl);var Sl=0,Tl=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Sl};Tl.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&nn(t),We(this,"clear")){var n=this.find();n&&St(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var l=e.lines[a],s=$(l.markedSpans,e);t&&!e.collapsed?vn(t,_(l),"text"):t&&(null!=s.to&&(o=_(l)),null!=s.from&&(i=_(l))),l.markedSpans=Y(l.markedSpans,s),null==s.from&&e.collapsed&&!ge(e.doc,l)&&t&&O(l,yr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=de(e.lines[c]),d=be(u);d>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&gn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ki(t.doc)),t&&St(t,"markerCleared",t,this,i,o),r&&on(t),this.parent&&this.parent.clear()}},Tl.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var a=r.lines[o],l=$(a.markedSpans,r);if(null!=l.from&&(n=D(t?a:_(a),l.from),-1==e))return n;if(null!=l.to&&(i=D(t?a:_(a),l.to),1==e))return i}return n&&{from:n,to:i}},Tl.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&fn(n,function(){var i=t.line,o=_(t.line),a=Xt(n,o);if(a&&(nr(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!ge(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=Ht(r)-l;s&&O(i,i.height+s)}St(n,"markerChanged",n,e)})},Tl.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)},Tl.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)}},Fe(Tl);var Ll=function(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r};Ll.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();St(this,"clear")}},Ll.prototype.find=function(e,t){return this.primary.find(e,t)},Fe(Ll);var Ml=0,Al=function(e,t,r,n,i){if(!(this instanceof Al))return new Al(e,t,r,n,i);null==r&&(r=0),ji.call(this,[new Ri([new ll("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=D(r,0);this.sel=In(o),this.history=new Qn(null),this.id=++Ml,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),$n(this,{from:o,to:o,text:e}),bi(this,In(o),Pa)};Al.prototype=b(ji.prototype,{constructor:Al,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=N(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:mn(function(e){var t=D(this.first,0),r=this.first+this.size-1;Ni(this,{from:t,to:D(r,M(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Vr(this.cm,0,0),bi(this,In(t),Pa)}),replaceRange:function(e,t,r,n){t=B(this,t),r=r?B(this,r):t,Di(this,e,t,r,n)},getRange:function(e,t,r){var n=A(this,B(this,e),B(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(W(this,e))return M(this,e)},getLineNumber:function(e){return _(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=M(this,e)),de(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return B(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:mn(function(e,t,r){gi(this,B(this,"number"==typeof e?D(e,t||0):e),null,r)}),setSelection:mn(function(e,t,r){gi(this,B(this,e),B(this,t||e),r)}),extendSelection:mn(function(e,t,r){hi(this,B(this,e),t&&B(this,t),r)}),extendSelections:mn(function(e,t){pi(this,U(this,e),t)}),extendSelectionsBy:mn(function(e,t){pi(this,U(this,g(this.sel.ranges,e)),t)}),setSelections:mn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new kl(B(n,e[o].anchor),B(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),bi(this,Hn(i,t),r)}}),addSelection:mn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new kl(B(this,e),B(this,t||e))),bi(this,Hn(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=A(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=A(t,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},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:mn(function(e,t,r){for(var n=this,i=[],o=this.sel,a=0;a<o.ranges.length;a++){var l=o.ranges[a];i[a]={from:l.from(),to:l.to(),text:n.splitLines(e[a]),origin:r}}for(var s=t&&"end"!=t&&Un(this,i,t),c=i.length-1;c>=0;c--)Ni(n,i[c]);s?yi(this,s):this.cm&&Kr(this.cm)}),undo:mn(function(){_i(this,"undo")}),redo:mn(function(){_i(this,"redo")}),undoSelection:mn(function(){_i(this,"undo",!0)}),redoSelection:mn(function(){_i(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 Qn(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:di(this.history.done),undone:di(this.history.undone)}},setHistory:function(e){var t=this.history=new Qn(this.history.maxGeneration);t.done=di(e.done.slice(0),null,!0),t.undone=di(e.undone.slice(0),null,!0)},setGutterMarker:mn(function(e,t,r){return Ii(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&k(n)&&(e.gutterMarkers=null),!0})}),clearGutter:mn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Ii(t,r,"gutter",function(){return r.gutterMarkers[e]=null,k(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!W(this,e))return null;if(t=e,!(e=M(this,e)))return null}else if(null==(t=_(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:mn(function(t,r,n){return Ii(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:mn(function(t,r,n){return Ii(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:mn(function(e,t,r){return qi(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ui(this,B(this,e),B(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=B(this,e),Ui(this,e,e,r,"bookmark")},findMarksAt:function(e){e=B(this,e);var t=[],r=M(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=B(this,e),t=B(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}),B(this,D(r,t))},indexFromPos:function(e){e=B(this,e);var t=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 Al(N(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 Al(N(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}],Gi(n,Vi(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof Ro&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),$i(Vi(t));break}}if(e.history==this.history){var i=[e.id];Yn(e,function(e){return i.push(e.id)},!0),e.history=new Qn(null),e.history.done=di(this.history.done,i),e.history.undone=di(this.history.undone,i)}},iterLinkedDocs:function(e){Yn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Xa(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:mn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Jn(this.cm))})}),Al.prototype.eachLine=Al.prototype.iter;for(var Nl=0,Ol=!1,_l={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"},El=0;El<10;El++)_l[El+48]=_l[El+96]=String(El);for(var Wl=65;Wl<=90;Wl++)_l[Wl]=String.fromCharCode(Wl);for(var Fl=1;Fl<=12;Fl++)_l[Fl+111]=_l[Fl+63235]="F"+Fl;var Dl={};Dl.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"},Dl.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"},Dl.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"},Dl.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"]},Dl.default=Ca?Dl.macDefault:Dl.pcDefault;var zl={selectAll:Mi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Pa)},killLine:function(e){return uo(e,function(t){if(t.empty()){var r=M(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:D(t.head.line+1,0)}:{from:t.head,to:D(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return uo(e,function(t){return{from:D(t.from().line,0),to:B(e.doc,D(t.to().line+1,0))}})},delLineLeft:function(e){return uo(e,function(e){return{from:D(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return uo(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 uo(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()},
|
6 |
-
goDocStart:function(e){return e.extendSelection(D(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(D(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return fo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return po(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ho(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ia)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ia)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?po(e,t.head):n},Ia)},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 fn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=M(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new D(i.line,i.ch-1)),i.ch>0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=M(e.doc,i.line-1).text;a&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),D(i.line-1,a.length-1),i,"+transpose"))}r.push(new kl(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return fn(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);Kr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Pl=new Ea,Hl=null,Il=function(e,t,r){this.time=e,this.pos=t,this.button=r};Il.prototype.compare=function(e,t,r){return this.time+400>e&&0==z(t,this.pos)&&r==this.button};var Rl,jl,Bl={toString:function(){return"CodeMirror.Init"}},ql={},Ul={};Ro.defaults=ql,Ro.optionHandlers=Ul;var Kl=[];Ro.defineInitHook=function(e){return Kl.push(e)};var Vl=null,Gl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ea,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gl.prototype.init=function(e){function t(e){if(!_e(i,e)){if(i.somethingSelected())qo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Go(i);qo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Pa),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Vl.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var a=Yo(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=Vl.text.join("\n");var s=document.activeElement;_a(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;$o(o,i.options.spellcheck),$a(o,"paste",function(e){_e(i,e)||Ko(e,i)||fa<=11&&setTimeout(hn(i,function(){return r.updateFromDOM()}),20)}),$a(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),$a(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),$a(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),$a(o,"touchstart",function(){return n.forceCompositionEnd()}),$a(o,"input",function(){r.composing||r.readFromDOMSoon()}),$a(o,"copy",t),$a(o,"cut",t)},Gl.prototype.prepareSelection=function(){var e=Mr(this.cm,!1);return e.focus=this.cm.state.focused,e},Gl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Gl.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)return void e.removeAllRanges();var o=ra(t,e.anchorNode,e.anchorOffset),a=ra(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=z(R(o,a),n)||0!=z(I(o,a),i)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Jo(t,n)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Jo(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)return void e.removeAllRanges();var f,h=e.rangeCount&&e.getRangeAt(0);try{f=Ma(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!la&&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):la&&this.startGracePeriod()),this.rememberSelection()}},Gl.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)},Gl.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},Gl.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Gl.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},Gl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gl.prototype.blur=function(){this.div.blur()},Gl.prototype.getField=function(){return this.div},Gl.prototype.supportsTouch=function(){return!0},Gl.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():fn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Gl.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Gl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(xa&&ma&&this.cm.options.gutters.length&&Qo(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=ra(t,e.anchorNode,e.anchorOffset),n=ra(t,e.focusNode,e.focusOffset);r&&n&&fn(t,function(){bi(t.doc,In(r,n),Pa),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Gl.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=D(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=D(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=Tr(e,n.line))?(a=_(t.view[0].line),l=t.view[0].node):(a=_(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Tr(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=_(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(ta(e,l,c,a,s)),f=A(e.doc,D(a,0),D(s,M(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=D(a,h),C=D(s,f.length?m(f).length-p:0);return d.length>1||d[0]||z(k,C)?(Di(e.doc,d,k,C,"+input"),!0):void 0},Gl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gl.prototype.reset=function(){this.forceCompositionEnd()},Gl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Gl.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))},Gl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||fn(this.cm,function(){return gn(e.cm)})},Gl.prototype.setUneditable=function(e){e.contentEditable="false"},Gl.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||hn(this.cm,Uo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Gl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Gl.prototype.onContextMenu=function(){},Gl.prototype.resetPosition=function(){},Gl.prototype.needsContentAttribute=!0;var $l=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ea,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};$l.prototype.init=function(e){function t(e){if(!_e(i,e)){if(i.somethingSelected())qo({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,a.value=Vl.text.join("\n"),_a(a));else{if(!i.options.lineWiseCopyCut)return;var t=Go(i);qo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Pa):(n.prevInput="",a.value=t.text.join("\n"),_a(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Yo(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),wa&&(a.style.width="0px"),$a(a,"input",function(){da&&fa>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),$a(a,"paste",function(e){_e(i,e)||Ko(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),$a(a,"cut",t),$a(a,"copy",t),$a(e.scroller,"paste",function(t){It(e,t)||_e(i,t)||(i.state.pasteIncoming=!0,n.focus())}),$a(e.lineSpace,"selectstart",function(t){It(e,t)||De(t)}),$a(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"})}}),$a(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$l.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=dr(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},$l.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$l.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ja&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&_a(this.textarea),da&&fa>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",da&&fa>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},$l.prototype.getField=function(){return this.textarea},$l.prototype.supportsTouch=function(){return!1},$l.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!ka||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},$l.prototype.blur=function(){this.textarea.blur()},$l.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$l.prototype.receivedFocus=function(){this.slowPoll()},$l.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$l.prototype.fastPoll=function(){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)},$l.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Za(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(da&&fa>=9&&this.hasSelection===i||Ca&&/[\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 fn(t,function(){Uo(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},$l.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$l.prototype.onKeyPress=function(){da&&fa>=9&&(this.hasSelection=null),this.fastPoll()},$l.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,da&&fa<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!da||da&&fa<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?hn(i,Mi)(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=Sr(i,e),s=o.scroller.scrollTop;if(l&&!ga){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&hn(i,bi)(i.doc,In(l),Pa);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: "+(da?"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(ha&&(f=window.scrollY),o.input.focus(),ha&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),da&&fa>=9&&t(),Na){He(e);var h=function(){Ne(window,"mouseup",h),setTimeout(r,20)};$a(window,"mouseup",h)}else setTimeout(r,50)}},$l.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},$l.prototype.setUneditable=function(){},$l.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=Bl&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=Bl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Kn(e)},!0),t("indentUnit",2,Kn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Vn(e),or(e),gn(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(D(n,o))}n++});for(var i=r.length-1;i>=0;i--)Di(e.doc,t,r[i],D(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!=Bl&&e.refresh()}),t("specialCharPlaceholder",ht,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",ka?"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",!Ta),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){zo(e),Po(e)},!0),t("keyMap","default",function(e,t,r){var n=co(t),i=r!=Bl&&co(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Io,!0),t("gutters",[],function(e){Fn(e.options),Po(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return en(e)},!0),t("scrollbarStyle","native",function(e){rn(e),en(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Fn(e.options),Po(e)},!0),t("firstLineNumber",1,Po,!0),t("lineNumberFormatter",function(e){return e},Po,!0),t("showCursorWhenSelecting",!1,Lr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Fr(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,Ho),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Lr,!0),t("singleCursorHeightPerLine",!0,Lr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Vn,!0),t("addModeClass",!1,Vn,!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,Vn,!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)}(Ro),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)&&hn(this,t[e])(this,r,i),Oe(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"](co(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:pn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,gn(this)}),removeOverlay:pn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void gn(t)}}),indentLine:pn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),W(this.doc,e)&&Bo(this,e,t,r)}),indentSelection:pn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Bo(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Kr(t));else{var a=o.from(),l=o.to(),s=Math.max(n,a.line);n=Math.min(t.lastLine(),l.line-(l.ch?0:1))+1;for(var c=s;c<n;++c)Bo(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&r.length==u.length&&u[i].from().ch>0&&mi(t.doc,i,new kl(a,u[i].to()),Pa)}}}),getTokenAt:function(e,t){return it(this,e,t)},getLineTokens:function(e,t){return it(this,D(e),t,!0)},getTokenTypeAt:function(e){e=B(this.doc,e);var t,r=Qe(this,M(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=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],a=this.getModeAt(e);if("string"==typeof a[t])o[a[t]]&&i.push(o[a[t]]);else if(a[t])for(var l=0;l<a[t].length;l++){var s=o[a[t][l]];s&&i.push(s)}else a.helperType&&o[a.helperType]?i.push(o[a.helperType]):o[a.name]&&i.push(o[a.name]);for(var c=0;c<o._global.length;c++){var u=o._global[c];u.pred(a,n)&&-1==f(i,u.val)&&i.push(u.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=j(r,null==e?r.first+r.size-1:e),et(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?B(this.doc,e):e?n.from():n.to(),dr(this,r,t||"page")},charCoords:function(e,t){return ur(this,B(this.doc,e),t||"page")},coordsChar:function(e,t){return e=cr(this,e,t||"page"),pr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=cr(this,{top:e,left:0},t||"page").top,E(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=M(this.doc,e)}else n=e;return sr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return yr(this.display)},defaultCharWidth:function(){return br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=dr(this,B(this.doc,e));var a=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&&Br(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:pn(wo),triggerOnKeyPress:pn(Co),triggerOnKeyUp:ko,triggerOnMouseDown:pn(To),execCommand:function(e){if(zl.hasOwnProperty(e))return zl[e].call(null,this)},triggerElectric:pn(function(e){Vo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=B(this.doc,e),l=0;l<t&&(a=Xo(i.doc,a,o,r,n),!a.hitSide);++l);return a},moveH:pn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Xo(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Ia)}),deleteH:pn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):uo(this,function(r){var i=Xo(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=this,o=1,a=n;t<0&&(o=-1,t=-t);for(var l=B(this.doc,e),s=0;s<t;++s){var c=dr(i,l,"div");if(null==a?a=c.left:c.left=a,l=Zo(i,c,o,r),l.hitSide)break}return l},moveV:pn(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=dr(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Zo(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Ur(r,ur(r,s,"div").top-l.top),s},Ia),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=M(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;for(var a=r.charAt(n),l=x(a,o)?function(e){return x(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!x(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new kl(D(e.line,n),D(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):Oa(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:pn(function(e,t){Vr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-qt(this)-this.display.barHeight,width:e.scrollWidth-qt(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:Ut(this)}},scrollIntoView:pn(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:D(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?Gr(this,e):Yr(this,e.from,e.to,e.margin)}),setSize:pn(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&&ir(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){vn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(e){return fn(this,e)},refresh:pn(function(){var e=this.display.cachedTextHeight;gn(this),this.curOp.forceUpdate=!0,or(this),Vr(this,this.doc.scrollLeft,this.doc.scrollTop),_n(this),(null==e||Math.abs(e-yr(this.display))>.5)&&Cr(this),Oe(this,"refresh",this)}),swapDoc:pn(function(e){var t=this.doc;return t.cm=null,Xn(this,e),or(this),this.display.input.reset(),Vr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,St(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}},Fe(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})}}(Ro);var Yl="iter insert remove copy getEditor constructor".split(" ");for(var Xl in Al.prototype)Al.prototype.hasOwnProperty(Xl)&&f(Yl,Xl)<0&&(Ro.prototype[Xl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Al.prototype[Xl]));return Fe(Al),Ro.inputStyles={textarea:$l,contenteditable:Gl},Ro.defineMode=function(e){Ro.defaults.mode||"null"==e||(Ro.defaults.mode=e),Ue.apply(this,arguments)},Ro.defineMIME=Ke,Ro.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ro.defineMIME("text/plain","null"),Ro.defineExtension=function(e,t){Ro.prototype[e]=t},Ro.defineDocExtension=function(e,t){Al.prototype[e]=t},Ro.fromTextArea=ia,function(e){e.off=Ne,e.on=$a,e.wheelEventPixels=zn,e.Doc=Al,e.splitLines=Xa,e.countColumn=d,e.findColumn=h,e.isWordChar=w,e.Pass=za,e.signal=Oe,e.Line=ll,e.changeEnd=Rn,e.scrollbarModel=gl,e.Pos=D,e.cmpPos=z,e.modes=el,e.mimeModes=tl,e.resolveMode=Ve,e.getMode=Ge,e.modeExtensions=rl,e.extendMode=$e,e.copyState=Ye,e.startState=Ze,e.innerMode=Xe,e.commands=zl,e.keyMap=Dl,e.keyName=so,e.isModifierKey=ao,e.lookupKey=oo,e.normalizeKeyMap=io,e.StringStream=nl,e.SharedTextMarker=Ll,e.TextMarker=Tl,e.LineWidget=Cl,e.e_preventDefault=De,e.e_stopPropagation=ze,e.e_stop=He,e.addClass=l,e.contains=o,e.rmClass=Oa,e.keyNames=_l}(Ro),Ro.version="5.27.0",Ro})},{}],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={},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 p=t,e}function i(e,t){var r=e.next();if(v[r]){var i=v[r](e,t);if(!1!==i)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(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=a,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}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){
|
7 |
-
")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return _[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();m=M.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var h=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var p,m,g=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},T=r.counterDescriptors||{},L=r.colorKeywords||{},M=r.valueKeywords||{},A=r.allowNested,N=r.lineComment,O=!0===r.supportsAtComponent,_={};return _.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(O&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(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 s(r,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},_.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(m="property","maybeprop"):C.hasOwnProperty(n)?(m="string-2","maybeprop"):A?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?_.top(e,t,r):(m="error","block")},_.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},_.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(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)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else m+=" error";return"prop"},_.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(m="property","maybeprop"):r.context.type},_.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&f(t),"parens")},_.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(m="variable-3",r.context.type):u(e,t,r)},_.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(m="tag",r.context.type):_.atBlock(e,t,r)},_.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();m="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},_.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(m="error"),r.context.type)},_.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):_.atBlock(e,t,r)},_.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(m="variable","restricted_atBlock_before"):u(e,t,r)},_.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(m="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},_.keyframes=function(e,t,r){return"word"==e?(m="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},_.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},_.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:h?"block":"top",stateArg:null,context:new l(h?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(p=r[1],r=r[0]),m=r,t.state=_[t.state](p,e,t),m},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-g)):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:N,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=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["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"],w=t(b),x=["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"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(b).concat(x);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:g,counterDescriptors:y,colorKeywords:w,valueKeywords:k,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:w,valueKeywords:k,fontProperties:g,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:w,valueKeywords:k,fontProperties:g,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:g,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":15}],17:[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,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}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(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])}function a(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i[0]||i[1].test(n(t,i[0])))return i[2]}}var l={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"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),f=/\btag\b/.test(d);if(f&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(n.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(u[h[1]],h[2]),m=e.getMode(r,p),g=i(h[1],!0),v=i(h[1],!1);o.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=m,o.localState=e.startState(m,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,f=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),f)for(var h=f.length-1;h>=0;h--)u.script.unshift(["type",f[h].matches,f[h].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},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(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.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||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":15,"../css/css":16,"../javascript/javascript":18,"../xml/xml":19}],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,t,r){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function i(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}}function o(e,t,r){return Te=e,Le=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=l(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==n)return e.eat("*")?(r.tokenize=s,s(e,r)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,r,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Fe),o("operator","operator",e.current()));if("`"==n)return r.tokenize=c,c(e,r);if("#"==n)return e.skipToEnd(),o("error","error");if(Fe.test(n))return">"==n&&r.lexical&&">"==r.lexical.type||e.eatWhile(Fe),o("operator","operator",e.current());if(Ee.test(n)){e.eatWhile(Ee);var a=e.current();if("."!=r.lastType){if(We.propertyIsEnumerable(a)){var u=We[a];return o(u.type,u.style,a)}if("async"==a&&e.match(/^\s*[\(\w]/,!1))return o("async","keyword",a)}return o("variable","variable",a)}}function l(e){return function(t,r){var n,i=!1;if(Ne&&"@"==t.peek()&&t.match(De))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function c(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(_e){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=ze.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(Ee.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function d(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 f(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(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function h(e,t,r,n,i){var o=e.cc;for(He.state=e,He.stream=i,He.marked=null,He.cc=o,He.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():Oe?C:k)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return He.marked?He.marked:"variable"==r&&f(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)He.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=He.state;if(He.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){He.state.context={prev:He.state.context,vars:He.state.localVars},He.state.localVars=Ie}function y(){He.state.localVars=He.state.context.vars,He.state.context=He.state.context.prev}function b(e,t){var r=function(){var r=He.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 d(n,He.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function w(){var e=He.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(r){return r==e?m():";"==e?p():m(t)}return t}function k(e,t){return"var"==e?m(b("vardef",t.length),J,x(";"),w):"keyword a"==e?m(b("form"),T,k,w):"keyword b"==e?m(b("form"),k,w):"{"==e?m(b("}"),K,w):";"==e?m():"if"==e?("else"==He.state.lexical.info&&He.state.cc[He.state.cc.length-1]==w&&He.state.cc.pop()(),m(b("form"),T,k,w,ne)):"function"==e?m(ce):"for"==e?m(b("form"),ie,k,w):"variable"==e?_e&&"type"==t?(He.marked="keyword",m(G,x("operator"),G,x(";"))):m(b("stat"),H):"switch"==e?m(b("form"),T,x("{"),b("}","switch"),K,w,w):"case"==e?m(C,x(":")):"default"==e?m(x(":")):"catch"==e?m(b("form"),v,x("("),ue,x(")"),k,w,y):"class"==e?m(b("form"),fe,w):"export"==e?m(b("stat"),ge,w):"import"==e?m(b("stat"),ye,w):"module"==e?m(b("form"),Q,x("{"),b("}"),K,w,w):"async"==e?m(k):"@"==t?m(C,k):p(b("stat"),C,x(";"),w)}function C(e){return L(e,!1)}function S(e){return L(e,!0)}function T(e){return"("!=e?p():m(b(")"),C,x(")"),w)}function L(e,t){if(He.state.fatArrowAt==He.stream.start){var r=t?F:W;if("("==e)return m(v,b(")"),q(Q,")"),w,x("=>"),r,y);if("variable"==e)return p(v,Q,x("=>"),r,y)}var n=t?O:N;return Pe.hasOwnProperty(e)?m(n):"function"==e?m(ce,n):"class"==e?m(b("form"),de,w):"keyword c"==e||"async"==e?m(t?A:M):"("==e?m(b(")"),M,x(")"),w,n):"operator"==e||"spread"==e?m(t?S:C):"["==e?m(b("]"),Ce,w,n):"{"==e?U(R,"}",null,n):"quasi"==e?p(_,n):"new"==e?m(D(t)):m()}function M(e){return e.match(/[;\}\)\],]/)?p():p(C)}function A(e){
|
8 |
-
return e.match(/[;\}\)\],]/)?p():p(S)}function N(e,t){return","==e?m(C):O(e,t,!1)}function O(e,t,r){var n=0==r?N:O,i=0==r?C:S;return"=>"==e?m(v,r?F:W,y):"operator"==e?/\+\+|--/.test(t)?m(n):"?"==t?m(C,x(":"),i):m(i):"quasi"==e?p(_,n):";"!=e?"("==e?U(S,")","call",n):"."==e?m(I,n):"["==e?m(b("]"),M,x("]"),w,n):_e&&"as"==t?(He.marked="keyword",m(G,n)):void 0:void 0}function _(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(_):m(C,E)}function E(e){if("}"==e)return He.marked="string-2",He.state.tokenize=c,m(_)}function W(e){return u(He.stream,He.state),p("{"==e?k:C)}function F(e){return u(He.stream,He.state),p("{"==e?k:S)}function D(e){return function(t){return"."==t?m(e?P:z):p(e?S:C)}}function z(e,t){if("target"==t)return He.marked="keyword",m(N)}function P(e,t){if("target"==t)return He.marked="keyword",m(O)}function H(e){return":"==e?m(w,k):p(N,x(";"),w)}function I(e){if("variable"==e)return He.marked="property",m()}function R(e,t){return"async"==e?(He.marked="property",m(R)):"variable"==e||"keyword"==He.style?(He.marked="property",m("get"==t||"set"==t?j:B)):"number"==e||"string"==e?(He.marked=Ne?"property":He.style+" property",m(B)):"jsonld-keyword"==e?m(B):"modifier"==e?m(R):"["==e?m(C,x("]"),B):"spread"==e?m(C,B):":"==e?p(B):void 0}function j(e){return"variable"!=e?p(B):(He.marked="property",m(ce))}function B(e){return":"==e?m(S):"("==e?p(ce):void 0}function q(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=He.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return i==t||o==t?m():m(x(t))}return function(r,i){return r==t||i==t?m():p(e,n)}}function U(e,t,r){for(var n=3;n<arguments.length;n++)He.cc.push(arguments[n]);return m(b(t,r),q(e,t),w)}function K(e){return"}"==e?m():p(k,K)}function V(e,t){if(_e){if(":"==e)return m(G);if("?"==t)return m(V)}}function G(e){return"variable"==e?(He.marked="type",m(Z)):"string"==e||"number"==e||"atom"==e?m(Z):"{"==e?m(b("}"),q(Y,"}",",;"),w,Z):"("==e?m(q(X,")"),$):void 0}function $(e){if("=>"==e)return m(G)}function Y(e,t){return"variable"==e||"keyword"==He.style?(He.marked="property",m(Y)):"?"==t?m(Y):":"==e?m(G):"["==e?m(C,V,x("]"),Y):void 0}function X(e){return"variable"==e?m(X):":"==e?m(G):void 0}function Z(e,t){return"<"==t?m(b(">"),q(G,">"),w,Z):"|"==t||"."==e?m(G):"["==e?m(x("]"),Z):"extends"==t?m(G):void 0}function J(){return p(Q,V,te,re)}function Q(e,t){return"modifier"==e?m(Q):"variable"==e?(g(t),m()):"spread"==e?m(Q):"["==e?U(Q,"]"):"{"==e?U(ee,"}"):void 0}function ee(e,t){return"variable"!=e||He.stream.match(/^\s*:/,!1)?("variable"==e&&(He.marked="property"),"spread"==e?m(Q):"}"==e?p():m(x(":"),Q,te)):(g(t),m(te))}function te(e,t){if("="==t)return m(S)}function re(e){if(","==e)return m(J)}function ne(e,t){if("keyword b"==e&&"else"==t)return m(b("form","else"),k,w)}function ie(e){if("("==e)return m(b(")"),oe,x(")"),w)}function oe(e){return"var"==e?m(J,x(";"),le):";"==e?m(le):"variable"==e?m(ae):p(C,x(";"),le)}function ae(e,t){return"in"==t||"of"==t?(He.marked="keyword",m(C)):m(N,le)}function le(e,t){return";"==e?m(se):"in"==t||"of"==t?(He.marked="keyword",m(C)):p(C,x(";"),se)}function se(e){")"!=e&&m(C)}function ce(e,t){return"*"==t?(He.marked="keyword",m(ce)):"variable"==e?(g(t),m(ce)):"("==e?m(v,b(")"),q(ue,")"),w,V,k,y):_e&&"<"==t?m(b(">"),q(G,">"),w,ce):void 0}function ue(e){return"spread"==e?m(ue):p(Q,V,te)}function de(e,t){return"variable"==e?fe(e,t):he(e,t)}function fe(e,t){if("variable"==e)return g(t),m(he)}function he(e,t){return"<"==t?m(b(">"),q(G,">"),w,he):"extends"==t||"implements"==t||_e&&","==e?m(_e?G:C,he):"{"==e?m(b("}"),pe,w):void 0}function pe(e,t){return"variable"==e||"keyword"==He.style?("async"==t||"static"==t||"get"==t||"set"==t||_e&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&He.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(He.marked="keyword",m(pe)):(He.marked="property",m(_e?me:ce,pe)):"["==e?m(C,x("]"),_e?me:ce,pe):"*"==t?(He.marked="keyword",m(pe)):";"==e?m(pe):"}"==e?m():"@"==t?m(C,pe):void 0}function me(e,t){return"?"==t?m(me):":"==e?m(G,te):"="==t?m(S):p(ce)}function ge(e,t){return"*"==t?(He.marked="keyword",m(ke,x(";"))):"default"==t?(He.marked="keyword",m(C,x(";"))):"{"==e?m(q(ve,"}"),ke,x(";")):p(k)}function ve(e,t){return"as"==t?(He.marked="keyword",m(x("variable"))):"variable"==e?p(S,ve):void 0}function ye(e){return"string"==e?m():p(be,we,ke)}function be(e,t){return"{"==e?U(be,"}"):("variable"==e&&g(t),"*"==t&&(He.marked="keyword"),m(xe))}function we(e){if(","==e)return m(be,we)}function xe(e,t){if("as"==t)return He.marked="keyword",m(be)}function ke(e,t){if("from"==t)return He.marked="keyword",m(C)}function Ce(e){return"]"==e?m():p(q(S,"]"))}function Se(e,t){return"operator"==e.lastType||","==e.lastType||Fe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Te,Le,Me=r.indentUnit,Ae=n.statementIndent,Ne=n.jsonld,Oe=n.json||Ne,_e=n.typescript,Ee=n.wordCharacters||/[\w$\xa1-\uffff]/,We=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:n,break:n,continue:n,new:e("new"),delete:n,throw:n,debugger:n,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(_e){var l={type:"variable",style:"type"},s={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),string:l,number:l,boolean:l,any:l};for(var c in s)a[c]=s[c]}return a}(),Fe=/[+\-*&%=<>!?|~^@]/,De=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,ze="([{}])",Pe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},He={state:null,column:null,marked:null,cc:null},Ie={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Me,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Te?r:(t.lastType="operator"!=Te||"++"!=Le&&"--"!=Le?Te:"incdec",h(t,r,Te,Le,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=a)return 0;var i,o=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==w)l=l.prev;else if(u!=ne)break}for(;("stat"==l.type||"form"==l.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==N||i==O)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;Ae&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=o==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info+1:0):"form"==d&&"{"==o?l.indented:"form"==d?l.indented+Me:"stat"==d?l.indented+(Se(t,r)?Ae||Me:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:Me):l.indented+(/^(?:case|default)\b/.test(r)?Me:2*Me)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Oe?null:"/*",blockCommentEnd:Oe?null:"*/",lineComment:Oe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Oe?"json":"javascript",jsonldMode:Ne,jsonMode:Oe,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=S||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":15}],19:[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(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=h,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function h(e,t,r){return"openTag"==e?(r.tagStart=t.column(),p):"closeTag"==e?m:h}function p(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):(M="error",p)}function m(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===C.matchClosing?(M="tag",g):(M="tag error",v)}return M="error",v}function g(e,t,r){return"endTag"!=e?(M="error",g):(d(r),h)}function v(e,t,r){return M="error",g(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?f(r,n):(f(r,n),r.context=new u(r,n,i==r.indented)),h}return M="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(M="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:h,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;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(M=null,t.state=t.state(L||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;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!==C.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.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(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.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+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),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":15}],20:[function(e,t,r){function n(e,t){function r(){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 l=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(l,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===l)this.record_tag(l),this.tag_type="SCRIPT";else if("style"===l)this.record_tag(l),this.tag_type="STYLE";else if(this.Utils.in_array(l,s)){var c=this.get_unformatted("</"+l+">",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 if("!"===l.charAt(0))if(-1!=l.indexOf("[if")){if(-1!=a.indexOf("!IE")){var c=this.get_unformatted("--\x3e",a);n.push(c)}this.tag_type="START"}else if(-1!=l.indexOf("[endif"))this.tag_type="END",this.unindent();else if(-1!=l.indexOf("[cdata[")){var c=this.get_unformatted("]]>",a);n.push(c),this.tag_type="SINGLE"}else{var c=this.get_unformatted("--\x3e",a);n.push(c),this.tag_type="SINGLE"}else"/"===l.charAt(0)?(this.retrieve_tag(l.substring(1)),this.tag_type="END"):(this.record_tag(l),this.tag_type="START"),this.Utils.in_array(l,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 e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if("string"!=typeof(e=this.get_tag()))return e;return[e,"TK_TAG_"+this.tag_type]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<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}var n,i,o,a,l,s;for(t=t||{},i=t.indent_size||4,o=t.indent_char||" ",l=t.brace_style||"collapse",a=0==t.max_char?1/0:t.max_char||70,s=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"],n=new r,n.printer(e,o,i,a,l);;){var c=n.get_token();if(n.token_text=c[0],n.token_type=c[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent(),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var u=n.token_text.match(/\w+/)[0],d=n.output[n.output.length-1].match(/<\s*(\w+)/);null!==d&&d[1]===u||n.print_newline(!0,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z]+)/i);f&&n.Utils.in_array(f[1],s)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_CONTENT":""!==n.token_text&&n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.output.push("\n");var h=n.token_text;if("TK_SCRIPT"==n.token_type)var p="function"==typeof js_beautify&&js_beautify;else if("TK_STYLE"==n.token_type)var p="function"==typeof css_beautify&&css_beautify;if("keep"==t.indent_scripts)var m=0;else if("separate"==t.indent_scripts)var m=-n.indent_level;else var m=1;var g=n.get_full_indent(m);if(p)h=p(h.replace(/^\s*/,g),t);else{var v=h.match(/^\s*/)[0],y=v.match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,b=n.get_full_indent(m-y);h=h.replace(/^\s*/,g).replace(/\r\n|\r|\n/g,"\n"+b).replace(/\s*$/,"")}h&&(n.print_token(h),n.print_newline(!0,n.output))}n.current_mode="TAG"}n.last_token=n.token_type,n.last_text=n.token_text}return n.output.join("")}t.exports={prettyPrint:n}},{}],21:[function(e,t,r){"use strict";t.exports=e("./stream/stream")},{"./stream/stream":22}],22:[function(e,t,r){"use strict";!function(){function e(){function e(){return arguments.length>0&&arguments[0]!==C&&n(e,arguments[0]),e._state.value}return r(e),arguments.length>0&&arguments[0]!==C&&n(e,arguments[0]),e}function r(t){t.constructor=e,t._state={id:k++,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"]=d,t["fantasy-land/ap"]=f,t["fantasy-land/of"]=e,t.valueOf=h,t.toJSON=p,t.toString=h,Object.defineProperties(t,{end:{get:function(){if(!t._state.endStream){var r=e();r.map(function(e){return!0===e&&(u(t),r._state.unregister=function(){u(r)}),e}),t._state.endStream=r}return t._state.endStream}}})}function n(e,t){i(e,t);for(var r in e._state.deps)o(e._state.deps[r],!1);null!=e._state.unregister&&e._state.unregister(),a(e)}function i(e,t){e._state.value=t,e._state.changed=!0,2!==e._state.state&&(e._state.state=1)}function o(e,t){var r=e._state,n=r.parents;if(n.length>0&&n.every(g)&&(t||n.some(v))){var o=e._state.derive();if(o===C)return!1;i(e,o)}}function a(e){e._state.changed=!1;for(var t in e._state.deps)e._state.deps[t]._state.changed=!1}function l(t,r){if(!r.every(m))throw new Error("Ensure that each item passed to stream.combine/stream.merge is a stream");return s(e(),r,function(){return t.apply(this,r.concat([r.filter(v)]))})}function s(e,t,r){var n=e._state;return n.derive=r,n.parents=t.filter(y),c(e,n.parents),o(e,!0),e}function c(e,t){for(var r=0;r<t.length;r++)t[r]._state.deps[e._state.id]=e,c(e,t[r]._state.parents)}function u(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 d(e){return l(function(t){return e(t())},[this])}function f(e){return l(function(e,t){return e()(t())},[e,this])}function h(){return this._state.value}function p(){return null!=this._state.value&&"function"==typeof this._state.value.toJSON?this._state.value.toJSON():this._state.value}function m(e){return e._state}function g(e){return 1===e._state.state}function v(e){return e._state.changed}function y(e){return 2!==e._state.state}function b(e){return l(function(){return e.map(function(e){return e()})},e)}function w(e,t,r){var n=l(function(r){return t=e(t,r._state.value)},[r]);return 0===n._state.state&&n(t),n}function x(e,t){var r=e.map(function(e){var t=e[0];return 0===t._state.state&&t(void 0),t});return l(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)}var k=0,C={};e["fantasy-land/of"]=e,e.merge=b,e.combine=l,e.scan=w,e.scanMerge=x,e.HALT=C,void 0!==t?t.exports=e:"function"!=typeof window.m||"stream"in window.m?window.m={stream:e}:window.m.stream=e}()},{}]},{},[11])}();
|
9 |
//# sourceMappingURL=forms-admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!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}({1:[function(e,t,r){"use strict";var n=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};t.exports=n},{}],2:[function(e,t,r){"use strict";var n=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.number=function(e){return[n.text(e),i.numberMinMax(e)]},n};t.exports=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")},o=function(e){function t(t){var i=void 0,o=void 0,a=void 0,l=document.createElement("div");return i=t.label().length>0?e("label",{},t.label()):"",o="function"==typeof r[t.type()]?r[t.type()](t):r.default(t),a=t.wrap()?e("p",[i,o]):[i,o],e.render(l,a),n.prettyPrint(l.innerHTML)+"\n"}var r={};return r.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)},r.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())])})},r.radio=r.checkbox,r.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)},t};t.exports=o},{html:20}],4:[function(e,t,r){"use strict";var n=function(t,r,n,i,o,a){function l(e){d=i.get(e),d&&d.choices().length>0&&d.value(d.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function s(){}function c(){var e=f(d);n.insert(e),l(""),t.redraw()}function u(){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 d&&(o=h(t("div.field-wizard",[t("h3",[d.title(),d.forceRequired()?t("span.red","*"):"",d.name().length?t("code",d.name()):""]),d.help().length?t("p",t.trust(d.help())):"",p.render(d),t("p",[t("button",{class:"button-primary",type:"button",onkeydown:function(e){e=e||window.event,13==e.keyCode&&c()},onclick:c},a.addToForm)])]),l)),[n,o]}var d,f=e("./field-generator.js")(t),h=e("./overlay.js")(t,a),p=e("./field-forms.js")(t,a);return n.on("blur",t.redraw),{view:u,controller:s}};t.exports=n},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){"use strict";var n=function(e,t){function r(){u.forEach(e.deregister)}function n(t,r,n){var i=e.register(t,r);n||u.push(i)}function i(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function o(e){var r=t.listFields,o=i(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?n(r,a,!1):(n(r,{name:a.name+"[addr1]",type:"text",mailchimpType:"address",title:t.streetAddress}),n(r,{name:a.name+"[city]",type:"text",mailchimpType:"address",title:t.city}),n(r,{name:a.name+"[state]",type:"text",mailchimpType:"address",title:t.state}),n(r,{name:a.name+"[zip]",type:"text",mailchimpType:"address",title:t.zip}),n(r,{name:a.name+"[country]",type:"select",mailchimpType:"address",title:t.country,choices:mc4wp_vars.countries})),!0}function a(e){var r=t.interestCategories,o=i(e.field_type);n(r,{title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o},!1)}function l(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(o),e.interest_categories.forEach(a)}function s(e){r(),e.forEach(l)}function c(e){var r,i=t.formFields;n(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),r={};for(var o in e)r[e[o].id]=e[o].name;n(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:r,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),r={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},n(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:r,value:"subscribe",help:t.formActionDescription},!0)}var u=[];return{registerCustomFields:c,registerListFields:l,registerListsFields:s}};t.exports=n},{}],6:[function(e,t,r){"use strict";var n=e("mithril/stream");t.exports=function(e,t){function r(e){return"function"==typeof e.map?e.map(function(e){return new p({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new p({label:r,value:t})})}function i(n,i){var o,a=c("name",i.name).shift();return a?void(!a.forceRequired()&&i.forceRequired&&a.forceRequired(!0)):(i.choices&&(i.choices=r(i.choices),i.value&&(i.choices=i.choices.map(function(e){return e.value()===i.value&&e.selected(!0),e}))),f.indexOf(n)<0&&f.push(n),o=new h(i),o.category=n,d.push(o),u&&window.clearTimeout(u),u=window.setTimeout(e.redraw,200),t.trigger("fields.change"),o)}function o(t){var r=d.indexOf(t);r>-1&&(delete d[r],e.redraw())}function a(e){return d[e]}function l(){return d=d.map(function(e,t){return e.index=t,e})}function s(){return f}function c(e,t){return d.filter(function(r){return r[e]()===t})}var u,d=[],f=[],h=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.title||""),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(e.wrap||!0),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.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}))}},p=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:a,getAll:l,getCategories:s,deregister:o,register:i,getAllWhere:c}}},{"mithril/stream":21}],7:[function(e,t,r){"use strict";var n=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"),e("codemirror/addon/edit/matchtags"),e("codemirror/addon/edit/closetag.js");var i=function(e){function t(){return o&&(i.innerHTML=a.getValue().toLowerCase(),o=!1),i}var r,i=document.createElement("form"),o=!1,a={};return i.innerHTML=e.value.toLowerCase(),n&&(r=n.fromTextArea(e,{selectionPointer:!0,matchTags:{bothTags:!0},mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0}),window.dispatchEvent&&r.on("change",function(){if("function"==typeof Event){var t=new Event("change",{bubbles:!0});e.dispatchEvent(t)}})),window.addEventListener("load",function(){n.signal(r,"change")}),e.addEventListener("change",function(){o=!0}),a.getValue=function(){return r?r.getValue():e.value},a.query=function(e){return t().querySelectorAll(e.toLowerCase())},a.containsField=function(e){return null!==t().elements.namedItem(e.toLowerCase())},a.insert=function(t){r?(r.replaceSelection(t),r.focus()):e.value+=t},a.on=function(t,n){return r?(t="input"===t?"changes":t,r.on(t,n)):e.addEventListener(t,n)},a.refresh=function(){r&&r.refresh()},a};t.exports=i},{codemirror:15,"codemirror/addon/edit/closetag.js":12,"codemirror/addon/edit/matchtags":13,"codemirror/addon/fold/xml-fold":14,"codemirror/mode/css/css":16,"codemirror/mode/htmlmixed/htmlmixed":17,"codemirror/mode/javascript/javascript":18,"codemirror/mode/xml/xml":19}],8:[function(e,t,r){"use strict";var n=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)}}}),l(),e.redraw()}function l(){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.toUpperCase();"_"!==r[0]&&(r=r.replace(/\[(\w+)\]/g,".$1"),-1===e.indexOf(r)&&e.push(r))}),s.value=e.join(",")}var s=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))};t.exports=n},{}],9:[function(e,t,r){"use strict";function n(e,t){l[e]=t,o()}function i(e){delete l[e],o()}function o(){var e="";for(var t in l)e+='<div class="notice notice-warning inline"><p>'+l[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){r=document.createElement("div"),r.className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}function a(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),o=r.filter(function(t){return!e.containsField(t.name().toUpperCase())}),a="<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.";a+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+o.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",o.length>0?n("required_fields_missing",a):i("required_fields_missing")};r(),e.on("focus",r),e.on("blur",r),o(),e.on("blur",o),e.on("focus",o)}var l={};t.exports={init:a}},{}],10:[function(e,t,r){"use strict";var n=function(e,t){function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),l()}function n(e){e=e||window.event,27==e.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})]}};t.exports=n},{}],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=document.getElementById("mc4wp-form-content"),m=window.formEditor=new u(p),g=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),v=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),g);var y=new f(h,n);o.on("selectedLists.change",y.registerListsFields),y.registerListsFields(a.getSelectedLists()),y.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),v.init(m,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=m,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){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),n=[],s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[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&&a,g="object"==typeof h&&h.indentTags||p&&l,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&&i(m,y)>-1||o(t,v,c,f,!0))return e.Pass;var b=g&&i(g,y)>-1;n[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=r.length-1;s>=0;s--){var w=n[s];t.replaceRange(w.text,r[s].head,r[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))}}function r(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=n[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||o(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),i[l]=f}t.replaceSelections(i),n=t.listSelections();for(var l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&t.indentLine(n[l].head.line)}function n(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function i(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 o(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(r,i,o){if(o!=e.Init&&o&&r.removeKeyMap("autoCloseTags"),i){var a={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof i||i.whenOpening)&&(a["'>'"]=function(e){return t(e)}),r.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["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 r(e)}})},{"../../lib/codemirror":15,"../fold/xml-fold":14}],13:[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":15,"../fold/xml-fold":14}],14:[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){return e.line-t.line||e.ch-t.ch}function r(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 n(e,t){var r=e.cm.getTokenTypeAt(f(e.line,t));return r&&/\btag\b/.test(r)}function i(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(n(e,t+1)){p.lastIndex=t,e.ch=t;var r=p.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function s(e){for(;;){p.lastIndex=e.ch;var t=p.exec(e.text);if(!t){if(i(e))continue;return}{if(n(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var r=[];;){var n,i=s(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(n=a(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:f(o,l),to:f(e.line,e.ch)}}else r.push(i[2])}}function d(e,t){for(var r=[];;){var n=c(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:f(e.line,e.ch),to:f(i,o)}}}else l(e)}}var f=e.Pos,h="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",p=new RegExp("<(/?)(["+h+"][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,t){for(var n=new r(e,t.line,0);;){var i,o=s(n);if(!o||n.line!=t.line||!(i=a(n)))return;if(!o[1]&&"selfClose"!=i){var l=f(n.line,n.ch),c=u(n,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,n,i){var o=new r(e,n.line,n.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=a(o),c=s&&f(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,n)>0)){var p={from:f(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:h[1]?{open:d(o,h[2]),close:p,at:"close"}:(o=new r(e,c.line,c.ch,i),{open:p,close:u(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,n,i){for(var o=new r(e,t.line,t.ch,n);;){var a=d(o,i);if(!a)break;var l=new r(e,t.line,t.ch,n),s=u(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,i){return u(new r(e,t.line,t.ch,i?{from:0,to:i}:null),n)}})},{"../../lib/codemirror":15}],15:[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(;Ra.length<=e;)Ra.push(m(Ra)+" ");return Ra[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(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function y(){}function b(e,t){var r;return Object.create?r=Object.create(e):(y.prototype=e,r=new y),t&&u(t,r),r}function w(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ja.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function k(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function C(e){return e.charCodeAt(0)>=768&&Ba.test(e)}function S(e,t,r){for(;(r<0?t>0:t<e.length)&&C(e.charAt(t));)t+=r;return t}function T(e,t,r){for(;;){if(Math.abs(t-r)<=1)return e(t)?t:r;var n=Math.floor((t+r)/2);e(n)?r=n:t=n}}function L(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[a],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Da+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),da&&fa<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),ha||la&&ka||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(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 A(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 O(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function N(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function _(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 E(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],s=l.height;if(t<s)break;t-=s}return r+a}function W(e,t){return t>=e.first&&t<e.first+e.size}function F(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function D(e,t,r){if(void 0===r&&(r=null),!(this instanceof D))return new D(e,t,r);this.line=e,this.ch=t,this.sticky=r}function z(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&0==z(e,t)}function H(e){return D(e.line,e.ch)}function I(e,t){return z(e,t)<0?t:e}function R(e,t){return z(e,t)<0?e:t}function j(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function B(e,t){if(t.line<e.first)return D(e.first,0);var r=e.first+e.size-1;return t.line>r?D(r,M(e,r).text.length):q(t,M(e,t.line).text.length)}function q(e,t){var r=e.ch;return null==r||r>t?D(e.line,t):r<0?D(e.line,0):e}function U(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=B(e,t[n]);return r}function K(){qa=!0}function V(){Ua=!0}function G(e,t,r){this.marker=e,this.from=t,this.to=r}function $(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Y(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function X(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Z(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new G(a,o.from,s?null:o.to))}}return n}function J(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new G(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function Q(e,t){if(t.full)return null
|
2 |
+
;var r=W(e,t.from.line)&&M(e,t.from.line).markedSpans,n=W(e,t.to.line)&&M(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==z(t.from,t.to),l=Z(r,i,a),s=J(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=$(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){var v=$(l,g.marker);v||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=ee(l)),s&&s!=l&&(s=ee(s));var y=[l];if(!c){var b,w=t.text.length-2;if(w>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(b||(b=[])).push(new G(l[x].marker,null,null));for(var k=0;k<w;++k)y.push(b);y.push(s)}return y}function ee(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 te(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(!(z(c.to,l.from)<0||z(c.from,l.to)>0)){var u=[s,1],d=z(c.from,l.from),h=z(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}function re(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function ne(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ie(e){return e.inclusiveLeft?-1:0}function oe(e){return e.inclusiveRight?1:0}function ae(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=z(n.from,i.from)||ie(e)-ie(t);if(o)return-o;var a=z(n.to,i.to)||oe(e)-oe(t);return a||t.id-e.id}function le(e,t){var r,n=Ua&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||ae(r,i.marker)<0)&&(r=i.marker);return r}function se(e){return le(e,!0)}function ce(e){return le(e,!1)}function ue(e,t,r,n,i){var o=M(e,t),a=Ua&&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=z(c.from,r)||ie(s.marker)-ie(i),d=z(c.to,n)||oe(s.marker)-oe(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?z(c.to,r)>=0:z(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?z(c.from,n)<=0:z(c.from,n)<0)))return!0}}}function de(e){for(var t;t=se(e);)e=t.find(-1,!0).line;return e}function fe(e){for(var t;t=ce(e);)e=t.find(1,!0).line;return e}function he(e){for(var t,r;t=ce(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=de(r);return r==n?t:_(n)}function me(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ge(e,n))return t;for(;r=ce(n);)n=r.find(1,!0).line;return _(n)+1}function ge(e,t){var r=Ua&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ve(e,t,n))return!0}}function ve(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ve(e,n.line,$(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],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ve(e,t,i))return!0}function ye(e){e=de(e);for(var t=0,r=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 be(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=se(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ce(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function we(e){var t=e.display,r=e.doc;t.maxLine=M(r,r.first),t.maxLineLength=be(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=be(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr");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"),i=!0)}i||n(t,r,"ltr")}function ke(e,t,r){var n;Ka=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:Ka=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Ka=i)}return null!=n?n:Ka}function Ce(e,t){var r=e.order;return null==r&&(r=e.order=Va(e.text,t)),r}function Se(e,t,r){var n=S(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Te(e,t,r){var n=Se(e,t.ch,r);return null==n?null:new D(t.line,n,r<0?"after":"before")}function Le(e,t,r,n,i){if(e){var o=Ce(r,t.doc.direction);if(o){var a,l=i<0?m(o):o[0],s=i<0==(1==l.level),c=s?"after":"before";if(l.level>0){var u=Zt(t,r);a=i<0?r.text.length-1:0;var d=Jt(t,u,a).top;a=T(function(e){return Jt(t,u,e).top==d},i<0==(1==l.level)?l.from:l.to-1,a),"before"==c&&(a=Se(r,a,1))}else a=i<0?l.to:l.from;return new D(n,a,c)}}return new D(n,i<0?r.text.length:0,i<0?"before":"after")}function Me(e,t,r,n){var i=Ce(t,e.doc.direction);if(!i)return Te(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=ke(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 Te(t,r,n);var l,s=function(e,r){return Se(t,e instanceof D?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||Zt(e,t),gr(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 D(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new D(r.line,s(e,1),"before"):new D(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}function Ae(e,t){return e._handlers&&e._handlers[t]||Ga}function Oe(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 Ne(e,t){var r=Ae(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 _e(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ne(e,r||t.type,e,t),Pe(t)||t.codemirrorIgnore}function Ee(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 We(e,t){return Ae(e,t).length>0}function Fe(e){e.prototype.on=function(e,t){$a(this,e,t)},e.prototype.off=function(e,t){Oe(this,e,t)}}function De(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ze(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Pe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function He(e){De(e),ze(e)}function Ie(e){return e.target||e.srcElement}function Re(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ca&&e.ctrlKey&&1==t&&(t=3),t}function je(e){if(null==Wa){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Wa=t.offsetWidth<=1&&t.offsetHeight>2&&!(da&&fa<8))}var i=Wa?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Be(e){if(null!=Fa)return Fa;var n=r(e,document.createTextNode("AخA")),i=Ma(n,0,1).getBoundingClientRect(),o=Ma(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Fa=o.right-i.right<3)}function qe(e){if(null!=Qa)return Qa;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=Ma(t,0,1).getBoundingClientRect();return Qa=Math.abs(i.left-o.left)>1}function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),el[e]=t}function Ke(e,t){tl[e]=t}function Ve(e){if("string"==typeof e&&tl.hasOwnProperty(e))e=tl[e];else if(e&&"string"==typeof e.name&&tl.hasOwnProperty(e.name)){var t=tl[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ve(t);var r=el[t.name];if(!r)return Ge(e,"text/plain");var n=r(e,t);if(rl.hasOwnProperty(t.name)){var i=rl[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 $e(e,t){u(t,rl.hasOwnProperty(e)?rl[e]:rl[e]={})}function Ye(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 Xe(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 Ze(e,t,r){return!e.startState||e.startState(t,r)}function Je(e,t,r,n){var i=[e.state.modeGen],o={};at(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=r.state,l=0;l<e.state.overlays.length;++l)!function(n){var a=e.state.overlays[n],l=1,s=0;r.state=!0,at(e,t.text,a.mode,r,function(e,t){for(var r=l;s<e;){var n=i[l];n>e&&i.splice(l,1,e,i[l+1],n),l+=2,s=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;r<l;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o)}(l);return r.state=a,{styles:i,classes:o.bgClass||o.textClass?o:null}}function Qe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=et(e,_(t)),i=t.text.length>e.options.maxHighlightLength&&Ye(e.doc.mode,n.state),o=Je(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 et(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ol(n,!0,t);var o=lt(e,t,r),a=o>n.first&&M(n,o-1).stateAfter,l=a?ol.fromSaved(n,a,o):new ol(n,Ze(n.mode),o);return n.iter(o,t,function(r){tt(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 tt(e,t,r,n){var i=e.doc.mode,o=new nl(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&rt(i,r.state);!o.eol();)nt(i,o,r.state),o.start=o.pos}function rt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Xe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function nt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Xe(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 it(e,t,r,n){var i,o=e.doc,a=o.mode;t=B(o,t);var l,s=M(o,t.line),c=et(e,t.line,r),u=new nl(s.text,e.options.tabSize,c);for(n&&(l=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=nt(a,u,c.state),n&&l.push(new al(u,i,Ye(o.mode,c.state)));return n?l:new al(u,i,c.state)}function ot(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 at(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 nl(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&ot(rt(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&tt(e,t,n,d.pos),d.pos=t.length,s=null):s=ot(nt(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;)c=Math.min(d.start,c+5e3),i(c,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 lt(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=M(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof il?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}function st(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=M(e,n).stateAfter;if(i&&(!(i instanceof il)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}function ct(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),re(e),ne(e,r);var i=n?n(e):1;i!=e.height&&N(e,i)}function ut(e){e.parent=null,re(e)}function dt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ul:cl;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function ft(e,t){var r=i("span",null,null,ha?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(da||ha)&&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=pt,Be(e.display.measure)&&(l=Ce(a,e.doc.direction))&&(n.addToken=gt(n.addToken,l)),n.map=[];yt(a,n,Qe(e,a,t!=e.display.externalMeasured&&_(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(je(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(ha){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 Ne(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=s(n.pre.className,n.textClass||"")),n}function ht(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function pt(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?mt(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));da&&fa<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")),v.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")),v.setAttribute("cm-text",h[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(h[0]),v.setAttribute("cm-text",h[0]),da&&fa<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),da&&fa<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 mt(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}function gt(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],!(d.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}}}function vt(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 yt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=d=l="",f=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?y.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!f||ae(f.marker,k)<0)&&(f=x)):x.from>p&&v>x.from&&(v=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!f||f.from==p)for(var S=0;S<y.length;++S)vt(t,0,y[S]);if(f&&(f.from||0)==p){if(vt(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var T=Math.min(h,v);;){if(g){var L=p+g.length;if(!f){var M=L>T?g.slice(0,T-p):g;t.addToken(t,M,a?a+s:s,u,p+M.length==v?c:"",d,l)}if(L>=T){g=g.slice(T-p),p=T;break}p=L,u=""}g=i.slice(o,o=r[m++]),a=dt(r[m++],t.cm.options)}}else for(var A=1;A<r.length;A+=2)t.addToken(t,i.slice(o,o=r[A]),dt(r[A+1],t.cm.options))}function bt(e,t,r){this.line=t,this.rest=he(t),this.size=this.rest?_(m(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ge(e,t)}function wt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new bt(e.doc,M(e.doc,o),o);n=o+a.size,i.push(a)}return i}function xt(e){dl?dl.ops.push(e):e.ownsGroup=dl={ops:[e],delayedCallbacks:[]}}function kt(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)}function Ct(e,t){var r=e.ownsGroup;if(r)try{kt(r)}finally{dl=null,t(r)}}function St(e,t){var r=Ae(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);dl?n=dl.delayedCallbacks:fl?n=fl:(n=fl=[],setTimeout(Tt,0));for(var o=0;o<r.length;++o)!function(e){n.push(function(){return r[e].apply(null,i)})}(o)}}function Tt(){var e=fl;fl=null;for(var t=0;t<e.length;++t)e[t]()}function Lt(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Nt(e,t):"gutter"==o?Et(e,t,r,n):"class"==o?_t(e,t):"widget"==o&&Wt(e,t,n)}t.changes=null}function Mt(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),da&&fa<8&&(e.node.style.zIndex=2)),e.node}function At(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=Mt(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function Ot(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):ft(e,t)}function Nt(e,t){var r=t.text.className,n=Ot(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,_t(e,t)):r&&(t.text.className=r)}function _t(e,t){At(e,t),t.line.wrapClass?Mt(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 Et(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=Mt(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=Mt(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",F(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 Wt(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);Dt(e,t,r)}function Ft(e,t,r,n){var i=Ot(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),_t(e,t),Et(e,t,r,n),Dt(e,t,n),t.node}function Dt(e,t,r){if(zt(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)zt(e,t.rest[n],t,r,!1)}function zt(e,t,r,i,o){if(t.widgets)for(var a=Mt(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"),Pt(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),St(c,"redraw")}}function Pt(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"))}function Ht(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 It(e,t){for(var r=Ie(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 Rt(e){return e.lineSpace.offsetTop}function jt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Bt(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 qt(e){return Da-e.display.nativeBarWidth}function Ut(e){return e.display.scroller.clientWidth-qt(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-qt(e)-e.display.barHeight}function Vt(e,t,r){var n=e.options.lineWrapping,i=n&&Ut(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)}}function Gt(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(_(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function $t(e,t){t=de(t);var n=_(t),i=e.display.externalMeasured=new bt(e.doc,t,n);i.lineN=n;var o=i.built=ft(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function Yt(e,t,r,n){return Jt(e,Zt(e,t),r,n)}function Xt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Tr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Zt(e,t){var r=_(t),n=Xt(e,r);n&&!n.text?n=null:n&&n.changes&&(Lt(e,n,r,wr(e)),e.curOp.forceUpdate=!0),n||(n=$t(e,t));var i=Gt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Jt(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Vt(e,t.view,t.rect),t.hasHeights=!0),o=tr(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Qt(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?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-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 er(e,t){var r=hl;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 tr(e,t,r,n){var i,o=Qt(t.map,r,n),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&C(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&C(t.line.text.charAt(o.coverStart+s));)++s;if(i=da&&fa<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():er(Ma(a,l,s).getClientRects(),n),i.left||i.right||0==l)break;s=l,l-=1,c="right"}da&&fa<11&&(i=rr(e.display.measure,i))}else{l>0&&(c=n="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(da&&fa<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+br(e.display),top:f.top,bottom:f.bottom}:hl}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],w={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p),w}function rr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!qe(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function nr(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 ir(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)nr(e.display.view[r])}function or(e){ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ar(){return ma&&xa?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function lr(){return ma&&xa?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function sr(e,t,r,n,i){if(!i&&t.widgets)for(var o=0;o<t.widgets.length;++o)if(t.widgets[o].above){var a=Ht(t.widgets[o]);r.top+=a,r.bottom+=a}if("line"==n)return r;n||(n="local");var l=ye(t);if("local"==n?l+=Rt(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:lr());var c=s.left+("window"==n?0:ar());r.left+=c,r.right+=c}return r.top+=l,r.bottom+=l,r}function cr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=ar(),i-=lr();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 ur(e,t,r,n,i){return n||(n=M(e.doc,t.line)),sr(e,n,Yt(e,n,t.ch,i),r)}function dr(e,t,r,n,i,o){function a(t,a){var l=Jt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,sr(e,n,l,r)}function l(e,t,r){var n=s[t],i=n.level%2!=0;return a(r?e-1:e,i!=r)}n=n||M(e.doc,t.line),i||(i=Zt(e,n));var s=Ce(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=ke(s,c,u),f=Ka,h=l(c,d,"before"==u);return null!=f&&(h.other=l(c,f,"before"!=u)),h}function fr(e,t){var r=0;t=B(e.doc,t),e.options.lineWrapping||(r=br(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Rt(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function hr(e,t,r,n,i){var o=D(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function pr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return hr(n.first,0,null,!0,-1);var i=E(n,r),o=n.first+n.size-1;if(i>o)return hr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=M(n,i);;){var l=vr(e,a,i,t,r),s=ce(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=_(a=c.to.line)}}function mr(e,t,r,n){var i=function(n){return sr(e,t,Jt(e,r,n),"line")},o=t.text.length,a=T(function(e){return i(e-1).bottom<=n},o,0);return o=T(function(e){return i(e).top>n},a,o),{begin:a,end:o}}function gr(e,t,r,n){return mr(e,t,r,sr(e,t,Jt(e,r,n),"line").top)}function vr(e,t,r,n,i){i-=ye(t);var o,a=0,l=t.text.length,s=Zt(e,t);if(Ce(t,e.doc.direction)){if(e.options.lineWrapping){var c;c=mr(e,t,s,i),a=c.begin,l=c.end}o=new D(r,Math.floor(a+(l-a)/2));var u,d,f=dr(e,o,"line",t,s).left,h=f<n?1:-1,p=f-n,m=Math.ceil((l-a)/4);e:do{u=p,d=o;for(var g=0;g<m;++g){var v=o;if(null==(o=Me(e,t,o,h))||o.ch<a||l<=("before"==o.sticky?o.ch-1:o.ch)){o=v;break e}}if(p=dr(e,o,"line",t,s).left-n,m>1){var y=Math.abs(p-u)/m;m=Math.min(m,Math.ceil(Math.abs(p)/y)),h=p<0?1:-1}}while(0!=p&&(m>1||h<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=d}}else{var b=T(function(r){var o=sr(e,t,Jt(e,s,r),"line");return o.top>i?(l=Math.min(r,l),!0):!(o.bottom<=i)&&(o.left>n||!(o.right<n)&&n-o.left<o.right-n)},a,l);b=S(t.text,b,1),o=new D(r,b,b==l?"before":"after")}var w=dr(e,o,"line",t,s);return(i<w.top||w.bottom<i)&&(o.outside=!0),o.xRel=n<w.left?-1:n>w.right?1:0,o}function yr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==sl){sl=n("pre");for(var i=0;i<49;++i)sl.appendChild(document.createTextNode("x")),sl.appendChild(n("br"));sl.appendChild(document.createTextNode("x"))}r(e.measure,sl);var o=sl.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function br(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 wr(e){
|
3 |
+
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:xr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function kr(e){var t=yr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/br(e.display)-3);return function(i){if(ge(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 Cr(e){var t=e.doc,r=kr(e);t.iter(function(e){var t=r(e);t!=e.height&&N(e,t)})}function Sr(e,t,r,n){var i=e.display;if(!r&&"true"==Ie(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=pr(e,o,a);if(n&&1==c.xRel&&(s=M(e.doc,c.line).text).length==c.ch){var u=d(s,s.length,e.options.tabSize)-s.length;c=D(c.line,Math.max(0,Math.round((o-Bt(e.display).left)/br(e.display))-u))}return c}function Tr(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 Lr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Mr(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!1!==t||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ar(e,l.head,i),s||Or(e,l,o)}}return n}function Ar(e,t,r){var i=dr(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 Or(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 ur(e,D(t,r),"div",c,n)}var a,s,c=M(l,t),f=c.text.length;return xe(Ce(c,l.direction),r||0,null==n?f:n,function(e,t,l){var c,h,p,m=o(e,"left");if(e==t)c=m,h=p=m.left;else{if(c=o(t-1,"right"),"rtl"==l){var g=m;m=c,c=g}h=m.left,p=c.right}null==r&&0==e&&(h=u),c.top-m.top>3&&(i(h,m.top,null,m.bottom),h=u,m.bottom<c.top&&i(h,m.bottom,null,c.top)),null==n&&t==f&&(p=d),(!a||m.top<a.top||m.top==a.top&&m.left<a.left)&&(a=m),(!s||c.bottom>s.bottom||c.bottom==s.bottom&&c.right>s.right)&&(s=c),h<u+1&&(h=u),i(h,c.top,p-h,c.bottom)}),{start:a,end:s}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=Bt(e.display),u=c.left,d=Math.max(a.sizerWidth,Ut(e)-a.sizer.offsetLeft)-c.right,f=t.from(),h=t.to();if(f.line==h.line)o(f.line,f.ch,h.ch);else{var p=M(l,f.line),m=M(l,h.line),g=de(p)==de(m),v=o(f.line,f.ch,g?p.text.length+1:null).end,y=o(h.line,g?0:null,h.ch).start;g&&(v.top<y.top-2?(i(v.right,v.top,null,v.bottom),i(u,y.top,y.left,y.bottom)):i(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&i(u,v.bottom,null,y.top)}r.appendChild(s)}function Nr(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 _r(e){e.state.focused||(e.display.input.focus(),Wr(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Fr(e))},100)}function Wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ne(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(),ha&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Nr(e))}function Fr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ne(e,"blur",e,t),e.state.focused=!1,Na(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Dr(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(da&&fa<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=yr(t)),(s>.005||s<-.005)&&(N(i.line,o),zr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)zr(i.rest[c])}}}function zr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function Pr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Rt(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=E(t,n),a=E(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=E(t,ye(M(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=E(t,ye(M(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Hr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=xr(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=F(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",_n(e),!0}return!1}function Rr(e,t){if(!_e(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&&!ba){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Rt(e.display))+"px;\n height: "+(t.bottom-t.top+qt(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)}}}function jr(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?D(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?D(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=dr(e,t),s=r&&r!=t?dr(e,r):l;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};var c=qr(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Xr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Jr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function Br(e,t){var r=qr(e,t);null!=r.scrollTop&&Xr(e,r.scrollTop),null!=r.scrollLeft&&Jr(e,r.scrollLeft)}function qr(e,t){var r=e.display,n=yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Kt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+jt(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=Ut(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 Ur(e,t){null!=t&&($r(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Kr(e){$r(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Vr(e,t,r){null==t&&null==r||$r(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Gr(e,t){$r(e),e.curOp.scrollToPos=t}function $r(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Yr(e,fr(e,t.from),fr(e,t.to),t.margin)}}function Yr(e,t,r,n){var i=qr(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});Vr(e,i.scrollLeft,i.scrollTop)}function Xr(e,t){Math.abs(e.doc.scrollTop-t)<2||(la||On(e,{top:t}),Zr(e,t,!0),la&&On(e),kn(e,100))}function Zr(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 Jr(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,Hr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Qr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+jt(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+qt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function en(e,t){t||(t=Qr(e));var r=e.display.barWidth,n=e.display.barHeight;tn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Dr(e),tn(e,Qr(e)),r=e.display.barWidth,n=e.display.barHeight}function tn(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 rn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Na(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new gl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),$a(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?Jr(e,t):Xr(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function nn(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:++vl},xt(e.curOp)}function on(e){Ct(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;an(e)})}function an(e){for(var t=e.ops,r=0;r<t.length;r++)ln(t[r]);for(var n=0;n<t.length;n++)sn(t[n]);for(var i=0;i<t.length;i++)cn(t[i]);for(var o=0;o<t.length;o++)un(t[o]);for(var a=0;a<t.length;a++)dn(t[a])}function ln(e){var t=e.cm,r=t.display;Sn(t),e.updateMaxLine&&we(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 yl(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function sn(e){e.updatedDisplay=e.mustUpdate&&Mn(e.cm,e.update)}function cn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Dr(t),e.barMeasure=Qr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Yt(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+qt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ut(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function un(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Jr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==a()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&en(t,e.barMeasure),e.updatedDisplay&&En(t,e.barMeasure),e.selectionChanged&&Nr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&_r(e.cm)}function dn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&An(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Zr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Jr(t,e.scrollLeft,!0,!0),e.scrollToPos){Rr(t,jr(t,B(n,e.scrollToPos.from),B(n,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Ne(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Ne(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ne(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function fn(e,t){if(e.curOp)return t();nn(e);try{return t()}finally{on(e)}}function hn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);nn(e);try{return t.apply(e,arguments)}finally{on(e)}}}function pn(e){return function(){if(this.curOp)return e.apply(this,arguments);nn(this);try{return e.apply(this,arguments)}finally{on(this)}}}function mn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);nn(t);try{return e.apply(this,arguments)}finally{on(t)}}}function gn(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)Ua&&pe(e.doc,t)<i.viewTo&&yn(e);else if(r<=i.viewFrom)Ua&&me(e.doc,r+n)>i.viewFrom?yn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)yn(e);else if(t<=i.viewFrom){var o=bn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):yn(e)}else if(r>=i.viewTo){var a=bn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):yn(e)}else{var l=bn(e,t,t,-1),s=bn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(wt(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):yn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function vn(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[Tr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,r)&&a.push(r)}}}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function bn(e,t,r,n){var i,o=Tr(e,t),a=e.display.view;if(!Ua||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(;pe(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 wn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=wt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=wt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Tr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(wt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Tr(e,r)))),n.viewTo=r}function xn(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 kn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(Cn,e))}function Cn(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=et(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?Ye(t.mode,n.state):null,s=Je(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&&tt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&fn(e,function(){for(var t=0;t<i.length;t++)vn(e,i[t],"text")})}}function Sn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=qt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=qt(e)+"px",t.scrollbarsClipped=!0)}function Tn(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}function Ln(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)}}function Mn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return yn(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==xn(e))return!1;Ir(e)&&(yn(e),r.dims=wr(e));var o=i.first+i.size,a=Math.max(r.visible.from-e.options.viewportMargin,i.first),l=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(i.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(o,n.viewTo)),Ua&&(a=pe(e.doc,a),l=me(e.doc,l));var s=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;wn(e,a,l),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=xn(e);if(!s&&0==c&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Tn(e);return c>4&&(n.lineDiv.style.display="none"),Nn(e,n.updateLineNumbers,r.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ln(u),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function An(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ut(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+jt(e.display)-Kt(e),r.top)}),t.visible=Pr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Mn(e,t);n=!1){Dr(e);var i=Qr(e);Lr(e),en(e,i),En(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 On(e,t){var r=new yl(e,t);if(Mn(e,r)){Dr(e),An(e,r);var n=Qr(e);Lr(e),en(e,n),En(e,n),r.finish()}}function Nn(e,r,n){function i(t){var r=t.nextSibling;return ha&&Ca&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild,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),Lt(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(F(e.options,u)))),s=h.node.nextSibling}else{var m=Ft(e,h,u,n);l.insertBefore(m,s)}u+=h.size}for(;s;)s=i(s)}function _n(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function En(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+qt(e)+"px"}function Wn(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",_n(e)}function Fn(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 Dn(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 zn(e){var t=Dn(e);return t.x*=wl,t.y*=wl,t}function Pn(e,t){var r=Dn(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&&Ca&&ha)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&&!la&&!ga&&null!=wl)return i&&s&&Xr(e,Math.max(0,a.scrollTop+i*wl)),Jr(e,Math.max(0,a.scrollLeft+n*wl)),(!i||i&&s)&&De(t),void(o.wheelStartX=null);if(i&&null!=wl){var f=i*wl,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),On(e,{top:h,bottom:p})}bl<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&&(wl=(wl*bl+r)/(bl+1),++bl)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Hn(e,t){var r=e[t];e.sort(function(e,t){return z(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(z(o.to(),i.from())>=0){var a=R(o.from(),i.from()),l=I(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new kl(s?l:a,s?a:l))}}return new xl(e,t)}function In(e,t){return new xl([new kl(e,t||e)],0)}function Rn(e){return e.text?D(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function jn(e,t){if(z(e,t.from)<0)return e;if(z(e,t.to)<=0)return Rn(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+=Rn(t).ch-t.to.ch),D(r,n)}function Bn(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new kl(jn(i.anchor,t),jn(i.head,t)))}return Hn(r,e.sel.primIndex)}function qn(e,t,r){return e.line==t.line?D(r.line,e.ch-t.ch+r.ch):D(r.line+(e.line-t.line),e.ch)}function Un(e,t,r){for(var n=[],i=D(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=qn(l.from,i,o),c=qn(Rn(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=z(u.head,u.anchor)<0;n[a]=new kl(d?c:s,d?s:c)}else n[a]=new kl(s,s)}return new xl(n,e.sel.primIndex)}function Kn(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Vn(e)}function Vn(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,kn(e,100),e.state.modeGen++,e.curOp&&gn(e)}function Gn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function $n(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){ct(e,r,i,n),St(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new ll(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=M(e,l.line),d=M(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(Gn(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 ll(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)}St(e,"change",e,t)}function Yn(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 Xn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Cr(e),Kn(e),Zn(e),e.options.lineWrapping||we(e),e.options.mode=t.modeOption,gn(e)}function Zn(e){("rtl"==e.doc.direction?l:Na)(e.display.lineDiv,"CodeMirror-rtl")}function Jn(e){fn(e,function(){Zn(e),gn(e)})}function Qn(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 ei(e,t){var r={from:H(t.from),to:Rn(t),text:A(e,t.from,t.to)};return li(e,r,t.from.line,t.to.line+1),Yn(e,function(e){return li(e,r,t.from.line,t.to.line+1)},!0),r}function ti(e){for(;e.length;){if(!m(e).ranges)break;e.pop()}}function ri(e,t){return t?(ti(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}function ni(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=ri(i,i.lastOp==n)))a=m(o.changes),0==z(t.from,t.to)&&0==z(t.from,a.to)?a.to=Rn(t):o.changes.push(ei(e,t));else{var s=m(i.done);for(s&&s.ranges||ai(e.sel,i.done),o={changes:[ei(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||Ne(e,"historyAdded")}function ii(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)}function oi(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||ii(e,o,m(i.done),t))?i.done[i.done.length-1]=t:ai(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ti(i.undone)}function ai(e,t){var r=m(t);r&&r.ranges&&r.equals(e)||t.push(e)}function li(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 si(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 ci(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(si(r[i]));return n}function ui(e,t){var r=ci(e,t),n=Q(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 di(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?xl.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 fi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=z(t,i)<0;o!=z(r,i)<0?(i=t,t=r):o!=z(t,r)<0&&(t=r)}return new kl(i,t)}return new kl(r||t,t)}function hi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),bi(e,new xl([fi(e.sel.primary(),t,r,i)],0),n)}function pi(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]=fi(e.sel.ranges[o],t[o],null,i);bi(e,Hn(n,e.sel.primIndex),r)}function mi(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,bi(e,Hn(i,e.sel.primIndex),n)}function gi(e,t,r,n){bi(e,In(t,r),n)}function vi(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new kl(B(e,t[n].anchor),B(e,t[n].head))},origin:r&&r.origin};return Ne(e,"beforeSelectionChange",e,n),e.cm&&Ne(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Hn(n.ranges,n.ranges.length-1):t}function yi(e,t,r){var n=e.history.done,i=m(n);i&&i.ranges?(n[n.length-1]=t,wi(e,t,r)):bi(e,t,r)}function bi(e,t,r){wi(e,t,r),oi(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function wi(e,t,r){(We(e,"beforeSelectionChange")||e.cm&&We(e.cm,"beforeSelectionChange"))&&(t=vi(e,t,r)),xi(e,Ci(e,t,r&&r.bias||(z(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||Kr(e.cm)}function xi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ee(e.cm)),St(e,"cursorActivity",e))}function ki(e){xi(e,Ci(e,e.sel,null,!1))}function Ci(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=Ti(e,a.anchor,l&&l.anchor,r,n),c=Ti(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 kl(s,c))}return i?Hn(i,t.primIndex):t}function Si(e,t,r,n,i){var o=M(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&&(Ne(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
|
4 |
+
;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=Li(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=z(c,r))&&(n<0?u<0:u>0))return Si(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=Li(e,d,n,d.line==t.line?o:null)),d?Si(e,d,t,n,i):null}}return t}function Ti(e,t,r,n,i){var o=n||1,a=Si(e,t,r,o,i)||!i&&Si(e,t,r,o,!0)||Si(e,t,r,-o,i)||!i&&Si(e,t,r,-o,!0);return a||(e.cantEdit=!0,D(e.first,0))}function Li(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?B(e,D(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line<e.first+e.size-1?D(t.line+1,0):null:new D(t.line,t.ch+r)}function Mi(e){e.setSelection(D(e.firstLine(),0),D(e.lastLine()),Pa)}function Ai(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=B(e,t)),r&&(n.to=B(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Ne(e,"beforeChange",e,n),e.cm&&Ne(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Oi(e,t,r){if(e.cm){if(!e.cm.curOp)return hn(e.cm,Oi)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"))||(t=Ai(e,t,!0))){var n=qa&&!r&&te(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Ni(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Ni(e,t)}}function Ni(e,t){if(1!=t.text.length||""!=t.text[0]||0!=z(t.from,t.to)){var r=Bn(e,t);ni(e,t,r,e.cm?e.cm.curOp.id:NaN),Wi(e,t,r,Q(e,t));var n=[];Yn(e,function(e,r){r||-1!=f(n,e.history)||(Hi(e.history,t),n.push(e.history)),Wi(e,t,null,Q(e,t))})}}function _i(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(),n.ranges;){if(ai(n,l),r&&!n.equals(e.sel))return void bi(e,n,{clearRedo:!1});o=n}var c=[];ai(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"),d=n.changes.length-1;d>=0;--d){var h=function(r){var i=n.changes[r];if(i.origin=t,u&&!Ai(e,i,!1))return a.length=0,{};c.push(ei(e,i));var o=r?Bn(e,i):m(a);Wi(e,i,o,ui(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Rn(i)});var l=[];Yn(e,function(e,t){t||-1!=f(l,e.history)||(Hi(e.history,i),l.push(e.history)),Wi(e,i,null,ui(e,i))})}(d);if(h)return h.v}}}}function Ei(e,t){if(0!=t&&(e.first+=t,e.sel=new xl(g(e.sel.ranges,function(e){return new kl(D(e.anchor.line+t,e.anchor.ch),D(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){gn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)vn(e.cm,n,"gutter")}}function Wi(e,t,r,n){if(e.cm&&!e.cm.curOp)return hn(e.cm,Wi)(e,t,r,n);if(t.to.line<e.first)return void Ei(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ei(e,i),t={from:D(e.first,0),to:D(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:D(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=A(e,t.from,t.to),r||(r=Bn(e,t)),e.cm?Fi(e.cm,t,n):$n(e,t,n),wi(e,r,Pa)}}function Fi(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=_(de(M(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&&Ee(e),$n(n,t,r,kr(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),st(n,o.line),kn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?gn(e):o.line!=a.line||1!=t.text.length||Gn(e.doc,t)?gn(e,o.line,a.line+1,c):vn(e,o.line,"text");var u=We(e,"changes"),d=We(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&St(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Di(e,t,r,n,i){if(n||(n=r),z(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Oi(e,{from:r,to:n,text:t,origin:i})}function zi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Pi(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(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)zi(o.ranges[l].anchor,t,r,n),zi(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=D(c.from.line+n,c.from.ch),c.to=D(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 Hi(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Pi(e.done,r,n,i),Pi(e.undone,r,n,i)}function Ii(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=M(e,j(e,t)):i=_(t),null==i?null:(n(o,i)&&e.cm&&vn(e.cm,i,r),o)}function Ri(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r}function ji(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null}function Bi(e,t,r){ye(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ur(e,r)}function qi(e,t,r,n){var i=new Cl(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Ii(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&&!ge(e,t)){var n=ye(t)<e.scrollTop;N(t,t.height+Ht(i)),n&&Ur(o,i.height),o.curOp.forceUpdate=!0}return!0}),St(o,"lineWidgetAdded",o,i,"number"==typeof t?t:_(t)),i}function Ui(e,t,r,n,o){if(n&&n.shared)return Ki(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return hn(e.cm,Ui)(e,t,r,n,o);var a=new Tl(e,o),l=z(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(ue(e,t.line,t,r,a)||t.line!=r.line&&ue(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");V()}a.addToHistory&&ni(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&&de(e)==d.display.maxLine&&(s=!0),a.collapsed&&c!=t.line&&N(e,0),X(e,new G(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){ge(e,t)&&N(t,0)}),a.clearOnEnter&&$a(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(K(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Sl,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)gn(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++)vn(d,f,"text");a.atomic&&ki(d.doc),St(d,"markerAdded",d,a)}return a}function Ki(e,t,r,n,i){n=u(n),n.shared=!1;var o=[Ui(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Yn(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ui(e,B(e,t),B(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=m(o)}),new Ll(o,a)}function Vi(e){return e.findMarks(D(e.first,0),e.clipPos(D(e.lastLine())),function(e){return e.parent})}function Gi(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(z(o,a)){var l=Ui(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function $i(e){for(var t=0;t<e.length;t++)!function(t){var r=e[t],n=[r.primary.doc];Yn(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))}}(t)}function Yi(e){var t=this;if(Ji(t),!_e(t,e)&&!It(t.display,e)){De(e),da&&(Ol=+new Date);var r=Sr(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=0;l<i;++l)!function(e,n){if(!t.options.allowDropFileTypes||-1!=f(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=hn(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){r=B(t.doc,r);var s={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Oi(t.doc,s),yi(t.doc,In(r,Rn(s)))}}),l.readAsText(e)}}(n[l],l);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 s=e.dataTransfer.getData("Text");if(s){var c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),wi(t.doc,In(r,r)),c)for(var u=0;u<c.length;++u)Di(t.doc,"",c[u].anchor,c[u].head,"drag");t.replaceSelection(s,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Xi(e,t){if(da&&(!e.state.draggingText||+new Date-Ol<100))return void He(t);if(!_e(e,t)&&!It(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!va)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ga&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ga&&r.parentNode.removeChild(r)}}function Zi(e,t){var i=Sr(e,t);if(i){var o=document.createDocumentFragment();Ar(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)}}function Ji(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Qi(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 eo(){Nl||(to(),Nl=!0)}function to(){var e;$a(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Qi(ro)},100))}),$a(window,"blur",function(){return Qi(Fr)})}function ro(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 no(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 io(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(" "),no),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 oo(e,t,r,n){t=co(t);var i=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 oo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=oo(e,t.fallthrough[o],r,n);if(a)return a}}}function ao(e){var t="string"==typeof e?e:_l[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function lo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(Aa?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(Aa?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function so(e,t){if(ga&&34==e.keyCode&&e.char)return!1;var r=_l[e.keyCode];return null!=r&&!e.altGraphKey&&lo(r,e,t)}function co(e){return"string"==typeof e?Dl[e]:e}function uo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&z(o.from,m(n).to)<=0;){var a=n.pop();if(z(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}fn(e,function(){for(var t=n.length-1;t>=0;t--)Di(e.doc,"",n[t].from,n[t].to,"+delete");Kr(e)})}function fo(e,t){var r=M(e.doc,t),n=de(r);return n!=r&&(t=_(n)),Le(!0,e,n,t,1)}function ho(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=_(n)),Le(!0,e,r,t,-1)}function po(e,t){var r=fo(e,t.line),n=M(e.doc,r.line),i=Ce(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 D(r.line,a?0:o,r.sticky)}return r}function mo(e,t,r){if("string"==typeof t&&!(t=zl[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)!=za}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function go(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=oo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&oo(t,e.options.extraKeys,r,e)||oo(t,e.options.keyMap,r,e)}function vo(e,t,r,n){var i=e.state.keySeq;if(i){if(ao(t))return"handled";Pl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=go(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&St(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(De(r),Nr(e)),i&&!o&&/\'$/.test(t)?(De(r),!0):!!o}function yo(e,t){var r=so(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?vo(e,"Shift-"+r,t,function(t){return mo(e,t,!0)})||vo(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return mo(e,t)}):vo(e,r,t,function(t){return mo(e,t)}))}function bo(e,t,r){return vo(e,"'"+r+"'",t,function(t){return mo(e,t,!0)})}function wo(e){var t=this;if(t.curOp.focus=a(),!_e(t,e)){da&&fa<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=yo(t,e);ga&&(Hl=n?r:null,!n&&88==r&&!Ja&&(Ca?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||xo(t)}}function xo(e){function t(e){18!=e.keyCode&&e.altKey||(Na(r,"CodeMirror-crosshair"),Oe(document,"keyup",t),Oe(document,"mouseover",t))}var r=e.display.lineDiv;l(r,"CodeMirror-crosshair"),$a(document,"keyup",t),$a(document,"mouseover",t)}function ko(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function Co(e){var t=this;if(!(It(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||Ca&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(ga&&r==Hl)return Hl=null,void De(e);if(!ga||e.which&&!(e.which<10)||!yo(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(bo(t,e,i)||t.display.input.onKeyPress(e))}}}function So(e,t){var r=+new Date;return jl&&jl.compare(r,e,t)?(Rl=jl=null,"triple"):Rl&&Rl.compare(r,e,t)?(jl=new Il(r,e,t),Rl=null,"double"):(Rl=new Il(r,e,t),jl=null,"single")}function To(e){var t=this,r=t.display;if(!(_e(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,It(r,e))return void(ha||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!Wo(t,e)){var n=Sr(t,e),i=Re(e),o=n?So(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&Lo(t,i,n,o,e)||(1==i?n?Ao(t,n,o,e):Ie(e)==r.scroller&&De(e):2==i?(n&&hi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(Oa?Fo(t,e):Er(t)))}}}function Lo(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,vo(e,lo(o,i),i,function(t){if("string"==typeof t&&(t=zl[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=za}finally{e.state.suppressEdits=!1}return n})}function Mo(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=Sa?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=Ca?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(Ca?r.altKey:r.ctrlKey)),i}function Ao(e,t,r,n){da?setTimeout(c(_r,e),0):e.curOp.focus=a();var i,o=Mo(e,r,n),l=e.doc.sel;e.options.dragDrop&&Ya&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(z((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(z(i.to(),t)>0||t.xRel<0)?Oo(e,n,t,o):_o(e,n,t,o)}function Oo(e,t,r,n){var i=e.display,o=!1,a=hn(e,function(t){ha&&(i.scroller.draggable=!1),e.state.draggingText=!1,Oe(document,"mouseup",a),Oe(document,"mousemove",l),Oe(i.scroller,"dragstart",s),Oe(i.scroller,"drop",a),o||(De(t),n.addNew||hi(e.doc,r,null,null,n.extend),ha||da&&9==fa?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};ha&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),$a(document,"mouseup",a),$a(document,"mousemove",l),$a(i.scroller,"dragstart",s),$a(i.scroller,"drop",a),Er(e),setTimeout(function(){return i.input.focus()},20)}function No(e,t,r){if("char"==r)return new kl(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new kl(D(t.line,0),B(e.doc,D(t.line+1,0)));var n=r(e,t);return new kl(n.from,n.to)}function _o(e,t,r,n){function i(t){if(0!=z(v,t))if(v=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,a=d(M(c,r.line).text,r.ch,o),l=d(M(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=M(c,g).text,w=h(b,s,o);s==m?i.push(new kl(D(g,w),D(g,w))):b.length>w&&i.push(new kl(D(g,w),D(g,h(b,m,o))))}i.length||i.push(new kl(r,r)),bi(c,Hn(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,k=u,C=No(e,t,n.unit),S=k.anchor;z(C.anchor,S)>0?(x=C.head,S=R(k.from(),C.anchor)):(x=C.anchor,S=I(k.to(),C.head));var T=p.ranges.slice(0);T[f]=new kl(B(c,S),x),bi(c,Hn(T,f),Ha)}}function o(t){var r=++b,l=Sr(e,t,!0,"rectangle"==n.unit);if(l)if(0!=z(l,v)){e.curOp.focus=a(),i(l);var u=Pr(s,c);(l.line>=u.to||l.line<u.from)&&setTimeout(hn(e,function(){b==r&&o(t)}),150)}else{var d=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;d&&setTimeout(hn(e,function(){b==r&&(s.scroller.scrollTop+=d,o(t))}),50)}}function l(t){e.state.selectingText=!1,b=1/0,De(t),s.input.focus(),Oe(document,"mousemove",w),Oe(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;De(t);var u,f,p=c.sel,m=p.ranges;if(n.addNew&&!n.extend?(f=c.sel.contains(r),u=f>-1?m[f]:new kl(r,r)):(u=c.sel.primary(),f=c.sel.primIndex),"rectangle"==n.unit)n.addNew||(u=new kl(r,r)),r=Sr(e,t,!0,!0),f=-1;else{var g=No(e,r,n.unit);u=n.extend?fi(u,g.anchor,g.head,n.extend):g}n.addNew?-1==f?(f=m.length,bi(c,Hn(m.concat([u]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==n.unit&&!n.extend?(bi(c,Hn(m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):mi(c,f,u,Ha):(f=0,bi(c,new xl([u],0),Ha),p=c.sel);var v=r,y=s.wrapper.getBoundingClientRect(),b=0,w=hn(e,function(e){Re(e)?o(e):l(e)}),x=hn(e,l);e.state.selectingText=x,$a(document,"mousemove",w),$a(document,"mouseup",x)}function Eo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&De(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!We(e,r))return Pe(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 Ne(e,r,e,E(e.doc,o),e.options.gutters[s],t),Pe(t)}}}function Wo(e,t){return Eo(e,t,"gutterClick",!0)}function Fo(e,t){It(e.display,t)||Do(e,t)||_e(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Do(e,t){return!!We(e,"gutterContextMenu")&&Eo(e,t,"gutterContextMenu",!1)}function zo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),or(e)}function Po(e){Wn(e),gn(e),Hr(e)}function Ho(e,t,r){if(!t!=!(r&&r!=Bl)){var n=e.display.dragFunctions,i=t?$a:Oe;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 Io(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Na(e.display.wrapper,"CodeMirror-wrap"),we(e)),Cr(e),gn(e),or(e),setTimeout(function(){return en(e)},100)}function Ro(e,t){var r=this;if(!(this instanceof Ro))return new Ro(e,t);this.options=t=t?u(t):{},u(ql,t,!1),Fn(t);var n=t.value;"string"==typeof n&&(n=new Al(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Ro.inputStyles[t.inputStyle](this),o=this.display=new L(e,n,i);o.wrapper.CodeMirror=this,Wn(this),zo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),rn(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 Ea,keySeq:null,specialChars:null},t.autofocus&&!ka&&o.input.focus(),da&&fa<11&&setTimeout(function(){return r.display.input.reset(!0)},20),jo(this),eo(),nn(this),this.curOp.forceUpdate=!0,Xn(this,n),t.autofocus&&!ka||this.hasFocus()?setTimeout(c(Wr,this),20):Fr(this);for(var a in Ul)Ul.hasOwnProperty(a)&&Ul[a](r,t[a],Bl);Ir(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Kl.length;++l)Kl[l](r);on(this),ha&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function jo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(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 i=e.display;$a(i.scroller,"mousedown",hn(e,To)),da&&fa<11?$a(i.scroller,"dblclick",hn(e,function(t){if(!_e(e,t)){var r=Sr(e,t);if(r&&!Wo(e,t)&&!It(e.display,t)){De(t);var n=e.findWordAt(r);hi(e.doc,n.anchor,n.head)}}})):$a(i.scroller,"dblclick",function(t){return _e(e,t)||De(t)}),Oa||$a(i.scroller,"contextmenu",function(t){return Fo(e,t)});var o,a={end:0};$a(i.scroller,"touchstart",function(t){if(!_e(e,t)&&!r(t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),$a(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),$a(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!It(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new kl(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new kl(D(l.line,0),B(e.doc,D(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),De(r)}t()}),$a(i.scroller,"touchcancel",t),$a(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Xr(e,i.scroller.scrollTop),Jr(e,i.scroller.scrollLeft,!0),Ne(e,"scroll",e))}),$a(i.scroller,"mousewheel",function(t){return Pn(e,t)}),$a(i.scroller,"DOMMouseScroll",function(t){return Pn(e,t)}),$a(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){_e(e,t)||He(t)},over:function(t){_e(e,t)||(Zi(e,t),He(t))},start:function(t){return Xi(e,t)},drop:hn(e,Yi),leave:function(t){_e(e,t)||Ji(e)}};var l=i.input.getField();$a(l,"keyup",function(t){return ko.call(e,t)}),$a(l,"keydown",hn(e,wo)),$a(l,"keypress",hn(e,Co)),$a(l,"focus",function(t){return Wr(e,t)}),$a(l,"blur",function(t){return Fr(e,t)})}function Bo(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=et(e,t).state:r="prev");var a=e.options.tabSize,l=M(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))==za||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?d(M(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 Di(o,f,D(t,0),D(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=D(t,u.length);mi(o,g,new kl(y,y));break}}}function qo(e){Vl=e}function Uo(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=Xa(t),s=null;if(a&&n.ranges.length>1)if(Vl&&Vl.text.join("\n")==t){if(n.ranges.length%Vl.text.length==0){s=[];for(var c=0;c<Vl.text.length;c++)s.push(o.splitLines(Vl.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=D(h.line,h.ch-r):e.state.overwrite&&!a?p=D(p.line,Math.min(M(o,p.line).text.length,p.ch+m(l).length)):Vl&&Vl.lineWise&&Vl.text.join("\n")==t&&(h=p=D(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")};Oi(e.doc,v),St(e,"inputRead",e,v)}t&&!a&&Vo(e,t),Kr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ko(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||fn(t,function(){return Uo(t,r,0,null,"paste")}),!0}function Vo(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=Bo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Bo(e,i.head.line,"smart"));a&&St(e,"electricInput",e,i.head.line)}}}function Go(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:D(i,0),head:D(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function $o(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Yo(){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 ha?e.style.width="1000px":e.setAttribute("wrap","off"),wa&&(e.style.border="1px solid black"),$o(e),t}function Xo(e,t,r,n,i){function o(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new D(n,t.ch,t.sticky),c=M(e,n))}function a(n){var a;if(null==(a=i?Me(e.cm,c,t,r):Te(c,t,r))){if(n||!o())return!1;t=Le(i,e.cm,c,t.line,r)}else t=a;return!0}var l=t,s=r,c=M(e,t.line);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,d="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(r<0)||a(!h);h=!1){var p=c.text.charAt(t.ch)||"\n",m=x(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){r<0&&(r=1,a(),t.sticky="after");break}if(m&&(u=m),r>0&&!a(!h))break}var g=Ti(e,t,l,s,!0);return P(l,g)&&(g.hitSide=!0),g}function Zo(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*yr(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=pr(e,a,i),c.outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Jo(e,t){var r=Xt(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Gt(r,n,t.line),o=Ce(n,e.doc.direction),a="left";if(o){a=ke(o,t.ch)%2?"right":"left"}var l=Qt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Qo(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ea(e,t){return t&&(e.bad=!0),e}function ta(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(){u&&(c+=d,u=!1)}function l(e){e&&(a(),c+=e)}function s(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void l(r||t.textContent.replace(/\u200b/g,""));var c,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(D(n,0),D(i+1,0),o(+f));return void(h.length&&(c=h[0].find(0))&&l(A(e.doc,c.from,c.to).join(d)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&a();for(var m=0;m<t.childNodes.length;m++)s(t.childNodes[m]);p&&(u=!0)}else 3==t.nodeType&&l(t.nodeValue)}for(var c="",u=!1,d=e.doc.lineSeparator();s(t),t!=r;)t=t.nextSibling;return c}function ra(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return ea(e.clipPos(D(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 o=e.display.view[i];if(o.node==n)return na(o,t,r)}}function na(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=_(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),D(s,c)}}}var i=e.text.firstChild,a=!1;if(!t||!o(i,t))return ea(D(_(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 ea(D(_(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));c.parentNode!=i;)c=c.parentNode;var u=e.measure,d=u.maps,f=n(s,c,r);if(f)return ea(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 ea(D(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 ea(D(f.line,f.ch+v),a);v+=g.textContent.length}}function ia(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&&($a(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&&(Oe(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ro(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}
|
5 |
+
var oa=navigator.userAgent,aa=navigator.platform,la=/gecko\/\d/i.test(oa),sa=/MSIE \d/.test(oa),ca=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(oa),ua=/Edge\/(\d+)/.exec(oa),da=sa||ca||ua,fa=da&&(sa?document.documentMode||6:+(ua||ca)[1]),ha=!ua&&/WebKit\//.test(oa),pa=ha&&/Qt\/\d+\.\d+/.test(oa),ma=!ua&&/Chrome\//.test(oa),ga=/Opera\//.test(oa),va=/Apple Computer/.test(navigator.vendor),ya=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(oa),ba=/PhantomJS/.test(oa),wa=!ua&&/AppleWebKit/.test(oa)&&/Mobile\/\w+/.test(oa),xa=/Android/.test(oa),ka=wa||xa||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(oa),Ca=wa||/Mac/.test(aa),Sa=/\bCrOS\b/.test(oa),Ta=/win/i.test(aa),La=ga&&oa.match(/Version\/(\d*\.\d*)/);La&&(La=Number(La[1])),La&&La>=15&&(ga=!1,ha=!0);var Ma,Aa=Ca&&(pa||ga&&(null==La||La<12.11)),Oa=la||da&&fa>=9,Na=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:"")}};Ma=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 _a=function(e){e.select()};wa?_a=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:da&&(_a=function(e){try{e.select()}catch(e){}});var Ea=function(){this.id=null};Ea.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Wa,Fa,Da=30,za={toString:function(){return"CodeMirror.Pass"}},Pa={scroll:!1},Ha={origin:"*mouse"},Ia={origin:"+move"},Ra=[""],ja=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ba=/[\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]/,qa=!1,Ua=!1,Ka=null,Va=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 S=d[C];if(","==S)d[C]="N";else if("%"==S){var T=void 0;for(T=C+1;T<u&&"%"==d[T];++T);for(var L=C&&"!"==d[C-1]||T<u&&"1"==d[T]?"1":"N",M=C;M<T;++M)d[M]=L;C=T-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="L"==(E<u?d[E]:c),D=W==F?W?"L":"R":c,z=_;z<E;++z)d[z]=D;_=E-1}for(var P,H=[],I=0;I<u;)if(l.test(d[I])){var R=I;for(++I;I<u&&l.test(d[I]);++I);H.push(new t(0,R,I))}else{var j=I,B=H.length;for(++I;I<u&&"L"!=d[I];++I);for(var q=j;q<I;)if(s.test(d[q])){j<q&&H.splice(B,0,new t(1,j,q));var U=q;for(++q;q<I&&s.test(d[q]);++q);H.splice(B,0,new t(2,U,q)),j=q}else++q;j<I&&H.splice(B,0,new t(1,j,I))}return 1==H[0].level&&(P=r.match(/^\s+/))&&(H[0].from=P[0].length,H.unshift(new t(0,0,P[0].length))),1==m(H).level&&(P=r.match(/\s+$/))&&(m(H).to-=P[0].length,H.push(new t(0,u-P[0].length,u))),"rtl"==n?H.reverse():H}}(),Ga=[],$a=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]||Ga).concat(r)}},Ya=function(){if(da&&fa<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),Xa=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/)},Za=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)},Ja=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Qa=null,el={},tl={},rl={},nl=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};nl.prototype.eol=function(){return this.pos>=this.string.length},nl.prototype.sol=function(){return this.pos==this.lineStart},nl.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nl.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nl.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},nl.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},nl.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},nl.prototype.skipToEnd=function(){this.pos=this.string.length},nl.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},nl.prototype.backUp=function(e){this.pos-=e},nl.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)},nl.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},nl.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},nl.prototype.current=function(){return this.string.slice(this.start,this.pos)},nl.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},nl.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)};var il=function(e,t){this.state=e,this.lookAhead=t},ol=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0};ol.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ol.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ol.fromSaved=function(e,t,r){return t instanceof il?new ol(e,Ye(e.mode,t.state),r,t.lookAhead):new ol(e,Ye(e.mode,t),r)},ol.prototype.save=function(e){var t=!1!==e?Ye(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new il(t,this.maxLookAhead):t};var al=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},ll=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};ll.prototype.lineNo=function(){return _(this)},Fe(ll);var sl,cl={},ul={},dl=null,fl=null,hl={left:0,right:0,top:0,bottom:0},pl=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),$a(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),$a(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,da&&fa<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pl.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}},pl.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pl.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pl.prototype.zeroWidthHack=function(){var e=Ca&&!ya?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ea,this.disableVert=new Ea},pl.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)},pl.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ml=function(){};ml.prototype.update=function(){return{bottom:0,right:0}},ml.prototype.setScrollLeft=function(){},ml.prototype.setScrollTop=function(){},ml.prototype.clear=function(){};var gl={native:pl,null:ml},vl=0,yl=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Pr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ut(e),this.force=r,this.dims=wr(e),this.events=[]};yl.prototype.signal=function(e,t){We(e,t)&&this.events.push(arguments)},yl.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Ne.apply(null,e.events[t])};var bl=0,wl=null;da?wl=-.53:la?wl=15:ma?wl=-.7:va&&(wl=-1/3);var xl=function(e,t){this.ranges=e,this.primIndex=t};xl.prototype.primary=function(){return this.ranges[this.primIndex]},xl.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(!P(n.anchor,i.anchor)||!P(n.head,i.head))return!1}return!0},xl.prototype.deepCopy=function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new kl(H(e.ranges[r].anchor),H(e.ranges[r].head));return new xl(t,this.primIndex)},xl.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},xl.prototype.contains=function(e,t){var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(z(t,i.from())>=0&&z(e,i.to())<=0)return n}return-1};var kl=function(e,t){this.anchor=e,this.head=t};kl.prototype.from=function(){return R(this.anchor,this.head)},kl.prototype.to=function(){return I(this.anchor,this.head)},kl.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Ri.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,ut(o),St(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},iterN:function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0}},ji.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e),l=i.height;if(i.removeInner(e,a),r.height-=l-i.height,o==a&&(r.children.splice(n--,1),i.parent=null),0==(t-=a))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ri))){var s=[];this.collapse(s),this.children=[new Ri(s)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},insertInner:function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var l=o.lines.length%25+25,s=l;s<o.lines.length;){var c=new Ri(o.lines.slice(s,s+=25));o.height-=c.height,n.children.splice(++i,0,c),c.parent=n}o.lines=o.lines.slice(0,l),n.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ji(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=f(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new ji(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<a){var l=Math.min(t,a-e);if(o.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=a}}};var Cl=function(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t};Cl.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=_(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var a=Ht(this);N(n,Math.max(0,n.height-a)),t&&(fn(t,function(){Bi(t,n,-a),vn(t,i,"widget")}),St(t,"lineWidgetCleared",t,this,i))}},Cl.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Ht(this)-t;i&&(N(n,n.height+i),r&&fn(r,function(){r.curOp.forceUpdate=!0,Bi(r,n,i),St(r,"lineWidgetChanged",r,e,_(n))}))},Fe(Cl);var Sl=0,Tl=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Sl};Tl.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&nn(t),We(this,"clear")){var n=this.find();n&&St(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var l=e.lines[a],s=$(l.markedSpans,e);t&&!e.collapsed?vn(t,_(l),"text"):t&&(null!=s.to&&(o=_(l)),null!=s.from&&(i=_(l))),l.markedSpans=Y(l.markedSpans,s),null==s.from&&e.collapsed&&!ge(e.doc,l)&&t&&N(l,yr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=de(e.lines[c]),d=be(u);d>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&gn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ki(t.doc)),t&&St(t,"markerCleared",t,this,i,o),r&&on(t),this.parent&&this.parent.clear()}},Tl.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var a=r.lines[o],l=$(a.markedSpans,r);if(null!=l.from&&(n=D(t?a:_(a),l.from),-1==e))return n;if(null!=l.to&&(i=D(t?a:_(a),l.to),1==e))return i}return n&&{from:n,to:i}},Tl.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&fn(n,function(){var i=t.line,o=_(t.line),a=Xt(n,o);if(a&&(nr(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!ge(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=Ht(r)-l;s&&N(i,i.height+s)}St(n,"markerChanged",n,e)})},Tl.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)},Tl.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)}},Fe(Tl);var Ll=function(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r};Ll.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();St(this,"clear")}},Ll.prototype.find=function(e,t){return this.primary.find(e,t)},Fe(Ll);var Ml=0,Al=function(e,t,r,n,i){if(!(this instanceof Al))return new Al(e,t,r,n,i);null==r&&(r=0),ji.call(this,[new Ri([new ll("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=D(r,0);this.sel=In(o),this.history=new Qn(null),this.id=++Ml,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),$n(this,{from:o,to:o,text:e}),bi(this,In(o),Pa)};Al.prototype=b(ji.prototype,{constructor:Al,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=O(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:mn(function(e){var t=D(this.first,0),r=this.first+this.size-1;Oi(this,{from:t,to:D(r,M(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Vr(this.cm,0,0),bi(this,In(t),Pa)}),replaceRange:function(e,t,r,n){t=B(this,t),r=r?B(this,r):t,Di(this,e,t,r,n)},getRange:function(e,t,r){var n=A(this,B(this,e),B(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(W(this,e))return M(this,e)},getLineNumber:function(e){return _(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=M(this,e)),de(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return B(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:mn(function(e,t,r){gi(this,B(this,"number"==typeof e?D(e,t||0):e),null,r)}),setSelection:mn(function(e,t,r){gi(this,B(this,e),B(this,t||e),r)}),extendSelection:mn(function(e,t,r){hi(this,B(this,e),t&&B(this,t),r)}),extendSelections:mn(function(e,t){pi(this,U(this,e),t)}),extendSelectionsBy:mn(function(e,t){pi(this,U(this,g(this.sel.ranges,e)),t)}),setSelections:mn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new kl(B(n,e[o].anchor),B(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),bi(this,Hn(i,t),r)}}),addSelection:mn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new kl(B(this,e),B(this,t||e))),bi(this,Hn(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=A(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=A(t,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},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:mn(function(e,t,r){for(var n=this,i=[],o=this.sel,a=0;a<o.ranges.length;a++){var l=o.ranges[a];i[a]={from:l.from(),to:l.to(),text:n.splitLines(e[a]),origin:r}}for(var s=t&&"end"!=t&&Un(this,i,t),c=i.length-1;c>=0;c--)Oi(n,i[c]);s?yi(this,s):this.cm&&Kr(this.cm)}),undo:mn(function(){_i(this,"undo")}),redo:mn(function(){_i(this,"redo")}),undoSelection:mn(function(){_i(this,"undo",!0)}),redoSelection:mn(function(){_i(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 Qn(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:di(this.history.done),undone:di(this.history.undone)}},setHistory:function(e){var t=this.history=new Qn(this.history.maxGeneration);t.done=di(e.done.slice(0),null,!0),t.undone=di(e.undone.slice(0),null,!0)},setGutterMarker:mn(function(e,t,r){return Ii(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&k(n)&&(e.gutterMarkers=null),!0})}),clearGutter:mn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Ii(t,r,"gutter",function(){return r.gutterMarkers[e]=null,k(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!W(this,e))return null;if(t=e,!(e=M(this,e)))return null}else if(null==(t=_(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:mn(function(t,r,n){return Ii(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:mn(function(t,r,n){return Ii(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:mn(function(e,t,r){return qi(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ui(this,B(this,e),B(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=B(this,e),Ui(this,e,e,r,"bookmark")},findMarksAt:function(e){e=B(this,e);var t=[],r=M(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=B(this,e),t=B(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}),B(this,D(r,t))},indexFromPos:function(e){e=B(this,e);var t=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 Al(O(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 Al(O(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}],Gi(n,Vi(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof Ro&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),$i(Vi(t));break}}if(e.history==this.history){var i=[e.id];Yn(e,function(e){return i.push(e.id)},!0),e.history=new Qn(null),e.history.done=di(this.history.done,i),e.history.undone=di(this.history.undone,i)}},iterLinkedDocs:function(e){Yn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Xa(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:mn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Jn(this.cm))})}),Al.prototype.eachLine=Al.prototype.iter;for(var Ol=0,Nl=!1,_l={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"},El=0;El<10;El++)_l[El+48]=_l[El+96]=String(El);for(var Wl=65;Wl<=90;Wl++)_l[Wl]=String.fromCharCode(Wl);for(var Fl=1;Fl<=12;Fl++)_l[Fl+111]=_l[Fl+63235]="F"+Fl;var Dl={};Dl.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"},Dl.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"},Dl.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"},Dl.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"]},Dl.default=Ca?Dl.macDefault:Dl.pcDefault;var zl={selectAll:Mi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Pa)},killLine:function(e){return uo(e,function(t){if(t.empty()){var r=M(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:D(t.head.line+1,0)}:{from:t.head,to:D(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return uo(e,function(t){return{from:D(t.from().line,0),to:B(e.doc,D(t.to().line+1,0))}})},delLineLeft:function(e){return uo(e,function(e){return{from:D(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return uo(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 uo(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()},
|
6 |
+
goDocStart:function(e){return e.extendSelection(D(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(D(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return fo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return po(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ho(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")},Ia)},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")},Ia)},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/)?po(e,t.head):n},Ia)},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 fn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=M(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new D(i.line,i.ch-1)),i.ch>0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=M(e.doc,i.line-1).text;a&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),D(i.line-1,a.length-1),i,"+transpose"))}r.push(new kl(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return fn(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);Kr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Pl=new Ea,Hl=null,Il=function(e,t,r){this.time=e,this.pos=t,this.button=r};Il.prototype.compare=function(e,t,r){return this.time+400>e&&0==z(t,this.pos)&&r==this.button};var Rl,jl,Bl={toString:function(){return"CodeMirror.Init"}},ql={},Ul={};Ro.defaults=ql,Ro.optionHandlers=Ul;var Kl=[];Ro.defineInitHook=function(e){return Kl.push(e)};var Vl=null,Gl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ea,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gl.prototype.init=function(e){function t(e){if(!_e(i,e)){if(i.somethingSelected())qo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Go(i);qo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Pa),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Vl.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var a=Yo(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=Vl.text.join("\n");var s=document.activeElement;_a(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;$o(o,i.options.spellcheck),$a(o,"paste",function(e){_e(i,e)||Ko(e,i)||fa<=11&&setTimeout(hn(i,function(){return r.updateFromDOM()}),20)}),$a(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),$a(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),$a(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),$a(o,"touchstart",function(){return n.forceCompositionEnd()}),$a(o,"input",function(){r.composing||r.readFromDOMSoon()}),$a(o,"copy",t),$a(o,"cut",t)},Gl.prototype.prepareSelection=function(){var e=Mr(this.cm,!1);return e.focus=this.cm.state.focused,e},Gl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Gl.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)return void e.removeAllRanges();var o=ra(t,e.anchorNode,e.anchorOffset),a=ra(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=z(R(o,a),n)||0!=z(I(o,a),i)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Jo(t,n)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Jo(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)return void e.removeAllRanges();var f,h=e.rangeCount&&e.getRangeAt(0);try{f=Ma(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!la&&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):la&&this.startGracePeriod()),this.rememberSelection()}},Gl.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)},Gl.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},Gl.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Gl.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},Gl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gl.prototype.blur=function(){this.div.blur()},Gl.prototype.getField=function(){return this.div},Gl.prototype.supportsTouch=function(){return!0},Gl.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():fn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Gl.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Gl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(xa&&ma&&this.cm.options.gutters.length&&Qo(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=ra(t,e.anchorNode,e.anchorOffset),n=ra(t,e.focusNode,e.focusOffset);r&&n&&fn(t,function(){bi(t.doc,In(r,n),Pa),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Gl.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=D(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=D(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=Tr(e,n.line))?(a=_(t.view[0].line),l=t.view[0].node):(a=_(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Tr(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=_(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(ta(e,l,c,a,s)),f=A(e.doc,D(a,0),D(s,M(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=D(a,h),C=D(s,f.length?m(f).length-p:0);return d.length>1||d[0]||z(k,C)?(Di(e.doc,d,k,C,"+input"),!0):void 0},Gl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gl.prototype.reset=function(){this.forceCompositionEnd()},Gl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Gl.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))},Gl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||fn(this.cm,function(){return gn(e.cm)})},Gl.prototype.setUneditable=function(e){e.contentEditable="false"},Gl.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||hn(this.cm,Uo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Gl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Gl.prototype.onContextMenu=function(){},Gl.prototype.resetPosition=function(){},Gl.prototype.needsContentAttribute=!0;var $l=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ea,this.hasSelection=!1,this.composing=null};$l.prototype.init=function(e){function t(e){if(!_e(i,e)){if(i.somethingSelected())qo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Go(i);qo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Pa):(n.prevInput="",a.value=t.text.join("\n"),_a(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Yo(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),wa&&(a.style.width="0px"),$a(a,"input",function(){da&&fa>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),$a(a,"paste",function(e){_e(i,e)||Ko(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),$a(a,"cut",t),$a(a,"copy",t),$a(e.scroller,"paste",function(t){It(e,t)||_e(i,t)||(i.state.pasteIncoming=!0,n.focus())}),$a(e.lineSpace,"selectstart",function(t){It(e,t)||De(t)}),$a(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"})}}),$a(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$l.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=dr(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},$l.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$l.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&_a(this.textarea),da&&fa>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",da&&fa>=9&&(this.hasSelection=null))}},$l.prototype.getField=function(){return this.textarea},$l.prototype.supportsTouch=function(){return!1},$l.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!ka||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},$l.prototype.blur=function(){this.textarea.blur()},$l.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$l.prototype.receivedFocus=function(){this.slowPoll()},$l.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$l.prototype.fastPoll=function(){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)},$l.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Za(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(da&&fa>=9&&this.hasSelection===i||Ca&&/[\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 fn(t,function(){Uo(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},$l.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$l.prototype.onKeyPress=function(){da&&fa>=9&&(this.hasSelection=null),this.fastPoll()},$l.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,da&&fa<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!da||da&&fa<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?hn(i,Mi)(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=Sr(i,e),s=o.scroller.scrollTop;if(l&&!ga){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&hn(i,bi)(i.doc,In(l),Pa);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: "+(da?"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(ha&&(f=window.scrollY),o.input.focus(),ha&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),da&&fa>=9&&t(),Oa){He(e);var h=function(){Oe(window,"mouseup",h),setTimeout(r,20)};$a(window,"mouseup",h)}else setTimeout(r,50)}},$l.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},$l.prototype.setUneditable=function(){},$l.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=Bl&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=Bl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Kn(e)},!0),t("indentUnit",2,Kn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Vn(e),or(e),gn(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(D(n,o))}n++});for(var i=r.length-1;i>=0;i--)Di(e.doc,t,r[i],D(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!=Bl&&e.refresh()}),t("specialCharPlaceholder",ht,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",ka?"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",!Ta),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){zo(e),Po(e)},!0),t("keyMap","default",function(e,t,r){var n=co(t),i=r!=Bl&&co(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Io,!0),t("gutters",[],function(e){Fn(e.options),Po(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return en(e)},!0),t("scrollbarStyle","native",function(e){rn(e),en(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Fn(e.options),Po(e)},!0),t("firstLineNumber",1,Po,!0),t("lineNumberFormatter",function(e){return e},Po,!0),t("showCursorWhenSelecting",!1,Lr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Fr(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,Ho),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Lr,!0),t("singleCursorHeightPerLine",!0,Lr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Vn,!0),t("addModeClass",!1,Vn,!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,Vn,!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)}(Ro),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)&&hn(this,t[e])(this,r,i),Ne(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"](co(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:pn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,gn(this)}),removeOverlay:pn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void gn(t)}}),indentLine:pn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),W(this.doc,e)&&Bo(this,e,t,r)}),indentSelection:pn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Bo(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Kr(t));else{var a=o.from(),l=o.to(),s=Math.max(n,a.line);n=Math.min(t.lastLine(),l.line-(l.ch?0:1))+1;for(var c=s;c<n;++c)Bo(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&r.length==u.length&&u[i].from().ch>0&&mi(t.doc,i,new kl(a,u[i].to()),Pa)}}}),getTokenAt:function(e,t){return it(this,e,t)},getLineTokens:function(e,t){return it(this,D(e),t,!0)},getTokenTypeAt:function(e){e=B(this.doc,e);var t,r=Qe(this,M(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=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],a=this.getModeAt(e);if("string"==typeof a[t])o[a[t]]&&i.push(o[a[t]]);else if(a[t])for(var l=0;l<a[t].length;l++){var s=o[a[t][l]];s&&i.push(s)}else a.helperType&&o[a.helperType]?i.push(o[a.helperType]):o[a.name]&&i.push(o[a.name]);for(var c=0;c<o._global.length;c++){var u=o._global[c];u.pred(a,n)&&-1==f(i,u.val)&&i.push(u.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=j(r,null==e?r.first+r.size-1:e),et(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?B(this.doc,e):e?n.from():n.to(),dr(this,r,t||"page")},charCoords:function(e,t){return ur(this,B(this.doc,e),t||"page")},coordsChar:function(e,t){return e=cr(this,e,t||"page"),pr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=cr(this,{top:e,left:0},t||"page").top,E(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=M(this.doc,e)}else n=e;return sr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return yr(this.display)},defaultCharWidth:function(){return br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=dr(this,B(this.doc,e));var a=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&&Br(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:pn(wo),triggerOnKeyPress:pn(Co),triggerOnKeyUp:ko,triggerOnMouseDown:pn(To),execCommand:function(e){if(zl.hasOwnProperty(e))return zl[e].call(null,this)},triggerElectric:pn(function(e){Vo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=B(this.doc,e),l=0;l<t&&(a=Xo(i.doc,a,o,r,n),!a.hitSide);++l);return a},moveH:pn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Xo(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Ia)}),deleteH:pn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):uo(this,function(r){var i=Xo(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=this,o=1,a=n;t<0&&(o=-1,t=-t);for(var l=B(this.doc,e),s=0;s<t;++s){var c=dr(i,l,"div");if(null==a?a=c.left:c.left=a,l=Zo(i,c,o,r),l.hitSide)break}return l},moveV:pn(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=dr(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Zo(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Ur(r,ur(r,s,"div").top-l.top),s},Ia),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=M(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;for(var a=r.charAt(n),l=x(a,o)?function(e){return x(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!x(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new kl(D(e.line,n),D(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):Na(this.display.cursorDiv,"CodeMirror-overwrite"),Ne(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:pn(function(e,t){Vr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-qt(this)-this.display.barHeight,width:e.scrollWidth-qt(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:Ut(this)}},scrollIntoView:pn(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:D(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?Gr(this,e):Yr(this,e.from,e.to,e.margin)}),setSize:pn(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&&ir(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){vn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Ne(this,"refresh",this)}),operation:function(e){return fn(this,e)},startOperation:function(){return nn(this)},endOperation:function(){return on(this)},refresh:pn(function(){var e=this.display.cachedTextHeight;gn(this),this.curOp.forceUpdate=!0,or(this),Vr(this,this.doc.scrollLeft,this.doc.scrollTop),_n(this),(null==e||Math.abs(e-yr(this.display))>.5)&&Cr(this),Ne(this,"refresh",this)}),swapDoc:pn(function(e){var t=this.doc;return t.cm=null,Xn(this,e),or(this),this.display.input.reset(),Vr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,St(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}},Fe(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})}}(Ro);var Yl="iter insert remove copy getEditor constructor".split(" ");for(var Xl in Al.prototype)Al.prototype.hasOwnProperty(Xl)&&f(Yl,Xl)<0&&(Ro.prototype[Xl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Al.prototype[Xl]));return Fe(Al),Ro.inputStyles={textarea:$l,contenteditable:Gl},Ro.defineMode=function(e){Ro.defaults.mode||"null"==e||(Ro.defaults.mode=e),Ue.apply(this,arguments)},Ro.defineMIME=Ke,Ro.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ro.defineMIME("text/plain","null"),Ro.defineExtension=function(e,t){Ro.prototype[e]=t},Ro.defineDocExtension=function(e,t){Al.prototype[e]=t},Ro.fromTextArea=ia,function(e){e.off=Oe,e.on=$a,e.wheelEventPixels=zn,e.Doc=Al,e.splitLines=Xa,e.countColumn=d,e.findColumn=h,e.isWordChar=w,e.Pass=za,e.signal=Ne,e.Line=ll,e.changeEnd=Rn,e.scrollbarModel=gl,e.Pos=D,e.cmpPos=z,e.modes=el,e.mimeModes=tl,e.resolveMode=Ve,e.getMode=Ge,e.modeExtensions=rl,e.extendMode=$e,e.copyState=Ye,e.startState=Ze,e.innerMode=Xe,e.commands=zl,e.keyMap=Dl,e.keyName=so,e.isModifierKey=ao,e.lookupKey=oo,e.normalizeKeyMap=io,e.StringStream=nl,e.SharedTextMarker=Ll,e.TextMarker=Tl,e.LineWidget=Cl,e.e_preventDefault=De,e.e_stopPropagation=ze,e.e_stop=He,e.addClass=l,e.contains=o,e.rmClass=Na,e.keyNames=_l}(Ro),Ro.version="5.29.0",Ro})},{}],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={},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 p=t,e}function i(e,t){var r=e.next();if(v[r]){var i=v[r](e,t);if(!1!==i)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(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=a,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}function o(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 a(e,t){return e.next(),
|
7 |
+
e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return _[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();m=M.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var h=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var p,m,g=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},T=r.counterDescriptors||{},L=r.colorKeywords||{},M=r.valueKeywords||{},A=r.allowNested,O=r.lineComment,N=!0===r.supportsAtComponent,_={};return _.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(N&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(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 s(r,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},_.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(m="property","maybeprop"):C.hasOwnProperty(n)?(m="string-2","maybeprop"):A?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?_.top(e,t,r):(m="error","block")},_.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},_.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(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)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else m+=" error";return"prop"},_.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(m="property","maybeprop"):r.context.type},_.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&f(t),"parens")},_.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(m="variable-3",r.context.type):u(e,t,r)},_.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(m="tag",r.context.type):_.atBlock(e,t,r)},_.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();m="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},_.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(m="error"),r.context.type)},_.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):_.atBlock(e,t,r)},_.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(m="variable","restricted_atBlock_before"):u(e,t,r)},_.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(m="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},_.keyframes=function(e,t,r){return"word"==e?(m="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},_.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},_.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:h?"block":"top",stateArg:null,context:new l(h?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(p=r[1],r=r[0]),m=r,"comment"!=p&&(t.state=_[t.state](p,e,t)),m},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-g)):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:O,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=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["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"],w=t(b),x=["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"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(b).concat(x);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:g,counterDescriptors:y,colorKeywords:w,valueKeywords:k,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:w,valueKeywords:k,fontProperties:g,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:w,valueKeywords:k,fontProperties:g,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:g,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":15}],17:[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,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}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(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])}function a(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i[0]||i[1].test(n(t,i[0])))return i[2]}}var l={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"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),f=/\btag\b/.test(d);if(f&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(n.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(u[h[1]],h[2]),m=e.getMode(r,p),g=i(h[1],!0),v=i(h[1],!1);o.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=m,o.localState=e.startState(m,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,f=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),f)for(var h=f.length-1;h>=0;h--)u.script.unshift(["type",f[h].matches,f[h].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},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(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.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||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":15,"../css/css":16,"../javascript/javascript":18,"../xml/xml":19}],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";e.defineMode("javascript",function(t,r){function n(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}}function i(e,t,r){return Le=e,Me=r,t}function o(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=a(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==r&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return i(r);if("="==r&&e.eat(">"))return i("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),i("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),i("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):Te(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(De),i("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),i("error","error");if(De.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||e.eatWhile(De),i("operator","operator",e.current());if(We.test(r)){e.eatWhile(We);var o=e.current();if("."!=t.lastType){if(Fe.propertyIsEnumerable(o)){var c=Fe[o];return i(c.type,c.style,o)}if("async"==o&&e.match(/^\s*[\(\w]/,!1))return i("async","keyword",o)}return i("variable","variable",o)}}function a(e){return function(t,r){var n,a=!1;if(Ne&&"@"==t.peek()&&t.match(ze))return r.tokenize=o,i("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=o),i("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=o;break}n="*"==r}return i("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=o;break}n=!n&&"\\"==r}return i("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ee){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=Pe.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(We.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function u(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 d(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(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function f(e,t,r,n,i){var o=e.cc;for(Ie.state=e,Ie.stream=i,Ie.marked=null,Ie.cc=o,Ie.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():_e?k:x)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Ie.marked?Ie.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Ie.cc.push(arguments[e])}function p(){return h.apply(null,arguments),!0}function m(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ie.state;if(Ie.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 g(){Ie.state.context={prev:Ie.state.context,vars:Ie.state.localVars},Ie.state.localVars=Re}function v(){Ie.state.localVars=Ie.state.context.vars,Ie.state.context=Ie.state.context.prev}function y(e,t){var r=function(){var r=Ie.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 u(n,Ie.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function b(){var e=Ie.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?p():";"==e?h():p(t)}return t}function x(e,t){return"var"==e?p(y("vardef",t.length),J,w(";"),b):"keyword a"==e?p(y("form"),S,x,b):"keyword b"==e?p(y("form"),x,b):"{"==e?p(y("}"),U,b):";"==e?p():"if"==e?("else"==Ie.state.lexical.info&&Ie.state.cc[Ie.state.cc.length-1]==b&&Ie.state.cc.pop()(),p(y("form"),S,x,b,ne)):"function"==e?p(ce):"for"==e?p(y("form"),ie,x,b):"variable"==e?Ee&&"type"==t?(Ie.marked="keyword",p(V,w("operator"),V,w(";"))):Ee&&"declare"==t?(Ie.marked="keyword",p(x)):p(y("stat"),P):"switch"==e?p(y("form"),S,w("{"),y("}","switch"),U,b,b):"case"==e?p(k,w(":")):"default"==e?p(w(":")):"catch"==e?p(y("form"),g,w("("),ue,w(")"),x,b,v):"class"==e?p(y("form"),fe,b):"export"==e?p(y("stat"),ge,b):"import"==e?p(y("stat"),ye,b):"module"==e?p(y("form"),Q,w("{"),y("}"),U,b,b):"async"==e?p(x):"@"==t?p(k,x):h(y("stat"),k,w(";"),b)}function k(e){return T(e,!1)}function C(e){return T(e,!0)}function S(e){return"("!=e?h():p(y(")"),k,w(")"),b)}function T(e,t){if(Ie.state.fatArrowAt==Ie.stream.start){var r=t?W:E;if("("==e)return p(g,y(")"),B(Q,")"),b,w("=>"),r,v);if("variable"==e)return h(g,Q,w("=>"),r,v)}var n=t?O:A;return He.hasOwnProperty(e)?p(n):"function"==e?p(ce,n):"class"==e?p(y("form"),de,b):"keyword c"==e||"async"==e?p(t?M:L):"("==e?p(y(")"),L,w(")"),b,n):"operator"==e||"spread"==e?p(t?C:k):"["==e?p(y("]"),Ce,b,n):"{"==e?q(I,"}",null,n):"quasi"==e?h(N,n):"new"==e?p(F(t)):p()}function L(e){return e.match(/[;\}\)\],]/)?h():h(k)}function M(e){return e.match(/[;\}\)\],]/)?h():h(C)}function A(e,t){return","==e?p(k):O(e,t,!1)}function O(e,t,r){var n=0==r?A:O,i=0==r?k:C
|
8 |
+
;return"=>"==e?p(g,r?W:E,v):"operator"==e?/\+\+|--/.test(t)||Ee&&"!"==t?p(n):"?"==t?p(k,w(":"),i):p(i):"quasi"==e?h(N,n):";"!=e?"("==e?q(C,")","call",n):"."==e?p(H,n):"["==e?p(y("]"),L,w("]"),b,n):Ee&&"as"==t?(Ie.marked="keyword",p(V,n)):void 0:void 0}function N(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?p(N):p(k,_)}function _(e){if("}"==e)return Ie.marked="string-2",Ie.state.tokenize=s,p(N)}function E(e){return c(Ie.stream,Ie.state),h("{"==e?x:k)}function W(e){return c(Ie.stream,Ie.state),h("{"==e?x:C)}function F(e){return function(t){return"."==t?p(e?z:D):"variable"==t&&Ee?p(Z,e?O:A):h(e?C:k)}}function D(e,t){if("target"==t)return Ie.marked="keyword",p(A)}function z(e,t){if("target"==t)return Ie.marked="keyword",p(O)}function P(e){return":"==e?p(b,x):h(A,w(";"),b)}function H(e){if("variable"==e)return Ie.marked="property",p()}function I(e,t){return"async"==e?(Ie.marked="property",p(I)):"variable"==e||"keyword"==Ie.style?(Ie.marked="property",p("get"==t||"set"==t?R:j)):"number"==e||"string"==e?(Ie.marked=Ne?"property":Ie.style+" property",p(j)):"jsonld-keyword"==e?p(j):"modifier"==e?p(I):"["==e?p(k,w("]"),j):"spread"==e?p(k,j):":"==e?h(j):void 0}function R(e){return"variable"!=e?h(j):(Ie.marked="property",p(ce))}function j(e){return":"==e?p(C):"("==e?h(ce):void 0}function B(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=Ie.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),p(function(r,n){return r==t||n==t?h():h(e)},n)}return i==t||o==t?p():p(w(t))}return function(r,i){return r==t||i==t?p():h(e,n)}}function q(e,t,r){for(var n=3;n<arguments.length;n++)Ie.cc.push(arguments[n]);return p(y(t,r),B(e,t),b)}function U(e){return"}"==e?p():h(x,U)}function K(e,t){if(Ee){if(":"==e)return p(V);if("?"==t)return p(K)}}function V(e,t){return"variable"==e?"keyof"==t?(Ie.marked="keyword",p(V)):(Ie.marked="type",p(X)):"string"==e||"number"==e||"atom"==e?p(X):"["==e?p(y("]"),B(V,"]",","),b,X):"{"==e?p(y("}"),B($,"}",",;"),b,X):"("==e?p(B(Y,")"),G):void 0}function G(e){if("=>"==e)return p(V)}function $(e,t){return"variable"==e||"keyword"==Ie.style?(Ie.marked="property",p($)):"?"==t?p($):":"==e?p(V):"["==e?p(k,K,w("]"),$):void 0}function Y(e){return"variable"==e?p(Y):":"==e?p(V):void 0}function X(e,t){return"<"==t?p(y(">"),B(V,">"),b,X):"|"==t||"."==e?p(V):"["==e?p(w("]"),X):"extends"==t?p(V):void 0}function Z(e,t){if("<"==t)return p(y(">"),B(V,">"),b,X)}function J(){return h(Q,K,te,re)}function Q(e,t){return"modifier"==e?p(Q):"variable"==e?(m(t),p()):"spread"==e?p(Q):"["==e?q(Q,"]"):"{"==e?q(ee,"}"):void 0}function ee(e,t){return"variable"!=e||Ie.stream.match(/^\s*:/,!1)?("variable"==e&&(Ie.marked="property"),"spread"==e?p(Q):"}"==e?h():p(w(":"),Q,te)):(m(t),p(te))}function te(e,t){if("="==t)return p(C)}function re(e){if(","==e)return p(J)}function ne(e,t){if("keyword b"==e&&"else"==t)return p(y("form","else"),x,b)}function ie(e){if("("==e)return p(y(")"),oe,w(")"),b)}function oe(e){return"var"==e?p(J,w(";"),le):";"==e?p(le):"variable"==e?p(ae):h(k,w(";"),le)}function ae(e,t){return"in"==t||"of"==t?(Ie.marked="keyword",p(k)):p(A,le)}function le(e,t){return";"==e?p(se):"in"==t||"of"==t?(Ie.marked="keyword",p(k)):h(k,w(";"),se)}function se(e){")"!=e&&p(k)}function ce(e,t){return"*"==t?(Ie.marked="keyword",p(ce)):"variable"==e?(m(t),p(ce)):"("==e?p(g,y(")"),B(ue,")"),b,K,x,v):Ee&&"<"==t?p(y(">"),B(V,">"),b,ce):void 0}function ue(e){return"spread"==e||"modifier"==e?p(ue):h(Q,K,te)}function de(e,t){return"variable"==e?fe(e,t):he(e,t)}function fe(e,t){if("variable"==e)return m(t),p(he)}function he(e,t){return"<"==t?p(y(">"),B(V,">"),b,he):"extends"==t||"implements"==t||Ee&&","==e?p(Ee?V:k,he):"{"==e?p(y("}"),pe,b):void 0}function pe(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&Ie.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ie.marked="keyword",p(pe)):"variable"==e?(Ie.marked="property",p(Ee?me:ce,pe)):"["==e?p(k,w("]"),Ee?me:ce,pe):"*"==t?(Ie.marked="keyword",p(pe)):";"==e?p(pe):"}"==e?p():"@"==t?p(k,pe):void 0}function me(e,t){return"?"==t?p(me):":"==e?p(V,te):"="==t?p(C):h(ce)}function ge(e,t){return"*"==t?(Ie.marked="keyword",p(ke,w(";"))):"default"==t?(Ie.marked="keyword",p(k,w(";"))):"{"==e?p(B(ve,"}"),ke,w(";")):h(x)}function ve(e,t){return"as"==t?(Ie.marked="keyword",p(w("variable"))):"variable"==e?h(C,ve):void 0}function ye(e){return"string"==e?p():h(be,we,ke)}function be(e,t){return"{"==e?q(be,"}"):("variable"==e&&m(t),"*"==t&&(Ie.marked="keyword"),p(xe))}function we(e){if(","==e)return p(be,we)}function xe(e,t){if("as"==t)return Ie.marked="keyword",p(be)}function ke(e,t){if("from"==t)return Ie.marked="keyword",p(k)}function Ce(e){return"]"==e?p():h(B(C,"]"))}function Se(e,t){return"operator"==e.lastType||","==e.lastType||De.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Te(e,t,r){return t.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Le,Me,Ae=t.indentUnit,Oe=r.statementIndent,Ne=r.jsonld,_e=r.json||Ne,Ee=r.typescript,We=r.wordCharacters||/[\w$\xa1-\uffff]/,Fe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:n,break:n,continue:n,new:e("new"),delete:n,throw:n,debugger:n,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Ee){var l={type:"variable",style:"type"},s={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:l,number:l,boolean:l,any:l};for(var c in s)a[c]=s[c]}return a}(),De=/[+\-*&%=<>!?|~^@]/,ze=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Pe="([{}])",He={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ie={state:null,column:null,marked:null,cc:null},Re={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new u((e||0)-Ae,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(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Le?r:(t.lastType="operator"!=Le||"++"!=Me&&"--"!=Me?Le:"incdec",f(t,r,Le,Me,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=o)return 0;var i,a=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==b)s=s.prev;else if(u!=ne)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==A||i==O)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Oe&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,f=a==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==a?s.indented:"form"==d?s.indented+Ae:"stat"==d?s.indented+(Se(t,n)?Oe||Ae:0):"switch"!=s.info||f||0==r.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:Ae):s.indented+(/^(?:case|default)\b/.test(n)?Ae:2*Ae)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:_e?null:"/*",blockCommentEnd:_e?null:"*/",lineComment:_e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:_e?"json":"javascript",jsonldMode:Ne,jsonMode:_e,expressionAllowed:Te,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=k&&t!=C||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":15}],19:[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(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=h,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function h(e,t,r){return"openTag"==e?(r.tagStart=t.column(),p):"closeTag"==e?m:h}function p(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):(M="error",p)}function m(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===C.matchClosing?(M="tag",g):(M="tag error",v)}return M="error",v}function g(e,t,r){return"endTag"!=e?(M="error",g):(d(r),h)}function v(e,t,r){return M="error",g(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?f(r,n):(f(r,n),r.context=new u(r,n,i==r.indented)),h}return M="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(M="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:h,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;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(M=null,t.state=t.state(L||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;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!==C.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.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(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.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+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),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":15}],20:[function(e,t,r){function n(e,t){function r(){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 l=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(l,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===l)this.record_tag(l),this.tag_type="SCRIPT";else if("style"===l)this.record_tag(l),this.tag_type="STYLE";else if(this.Utils.in_array(l,s)){var c=this.get_unformatted("</"+l+">",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 if("!"===l.charAt(0))if(-1!=l.indexOf("[if")){if(-1!=a.indexOf("!IE")){var c=this.get_unformatted("--\x3e",a);n.push(c)}this.tag_type="START"}else if(-1!=l.indexOf("[endif"))this.tag_type="END",this.unindent();else if(-1!=l.indexOf("[cdata[")){var c=this.get_unformatted("]]>",a);n.push(c),this.tag_type="SINGLE"}else{var c=this.get_unformatted("--\x3e",a);n.push(c),this.tag_type="SINGLE"}else"/"===l.charAt(0)?(this.retrieve_tag(l.substring(1)),this.tag_type="END"):(this.record_tag(l),this.tag_type="START"),this.Utils.in_array(l,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 e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if("string"!=typeof(e=this.get_tag()))return e;return[e,"TK_TAG_"+this.tag_type]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<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}var n,i,o,a,l,s;for(t=t||{},i=t.indent_size||4,o=t.indent_char||" ",l=t.brace_style||"collapse",a=0==t.max_char?1/0:t.max_char||70,s=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"],n=new r,n.printer(e,o,i,a,l);;){var c=n.get_token();if(n.token_text=c[0],n.token_type=c[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent(),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var u=n.token_text.match(/\w+/)[0],d=n.output[n.output.length-1].match(/<\s*(\w+)/);null!==d&&d[1]===u||n.print_newline(!0,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z]+)/i);f&&n.Utils.in_array(f[1],s)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_CONTENT":""!==n.token_text&&n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.output.push("\n");var h=n.token_text;if("TK_SCRIPT"==n.token_type)var p="function"==typeof js_beautify&&js_beautify;else if("TK_STYLE"==n.token_type)var p="function"==typeof css_beautify&&css_beautify;if("keep"==t.indent_scripts)var m=0;else if("separate"==t.indent_scripts)var m=-n.indent_level;else var m=1;var g=n.get_full_indent(m);if(p)h=p(h.replace(/^\s*/,g),t);else{var v=h.match(/^\s*/)[0],y=v.match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,b=n.get_full_indent(m-y);h=h.replace(/^\s*/,g).replace(/\r\n|\r|\n/g,"\n"+b).replace(/\s*$/,"")}h&&(n.print_token(h),n.print_newline(!0,n.output))}n.current_mode="TAG"}n.last_token=n.token_type,n.last_text=n.token_text}return n.output.join("")}t.exports={prettyPrint:n}},{}],21:[function(e,t,r){"use strict";t.exports=e("./stream/stream")},{"./stream/stream":22}],22:[function(e,t,r){!function(){"use strict";function e(){function e(){return arguments.length>0&&arguments[0]!==C&&n(e,arguments[0]),e._state.value}return r(e),arguments.length>0&&arguments[0]!==C&&n(e,arguments[0]),e}function r(t){t.constructor=e,t._state={id:k++,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"]=d,t["fantasy-land/ap"]=f,t["fantasy-land/of"]=e,t.valueOf=h,t.toJSON=p,t.toString=h,Object.defineProperties(t,{end:{get:function(){if(!t._state.endStream){var r=e();r.map(function(e){return!0===e&&(u(t),r._state.unregister=function(){u(r)}),e}),t._state.endStream=r}return t._state.endStream}}})}function n(e,t){i(e,t);for(var r in e._state.deps)o(e._state.deps[r],!1);null!=e._state.unregister&&e._state.unregister(),a(e)}function i(e,t){e._state.value=t,e._state.changed=!0,2!==e._state.state&&(e._state.state=1)}function o(e,t){var r=e._state,n=r.parents;if(n.length>0&&n.every(g)&&(t||n.some(v))){var o=e._state.derive();if(o===C)return!1;i(e,o)}}function a(e){e._state.changed=!1;for(var t in e._state.deps)e._state.deps[t]._state.changed=!1}function l(t,r){if(!r.every(m))throw new Error("Ensure that each item passed to stream.combine/stream.merge is a stream");return s(e(),r,function(){return t.apply(this,r.concat([r.filter(v)]))})}function s(e,t,r){var n=e._state;return n.derive=r,n.parents=t.filter(y),c(e,n.parents),o(e,!0),e}function c(e,t){for(var r=0;r<t.length;r++)t[r]._state.deps[e._state.id]=e,c(e,t[r]._state.parents)}function u(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 d(e){return l(function(t){return e(t())},[this])}function f(e){return l(function(e,t){return e()(t())},[e,this])}function h(){return this._state.value}function p(){return null!=this._state.value&&"function"==typeof this._state.value.toJSON?this._state.value.toJSON():this._state.value}function m(e){return e._state}function g(e){return 1===e._state.state}function v(e){return e._state.changed}function y(e){return 2!==e._state.state}function b(e){return l(function(){return e.map(function(e){return e()})},e)}function w(e,t,r){var n=l(function(r){return t=e(t,r._state.value)},[r]);return 0===n._state.state&&n(t),n}function x(e,t){var r=e.map(function(e){var t=e[0];return 0===t._state.state&&t(void 0),t});return l(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)}var k=0,C={};e["fantasy-land/of"]=e,e.merge=b,e.combine=l,e.scan=w,e.scanMerge=x,e.HALT=C,void 0!==t?t.exports=e:"function"!=typeof window.m||"stream"in window.m?window.m={stream:e}:window.m.stream=e}()},{}]},{},[11])}();
|
9 |
//# 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","rows","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","2","forms","render","text","visibleRows","hidden","submit","number","./field-forms-rows.js","3","htmlutil","setAttributes","vnode","dom","setAttribute","g","generate","field","htmlTemplate","vdom","document","createElement","generators","prettyPrint","innerHTML","select","attributes","hasSelection","oncreate","unshift","checkbox","radio","4","FieldHelper","tabs","editor","fields","events","setActiveField","fieldConfig","get","c","join","redraw","controller","createFieldHTMLAndAddToForm","insert","view","fieldCategories","getCategories","availableFields","getAll","fieldsChoice","chooseField","category","categoryFields","filter","className","inForm","inFormContent","form","overlay","help","trust","onkeydown","window","event","keyCode","addToForm","on","./field-forms.js","./field-generator.js","./overlay.js","5","FieldFactory","reset","registeredFields","forEach","deregister","register","data","sticky","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","interest_categories","registerListsFields","lists","registerCustomFields","formFields","subscribe","submitButton","listChoice","listChoiceDescription","unsubscribe","formAction","formActionDescription","6","prop","createChoices","choiceLabel","FieldChoice","Object","keys","existingField","getAllWhere","shift","categories","indexOf","Field","timeout","clearTimeout","setTimeout","trigger","searchKey","searchValue","mithril/stream","7","CodeMirror","FormEditor","element","domDirty","_dom","getValue","toLowerCase","fromTextArea","selectionPointer","matchTags","bothTags","mode","htmlMode","autoCloseTags","autoRefresh","dispatchEvent","Event","bubbles","addEventListener","signal","query","querySelectorAll","containsField","fieldName","elements","namedItem","replaceSelection","focus","callback","refresh","codemirror","codemirror/addon/edit/closetag.js","codemirror/addon/edit/matchtags","codemirror/addon/fold/xml-fold","codemirror/mode/css/css","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/javascript/javascript","codemirror/mode/xml/xml","8","FormWatcher","settings","helpers","updateFields","originalRequiredValue","nameGroup","replace","findRequiredFields","requiredFields","requiredFieldElements","Array","prototype","el","requiredFieldsInput","getElementById","debounce","9","show","notices","hide","container","querySelector","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","content","onCloseCallback","11","mc4wp_forms_i18n","mc4wp","deps","mithril","FieldsFactory","textareaElement","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","autoCloseGT","cm","getOption","Pass","ranges","listSelections","replacements","empty","pos","head","tok","getTokenAt","inner","innerMode","getMode","tagName","opt","configuration","dontCloseTags","htmlDontClose","indentTags","htmlIndent","end","ch","lowerTagName","test","string","closingTagExists","indent","newPos","Pos","line","info","replaceRange","anchor","sel","setSelections","indentLine","autoCloseCurrent","typingSlash","start","replacement","context","getLine","replaceSelections","autoCloseSlash","collection","elt","newTag","scanForClosingTag","Math","lastLine","nextClose","cx","onCx","prev","to","next","defineOption","val","old","Init","removeKeyMap","whenClosing","whenOpening","addKeyMap","commands","closeTag","../../lib/codemirror","../fold/xml-fold","13","clear","tagHit","tagOther","doMatchTags","failedTagMatch","operation","somethingSelected","cur","getCursor","range","getViewport","from","match","findMatchingTag","matchBothTags","hit","at","open","markText","other","maybeUpdateMatch","off","toMatchingTag","found","extendSelection","14","cmp","Iter","firstLine","tagAt","iter","getTokenTypeAt","nextLine","prevLine","toTagEnd","gt","lastSlash","lastIndexOf","selfClose","toTagStart","lt","xmlTagStart","lastIndex","exec","toNextTag","toPrevTag","findMatchingClose","stack","startLine","startCh","findMatchingOpen","endLine","endCh","nameStartChar","RegExp","registerHelper","openTag","startPos","endPos","here","findEnclosingTag","forward","15","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","target","overwrite","hasOwnProperty","countColumn","tabSize","startIndex","startValue","search","nextTab","array","findColumn","goal","col","skipped","spaceStr","spaceStrs","lst","arr","out","insertSorted","score","priority","nothing","createObj","base","props","inst","create","isWordCharBasic","nonASCIISingleCaseWordChar","isWordChar","helper","source","isEmpty","isExtendingChar","charCodeAt","extendingChars","skipExtendingChars","str","dir","findFirst","pred","abs","mid","floor","Display","place","doc","input","d","scrollbarFiller","gutterFiller","lineDiv","selectionDiv","cursorDiv","measure","lineMeasure","lineSpace","lines","mover","sizer","sizerWidth","heightForcer","scrollerGap","gutters","lineGutter","scroller","wrapper","ie","ie_version","zIndex","paddingRight","webkit","gecko","mobile","draggable","viewFrom","viewTo","first","reportedViewFrom","reportedViewTo","renderedView","externalMeasured","viewOffset","lastWrapHeight","lastWrapWidth","updateLineNumbers","nativeBarWidth","barHeight","barWidth","scrollbarsClipped","lineNumWidth","lineNumInnerWidth","lineNumChars","alignWidgets","cachedCharWidth","cachedTextHeight","cachedPaddingH","maxLine","maxLineLength","maxLineChanged","wheelDX","wheelDY","wheelStartX","wheelStartY","selForContextMenu","activeTouch","size","chunk","children","sz","chunkSize","getBetween","getLines","updateLineHeight","height","diff","lineNo","no","lineAtHeight","h","outer","i$1","lh","isLine","lineNumberFor","String","lineNumberFormatter","firstLineNumber","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","last","clipToLen","linelen","clipPosArray","seeReadOnlySpans","sawReadOnlySpans","seeCollapsedSpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","addMarkedSpan","markedSpans","concat","attachLine","markedSpansBefore","isInsert","nw","startsBefore","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansAfter","stretchSpansOverChange","change","full","oldFirst","oldLast","sameLine","offset","span$1","found$1","clearEmptySpans","newMarkers","gapMarkers","gap","i$2","i$3","clearWhenEmpty","removeReadOnlyRanges","markers","mark","readOnly","parts","mk","find","j","p","newParts","dfrom","dto","detachMarkedSpans","detachLine","attachMarkedSpans","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","conflictingCollapsedRange","lineNo$$1","visualLine","merged","visualLineEnd","visualLineContinued","visualLineNo","lineN","vis","visualLineEndNo","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","len","findMaxLine","display","iterateBidiSections","order","part","level","getBidiPartAt","bidiOther","getOrder","direction","bidiOrdering","moveCharLogically","moveLogically","endOfLine","visually","moveInStorageOrder","prep","prepareMeasureForLine","targetTop","measureCharPrepared","moveVisually","bidi","partPos","mv","getWrappedLineExtent","lineWrapping","wrappedLineExtentChar","begin","wrappedLineExtent","searchInVisualLine","getRes","res","nextCh","getHandlers","emitter","_handlers","noHandlers","detachEvent","map$$1","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","zwspSupported","offsetHeight","offsetWidth","hasBadBidiRects","badBidiRects","txt","r0","getBoundingClientRect","r1","right","hasBadZoomedRects","badZoomedRects","normal","fromRange","defineMode","dependencies","modes","defineMIME","mime","spec","mimeModes","resolveMode","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","startState","a1","a2","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","overlays","i_end","opaque","styles","classes","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","result","stateAfter","save","styleClasses","highlightFrontier","modeFrontier","precise","Context","findStartLine","saved","fromSaved","processLine","startAt","stream","StringStream","callBlankLine","eol","readToken","blankLine","token","takeToken","asArray","tokens","Token","extractLineClasses","output","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","minindent","minline","lim","after","SavedContext","lookAhead","indented","retreatFrontier","updateLine","estimateHeight","estHeight","cleanUpLine","interpretTokenStyle","cache","styleToClassCacheWithMode","styleToClassCache","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","rest","addToken","buildToken","buildTokenBadBidi","insertLineContent","maps","caches","lastChild","defaultSpecialCharPlaceholder","toString","startStyle","endStyle","css","displayText","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","trailingBefore","spaceBefore","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","Infinity","foundBookmarks","endStyles","j$1","j$2","upto","tokenText","LineView","buildViewArray","nextPos","pushOperation","op","operationGroup","ops","ownsGroup","delayedCallbacks","fireCallbacksForOps","group","callbacks","cursorActivityCalled","finishOperation","endCb","signalLater","orphanDelayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","updateLineBackground","background","getLineContent","ext","built","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutterWidth","alignable","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","widgetHeight","parentStyle","eventInWidget","getAttribute","paddingTop","offsetTop","paddingVert","paddingH","getComputedStyle","currentStyle","parseInt","isNaN","scrollGap","displayWidth","displayHeight","ensureLineHeights","rect","wrapping","curWidth","heights","rects","getClientRects","bottom","mapFromLineView","before","updateExternalMeasurement","measureChar","bias","findViewForLine","findViewIndex","getDimensions","forceUpdate","hasHeights","prepared","varHeight","measureCharInner","bogus","rtop","rbottom","nodeAndOffsetInLineMap","collapse","mStart","mEnd","coverStart","coverEnd","getUsefulRect","nullRect","maybeUpdateRectForZooming","rSpan","charWidth","rbot","bot","singleCursorHeightPerLine","screen","logicalXDPI","deviceXDPI","scaleX","scaleY","logicalYDPI","deviceYDPI","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","pageScrollX","chrome","android","pageXOffset","scrollLeft","pageScrollY","pageYOffset","scrollTop","intoCoordSystem","includeWidgets","yOff","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","invert","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","mergedPos","assign","prevDiff","prevPos","beginLeft","steps","ceil","prevPos$1","diff_change_per_step","box","textHeight","measureText","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","round","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","selection","primIndex","range$$1","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","add","fragment","rightSide","drawForLine","fromArg","toArg","lineLen","rightPos","leftPos","tmp","leftSide","padding","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","clearInterval","blinker","visibility","cursorBlinkRate","setInterval","ensureFocus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","receivedFocus","rmClass","updateHeightsInViewport","prevBottom","updateWidgetHeight","visibleLines","viewport","ensure","ensureFrom","ensureTo","alignHorizontally","comp","gutterW","align","maybeUpdateLineNumberWidth","innerW","updateGutterSpace","maybeScrollWindow","doScroll","phantom","scrollNode","scrollIntoView","scrollPosIntoView","margin","limit","changed","endCoords","scrollPos","calculateScrollPos","startTop","startLeft","updateScrollTop","setScrollLeft","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","scrollToPos","cursorScrollMargin","scrollToCoords","scrollToRange","scrollToCoordsRange","sPos","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","isScroller","scrollWidth","measureForScrollbars","docH","viewHeight","viewWidth","barLeft","docHeight","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","update","paddingBottom","borderBottom","coverGutterNextToScrollbar","initScrollbars","scrollbarModel","scrollbarStyle","axis","startOperation","viewChanged","updateInput","typing","changeObjs","selectionChanged","updateMaxLine","nextOpId","endOperation","endOperations","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","i$4","endOperation_finish","maybeClipScrollbars","mustUpdate","DisplayUpdate","updatedDisplay","updateDisplayIfNeeded","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","minWidth","takeFocus","hasFocus","setDocumentHeight","postUpdateDisplay","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","methodOp","docMethodOp","regChange","lendiff","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","adjustView","countDirtyView","dirty","time","highlight","highlightWorker","Date","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","marginBottom","borderRightWidth","selectionSnapshot","active","getSelection","anchorNode","extend","anchorOffset","focusNode","focusOffset","restoreSelection","snapshot","createRange","setEnd","removeAllRanges","addRange","editorIsHidden","force","visible","viewportMargin","different","wrapperHeight","toUpdate","selSnapshot","patchDisplay","minHeight","oldDisplayWidth","updateNumbersFrom","rm","currentWheelTarget","updateNumber","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","movedX","movedY","sample","normalizeSelection","prim","inv","Range","Selection","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","computeReplacedSel","hint","oldPrev","newPrev","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","linesFor","Line","lastText","lastSpans","nlines","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","directionChanged","History","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","pop","lastChangeEvent","hist","addChangeToHistory","selAfter","opId","history","origin","historyEventDelay","pushSelectionToHistory","selectionEventCanBeMerged","addSelectionToHistory","clearRedo","dest","equals","existing","removeClearedSpans","explicitlyCleared","getOldSpans","mergeOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","copy","deepCopy","newChanges","Number","extendRange","posBefore","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","filterSelectionChange","this$1","setSelectionReplaceHistory","setSelectionNoUndo","NaN","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","atomic","near","movePos","far","cantEdit","selectAll","sel_dontScroll","filterChange","canceled","cancel","makeChange","ignoreReadOnly","suppressEdits","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","antiChanges","returned","v","shiftDoc","distance","removed","makeChangeSingleDocInEditor","recomputeMaxLength","checkWidthStart","changesHandler","changeHandler","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","adjustScrollWhenAboveVisible","addLineWidget","LineWidget","insertAt","aboveVisible","markTextShared","TextMarker","replacedWith","addToHistory","curLine","clearOnEnter","clearHistory","nextMarkerId","cloneNode","isParent","SharedTextMarker","findSharedMarkers","findMarks","copySharedMarkers","mFrom","mTo","subMark","detachSharedMarkers","subMarker","onDrop","clearDragCursor","lastDrop","files","dataTransfer","isReadOnly","FileReader","File","read","file","allowDropFileTypes","reader","onload","lineSeparator","readAsText","draggingText","text$1","getData","onDragStart","setData","effectAllowed","setDragImage","safari","img","src","_top","onDragOver","frag","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","ensureGlobalHandlers","globalsRegistered","registerGlobalHandlers","resizeTimer","onResize","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","lineStart","visual","lineEnd","lineStartSmart","firstNonWS","inWS","doHandleBinding","bound","dropShift","ensurePolled","prevShift","lookupKeyForEditor","keyMaps","extraKeys","dispatchKey","seq","keySeq","stopSeq","handleKeyBinding","motion","handleCharBinding","handled","lastStoppedKey","hasCopyEvent","showCrossHair","up","onKeyUp","onKeyPress","charCode","fromCharCode","clickRepeat","now","lastDoubleClick","compare","lastClick","PastClick","onMouseDown","supportsTouch","clickInGutter","repeat","selectingText","handleMappedButton","leftButtonDown","captureRightClick","onContextMenu","configureMouse","option","unit","chromeOS","addNew","moveOnDrag","contained","behavior","dragDrop","dragAndDrop","leftButtonStartDrag","leftButtonSelect","moved","dragEnd","mouseMove","dragStart","e2","rangeForUnit","findWordAt","extendTo","lastPos","startCol","posCol","startSel","ourIndex","oldRange","ourRange","ranges$1","sel_mouse","curCount","counter","editorSize","move","gutterEvent","prevent","mX","mY","lineBox","contextMenuInGutter","themeChanged","theme","guttersChanged","dragDropChanged","funcs","dragFunctions","toggle","enter","over","leave","drop","wrappingChanged","CodeMirror$1","defaults","Doc","inputStyles","inputStyle","pasteIncoming","cutIncoming","Delayed","autofocus","registerEventHandlers","optionHandlers","finishInit","initHooks","textRendering","finishTouch","touchFinished","prevTouch","isMouseLikeTouchEvent","touches","touch","radiusX","radiusY","farAway","word","pageX","pageY","inp","getField","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","findNextLine","moveOnce","boundToLine","origDir","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","posToDOM","side","isInGutter","scan","badPos","bad","domTextBetween","recognizeMarker","closing","lineSep","addText","walk","cmText","textContent","markerID","isBlock","nodeName","nodeValue","domToPos","lineNode","locateNodeInLineView","textNode","topNode","curNode","dist","previousSibling","dist$1","textarea","tabindex","tabIndex","realSubmit","leaveSubmitMethodAlone","wrappedSubmit","getTextArea","toTextArea","getWrapperElement","userAgent","navigator","platform","ie_upto10","ie_11up","edge","documentMode","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","substr","hideFirstChars","oracle","maxLookAhead","NativeScrollbars","vert","horiz","checkedZeroWidth","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","w","pointerEvents","bar","delay","maybeDisable","elementFromPoint","NullScrollbars","native","null","there","removeInner","insertInner","iterN","oldHeight","remaining","leaf","maybeSpill","me","spilled","sibling","myIndex","used","oldH","withOp","dHeight","nextDocId","cleanGeneration","constructor","setValue","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","setCursor","extendSelectionsBy","addSelection","getSelections","dup","newSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineClass","where","removeLineClass","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","unlinkDoc","link","splitIds","iterLinkedDocs","getEditor","setDirection","eachLine","16","17","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","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","triggerOnKeyDown","pollContent","fromIndex","fromNode","toNode","toIndex","newText","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","inaccurateSelection","prepareCopyCut","fastPoll","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","minimal","slowPoll","missed","same","prepareSelectAllHack","extval","rehide","oldWrapperCSS","oldCSS","detectingSelectAll","resetSelectionOnContextMenu","wrapperBox","oldScrollY","scrollY","scrollTo","mouseup","deflt","notOnInit","newBreaks","getInputField","detach","attach","integer","setOption","getDoc","addOverlay","modeSpec","removeOverlay","newRanges","getLineTokens","getHelpers","_global","getStateAfter","defaultTextHeight","defaultCharWidth","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","interpret","swapDoc","getScrollerElement","getGutterElement","registerGlobalHelper","predicate","dontDelegate","method","contenteditable","defineExtension","func","defineDocExtension","cmpPos","version","keySet","tokenCComment","maybeEnd","tokenize","parserConfig","ret","tp","tokenBase","tokenHooks","tokenString","tokenParenthesized","quote","escaped","pushContext","popContext","pass","states","popAndPass","wordAsValue","valueKeywords","colorKeywords","inline","propertyKeywords","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","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","fontProperties_","counterDescriptors_","colorKeywords_","valueKeywords_","allWords","/",":","$","#","@","&","maybeBackup","pat","getAttrRegexp","attr","regexp","attrRegexpCache","getAttrValue","getTagRegexp","anchored","addTags","findMatchingMode","tagInfo","tagText","defaultTags","script","htmlState","tags","inTag","endTagA","endTag","localState","localMode","multilineTagIndentFactor","multilineTagIndentPastTag","configTags","configScript","scriptTypes","matches","local","../css/css","../javascript/javascript","../xml/xml","expressionAllowed","lastType","readRegexp","inSet","cont","tokenComment","isOperatorChar","tokenQuasi","lexical","wordRE","keywords","propertyIsEnumerable","kw","jsonldMode","isJsonldKeyword","findFatArrow","fatArrowAt","arrow","isTS","depth","sawSomething","bracket","brackets","JSLexical","inScope","varname","localVars","vars","parseJS","cc","marked","jsonMode","expression","statement","lex","inList","globalVars","pushcontext","defaultVars","popcontext","pushlex","poplex","expect","wanted","exp","vardef","parenExpr","maybeelse","functiondef","forspec","typeexpr","maybelabel","funarg","afterExport","afterImport","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","atomicTypes","classExpression","maybeexpressionNoComma","maybeexpression","arrayLiteral","contCommasep","objprop","quasi","maybeTarget","expr","property","continueQuasi","targetNoComma","_","getterSetter","afterprop","what","sep","proceed","maybetype","afterType","typeprop","typearg","maybeReturnType","maybeAssign","vardefCont","proppattern","_type","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","isContinuedStatement","statementIndent","jsonld","json","typescript","wordCharacters","A","B","C","operator","atom","jsKeywords","if","while","with","else","do","try","finally","return","break","continue","new","delete","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","enum","private","protected","abstract","boolean","any","variable","jsonld-keyword","basecolumn","firstChar","doubleIndentSwitch","closeBrackets","skipExpression","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","inAttribute","stringStartCol","closure","isInAttribute","terminator","startOfLine","noIndent","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","setStyle","attrState","matchClosing","closeState","closeStateErr","attrEqState","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","skipAttribute","style_html","html_source","Parser","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","max_char","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","unformatted","comment","unindent","delimiter","orig_tag","get_token","get_full_indent","printer","js_source","indent_character","indent_size","brace_style","ignore","print_token","multi_parser","indent_char","tag_name","tag_extracted_from_last_output","_beautifier","js_beautify","css_beautify","indent_scripts","script_indent_level","white","_level","reindent","21","./stream/stream","22","createStream","HALT","updateStream","_state","initStream","guid","derive","recover","parents","endStream","unregister","ap","valueOf","toJSON","defineProperties","unregisterStream","updateState","updateDependency","finalize","mustSync","every","some","combine","fn","streams","valid","initDependency","dep","notEnded","registerDependency","dependent","s1","s2","merge","reducer","seed","newStream","scanMerge","tuples","tuple","idx"],"mappings":"CAAA,WAAe,GAAIA,OAAUC,GAAeC,MAASD,IAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,G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