Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 4.2.5 |
Comparing to | |
See all releases |
Code changes from version 4.2.4 to 4.2.5
- CHANGELOG.md +9 -0
- assets/js/admin.js +292 -13
- assets/js/admin.min.js +1 -1
- assets/js/admin.min.js.map +1 -1
- assets/js/forms-admin.js +254 -181
- assets/js/forms-admin.min.js +1 -1
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 4.2.4 - July 9, 2018
|
5 |
|
6 |
**Improvements**
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 4.2.5 - Sep 11, 2018
|
5 |
+
|
6 |
+
**Improvements**
|
7 |
+
|
8 |
+
- Only re-add subscriber to list if we want to re-trigger a double opt-in confirmation email.
|
9 |
+
- Change Gravity Forms field name to "MailChimp for WordPress"
|
10 |
+
- Get rid of cached result of MailChimp API connection.
|
11 |
+
|
12 |
+
|
13 |
#### 4.2.4 - July 9, 2018
|
14 |
|
15 |
**Improvements**
|
assets/js/admin.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
(function () { var require = undefined; var define = undefined; (function(){function e
|
2 |
'use strict';
|
3 |
|
4 |
// dependencies
|
@@ -39,7 +39,7 @@ window.mc4wp.events = events;
|
|
39 |
window.mc4wp.settings = settings;
|
40 |
window.mc4wp.tabs = tabs;
|
41 |
|
42 |
-
},{"./admin/helpers.js":2,"./admin/list-fetcher.js":3,"./admin/settings.js":4,"./admin/tabs.js":5,"mithril":
|
43 |
'use strict';
|
44 |
|
45 |
var helpers = {};
|
@@ -476,7 +476,272 @@ var URL = {
|
|
476 |
module.exports = URL;
|
477 |
|
478 |
},{}],7:[function(require,module,exports){
|
479 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 |
"use strict"
|
482 |
function Vnode(tag, key, attrs0, children, text, dom) {
|
@@ -496,6 +761,10 @@ Vnode.normalizeChildren = function normalizeChildren(children) {
|
|
496 |
var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
|
497 |
var selectorCache = {}
|
498 |
var hasOwn = {}.hasOwnProperty
|
|
|
|
|
|
|
|
|
499 |
function compileSelector(selector) {
|
500 |
var match, tag = "div", classes = [], attrs = {}
|
501 |
while (match = selectorParser.exec(selector)) {
|
@@ -516,6 +785,15 @@ function compileSelector(selector) {
|
|
516 |
function execSelector(state, attrs, children) {
|
517 |
var hasAttrs = false, childList, text
|
518 |
var className = attrs.className || attrs.class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
for (var key in state.attrs) {
|
520 |
if (hasOwn.call(state.attrs, key)) {
|
521 |
attrs[key] = state.attrs[key]
|
@@ -1284,9 +1562,10 @@ var coreRenderer = function($window) {
|
|
1284 |
}
|
1285 |
function onremove(vnode) {
|
1286 |
if (vnode.attrs && typeof vnode.attrs.onremove === "function") vnode.attrs.onremove.call(vnode.state, vnode)
|
1287 |
-
if (typeof vnode.tag !== "string"
|
1288 |
-
|
1289 |
-
|
|
|
1290 |
var children = vnode.children
|
1291 |
if (Array.isArray(children)) {
|
1292 |
for (var i = 0; i < children.length; i++) {
|
@@ -1447,9 +1726,9 @@ var coreRenderer = function($window) {
|
|
1447 |
if (!Array.isArray(vnodes)) vnodes = [vnodes]
|
1448 |
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
|
1449 |
dom.vnodes = vnodes
|
1450 |
-
for (var i = 0; i < hooks.length; i++) hooks[i]()
|
1451 |
// document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement
|
1452 |
if (active != null && $doc.activeElement !== active) active.focus()
|
|
|
1453 |
}
|
1454 |
return {render: render, setEventCallback: setEventCallback}
|
1455 |
}
|
@@ -1715,13 +1994,13 @@ m.request = requestService.request
|
|
1715 |
m.jsonp = requestService.jsonp
|
1716 |
m.parseQueryString = parseQueryString
|
1717 |
m.buildQueryString = buildQueryString
|
1718 |
-
m.version = "1.1.
|
1719 |
m.vnode = Vnode
|
1720 |
if (typeof module !== "undefined") module["exports"] = m
|
1721 |
else window.m = m
|
1722 |
}());
|
1723 |
-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
1724 |
-
},{}],
|
1725 |
function tlite(getTooltipOpts) {
|
1726 |
document.addEventListener('mouseover', function (e) {
|
1727 |
var el = e.target;
|
@@ -1857,9 +2136,9 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
1857 |
module.exports = tlite;
|
1858 |
}
|
1859 |
|
1860 |
-
},{}],
|
1861 |
/*!
|
1862 |
-
* EventEmitter v5.2.
|
1863 |
* Unlicense - http://unlicense.org/
|
1864 |
* Oliver Caldwell - http://oli.me.uk/
|
1865 |
* @preserve
|
@@ -2343,7 +2622,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
2343 |
else {
|
2344 |
exports.EventEmitter = EventEmitter;
|
2345 |
}
|
2346 |
-
}(this || {}));
|
2347 |
|
2348 |
},{}]},{},[1]);
|
2349 |
})();
|
1 |
+
(function () { var require = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2 |
'use strict';
|
3 |
|
4 |
// dependencies
|
39 |
window.mc4wp.settings = settings;
|
40 |
window.mc4wp.tabs = tabs;
|
41 |
|
42 |
+
},{"./admin/helpers.js":2,"./admin/list-fetcher.js":3,"./admin/settings.js":4,"./admin/tabs.js":5,"mithril":9,"tlite":10,"wolfy87-eventemitter":11}],2:[function(require,module,exports){
|
43 |
'use strict';
|
44 |
|
45 |
var helpers = {};
|
476 |
module.exports = URL;
|
477 |
|
478 |
},{}],7:[function(require,module,exports){
|
479 |
+
// shim for using process in browser
|
480 |
+
var process = module.exports = {};
|
481 |
+
|
482 |
+
// cached from whatever global is present so that test runners that stub it
|
483 |
+
// don't break things. But we need to wrap it in a try catch in case it is
|
484 |
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
485 |
+
// function because try/catches deoptimize in certain engines.
|
486 |
+
|
487 |
+
var cachedSetTimeout;
|
488 |
+
var cachedClearTimeout;
|
489 |
+
|
490 |
+
function defaultSetTimout() {
|
491 |
+
throw new Error('setTimeout has not been defined');
|
492 |
+
}
|
493 |
+
function defaultClearTimeout () {
|
494 |
+
throw new Error('clearTimeout has not been defined');
|
495 |
+
}
|
496 |
+
(function () {
|
497 |
+
try {
|
498 |
+
if (typeof setTimeout === 'function') {
|
499 |
+
cachedSetTimeout = setTimeout;
|
500 |
+
} else {
|
501 |
+
cachedSetTimeout = defaultSetTimout;
|
502 |
+
}
|
503 |
+
} catch (e) {
|
504 |
+
cachedSetTimeout = defaultSetTimout;
|
505 |
+
}
|
506 |
+
try {
|
507 |
+
if (typeof clearTimeout === 'function') {
|
508 |
+
cachedClearTimeout = clearTimeout;
|
509 |
+
} else {
|
510 |
+
cachedClearTimeout = defaultClearTimeout;
|
511 |
+
}
|
512 |
+
} catch (e) {
|
513 |
+
cachedClearTimeout = defaultClearTimeout;
|
514 |
+
}
|
515 |
+
} ())
|
516 |
+
function runTimeout(fun) {
|
517 |
+
if (cachedSetTimeout === setTimeout) {
|
518 |
+
//normal enviroments in sane situations
|
519 |
+
return setTimeout(fun, 0);
|
520 |
+
}
|
521 |
+
// if setTimeout wasn't available but was latter defined
|
522 |
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
523 |
+
cachedSetTimeout = setTimeout;
|
524 |
+
return setTimeout(fun, 0);
|
525 |
+
}
|
526 |
+
try {
|
527 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
528 |
+
return cachedSetTimeout(fun, 0);
|
529 |
+
} catch(e){
|
530 |
+
try {
|
531 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
532 |
+
return cachedSetTimeout.call(null, fun, 0);
|
533 |
+
} catch(e){
|
534 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
535 |
+
return cachedSetTimeout.call(this, fun, 0);
|
536 |
+
}
|
537 |
+
}
|
538 |
+
|
539 |
+
|
540 |
+
}
|
541 |
+
function runClearTimeout(marker) {
|
542 |
+
if (cachedClearTimeout === clearTimeout) {
|
543 |
+
//normal enviroments in sane situations
|
544 |
+
return clearTimeout(marker);
|
545 |
+
}
|
546 |
+
// if clearTimeout wasn't available but was latter defined
|
547 |
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
548 |
+
cachedClearTimeout = clearTimeout;
|
549 |
+
return clearTimeout(marker);
|
550 |
+
}
|
551 |
+
try {
|
552 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
553 |
+
return cachedClearTimeout(marker);
|
554 |
+
} catch (e){
|
555 |
+
try {
|
556 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
557 |
+
return cachedClearTimeout.call(null, marker);
|
558 |
+
} catch (e){
|
559 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
560 |
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
561 |
+
return cachedClearTimeout.call(this, marker);
|
562 |
+
}
|
563 |
+
}
|
564 |
+
|
565 |
+
|
566 |
+
|
567 |
+
}
|
568 |
+
var queue = [];
|
569 |
+
var draining = false;
|
570 |
+
var currentQueue;
|
571 |
+
var queueIndex = -1;
|
572 |
+
|
573 |
+
function cleanUpNextTick() {
|
574 |
+
if (!draining || !currentQueue) {
|
575 |
+
return;
|
576 |
+
}
|
577 |
+
draining = false;
|
578 |
+
if (currentQueue.length) {
|
579 |
+
queue = currentQueue.concat(queue);
|
580 |
+
} else {
|
581 |
+
queueIndex = -1;
|
582 |
+
}
|
583 |
+
if (queue.length) {
|
584 |
+
drainQueue();
|
585 |
+
}
|
586 |
+
}
|
587 |
+
|
588 |
+
function drainQueue() {
|
589 |
+
if (draining) {
|
590 |
+
return;
|
591 |
+
}
|
592 |
+
var timeout = runTimeout(cleanUpNextTick);
|
593 |
+
draining = true;
|
594 |
+
|
595 |
+
var len = queue.length;
|
596 |
+
while(len) {
|
597 |
+
currentQueue = queue;
|
598 |
+
queue = [];
|
599 |
+
while (++queueIndex < len) {
|
600 |
+
if (currentQueue) {
|
601 |
+
currentQueue[queueIndex].run();
|
602 |
+
}
|
603 |
+
}
|
604 |
+
queueIndex = -1;
|
605 |
+
len = queue.length;
|
606 |
+
}
|
607 |
+
currentQueue = null;
|
608 |
+
draining = false;
|
609 |
+
runClearTimeout(timeout);
|
610 |
+
}
|
611 |
+
|
612 |
+
process.nextTick = function (fun) {
|
613 |
+
var args = new Array(arguments.length - 1);
|
614 |
+
if (arguments.length > 1) {
|
615 |
+
for (var i = 1; i < arguments.length; i++) {
|
616 |
+
args[i - 1] = arguments[i];
|
617 |
+
}
|
618 |
+
}
|
619 |
+
queue.push(new Item(fun, args));
|
620 |
+
if (queue.length === 1 && !draining) {
|
621 |
+
runTimeout(drainQueue);
|
622 |
+
}
|
623 |
+
};
|
624 |
+
|
625 |
+
// v8 likes predictible objects
|
626 |
+
function Item(fun, array) {
|
627 |
+
this.fun = fun;
|
628 |
+
this.array = array;
|
629 |
+
}
|
630 |
+
Item.prototype.run = function () {
|
631 |
+
this.fun.apply(null, this.array);
|
632 |
+
};
|
633 |
+
process.title = 'browser';
|
634 |
+
process.browser = true;
|
635 |
+
process.env = {};
|
636 |
+
process.argv = [];
|
637 |
+
process.version = ''; // empty string to avoid regexp issues
|
638 |
+
process.versions = {};
|
639 |
+
|
640 |
+
function noop() {}
|
641 |
+
|
642 |
+
process.on = noop;
|
643 |
+
process.addListener = noop;
|
644 |
+
process.once = noop;
|
645 |
+
process.off = noop;
|
646 |
+
process.removeListener = noop;
|
647 |
+
process.removeAllListeners = noop;
|
648 |
+
process.emit = noop;
|
649 |
+
process.prependListener = noop;
|
650 |
+
process.prependOnceListener = noop;
|
651 |
+
|
652 |
+
process.listeners = function (name) { return [] }
|
653 |
+
|
654 |
+
process.binding = function (name) {
|
655 |
+
throw new Error('process.binding is not supported');
|
656 |
+
};
|
657 |
+
|
658 |
+
process.cwd = function () { return '/' };
|
659 |
+
process.chdir = function (dir) {
|
660 |
+
throw new Error('process.chdir is not supported');
|
661 |
+
};
|
662 |
+
process.umask = function() { return 0; };
|
663 |
+
|
664 |
+
},{}],8:[function(require,module,exports){
|
665 |
+
(function (setImmediate,clearImmediate){
|
666 |
+
var nextTick = require('process/browser.js').nextTick;
|
667 |
+
var apply = Function.prototype.apply;
|
668 |
+
var slice = Array.prototype.slice;
|
669 |
+
var immediateIds = {};
|
670 |
+
var nextImmediateId = 0;
|
671 |
+
|
672 |
+
// DOM APIs, for completeness
|
673 |
+
|
674 |
+
exports.setTimeout = function() {
|
675 |
+
return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
|
676 |
+
};
|
677 |
+
exports.setInterval = function() {
|
678 |
+
return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
|
679 |
+
};
|
680 |
+
exports.clearTimeout =
|
681 |
+
exports.clearInterval = function(timeout) { timeout.close(); };
|
682 |
+
|
683 |
+
function Timeout(id, clearFn) {
|
684 |
+
this._id = id;
|
685 |
+
this._clearFn = clearFn;
|
686 |
+
}
|
687 |
+
Timeout.prototype.unref = Timeout.prototype.ref = function() {};
|
688 |
+
Timeout.prototype.close = function() {
|
689 |
+
this._clearFn.call(window, this._id);
|
690 |
+
};
|
691 |
+
|
692 |
+
// Does not start the time, just sets up the members needed.
|
693 |
+
exports.enroll = function(item, msecs) {
|
694 |
+
clearTimeout(item._idleTimeoutId);
|
695 |
+
item._idleTimeout = msecs;
|
696 |
+
};
|
697 |
+
|
698 |
+
exports.unenroll = function(item) {
|
699 |
+
clearTimeout(item._idleTimeoutId);
|
700 |
+
item._idleTimeout = -1;
|
701 |
+
};
|
702 |
+
|
703 |
+
exports._unrefActive = exports.active = function(item) {
|
704 |
+
clearTimeout(item._idleTimeoutId);
|
705 |
+
|
706 |
+
var msecs = item._idleTimeout;
|
707 |
+
if (msecs >= 0) {
|
708 |
+
item._idleTimeoutId = setTimeout(function onTimeout() {
|
709 |
+
if (item._onTimeout)
|
710 |
+
item._onTimeout();
|
711 |
+
}, msecs);
|
712 |
+
}
|
713 |
+
};
|
714 |
+
|
715 |
+
// That's not how node.js implements it but the exposed api is the same.
|
716 |
+
exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) {
|
717 |
+
var id = nextImmediateId++;
|
718 |
+
var args = arguments.length < 2 ? false : slice.call(arguments, 1);
|
719 |
+
|
720 |
+
immediateIds[id] = true;
|
721 |
+
|
722 |
+
nextTick(function onNextTick() {
|
723 |
+
if (immediateIds[id]) {
|
724 |
+
// fn.call() is faster so we optimize for the common use-case
|
725 |
+
// @see http://jsperf.com/call-apply-segu
|
726 |
+
if (args) {
|
727 |
+
fn.apply(null, args);
|
728 |
+
} else {
|
729 |
+
fn.call(null);
|
730 |
+
}
|
731 |
+
// Prevent ids from leaking
|
732 |
+
exports.clearImmediate(id);
|
733 |
+
}
|
734 |
+
});
|
735 |
+
|
736 |
+
return id;
|
737 |
+
};
|
738 |
+
|
739 |
+
exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
|
740 |
+
delete immediateIds[id];
|
741 |
+
};
|
742 |
+
}).call(this,require("timers").setImmediate,require("timers").clearImmediate)
|
743 |
+
},{"process/browser.js":7,"timers":8}],9:[function(require,module,exports){
|
744 |
+
(function (global,setImmediate){
|
745 |
;(function() {
|
746 |
"use strict"
|
747 |
function Vnode(tag, key, attrs0, children, text, dom) {
|
761 |
var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
|
762 |
var selectorCache = {}
|
763 |
var hasOwn = {}.hasOwnProperty
|
764 |
+
function isEmpty(object) {
|
765 |
+
for (var key in object) if (hasOwn.call(object, key)) return false
|
766 |
+
return true
|
767 |
+
}
|
768 |
function compileSelector(selector) {
|
769 |
var match, tag = "div", classes = [], attrs = {}
|
770 |
while (match = selectorParser.exec(selector)) {
|
785 |
function execSelector(state, attrs, children) {
|
786 |
var hasAttrs = false, childList, text
|
787 |
var className = attrs.className || attrs.class
|
788 |
+
if (!isEmpty(state.attrs) && !isEmpty(attrs)) {
|
789 |
+
var newAttrs = {}
|
790 |
+
for(var key in attrs) {
|
791 |
+
if (hasOwn.call(attrs, key)) {
|
792 |
+
newAttrs[key] = attrs[key]
|
793 |
+
}
|
794 |
+
}
|
795 |
+
attrs = newAttrs
|
796 |
+
}
|
797 |
for (var key in state.attrs) {
|
798 |
if (hasOwn.call(state.attrs, key)) {
|
799 |
attrs[key] = state.attrs[key]
|
1562 |
}
|
1563 |
function onremove(vnode) {
|
1564 |
if (vnode.attrs && typeof vnode.attrs.onremove === "function") vnode.attrs.onremove.call(vnode.state, vnode)
|
1565 |
+
if (typeof vnode.tag !== "string") {
|
1566 |
+
if (typeof vnode._state.onremove === "function") vnode._state.onremove.call(vnode.state, vnode)
|
1567 |
+
if (vnode.instance != null) onremove(vnode.instance)
|
1568 |
+
} else {
|
1569 |
var children = vnode.children
|
1570 |
if (Array.isArray(children)) {
|
1571 |
for (var i = 0; i < children.length; i++) {
|
1726 |
if (!Array.isArray(vnodes)) vnodes = [vnodes]
|
1727 |
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
|
1728 |
dom.vnodes = vnodes
|
|
|
1729 |
// document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement
|
1730 |
if (active != null && $doc.activeElement !== active) active.focus()
|
1731 |
+
for (var i = 0; i < hooks.length; i++) hooks[i]()
|
1732 |
}
|
1733 |
return {render: render, setEventCallback: setEventCallback}
|
1734 |
}
|
1994 |
m.jsonp = requestService.jsonp
|
1995 |
m.parseQueryString = parseQueryString
|
1996 |
m.buildQueryString = buildQueryString
|
1997 |
+
m.version = "1.1.6"
|
1998 |
m.vnode = Vnode
|
1999 |
if (typeof module !== "undefined") module["exports"] = m
|
2000 |
else window.m = m
|
2001 |
}());
|
2002 |
+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate)
|
2003 |
+
},{"timers":8}],10:[function(require,module,exports){
|
2004 |
function tlite(getTooltipOpts) {
|
2005 |
document.addEventListener('mouseover', function (e) {
|
2006 |
var el = e.target;
|
2136 |
module.exports = tlite;
|
2137 |
}
|
2138 |
|
2139 |
+
},{}],11:[function(require,module,exports){
|
2140 |
/*!
|
2141 |
+
* EventEmitter v5.2.5 - git.io/ee
|
2142 |
* Unlicense - http://unlicense.org/
|
2143 |
* Oliver Caldwell - http://oli.me.uk/
|
2144 |
* @preserve
|
2622 |
else {
|
2623 |
exports.EventEmitter = EventEmitter;
|
2624 |
}
|
2625 |
+
}(typeof window !== 'undefined' ? window : this || {}));
|
2626 |
|
2627 |
},{}]},{},[1]);
|
2628 |
})();
|
assets/js/admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function(){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}return t}()({1:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("tlite")),i=window.m=e("mithril"),o=e("wolfy87-eventemitter"),a=document.getElementById("mc4wp-admin"),l=new o,s=e("./admin/tabs.js")(a),u=e("./admin/helpers.js"),c=e("./admin/settings.js")(a,u,l);(0,r.default)(function(e){return e.className.indexOf("mc4wp-tooltip")>-1});var f=e("./admin/list-fetcher.js"),d=document.getElementById("mc4wp-list-fetcher");d&&i.mount(d,new f),window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=i,window.mc4wp.helpers=u,window.mc4wp.events=l,window.mc4wp.settings=c,window.mc4wp.tabs=s},{"./admin/helpers.js":2,"./admin/list-fetcher.js":3,"./admin/settings.js":4,"./admin/tabs.js":5,mithril:7,tlite:8,"wolfy87-eventemitter":9}],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=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||e.apply(i,o)},t),a&&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)==n.value;a?(e.style.display=t?"":"none",e.style.visibility=t?"":"hidden"):e.style.opacity=t?"":"0.4",Array.prototype.forEach.call(o,function(e){t?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};t.exports=function(e,t,n){function i(){return l=[],Array.prototype.forEach.call(o,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"===r(a[e.value])&&l.push(a[e.value])}),n.trigger("selectedLists.change",[l]),l}e.querySelector("form");var o=e.querySelectorAll(".mc4wp-list-input"),a=mc4wp_vars.mailchimp.lists,l=[];return n.on("selectedLists.change",function(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){(function(e,t){return l.filter(function(n){return n[e]===t})})("id",e.getAttribute("data-list-id")).length>0?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}),t.bindEventToElements(o,"change",i),i(),{getSelectedLists:function(){return l}}}},{}],5:[function(e,t,n){"use strict";var r=e("./url.js");t.exports=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}}},{"./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){var t,r=arguments[1],l=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 s=o[e]||function(e){for(var t,n="div",r=[],a={};t=i.exec(e);){var l=t[1],s=t[2];if(""===l&&""!==s)n=s;else if("#"===l)a.id=s;else if("."===l)r.push(s);else if("["===t[3][0]){var u=t[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===t[4]?r.push(u):a[t[4]]=""===u?u:u||!0}}return r.length>0&&(a.className=r.join(" ")),o[e]={tag:n,attrs:a}}(e);if(null==r?r={}:("object"!=typeof r||null!=r.tag||Array.isArray(r))&&(r={},l=1),arguments.length===l+1)t=arguments[l],Array.isArray(t)||(t=[t]);else for(t=[];l<arguments.length;)t.push(arguments[l++]);var u=n.normalizeChildren(t);return"string"==typeof e?function(e,t,r){var i,o,l=!1,s=t.className||t.class;for(var u in e.attrs)a.call(e.attrs,u)&&(t[u]=e.attrs[u]);void 0!==s&&(void 0!==t.class&&(t.class=void 0,t.className=s),null!=e.attrs.className&&(t.className=e.attrs.className+" "+s));for(var u in t)if(a.call(t,u)&&"key"!==u){l=!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,l?t:void 0,i,o)}(s,r,u):n(e,r.key,r,u)}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 i=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,o={},a={}.hasOwnProperty;r.trust=function(e){return null==e&&(e=""),n("<",void 0,void 0,e,void 0,void 0)},r.fragment=function(e,t){return n("[",e.key,e,n.normalizeChildren(t),void 0,void 0)};var l=r;if((s=function(e){function t(e,t){return function a(s){var f;try{if(!t||null==s||"object"!=typeof s&&"function"!=typeof s||"function"!=typeof(f=s.then))c(function(){t||0!==e.length||console.error("Possible unhandled promise rejection:",s);for(var n=0;n<e.length;n++)e[n](s);i.length=0,o.length=0,u.state=t,u.retry=function(){a(s)}});else{if(s===r)throw new TypeError("Promise can't be resolved w/ itself");n(f.bind(s))}}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 s))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),u=r._instance={resolvers:i,rejectors:o},c="function"==typeof setImmediate?setImmediate:setTimeout;n(e)}).prototype.then=function(e,t){function n(e,t,n,a){t.push(function(t){if("function"!=typeof e)n(t);else try{r(e(t))}catch(e){i&&i(e)}}),"function"==typeof o.retry&&a===o.state&&o.retry()}var r,i,o=this._instance,a=new s(function(e,t){r=e,i=t});return n(e,o.resolvers,r,!0),n(t,o.rejectors,i,!1),a},s.prototype.catch=function(e){return this.then(null,e)},s.resolve=function(e){return e instanceof s?e:new s(function(t){t(e)})},s.reject=function(e){return new s(function(t,n){n(e)})},s.all=function(e){return new s(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)})},s.race=function(e){return new s(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=s);var s=window.Promise}else if(void 0!==e){void 0===e.Promise&&(e.Promise=s);s=e.Promise}var u=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("&")},c=new RegExp("^file://","i"),f=function(e,t){function n(){function e(){0==--t&&"function"==typeof f&&f()}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 r(e,t){if("string"==typeof e){var n=e;null==(e=t||{}).url&&(e.url=n)}return e}function i(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 o(e,t){var n=u(t);return""!==n&&(e+=(e.indexOf("?")<0?"?":"&")+n),e}function a(e){try{return""!==e?JSON.parse(e):null}catch(t){throw new Error(e)}}function l(e){return e.responseText}function s(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 f,d=0;return{request:function(u,f){var d=n();u=r(u,f);var h=new t(function(t,n){null==u.method&&(u.method="GET"),u.method=u.method.toUpperCase();var r="GET"!==u.method&&"TRACE"!==u.method&&("boolean"!=typeof u.useBody||u.useBody);"function"!=typeof u.serialize&&(u.serialize="undefined"!=typeof FormData&&u.data instanceof FormData?function(e){return e}:JSON.stringify),"function"!=typeof u.deserialize&&(u.deserialize=a),"function"!=typeof u.extract&&(u.extract=l),u.url=i(u.url,u.data),r?u.data=u.serialize(u.data):u.url=o(u.url,u.data);var f=new e.XMLHttpRequest,d=!1,h=f.abort;f.abort=function(){d=!0,h.call(f)},f.open(u.method,u.url,"boolean"!=typeof u.async||u.async,"string"==typeof u.user?u.user:void 0,"string"==typeof u.password?u.password:void 0),u.serialize!==JSON.stringify||!r||u.headers&&u.headers.hasOwnProperty("Content-Type")||f.setRequestHeader("Content-Type","application/json; charset=utf-8"),u.deserialize!==a||u.headers&&u.headers.hasOwnProperty("Accept")||f.setRequestHeader("Accept","application/json, text/*"),u.withCredentials&&(f.withCredentials=u.withCredentials);for(var v in u.headers)({}).hasOwnProperty.call(u.headers,v)&&f.setRequestHeader(v,u.headers[v]);"function"==typeof u.config&&(f=u.config(f,u)||f),f.onreadystatechange=function(){if(!d&&4===f.readyState)try{var e=u.extract!==l?u.extract(f,u):u.deserialize(u.extract(f,u));if(f.status>=200&&f.status<300||304===f.status||c.test(u.url))t(s(u.type,e));else{var r=new Error(f.responseText);for(var i in e)r[i]=e[i];n(r)}}catch(e){n(e)}},r&&null!=u.data?f.send(u.data):f.send()});return!0===u.background?h:d(h)},jsonp:function(a,l){var u=n();a=r(a,l);var c=new t(function(t,n){var r=a.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+d++,l=e.document.createElement("script");e[r]=function(n){l.parentNode.removeChild(l),t(s(a.type,n)),delete e[r]},l.onerror=function(){l.parentNode.removeChild(l),n(new Error("JSONP request failed")),delete e[r]},null==a.data&&(a.data={}),a.url=i(a.url,a.data),a.data[a.callbackKey||"callback"]=r,l.src=o(a.url,a.data),e.document.documentElement.appendChild(l)});return!0===a.background?c:u(c)},setCompletionCallback:function(e){f=e}}}(window,s),d=function(e){function t(e){return e.attrs&&e.attrs.xmlns||S[e.tag]}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,l,s,u,c){var h=l.tag;if("string"!=typeof h)return function(e,t,n,r,o){{if(a(t,n),null!=t.instance){var l=i(e,t.instance,n,r,o);return t.dom=t.instance.dom,t.domSize=null!=t.dom?t.instance.domSize:0,f(e,l,o),l}return t.domSize=0,k}}(e,l,s,u,c);switch(l.state={},null!=l.attrs&&b(l.attrs,l,s),h){case"#":return function(e,t,n){return t.dom=A.createTextNode(t.children),f(e,t.dom,n),t.dom}(e,l,c);case"<":return o(e,l,c);case"[":return function(e,t,n,i,o){var a=A.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,f(e,a,o),a}(e,l,s,u,c);default:return function(e,i,o,a,l){var s=i.tag,u=i.attrs,c=u&&u.is,h=(a=t(i)||a)?c?A.createElementNS(a,s,{is:c}):A.createElementNS(a,s):c?A.createElement(s,{is:c}):A.createElement(s);i.dom=h,null!=u&&function(e,t,n){for(var r in t)y(e,r,null,t[r],n)}(i,u,a);if(f(e,h,l),null!=i.attrs&&null!=i.attrs.contenteditable)d(i);else if(null!=i.text&&(""!==i.text?h.textContent=i.text:i.children=[n("#",void 0,void 0,i.text,void 0,void 0)]),null!=i.children){var v=i.children;r(h,v,0,v.length,o,null,a),function(e){var t=e.attrs;"select"===e.tag&&null!=t&&("value"in t&&y(e,"value",null,t.value,void 0),"selectedIndex"in t&&y(e,"selectedIndex",null,t.selectedIndex,void 0))}(i)}return h}(e,l,s,u,c)}}function o(e,t,n){var r={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"}[(t.children.match(/^\s*?<(\w+)/im)||[])[1]]||"div",i=A.createElement(r);i.innerHTML=t.children,t.dom=i.firstChild,t.domSize=i.childNodes.length;for(var o,a=A.createDocumentFragment();o=i.firstChild;)a.appendChild(o);return f(e,a,n),a}function a(e,t){var r;if("function"==typeof e.tag.view){if(e.state=Object.create(e.tag),null!=(r=e.state.view).$$reentrantLock$$)return k;r.$$reentrantLock$$=!0}else{if(e.state=void 0,null!=(r=e.tag).$$reentrantLock$$)return k;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&&b(e.attrs,e,t),b(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 l(e,t,n,o,a,l,d){if(t!==n&&(null!=t||null!=n))if(null==t)r(e,n,0,n.length,a,l,d);else if(null==n)h(t,0,t.length,n);else{if(t.length===n.length){for(var v=!1,p=0;p<n.length;p++)if(null!=n[p]&&null!=t[p]){v=null==n[p].key&&null==t[p].key;break}if(v){for(p=0;p<t.length;p++)t[p]!==n[p]&&(null==t[p]&&null!=n[p]?i(e,n[p],a,d,c(t,p+1,l)):null==n[p]?h(t,p,p+1,n):s(e,t[p],n[p],a,c(t,p+1,l),o,d));return}}if(o=o||function(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}(t,n)){var m=t.pool;t=t.concat(t.pool)}for(var y,g=0,w=0,b=t.length-1,x=n.length-1;b>=g&&x>=w;){if((A=t[g])!==(k=n[w])||o)if(null==A)g++;else if(null==k)w++;else if(A.key===k.key){var E=null!=m&&g>=t.length-m.length||null==m&&o;w++,s(e,A,k,a,c(t,++g,l),E,d),o&&A.tag===k.tag&&f(e,u(A),l)}else{if((A=t[b])!==k||o)if(null==A)b--;else if(null==k)w++;else{if(A.key!==k.key)break;E=null!=m&&b>=t.length-m.length||null==m&&o;s(e,A,k,a,c(t,b+1,l),E,d),(o||w<x)&&f(e,u(A),c(t,g,l)),b--,w++}else b--,w++}else g++,w++}for(;b>=g&&x>=w;){var A,k;if((A=t[b])!==(k=n[x])||o)if(null==A)b--;else if(null==k)x--;else if(A.key===k.key){E=null!=m&&b>=t.length-m.length||null==m&&o;s(e,A,k,a,c(t,b+1,l),E,d),o&&A.tag===k.tag&&f(e,u(A),l),null!=A.dom&&(l=A.dom),b--,x--}else{if(y||(y=function(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}(t,b)),null!=k){var S=y[k.key];if(null!=S){var _=t[S];E=null!=m&&S>=t.length-m.length||null==m&&o;s(e,_,k,a,c(t,b+1,l),o,d),f(e,u(_),l),t[S].skip=!0,null!=_.dom&&(l=_.dom)}else{l=i(e,k,a,d,l)}}x--}else b--,x--;if(x<w)break}r(e,n,w,x+1,a,l,d),h(t,g,b+1,n)}}function s(e,r,c,f,h,p,m){var E=r.tag;if(E===c.tag){if(c.state=r.state,c._state=r._state,c.events=r.events,!p&&function(e,t){var n,r;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));if(!(void 0===n&&void 0===r||n||r))return e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,!0;return!1}(c,r))return;if("string"==typeof E)switch(null!=c.attrs&&(p?(c.state={},b(c.attrs,c,f)):x(c.attrs,c,f)),E){case"#":!function(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children);t.dom=e.dom}(r,c);break;case"<":!function(e,t,n,r){t.children!==n.children?(u(t),o(e,n,r)):(n.dom=t.dom,n.domSize=t.domSize)}(e,r,c,h);break;case"[":!function(e,t,n,r,i,o,a){l(e,t.children,n.children,r,i,o,a);var s=0,u=n.children;if(n.dom=null,null!=u){for(var c=0;c<u.length;c++){var f=u[c];null!=f&&null!=f.dom&&(null==n.dom&&(n.dom=f.dom),s+=f.domSize||1)}1!==s&&(n.domSize=s)}}(e,r,c,p,f,h,m);break;default:!function(e,r,i,o,a){var s=r.dom=e.dom;a=t(r)||a,"textarea"===r.tag&&(null==r.attrs&&(r.attrs={}),null!=r.text&&(r.attrs.value=r.text,r.text=void 0));(function(e,t,n,r){if(null!=n)for(var i in n)y(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]||g(i)?"key"!==i&&e.dom.removeAttribute(i):w(e,i,void 0))})(r,e.attrs,r.attrs,a),null!=r.attrs&&null!=r.attrs.contenteditable?d(r):null!=e.text&&null!=r.text&&""!==r.text?e.text.toString()!==r.text.toString()&&(e.dom.firstChild.nodeValue=r.text):(null!=e.text&&(e.children=[n("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=r.text&&(r.children=[n("#",void 0,void 0,r.text,void 0,void 0)]),l(s,e.children,r.children,i,o,null,a))}(r,c,p,f,m)}else!function(e,t,r,o,l,u,c){if(u)a(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&&x(r.attrs,r,o),x(r._state,r,o)}null!=r.instance?(null==t.instance?i(e,r.instance,o,c,l):s(e,t.instance,r.instance,o,l,u,c),r.dom=r.instance.dom,r.domSize=r.instance.domSize):null!=t.instance?(v(t.instance,null),r.dom=void 0,r.domSize=0):(r.dom=t.dom,r.domSize=t.domSize)}(e,r,c,f,h,p,m)}else v(r,null),i(e,c,f,m,h)}function u(e){var t=e.domSize;if(null!=t||null==e.dom){var n=A.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 c(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function f(e,t,n){n&&n.parentNode?e.insertBefore(t,n):e.appendChild(t)}function d(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 h(e,t,n,r){for(var i=t;i<n;i++){var o=e[i];null!=o&&(o.skip?o.skip=!1:v(o,r))}}function v(e,t){function n(){if(++i===r&&(m(e),e.dom)){var n=e.domSize||1;if(n>1)for(var o=e.dom;--n;)p(o.nextSibling);p(e.dom),null==t||null!=e.domSize||function(e){return null!=e&&(e.oncreate||e.onupdate||e.onbeforeremove||e.onremove)}(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){null!=(o=e.attrs.onbeforeremove.call(e.state,e))&&"function"==typeof o.then&&(r++,o.then(n,n))}if("string"!=typeof e.tag&&"function"==typeof e._state.onbeforeremove){var o;null!=(o=e._state.onbeforeremove.call(e.state,e))&&"function"==typeof o.then&&(r++,o.then(n,n))}n()}function p(e){var t=e.parentNode;null!=t&&t.removeChild(e)}function m(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)m(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&&m(r)}}}function y(e,t,n,r,i){var o=e.dom;if("key"!==t&&"is"!==t&&(n!==r||function(e,t){return"value"===t||"checked"===t||"selectedIndex"===t||"selected"===t&&e.dom===A.activeElement}(e,t)||"object"==typeof r)&&void 0!==r&&!g(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)w(e,t,r);else if("style"===t)!function(e,t,n){t===n&&(e.style.cssText="",t=null);if(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]="")}}(o,n,r);else if(t in o&&!function(e){return"href"===e||"list"===e||"form"===e||"width"===e||"height"===e}(t)&&void 0===i&&!function(e){return e.attrs.is||e.tag.indexOf("-")>-1}(e)){if("value"===t){var l=""+r;if(("input"===e.tag||"textarea"===e.tag)&&e.dom.value===l&&e.dom===A.activeElement)return;if("select"===e.tag)if(null===r){if(-1===e.dom.selectedIndex&&e.dom===A.activeElement)return}else if(null!==n&&e.dom.value===l&&e.dom===A.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 g(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function w(e,t,n){var r=e.dom,i="function"!=typeof E?n:function(e){var t=n.call(r,e);return E.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 b(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 x(e,t,n){"function"==typeof e.onupdate&&n.push(e.onupdate.bind(t.state,t))}var E,A=e.document,k=A.createDocumentFragment(),S={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};return{render:function(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=A.activeElement,o=e.namespaceURI;null==e.vnodes&&(e.textContent=""),Array.isArray(t)||(t=[t]),l(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]();null!=i&&A.activeElement!==i&&i.focus()},setEventCallback:function(e){return E=e}}},h=function(e){function t(e){var t=i.indexOf(e);t>-1&&i.splice(t,2)}function n(){for(var e=1;e<i.length;e+=2)i[e]()}var r=d(e);r.setEventCallback(function(e){!1===e.redraw?e.redraw=void 0:n()});var i=[];return{subscribe:function(e,n){t(e),i.push(e,function(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))},unsubscribe:t,redraw:n,render:r.render}}(window);f.setCompletionCallback(h.redraw);l.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");e.subscribe(t,function(){e.render(t,n(r))}),e.redraw()}}(h);var v=s,p=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){null==r[a=s.slice(0,c).join()]&&(r[a]=0),f=r[a]++}null==u[f]&&(u[f]=v?l:h?[]:{}),u=u[f]}}return n},m=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,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=p(e.slice(r+1,a));for(var s in l)t[s]=l[s]}if(i>-1){var u=p(e.slice(i+1));for(var s in u)n[s]=u[s]}return e.slice(0,o)}var r,i="function"==typeof e.history.pushState,o="function"==typeof setImmediate?setImmediate:setTimeout,a={prefix:"#!"};return a.getPath=function(){switch(a.prefix.charAt(0)){case"#":return t("hash").slice(a.prefix.length);case"?":return t("search").slice(a.prefix.length)+t("hash");default:return t("pathname").slice(a.prefix.length)+t("search")+t("hash")}},a.setPath=function(t,r,o){var l={},s={};if(t=n(t,l,s),null!=r){for(var c in r)l[c]=r[c];t=t.replace(/:([^\/]+)/g,function(e,t){return delete l[t],r[t]})}var f=u(l);f&&(t+="?"+f);var d=u(s);if(d&&(t+="#"+d),i){var h=o?o.state:null,v=o?o.title:null;e.onpopstate(),o&&o.replace?e.history.replaceState(h,v,a.prefix+t):e.history.pushState(h,v,a.prefix+t)}else e.location.href=a.prefix+t},a.defineRoutes=function(t,l,s){function u(){var r=a.getPath(),i={},o=n(r,i,i),u=e.history.state;if(null!=u)for(var c in u)i[c]=u[c];for(var f in t){var d=new RegExp("^"+f.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(d.test(o))return void o.replace(d,function(){for(var e=f.match(/:[^\/]+/g)||[],n=[].slice.call(arguments,1,-2),o=0;o<e.length;o++)i[e[o].replace(/:|\./g,"")]=decodeURIComponent(n[o]);l(t[f],i,r,f)})}s(r,i)}i?e.onpopstate=function(e){return function(){null==r&&(r=o(function(){r=null,e()}))}}(u):"#"===a.prefix.charAt(0)&&(e.onhashchange=u),u()},a};l.route=function(e,t){var r,i,o,a,l,s=m(e),u=function(e,u,c){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var f=function(){null!=r&&t.render(e,r(n(i,o.key,o)))},d=function(e){if(e===u)throw new Error("Could not resolve default route "+u);s.setPath(u,null,{replace:!0})};s.defineRoutes(c,function(e,t,n){var s=l=function(e,u){s===l&&(i=null==u||"function"!=typeof u.view&&"function"!=typeof u?"div":u,o=t,a=n,l=null,r=(e.render||function(e){return e}).bind(e),f())};e.view||"function"==typeof e?s({},e):e.onmatch?v.resolve(e.onmatch(t,n)).then(function(t){s(e,t)},d):s(e,"div")},d),t.subscribe(e,f)};return u.set=function(e,t,n){null!=l&&((n=n||{}).replace=!0),l=null,s.setPath(e,t,n)},u.get=function(){return a},u.prefix=function(e){s.prefix=e},u.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)),u.set(t,void 0,void 0)}}},u.param=function(e){return void 0!==o&&void 0!==e?o[e]:o},u}(window,h),l.withAttr=function(e,t,n){return function(r){t.call(n||this,e in r.currentTarget?r.currentTarget[e]:r.currentTarget.getAttribute(e))}};var y=d(window);l.render=y.render,l.redraw=h.redraw,l.request=f.request,l.jsonp=f.jsonp,l.parseQueryString=p,l.buildQueryString=u,l.version="1.1.5",l.vnode=n,void 0!==t?t.exports=l:window.m=l}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,t,n){function r(e){document.addEventListener("mouseover",function(t){var n=t.target,i=e(n);i||(i=(n=n.parentElement)&&e(n)),i&&r.show(n,i,!0)})}r.show=function(e,t,n){var i="data-tlite";t=t||{},(e.tooltip||function(e,t){function o(){r.hide(e,!0)}function a(){l||(l=function(e,t,n){function r(){i.className="tlite tlite-"+a+l;var t=e.offsetTop,n=e.offsetLeft;i.offsetParent===e&&(t=n=0);var r=e.offsetWidth,o=e.offsetHeight,s=i.offsetHeight,u=i.offsetWidth,c=n+r/2;i.style.top=("s"===a?t-s-10:"n"===a?t+o+10:t+o/2-s/2)+"px",i.style.left=("w"===l?n:"e"===l?n+r-u:"w"===a?n+r+10:"e"===a?n-u-10:c-u/2)+"px"}var i=document.createElement("span"),o=n.grav||e.getAttribute("data-tlite")||"n";i.innerHTML=t,e.appendChild(i);var a=o[0]||"",l=o[1]||"";r();var s=i.getBoundingClientRect();return"s"===a&&s.top<0?(a="n",r()):"n"===a&&s.bottom>window.innerHeight?(a="s",r()):"e"===a&&s.left<0?(a="w",r()):"w"===a&&s.right>window.innerWidth&&(a="e",r()),i.className+=" tlite-visible",i}(e,u,t))}var l,s,u;return e.addEventListener("mousedown",o),e.addEventListener("mouseleave",o),e.tooltip={show:function(){u=e.title||e.getAttribute(i)||u,e.title="",e.setAttribute(i,""),u&&!s&&(s=setTimeout(a,n?150:1))},hide:function(e){if(n===e){s=clearTimeout(s);var t=l&&l.parentNode;t&&t.removeChild(l),l=void 0}}}}(e,t)).show()},r.hide=function(e,t){e.tooltip&&e.tooltip.hide(t)},void 0!==t&&t.exports&&(t.exports=r)},{}],9:[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={})[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);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=0;i<n.length;i++)!0===(r=n[i]).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])}();
|
2 |
//# sourceMappingURL=admin.min.js.map
|
1 |
+
!function(){var l=void 0;!function o(a,l,s){function u(t,e){if(!l[t]){if(!a[t]){var n=!1;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=l[t]={exports:{}};a[t][0].call(i.exports,function(e){return u(a[t][1][e]||e)},i,i.exports,o,a,l,s)}return l[t].exports}for(var c=!1,e=0;e<s.length;e++)u(s[e]);return u}({1:[function(e,t,n){"use strict";var r,i=e("tlite"),o=(r=i)&&r.__esModule?r:{default:r};var a=window.m=e("mithril"),l=e("wolfy87-eventemitter"),s=document.getElementById("mc4wp-admin"),u=new l,c=e("./admin/tabs.js")(s),f=e("./admin/helpers.js"),d=e("./admin/settings.js")(s,f,u);(0,o.default)(function(e){return-1<e.className.indexOf("mc4wp-tooltip")});var h=e("./admin/list-fetcher.js"),v=document.getElementById("mc4wp-list-fetcher");v&&a.mount(v,new h),window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=a,window.mc4wp.helpers=f,window.mc4wp.events=u,window.mc4wp.settings=d,window.mc4wp.tabs=c},{"./admin/helpers.js":2,"./admin/list-fetcher.js":3,"./admin/settings.js":4,"./admin/tabs.js":5,mithril:9,tlite:10,"wolfy87-eventemitter":11}],2:[function(e,t,n){"use strict";var r,a={};a.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"}},a.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},a.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){a.bindEventToElement(e,t,n)})},a.debounce=function(r,i,o){var a;return function(){var e=this,t=arguments,n=o&&!a;clearTimeout(a),a=setTimeout(function(){a=null,o||r.apply(e,t)},i),n&&r.apply(e,t)}},r=document.querySelectorAll("[data-showif]"),Array.prototype.forEach.call(r,function(e){var n=JSON.parse(e.getAttribute("data-showif")),t=document.querySelectorAll('[name="'+n.element+'"]'),r=e.querySelectorAll("input,select,textarea:not([readonly])"),i=void 0===n.hide||n.hide;function o(){if("radio"!==this.getAttribute("type")||this.checked){var t=("checkbox"===this.getAttribute("type")?this.checked:this.value)==n.value;i?(e.style.display=t?"":"none",e.style.visibility=t?"":"hidden"):e.style.opacity=t?"":"0.4",Array.prototype.forEach.call(r,function(e){t?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}Array.prototype.forEach.call(t,function(e){o.call(e)}),a.bindEventToElements(t,"change",o)}),t.exports=a},{}],3:[function(e,t,n){"use strict";var r=window.jQuery,i=mc4wp_vars,o=i.i18n;function a(){this.working=!1,this.done=!1,i.mailchimp.api_connected&&0===i.mailchimp.lists.length&&this.fetch()}a.prototype.fetch=function(e){e&&e.preventDefault(),this.working=!0,this.done=!1,r.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))},a.prototype.view=function(){return m("form",{method:"POST",onsubmit:this.fetch.bind(this)},[m("p",[m("input",{type:"submit",value:this.working?o.fetching_mailchimp_lists:o.renew_mailchimp_lists,className:"button",disabled:!!this.working}),m.trust(" "),this.working?[m("span.mc4wp-loader","Loading..."),m.trust(" "),m("em.help",o.fetching_mailchimp_lists_can_take_a_while)]:"",this.done?[this.success?m("em.help.green",o.fetching_mailchimp_lists_done):m("em.help.red",o.fetching_mailchimp_lists_error)]:""])])},t.exports=a},{}],4:[function(e,t,n){"use strict";var l="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};t.exports=function(e,t,n){e.querySelector("form");var r=e.querySelectorAll(".mc4wp-list-input"),i=mc4wp_vars.mailchimp.lists,o=[];function a(){return o=[],Array.prototype.forEach.call(r,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"===l(i[e.value])&&o.push(i[e.value])}),n.trigger("selectedLists.change",[o]),o}return n.on("selectedLists.change",function(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){var t,n,r=e.getAttribute("data-list-id");0<(t="id",n=r,o.filter(function(e){return e[t]===n})).length?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}),t.bindEventToElements(r,"change",a),a(),{getSelectedLists:function(){return o}}}},{}],5:[function(e,t,n){"use strict";var d=e("./url.js");t.exports=function(i){var o=window.jQuery,e=o(i),r=e.find(".tab"),a=e.find(".nav-tab"),l=i.querySelector('input[name="_wp_http_referer"]'),s=[];function u(e){for(var t=0;t<s.length;t++)if(s[t].id===e)return s[t]}function c(e,t){if("string"==typeof e&&(e=u(e)),!e)return!1;null==t&&(t=!0),r.removeClass("tab-active").css("display","none"),a.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 n=d.setParameter(window.location.href,"tab",e.id);return history.pushState&&t&&history.pushState(e.id,"",n),f(e),l.value=n,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function f(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function t(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var n=this.className.match(/nav-tab-(\w+)?/);n&&(t=n[1])}if(!t){var r=d.parse(this.href);if(!r.tab)return;t=r.tab}return!c(t)||(e.preventDefault(),e.returnValue=!1)}return o.each(r,function(e,t){var n=t.id.substring(4),r=o(t).find("h2").first().text();s.push({id:n,title:r,element:t,nav:i.querySelectorAll(".nav-tab-"+n),open:function(){return c(n)}})}),a.click(t),o(document.body).on("click",".tab-link",t),function(){if(history.pushState){var e=r.filter(":visible").get(0);if(e){var t=u(e.id.substring(4));t&&(history.replaceState&&null===history.state&&history.replaceState(t.id,""),f(t))}}}(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){return!e.state||c(e.state,!1)}),{open:c,get:u}}},{"./url.js":6}],6:[function(e,t,n){"use strict";var i={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 r=i.parse(e);return r[t]=n,i.build(r)}};t.exports=i},{}],7:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:l}catch(e){i=l}}();var u,c=[],f=!1,d=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):d=-1,c.length&&v())}function v(){if(!f){var e=s(h);f=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||f||s(v)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],8:[function(s,e,u){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function l(e,t){this._id=e,this._clearFn=t}u.setTimeout=function(){return new l(n.call(setTimeout,window,arguments),clearTimeout)},u.setInterval=function(){return new l(n.call(setInterval,window,arguments),clearInterval)},u.clearTimeout=u.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},u.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},u.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},u._unrefActive=u.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},u.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&i.call(arguments,1);return o[t]=!0,r(function(){o[t]&&(n?e.apply(null,n):e.call(null),u.clearImmediate(t))}),t},u.clearImmediate="function"==typeof t?t:function(e){delete o[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":7,timers:8}],9:[function(e,L,t){(function(k,S){!function(){"use strict";function z(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}}z.normalize=function(e){return Array.isArray(e)?z("[",void 0,void 0,z.normalizeChildren(e),void 0,void 0):null!=e&&"object"!=typeof e?z("#",void 0,void 0,!1===e?"":e,void 0,void 0):e},z.normalizeChildren=function(e){for(var t=0;t<e.length;t++)e[t]=z.normalize(e[t]);return e};var s=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,u={},c={}.hasOwnProperty;function f(e){for(var t in e)if(c.call(e,t))return!1;return!0}function e(e){var t,n=arguments[1],r=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 i=u[e]||function(e){for(var t,n="div",r=[],i={};t=s.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 l=t[6];l&&(l=l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===t[4]?r.push(l):i[t[4]]=""===l?l:l||!0}}return 0<r.length&&(i.className=r.join(" ")),u[e]={tag:n,attrs:i}}(e);if(null==n?n={}:("object"!=typeof n||null!=n.tag||Array.isArray(n))&&(n={},r=1),arguments.length===r+1)t=arguments[r],Array.isArray(t)||(t=[t]);else for(t=[];r<arguments.length;)t.push(arguments[r++]);var o=z.normalizeChildren(t);return"string"==typeof e?function(e,t,n){var r,i,o=!1,a=t.className||t.class;if(!f(e.attrs)&&!f(t)){var l={};for(var s in t)c.call(t,s)&&(l[s]=t[s]);t=l}for(var s in e.attrs)c.call(e.attrs,s)&&(t[s]=e.attrs[s]);for(var s in void 0!==a&&(void 0!==t.class&&(t.class=void 0,t.className=a),null!=e.attrs.className&&(t.className=e.attrs.className+" "+a)),t)if(c.call(t,s)&&"key"!==s){o=!0;break}return Array.isArray(n)&&1===n.length&&null!=n[0]&&"#"===n[0].tag?i=n[0].children:r=n,z(e.tag,t.key,o?t:void 0,r,i)}(i,n,o):z(e,n.key,n,o)}e.trust=function(e){return null==e&&(e=""),z("<",void 0,void 0,e,void 0,void 0)},e.fragment=function(e,t){return z("[",e.key,e,z.normalizeChildren(t),void 0,void 0)};var t=e;if((d=function(e){if(!(this instanceof d))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var o=this,a=[],l=[],i=t(a,!0),s=t(l,!1),u=o._instance={resolvers:a,rejectors:l},c="function"==typeof S?S:setTimeout;function t(r,i){return function t(n){var e;try{if(!i||null==n||"object"!=typeof n&&"function"!=typeof n||"function"!=typeof(e=n.then))c(function(){i||0!==r.length||console.error("Possible unhandled promise rejection:",n);for(var e=0;e<r.length;e++)r[e](n);a.length=0,l.length=0,u.state=i,u.retry=function(){t(n)}});else{if(n===o)throw new TypeError("Promise can't be resolved w/ itself");f(e.bind(n))}}catch(e){s(e)}}}function f(e){var n=0;function t(t){return function(e){0<n++||t(e)}}var r=t(s);try{e(t(i),r)}catch(e){r(e)}}f(e)}).prototype.then=function(e,t){var i,o,a=this._instance;function n(t,e,n,r){e.push(function(e){if("function"!=typeof t)n(e);else try{i(t(e))}catch(e){o&&o(e)}}),"function"==typeof a.retry&&r===a.state&&a.retry()}var r=new d(function(e,t){i=e,o=t});return n(e,a.resolvers,i,!0),n(t,a.rejectors,o,!1),r},d.prototype.catch=function(e){return this.then(null,e)},d.resolve=function(t){return t instanceof d?t:new d(function(e){e(t)})},d.reject=function(n){return new d(function(e,t){t(n)})},d.all=function(l){return new d(function(n,r){var i=l.length,o=0,a=[];if(0===l.length)n([]);else for(var e=0;e<l.length;e++)!function(t){function e(e){o++,a[t]=e,o===i&&n(a)}null==l[t]||"object"!=typeof l[t]&&"function"!=typeof l[t]||"function"!=typeof l[t].then?e(l[t]):l[t].then(e,r)}(e)})},d.race=function(r){return new d(function(e,t){for(var n=0;n<r.length;n++)r[n].then(e,t)})},"undefined"!=typeof window){void 0===window.Promise&&(window.Promise=d);var d=window.Promise}else if(void 0!==k){void 0===k.Promise&&(k.Promise=d);d=k.Promise}var p=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return"";var r=[];for(var t in e)i(t,e[t]);return r.join("&");function i(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)i(e+"["+n+"]",t[n]);else if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)i(e+"["+n+"]",t[n]);else r.push(encodeURIComponent(e)+(null!=t&&""!==t?"="+encodeURIComponent(t):""))}},m=new RegExp("^file://","i"),n=function(s,r){var t,o=0;function a(){var i=0;function o(){0==--i&&"function"==typeof t&&t()}return function t(n){var r=n.then;return n.then=function(){i++;var e=r.apply(n,arguments);return e.then(o,function(e){if(o(),0===i)throw e}),t(e)},n}}function u(e,t){if("string"==typeof e){var n=e;null==(e=t||{}).url&&(e.url=n)}return e}function c(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 f(e,t){var n=p(t);if(""!==n){var r=e.indexOf("?")<0?"?":"&";e+=r+n}return e}function d(t){try{return""!==t?JSON.parse(t):null}catch(e){throw new Error(t)}}function h(e){return e.responseText}function v(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}return{request:function(l,e){var t=a();l=u(l,e);var n=new r(function(r,i){null==l.method&&(l.method="GET"),l.method=l.method.toUpperCase();var e="GET"!==l.method&&"TRACE"!==l.method&&("boolean"!=typeof l.useBody||l.useBody);"function"!=typeof l.serialize&&(l.serialize="undefined"!=typeof FormData&&l.data instanceof FormData?function(e){return e}:JSON.stringify),"function"!=typeof l.deserialize&&(l.deserialize=d),"function"!=typeof l.extract&&(l.extract=h),l.url=c(l.url,l.data),e?l.data=l.serialize(l.data):l.url=f(l.url,l.data);var o=new s.XMLHttpRequest,a=!1,t=o.abort;for(var n in o.abort=function(){a=!0,t.call(o)},o.open(l.method,l.url,"boolean"!=typeof l.async||l.async,"string"==typeof l.user?l.user:void 0,"string"==typeof l.password?l.password:void 0),l.serialize!==JSON.stringify||!e||l.headers&&l.headers.hasOwnProperty("Content-Type")||o.setRequestHeader("Content-Type","application/json; charset=utf-8"),l.deserialize!==d||l.headers&&l.headers.hasOwnProperty("Accept")||o.setRequestHeader("Accept","application/json, text/*"),l.withCredentials&&(o.withCredentials=l.withCredentials),l.headers)({}).hasOwnProperty.call(l.headers,n)&&o.setRequestHeader(n,l.headers[n]);"function"==typeof l.config&&(o=l.config(o,l)||o),o.onreadystatechange=function(){if(!a&&4===o.readyState)try{var e=l.extract!==h?l.extract(o,l):l.deserialize(l.extract(o,l));if(200<=o.status&&o.status<300||304===o.status||m.test(l.url))r(v(l.type,e));else{var t=new Error(o.responseText);for(var n in e)t[n]=e[n];i(t)}}catch(e){i(e)}},e&&null!=l.data?o.send(l.data):o.send()});return!0===l.background?n:t(n)},jsonp:function(i,e){var t=a();i=u(i,e);var n=new r(function(t,e){var n=i.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+o++,r=s.document.createElement("script");s[n]=function(e){r.parentNode.removeChild(r),t(v(i.type,e)),delete s[n]},r.onerror=function(){r.parentNode.removeChild(r),e(new Error("JSONP request failed")),delete s[n]},null==i.data&&(i.data={}),i.url=c(i.url,i.data),i.data[i.callbackKey||"callback"]=n,r.src=f(i.url,i.data),s.document.documentElement.appendChild(r)});return!0===i.background?n:t(n)},setCompletionCallback:function(e){t=e}}}(window,d),r=function(e){var a,d=e.document,u=d.createDocumentFragment(),t={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function h(e){return e.attrs&&e.attrs.xmlns||t[e.tag]}function b(e,t,n,r,i,o,a){for(var l=n;l<r;l++){var s=t[l];null!=s&&x(e,s,i,a,o)}}function x(e,t,n,r,i){var o,a,l,s=t.tag;if("string"!=typeof s)return function(e,t,n,r,i){{if(p(t,n),null!=t.instance){var o=x(e,t.instance,n,r,i);return t.dom=t.instance.dom,t.domSize=null!=t.dom?t.instance.domSize:0,k(e,o,i),o}return t.domSize=0,u}}(e,t,n,r,i);switch(t.state={},null!=t.attrs&&j(t.attrs,t,n),s){case"#":return o=e,l=i,(a=t).dom=d.createTextNode(a.children),k(o,a.dom,l),a.dom;case"<":return v(e,t,i);case"[":return function(e,t,n,r,i){var o=d.createDocumentFragment();if(null!=t.children){var a=t.children;b(o,a,0,a.length,n,null,r)}return t.dom=o.firstChild,t.domSize=o.childNodes.length,k(e,o,i),o}(e,t,n,r,i);default:return function(e,t,n,r,i){var o=t.tag,a=t.attrs,l=a&&a.is,s=(r=h(t)||r)?l?d.createElementNS(r,o,{is:l}):d.createElementNS(r,o):l?d.createElement(o,{is:l}):d.createElement(o);t.dom=s,null!=a&&function(e,t,n){for(var r in t)w(e,r,null,t[r],n)}(t,a,r);if(k(e,s,i),null!=t.attrs&&null!=t.attrs.contenteditable)y(t);else if(null!=t.text&&(""!==t.text?s.textContent=t.text:t.children=[z("#",void 0,void 0,t.text,void 0,void 0)]),null!=t.children){var u=t.children;b(s,u,0,u.length,n,null,r),f=(c=t).attrs,"select"===c.tag&&null!=f&&("value"in f&&w(c,"value",null,f.value,void 0),"selectedIndex"in f&&w(c,"selectedIndex",null,f.selectedIndex,void 0))}var c,f;return s}(e,t,n,r,i)}}function v(e,t,n){var r={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"}[(t.children.match(/^\s*?<(\w+)/im)||[])[1]]||"div",i=d.createElement(r);i.innerHTML=t.children,t.dom=i.firstChild,t.domSize=i.childNodes.length;for(var o,a=d.createDocumentFragment();o=i.firstChild;)a.appendChild(o);return k(e,a,n),a}function p(e,t){var n;if("function"==typeof e.tag.view){if(e.state=Object.create(e.tag),null!=(n=e.state.view).$$reentrantLock$$)return u;n.$$reentrantLock$$=!0}else{if(e.state=void 0,null!=(n=e.tag).$$reentrantLock$$)return u;n.$$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&&j(e.attrs,e,t),j(e._state,e,t),e.instance=z.normalize(e._state.view.call(e.state,e)),e.instance===e)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null}function m(e,t,n,r,i,o,a){if(t!==n&&(null!=t||null!=n))if(null==t)b(e,n,0,n.length,i,o,a);else if(null==n)S(t,0,t.length,n);else{if(t.length===n.length){for(var l=!1,s=0;s<n.length;s++)if(null!=n[s]&&null!=t[s]){l=null==n[s].key&&null==t[s].key;break}if(l){for(s=0;s<t.length;s++)t[s]!==n[s]&&(null==t[s]&&null!=n[s]?x(e,n[s],i,a,T(t,s+1,o)):null==n[s]?S(t,s,s+1,n):E(e,t[s],n[s],i,T(t,s+1,o),r,a));return}}if(r=r||function(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}(t,n)){var u=t.pool;t=t.concat(t.pool)}for(var c,f=0,d=0,h=t.length-1,v=n.length-1;f<=h&&d<=v;){if((m=t[f])!==(y=n[d])||r)if(null==m)f++;else if(null==y)d++;else if(m.key===y.key){var p=null!=u&&f>=t.length-u.length||null==u&&r;d++,E(e,m,y,i,T(t,++f,o),p,a),r&&m.tag===y.tag&&k(e,_(m),o)}else{if((m=t[h])!==y||r)if(null==m)h--;else if(null==y)d++;else{if(m.key!==y.key)break;p=null!=u&&h>=t.length-u.length||null==u&&r;E(e,m,y,i,T(t,h+1,o),p,a),(r||d<v)&&k(e,_(m),T(t,f,o)),h--,d++}else h--,d++}else f++,d++}for(;f<=h&&d<=v;){var m,y;if((m=t[h])!==(y=n[v])||r)if(null==m)h--;else if(null==y)v--;else if(m.key===y.key){p=null!=u&&h>=t.length-u.length||null==u&&r;E(e,m,y,i,T(t,h+1,o),p,a),r&&m.tag===y.tag&&k(e,_(m),o),null!=m.dom&&(o=m.dom),h--,v--}else{if(c||(c=A(t,h)),null!=y){var g=c[y.key];if(null!=g){var w=t[g];p=null!=u&&g>=t.length-u.length||null==u&&r;E(e,w,y,i,T(t,h+1,o),r,a),k(e,_(w),o),t[g].skip=!0,null!=w.dom&&(o=w.dom)}else{o=x(e,y,i,a,o)}}v--}else h--,v--;if(v<d)break}b(e,n,d,v+1,i,o,a),S(t,f,h+1,n)}}function E(e,t,n,r,i,o,a){var l,s,u,c,f=t.tag;if(f===n.tag){if(n.state=t.state,n._state=t._state,n.events=t.events,!o&&function(e,t){var n,r;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));if(!(void 0===n&&void 0===r||n||r))return e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,!0;return!1}(n,t))return;if("string"==typeof f)switch(null!=n.attrs&&(o?(n.state={},j(n.attrs,n,r)):O(n.attrs,n,r)),f){case"#":!function(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children);t.dom=e.dom}(t,n);break;case"<":l=e,u=n,c=i,(s=t).children!==u.children?(_(s),v(l,u,c)):(u.dom=s.dom,u.domSize=s.domSize);break;case"[":!function(e,t,n,r,i,o,a){m(e,t.children,n.children,r,i,o,a);var l=0,s=n.children;if((n.dom=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)}}(e,t,n,o,r,i,a);break;default:!function(e,t,n,r,i){var o=t.dom=e.dom;i=h(t)||i,"textarea"===t.tag&&(null==t.attrs&&(t.attrs={}),null!=t.text&&(t.attrs.value=t.text,t.text=void 0));(function(e,t,n,r){if(null!=n)for(var i in n)w(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]||L(i)?"key"!==i&&e.dom.removeAttribute(i):C(e,i,void 0))})(t,e.attrs,t.attrs,i),null!=t.attrs&&null!=t.attrs.contenteditable?y(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=[z("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=t.text&&(t.children=[z("#",void 0,void 0,t.text,void 0,void 0)]),m(o,e.children,t.children,n,r,null,i))}(t,n,o,r,a)}else!function(e,t,n,r,i,o,a){if(o)p(n,r);else{if(n.instance=z.normalize(n._state.view.call(n.state,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");null!=n.attrs&&O(n.attrs,n,r),O(n._state,n,r)}null!=n.instance?(null==t.instance?x(e,n.instance,r,a,i):E(e,t.instance,n.instance,r,i,o,a),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=t.instance?(g(t.instance,null),n.dom=void 0,n.domSize=0):(n.dom=t.dom,n.domSize=t.domSize)}(e,t,n,r,i,o,a)}else g(t,null),x(e,n,r,a,i)}function A(e,t){var n={},r=0;for(r=0;r<t;r++){var i=e[r];if(null!=i){var o=i.key;null!=o&&(n[o]=r)}}return n}function _(e){var t=e.domSize;if(null!=t||null==e.dom){var n=d.createDocumentFragment();if(0<t){for(var r=e.dom;--t;)n.appendChild(r.nextSibling);n.insertBefore(r,n.firstChild)}return n}return e.dom}function T(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function k(e,t,n){n&&n.parentNode?e.insertBefore(t,n):e.appendChild(t)}function y(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:g(o,r))}}function g(r,i){var e,o=1,a=0;r.attrs&&"function"==typeof r.attrs.onbeforeremove&&(null!=(e=r.attrs.onbeforeremove.call(r.state,r))&&"function"==typeof e.then&&(o++,e.then(t,t)));"string"!=typeof r.tag&&"function"==typeof r._state.onbeforeremove&&(null!=(e=r._state.onbeforeremove.call(r.state,r))&&"function"==typeof e.then&&(o++,e.then(t,t)));function t(){if(++a===o&&(function e(t){t.attrs&&"function"==typeof t.attrs.onremove&&t.attrs.onremove.call(t.state,t);if("string"!=typeof t.tag)"function"==typeof t._state.onremove&&t._state.onremove.call(t.state,t),null!=t.instance&&e(t.instance);else{var n=t.children;if(Array.isArray(n))for(var r=0;r<n.length;r++){var i=n[r];null!=i&&e(i)}}}(r),r.dom)){var e=r.domSize||1;if(1<e)for(var t=r.dom;--e;)l(t.nextSibling);l(r.dom),null==i||null!=r.domSize||null!=(n=r.attrs)&&(n.oncreate||n.onupdate||n.onbeforeremove||n.onremove)||"string"!=typeof r.tag||(i.pool?i.pool.push(r):i.pool=[r])}var n}t()}function l(e){var t=e.parentNode;null!=t&&t.removeChild(e)}function w(e,t,n,r,i){var o=e.dom;if("key"!==t&&"is"!==t&&(n!==r||(a=e,"value"===(l=t)||"checked"===l||"selectedIndex"===l||"selected"===l&&a.dom===d.activeElement)||"object"==typeof r)&&void 0!==r&&!L(t)){var a,l,s,u,c=t.indexOf(":");if(-1<c&&"xlink"===t.substr(0,c))o.setAttributeNS("http://www.w3.org/1999/xlink",t.slice(c+1),r);else if("o"===t[0]&&"n"===t[1]&&"function"==typeof r)C(e,t,r);else if("style"===t)!function(e,t,n){t===n&&(e.style.cssText="",t=null);if(null==n)e.style.cssText="";else if("string"==typeof n)e.style.cssText=n;else{for(var r in"string"==typeof t&&(e.style.cssText=""),n)e.style[r]=n[r];if(null!=t&&"string"!=typeof t)for(var r in t)r in n||(e.style[r]="")}}(o,n,r);else if(t in o&&("href"!==(u=t)&&"list"!==u&&"form"!==u&&"width"!==u&&"height"!==u)&&void 0===i&&!((s=e).attrs.is||-1<s.tag.indexOf("-"))){if("value"===t){var f=""+r;if(("input"===e.tag||"textarea"===e.tag)&&e.dom.value===f&&e.dom===d.activeElement)return;if("select"===e.tag)if(null===r){if(-1===e.dom.selectedIndex&&e.dom===d.activeElement)return}else if(null!==n&&e.dom.value===f&&e.dom===d.activeElement)return;if("option"===e.tag&&null!=n&&e.dom.value===f)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 L(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function C(e,t,n){var r=e.dom,i="function"!=typeof a?n:function(e){var t=n.call(r,e);return a.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 j(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 O(e,t,n){"function"==typeof e.onupdate&&n.push(e.onupdate.bind(t.state,t))}return{render:function(e,t){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var n=[],r=d.activeElement,i=e.namespaceURI;null==e.vnodes&&(e.textContent=""),Array.isArray(t)||(t=[t]),m(e,e.vnodes,z.normalizeChildren(t),!1,n,null,"http://www.w3.org/1999/xhtml"===i?void 0:i),e.vnodes=t,null!=r&&d.activeElement!==r&&r.focus();for(var o=0;o<n.length;o++)n[o]()},setEventCallback:function(e){return a=e}}};var i=function(e){var t=r(e);t.setEventCallback(function(e){!1===e.redraw?e.redraw=void 0:n()});var a=[];function l(e){var t=a.indexOf(e);-1<t&&a.splice(t,2)}function n(){for(var e=1;e<a.length;e+=2)a[e]()}return{subscribe:function(e,t){var n,r,i,o;l(e),a.push(e,(n=t,r=0,i=null,o="function"==typeof requestAnimationFrame?requestAnimationFrame:setTimeout,function(){var e=Date.now();0===r||16<=e-r?(r=e,n()):null===i&&(i=o(function(){i=null,n(),r=Date.now()},16-(e-r)))}))},unsubscribe:l,redraw:n,render:t.render}}(window);n.setCompletionCallback(i.redraw);var o;t.mount=(o=i,function(e,t){if(null===t)return o.render(e,[]),void o.unsubscribe(e);if(null==t.view&&"function"!=typeof t)throw new Error("m.mount(element, component) expects a component, not a vnode");o.subscribe(e,function(){o.render(e,z(t))}),o.redraw()});var a,l,h,v,y,g,w,b,x,E=d,A=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;-1<a.indexOf("[")&&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)null==r[a=s.slice(0,c).join()]&&(r[a]=0),f=r[a]++;null==u[f]&&(u[f]=v?l:h?[]:{}),u=u[f]}}return n},_=function(c){var n,f="function"==typeof c.history.pushState,r="function"==typeof S?S:setTimeout;function e(e){var t=c.location[e].replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent);return"pathname"===e&&"/"!==t[0]&&(t="/"+t),t}function d(e,t,n){var r=e.indexOf("?"),i=e.indexOf("#"),o=-1<r?r:-1<i?i:e.length;if(-1<r){var a=-1<i?i:e.length,l=A(e.slice(r+1,a));for(var s in l)t[s]=l[s]}if(-1<i){var u=A(e.slice(i+1));for(var s in u)n[s]=u[s]}return e.slice(0,o)}var h={prefix:"#!",getPath:function(){switch(h.prefix.charAt(0)){case"#":return e("hash").slice(h.prefix.length);case"?":return e("search").slice(h.prefix.length)+e("hash");default:return e("pathname").slice(h.prefix.length)+e("search")+e("hash")}},setPath:function(e,n,t){var r={},i={};if(e=d(e,r,i),null!=n){for(var o in n)r[o]=n[o];e=e.replace(/:([^\/]+)/g,function(e,t){return delete r[t],n[t]})}var a=p(r);a&&(e+="?"+a);var l=p(i);if(l&&(e+="#"+l),f){var s=t?t.state:null,u=t?t.title:null;c.onpopstate(),t&&t.replace?c.history.replaceState(s,u,h.prefix+e):c.history.pushState(s,u,h.prefix+e)}else c.location.href=h.prefix+e}};return h.defineRoutes=function(l,s,u){function e(){var r=h.getPath(),i={},e=d(r,i,i),t=c.history.state;if(null!=t)for(var n in t)i[n]=t[n];for(var o in l){var a=new RegExp("^"+o.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(a.test(e))return void e.replace(a,function(){for(var e=o.match(/:[^\/]+/g)||[],t=[].slice.call(arguments,1,-2),n=0;n<e.length;n++)i[e[n].replace(/:|\./g,"")]=decodeURIComponent(t[n]);s(l[o],i,r,o)})}u(r,i)}var t;f?c.onpopstate=(t=e,function(){null==n&&(n=r(function(){n=null,t()}))}):"#"===h.prefix.charAt(0)&&(c.onhashchange=e),e()},h};t.route=(a=window,l=i,b=_(a),(x=function(e,t,n){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var o=function(){null!=h&&l.render(e,h(z(v,y.key,y)))},a=function(e){if(e===t)throw new Error("Could not resolve default route "+t);b.setPath(t,null,{replace:!0})};b.defineRoutes(n,function(t,n,r){var i=w=function(e,t){i===w&&(v=null==t||"function"!=typeof t.view&&"function"!=typeof t?"div":t,y=n,g=r,w=null,h=(e.render||function(e){return e}).bind(e),o())};t.view||"function"==typeof t?i({},t):t.onmatch?E.resolve(t.onmatch(n,r)).then(function(e){i(t,e)},a):i(t,"div")},a),l.subscribe(e,o)}).set=function(e,t,n){null!=w&&((n=n||{}).replace=!0),w=null,b.setPath(e,t,n)},x.get=function(){return g},x.prefix=function(e){b.prefix=e},x.link=function(e){e.dom.setAttribute("href",b.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(b.prefix)&&(t=t.slice(b.prefix.length)),x.set(t,void 0,void 0)}}},x.param=function(e){return void 0!==y&&void 0!==e?y[e]:y},x),t.withAttr=function(t,n,r){return function(e){n.call(r||this,t in e.currentTarget?e.currentTarget[t]:e.currentTarget.getAttribute(t))}};var T=r(window);t.render=T.render,t.redraw=i.redraw,t.request=n.request,t.jsonp=n.jsonp,t.parseQueryString=A,t.buildQueryString=p,t.version="1.1.6",t.vnode=z,void 0!==L?L.exports=t:window.m=t}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:8}],10:[function(e,t,n){function u(r){document.addEventListener("mouseover",function(e){var t=e.target,n=r(t);n||(n=(t=t.parentElement)&&r(t)),n&&u.show(t,n,!0)})}u.show=function(e,t,l){var s="data-tlite";t=t||{},(e.tooltip||function(e,t){var n,r,i;function o(){u.hide(e,!0)}function a(){n||(n=function(l,e,t){var s=document.createElement("span"),n=t.grav||l.getAttribute("data-tlite")||"n";s.innerHTML=e,l.appendChild(s);var u=n[0]||"",c=n[1]||"";function r(){s.className="tlite tlite-"+u+c;var e=l.offsetTop,t=l.offsetLeft;s.offsetParent===l&&(e=t=0);var n=l.offsetWidth,r=l.offsetHeight,i=s.offsetHeight,o=s.offsetWidth,a=t+n/2;s.style.top=("s"===u?e-i-10:"n"===u?e+r+10:e+r/2-i/2)+"px",s.style.left=("w"===c?t:"e"===c?t+n-o:"w"===u?t+n+10:"e"===u?t-o-10:a-o/2)+"px"}r();var i=s.getBoundingClientRect();"s"===u&&i.top<0?(u="n",r()):"n"===u&&i.bottom>window.innerHeight?(u="s",r()):"e"===u&&i.left<0?(u="w",r()):"w"===u&&i.right>window.innerWidth&&(u="e",r());return s.className+=" tlite-visible",s}(e,i,t))}return e.addEventListener("mousedown",o),e.addEventListener("mouseleave",o),e.tooltip={show:function(){i=e.title||e.getAttribute(s)||i,e.title="",e.setAttribute(s,""),i&&!r&&(r=setTimeout(a,l?150:1))},hide:function(e){if(l===e){r=clearTimeout(r);var t=n&&n.parentNode;t&&t.removeChild(n),n=void 0}}}}(e,t)).show()},u.hide=function(e,t){e.tooltip&&e.tooltip.hide(t)},void 0!==t&&t.exports&&(t.exports=u)},{}],11:[function(e,a,t){!function(e){"use strict";function t(){}var n=t.prototype,r=e.EventEmitter;function o(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}n.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp)for(n in t={},r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n]);else t=r[e]||(r[e]=[]);return t},n.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},n.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},n.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),i="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&-1===o(r[n],t)&&r[n].push(i?t:{listener:t,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},n.removeListener=function(e,t){var n,r,i=this.getListenersAsObject(e);for(r in i)i.hasOwnProperty(r)&&-1!==(n=o(i[r],t))&&i[r].splice(n,1);return this},n.off=i("removeListener"),n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.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},n.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},n.removeAllListeners=i("removeEvent"),n.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++)!0===(r=n[i]).once&&this.removeListener(e,r.listener),r.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},n.trigger=i("emitEvent"),n.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return e.EventEmitter=r,t},"function"==typeof l&&l.amd?l(function(){return t}):"object"==typeof a&&a.exports?a.exports=t:e.EventEmitter=t}("undefined"!=typeof window?window:this||{})},{}]},{},[1])}();
|
2 |
//# 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","_tlite2","obj","__esModule","default","_interopRequireDefault","m","window","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","el","className","indexOf","ListFetcher","mount","mc4wp","deps","mithril","./admin/helpers.js","./admin/list-fetcher.js","./admin/settings.js","./admin/tabs.js","tlite","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","callNow","clearTimeout","setTimeout","apply","showIfElements","getAttribute","checked","conditionMet","value","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","disabled","trust","fetching_mailchimp_lists_can_take_a_while","fetching_mailchimp_lists_done","fetching_mailchimp_lists_error","4","_typeof","Symbol","iterator","constructor","updateSelectedLists","selectedLists","listInputs","input","push","trigger","querySelector","on","rows","searchKey","searchValue","filter","getSelectedListsWhere","replace","getSelectedLists","5","URL","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","init","./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","hyperscript","start","cached","selectorCache","classes","selectorParser","exec","attrValue","compileSelector","isArray","normalized","normalizeChildren","childList","hasAttrs","class","hasOwn","execSelector","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","callback","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","finalizer","complete","oncompletion","finalize","promise0","then0","extra","interpolate","tokens","slice","assemble","querystring","deserialize","extract","xhr","responseText","cast","type0","callbackCount","request","toUpperCase","useBody","serialize","FormData","stringify","XMLHttpRequest","aborted","_abort","abort","async","user","password","headers","setRequestHeader","withCredentials","onreadystatechange","readyState","response","status","test","send","background","jsonp","callbackName","Math","round","random","script","createElement","parentNode","removeChild","callbackKey","src","documentElement","appendChild","setCompletionCallback","_8","coreRenderer","getNameSpace","vnode","xmlns","nameSpace","createNodes","parent","vnodes","end","hooks","nextSibling","ns","createNode","initComponent","insertNode","$emptyFragment","createComponent","initLifecycle","$doc","createTextNode","createText","createHTML","createDocumentFragment","firstChild","childNodes","createFragment","attrs2","is","createElementNS","key2","setAttr","setAttrs","contenteditable","setContentEditable","textContent","selectedIndex","setLateAttrs","parent1","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","temp","innerHTML","child","sentinel","create","$$reentrantLock$$","updateNodes","old","recycling","removeNodes","isUnkeyed","getNextSibling","updateNode","pool","abs","oldChildrenLength","poolChildrenLength","vnodesChildrenLength","isRecyclable","concat","map","oldStart","oldEnd","v","shouldRecycle","toFragment","getKeyMap","oldIndex","movable","oldTag","forceVnodeUpdate","forceComponentUpdate","onbeforeupdate","shouldNotUpdate","updateLifecycle","nodeValue","updateText","updateHTML","updateFragment","isLifecycleMethod","updateEvent","updateAttrs","updateElement","removeNode","updateComponent","count0","insertBefore","content","continuation","called","expected","onremove","removeNodeFromDOM","source","oncreate","onupdate","onbeforeremove","hasIntegrationMethods","result","attr","activeElement","isFormAttribute","nsLastIndex","substr","setAttributeNS","cssText","updateStyle","isAttribute","isCustomElement","normalized0","onevent","eventName","removeEventListener","oninit","svg","math","render","active","namespace","namespaceURI","focus","setEventCallback","redrawService","unsubscribe","key1","index","callbacks","splice","renderService","subscribe","last","pending","requestAnimationFrame","now","Date","throttle","_11","redrawService0","root","component","_16","parseQueryString","string","charAt","entries","data0","counters","entry","key5","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","isValue","coreRouter","normalize1","fragment0","parsePath","path","queryData","hashData","queryIndex","hashIndex","pathEnd","queryEnd","queryParams","key4","hashParams","asyncId","supportsPushState","callAsync0","router","prefix","getPath","setPath","options","match2","token","hash","onpopstate","defineRoutes","routes","resolveRoute","params","pathname","k","route0","matcher","keys","callback0","debounceAsync","onhashchange","route","render1","attrs3","currentPath","lastUpdate","routeService","defaultRoute","run1","bail","payload","update","routeResolver","comp","onmatch","resolved","set","prefix0","link","vnode1","onclick","ctrlKey","metaKey","shiftKey","which","param","key3","_20","withAttr","attrName","callback1","currentTarget","_28","version","8","getTooltipOpts","target","opts","isAuto","fallbackAttrib","tooltip","autoHide","fadeIn","tooltipEl","positionTooltip","vertGrav","horzGrav","top","offsetTop","left","offsetLeft","offsetParent","width","offsetWidth","height","offsetHeight","tooltipHeight","tooltipWidth","centerEl","grav","rect","getBoundingClientRect","bottom","innerHeight","right","innerWidth","createTooltip","showTimer","isAutoHiding","Tooltip","9","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,IAAIA,OAAUC,EAAeC,OAASD,GAAW,WAAY,SAASE,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATV,GAAqBA,EAAQ,IAAIS,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OA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B,KAAK0jB,eAAeZ,EAAKP,EAASA,UAG3BA,EAASA,SAASjiB,MAAMN,KAAMC,SAExBD,KAAKukB,uBAClBvkB,KAAK0jB,eAAeZ,EAAKP,EAASA,UAMlD,OAAOviB,MAMX2iB,EAAMve,QAAUoe,EAAM,aAUtBG,EAAM6B,KAAO,SAAc1B,GACvB,IAAI7iB,EAAOT,MAAMC,UAAU0O,MAAM5R,KAAK2D,UAAW,GACjD,OAAOF,KAAKqkB,UAAUvB,EAAK7iB,IAW/B0iB,EAAM8B,mBAAqB,SAA4B9jB,GAEnD,OADAX,KAAK0kB,iBAAmB/jB,EACjBX,MAWX2iB,EAAM4B,oBAAsB,WACxB,OAAIvkB,KAAK4H,eAAe,qBACb5H,KAAK0kB,kBAapB/B,EAAMI,WAAa,WACf,OAAO/iB,KAAKmkB,UAAYnkB,KAAKmkB,aAQjCjnB,EAAaynB,WAAa,WAEtB,OADAroB,EAAQY,aAAe0lB,EAChB1lB,GAIW,mBAAX1B,GAAyBA,EAAOopB,IACvCppB,EAAO,WACH,OAAO0B,IAGY,iBAAXR,GAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUY,EAGjBZ,EAAQY,aAAeA,EA5d9B,CA8dC8C,oBAES,IA3yEX","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\n\nvar _tlite = require('tlite');\n\nvar _tlite2 = _interopRequireDefault(_tlite);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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(0, _tlite2.default)(function (el) {\n return el.className.indexOf('mc4wp-tooltip') > -1;\n});\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,\"tlite\":8,\"wolfy87-eventemitter\":9}],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 && !(args.headers && args.headers.hasOwnProperty(\"Content-Type\"))) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (args.deserialize === deserialize && !(args.headers && args.headers.hasOwnProperty(\"Accept\"))) {\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\t// document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement\n\t\tif (active != null && $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.5\"\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){\nfunction tlite(getTooltipOpts) {\n document.addEventListener('mouseover', function (e) {\n var el = e.target;\n var opts = getTooltipOpts(el);\n\n if (!opts) {\n el = el.parentElement;\n opts = el && getTooltipOpts(el);\n }\n\n opts && tlite.show(el, opts, true);\n });\n}\n\ntlite.show = function (el, opts, isAuto) {\n var fallbackAttrib = 'data-tlite';\n opts = opts || {};\n\n (el.tooltip || Tooltip(el, opts)).show();\n\n function Tooltip(el, opts) {\n var tooltipEl;\n var showTimer;\n var text;\n\n el.addEventListener('mousedown', autoHide);\n el.addEventListener('mouseleave', autoHide);\n\n function show() {\n text = el.title || el.getAttribute(fallbackAttrib) || text;\n el.title = '';\n el.setAttribute(fallbackAttrib, '');\n text && !showTimer && (showTimer = setTimeout(fadeIn, isAuto ? 150 : 1))\n }\n\n function autoHide() {\n tlite.hide(el, true);\n }\n\n function hide(isAutoHiding) {\n if (isAuto === isAutoHiding) {\n showTimer = clearTimeout(showTimer);\n var parent = tooltipEl && tooltipEl.parentNode;\n parent && parent.removeChild(tooltipEl);\n tooltipEl = undefined;\n }\n }\n\n function fadeIn() {\n if (!tooltipEl) {\n tooltipEl = createTooltip(el, text, opts);\n }\n }\n\n return el.tooltip = {\n show: show,\n hide: hide\n };\n }\n\n function createTooltip(el, text, opts) {\n var tooltipEl = document.createElement('span');\n var grav = opts.grav || el.getAttribute('data-tlite') || 'n';\n\n tooltipEl.innerHTML = text;\n\n el.appendChild(tooltipEl);\n\n var vertGrav = grav[0] || '';\n var horzGrav = grav[1] || '';\n\n function positionTooltip() {\n tooltipEl.className = 'tlite ' + 'tlite-' + vertGrav + horzGrav;\n\n var arrowSize = 10;\n var top = el.offsetTop;\n var left = el.offsetLeft;\n\n if (tooltipEl.offsetParent === el) {\n top = left = 0;\n }\n\n var width = el.offsetWidth;\n var height = el.offsetHeight;\n var tooltipHeight = tooltipEl.offsetHeight;\n var tooltipWidth = tooltipEl.offsetWidth;\n var centerEl = left + (width / 2);\n\n tooltipEl.style.top = (\n vertGrav === 's' ? (top - tooltipHeight - arrowSize) :\n vertGrav === 'n' ? (top + height + arrowSize) :\n (top + (height / 2) - (tooltipHeight / 2))\n ) + 'px';\n\n tooltipEl.style.left = (\n horzGrav === 'w' ? left :\n horzGrav === 'e' ? left + width - tooltipWidth :\n vertGrav === 'w' ? (left + width + arrowSize) :\n vertGrav === 'e' ? (left - tooltipWidth - arrowSize) :\n (centerEl - tooltipWidth / 2)\n ) + 'px';\n }\n\n positionTooltip();\n\n var rect = tooltipEl.getBoundingClientRect();\n\n if (vertGrav === 's' && rect.top < 0) {\n vertGrav = 'n';\n positionTooltip();\n } else if (vertGrav === 'n' && rect.bottom > window.innerHeight) {\n vertGrav = 's';\n positionTooltip();\n } else if (vertGrav === 'e' && rect.left < 0) {\n vertGrav = 'w';\n positionTooltip();\n } else if (vertGrav === 'w' && rect.right > window.innerWidth) {\n vertGrav = 'e';\n positionTooltip();\n }\n\n tooltipEl.className += ' tlite-visible';\n\n return tooltipEl;\n }\n};\n\ntlite.hide = function (el, isAuto) {\n el.tooltip && el.tooltip.hide(isAuto);\n};\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = tlite;\n}\n\n},{}],9:[function(require,module,exports){\n/*!\n * EventEmitter v5.2.4 - 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 })();"]}
|
1 |
+
{"version":3,"sources":["admin.js"],"names":["define","undefined","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","require","module","obj","_tlite","_tlite2","__esModule","default","m","window","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","el","className","indexOf","ListFetcher","mount","mc4wp","deps","mithril","./admin/helpers.js","./admin/list-fetcher.js","./admin/settings.js","./admin/tabs.js","tlite","wolfy87-eventemitter","2","showIfElements","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","callNow","clearTimeout","setTimeout","apply","config","JSON","parse","getAttribute","parentElements","inputs","hide","checked","conditionMet","value","visibility","opacity","inputElement","removeAttribute","setAttribute","parentElement","3","$","jQuery","mc4wp_vars","i18n","working","done","mailchimp","api_connected","lists","fetch","preventDefault","post","ajaxurl","action","data","success","location","reload","bind","fail","always","redraw","view","method","onsubmit","type","fetching_mailchimp_lists","renew_mailchimp_lists","disabled","trust","fetching_mailchimp_lists_can_take_a_while","fetching_mailchimp_lists_done","fetching_mailchimp_lists_error","4","_typeof","Symbol","iterator","constructor","querySelector","listInputs","selectedLists","updateSelectedLists","input","push","trigger","on","rows","searchKey","searchValue","listId","filter","replace","getSelectedLists","5","URL","$context","$tabs","find","$tabNavs","refererField","get","id","_open","tab","updateState","removeClass","css","nav","blur","url","setParameter","href","history","pushState","title","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","returnValue","each","substring","first","text","open","click","body","activeTab","replaceState","state","init","./url.js","6","query","hasOwnProperty","b","decodeURIComponent","build","ret","d","encodeURIComponent","join","key","7","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","concat","drainQueue","len","run","marker","runClearTimeout","Item","array","noop","nextTick","browser","env","argv","version","versions","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","8","setImmediate","clearImmediate","Function","slice","immediateIds","nextImmediateId","Timeout","clearFn","_id","_clearFn","setInterval","clearInterval","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","fn","process/browser.js","timers","9","global","Vnode","tag","attrs0","children","dom","attrs","domSize","_state","instance","skip","normalize","node","isArray","normalizeChildren","selectorParser","selectorCache","hasOwn","isEmpty","object","hyperscript","start","cached","classes","exec","attrValue","compileSelector","normalized","childList","hasAttrs","class","newAttrs","execSelector","html","fragment","attrs1","PromisePolyfill","executor","TypeError","self","resolvers","rejectors","resolveCurrent","rejectCurrent","_instance","callAsync","list","shouldAbsorb","execute","then","console","error","retry","executeOnce","runs","onerror","onFulfilled","onRejection","resolveNext","rejectNext","handle","callback","next","promise","resolve","reject","catch","all","total","count","values","consume","race","Promise","buildQueryString","Object","toString","key0","destructure","FILE_PROTOCOL_REGEX","RegExp","requestService","$window","oncompletion","callbackCount","finalizer","complete","finalize","promise0","then0","extra","interpolate","tokens","assemble","querystring","prefix","deserialize","extract","xhr","responseText","cast","type0","request","toUpperCase","useBody","serialize","FormData","stringify","XMLHttpRequest","aborted","_abort","abort","async","user","password","headers","setRequestHeader","withCredentials","onreadystatechange","readyState","response","status","test","send","background","jsonp","callbackName","Math","round","random","script","createElement","parentNode","removeChild","callbackKey","src","documentElement","appendChild","setCompletionCallback","_8","coreRenderer","onevent","$doc","$emptyFragment","createDocumentFragment","nameSpace","svg","math","getNameSpace","vnode","xmlns","createNodes","parent","vnodes","end","hooks","nextSibling","ns","createNode","initComponent","insertNode","createComponent","initLifecycle","createTextNode","createHTML","firstChild","childNodes","createFragment","attrs2","is","createElementNS","key2","setAttr","setAttrs","contenteditable","setContentEditable","textContent","selectedIndex","parent1","caption","thead","tbody","tfoot","tr","th","td","colgroup","col","temp","innerHTML","child","sentinel","create","$$reentrantLock$$","updateNodes","old","recycling","removeNodes","isUnkeyed","getNextSibling","updateNode","pool","abs","oldChildrenLength","poolChildrenLength","vnodesChildrenLength","isRecyclable","map","oldStart","oldEnd","v","shouldRecycle","toFragment","getKeyMap","oldIndex","movable","oldTag","forceVnodeUpdate","forceComponentUpdate","onbeforeupdate","shouldNotUpdate","updateLifecycle","nodeValue","updateText","updateFragment","isLifecycleMethod","updateEvent","updateAttrs","updateElement","removeNode","updateComponent","count0","insertBefore","content","result","expected","called","onbeforeremove","continuation","onremove","removeNodeFromDOM","source","oncreate","onupdate","attr","activeElement","nsLastIndex","substr","setAttributeNS","cssText","updateStyle","normalized0","eventName","removeEventListener","oninit","render","namespace","namespaceURI","focus","setEventCallback","redrawService","renderService","callbacks","unsubscribe","key1","index","splice","subscribe","last","pending","requestAnimationFrame","now","Date","_11","redrawService0","root","component","render1","attrs3","currentPath","lastUpdate","routeService","route","parseQueryString","string","charAt","entries","data0","counters","entry","key5","levels","cursor","pop","j","level","nextLevel","isNumber","isNaN","parseInt","isValue","coreRouter","asyncId","supportsPushState","callAsync0","normalize1","fragment0","parsePath","path","queryData","hashData","queryIndex","hashIndex","pathEnd","queryEnd","queryParams","key4","hashParams","router","getPath","setPath","options","match2","token","hash","onpopstate","defineRoutes","routes","resolveRoute","params","pathname","k","route0","matcher","keys","callback0","onhashchange","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","10","getTooltipOpts","target","opts","isAuto","fallbackAttrib","tooltip","tooltipEl","showTimer","autoHide","fadeIn","grav","vertGrav","horzGrav","positionTooltip","top","offsetTop","left","offsetLeft","offsetParent","width","offsetWidth","height","offsetHeight","tooltipHeight","tooltipWidth","centerEl","rect","getBoundingClientRect","bottom","innerHeight","right","innerWidth","createTooltip","isAutoHiding","Tooltip","11","proto","originalGlobalValue","indexOfListener","listener","alias","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","isValidListener","listenerIsWrapped","addOnceListener","defineEvent","defineEvents","evts","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","emitEvent","listenersMap","_getOnceReturnValue","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,IA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,EAAMyB,UAAY,SAAmBnB,EAAKhmB,GACtC,IACIuK,EACAsb,EACAlqB,EACAuM,EAJAkf,EAAernB,KAAKqmB,qBAAqBJ,GAO7C,IAAK9d,KAAOkf,EACR,GAAIA,EAAa1f,eAAeQ,GAG5B,IAFAqC,EAAY6c,EAAalf,GAAKgD,MAAM,GAE/BvP,EAAI,EAAGA,EAAI4O,EAAUlO,OAAQV,KAKR,KAFtBkqB,EAAWtb,EAAU5O,IAERqO,MACTjK,KAAKmK,eAAe8b,EAAKH,EAASA,UAG3BA,EAASA,SAASxlB,MAAMN,KAAMC,GAAQ,MAEhCD,KAAKsnB,uBAClBtnB,KAAKmK,eAAe8b,EAAKH,EAASA,UAMlD,OAAO9lB,MAMX2lB,EAAMvhB,QAAU2hB,EAAM,aAUtBJ,EAAMtb,KAAO,SAAc4b,GACvB,IAAIhmB,EAAOT,MAAMC,UAAU0L,MAAM9O,KAAK6D,UAAW,GACjD,OAAOF,KAAKonB,UAAUnB,EAAKhmB,IAW/B0lB,EAAM4B,mBAAqB,SAA4BvmB,GAEnD,OADAhB,KAAKwnB,iBAAmBxmB,EACjBhB,MAWX2lB,EAAM2B,oBAAsB,WACxB,OAAItnB,KAAK2H,eAAe,qBACb3H,KAAKwnB,kBAapB7B,EAAMO,WAAa,WACf,OAAOlmB,KAAKmnB,UAAYnnB,KAAKmnB,QAAU,KAQ3ClqB,EAAawqB,WAAa,WAEtB,OADArrB,EAAQa,aAAe2oB,EAChB3oB,GAIW,mBAAX5B,GAAyBA,EAAOqsB,IACvCrsB,EAAO,WACH,OAAO4B,IAGY,iBAAXR,GAAuBA,EAAOL,QAC1CK,EAAOL,QAAUa,EAGjBb,EAAQa,aAAeA,EA5d9B,CA8dmB,oBAAXD,OAAyBA,OAASgD,MAAQ,KAEjD,KAAK,GAAG,CAAC,IAlkFX","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\n\nvar _tlite = require('tlite');\n\nvar _tlite2 = _interopRequireDefault(_tlite);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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(0, _tlite2.default)(function (el) {\n return el.className.indexOf('mc4wp-tooltip') > -1;\n});\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\":9,\"tlite\":10,\"wolfy87-eventemitter\":11}],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// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],8:[function(require,module,exports){\n(function (setImmediate,clearImmediate){\nvar nextTick = require('process/browser.js').nextTick;\nvar apply = Function.prototype.apply;\nvar slice = Array.prototype.slice;\nvar immediateIds = {};\nvar nextImmediateId = 0;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) { timeout.close(); };\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// That's not how node.js implements it but the exposed api is the same.\nexports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n var id = nextImmediateId++;\n var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\n immediateIds[id] = true;\n\n nextTick(function onNextTick() {\n if (immediateIds[id]) {\n // fn.call() is faster so we optimize for the common use-case\n // @see http://jsperf.com/call-apply-segu\n if (args) {\n fn.apply(null, args);\n } else {\n fn.call(null);\n }\n // Prevent ids from leaking\n exports.clearImmediate(id);\n }\n });\n\n return id;\n};\n\nexports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n delete immediateIds[id];\n};\n}).call(this,require(\"timers\").setImmediate,require(\"timers\").clearImmediate)\n},{\"process/browser.js\":7,\"timers\":8}],9:[function(require,module,exports){\n(function (global,setImmediate){\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 isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\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\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\t\tfor(var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) {\n\t\t\t\tnewAttrs[key] = attrs[key]\n\t\t\t}\n\t\t}\n\t\tattrs = newAttrs\n\t}\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 && !(args.headers && args.headers.hasOwnProperty(\"Content-Type\"))) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (args.deserialize === deserialize && !(args.headers && args.headers.hasOwnProperty(\"Accept\"))) {\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\") {\n\t\t\tif (typeof vnode._state.onremove === \"function\") vnode._state.onremove.call(vnode.state, vnode)\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\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\t// document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement\n\t\tif (active != null && $doc.activeElement !== active) active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\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.6\"\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 : {},require(\"timers\").setImmediate)\n},{\"timers\":8}],10:[function(require,module,exports){\nfunction tlite(getTooltipOpts) {\n document.addEventListener('mouseover', function (e) {\n var el = e.target;\n var opts = getTooltipOpts(el);\n\n if (!opts) {\n el = el.parentElement;\n opts = el && getTooltipOpts(el);\n }\n\n opts && tlite.show(el, opts, true);\n });\n}\n\ntlite.show = function (el, opts, isAuto) {\n var fallbackAttrib = 'data-tlite';\n opts = opts || {};\n\n (el.tooltip || Tooltip(el, opts)).show();\n\n function Tooltip(el, opts) {\n var tooltipEl;\n var showTimer;\n var text;\n\n el.addEventListener('mousedown', autoHide);\n el.addEventListener('mouseleave', autoHide);\n\n function show() {\n text = el.title || el.getAttribute(fallbackAttrib) || text;\n el.title = '';\n el.setAttribute(fallbackAttrib, '');\n text && !showTimer && (showTimer = setTimeout(fadeIn, isAuto ? 150 : 1))\n }\n\n function autoHide() {\n tlite.hide(el, true);\n }\n\n function hide(isAutoHiding) {\n if (isAuto === isAutoHiding) {\n showTimer = clearTimeout(showTimer);\n var parent = tooltipEl && tooltipEl.parentNode;\n parent && parent.removeChild(tooltipEl);\n tooltipEl = undefined;\n }\n }\n\n function fadeIn() {\n if (!tooltipEl) {\n tooltipEl = createTooltip(el, text, opts);\n }\n }\n\n return el.tooltip = {\n show: show,\n hide: hide\n };\n }\n\n function createTooltip(el, text, opts) {\n var tooltipEl = document.createElement('span');\n var grav = opts.grav || el.getAttribute('data-tlite') || 'n';\n\n tooltipEl.innerHTML = text;\n\n el.appendChild(tooltipEl);\n\n var vertGrav = grav[0] || '';\n var horzGrav = grav[1] || '';\n\n function positionTooltip() {\n tooltipEl.className = 'tlite ' + 'tlite-' + vertGrav + horzGrav;\n\n var arrowSize = 10;\n var top = el.offsetTop;\n var left = el.offsetLeft;\n\n if (tooltipEl.offsetParent === el) {\n top = left = 0;\n }\n\n var width = el.offsetWidth;\n var height = el.offsetHeight;\n var tooltipHeight = tooltipEl.offsetHeight;\n var tooltipWidth = tooltipEl.offsetWidth;\n var centerEl = left + (width / 2);\n\n tooltipEl.style.top = (\n vertGrav === 's' ? (top - tooltipHeight - arrowSize) :\n vertGrav === 'n' ? (top + height + arrowSize) :\n (top + (height / 2) - (tooltipHeight / 2))\n ) + 'px';\n\n tooltipEl.style.left = (\n horzGrav === 'w' ? left :\n horzGrav === 'e' ? left + width - tooltipWidth :\n vertGrav === 'w' ? (left + width + arrowSize) :\n vertGrav === 'e' ? (left - tooltipWidth - arrowSize) :\n (centerEl - tooltipWidth / 2)\n ) + 'px';\n }\n\n positionTooltip();\n\n var rect = tooltipEl.getBoundingClientRect();\n\n if (vertGrav === 's' && rect.top < 0) {\n vertGrav = 'n';\n positionTooltip();\n } else if (vertGrav === 'n' && rect.bottom > window.innerHeight) {\n vertGrav = 's';\n positionTooltip();\n } else if (vertGrav === 'e' && rect.left < 0) {\n vertGrav = 'w';\n positionTooltip();\n } else if (vertGrav === 'w' && rect.right > window.innerWidth) {\n vertGrav = 'e';\n positionTooltip();\n }\n\n tooltipEl.className += ' tlite-visible';\n\n return tooltipEl;\n }\n};\n\ntlite.hide = function (el, isAuto) {\n el.tooltip && el.tooltip.hide(isAuto);\n};\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = tlite;\n}\n\n},{}],11:[function(require,module,exports){\n/*!\n * EventEmitter v5.2.5 - 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}(typeof window !== 'undefined' ? window : this || {}));\n\n},{}]},{},[1]);\n })();"]}
|
assets/js/forms-admin.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
(function () { var require = undefined; var define = undefined; (function(){function e
|
2 |
'use strict';
|
3 |
|
4 |
var rows = function rows(m, i18n) {
|
@@ -1428,13 +1428,14 @@ window.mc4wp.forms.fields = fields;
|
|
1428 |
function autoCloseGT(cm) {
|
1429 |
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
1430 |
var ranges = cm.listSelections(), replacements = [];
|
|
|
1431 |
for (var i = 0; i < ranges.length; i++) {
|
1432 |
if (!ranges[i].empty()) return CodeMirror.Pass;
|
1433 |
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
1434 |
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
|
1435 |
if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass;
|
1436 |
|
1437 |
-
var
|
1438 |
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
|
1439 |
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
|
1440 |
|
@@ -1456,13 +1457,14 @@ window.mc4wp.forms.fields = fields;
|
|
1456 |
newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};
|
1457 |
}
|
1458 |
|
|
|
1459 |
for (var i = ranges.length - 1; i >= 0; i--) {
|
1460 |
var info = replacements[i];
|
1461 |
cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");
|
1462 |
var sel = cm.listSelections().slice(0);
|
1463 |
sel[i] = {head: info.newPos, anchor: info.newPos};
|
1464 |
cm.setSelections(sel);
|
1465 |
-
if (info.indent) {
|
1466 |
cm.indentLine(info.newPos.line, null, true);
|
1467 |
cm.indentLine(info.newPos.line + 1, null, true);
|
1468 |
}
|
@@ -1472,6 +1474,8 @@ window.mc4wp.forms.fields = fields;
|
|
1472 |
function autoCloseCurrent(cm, typingSlash) {
|
1473 |
var ranges = cm.listSelections(), replacements = [];
|
1474 |
var head = typingSlash ? "/" : "</";
|
|
|
|
|
1475 |
for (var i = 0; i < ranges.length; i++) {
|
1476 |
if (!ranges[i].empty()) return CodeMirror.Pass;
|
1477 |
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
@@ -1502,9 +1506,11 @@ window.mc4wp.forms.fields = fields;
|
|
1502 |
}
|
1503 |
cm.replaceSelections(replacements);
|
1504 |
ranges = cm.listSelections();
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
|
|
|
|
1508 |
}
|
1509 |
|
1510 |
function autoCloseSlash(cm) {
|
@@ -1648,18 +1654,23 @@ window.mc4wp.forms.fields = fields;
|
|
1648 |
}
|
1649 |
}
|
1650 |
|
1651 |
-
var currentlyHighlighted = null;
|
1652 |
function doMatchBrackets(cm) {
|
1653 |
cm.operation(function() {
|
1654 |
-
if (currentlyHighlighted) {
|
1655 |
-
|
|
|
|
|
|
|
1656 |
});
|
1657 |
}
|
1658 |
|
1659 |
CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
|
1660 |
if (old && old != CodeMirror.Init) {
|
1661 |
cm.off("cursorActivity", doMatchBrackets);
|
1662 |
-
if (currentlyHighlighted) {
|
|
|
|
|
|
|
1663 |
}
|
1664 |
if (val) {
|
1665 |
cm.state.matchBrackets = typeof val == "object" ? val : {};
|
@@ -1893,12 +1904,14 @@ window.mc4wp.forms.fields = fields;
|
|
1893 |
CodeMirror.registerHelper("fold", "xml", function(cm, start) {
|
1894 |
var iter = new Iter(cm, start.line, 0);
|
1895 |
for (;;) {
|
1896 |
-
var openTag = toNextTag(iter)
|
1897 |
-
if (!openTag || iter.line != start.line
|
|
|
|
|
1898 |
if (!openTag[1] && end != "selfClose") {
|
1899 |
var startPos = Pos(iter.line, iter.ch);
|
1900 |
var endPos = findMatchingClose(iter, openTag[2]);
|
1901 |
-
return endPos && {from: startPos, to: endPos.from}
|
1902 |
}
|
1903 |
}
|
1904 |
});
|
@@ -2760,6 +2773,16 @@ function collapsedSpanAtSide(line, start) {
|
|
2760 |
function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
|
2761 |
function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
|
2762 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2763 |
// Test whether there exists a collapsed span that partially
|
2764 |
// overlaps (covers the start or end, but not both) of a new span.
|
2765 |
// Such overlap is not allowed.
|
@@ -4794,12 +4817,11 @@ function coordsChar(cm, x, y) {
|
|
4794 |
var lineObj = getLine(doc, lineN);
|
4795 |
for (;;) {
|
4796 |
var found = coordsCharInner(cm, lineObj, lineN, x, y);
|
4797 |
-
var
|
4798 |
-
|
4799 |
-
|
4800 |
-
|
4801 |
-
|
4802 |
-
{ return found }
|
4803 |
}
|
4804 |
}
|
4805 |
|
@@ -5559,6 +5581,7 @@ var NativeScrollbars = function(place, scroll, cm) {
|
|
5559 |
this.cm = cm;
|
5560 |
var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
|
5561 |
var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
|
|
|
5562 |
place(vert); place(horiz);
|
5563 |
|
5564 |
on(vert, "scroll", function () {
|
@@ -6810,7 +6833,7 @@ function addChangeToHistory(doc, change, selAfter, opId) {
|
|
6810 |
|
6811 |
if ((hist.lastOp == opId ||
|
6812 |
hist.lastOrigin == change.origin && change.origin &&
|
6813 |
-
((change.origin.charAt(0) == "+" &&
|
6814 |
change.origin.charAt(0) == "*")) &&
|
6815 |
(cur = lastChangeEvent(hist, hist.lastOp == opId))) {
|
6816 |
// Merge this change into the last event
|
@@ -7239,7 +7262,8 @@ function makeChangeInner(doc, change) {
|
|
7239 |
|
7240 |
// Revert a change stored in a document's history.
|
7241 |
function makeChangeFromHistory(doc, type, allowSelectionOnly) {
|
7242 |
-
|
|
|
7243 |
|
7244 |
var hist = doc.history, event, selAfter = doc.sel;
|
7245 |
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
|
@@ -7264,8 +7288,10 @@ function makeChangeFromHistory(doc, type, allowSelectionOnly) {
|
|
7264 |
return
|
7265 |
}
|
7266 |
selAfter = event;
|
7267 |
-
}
|
7268 |
-
|
|
|
|
|
7269 |
}
|
7270 |
|
7271 |
// Build up a reverse change object to add to the opposite history
|
@@ -7421,7 +7447,7 @@ function makeChangeSingleDocInEditor(cm, change, spans) {
|
|
7421 |
function replaceRange(doc, code, from, to, origin) {
|
7422 |
if (!to) { to = from; }
|
7423 |
if (cmp(to, from) < 0) { var assign;
|
7424 |
-
(assign = [to, from], from = assign[0], to = assign[1]
|
7425 |
if (typeof code == "string") { code = doc.splitLines(code); }
|
7426 |
makeChange(doc, {from: from, to: to, text: code, origin: origin});
|
7427 |
}
|
@@ -7517,10 +7543,10 @@ function LeafChunk(lines) {
|
|
7517 |
}
|
7518 |
|
7519 |
LeafChunk.prototype = {
|
7520 |
-
chunkSize: function
|
7521 |
|
7522 |
// Remove the n lines at offset 'at'.
|
7523 |
-
removeInner: function
|
7524 |
var this$1 = this;
|
7525 |
|
7526 |
for (var i = at, e = at + n; i < e; ++i) {
|
@@ -7533,13 +7559,13 @@ LeafChunk.prototype = {
|
|
7533 |
},
|
7534 |
|
7535 |
// Helper used to collapse a small branch into a single leaf.
|
7536 |
-
collapse: function
|
7537 |
lines.push.apply(lines, this.lines);
|
7538 |
},
|
7539 |
|
7540 |
// Insert the given array of lines at offset 'at', count them as
|
7541 |
// having the given height.
|
7542 |
-
insertInner: function
|
7543 |
var this$1 = this;
|
7544 |
|
7545 |
this.height += height;
|
@@ -7548,7 +7574,7 @@ LeafChunk.prototype = {
|
|
7548 |
},
|
7549 |
|
7550 |
// Used to iterate over a part of the tree.
|
7551 |
-
iterN: function
|
7552 |
var this$1 = this;
|
7553 |
|
7554 |
for (var e = at + n; at < e; ++at)
|
@@ -7572,9 +7598,9 @@ function BranchChunk(children) {
|
|
7572 |
}
|
7573 |
|
7574 |
BranchChunk.prototype = {
|
7575 |
-
chunkSize: function
|
7576 |
|
7577 |
-
removeInner: function
|
7578 |
var this$1 = this;
|
7579 |
|
7580 |
this.size -= n;
|
@@ -7600,13 +7626,13 @@ BranchChunk.prototype = {
|
|
7600 |
}
|
7601 |
},
|
7602 |
|
7603 |
-
collapse: function
|
7604 |
var this$1 = this;
|
7605 |
|
7606 |
for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
|
7607 |
},
|
7608 |
|
7609 |
-
insertInner: function
|
7610 |
var this$1 = this;
|
7611 |
|
7612 |
this.size += lines.length;
|
@@ -7635,7 +7661,7 @@ BranchChunk.prototype = {
|
|
7635 |
},
|
7636 |
|
7637 |
// When a node has grown, check whether it should be split.
|
7638 |
-
maybeSpill: function
|
7639 |
if (this.children.length <= 10) { return }
|
7640 |
var me = this;
|
7641 |
do {
|
@@ -7657,7 +7683,7 @@ BranchChunk.prototype = {
|
|
7657 |
me.parent.maybeSpill();
|
7658 |
},
|
7659 |
|
7660 |
-
iterN: function
|
7661 |
var this$1 = this;
|
7662 |
|
7663 |
for (var i = 0; i < this.children.length; ++i) {
|
@@ -7708,7 +7734,7 @@ LineWidget.prototype.changed = function () {
|
|
7708 |
this.height = null;
|
7709 |
var diff = widgetHeight(this) - oldH;
|
7710 |
if (!diff) { return }
|
7711 |
-
updateLineHeight(line, line.height + diff);
|
7712 |
if (cm) {
|
7713 |
runInOp(cm, function () {
|
7714 |
cm.curOp.forceUpdate = true;
|
@@ -7741,7 +7767,7 @@ function addLineWidget(doc, handle, node, options) {
|
|
7741 |
}
|
7742 |
return true
|
7743 |
});
|
7744 |
-
signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
|
7745 |
return widget
|
7746 |
}
|
7747 |
|
@@ -8590,8 +8616,6 @@ function registerGlobalHandlers() {
|
|
8590 |
// Called when the window resizes
|
8591 |
function onResize(cm) {
|
8592 |
var d = cm.display;
|
8593 |
-
if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)
|
8594 |
-
{ return }
|
8595 |
// Might be a text scaling operation, clear size caches.
|
8596 |
d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
|
8597 |
d.scrollbarsClipped = false;
|
@@ -8599,11 +8623,11 @@ function onResize(cm) {
|
|
8599 |
}
|
8600 |
|
8601 |
var keyNames = {
|
8602 |
-
3: "
|
8603 |
19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
|
8604 |
36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
|
8605 |
46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
|
8606 |
-
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete",
|
8607 |
173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
8608 |
221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
8609 |
63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
|
@@ -8637,7 +8661,7 @@ keyMap.pcDefault = {
|
|
8637 |
"Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
|
8638 |
"Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
|
8639 |
"Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
|
8640 |
-
fallthrough: "basic"
|
8641 |
};
|
8642 |
// Very basic readline/emacs-style bindings, which are standard on Mac.
|
8643 |
keyMap.emacsy = {
|
@@ -8655,7 +8679,7 @@ keyMap.macDefault = {
|
|
8655 |
"Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
|
8656 |
"Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
|
8657 |
"Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
|
8658 |
-
fallthrough: ["basic", "emacsy"]
|
8659 |
};
|
8660 |
keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
|
8661 |
|
@@ -8750,6 +8774,9 @@ function keyName(event, noShift) {
|
|
8750 |
if (presto && event.keyCode == 34 && event["char"]) { return false }
|
8751 |
var name = keyNames[event.keyCode];
|
8752 |
if (name == null || event.altGraphKey) { return false }
|
|
|
|
|
|
|
8753 |
return addModifierNames(name, event, noShift)
|
8754 |
}
|
8755 |
|
@@ -9332,8 +9359,8 @@ function leftButtonStartDrag(cm, event, pos, behavior) {
|
|
9332 |
var dragEnd = operation(cm, function (e) {
|
9333 |
if (webkit) { display.scroller.draggable = false; }
|
9334 |
cm.state.draggingText = false;
|
9335 |
-
off(
|
9336 |
-
off(
|
9337 |
off(display.scroller, "dragstart", dragStart);
|
9338 |
off(display.scroller, "drop", dragEnd);
|
9339 |
if (!moved) {
|
@@ -9342,7 +9369,7 @@ function leftButtonStartDrag(cm, event, pos, behavior) {
|
|
9342 |
{ extendSelection(cm.doc, pos, null, null, behavior.extend); }
|
9343 |
// Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
|
9344 |
if (webkit || ie && ie_version == 9)
|
9345 |
-
{ setTimeout(function () {
|
9346 |
else
|
9347 |
{ display.input.focus(); }
|
9348 |
}
|
@@ -9357,8 +9384,8 @@ function leftButtonStartDrag(cm, event, pos, behavior) {
|
|
9357 |
dragEnd.copy = !behavior.moveOnDrag;
|
9358 |
// IE's approach to draggable
|
9359 |
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
9360 |
-
on(
|
9361 |
-
on(
|
9362 |
on(display.scroller, "dragstart", dragStart);
|
9363 |
on(display.scroller, "drop", dragEnd);
|
9364 |
|
@@ -9490,19 +9517,19 @@ function leftButtonSelect(cm, event, start, behavior) {
|
|
9490 |
counter = Infinity;
|
9491 |
e_preventDefault(e);
|
9492 |
display.input.focus();
|
9493 |
-
off(
|
9494 |
-
off(
|
9495 |
doc.history.lastSelOrigin = null;
|
9496 |
}
|
9497 |
|
9498 |
var move = operation(cm, function (e) {
|
9499 |
-
if (!e_button(e)) { done(e); }
|
9500 |
else { extend(e); }
|
9501 |
});
|
9502 |
var up = operation(cm, done);
|
9503 |
cm.state.selectingText = up;
|
9504 |
-
on(
|
9505 |
-
on(
|
9506 |
}
|
9507 |
|
9508 |
// Used when mouse-selecting to adjust the anchor to the proper side
|
@@ -9632,6 +9659,7 @@ function defineOptions(CodeMirror) {
|
|
9632 |
clearCaches(cm);
|
9633 |
regChange(cm);
|
9634 |
}, true);
|
|
|
9635 |
option("lineSeparator", null, function (cm, val) {
|
9636 |
cm.doc.lineSep = val;
|
9637 |
if (!val) { return }
|
@@ -9784,6 +9812,7 @@ function CodeMirror$1(place, options) {
|
|
9784 |
|
9785 |
var doc = options.value;
|
9786 |
if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
|
|
|
9787 |
this.doc = doc;
|
9788 |
|
9789 |
var input = new CodeMirror$1.inputStyles[options.inputStyle](this);
|
@@ -10038,7 +10067,7 @@ function applyTextInput(cm, inserted, deleted, sel, origin) {
|
|
10038 |
|
10039 |
var paste = cm.state.pasteIncoming || origin == "paste";
|
10040 |
var textLines = splitLinesAuto(inserted), multiPaste = null;
|
10041 |
-
// When
|
10042 |
if (paste && sel.ranges.length > 1) {
|
10043 |
if (lastCopied && lastCopied.text.join("\n") == inserted) {
|
10044 |
if (sel.ranges.length % lastCopied.text.length == 0) {
|
@@ -10774,8 +10803,12 @@ ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
|
|
10774 |
this.showMultipleSelections(info);
|
10775 |
};
|
10776 |
|
|
|
|
|
|
|
|
|
10777 |
ContentEditableInput.prototype.showPrimarySelection = function () {
|
10778 |
-
var sel =
|
10779 |
var from = prim.from(), to = prim.to();
|
10780 |
|
10781 |
if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
|
@@ -10842,13 +10875,13 @@ ContentEditableInput.prototype.showMultipleSelections = function (info) {
|
|
10842 |
};
|
10843 |
|
10844 |
ContentEditableInput.prototype.rememberSelection = function () {
|
10845 |
-
var sel =
|
10846 |
this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
|
10847 |
this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
|
10848 |
};
|
10849 |
|
10850 |
ContentEditableInput.prototype.selectionInEditor = function () {
|
10851 |
-
var sel =
|
10852 |
if (!sel.rangeCount) { return false }
|
10853 |
var node = sel.getRangeAt(0).commonAncestorContainer;
|
10854 |
return contains(this.div, node)
|
@@ -10883,14 +10916,14 @@ ContentEditableInput.prototype.receivedFocus = function () {
|
|
10883 |
};
|
10884 |
|
10885 |
ContentEditableInput.prototype.selectionChanged = function () {
|
10886 |
-
var sel =
|
10887 |
return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
|
10888 |
sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
|
10889 |
};
|
10890 |
|
10891 |
ContentEditableInput.prototype.pollSelection = function () {
|
10892 |
if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
|
10893 |
-
var sel =
|
10894 |
// On Android Chrome (version 56, at least), backspacing into an
|
10895 |
// uneditable block element will put the cursor in that element,
|
10896 |
// and then, because it's not editable, hide the virtual keyboard.
|
@@ -11024,7 +11057,7 @@ ContentEditableInput.prototype.setUneditable = function (node) {
|
|
11024 |
};
|
11025 |
|
11026 |
ContentEditableInput.prototype.onKeyPress = function (e) {
|
11027 |
-
if (e.charCode == 0) { return }
|
11028 |
e.preventDefault();
|
11029 |
if (!this.cm.isReadOnly())
|
11030 |
{ operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
|
@@ -11064,12 +11097,13 @@ function isInGutter(node) {
|
|
11064 |
function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
|
11065 |
|
11066 |
function domTextBetween(cm, from, to, fromLine, toLine) {
|
11067 |
-
var text = "", closing = false, lineSep = cm.doc.lineSeparator();
|
11068 |
function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
|
11069 |
function close() {
|
11070 |
if (closing) {
|
11071 |
text += lineSep;
|
11072 |
-
|
|
|
11073 |
}
|
11074 |
}
|
11075 |
function addText(str) {
|
@@ -11081,8 +11115,8 @@ function domTextBetween(cm, from, to, fromLine, toLine) {
|
|
11081 |
function walk(node) {
|
11082 |
if (node.nodeType == 1) {
|
11083 |
var cmText = node.getAttribute("cm-text");
|
11084 |
-
if (cmText
|
11085 |
-
addText(cmText
|
11086 |
return
|
11087 |
}
|
11088 |
var markerID = node.getAttribute("cm-marker"), range$$1;
|
@@ -11093,19 +11127,24 @@ function domTextBetween(cm, from, to, fromLine, toLine) {
|
|
11093 |
return
|
11094 |
}
|
11095 |
if (node.getAttribute("contenteditable") == "false") { return }
|
11096 |
-
var isBlock = /^(pre|div|p)$/i.test(node.nodeName);
|
|
|
|
|
11097 |
if (isBlock) { close(); }
|
11098 |
for (var i = 0; i < node.childNodes.length; i++)
|
11099 |
{ walk(node.childNodes[i]); }
|
|
|
|
|
11100 |
if (isBlock) { closing = true; }
|
11101 |
} else if (node.nodeType == 3) {
|
11102 |
-
addText(node.nodeValue);
|
11103 |
}
|
11104 |
}
|
11105 |
for (;;) {
|
11106 |
walk(from);
|
11107 |
if (from == to) { break }
|
11108 |
from = from.nextSibling;
|
|
|
11109 |
}
|
11110 |
return text
|
11111 |
}
|
@@ -11206,13 +11245,10 @@ TextareaInput.prototype.init = function (display) {
|
|
11206 |
var this$1 = this;
|
11207 |
|
11208 |
var input = this, cm = this.cm;
|
|
|
|
|
11209 |
|
11210 |
-
|
11211 |
-
var div = this.wrapper = hiddenTextarea();
|
11212 |
-
// The semihidden textarea that is focused when the editor is
|
11213 |
-
// focused, and receives input.
|
11214 |
-
var te = this.textarea = div.firstChild;
|
11215 |
-
display.wrapper.insertBefore(div, display.wrapper.firstChild);
|
11216 |
|
11217 |
// Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
|
11218 |
if (ios) { te.style.width = "0px"; }
|
@@ -11279,6 +11315,14 @@ TextareaInput.prototype.init = function (display) {
|
|
11279 |
});
|
11280 |
};
|
11281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11282 |
TextareaInput.prototype.prepareSelection = function () {
|
11283 |
// Redraw the selection and/or cursor
|
11284 |
var cm = this.cm, display = cm.display, doc = cm.doc;
|
@@ -11672,7 +11716,7 @@ CodeMirror$1.fromTextArea = fromTextArea;
|
|
11672 |
|
11673 |
addLegacyProps(CodeMirror$1);
|
11674 |
|
11675 |
-
CodeMirror$1.version = "5.
|
11676 |
|
11677 |
return CodeMirror$1;
|
11678 |
|
@@ -11758,9 +11802,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
11758 |
return ret("qualifier", "qualifier");
|
11759 |
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
11760 |
return ret(null, ch);
|
11761 |
-
} else if ((ch == "u" && stream.match(/rl(-prefix)?\(/)) ||
|
11762 |
-
(ch == "d" && stream.match("omain(")) ||
|
11763 |
-
(ch == "r" && stream.match("egexp("))) {
|
11764 |
stream.backUp(1);
|
11765 |
state.tokenize = tokenParenthesized;
|
11766 |
return ret("property", "word");
|
@@ -11843,16 +11887,16 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
11843 |
return pushContext(state, stream, "block");
|
11844 |
} else if (type == "}" && state.context.prev) {
|
11845 |
return popContext(state);
|
11846 |
-
} else if (supportsAtComponent && /@component
|
11847 |
return pushContext(state, stream, "atComponentBlock");
|
11848 |
-
} else if (/^@(-moz-)?document
|
11849 |
return pushContext(state, stream, "documentTypes");
|
11850 |
-
} else if (/^@(media|supports|(-moz-)?document|import)
|
11851 |
return pushContext(state, stream, "atBlock");
|
11852 |
-
} else if (/^@(font-face|counter-style)
|
11853 |
state.stateArg = type;
|
11854 |
return "restricted_atBlock_before";
|
11855 |
-
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes
|
11856 |
return "keyframes";
|
11857 |
} else if (type && type.charAt(0) == "@") {
|
11858 |
return pushContext(state, stream, "at");
|
@@ -12474,7 +12518,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12474 |
},
|
12475 |
"@": function(stream) {
|
12476 |
if (stream.eat("{")) return [null, "interpolation"];
|
12477 |
-
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b
|
12478 |
stream.eatWhile(/[\w\\\-]/);
|
12479 |
if (stream.match(/^\s*:/, false))
|
12480 |
return ["variable-2", "variable-definition"];
|
@@ -12695,7 +12739,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12695 |
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
|
12696 |
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
12697 |
|
12698 |
-
|
12699 |
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
12700 |
"return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
|
12701 |
"debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
|
@@ -12707,33 +12751,6 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12707 |
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
12708 |
"await": C
|
12709 |
};
|
12710 |
-
|
12711 |
-
// Extend the 'normal' keywords with the TypeScript language extensions
|
12712 |
-
if (isTS) {
|
12713 |
-
var type = {type: "variable", style: "type"};
|
12714 |
-
var tsKeywords = {
|
12715 |
-
// object-like things
|
12716 |
-
"interface": kw("class"),
|
12717 |
-
"implements": C,
|
12718 |
-
"namespace": C,
|
12719 |
-
|
12720 |
-
// scope modifiers
|
12721 |
-
"public": kw("modifier"),
|
12722 |
-
"private": kw("modifier"),
|
12723 |
-
"protected": kw("modifier"),
|
12724 |
-
"abstract": kw("modifier"),
|
12725 |
-
"readonly": kw("modifier"),
|
12726 |
-
|
12727 |
-
// types
|
12728 |
-
"string": type, "number": type, "boolean": type, "any": type
|
12729 |
-
};
|
12730 |
-
|
12731 |
-
for (var attr in tsKeywords) {
|
12732 |
-
jsKeywords[attr] = tsKeywords[attr];
|
12733 |
-
}
|
12734 |
-
}
|
12735 |
-
|
12736 |
-
return jsKeywords;
|
12737 |
}();
|
12738 |
|
12739 |
var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
|
@@ -12771,17 +12788,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12771 |
return ret(ch);
|
12772 |
} else if (ch == "=" && stream.eat(">")) {
|
12773 |
return ret("=>", "operator");
|
12774 |
-
} else if (ch == "0" && stream.
|
12775 |
-
stream.eatWhile(/[\da-f]/i);
|
12776 |
-
return ret("number", "number");
|
12777 |
-
} else if (ch == "0" && stream.eat(/o/i)) {
|
12778 |
-
stream.eatWhile(/[0-7]/i);
|
12779 |
-
return ret("number", "number");
|
12780 |
-
} else if (ch == "0" && stream.eat(/b/i)) {
|
12781 |
-
stream.eatWhile(/[01]/i);
|
12782 |
return ret("number", "number");
|
12783 |
} else if (/\d/.test(ch)) {
|
12784 |
-
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
12785 |
return ret("number", "number");
|
12786 |
} else if (ch == "/") {
|
12787 |
if (stream.eat("*")) {
|
@@ -12792,7 +12802,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12792 |
return ret("comment", "comment");
|
12793 |
} else if (expressionAllowed(stream, state, 1)) {
|
12794 |
readRegexp(stream);
|
12795 |
-
stream.match(/^\b(([
|
12796 |
return ret("regexp", "string-2");
|
12797 |
} else {
|
12798 |
stream.eat("=");
|
@@ -12822,7 +12832,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12822 |
var kw = keywords[word]
|
12823 |
return ret(kw.type, kw.style, word)
|
12824 |
}
|
12825 |
-
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\(\w]/, false))
|
12826 |
return ret("async", "keyword", word)
|
12827 |
}
|
12828 |
return ret("variable", "variable", word)
|
@@ -12961,35 +12971,68 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12961 |
pass.apply(null, arguments);
|
12962 |
return true;
|
12963 |
}
|
|
|
|
|
|
|
|
|
12964 |
function register(varname) {
|
12965 |
-
function inList(list) {
|
12966 |
-
for (var v = list; v; v = v.next)
|
12967 |
-
if (v.name == varname) return true;
|
12968 |
-
return false;
|
12969 |
-
}
|
12970 |
var state = cx.state;
|
12971 |
cx.marked = "def";
|
12972 |
if (state.context) {
|
12973 |
-
if (
|
12974 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12975 |
} else {
|
12976 |
-
|
12977 |
-
if (parserConfig.globalVars)
|
12978 |
-
state.globalVars = {name: varname, next: state.globalVars};
|
12979 |
}
|
12980 |
}
|
12981 |
|
|
|
|
|
|
|
|
|
12982 |
// Combinators
|
12983 |
|
12984 |
-
|
|
|
|
|
|
|
12985 |
function pushcontext() {
|
12986 |
-
cx.state.context =
|
12987 |
-
cx.state.localVars = defaultVars
|
|
|
|
|
|
|
|
|
12988 |
}
|
12989 |
function popcontext() {
|
12990 |
-
cx.state.localVars = cx.state.context.vars
|
12991 |
-
cx.state.context = cx.state.context.prev
|
12992 |
}
|
|
|
12993 |
function pushlex(type, info) {
|
12994 |
var result = function() {
|
12995 |
var state = cx.state, indent = state.indented;
|
@@ -13014,19 +13057,19 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13014 |
function expect(wanted) {
|
13015 |
function exp(type) {
|
13016 |
if (type == wanted) return cont();
|
13017 |
-
else if (wanted == ";") return pass();
|
13018 |
else return cont(exp);
|
13019 |
};
|
13020 |
return exp;
|
13021 |
}
|
13022 |
|
13023 |
function statement(type, value) {
|
13024 |
-
if (type == "var") return cont(pushlex("vardef", value
|
13025 |
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
13026 |
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
13027 |
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
13028 |
if (type == "debugger") return cont(expect(";"));
|
13029 |
-
if (type == "{") return cont(pushlex("}"), block, poplex);
|
13030 |
if (type == ";") return cont();
|
13031 |
if (type == "if") {
|
13032 |
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
@@ -13035,44 +13078,51 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13035 |
}
|
13036 |
if (type == "function") return cont(functiondef);
|
13037 |
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
|
|
13038 |
if (type == "variable") {
|
13039 |
-
if (isTS && value == "
|
13040 |
-
cx.marked = "keyword"
|
13041 |
-
return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
13042 |
-
} else if (isTS && value == "declare") {
|
13043 |
cx.marked = "keyword"
|
13044 |
return cont(statement)
|
13045 |
-
} else if (isTS && (value == "module" || value == "enum") && cx.stream.match(/^\s*\w/, false)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13046 |
cx.marked = "keyword"
|
13047 |
-
return cont(
|
13048 |
} else {
|
13049 |
return cont(pushlex("stat"), maybelabel);
|
13050 |
}
|
13051 |
}
|
13052 |
-
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"),
|
13053 |
-
block, poplex, poplex);
|
13054 |
if (type == "case") return cont(expression, expect(":"));
|
13055 |
if (type == "default") return cont(expect(":"));
|
13056 |
-
if (type == "catch") return cont(pushlex("form"), pushcontext,
|
13057 |
-
statement, poplex, popcontext);
|
13058 |
-
if (type == "class") return cont(pushlex("form"), className, poplex);
|
13059 |
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
13060 |
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
13061 |
if (type == "async") return cont(statement)
|
13062 |
if (value == "@") return cont(expression, statement)
|
13063 |
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
13064 |
}
|
13065 |
-
function
|
13066 |
-
return
|
|
|
|
|
|
|
13067 |
}
|
13068 |
-
function expressionNoComma(type) {
|
13069 |
-
return expressionInner(type, true);
|
13070 |
}
|
13071 |
function parenExpr(type) {
|
13072 |
if (type != "(") return pass()
|
13073 |
return cont(pushlex(")"), expression, expect(")"), poplex)
|
13074 |
}
|
13075 |
-
function expressionInner(type, noComma) {
|
13076 |
if (cx.state.fatArrowAt == cx.stream.start) {
|
13077 |
var body = noComma ? arrowBodyNoComma : arrowBody;
|
13078 |
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
|
@@ -13082,7 +13132,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13082 |
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
13083 |
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
13084 |
if (type == "function") return cont(functiondef, maybeop);
|
13085 |
-
if (type == "class") return cont(pushlex("form"), classExpression, poplex);
|
13086 |
if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
|
13087 |
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
13088 |
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
@@ -13090,6 +13140,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13090 |
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
13091 |
if (type == "quasi") return pass(quasi, maybeop);
|
13092 |
if (type == "new") return cont(maybeTarget(noComma));
|
|
|
13093 |
return cont();
|
13094 |
}
|
13095 |
function maybeexpression(type) {
|
@@ -13180,10 +13231,11 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13180 |
return cont(afterprop);
|
13181 |
} else if (type == "jsonld-keyword") {
|
13182 |
return cont(afterprop);
|
13183 |
-
} else if (
|
|
|
13184 |
return cont(objprop)
|
13185 |
} else if (type == "[") {
|
13186 |
-
return cont(expression, expect("]"), afterprop);
|
13187 |
} else if (type == "spread") {
|
13188 |
return cont(expressionNoComma, afterprop);
|
13189 |
} else if (value == "*") {
|
@@ -13248,19 +13300,19 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13248 |
}
|
13249 |
}
|
13250 |
function typeexpr(type, value) {
|
|
|
|
|
|
|
|
|
13251 |
if (type == "variable" || value == "void") {
|
13252 |
-
|
13253 |
-
|
13254 |
-
return cont(typeexpr)
|
13255 |
-
} else {
|
13256 |
-
cx.marked = "type"
|
13257 |
-
return cont(afterType)
|
13258 |
-
}
|
13259 |
}
|
13260 |
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
13261 |
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
13262 |
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
13263 |
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
|
|
13264 |
}
|
13265 |
function maybeReturnType(type) {
|
13266 |
if (type == "=>") return cont(typeexpr)
|
@@ -13277,15 +13329,16 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13277 |
return cont(expression, maybetype, expect("]"), typeprop)
|
13278 |
}
|
13279 |
}
|
13280 |
-
function typearg(type) {
|
13281 |
-
if (type == "variable") return cont(typearg)
|
13282 |
-
|
|
|
13283 |
}
|
13284 |
function afterType(type, value) {
|
13285 |
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
13286 |
-
if (value == "|" || type == ".") return cont(typeexpr)
|
13287 |
if (type == "[") return cont(expect("]"), afterType)
|
13288 |
-
if (value == "extends") return cont(typeexpr)
|
13289 |
}
|
13290 |
function maybeTypeArgs(_, value) {
|
13291 |
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
@@ -13296,11 +13349,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13296 |
function maybeTypeDefault(_, value) {
|
13297 |
if (value == "=") return cont(typeexpr)
|
13298 |
}
|
13299 |
-
function vardef() {
|
|
|
13300 |
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
13301 |
}
|
13302 |
function pattern(type, value) {
|
13303 |
-
if (
|
13304 |
if (type == "variable") { register(value); return cont(); }
|
13305 |
if (type == "spread") return cont(pattern);
|
13306 |
if (type == "[") return contCommasep(pattern, "]");
|
@@ -13325,7 +13379,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13325 |
function maybeelse(type, value) {
|
13326 |
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
13327 |
}
|
13328 |
-
function forspec(type) {
|
|
|
13329 |
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
|
13330 |
}
|
13331 |
function forspec1(type) {
|
@@ -13354,7 +13409,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13354 |
}
|
13355 |
function funarg(type, value) {
|
13356 |
if (value == "@") cont(expression, funarg)
|
13357 |
-
if (type == "spread"
|
|
|
13358 |
return pass(pattern, maybetype, maybeAssign);
|
13359 |
}
|
13360 |
function classExpression(type, value) {
|
@@ -13367,14 +13423,16 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13367 |
}
|
13368 |
function classNameAfter(type, value) {
|
13369 |
if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
|
13370 |
-
if (value == "extends" || value == "implements" || (isTS && type == ","))
|
|
|
13371 |
return cont(isTS ? typeexpr : expression, classNameAfter);
|
|
|
13372 |
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
13373 |
}
|
13374 |
function classBody(type, value) {
|
13375 |
-
if (type == "
|
13376 |
(type == "variable" &&
|
13377 |
-
(value == "static" || value == "get" || value == "set") &&
|
13378 |
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
|
13379 |
cx.marked = "keyword";
|
13380 |
return cont(classBody);
|
@@ -13384,7 +13442,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13384 |
return cont(isTS ? classfield : functiondef, classBody);
|
13385 |
}
|
13386 |
if (type == "[")
|
13387 |
-
return cont(expression, expect("]"), isTS ? classfield : functiondef, classBody)
|
13388 |
if (value == "*") {
|
13389 |
cx.marked = "keyword";
|
13390 |
return cont(classBody);
|
@@ -13411,6 +13469,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13411 |
}
|
13412 |
function afterImport(type) {
|
13413 |
if (type == "string") return cont();
|
|
|
13414 |
return pass(importSpec, maybeMoreImports, maybeFrom);
|
13415 |
}
|
13416 |
function importSpec(type, value) {
|
@@ -13432,6 +13491,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13432 |
if (type == "]") return cont();
|
13433 |
return pass(commasep(expressionNoComma, "]"));
|
13434 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
13435 |
|
13436 |
function isContinuedStatement(state, textAfter) {
|
13437 |
return state.lastType == "operator" || state.lastType == "," ||
|
@@ -13455,7 +13520,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13455 |
cc: [],
|
13456 |
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
13457 |
localVars: parserConfig.localVars,
|
13458 |
-
context: parserConfig.localVars &&
|
13459 |
indented: basecolumn || 0
|
13460 |
};
|
13461 |
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
@@ -13496,7 +13561,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
13496 |
lexical = lexical.prev;
|
13497 |
var type = lexical.type, closing = firstChar == type;
|
13498 |
|
13499 |
-
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
|
13500 |
else if (type == "form" && firstChar == "{") return lexical.indented;
|
13501 |
else if (type == "form") return lexical.indented + indentUnit;
|
13502 |
else if (type == "stat")
|
@@ -13598,6 +13663,7 @@ var xmlConfig = {
|
|
13598 |
doNotIndent: {},
|
13599 |
allowUnquoted: false,
|
13600 |
allowMissing: false,
|
|
|
13601 |
caseFold: false
|
13602 |
}
|
13603 |
|
@@ -13708,8 +13774,9 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
13708 |
stream.next();
|
13709 |
}
|
13710 |
return style;
|
13711 |
-
}
|
13712 |
}
|
|
|
13713 |
function doctype(depth) {
|
13714 |
return function(stream, state) {
|
13715 |
var ch;
|
@@ -13772,6 +13839,9 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
13772 |
state.tagName = stream.current();
|
13773 |
setStyle = "tag";
|
13774 |
return attrState;
|
|
|
|
|
|
|
13775 |
} else {
|
13776 |
setStyle = "error";
|
13777 |
return tagNameState;
|
@@ -13790,6 +13860,9 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
13790 |
setStyle = "tag error";
|
13791 |
return closeStateErr;
|
13792 |
}
|
|
|
|
|
|
|
13793 |
} else {
|
13794 |
setStyle = "error";
|
13795 |
return closeStateErr;
|
1 |
+
(function () { var require = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2 |
'use strict';
|
3 |
|
4 |
var rows = function rows(m, i18n) {
|
1428 |
function autoCloseGT(cm) {
|
1429 |
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
1430 |
var ranges = cm.listSelections(), replacements = [];
|
1431 |
+
var opt = cm.getOption("autoCloseTags");
|
1432 |
for (var i = 0; i < ranges.length; i++) {
|
1433 |
if (!ranges[i].empty()) return CodeMirror.Pass;
|
1434 |
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
1435 |
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
|
1436 |
if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass;
|
1437 |
|
1438 |
+
var html = inner.mode.configuration == "html";
|
1439 |
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
|
1440 |
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
|
1441 |
|
1457 |
newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};
|
1458 |
}
|
1459 |
|
1460 |
+
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnAutoClose);
|
1461 |
for (var i = ranges.length - 1; i >= 0; i--) {
|
1462 |
var info = replacements[i];
|
1463 |
cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");
|
1464 |
var sel = cm.listSelections().slice(0);
|
1465 |
sel[i] = {head: info.newPos, anchor: info.newPos};
|
1466 |
cm.setSelections(sel);
|
1467 |
+
if (!dontIndentOnAutoClose && info.indent) {
|
1468 |
cm.indentLine(info.newPos.line, null, true);
|
1469 |
cm.indentLine(info.newPos.line + 1, null, true);
|
1470 |
}
|
1474 |
function autoCloseCurrent(cm, typingSlash) {
|
1475 |
var ranges = cm.listSelections(), replacements = [];
|
1476 |
var head = typingSlash ? "/" : "</";
|
1477 |
+
var opt = cm.getOption("autoCloseTags");
|
1478 |
+
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnSlash);
|
1479 |
for (var i = 0; i < ranges.length; i++) {
|
1480 |
if (!ranges[i].empty()) return CodeMirror.Pass;
|
1481 |
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
1506 |
}
|
1507 |
cm.replaceSelections(replacements);
|
1508 |
ranges = cm.listSelections();
|
1509 |
+
if (!dontIndentOnAutoClose) {
|
1510 |
+
for (var i = 0; i < ranges.length; i++)
|
1511 |
+
if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)
|
1512 |
+
cm.indentLine(ranges[i].head.line);
|
1513 |
+
}
|
1514 |
}
|
1515 |
|
1516 |
function autoCloseSlash(cm) {
|
1654 |
}
|
1655 |
}
|
1656 |
|
|
|
1657 |
function doMatchBrackets(cm) {
|
1658 |
cm.operation(function() {
|
1659 |
+
if (cm.state.matchBrackets.currentlyHighlighted) {
|
1660 |
+
cm.state.matchBrackets.currentlyHighlighted();
|
1661 |
+
cm.state.matchBrackets.currentlyHighlighted = null;
|
1662 |
+
}
|
1663 |
+
cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
|
1664 |
});
|
1665 |
}
|
1666 |
|
1667 |
CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
|
1668 |
if (old && old != CodeMirror.Init) {
|
1669 |
cm.off("cursorActivity", doMatchBrackets);
|
1670 |
+
if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {
|
1671 |
+
cm.state.matchBrackets.currentlyHighlighted();
|
1672 |
+
cm.state.matchBrackets.currentlyHighlighted = null;
|
1673 |
+
}
|
1674 |
}
|
1675 |
if (val) {
|
1676 |
cm.state.matchBrackets = typeof val == "object" ? val : {};
|
1904 |
CodeMirror.registerHelper("fold", "xml", function(cm, start) {
|
1905 |
var iter = new Iter(cm, start.line, 0);
|
1906 |
for (;;) {
|
1907 |
+
var openTag = toNextTag(iter)
|
1908 |
+
if (!openTag || iter.line != start.line) return
|
1909 |
+
var end = toTagEnd(iter)
|
1910 |
+
if (!end) return
|
1911 |
if (!openTag[1] && end != "selfClose") {
|
1912 |
var startPos = Pos(iter.line, iter.ch);
|
1913 |
var endPos = findMatchingClose(iter, openTag[2]);
|
1914 |
+
return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null
|
1915 |
}
|
1916 |
}
|
1917 |
});
|
2773 |
function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
|
2774 |
function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
|
2775 |
|
2776 |
+
function collapsedSpanAround(line, ch) {
|
2777 |
+
var sps = sawCollapsedSpans && line.markedSpans, found;
|
2778 |
+
if (sps) { for (var i = 0; i < sps.length; ++i) {
|
2779 |
+
var sp = sps[i];
|
2780 |
+
if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
|
2781 |
+
(!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
|
2782 |
+
} }
|
2783 |
+
return found
|
2784 |
+
}
|
2785 |
+
|
2786 |
// Test whether there exists a collapsed span that partially
|
2787 |
// overlaps (covers the start or end, but not both) of a new span.
|
2788 |
// Such overlap is not allowed.
|
4817 |
var lineObj = getLine(doc, lineN);
|
4818 |
for (;;) {
|
4819 |
var found = coordsCharInner(cm, lineObj, lineN, x, y);
|
4820 |
+
var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));
|
4821 |
+
if (!collapsed) { return found }
|
4822 |
+
var rangeEnd = collapsed.find(1);
|
4823 |
+
if (rangeEnd.line == lineN) { return rangeEnd }
|
4824 |
+
lineObj = getLine(doc, lineN = rangeEnd.line);
|
|
|
4825 |
}
|
4826 |
}
|
4827 |
|
5581 |
this.cm = cm;
|
5582 |
var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
|
5583 |
var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
|
5584 |
+
vert.tabIndex = horiz.tabIndex = -1;
|
5585 |
place(vert); place(horiz);
|
5586 |
|
5587 |
on(vert, "scroll", function () {
|
6833 |
|
6834 |
if ((hist.lastOp == opId ||
|
6835 |
hist.lastOrigin == change.origin && change.origin &&
|
6836 |
+
((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
|
6837 |
change.origin.charAt(0) == "*")) &&
|
6838 |
(cur = lastChangeEvent(hist, hist.lastOp == opId))) {
|
6839 |
// Merge this change into the last event
|
7262 |
|
7263 |
// Revert a change stored in a document's history.
|
7264 |
function makeChangeFromHistory(doc, type, allowSelectionOnly) {
|
7265 |
+
var suppress = doc.cm && doc.cm.state.suppressEdits;
|
7266 |
+
if (suppress && !allowSelectionOnly) { return }
|
7267 |
|
7268 |
var hist = doc.history, event, selAfter = doc.sel;
|
7269 |
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
|
7288 |
return
|
7289 |
}
|
7290 |
selAfter = event;
|
7291 |
+
} else if (suppress) {
|
7292 |
+
source.push(event);
|
7293 |
+
return
|
7294 |
+
} else { break }
|
7295 |
}
|
7296 |
|
7297 |
// Build up a reverse change object to add to the opposite history
|
7447 |
function replaceRange(doc, code, from, to, origin) {
|
7448 |
if (!to) { to = from; }
|
7449 |
if (cmp(to, from) < 0) { var assign;
|
7450 |
+
(assign = [to, from], from = assign[0], to = assign[1]); }
|
7451 |
if (typeof code == "string") { code = doc.splitLines(code); }
|
7452 |
makeChange(doc, {from: from, to: to, text: code, origin: origin});
|
7453 |
}
|
7543 |
}
|
7544 |
|
7545 |
LeafChunk.prototype = {
|
7546 |
+
chunkSize: function() { return this.lines.length },
|
7547 |
|
7548 |
// Remove the n lines at offset 'at'.
|
7549 |
+
removeInner: function(at, n) {
|
7550 |
var this$1 = this;
|
7551 |
|
7552 |
for (var i = at, e = at + n; i < e; ++i) {
|
7559 |
},
|
7560 |
|
7561 |
// Helper used to collapse a small branch into a single leaf.
|
7562 |
+
collapse: function(lines) {
|
7563 |
lines.push.apply(lines, this.lines);
|
7564 |
},
|
7565 |
|
7566 |
// Insert the given array of lines at offset 'at', count them as
|
7567 |
// having the given height.
|
7568 |
+
insertInner: function(at, lines, height) {
|
7569 |
var this$1 = this;
|
7570 |
|
7571 |
this.height += height;
|
7574 |
},
|
7575 |
|
7576 |
// Used to iterate over a part of the tree.
|
7577 |
+
iterN: function(at, n, op) {
|
7578 |
var this$1 = this;
|
7579 |
|
7580 |
for (var e = at + n; at < e; ++at)
|
7598 |
}
|
7599 |
|
7600 |
BranchChunk.prototype = {
|
7601 |
+
chunkSize: function() { return this.size },
|
7602 |
|
7603 |
+
removeInner: function(at, n) {
|
7604 |
var this$1 = this;
|
7605 |
|
7606 |
this.size -= n;
|
7626 |
}
|
7627 |
},
|
7628 |
|
7629 |
+
collapse: function(lines) {
|
7630 |
var this$1 = this;
|
7631 |
|
7632 |
for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
|
7633 |
},
|
7634 |
|
7635 |
+
insertInner: function(at, lines, height) {
|
7636 |
var this$1 = this;
|
7637 |
|
7638 |
this.size += lines.length;
|
7661 |
},
|
7662 |
|
7663 |
// When a node has grown, check whether it should be split.
|
7664 |
+
maybeSpill: function() {
|
7665 |
if (this.children.length <= 10) { return }
|
7666 |
var me = this;
|
7667 |
do {
|
7683 |
me.parent.maybeSpill();
|
7684 |
},
|
7685 |
|
7686 |
+
iterN: function(at, n, op) {
|
7687 |
var this$1 = this;
|
7688 |
|
7689 |
for (var i = 0; i < this.children.length; ++i) {
|
7734 |
this.height = null;
|
7735 |
var diff = widgetHeight(this) - oldH;
|
7736 |
if (!diff) { return }
|
7737 |
+
if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }
|
7738 |
if (cm) {
|
7739 |
runInOp(cm, function () {
|
7740 |
cm.curOp.forceUpdate = true;
|
7767 |
}
|
7768 |
return true
|
7769 |
});
|
7770 |
+
if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
|
7771 |
return widget
|
7772 |
}
|
7773 |
|
8616 |
// Called when the window resizes
|
8617 |
function onResize(cm) {
|
8618 |
var d = cm.display;
|
|
|
|
|
8619 |
// Might be a text scaling operation, clear size caches.
|
8620 |
d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
|
8621 |
d.scrollbarsClipped = false;
|
8623 |
}
|
8624 |
|
8625 |
var keyNames = {
|
8626 |
+
3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
|
8627 |
19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
|
8628 |
36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
|
8629 |
46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
|
8630 |
+
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete", 145: "ScrollLock",
|
8631 |
173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
8632 |
221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
8633 |
63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
|
8661 |
"Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
|
8662 |
"Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
|
8663 |
"Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
|
8664 |
+
"fallthrough": "basic"
|
8665 |
};
|
8666 |
// Very basic readline/emacs-style bindings, which are standard on Mac.
|
8667 |
keyMap.emacsy = {
|
8679 |
"Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
|
8680 |
"Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
|
8681 |
"Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
|
8682 |
+
"fallthrough": ["basic", "emacsy"]
|
8683 |
};
|
8684 |
keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
|
8685 |
|
8774 |
if (presto && event.keyCode == 34 && event["char"]) { return false }
|
8775 |
var name = keyNames[event.keyCode];
|
8776 |
if (name == null || event.altGraphKey) { return false }
|
8777 |
+
// Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
|
8778 |
+
// so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
|
8779 |
+
if (event.keyCode == 3 && event.code) { name = event.code; }
|
8780 |
return addModifierNames(name, event, noShift)
|
8781 |
}
|
8782 |
|
9359 |
var dragEnd = operation(cm, function (e) {
|
9360 |
if (webkit) { display.scroller.draggable = false; }
|
9361 |
cm.state.draggingText = false;
|
9362 |
+
off(display.wrapper.ownerDocument, "mouseup", dragEnd);
|
9363 |
+
off(display.wrapper.ownerDocument, "mousemove", mouseMove);
|
9364 |
off(display.scroller, "dragstart", dragStart);
|
9365 |
off(display.scroller, "drop", dragEnd);
|
9366 |
if (!moved) {
|
9369 |
{ extendSelection(cm.doc, pos, null, null, behavior.extend); }
|
9370 |
// Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
|
9371 |
if (webkit || ie && ie_version == 9)
|
9372 |
+
{ setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }
|
9373 |
else
|
9374 |
{ display.input.focus(); }
|
9375 |
}
|
9384 |
dragEnd.copy = !behavior.moveOnDrag;
|
9385 |
// IE's approach to draggable
|
9386 |
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
9387 |
+
on(display.wrapper.ownerDocument, "mouseup", dragEnd);
|
9388 |
+
on(display.wrapper.ownerDocument, "mousemove", mouseMove);
|
9389 |
on(display.scroller, "dragstart", dragStart);
|
9390 |
on(display.scroller, "drop", dragEnd);
|
9391 |
|
9517 |
counter = Infinity;
|
9518 |
e_preventDefault(e);
|
9519 |
display.input.focus();
|
9520 |
+
off(display.wrapper.ownerDocument, "mousemove", move);
|
9521 |
+
off(display.wrapper.ownerDocument, "mouseup", up);
|
9522 |
doc.history.lastSelOrigin = null;
|
9523 |
}
|
9524 |
|
9525 |
var move = operation(cm, function (e) {
|
9526 |
+
if (e.buttons === 0 || !e_button(e)) { done(e); }
|
9527 |
else { extend(e); }
|
9528 |
});
|
9529 |
var up = operation(cm, done);
|
9530 |
cm.state.selectingText = up;
|
9531 |
+
on(display.wrapper.ownerDocument, "mousemove", move);
|
9532 |
+
on(display.wrapper.ownerDocument, "mouseup", up);
|
9533 |
}
|
9534 |
|
9535 |
// Used when mouse-selecting to adjust the anchor to the proper side
|
9659 |
clearCaches(cm);
|
9660 |
regChange(cm);
|
9661 |
}, true);
|
9662 |
+
|
9663 |
option("lineSeparator", null, function (cm, val) {
|
9664 |
cm.doc.lineSep = val;
|
9665 |
if (!val) { return }
|
9812 |
|
9813 |
var doc = options.value;
|
9814 |
if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
|
9815 |
+
else if (options.mode) { doc.modeOption = options.mode; }
|
9816 |
this.doc = doc;
|
9817 |
|
9818 |
var input = new CodeMirror$1.inputStyles[options.inputStyle](this);
|
10067 |
|
10068 |
var paste = cm.state.pasteIncoming || origin == "paste";
|
10069 |
var textLines = splitLinesAuto(inserted), multiPaste = null;
|
10070 |
+
// When pasting N lines into N selections, insert one line per selection
|
10071 |
if (paste && sel.ranges.length > 1) {
|
10072 |
if (lastCopied && lastCopied.text.join("\n") == inserted) {
|
10073 |
if (sel.ranges.length % lastCopied.text.length == 0) {
|
10803 |
this.showMultipleSelections(info);
|
10804 |
};
|
10805 |
|
10806 |
+
ContentEditableInput.prototype.getSelection = function () {
|
10807 |
+
return this.cm.display.wrapper.ownerDocument.getSelection()
|
10808 |
+
};
|
10809 |
+
|
10810 |
ContentEditableInput.prototype.showPrimarySelection = function () {
|
10811 |
+
var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
|
10812 |
var from = prim.from(), to = prim.to();
|
10813 |
|
10814 |
if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
|
10875 |
};
|
10876 |
|
10877 |
ContentEditableInput.prototype.rememberSelection = function () {
|
10878 |
+
var sel = this.getSelection();
|
10879 |
this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
|
10880 |
this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
|
10881 |
};
|
10882 |
|
10883 |
ContentEditableInput.prototype.selectionInEditor = function () {
|
10884 |
+
var sel = this.getSelection();
|
10885 |
if (!sel.rangeCount) { return false }
|
10886 |
var node = sel.getRangeAt(0).commonAncestorContainer;
|
10887 |
return contains(this.div, node)
|
10916 |
};
|
10917 |
|
10918 |
ContentEditableInput.prototype.selectionChanged = function () {
|
10919 |
+
var sel = this.getSelection();
|
10920 |
return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
|
10921 |
sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
|
10922 |
};
|
10923 |
|
10924 |
ContentEditableInput.prototype.pollSelection = function () {
|
10925 |
if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
|
10926 |
+
var sel = this.getSelection(), cm = this.cm;
|
10927 |
// On Android Chrome (version 56, at least), backspacing into an
|
10928 |
// uneditable block element will put the cursor in that element,
|
10929 |
// and then, because it's not editable, hide the virtual keyboard.
|
11057 |
};
|
11058 |
|
11059 |
ContentEditableInput.prototype.onKeyPress = function (e) {
|
11060 |
+
if (e.charCode == 0 || this.composing) { return }
|
11061 |
e.preventDefault();
|
11062 |
if (!this.cm.isReadOnly())
|
11063 |
{ operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
|
11097 |
function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
|
11098 |
|
11099 |
function domTextBetween(cm, from, to, fromLine, toLine) {
|
11100 |
+
var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
|
11101 |
function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
|
11102 |
function close() {
|
11103 |
if (closing) {
|
11104 |
text += lineSep;
|
11105 |
+
if (extraLinebreak) { text += lineSep; }
|
11106 |
+
closing = extraLinebreak = false;
|
11107 |
}
|
11108 |
}
|
11109 |
function addText(str) {
|
11115 |
function walk(node) {
|
11116 |
if (node.nodeType == 1) {
|
11117 |
var cmText = node.getAttribute("cm-text");
|
11118 |
+
if (cmText) {
|
11119 |
+
addText(cmText);
|
11120 |
return
|
11121 |
}
|
11122 |
var markerID = node.getAttribute("cm-marker"), range$$1;
|
11127 |
return
|
11128 |
}
|
11129 |
if (node.getAttribute("contenteditable") == "false") { return }
|
11130 |
+
var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
|
11131 |
+
if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
|
11132 |
+
|
11133 |
if (isBlock) { close(); }
|
11134 |
for (var i = 0; i < node.childNodes.length; i++)
|
11135 |
{ walk(node.childNodes[i]); }
|
11136 |
+
|
11137 |
+
if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
|
11138 |
if (isBlock) { closing = true; }
|
11139 |
} else if (node.nodeType == 3) {
|
11140 |
+
addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
|
11141 |
}
|
11142 |
}
|
11143 |
for (;;) {
|
11144 |
walk(from);
|
11145 |
if (from == to) { break }
|
11146 |
from = from.nextSibling;
|
11147 |
+
extraLinebreak = false;
|
11148 |
}
|
11149 |
return text
|
11150 |
}
|
11245 |
var this$1 = this;
|
11246 |
|
11247 |
var input = this, cm = this.cm;
|
11248 |
+
this.createField(display);
|
11249 |
+
var te = this.textarea;
|
11250 |
|
11251 |
+
display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
|
|
|
|
|
|
|
|
|
|
|
11252 |
|
11253 |
// Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
|
11254 |
if (ios) { te.style.width = "0px"; }
|
11315 |
});
|
11316 |
};
|
11317 |
|
11318 |
+
TextareaInput.prototype.createField = function (_display) {
|
11319 |
+
// Wraps and hides input textarea
|
11320 |
+
this.wrapper = hiddenTextarea();
|
11321 |
+
// The semihidden textarea that is focused when the editor is
|
11322 |
+
// focused, and receives input.
|
11323 |
+
this.textarea = this.wrapper.firstChild;
|
11324 |
+
};
|
11325 |
+
|
11326 |
TextareaInput.prototype.prepareSelection = function () {
|
11327 |
// Redraw the selection and/or cursor
|
11328 |
var cm = this.cm, display = cm.display, doc = cm.doc;
|
11716 |
|
11717 |
addLegacyProps(CodeMirror$1);
|
11718 |
|
11719 |
+
CodeMirror$1.version = "5.39.2";
|
11720 |
|
11721 |
return CodeMirror$1;
|
11722 |
|
11802 |
return ret("qualifier", "qualifier");
|
11803 |
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
11804 |
return ret(null, ch);
|
11805 |
+
} else if (((ch == "u" || ch == "U") && stream.match(/rl(-prefix)?\(/i)) ||
|
11806 |
+
((ch == "d" || ch == "D") && stream.match("omain(", true, true)) ||
|
11807 |
+
((ch == "r" || ch == "R") && stream.match("egexp(", true, true))) {
|
11808 |
stream.backUp(1);
|
11809 |
state.tokenize = tokenParenthesized;
|
11810 |
return ret("property", "word");
|
11887 |
return pushContext(state, stream, "block");
|
11888 |
} else if (type == "}" && state.context.prev) {
|
11889 |
return popContext(state);
|
11890 |
+
} else if (supportsAtComponent && /@component/i.test(type)) {
|
11891 |
return pushContext(state, stream, "atComponentBlock");
|
11892 |
+
} else if (/^@(-moz-)?document$/i.test(type)) {
|
11893 |
return pushContext(state, stream, "documentTypes");
|
11894 |
+
} else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
|
11895 |
return pushContext(state, stream, "atBlock");
|
11896 |
+
} else if (/^@(font-face|counter-style)/i.test(type)) {
|
11897 |
state.stateArg = type;
|
11898 |
return "restricted_atBlock_before";
|
11899 |
+
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
|
11900 |
return "keyframes";
|
11901 |
} else if (type && type.charAt(0) == "@") {
|
11902 |
return pushContext(state, stream, "at");
|
12518 |
},
|
12519 |
"@": function(stream) {
|
12520 |
if (stream.eat("{")) return [null, "interpolation"];
|
12521 |
+
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
|
12522 |
stream.eatWhile(/[\w\\\-]/);
|
12523 |
if (stream.match(/^\s*:/, false))
|
12524 |
return ["variable-2", "variable-definition"];
|
12739 |
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
|
12740 |
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
12741 |
|
12742 |
+
return {
|
12743 |
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
12744 |
"return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
|
12745 |
"debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
|
12751 |
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
12752 |
"await": C
|
12753 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12754 |
}();
|
12755 |
|
12756 |
var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
|
12788 |
return ret(ch);
|
12789 |
} else if (ch == "=" && stream.eat(">")) {
|
12790 |
return ret("=>", "operator");
|
12791 |
+
} else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12792 |
return ret("number", "number");
|
12793 |
} else if (/\d/.test(ch)) {
|
12794 |
+
stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
|
12795 |
return ret("number", "number");
|
12796 |
} else if (ch == "/") {
|
12797 |
if (stream.eat("*")) {
|
12802 |
return ret("comment", "comment");
|
12803 |
} else if (expressionAllowed(stream, state, 1)) {
|
12804 |
readRegexp(stream);
|
12805 |
+
stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
|
12806 |
return ret("regexp", "string-2");
|
12807 |
} else {
|
12808 |
stream.eat("=");
|
12832 |
var kw = keywords[word]
|
12833 |
return ret(kw.type, kw.style, word)
|
12834 |
}
|
12835 |
+
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
|
12836 |
return ret("async", "keyword", word)
|
12837 |
}
|
12838 |
return ret("variable", "variable", word)
|
12971 |
pass.apply(null, arguments);
|
12972 |
return true;
|
12973 |
}
|
12974 |
+
function inList(name, list) {
|
12975 |
+
for (var v = list; v; v = v.next) if (v.name == name) return true
|
12976 |
+
return false;
|
12977 |
+
}
|
12978 |
function register(varname) {
|
|
|
|
|
|
|
|
|
|
|
12979 |
var state = cx.state;
|
12980 |
cx.marked = "def";
|
12981 |
if (state.context) {
|
12982 |
+
if (state.lexical.info == "var" && state.context && state.context.block) {
|
12983 |
+
// FIXME function decls are also not block scoped
|
12984 |
+
var newContext = registerVarScoped(varname, state.context)
|
12985 |
+
if (newContext != null) {
|
12986 |
+
state.context = newContext
|
12987 |
+
return
|
12988 |
+
}
|
12989 |
+
} else if (!inList(varname, state.localVars)) {
|
12990 |
+
state.localVars = new Var(varname, state.localVars)
|
12991 |
+
return
|
12992 |
+
}
|
12993 |
+
}
|
12994 |
+
// Fall through means this is global
|
12995 |
+
if (parserConfig.globalVars && !inList(varname, state.globalVars))
|
12996 |
+
state.globalVars = new Var(varname, state.globalVars)
|
12997 |
+
}
|
12998 |
+
function registerVarScoped(varname, context) {
|
12999 |
+
if (!context) {
|
13000 |
+
return null
|
13001 |
+
} else if (context.block) {
|
13002 |
+
var inner = registerVarScoped(varname, context.prev)
|
13003 |
+
if (!inner) return null
|
13004 |
+
if (inner == context.prev) return context
|
13005 |
+
return new Context(inner, context.vars, true)
|
13006 |
+
} else if (inList(varname, context.vars)) {
|
13007 |
+
return context
|
13008 |
} else {
|
13009 |
+
return new Context(context.prev, new Var(varname, context.vars), false)
|
|
|
|
|
13010 |
}
|
13011 |
}
|
13012 |
|
13013 |
+
function isModifier(name) {
|
13014 |
+
return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
|
13015 |
+
}
|
13016 |
+
|
13017 |
// Combinators
|
13018 |
|
13019 |
+
function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
|
13020 |
+
function Var(name, next) { this.name = name; this.next = next }
|
13021 |
+
|
13022 |
+
var defaultVars = new Var("this", new Var("arguments", null))
|
13023 |
function pushcontext() {
|
13024 |
+
cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
|
13025 |
+
cx.state.localVars = defaultVars
|
13026 |
+
}
|
13027 |
+
function pushblockcontext() {
|
13028 |
+
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
|
13029 |
+
cx.state.localVars = null
|
13030 |
}
|
13031 |
function popcontext() {
|
13032 |
+
cx.state.localVars = cx.state.context.vars
|
13033 |
+
cx.state.context = cx.state.context.prev
|
13034 |
}
|
13035 |
+
popcontext.lex = true
|
13036 |
function pushlex(type, info) {
|
13037 |
var result = function() {
|
13038 |
var state = cx.state, indent = state.indented;
|
13057 |
function expect(wanted) {
|
13058 |
function exp(type) {
|
13059 |
if (type == wanted) return cont();
|
13060 |
+
else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
|
13061 |
else return cont(exp);
|
13062 |
};
|
13063 |
return exp;
|
13064 |
}
|
13065 |
|
13066 |
function statement(type, value) {
|
13067 |
+
if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
|
13068 |
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
13069 |
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
13070 |
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
13071 |
if (type == "debugger") return cont(expect(";"));
|
13072 |
+
if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
|
13073 |
if (type == ";") return cont();
|
13074 |
if (type == "if") {
|
13075 |
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
13078 |
}
|
13079 |
if (type == "function") return cont(functiondef);
|
13080 |
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
13081 |
+
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
|
13082 |
if (type == "variable") {
|
13083 |
+
if (isTS && value == "declare") {
|
|
|
|
|
|
|
13084 |
cx.marked = "keyword"
|
13085 |
return cont(statement)
|
13086 |
+
} else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
|
13087 |
+
cx.marked = "keyword"
|
13088 |
+
if (value == "enum") return cont(enumdef);
|
13089 |
+
else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
13090 |
+
else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
|
13091 |
+
} else if (isTS && value == "namespace") {
|
13092 |
+
cx.marked = "keyword"
|
13093 |
+
return cont(pushlex("form"), expression, block, poplex)
|
13094 |
+
} else if (isTS && value == "abstract") {
|
13095 |
cx.marked = "keyword"
|
13096 |
+
return cont(statement)
|
13097 |
} else {
|
13098 |
return cont(pushlex("stat"), maybelabel);
|
13099 |
}
|
13100 |
}
|
13101 |
+
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
|
13102 |
+
block, poplex, poplex, popcontext);
|
13103 |
if (type == "case") return cont(expression, expect(":"));
|
13104 |
if (type == "default") return cont(expect(":"));
|
13105 |
+
if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
|
|
|
|
|
13106 |
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
13107 |
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
13108 |
if (type == "async") return cont(statement)
|
13109 |
if (value == "@") return cont(expression, statement)
|
13110 |
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
13111 |
}
|
13112 |
+
function maybeCatchBinding(type) {
|
13113 |
+
if (type == "(") return cont(funarg, expect(")"))
|
13114 |
+
}
|
13115 |
+
function expression(type, value) {
|
13116 |
+
return expressionInner(type, value, false);
|
13117 |
}
|
13118 |
+
function expressionNoComma(type, value) {
|
13119 |
+
return expressionInner(type, value, true);
|
13120 |
}
|
13121 |
function parenExpr(type) {
|
13122 |
if (type != "(") return pass()
|
13123 |
return cont(pushlex(")"), expression, expect(")"), poplex)
|
13124 |
}
|
13125 |
+
function expressionInner(type, value, noComma) {
|
13126 |
if (cx.state.fatArrowAt == cx.stream.start) {
|
13127 |
var body = noComma ? arrowBodyNoComma : arrowBody;
|
13128 |
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
|
13132 |
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
13133 |
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
13134 |
if (type == "function") return cont(functiondef, maybeop);
|
13135 |
+
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
|
13136 |
if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
|
13137 |
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
13138 |
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
13140 |
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
13141 |
if (type == "quasi") return pass(quasi, maybeop);
|
13142 |
if (type == "new") return cont(maybeTarget(noComma));
|
13143 |
+
if (type == "import") return cont(expression);
|
13144 |
return cont();
|
13145 |
}
|
13146 |
function maybeexpression(type) {
|
13231 |
return cont(afterprop);
|
13232 |
} else if (type == "jsonld-keyword") {
|
13233 |
return cont(afterprop);
|
13234 |
+
} else if (isTS && isModifier(value)) {
|
13235 |
+
cx.marked = "keyword"
|
13236 |
return cont(objprop)
|
13237 |
} else if (type == "[") {
|
13238 |
+
return cont(expression, maybetype, expect("]"), afterprop);
|
13239 |
} else if (type == "spread") {
|
13240 |
return cont(expressionNoComma, afterprop);
|
13241 |
} else if (value == "*") {
|
13300 |
}
|
13301 |
}
|
13302 |
function typeexpr(type, value) {
|
13303 |
+
if (value == "keyof" || value == "typeof") {
|
13304 |
+
cx.marked = "keyword"
|
13305 |
+
return cont(value == "keyof" ? typeexpr : expressionNoComma)
|
13306 |
+
}
|
13307 |
if (type == "variable" || value == "void") {
|
13308 |
+
cx.marked = "type"
|
13309 |
+
return cont(afterType)
|
|
|
|
|
|
|
|
|
|
|
13310 |
}
|
13311 |
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
13312 |
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
13313 |
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
13314 |
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
13315 |
+
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
|
13316 |
}
|
13317 |
function maybeReturnType(type) {
|
13318 |
if (type == "=>") return cont(typeexpr)
|
13329 |
return cont(expression, maybetype, expect("]"), typeprop)
|
13330 |
}
|
13331 |
}
|
13332 |
+
function typearg(type, value) {
|
13333 |
+
if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
|
13334 |
+
if (type == ":") return cont(typeexpr)
|
13335 |
+
return pass(typeexpr)
|
13336 |
}
|
13337 |
function afterType(type, value) {
|
13338 |
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
13339 |
+
if (value == "|" || type == "." || value == "&") return cont(typeexpr)
|
13340 |
if (type == "[") return cont(expect("]"), afterType)
|
13341 |
+
if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
|
13342 |
}
|
13343 |
function maybeTypeArgs(_, value) {
|
13344 |
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
13349 |
function maybeTypeDefault(_, value) {
|
13350 |
if (value == "=") return cont(typeexpr)
|
13351 |
}
|
13352 |
+
function vardef(_, value) {
|
13353 |
+
if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
|
13354 |
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
13355 |
}
|
13356 |
function pattern(type, value) {
|
13357 |
+
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
|
13358 |
if (type == "variable") { register(value); return cont(); }
|
13359 |
if (type == "spread") return cont(pattern);
|
13360 |
if (type == "[") return contCommasep(pattern, "]");
|
13379 |
function maybeelse(type, value) {
|
13380 |
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
13381 |
}
|
13382 |
+
function forspec(type, value) {
|
13383 |
+
if (value == "await") return cont(forspec);
|
13384 |
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
|
13385 |
}
|
13386 |
function forspec1(type) {
|
13409 |
}
|
13410 |
function funarg(type, value) {
|
13411 |
if (value == "@") cont(expression, funarg)
|
13412 |
+
if (type == "spread") return cont(funarg);
|
13413 |
+
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
|
13414 |
return pass(pattern, maybetype, maybeAssign);
|
13415 |
}
|
13416 |
function classExpression(type, value) {
|
13423 |
}
|
13424 |
function classNameAfter(type, value) {
|
13425 |
if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
|
13426 |
+
if (value == "extends" || value == "implements" || (isTS && type == ",")) {
|
13427 |
+
if (value == "implements") cx.marked = "keyword";
|
13428 |
return cont(isTS ? typeexpr : expression, classNameAfter);
|
13429 |
+
}
|
13430 |
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
13431 |
}
|
13432 |
function classBody(type, value) {
|
13433 |
+
if (type == "async" ||
|
13434 |
(type == "variable" &&
|
13435 |
+
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
|
13436 |
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
|
13437 |
cx.marked = "keyword";
|
13438 |
return cont(classBody);
|
13442 |
return cont(isTS ? classfield : functiondef, classBody);
|
13443 |
}
|
13444 |
if (type == "[")
|
13445 |
+
return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody)
|
13446 |
if (value == "*") {
|
13447 |
cx.marked = "keyword";
|
13448 |
return cont(classBody);
|
13469 |
}
|
13470 |
function afterImport(type) {
|
13471 |
if (type == "string") return cont();
|
13472 |
+
if (type == "(") return pass(expression);
|
13473 |
return pass(importSpec, maybeMoreImports, maybeFrom);
|
13474 |
}
|
13475 |
function importSpec(type, value) {
|
13491 |
if (type == "]") return cont();
|
13492 |
return pass(commasep(expressionNoComma, "]"));
|
13493 |
}
|
13494 |
+
function enumdef() {
|
13495 |
+
return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
|
13496 |
+
}
|
13497 |
+
function enummember() {
|
13498 |
+
return pass(pattern, maybeAssign);
|
13499 |
+
}
|
13500 |
|
13501 |
function isContinuedStatement(state, textAfter) {
|
13502 |
return state.lastType == "operator" || state.lastType == "," ||
|
13520 |
cc: [],
|
13521 |
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
13522 |
localVars: parserConfig.localVars,
|
13523 |
+
context: parserConfig.localVars && new Context(null, null, false),
|
13524 |
indented: basecolumn || 0
|
13525 |
};
|
13526 |
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
13561 |
lexical = lexical.prev;
|
13562 |
var type = lexical.type, closing = firstChar == type;
|
13563 |
|
13564 |
+
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
|
13565 |
else if (type == "form" && firstChar == "{") return lexical.indented;
|
13566 |
else if (type == "form") return lexical.indented + indentUnit;
|
13567 |
else if (type == "stat")
|
13663 |
doNotIndent: {},
|
13664 |
allowUnquoted: false,
|
13665 |
allowMissing: false,
|
13666 |
+
allowMissingTagName: false,
|
13667 |
caseFold: false
|
13668 |
}
|
13669 |
|
13774 |
stream.next();
|
13775 |
}
|
13776 |
return style;
|
13777 |
+
}
|
13778 |
}
|
13779 |
+
|
13780 |
function doctype(depth) {
|
13781 |
return function(stream, state) {
|
13782 |
var ch;
|
13839 |
state.tagName = stream.current();
|
13840 |
setStyle = "tag";
|
13841 |
return attrState;
|
13842 |
+
} else if (config.allowMissingTagName && type == "endTag") {
|
13843 |
+
setStyle = "tag bracket";
|
13844 |
+
return attrState(type, stream, state);
|
13845 |
} else {
|
13846 |
setStyle = "error";
|
13847 |
return tagNameState;
|
13860 |
setStyle = "tag error";
|
13861 |
return closeStateErr;
|
13862 |
}
|
13863 |
+
} else if (config.allowMissingTagName && type == "endTag") {
|
13864 |
+
setStyle = "tag bracket";
|
13865 |
+
return closeState(type, stream, state);
|
13866 |
} else {
|
13867 |
setStyle = "error";
|
13868 |
return closeStateErr;
|
assets/js/forms-admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function(){function t(r,n,i){function o(l,s){if(!n[l]){if(!r[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};r[l][0].call(d.exports,function(e){var t=r[l][1][e];return o(t||e)},d,d.exports,t,r,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}return t}()({1:[function(e,t,r){"use strict";t.exports=function(e,t){var r={};return r.showType=function(r){var n=r.type();return n=n.charAt(0).toUpperCase()+n.slice(1),e("div",[e("label",t.fieldType),e("span",n)])},r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){var n="hidden"===r.type();return e("div",[e("label",[n?t.value:t.initialValue," ",n?"":e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),n?"":e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)},i=void 0;return r.forceRequired()&&(n.required=!0,n.disabled=!0,i=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",n),t.isFieldRequired]),i])},r.placeholder=function(r){return e("div",[e("label",[t.placeholder," ",e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){var n=[e("option",{value:"select",selected:"select"===r.type()&&"selected"},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()&&"selected"},t.radioButtons)];return r.acceptsMultipleValues&&n.push(e("option",{value:"checkbox",selected:"checkbox"===r.type()&&"selected"},t.checkboxes)),e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},n)])},r.choices=function(r){var n=[];return n.push(e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(n,i){return e("tr",{"data-id":i},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:n.selected(),value:n.value(),title:t.preselect})),e("td.stretch",e("input.widefat",{type:"text",value:n.label(),placeholder:n.title(),onchange:e.withAttr("value",n.label)})),e("td",e("span",{title:t.remove,class:"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,i)},""))])})])])])),n},r.linkToTerms=function(r){return e("div",[e("label",t.agreeToTermsLink),e("input.widefat",{type:"text",value:r.link,onchange:e.withAttr("value",r.link),placeholder:"https://..."})])},r}},{}],2:[function(e,t,r){"use strict";t.exports=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type()&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.label(""),e.wrap(!1),[i.showType(e),i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n["terms-checkbox"]=function(e){return[i.label(e),i.linkToTerms(e),i.isRequired(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n}},{"./field-forms-rows.js":1}],3:[function(e,t,r){"use strict";var n=e("html"),i=function(e){e.dom.checked&&e.dom.setAttribute("checked","true"),e.dom.value&&e.dom.setAttribute("value",e.dom.value),e.dom.selected&&e.dom.setAttribute("selected","true")};t.exports=function(e){var t={};return t.select=function(t){var r={name:t.name(),required:t.required()},n=!1,o=t.choices().map(function(t){return t.selected()&&(n=!0),e("option",{value:t.value()!==t.label()?t.value():void 0,selected:t.selected(),oncreate:i},t.label())}),a=t.placeholder();return a.length>0&&o.unshift(e("option",{disabled:!0,value:"",selected:!n,oncreate:i},a)),e("select",r,o)},t["terms-checkbox"]=function(t){var r=void 0;return r=t.link().length>0?e("a",{href:t.link(),target:"_blank"},t.label()):t.label(),e("label",[e("input",{name:t.name(),type:"checkbox",value:t.value(),required:t.required()})," ",r])},t.checkbox=function(t){return t.choices().map(function(r){var n=t.name()+("checkbox"===t.type()?"[]":""),o=t.required()&&"radio"===t.type();return e("label",[e("input",{name:n,type:t.type(),value:r.value(),checked:r.selected(),required:o,oncreate:i})," ",e("span",r.label())])})},t.radio=t.checkbox,t.default=function(t){var r={type:t.type()};return t.name()&&(r.name=t.name()),t.min()&&(r.min=t.min()),t.max()&&(r.max=t.max()),t.value().length>0&&(r.value=t.value()),t.placeholder().length>0&&(r.placeholder=t.placeholder()),r.required=t.required(),r.oncreate=i,e("input",r)},function(r){var i=void 0,o=void 0,a=void 0,l=document.createElement("div");return i=r.label().length>0&&r.showLabel()?e("label",{},r.label()):"",o="function"==typeof t[r.type()]?t[r.type()](r):t.default(r),a=r.wrap()?e("p",[i,o]):[i,o],e.render(l,a),n.prettyPrint(l.innerHTML)+"\n"}}},{html:22}],4:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){function l(e){(c=i.get(e))&&c.choices().length>0&&c.value(c.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function s(){var e=u(c);n.insert(e),l(""),t.redraw()}var c,u=e("./field-generator.js")(t),d=e("./overlay.js")(t,a),f=e("./field-forms.js")(t,a);return n.on("blur",t.redraw),{view:function(){var e=i.getCategories(),r=i.getAll(),n=t("div.available-fields.small-margin",[t("h4",a.chooseField),e.map(function(e){var n=r.filter(function(t){return t.category===e});if(n.length)return t("div.tiny-margin",[t("strong",e),n.map(function(e){var r="button";e.forceRequired()&&(r+=" is-required");var n=e.inFormContent();return null!==n&&(r+=" "+(n?"in-form":"not-in-form")),t("button",{className:r,type:"button",onclick:t.withAttr("value",l),value:e.index},e.title())})])})]),o=null;return c&&(o=t(d(t("div.field-wizard",[t("h3",[c.title(),c.forceRequired()?t("span.red","*"):"",c.name().length?t("code",c.name()):""]),c.help().length?t("p",t.trust(c.help())):"",f.render(c),t("p",[t("button",{class:"button-primary",type:"button",onkeydown:function(e){13==(e=e||window.event).keyCode&&s()},onclick:s},a.addToForm)])]),l))),[n,o]},controller:function(){}}}},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){"use strict";t.exports=function(e,t){function r(t,r,n){var i=e.register(t,r);n||l.push(i)}function n(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function i(e){var i=t.listFields,o=n(e.field_type),a={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o,choices:e.choices,acceptsMultipleValues:!1};return"address"!==a.type?r(i,a,!1):(r(i,{name:a.name+"[addr1]",type:"text",mailchimpType:"address",title:t.streetAddress}),r(i,{name:a.name+"[city]",type:"text",mailchimpType:"address",title:t.city}),r(i,{name:a.name+"[state]",type:"text",mailchimpType:"address",title:t.state}),r(i,{name:a.name+"[zip]",type:"text",mailchimpType:"address",title:t.zip}),r(i,{name:a.name+"[country]",type:"select",mailchimpType:"address",title:t.country,choices:mc4wp_vars.countries})),!0}function o(e){var i=t.interestCategories,o=n(e.field_type);r(i,{title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o},!1)}function a(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e.public&&!t.public?-1:!e.public&&t.public?1:0}),e.merge_fields.forEach(i),e.interest_categories.forEach(o)}var l=[];return{registerCustomFields:function(e){var n,i=t.formFields;r(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),n={};for(var o in e)n[e[o].id]=e[o].name;r(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:n,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),n={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},r(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:n,value:"subscribe",help:t.formActionDescription},!0),r(i,{name:"AGREE_TO_TERMS",value:1,type:"terms-checkbox",label:t.agreeToTerms,title:t.agreeToTermsShort,showLabel:!1,required:!0},!0)},registerListFields:a,registerListsFields:function(t){l.forEach(e.deregister),t.forEach(a)}}}},{}],6:[function(e,t,r){"use strict";var n=e("mithril/stream");t.exports=function(e,t){function r(e,t){return o.filter(function(r){return r[e]()===t})}var i,o=[],a=[],l=function(e){this.name=n(e.name),this.title=n(e.title||e.name),this.type=n(e.type),this.mailchimpType=n(e.mailchimpType||""),this.label=n(e.label||e.title||""),this.showLabel=n(void 0===e.showLabel||e.showLabel),this.value=n(e.value||""),this.placeholder=n(e.placeholder||""),this.required=n(e.required||!1),this.forceRequired=n(e.forceRequired||!1),this.wrap=n(void 0===e.wrap||e.wrap),this.min=n(e.min||null),this.max=n(e.max||null),this.help=n(e.help||""),this.choices=n(e.choices||[]),this.inFormContent=n(null),this.acceptsMultipleValues=e.acceptsMultipleValues,this.link=n(e.link||""),this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},s=function(e){this.label=n(e.label),this.title=n(e.title||e.label),this.selected=n(e.selected||!1),this.value=n(e.value||e.label)};return{get:function(e){return o[e]},getAll:function(){return o=o.map(function(e,t){return e.index=t,e})},getCategories:function(){return a},deregister:function(t){var r=o.indexOf(t);r>-1&&(delete o[r],e.redraw())},register:function(n,c){var u,d=r("name",c.name).shift();if(!d)return c.choices&&(c.choices=function(e){return"function"==typeof e.map?e.map(function(e){return new s({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new s({label:r,value:t})})}(c.choices),c.value&&(c.choices=c.choices.map(function(e){return e.value()===c.value&&e.selected(!0),e}))),a.indexOf(n)<0&&a.push(n),u=new l(c),u.category=n,o.push(u),i&&window.clearTimeout(i),i=window.setTimeout(e.redraw,200),t.trigger("fields.change"),u;!d.forceRequired()&&c.forceRequired&&d.forceRequired(!0)},getAllWhere:r}}},{"mithril/stream":23}],7:[function(e,t,r){"use strict";function n(){var e=h.contentDocument||h.contentWindow.document;(s=e.querySelector(".mc4wp-form-fields"))&&i()}function i(){var e=c.getValue();e=e.replace(p,"").replace(p,""),s.innerHTML=e,s.dispatchEvent(new Event("mc4wp-refresh"))}function o(){return d&&(u.innerHTML=c.getValue().toLowerCase(),d=!1),u}var a=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/edit/matchtags.js"),e("codemirror/addon/edit/closetag.js"),e("codemirror/addon/selection/active-line.js"),e("codemirror/addon/edit/matchbrackets.js");var l,s,c={},u=document.createElement("form"),d=!1,f=document.getElementById("mc4wp-form-content"),h=document.getElementById("mc4wp-form-preview"),p=/\{[^{}]+\}/g;window.addEventListener("load",function(){a.signal(l,"change")}),f.addEventListener("change",function(){d=!0,i()}),c.getValue=function(){return l?l.getValue():f.value},c.query=function(e){return o().querySelectorAll(e.toLowerCase())},c.containsField=function(e){return null!==o().elements.namedItem(e.toLowerCase())},c.insert=function(e){l?(l.replaceSelection(e),l.focus()):f.value+=e},c.on=function(e,t){return l?(e="input"===e?"changes":e,l.on(e,t)):f.addEventListener(e,t)},c.refresh=function(){l&&l.refresh()},u.innerHTML=f.value.toLowerCase(),a&&(l=a.fromTextArea(f,{selectionPointer:!0,mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0,styleActiveLine:!0,matchBrackets:!0,matchTags:{bothTags:!0}}),window.dispatchEvent&&l.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});f.dispatchEvent(e)}})),h.addEventListener("load",n),n.call(),t.exports=c},{codemirror:17,"codemirror/addon/edit/closetag.js":12,"codemirror/addon/edit/matchbrackets.js":13,"codemirror/addon/edit/matchtags.js":14,"codemirror/addon/fold/xml-fold.js":15,"codemirror/addon/selection/active-line.js":16,"codemirror/mode/css/css":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/xml/xml":21}],8:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,i,o){function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);if(e.inFormContent(n),"address"===e.mailchimpType()){e.originalRequiredValue=void 0===e.originalRequiredValue?e.forceRequired():e.originalRequiredValue;var i=e.name().replace(/\[(\w+)\]/g,"");t.query('[name^="'+i+'"]').length>0?(void 0===e.originalRequiredValue&&(e.originalRequiredValue=e.forceRequired()),e.forceRequired(!0)):e.forceRequired(e.originalRequiredValue)}}}),function(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase().replace(/\[(\w+)\]/g,".$1")}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name;if(r&&!(r.length<0)&&"_"!==r[0]){var n=(r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/\[\]$/,"")).indexOf(".");n=n>0?n:r.length,r=r.substr(0,n).toUpperCase()+r.substr(n),-1===e.indexOf(r)&&e.push(r)}}),l.value=e.join(",")}(),e.redraw()}var l=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))}},{}],9:[function(e,t,r){"use strict";function n(e,t){a[e]=t,o()}function i(e){delete a[e],o()}function o(){var e="";for(var t in a)e+='<div class="notice notice-warning inline"><p>'+a[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){(r=document.createElement("div")).className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}var a={};t.exports={init:function(e,t){var r=function(){e.getValue().toLowerCase().indexOf('name="groupings')>-1?n("deprecated_groupings","Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly."):i("deprecated_groupings")},o=function(){var r=t.getAllWhere("forceRequired",!0).filter(function(t){return!e.containsField(t.name().toUpperCase())}),o="<strong>Heads up!</strong> Your form is missing list fields that are required in MailChimp. Either add these fields to your form or mark them as optional in MailChimp.";o+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+r.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",r.length>0?n("required_fields_missing",o):i("required_fields_missing")};r(),e.on("focus",r),e.on("blur",r),o(),e.on("blur",o),e.on("focus",o)}}},{}],10:[function(e,t,r){"use strict";t.exports=function(e,t){function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),l()}function n(e){27==(e=e||window.event).keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(a){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-a.clientWidth-40)/2,n=(t-a.clientHeight-40)/2;a.style.left=(r>0?r:0)+"px",a.style.top=(n>0?n:0)+"px"}}function o(e){a=e.dom,i()}var a=void 0,l=void 0;return function(a,s){return l=s,{oncreate:function(){document.addEventListener("keydown",n),window.addEventListener("resize",i)},onremove:function(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i)},view:function(){return[e("div.overlay-wrap",e("div.overlay",{oncreate:o},[e("span",{class:"close dashicons dashicons-no",title:t.close,onclick:r}),a])),e("div.overlay-background",{title:t.close,onclick:r})]}}}}},{}],11:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),f=e("./admin/fields-factory.js"),h=e("./admin/fields.js")(i,o),p=window.formEditor=u,m=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),g=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),m);var v=new f(h,n);o.on("selectedLists.change",v.registerListsFields),v.registerListsFields(a.getSelectedLists()),v.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),g.init(p,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=p,window.mc4wp.forms.fields=h},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8,"./admin/notices":9}],12:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t,r){for(var i=t.listSelections(),o=[],a=r?"/":"</",l=0;l<i.length;l++){if(!i[l].empty())return e.Pass;var s=i[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var f;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)f=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;f=a+"style"}else{if(!d.context||!d.context.tagName||n(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),o[l]=f}t.replaceSelections(o),i=t.listSelections();for(l=0;l<i.length;l++)(l==i.length-1||i[l].head.line<i[l+1].head.line)&&t.indentLine(i[l].head.line)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function n(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;u<c;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(a,l,s){if(s!=e.Init&&s&&a.removeKeyMap("autoCloseTags"),l){var c={name:"autoCloseTags"};("object"!=typeof l||l.whenClosing)&&(c["'/'"]=function(r){return function(r){return r.getOption("disableInput")?e.Pass:t(r,!0)}(r)}),("object"!=typeof l||l.whenOpening)&&(c["'>'"]=function(t){return function(t){if(t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),l=[],s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var c=a[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),f=d.state;if("xml"!=d.mode.name||!f.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,m="object"==typeof h&&h.dontCloseTags||p&&i,g="object"==typeof h&&h.indentTags||p&&o,v=f.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==f.type||u.string.indexOf("/")==u.string.length-1||m&&r(m,y)>-1||n(t,v,c,f,!0))return e.Pass;var b=g&&r(g,y)>-1;l[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(s=a.length-1;s>=0;s--){var w=l[s];t.replaceRange(w.text,a[s].head,a[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}(t)}),a.addKeyMap(c)}});var i=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],o=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return t(e)}})},{"../../lib/codemirror":17,"../fold/xml-fold":15}],13:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){function t(e,t,n){var i=e.getLineHandle(t.line),o=t.ch-1,s=n&&n.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&o>=0&&l[i.text.charAt(o)]||l[i.text.charAt(++o)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(n&&n.strict&&u>0!=(o==t.ch))return null;var d=e.getTokenTypeAt(a(t.line,o+1)),f=r(e,a(t.line,o+(u>0?1:0)),u,d||null,n);return null==f?null:{from:a(t.line,o),to:f&&f.pos,match:f&&f.ch==c.charAt(0),forward:u>0}}function r(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,s=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,d=r>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),f=t.line;f!=d;f+=r){var h=e.getLine(f);if(h){var p=r>0?0:h.length-1,m=r>0?h.length:-1;if(!(h.length>o))for(f==t.line&&(p=t.ch-(r<0?1:0));p!=m;p+=r){var g=h.charAt(p);if(u.test(g)&&(void 0===n||e.getTokenTypeAt(a(f,p+1))==n)){if(">"==l[g].charAt(1)==r>0)c.push(g);else{if(!c.length)return{pos:a(f,p),ch:g};c.pop()}}}}}return f-r!=(r>0?e.lastLine():e.firstLine())&&null}function n(e,r,n){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c<s.length;c++){var u=s[c].empty()&&t(e,s[c].head,n);if(u&&e.getLine(u.from.line).length<=i){var d=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:d})),u.to&&e.getLine(u.to.line).length<=i&&l.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:d}))}}if(l.length){o&&e.state.focused&&e.focus();var f=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!r)return f;setTimeout(f,800)}}function i(e){e.operation(function(){s&&(s(),s=null),s=n(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,r,n){n&&n!=e.Init&&(t.off("cursorActivity",i),s&&(s(),s=null)),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){n(this,!0)}),e.defineExtension("findMatchingBracket",function(e,r,n){return(n||"boolean"==typeof r)&&(n?(n.strict=r,r=n):r=r?{strict:!0}:null),t(this,e,r)}),e.defineExtension("scanForBracket",function(e,t,n,i){return r(this,e,t,n,i)})})},{"../../lib/codemirror":17}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":17,"../fold/xml-fold":15}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function r(e,t){var r=e.cm.getTokenTypeAt(d(e.line,t));return r&&/\btag\b/.test(r)}function n(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function o(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(n(e))continue;return}{if(r(e,t+1)){var i=e.text.lastIndexOf("/",t),o=i>-1&&!/\S/.test(e.text.slice(i+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(i(e))continue;return}if(r(e,t+1)){h.lastIndex=t,e.ch=t;var n=h.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){h.lastIndex=e.ch;var t=h.exec(e.text);if(!t){if(n(e))continue;return}{if(r(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(i(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t}}}function c(e,t){for(var r=[];;){var n,i=l(e),a=e.line,s=e.ch-(i?i[0].length:0);if(!i||!(n=o(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:d(a,s),to:d(e.line,e.ch)}}else r.push(i[2])}}function u(e,t){for(var r=[];;){var n=s(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,l=a(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var c=r.length-1;c>=0;--c)if(r[c]==l[2]){r.length=c;break}if(c<0&&(!t||t==l[2]))return{tag:l[2],from:d(e.line,e.ch),to:d(i,o)}}}else a(e)}}var d=e.Pos,f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",h=new RegExp("<(/?)(["+f+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,r){for(var n=new t(e,r.line,0);;){var i,a=l(n);if(!a||n.line!=r.line||!(i=o(n)))return;if(!a[1]&&"selfClose"!=i){var s=d(n.line,n.ch),u=c(n,a[2]);return u&&{from:s,to:u.from}}}}),e.findMatchingTag=function(e,r,n){var i=new t(e,r.line,r.ch,n);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=o(i),s=l&&d(i.line,i.ch),f=l&&a(i);if(l&&f&&!(function(e,t){return e.line-t.line||e.ch-t.ch}(i,r)>0)){var h={from:d(i.line,i.ch),to:s,tag:f[2]};return"selfClose"==l?{open:h,close:null,at:"open"}:f[1]?{open:u(i,f[2]),close:h,at:"close"}:(i=new t(e,s.line,s.ch,n),{open:h,close:c(i,f[2]),at:"open"})}}},e.findEnclosingTag=function(e,r,n,i){for(var o=new t(e,r.line,r.ch,n);;){var a=u(o,i);if(!a)break;var l=c(new t(e,r.line,r.ch,n),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,r,n,i){return c(new t(e,r.line,r.ch,i?{from:0,to:i}:null),n)}})},{"../../lib/codemirror":17}],16:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",i),e.removeLineClass(e.state.activeLines[t],"background",o),e.removeLineClass(e.state.activeLines[t],"gutter",a)}function r(e,r){for(var n=[],l=0;l<r.length;l++){var s=r[l],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?s.anchor.line==s.head.line:s.empty()){var u=e.getLineHandleVisualStart(s.head.line);n[n.length-1]!=u&&n.push(u)}}(function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0})(e.state.activeLines,n)||e.operation(function(){t(e);for(var r=0;r<n.length;r++)e.addLineClass(n[r],"wrap",i),e.addLineClass(n[r],"background",o),e.addLineClass(n[r],"gutter",a);e.state.activeLines=n})}function n(e,t){r(e,t.ranges)}var i="CodeMirror-activeline",o="CodeMirror-activeline-background",a="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(i,o,a){var l=a!=e.Init&&a;o!=l&&(l&&(i.off("beforeSelectionChange",n),t(i),delete i.state.activeLines),o&&(i.state.activeLines=[],r(i,i.listSelections()),i.on("beforeSelectionChange",n)))})})},{"../../lib/codemirror":17}],17:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.CodeMirror=i()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function i(e,t,r,i){var o=n(e,t,r,i);return o.setAttribute("role","presentation"),o}function o(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function a(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function l(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function s(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function u(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function d(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}function f(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function h(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;wo.length<=e;)wo.push(m(wo)+" ");return wo[e]}function m(e){return e[e.length-1]}function g(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function v(){}function y(e,t){var r;return Object.create?r=Object.create(e):(v.prototype=e,r=new v),t&&u(t,r),r}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||xo.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function k(e){return e.charCodeAt(0)>=768&&ko.test(e)}function C(e,t,r){for(;(r<0?t>0:t<e.length)&&k(e.charAt(t));)t+=r;return t}function T(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function S(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function L(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function M(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function A(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function O(e){if(null==e.parent)return null;for(var t=e.parent,r=f(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function N(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return r+a}function _(e,t){return t>=e.first&&t<e.first+e.size}function E(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function W(e,t,r){if(void 0===r&&(r=null),!(this instanceof W))return new W(e,t,r);this.line=e,this.ch=t,this.sticky=r}function F(e,t){return e.line-t.line||e.ch-t.ch}function D(e,t){return e.sticky==t.sticky&&0==F(e,t)}function z(e){return W(e.line,e.ch)}function P(e,t){return F(e,t)<0?t:e}function H(e,t){return F(e,t)<0?e:t}function I(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function R(e,t){if(t.line<e.first)return W(e.first,0);var r=e.first+e.size-1;return t.line>r?W(r,S(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?W(e.line,t):r<0?W(e.line,0):e}(t,S(e,t.line).text.length)}function j(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=R(e,t[n]);return r}function B(e,t,r){this.marker=e,this.from=t,this.to=r}function q(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function U(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function K(e,t){if(t.full)return null;var r=_(e,t.from.line)&&S(e,t.from.line).markedSpans,n=_(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==F(t.from,t.to),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new B(a,o.from,l?null:o.to))}}return n}(r,i,a),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new B(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=m(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=q(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];if(null!=g.to&&(g.to+=u),null==g.from){q(l,g.marker)||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=V(l)),s&&s!=l&&(s=V(s));var v=[l];if(!c){var y,b=t.text.length-2;if(b>0&&l)for(var w=0;w<l.length;++w)null==l[w].to&&(y||(y=[])).push(new B(l[w].marker,null,null));for(var x=0;x<b;++x)v.push(y);v.push(s)}return v}function V(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function G(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function $(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Y(e){return e.inclusiveLeft?-1:0}function X(e){return e.inclusiveRight?1:0}function Z(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=F(n.from,i.from)||Y(e)-Y(t);if(o)return-o;var a=F(n.to,i.to)||X(e)-X(t);return a||t.id-e.id}function J(e,t){var r,n=To&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Z(r,i.marker)<0)&&(r=i.marker);return r}function Q(e){return J(e,!0)}function ee(e){return J(e,!1)}function te(e,t,r,n,i){var o=S(e,t),a=To&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=F(c.from,r)||Y(s.marker)-Y(i),d=F(c.to,n)||X(s.marker)-X(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?F(c.to,r)>=0:F(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?F(c.from,n)<=0:F(c.from,n)<0)))return!0}}}function re(e){for(var t;t=Q(e);)e=t.find(-1,!0).line;return e}function ne(e,t){var r=S(e,t),n=re(r);return r==n?t:O(n)}function ie(e,t){if(t>e.lastLine())return t;var r,n=S(e,t);if(!oe(e,n))return t;for(;r=ee(n);)n=r.find(1,!0).line;return O(n)+1}function oe(e,t){var r=To&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ae(e,t,n))return!0}}function ae(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ae(e,n.line,q(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ae(e,t,i))return!0}function le(e){for(var t=0,r=(e=re(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function se(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Q(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ee(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function ce(e){var t=e.display,r=e.doc;t.maxLine=S(r,r.first),t.maxLineLength=se(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=se(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function ue(e,t,r){var n;So=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:So=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:So=i)}return null!=n?n:So}function de(e,t){var r=e.order;return null==r&&(r=e.order=Lo(e.text,t)),r}function fe(e,t){return e._handlers&&e._handlers[t]||Mo}function he(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=f(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var r=fe(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,r||t.type,e,t),xe(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==f(r,t[n])&&r.push(t[n])}function ve(e,t){return fe(e,t).length>0}function ye(e){e.prototype.on=function(e,t){Ao(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){be(e),we(e)}function Ce(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ro&&e.ctrlKey&&1==t&&(t=3),t}function Se(e){if(null==ho){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ho=t.offsetWidth<=1&&t.offsetHeight>2&&!(Ui&&Ki<8))}var i=ho?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Le(e){if(null!=po)return po;var n=r(e,document.createTextNode("AخA")),i=ao(n,0,1).getBoundingClientRect(),o=ao(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(po=o.right-i.right<3)}function Me(e){if("string"==typeof e&&Do.hasOwnProperty(e))e=Do[e];else if(e&&"string"==typeof e.name&&Do.hasOwnProperty(e.name)){var t=Do[e.name];"string"==typeof t&&(t={name:t}),(e=y(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Me("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Me("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ae(e,t){t=Me(t);var r=Fo[t.name];if(!r)return Ae(e,"text/plain");var n=r(e,t);if(zo.hasOwnProperty(t.name)){var i=zo[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}function Oe(e,t){u(t,zo.hasOwnProperty(e)?zo[e]:zo[e]={})}function Ne(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function _e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ee(e,t,r){return!e.startState||e.startState(t,r)}function We(e,t,r,n){var i=[e.state.modeGen],o={};je(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=r.state,l=function(n){r.baseTokens=i;var l=e.state.overlays[n],s=1,c=0;r.state=!0,je(e,t.text,l.mode,r,function(e,t){for(var r=s;c<e;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Fe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=De(e,O(t)),i=t.text.length>e.options.maxHighlightLength&&Ne(e.doc.mode,n.state),o=We(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function De(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Io(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=S(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof Ho?c.lookAhead:0)<=o.modeFrontier))return l;var u=d(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}(e,t,r),a=o>n.first&&S(n,o-1).stateAfter,l=a?Io.fromSaved(n,a,o):new Io(n,Ee(n.mode),o);return n.iter(o,t,function(r){ze(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function ze(e,t,r,n){var i=e.doc.mode,o=new Po(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Pe(i,r.state);!o.eol();)He(i,o,r.state),o.start=o.pos}function Pe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=_e(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function He(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=_e(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Ie(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=S(a,(t=R(a,t)).line),c=De(e,t.line,r),u=new Po(s.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=He(l,u,c.state),n&&o.push(new Ro(u,i,Ne(a.mode,c.state)));return n?o:new Ro(u,i,c.state)}function Re(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function je(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Po(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Re(Pe(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&ze(e,t,n,d.pos),d.pos=t.length,s=null):s=Re(He(r,d,n.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Be(e){e.parent=null,G(e)}function qe(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Uo:qo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ue(e,t){var r=i("span",null,null,Vi?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Ui||Vi)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,l=void 0;n.pos=0,n.addToken=Ve,Le(e.display.measure)&&(l=de(a,e.doc.direction))&&(n.addToken=function(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}(n.addToken,l)),n.map=[];!function(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),qe(r[a+1],t.cm.options));return}for(var l,s,c,u,d,f,h,p=i.length,m=0,g=1,v="",y=0;;){if(y==m){c=u=d=f=s="",h=null,y=1/0;for(var b=[],w=void 0,x=0;x<n.length;++x){var k=n[x],C=k.marker;"bookmark"==C.type&&k.from==m&&C.widgetNode?b.push(C):k.from<=m&&(null==k.to||k.to>m||C.collapsed&&k.to==m&&k.from==m)?(null!=k.to&&k.to!=m&&y>k.to&&(y=k.to,u=""),C.className&&(c+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&k.from==m&&(d+=" "+C.startStyle),C.endStyle&&k.to==y&&(w||(w=[])).push(C.endStyle,k.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||Z(h.marker,C)<0)&&(h=k)):k.from>m&&y>k.from&&(y=k.from)}if(w)for(var T=0;T<w.length;T+=2)w[T+1]==y&&(u+=" "+w[T]);if(!h||h.from==m)for(var S=0;S<b.length;++S)Ge(t,0,b[S]);if(h&&(h.from||0)==m){if(Ge(t,(null==h.to?p+1:h.to)-m,h.marker,null==h.from),null==h.to)return;h.to==m&&(h=!1)}}if(m>=p)break;for(var L=Math.min(p,y);;){if(v){var M=m+v.length;if(!h){var A=M>L?v.slice(0,L-m):v;t.addToken(t,A,l?l+c:c,d,m+A.length==y?u:"",f,s)}if(M>=L){v=v.slice(L-m),m=L;break}m=M,d=""}v=i.slice(o,o=r[g++]),l=qe(r[g++],t.cm.options)}}}(a,n,Fe(e,a,t!=e.display.externalMeasured&&O(a))),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=s(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=s(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Se(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Vi){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=s(n.pre.className,n.textClass||"")),n}function Ke(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ve(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){s=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var h=u.exec(t),m=h?h.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));Ui&&Ki<9?s.appendChild(n("span",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;f+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=s.appendChild(n("span",p(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=s.appendChild(n("span","\r"==h[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),Ui&&Ki<9?s.appendChild(n("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),Ui&&Ki<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||i||o||d||l){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[s],w,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(s)}}function Ge(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function $e(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=ee(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?O(m(this.rest))-r+1:1,this.node=this.text=null,this.hidden=oe(e,t)}function Ye(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new $e(e.doc,S(e.doc,o),o);n=o+a.size,i.push(a)}return i}function Xe(e,t){var r=fe(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);Ko?n=Ko.delayedCallbacks:Vo?n=Vo:(n=Vo=[],setTimeout(Ze,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function Ze(){var e=Vo;Vo=null;for(var t=0;t<e.length;++t)e[t]()}function Je(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?function(e,t){var r=t.text.className,n=et(e,t);t.text==t.node&&(t.node=n.pre);t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,tt(e,t)):r&&(t.text.className=r)}(e,t):"gutter"==o?rt(e,t,r,n):"class"==o?tt(e,t):"widget"==o&&function(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);it(e,t,r)}(e,t,n)}t.changes=null}function Qe(e){return e.node==e.text&&(e.node=n("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Ui&&Ki<8&&(e.node.style.zIndex=2)),e.node}function et(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ue(e,t)}function tt(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=Qe(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?Qe(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function rt(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Qe(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=Qe(t),s=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(n("div",E(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.options.gutters.length;++c){var u=e.options.gutters[c],d=a.hasOwnProperty(u)&&a[u];d&&s.appendChild(n("div",[d],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function nt(e,t,r,n){var i=et(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),tt(e,t),rt(e,t,r,n),it(e,t,n),t.node}function it(e,t,r){if(ot(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)ot(e,t.rest[n],t,r,!1)}function ot(e,t,r,i,o){if(t.widgets)for(var a=Qe(r),l=0,s=t.widgets;l<s.length;++l){var c=s[l],u=n("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),function(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),Xe(c,"redraw")}}function at(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function lt(e,t){for(var r=Ce(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function st(e){return e.lineSpace.offsetTop}function ct(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ut(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function dt(e){return mo-e.display.nativeBarWidth}function ft(e){return e.display.scroller.clientWidth-dt(e)-e.display.barWidth}function ht(e){return e.display.scroller.clientHeight-dt(e)-e.display.barHeight}function pt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(O(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function mt(e,t,r,n){return yt(e,vt(e,t),r,n)}function gt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ut(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function vt(e,t){var n=O(t),i=gt(e,n);i&&!i.text?i=null:i&&i.changes&&(Je(e,i,n,It(e)),e.curOp.forceUpdate=!0),i||(i=function(e,t){var n=O(t=re(t)),i=e.display.externalMeasured=new $e(e.doc,t,n);i.lineN=n;var o=i.built=Ue(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}(e,t));var o=pt(i,t,n);return{line:t,view:i,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function yt(e,t,i,o,a){t.before&&(i=-1);var l,s=i+(o||"");return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&ft(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function(e,t,i,o){var a,l=bt(t.map,i,o),s=l.node,c=l.start,u=l.end,d=l.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&k(t.line.text.charAt(l.coverStart+c));)--c;for(;l.coverStart+u<l.coverEnd&&k(t.line.text.charAt(l.coverStart+u));)++u;if((a=Ui&&Ki<9&&0==c&&u==l.coverEnd-l.coverStart?s.parentNode.getBoundingClientRect():wt(ao(s,c,u).getClientRects(),o)).left||a.right||0==c)break;u=c,c-=1,d="right"}Ui&&Ki<11&&(a=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Wo)return Wo;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=ao(t,0,1).getBoundingClientRect();return Wo=Math.abs(i.left-o.left)>1}(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*o,bottom:t.bottom*o}}(e.display.measure,a))}else{c>0&&(d=o="right");var h;a=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==o?h.length-1:0]:s.getBoundingClientRect()}if(Ui&&Ki<9&&!c&&(!a||!a.left&&!a.right)){var p=s.parentNode.getClientRects()[0];a=p?{left:p.left,right:p.left+Ht(e.display),top:p.top,bottom:p.bottom}:Go}for(var m=a.top-t.rect.top,g=a.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==d?a.right:a.left)-t.rect.left,right:("left"==d?a.left:a.right)-t.rect.left,top:w,bottom:x};a.left||a.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=m,C.rbottom=g);return C}(e,t,i,o)).bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:a?l.rtop:l.top,bottom:a?l.rbottom:l.bottom}}function bt(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function wt(e,t){var r=Go;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function xt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function kt(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)xt(e.display.view[r])}function Ct(e){kt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Tt(){return $i&&eo?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function St(){return $i&&eo?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Lt(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=at(e.widgets[r]));return t}function Mt(e,t,r,n,i){if(!i){var o=Lt(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=le(t);if("local"==n?a+=st(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:St());var s=l.left+("window"==n?0:Tt());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function At(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Tt(),i-=St();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Ot(e,t,r,n,i){return n||(n=S(e.doc,t.line)),Mt(e,n,mt(e,n,t.ch,i),r)}function Nt(e,t,r,n,i,o){function a(t,a){var l=yt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,Mt(e,n,l,r)}function l(e,t,r){var n=1==s[t].level;return a(r?e-1:e,n!=r)}n=n||S(e.doc,t.line),i||(i=vt(e,n));var s=de(n,e.doc.direction),c=t.ch,u=t.sticky;if(c>=n.text.length?(c=n.text.length,u="before"):c<=0&&(c=0,u="after"),!s)return a("before"==u?c-1:c,"before"==u);var d=ue(s,c,u),f=So,h=l(c,d,"before"==u);return null!=f&&(h.other=l(c,f,"before"!=u)),h}function _t(e,t){var r=0;t=R(e.doc,t),e.options.lineWrapping||(r=Ht(e.display)*t.ch);var n=S(e.doc,t.line),i=le(n)+st(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Et(e,t,r,n,i){var o=W(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Wt(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Et(n.first,0,null,!0,-1);var i=N(n,r),o=n.first+n.size-1;if(i>o)return Et(n.first+n.size-1,S(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=S(n,i);;){var l=function(e,t,r,n,i){i-=le(t);var o=vt(e,t),a=Lt(t),l=0,s=t.text.length,c=!0,u=de(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,r,n,i,o,a){var l=Ft(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=yt(e,n,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||d>g)&&(u=h,d=g)}}u||(u=i[i.length-1]);u.from<s&&(u={from:s,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(e,t,r,n,i,o,a){var l=T(function(l){var s=i[l],c=1!=s.level;return zt(Nt(e,W(r,c?s.to:s.from,c?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=Nt(e,W(r,c?s.from:s.to,c?"after":"before"),"line",t,n);zt(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s})(e,t,r,o,u,n,i);c=1!=d.level,l=c?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=T(function(t){var r=yt(e,o,t);return r.top+=a,r.bottom+=a,!!zt(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,m=r),!0)},l,s),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==t.text.length?"before":yt(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Nt(e,W(r,g,h),"line",t,o);f=w.left,v=i<w.top||i>=w.bottom}return g=C(t.text,g,1),Et(r,g,h,v,n-f)}(e,a,i,t,r),s=ee(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=O(a=c.to.line)}}function Ft(e,t,r,n){n-=Lt(t);var i=t.text.length,o=T(function(t){return yt(e,r,t-1).bottom<=n},i,0);return i=T(function(t){return yt(e,r,t).top>n},o,i),{begin:o,end:i}}function Dt(e,t,r,n){r||(r=vt(e,t));return Ft(e,t,r,Mt(e,t,yt(e,r,n),"line").top)}function zt(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Pt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Bo){Bo=n("pre");for(var i=0;i<49;++i)Bo.appendChild(document.createTextNode("x")),Bo.appendChild(n("br"));Bo.appendChild(document.createTextNode("x"))}r(e.measure,Bo);var o=Bo.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function Ht(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function It(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:Rt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Rt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function jt(e){var t=Pt(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Ht(e.display)-3);return function(i){if(oe(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Bt(e){var t=e.doc,r=jt(e);t.iter(function(e){var t=r(e);t!=e.height&&A(e,t)})}function qt(e,t,r,n){var i=e.display;if(!r&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=Wt(e,o,a);if(n&&1==c.xRel&&(s=S(e.doc,c.line).text).length==c.ch){var u=d(s,s.length,e.options.tabSize)-s.length;c=W(c.line,Math.max(0,Math.round((o-ut(e.display).left)/Ht(e.display))-u))}return c}function Ut(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Kt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Vt(e,t){void 0===t&&(t=!0);for(var r=e.doc,i={},o=i.cursors=document.createDocumentFragment(),a=i.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();(c||e.options.showCursorWhenSelecting)&&Gt(e,s.head,o),c||function(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?d-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return Ot(e,W(t,r),"div",h,n)}function a(t,r,n){var i=Dt(e,h,null,t),a="ltr"==r==("after"==n)?"left":"right",l="after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return o(l,a)[a]}var s,c,h=S(l,t),p=h.text.length,m=de(h,l.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(m,r||0,null==n?p:n,function(e,t,l,h){var g="ltr"==l,v=o(e,g?"left":"right"),y=o(t-1,g?"right":"left"),b=null==r&&0==e,w=null==n&&t==p,x=0==h,k=!m||h==m.length-1;if(y.top-v.top<=3){var C=(f?b:w)&&x,T=(f?w:b)&&k,S=C?u:(g?v:y).left,L=T?d:(g?y:v).right;i(S,v.top,L-S,v.bottom)}else{var M,A,O,N;g?(M=f&&b&&x?u:v.left,A=f?d:a(e,l,"before"),O=f?u:a(t,l,"after"),N=f&&w&&k?d:y.right):(M=f?a(e,l,"before"):u,A=!f&&b&&x?d:v.right,O=!f&&w&&k?u:y.left,N=f?a(t,l,"after"):d),i(M,v.top,A-M,v.bottom),v.bottom<y.top&&i(u,v.bottom,null,y.top),i(O,y.top,N-O,y.bottom)}(!s||$t(v,s)<0)&&(s=v),$t(y,s)<0&&(s=y),(!c||$t(v,c)<0)&&(c=v),$t(y,c)<0&&(c=y)}),{start:s,end:c}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=ut(e.display),u=c.left,d=Math.max(a.sizerWidth,ft(e)-a.sizer.offsetLeft)-c.right,f="ltr"==l.direction;var h=t.from(),p=t.to();if(h.line==p.line)o(h.line,h.ch,p.ch);else{var m=S(l,h.line),g=S(l,p.line),v=re(m)==re(g),y=o(h.line,h.ch,v?m.text.length+1:null).end,b=o(p.line,v?0:null,p.ch).start;v&&(y.top<b.top-2?(i(y.right,y.top,null,y.bottom),i(u,b.top,b.left,b.bottom)):i(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&i(u,y.bottom,null,b.top)}r.appendChild(s)}(e,s,a)}}return i}function Gt(e,t,r){var i=Nt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var a=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function $t(e,t){return e.top-t.top||e.left-t.left}function Yt(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xt(e){e.state.focused||(e.display.input.focus(),Jt(e))}function Zt(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qt(e))},100)}function Jt(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,l(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Vi&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Yt(e))}function Qt(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,co(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(Ui&&Ki<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var l=i.node.getBoundingClientRect();o=l.bottom-l.top}var s=i.line.height-o;if(o<2&&(o=Pt(t)),(s>.005||s<-.005)&&(A(i.line,o),tr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)tr(i.rest[c])}}}function tr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function rr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-st(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=N(t,n),a=N(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=N(t,le(S(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=N(t,le(S(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function nr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Rt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function ir(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=E(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Fr(e),!0}return!1}function or(e,t){var r=e.display,n=Pt(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=ht(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+ct(r),s=t.top<n,c=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=ft(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function ar(e,t){null!=t&&(cr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function lr(e){cr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sr(e,t,r){null==t&&null==r||cr(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function cr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;ur(e,_t(e,t.from),_t(e,t.to),t.margin)}}function ur(e,t,r,n){var i=or(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});sr(e,i.scrollLeft,i.scrollTop)}function dr(e,t){Math.abs(e.doc.scrollTop-t)<2||(Ri||Wr(e,{top:t}),fr(e,t,!0),Ri&&Wr(e),Or(e,100))}function fr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,nr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ct(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+dt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function mr(e,t){t||(t=pr(e));var r=e.display.barWidth,n=e.display.barHeight;gr(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&er(e),gr(e,pr(e)),r=e.display.barWidth,n=e.display.barHeight}function gr(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&co(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Xo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ao(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?hr(e,t):dr(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function yr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},function(e){Ko?Ko.ops.push(e):e.ownsGroup=Ko={ops:[e],delayedCallbacks:[]}}(e.curOp)}function br(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{Ko=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)!function(e){var t=e.cm,r=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=dt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=dt(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&ce(t);e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Jo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}(t[r]);for(var i=0;i<t.length;i++)!function(e){e.updatedDisplay=e.mustUpdate&&_r(e.cm,e.update)}(t[i]);for(var o=0;o<t.length;o++)!function(e){var t=e.cm,r=t.display;e.updatedDisplay&&er(t);e.barMeasure=pr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=mt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+dt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ft(t)));(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}(t[o]);for(var l=0;l<t.length;l++)!function(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&hr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r);(e.updatedDisplay||e.startHeight!=t.doc.height)&&mr(t,e.barMeasure);e.updatedDisplay&&Dr(t,e.barMeasure);e.selectionChanged&&Yt(t);t.state.focused&&e.updateInput&&t.display.input.reset(e.typing);r&&Xt(e.cm)}(t[l]);for(var s=0;s<t.length;s++)!function(e){var t=e.cm,r=t.display,i=t.doc;e.updatedDisplay&&Er(t,e.update);null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null);null!=e.scrollTop&&fr(t,e.scrollTop,e.forceScroll);null!=e.scrollLeft&&hr(t,e.scrollLeft,!0,!0);if(e.scrollToPos){var o=function(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?W(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?W(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Nt(e,t),s=r&&r!=t?Nt(e,r):l,c=or(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(dr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(hr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,R(i,e.scrollToPos.from),R(i,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!me(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ji){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-st(e.display))+"px;\n height: "+(t.bottom-t.top+dt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,o)}var a=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||pe(a[s],"hide");if(l)for(var c=0;c<l.length;++c)l[c].lines.length&&pe(l[c],"unhide");r.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop);e.changeObjs&&pe(t,"changes",t,e.changeObjs);e.update&&e.update.finish()}(t[s])}(e)})}function wr(e,t){if(e.curOp)return t();yr(e);try{return t()}finally{br(e)}}function xr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);yr(e);try{return t.apply(e,arguments)}finally{br(e)}}}function kr(e){return function(){if(this.curOp)return e.apply(this,arguments);yr(this);try{return e.apply(this,arguments)}finally{br(this)}}}function Cr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);yr(t);try{return e.apply(this,arguments)}finally{br(t)}}}function Tr(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)To&&ne(e.doc,t)<i.viewTo&&Lr(e);else if(r<=i.viewFrom)To&&ie(e.doc,r+n)>i.viewFrom?Lr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Lr(e);else if(t<=i.viewFrom){var o=Mr(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Lr(e)}else if(r>=i.viewTo){var a=Mr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Lr(e)}else{var l=Mr(e,t,t,-1),s=Mr(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Ye(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Lr(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Sr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Ut(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==f(a,r)&&a.push(r)}}}function Lr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mr(e,t,r,n){var i,o=Ut(e,t),a=e.display.view;if(!To||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ne(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Ar(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Or(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(Nr,e))}function Nr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=De(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ne(t.mode,n.state):null,s=We(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ze(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Or(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wr(e,function(){for(var t=0;t<i.length;t++)Sr(e,i[t],"text")})}}function _r(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return Lr(e),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ar(e))return!1;ir(e)&&(Lr(e),r.dims=It(e));var l=i.first+i.size,s=Math.max(r.visible.from-e.options.viewportMargin,i.first),c=Math.min(l,r.visible.to+e.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(i.first,n.viewFrom)),n.viewTo>c&&n.viewTo-c<20&&(c=Math.min(l,n.viewTo)),To&&(s=ne(e.doc,s),c=ie(e.doc,c));var u=s!=n.viewFrom||c!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Ye(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ye(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Ut(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ye(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Ut(e,r)))),n.viewTo=r}(e,s,c),n.viewOffset=le(S(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var d=Ar(e);if(!u&&0==d&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=a();if(!t||!o(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return d>4&&(n.lineDiv.style.display="none"),function(e,r,n){function i(t){var r=t.nextSibling;return Vi&&ro&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild;for(var c=o.view,u=o.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==l){for(;s!=h.node;)s=i(s);var p=a&&null!=r&&r<=u&&h.lineNumber;h.changes&&(f(h.changes,"gutter")>-1&&(p=!1),Je(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(E(e.options,u)))),s=h.node.nextSibling}else{var m=nt(e,h,u,n);l.insertBefore(m,s)}u+=h.size}for(;s;)s=i(s)}(e,n.updateLineNumbers,r.dims),d>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),e.anchorNode&&o(document.body,e.anchorNode)&&o(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(h),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Or(e,400)),n.updateLineNumbers=null,!0}function Er(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=ft(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+ct(e.display)-ht(e),r.top)}),t.visible=rr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_r(e,t);n=!1){er(e);var i=pr(e);Kt(e),mr(e,i),Dr(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Wr(e,t){var r=new Jo(e,t);if(_r(e,r)){er(e),Er(e,r);var n=pr(e);Kt(e),mr(e,n),Dr(e,n),r.finish()}}function Fr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Dr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+dt(e)+"px"}function zr(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var a=i[o],l=r.appendChild(n("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",Fr(e)}function Pr(e){var t=f(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Hr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Ir(e){var t=Hr(e);return t.x*=ea,t.y*=ea,t}function Rr(e,t){var r=Hr(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&ro&&Vi)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!Ri&&!Yi&&null!=ea)return i&&s&&dr(e,Math.max(0,a.scrollTop+i*ea)),hr(e,Math.max(0,a.scrollLeft+n*ea)),(!i||i&&s)&&be(t),void(o.wheelStartX=null);if(i&&null!=ea){var f=i*ea,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),Wr(e,{top:h,bottom:p})}Qo<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(ea=(ea*Qo+r)/(Qo+1),++Qo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function jr(e,t){var r=e[t];e.sort(function(e,t){return F(e.from(),t.from())}),t=f(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(F(o.to(),i.from())>=0){var a=H(o.from(),i.from()),l=P(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new ra(s?l:a,s?a:l))}}return new ta(e,t)}function Br(e,t){return new ta([new ra(e,t||e)],0)}function qr(e){return e.text?W(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ur(e,t){if(F(e,t.from)<0)return e;if(F(e,t.to)<=0)return qr(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=qr(t).ch-t.to.ch),W(r,n)}function Kr(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new ra(Ur(i.anchor,t),Ur(i.head,t)))}return jr(r,e.sel.primIndex)}function Vr(e,t,r){return e.line==t.line?W(r.line,e.ch-t.ch+r.ch):W(r.line+(e.line-t.line),e.ch)}function Gr(e){e.doc.mode=Ae(e.options,e.doc.modeOption),$r(e)}function $r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Or(e,100),e.state.modeGen++,e.curOp&&Tr(e)}function Yr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Xr(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),G(e),$(e,r);var i=n?n(e):1;i!=e.height&&A(e,i)}(e,r,i,n),Xe(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new jo(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=S(e,l.line),d=S(e,s.line),f=m(c),h=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Yr(e,t)){var g=a(0,c.length-1);o(d,d.text,h),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var v=a(1,c.length-1);v.push(new jo(f+u.text.slice(s.ch),h,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var y=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,y)}Xe(e,"change",e,t)}function Zr(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Jr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Bt(e),Gr(e),Qr(e),e.options.lineWrapping||ce(e),e.options.mode=t.modeOption,Tr(e)}function Qr(e){("rtl"==e.doc.direction?l:co)(e.display.lineDiv,"CodeMirror-rtl")}function en(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function tn(e,t){var r={from:z(t.from),to:qr(t),text:L(e,t.from,t.to)};return ln(e,r,t.from.line,t.to.line+1),Zr(e,function(e){return ln(e,r,t.from.line,t.to.line+1)},!0),r}function rn(e){for(;e.length;){if(!m(e).ranges)break;e.pop()}}function nn(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(rn(e.done),m(e.done)):e.done.length&&!m(e.done).ranges?m(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}(i,i.lastOp==n)))a=m(o.changes),0==F(t.from,t.to)&&0==F(t.from,a.to)?a.to=qr(t):o.changes.push(tn(e,t));else{var s=m(i.done);for(s&&s.ranges||an(e.sel,i.done),o={changes:[tn(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function on(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,m(i.done),t))?i.done[i.done.length-1]=t:an(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&rn(i.undone)}function an(e,t){var r=m(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ln(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function sn(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function cn(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(sn(r[i]));return n}(e,t),n=K(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function un(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?ta.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&f(t,Number(u[1]))>-1&&(m(l)[d]=c[d],delete c[d])}}}return n}function dn(e,t,r,n){if(n){var i=e.anchor;if(r){var o=F(t,i)<0;o!=F(r,i)<0?(i=t,t=r):o!=F(t,r)<0&&(t=r)}return new ra(i,t)}return new ra(r||t,t)}function fn(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),vn(e,new ta([dn(e.sel.primary(),t,r,i)],0),n)}function hn(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=dn(e.sel.ranges[o],t[o],null,i);vn(e,jr(n,e.sel.primIndex),r)}function pn(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,vn(e,jr(i,e.sel.primIndex),n)}function mn(e,t,r,n){vn(e,Br(t,r),n)}function gn(e,t,r){var n=e.history.done,i=m(n);i&&i.ranges?(n[n.length-1]=t,yn(e,t,r)):vn(e,t,r)}function vn(e,t,r){yn(e,t,r),on(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function yn(e,t,r){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new ra(R(e,t[r].anchor),R(e,t[r].head))},origin:r&&r.origin};return pe(e,"beforeSelectionChange",e,n),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?jr(n.ranges,n.ranges.length-1):t}(e,t,r));bn(e,xn(e,t,r&&r.bias||(F(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||lr(e.cm)}function bn(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ge(e.cm)),Xe(e,"cursorActivity",e))}function wn(e){bn(e,xn(e,e.sel,null,!1))}function xn(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Cn(e,a.anchor,l&&l.anchor,r,n),c=Cn(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ra(s,c))}return i?jr(i,t.primIndex):t}function kn(e,t,r,n,i){var o=S(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(pe(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=Tn(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=F(c,r))&&(n<0?u<0:u>0))return kn(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=Tn(e,d,n,d.line==t.line?o:null)),d?kn(e,d,t,n,i):null}}return t}function Cn(e,t,r,n,i){var o=n||1,a=kn(e,t,r,o,i)||!i&&kn(e,t,r,o,!0)||kn(e,t,r,-o,i)||!i&&kn(e,t,r,-o,!0);return a||(e.cantEdit=!0,W(e.first,0))}function Tn(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?R(e,W(t.line-1)):null:r>0&&t.ch==(n||S(e,t.line)).text.length?t.line<e.first+e.size-1?W(t.line+1,0):null:new W(t.line,t.ch+r)}function Sn(e){e.setSelection(W(e.firstLine(),0),W(e.lastLine()),vo)}function Ln(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=R(e,t)),r&&(n.to=R(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),pe(e,"beforeChange",e,n),e.cm&&pe(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Mn(e,t,r){if(e.cm){if(!e.cm.curOp)return xr(e.cm,Mn)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=Ln(e,t,!0))){var n=Co&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=f(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(F(c.to,l.from)<0||F(c.from,l.to)>0)){var u=[s,1],d=F(c.from,l.from),h=F(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)An(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else An(e,t)}}function An(e,t){if(1!=t.text.length||""!=t.text[0]||0!=F(t.from,t.to)){var r=Kr(e,t);nn(e,t,r,e.cm?e.cm.curOp.id:NaN),_n(e,t,r,K(e,t));var n=[];Zr(e,function(e,r){r||-1!=f(n,e.history)||(Dn(e.history,t),n.push(e.history)),_n(e,t,null,K(e,t))})}}function On(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=a.pop()).ranges;){if(an(n,l),r&&!n.equals(e.sel))return void vn(e,n,{clearRedo:!1});o=n}var c=[];an(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(r){var i=n.changes[r];if(i.origin=t,u&&!Ln(e,i,!1))return a.length=0,{};c.push(tn(e,i));var o=r?Kr(e,i):m(a);_n(e,i,o,cn(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:qr(i)});var l=[];Zr(e,function(e,t){t||-1!=f(l,e.history)||(Dn(e.history,i),l.push(e.history)),_n(e,i,null,cn(e,i))})},h=n.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function Nn(e,t){if(0!=t&&(e.first+=t,e.sel=new ta(g(e.sel.ranges,function(e){return new ra(W(e.anchor.line+t,e.anchor.ch),W(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Tr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Sr(e.cm,n,"gutter")}}function _n(e,t,r,n){if(e.cm&&!e.cm.curOp)return xr(e.cm,_n)(e,t,r,n);if(t.to.line<e.first)Nn(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Nn(e,i),t={from:W(e.first,0),to:W(t.to.line+i,t.to.ch),text:[m(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:W(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=L(e,t.from,t.to),r||(r=Kr(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=O(re(S(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ge(e);Xr(n,t,r,jt(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=se(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=S(e,n).stateAfter;if(i&&(!(i instanceof Ho)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),Or(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Tr(e):o.line!=a.line||1!=t.text.length||Yr(e.doc,t)?Tr(e,o.line,a.line+1,c):Sr(e,o.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Xe(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Xr(e,t,n),yn(e,r,vo)}}function En(e,t,r,n,i){if(n||(n=r),F(n,r)<0){var o;r=(o=[n,r])[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Mn(e,{from:r,to:n,text:t,origin:i})}function Wn(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Fn(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)Wn(o.ranges[l].anchor,t,r,n),Wn(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(r<c.from.line)c.from=W(c.from.line+n,c.from.ch),c.to=W(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Dn(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Fn(e.done,r,n,i),Fn(e.undone,r,n,i)}function zn(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=S(e,I(e,t)):i=O(t),null==i?null:(n(o,i)&&e.cm&&Sr(e.cm,i,r),o)}function Pn(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function Hn(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function In(e,t,r){le(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ar(e,r)}function Rn(e,t,r,n,o){if(n&&n.shared)return function(e,t,r,n,i){(n=u(n)).shared=!1;var o=[Rn(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Zr(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Rn(e,R(e,t),R(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=m(o)}),new aa(o,a)}(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return xr(e.cm,Rn)(e,t,r,n,o);var a=new oa(e,o),l=F(t,r);if(n&&u(n,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(te(e,t.line,t,r,a)||t.line!=r.line&&te(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");To=!0}a.addToHistory&&nn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,c=t.line,d=e.cm;if(e.iter(c,r.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&re(e)==d.display.maxLine&&(s=!0),a.collapsed&&c!=t.line&&A(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new B(a,c==t.line?t.ch:null,c==r.line?r.ch:null)),++c}),a.collapsed&&e.iter(t.line,r.line+1,function(t){oe(e,t)&&A(t,0)}),a.clearOnEnter&&Ao(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Co=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ia,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)Tr(d,t.line,r.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=r.line;f++)Sr(d,f,"text");a.atomic&&wn(d.doc),Xe(d,"markerAdded",d,a)}return a}function jn(e){return e.findMarks(W(e.first,0),e.clipPos(W(e.lastLine())),function(e){return e.parent})}function Bn(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Zr(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==f(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}function qn(e){var t=this;if(Un(t),!me(t,e)&&!lt(t.display,e)){be(e),Ui&&(ca=+new Date);var r=qt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||-1!=f(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=xr(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){var s={from:r=R(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Mn(t.doc,s),gn(t.doc,Br(r,qr(s)))}}),l.readAsText(e)}},s=0;s<i;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),yn(t.doc,Br(r,r)),u)for(var d=0;d<u.length;++d)En(t.doc,"",u[d].anchor,u[d].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Un(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Kn(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Vn(){ua||(!function(){var e;Ao(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Kn(Gn)},100))}),Ao(window,"blur",function(){return Kn(Qt)})}(),ua=!0)}function Gn(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function $n(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Yn(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=g(r.split(" "),$n),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Xn(e,t,r,n){var i=(t=ei(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Xn(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Xn(e,t.fallthrough[o],r,n);if(a)return a}}}function Zn(e){var t="string"==typeof e?e:da[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Jn(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(lo?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(lo?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Qn(e,t){if(Yi&&34==e.keyCode&&e.char)return!1;var r=da[e.keyCode];return null!=r&&!e.altGraphKey&&Jn(r,e,t)}function ei(e){return"string"==typeof e?ma[e]:e}function ti(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&F(o.from,m(n).to)<=0;){var a=n.pop();if(F(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}wr(e,function(){for(var t=n.length-1;t>=0;t--)En(e.doc,"",n[t].from,n[t].to,"+delete");lr(e)})}function ri(e,t,r){var n=C(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ni(e,t,r){var n=ri(e,t.ch,r);return null==n?null:new W(t.line,n,r<0?"after":"before")}function ii(e,t,r,n,i){if(e){var o=de(r,t.doc.direction);if(o){var a,l=i<0?m(o):o[0],s=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=vt(t,r);a=i<0?r.text.length-1:0;var u=yt(t,c,a).top;a=T(function(e){return yt(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=ri(r,a,1))}else a=i<0?l.to:l.from;return new W(n,a,s)}}return new W(n,i<0?r.text.length:0,i<0?"before":"after")}function oi(e,t){var r=S(e.doc,t),n=re(r);return n!=r&&(t=O(n)),ii(!0,e,n,t,1)}function ai(e,t){var r=S(e.doc,t),n=function(e){for(var t;t=ee(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=O(n)),ii(!0,e,r,t,-1)}function li(e,t){var r=oi(e,t.line),n=S(e.doc,r.line),i=de(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return W(r.line,a?0:o,r.sticky)}return r}function si(e,t,r){if("string"==typeof t&&!(t=ga[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=go}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ci(e,t,r,n){var i=e.state.keySeq;if(i){if(Zn(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:va.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ui(e,i+" "+t,r,n))return!0}return ui(e,t,r,n)}function ui(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Xn(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Xn(t,e.options.extraKeys,r,e)||Xn(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Xe(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(be(r),Yt(e)),!!i}function di(e,t){var r=Qn(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ci(e,"Shift-"+r,t,function(t){return si(e,t,!0)})||ci(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return si(e,t)}):ci(e,r,t,function(t){return si(e,t)}))}function fi(e){if(this.curOp.focus=a(),!me(this,e)){Ui&&Ki<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var r=di(this,e);Yi&&(ya=r?t:null,!r&&88==t&&!Eo&&(ro?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){function t(e){18!=e.keyCode&&e.altKey||(co(r,"CodeMirror-crosshair"),he(document,"keyup",t),he(document,"mouseover",t))}var r=e.display.lineDiv;l(r,"CodeMirror-crosshair");Ao(document,"keyup",t),Ao(document,"mouseover",t)}(this)}}function hi(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function pi(e){if(!(lt(this.display,e)||me(this,e)||e.ctrlKey&&!e.altKey||ro&&e.metaKey)){var t=e.keyCode,r=e.charCode;if(Yi&&t==ya)return ya=null,void be(e);if(!Yi||e.which&&!(e.which<10)||!di(this,e)){var n=String.fromCharCode(null==r?t:r);"\b"!=n&&(function(e,t,r){return ci(e,"'"+r+"'",t,function(t){return si(e,t,!0)})}(this,e,n)||this.display.input.onKeyPress(e))}}}function mi(e){var t=this.display;if(!(me(this,e)||t.activeTouch&&t.input.supportsTouch()))if(t.input.ensurePolled(),t.shift=e.shiftKey,lt(t,e))Vi||(t.scroller.draggable=!1,setTimeout(function(){return t.scroller.draggable=!0},100));else if(!yi(this,e)){var r=qt(this,e),n=Te(e),i=r?function(e,t){var r=+new Date;return xa&&xa.compare(r,e,t)?(wa=xa=null,"triple"):wa&&wa.compare(r,e,t)?(xa=new ba(r,e,t),wa=null,"double"):(wa=new ba(r,e,t),xa=null,"single")}(r,n):"single";window.focus(),1==n&&this.state.selectingText&&this.state.selectingText(e),r&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return o=(1==t?"Left":2==t?"Middle":"Right")+o,ci(e,Jn(o,i),i,function(t){if("string"==typeof t&&(t=ga[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=go}finally{e.state.suppressEdits=!1}return n})}(this,n,r,i,e)||(1==n?r?function(e,t,r,n){Ui?setTimeout(c(Xt,e),0):e.curOp.focus=a();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=no?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=ro?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(ro?r.altKey:r.ctrlKey));return i}(e,r,n),l=e.doc.sel;e.options.dragDrop&&Oo&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(F((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(F(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,a=xr(e,function(t){Vi&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(document,"mouseup",a),he(document,"mousemove",l),he(i.scroller,"dragstart",s),he(i.scroller,"drop",a),o||(be(t),n.addNew||fn(e.doc,r,null,null,n.extend),Vi||Ui&&9==Ki?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return o=!0};Vi&&(i.scroller.draggable=!0);e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();Ao(document,"mouseup",a),Ao(document,"mousemove",l),Ao(i.scroller,"dragstart",s),Ao(i.scroller,"drop",a),Zt(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){function i(t){if(0!=F(v,t))if(v=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,a=d(S(c,r.line).text,r.ch,o),l=d(S(c,t.line).text,t.ch,o),s=Math.min(a,l),m=Math.max(a,l),g=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=y;g++){var b=S(c,g).text,w=h(b,s,o);s==m?i.push(new ra(W(g,w),W(g,w))):b.length>w&&i.push(new ra(W(g,w),W(g,h(b,m,o))))}i.length||i.push(new ra(r,r)),vn(c,jr(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,k=u,C=gi(e,t,n.unit),T=k.anchor;F(C.anchor,T)>0?(x=C.head,T=H(k.from(),C.anchor)):(x=C.anchor,T=P(k.to(),C.head));var L=p.ranges.slice(0);L[f]=function(e,t){var r=t.anchor,n=t.head,i=S(e.doc,r.line);if(0==F(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var a=ue(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;var c;if(n.line!=r.line)c=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==l.level?-1:1);c=u==s-1||u==s?d<0:d>0}var f=o[s+(c?-1:0)],h=c==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new ra(new W(r.line,p,m),n)}(e,new ra(R(c,T),x)),vn(c,jr(L,f),yo)}}function o(t){var r=++b,l=qt(e,t,!0,"rectangle"==n.unit);if(l)if(0!=F(l,v)){e.curOp.focus=a(),i(l);var u=rr(s,c);(l.line>=u.to||l.line<u.from)&&setTimeout(xr(e,function(){b==r&&o(t)}),150)}else{var d=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;d&&setTimeout(xr(e,function(){b==r&&(s.scroller.scrollTop+=d,o(t))}),50)}}function l(t){e.state.selectingText=!1,b=1/0,be(t),s.input.focus(),he(document,"mousemove",w),he(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;be(t);var u,f,p=c.sel,m=p.ranges;n.addNew&&!n.extend?(f=c.sel.contains(r),u=f>-1?m[f]:new ra(r,r)):(u=c.sel.primary(),f=c.sel.primIndex);if("rectangle"==n.unit)n.addNew||(u=new ra(r,r)),r=qt(e,t,!0,!0),f=-1;else{var g=gi(e,r,n.unit);u=n.extend?dn(u,g.anchor,g.head,n.extend):g}n.addNew?-1==f?(f=m.length,vn(c,jr(m.concat([u]),f),{scroll:!1,origin:"*mouse"})):m.length>1&&m[f].empty()&&"char"==n.unit&&!n.extend?(vn(c,jr(m.slice(0,f).concat(m.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):pn(c,f,u,yo):(f=0,vn(c,new ta([u],0),yo),p=c.sel);var v=r;var y=s.wrapper.getBoundingClientRect(),b=0;var w=xr(e,function(e){Te(e)?o(e):l(e)}),x=xr(e,l);e.state.selectingText=x,Ao(document,"mousemove",w),Ao(document,"mouseup",x)}(e,n,t,o)}(this,r,i,e):Ce(e)==t.scroller&&be(e):2==n?(r&&fn(this.doc,r),setTimeout(function(){return t.input.focus()},20)):3==n&&(so?bi(this,e):Zt(this)))}}function gi(e,t,r){if("char"==r)return new ra(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new ra(W(t.line,0),R(e.doc,W(t.line+1,0)));var n=r(e,t);return new ra(n.from,n.to)}function vi(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&be(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!ve(e,r))return xe(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){return pe(e,r,e,N(e.doc,o),e.options.gutters[s],t),xe(t)}}}function yi(e,t){return vi(e,t,"gutterClick",!0)}function bi(e,t){lt(e.display,t)||function(e,t){if(!ve(e,"gutterContextMenu"))return!1;return vi(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function wi(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ct(e)}function xi(e){zr(e),Tr(e),nr(e)}function ki(e,t,r){if(!t!=!(r&&r!=ka)){var n=e.display.dragFunctions,i=t?Ao:he;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Ci(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(co(e.display.wrapper,"CodeMirror-wrap"),ce(e)),Bt(e),Tr(e),Ct(e),setTimeout(function(){return mr(e)},100)}function Ti(e,t){var o=this;if(!(this instanceof Ti))return new Ti(e,t);this.options=t=t?u(t):{},u(Ca,t,!1),Pr(t);var a=t.value;"string"==typeof a&&(a=new sa(a,t.mode,null,t.lineSeparator,t.direction)),this.doc=a;var l=new Ti.inputStyles[t.inputStyle](this),s=this.display=new function(e,t,r){this.input=r,this.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),this.scrollbarFiller.setAttribute("cm-not-content","true"),this.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),this.gutterFiller.setAttribute("cm-not-content","true"),this.lineDiv=i("div",null,"CodeMirror-code"),this.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),this.cursorDiv=n("div",null,"CodeMirror-cursors"),this.measure=n("div",null,"CodeMirror-measure"),this.lineMeasure=n("div",null,"CodeMirror-measure"),this.lineSpace=i("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var o=i("div",[this.lineSpace],"CodeMirror-lines");this.mover=n("div",[o],null,"position: relative"),this.sizer=n("div",[this.mover],"CodeMirror-sizer"),this.sizerWidth=null,this.heightForcer=n("div",null,null,"position: absolute; height: "+mo+"px; width: 1px;"),this.gutters=n("div",null,"CodeMirror-gutters"),this.lineGutter=null,this.scroller=n("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll"),this.scroller.setAttribute("tabIndex","-1"),this.wrapper=n("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror"),Ui&&Ki<8&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),Vi||Ri&&to||(this.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(this.wrapper):e(this.wrapper)),this.viewFrom=this.viewTo=t.first,this.reportedViewFrom=this.reportedViewTo=t.first,this.view=[],this.renderedView=null,this.externalMeasured=null,this.viewOffset=0,this.lastWrapHeight=this.lastWrapWidth=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLine=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.selForContextMenu=null,this.activeTouch=null,r.init(this)}(e,a,l);s.wrapper.CodeMirror=this,zr(this),wi(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new fo,keySeq:null,specialChars:null},t.autofocus&&!to&&s.input.focus(),Ui&&Ki<11&&setTimeout(function(){return o.display.input.reset(!0)},20),function(e){function t(){o.activeTouch&&(a=setTimeout(function(){return o.activeTouch=null},1e3),(l=o.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var o=e.display;Ao(o.scroller,"mousedown",xr(e,mi)),Ui&&Ki<11?Ao(o.scroller,"dblclick",xr(e,function(t){if(!me(e,t)){var r=qt(e,t);if(r&&!yi(e,t)&&!lt(e.display,t)){be(t);var n=e.findWordAt(r);fn(e.doc,n.anchor,n.head)}}})):Ao(o.scroller,"dblclick",function(t){return me(e,t)||be(t)});so||Ao(o.scroller,"contextmenu",function(t){return bi(e,t)});var a,l={end:0};Ao(o.scroller,"touchstart",function(t){if(!me(e,t)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(t)&&!yi(e,t)){o.input.ensurePolled(),clearTimeout(a);var r=+new Date;o.activeTouch={start:r,moved:!1,prev:r-l.end<=300?l:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),Ao(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),Ao(o.scroller,"touchend",function(r){var n=o.activeTouch;if(n&&!lt(o,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,l=e.coordsChar(o.activeTouch,"page");a=!n.prev||i(n,n.prev)?new ra(l,l):!n.prev.prev||i(n,n.prev.prev)?e.findWordAt(l):new ra(W(l.line,0),R(e.doc,W(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(r)}t()}),Ao(o.scroller,"touchcancel",t),Ao(o.scroller,"scroll",function(){o.scroller.clientHeight&&(dr(e,o.scroller.scrollTop),hr(e,o.scroller.scrollLeft,!0),pe(e,"scroll",e))}),Ao(o.scroller,"mousewheel",function(t){return Rr(e,t)}),Ao(o.scroller,"DOMMouseScroll",function(t){return Rr(e,t)}),Ao(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){me(e,t)||ke(t)},over:function(t){me(e,t)||(!function(e,t){var i=qt(e,t);if(i){var o=document.createDocumentFragment();Gt(e,i,o),e.display.dragCursor||(e.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),r(e.display.dragCursor,o)}}(e,t),ke(t))},start:function(t){return function(e,t){if(Ui&&(!e.state.draggingText||+new Date-ca<100))ke(t);else if(!me(e,t)&&!lt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Xi)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Yi&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Yi&&r.parentNode.removeChild(r)}}(e,t)},drop:xr(e,qn),leave:function(t){me(e,t)||Un(e)}};var s=o.input.getField();Ao(s,"keyup",function(t){return hi.call(e,t)}),Ao(s,"keydown",xr(e,fi)),Ao(s,"keypress",xr(e,pi)),Ao(s,"focus",function(t){return Jt(e,t)}),Ao(s,"blur",function(t){return Qt(e,t)})}(this),Vn(),yr(this),this.curOp.forceUpdate=!0,Jr(this,a),t.autofocus&&!to||this.hasFocus()?setTimeout(c(Jt,this),20):Qt(this);for(var d in Ta)Ta.hasOwnProperty(d)&&Ta[d](o,t[d],ka);ir(this),t.finishInit&&t.finishInit(this);for(var f=0;f<Sa.length;++f)Sa[f](o);br(this),Vi&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function Si(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=De(e,t).state:r="prev");var a=e.options.tabSize,l=S(o,t),s=d(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==go||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?d(S(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)h+=a,f+="\t";if(h<c&&(f+=p(c-h)),f!=u)return En(o,f,W(t,0),W(t,u.length),"+input"),l.stateAfter=null,!0;for(var g=0;g<o.sel.ranges.length;g++){var v=o.sel.ranges[g];if(v.head.line==t&&v.head.ch<u.length){var y=W(t,u.length);pn(o,g,new ra(y,y));break}}}function Li(e){La=e}function Mi(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=No(t),s=null;if(a&&n.ranges.length>1)if(La&&La.text.join("\n")==t){if(n.ranges.length%La.text.length==0){s=[];for(var c=0;c<La.text.length;c++)s.push(o.splitLines(La.text[c]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(s=g(l,function(e){return[e]}));for(var u,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],h=f.from(),p=f.to();f.empty()&&(r&&r>0?h=W(h.line,h.ch-r):e.state.overwrite&&!a?p=W(p.line,Math.min(S(o,p.line).text.length,p.ch+m(l).length)):La&&La.lineWise&&La.text.join("\n")==t&&(h=p=W(h.line,0))),u=e.curOp.updateInput;var v={from:h,to:p,text:s?s[d%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Mn(e.doc,v),Xe(e,"inputRead",e,v)}t&&!a&&Oi(e,t),lr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ai(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||wr(t,function(){return Mi(t,r,0,null,"paste")}),!0}function Oi(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Si(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Si(e,i.head.line,"smart"));a&&Xe(e,"electricInput",e,i.head.line)}}}function Ni(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:W(i,0),head:W(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function _i(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Ei(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Vi?e.style.width="1000px":e.setAttribute("wrap","off"),Qi&&(e.style.border="1px solid black"),_i(e),t}function Wi(e,t,r,n,i){function o(n){var o;if(null==(o=i?function(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return ni(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return ni(t,r,n);var l,s=function(e,r){return ri(t,e instanceof W?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||vt(e,t),Dt(e,t,l,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?s(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=s(r,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after";return new W(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new W(r.line,s(e,1),"before"):new W(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?n.begin:s(n.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),n.begin<=c&&c<n.end)return o(c,l)}},m=p(o+n,n,u);if(m)return m;var g=n>0?u.end:s(u.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:i.length-1,n,c(g)))?null:m}(e.cm,s,t,r):ni(s,t,r))){if(n||!function(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new W(n,t.ch,t.sticky),s=S(e,n))}())return!1;t=ii(i,e.cm,s,t.line,r)}else t=o;return!0}var a=t,l=r,s=S(e,t.line);if("char"==n)o();else if("column"==n)o(!0);else if("word"==n||"group"==n)for(var c=null,u="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||o(!f);f=!1){var h=s.text.charAt(t.ch)||"\n",p=w(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||f||p||(p="s"),c&&c!=p){r<0&&(r=1,o(),t.sticky="after");break}if(p&&(c=p),r>0&&!o(!f))break}var m=Cn(e,t,a,l,!0);return D(a,m)&&(m.hitSide=!0),m}function Fi(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Pt(e.display),3);i=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var c;(c=Wt(e,a,i)).outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Di(e,t){var r=gt(e,t.line);if(!r||r.hidden)return null;var n=S(e.doc,t.line),i=pt(r,n,t.line),o=de(n,e.doc.direction),a="left";if(o){a=ue(o,t.ch)%2?"right":"left"}var l=bt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function zi(e,t){return t&&(e.bad=!0),e}function Pi(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return zi(e.clipPos(W(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return function(e,t,r){function n(t,r,n){for(var i=-1;i<(d?d.length:0);i++)for(var o=i<0?u.map:d[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=O(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),W(s,c)}}}var i=e.text.firstChild,a=!1;if(!t||!o(i,t))return zi(W(O(e.line),0),!0);if(t==i&&(a=!0,t=i.childNodes[r],r=0,!t)){var l=e.rest?m(e.rest):e.line;return zi(W(O(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));for(;c.parentNode!=i;)c=c.parentNode;var u=e.measure,d=u.maps;var f=n(s,c,r);if(f)return zi(f,a);for(var h=c.nextSibling,p=s?s.nodeValue.length-r:0;h;h=h.nextSibling){if(f=n(h,h.firstChild,0))return zi(W(f.line,f.ch-p),a);p+=h.textContent.length}for(var g=c.previousSibling,v=r;g;g=g.previousSibling){if(f=n(g,g.firstChild,-1))return zi(W(f.line,f.ch+v),a);v+=g.textContent.length}}(a,t,r)}}var Hi=navigator.userAgent,Ii=navigator.platform,Ri=/gecko\/\d/i.test(Hi),ji=/MSIE \d/.test(Hi),Bi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hi),qi=/Edge\/(\d+)/.exec(Hi),Ui=ji||Bi||qi,Ki=Ui&&(ji?document.documentMode||6:+(qi||Bi)[1]),Vi=!qi&&/WebKit\//.test(Hi),Gi=Vi&&/Qt\/\d+\.\d+/.test(Hi),$i=!qi&&/Chrome\//.test(Hi),Yi=/Opera\//.test(Hi),Xi=/Apple Computer/.test(navigator.vendor),Zi=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Hi),Ji=/PhantomJS/.test(Hi),Qi=!qi&&/AppleWebKit/.test(Hi)&&/Mobile\/\w+/.test(Hi),eo=/Android/.test(Hi),to=Qi||eo||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Hi),ro=Qi||/Mac/.test(Ii),no=/\bCrOS\b/.test(Hi),io=/win/i.test(Ii),oo=Yi&&Hi.match(/Version\/(\d*\.\d*)/);oo&&(oo=Number(oo[1])),oo&&oo>=15&&(Yi=!1,Vi=!0);var ao,lo=ro&&(Gi||Yi&&(null==oo||oo<12.11)),so=Ri||Ui&&Ki>=9,co=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};ao=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var uo=function(e){e.select()};Qi?uo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Ui&&(uo=function(e){try{e.select()}catch(e){}});var fo=function(){this.id=null};fo.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ho,po,mo=30,go={toString:function(){return"CodeMirror.Pass"}},vo={scroll:!1},yo={origin:"*mouse"},bo={origin:"+move"},wo=[""],xo=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ko=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Co=!1,To=!1,So=null,Lo=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(r,n){var c="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var u=r.length,d=[],f=0;f<u;++f)d.push(e(r.charCodeAt(f)));for(var h=0,p=c;h<u;++h){var g=d[h];"m"==g?d[h]=p:p=g}for(var v=0,y=c;v<u;++v){var b=d[v];"1"==b&&"r"==y?d[v]="n":a.test(b)&&(y=b,"r"==b&&(d[v]="R"))}for(var w=1,x=d[0];w<u-1;++w){var k=d[w];"+"==k&&"1"==x&&"1"==d[w+1]?d[w]="1":","!=k||x!=d[w+1]||"1"!=x&&"n"!=x||(d[w]=x),x=k}for(var C=0;C<u;++C){var T=d[C];if(","==T)d[C]="N";else if("%"==T){var S=void 0;for(S=C+1;S<u&&"%"==d[S];++S);for(var L=C&&"!"==d[C-1]||S<u&&"1"==d[S]?"1":"N",M=C;M<S;++M)d[M]=L;C=S-1}}for(var A=0,O=c;A<u;++A){var N=d[A];"L"==O&&"1"==N?d[A]="L":a.test(N)&&(O=N)}for(var _=0;_<u;++_)if(o.test(d[_])){var E=void 0;for(E=_+1;E<u&&o.test(d[E]);++E);for(var W="L"==(_?d[_-1]:c),F=W==("L"==(E<u?d[E]:c))?W?"L":"R":c,D=_;D<E;++D)d[D]=F;_=E-1}for(var z,P=[],H=0;H<u;)if(l.test(d[H])){var I=H;for(++H;H<u&&l.test(d[H]);++H);P.push(new t(0,I,H))}else{var R=H,j=P.length;for(++H;H<u&&"L"!=d[H];++H);for(var B=R;B<H;)if(s.test(d[B])){R<B&&P.splice(j,0,new t(1,R,B));var q=B;for(++B;B<H&&s.test(d[B]);++B);P.splice(j,0,new t(2,q,B)),R=B}else++B;R<H&&P.splice(j,0,new t(1,R,H))}return"ltr"==n&&(1==P[0].level&&(z=r.match(/^\s+/))&&(P[0].from=z[0].length,P.unshift(new t(0,0,z[0].length))),1==m(P).level&&(z=r.match(/\s+$/))&&(m(P).to-=z[0].length,P.push(new t(0,u-z[0].length,u)))),"rtl"==n?P.reverse():P}}(),Mo=[],Ao=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Mo).concat(r)}},Oo=function(){if(Ui&&Ki<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),No=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},_o=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Eo=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Wo=null,Fo={},Do={},zo={},Po=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Po.prototype.eol=function(){return this.pos>=this.string.length},Po.prototype.sol=function(){return this.pos==this.lineStart},Po.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Po.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Po.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Po.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Po.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Po.prototype.skipToEnd=function(){this.pos=this.string.length},Po.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Po.prototype.backUp=function(e){this.pos-=e},Po.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=d(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Po.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Po.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Po.prototype.current=function(){return this.string.slice(this.start,this.pos)},Po.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Po.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Po.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ho=function(e,t){this.state=e,this.lookAhead=t},Io=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Io.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Io.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Io.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Io.fromSaved=function(e,t,r){return t instanceof Ho?new Io(e,Ne(e.mode,t.state),r,t.lookAhead):new Io(e,Ne(e.mode,t),r)},Io.prototype.save=function(e){var t=!1!==e?Ne(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ho(t,this.maxLookAhead):t};var Ro=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},jo=function(e,t,r){this.text=e,$(this,t),this.height=r?r(this):1};jo.prototype.lineNo=function(){return O(this)},ye(jo);var Bo,qo={},Uo={},Ko=null,Vo=null,Go={left:0,right:0,top:0,bottom:0},$o=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Ao(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ao(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ui&&Ki<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};$o.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},$o.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},$o.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},$o.prototype.zeroWidthHack=function(){var e=ro&&!Zi?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new fo,this.disableVert=new fo},$o.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},$o.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Yo=function(){};Yo.prototype.update=function(){return{bottom:0,right:0}},Yo.prototype.setScrollLeft=function(){},Yo.prototype.setScrollTop=function(){},Yo.prototype.clear=function(){};var Xo={native:$o,null:Yo},Zo=0,Jo=function(e,t,r){var n=e.display;this.viewport=t,this.visible=rr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=ft(e),this.force=r,this.dims=It(e),this.events=[]};Jo.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},Jo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var Qo=0,ea=null;Ui?ea=-.53:Ri?ea=15:$i?ea=-.7:Xi&&(ea=-1/3);var ta=function(e,t){this.ranges=e,this.primIndex=t};ta.prototype.primary=function(){return this.ranges[this.primIndex]},ta.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!D(r.anchor,n.anchor)||!D(r.head,n.head))return!1}return!0},ta.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ra(z(this.ranges[t].anchor),z(this.ranges[t].head));return new ta(e,this.primIndex)},ta.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ta.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(F(t,n.from())>=0&&F(e,n.to())<=0)return r}return-1};var ra=function(e,t){this.anchor=e,this.head=t};ra.prototype.from=function(){return H(this.anchor,this.head)},ra.prototype.to=function(){return P(this.anchor,this.head)},ra.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Pn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Be(i),Xe(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},Hn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Pn))){var l=[];this.collapse(l),this.children=[new Pn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Pn(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Hn(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=f(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new Hn(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var na=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};na.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=O(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=at(this);A(r,Math.max(0,r.height-o)),e&&(wr(e,function(){In(e,r,-o),Sr(e,n,"widget")}),Xe(e,"lineWidgetCleared",e,this,n))}},na.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=at(this)-t;i&&(A(n,n.height+i),r&&wr(r,function(){r.curOp.forceUpdate=!0,In(r,n,i),Xe(r,"lineWidgetChanged",r,e,O(n))}))},ye(na);var ia=0,oa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ia};oa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yr(e),ve(this,"clear")){var r=this.find();r&&Xe(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=q(a.markedSpans,this);e&&!this.collapsed?Sr(e,O(a),"text"):e&&(null!=l.to&&(i=O(a)),null!=l.from&&(n=O(a))),a.markedSpans=U(a.markedSpans,l),null==l.from&&this.collapsed&&!oe(this.doc,a)&&e&&A(a,Pt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=re(this.lines[s]),u=se(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Tr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wn(e.doc)),e&&Xe(e,"markerCleared",e,this,n,i),t&&br(e),this.parent&&this.parent.clear()}},oa.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=q(o.markedSpans,this);if(null!=a.from&&(r=W(t?o:O(o),a.from),-1==e))return r;if(null!=a.to&&(n=W(t?o:O(o),a.to),1==e))return n}return r&&{from:r,to:n}},oa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&wr(n,function(){var i=t.line,o=O(t.line),a=gt(n,o);if(a&&(xt(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!oe(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=at(r)-l;s&&A(i,i.height+s)}Xe(n,"markerChanged",n,e)})},oa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=f(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},oa.prototype.detachLine=function(e){if(this.lines.splice(f(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(oa);var aa=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};aa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Xe(this,"clear")}},aa.prototype.find=function(e,t){return this.primary.find(e,t)},ye(aa);var la=0,sa=function(e,t,r,n,i){if(!(this instanceof sa))return new sa(e,t,r,n,i);null==r&&(r=0),Hn.call(this,[new Pn([new jo("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=W(r,0);this.sel=Br(o),this.history=new en(null),this.id=++la,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Xr(this,{from:o,to:o,text:e}),vn(this,Br(o),vo)};sa.prototype=y(Hn.prototype,{constructor:sa,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=M(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Cr(function(e){var t=W(this.first,0),r=this.first+this.size-1;Mn(this,{from:t,to:W(r,S(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&sr(this.cm,0,0),vn(this,Br(t),vo)}),replaceRange:function(e,t,r,n){En(this,e,t=R(this,t),r=r?R(this,r):t,n)},getRange:function(e,t,r){var n=L(this,R(this,e),R(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(_(this,e))return S(this,e)},getLineNumber:function(e){return O(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=S(this,e)),re(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return R(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Cr(function(e,t,r){mn(this,R(this,"number"==typeof e?W(e,t||0):e),null,r)}),setSelection:Cr(function(e,t,r){mn(this,R(this,e),R(this,t||e),r)}),extendSelection:Cr(function(e,t,r){fn(this,R(this,e),t&&R(this,t),r)}),extendSelections:Cr(function(e,t){hn(this,j(this,e),t)}),extendSelectionsBy:Cr(function(e,t){hn(this,j(this,g(this.sel.ranges,e)),t)}),setSelections:Cr(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new ra(R(this,e[i].anchor),R(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),vn(this,jr(n,t),r)}}),addSelection:Cr(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new ra(R(this,e),R(this,t||e))),vn(this,jr(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Cr(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&function(e,t,r){for(var n=[],i=W(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Vr(l.from,i,o),c=Vr(qr(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=F(u.head,u.anchor)<0;n[a]=new ra(d?c:s,d?s:c)}else n[a]=new ra(s,s)}return new ta(n,e.sel.primIndex)}(this,n,t),s=n.length-1;s>=0;s--)Mn(this,n[s]);l?gn(this,l):this.cm&&lr(this.cm)}),undo:Cr(function(){On(this,"undo")}),redo:Cr(function(){On(this,"redo")}),undoSelection:Cr(function(){On(this,"undo",!0)}),redoSelection:Cr(function(){On(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new en(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:un(this.history.done),undone:un(this.history.undone)}},setHistory:function(e){var t=this.history=new en(this.history.maxGeneration);t.done=un(e.done.slice(0),null,!0),t.undone=un(e.undone.slice(0),null,!0)},setGutterMarker:Cr(function(e,t,r){return zn(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&x(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Cr(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&zn(t,r,"gutter",function(){return r.gutterMarkers[e]=null,x(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!_(this,e))return null;if(t=e,!(e=S(this,e)))return null}else if(null==(t=O(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Cr(function(t,r,n){return zn(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:Cr(function(t,r,n){return zn(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var a=o.match(e(n));if(!a)return!1;var l=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:Cr(function(e,t,r){return function(e,t,r,n){var i=new na(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),zn(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!oe(e,t)){var n=le(t)<e.scrollTop;A(t,t.height+at(i)),n&&ar(o,i.height),o.curOp.forceUpdate=!0}return!0}),Xe(o,"lineWidgetAdded",o,i,"number"==typeof t?t:O(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Rn(this,R(this,e),R(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=R(this,e),Rn(this,e,e,r,"bookmark")},findMarksAt:function(e){var t=[],r=S(this,(e=R(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=R(this,e),t=R(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),R(this,W(r,t))},indexFromPos:function(e){var t=(e=R(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new sa(M(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new sa(M(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(F(o,a)){var l=Rn(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}(n,jn(this)),n},unlinkDoc:function(e){if(e instanceof Ti&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Bn(jn(this));break}}if(e.history==this.history){var r=[e.id];Zr(e,function(e){return r.push(e.id)},!0),e.history=new en(null),e.history.done=un(this.history.done,r),e.history.undone=un(this.history.undone,r)}},iterLinkedDocs:function(e){Zr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):No(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Cr(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){wr(e,function(){Qr(e),Tr(e)})}(this.cm))})}),sa.prototype.eachLine=sa.prototype.iter;for(var ca=0,ua=!1,da={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},fa=0;fa<10;fa++)da[fa+48]=da[fa+96]=String(fa);for(var ha=65;ha<=90;ha++)da[ha]=String.fromCharCode(ha);for(var pa=1;pa<=12;pa++)da[pa+111]=da[pa+63235]="F"+pa;var ma={};ma.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ma.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ma.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ma.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ma.default=ro?ma.macDefault:ma.pcDefault;var ga={selectAll:Sn,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),vo)},killLine:function(e){return ti(e,function(t){if(t.empty()){var r=S(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:W(t.head.line+1,0)}:{from:t.head,to:W(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ti(e,function(t){return{from:W(t.from().line,0),to:R(e.doc,W(t.to().line+1,0))}})},delLineLeft:function(e){return ti(e,function(e){return{from:W(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ti(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return ti(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(W(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(W(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return oi(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return li(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ai(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},bo)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},bo)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?li(e,t.head):n},bo)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=d(e.getLine(o.line),o.ch,n);t.push(p(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=S(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new W(i.line,i.ch-1)),i.ch>0)i=new W(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),W(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new W(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),W(i.line-1,a.length-1),i,"+transpose"))}r.push(new ra(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);lr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},va=new fo,ya=null,ba=function(e,t,r){this.time=e,this.pos=t,this.button=r};ba.prototype.compare=function(e,t,r){return this.time+400>e&&0==F(t,this.pos)&&r==this.button};var wa,xa,ka={toString:function(){return"CodeMirror.Init"}},Ca={},Ta={};Ti.defaults=Ca,Ti.optionHandlers=Ta;var Sa=[];Ti.defineInitHook=function(e){return Sa.push(e)};var La=null,Ma=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new fo,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ma.prototype.init=function(e){function t(e){if(!me(i,e)){if(i.somethingSelected())Li({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Ni(i);Li({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,vo),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=La.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var a=Ei(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=La.text.join("\n");var s=document.activeElement;uo(l),setTimeout(function(){i.display.lineSpace.removeChild(a),s.focus(),s==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;_i(o,i.options.spellcheck),Ao(o,"paste",function(e){me(i,e)||Ai(e,i)||Ki<=11&&setTimeout(xr(i,function(){return r.updateFromDOM()}),20)}),Ao(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),Ao(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),Ao(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ao(o,"touchstart",function(){return n.forceCompositionEnd()}),Ao(o,"input",function(){r.composing||r.readFromDOMSoon()}),Ao(o,"copy",t),Ao(o,"cut",t)},Ma.prototype.prepareSelection=function(){var e=Vt(this.cm,!1);return e.focus=this.cm.state.focused,e},Ma.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ma.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Pi(t,e.anchorNode,e.anchorOffset),a=Pi(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=F(H(o,a),n)||0!=F(P(o,a),i)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Di(t,n)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Di(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=ao(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!Ri&&t.state.focused?(e.collapse(s.node,s.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):Ri&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ma.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ma.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},Ma.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ma.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},Ma.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ma.prototype.blur=function(){this.div.blur()},Ma.prototype.getField=function(){return this.div},Ma.prototype.supportsTouch=function(){return!0},Ma.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():wr(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Ma.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ma.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(eo&&$i&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Pi(t,e.anchorNode,e.anchorOffset),n=Pi(t,e.focusNode,e.focusOffset);r&&n&&wr(t,function(){vn(t.doc,Br(r,n),vo),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ma.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=W(n.line-1,S(e.doc,n.line-1).length)),i.ch==S(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=W(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||0==(o=Ut(e,n.line))?(a=O(t.view[0].line),l=t.view[0].node):(a=O(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Ut(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=O(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(function(e,t,r,n,i){function o(){c&&(s+=u,c=!1)}function a(e){e&&(o(),s+=e)}function l(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void a(r||t.textContent.replace(/\u200b/g,""));var s,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(W(n,0),W(i+1,0),function(e){return function(t){return t.id==e}}(+d));return void(f.length&&(s=f[0].find(0))&&a(L(e.doc,s.from,s.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p)$/i.test(t.nodeName);h&&o();for(var p=0;p<t.childNodes.length;p++)l(t.childNodes[p]);h&&(c=!0)}else 3==t.nodeType&&a(t.nodeValue)}for(var s="",c=!1,u=e.doc.lineSeparator();l(t),t!=r;)t=t.nextSibling;return s}(e,l,c,a,s)),f=L(e.doc,W(a,0),W(s,S(e.doc,s).text.length));d.length>1&&f.length>1;)if(m(d)==m(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var h=0,p=0,g=d[0],v=f[0],y=Math.min(g.length,v.length);h<y&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=m(d),w=m(f),x=Math.min(b.length-(1==d.length?h:0),w.length-(1==f.length?h:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==d.length&&1==f.length&&a==n.line)for(;h&&h>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)h--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var k=W(a,h),C=W(s,f.length?m(f).length-p:0);return d.length>1||d[0]||F(k,C)?(En(e.doc,d,k,C,"+input"),!0):void 0},Ma.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ma.prototype.reset=function(){this.forceCompositionEnd()},Ma.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ma.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Ma.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||wr(this.cm,function(){return Tr(e.cm)})},Ma.prototype.setUneditable=function(e){e.contentEditable="false"},Ma.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||xr(this.cm,Mi)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ma.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ma.prototype.onContextMenu=function(){},Ma.prototype.resetPosition=function(){},Ma.prototype.needsContentAttribute=!0;var Aa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new fo,this.hasSelection=!1,this.composing=null};Aa.prototype.init=function(e){function t(e){if(!me(i,e)){if(i.somethingSelected())Li({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Ni(i);Li({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,vo):(n.prevInput="",a.value=t.text.join("\n"),uo(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Ei(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Qi&&(a.style.width="0px"),Ao(a,"input",function(){Ui&&Ki>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Ao(a,"paste",function(e){me(i,e)||Ai(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ao(a,"cut",t),Ao(a,"copy",t),Ao(e.scroller,"paste",function(t){lt(e,t)||me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ao(e.lineSpace,"selectstart",function(t){lt(e,t)||be(t)}),Ao(a,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ao(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Aa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Vt(e);if(e.options.moveInputWithCursor){var i=Nt(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Aa.prototype.showSelection=function(e){var t=this.cm.display;r(t.cursorDiv,e.cursors),r(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Aa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&uo(this.textarea),Ui&&Ki>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",Ui&&Ki>=9&&(this.hasSelection=null))}},Aa.prototype.getField=function(){return this.textarea},Aa.prototype.supportsTouch=function(){return!1},Aa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!to||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},Aa.prototype.blur=function(){this.textarea.blur()},Aa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Aa.prototype.receivedFocus=function(){this.slowPoll()},Aa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Aa.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},Aa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||_o(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(Ui&&Ki>=9&&this.hasSelection===i||ro&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return wr(t,function(){Mi(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Aa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Aa.prototype.onKeyPress=function(){Ui&&Ki>=9&&(this.hasSelection=null),this.fastPoll()},Aa.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=u,a.style.cssText=c,Ui&&Ki<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!Ui||Ui&&Ki<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?xr(i,Sn)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=qt(i,e),s=o.scroller.scrollTop;if(l&&!Yi){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&xr(i,vn)(i.doc,Br(l),vo);var c=a.style.cssText,u=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var d=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(Ui?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var f;if(Vi&&(f=window.scrollY),o.input.focus(),Vi&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Ui&&Ki>=9&&t(),so){ke(e);var h=function(){he(window,"mouseup",h),setTimeout(r,20)};Ao(window,"mouseup",h)}else setTimeout(r,50)}},Aa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Aa.prototype.setUneditable=function(){},Aa.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=ka&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=ka,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Gr(e)},!0),t("indentUnit",2,Gr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){$r(e),Ct(e),Tr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(W(n,o))}n++});for(var i=r.length-1;i>=0;i--)En(e.doc,t,r[i],W(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ka&&e.refresh()}),t("specialCharPlaceholder",Ke,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",to?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!io),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){wi(e),xi(e)},!0),t("keyMap","default",function(e,t,r){var n=ei(t),i=r!=ka&&ei(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Ci,!0),t("gutters",[],function(e){Pr(e.options),xi(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Rt(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return mr(e)},!0),t("scrollbarStyle","native",function(e){vr(e),mr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pr(e.options),xi(e)},!0),t("firstLineNumber",1,xi,!0),t("lineNumberFormatter",function(e){return e},xi,!0),t("showCursorWhenSelecting",!1,Kt,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Qt(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ki),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Kt,!0),t("singleCursorHeightPerLine",!0,Kt,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,$r,!0),t("addModeClass",!1,$r,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,$r,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Ti),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&xr(this,t[e])(this,r,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ei(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:kr(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Tr(this)}),removeOverlay:kr(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Tr(this)}}),indentLine:kr(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),_(this.doc,e)&&Si(this,e,t,r)}),indentSelection:kr(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Si(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&lr(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Si(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&pn(this.doc,n,new ra(o,c[n].to()),vo)}}}),getTokenAt:function(e,t){return Ie(this,e,t)},getLineTokens:function(e,t){return Ie(this,W(e),t,!0)},getTokenTypeAt:function(e){e=R(this.doc,e);var t,r=Fe(this,S(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&n.push(l)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==f(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return e=I(r,null==e?r.first+r.size-1:e),De(this,e+1,t).state},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?R(this.doc,e):e?n.from():n.to(),Nt(this,r,t||"page")},charCoords:function(e,t){return Ot(this,R(this.doc,e),t||"page")},coordsChar:function(e,t){return e=At(this,e,t||"page"),Wt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=At(this,{top:e,left:0},t||"page").top,N(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=S(this.doc,e)}else n=e;return Mt(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-le(n):0)},defaultTextHeight:function(){return Pt(this.display)},defaultCharWidth:function(){return Ht(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Nt(this,R(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&function(e,t){var r=or(e,t);null!=r.scrollTop&&dr(e,r.scrollTop),null!=r.scrollLeft&&hr(e,r.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:kr(fi),triggerOnKeyPress:kr(pi),triggerOnKeyUp:hi,triggerOnMouseDown:kr(mi),execCommand:function(e){if(ga.hasOwnProperty(e))return ga[e].call(null,this)},triggerElectric:kr(function(e){Oi(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=R(this.doc,e),a=0;a<t&&!(o=Wi(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:kr(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Wi(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},bo)}),deleteH:kr(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):ti(this,function(r){var i=Wi(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=R(this.doc,e),l=0;l<t;++l){var s=Nt(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Fi(this,s,i,r)).hitSide)break}return a},moveV:kr(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=Nt(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Fi(r,l,e,t);return"page"==t&&a==n.sel.primary()&&ar(r,Ot(r,s,"div").top-l.top),s},bo),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=S(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=w(o,i)?function(e){return w(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new ra(W(e.line,r),W(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):co(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:kr(function(e,t){sr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-dt(this)-this.display.barHeight,width:e.scrollWidth-dt(this)-this.display.barWidth,clientHeight:ht(this),clientWidth:ft(this)}},scrollIntoView:kr(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:W(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){cr(e),e.curOp.scrollToPos=t}(this,e):ur(this,e.from,e.to,e.margin)}),setSize:kr(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&kt(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Sr(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,pe(this,"refresh",this)}),operation:function(e){return wr(this,e)},startOperation:function(){return yr(this)},endOperation:function(){return br(this)},refresh:kr(function(){var e=this.display.cachedTextHeight;Tr(this),this.curOp.forceUpdate=!0,Ct(this),sr(this,this.doc.scrollLeft,this.doc.scrollTop),Fr(this),(null==e||Math.abs(e-Pt(this.display))>.5)&&Bt(this),pe(this,"refresh",this)}),swapDoc:kr(function(e){var t=this.doc;return t.cm=null,Jr(this,e),Ct(this),this.display.input.reset(),sr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Xe(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Ti);var Oa="iter insert remove copy getEditor constructor".split(" ");for(var Na in sa.prototype)sa.prototype.hasOwnProperty(Na)&&f(Oa,Na)<0&&(Ti.prototype[Na]=function(e){return function(){return e.apply(this.doc,arguments)}}(sa.prototype[Na]));return ye(sa),Ti.inputStyles={textarea:Aa,contenteditable:Ma},Ti.defineMode=function(e){Ti.defaults.mode||"null"==e||(Ti.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fo[e]=t}.apply(this,arguments)},Ti.defineMIME=function(e,t){Do[e]=t},Ti.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ti.defineMIME("text/plain","null"),Ti.defineExtension=function(e,t){Ti.prototype[e]=t},Ti.defineDocExtension=function(e,t){sa.prototype[e]=t},Ti.fromTextArea=function(e,t){function r(){e.value=s.getValue()}if(t=t?u(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=a();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(Ao(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ti(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=he,e.on=Ao,e.wheelEventPixels=Ir,e.Doc=sa,e.splitLines=No,e.countColumn=d,e.findColumn=h,e.isWordChar=b,e.Pass=go,e.signal=pe,e.Line=jo,e.changeEnd=qr,e.scrollbarModel=Xo,e.Pos=W,e.cmpPos=F,e.modes=Fo,e.mimeModes=Do,e.resolveMode=Me,e.getMode=Ae,e.modeExtensions=zo,e.extendMode=Oe,e.copyState=Ne,e.startState=Ee,e.innerMode=_e,e.commands=ga,e.keyMap=ma,e.keyName=Qn,e.isModifierKey=Zn,e.lookupKey=Xn,e.normalizeKeyMap=Yn,e.StringStream=Po,e.SharedTextMarker=aa,e.TextMarker=oa,e.LineWidget=na,e.e_preventDefault=be,e.e_stopPropagation=we,e.e_stop=ke,e.addClass=l,e.contains=o,e.rmClass=co,e.keyNames=da}(Ti),Ti.version="5.32.0",Ti})},{}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return h=t,e}function i(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function a(e,t,r){this.type=e,this.indent=t,this.prev=r}function l(e,t,r,n){return e.context=new a(r,t.indentation()+(!1===n?0:m),e.context),r}function s(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,r){return N[r.context.type](e,t,r)}function u(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return c(e,t,r)}function d(e){var t=e.current().toLowerCase();p=L.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var f=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,p,m=t.indentUnit,g=r.tokenHooks,v=r.documentTypes||{},y=r.mediaTypes||{},b=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},k=r.nonStandardPropertyKeywords||{},C=r.fontProperties||{},T=r.counterDescriptors||{},S=r.colorKeywords||{},L=r.valueKeywords||{},M=r.allowNested,A=r.lineComment,O=!0===r.supportsAtComponent,N={};return N.top=function(e,t,r){if("{"==e)return l(r,t,"block");if("}"==e&&r.context.prev)return s(r);if(O&&/@component/.test(e))return l(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return l(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return l(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(r,t,"at");if("hash"==e)p="builtin";else if("word"==e)p="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(r,t,"interpolation");if(":"==e)return"pseudo";if(M&&"("==e)return l(r,t,"parens")}return r.context.type},N.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(p="property","maybeprop"):k.hasOwnProperty(n)?(p="string-2","maybeprop"):M?(p=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==e?"block":M||"hash"!=e&&"qualifier"!=e?N.top(e,t,r):(p="error","block")},N.maybeprop=function(e,t,r){return":"==e?l(r,t,"prop"):c(e,t,r)},N.prop=function(e,t,r){if(";"==e)return s(r);if("{"==e&&M)return l(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return l(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)d(t);else if("interpolation"==e)return l(r,t,"interpolation")}else p+=" error";return"prop"},N.propBlock=function(e,t,r){return"}"==e?s(r):"word"==e?(p="property","maybeprop"):r.context.type},N.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?s(r):"("==e?l(r,t,"parens"):"interpolation"==e?l(r,t,"interpolation"):("word"==e&&d(t),"parens")},N.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(p="variable-3",r.context.type):c(e,t,r)},N.documentTypes=function(e,t,r){return"word"==e&&v.hasOwnProperty(t.current())?(p="tag",r.context.type):N.atBlock(e,t,r)},N.atBlock=function(e,t,r){if("("==e)return l(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return s(r)&&l(r,t,M?"block":"top");if("interpolation"==e)return l(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();p="only"==n||"not"==n||"and"==n||"or"==n?"keyword":y.hasOwnProperty(n)?"attribute":b.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":k.hasOwnProperty(n)?"string-2":L.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},N.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?s(r)&&l(r,t,M?"block":"top",!1):("word"==e&&(p="error"),r.context.type)},N.atBlock_parens=function(e,t,r){return")"==e?s(r):"{"==e||"}"==e?u(e,t,r,2):N.atBlock(e,t,r)},N.restricted_atBlock_before=function(e,t,r){return"{"==e?l(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(p="variable","restricted_atBlock_before"):c(e,t,r)},N.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,s(r)):"word"==e?(p="@font-face"==r.stateArg&&!C.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,r){return"word"==e?(p="variable","keyframes"):"{"==e?l(r,t,"top"):c(e,t,r)},N.at=function(e,t,r){return";"==e?s(r):"{"==e||"}"==e?u(e,t,r):("word"==e?p="tag":"hash"==e&&(p="builtin"),"at")},N.interpolation=function(e,t,r){return"}"==e?s(r):"{"==e||";"==e?u(e,t,r):("word"==e?p="variable":"variable"!=e&&"("!=e&&")"!=e&&(p="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(g[r]){var a=g[r](e,t);if(!1!==a)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),p=r,"comment"!=h&&(t.state=N[t.state](h,e,t)),p},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:A,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(h),m=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=t(v),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(b),x=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(v).concat(b);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:w,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:w,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":17}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){var r=e.match(function(e){var t=o[e];return t||(o[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function r(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function n(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},o={};e.defineMode("htmlmixed",function(o,a){function l(n,i){var a,u=s.token(n,i.htmlState),d=/\btag\b/.test(u);if(d&&!/[<>\s\/]/.test(n.current())&&(a=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))i.inTag=a+" ";else if(i.inTag&&d&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var h=">"==n.current()&&function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(t(r,i[0])))return i[2]}}(c[f[1]],f[2]),p=e.getMode(o,h),m=r(f[1],!0),g=r(f[1],!1);i.token=function(e,t){return e.match(m,!1)?(t.token=l,t.localState=t.localMode=null,null):function(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}(e,g,t.localMode.token(e,t.localState))},i.localMode=p,i.localState=e.startState(p,s.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return u}var s=e.getMode(o,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag}),c={},u=a&&a.tags,d=a&&a.scriptTypes;if(n(i,c),u&&n(u,c),d)for(var f=d.length-1;f>=0;f--)c.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?s.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":17,"../css/css":18,"../javascript/javascript":20,"../xml/xml":21}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e,t,r){return ke=e,Ce=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=function(e){return function(t,r){var o,a=!1;if(Le&&"@"==t.peek()&&t.match(Ee))return r.tokenize=i,n("jsonld-keyword","meta");for(;null!=(o=t.next())&&(o!=e||a);)a=!a&&"\\"==o;return a||(r.tokenize=i),n("string","string")}}(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return n("number","number");if("."==r&&e.match(".."))return n("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return n(r);if("="==r&&e.eat(">"))return n("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),n("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),n("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),n("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),n("number","number");if("/"==r)return e.eat("*")?(t.tokenize=o,o(e,t)):e.eat("/")?(e.skipToEnd(),n("comment","comment")):xe(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),n("regexp","string-2")):(e.eat("="),n("operator","operator",e.current()));if("`"==r)return t.tokenize=a,a(e,t);if("#"==r)return e.skipToEnd(),n("error","error");if(_e.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),n("operator","operator",e.current());if(Oe.test(r)){e.eatWhile(Oe);var l=e.current();if("."!=t.lastType){if(Ne.propertyIsEnumerable(l)){var s=Ne[l];return n(s.type,s.style,l)}if("async"==l&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return n("async","keyword",l)}return n("variable","variable",l)}}function o(e,t){for(var r,o=!1;r=e.next();){if("/"==r&&o){t.tokenize=i;break}o="*"==r}return n("comment","comment")}function a(e,t){for(var r,o=!1;null!=(r=e.next());){if(!o&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}o=!o&&"\\"==r}return n("quasi","string-2",e.current())}function l(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ae){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=We.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(Oe.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function s(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function c(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function u(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function d(){return u.apply(null,arguments),!0}function f(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function h(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=ze}function p(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function m(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new s(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function g(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function v(e){function t(r){return r==e?d():";"==e?u():d(t)}return t}function y(e,t){return"var"==e?d(m("vardef",t.length),Y,v(";"),g):"keyword a"==e?d(m("form"),x,y,g):"keyword b"==e?d(m("form"),y,g):"keyword d"==e?De.stream.match(/^\s*$/,!1)?d():d(m("stat"),C,v(";"),g):"debugger"==e?d(v(";")):"{"==e?d(m("}"),P,g):";"==e?d():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==g&&De.state.cc.pop()(),d(m("form"),x,y,g,ee)):"function"==e?d(ae):"for"==e?d(m("form"),te,y,g):"variable"==e?Ae&&"type"==t?(De.marked="keyword",d(j,v("operator"),j,v(";"))):Ae&&"declare"==t?(De.marked="keyword",d(y)):Ae&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",d(m("form"),X,v("{"),m("}"),P,g,g)):d(m("stat"),N):"switch"==e?d(m("form"),x,v("{"),m("}","switch"),P,g,g):"case"==e?d(b,v(":")):"default"==e?d(v(":")):"catch"==e?d(m("form"),h,v("("),le,v(")"),y,g,p):"class"==e?d(m("form"),ce,g):"export"==e?d(m("stat"),he,g):"import"==e?d(m("stat"),me,g):"async"==e?d(y):"@"==t?d(b,y):u(m("stat"),b,v(";"),g)}function b(e){return k(e,!1)}function w(e){return k(e,!0)}function x(e){return"("!=e?u():d(m(")"),b,v(")"),g)}function k(e,t){if(De.state.fatArrowAt==De.stream.start){var r=t?O:A;if("("==e)return d(h,m(")"),D(le,")"),g,v("=>"),r,p);if("variable"==e)return u(h,X,v("=>"),r,p)}var n=t?S:T;return Fe.hasOwnProperty(e)?d(n):"function"==e?d(ae,n):"class"==e?d(m("form"),se,g):"keyword c"==e||"async"==e?d(t?w:b):"("==e?d(m(")"),C,v(")"),g,n):"operator"==e||"spread"==e?d(t?w:b):"["==e?d(m("]"),we,g,n):"{"==e?z(E,"}",null,n):"quasi"==e?u(L,n):"new"==e?d(function(e){return function(t){return"."==t?d(e?function(e,t){if("target"==t)return De.marked="keyword",d(S)}:function(e,t){if("target"==t)return De.marked="keyword",d(T)}):"variable"==t&&Ae?d(V,e?S:T):u(e?w:b)}}(t)):d()}function C(e){return e.match(/[;\}\)\],]/)?u():u(b)}function T(e,t){return","==e?d(b):S(e,t,!1)}function S(e,t,r){var n=0==r?T:S,i=0==r?b:w;return"=>"==e?d(h,r?O:A,p):"operator"==e?/\+\+|--/.test(t)||Ae&&"!"==t?d(n):Ae&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?d(m(">"),D(j,">"),g,n):"?"==t?d(b,v(":"),i):d(i):"quasi"==e?u(L,n):";"!=e?"("==e?z(w,")","call",n):"."==e?d(_,n):"["==e?d(m("]"),C,v("]"),g,n):Ae&&"as"==t?(De.marked="keyword",d(j,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),d(i)):void 0:void 0}function L(e,t){return"quasi"!=e?u():"${"!=t.slice(t.length-2)?d(L):d(b,M)}function M(e){if("}"==e)return De.marked="string-2",De.state.tokenize=a,d(L)}function A(e){return l(De.stream,De.state),u("{"==e?y:b)}function O(e){return l(De.stream,De.state),u("{"==e?y:w)}function N(e){return":"==e?d(g,y):u(T,v(";"),g)}function _(e){if("variable"==e)return De.marked="property",d()}function E(e,t){if("async"==e)return De.marked="property",d(E);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return d(W);var r;return Ae&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),d(F)}return"number"==e||"string"==e?(De.marked=Le?"property":De.style+" property",d(F)):"jsonld-keyword"==e?d(F):"modifier"==e?d(E):"["==e?d(b,v("]"),F):"spread"==e?d(w,F):"*"==t?(De.marked="keyword",d(E)):":"==e?u(F):void 0}function W(e){return"variable"!=e?u(F):(De.marked="property",d(ae))}function F(e){return":"==e?d(w):"("==e?u(ae):void 0}function D(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=De.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),d(function(r,n){return r==t||n==t?u():u(e)},n)}return i==t||o==t?d():d(v(t))}return function(r,i){return r==t||i==t?d():u(e,n)}}function z(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return d(m(t,r),D(e,t),g)}function P(e){return"}"==e?d():u(y,P)}function H(e,t){if(Ae){if(":"==e)return d(j);if("?"==t)return d(H)}}function I(e){if(Ae&&":"==e)return De.stream.match(/^\s*\w+\s+is\b/,!1)?d(b,R,j):d(j)}function R(e,t){if("is"==t)return De.marked="keyword",d()}function j(e,t){return"variable"==e||"void"==t?"keyof"==t?(De.marked="keyword",d(j)):(De.marked="type",d(K)):"string"==e||"number"==e||"atom"==e?d(K):"["==e?d(m("]"),D(j,"]",","),g,K):"{"==e?d(m("}"),D(q,"}",",;"),g,K):"("==e?d(D(U,")"),B):void 0}function B(e){if("=>"==e)return d(j)}function q(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",d(q)):"?"==t?d(q):":"==e?d(j):"["==e?d(b,H,v("]"),q):void 0}function U(e){return"variable"==e?d(U):":"==e?d(j):void 0}function K(e,t){return"<"==t?d(m(">"),D(j,">"),g,K):"|"==t||"."==e?d(j):"["==e?d(v("]"),K):"extends"==t?d(j):void 0}function V(e,t){if("<"==t)return d(m(">"),D(j,">"),g,K)}function G(){return u(j,$)}function $(e,t){if("="==t)return d(j)}function Y(){return u(X,H,J,Q)}function X(e,t){return"modifier"==e?d(X):"variable"==e?(f(t),d()):"spread"==e?d(X):"["==e?z(X,"]"):"{"==e?z(Z,"}"):void 0}function Z(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?d(X):"}"==e?u():d(v(":"),X,J)):(f(t),d(J))}function J(e,t){if("="==t)return d(w)}function Q(e){if(","==e)return d(Y)}function ee(e,t){if("keyword b"==e&&"else"==t)return d(m("form","else"),y,g)}function te(e){if("("==e)return d(m(")"),re,v(")"),g)}function re(e){return"var"==e?d(Y,v(";"),ie):";"==e?d(ie):"variable"==e?d(ne):u(b,v(";"),ie)}function ne(e,t){return"in"==t||"of"==t?(De.marked="keyword",d(b)):d(T,ie)}function ie(e,t){return";"==e?d(oe):"in"==t||"of"==t?(De.marked="keyword",d(b)):u(b,v(";"),oe)}function oe(e){")"!=e&&d(b)}function ae(e,t){return"*"==t?(De.marked="keyword",d(ae)):"variable"==e?(f(t),d(ae)):"("==e?d(h,m(")"),D(le,")"),g,I,y,p):Ae&&"<"==t?d(m(">"),D(G,">"),g,ae):void 0}function le(e,t){return"@"==t&&d(b,le),"spread"==e||"modifier"==e?d(le):u(X,H,J)}function se(e,t){return"variable"==e?ce(e,t):ue(e,t)}function ce(e,t){if("variable"==e)return f(t),d(ue)}function ue(e,t){return"<"==t?d(m(">"),D(G,">"),g,ue):"extends"==t||"implements"==t||Ae&&","==e?d(Ae?j:b,ue):"{"==e?d(m("}"),de,g):void 0}function de(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",d(de)):"variable"==e||"keyword"==De.style?(De.marked="property",d(Ae?fe:ae,de)):"["==e?d(b,v("]"),Ae?fe:ae,de):"*"==t?(De.marked="keyword",d(de)):";"==e?d(de):"}"==e?d():"@"==t?d(b,de):void 0}function fe(e,t){return"?"==t?d(fe):":"==e?d(j,J):"="==t?d(w):u(ae)}function he(e,t){return"*"==t?(De.marked="keyword",d(be,v(";"))):"default"==t?(De.marked="keyword",d(b,v(";"))):"{"==e?d(D(pe,"}"),be,v(";")):u(y)}function pe(e,t){return"as"==t?(De.marked="keyword",d(v("variable"))):"variable"==e?u(w,pe):void 0}function me(e){return"string"==e?d():u(ge,ve,be)}function ge(e,t){return"{"==e?z(ge,"}"):("variable"==e&&f(t),"*"==t&&(De.marked="keyword"),d(ye))}function ve(e){if(","==e)return d(ge,ve)}function ye(e,t){if("as"==t)return De.marked="keyword",d(ge)}function be(e,t){if("from"==t)return De.marked="keyword",d(b)}function we(e){return"]"==e?d():u(D(w,"]"))}function xe(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var ke,Ce,Te=t.indentUnit,Se=r.statementIndent,Le=r.jsonld,Me=r.json||Le,Ae=r.typescript,Oe=r.wordCharacters||/[\w$\xa1-\uffff]/,Ne=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Ae){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var u in c)l[u]=c[u]}return l}(),_e=/[+\-*&%=<>!?|~^@]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,We="([{}])",Fe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},ze={name:"this",next:{name:"arguments"}};return g.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new s((e||0)-Te,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),l(e,t)),t.tokenize!=o&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==ke?r:(t.lastType="operator"!=ke||"++"!=Ce&&"--"!=Ce?ke:"incdec",function(e,t,r,n,i){var o=e.cc;for(De.state=e,De.stream=i,De.marked=null,De.cc=o,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():Me?b:y)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return De.marked?De.marked:"variable"==r&&c(e,n)?"variable-2":t}}(t,r,ke,Ce,e))},indent:function(t,n){if(t.tokenize==o)return e.Pass;if(t.tokenize!=i)return 0;var a,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==g)s=s.prev;else if(u!=ee)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(a=t.cc[t.cc.length-1])&&(a==T||a==S)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Se&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,f=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+Te:"stat"==d?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||_e.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?Se||Te:0):"switch"!=s.info||f||0==r.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:Te):s.indented+(/^(?:case|default)\b/.test(n)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Me?null:"/*",blockCommentEnd:Me?null:"*/",blockCommentContinue:Me?null:" * ",lineComment:Me?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Me?"json":"javascript",jsonldMode:Le,jsonMode:Me,expressionAllowed:xe,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=b&&t!=w||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":17}],21:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(l("atom","]]>")):null:e.match("--")?r(l("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(s(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){return(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,T=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return T="equals",null;if("<"==r){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=function(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function s(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=s(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=s(e-1),r.tokenize(t,r)}}return"meta"}}function c(e){e.context&&(e.context=e.context.prev)}function u(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;c(e)}}function d(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:d}function f(e,t,r){return"word"==e?(r.tagName=t.current(),S="tag",g):(S="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&c(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(S="tag",p):(S="tag error",m)}return S="error",m}function p(e,t,r){return"endTag"!=e?(S="error",p):(c(r),d)}function m(e,t,r){return S="error",p(e,0,r)}function g(e,t,r){if("word"==e)return S="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?u(r,n):(u(r,n),r.context=new function(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}(r,n,i==r.indented)),d}return S="error",g}function v(e,t,r){return"equals"==e?y:(x.allowMissing||(S="error"),g(e,0,r))}function y(e,t,r){return"string"==e?b:"word"==e&&x.allowUnquoted?(S="string",g):(S="error",g(e,0,r))}function b(e,t,r){return"string"==e?b:g(e,0,r)}var w=n.indentUnit,x={},k=i.htmlMode?t:r;for(var C in k)x[C]=k[C];for(var C in i)x[C]=i[C];var T,S;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var r=t.tokenize(e,t);return(r||T)&&"comment"!=r&&(S=null,t.state=t.state(T||r,e,t),S&&(r="error"==S?r+" error":S)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!x.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=x.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+w:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==y&&(e.state=g)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":17}],22:[function(e,t,r){t.exports={prettyPrint:function(e,t){var r,n,i,o,a,l;for(n=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,l=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(r=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace))t.length&&(r=!0),this.line_char_count--;else{if(r){if(this.line_char_count>=this.max_char){t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;r=!1}t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1==this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.get_tag=function(){var e,t,r="",n=[],i=!1;do{if(this.pos>=this.input.length)return n.length?n.join(""):["","TK_EOF"];r=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(r,this.Utils.whitespace)?(i=!0,this.line_char_count--):("'"!==r&&'"'!==r||n[1]&&"!"===n[1]||(r+=this.get_unformatted(r),i=!0),"="===r&&(i=!1),n.length&&"="!==n[n.length-1]&&">"!==r&&i&&(this.line_char_count>=this.max_char?(this.print_newline(!1,n),this.line_char_count=0):(n.push(" "),this.line_char_count++),i=!1),"<"===r&&(e=this.pos-1),n.push(r))}while(">"!==r);var o,a=n.join("");o=-1!=a.indexOf(" ")?a.indexOf(" "):a.indexOf(">");var s=a.substring(1,o).toLowerCase();if("/"===a.charAt(a.length-2)||this.Utils.in_array(s,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===s)this.record_tag(s),this.tag_type="SCRIPT";else if("style"===s)this.record_tag(s),this.tag_type="STYLE";else if(this.Utils.in_array(s,l)){var c=this.get_unformatted("</"+s+">",a);n.push(c),e>0&&this.Utils.in_array(this.input.charAt(e-1),this.Utils.whitespace)&&n.splice(0,0,this.input.charAt(e-1)),t=this.pos-1,this.Utils.in_array(this.input.charAt(t+1),this.Utils.whitespace)&&n.push(this.input.charAt(t+1)),this.tag_type="SINGLE"}else"!"===s.charAt(0)?-1!=s.indexOf("[if")?(-1!=a.indexOf("!IE")&&(c=this.get_unformatted("--\x3e",a),n.push(c)),this.tag_type="START"):-1!=s.indexOf("[endif")?(this.tag_type="END",this.unindent()):-1!=s.indexOf("[cdata[")?(c=this.get_unformatted("]]>",a),n.push(c),this.tag_type="SINGLE"):(c=this.get_unformatted("--\x3e",a),n.push(c),this.tag_type="SINGLE"):("/"===s.charAt(0)?(this.retrieve_tag(s.substring(1)),this.tag_type="END"):(this.record_tag(s),this.tag_type="START"),this.Utils.in_array(s,this.Utils.extra_liners)&&this.print_newline(!0,this.output));return n.join("")},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var r="",n="",i=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,i=!0}while(-1==n.toLowerCase().indexOf(e));return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,r,n,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=r,this.brace_style=i,this.indent_level=0,this.max_char=n,this.line_char_count=0;for(var o=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){if(this.line_char_count=0,t&&t.length){if(!e)for(;this.Utils.in_array(t[t.length-1],this.Utils.whitespace);)t.pop();t.push("\n");for(var r=0;r<this.indent_level;r++)t.push(this.indent_string)}},this.print_token=function(e){this.output.push(e)},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}).printer(e,i,n,o,a);;){var s=r.get_token();if(r.token_text=s[0],r.token_type=s[1],"TK_EOF"===r.token_type)break;switch(r.token_type){case"TK_TAG_START":r.print_newline(!1,r.output),r.print_token(r.token_text),r.indent(),r.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===r.last_token&&""===r.last_text){var c=r.token_text.match(/\w+/)[0],u=r.output[r.output.length-1].match(/<\s*(\w+)/);null!==u&&u[1]===c||r.print_newline(!0,r.output)}r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var d=r.token_text.match(/^\s*<([a-z]+)/i);d&&r.Utils.in_array(d[1],l)||r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_CONTENT":""!==r.token_text&&r.print_token(r.token_text),r.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==r.token_text){r.output.push("\n");var f=r.token_text;if("TK_SCRIPT"==r.token_type)var h="function"==typeof js_beautify&&js_beautify;else"TK_STYLE"==r.token_type&&(h="function"==typeof css_beautify&&css_beautify);if("keep"==t.indent_scripts)var p=0;else p="separate"==t.indent_scripts?-r.indent_level:1;var m=r.get_full_indent(p);if(h)f=h(f.replace(/^\s*/,m),t);else{var g=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(r.indent_string).length-1,v=r.get_full_indent(p-g);f=f.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+v).replace(/\s*$/,"")}f&&(r.print_token(f),r.print_newline(!0,r.output))}r.current_mode="TAG"}r.last_token=r.token_type,r.last_text=r.token_text}return r.output.join("")}}},{}],23:[function(e,t,r){"use strict";t.exports=e("./stream/stream")},{"./stream/stream":24}],24:[function(e,t,r){!function(){"use strict";function e(){function t(){return arguments.length>0&&arguments[0]!==v&&r(t,arguments[0]),t._state.value}return function(t){t.constructor=e,t._state={id:g++,value:void 0,state:0,derive:void 0,recover:void 0,deps:{},parents:[],endStream:void 0,unregister:void 0},t.map=t["fantasy-land/map"]=s,t["fantasy-land/ap"]=c,t["fantasy-land/of"]=e,t.valueOf=u,t.toJSON=d,t.toString=u,Object.defineProperties(t,{end:{get:function(){if(!t._state.endStream){var r=e();r.map(function(e){return!0===e&&(l(t),r._state.unregister=function(){l(r)}),e}),t._state.endStream=r}return t._state.endStream}}})}(t),arguments.length>0&&arguments[0]!==v&&r(t,arguments[0]),t}function r(e,t){n(e,t);for(var r in e._state.deps)i(e._state.deps[r],!1);null!=e._state.unregister&&e._state.unregister(),function(e){e._state.changed=!1;for(var t in e._state.deps)e._state.deps[t]._state.changed=!1}(e)}function n(e,t){e._state.value=t,e._state.changed=!0,2!==e._state.state&&(e._state.state=1)}function i(e,t){var r=e._state.parents;if(r.length>0&&r.every(h)&&(t||r.some(p))){var i=e._state.derive();if(i===v)return!1;n(e,i)}}function o(t,r){if(!r.every(f))throw new Error("Ensure that each item passed to stream.combine/stream.merge is a stream");return function(e,t,r){var n=e._state;return n.derive=r,n.parents=t.filter(m),a(e,n.parents),i(e,!0),e}(e(),r,function(){return t.apply(this,r.concat([r.filter(p)]))})}function a(e,t){for(var r=0;r<t.length;r++)t[r]._state.deps[e._state.id]=e,a(e,t[r]._state.parents)}function l(e){for(var t=0;t<e._state.parents.length;t++){delete e._state.parents[t]._state.deps[e._state.id]}for(var r in e._state.deps){var n=e._state.deps[r],i=n._state.parents.indexOf(e);i>-1&&n._state.parents.splice(i,1)}e._state.state=2,e._state.deps={}}function s(e){return o(function(t){return e(t())},[this])}function c(e){return o(function(e,t){return e()(t())},[e,this])}function u(){return this._state.value}function d(){return null!=this._state.value&&"function"==typeof this._state.value.toJSON?this._state.value.toJSON():this._state.value}function f(e){return e._state}function h(e){return 1===e._state.state}function p(e){return e._state.changed}function m(e){return 2!==e._state.state}var g=0,v={};e["fantasy-land/of"]=e,e.merge=function(e){return o(function(){return e.map(function(e){return e()})},e)},e.combine=o,e.scan=function(e,t,r){var n=o(function(r){return t=e(t,r._state.value)},[r]);return 0===n._state.state&&n(t),n},e.scanMerge=function(e,t){var r=e.map(function(e){var t=e[0];return 0===t._state.state&&t(void 0),t});return o(function(){var n=arguments[arguments.length-1];return r.forEach(function(r,i){n.indexOf(r)>-1&&(t=e[i][1](t,r._state.value))}),t},r)},e.HALT=v,void 0!==t?t.exports=e:"function"!=typeof window.m||"stream"in window.m?window.m={stream:e}:window.m.stream=e}()},{}]},{},[11])}();
|
2 |
//# sourceMappingURL=forms-admin.min.js.map
|
1 |
+
!function(){var o=void 0;!function o(a,l,s){function c(t,e){if(!l[t]){if(!a[t]){var r=!1;if(!e&&r)return r(t,!0);if(u)return u(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=l[t]={exports:{}};a[t][0].call(i.exports,function(e){return c(a[t][1][e]||e)},i,i.exports,o,a,l,s)}return l[t].exports}for(var u=!1,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,t,r){"use strict";t.exports=function(n,i){var e={showType:function(e){var t=e.type();return t=t.charAt(0).toUpperCase()+t.slice(1),n("div",[n("label",i.fieldType),n("span",t)])},label:function(e){return n("div",[n("label",i.fieldLabel),n("input.widefat",{type:"text",value:e.label(),onchange:n.withAttr("value",e.label),placeholder:e.title()})])},value:function(e){var t="hidden"===e.type();return n("div",[n("label",[t?i.value:i.initialValue," ",t?"":n("small",{style:"float: right; font-weight: normal;"},i.optional)]),n("input.widefat",{type:"text",value:e.value(),onchange:n.withAttr("value",e.value)}),t?"":n("p.help",i.valueHelp)])},numberMinMax:function(e){return n("div",[n("div.row",[n("div.col.col-3",[n("label",i.min),n("input",{type:"number",onchange:n.withAttr("value",e.min)})]),n("div.col.col-3",[n("label",i.max),n("input",{type:"number",onchange:n.withAttr("value",e.max)})])])])},isRequired:function(e){var t={type:"checkbox",checked:e.required(),onchange:n.withAttr("checked",e.required)},r=void 0;return e.forceRequired()&&(t.required=!0,t.disabled=!0,r=n("p.help",i.forceRequired)),n("div",[n("label.cb-wrap",[n("input",t),i.isFieldRequired]),r])},placeholder:function(e){return n("div",[n("label",[i.placeholder," ",n("small",{style:"float: right; font-weight: normal;"},i.optional)]),n("input.widefat",{type:"text",value:e.placeholder(),onchange:n.withAttr("value",e.placeholder),placeholder:""}),n("p.help",i.placeholderHelp)])},useParagraphs:function(e){return n("div",[n("label.cb-wrap",[n("input",{type:"checkbox",checked:e.wrap(),onchange:n.withAttr("checked",e.wrap)}),i.wrapInParagraphTags])])},choiceType:function(e){var t=[n("option",{value:"select",selected:"select"===e.type()&&"selected"},i.dropdown),n("option",{value:"radio",selected:"radio"===e.type()&&"selected"},i.radioButtons)];return e.acceptsMultipleValues&&t.push(n("option",{value:"checkbox",selected:"checkbox"===e.type()&&"selected"},i.checkboxes)),n("div",[n("label",i.choiceType),n("select",{value:e.type(),onchange:n.withAttr("value",e.type)},t)])},choices:function(r){var e=[];return e.push(n("div",[n("label",i.choices),n("div.limit-height",[n("table",[r.choices().map(function(e,t){return n("tr",{"data-id":t},[n("td.cb",n("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:n.withAttr("value",r.selectChoice.bind(r)),checked:e.selected(),value:e.value(),title:i.preselect})),n("td.stretch",n("input.widefat",{type:"text",value:e.label(),placeholder:e.title(),onchange:n.withAttr("value",e.label)})),n("td",n("span",{title:i.remove,class:"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,t)},""))])})])])])),e},linkToTerms:function(e){return n("div",[n("label",i.agreeToTermsLink),n("input.widefat",{type:"text",value:e.link,onchange:n.withAttr("value",e.link),placeholder:"https://..."})])}};return e}},{}],2:[function(i,e,t){"use strict";e.exports=function(e,t){var r={},n=i("./field-forms-rows.js")(e,t);return r.render=function(e){var t=e.type();if("function"==typeof r[t])return r[t](e);switch(t){case"select":case"radio":case"checkbox":return r.choice(e)}return r.text(e)},r.text=function(e){return[n.label(e),n.placeholder(e),n.value(e),n.isRequired(e),n.useParagraphs(e)]},r.choice=function(e){var t=[n.label(e),n.choiceType(e),n.choices(e)];return"select"===e.type()&&t.push(n.placeholder(e)),t.push(n.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(n.isRequired(e)),t},r.hidden=function(e){return e.placeholder(""),e.label(""),e.wrap(!1),[n.showType(e),n.value(e)]},r.submit=function(e){return e.label(""),e.placeholder(""),[n.value(e),n.useParagraphs(e)]},r["terms-checkbox"]=function(e){return[n.label(e),n.linkToTerms(e),n.isRequired(e),n.useParagraphs(e)]},r.number=function(e){return[r.text(e),n.numberMinMax(e)]},r}},{"./field-forms-rows.js":1}],3:[function(e,t,r){"use strict";var l=e("html"),s=function(e){e.dom.checked&&e.dom.setAttribute("checked","true"),e.dom.value&&e.dom.setAttribute("value",e.dom.value),e.dom.selected&&e.dom.setAttribute("selected","true")};t.exports=function(o){var a={};return a.select=function(e){var t={name:e.name(),required:e.required()},r=!1,n=e.choices().map(function(e){return e.selected()&&(r=!0),o("option",{value:e.value()!==e.label()?e.value():void 0,selected:e.selected(),oncreate:s},e.label())}),i=e.placeholder();return 0<i.length&&n.unshift(o("option",{disabled:!0,value:"",selected:!r,oncreate:s},i)),o("select",t,n)},a["terms-checkbox"]=function(e){var t=void 0;return t=0<e.link().length?o("a",{href:e.link(),target:"_blank"},e.label()):e.label(),o("label",[o("input",{name:e.name(),type:"checkbox",value:e.value(),required:e.required()})," ",t])},a.checkbox=function(n){return n.choices().map(function(e){var t=n.name()+("checkbox"===n.type()?"[]":""),r=n.required()&&"radio"===n.type();return o("label",[o("input",{name:t,type:n.type(),value:e.value(),checked:e.selected(),required:r,oncreate:s})," ",o("span",e.label())])})},a.radio=a.checkbox,a.default=function(e){var t={type:e.type()};return e.name()&&(t.name=e.name()),e.min()&&(t.min=e.min()),e.max()&&(t.max=e.max()),0<e.value().length&&(t.value=e.value()),0<e.placeholder().length&&(t.placeholder=e.placeholder()),t.required=e.required(),t.oncreate=s,o("input",t)},function(e){var t,r,n,i=document.createElement("div");return t=0<e.label().length&&e.showLabel()?o("label",{},e.label()):"",r="function"==typeof a[e.type()]?a[e.type()](e):a.default(e),n=e.wrap()?o("p",[t,r]):[t,r],o.render(i,n),l.prettyPrint(i.innerHTML)+"\n"}}},{html:22}],4:[function(f,e,t){"use strict";e.exports=function(i,e,t,o,r,a){var l,n=f("./field-generator.js")(i),s=f("./overlay.js")(i,a),c=f("./field-forms.js")(i,a);function u(e){(l=o.get(e))&&0<l.choices().length&&l.value(l.choices().map(function(e){return e.label()}).join("|")),i.redraw()}function d(){var e=n(l);t.insert(e),u(""),i.redraw()}return t.on("blur",i.redraw),{view:function(){var e=o.getCategories(),r=o.getAll(),t=i("div.available-fields.small-margin",[i("h4",a.chooseField),e.map(function(t){var e=r.filter(function(e){return e.category===t});if(e.length)return i("div.tiny-margin",[i("strong",t),e.map(function(e){var t="button";e.forceRequired()&&(t+=" is-required");var r=e.inFormContent();return null!==r&&(t+=" "+(r?"in-form":"not-in-form")),i("button",{className:t,type:"button",onclick:i.withAttr("value",u),value:e.index},e.title())})])})]),n=null;return l&&(n=i(s(i("div.field-wizard",[i("h3",[l.title(),l.forceRequired()?i("span.red","*"):"",l.name().length?i("code",l.name()):""]),l.help().length?i("p",i.trust(l.help())):"",c.render(l),i("p",[i("button",{class:"button-primary",type:"button",onkeydown:function(e){13==(e=e||window.event).keyCode&&d()},onclick:d},a.addToForm)])]),u))),[t,n]},controller:function(){}}}},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){"use strict";t.exports=function(i,o){var a=[];function l(e,t,r){var n=i.register(e,t);r||a.push(n)}function s(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return void 0!==t[e]?t[e]:e}function t(e){var t=o.listFields,r=s(e.field_type),n={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:r,choices:e.choices,acceptsMultipleValues:!1};return"address"!==n.type?l(t,n,!1):(l(t,{name:n.name+"[addr1]",type:"text",mailchimpType:"address",title:o.streetAddress}),l(t,{name:n.name+"[city]",type:"text",mailchimpType:"address",title:o.city}),l(t,{name:n.name+"[state]",type:"text",mailchimpType:"address",title:o.state}),l(t,{name:n.name+"[zip]",type:"text",mailchimpType:"address",title:o.zip}),l(t,{name:n.name+"[country]",type:"select",mailchimpType:"address",title:o.country,choices:mc4wp_vars.countries})),!0}function r(e){var t=o.interestCategories,r=s(e.field_type);l(t,{title:e.name,name:"INTERESTS["+e.id+"]",type:r,choices:e.interests,acceptsMultipleValues:"checkbox"===r},!1)}function n(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(t),e.interest_categories.forEach(r)}return{registerCustomFields:function(e){var t,r=o.formFields;for(var n in l(r,{name:"",value:o.subscribe,type:"submit",title:o.submitButton},!0),t={},e)t[e[n].id]=e[n].name;l(r,{name:"_mc4wp_lists",type:"checkbox",title:o.listChoice,choices:t,help:o.listChoiceDescription,acceptsMultipleValues:!0},!0),t={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},l(r,{name:"_mc4wp_action",type:"radio",title:o.formAction,choices:t,value:"subscribe",help:o.formActionDescription},!0),l(r,{name:"AGREE_TO_TERMS",value:1,type:"terms-checkbox",label:o.agreeToTerms,title:o.agreeToTermsShort,showLabel:!1,required:!0},!0)},registerListFields:n,registerListsFields:function(e){a.forEach(i.deregister),e.forEach(n)}}}},{}],6:[function(e,t,r){"use strict";var n=e("mithril/stream");t.exports=function(o,a){var l,s=[],c=[],u=function(e){this.name=n(e.name),this.title=n(e.title||e.name),this.type=n(e.type),this.mailchimpType=n(e.mailchimpType||""),this.label=n(e.label||e.title||""),this.showLabel=n(void 0===e.showLabel||e.showLabel),this.value=n(e.value||""),this.placeholder=n(e.placeholder||""),this.required=n(e.required||!1),this.forceRequired=n(e.forceRequired||!1),this.wrap=n(void 0===e.wrap||e.wrap),this.min=n(e.min||null),this.max=n(e.max||null),this.help=n(e.help||""),this.choices=n(e.choices||[]),this.inFormContent=n(null),this.acceptsMultipleValues=e.acceptsMultipleValues,this.link=n(e.link||""),this.selectChoice=function(t){var r=this;this.choices(this.choices().map(function(e){return e.value()===t?e.selected(!0):"checkbox"!==r.type()&&e.selected(!1),e}))}},d=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)};function f(t,r){return s.filter(function(e){return e[t]()===r})}return{get:function(e){return s[e]},getAll:function(){return s=s.map(function(e,t){return e.index=t,e})},getCategories:function(){return c},deregister:function(e){var t=s.indexOf(e);-1<t&&(delete s[t],o.redraw())},register:function(e,t){var r,n,i=f("name",t.name).shift();if(!i)return t.choices&&(t.choices="function"==typeof(n=t.choices).map?n.map(function(e){return new d({label:e})}):Object.keys(n).map(function(e){var t=n[e];return new d({label:t,value:e})}),t.value&&(t.choices=t.choices.map(function(e){return e.value()===t.value&&e.selected(!0),e}))),c.indexOf(e)<0&&c.push(e),(r=new u(t)).category=e,s.push(r),l&&window.clearTimeout(l),l=window.setTimeout(o.redraw,200),a.trigger("fields.change"),r;!i.forceRequired()&&t.forceRequired&&i.forceRequired(!0)},getAllWhere:f}}},{"mithril/stream":23}],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.js"),e("codemirror/addon/edit/matchtags.js"),e("codemirror/addon/edit/closetag.js"),e("codemirror/addon/selection/active-line.js"),e("codemirror/addon/edit/matchbrackets.js");var i,o,a={},l=document.createElement("form"),s=!1,c=document.getElementById("mc4wp-form-content"),u=document.getElementById("mc4wp-form-preview"),d=/\{[^{}]+\}/g;function f(){var e=u.contentDocument||u.contentWindow.document;(o=e.querySelector(".mc4wp-form-fields"))&&h()}function h(){var e=a.getValue();e=e.replace(d,"").replace(d,""),o.innerHTML=e,o.dispatchEvent(new Event("mc4wp-refresh"))}function p(){return s&&(l.innerHTML=a.getValue().toLowerCase(),s=!1),l}window.addEventListener("load",function(){n.signal(i,"change")}),c.addEventListener("change",function(){s=!0,h()}),a.getValue=function(){return i?i.getValue():c.value},a.query=function(e){return p().querySelectorAll(e.toLowerCase())},a.containsField=function(e){return null!==p().elements.namedItem(e.toLowerCase())},a.insert=function(e){i?(i.replaceSelection(e),i.focus()):c.value+=e},a.on=function(e,t){return i?(e="input"===e?"changes":e,i.on(e,t)):c.addEventListener(e,t)},a.refresh=function(){i&&i.refresh()},l.innerHTML=c.value.toLowerCase(),n&&(i=n.fromTextArea(c,{selectionPointer:!0,mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0,styleActiveLine:!0,matchBrackets:!0,matchTags:{bothTags:!0}}),window.dispatchEvent&&i.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});c.dispatchEvent(e)}})),u.addEventListener("load",f),f.call(),t.exports=a},{codemirror:17,"codemirror/addon/edit/closetag.js":12,"codemirror/addon/edit/matchbrackets.js":13,"codemirror/addon/edit/matchtags.js":14,"codemirror/addon/fold/xml-fold.js":15,"codemirror/addon/selection/active-line.js":16,"codemirror/mode/css/css":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/xml/xml":21}],8:[function(e,t,r){"use strict";t.exports=function(t,i,e,r,n,o){var a=document.getElementById("required-fields");function l(){var n,e;r.getAll().forEach(function(e){if(!(e.name().length<=0)){var t=e.name();"checkbox"===e.type()&&(t+="[]");var r=i.containsField(t);if(e.inFormContent(r),"address"===e.mailchimpType()){e.originalRequiredValue=void 0===e.originalRequiredValue?e.forceRequired():e.originalRequiredValue;var n=e.name().replace(/\[(\w+)\]/g,"");0<i.query('[name^="'+n+'"]').length?(void 0===e.originalRequiredValue&&(e.originalRequiredValue=e.forceRequired()),e.forceRequired(!0)):e.forceRequired(e.originalRequiredValue)}}}),n=r.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase().replace(/\[(\w+)\]/g,".$1")}),e=i.query("[required]"),Array.prototype.forEach.call(e,function(e){var t=e.name;if(t&&!(t.length<0)&&"_"!==t[0]){var r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/\[\]$/,"")).indexOf(".");r=0<r?r:t.length,t=t.substr(0,r).toUpperCase()+t.substr(r),-1===n.indexOf(t)&&n.push(t)}}),a.value=n.join(","),t.redraw()}i.on("change",o.debounce(l,500)),n.on("fields.change",o.debounce(l,500))}},{}],9:[function(e,t,r){"use strict";var i={};function o(e,t){i[e]=t,n()}function a(e){delete i[e],n()}function n(){var e="";for(var t in i)e+='<div class="notice notice-warning inline"><p>'+i[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){(r=document.createElement("div")).className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}t.exports={init:function(r,n){var e=function(){-1<r.getValue().toLowerCase().indexOf('name="groupings')?o("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."):a("deprecated_groupings")},t=function(){var e=n.getAllWhere("forceRequired",!0).filter(function(e){return!r.containsField(e.name().toUpperCase())}),t="<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.";t+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+e.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",0<e.length?o("required_fields_missing",t):a("required_fields_missing")};e(),r.on("focus",e),r.on("blur",e),t(),r.on("blur",t),r.on("focus",t)}}},{}],10:[function(e,t,r){"use strict";t.exports=function(r,n){var i=void 0,o=void 0;function a(){document.removeEventListener("keydown",l),window.removeEventListener("resize",s),o()}function l(e){27==(e=e||window.event).keyCode&&a(),13==e.keyCode&&e.preventDefault()}function s(){if(i){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-i.clientWidth-40)/2,n=(t-i.clientHeight-40)/2;i.style.left=(0<r?r:0)+"px",i.style.top=(0<n?n:0)+"px"}}function c(e){i=e.dom,s()}return function(e,t){return o=t,{oncreate:function(){document.addEventListener("keydown",l),window.addEventListener("resize",s)},onremove:function(){document.removeEventListener("keydown",l),window.removeEventListener("resize",s)},view:function(){return[r("div.overlay-wrap",r("div.overlay",{oncreate:c},[r("span",{class:"close dashicons dashicons-no",title:n.close,onclick:a}),e])),r("div.overlay-background",{title:n.close,onclick:a})]}}}}},{}],11:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),f=e("./admin/fields-factory.js"),h=e("./admin/fields.js")(i,o),p=window.formEditor=u,m=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),g=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),m);var v=new f(h,n);o.on("selectedLists.change",v.registerListsFields),v.registerListsFields(a.getSelectedLists()),v.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),g.init(p,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=p,window.mc4wp.forms.fields=h},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8,"./admin/notices":9}],12:[function(e,t,r){var n;n=function(y){y.defineOption("autoCloseTags",!1,function(e,t,r){if(r!=y.Init&&r&&e.removeKeyMap("autoCloseTags"),t){var n={name:"autoCloseTags"};("object"!=typeof t||t.whenClosing)&&(n["'/'"]=function(e){return(t=e).getOption("disableInput")?y.Pass:i(t,!0);var t}),("object"!=typeof t||t.whenOpening)&&(n["'>'"]=function(e){return function(e){if(e.getOption("disableInput"))return y.Pass;for(var t=e.listSelections(),r=[],n=e.getOption("autoCloseTags"),i=0;i<t.length;i++){if(!t[i].empty())return y.Pass;var o=t[i].head,a=e.getTokenAt(o),l=y.innerMode(e.getMode(),a.state),s=l.state;if("xml"!=l.mode.name||!s.tagName)return y.Pass;var c="html"==l.mode.configuration,u="object"==typeof n&&n.dontCloseTags||c&&b,d="object"==typeof n&&n.indentTags||c&&w,f=s.tagName;a.end>o.ch&&(f=f.slice(0,f.length-a.end+o.ch));var h=f.toLowerCase();if(!f||"string"==a.type&&(a.end!=o.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||1==a.string.length)||"tag"==a.type&&"closeTag"==s.type||a.string.indexOf("/")==a.string.length-1||u&&-1<x(u,h)||k(e,f,o,s,!0))return y.Pass;var p=d&&-1<x(d,h);r[i]={indent:p,text:">"+(p?"\n\n":"")+"</"+f+">",newPos:p?y.Pos(o.line+1,0):y.Pos(o.line,o.ch+1)}}for(var m="object"==typeof n&&n.dontIndentOnAutoClose,i=t.length-1;0<=i;i--){var g=r[i];e.replaceRange(g.text,t[i].head,t[i].anchor,"+insert");var v=e.listSelections().slice(0);v[i]={head:g.newPos,anchor:g.newPos},e.setSelections(v),!m&&g.indent&&(e.indentLine(g.newPos.line,null,!0),e.indentLine(g.newPos.line+1,null,!0))}}(e)}),e.addKeyMap(n)}});var b=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],w=["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"];function i(e,t){for(var r=e.listSelections(),n=[],i=t?"/":"</",o=e.getOption("autoCloseTags"),a="object"==typeof o&&o.dontIndentOnSlash,l=0;l<r.length;l++){if(!r[l].empty())return y.Pass;var s,c=r[l].head,u=e.getTokenAt(c),d=y.innerMode(e.getMode(),u.state),f=d.state;if(t&&("string"==u.type||"<"!=u.string.charAt(0)||u.start!=c.ch-1))return y.Pass;if("xml"!=d.mode.name)if("htmlmixed"==e.getMode().name&&"javascript"==d.mode.name)s=i+"script";else{if("htmlmixed"!=e.getMode().name||"css"!=d.mode.name)return y.Pass;s=i+"style"}else{if(!f.context||!f.context.tagName||k(e,f.context.tagName,c,f))return y.Pass;s=i+f.context.tagName}">"!=e.getLine(c.line).charAt(u.end)&&(s+=">"),n[l]=s}if(e.replaceSelections(n),r=e.listSelections(),!a)for(l=0;l<r.length;l++)(l==r.length-1||r[l].head.line<r[l+1].head.line)&&e.indentLine(r[l].head.line)}function x(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 k(e,t,r,n,i){if(!y.scanForClosingTag)return!1;var o=Math.min(e.lastLine()+1,r.line+500),a=y.scanForClosingTag(e,r,null,o);if(!a||a.tag!=t)return!1;for(var l=n.context,s=i?1:0;l&&l.tagName==t;l=l.prev)++s;r=a.to;for(var c=1;c<s;c++){var u=y.scanForClosingTag(e,r,null,o);if(!u||u.tag!=t)return!1;r=u.to}return!0}y.commands.closeTag=function(e){return i(e)}},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof o&&o.amd?o(["../../lib/codemirror","../fold/xml-fold"],n):n(CodeMirror)},{"../../lib/codemirror":17,"../fold/xml-fold":15}],13:[function(e,t,r){var n;n=function(n){var u=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),m=n.Pos,g={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function d(e,t,r){var n=e.getLineHandle(t.line),i=t.ch-1,o=r&&r.afterCursor;null==o&&(o=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var a=!o&&0<=i&&g[n.text.charAt(i)]||g[n.text.charAt(++i)];if(!a)return null;var l=">"==a.charAt(1)?1:-1;if(r&&r.strict&&0<l!=(i==t.ch))return null;var s=e.getTokenTypeAt(m(t.line,i+1)),c=f(e,m(t.line,i+(0<l?1:0)),l,s||null,r);return null==c?null:{from:m(t.line,i),to:c&&c.pos,match:c&&c.ch==a.charAt(0),forward:0<l}}function f(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,l=[],s=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,c=0<r?Math.min(t.line+a,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-a),u=t.line;u!=c;u+=r){var d=e.getLine(u);if(d){var f=0<r?0:d.length-1,h=0<r?d.length:-1;if(!(d.length>o))for(u==t.line&&(f=t.ch-(r<0?1:0));f!=h;f+=r){var p=d.charAt(f);if(s.test(p)&&(void 0===n||e.getTokenTypeAt(m(u,f+1))==n))if(">"==g[p].charAt(1)==0<r)l.push(p);else{if(!l.length)return{pos:m(u,f),ch:p};l.pop()}}}}return u-r!=(0<r?e.lastLine():e.firstLine())&&null}function t(e,t,r){for(var n=e.state.matchBrackets.maxHighlightLineLength||1e3,i=[],o=e.listSelections(),a=0;a<o.length;a++){var l=o[a].empty()&&d(e,o[a].head,r);if(l&&e.getLine(l.from.line).length<=n){var s=l.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";i.push(e.markText(l.from,m(l.from.line,l.from.ch+1),{className:s})),l.to&&e.getLine(l.to.line).length<=n&&i.push(e.markText(l.to,m(l.to.line,l.to.ch+1),{className:s}))}}if(i.length){u&&e.state.focused&&e.focus();var c=function(){e.operation(function(){for(var e=0;e<i.length;e++)i[e].clear()})};if(!t)return c;setTimeout(c,800)}}function i(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=t(e,!1,e.state.matchBrackets)})}n.defineOption("matchBrackets",!1,function(e,t,r){r&&r!=n.Init&&(e.off("cursorActivity",i),e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)),t&&(e.state.matchBrackets="object"==typeof t?t:{},e.on("cursorActivity",i))}),n.defineExtension("matchBrackets",function(){t(this,!0)}),n.defineExtension("findMatchingBracket",function(e,t,r){return(r||"boolean"==typeof t)&&(r?(r.strict=t,t=r):t=t?{strict:!0}:null),d(this,e,t)}),n.defineExtension("scanForBracket",function(e,t,r,n){return f(this,e,t,r,n)})},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":17}],14:[function(e,t,r){var n;n=function(a){"use strict";function l(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(o){o.state.failedTagMatch=!1,o.operation(function(){if(l(o),!o.somethingSelected()){var e=o.getCursor(),t=o.getViewport();t.from=Math.min(t.from,e.line),t.to=Math.max(e.line+1,t.to);var r=a.findMatchingTag(o,e,t);if(r){if(o.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(o.state.tagHit=o.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var i="close"==r.at?r.open:r.close;i?o.state.tagOther=o.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}):o.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}a.defineOption("matchTags",!1,function(e,t,r){r&&r!=a.Init&&(e.off("cursorActivity",n),e.off("viewportChange",i),l(e)),t&&(e.state.matchBothTags="object"==typeof t&&t.bothTags,e.on("cursorActivity",n),e.on("viewportChange",i),n(e))}),a.commands.toMatchingTag=function(e){var t=a.findMatchingTag(e,e.getCursor());if(t){var r="close"==t.at?t.open:t.close;r&&e.extendSelection(r.to,r.from)}}},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof o&&o.amd?o(["../../lib/codemirror","../fold/xml-fold"],n):n(CodeMirror)},{"../../lib/codemirror":17,"../fold/xml-fold":15}],15:[function(e,t,r){var n;n=function(e){"use strict";var s=e.Pos;function c(e,t){return e.line-t.line||e.ch-t.ch}var t="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("<(/?)(["+t+"][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");function u(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 i(e,t){var r=e.cm.getTokenTypeAt(s(e.line,t));return r&&/\btag\b/.test(r)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function d(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}if(i(e,t+1)){var r=e.text.lastIndexOf("/",t),n=-1<r&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){n.lastIndex=t,e.ch=t;var r=n.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function h(e){for(;;){n.lastIndex=e.ch;var t=n.exec(e.text);if(!t){if(o(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){var r=e.text.lastIndexOf("/",t),n=-1<r&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function m(e,t){for(var r=[];;){var n,i=h(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(n=d(e)))return;if("selfClose"!=n)if(i[1]){for(var l=r.length-1;0<=l;--l)if(r[l]==i[2]){r.length=l;break}if(l<0&&(!t||t==i[2]))return{tag:i[2],from:s(o,a),to:s(e.line,e.ch)}}else r.push(i[2])}}function g(e,t){for(var r=[];;){var n=p(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=f(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;0<=l;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!t||t==a[2]))return{tag:a[2],from:s(e.line,e.ch),to:s(i,o)}}}else f(e)}}e.registerHelper("fold","xml",function(e,t){for(var r=new u(e,t.line,0);;){var n=h(r);if(!n||r.line!=t.line)return;var i=d(r);if(!i)return;if(!n[1]&&"selfClose"!=i){var o=s(r.line,r.ch),a=m(r,n[2]);return a&&0<c(a.from,o)?{from:o,to:a.from}:null}}}),e.findMatchingTag=function(e,t,r){var n=new u(e,t.line,t.ch,r);if(-1!=n.text.indexOf(">")||-1!=n.text.indexOf("<")){var i=d(n),o=i&&s(n.line,n.ch),a=i&&f(n);if(i&&a&&!(0<c(n,t))){var l={from:s(n.line,n.ch),to:o,tag:a[2]};return"selfClose"==i?{open:l,close:null,at:"open"}:a[1]?{open:g(n,a[2]),close:l,at:"close"}:{open:l,close:m(n=new u(e,o.line,o.ch,r),a[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var i=new u(e,t.line,t.ch,r);;){var o=g(i,n);if(!o)break;var a=m(new u(e,t.line,t.ch,r),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,r,n){return m(new u(e,t.line,t.ch,n?{from:0,to:n}:null),r)}},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":17}],16:[function(e,t,r){var n;n=function(i){"use strict";var l="CodeMirror-activeline",s="CodeMirror-activeline-background",c="CodeMirror-activeline-gutter";function u(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",l),e.removeLineClass(e.state.activeLines[t],"background",s),e.removeLineClass(e.state.activeLines[t],"gutter",c)}function o(t,e){for(var r=[],n=0;n<e.length;n++){var i=e[n],o=t.getOption("styleActiveLine");if("object"==typeof o&&o.nonEmpty?i.anchor.line==i.head.line:i.empty()){var a=t.getLineHandleVisualStart(i.head.line);r[r.length-1]!=a&&r.push(a)}}(function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0})(t.state.activeLines,r)||t.operation(function(){u(t);for(var e=0;e<r.length;e++)t.addLineClass(r[e],"wrap",l),t.addLineClass(r[e],"background",s),t.addLineClass(r[e],"gutter",c);t.state.activeLines=r})}function a(e,t){o(e,t.ranges)}i.defineOption("styleActiveLine",!1,function(e,t,r){var n=r!=i.Init&&r;t!=n&&(n&&(e.off("beforeSelectionChange",a),u(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":17}],17:[function(e,t,r){var n,i;n=this,i=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,m=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),x=r||n||i,k=x&&(r?document.documentMode||6:+(i||n)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),a=!i&&/Chrome\//.test(e),g=/Opera\//.test(e),s=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),c=/PhantomJS/.test(e),u=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),d=/Android/.test(e),f=u||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),w=u||/Mac/.test(t),h=/\bCrOS\b/.test(e),p=/win/i.test(t),v=g&&e.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&15<=v&&(b=!(g=!1));var y=w&&(o||g&&(null==v||v<12.11)),C=m||x&&9<=k;function T(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,L=function(e,t){var r=e.className,n=T(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function A(e,t){return M(e).appendChild(t)}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 O(e,t,r,n){var i=N(e,t,r,n);return i.setAttribute("role","presentation"),i}function _(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 E(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function D(e,t){var r=e.className;T(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!T(r[n]).test(t)&&(t+=" "+r[n]);return t}S=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 z=function(e){e.select()};function W(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function H(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||t<=l)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}u?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:x&&(z=function(e){try{e.select()}catch(e){}});var I=function(){this.id=null};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}I.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var j=30,B={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},U={origin:"*mouse"},K={origin:"+move"};function V(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||t<=i+a)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,t<=(i+=r-i%r))return n}}var G=[""];function $(e){for(;G.length<=e;)G.push(Y(G)+" ");return G[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(){}function J(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&P(t,r),r}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||""<e&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return 768<=e.charCodeAt(0)&&ne.test(e)}function oe(e,t,r){for(;(r<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function ae(e,t,r){for(var n=r<t?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function le(e,t,r){var n=this;this.input=r,n.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=O("div",null,"CodeMirror-code"),n.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=N("div",null,"CodeMirror-cursors"),n.measure=N("div",null,"CodeMirror-measure"),n.lineMeasure=N("div",null,"CodeMirror-measure"),n.lineSpace=O("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var i=O("div",[n.lineSpace],"CodeMirror-lines");n.mover=N("div",[i],null,"position: relative"),n.sizer=N("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=N("div",null,null,"position: absolute; height: "+j+"px; width: 1px;"),n.gutters=N("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=N("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=N("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),x&&k<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),b||m&&f||(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,r.init(n)}function se(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 ce(e,r,n){var i=[],o=r.line;return e.iter(r.line,n.line+1,function(e){var t=e.text;o==n.line&&(t=t.slice(0,n.ch)),o==r.line&&(t=t.slice(r.ch)),i.push(t),++o}),i}function ue(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function de(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function fe(e){if(null==e.parent)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;n=(t=n).parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function he(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return r+a}function pe(e,t){return t>=e.first&&t<e.first+e.size}function me(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ge(e,t,r){if(void 0===r&&(r=null),!(this instanceof ge))return new ge(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ve(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==ve(e,t)}function be(e){return ge(e.line,e.ch)}function we(e,t){return ve(e,t)<0?t:e}function xe(e,t){return ve(e,t)<0?e:t}function ke(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ce(e,t){if(t.line<e.first)return ge(e.first,0);var r,n,i,o=e.first+e.size-1;return t.line>o?ge(o,se(e,o).text.length):(n=se(e,(r=t).line).text.length,null==(i=r.ch)||n<i?ge(r.line,n):i<0?ge(r.line,0):r)}function Te(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ce(e,t[n]);return r}var Se=!1,Le=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Ae(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Oe(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ne(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&se(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&se(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==ve(t.from,t.to),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Me(a,o.from,l?null:o.to))}}return n}(r,i,a),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Me(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=Y(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=Ae(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 m=s[p];if(null!=m.to&&(m.to+=u),null==m.from)Ae(l,m.marker)||(m.from=u,c&&(l||(l=[])).push(m));else m.from+=u,c&&(l||(l=[])).push(m)}l&&(l=_e(l)),s&&s!=l&&(s=_e(s));var g=[l];if(!c){var v,y=t.text.length-2;if(0<y&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(v||(v=[])).push(new Me(l[b].marker,null,null));for(var w=0;w<y;++w)g.push(v);g.push(s)}return g}function _e(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 Ee(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function De(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Fe(e){return e.inclusiveLeft?-1:0}function ze(e){return e.inclusiveRight?1:0}function We(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ve(n.from,i.from)||Fe(e)-Fe(t);if(o)return-o;var a=ve(n.to,i.to)||ze(e)-ze(t);return a||t.id-e.id}function Pe(e,t){var r,n=Le&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||We(r,i.marker)<0)&&(r=i.marker);return r}function He(e){return Pe(e,!0)}function Ie(e){return Pe(e,!1)}function Re(e,t){var r,n=Le&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||We(r,o.marker)<0)&&(r=o.marker)}return r}function je(e,t,r,n,i){var o=se(e,t),a=Le&&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=ve(c.from,r)||Fe(s.marker)-Fe(i),d=ve(c.to,n)||ze(s.marker)-ze(i);if(!(0<=u&&d<=0||u<=0&&0<=d)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?0<=ve(c.to,r):0<ve(c.to,r))||0<=u&&(s.marker.inclusiveRight&&i.inclusiveLeft?ve(c.from,n)<=0:ve(c.from,n)<0)))return!0}}}function Be(e){for(var t;t=He(e);)e=t.find(-1,!0).line;return e}function qe(e,t){var r=se(e,t),n=Be(r);return r==n?t:fe(n)}function Ue(e,t){if(t>e.lastLine())return t;var r,n=se(e,t);if(!Ke(e,n))return t;for(;r=Ie(n);)n=r.find(1,!0).line;return fe(n)+1}function Ke(e,t){var r=Le&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&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,Ae(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ve(e,t,i))return!0}function Ge(e){for(var t=0,r=(e=Be(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;o=(r=o).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 $e(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=He(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Ie(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function Ye(e){var r=e.display,t=e.doc;r.maxLine=se(t,t.first),r.maxLineLength=$e(r.maxLine),r.maxLineChanged=!0,t.iter(function(e){var t=$e(e);t>r.maxLineLength&&(r.maxLineLength=t,r.maxLine=e)})}var Xe=null;function Ze(e,t,r){var n;Xe=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:Xe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Xe=i)}return null!=n?n:Xe}var Je=function(){var P="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",H="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,R=/[stwN]/,j=/[LRr]/,B=/[Lb1n]/,q=/[1n]/;function U(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!I.test(e))return!1;for(var n,i=e.length,o=[],a=0;a<i;++a)o.push((n=e.charCodeAt(a))<=247?P.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?H.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L");for(var l=0,s=r;l<i;++l){var c=o[l];"m"==c?o[l]=s:s=c}for(var u=0,d=r;u<i;++u){var f=o[u];"1"==f&&"r"==d?o[u]="n":j.test(f)&&"r"==(d=f)&&(o[u]="R")}for(var h=1,p=o[0];h<i-1;++h){var m=o[h];"+"==m&&"1"==p&&"1"==o[h+1]?o[h]="1":","!=m||p!=o[h+1]||"1"!=p&&"n"!=p||(o[h]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var b=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",w=g;w<y;++w)o[w]=b;g=y-1}}for(var x=0,k=r;x<i;++x){var C=o[x];"L"==k&&"1"==C?o[x]="L":j.test(C)&&(k=C)}for(var T=0;T<i;++T)if(R.test(o[T])){var S=void 0;for(S=T+1;S<i&&R.test(o[S]);++S);for(var L="L"==(T?o[T-1]:r),M=L==("L"==(S<i?o[S]:r))?L?"L":"R":r,A=T;A<S;++A)o[A]=M;T=S-1}for(var O,N=[],_=0;_<i;)if(B.test(o[_])){var E=_;for(++_;_<i&&B.test(o[_]);++_);N.push(new U(0,E,_))}else{var D=_,F=N.length;for(++_;_<i&&"L"!=o[_];++_);for(var z=D;z<_;)if(q.test(o[z])){D<z&&N.splice(F,0,new U(1,D,z));var W=z;for(++z;z<_&&q.test(o[z]);++z);N.splice(F,0,new U(2,W,z)),D=z}else++z;D<_&&N.splice(F,0,new U(1,D,_))}return"ltr"==t&&(1==N[0].level&&(O=e.match(/^\s+/))&&(N[0].from=O[0].length,N.unshift(new U(0,0,O[0].length))),1==Y(N).level&&(O=e.match(/\s+$/))&&(Y(N).to-=O[0].length,N.push(new U(0,i-O[0].length,i)))),"rtl"==t?N.reverse():N}}();function Qe(e,t){var r=e.order;return null==r&&(r=e.order=Je(e.text,t)),r}var et=[],tt=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]||et).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||et}function nt(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=R(i,r);-1<o&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function it(e,t){var r=rt(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 ot(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),it(e,r||t.type,e,t),dt(t)||t.codemirrorIgnore}function at(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==R(r,t[n])&&r.push(t[n])}function lt(e,t){return 0<rt(e,t).length}function st(e){e.prototype.on=function(e,t){tt(this,e,t)},e.prototype.off=function(e,t){nt(this,e,t)}}function ct(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function dt(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ft(e){ct(e),ut(e)}function ht(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),w&&e.ctrlKey&&1==t&&(t=3),t}var mt,gt,vt=function(){if(x&&k<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function yt(e){if(null==mt){var t=N("span","");A(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(mt=t.offsetWidth<=1&&2<t.offsetHeight&&!(x&&k<8))}var r=mt?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function bt(e){if(null!=gt)return gt;var t=A(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var wt,xt=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/)},kt=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)},Ct="oncopy"in(wt=N("div"))||(wt.setAttribute("oncopy","return;"),"function"==typeof wt.oncopy),Tt=null;var St={},Lt={};function Mt(e){if("string"==typeof e&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&"string"==typeof e.name&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Mt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Mt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function At(e,t){t=Mt(t);var r=St[t.name];if(!r)return At(e,"text/plain");var n=r(e,t);if(Ot.hasOwnProperty(t.name)){var i=Ot[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}var Ot={};function Nt(e,t){P(t,Ot.hasOwnProperty(e)?Ot[e]:Ot[e]={})}function _t(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 Et(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 Dt(e,t,r){return!e.startState||e.startState(t,r)}var Ft=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};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ft.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},Ft.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ft.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Ft.prototype.backUp=function(e){this.pos-=e},Ft.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=H(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.indentation=function(){return H(this.string,null,this.tabSize)-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&0<n.index?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},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ft.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ft.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var zt=function(e,t){this.state=e,this.lookAhead=t},Wt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Pt(t,r,n,e){var s=[t.state.modeGen],i={};Vt(t,r.text,t.doc.mode,n,function(e,t){return s.push(e,t)},i,e);for(var c=n.state,o=function(e){n.baseTokens=s;var o=t.state.overlays[e],a=1,l=0;n.state=!0,Vt(t,r.text,o.mode,n,function(e,t){for(var r=a;l<e;){var n=s[a];e<n&&s.splice(a,1,e,s[a+1],n),a+=2,l=Math.min(e,n)}if(t)if(o.opaque)s.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var i=s[r+1];s[r+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=c,n.baseTokens=null,n.baseTokenPos=1},a=0;a<t.state.overlays.length;++a)o(a);return{styles:s,classes:i.bgClass||i.textClass?i:null}}function Ht(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=It(e,fe(t)),i=t.text.length>e.options.maxHighlightLength&&_t(e.doc.mode,n.state),o=Pt(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 It(r,n,e){var t=r.doc,i=r.display;if(!t.mode.startState)return new Wt(t,!0,n);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;a<l;--l){if(l<=o.first)return o.first;var s=se(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof zt?c.lookAhead:0)<=o.modeFrontier))return l;var u=H(s.text,null,e.options.tabSize);(null==i||u<n)&&(i=l-1,n=u)}return i}(r,n,e),a=o>t.first&&se(t,o-1).stateAfter,l=a?Wt.fromSaved(t,a,o):new Wt(t,Dt(t.mode),o);return t.iter(o,n,function(e){Rt(r,e.text,l);var t=l.line;e.stateAfter=t==n-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?l.save():null,l.nextLine()}),e&&(t.modeFrontier=l.line),l}function Rt(e,t,r,n){var i=e.doc.mode,o=new Ft(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&jt(i,r.state);!o.eol();)Bt(i,o,r.state),o.start=o.pos}function jt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Et(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Bt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Et(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.")}Wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Wt.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},Wt.fromSaved=function(e,t,r){return t instanceof zt?new Wt(e,_t(e.mode,t.state),r,t.lookAhead):new Wt(e,_t(e.mode,t),r)},Wt.prototype.save=function(e){var t=!1!==e?_t(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new zt(t,this.maxLookAhead):t};var qt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ut(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=se(a,(t=Ce(a,t)).line),c=It(e,t.line,r),u=new Ft(s.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Bt(l,u,c.state),n&&o.push(new qt(u,i,_t(a.mode,c.state)));return n?o:new qt(u,i,c.state)}function Kt(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 Vt(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 Ft(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Kt(jt(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&Rt(e,t,n,d.pos),d.pos=t.length,s=null):s=Kt(Bt(r,d,n.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var Gt=function(e,t,r){this.text=e,De(this,t),this.height=r?r(this):1};Gt.prototype.lineNo=function(){return fe(this)},st(Gt);var $t={},Yt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yt:$t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=O("span",null,null,b?"padding-right: .1px":null),n={pre:O("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(x||b)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Qt,bt(e.display.measure)&&(a=Qe(o,e.doc.direction))&&(n.addToken=er(n.addToken,a)),n.map=[],rr(o,n,Ht(e,o,t!=e.display.externalMeasured&&fe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(yt(e.display.measure))),0==i?(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(b){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return it(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Jt(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,r,n,i,o,a){if(t){var l,s=e.splitSpaces?function(e,t){if(1<e.length&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,c=e.cm.state.specialChars,u=!1;if(c.test(t)){l=document.createDocumentFragment();for(var d=0;;){c.lastIndex=d;var f=c.exec(t),h=f?f.index-d:t.length-d;if(h){var p=document.createTextNode(s.slice(d,d+h));x&&k<9?l.appendChild(N("span",[p])):l.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!f)break;d+=h+1;var m=void 0;if("\t"==f[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=l.appendChild(N("span",$(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==f[0]||"\n"==f[0]?(m=l.appendChild(N("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]):((m=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),x&&k<9?l.appendChild(N("span",[m])):l.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,l=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,l),x&&k<9&&(u=!0),e.pos+=t.length;if(e.trailingSpace=32==s.charCodeAt(t.length-1),r||n||i||u||a){var y=r||"";n&&(y+=n),i&&(y+=i);var b=N("span",[l],y,a);return o&&(b.title=o),e.content.appendChild(b)}e.content.appendChild(l)}}function er(d,f){return function(e,t,r,n,i,o,a){r=r?r+" cm-force-border":"cm-force-border";for(var l=e.pos,s=l+t.length;;){for(var c=void 0,u=0;u<f.length&&!((c=f[u]).to>l&&c.from<=l);u++);if(c.to>=s)return d(e,t,r,n,i,o,a);d(e,t.slice(0,c.to-l),r,n,null,o,a),n=null,t=t.slice(c.to-l),l=c.to}}}function tr(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 rr(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||We(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 T=0;T<y.length;++T)tr(t,0,y[T]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(h<=p)break;for(var S=Math.min(h,v);;){if(g){var L=p+g.length;if(!f){var M=S<L?g.slice(0,S-p):g;t.addToken(t,M,a?a+s:s,u,p+M.length==v?c:"",d,l)}if(S<=L){g=g.slice(S-p),p=S;break}p=L,u=""}g=i.slice(o,o=r[m++]),a=Xt(r[m++],t.cm.options)}}else for(var A=1;A<r.length;A+=2)t.addToken(t,i.slice(o,o=r[A]),Xt(r[A+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Ie(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?fe(Y(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ke(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new nr(e.doc,se(e.doc,o),o);n=o+a.size,i.push(a)}return i}var or=null;var ar=null;function lr(e,t){var r=rt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:ar?n=ar:(n=ar=[],setTimeout(sr,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function sr(){var e=ar;ar=null;for(var t=0;t<e.length;++t)e[t]()}function cr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?hr(e,t):"widget"==o&&mr(e,t,n)}t.changes=null}function ur(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),x&&k<8&&(e.node.style.zIndex=2)),e.node}function dr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zt(e,t)}function fr(e,t){var r=t.text.className,n=dr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,hr(e,t)):r&&(t.text.className=r)}function hr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(N("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?ur(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 pr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ur(t);t.gutterBackground=N("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=ur(t),l=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(N("div",me(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.options.gutters.length;++s){var c=e.options.gutters[s],u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(N("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);gr(e,t,r)}function gr(e,t,r){if(vr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)vr(e,t.rest[n],t,r,!1)}function vr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=N("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),yr(s,c,r,n),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),lr(s,"redraw")}}function yr(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 br(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!_(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,N("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function wr(e,t){for(var r=ht(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function xr(e){return e.lineSpace.offsetTop}function kr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,N("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Tr(e){return j-e.display.nativeBarWidth}function Sr(e){return e.display.scroller.clientWidth-Tr(e)-e.display.barWidth}function Lr(e){return e.display.scroller.clientHeight-Tr(e)-e.display.barHeight}function Mr(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(fe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ar(e,t,r,n){return _r(e,Nr(e,t),r,n)}function Or(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ln(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Nr(e,t){var r=fe(t),n=Or(e,r);n&&!n.text?n=null:n&&n.changes&&(cr(e,n,r,tn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=fe(t=Be(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Zt(e,n);return n.text=i.pre,A(e.display.lineMeasure,i.pre),n}(e,t));var i=Mr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _r(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||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&Sr(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];2<Math.abs(s.bottom-c.bottom)&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Fr(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&&ie(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+s));)++s;if((i=x&&k<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():zr(S(a,l,s).getClientRects(),n)).left||i.right||0==l)break;s=l,l-=1,c="right"}x&&k<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Tt)return Tt;var t=A(e,N("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Tt=1<Math.abs(r.left-n.left)}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;0<l&&(c=n="right"),i=e.options.lineWrapping&&1<(d=a.getClientRects()).length?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(x&&k<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+en(e.display),top:f.top,bottom:f.bottom}:Dr}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};i.left||i.right||(w.bogus=!0);e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p);return w}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Er,Dr={left:0,right:0,top:0,bottom:0};function Fr(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,s<=t&&(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 zr(e,t){var r=Dr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;0<=i&&(r=e[i]).left==r.right;i--);return r}function Wr(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 Pr(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Wr(e.display.view[t])}function Hr(e){Pr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ir(){return a&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Rr(){return a&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function jr(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=br(e.widgets[r]));return t}function Br(e,t,r,n,i){if(!i){var o=jr(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=Ge(t);if("local"==n?a+=xr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:Rr());var s=l.left+("window"==n?0:Ir());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function qr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Ir(),i-=Rr();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=se(e.doc,t.line)),Br(e,n,Ar(e,n,t.ch,i),r)}function Kr(n,e,i,o,a,l){function s(e,t){var r=_r(n,a,e,t?"right":"left",l);return t?r.left=r.right:r.right=r.left,Br(n,o,r,i)}o=o||se(n.doc,e.line),a||(a=Nr(n,o));var c=Qe(o,n.doc.direction),t=e.ch,r=e.sticky;if(t>=o.text.length?(t=o.text.length,r="before"):t<=0&&(t=0,r="after"),!c)return s("before"==r?t-1:t,"before"==r);function u(e,t,r){return s(r?e-1:e,1==c[t].level!=r)}var d=Ze(c,t,r),f=Xe,h=u(t,d,"before"==r);return null!=f&&(h.other=u(t,f,"before"!=r)),h}function Vr(e,t){var r=0;t=Ce(e.doc,t),e.options.lineWrapping||(r=en(e.display)*t.ch);var n=se(e.doc,t.line),i=Ge(n)+xr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Gr(e,t,r,n,i){var o=ge(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function $r(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Gr(n.first,0,null,!0,-1);var i=he(n,r),o=n.first+n.size-1;if(o<i)return Gr(n.first+n.size-1,se(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=se(n,i);;){var l=Jr(e,a,i,t,r),s=Re(a,l.ch+(0<l.xRel?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=se(n,i=c.line)}}function Yr(t,e,r,n){n-=jr(e);var i=e.text.length,o=ae(function(e){return _r(t,r,e-1).bottom<=n},i,0);return{begin:o,end:i=ae(function(e){return _r(t,r,e).top>n},o,i)}}function Xr(e,t,r,n){return r||(r=Nr(e,t)),Yr(e,t,r,Br(e,t,_r(e,r,n),"line").top)}function Zr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(r,e,t,n,i){i-=Ge(e);var o=Nr(r,e),a=jr(e),l=0,s=e.text.length,c=!0,u=Qe(e,r.doc.direction);if(u){var d=(r.options.lineWrapping?function(e,t,r,n,i,o,a){var l=Yr(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=_r(e,n,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||g<d)&&(u=h,d=g)}}u||(u=i[i.length-1]);u.from<s&&(u={from:s,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(n,i,o,a,l,s,c){var e=ae(function(e){var t=l[e],r=1!=t.level;return Zr(Kr(n,ge(o,r?t.to:t.from,r?"before":"after"),"line",i,a),s,c,!0)},0,l.length-1),t=l[e];if(0<e){var r=1!=t.level,u=Kr(n,ge(o,r?t.from:t.to,r?"after":"before"),"line",i,a);Zr(u,s,c,!0)&&u.top>c&&(t=l[e-1])}return t})(r,e,t,o,u,n,i);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=ae(function(e){var t=_r(r,o,e);return t.top+=a,t.bottom+=a,!!Zr(t,n,i,!1)&&(t.top<=i&&t.left<=n&&(p=e,m=t),!0)},l,s),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==e.text.length?"before":_r(r,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Kr(r,ge(t,g,h),"line",e,o);f=w.left,v=i<w.top||i>=w.bottom}return Gr(t,g=oe(e.text,g,1),h,v,n-f)}function Qr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Er){Er=N("pre");for(var t=0;t<49;++t)Er.appendChild(document.createTextNode("x")),Er.appendChild(N("br"));Er.appendChild(document.createTextNode("x"))}A(e.measure,Er);var r=Er.offsetHeight/50;return 3<r&&(e.cachedTextHeight=r),M(e.measure),r||1}function en(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t]);A(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function tn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:rn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function rn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function nn(n){var i=Qr(n.display),o=n.options.lineWrapping,a=o&&Math.max(5,n.display.scroller.clientWidth/en(n.display)-3);return function(e){if(Ke(n.doc,e))return 0;var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;r++)e.widgets[r].height&&(t+=e.widgets[r].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function on(e){var t=e.doc,r=nn(e);t.iter(function(e){var t=r(e);t!=e.height&&de(e,t)})}function an(e,t,r,n){var i=e.display;if(!r&&"true"==ht(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=$r(e,o,a);if(n&&1==c.xRel&&(s=se(e.doc,c.line).text).length==c.ch){var u=H(s,s.length,e.options.tabSize)-s.length;c=ge(c.line,Math.max(0,Math.round((o-Cr(e.display).left)/en(e.display))-u))}return c}function ln(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 sn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);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(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)&&un(e,l.head,i),s||fn(e,l,o)}}return n}function un(e,t,r){var n=Kr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(N("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function dn(e,t){return e.top-t.top||e.left-t.left}function fn(a,e,t){var r=a.display,n=a.doc,i=document.createDocumentFragment(),o=Cr(a.display),L=o.left,M=Math.max(r.sizerWidth,Sr(a)-r.sizer.offsetLeft)-o.right,A="ltr"==n.direction;function O(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?M-e:r)+"px;\n height: "+(n-t)+"px"))}function l(r,y,b){var w,x,o=se(n,r),k=o.text.length;function C(e,t){return Ur(a,ge(r,e),"div",o,t)}function T(e,t,r){var n=Xr(a,o,null,e),i="ltr"==t==("after"==r)?"left":"right";return C("after"==r?n.begin:n.end-(/\s/.test(o.text.charAt(n.end-1))?2:1),i)[i]}var S=Qe(o,n.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(S,y||0,null==b?k:b,function(e,t,r,n){var i="ltr"==r,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),l=null==y&&0==e,s=null==b&&t==k,c=0==n,u=!S||n==S.length-1;if(a.top-o.top<=3){var d=(A?s:l)&&u,f=(A?l:s)&&c?L:(i?o:a).left,h=d?M:(i?a:o).right;O(f,o.top,h-f,o.bottom)}else{var p,m,g,v;i?(p=A&&l&&c?L:o.left,m=A?M:T(e,r,"before"),g=A?L:T(t,r,"after"),v=A&&s&&u?M:a.right):(p=A?T(e,r,"before"):L,m=!A&&l&&c?M:o.right,g=!A&&s&&u?L:a.left,v=A?T(t,r,"after"):M),O(p,o.top,m-p,o.bottom),o.bottom<a.top&&O(L,o.bottom,null,a.top),O(g,a.top,v-g,a.bottom)}(!w||dn(o,w)<0)&&(w=o),dn(a,w)<0&&(w=a),(!x||dn(o,x)<0)&&(x=o),dn(a,x)<0&&(x=a)}),{start:w,end:x}}var s=e.from(),c=e.to();if(s.line==c.line)l(s.line,s.ch,c.ch);else{var u=se(n,s.line),d=se(n,c.line),f=Be(u)==Be(d),h=l(s.line,s.ch,f?u.text.length+1:null).end,p=l(c.line,f?0:null,c.ch).start;f&&(h.top<p.top-2?(O(h.right,h.top,null,h.bottom),O(L,p.top,p.left,p.bottom)):O(h.right,h.top,p.left-h.right,h.bottom)),h.bottom<p.top&&O(L,h.bottom,null,p.top)}t.appendChild(i)}function hn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?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 pn(e){e.state.focused||(e.display.input.focus(),gn(e))}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vn(e))},100)}function gn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,D(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),hn(e))}function vn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yn(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(x&&k<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=Qr(t)),(.005<s||s<-.005)&&(de(i.line,o),bn(i.line),i.rest))for(var c=0;c<i.rest.length;c++)bn(i.rest[c])}}}function bn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function wn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-xr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=he(t,n),a=he(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?a=he(t,Ge(se(t,o=l))+e.wrapper.clientHeight):Math.min(s,t.lastLine())>=a&&(o=he(t,Ge(se(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function xn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=rn(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 kn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=me(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(N("div",[N("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",li(e),!0}return!1}function Cn(e,t){var r=e.display,n=Qr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Lr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+kr(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=Sr(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 Tn(e,t){null!=t&&(Mn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Sn(e){Mn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ln(e,t,r){null==t&&null==r||Mn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Mn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,An(e,Vr(e,t.from),Vr(e,t.to),t.margin))}function An(e,t,r,n){var i=Cn(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});Ln(e,i.scrollLeft,i.scrollTop)}function On(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||ai(e,{top:t}),Nn(e,t,!0),m&&ai(e),ti(e,100))}function Nn(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 _n(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,xn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function En(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+kr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Dn=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),tt(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dn.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&&0<e.clientHeight&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Dn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dn.prototype.zeroWidthHack=function(){var e=w&&!l?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new I,this.disableVert=new I},Dn.prototype.enableZeroWidthBar=function(r,n,i){r.style.pointerEvents="auto",n.set(1e3,function e(){var t=r.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=r?r.style.pointerEvents="none":n.set(1e3,e)})},Dn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fn=function(){};function zn(e,t){t||(t=En(e));var r=e.display.barWidth,n=e.display.barHeight;Wn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&yn(e),Wn(e,En(e)),r=e.display.barWidth,n=e.display.barHeight}function Wn(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=""}Fn.prototype.update=function(){return{bottom:0,right:0}},Fn.prototype.setScrollLeft=function(){},Fn.prototype.setScrollTop=function(){},Fn.prototype.clear=function(){};var Pn={native:Dn,null:Fn};function Hn(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&L(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Pn[r.options.scrollbarStyle](function(e){r.display.wrapper.insertBefore(e,r.display.scrollbarFiller),tt(e,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?_n(r,e):On(r,e)},r),r.display.scrollbars.addClass&&D(r.display.wrapper,r.display.scrollbars.addClass)}var In=0;function Rn(e){var t;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:++In},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function jn(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Bn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&ii(i.cm,i.update);var i;for(var o=0;o<t.length;o++)qn(t[o]);for(var a=0;a<t.length;a++)Un(t[a]);for(var l=0;l<t.length;l++)Kn(t[l])}(e)})}function Bn(e){var t,r,n=e.cm,i=n.display;!(r=(t=n).display).scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Tr(t)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Tr(t)+"px",r.scrollbarsClipped=!0),e.updateMaxLine&&Ye(n),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new ni(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function qn(e){var t=e.cm,r=t.display;e.updatedDisplay&&yn(t),e.barMeasure=En(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ar(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+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Sr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Un(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&_n(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==E();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&zn(t,e.barMeasure),e.updatedDisplay&&si(t,e.barMeasure),e.selectionChanged&&hn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&pn(e.cm)}function Kn(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&oi(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Nn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&_n(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!ot(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!c){var o=N("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-xr(e.display))+"px;\n height: "+(t.bottom-t.top+Tr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ge(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ge(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Kr(e,t),s=r&&r!=t?Kr(e,r):l,c=Cn(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(On(e,c.scrollTop),1<Math.abs(e.doc.scrollTop-u)&&(a=!0)),null!=c.scrollLeft&&(_n(e,c.scrollLeft),1<Math.abs(e.doc.scrollLeft-d)&&(a=!0)),!a)break}return i}(t,Ce(n,e.scrollToPos.from),Ce(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||it(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&it(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&it(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Vn(e,t){if(e.curOp)return t();Rn(e);try{return t()}finally{jn(e)}}function Gn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Rn(e);try{return t.apply(e,arguments)}finally{jn(e)}}}function $n(e){return function(){if(this.curOp)return e.apply(this,arguments);Rn(this);try{return e.apply(this,arguments)}finally{jn(this)}}}function Yn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Rn(e);try{return t.apply(this,arguments)}finally{jn(e)}}}function Xn(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)Le&&qe(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Le&&Ue(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=Qn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var a=Qn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Jn(e)}else{var l=Qn(e,t,t,-1),s=Qn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(ir(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Jn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Zn(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[ln(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==R(a,r)&&a.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Qn(e,t,r,n){var i,o=ln(e,t),a=e.display.view;if(!Le||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(0<n){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;qe(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 ei(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 ti(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,W(ri,e))}function ri(s){var c=s.doc;if(!(c.highlightFrontier>=s.display.viewTo)){var u=+new Date+s.options.workTime,d=It(s,c.highlightFrontier),f=[];c.iter(d.line,Math.min(c.first+c.size,s.display.viewTo+500),function(e){if(d.line>=s.display.viewFrom){var t=e.styles,r=e.text.length>s.options.maxHighlightLength?_t(c.mode,d.state):null,n=Pt(s,e,d,!0);r&&(d.state=r),e.styles=n.styles;var i=e.styleClasses,o=n.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),l=0;!a&&l<t.length;++l)a=t[l]!=e.styles[l];a&&f.push(d.line),e.stateAfter=d.save(),d.nextLine()}else e.text.length<=s.options.maxHighlightLength&&Rt(s,e.text,d),e.stateAfter=d.line%5==0?d.save():null,d.nextLine();if(+new Date>u)return ti(s,s.options.workDelay),!0}),c.highlightFrontier=d.line,c.modeFrontier=Math.max(c.modeFrontier,d.line),f.length&&Vn(s,function(){for(var e=0;e<f.length;e++)Zn(s,f[e],"text")})}}var ni=function(e,t,r){var n=e.display;this.viewport=t,this.visible=wn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Sr(e),this.force=r,this.dims=tn(e),this.events=[]};function ii(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ei(e))return!1;kn(e)&&(Jn(e),t.dims=tn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Le&&(o=qe(e.doc,o),a=Ue(e.doc,a));var l,s,c,u,d=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;s=o,c=a,0==(u=(l=e).display).view.length||s>=u.viewTo||c<=u.viewFrom?(u.view=ir(l,s,c),u.viewFrom=s):(u.viewFrom>s?u.view=ir(l,s,u.viewFrom).concat(u.view):u.viewFrom<s&&(u.view=u.view.slice(ln(l,s))),u.viewFrom=s,u.viewTo<c?u.view=u.view.concat(ir(l,u.viewTo,c)):u.viewTo>c&&(u.view=u.view.slice(0,ln(l,c)))),u.viewTo=c,r.viewOffset=Ge(se(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var f=ei(e);if(!d&&0==f&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=E();if(!t||!_(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&_(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return 4<f&&(r.lineDiv.style.display="none"),function(r,e,t){var n=r.display,i=r.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(e){var t=e.nextSibling;return b&&w&&r.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var s=n.view,c=n.viewFrom,u=0;u<s.length;u++){var d=s[u];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=l(a);var f=i&&null!=e&&e<=c&&d.lineNumber;d.changes&&(-1<R(d.changes,"gutter")&&(f=!1),cr(r,d,c,t)),f&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(me(r.options,c)))),a=d.node.nextSibling}else{var h=(g=c,v=t,void 0,y=dr(p=r,m=d),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),hr(p,m),pr(p,m,g,v),gr(p,m,v),m.node);o.insertBefore(h,a)}c+=d.size}var p,m,g,v,y;for(;a;)a=l(a)}(e,r.updateLineNumbers,t.dims),4<f&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),e.anchorNode&&_(document.body,e.anchorNode)&&_(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(h),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,d&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ti(e,400)),!(r.updateLineNumbers=null)}function oi(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Sr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+kr(e.display)-Lr(e),r.top)}),t.visible=wn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ii(e,t);n=!1){yn(e);var i=En(e);sn(e),zn(e,i),si(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ai(e,t){var r=new ni(e,t);if(ii(e,r)){yn(e),oi(e,r);var n=En(e);sn(e),zn(e,n),si(e,n),r.finish()}}function li(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function si(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+Tr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(N("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&((e.display.lineGutter=o).style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",li(e)}function ui(e){var t=R(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1<t&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ni.prototype.signal=function(e,t){lt(e,t)&&this.events.push(arguments)},ni.prototype.finish=function(){for(var e=0;e<this.events.length;e++)it.apply(null,this.events[e])};var di=0,fi=null;function hi(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 pi(e){var t=hi(e);return t.x*=fi,t.y*=fi,t}function mi(e,t){var r=hi(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&&w&&b)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&&!m&&!g&&null!=fi)return i&&s&&On(e,Math.max(0,a.scrollTop+i*fi)),_n(e,Math.max(0,a.scrollLeft+n*fi)),(!i||i&&s)&&ct(t),void(o.wheelStartX=null);if(i&&null!=fi){var f=i*fi,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),ai(e,{top:h,bottom:p})}di<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&&(fi=(fi*di+r)/(di+1),++di)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}x?fi=-.53:m?fi=15:a?fi=-.7:s&&(fi=-1/3);var gi=function(e,t){this.ranges=e,this.primIndex=t};gi.prototype.primary=function(){return this.ranges[this.primIndex]},gi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},gi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new gi(e,this.primIndex)},gi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},gi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(0<=ve(t,n.from())&&ve(e,n.to())<=0)return r}return-1};var vi=function(e,t){this.anchor=e,this.head=t};function yi(e,t){var r=e[t];e.sort(function(e,t){return ve(e.from(),t.from())}),t=R(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(0<=ve(o.to(),i.from())){var a=xe(o.from(),i.from()),l=we(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new vi(s?l:a,s?a:l))}}return new gi(e,t)}function bi(e,t){return new gi([new vi(e,t||e)],0)}function wi(e){return e.text?ge(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function xi(e,t){if(ve(e,t.from)<0)return e;if(ve(e,t.to)<=0)return wi(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+=wi(t).ch-t.to.ch),ge(r,n)}function ki(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new vi(xi(i.anchor,t),xi(i.head,t)))}return yi(r,e.sel.primIndex)}function Ci(e,t,r){return e.line==t.line?ge(r.line,e.ch-t.ch+r.ch):ge(r.line+(e.line-t.line),e.ch)}function Ti(e){e.doc.mode=At(e.options,e.doc.modeOption),Si(e)}function Si(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,ti(e,100),e.state.modeGen++,e.curOp&&Xn(e)}function Li(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Mi(e,n,t,i){function o(e){return t?t[e]:null}function r(e,t,r){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ee(e),De(e,r);var i=n?n(e):1;i!=e.height&&de(e,i)}(e,t,r,i),lr(e,"change",e,n)}function a(e,t){for(var r=[],n=e;n<t;++n)r.push(new Gt(c[n],o(n),i));return r}var l=n.from,s=n.to,c=n.text,u=se(e,l.line),d=se(e,s.line),f=Y(c),h=o(c.length-1),p=s.line-l.line;if(n.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Li(e,n)){var m=a(0,c.length-1);r(d,d.text,h),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)r(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var g=a(1,c.length-1);g.push(new Gt(f+u.text.slice(s.ch),h,i)),r(u,u.text.slice(0,l.ch)+c[0],o(0)),e.insert(l.line+1,g)}else if(1==c.length)r(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),o(0)),e.remove(l.line+1,p);else{r(u,u.text.slice(0,l.ch)+c[0],o(0)),r(d,f+d.text.slice(s.ch),h);var v=a(1,c.length-1);1<p&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}lr(e,"change",e,n)}function Ai(e,l,s){!function e(t,r,n){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=r){var a=n&&o.sharedHist;s&&!a||(l(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function Oi(e,t){if(t.cm)throw new Error("This document is already in use.");on((e.doc=t).cm=e),Ti(e),Ni(e),e.options.lineWrapping||Ye(e),e.options.mode=t.modeOption,Xn(e)}function Ni(e){("rtl"==e.doc.direction?D:L)(e.display.lineDiv,"CodeMirror-rtl")}function _i(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:be(t.from),to:wi(t),text:ce(e,t.from,t.to)};return Pi(e,r,t.from.line,t.to.line+1),Ai(e,function(e){return Pi(e,r,t.from.line,t.to.line+1)},!0),r}function Di(e){for(;e.length;){if(!Y(e).ranges)break;e.pop()}}function Fi(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(l=i).lastOp==n?(Di(l.done),Y(l.done)):l.done.length&&!Y(l.done).ranges?Y(l.done):1<l.done.length&&!l.done[l.done.length-2].ranges?(l.done.pop(),Y(l.done)):void 0))a=Y(o.changes),0==ve(t.from,t.to)&&0==ve(t.from,a.to)?a.to=wi(t):o.changes.push(Ei(e,t));else{var c=Y(i.done);for(c&&c.ranges||Wi(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=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||it(e,"historyAdded")}function zi(e,t,r,n){var i,o,a,l,s,c=e.history,u=n&&n.origin;r==c.lastSelOp||u&&c.lastSelOrigin==u&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==u||(i=e,o=u,a=Y(c.done),l=t,"*"==(s=o.charAt(0))||"+"==s&&a.ranges.length==l.ranges.length&&a.somethingSelected()==l.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?c.done[c.done.length-1]=t:Wi(t,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=u,c.lastSelOp=r,n&&!1!==n.clearRedo&&Di(c.undone)}function Wi(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Pi(t,r,e,n){var i=r["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,n),function(e){e.markedSpans&&((i||(i=r["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Hi(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 Ii(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Hi(r[i]));return n}(e,t),n=Ne(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 Ri(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?gi.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+)$/))&&-1<R(t,Number(u[1]))&&(Y(l)[d]=c[d],delete c[d])}}}return n}function ji(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ve(t,i)<0;o!=ve(r,i)<0?(i=t,t=r):o!=ve(t,r)<0&&(t=r)}return new vi(i,t)}return new vi(r||t,t)}function Bi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Gi(e,new gi([ji(e.sel.primary(),t,r,i)],0),n)}function qi(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]=ji(e.sel.ranges[o],t[o],null,i);Gi(e,yi(n,e.sel.primIndex),r)}function Ui(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Gi(e,yi(i,e.sel.primIndex),n)}function Ki(e,t,r,n){Gi(e,bi(t,r),n)}function Vi(e,t,r){var n=e.history.done,i=Y(n);i&&i.ranges?$i(e,n[n.length-1]=t,r):Gi(e,t,r)}function Gi(e,t,r){$i(e,t,r),zi(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function $i(e,t,r){var n,i,o,a;(lt(e,"beforeSelectionChange")||e.cm&<(e.cm,"beforeSelectionChange"))&&(n=e,o=r,a={ranges:(i=t).ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new vi(Ce(n,e[t].anchor),Ce(n,e[t].head))},origin:o&&o.origin},it(n,"beforeSelectionChange",n,a),n.cm&&it(n.cm,"beforeSelectionChange",n.cm,a),t=a.ranges!=i.ranges?yi(a.ranges,a.ranges.length-1):i),Yi(e,Zi(e,t,r&&r.bias||(ve(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||Sn(e.cm)}function Yi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,at(e.cm)),lr(e,"cursorActivity",e))}function Xi(e){Yi(e,Zi(e,e.sel,null,!1))}function Zi(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=Qi(e,a.anchor,l&&l.anchor,r,n),c=Qi(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 vi(s,c))}return i?yi(i,t.primIndex):t}function Ji(e,t,r,n,i){var o=se(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&&(it(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=eo(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=ve(c,r))&&(n<0?u<0:0<u))return Ji(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=eo(e,d,n,d.line==t.line?o:null)),d?Ji(e,d,t,n,i):null}}return t}function Qi(e,t,r,n,i){var o=n||1,a=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return a||(e.cantEdit=!0,ge(e.first,0))}function eo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Ce(e,ge(t.line-1)):null:0<r&&t.ch==(n||se(e,t.line)).text.length?t.line<e.first+e.size-1?ge(t.line+1,0):null:new ge(t.line,t.ch+r)}function to(e){e.setSelection(ge(e.firstLine(),0),ge(e.lastLine()),q)}function ro(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,r,n){e&&(o.from=Ce(i,e)),t&&(o.to=Ce(i,t)),r&&(o.text=r),void 0!==n&&(o.origin=n)}),it(i,"beforeChange",i,o),i.cm&&it(i.cm,"beforeChange",i.cm,o),o.canceled?null:{from:o.from,to:o.to,text:o.text,origin:o.origin}}function no(e,t,r){if(e.cm){if(!e.cm.curOp)return Gn(e.cm,no)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(lt(e,"beforeChange")||e.cm&<(e.cm,"beforeChange"))||(t=ro(e,t,!0))){var n=Se&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=R(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var 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(!(ve(c.to,l.from)<0||0<ve(c.from,l.to))){var u=[s,1],d=ve(c.from,l.from),f=ve(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(0<f||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;0<=i;--i)io(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else io(e,t)}}function io(e,r){if(1!=r.text.length||""!=r.text[0]||0!=ve(r.from,r.to)){var t=ki(e,r);Fi(e,r,t,e.cm?e.cm.curOp.id:NaN),lo(e,r,t,Ne(e,r));var n=[];Ai(e,function(e,t){t||-1!=R(n,e.history)||(fo(e.history,r),n.push(e.history)),lo(e,r,null,Ne(e,r))})}}function oo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var a,r=i.history,n=i.sel,l="undo"==o?r.done:r.undone,s="undo"==o?r.undone:r.done,c=0;c<l.length&&(a=l[c],e?!a.ranges||a.equals(i.sel):a.ranges);c++);if(c!=l.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(a=l.pop()).ranges){if(t)return void l.push(a);break}if(Wi(a,s),e&&!a.equals(i.sel))return void Gi(i,a,{clearRedo:!1});n=a}var u=[];Wi(n,s),s.push({changes:u,generation:r.generation}),r.generation=a.generation||++r.maxGeneration;for(var d=lt(i,"beforeChange")||i.cm&<(i.cm,"beforeChange"),f=function(e){var r=a.changes[e];if(r.origin=o,d&&!ro(i,r,!1))return l.length=0,{};u.push(Ei(i,r));var t=e?ki(i,r):Y(l);lo(i,r,t,Ii(i,r)),!e&&i.cm&&i.cm.scrollIntoView({from:r.from,to:wi(r)});var n=[];Ai(i,function(e,t){t||-1!=R(n,e.history)||(fo(e.history,r),n.push(e.history)),lo(e,r,null,Ii(e,r))})},h=a.changes.length-1;0<=h;--h){var p=f(h);if(p)return p.v}}}}function ao(e,t){if(0!=t&&(e.first+=t,e.sel=new gi(X(e.sel.ranges,function(e){return new vi(ge(e.anchor.line+t,e.anchor.ch),ge(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Xn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Zn(e.cm,n,"gutter")}}function lo(e,t,r,n){if(e.cm&&!e.cm.curOp)return Gn(e.cm,lo)(e,t,r,n);if(t.to.line<e.first)ao(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ao(e,i),t={from:ge(e.first,0),to:ge(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ge(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ce(e,t.from,t.to),r||(r=ki(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=fe(Be(se(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0}));-1<n.sel.contains(t.from,t.to)&&at(e);Mi(n,t,r,nn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=$e(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;r<n;n--){var i=se(e,n).stateAfter;if(i&&(!(i instanceof zt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ti(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Xn(e):o.line!=a.line||1!=t.text.length||Li(e.doc,t)?Xn(e,o.line,a.line+1,c):Zn(e,o.line,"text");var u=lt(e,"changes"),d=lt(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&lr(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Mi(e,t,n),$i(e,r,q)}}function so(e,t,r,n,i){var o;(n||(n=r),ve(n,r)<0)&&(r=(o=[n,r])[0],n=o[1]);"string"==typeof t&&(t=e.splitLines(t)),no(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function uo(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)co(o.ranges[l].anchor,t,r,n),co(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=ge(c.from.line+n,c.from.ch),c.to=ge(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 fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;uo(e.done,r,n,i),uo(e.undone,r,n,i)}function ho(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=se(e,ke(e,t)):i=fe(t),null==i?null:(n(o,i)&&e.cm&&Zn(e.cm,i,r),o)}function po(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function mo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}vi.prototype.from=function(){return xe(this.anchor,this.head)},vi.prototype.to=function(){return we(this.anchor,this.head)},vi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r,n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,(r=o).parent=null,Ee(r),lr(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(1<this.children.length||!(this.children[0]instanceof po))){var l=[];this.collapse(l),this.children=[new po(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&50<i.lines.length){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new po(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new mo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=R(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new mo(e.children);(n.parent=e).children=[n,t],e=n}t.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var go=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function vo(e,t,r){Ge(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Tn(e,r)}go.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=fe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=br(this);de(r,Math.max(0,r.height-o)),e&&(Vn(e,function(){vo(e,r,-o),Zn(e,n,"widget")}),lr(e,"lineWidgetCleared",e,this,n))}},go.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=br(this)-t;i&&(Ke(this.doc,n)||de(n,n.height+i),r&&Vn(r,function(){r.curOp.forceUpdate=!0,vo(r,n,i),lr(r,"lineWidgetChanged",r,e,fe(n))}))},st(go);var yo=0,bo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yo};function wo(t,n,i,e,r){if(e&&e.shared)return function(e,r,n,i,o){(i=P(i)).shared=!1;var a=[wo(e,r,n,i,o)],l=a[0],s=i.widgetNode;return Ai(e,function(e){s&&(i.widgetNode=s.cloneNode(!0)),a.push(wo(e,Ce(e,r),Ce(e,n),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;l=Y(a)}),new xo(a,l)}(t,n,i,e,r);if(t.cm&&!t.cm.curOp)return Gn(t.cm,wo)(t,n,i,e,r);var o=new bo(t,r),a=ve(n,i);if(e&&P(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(je(t,n.line,n,i,o)||n.line!=i.line&&je(t,i.line,n,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Le=!0}o.addToHistory&&Fi(t,{from:n,to:i,origin:"markText"},t.sel,NaN);var l,s=n.line,c=t.cm;if(t.iter(s,i.line+1,function(e){var t,r;c&&o.collapsed&&!c.options.lineWrapping&&Be(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=n.line&&de(e,0),t=e,r=new Me(o,s==n.line?n.ch:null,s==i.line?i.ch:null),t.markedSpans=t.markedSpans?t.markedSpans.concat([r]):[r],r.marker.attachLine(t),++s}),o.collapsed&&t.iter(n.line,i.line+1,function(e){Ke(t,e)&&de(e,0)}),o.clearOnEnter&&tt(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++yo,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Xn(c,n.line,i.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=n.line;u<=i.line;u++)Zn(c,u,"text");o.atomic&&Xi(c.doc),lr(c,"markerAdded",c,o)}return o}bo.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&Rn(t),lt(this,"clear")){var n=this.find();n&&lr(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=Ae(l.markedSpans,e);t&&!e.collapsed?Zn(t,fe(l),"text"):t&&(null!=s.to&&(o=fe(l)),null!=s.from&&(i=fe(l))),l.markedSpans=Oe(l.markedSpans,s),null==s.from&&e.collapsed&&!Ke(e.doc,l)&&t&&de(l,Qr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=Be(e.lines[c]),d=$e(u);d>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Xn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Xi(t.doc)),t&&lr(t,"markerCleared",t,this,i,o),r&&jn(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Ae(o.markedSpans,this);if(null!=a.from&&(r=ge(t?o:fe(o),a.from),-1==e))return r;if(null!=a.to&&(n=ge(t?o:fe(o),a.to),1==e))return n}return r&&{from:r,to:n}},bo.prototype.changed=function(){var o=this,a=this.find(-1,!0),l=this,s=this.doc.cm;a&&s&&Vn(s,function(){var e=a.line,t=fe(a.line),r=Or(s,t);if(r&&(Wr(r),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Ke(l.doc,e)&&null!=l.height){var n=l.height;l.height=null;var i=br(l)-n;i&&de(e,e.height+i)}lr(s,"markerChanged",s,o)})},bo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=R(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},bo.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},st(bo);var xo=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function ko(e){return e.findMarks(ge(e.first,0),e.clipPos(ge(e.lastLine())),function(e){return e.parent})}function Co(o){for(var e=function(e){var t=o[e],r=[t.primary.doc];Ai(t.primary.doc,function(e){return r.push(e)});for(var n=0;n<t.markers.length;n++){var i=t.markers[n];-1==R(r,i.doc)&&(i.parent=null,t.markers.splice(n--,1))}},t=0;t<o.length;t++)e(t)}xo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();lr(this,"clear")}},xo.prototype.find=function(e,t){return this.primary.find(e,t)},st(xo);var To=0,So=function(e,t,r,n,i){if(!(this instanceof So))return new So(e,t,r,n,i);null==r&&(r=0),mo.call(this,[new po([new Gt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ge(r,0);this.sel=bi(o),this.history=new _i(null),this.id=++To,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Mi(this,{from:o,to:o,text:e}),Gi(this,bi(o),q)};So.prototype=J(mo.prototype,{constructor:So,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=ue(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=ge(this.first,0),r=this.first+this.size-1;no(this,{from:t,to:ge(r,se(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ln(this.cm,0,0),Gi(this,bi(t),q)}),replaceRange:function(e,t,r,n){so(this,e,t=Ce(this,t),r=r?Ce(this,r):t,n)},getRange:function(e,t,r){var n=ce(this,Ce(this,e),Ce(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(pe(this,e))return se(this,e)},getLineNumber:function(e){return fe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=se(this,e)),Be(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ce(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:Yn(function(e,t,r){Ki(this,Ce(this,"number"==typeof e?ge(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ki(this,Ce(this,e),Ce(this,t||e),r)}),extendSelection:Yn(function(e,t,r){Bi(this,Ce(this,e),t&&Ce(this,t),r)}),extendSelections:Yn(function(e,t){qi(this,Te(this,e),t)}),extendSelectionsBy:Yn(function(e,t){qi(this,Te(this,X(this.sel.ranges,e)),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new vi(Ce(this,e[i].anchor),Ce(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Gi(this,yi(n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vi(Ce(this,e),Ce(this,t||e))),Gi(this,yi(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ce(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ce(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ge(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ci(l.from,i,o),c=Ci(wi(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=ve(u.head,u.anchor)<0;n[a]=new vi(d?c:s,d?s:c)}else n[a]=new vi(s,s)}return new gi(n,e.sel.primIndex)}(this,n,t),s=n.length-1;0<=s;s--)no(this,n[s]);l?Vi(this,l):this.cm&&Sn(this.cm)}),undo:Yn(function(){oo(this,"undo")}),redo:Yn(function(){oo(this,"redo")}),undoSelection:Yn(function(){oo(this,"undo",!0)}),redoSelection:Yn(function(){oo(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 _i(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:Ri(this.history.done),undone:Ri(this.history.undone)}},setHistory:function(e){var t=this.history=new _i(this.history.maxGeneration);t.done=Ri(e.done.slice(0),null,!0),t.undone=Ri(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,r,n){return ho(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[r]=n)&&re(t)&&(e.gutterMarkers=null),!0})}),clearGutter:Yn(function(t){var r=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&ho(r,e,"gutter",function(){return e.gutterMarkers[t]=null,re(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(!(e=se(this,t=e)))return null}else if(null==(t=fe(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:Yn(function(e,r,n){return ho(this,e,"gutter"==r?"gutter":"class",function(e){var t="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(e[t]){if(T(n).test(e[t]))return!1;e[t]+=" "+n}else e[t]=n;return!0})}),removeLineClass:Yn(function(e,o,a){return ho(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",r=e[t];if(!r)return!1;if(null==a)e[t]=null;else{var n=r.match(T(a));if(!n)return!1;var i=n.index+n[0].length;e[t]=r.slice(0,n.index)+(n.index&&i!=r.length?" ":"")+r.slice(i)||null}return!0})}),addLineWidget:Yn(function(e,t,r){return i=e,o=new go(n=this,t,r),(a=n.cm)&&o.noHScroll&&(a.display.alignWidgets=!0),ho(n,i,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==o.insertAt?t.push(o):t.splice(Math.min(t.length-1,Math.max(0,o.insertAt)),0,o),o.line=e,a&&!Ke(n,e)){var r=Ge(e)<n.scrollTop;de(e,e.height+br(o)),r&&Tn(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&lr(a,"lineWidgetAdded",a,o,"number"==typeof i?i:fe(i)),o;var n,i,o,a}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return wo(this,Ce(this,e),Ce(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 wo(this,e=Ce(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=se(this,(e=Ce(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(i,o,a){i=Ce(this,i),o=Ce(this,o);var l=[],s=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;r++){var n=t[r];null!=n.to&&s==i.line&&i.ch>=n.to||null==n.from&&s!=i.line||null!=n.from&&s==o.line&&n.from>=o.ch||a&&!a(n.marker)||l.push(n.marker.parent||n.marker)}++s}),l},getAllMarks:function(){var n=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;++r)null!=t[r].from&&n.push(t[r].marker)}),n},posFromIndex:function(r){var n,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(r<t)return n=r,!0;r-=t,++i}),Ce(this,ge(i,n))},indexFromPos:function(e){var t=(e=Ce(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new So(ue(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 So(ue(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ve(o,a)){var l=wo(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}(n,ko(this)),n},unlinkDoc:function(e){if(e instanceof ka&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Co(ko(this));break}}if(e.history==this.history){var r=[e.id];Ai(e,function(e){return r.push(e.id)},!0),e.history=new _i(null),e.history.done=Ri(this.history.done,r),e.history.undone=Ri(this.history.undone,r)}},iterLinkedDocs:function(e){Ai(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):xt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Yn(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Vn(t=this.cm,function(){Ni(t),Xn(t)}))})}),So.prototype.eachLine=So.prototype.iter;var Lo=0;function Mo(e){var i=this;if(Ao(i),!ot(i,e)&&!wr(i.display,e)){ct(e),x&&(Lo=+new Date);var o=an(i,e,!0),t=e.dataTransfer.files;if(o&&!i.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var a=t.length,l=Array(a),s=0,r=function(e,r){if(!i.options.allowDropFileTypes||-1!=R(i.options.allowDropFileTypes,e.type)){var n=new FileReader;n.onload=Gn(i,function(){var e=n.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),l[r]=e,++s==a){var t={from:o=Ce(i.doc,o),to:o,text:i.doc.splitLines(l.join(i.doc.lineSeparator())),origin:"paste"};no(i.doc,t),Vi(i.doc,bi(o,wi(t)))}}),n.readAsText(e)}},n=0;n<a;++n)r(t[n],n);else{if(i.state.draggingText&&-1<i.doc.sel.contains(o))return i.state.draggingText(e),void setTimeout(function(){return i.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(i.state.draggingText&&!i.state.draggingText.copy&&(u=i.listSelections()),$i(i.doc,bi(o,o)),u)for(var d=0;d<u.length;++d)so(i.doc,"",u[d].anchor,u[d].head,"drag");i.replaceSelection(c,"around","paste"),i.display.input.focus()}}catch(e){}}}}function Ao(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Oo(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}var No=!1;function _o(){var e;No||(tt(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Oo(Eo)},100))}),tt(window,"blur",function(){return Oo(vn)}),No=!0)}function Eo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Do={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",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"},Fo=0;Fo<10;Fo++)Do[Fo+48]=Do[Fo+96]=String(Fo);for(var zo=65;zo<=90;zo++)Do[zo]=String.fromCharCode(zo);for(var Wo=1;Wo<=12;Wo++)Do[Wo+111]=Do[Wo+63235]="F"+Wo;var Po={};function Ho(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(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=X(r.split(" "),Ho),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 Ro(e,t,r,n){var i=(t=Uo(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 Ro(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ro(e,t.fallthrough[o],r,n);if(a)return a}}}function jo(e){var t="string"==typeof e?e:Do[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Bo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function qo(e,t){if(g&&34==e.keyCode&&e.char)return!1;var r=Do[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Bo(r,e,t))}function Uo(e){return"string"==typeof e?Po[e]:e}function Ko(t,e){for(var r=t.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=e(r[i]);n.length&&ve(o.from,Y(n).to)<=0;){var a=n.pop();if(ve(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Vn(t,function(){for(var e=n.length-1;0<=e;e--)so(t.doc,"",n[e].from,n[e].to,"+delete");Sn(t)})}function Vo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Go(e,t,r){var n=Vo(e,t.ch,r);return null==n?null:new ge(t.line,n,r<0?"after":"before")}function $o(e,t,r,n,i){if(e){var o=Qe(r,t.doc.direction);if(o){var a,l=i<0?Y(o):o[0],s=i<0==(1==l.level)?"after":"before";if(0<l.level||"rtl"==t.doc.direction){var c=Nr(t,r);a=i<0?r.text.length-1:0;var u=_r(t,c,a).top;a=ae(function(e){return _r(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Vo(r,a,1))}else a=i<0?l.to:l.from;return new ge(n,a,s)}}return new ge(n,i<0?r.text.length:0,i<0?"before":"after")}Po.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"},Po.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"},Po.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"},Po.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"]},Po.default=w?Po.macDefault:Po.pcDefault;var Yo={selectAll:to,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(r){return Ko(r,function(e){if(e.empty()){var t=se(r.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<r.lastLine()?{from:e.head,to:ge(e.head.line+1,0)}:{from:e.head,to:ge(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return Ko(t,function(e){return{from:ge(e.from().line,0),to:Ce(t.doc,ge(e.to().line+1,0))}})},delLineLeft:function(e){return Ko(e,function(e){return{from:ge(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(r){return Ko(r,function(e){var t=r.charCoords(e.head,"div").top+5;return{from:r.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(n){return Ko(n,function(e){var t=n.charCoords(e.head,"div").top+5,r=n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ge(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ge(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return Xo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return Zo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var r=se(e.doc,t),n=function(e){for(var t;t=Ie(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=fe(n));return $o(!0,e,r,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div")},K)},goLineLeft:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:0,top:t},"div")},K)},goLineLeftSmart:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5,r=n.coordsChar({left:0,top:t},"div");return r.ch<n.getLine(r.line).search(/\S/)?Zo(n,e.head):r},K)},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=H(e.getLine(o.line),o.ch,n);t.push($(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return Vn(a,function(){for(var e=a.listSelections(),t=[],r=0;r<e.length;r++)if(e[r].empty()){var n=e[r].head,i=se(a.doc,n.line).text;if(i)if(n.ch==i.length&&(n=new ge(n.line,n.ch-1)),0<n.ch)n=new ge(n.line,n.ch+1),a.replaceRange(i.charAt(n.ch-1)+i.charAt(n.ch-2),ge(n.line,n.ch-2),n,"+transpose");else if(n.line>a.doc.first){var o=se(a.doc,n.line-1).text;o&&(n=new ge(n.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),ge(n.line-1,o.length-1),n,"+transpose"))}t.push(new vi(n,n))}a.setSelections(t)})},newlineAndIndent:function(n){return Vn(n,function(){for(var e=n.listSelections(),t=e.length-1;0<=t;t--)n.replaceRange(n.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=n.listSelections();for(var r=0;r<e.length;r++)n.indentLine(e[r].from().line,null,!0);Sn(n)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xo(e,t){var r=se(e.doc,t),n=Be(r);return n!=r&&(t=fe(n)),$o(!0,e,n,t,1)}function Zo(e,t){var r=Xo(e,t.line),n=se(e.doc,r.line),i=Qe(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 ge(r.line,a?0:o,r.sticky)}return r}function Jo(e,t,r){if("string"==typeof t&&!(t=Yo[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)!=B}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var Qo=new I;function ea(e,t,r,n){var i=e.state.keySeq;if(i){if(jo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Qo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ta(e,i+" "+t,r,n))return!0}return ta(e,t,r,n)}function ta(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ro(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ro(t,e.options.extraKeys,r,e)||Ro(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&lr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(ct(r),hn(e)),!!i}function ra(t,e){var r=qo(e,!0);return!!r&&(e.shiftKey&&!t.state.keySeq?ea(t,"Shift-"+r,e,function(e){return Jo(t,e,!0)})||ea(t,r,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Jo(t,e)}):ea(t,r,e,function(e){return Jo(t,e)}))}var na=null;function ia(e){if(this.curOp.focus=E(),!ot(this,e)){x&&k<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var r=ra(this,e);g&&(na=r?t:null,!r&&88==t&&!Ct&&(w?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),nt(document,"keyup",r),nt(document,"mouseover",r))}D(t,"CodeMirror-crosshair"),tt(document,"keyup",r),tt(document,"mouseover",r)}(this)}}function oa(e){16==e.keyCode&&(this.doc.sel.shift=!1),ot(this,e)}function aa(e){if(!(wr(this.display,e)||ot(this,e)||e.ctrlKey&&!e.altKey||w&&e.metaKey)){var t=e.keyCode,r=e.charCode;if(g&&t==na)return na=null,void ct(e);if(!g||e.which&&!(e.which<10)||!ra(this,e)){var n,i=String.fromCharCode(null==r?t:r);if("\b"!=i)if(!ea(n=this,"'"+i+"'",e,function(e){return Jo(n,e,!0)}))this.display.input.onKeyPress(e)}}}var la,sa,ca=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ua(e){var t=this,r=t.display;if(!(ot(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,wr(r,e))b||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!ha(t,e)){var n,i,o,a=an(t,e),l=pt(e),s=a?(n=a,i=l,o=+new Date,sa&&sa.compare(o,n,i)?(la=sa=null,"triple"):la&&la.compare(o,n,i)?(sa=new ca(o,n,i),la=null,"double"):(la=new ca(o,n,i),sa=null,"single")):"single";window.focus(),1==l&&t.state.selectingText&&t.state.selectingText(e),a&&function(r,e,n,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return ea(r,Bo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=Yo[e]),!e)return!1;var t=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),t=e(r,n)!=B}finally{r.state.suppressEdits=!1}return t})}(t,l,a,s,e)||(1==l?a?function(e,t,r,n){x?setTimeout(W(pn,e),0):e.curOp.focus=E();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=h?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=w?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(w?r.altKey:r.ctrlKey));return i}(e,r,n),a=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&-1<(i=a.contains(t))&&(ve((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<ve(i.to(),t)||t.xRel<0)?function(t,r,n,i){var o=t.display,a=!1,l=Gn(t,function(e){b&&(o.scroller.draggable=!1),t.state.draggingText=!1,nt(o.wrapper.ownerDocument,"mouseup",l),nt(o.wrapper.ownerDocument,"mousemove",s),nt(o.scroller,"dragstart",c),nt(o.scroller,"drop",l),a||(ct(e),i.addNew||Bi(t.doc,n,null,null,i.extend),b||x&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),s=function(e){a=a||10<=Math.abs(r.clientX-e.clientX)+Math.abs(r.clientY-e.clientY)},c=function(){return a=!0};b&&(o.scroller.draggable=!0);(t.state.draggingText=l).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();tt(o.wrapper.ownerDocument,"mouseup",l),tt(o.wrapper.ownerDocument,"mousemove",s),tt(o.scroller,"dragstart",c),tt(o.scroller,"drop",l),mn(t),setTimeout(function(){return o.input.focus()},20)}(e,n,t,o):function(g,e,v,y){var a=g.display,b=g.doc;ct(e);var w,x,k=b.sel,t=k.ranges;y.addNew&&!y.extend?(x=b.sel.contains(v),w=-1<x?t[x]:new vi(v,v)):(w=b.sel.primary(),x=b.sel.primIndex);if("rectangle"==y.unit)y.addNew||(w=new vi(v,v)),v=an(g,e,!0,!0),x=-1;else{var r=da(g,v,y.unit);w=y.extend?ji(w,r.anchor,r.head,y.extend):r}y.addNew?-1==x?(x=t.length,Gi(b,yi(t.concat([w]),x),{scroll:!1,origin:"*mouse"})):1<t.length&&t[x].empty()&&"char"==y.unit&&!y.extend?(Gi(b,yi(t.slice(0,x).concat(t.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),k=b.sel):Ui(b,x,w,U):(Gi(b,new gi([w],x=0),U),k=b.sel);var C=v;function l(e){if(0!=ve(C,e))if(C=e,"rectangle"==y.unit){for(var t=[],r=g.options.tabSize,n=H(se(b,v.line).text,v.ch,r),i=H(se(b,e.line).text,e.ch,r),o=Math.min(n,i),a=Math.max(n,i),l=Math.min(v.line,e.line),s=Math.min(g.lastLine(),Math.max(v.line,e.line));l<=s;l++){var c=se(b,l).text,u=V(c,o,r);o==a?t.push(new vi(ge(l,u),ge(l,u))):c.length>u&&t.push(new vi(ge(l,u),ge(l,V(c,a,r))))}t.length||t.push(new vi(v,v)),Gi(b,yi(k.ranges.slice(0,x).concat(t),x),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var d,f=w,h=da(g,e,y.unit),p=f.anchor;0<ve(h.anchor,p)?(d=h.head,p=xe(f.from(),h.anchor)):(d=h.anchor,p=we(f.to(),h.head));var m=k.ranges.slice(0);m[x]=function(e,t){var r=t.anchor,n=t.head,i=se(e.doc,r.line);if(0==ve(r,n)&&r.sticky==n.sticky)return t;var o=Qe(i);if(!o)return t;var a=Ze(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s,c=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)s=0<(n.line-r.line)*("ltr"==e.doc.direction?1:-1);else{var u=Ze(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:0<d}var f=o[c+(s?-1:0)],h=s==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new vi(new ge(r.line,p,m),n)}(g,new vi(Ce(b,p),d)),Gi(b,yi(m,x),U)}}var s=a.wrapper.getBoundingClientRect(),c=0;function n(e){g.state.selectingText=!1,c=1/0,ct(e),a.input.focus(),nt(a.wrapper.ownerDocument,"mousemove",i),nt(a.wrapper.ownerDocument,"mouseup",o),b.history.lastSelOrigin=null}var i=Gn(g,function(e){0!==e.buttons&&pt(e)?function e(t){var r=++c;var n=an(g,t,!0,"rectangle"==y.unit);if(!n)return;if(0!=ve(n,C)){g.curOp.focus=E(),l(n);var i=wn(a,b);(n.line>=i.to||n.line<i.from)&&setTimeout(Gn(g,function(){c==r&&e(t)}),150)}else{var o=t.clientY<s.top?-20:t.clientY>s.bottom?20:0;o&&setTimeout(Gn(g,function(){c==r&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):n(e)}),o=Gn(g,n);g.state.selectingText=o,tt(a.wrapper.ownerDocument,"mousemove",i),tt(a.wrapper.ownerDocument,"mouseup",o)}(e,n,t,o)}(t,a,s,e):ht(e)==r.scroller&&ct(e):2==l?(a&&Bi(t.doc,a),setTimeout(function(){return r.input.focus()},20)):3==l&&(C?pa(t,e):mn(t)))}}function da(e,t,r){if("char"==r)return new vi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new vi(ge(t.line,0),Ce(e.doc,ge(t.line+1,0)));var n=r(e,t);return new vi(n.from,n.to)}function fa(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ct(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!lt(e,r))return dt(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 it(e,r,e,he(e.doc,o),e.options.gutters[s],t),dt(t)}}function ha(e,t){return fa(e,t,"gutterClick",!0)}function pa(e,t){wr(e.display,t)||function(e,t){if(!lt(e,"gutterContextMenu"))return!1;return fa(e,t,"gutterContextMenu",!1)}(e,t)||ot(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function ma(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hr(e)}ca.prototype.compare=function(e,t,r){return this.time+400>e&&0==ve(t,this.pos)&&r==this.button};var ga={toString:function(){return"CodeMirror.Init"}},va={},ya={};function ba(e){ci(e),Xn(e),xn(e)}function wa(e,t,r){if(!t!=!(r&&r!=ga)){var n=e.display.dragFunctions,i=t?tt:nt;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 xa(e){e.options.lineWrapping?(D(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Ye(e)),on(e),Xn(e),Hr(e),setTimeout(function(){return zn(e)},100)}function ka(e,t){var r=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?P(t):{},P(va,t,!1),ui(t);var n=t.value;"string"==typeof n?n=new So(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new ka.inputStyles[t.inputStyle](this),o=this.display=new le(e,n,i);for(var a in ci(o.wrapper.CodeMirror=this),ma(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new I,keySeq:null,specialChars:null},t.autofocus&&!f&&o.input.focus(),x&&k<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(i){var o=i.display;tt(o.scroller,"mousedown",Gn(i,ua)),tt(o.scroller,"dblclick",x&&k<11?Gn(i,function(e){if(!ot(i,e)){var t=an(i,e);if(t&&!ha(i,e)&&!wr(i.display,e)){ct(e);var r=i.findWordAt(t);Bi(i.doc,r.anchor,r.head)}}}):function(e){return ot(i,e)||ct(e)});C||tt(o.scroller,"contextmenu",function(e){return pa(i,e)});var r,n={end:0};function a(){o.activeTouch&&(r=setTimeout(function(){return o.activeTouch=null},1e3),(n=o.activeTouch).end=+new Date)}function l(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return 400<r*r+n*n}tt(o.scroller,"touchstart",function(e){if(!ot(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!ha(i,e)){o.input.ensurePolled(),clearTimeout(r);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-n.end<=300?n:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),tt(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),tt(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!wr(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var r,n=i.coordsChar(o.activeTouch,"page");r=!t.prev||l(t,t.prev)?new vi(n,n):!t.prev.prev||l(t,t.prev.prev)?i.findWordAt(n):new vi(ge(n.line,0),Ce(i.doc,ge(n.line+1,0))),i.setSelection(r.anchor,r.head),i.focus(),ct(e)}a()}),tt(o.scroller,"touchcancel",a),tt(o.scroller,"scroll",function(){o.scroller.clientHeight&&(On(i,o.scroller.scrollTop),_n(i,o.scroller.scrollLeft,!0),it(i,"scroll",i))}),tt(o.scroller,"mousewheel",function(e){return mi(i,e)}),tt(o.scroller,"DOMMouseScroll",function(e){return mi(i,e)}),tt(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){ot(i,e)||ft(e)},over:function(e){ot(i,e)||(!function(e,t){var r=an(e,t);if(r){var n=document.createDocumentFragment();un(e,r,n),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,n)}}(i,e),ft(e))},start:function(e){return function(e,t){if(x&&(!e.state.draggingText||+new Date-Lo<100))ft(t);else if(!ot(e,t)&&!wr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!s)){var r=N("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),g&&r.parentNode.removeChild(r)}}(i,e)},drop:Gn(i,Mo),leave:function(e){ot(i,e)||Ao(i)}};var e=o.input.getField();tt(e,"keyup",function(e){return oa.call(i,e)}),tt(e,"keydown",Gn(i,ia)),tt(e,"keypress",Gn(i,aa)),tt(e,"focus",function(e){return gn(i,e)}),tt(e,"blur",function(e){return vn(i,e)})}(this),_o(),Rn(this),this.curOp.forceUpdate=!0,Oi(this,n),t.autofocus&&!f||this.hasFocus()?setTimeout(W(gn,this),20):vn(this),ya)ya.hasOwnProperty(a)&&ya[a](r,t[a],ga);kn(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Ca.length;++l)Ca[l](r);jn(this),b&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}ka.defaults=va,ka.optionHandlers=ya;var Ca=[];function Ta(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=It(e,t).state:r="prev");var a=e.options.tabSize,l=se(o,t),s=H(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))==B||150<c)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?H(se(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 d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+="\t";if(f<c&&(d+=$(c-f)),d!=u)return so(o,d,ge(t,0),ge(t,u.length),"+input"),!(l.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=ge(t,u.length);Ui(o,p,new vi(g,g));break}}}ka.defineInitHook=function(e){return Ca.push(e)};var Sa=null;function La(e){Sa=e}function Ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a,l=e.state.pasteIncoming||"paste"==i,s=xt(t),c=null;if(l&&1<n.ranges.length)if(Sa&&Sa.text.join("\n")==t){if(n.ranges.length%Sa.text.length==0){c=[];for(var u=0;u<Sa.text.length;u++)c.push(o.splitLines(Sa.text[u]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(s,function(e){return[e]}));for(var d=n.ranges.length-1;0<=d;d--){var f=n.ranges[d],h=f.from(),p=f.to();f.empty()&&(r&&0<r?h=ge(h.line,h.ch-r):e.state.overwrite&&!l?p=ge(p.line,Math.min(se(o,p.line).text.length,p.ch+Y(s).length)):Sa&&Sa.lineWise&&Sa.text.join("\n")==t&&(h=p=ge(h.line,0))),a=e.curOp.updateInput;var m={from:h,to:p,text:c?c[d%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};no(e.doc,m),lr(e,"inputRead",e,m)}t&&!l&&Oa(e,t),Sn(e),e.curOp.updateInput=a,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Aa(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Vn(t,function(){return Ma(t,r,0,null,"paste")}),!0}function Oa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;0<=n;n--){var i=r.ranges[n];if(!(100<i.head.ch||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(-1<t.indexOf(o.electricChars.charAt(l))){a=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&lr(e,"electricInput",e,i.head.line)}}}function Na(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:ge(i,0),head:ge(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function _a(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Ea(){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 b?e.style.width="1000px":e.setAttribute("wrap","off"),u&&(e.style.border="1px solid black"),_a(e),t}function Da(n,i,o,e,a){var t=i,r=o,l=se(n,i.line);function s(e){var t,r;if(null==(t=a?function(t,r,l,e){var s=Qe(r,t.doc.direction);if(!s)return Go(r,l,e);l.ch>=r.text.length?(l.ch=r.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var n=Ze(s,l.ch,l.sticky),i=s[n];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>l.ch:i.from<l.ch))return Go(r,l,e);var o,c=function(e,t){return Vo(r,e instanceof ge?e.ch:e,t)},a=function(e){return t.options.lineWrapping?(o=o||Nr(t,r),Xr(t,r,o,e)):{begin:0,end:r.text.length}},u=a("before"==l.sticky?c(l,-1):l.ch);if("rtl"==t.doc.direction||1==i.level){var d=1==i.level==e<0,f=c(l,d?1:-1);if(null!=f&&(d?f<=i.to&&f<=u.end:f>=i.from&&f>=u.begin)){var h=d?"before":"after";return new ge(l.line,f,h)}}var p=function(e,t,r){for(var n=function(e,t){return t?new ge(l.line,c(e,1),"before"):new ge(l.line,e,"after")};0<=e&&e<s.length;e+=t){var i=s[e],o=0<t==(1!=i.level),a=o?r.begin:c(r.end,-1);if(i.from<=a&&a<i.to)return n(a,o);if(a=o?i.from:c(i.to,-1),r.begin<=a&&a<r.end)return n(a,o)}},m=p(n+e,e,u);if(m)return m;var g=0<e?u.end:c(u.begin,-1);return null==g||0<e&&g==r.text.length||!(m=p(0<e?0:s.length-1,e,a(g)))?null:m}(n.cm,l,i,o):Go(l,i,o))){if(e||(r=i.line+o)<n.first||r>=n.first+n.size||(i=new ge(r,i.ch,i.sticky),!(l=se(n,r))))return!1;i=$o(a,n.cm,l,i.line,o)}else i=t;return!0}if("char"==e)s();else if("column"==e)s(!0);else if("word"==e||"group"==e)for(var c=null,u="group"==e,d=n.cm&&n.cm.getHelper(i,"wordChars"),f=!0;!(o<0)||s(!f);f=!1){var h=l.text.charAt(i.ch)||"\n",p=te(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||f||p||(p="s"),c&&c!=p){o<0&&(o=1,s(),i.sticky="after");break}if(p&&(c=p),0<o&&!s(!f))break}var m=Qi(n,i,t,r,!0);return ye(t,m)&&(m.hitSide=!0),m}function Fa(e,t,r,n){var i,o,a=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*Qr(e.display),3);i=(0<r?t.bottom:t.top)+r*c}else"line"==n&&(i=0<r?t.bottom+3:t.top-3);for(;(o=$r(e,l,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var za=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Wa(e,t){var r=Or(e,t.line);if(!r||r.hidden)return null;var n=se(e.doc,t.line),i=Mr(r,n,t.line),o=Qe(n,e.doc.direction),a="left";o&&(a=Ze(o,t.ch)%2?"right":"left");var l=Fr(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Pa(e,t){return t&&(e.bad=!0),e}function Ha(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Pa(e.clipPos(ge(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 Ia(o,t,r)}}function Ia(c,e,t){var r=c.text.firstChild,n=!1;if(!e||!_(r,e))return Pa(ge(fe(c.line),0),!0);if(e==r&&(n=!0,e=r.childNodes[t],t=0,!e)){var i=c.rest?Y(c.rest):c.line;return Pa(ge(fe(i),i.text.length),n)}var o=3==e.nodeType?e:null,a=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t&&(t=o.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var u=c.measure,d=u.maps;function l(e,t,r){for(var n=-1;n<(d?d.length:0);n++)for(var i=n<0?u.map:d[n],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var l=fe(n<0?c.line:c.rest[n]),s=i[o]+r;return(r<0||a!=e)&&(s=i[o+(r?1:0)]),ge(l,s)}}}var s=l(o,a,t);if(s)return Pa(s,n);for(var f=a.nextSibling,h=o?o.nodeValue.length-t:0;f;f=f.nextSibling){if(s=l(f,f.firstChild,0))return Pa(ge(s.line,s.ch-h),n);h+=f.textContent.length}for(var p=a.previousSibling,m=t;p;p=p.previousSibling){if(s=l(p,p.firstChild,-1))return Pa(ge(s.line,s.ch+m),n);m+=p.textContent.length}}za.prototype.init=function(e){var t=this,a=this,l=a.cm,s=a.div=e.lineDiv;function r(e){if(!ot(l,e)){if(l.somethingSelected())La({lineWise:!1,text:l.getSelections()}),"cut"==e.type&&l.replaceSelection("",null,"cut");else{if(!l.options.lineWiseCopyCut)return;var t=Na(l);La({lineWise:!0,text:t.text}),"cut"==e.type&&l.operation(function(){l.setSelections(t.ranges,0,q),l.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Sa.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var n=Ea(),i=n.firstChild;l.display.lineSpace.insertBefore(n,l.display.lineSpace.firstChild),i.value=Sa.text.join("\n");var o=document.activeElement;z(i),setTimeout(function(){l.display.lineSpace.removeChild(n),o.focus(),o==s&&a.showPrimarySelection()},50)}}_a(s,l.options.spellcheck),tt(s,"paste",function(e){ot(l,e)||Aa(e,l)||k<=11&&setTimeout(Gn(l,function(){return t.updateFromDOM()}),20)}),tt(s,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),tt(s,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),tt(s,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),tt(s,"touchstart",function(){return a.forceCompositionEnd()}),tt(s,"input",function(){t.composing||t.readFromDOMSoon()}),tt(s,"copy",r),tt(s,"cut",r)},za.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},za.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},za.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},za.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Ha(t,e.anchorNode,e.anchorOffset),a=Ha(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=ve(xe(o,a),n)||0!=ve(we(o,a),i)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Wa(t,n)||{node:l[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Wa(t,i);if(!c){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=S(s.node,s.offset,c.offset,c.node)}catch(e){}f&&(!m&&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):m&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},za.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)},za.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},za.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},za.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return _(this.div,t)},za.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},za.prototype.blur=function(){this.div.blur()},za.prototype.getField=function(){return this.div},za.prototype.supportsTouch=function(){return!0},za.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Vn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},za.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},za.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(d&&a&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Ha(t,e.anchorNode,e.anchorOffset),n=Ha(t,e.focusNode,e.focusOffset);r&&n&&Vn(t,function(){Gi(t.doc,bi(r,n),q),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},za.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=ge(a.line-1,se(n.doc,a.line-1).length)),l.ch==se(n.doc,l.line).text.length&&l.line<n.lastLine()&&(l=ge(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ln(n,a.line))?(t=fe(i.view[0].line),r=i.view[0].node):(t=fe(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,c,u=ln(n,l.line);if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=fe(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!r)return!1;for(var d=n.doc.splitLines(function(s,e,t,c,u){var r="",d=!1,f=s.doc.lineSeparator(),h=!1;function p(){d&&(r+=f,h&&(r+=f),d=h=!1)}function m(e){e&&(p(),r+=e)}function g(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void m(t);var r,n=e.getAttribute("cm-marker");if(n){var i=s.findMarks(ge(c,0),ge(u+1,0),(l=+n,function(e){return e.id==l}));return void(i.length&&(r=i[0].find(0))&&m(ce(s.doc,r.from,r.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&p();for(var a=0;a<e.childNodes.length;a++)g(e.childNodes[a]);/^(pre|p)$/i.test(e.nodeName)&&(h=!0),o&&(d=!0)}else 3==e.nodeType&&m(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var l}for(;g(e),e!=t;)e=e.nextSibling,h=!1;return r}(n,r,c,t,s)),f=ce(n.doc,ge(t,0),ge(s,se(n.doc,s).text.length));1<d.length&&1<f.length;)if(Y(d)==Y(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var y=Y(d),b=Y(f),w=Math.min(y.length-(1==d.length?h:0),b.length-(1==f.length?h:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==d.length&&1==f.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var x=ge(t,h),k=ge(s,f.length?Y(f).length-p:0);return 1<d.length||d[0]||ve(x,k)?(so(n.doc,d,x,k,"+input"),!0):void 0},za.prototype.ensurePolled=function(){this.forceCompositionEnd()},za.prototype.reset=function(){this.forceCompositionEnd()},za.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},za.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))},za.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Vn(this.cm,function(){return Xn(e.cm)})},za.prototype.setUneditable=function(e){e.contentEditable="false"},za.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Gn(this.cm,Ma)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},za.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},za.prototype.onContextMenu=function(){},za.prototype.resetPosition=function(){},za.prototype.needsContentAttribute=!0;var Ra,ja,Ba,qa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(t){var e=this,r=this,n=this.cm;this.createField(t);var i=this.textarea;function o(e){if(!ot(n,e)){if(n.somethingSelected())La({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Na(n);La({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,q):(r.prevInput="",i.value=t.text.join("\n"),z(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),u&&(i.style.width="0px"),tt(i,"input",function(){x&&9<=k&&e.hasSelection&&(e.hasSelection=null),r.poll()}),tt(i,"paste",function(e){ot(n,e)||Aa(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),tt(i,"cut",o),tt(i,"copy",o),tt(t.scroller,"paste",function(e){wr(t,e)||ot(n,e)||(n.state.pasteIncoming=!0,r.focus())}),tt(t.lineSpace,"selectstart",function(e){wr(t,e)||ct(e)}),tt(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),tt(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},qa.prototype.createField=function(e){this.wrapper=Ea(),this.textarea=this.wrapper.firstChild},qa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Kr(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},qa.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&z(this.textarea),x&&9<=k&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",x&&9<=k&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!f||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},qa.prototype.fastPoll=function(){var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))})},qa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||kt(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(x&&9<=k&&this.hasSelection===i||w&&/[\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 Vn(t,function(){Ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?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},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){x&&9<=k&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(e){var r=this,n=r.cm,i=n.display,o=r.textarea,t=an(n,e),a=i.scroller.scrollTop;if(t&&!g){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(t)&&Gn(n,Gi)(n.doc,bi(t),q);var l=o.style.cssText,s=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var c,u=r.wrapper.getBoundingClientRect();if(o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-u.top-5)+"px; left: "+(e.clientX-u.left-5)+"px;\n z-index: 1000; background: "+(x?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",b&&(c=window.scrollY),i.input.focus(),b&&window.scrollTo(null,c),i.input.reset(),n.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=!0,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),x&&9<=k&&f(),C){ft(e);var d=function(){nt(window,"mouseup",d),setTimeout(h,20)};tt(window,"mouseup",d)}else setTimeout(h,50)}function f(){if(null!=o.selectionStart){var e=n.somethingSelected(),t=""+(e?o.value:"");o.value="⇚",o.value=t,r.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=n.doc.sel}}function h(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=s,o.style.cssText=l,x&&k<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart){(!x||x&&k<9)&&f();var e=0,t=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&""==r.prevInput?Gn(n,to)(n):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},qa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(i){var o=i.optionHandlers;function e(e,t,n,r){i.defaults[e]=t,n&&(o[e]=r?function(e,t,r){r!=ga&&n(e,t,r)}:n)}i.defineOption=e,i.Init=ga,e("value","",function(e,t){return e.setValue(t)},!0),e("mode",null,function(e,t){e.doc.modeOption=t,Ti(e)},!0),e("indentUnit",2,Ti,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(e){Si(e),Hr(e),Xn(e)},!0),e("lineSeparator",null,function(e,n){if(e.doc.lineSep=n){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var r=e.text.indexOf(n,t);if(-1==r)break;t=r+n.length,i.push(ge(o,r))}o++});for(var t=i.length-1;0<=t;t--)so(e.doc,n,i[t],ge(i[t].line,i[t].ch+n.length))}}),e("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!=ga&&e.refresh()}),e("specialCharPlaceholder",Jt,function(e){return e.refresh()},!0),e("electricChars",!0),e("inputStyle",f?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),e("rtlMoveVisually",!p),e("wholeLineUpdateBefore",!0),e("theme","default",function(e){ma(e),ba(e)},!0),e("keyMap","default",function(e,t,r){var n=Uo(t),i=r!=ga&&Uo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,xa,!0),e("gutters",[],function(e){ui(e.options),ba(e)},!0),e("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?rn(e.display)+"px":"0",e.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(e){return zn(e)},!0),e("scrollbarStyle","native",function(e){Hn(e),zn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),e("lineNumbers",!1,function(e){ui(e.options),ba(e)},!0),e("firstLineNumber",1,ba,!0),e("lineNumberFormatter",function(e){return e},ba,!0),e("showCursorWhenSelecting",!1,sn,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(e,t){"nocursor"==t&&(vn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),e("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),e("dragDrop",!0,wa),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,sn,!0),e("singleCursorHeightPerLine",!0,sn,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Si,!0),e("addModeClass",!1,Si,!0),e("pollInterval",100),e("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),e("historyEventDelay",1250),e("viewportMargin",10,function(e){return e.refresh()},!0),e("maxHighlightLength",1e4,Si,!0),e("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),e("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),e("autofocus",null),e("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(ka),ja=(Ra=ka).optionHandlers,Ba=Ra.helpers={},Ra.prototype={constructor:Ra,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];r[e]==t&&"mode"!=e||(r[e]=t,ja.hasOwnProperty(e)&&Gn(this,ja[e])(this,t,n),it(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"](Uo(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:$n(function(e,t){var r=e.token?e:Ra.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:r,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,Xn(this)}),removeOverlay:$n(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Xn(this)}}),indentLine:$n(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&Ta(this,e,t,r)}),indentSelection:$n(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Ta(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Sn(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Ta(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&0<c[n].from().ch&&Ui(this.doc,n,new vi(o,c[n].to()),q)}}}),getTokenAt:function(e,t){return Ut(this,e,t)},getLineTokens:function(e,t){return Ut(this,ge(e),t,!0)},getTokenTypeAt:function(e){e=Ce(this.doc,e);var t,r=Ht(this,se(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(e){var t=this.doc.mode;return t.innerMode?Ra.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Ba.hasOwnProperty(t))return r;var n=Ba[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=n[i[t][o]];a&&r.push(a)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var l=0;l<n._global.length;l++){var s=n._global[l];s.pred(i,this)&&-1==R(r,s.val)&&r.push(s.val)}return r},getStateAfter:function(e,t){var r=this.doc;return It(this,(e=ke(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Kr(this,null==e?r.head:"object"==typeof e?Ce(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Ur(this,Ce(this.doc,e),t||"page")},coordsChar:function(e,t){return $r(this,(e=qr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=qr(this,{top:e,left:0},t||"page").top,he(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:o<e&&(e=o,i=!0),n=se(this.doc,e)}else n=e;return Br(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Ge(n):0)},defaultTextHeight:function(){return Qr(this.display)},defaultCharWidth:function(){return en(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,a,l,s=this.display,c=(e=Kr(this,Ce(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==n)c=e.top;else if("above"==n||"near"==n){var d=Math.max(s.wrapper.clientHeight,this.doc.height),f=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(l=Cn(o,a)).scrollTop&&On(o,l.scrollTop),null!=l.scrollLeft&&_n(o,l.scrollLeft))},triggerOnKeyDown:$n(ia),triggerOnKeyPress:$n(aa),triggerOnKeyUp:oa,triggerOnMouseDown:$n(ua),execCommand:function(e){if(Yo.hasOwnProperty(e))return Yo[e].call(null,this)},triggerElectric:$n(function(e){Oa(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Ce(this.doc,e),a=0;a<t&&!(o=Da(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:$n(function(t,r){var n=this;this.extendSelectionsBy(function(e){return n.display.shift||n.doc.extend||e.empty()?Da(n.doc,e.head,t,r,n.options.rtlMoveVisually):t<0?e.from():e.to()},K)}),deleteH:$n(function(r,n){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):Ko(this,function(e){var t=Da(i,e.head,r,n,!1);return r<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=Ce(this.doc,e),l=0;l<t;++l){var s=Kr(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Fa(this,s,i,r)).hitSide)break}return a},moveV:$n(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(s)return n<0?e.from():e.to();var t=Kr(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),l.push(t.left);var r=Fa(o,t,n,i);return"page"==i&&e==a.sel.primary()&&Tn(o,Ur(o,r,"div").top-t.top),r},K),l.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=l[e]}),findWordAt:function(e){var t=se(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<r&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new vi(ge(e.line,r),ge(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?D(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),it(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==E()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:$n(function(e,t){Ln(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Tr(this)-this.display.barHeight,width:e.scrollWidth-Tr(this)-this.display.barWidth,clientHeight:Lr(this),clientWidth:Sr(this)}},scrollIntoView:$n(function(e,t){var r,n;null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ge(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?(n=e,Mn(r=this),r.curOp.scrollToPos=n):An(this,e.from,e.to,e.margin)}),setSize:$n(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&&Pr(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){Zn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,it(this,"refresh",this)}),operation:function(e){return Vn(this,e)},startOperation:function(){return Rn(this)},endOperation:function(){return jn(this)},refresh:$n(function(){var e=this.display.cachedTextHeight;Xn(this),this.curOp.forceUpdate=!0,Hr(this),Ln(this,this.doc.scrollLeft,this.doc.scrollTop),li(this),(null==e||.5<Math.abs(e-Qr(this.display)))&&on(this),it(this,"refresh",this)}),swapDoc:$n(function(e){var t=this.doc;return t.cm=null,Oi(this,e),Hr(this),this.display.input.reset(),Ln(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,lr(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}},st(Ra),Ra.registerHelper=function(e,t,r){Ba.hasOwnProperty(e)||(Ba[e]=Ra[e]={_global:[]}),Ba[e][t]=r},Ra.registerGlobalHelper=function(e,t,r,n){Ra.registerHelper(e,t,n),Ba[e]._global.push({pred:r,val:n})};var Ua,Ka="iter insert remove copy getEditor constructor".split(" ");for(var Va in So.prototype)So.prototype.hasOwnProperty(Va)&&R(Ka,Va)<0&&(ka.prototype[Va]=function(e){return function(){return e.apply(this.doc,arguments)}}(So.prototype[Va]));return st(So),ka.inputStyles={textarea:qa,contenteditable:za},ka.defineMode=function(e){ka.defaults.mode||"null"==e||(ka.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),St[e]=t}.apply(this,arguments)},ka.defineMIME=function(e,t){Lt[e]=t},ka.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ka.defineMIME("text/plain","null"),ka.defineExtension=function(e,t){ka.prototype[e]=t},ka.defineDocExtension=function(e,t){So.prototype[e]=t},ka.fromTextArea=function(t,e){if((e=e?P(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=E();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function n(){t.value=l.getValue()}var i;if(t.form&&(tt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}e.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(nt(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var l=ka(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return l},(Ua=ka).off=nt,Ua.on=tt,Ua.wheelEventPixels=pi,Ua.Doc=So,Ua.splitLines=xt,Ua.countColumn=H,Ua.findColumn=V,Ua.isWordChar=ee,Ua.Pass=B,Ua.signal=it,Ua.Line=Gt,Ua.changeEnd=wi,Ua.scrollbarModel=Pn,Ua.Pos=ge,Ua.cmpPos=ve,Ua.modes=St,Ua.mimeModes=Lt,Ua.resolveMode=Mt,Ua.getMode=At,Ua.modeExtensions=Ot,Ua.extendMode=Nt,Ua.copyState=_t,Ua.startState=Dt,Ua.innerMode=Et,Ua.commands=Yo,Ua.keyMap=Po,Ua.keyName=qo,Ua.isModifierKey=jo,Ua.lookupKey=Ro,Ua.normalizeKeyMap=Io,Ua.StringStream=Ft,Ua.SharedTextMarker=xo,Ua.TextMarker=bo,Ua.LineWidget=go,Ua.e_preventDefault=ct,Ua.e_stopPropagation=ut,Ua.e_stop=ft,Ua.addClass=D,Ua.contains=_,Ua.rmClass=L,Ua.keyNames=Do,ka.version="5.39.2",ka},"object"==typeof r&&void 0!==t?t.exports=i():"function"==typeof o&&o.amd?o(i):n.CodeMirror=i()},{}],18:[function(e,t,r){var n;n=function(N){"use strict";function e(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}N.defineMode("css",function(e,t){var r=t.inline;t.propertyKeywords||(t=N.resolveMode("text/css"));var n,i,o=e.indentUnit,a=t.tokenHooks,l=t.documentTypes||{},s=t.mediaTypes||{},c=t.mediaFeatures||{},u=t.mediaValueKeywords||{},d=t.propertyKeywords||{},f=t.nonStandardPropertyKeywords||{},h=t.fontProperties||{},p=t.counterDescriptors||{},m=t.colorKeywords||{},g=t.valueKeywords||{},v=t.allowNested,y=t.lineComment,b=!0===t.supportsAtComponent;function w(e,t){return n=t,e}function x(i){return function(e,t){for(var r,n=!1;null!=(r=e.next());){if(r==i&&!n){")"==i&&e.backUp(1);break}n=!n&&"\\"==r}return(r==i||!n&&")"!=i)&&(t.tokenize=null),w("string","string")}}function k(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=x(")"),w(null,"(")}function C(e,t,r){this.type=e,this.indent=t,this.prev=r}function T(e,t,r,n){return e.context=new C(r,t.indentation()+(!1===n?0:o),e.context),r}function S(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function L(e,t,r){return O[r.context.type](e,t,r)}function M(e,t,r,n){for(var i=n||1;0<i;i--)r.context=r.context.prev;return L(e,t,r)}function A(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,r){if("{"==e)return T(r,t,"block");if("}"==e&&r.context.prev)return S(r);if(b&&/@component/i.test(e))return T(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return T(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return T(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return T(r,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return T(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return d.hasOwnProperty(n)?(i="property","maybeprop"):f.hasOwnProperty(n)?(i="string-2","maybeprop"):v?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(i="error","block")},maybeprop:function(e,t,r){return":"==e?T(r,t,"prop"):L(e,t,r)},prop:function(e,t,r){if(";"==e)return S(r);if("{"==e&&v)return T(r,t,"propBlock");if("}"==e||"{"==e)return M(e,t,r);if("("==e)return T(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)A(t);else if("interpolation"==e)return T(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?S(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?M(e,t,r):")"==e?S(r):"("==e?T(r,t,"parens"):"interpolation"==e?T(r,t,"interpolation"):("word"==e&&A(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):L(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&l.hasOwnProperty(t.current())?(i="tag",r.context.type):O.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return T(r,t,"atBlock_parens");if("}"==e||";"==e)return M(e,t,r);if("{"==e)return S(r)&&T(r,t,v?"block":"top");if("interpolation"==e)return T(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();i="only"==n||"not"==n||"and"==n||"or"==n?"keyword":s.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":u.hasOwnProperty(n)?"keyword":d.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?"string-2":g.hasOwnProperty(n)?"atom":m.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?M(e,t,r):"{"==e?S(r)&&T(r,t,v?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?S(r):"{"==e||"}"==e?M(e,t,r,2):O.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?T(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):L(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,S(r)):"word"==e?(i="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?T(r,t,"top"):L(e,t,r)},at:function(e,t,r){return";"==e?S(r):"{"==e||"}"==e?M(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?S(r):"{"==e||";"==e?M(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new C(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(a[r]){var n=a[r](e,t);if(!1!==n)return n}return"@"==r?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?w(null,"compare"):'"'==r||"'"==r?(t.tokenize=x(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==r?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?w(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?w(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=k,w("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(n=r[1],r=r[0]),i=r,"comment"!=n&&(t.state=O[t.state](n,e,t)),i},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-o)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],r=e(t),n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(n),o=["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"],a=e(o),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],s=e(l),c=["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"],u=e(c),d=["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"],f=e(d),h=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),p=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["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"],g=e(m),v=["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"],y=e(v),b=t.concat(n).concat(o).concat(l).concat(c).concat(d).concat(m).concat(v);function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}N.registerHelper("hintWords","css",b),N.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w)(e,t)}},name:"css"}),N.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w)(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"}),N.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:s,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w)(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/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),N.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:a,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w)(e,t)}},name:"css",helperType:"gss"})},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":17}],19:[function(e,t,r){var n;n=function(p){"use strict";var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var o={};function m(e,t){var r,n=e.match(o[r=t]||(o[r]=new RegExp("\\s+"+r+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function g(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;0<=o;o--)n.unshift(i[o])}p.defineMode("htmlmixed",function(u,e){var d=p.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag}),f={},t=e&&e.tags,r=e&&e.scriptTypes;if(a(i,f),t&&a(t,f),r)for(var n=r.length-1;0<=n;n--)f.script.unshift(["type",r[n].matches,r[n].mode]);function h(e,t){var r,n=d.token(e,t.htmlState),i=/\btag\b/.test(n);if(i&&!/[<>\s\/]/.test(e.current())&&(r=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&f.hasOwnProperty(r))t.inTag=r+" ";else if(t.inTag&&i&&/>$/.test(e.current())){var o=/^([\S]+) (.*)/.exec(t.inTag);t.inTag=null;var a=">"==e.current()&&function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n[0]||n[1].test(m(t,n[0])))return n[2]}}(f[o[1]],o[2]),l=p.getMode(u,a),s=g(o[1],!0),c=g(o[1],!1);t.token=function(e,t){return e.match(s,!1)?(t.token=h,t.localState=t.localMode=null,null):(r=e,n=c,i=t.localMode.token(e,t.localState),o=r.current(),-1<(a=o.search(n))?r.backUp(o.length-a):o.match(/<\/?$/)&&(r.backUp(o.length),r.match(n,!1)||r.match(o)),i);var r,n,i,o,a},t.localMode=l,t.localState=p.startState(l,d.indent(t.htmlState,""))}else t.inTag&&(t.inTag+=e.current(),e.eol()&&(t.inTag+=" "));return n}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:p.startState(d)}},copyState:function(e){var t;return e.localState&&(t=p.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:t,htmlState:p.copyState(d,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t,r){return!e.localMode||/^\s*<\//.test(t)?d.indent(e.htmlState,t):e.localMode.indent?e.localMode.indent(e.localState,t,r):p.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||d}}}},"xml","javascript","css"),p.defineMIME("text/html","htmlmixed")},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof o&&o.amd?o(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],n):n(CodeMirror)},{"../../lib/codemirror":17,"../css/css":18,"../javascript/javascript":20,"../xml/xml":21}],20:[function(e,t,r){var n;n=function(Ve){"use strict";Ve.defineMode("javascript",function(e,d){var n,i,f=e.indentUnit,h=d.statementIndent,a=d.jsonld,l=d.json||a,c=d.typescript,u=d.wordCharacters||/[\w$\xa1-\uffff]/,s=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e,t,r){return n=e,i=r,t}function v(e,t){var i,r=e.next();if('"'==r||"'"==r)return t.tokenize=(i=r,function(e,t){var r,n=!1;if(a&&"@"==e.peek()&&e.match(m))return t.tokenize=v,g("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=i||n);)n=!n&&"\\"==r;return n||(t.tokenize=v),g("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return g("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=y)(e,t):e.eat("/")?(e.skipToEnd(),g("comment","comment")):Ke(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return(t.tokenize=b)(e,t);if("#"==r)return e.skipToEnd(),g("error","error");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),g("operator","operator",e.current());if(u.test(r)){e.eatWhile(u);var n=e.current();if("."!=t.lastType){if(s.propertyIsEnumerable(n)){var o=s[n];return g(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",n)}return g("variable","variable",n)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return g("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return g("quasi","string-2",e.current())}var w="([{}])";function o(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){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;0<=a;--a){var l=e.string.charAt(a),s=w.indexOf(l);if(0<=s&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(3<=s&&s<6)++i;else if(u.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function k(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function C(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var T={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;0<=e;e--)T.cc.push(arguments[e])}function L(){return S.apply(null,arguments),!0}function M(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function r(e){var t=T.state;if(T.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,r){{if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new O(n,r.vars,!0):null}return M(t,r.vars)?r:new O(r.prev,new N(t,r.vars),!1)}return null}}(e,t.context);if(null!=r)return void(t.context=r)}else if(!M(e,t.localVars))return void(t.localVars=new N(e,t.localVars));d.globalVars&&!M(e,t.globalVars)&&(t.globalVars=new N(e,t.globalVars))}function A(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function O(e,t,r){this.prev=e,this.vars=t,this.block=r}function N(e,t){this.name=e,this.next=t}var t=new N("this",new N("arguments",null));function _(){T.state.context=new O(T.state.context,T.state.localVars,!1),T.state.localVars=t}function E(){T.state.context=new O(T.state.context,T.state.localVars,!0),T.state.localVars=null}function D(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function F(n,i){var e=function(){var e=T.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var r=e.lexical;r&&")"==r.type&&r.align;r=r.prev)t=r.indented;e.lexical=new k(t,T.stream.column(),n,null,e.lexical,i)};return e.lex=!0,e}function z(){var e=T.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function W(r){return function e(t){return t==r?L():";"==r||"}"==t||")"==t||"]"==t?S():L(e)}}function P(e,t){return"var"==e?L(F("vardef",t),ve,W(";"),z):"keyword a"==e?L(F("form"),j,P,z):"keyword b"==e?L(F("form"),P,z):"keyword d"==e?T.stream.match(/^\s*$/,!1)?L():L(F("stat"),q,W(";"),z):"debugger"==e?L(W(";")):"{"==e?L(F("}"),E,oe,z,D):";"==e?L():"if"==e?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==z&&T.state.cc.pop()(),L(F("form"),j,P,z,ke)):"function"==e?L(Ae):"for"==e?L(F("form"),Ce,P,z):"class"==e||c&&"interface"==t?(T.marked="keyword",L(F("form"),_e,z)):"variable"==e?c&&"declare"==t?(T.marked="keyword",L(P)):c&&("module"==t||"enum"==t||"type"==t)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==t?L(qe):"type"==t?L(ce,W("operator"),ce,W(";")):L(F("form"),ye,W("{"),F("}"),oe,z,z)):c&&"namespace"==t?(T.marked="keyword",L(F("form"),I,oe,z)):c&&"abstract"==t?(T.marked="keyword",L(P)):L(F("stat"),J):"switch"==e?L(F("form"),j,W("{"),F("}","switch"),E,oe,z,z,D):"case"==e?L(I,W(":")):"default"==e?L(W(":")):"catch"==e?L(F("form"),_,H,P,z,D):"export"==e?L(F("stat"),ze,z):"import"==e?L(F("stat"),Pe,z):"async"==e?L(P):"@"==t?L(I,P):S(F("stat"),I,W(";"),z)}function H(e){if("("==e)return L(Oe,W(")"))}function I(e,t){return B(e,t,!1)}function R(e,t){return B(e,t,!0)}function j(e){return"("!=e?S():L(F(")"),I,W(")"),z)}function B(e,t,r){if(T.state.fatArrowAt==T.stream.start){var n=r?Y:$;if("("==e)return L(_,F(")"),ne(Oe,")"),z,W("=>"),n,D);if("variable"==e)return S(_,ye,W("=>"),n,D)}var i,o=r?K:U;return x.hasOwnProperty(e)?L(o):"function"==e?L(Ae,o):"class"==e||c&&"interface"==t?(T.marked="keyword",L(F("form"),Ne,z)):"keyword c"==e||"async"==e?L(r?R:I):"("==e?L(F(")"),q,W(")"),z,o):"operator"==e||"spread"==e?L(r?R:I):"["==e?L(F("]"),Be,z,o):"{"==e?ie(ee,"}",null,o):"quasi"==e?S(V,o):"new"==e?L((i=r,function(e){return"."==e?L(i?Z:X):"variable"==e&&c?L(pe,i?K:U):S(i?R:I)})):"import"==e?L(I):L()}function q(e){return e.match(/[;\}\)\],]/)?S():S(I)}function U(e,t){return","==e?L(I):K(e,t,!1)}function K(e,t,r){var n=0==r?U:K,i=0==r?I:R;return"=>"==e?L(_,r?Y:$,D):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?L(n):c&&"<"==t&&T.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?L(F(">"),ne(ce,">"),z,n):"?"==t?L(I,W(":"),i):L(i):"quasi"==e?S(V,n):";"!=e?"("==e?ie(R,")","call",n):"."==e?L(Q,n):"["==e?L(F("]"),q,W("]"),z,n):c&&"as"==t?(T.marked="keyword",L(ce,n)):"regexp"==e?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),L(i)):void 0:void 0}function V(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?L(V):L(I,G)}function G(e){if("}"==e)return T.marked="string-2",T.state.tokenize=b,L(V)}function $(e){return o(T.stream,T.state),S("{"==e?P:I)}function Y(e){return o(T.stream,T.state),S("{"==e?P:R)}function X(e,t){if("target"==t)return T.marked="keyword",L(U)}function Z(e,t){if("target"==t)return T.marked="keyword",L(K)}function J(e){return":"==e?L(z,P):S(U,W(";"),z)}function Q(e){if("variable"==e)return T.marked="property",L()}function ee(e,t){if("async"==e)return T.marked="property",L(ee);if("variable"==e||"keyword"==T.style){return T.marked="property","get"==t||"set"==t?L(te):(c&&T.state.fatArrowAt==T.stream.start&&(r=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+r[0].length),L(re));var r}else{if("number"==e||"string"==e)return T.marked=a?"property":T.style+" property",L(re);if("jsonld-keyword"==e)return L(re);if(c&&A(t))return T.marked="keyword",L(ee);if("["==e)return L(I,ae,W("]"),re);if("spread"==e)return L(R,re);if("*"==t)return T.marked="keyword",L(ee);if(":"==e)return S(re)}}function te(e){return"variable"!=e?S(re):(T.marked="property",L(Ae))}function re(e){return":"==e?L(R):"("==e?S(Ae):void 0}function ne(n,i,o){function a(e,t){if(o?-1<o.indexOf(e):","==e){var r=T.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),L(function(e,t){return e==i||t==i?S():S(n)},a)}return e==i||t==i?L():L(W(i))}return function(e,t){return e==i||t==i?L():S(n,a)}}function ie(e,t,r){for(var n=3;n<arguments.length;n++)T.cc.push(arguments[n]);return L(F(t,r),ne(e,t),z)}function oe(e){return"}"==e?L():S(P,oe)}function ae(e,t){if(c){if(":"==e)return L(ce);if("?"==t)return L(ae)}}function le(e){if(c&&":"==e)return T.stream.match(/^\s*\w+\s+is\b/,!1)?L(I,se,ce):L(ce)}function se(e,t){if("is"==t)return T.marked="keyword",L()}function ce(e,t){return"keyof"==t||"typeof"==t?(T.marked="keyword",L("keyof"==t?ce:R)):"variable"==e||"void"==t?(T.marked="type",L(he)):"string"==e||"number"==e||"atom"==e?L(he):"["==e?L(F("]"),ne(ce,"]",","),z,he):"{"==e?L(F("}"),ne(de,"}",",;"),z,he):"("==e?L(ne(fe,")"),ue):"<"==e?L(ne(ce,">"),ce):void 0}function ue(e){if("=>"==e)return L(ce)}function de(e,t){return"variable"==e||"keyword"==T.style?(T.marked="property",L(de)):"?"==t?L(de):":"==e?L(ce):"["==e?L(I,ae,W("]"),de):void 0}function fe(e,t){return"variable"==e&&T.stream.match(/^\s*[?:]/,!1)||"?"==t?L(fe):":"==e?L(ce):S(ce)}function he(e,t){return"<"==t?L(F(">"),ne(ce,">"),z,he):"|"==t||"."==e||"&"==t?L(ce):"["==e?L(W("]"),he):"extends"==t||"implements"==t?(T.marked="keyword",L(ce)):void 0}function pe(e,t){if("<"==t)return L(F(">"),ne(ce,">"),z,he)}function me(){return S(ce,ge)}function ge(e,t){if("="==t)return L(ce)}function ve(e,t){return"enum"==t?(T.marked="keyword",L(qe)):S(ye,ae,we,xe)}function ye(e,t){return c&&A(t)?(T.marked="keyword",L(ye)):"variable"==e?(r(t),L()):"spread"==e?L(ye):"["==e?ie(ye,"]"):"{"==e?ie(be,"}"):void 0}function be(e,t){return"variable"!=e||T.stream.match(/^\s*:/,!1)?("variable"==e&&(T.marked="property"),"spread"==e?L(ye):"}"==e?S():L(W(":"),ye,we)):(r(t),L(we))}function we(e,t){if("="==t)return L(R)}function xe(e){if(","==e)return L(ve)}function ke(e,t){if("keyword b"==e&&"else"==t)return L(F("form","else"),P,z)}function Ce(e,t){return"await"==t?L(Ce):"("==e?L(F(")"),Te,W(")"),z):void 0}function Te(e){return"var"==e?L(ve,W(";"),Le):";"==e?L(Le):"variable"==e?L(Se):S(I,W(";"),Le)}function Se(e,t){return"in"==t||"of"==t?(T.marked="keyword",L(I)):L(U,Le)}function Le(e,t){return";"==e?L(Me):"in"==t||"of"==t?(T.marked="keyword",L(I)):S(I,W(";"),Me)}function Me(e){")"!=e&&L(I)}function Ae(e,t){return"*"==t?(T.marked="keyword",L(Ae)):"variable"==e?(r(t),L(Ae)):"("==e?L(_,F(")"),ne(Oe,")"),z,le,P,D):c&&"<"==t?L(F(">"),ne(me,">"),z,Ae):void 0}function Oe(e,t){return"@"==t&&L(I,Oe),"spread"==e?L(Oe):c&&A(t)?(T.marked="keyword",L(Oe)):S(ye,ae,we)}function Ne(e,t){return"variable"==e?_e(e,t):Ee(e,t)}function _e(e,t){if("variable"==e)return r(t),L(Ee)}function Ee(e,t){return"<"==t?L(F(">"),ne(me,">"),z,Ee):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(T.marked="keyword"),L(c?ce:I,Ee)):"{"==e?L(F("}"),De,z):void 0}function De(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&A(t))&&T.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",L(De)):"variable"==e||"keyword"==T.style?(T.marked="property",L(c?Fe:Ae,De)):"["==e?L(I,ae,W("]"),c?Fe:Ae,De):"*"==t?(T.marked="keyword",L(De)):";"==e?L(De):"}"==e?L():"@"==t?L(I,De):void 0}function Fe(e,t){return"?"==t?L(Fe):":"==e?L(ce,we):"="==t?L(R):S(Ae)}function ze(e,t){return"*"==t?(T.marked="keyword",L(je,W(";"))):"default"==t?(T.marked="keyword",L(I,W(";"))):"{"==e?L(ne(We,"}"),je,W(";")):S(P)}function We(e,t){return"as"==t?(T.marked="keyword",L(W("variable"))):"variable"==e?S(R,We):void 0}function Pe(e){return"string"==e?L():"("==e?S(I):S(He,Ie,je)}function He(e,t){return"{"==e?ie(He,"}"):("variable"==e&&r(t),"*"==t&&(T.marked="keyword"),L(Re))}function Ie(e){if(","==e)return L(He,Ie)}function Re(e,t){if("as"==t)return T.marked="keyword",L(He)}function je(e,t){if("from"==t)return T.marked="keyword",L(I)}function Be(e){return"]"==e?L():S(ne(R,"]"))}function qe(){return S(F("form"),ye,W("{"),F("}"),ne(Ue,"}"),z,z)}function Ue(){return S(ye,we)}function Ke(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return z.lex=D.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new k((e||0)-f,0,"block",!1),localVars:d.localVars,context:d.localVars&&new O(null,null,!1),indented:e||0};return d.globalVars&&"object"==typeof d.globalVars&&(t.globalVars=d.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),o(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,i){var o=e.cc;for(T.state=e,T.stream=i,T.marked=null,T.cc=o,T.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?I:P)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return T.marked?T.marked:"variable"==r&&C(e,n)?"variable-2":t}}(t,r,n,i,e))},indent:function(e,t){if(e.tokenize==y)return Ve.Pass;if(e.tokenize!=v)return 0;var r,n=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var a=e.cc[o];if(a==z)i=i.prev;else if(a!=ke)break}for(;("stat"==i.type||"form"==i.type)&&("}"==n||(r=e.cc[e.cc.length-1])&&(r==U||r==K)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;h&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var l,s,c=i.type,u=n==c;return"vardef"==c?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==c&&"{"==n?i.indented:"form"==c?i.indented+f:"stat"==c?i.indented+(s=t,"operator"==(l=e).lastType||","==l.lastType||p.test(s.charAt(0))||/[,.]/.test(s.charAt(0))?h||f:0):"switch"!=i.info||u||0==d.doubleIndentSwitch?i.align?i.column+(u?0:1):i.indented+(u?0:f):i.indented+(/^(?:case|default)\b/.test(t)?f:2*f)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:Ke,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=I&&t!=R||e.cc.pop()}}}),Ve.registerHelper("wordChars","javascript",/[\w$]/),Ve.defineMIME("text/javascript","javascript"),Ve.defineMIME("text/ecmascript","javascript"),Ve.defineMIME("application/javascript","javascript"),Ve.defineMIME("application/x-javascript","javascript"),Ve.defineMIME("application/ecmascript","javascript"),Ve.defineMIME("application/json",{name:"javascript",json:!0}),Ve.defineMIME("application/x-json",{name:"javascript",json:!0}),Ve.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),Ve.defineMIME("text/typescript",{name:"javascript",typescript:!0}),Ve.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":17}],21:[function(e,t,r){var n;n=function(C){"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},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(e,t){var a,o,l=e.indentUnit,s={},r=t.htmlMode?T:S;for(var n in r)s[n]=r[n];for(var n in t)s[n]=t[n];function c(t,r){function e(e){return(r.tokenize=e)(t,r)}var n=t.next();return"<"==n?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(i("atom","]]>")):null:t.match("--")?e(i("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function n(i){return function(e,t){for(var r;null!=(r=e.next());){if("<"==r)return t.tokenize=n(i+1),t.tokenize(e,t);if(">"==r){if(1==i){t.tokenize=c;break}return t.tokenize=n(i-1),t.tokenize(e,t)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),r.tokenize=i("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",r.tokenize=u,"tag bracket"):"&"==n?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function u(e,t){var r,n,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=c,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=c,t.state=p,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(r=i,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=u;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(r,n){return function(e,t){for(;!e.eol();){if(e.match(n)){t.tokenize=c;break}e.next()}return r}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!s.contextGrabbers.hasOwnProperty(r)||!s.contextGrabbers[r].hasOwnProperty(t))return;f(e)}}function p(e,t,r){return"openTag"==e?(r.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,r){return"word"==e?(r.tagName=t.current(),o="tag",b):s.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,t,r)):(o="error",m)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&s.implicitlyClosed.hasOwnProperty(r.context.tagName)&&f(r),r.context&&r.context.tagName==n||!1===s.matchClosing?(o="tag",v):(o="tag error",y)}return s.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,r)):(o="error",y)}function v(e,t,r){return"endTag"!=e?(o="error",v):(f(r),p)}function y(e,t,r){return o="error",v(e,0,r)}function b(e,t,r){if("word"==e)return o="attribute",w;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new d(r,n,i==r.indented)),p}return o="error",b}function w(e,t,r){return"equals"==e?x:(s.allowMissing||(o="error"),b(e,0,r))}function x(e,t,r){return"string"==e?k:"word"==e&&s.allowUnquoted?(o="string",b):(o="error",b(e,0,r))}function k(e,t,r){return"string"==e?k:b(e,0,r)}return c.isInText=!0,{startState:function(e){var t={tokenize:c,state:p,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;a=null;var r=t.tokenize(e,t);return(r||a)&&"comment"!=r&&(o=null,t.state=t.state(a||r,e,t),o&&(r="error"==o?r+" error":o)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+l;if(n&&n.noIndent)return C.Pass;if(e.tokenize!=u&&e.tokenize!=c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==s.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var i=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;n;){if(n.tagName==i[2]){n=n.prev;break}if(!s.implicitlyClosed.hasOwnProperty(n.tagName))break;n=n.prev}else if(i)for(;n;){var o=s.contextGrabbers[n.tagName];if(!o||!o.hasOwnProperty(i[2]))break;n=n.prev}for(;n&&n.prev&&!n.startOfLine;)n=n.prev;return n?n.indent+l:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=b)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof r&&"object"==typeof t?n(e("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)},{"../../lib/codemirror":17}],22:[function(e,t,r){t.exports={prettyPrint:function(e,t){var r,n,i,o,a,c;for(n=(t=t||{}).indent_size||4,i=t.indent_char||" ",a=t.brace_style||"collapse",o=0==t.max_char?1/0:t.max_char||70,c=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(r=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(e,this.Utils.whitespace))t.length&&(r=!0),this.line_char_count--;else{if(r){if(this.line_char_count>=this.max_char){t.push("\n");for(var n=0;n<this.indent_level;n++)t.push(this.indent_string);this.line_char_count=0}else t.push(" "),this.line_char_count++;r=!1}t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos==this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"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,c)){var s=this.get_unformatted("</"+l+">",a);n.push(s),0<e&&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"!"===l.charAt(0)?-1!=l.indexOf("[if")?(-1!=a.indexOf("!IE")&&(s=this.get_unformatted("--\x3e",a),n.push(s)),this.tag_type="START"):-1!=l.indexOf("[endif")?(this.tag_type="END",this.unindent()):(s=-1!=l.indexOf("[cdata[")?this.get_unformatted("]]>",a):this.get_unformatted("--\x3e",a),n.push(s),this.tag_type="SINGLE"):("/"===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"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.printer=function(e,t,r,n,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=r,this.brace_style=i,this.indent_level=0,this.max_char=n;for(var o=this.line_char_count=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(){0<this.indent_level&&this.indent_level--}},this}).printer(e,i,n,o,a);;){var l=r.get_token();if(r.token_text=l[0],r.token_type=l[1],"TK_EOF"===r.token_type)break;switch(r.token_type){case"TK_TAG_START":r.print_newline(!1,r.output),r.print_token(r.token_text),r.indent(),r.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===r.last_token&&""===r.last_text){var s=r.token_text.match(/\w+/)[0],u=r.output[r.output.length-1].match(/<\s*(\w+)/);null!==u&&u[1]===s||r.print_newline(!0,r.output)}r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var d=r.token_text.match(/^\s*<([a-z]+)/i);d&&r.Utils.in_array(d[1],c)||r.print_newline(!1,r.output),r.print_token(r.token_text),r.current_mode="CONTENT";break;case"TK_CONTENT":""!==r.token_text&&r.print_token(r.token_text),r.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==r.token_text){r.output.push("\n");var f=r.token_text;if("TK_SCRIPT"==r.token_type)var h="function"==typeof js_beautify&&js_beautify;else"TK_STYLE"==r.token_type&&(h="function"==typeof css_beautify&&css_beautify);if("keep"==t.indent_scripts)var p=0;else p="separate"==t.indent_scripts?-r.indent_level:1;var m=r.get_full_indent(p);if(h)f=h(f.replace(/^\s*/,m),t);else{var g=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(r.indent_string).length-1,v=r.get_full_indent(p-g);f=f.replace(/^\s*/,m).replace(/\r\n|\r|\n/g,"\n"+v).replace(/\s*$/,"")}f&&(r.print_token(f),r.print_newline(!0,r.output))}r.current_mode="TAG"}r.last_token=r.token_type,r.last_text=r.token_text}return r.output.join("")}}},{}],23:[function(e,t,r){"use strict";t.exports=e("./stream/stream")},{"./stream/stream":24}],24:[function(e,r,t){!function(){"use strict";var t=0,i={};function a(){function e(){return 0<arguments.length&&arguments[0]!==i&&n(e,arguments[0]),e._state.value}var r;return(r=e).constructor=a,r._state={id:t++,value:void 0,state:0,derive:void 0,recover:void 0,deps:{},parents:[],endStream:void 0,unregister:void 0},r.map=r["fantasy-land/map"]=u,r["fantasy-land/ap"]=d,r["fantasy-land/of"]=a,r.valueOf=f,r.toJSON=h,r.toString=f,Object.defineProperties(r,{end:{get:function(){if(!r._state.endStream){var t=a();t.map(function(e){return!0===e&&(c(r),t._state.unregister=function(){c(t)}),e}),r._state.endStream=t}return r._state.endStream}}}),0<arguments.length&&arguments[0]!==i&&n(e,arguments[0]),e}function n(e,t){for(var r in o(e,t),e._state.deps)l(e._state.deps[r],!1);null!=e._state.unregister&&e._state.unregister(),function(e){for(var t in e._state.changed=!1,e._state.deps)e._state.deps[t]._state.changed=!1}(e)}function o(e,t){e._state.value=t,e._state.changed=!0,2!==e._state.state&&(e._state.state=1)}function l(e,t){var r=e._state.parents;if(0<r.length&&r.every(m)&&(t||r.some(g))){var n=e._state.derive();if(n===i)return!1;o(e,n)}}function s(e,t){if(!t.every(p))throw new Error("Ensure that each item passed to stream.combine/stream.merge is a stream");return r=a(),n=t,i=function(){return e.apply(this,t.concat([t.filter(g)]))},(o=r._state).derive=i,o.parents=n.filter(v),function e(t,r){for(var n=0;n<r.length;n++)r[n]._state.deps[t._state.id]=t,e(t,r[n]._state.parents)}(r,o.parents),l(r,!0),r;var r,n,i,o}function c(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);-1<i&&n._state.parents.splice(i,1)}e._state.state=2,e._state.deps={}}function u(t){return s(function(e){return t(e())},[this])}function d(e){return s(function(e,t){return e()(t())},[e,this])}function f(){return this._state.value}function h(){return null!=this._state.value&&"function"==typeof this._state.value.toJSON?this._state.value.toJSON():this._state.value}function p(e){return e._state}function m(e){return 1===e._state.state}function g(e){return e._state.changed}function v(e){return 2!==e._state.state}(a["fantasy-land/of"]=a).merge=function(e){return s(function(){return e.map(function(e){return e()})},e)},a.combine=s,a.scan=function(t,r,e){var n=s(function(e){return r=t(r,e._state.value)},[e]);return 0===n._state.state&&n(r),n},a.scanMerge=function(n,i){var e=n.map(function(e){var t=e[0];return 0===t._state.state&&t(void 0),t});return s(function(){var r=arguments[arguments.length-1];return e.forEach(function(e,t){-1<r.indexOf(e)&&(i=n[t][1](i,e._state.value))}),i},e)},a.HALT=i,void 0!==r?r.exports=a:"function"!=typeof window.m||"stream"in window.m?window.m={stream:a}:window.m.stream=a}()},{}]},{},[11])}();
|
2 |
//# sourceMappingURL=forms-admin.min.js.map
|
assets/js/forms-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["forms-admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","m","i18n","showType","config","fieldType","type","charAt","toUpperCase","slice","label","fieldLabel","value","onchange","withAttr","placeholder","title","isHidden","initialValue","style","optional","valueHelp","numberMinMax","min","max","isRequired","inputAtts","checked","required","desc","forceRequired","disabled","isFieldRequired","placeholderHelp","useParagraphs","wrap","wrapInParagraphTags","choiceType","options","selected","dropdown","radioButtons","acceptsMultipleValues","push","checkboxes","choices","html","map","choice","index","data-id","name","selectChoice","bind","preselect","remove","class","onclick","key","this","splice","linkToTerms","agreeToTermsLink","link","2","forms","rows","render","text","visibleRows","hidden","submit","number","./field-forms-rows.js","3","htmlutil","setAttributes","vnode","dom","setAttribute","generators","select","attributes","hasSelection","oncreate","unshift","href","target","checkbox","radio","field","htmlTemplate","vdom","document","createElement","showLabel","prettyPrint","innerHTML","4","tabs","editor","fields","events","setActiveField","fieldConfig","get","c","join","redraw","createFieldHTMLAndAddToForm","generate","insert","overlay","on","view","fieldCategories","getCategories","availableFields","getAll","fieldsChoice","chooseField","category","categoryFields","filter","className","inForm","inFormContent","form","help","trust","onkeydown","window","event","keyCode","addToForm","controller","./field-forms.js","./field-generator.js","./overlay.js","5","register","data","sticky","registeredFields","getFieldType","phone","birthday","registerMergeField","mergeField","listFields","field_type","tag","mailchimpType","streetAddress","city","state","zip","country","mc4wp_vars","countries","registerInterestCategory","interestCategory","interestCategories","id","interests","registerListFields","list","merge_fields","sort","b","public","forEach","interest_categories","registerCustomFields","lists","formFields","subscribe","submitButton","listChoice","listChoiceDescription","unsubscribe","formAction","formActionDescription","agreeToTerms","agreeToTermsShort","registerListsFields","deregister","6","prop","getAllWhere","searchKey","searchValue","timeout","categories","Field","FieldChoice","indexOf","existingField","shift","choiceLabel","Object","keys","createChoices","clearTimeout","setTimeout","trigger","mithril/stream","7","setPreviewDom","frameContent","previewFrame","contentDocument","contentWindow","previewDom","querySelector","updatePreview","markup","FormEditor","getValue","replace","templateRegex","dispatchEvent","Event","domDirty","_dom","toLowerCase","CodeMirror","element","getElementById","addEventListener","signal","query","querySelectorAll","containsField","fieldName","elements","namedItem","replaceSelection","focus","callback","refresh","fromTextArea","selectionPointer","mode","htmlMode","autoCloseTags","autoRefresh","styleActiveLine","matchBrackets","matchTags","bothTags","bubbles","codemirror","codemirror/addon/edit/closetag.js","codemirror/addon/edit/matchbrackets.js","codemirror/addon/edit/matchtags.js","codemirror/addon/fold/xml-fold.js","codemirror/addon/selection/active-line.js","codemirror/mode/css/css","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/javascript/javascript","codemirror/mode/xml/xml","8","settings","helpers","updateFields","originalRequiredValue","nameGroup","requiredFields","requiredFieldElements","Array","prototype","el","pos","substr","requiredFieldsInput","findRequiredFields","debounce","9","show","notices","hide","container","heading","parentNode","insertBefore","nextSibling","init","groupingsNotice","requiredFieldsNotice","missingFields","10","close","removeEventListener","onKeyDown","position","_onCloseCallback","preventDefault","_element","windowWidth","innerWidth","documentElement","clientWidth","body","windowHeight","innerHeight","clientHeight","marginLeft","marginTop","left","top","storeElementReference","content","onCloseCallback","onremove","11","mc4wp_forms_i18n","mc4wp","deps","mithril","FormWatcher","FieldHelper","FieldsFactory","formEditor","fieldHelper","mount","fieldsFactory","getSelectedLists","mailchimp","./admin/field-helper.js","./admin/fields-factory.js","./admin/fields.js","./admin/form-editor.js","./admin/form-watcher.js","./admin/notices","12","mod","amd","autoCloseCurrent","cm","typingSlash","ranges","listSelections","replacements","head","empty","Pass","tok","getTokenAt","inner","innerMode","getMode","string","start","ch","replacement","context","tagName","closingTagExists","getLine","line","end","replaceSelections","indentLine","collection","elt","newTag","scanForClosingTag","Math","lastLine","nextClose","cx","onCx","prev","to","next","defineOption","val","old","Init","removeKeyMap","whenClosing","getOption","autoCloseSlash","whenOpening","opt","configuration","dontCloseTags","htmlDontClose","indentTags","htmlIndent","lowerTagName","test","indent","newPos","Pos","info","replaceRange","anchor","sel","setSelections","autoCloseGT","addKeyMap","commands","closeTag","../../lib/codemirror","../fold/xml-fold","13","findMatchingBracket","where","getLineHandle","afterCursor","getWrapperElement","match","matching","dir","strict","getTokenTypeAt","found","scanForBracket","from","forward","maxScanLen","maxScanLineLength","maxScanLines","stack","re","bracketRegex","lineEnd","firstLine","lineNo","pop","autoclear","maxHighlightLen","maxHighlightLineLength","marks","markText","ie_lt8","focused","clear","operation","doMatchBrackets","currentlyHighlighted","navigator","userAgent","documentMode","(",")","[","]","{","}","off","defineExtension","oldConfig","14","tagHit","tagOther","doMatchTags","failedTagMatch","somethingSelected","cur","getCursor","range","getViewport","findMatchingTag","matchBothTags","hit","at","open","other","maybeUpdateMatch","toMatchingTag","extendSelection","15","Iter","tagAt","iter","nextLine","prevLine","toTagEnd","gt","lastSlash","lastIndexOf","selfClose","toTagStart","lt","xmlTagStart","lastIndex","exec","toNextTag","toPrevTag","findMatchingClose","startLine","startCh","findMatchingOpen","endLine","endCh","nameStartChar","RegExp","registerHelper","openTag","startPos","endPos","cmp","here","findEnclosingTag","16","clearActiveLines","activeLines","removeLineClass","WRAP_CLASS","BACK_CLASS","GUTT_CLASS","updateActiveLines","active","option","nonEmpty","getLineHandleVisualStart","sameArray","addLineClass","selectionChange","17","global","factory","classTest","cls","removeChildren","count","childNodes","removeChild","firstChild","removeChildrenAndAdd","parent","appendChild","cssText","createTextNode","eltP","contains","child","nodeType","host","activeElt","activeElement","shadowRoot","addClass","node","current","joinClasses","as","split","args","arguments","apply","copyObj","obj","overwrite","hasOwnProperty","countColumn","tabSize","startIndex","startValue","search","nextTab","array","findColumn","goal","col","skipped","spaceStr","spaceStrs","lst","arr","out","nothing","createObj","base","props","inst","create","isWordCharBasic","nonASCIISingleCaseWordChar","isWordChar","helper","source","isEmpty","isExtendingChar","charCodeAt","extendingChars","skipExtendingChars","str","findFirst","pred","midF","mid","ceil","floor","doc","first","size","chunk","lines","children","sz","chunkSize","getBetween","getLines","updateLineHeight","height","diff","no","lineAtHeight","h","outer","i$1","lh","isLine","lineNumberFor","String","lineNumberFormatter","firstLineNumber","equalCursorPos","copyPos","x","maxPos","minPos","clipLine","clipPos","last","linelen","clipToLen","clipPosArray","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","change","full","oldFirst","markedSpans","oldLast","isInsert","nw","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","startsBefore","markedSpansAfter","sameLine","offset","span$1","clearEmptySpans","newMarkers","gapMarkers","gap","i$2","i$3","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","find","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sawCollapsedSpans","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","conflictingCollapsedRange","lineNo$$1","visualLine","merged","visualLineNo","lineN","vis","visualLineEndNo","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","p","lineLength","len","found$1","findMaxLine","d","display","maxLine","maxLineLength","maxLineChanged","getBidiPartAt","order","bidiOther","getOrder","direction","bidiOrdering","getHandlers","emitter","_handlers","noHandlers","detachEvent","map$$1","concat","handlers","signalDOMEvent","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","set","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","mac","ctrlKey","zeroWidthElement","measure","zwspSupported","offsetHeight","offsetWidth","ie","ie_version","hasBadBidiRects","badBidiRects","txt","r0","getBoundingClientRect","r1","right","resolveMode","spec","mimeModes","mfactory","modes","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","startState","a1","a2","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","baseTokens","overlays","i_end","opaque","baseTokenPos","styles","classes","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","result","stateAfter","save","styleClasses","highlightFrontier","modeFrontier","precise","Context","minindent","minline","lim","after","SavedContext","lookAhead","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","startAt","stream","StringStream","callBlankLine","eol","readToken","blankLine","token","takeToken","asArray","tokens","Token","extractLineClasses","output","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","cleanUpLine","interpretTokenStyle","cache","styleToClassCacheWithMode","styleToClassCache","buildLineContent","lineView","webkit","builder","pre","trailingSpace","splitSpaces","rest","addToken","buildToken","startStyle","endStyle","css","part","buildTokenBadBidi","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","Infinity","foundBookmarks","endStyles","j","j$1","j$2","buildCollapsedSpan","upto","tokenText","insertLineContent","externalMeasured","maps","caches","lastChild","defaultSpecialCharPlaceholder","toString","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","ignoreWidget","widget","input","needsContentAttribute","setUneditable","LineView","visualLineContinued","buildViewArray","nextPos","signalLater","operationGroup","delayedCallbacks","orphanDelayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","built","getLineContent","replaceChild","updateLineClasses","updateLineText","updateLineGutter","alignable","insertLineWidgets","updateLineWidgets","ensureLineWrapped","zIndex","ext","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutters","gutterWidth","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","positionLineWidget","above","widgetHeight","parentStyle","wrapper","eventInWidget","getAttribute","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","parseInt","paddingRight","isNaN","scrollGap","scrollerGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","barHeight","mapFromLineView","before","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","ensureLineHeights","place","nodeAndOffsetInLineMap","collapse","coverStart","coverEnd","getUsefulRect","screen","logicalXDPI","deviceXDPI","badZoomedRects","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","chrome","android","pageXOffset","scrollLeft","pageScrollY","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","invert","level","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","widgetHeight$$1","begin","ltr","_lineNo","ref","wrappedLineExtent","closestDist","endX","dist","boxIsAfter","baseX","chAround","boxAround","box","atLeft","atStart","coordsCharInner","mergedPos","wrappedLineExtentChar","textHeight","measureText","clientLeft","offsetLeft","compensateForHScroll","estimateHeight","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","round","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","selection","primIndex","range$$1","showCursorWhenSelecting","drawSelectionCursor","add","fragment","rightSide","drawForLine","fromArg","toArg","wrapX","side","extent","lineLen","iterateBidiSections","fromPos","toPos","openStart","openEnd","openLeft","docLTR","openRight","leftSide","topLeft","topRight","botLeft","botRight","cmpCoords","padding","sizerWidth","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","drawSelectionRange","cursor","cursorHeight","otherCursor","restartBlink","clearInterval","blinker","cursorDiv","visibility","cursorBlinkRate","setInterval","ensureFocus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","reset","receivedFocus","rmClass","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","alignHorizontally","alignWidgets","comp","gutterW","align","maybeUpdateLineNumberWidth","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","updateGutterSpace","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","gecko","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","measureForScrollbars","docH","viewHeight","viewWidth","barLeft","docHeight","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","update","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","initScrollbars","scrollbarModel","scrollbarStyle","axis","startOperation","viewChanged","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","nextOpId","op","ops","ownsGroup","pushOperation","endOperation","endCb","group","callbacks","fireCallbacksForOps","finishOperation","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","mustUpdate","DisplayUpdate","endOperation_R1","updatedDisplay","updateDisplayIfNeeded","endOperation_W1","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","endOperation_R2","minWidth","takeFocus","setDocumentHeight","endOperation_W2","i$4","postUpdateDisplay","wheelStartX","wheelStartY","limit","changed","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","doScroll","phantom","scrollNode","scrollIntoView","maybeScrollWindow","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","endOperation_finish","endOperations","runInOp","methodOp","docMethodOp","regChange","lendiff","updateLineNumbers","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","time","highlight","highlightWorker","Date","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","editorIsHidden","force","visible","renderedView","viewportMargin","different","lastWrapHeight","wrapperHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","getSelection","anchorNode","extend","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","createRange","setEnd","removeAllRanges","addRange","restoreSelection","selectionDiv","minHeight","oldDisplayWidth","reportedViewFrom","reportedViewTo","updateGutters","specs","gElt","setGuttersForLineNumbers","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","wheelPixelsPerUnit","onScrollWheel","scroll","canScrollX","canScrollY","presto","pixels","wheelSamples","wheelDX","wheelDY","movedX","movedY","sample","normalizeSelection","prim","inv","Range","Selection","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","updateLine","linesFor","Line","lastText","lastSpans","nlines","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","History","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","history","origin","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","equals","existing","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","copy","deepCopy","newChanges","Number","extendRange","posBefore","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","atomic","near","movePos","far","cantEdit","selectAll","sel_dontScroll","filterChange","canceled","cancel","makeChange","ignoreReadOnly","suppressEdits","sawReadOnlySpans","mark","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","antiChanges","returned","v","shiftDoc","distance","removed","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","assign","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","adjustScrollWhenAboveVisible","cloneNode","isParent","SharedTextMarker","markTextShared","TextMarker","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","nextMarkerId","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","onDrop","clearDragCursor","lastDrop","files","dataTransfer","isReadOnly","FileReader","File","read","loadFile","file","allowDropFileTypes","reader","onload","lineSeparator","readAsText","draggingText","text$1","getData","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","ensureGlobalHandlers","globalsRegistered","resizeTimer","onResize","registerGlobalHandlers","setSize","normalizeKeyName","alt","ctrl","cmd","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","keyNames","addModifierNames","noShift","altKey","flipCtrlCmd","metaKey","shiftKey","keyName","altGraphKey","keyMap","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","prep","targetTop","lineStart","visual","visualLineEnd","lineStartSmart","firstNonWS","inWS","doHandleBinding","bound","dropShift","ensurePolled","prevShift","dispatchKey","seq","keySeq","stopSeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","handled","lastStoppedKey","hasCopyEvent","up","showCrossHair","onKeyUp","onKeyPress","charCode","fromCharCode","handleCharBinding","onMouseDown","activeTouch","supportsTouch","draggable","clickInGutter","repeat","now","lastDoubleClick","compare","lastClick","PastClick","clickRepeat","selectingText","handleMappedButton","contained","behavior","unit","chromeOS","addNew","moveOnDrag","configureMouse","dragDrop","dragAndDrop","moved","dragEnd","mouseMove","dragStart","e2","leftButtonStartDrag","extendTo","lastPos","startCol","posCol","leftPos","startSel","ourIndex","oldRange","ourRange","rangeForUnit","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","sel_mouse","curCount","counter","editorSize","move","leftButtonSelect","leftButtonDown","captureRightClick","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","g","contextMenuInGutter","themeChanged","theme","guttersChanged","dragDropChanged","funcs","dragFunctions","toggle","enter","over","leave","drop","wrappingChanged","CodeMirror$1","this$1","defaults","Doc","inputStyles","inputStyle","mobile","pasteIncoming","cutIncoming","Delayed","autofocus","finishTouch","touchFinished","prevTouch","farAway","touch","word","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","safari","img","src","_top","onDragStart","inp","getField","registerEventHandlers","optionHandlers","finishInit","initHooks","textRendering","how","aggressive","curSpace","indentation","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","setLastCopied","newLastCopied","lastCopied","applyTextInput","inserted","deleted","paste","textLines","splitLinesAuto","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","getRange","disableBrowserMagic","spellcheck","hiddenTextarea","te","div","ios","border","findPosH","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","moveInStorageOrder","searchInVisualLine","getRes","res","nextCh","moveVisually","findNextLine","origDir","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","posToDOM","badPos","bad","domToPos","lineNode","textNode","topNode","curNode","nodeValue","textContent","previousSibling","dist$1","locateNodeInLineView","platform","ie_upto10","ie_11up","edge","qtwebkit","vendor","mac_geMountainLion","windows","presto_version","endNode","setStart","createTextRange","moveToElementText","moveEnd","moveStart","selectInput","selectionStart","selectionEnd","_e","ms","sel_move","charType","lowTypes","arabicTypes","BidiSpan","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","outerType","types","type$1","prev$1","type$2","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","i$7","nstart","reverse","attachEvent","nl","rt","ownerDocument","parentElement","compareEndPoints","oncopy","lineOracle","lastColumnPos","lastColumnValue","sol","peek","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","pattern","consume","caseInsensitive","cased","hideFirstChars","oracle","baseToken","maxLookAhead","NativeScrollbars","vert","horiz","checkedZeroWidth","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","delay","maybeDisable","elementFromPoint","NullScrollbars","native","null","there","removeInner","insertInner","iterN","oldHeight","remaining","leaf","maybeSpill","me","sibling","myIndex","used","LineWidget","oldH","withOp","dHeight","nextDocId","lineSep","cleanGeneration","constructor","setValue","getLineNumber","lineCount","setCursor","extendSelectionsBy","addSelection","getSelections","dup","newSel","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","splitIds","iterLinkedDocs","getEditor","setDirection","directionChanged","eachLine","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","127","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","Ctrl-O","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","goLineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","openLine","toggleOverwrite","defineInitHook","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","poll","pollSelection","pollInterval","scan","isInGutter","triggerOnKeyDown","pollContent","fromIndex","fromNode","toNode","toIndex","newText","closing","addText","walk","cmText","markerID","recognizeMarker","isBlock","nodeName","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","prepareCopyCut","textarea","fastPoll","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","prepareSelectAllHack","extval","rehide","oldWrapperCSS","oldCSS","detectingSelectAll","resetSelectionOnContextMenu","wrapperBox","oldScrollY","scrollY","scrollTo","mouseup","deflt","notOnInit","newBreaks","getInputField","detach","attach","integer","tabIndex","defineOptions","setOption","getDoc","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getLineTokens","getHelpers","_global","getStateAfter","defaultTextHeight","defaultCharWidth","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","getScrollerElement","getGutterElement","registerGlobalHelper","predicate","addEditorMethods","dontDelegate","method","contenteditable","defineMode","dependencies","defineMIME","mime","func","defineDocExtension","tabindex","realSubmit","leaveSubmitMethodAlone","wrappedSubmit","getTextArea","toTextArea","cmpPos","addLegacyProps","version","keySet","tokenCComment","maybeEnd","tokenize","parserConfig","ret","tp","tokenString","quote","escaped","tokenParenthesized","pushContext","popContext","pass","states","popAndPass","wordAsValue","valueKeywords","colorKeywords","inline","propertyKeywords","tokenHooks","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","allowNested","lineComment","supportsAtComponent","stateArg","block","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","blockCommentStart","blockCommentEnd","blockCommentContinue","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","colorKeywords_","valueKeywords_","allWords","/",":","$","#","@","&","getAttrValue","attr","regexp","attrRegexpCache","getAttrRegexp","getTagRegexp","anchored","addTags","defaultTags","script","htmlState","tags","inTag","tagInfo","tagText","findMatchingMode","endTagA","endTag","localState","localMode","pat","maybeBackup","multilineTagIndentFactor","multilineTagIndentPastTag","configTags","configScript","scriptTypes","matches","local","../css/css","../javascript/javascript","../xml/xml","cont","tokenBase","jsonldMode","isJsonldKeyword","tokenComment","expressionAllowed","inSet","readRegexp","tokenQuasi","isOperatorChar","lexical","wordRE","lastType","keywords","propertyIsEnumerable","kw","findFatArrow","fatArrowAt","arrow","isTS","depth","sawSomething","bracket","brackets","JSLexical","inScope","varname","localVars","vars","cc","inList","marked","globalVars","pushcontext","defaultVars","popcontext","pushlex","lex","poplex","expect","wanted","exp","statement","vardef","parenExpr","maybeexpression","maybeelse","functiondef","forspec","typeexpr","maybelabel","expression","funarg","afterExport","afterImport","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","atomicTypes","classExpression","arrayLiteral","contCommasep","objprop","quasi","_","maybeTypeArgs","maybeTarget","expr","property","continueQuasi","getterSetter","afterprop","what","sep","proceed","maybetype","mayberettype","isKW","afterType","typeprop","typearg","maybeReturnType","typeparam","maybeTypeDefault","maybeAssign","vardefCont","proppattern","_type","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classfield","maybeFrom","exportField","importSpec","maybeMoreImports","maybeAs","statementIndent","jsonld","jsonMode","json","typescript","wordCharacters","A","B","C","D","operator","atom","jsKeywords","if","while","with","else","do","try","finally","return","break","continue","new","delete","void","throw","debugger","var","const","let","function","catch","for","switch","case","default","in","typeof","instanceof","true","false","super","yield","export","import","extends","await","tsKeywords","interface","implements","namespace","private","protected","abstract","readonly","boolean","any","variable","jsonld-keyword","basecolumn","parseJS","firstChar","isContinuedStatement","doubleIndentSwitch","closeBrackets","skipExpression","21","htmlConfig","autoSelfClosers","area","br","command","embed","frame","hr","keygen","meta","param","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","tr","contextGrabbers","dt","address","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","editorConf","config_","inText","chain","parser","inBlock","doctype","baseState","tagStart","closure","isInAttribute","inAttribute","stringStartCol","terminator","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","setStyle","attrState","matchClosing","closeState","closeStateErr","attrEqState","startOfLine","noIndent","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","skipAttribute","22","html_source","multi_parser","indent_size","indent_character","max_char","brace_style","unformatted","indent_char","current_mode","parentcount","parent1","tag_type","token_text","last_token","last_text","token_type","Utils","whitespace","single_token","extra_liners","in_array","get_content","input_char","line_char_count","indent_level","indent_string","get_contents_to","reg_match","reg_array","end_script","substring","record_tag","retrieve_tag","temp_parent","get_tag","tag_start","tag_end","get_unformatted","print_newline","tag_index","tag_complete","tag_check","comment","unindent","delimiter","orig_tag","get_token","get_full_indent","printer","js_source","ignore","print_token","tag_name","tag_extracted_from_last_output","_beautifier","js_beautify","css_beautify","indent_scripts","script_indent_level","_level","reindent","23","./stream/stream","24","createStream","HALT","updateStream","_state","guid","derive","recover","parents","endStream","unregister","ap","valueOf","toJSON","defineProperties","unregisterStream","initStream","updateState","updateDependency","finalize","mustSync","every","some","combine","fn","streams","valid","dep","notEnded","registerDependency","initDependency","dependent","s1","s2","merge","reducer","seed","newStream","scanMerge","tuples","tuple","idx"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,EAAeC,OAASD,GAAW,WAAY,SAASE,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATV,GAAqBA,EAAQ,IAAIS,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,IAAIQ,YAAYZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAG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